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;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.view.View;
|
||||
@ -31,6 +32,7 @@ import android.widget.EdgeEffect;
|
||||
* Wrapper around {@link EdgeEffect} for compatibility with older versions of
|
||||
* Android.
|
||||
*/
|
||||
@TargetApi(14)
|
||||
public class EdgeEffectCompat {
|
||||
/**
|
||||
* The wrapped EdgeEffect.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 @@ import android.view.ViewConfiguration;
|
||||
/**
|
||||
* 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()}.
|
||||
|
@ -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 @@ import android.widget.ListView;
|
||||
/**
|
||||
* Framework methods only in Honeycomb or above go here.
|
||||
*/
|
||||
@TargetApi(11)
|
||||
public class CompatHoneycomb {
|
||||
/**
|
||||
* Add ActionBar tabs for LibraryActivity.
|
||||
|
@ -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 @@ import android.media.RemoteControlClient;
|
||||
/**
|
||||
* Framework methods only in ICS or above go here.
|
||||
*/
|
||||
@TargetApi(14)
|
||||
public class CompatIcs {
|
||||
/**
|
||||
* Used with updateRemote method.
|
||||
|
@ -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.
|
||||
|
@ -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";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user