diff options
40 files changed, 233 insertions, 101 deletions
diff --git a/api/current.xml b/api/current.xml index bb70f6f..2d7ee31 100644 --- a/api/current.xml +++ b/api/current.xml @@ -14932,7 +14932,7 @@ synchronized="false" static="false" final="false" - deprecated="deprecated" + deprecated="not deprecated" visibility="public" > <parameter name="response" type="android.accounts.IAccountAuthenticatorResponse"> @@ -115562,7 +115562,7 @@ synchronized="false" static="false" final="false" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > <parameter name="asu" type="int"> diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java index 9f70534..d04abe5 100644 --- a/core/java/android/accounts/AccountManager.java +++ b/core/java/android/accounts/AccountManager.java @@ -261,6 +261,7 @@ public class AccountManager { } /** @deprecated use {@link #confirmCredentials} instead */ + @Deprecated public AccountManagerFuture<Boolean> confirmPassword(final Account account, final String password, AccountManagerCallback<Boolean> callback, Handler handler) { return new Future2Task<Boolean>(handler, callback) { diff --git a/core/java/android/accounts/AccountManagerFuture.java b/core/java/android/accounts/AccountManagerFuture.java index 9939398..74d83eb 100644 --- a/core/java/android/accounts/AccountManagerFuture.java +++ b/core/java/android/accounts/AccountManagerFuture.java @@ -56,9 +56,11 @@ public interface AccountManagerFuture<V> extends Future<V> { V getResult(long timeout, TimeUnit unit) throws OperationCanceledException, IOException, AuthenticatorException; + /** @deprecated Use {@link #getResult} */ @Deprecated V get() throws InterruptedException, ExecutionException; + /** @deprecated Use {@link #getResult} */ @Deprecated V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException; diff --git a/core/java/android/accounts/IAccountAuthenticator.aidl b/core/java/android/accounts/IAccountAuthenticator.aidl index 48f053c..1592eea 100644 --- a/core/java/android/accounts/IAccountAuthenticator.aidl +++ b/core/java/android/accounts/IAccountAuthenticator.aidl @@ -32,7 +32,7 @@ oneway interface IAccountAuthenticator { /** * Checks that the account/password combination is valid. - * @deprecated + * note -- deprecated */ void confirmPassword(in IAccountAuthenticatorResponse response, in Account account, String password); diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java index 4854952..e43834a 100644 --- a/core/java/android/app/SearchManager.java +++ b/core/java/android/app/SearchManager.java @@ -1769,6 +1769,7 @@ public class SearchManager /** * @deprecated This method is an obsolete internal implementation detail. Do not use. */ + @Deprecated public void onCancel(DialogInterface dialog) { throw new UnsupportedOperationException(); } @@ -1776,6 +1777,7 @@ public class SearchManager /** * @deprecated This method is an obsolete internal implementation detail. Do not use. */ + @Deprecated public void onDismiss(DialogInterface dialog) { throw new UnsupportedOperationException(); } diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index b915803..88a4d02 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -887,6 +887,7 @@ public abstract class ContentResolver { * @deprecated instead use * {@link #requestSync(android.accounts.Account, String, android.os.Bundle)} */ + @Deprecated public void startSync(Uri uri, Bundle extras) { Account account = null; if (extras != null) { @@ -967,6 +968,7 @@ public abstract class ContentResolver { * @param uri the uri of the provider to sync or null to sync all providers. * @deprecated instead use {@link #cancelSync(android.accounts.Account, String)} */ + @Deprecated public void cancelSync(Uri uri) { cancelSync(null /* all accounts */, uri != null ? uri.getAuthority() : null); } diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index d86ab79..60551b8 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -491,42 +491,49 @@ public abstract class Context { * @deprecated Use {@link android.app.WallpaperManager#getDrawable * WallpaperManager.get()} instead. */ + @Deprecated public abstract Drawable getWallpaper(); /** * @deprecated Use {@link android.app.WallpaperManager#peekDrawable * WallpaperManager.peek()} instead. */ + @Deprecated public abstract Drawable peekWallpaper(); /** * @deprecated Use {@link android.app.WallpaperManager#getDesiredMinimumWidth() * WallpaperManager.getDesiredMinimumWidth()} instead. */ + @Deprecated public abstract int getWallpaperDesiredMinimumWidth(); /** * @deprecated Use {@link android.app.WallpaperManager#getDesiredMinimumHeight() * WallpaperManager.getDesiredMinimumHeight()} instead. */ + @Deprecated public abstract int getWallpaperDesiredMinimumHeight(); /** * @deprecated Use {@link android.app.WallpaperManager#setBitmap(Bitmap) * WallpaperManager.set()} instead. */ + @Deprecated public abstract void setWallpaper(Bitmap bitmap) throws IOException; /** * @deprecated Use {@link android.app.WallpaperManager#setStream(InputStream) * WallpaperManager.set()} instead. */ + @Deprecated public abstract void setWallpaper(InputStream data) throws IOException; /** * @deprecated Use {@link android.app.WallpaperManager#clear * WallpaperManager.clear()} instead. */ + @Deprecated public abstract void clearWallpaper() throws IOException; /** diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl index 7760612..4fc4fb9 100644 --- a/core/java/android/content/pm/IPackageManager.aidl +++ b/core/java/android/content/pm/IPackageManager.aidl @@ -123,7 +123,6 @@ interface IPackageManager { * providers that can sync. * @param outInfo Filled in with a list of the ProviderInfo for each * name in 'outNames'. - * @deprecated */ void querySyncProviders(inout List<String> outNames, inout List<ProviderInfo> outInfo); diff --git a/core/java/android/content/pm/ProviderInfo.java b/core/java/android/content/pm/ProviderInfo.java index d61e95b..ec01775 100644 --- a/core/java/android/content/pm/ProviderInfo.java +++ b/core/java/android/content/pm/ProviderInfo.java @@ -79,6 +79,7 @@ public final class ProviderInfo extends ComponentInfo * @deprecated This flag is now being ignored. The current way to make a provider * syncable is to provide a SyncAdapter service for a given provider/account type. */ + @Deprecated public boolean isSyncable = false; public ProviderInfo() { diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java index 184d6dc..6143b6c 100644 --- a/core/java/android/database/sqlite/SQLiteDatabase.java +++ b/core/java/android/database/sqlite/SQLiteDatabase.java @@ -517,6 +517,7 @@ public class SQLiteDatabase extends SQLiteClosable { * @deprecated if the db is locked more than once (becuase of nested transactions) then the lock * will not be yielded. Use yieldIfContendedSafely instead. */ + @Deprecated public boolean yieldIfContended() { return yieldIfContendedHelper(false /* do not check yielding */); } diff --git a/core/java/android/hardware/SensorListener.java b/core/java/android/hardware/SensorListener.java index cfa184b..c71e968 100644 --- a/core/java/android/hardware/SensorListener.java +++ b/core/java/android/hardware/SensorListener.java @@ -20,9 +20,8 @@ package android.hardware; * Used for receiving notifications from the SensorManager when * sensor values have changed. * - * This interface is deprecated, use + * @deprecated Use * {@link android.hardware.SensorEventListener SensorEventListener} instead. - * */ @Deprecated public interface SensorListener { diff --git a/core/java/android/hardware/SensorManager.java b/core/java/android/hardware/SensorManager.java index bf945ec..271f973 100644 --- a/core/java/android/hardware/SensorManager.java +++ b/core/java/android/hardware/SensorManager.java @@ -116,47 +116,67 @@ public class SensorManager @Deprecated public static final int SENSOR_ORIENTATION_RAW = 1 << 7; - /** A constant that includes all sensors */ + /** A constant that includes all sensors + * @deprecated use {@link android.hardware.Sensor Sensor} instead. + */ @Deprecated public static final int SENSOR_ALL = 0x7F; - /** Smallest sensor ID */ + /** Smallest sensor ID + * @deprecated use {@link android.hardware.Sensor Sensor} instead. + */ @Deprecated public static final int SENSOR_MIN = SENSOR_ORIENTATION; - /** Largest sensor ID */ + /** Largest sensor ID + * @deprecated use {@link android.hardware.Sensor Sensor} instead. + */ @Deprecated public static final int SENSOR_MAX = ((SENSOR_ALL + 1)>>1); /** Index of the X value in the array returned by - * {@link android.hardware.SensorListener#onSensorChanged} */ + * {@link android.hardware.SensorListener#onSensorChanged} + * @deprecated use {@link android.hardware.Sensor Sensor} instead. + */ @Deprecated public static final int DATA_X = 0; /** Index of the Y value in the array returned by - * {@link android.hardware.SensorListener#onSensorChanged} */ + * {@link android.hardware.SensorListener#onSensorChanged} + * @deprecated use {@link android.hardware.Sensor Sensor} instead. + */ @Deprecated public static final int DATA_Y = 1; /** Index of the Z value in the array returned by - * {@link android.hardware.SensorListener#onSensorChanged} */ + * {@link android.hardware.SensorListener#onSensorChanged} + * @deprecated use {@link android.hardware.Sensor Sensor} instead. + */ @Deprecated public static final int DATA_Z = 2; /** Offset to the untransformed values in the array returned by - * {@link android.hardware.SensorListener#onSensorChanged} */ + * {@link android.hardware.SensorListener#onSensorChanged} + * @deprecated use {@link android.hardware.Sensor Sensor} instead. + */ @Deprecated public static final int RAW_DATA_INDEX = 3; /** Index of the untransformed X value in the array returned by - * {@link android.hardware.SensorListener#onSensorChanged} */ + * {@link android.hardware.SensorListener#onSensorChanged} + * @deprecated use {@link android.hardware.Sensor Sensor} instead. + */ @Deprecated public static final int RAW_DATA_X = 3; /** Index of the untransformed Y value in the array returned by - * {@link android.hardware.SensorListener#onSensorChanged} */ + * {@link android.hardware.SensorListener#onSensorChanged} + * @deprecated use {@link android.hardware.Sensor Sensor} instead. + */ @Deprecated public static final int RAW_DATA_Y = 4; /** Index of the untransformed Z value in the array returned by - * {@link android.hardware.SensorListener#onSensorChanged} */ + * {@link android.hardware.SensorListener#onSensorChanged} + * @deprecated use {@link android.hardware.Sensor Sensor} instead. + */ @Deprecated public static final int RAW_DATA_Z = 5; diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java index ffd2686..6c2a27a 100644 --- a/core/java/android/os/Build.java +++ b/core/java/android/os/Build.java @@ -70,6 +70,7 @@ public class Build { * * @deprecated Use {@link #SDK_INT} to easily get this as an integer. */ + @Deprecated public static final String SDK = getString("ro.build.version.sdk"); /** diff --git a/core/java/android/os/HandlerStateMachine.java b/core/java/android/os/HandlerStateMachine.java index d004a25..9e7902b 100644 --- a/core/java/android/os/HandlerStateMachine.java +++ b/core/java/android/os/HandlerStateMachine.java @@ -56,22 +56,22 @@ import android.util.LogPrinter; } class S1 extends HandlerState { - @Override public void enter(Message message) { + &#064;Override public void enter(Message message) { } - @Override public void processMessage(Message message) { + &#064;Override public void processMessage(Message message) { deferMessage(message); if (message.what == TEST_WHAT_2) { transitionTo(mS2); } } - @Override public void exit(Message message) { + &#064;Override public void exit(Message message) { } } class S2 extends HandlerState { - @Override public void processMessage(Message message) { + &#064;Override public void processMessage(Message message) { // Do some processing if (message.what == TEST_WHAT_2) { transtionTo(mS1); diff --git a/core/java/android/provider/Gmail.java b/core/java/android/provider/Gmail.java index 5702e7c..4425e51 100644 --- a/core/java/android/provider/Gmail.java +++ b/core/java/android/provider/Gmail.java @@ -1521,8 +1521,9 @@ public final class Gmail { /** * Returns the number of conversation with a given label. - * @deprecated + * @deprecated Use {@link #getLabelId} instead. */ + @Deprecated public int getNumConversations(String label) { return getNumConversations(getLabelId(label)); } @@ -1534,8 +1535,9 @@ public final class Gmail { /** * Returns the number of unread conversation with a given label. - * @deprecated + * @deprecated Use {@link #getLabelId} instead. */ + @Deprecated public int getNumUnreadConversations(String label) { return getNumUnreadConversations(getLabelId(label)); } @@ -2040,8 +2042,9 @@ public final class Gmail { } /** - * @deprecated + * @deprecated Always returns true. */ + @Deprecated public boolean getExpanded() { return true; } diff --git a/core/java/android/provider/LiveFolders.java b/core/java/android/provider/LiveFolders.java index 6e95fb7..19f361b 100644 --- a/core/java/android/provider/LiveFolders.java +++ b/core/java/android/provider/LiveFolders.java @@ -45,7 +45,7 @@ import android.annotation.SdkConstant; * public static class MyLiveFolder extends Activity { * public static final Uri CONTENT_URI = Uri.parse("content://my.app/live"); * - * @Override + * &#064;Override * protected void onCreate(Bundle savedInstanceState) { * super.onCreate(savedInstanceState); * diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index decf6fc..ee46c85 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -1522,18 +1522,17 @@ public final class Settings { @Deprecated public static final String USE_GOOGLE_MAIL = Secure.USE_GOOGLE_MAIL; -// /** -// * @deprecated Use {@link android.provider.Settings.Secure#WIFI_MAX_DHCP_RETRY_COUNT} -// * instead -// */ + /** + * @deprecated Use + * {@link android.provider.Settings.Secure#WIFI_MAX_DHCP_RETRY_COUNT} instead + */ @Deprecated public static final String WIFI_MAX_DHCP_RETRY_COUNT = Secure.WIFI_MAX_DHCP_RETRY_COUNT; -// /** -// * @deprecated Use -// * {@link android.provider.Settings.Secure#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} -// * instead -// */ + /** + * @deprecated Use + * {@link android.provider.Settings.Secure#WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS} instead + */ @Deprecated public static final String WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS = Secure.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS; diff --git a/core/java/android/text/style/ImageSpan.java b/core/java/android/text/style/ImageSpan.java index 86ef5f6..74b9463 100644 --- a/core/java/android/text/style/ImageSpan.java +++ b/core/java/android/text/style/ImageSpan.java @@ -36,6 +36,7 @@ public class ImageSpan extends DynamicDrawableSpan { /** * @deprecated Use {@link #ImageSpan(Context, Bitmap)} instead. */ + @Deprecated public ImageSpan(Bitmap b) { this(null, b, ALIGN_BOTTOM); } @@ -43,6 +44,7 @@ public class ImageSpan extends DynamicDrawableSpan { /** * @deprecated Use {@link #ImageSpan(Context, Bitmap, int) instead. */ + @Deprecated public ImageSpan(Bitmap b, int verticalAlignment) { this(null, b, verticalAlignment); } diff --git a/core/java/android/util/Config.java b/core/java/android/util/Config.java index 9571041..924b49d 100644 --- a/core/java/android/util/Config.java +++ b/core/java/android/util/Config.java @@ -34,25 +34,25 @@ public final class Config */ /** - * Always the inverse of DEBUG. + * @deprecated Use {@link #DEBUG} instead. */ @Deprecated public static final boolean RELEASE = !DEBUG; /** - * Always false. + * @deprecated Always false. */ @Deprecated public static final boolean PROFILE = false; /** - * Always false. + * @deprecated Always false. */ @Deprecated public static final boolean LOGV = false; /** - * Always true. + * @deprecated Always true. */ @Deprecated public static final boolean LOGD = true; diff --git a/core/java/android/view/animation/Animation.java b/core/java/android/view/animation/Animation.java index a662760..2f5e601 100644 --- a/core/java/android/view/animation/Animation.java +++ b/core/java/android/view/animation/Animation.java @@ -319,7 +319,7 @@ public abstract class Animation implements Cloneable { * * @param durationMillis Duration in milliseconds * - * @throw java.lang.IllegalArgumentException if the duration is < 0 + * @throws java.lang.IllegalArgumentException if the duration is < 0 * * @attr ref android.R.styleable#Animation_duration */ diff --git a/core/java/android/webkit/Plugin.java b/core/java/android/webkit/Plugin.java index 302bea2..34a30a9 100644 --- a/core/java/android/webkit/Plugin.java +++ b/core/java/android/webkit/Plugin.java @@ -27,7 +27,7 @@ import android.webkit.WebView; * Represents a plugin (Java equivalent of the PluginPackageAndroid * C++ class in libs/WebKitLib/WebKit/WebCore/plugins/android/) * - * @deprecated This interface was inteded to be used by Gears. Since Gears was + * @deprecated This interface was intended to be used by Gears. Since Gears was * deprecated, so is this class. */ @Deprecated @@ -43,7 +43,8 @@ public class Plugin { private PreferencesClickHandler mHandler; /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public Plugin(String name, @@ -58,7 +59,8 @@ public class Plugin { } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public String toString() { @@ -66,7 +68,8 @@ public class Plugin { } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public String getName() { @@ -74,7 +77,8 @@ public class Plugin { } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public String getPath() { @@ -82,7 +86,8 @@ public class Plugin { } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public String getFileName() { @@ -90,7 +95,8 @@ public class Plugin { } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public String getDescription() { @@ -98,7 +104,8 @@ public class Plugin { } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public void setName(String name) { @@ -106,7 +113,8 @@ public class Plugin { } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public void setPath(String path) { @@ -114,7 +122,8 @@ public class Plugin { } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public void setFileName(String fileName) { @@ -122,7 +131,8 @@ public class Plugin { } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public void setDescription(String description) { @@ -130,7 +140,8 @@ public class Plugin { } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public void setClickHandler(PreferencesClickHandler handler) { @@ -140,7 +151,8 @@ public class Plugin { /** * Invokes the click handler for this plugin. * - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public void dispatchClickEvent(Context context) { @@ -152,7 +164,8 @@ public class Plugin { /** * Default click handler. The plugins should implement their own. * - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated private class DefaultClickHandler implements PreferencesClickHandler, @@ -172,7 +185,8 @@ public class Plugin { } } /** - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public void onClick(DialogInterface dialog, int which) { diff --git a/core/java/android/webkit/PluginData.java b/core/java/android/webkit/PluginData.java index d9b196a..2dd445e 100644 --- a/core/java/android/webkit/PluginData.java +++ b/core/java/android/webkit/PluginData.java @@ -28,7 +28,7 @@ import java.util.Map; * status code. The PluginData class is the container for all these * parts. * - * @deprecated This class was inteded to be used by Gears. Since Gears was + * @deprecated This class was intended to be used by Gears. Since Gears was * deprecated, so is this class. */ @Deprecated @@ -63,7 +63,8 @@ public final class PluginData { * lowercase header name to [ unmodified header name, header value] * @param length The HTTP response status code. * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public PluginData( @@ -82,7 +83,8 @@ public final class PluginData { * * @return An InputStream instance with the plugin content. * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public InputStream getInputStream() { @@ -94,7 +96,8 @@ public final class PluginData { * * @return the length of the plugin content. * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public long getContentLength() { @@ -109,7 +112,8 @@ public final class PluginData { * mapping is 'lowercase header name' to ['unmodified header * name', header value]. * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public Map<String, String[]> getHeaders() { @@ -121,7 +125,8 @@ public final class PluginData { * * @return The HTTP statue code, e.g 200. * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public int getStatusCode() { diff --git a/core/java/android/webkit/PluginList.java b/core/java/android/webkit/PluginList.java index 5b65b9a..a61b07b 100644 --- a/core/java/android/webkit/PluginList.java +++ b/core/java/android/webkit/PluginList.java @@ -25,7 +25,7 @@ import java.util.List; * populated when the plugins are initialized (at * browser startup, at the moment). * - * @deprecated This interface was inteded to be used by Gears. Since Gears was + * @deprecated This interface was intended to be used by Gears. Since Gears was * deprecated, so is this class. */ @Deprecated @@ -35,7 +35,8 @@ public class PluginList { /** * Public constructor. Initializes the list of plugins. * - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public PluginList() { @@ -45,7 +46,8 @@ public class PluginList { /** * Returns the list of plugins as a java.util.List. * - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public synchronized List getList() { @@ -55,7 +57,8 @@ public class PluginList { /** * Adds a plugin to the list. * - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public synchronized void addPlugin(Plugin plugin) { @@ -67,7 +70,8 @@ public class PluginList { /** * Removes a plugin from the list. * - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public synchronized void removePlugin(Plugin plugin) { @@ -80,7 +84,8 @@ public class PluginList { /** * Clears the plugin list. * - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public synchronized void clear() { @@ -90,7 +95,8 @@ public class PluginList { /** * Dispatches the click event to the appropriate plugin. * - * @deprecated + * @deprecated This interface was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public synchronized void pluginClicked(Context context, int position) { diff --git a/core/java/android/webkit/URLUtil.java b/core/java/android/webkit/URLUtil.java index 5ed42e9..232ed36 100644 --- a/core/java/android/webkit/URLUtil.java +++ b/core/java/android/webkit/URLUtil.java @@ -172,6 +172,7 @@ public final class URLUtil { * requests from a file url. * @deprecated Cookieless proxy is no longer supported. */ + @Deprecated public static boolean isCookielessProxyUrl(String url) { return (null != url) && url.startsWith(PROXY_BASE); } diff --git a/core/java/android/webkit/UrlInterceptRegistry.java b/core/java/android/webkit/UrlInterceptRegistry.java index 6e2a482..eca5acd 100644 --- a/core/java/android/webkit/UrlInterceptRegistry.java +++ b/core/java/android/webkit/UrlInterceptRegistry.java @@ -25,7 +25,7 @@ import java.util.LinkedList; import java.util.Map; /** - * @deprecated This class was inteded to be used by Gears. Since Gears was + * @deprecated This class was intended to be used by Gears. Since Gears was * deprecated, so is this class. */ @Deprecated @@ -48,7 +48,8 @@ public final class UrlInterceptRegistry { * * @param disabled true to disable the cache * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public static synchronized void setUrlInterceptDisabled(boolean disabled) { @@ -60,7 +61,8 @@ public final class UrlInterceptRegistry { * * @return return if it is disabled * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public static synchronized boolean urlInterceptDisabled() { @@ -74,7 +76,8 @@ public final class UrlInterceptRegistry { * @param handler The new UrlInterceptHandler object * @return true if the handler was not previously registered. * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public static synchronized boolean registerHandler( @@ -93,7 +96,8 @@ public final class UrlInterceptRegistry { * @param handler A previously registered UrlInterceptHandler. * @return true if the handler was found and removed from the list. * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public static synchronized boolean unregisterHandler( @@ -107,7 +111,8 @@ public final class UrlInterceptRegistry { * * @return A CacheResult containing surrogate content. * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public static synchronized CacheResult getSurrogate( @@ -133,7 +138,8 @@ public final class UrlInterceptRegistry { * * @return A PluginData instance containing surrogate content. * - * @deprecated + * @deprecated This class was intended to be used by Gears. Since Gears was + * deprecated, so is this class. */ @Deprecated public static synchronized PluginData getPluginData( diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java index eade73a..1755d4f 100644 --- a/graphics/java/android/graphics/drawable/BitmapDrawable.java +++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java @@ -76,6 +76,7 @@ public class BitmapDrawable extends Drawable { * @deprecated Use {@link #BitmapDrawable(Resources)} to ensure * that the drawable has correctly set its target density. */ + @Deprecated public BitmapDrawable() { mBitmapState = new BitmapState((Bitmap) null); } @@ -97,6 +98,7 @@ public class BitmapDrawable extends Drawable { * @deprecated Use {@link #BitmapDrawable(Resources, Bitmap)} to ensure * that the drawable has correctly set its target density. */ + @Deprecated public BitmapDrawable(Bitmap bitmap) { this(new BitmapState(bitmap)); } diff --git a/graphics/java/android/graphics/drawable/NinePatchDrawable.java b/graphics/java/android/graphics/drawable/NinePatchDrawable.java index d5c8a08..b175bb6 100644 --- a/graphics/java/android/graphics/drawable/NinePatchDrawable.java +++ b/graphics/java/android/graphics/drawable/NinePatchDrawable.java @@ -56,6 +56,7 @@ public class NinePatchDrawable extends Drawable { * @deprecated Use {@link #NinePatchDrawable(Resources, Bitmap, byte[], Rect, String)} * to ensure that the drawable has correctly set its target density. */ + @Deprecated public NinePatchDrawable(Bitmap bitmap, byte[] chunk, Rect padding, String srcName) { this(new NinePatchState(new NinePatch(bitmap, chunk, srcName), padding)); } @@ -78,6 +79,7 @@ public class NinePatchDrawable extends Drawable { * @deprecated Use {@link #NinePatchDrawable(Resources, NinePatch)} * to ensure that the drawable has correctly set its target density. */ + @Deprecated public NinePatchDrawable(NinePatch patch) { this(new NinePatchState(patch, null)); } diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index 16bf8a2..de944ee 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -816,37 +816,44 @@ public class AudioManager { /* Routing bits for setRouting/getRouting API */ /** * Routing audio output to earpiece - * @deprecated + * @deprecated Do not set audio routing directly, use setSpeakerphoneOn(), + * setBluetoothScoOn() methods instead. */ @Deprecated public static final int ROUTE_EARPIECE = AudioSystem.ROUTE_EARPIECE; /** - * Routing audio output to spaker - * @deprecated + * Routing audio output to speaker + * @deprecated Do not set audio routing directly, use setSpeakerphoneOn(), + * setBluetoothScoOn() methods instead. */ @Deprecated public static final int ROUTE_SPEAKER = AudioSystem.ROUTE_SPEAKER; /** * @deprecated use {@link #ROUTE_BLUETOOTH_SCO} - * @deprecated + * @deprecated Do not set audio routing directly, use setSpeakerphoneOn(), + * setBluetoothScoOn() methods instead. */ @Deprecated public static final int ROUTE_BLUETOOTH = AudioSystem.ROUTE_BLUETOOTH_SCO; /** * Routing audio output to bluetooth SCO - * @deprecated + * @deprecated Do not set audio routing directly, use setSpeakerphoneOn(), + * setBluetoothScoOn() methods instead. */ @Deprecated public static final int ROUTE_BLUETOOTH_SCO = AudioSystem.ROUTE_BLUETOOTH_SCO; /** * Routing audio output to headset - * @deprecated + * @deprecated Do not set audio routing directly, use setSpeakerphoneOn(), + * setBluetoothScoOn() methods instead. */ @Deprecated public static final int ROUTE_HEADSET = AudioSystem.ROUTE_HEADSET; /** * Routing audio output to bluetooth A2DP - * @deprecated + * @deprecated Do not set audio routing directly, use setSpeakerphoneOn(), + * setBluetoothScoOn() methods instead. */ @Deprecated public static final int ROUTE_BLUETOOTH_A2DP = AudioSystem.ROUTE_BLUETOOTH_A2DP; /** * Used for mask parameter of {@link #setRouting(int,int,int)}. - * @deprecated + * @deprecated Do not set audio routing directly, use setSpeakerphoneOn(), + * setBluetoothScoOn() methods instead. */ @Deprecated public static final int ROUTE_ALL = AudioSystem.ROUTE_ALL; diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java index d587f65..dbf6d9d 100644 --- a/media/java/android/media/AudioSystem.java +++ b/media/java/android/media/AudioSystem.java @@ -93,8 +93,9 @@ public class AudioSystem * * return the current audio mode (NORMAL, RINGTONE, or IN_CALL). * Returns the current current audio state from the HAL. + * */ - /** @deprecated */ + /** @deprecated Do not use. */ public static int getMode() { return MODE_INVALID; } diff --git a/media/java/android/media/MediaPlayer.java b/media/java/android/media/MediaPlayer.java index a8689f2..6a9a9bd 100644 --- a/media/java/android/media/MediaPlayer.java +++ b/media/java/android/media/MediaPlayer.java @@ -539,7 +539,7 @@ public class MediaPlayer * @param request Parcel with the data for the extension. The * caller must use {@link #newRequest()} to get one. * - * @param[out] reply Parcel with the data returned by the + * @param reply Output parcel with the data returned by the * native player. * * @return The status code see utils/Errors.h diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java index 46ede7f..0a1747a 100644 --- a/media/java/android/media/MediaRecorder.java +++ b/media/java/android/media/MediaRecorder.java @@ -168,7 +168,7 @@ public class MediaRecorder /** The following formats are audio only .aac or .amr formats **/ /** @deprecated Deprecated in favor of AMR_NB */ - /** @todo change link when AMR_NB is exposed. Deprecated in favor of {@link MediaRecorder.OutputFormat#AMR_NB} */ + /** TODO: change link when AMR_NB is exposed. Deprecated in favor of {@link MediaRecorder.OutputFormat#AMR_NB} */ public static final int RAW_AMR = 3; /** @hide AMR NB file format */ public static final int AMR_NB = 3; diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java index e113680..73e7baa5 100644 --- a/telephony/java/android/telephony/PhoneStateListener.java +++ b/telephony/java/android/telephony/PhoneStateListener.java @@ -154,8 +154,9 @@ public class PhoneStateListener { * @see ServiceState#STATE_IN_SERVICE * @see ServiceState#STATE_OUT_OF_SERVICE * @see ServiceState#STATE_POWER_OFF - * @deprecated, @see #onSignalStrengthsChanged + * @deprecated see #onSignalStrengthsChanged */ + @Deprecated public void onSignalStrengthChanged(int asu) { // default implementation empty } diff --git a/telephony/java/android/telephony/gsm/SmsMessage.java b/telephony/java/android/telephony/gsm/SmsMessage.java index 84dfca0..37ef912 100644 --- a/telephony/java/android/telephony/gsm/SmsMessage.java +++ b/telephony/java/android/telephony/gsm/SmsMessage.java @@ -345,6 +345,7 @@ public class SmsMessage { * the number of code units used, and int[2] is the number of code * units remaining until the next message. int[3] is the encoding * type that should be used for the message. + * @deprecated Use android.telephony.SmsMessage. */ @Deprecated public static int[] calculateLength(String messageBody, boolean use7bitOnly) { diff --git a/telephony/java/com/android/internal/telephony/CommandsInterface.java b/telephony/java/com/android/internal/telephony/CommandsInterface.java index 6ebd8d6..ed8bc1e 100644 --- a/telephony/java/com/android/internal/telephony/CommandsInterface.java +++ b/telephony/java/com/android/internal/telephony/CommandsInterface.java @@ -607,8 +607,9 @@ public interface CommandsInterface { * ar.exception carries exception on failure * ar.userObject contains the orignal value of result.obj * ar.result contains a List of DataCallState - * @deprecated + * @deprecated Do not use. */ + @Deprecated void getPDPContextList(Message result); /** @@ -779,8 +780,9 @@ public interface CommandsInterface { * cause code returned as int[0] in Message.obj.response * returns an integer cause code defined in TS 24.008 * section 6.1.3.1.3 or close approximation - * @deprecated + * @deprecated Do not use. */ + @Deprecated void getLastPdpFailCause (Message result); /** diff --git a/telephony/java/com/android/internal/telephony/PhoneBase.java b/telephony/java/com/android/internal/telephony/PhoneBase.java index 04a3749..9edb4c2 100644 --- a/telephony/java/com/android/internal/telephony/PhoneBase.java +++ b/telephony/java/com/android/internal/telephony/PhoneBase.java @@ -618,7 +618,7 @@ public abstract class PhoneBase implements Phone { * This should only be called in GSM mode. * Only here for some backward compatibility * issues concerning the GSMPhone class. - * @deprecated + * @deprecated Always returns null. */ public List<PdpConnection> getCurrentPdpList() { return null; diff --git a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java index bb04a43..3c1308b 100755 --- a/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java +++ b/telephony/java/com/android/internal/telephony/gsm/GSMPhone.java @@ -1084,8 +1084,9 @@ public class GSMPhone extends PhoneBase { } /** - * @deprecated + * @deprecated Do not use. */ + @Deprecated public void getPdpContextList(Message response) { getDataCallList(response); } @@ -1095,8 +1096,9 @@ public class GSMPhone extends PhoneBase { } /** - * @deprecated + * @deprecated Do not use. */ + @Deprecated public List<PdpConnection> getCurrentPdpList() { ArrayList<DataConnection> connections = new ArrayList<DataConnection>(); ArrayList<PdpConnection> pdp_list = new ArrayList<PdpConnection>(); diff --git a/test-runner/android/test/ProviderTestCase.java b/test-runner/android/test/ProviderTestCase.java index 445b4eb..668e9f7 100644 --- a/test-runner/android/test/ProviderTestCase.java +++ b/test-runner/android/test/ProviderTestCase.java @@ -15,6 +15,7 @@ import android.database.DatabaseUtils; * @deprecated this class extends InstrumentationTestCase but should extend AndroidTestCase. Use * ProviderTestCase2, which corrects this problem, instead. */ +@Deprecated public abstract class ProviderTestCase<T extends ContentProvider> extends InstrumentationTestCase { diff --git a/test-runner/android/test/TouchUtils.java b/test-runner/android/test/TouchUtils.java index 52d2ee8..962b2f9 100644 --- a/test-runner/android/test/TouchUtils.java +++ b/test-runner/android/test/TouchUtils.java @@ -565,6 +565,7 @@ public class TouchUtils { * {@link android.test.ActivityInstrumentationTestCase2}, which provides more options for * configuring the Activity under test */ + @Deprecated public static int dragViewBy(InstrumentationTestCase test, View v, int gravity, int deltaX, int deltaY) { int[] xy = new int[2]; diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp index 9a5127d..e8410cd 100644 --- a/tools/aapt/Resource.cpp +++ b/tools/aapt/Resource.cpp @@ -1238,10 +1238,16 @@ static status_t writeLayoutClasses( NA = idents.size(); + bool deprecated = false; + String16 comment = symbols->getComment(realClassName); fprintf(fp, "%s/** ", indentStr); if (comment.size() > 0) { - fprintf(fp, "%s\n", String8(comment).string()); + String8 cmt(comment); + fprintf(fp, "%s\n", cmt.string()); + if (strstr(cmt.string(), "@deprecated") != NULL) { + deprecated = true; + } } else { fprintf(fp, "Attributes that can be used with a %s.\n", nclassName.string()); } @@ -1317,6 +1323,10 @@ static status_t writeLayoutClasses( } fprintf(fp, "%s */\n", getIndentSpace(indent)); + if (deprecated) { + fprintf(fp, "%s@Deprecated\n", indentStr); + } + fprintf(fp, "%spublic static final int[] %s = {\n" "%s", @@ -1365,11 +1375,17 @@ static status_t writeLayoutClasses( //printf("%s:%s/%s: 0x%08x\n", String8(package16).string(), // String8(attr16).string(), String8(name16).string(), typeSpecFlags); const bool pub = (typeSpecFlags&ResTable_typeSpec::SPEC_PUBLIC) != 0; - + + bool deprecated = false; + fprintf(fp, "%s/**\n", indentStr); if (comment.size() > 0) { + String8 cmt(comment); fprintf(fp, "%s <p>\n%s @attr description\n", indentStr, indentStr); - fprintf(fp, "%s %s\n", indentStr, String8(comment).string()); + fprintf(fp, "%s %s\n", indentStr, cmt.string()); + if (strstr(cmt.string(), "@deprecated") != NULL) { + deprecated = true; + } } else { fprintf(fp, "%s <p>This symbol is the offset where the {@link %s.R.attr#%s}\n" @@ -1381,7 +1397,11 @@ static status_t writeLayoutClasses( indentStr, nclassName.string()); } if (typeComment.size() > 0) { - fprintf(fp, "\n\n%s %s\n", indentStr, String8(typeComment).string()); + String8 cmt(typeComment); + fprintf(fp, "\n\n%s %s\n", indentStr, cmt.string()); + if (strstr(cmt.string(), "@deprecated") != NULL) { + deprecated = true; + } } if (comment.size() > 0) { if (pub) { @@ -1399,6 +1419,9 @@ static status_t writeLayoutClasses( fprintf(fp, "%s @attr name %s:%s\n", indentStr, "android", String8(name).string()); fprintf(fp, "%s*/\n", indentStr); + if (deprecated) { + fprintf(fp, "%s@Deprecated\n", indentStr); + } fprintf(fp, "%spublic static final int %s_%s = %d;\n", indentStr, nclassName.string(), @@ -1440,11 +1463,16 @@ static status_t writeSymbolClass( } String16 comment(sym.comment); bool haveComment = false; + bool deprecated = false; if (comment.size() > 0) { haveComment = true; + String8 cmt(comment); fprintf(fp, "%s/** %s\n", - getIndentSpace(indent), String8(comment).string()); + getIndentSpace(indent), cmt.string()); + if (strstr(cmt.string(), "@deprecated") != NULL) { + deprecated = true; + } } else if (sym.isPublic && !includePrivate) { sym.sourcePos.warning("No comment for public symbol %s:%s/%s", assets->getPackage().string(), className.string(), @@ -1452,20 +1480,25 @@ static status_t writeSymbolClass( } String16 typeComment(sym.typeComment); if (typeComment.size() > 0) { + String8 cmt(typeComment); if (!haveComment) { haveComment = true; fprintf(fp, - "%s/** %s\n", - getIndentSpace(indent), String8(typeComment).string()); + "%s/** %s\n", getIndentSpace(indent), cmt.string()); } else { fprintf(fp, - "%s %s\n", - getIndentSpace(indent), String8(typeComment).string()); + "%s %s\n", getIndentSpace(indent), cmt.string()); + } + if (strstr(cmt.string(), "@deprecated") != NULL) { + deprecated = true; } } if (haveComment) { fprintf(fp,"%s */\n", getIndentSpace(indent)); } + if (deprecated) { + fprintf(fp, "%s@Deprecated\n", getIndentSpace(indent)); + } fprintf(fp, "%spublic static final int %s=0x%08x;\n", getIndentSpace(indent), String8(name).string(), (int)sym.int32Val); @@ -1484,17 +1517,25 @@ static status_t writeSymbolClass( return UNKNOWN_ERROR; } String16 comment(sym.comment); + bool deprecated = false; if (comment.size() > 0) { + String8 cmt(comment); fprintf(fp, "%s/** %s\n" "%s */\n", - getIndentSpace(indent), String8(comment).string(), + getIndentSpace(indent), cmt.string(), getIndentSpace(indent)); + if (strstr(cmt.string(), "@deprecated") != NULL) { + deprecated = true; + } } else if (sym.isPublic && !includePrivate) { sym.sourcePos.warning("No comment for public symbol %s:%s/%s", assets->getPackage().string(), className.string(), String8(sym.name).string()); } + if (deprecated) { + fprintf(fp, "%s@Deprecated\n", getIndentSpace(indent)); + } fprintf(fp, "%spublic static final String %s=\"%s\";\n", getIndentSpace(indent), String8(name).string(), sym.stringVal.string()); diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index d8a03a9..27755ed 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -960,7 +960,7 @@ public class WifiManager { * * If this MulticastLock is not reference-counted, the first call to * {@code release} (after the radio was multicast locked using - * {@linke #acquire}) will unlock the multicast, and subsequent calls + * {@link #acquire}) will unlock the multicast, and subsequent calls * will be ignored. * * Note that if any other Wifi Multicast Locks are still outstanding |