Remove unneeded @TargetApi

fix android lint errors
This commit is contained in:
Jimmy Shih
2012-11-06 15:51:38 -08:00
parent 903751c799
commit 6d2a642bc2
17 changed files with 17 additions and 43 deletions
@@ -24,10 +24,10 @@ import com.google.android.apps.mytracks.content.Track;
import com.google.android.apps.mytracks.content.Waypoint;
import com.google.android.apps.mytracks.content.WaypointCreationRequest;
import com.google.android.apps.mytracks.stats.TripStatistics;
import com.google.android.apps.mytracks.util.ApiAdapterFactory;
import com.google.android.apps.mytracks.util.PreferencesUtils;
import com.google.android.maps.mytracks.R;
import android.annotation.TargetApi;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
@@ -126,7 +126,6 @@ public class TrackRecordingServiceTest extends ServiceTestCase<TestRecordingServ
super.shutdownService();
}
@TargetApi(9)
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -195,7 +194,7 @@ public class TrackRecordingServiceTest extends ServiceTestCase<TestRecordingServ
SharedPreferences sharedPreferences = context.getSharedPreferences(
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
// Let's use default values.
sharedPreferences.edit().clear().apply();
ApiAdapterFactory.getApiAdapter().applyPreferenceChanges(sharedPreferences.edit().clear());
// Disable auto resume by default.
updateAutoResumePrefs(PreferencesUtils.AUTO_RESUME_TRACK_CURRENT_RETRY_DEFAULT, 0);
@@ -1,10 +1,7 @@
package com.google.android.apps.mytracks.services.sensors;
import com.google.android.apps.mytracks.content.Sensor;
import android.annotation.TargetApi;
import java.util.Arrays;
import com.google.android.apps.mytracks.util.ApiAdapterFactory;
import junit.framework.TestCase;
@@ -17,10 +14,9 @@ public class PolarMessageParserTest extends TestCase {
{(byte) 0xFE, 0x08, (byte) 0xF7, 0x01, (byte) 0xD1, 0x00, 0x11, 0x04, (byte) 0xFE, 0x08,
(byte) 0xF7, 0x02, (byte) 0xD1, 0x00, 0x11, 0x04};
private byte[] buf;
@TargetApi(9)
public void setUp() {
buf = Arrays.copyOf(originalBuf, originalBuf.length);
buf = ApiAdapterFactory.getApiAdapter().copyByteArray(originalBuf, 0, originalBuf.length);
}
public void testIsValid() {
@@ -1,10 +1,10 @@
package com.google.android.apps.mytracks.services.sensors;
import com.google.android.apps.mytracks.Constants;
import com.google.android.apps.mytracks.util.ApiAdapterFactory;
import com.google.android.apps.mytracks.util.PreferencesUtils;
import com.google.android.maps.mytracks.R;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.SharedPreferences;
import android.test.AndroidTestCase;
@@ -12,7 +12,6 @@ import android.test.suitebuilder.annotation.SmallTest;
public class SensorManagerFactoryTest extends AndroidTestCase {
@TargetApi(9)
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -20,7 +19,7 @@ public class SensorManagerFactoryTest extends AndroidTestCase {
SharedPreferences sharedPreferences = getContext().getSharedPreferences(
Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
// Let's use default values.
sharedPreferences.edit().clear().apply();
ApiAdapterFactory.getApiAdapter().applyPreferenceChanges(sharedPreferences.edit().clear());
}
@SmallTest