diff options
author | Kenny Root <kenny@the-b.org> | 2014-10-01 23:13:45 +0100 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2014-10-01 13:52:16 +0100 |
commit | 60fd164f528702d3e853116a20e7e808d1083948 (patch) | |
tree | 8c29e9638284259df01c1ab522f24a52928a2f7b | |
parent | 49b779dcaf03e3598d2709b321e20ea029b25163 (diff) | |
download | connectbot-60fd164f528702d3e853116a20e7e808d1083948.tar.gz connectbot-60fd164f528702d3e853116a20e7e808d1083948.tar.bz2 connectbot-60fd164f528702d3e853116a20e7e808d1083948.zip |
Add some TargetApi annotations to appease lint
5 files changed, 18 insertions, 4 deletions
diff --git a/app/src/main/java/org/connectbot/ActionBarWrapper.java b/app/src/main/java/org/connectbot/ActionBarWrapper.java index 0c7b65d..f6bed8c 100644 --- a/app/src/main/java/org/connectbot/ActionBarWrapper.java +++ b/app/src/main/java/org/connectbot/ActionBarWrapper.java @@ -19,6 +19,7 @@ package org.connectbot; import org.connectbot.util.PreferenceConstants; +import android.annotation.TargetApi; import android.app.Activity; import android.app.ActionBar; @@ -49,6 +50,11 @@ public abstract class ActionBarWrapper { private static class DummyActionBar extends ActionBarWrapper { } + /** + * Real ActionBar delegate that is only invoked on Honeycomb + * and later. + */ + @TargetApi(11) private static class RealActionBar extends ActionBarWrapper { private final ActionBar actionBar; diff --git a/app/src/main/java/org/connectbot/service/BackupAgent.java b/app/src/main/java/org/connectbot/service/BackupAgent.java index 1e3bd81..85121d9 100644 --- a/app/src/main/java/org/connectbot/service/BackupAgent.java +++ b/app/src/main/java/org/connectbot/service/BackupAgent.java @@ -23,6 +23,7 @@ import org.connectbot.util.HostDatabase; import org.connectbot.util.PreferenceConstants; import org.connectbot.util.PubkeyDatabase; +import android.annotation.TargetApi; import android.app.backup.BackupAgentHelper; import android.app.backup.BackupDataInput; import android.app.backup.BackupDataOutput; @@ -32,9 +33,11 @@ import android.os.ParcelFileDescriptor; import android.util.Log; /** - * @author kroot - * + * ConnectBot's backup agent. This is only loaded on API 8 and later by + * reading the AndroidManifest.xml, so it shouldn't affect any minimum + * SDK level. */ +@TargetApi(8) public class BackupAgent extends BackupAgentHelper { @Override public void onCreate() { diff --git a/app/src/main/java/org/connectbot/service/BackupWrapper.java b/app/src/main/java/org/connectbot/service/BackupWrapper.java index bfc7535..11f1b52 100644 --- a/app/src/main/java/org/connectbot/service/BackupWrapper.java +++ b/app/src/main/java/org/connectbot/service/BackupWrapper.java @@ -19,13 +19,14 @@ package org.connectbot.service; import org.connectbot.util.PreferenceConstants; +import android.annotation.TargetApi; import android.app.backup.BackupManager; import android.content.Context; /** - * @author kroot - * + * This is only invoked on Froyo and beyond. */ +@TargetApi(8) public abstract class BackupWrapper { public static BackupWrapper getInstance() { if (PreferenceConstants.PRE_FROYO) diff --git a/app/src/main/java/org/connectbot/service/ConnectionNotifier.java b/app/src/main/java/org/connectbot/service/ConnectionNotifier.java index d276761..aedbd61 100644 --- a/app/src/main/java/org/connectbot/service/ConnectionNotifier.java +++ b/app/src/main/java/org/connectbot/service/ConnectionNotifier.java @@ -26,6 +26,7 @@ import org.connectbot.bean.HostBean; import org.connectbot.util.HostDatabase; import org.connectbot.util.PreferenceConstants; +import android.annotation.TargetApi; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; @@ -174,6 +175,7 @@ public abstract class ConnectionNotifier { } } + @TargetApi(5) private static class EclairAndBeyond extends ConnectionNotifier { private static class Holder { private static final EclairAndBeyond sInstance = new EclairAndBeyond(); diff --git a/app/src/main/java/org/connectbot/util/EastAsianWidth.java b/app/src/main/java/org/connectbot/util/EastAsianWidth.java index 0e274b5..da710fb 100644 --- a/app/src/main/java/org/connectbot/util/EastAsianWidth.java +++ b/app/src/main/java/org/connectbot/util/EastAsianWidth.java @@ -17,6 +17,7 @@ package org.connectbot.util; +import android.annotation.TargetApi; import android.graphics.Paint; import android.text.AndroidCharacter; @@ -61,6 +62,7 @@ public abstract class EastAsianWidth { } } + @TargetApi(8) private static class FroyoAndBeyond extends EastAsianWidth { private static class Holder { private static final FroyoAndBeyond sInstance = new FroyoAndBeyond(); |