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