Permalink
Browse files

TargetApi annontations for lint

This makes the CompatHoneycomb tab listener an inner class instead
of an anonymous class so it can be annotated
  • Loading branch information...
1 parent 37cd6c2 commit cc582a2842e5ec7c439cc88eacb3db6fe107d897 @kreed kreed committed Feb 27, 2012
View
2 src/android/support/v4/view/EdgeEffectCompat.java
@@ -22,6 +22,7 @@
package android.support.v4.view;
+import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Canvas;
import android.view.View;
@@ -31,6 +32,7 @@
* Wrapper around {@link EdgeEffect} for compatibility with older versions of
* Android.
*/
+@TargetApi(14)
public class EdgeEffectCompat {
/**
* The wrapped EdgeEffect.
View
2 src/org/kreed/vanilla/CompatEq.java
@@ -22,12 +22,14 @@
package org.kreed.vanilla;
+import android.annotation.TargetApi;
import android.media.MediaPlayer;
import android.media.audiofx.Equalizer;
/**
* Gingerbread equalizer compatibility.
*/
+@TargetApi(9)
public class CompatEq {
private final Equalizer mEq;
View
2 src/org/kreed/vanilla/CompatFroyo.java
@@ -22,6 +22,7 @@
package org.kreed.vanilla;
+import android.annotation.TargetApi;
import android.app.backup.BackupManager;
import android.content.ComponentName;
import android.content.Context;
@@ -32,6 +33,7 @@
/**
* Framework methods only in Froyo or above go here.
*/
+@TargetApi(8)
public class CompatFroyo implements AudioManager.OnAudioFocusChangeListener {
/**
* Instance of the audio focus listener created by {@link #createAudioFocus()}.
View
2 src/org/kreed/vanilla/CompatHoneycomb.java
@@ -22,6 +22,7 @@
package org.kreed.vanilla;
+import android.annotation.TargetApi;
import android.app.ActionBar;
import android.app.ActionBar.Tab;
import android.app.Activity;
@@ -36,6 +37,7 @@
/**
* Framework methods only in Honeycomb or above go here.
*/
+@TargetApi(11)
public class CompatHoneycomb {
/**
* Add ActionBar tabs for LibraryActivity.
View
2 src/org/kreed/vanilla/CompatIcs.java
@@ -22,6 +22,7 @@
package org.kreed.vanilla;
+import android.annotation.TargetApi;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
@@ -34,6 +35,7 @@
/**
* Framework methods only in ICS or above go here.
*/
+@TargetApi(14)
public class CompatIcs {
/**
* Used with updateRemote method.
View
2 src/org/kreed/vanilla/CompatMetadata.java
@@ -22,12 +22,14 @@
package org.kreed.vanilla;
+import android.annotation.TargetApi;
import android.media.MediaMetadataRetriever;
/**
* Wrapper around MediaMetadataRetriever to allow compatibility with older
* versions of Android.
*/
+@TargetApi(10)
public class CompatMetadata {
/**
* The wrapped MediaMetadataRetriever instance.
View
2 src/org/kreed/vanilla/PreferencesBackupAgent.java
@@ -22,12 +22,14 @@
package org.kreed.vanilla;
+import android.annotation.TargetApi;
import android.app.backup.BackupAgentHelper;
import android.app.backup.SharedPreferencesBackupHelper;
/**
* Saves application preferences to the backup manager.
*/
+@TargetApi(8)
public class PreferencesBackupAgent extends BackupAgentHelper {
private static final String BACKUP_KEY = "prefs";

0 comments on commit cc582a2

Please sign in to comment.