diff options
| -rw-r--r-- | api/current.txt | 28 | ||||
| -rw-r--r-- | api/removed.txt | 62 | ||||
| -rw-r--r-- | api/system-current.txt | 29 | ||||
| -rw-r--r-- | api/system-removed.txt | 62 | ||||
| -rw-r--r-- | api/test-current.txt | 28 | ||||
| -rw-r--r-- | api/test-removed.txt | 62 | ||||
| -rw-r--r-- | core/java/android/app/Activity.java | 21 | ||||
| -rw-r--r-- | core/java/android/app/ActivityManager.java | 8 | ||||
| -rw-r--r-- | core/java/android/app/KeyguardManager.java | 23 | ||||
| -rw-r--r-- | core/java/android/app/Notification.java | 27 | ||||
| -rw-r--r-- | core/java/android/app/PictureInPictureArgs.java | 333 | ||||
| -rw-r--r-- | core/java/android/app/PictureInPictureParams.java | 32 | ||||
| -rw-r--r-- | core/java/android/os/TestLooperManager.java | 8 | ||||
| -rw-r--r-- | core/java/android/service/autofill/AutofillService.java | 2 | ||||
| -rw-r--r-- | core/java/android/service/autofill/FillRequest.java | 3 | ||||
| -rw-r--r-- | core/java/android/speech/tts/UtteranceProgressListener.java | 5 | ||||
| -rw-r--r-- | core/java/android/view/autofill/AutofillManager.java | 2 |
17 files changed, 521 insertions, 214 deletions
diff --git a/api/current.txt b/api/current.txt index bb86d2f14747..39e80594b5c1 100644 --- a/api/current.txt +++ b/api/current.txt @@ -3579,7 +3579,6 @@ package android.app { method public boolean dispatchTrackballEvent(android.view.MotionEvent); method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]); method public deprecated void enterPictureInPictureMode(); - method public deprecated boolean enterPictureInPictureMode(android.app.PictureInPictureArgs); method public boolean enterPictureInPictureMode(android.app.PictureInPictureParams); method public <T extends android.view.View> T findViewById(int); method public void finish(); @@ -3754,7 +3753,6 @@ package android.app { method public void setImmersive(boolean); method public void setIntent(android.content.Intent); method public final void setMediaController(android.media.session.MediaController); - method public void setPictureInPictureArgs(android.app.PictureInPictureArgs); method public void setPictureInPictureParams(android.app.PictureInPictureParams); method public final deprecated void setProgress(int); method public final deprecated void setProgressBarIndeterminate(boolean); @@ -3834,7 +3832,6 @@ package android.app { method public int getLauncherLargeIconDensity(); method public int getLauncherLargeIconSize(); method public int getLockTaskModeState(); - method public static deprecated int getMaxNumPictureInPictureActions(); method public int getMemoryClass(); method public void getMemoryInfo(android.app.ActivityManager.MemoryInfo); method public static void getMyMemoryState(android.app.ActivityManager.RunningAppProcessInfo); @@ -4971,7 +4968,6 @@ package android.app { public class KeyguardManager { method public android.content.Intent createConfirmDeviceCredentialIntent(java.lang.CharSequence, java.lang.CharSequence); - method public deprecated void dismissKeyguard(android.app.Activity, android.app.KeyguardManager.KeyguardDismissCallback, android.os.Handler); method public deprecated void exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult); method public boolean inKeyguardRestrictedInputMode(); method public boolean isDeviceLocked(); @@ -5120,7 +5116,6 @@ package android.app { method public android.app.Notification clone(); method public int describeContents(); method public int getBadgeIconType(); - method public java.lang.String getChannel(); method public java.lang.String getChannelId(); method public java.lang.String getGroup(); method public int getGroupAlertBehavior(); @@ -5129,7 +5124,6 @@ package android.app { method public java.lang.String getShortcutId(); method public android.graphics.drawable.Icon getSmallIcon(); method public java.lang.String getSortKey(); - method public long getTimeout(); method public long getTimeoutAfter(); method public void writeToParcel(android.os.Parcel, int); field public static final android.media.AudioAttributes AUDIO_ATTRIBUTES_DEFAULT; @@ -5332,7 +5326,6 @@ package android.app { method public android.app.Notification.Builder setAutoCancel(boolean); method public android.app.Notification.Builder setBadgeIconType(int); method public android.app.Notification.Builder setCategory(java.lang.String); - method public android.app.Notification.Builder setChannel(java.lang.String); method public android.app.Notification.Builder setChannelId(java.lang.String); method public android.app.Notification.Builder setChronometerCountDown(boolean); method public android.app.Notification.Builder setColor(int); @@ -5377,7 +5370,6 @@ package android.app { method public android.app.Notification.Builder setSubText(java.lang.CharSequence); method public android.app.Notification.Builder setTicker(java.lang.CharSequence); method public deprecated android.app.Notification.Builder setTicker(java.lang.CharSequence, android.widget.RemoteViews); - method public android.app.Notification.Builder setTimeout(long); method public android.app.Notification.Builder setTimeoutAfter(long); method public android.app.Notification.Builder setUsesChronometer(boolean); method public deprecated android.app.Notification.Builder setVibrate(long[]); @@ -5696,21 +5688,10 @@ package android.app { method public abstract void onSendFinished(android.app.PendingIntent, android.content.Intent, int, java.lang.String, android.os.Bundle); } - public final deprecated class PictureInPictureArgs extends android.app.PictureInPictureParams { - ctor public deprecated PictureInPictureArgs(); - ctor public deprecated PictureInPictureArgs(float, java.util.List<android.app.RemoteAction>); - method public deprecated void setActions(java.util.List<android.app.RemoteAction>); - method public deprecated void setAspectRatio(float); - method public deprecated void setSourceRectHint(android.graphics.Rect); - } - - public class PictureInPictureParams implements android.os.Parcelable { + public final class PictureInPictureParams implements android.os.Parcelable { method public int describeContents(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.app.PictureInPictureParams> CREATOR; - field protected android.util.Rational mAspectRatio; - field protected android.graphics.Rect mSourceRectHint; - field protected java.util.List<android.app.RemoteAction> mUserActions; } public static class PictureInPictureParams.Builder { @@ -31616,7 +31597,7 @@ package android.os { public class TestLooperManager { method public void execute(android.os.Message); - method public android.os.MessageQueue getQueue(); + method public android.os.MessageQueue getMessageQueue(); method public boolean hasMessages(android.os.Handler, java.lang.Object, int); method public boolean hasMessages(android.os.Handler, java.lang.Object, java.lang.Runnable); method public android.os.Message next(); @@ -37026,7 +37007,7 @@ package android.service.autofill { public final class FillRequest implements android.os.Parcelable { method public int describeContents(); method public android.os.Bundle getClientState(); - method public java.util.ArrayList<android.service.autofill.FillContext> getFillContexts(); + method public java.util.List<android.service.autofill.FillContext> getFillContexts(); method public int getFlags(); method public int getId(); method public void writeToParcel(android.os.Parcel, int); @@ -38010,7 +37991,6 @@ package android.speech.tts { method public void onRangeStart(java.lang.String, int, int, int); method public abstract void onStart(java.lang.String); method public void onStop(java.lang.String, boolean); - method public deprecated void onUtteranceRangeStart(java.lang.String, int, int); } public class Voice implements android.os.Parcelable { @@ -47797,7 +47777,7 @@ package android.view.autofill { method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback); field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; - field public static final java.lang.String EXTRA_CLIENT_STATE = "android.view.autofill.extra.EXTRA_CLIENT_STATE"; + field public static final java.lang.String EXTRA_CLIENT_STATE = "android.view.autofill.extra.CLIENT_STATE"; } public static abstract class AutofillManager.AutofillCallback { diff --git a/api/removed.txt b/api/removed.txt index 779ff7cce923..b0dad451611f 100644 --- a/api/removed.txt +++ b/api/removed.txt @@ -1,9 +1,59 @@ package android.app { + public class Activity extends android.view.ContextThemeWrapper implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback android.view.LayoutInflater.Factory2 android.view.View.OnCreateContextMenuListener android.view.Window.Callback { + method public deprecated boolean enterPictureInPictureMode(android.app.PictureInPictureArgs); + method public deprecated void setPictureInPictureArgs(android.app.PictureInPictureArgs); + } + + public class ActivityManager { + method public static deprecated int getMaxNumPictureInPictureActions(); + } + + public class KeyguardManager { + method public deprecated void dismissKeyguard(android.app.Activity, android.app.KeyguardManager.KeyguardDismissCallback, android.os.Handler); + } + public class Notification implements android.os.Parcelable { + method public deprecated java.lang.String getChannel(); + method public deprecated long getTimeout(); method public deprecated void setLatestEventInfo(android.content.Context, java.lang.CharSequence, java.lang.CharSequence, android.app.PendingIntent); } + public static class Notification.Builder { + method public deprecated android.app.Notification.Builder setChannel(java.lang.String); + method public deprecated android.app.Notification.Builder setTimeout(long); + } + + public static final class Notification.TvExtender implements android.app.Notification.Extender { + method public deprecated java.lang.String getChannel(); + } + + public final deprecated class PictureInPictureArgs implements android.os.Parcelable { + method public static android.app.PictureInPictureArgs convert(android.app.PictureInPictureParams); + method public static android.app.PictureInPictureParams convert(android.app.PictureInPictureArgs); + method public void copyOnlySet(android.app.PictureInPictureArgs); + method public java.util.List<android.app.RemoteAction> getActions(); + method public float getAspectRatio(); + method public android.util.Rational getAspectRatioRational(); + method public android.graphics.Rect getSourceRectHint(); + method public android.graphics.Rect getSourceRectHintInsets(); + method public boolean hasSetActions(); + method public boolean hasSetAspectRatio(); + method public boolean hasSourceBoundsHint(); + method public boolean hasSourceBoundsHintInsets(); + method public deprecated void setSourceRectHintInsets(android.graphics.Rect); + method public void truncateActions(int); + field public static final android.os.Parcelable.Creator<android.app.PictureInPictureArgs> CREATOR; + } + + public static class PictureInPictureArgs.Builder { + ctor public PictureInPictureArgs.Builder(); + method public android.app.PictureInPictureArgs build(); + method public android.app.PictureInPictureArgs.Builder setActions(java.util.List<android.app.RemoteAction>); + method public android.app.PictureInPictureArgs.Builder setAspectRatio(android.util.Rational); + method public android.app.PictureInPictureArgs.Builder setSourceRectHint(android.graphics.Rect); + } + public final class RecoverableSecurityException extends java.lang.SecurityException implements android.os.Parcelable { method public deprecated void showAsNotification(android.content.Context); } @@ -221,6 +271,10 @@ package android.os { ctor public RecoverySystem(); } + public class TestLooperManager { + method public deprecated android.os.MessageQueue getQueue(); + } + public class UserManager { method public android.graphics.drawable.Drawable getBadgedDrawableForUser(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int); method public android.graphics.drawable.Drawable getBadgedIconForUser(android.graphics.drawable.Drawable, android.os.UserHandle); @@ -382,6 +436,14 @@ package android.provider { } +package android.speech.tts { + + public abstract class UtteranceProgressListener { + method public deprecated void onUtteranceRangeStart(java.lang.String, int, int); + } + +} + package android.test.mock { public deprecated class MockPackageManager extends android.content.pm.PackageManager { diff --git a/api/system-current.txt b/api/system-current.txt index e630d2568fde..a7fb5bb63954 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -3712,7 +3712,6 @@ package android.app { method public boolean dispatchTrackballEvent(android.view.MotionEvent); method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]); method public deprecated void enterPictureInPictureMode(); - method public deprecated boolean enterPictureInPictureMode(android.app.PictureInPictureArgs); method public boolean enterPictureInPictureMode(android.app.PictureInPictureParams); method public <T extends android.view.View> T findViewById(int); method public void finish(); @@ -3890,7 +3889,6 @@ package android.app { method public void setImmersive(boolean); method public void setIntent(android.content.Intent); method public final void setMediaController(android.media.session.MediaController); - method public void setPictureInPictureArgs(android.app.PictureInPictureArgs); method public void setPictureInPictureParams(android.app.PictureInPictureParams); method public final deprecated void setProgress(int); method public final deprecated void setProgressBarIndeterminate(boolean); @@ -3977,7 +3975,6 @@ package android.app { method public int getLauncherLargeIconDensity(); method public int getLauncherLargeIconSize(); method public int getLockTaskModeState(); - method public static deprecated int getMaxNumPictureInPictureActions(); method public int getMemoryClass(); method public void getMemoryInfo(android.app.ActivityManager.MemoryInfo); method public static void getMyMemoryState(android.app.ActivityManager.RunningAppProcessInfo); @@ -5153,7 +5150,6 @@ package android.app { public class KeyguardManager { method public android.content.Intent createConfirmDeviceCredentialIntent(java.lang.CharSequence, java.lang.CharSequence); - method public deprecated void dismissKeyguard(android.app.Activity, android.app.KeyguardManager.KeyguardDismissCallback, android.os.Handler); method public deprecated void exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult); method public boolean inKeyguardRestrictedInputMode(); method public boolean isDeviceLocked(); @@ -5302,7 +5298,6 @@ package android.app { method public android.app.Notification clone(); method public int describeContents(); method public int getBadgeIconType(); - method public java.lang.String getChannel(); method public java.lang.String getChannelId(); method public java.lang.String getGroup(); method public int getGroupAlertBehavior(); @@ -5312,7 +5307,6 @@ package android.app { method public java.lang.String getShortcutId(); method public android.graphics.drawable.Icon getSmallIcon(); method public java.lang.String getSortKey(); - method public long getTimeout(); method public long getTimeoutAfter(); method public void writeToParcel(android.os.Parcel, int); field public static final android.media.AudioAttributes AUDIO_ATTRIBUTES_DEFAULT; @@ -5518,7 +5512,6 @@ package android.app { method public android.app.Notification.Builder setAutoCancel(boolean); method public android.app.Notification.Builder setBadgeIconType(int); method public android.app.Notification.Builder setCategory(java.lang.String); - method public android.app.Notification.Builder setChannel(java.lang.String); method public android.app.Notification.Builder setChannelId(java.lang.String); method public android.app.Notification.Builder setChronometerCountDown(boolean); method public android.app.Notification.Builder setColor(int); @@ -5563,7 +5556,6 @@ package android.app { method public android.app.Notification.Builder setSubText(java.lang.CharSequence); method public android.app.Notification.Builder setTicker(java.lang.CharSequence); method public deprecated android.app.Notification.Builder setTicker(java.lang.CharSequence, android.widget.RemoteViews); - method public android.app.Notification.Builder setTimeout(long); method public android.app.Notification.Builder setTimeoutAfter(long); method public android.app.Notification.Builder setUsesChronometer(boolean); method public deprecated android.app.Notification.Builder setVibrate(long[]); @@ -5668,7 +5660,6 @@ package android.app { ctor public Notification.TvExtender(); ctor public Notification.TvExtender(android.app.Notification); method public android.app.Notification.Builder extend(android.app.Notification.Builder); - method public java.lang.String getChannel(); method public java.lang.String getChannelId(); method public android.app.PendingIntent getContentIntent(); method public android.app.PendingIntent getDeleteIntent(); @@ -5903,21 +5894,10 @@ package android.app { method public abstract void onSendFinished(android.app.PendingIntent, android.content.Intent, int, java.lang.String, android.os.Bundle); } - public final deprecated class PictureInPictureArgs extends android.app.PictureInPictureParams { - ctor public deprecated PictureInPictureArgs(); - ctor public deprecated PictureInPictureArgs(float, java.util.List<android.app.RemoteAction>); - method public deprecated void setActions(java.util.List<android.app.RemoteAction>); - method public deprecated void setAspectRatio(float); - method public deprecated void setSourceRectHint(android.graphics.Rect); - } - - public class PictureInPictureParams implements android.os.Parcelable { + public final class PictureInPictureParams implements android.os.Parcelable { method public int describeContents(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.app.PictureInPictureParams> CREATOR; - field protected android.util.Rational mAspectRatio; - field protected android.graphics.Rect mSourceRectHint; - field protected java.util.List<android.app.RemoteAction> mUserActions; } public static class PictureInPictureParams.Builder { @@ -34443,7 +34423,7 @@ package android.os { public class TestLooperManager { method public void execute(android.os.Message); - method public android.os.MessageQueue getQueue(); + method public android.os.MessageQueue getMessageQueue(); method public boolean hasMessages(android.os.Handler, java.lang.Object, int); method public boolean hasMessages(android.os.Handler, java.lang.Object, java.lang.Runnable); method public android.os.Message next(); @@ -40151,7 +40131,7 @@ package android.service.autofill { public final class FillRequest implements android.os.Parcelable { method public int describeContents(); method public android.os.Bundle getClientState(); - method public java.util.ArrayList<android.service.autofill.FillContext> getFillContexts(); + method public java.util.List<android.service.autofill.FillContext> getFillContexts(); method public int getFlags(); method public int getId(); method public void writeToParcel(android.os.Parcel, int); @@ -41278,7 +41258,6 @@ package android.speech.tts { method public void onRangeStart(java.lang.String, int, int, int); method public abstract void onStart(java.lang.String); method public void onStop(java.lang.String, boolean); - method public deprecated void onUtteranceRangeStart(java.lang.String, int, int); } public class Voice implements android.os.Parcelable { @@ -51395,7 +51374,7 @@ package android.view.autofill { method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback); field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; - field public static final java.lang.String EXTRA_CLIENT_STATE = "android.view.autofill.extra.EXTRA_CLIENT_STATE"; + field public static final java.lang.String EXTRA_CLIENT_STATE = "android.view.autofill.extra.CLIENT_STATE"; } public static abstract class AutofillManager.AutofillCallback { diff --git a/api/system-removed.txt b/api/system-removed.txt index fe512481b1ad..2fd30391779c 100644 --- a/api/system-removed.txt +++ b/api/system-removed.txt @@ -1,9 +1,59 @@ package android.app { + public class Activity extends android.view.ContextThemeWrapper implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback android.view.LayoutInflater.Factory2 android.view.View.OnCreateContextMenuListener android.view.Window.Callback { + method public deprecated boolean enterPictureInPictureMode(android.app.PictureInPictureArgs); + method public deprecated void setPictureInPictureArgs(android.app.PictureInPictureArgs); + } + + public class ActivityManager { + method public static deprecated int getMaxNumPictureInPictureActions(); + } + + public class KeyguardManager { + method public deprecated void dismissKeyguard(android.app.Activity, android.app.KeyguardManager.KeyguardDismissCallback, android.os.Handler); + } + public class Notification implements android.os.Parcelable { + method public deprecated java.lang.String getChannel(); + method public deprecated long getTimeout(); method public deprecated void setLatestEventInfo(android.content.Context, java.lang.CharSequence, java.lang.CharSequence, android.app.PendingIntent); } + public static class Notification.Builder { + method public deprecated android.app.Notification.Builder setChannel(java.lang.String); + method public deprecated android.app.Notification.Builder setTimeout(long); + } + + public static final class Notification.TvExtender implements android.app.Notification.Extender { + method public deprecated java.lang.String getChannel(); + } + + public final deprecated class PictureInPictureArgs implements android.os.Parcelable { + method public static android.app.PictureInPictureArgs convert(android.app.PictureInPictureParams); + method public static android.app.PictureInPictureParams convert(android.app.PictureInPictureArgs); + method public void copyOnlySet(android.app.PictureInPictureArgs); + method public java.util.List<android.app.RemoteAction> getActions(); + method public float getAspectRatio(); + method public android.util.Rational getAspectRatioRational(); + method public android.graphics.Rect getSourceRectHint(); + method public android.graphics.Rect getSourceRectHintInsets(); + method public boolean hasSetActions(); + method public boolean hasSetAspectRatio(); + method public boolean hasSourceBoundsHint(); + method public boolean hasSourceBoundsHintInsets(); + method public deprecated void setSourceRectHintInsets(android.graphics.Rect); + method public void truncateActions(int); + field public static final android.os.Parcelable.Creator<android.app.PictureInPictureArgs> CREATOR; + } + + public static class PictureInPictureArgs.Builder { + ctor public PictureInPictureArgs.Builder(); + method public android.app.PictureInPictureArgs build(); + method public android.app.PictureInPictureArgs.Builder setActions(java.util.List<android.app.RemoteAction>); + method public android.app.PictureInPictureArgs.Builder setAspectRatio(android.util.Rational); + method public android.app.PictureInPictureArgs.Builder setSourceRectHint(android.graphics.Rect); + } + public final class RecoverableSecurityException extends java.lang.SecurityException implements android.os.Parcelable { method public deprecated void showAsNotification(android.content.Context); } @@ -215,6 +265,10 @@ package android.os { ctor public RecoverySystem(); } + public class TestLooperManager { + method public deprecated android.os.MessageQueue getQueue(); + } + public class UserManager { method public android.graphics.drawable.Drawable getBadgedDrawableForUser(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int); method public android.graphics.drawable.Drawable getBadgedIconForUser(android.graphics.drawable.Drawable, android.os.UserHandle); @@ -376,6 +430,14 @@ package android.provider { } +package android.speech.tts { + + public abstract class UtteranceProgressListener { + method public deprecated void onUtteranceRangeStart(java.lang.String, int, int); + } + +} + package android.test.mock { public deprecated class MockPackageManager extends android.content.pm.PackageManager { diff --git a/api/test-current.txt b/api/test-current.txt index 8d1326da5a96..42a791eda6cd 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -3581,7 +3581,6 @@ package android.app { method public boolean dispatchTrackballEvent(android.view.MotionEvent); method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]); method public deprecated void enterPictureInPictureMode(); - method public deprecated boolean enterPictureInPictureMode(android.app.PictureInPictureArgs); method public boolean enterPictureInPictureMode(android.app.PictureInPictureParams); method public <T extends android.view.View> T findViewById(int); method public void finish(); @@ -3756,7 +3755,6 @@ package android.app { method public void setImmersive(boolean); method public void setIntent(android.content.Intent); method public final void setMediaController(android.media.session.MediaController); - method public void setPictureInPictureArgs(android.app.PictureInPictureArgs); method public void setPictureInPictureParams(android.app.PictureInPictureParams); method public final deprecated void setProgress(int); method public final deprecated void setProgressBarIndeterminate(boolean); @@ -3837,7 +3835,6 @@ package android.app { method public int getLauncherLargeIconDensity(); method public int getLauncherLargeIconSize(); method public int getLockTaskModeState(); - method public static deprecated int getMaxNumPictureInPictureActions(); method public int getMemoryClass(); method public void getMemoryInfo(android.app.ActivityManager.MemoryInfo); method public static void getMyMemoryState(android.app.ActivityManager.RunningAppProcessInfo); @@ -4984,7 +4981,6 @@ package android.app { public class KeyguardManager { method public android.content.Intent createConfirmDeviceCredentialIntent(java.lang.CharSequence, java.lang.CharSequence); - method public deprecated void dismissKeyguard(android.app.Activity, android.app.KeyguardManager.KeyguardDismissCallback, android.os.Handler); method public deprecated void exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult); method public boolean inKeyguardRestrictedInputMode(); method public boolean isDeviceLocked(); @@ -5133,7 +5129,6 @@ package android.app { method public android.app.Notification clone(); method public int describeContents(); method public int getBadgeIconType(); - method public java.lang.String getChannel(); method public java.lang.String getChannelId(); method public java.lang.String getGroup(); method public int getGroupAlertBehavior(); @@ -5142,7 +5137,6 @@ package android.app { method public java.lang.String getShortcutId(); method public android.graphics.drawable.Icon getSmallIcon(); method public java.lang.String getSortKey(); - method public long getTimeout(); method public long getTimeoutAfter(); method public void writeToParcel(android.os.Parcel, int); field public static final android.media.AudioAttributes AUDIO_ATTRIBUTES_DEFAULT; @@ -5345,7 +5339,6 @@ package android.app { method public android.app.Notification.Builder setAutoCancel(boolean); method public android.app.Notification.Builder setBadgeIconType(int); method public android.app.Notification.Builder setCategory(java.lang.String); - method public android.app.Notification.Builder setChannel(java.lang.String); method public android.app.Notification.Builder setChannelId(java.lang.String); method public android.app.Notification.Builder setChronometerCountDown(boolean); method public android.app.Notification.Builder setColor(int); @@ -5390,7 +5383,6 @@ package android.app { method public android.app.Notification.Builder setSubText(java.lang.CharSequence); method public android.app.Notification.Builder setTicker(java.lang.CharSequence); method public deprecated android.app.Notification.Builder setTicker(java.lang.CharSequence, android.widget.RemoteViews); - method public android.app.Notification.Builder setTimeout(long); method public android.app.Notification.Builder setTimeoutAfter(long); method public android.app.Notification.Builder setUsesChronometer(boolean); method public deprecated android.app.Notification.Builder setVibrate(long[]); @@ -5710,21 +5702,10 @@ package android.app { method public abstract void onSendFinished(android.app.PendingIntent, android.content.Intent, int, java.lang.String, android.os.Bundle); } - public final deprecated class PictureInPictureArgs extends android.app.PictureInPictureParams { - ctor public deprecated PictureInPictureArgs(); - ctor public deprecated PictureInPictureArgs(float, java.util.List<android.app.RemoteAction>); - method public deprecated void setActions(java.util.List<android.app.RemoteAction>); - method public deprecated void setAspectRatio(float); - method public deprecated void setSourceRectHint(android.graphics.Rect); - } - - public class PictureInPictureParams implements android.os.Parcelable { + public final class PictureInPictureParams implements android.os.Parcelable { method public int describeContents(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.app.PictureInPictureParams> CREATOR; - field protected android.util.Rational mAspectRatio; - field protected android.graphics.Rect mSourceRectHint; - field protected java.util.List<android.app.RemoteAction> mUserActions; } public static class PictureInPictureParams.Builder { @@ -31746,7 +31727,7 @@ package android.os { public class TestLooperManager { method public void execute(android.os.Message); - method public android.os.MessageQueue getQueue(); + method public android.os.MessageQueue getMessageQueue(); method public boolean hasMessages(android.os.Handler, java.lang.Object, int); method public boolean hasMessages(android.os.Handler, java.lang.Object, java.lang.Runnable); method public android.os.Message next(); @@ -37180,7 +37161,7 @@ package android.service.autofill { public final class FillRequest implements android.os.Parcelable { method public int describeContents(); method public android.os.Bundle getClientState(); - method public java.util.ArrayList<android.service.autofill.FillContext> getFillContexts(); + method public java.util.List<android.service.autofill.FillContext> getFillContexts(); method public int getFlags(); method public int getId(); method public void writeToParcel(android.os.Parcel, int); @@ -38205,7 +38186,6 @@ package android.speech.tts { method public void onRangeStart(java.lang.String, int, int, int); method public abstract void onStart(java.lang.String); method public void onStop(java.lang.String, boolean); - method public deprecated void onUtteranceRangeStart(java.lang.String, int, int); } public class Voice implements android.os.Parcelable { @@ -48192,7 +48172,7 @@ package android.view.autofill { method public void unregisterCallback(android.view.autofill.AutofillManager.AutofillCallback); field public static final java.lang.String EXTRA_ASSIST_STRUCTURE = "android.view.autofill.extra.ASSIST_STRUCTURE"; field public static final java.lang.String EXTRA_AUTHENTICATION_RESULT = "android.view.autofill.extra.AUTHENTICATION_RESULT"; - field public static final java.lang.String EXTRA_CLIENT_STATE = "android.view.autofill.extra.EXTRA_CLIENT_STATE"; + field public static final java.lang.String EXTRA_CLIENT_STATE = "android.view.autofill.extra.CLIENT_STATE"; } public static abstract class AutofillManager.AutofillCallback { diff --git a/api/test-removed.txt b/api/test-removed.txt index 779ff7cce923..b0dad451611f 100644 --- a/api/test-removed.txt +++ b/api/test-removed.txt @@ -1,9 +1,59 @@ package android.app { + public class Activity extends android.view.ContextThemeWrapper implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback android.view.LayoutInflater.Factory2 android.view.View.OnCreateContextMenuListener android.view.Window.Callback { + method public deprecated boolean enterPictureInPictureMode(android.app.PictureInPictureArgs); + method public deprecated void setPictureInPictureArgs(android.app.PictureInPictureArgs); + } + + public class ActivityManager { + method public static deprecated int getMaxNumPictureInPictureActions(); + } + + public class KeyguardManager { + method public deprecated void dismissKeyguard(android.app.Activity, android.app.KeyguardManager.KeyguardDismissCallback, android.os.Handler); + } + public class Notification implements android.os.Parcelable { + method public deprecated java.lang.String getChannel(); + method public deprecated long getTimeout(); method public deprecated void setLatestEventInfo(android.content.Context, java.lang.CharSequence, java.lang.CharSequence, android.app.PendingIntent); } + public static class Notification.Builder { + method public deprecated android.app.Notification.Builder setChannel(java.lang.String); + method public deprecated android.app.Notification.Builder setTimeout(long); + } + + public static final class Notification.TvExtender implements android.app.Notification.Extender { + method public deprecated java.lang.String getChannel(); + } + + public final deprecated class PictureInPictureArgs implements android.os.Parcelable { + method public static android.app.PictureInPictureArgs convert(android.app.PictureInPictureParams); + method public static android.app.PictureInPictureParams convert(android.app.PictureInPictureArgs); + method public void copyOnlySet(android.app.PictureInPictureArgs); + method public java.util.List<android.app.RemoteAction> getActions(); + method public float getAspectRatio(); + method public android.util.Rational getAspectRatioRational(); + method public android.graphics.Rect getSourceRectHint(); + method public android.graphics.Rect getSourceRectHintInsets(); + method public boolean hasSetActions(); + method public boolean hasSetAspectRatio(); + method public boolean hasSourceBoundsHint(); + method public boolean hasSourceBoundsHintInsets(); + method public deprecated void setSourceRectHintInsets(android.graphics.Rect); + method public void truncateActions(int); + field public static final android.os.Parcelable.Creator<android.app.PictureInPictureArgs> CREATOR; + } + + public static class PictureInPictureArgs.Builder { + ctor public PictureInPictureArgs.Builder(); + method public android.app.PictureInPictureArgs build(); + method public android.app.PictureInPictureArgs.Builder setActions(java.util.List<android.app.RemoteAction>); + method public android.app.PictureInPictureArgs.Builder setAspectRatio(android.util.Rational); + method public android.app.PictureInPictureArgs.Builder setSourceRectHint(android.graphics.Rect); + } + public final class RecoverableSecurityException extends java.lang.SecurityException implements android.os.Parcelable { method public deprecated void showAsNotification(android.content.Context); } @@ -221,6 +271,10 @@ package android.os { ctor public RecoverySystem(); } + public class TestLooperManager { + method public deprecated android.os.MessageQueue getQueue(); + } + public class UserManager { method public android.graphics.drawable.Drawable getBadgedDrawableForUser(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int); method public android.graphics.drawable.Drawable getBadgedIconForUser(android.graphics.drawable.Drawable, android.os.UserHandle); @@ -382,6 +436,14 @@ package android.provider { } +package android.speech.tts { + + public abstract class UtteranceProgressListener { + method public deprecated void onUtteranceRangeStart(java.lang.String, int, int); + } + +} + package android.test.mock { public deprecated class MockPackageManager extends android.content.pm.PackageManager { diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index ab4f33d6b6e6..4f6c0c9d8f91 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -2050,20 +2050,10 @@ public class Activity extends ContextThemeWrapper enterPictureInPictureMode(new PictureInPictureParams.Builder().build()); } - /** - * TO BE REMOVED - */ + /** @removed */ @Deprecated public boolean enterPictureInPictureMode(@NonNull PictureInPictureArgs args) { - try { - if (args == null) { - throw new IllegalArgumentException("Expected non-null picture-in-picture args"); - } - updatePictureInPictureParamsForContentInsets(args); - return ActivityManagerNative.getDefault().enterPictureInPictureMode(mToken, args); - } catch (RemoteException e) { - return false; - } + return enterPictureInPictureMode(PictureInPictureArgs.convert(args)); } /** @@ -2095,11 +2085,10 @@ public class Activity extends ContextThemeWrapper } } - /** - * TO BE REMOVED - */ + /** @removed */ + @Deprecated public void setPictureInPictureArgs(@NonNull PictureInPictureArgs args) { - setPictureInPictureParams(args); + setPictureInPictureParams(PictureInPictureArgs.convert(args)); } /** diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index 66d221aefc14..4c3e1b077091 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -1143,13 +1143,7 @@ public class ActivityManager { com.android.internal.R.bool.config_supportsSplitScreenMultiWindow); } - /** - * Return the number of actions that will be displayed in the picture-in-picture UI when the - * user interacts with the activity currently in picture-in-picture mode. This number may change - * if the global configuration changes (ie. if the device is plugged into an external display). - * - * TO BE REMOVED - */ + /** @removed */ @Deprecated public static int getMaxNumPictureInPictureActions() { return 3; diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java index 4de6e44b0400..fcf0aab0c821 100644 --- a/core/java/android/app/KeyguardManager.java +++ b/core/java/android/app/KeyguardManager.java @@ -362,28 +362,7 @@ public class KeyguardManager { } } - /** - * If the device is currently locked (see {@link #isKeyguardLocked()}, requests the Keyguard to - * be dismissed. - * <p> - * If the Keyguard is not secure or the device is currently in a trusted state, calling this - * method will immediately dismiss the Keyguard without any user interaction. - * <p> - * If the Keyguard is secure and the device is not in a trusted state, this will bring up the - * UI so the user can enter their credentials. - * - * @param activity The activity requesting the dismissal. The activity must be either visible - * by using {@link LayoutParams#FLAG_SHOW_WHEN_LOCKED} or must be in a state in - * which it would be visible if Keyguard would not be hiding it. If that's not - * the case, the request will fail immediately and - * {@link KeyguardDismissCallback#onDismissError} will be invoked. - * @param callback The callback to be called if the request to dismiss Keyguard was successful - * or {@code null} if the caller isn't interested in knowing the result. - * @param handler The handler to invoke the callback on, or {@code null} to use the main - * handler. - * - * TO BE REMOVED - */ + /** @removed */ @Deprecated public void dismissKeyguard(@NonNull Activity activity, @Nullable KeyguardDismissCallback callback, @Nullable Handler handler) { diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 28fe3195839d..c8b8c6c1b262 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -2494,9 +2494,8 @@ public class Notification implements Parcelable } } - /** - * Returns the id of the channel this notification posts to. - */ + /** @removed */ + @Deprecated public String getChannel() { return mChannelId; } @@ -2508,10 +2507,8 @@ public class Notification implements Parcelable return mChannelId; } - /** - * Returns the time at which this notification should be canceled by the system, if it's not - * canceled already. - */ + /** @removed */ + @Deprecated public long getTimeout() { return mTimeout; } @@ -2811,9 +2808,8 @@ public class Notification implements Parcelable return this; } - /** - * Specifies the channel the notification should be delivered on. - */ + /** @removed */ + @Deprecated public Builder setChannel(String channelId) { mN.mChannelId = channelId; return this; @@ -2827,10 +2823,8 @@ public class Notification implements Parcelable return this; } - /** - * Specifies a duration in milliseconds after which this notification should be canceled, - * if it is not already canceled. - */ + /** @removed */ + @Deprecated public Builder setTimeout(long durationMs) { mN.mTimeout = durationMs; return this; @@ -8040,9 +8034,8 @@ public class Notification implements Parcelable return this; } - /** - * Returns the id of the channel this notification posts to on TV. - */ + /** @removed */ + @Deprecated public String getChannel() { return mChannelId; } diff --git a/core/java/android/app/PictureInPictureArgs.java b/core/java/android/app/PictureInPictureArgs.java index 63db86aac9a8..88e6b9981486 100644 --- a/core/java/android/app/PictureInPictureArgs.java +++ b/core/java/android/app/PictureInPictureArgs.java @@ -16,91 +16,314 @@ package android.app; +import android.annotation.Nullable; import android.graphics.Rect; +import android.os.Parcel; +import android.os.Parcelable; import android.util.Rational; import java.util.ArrayList; import java.util.List; -/** - * TO BE REMOVED - */ +/** @removed */ @Deprecated -public final class PictureInPictureArgs extends PictureInPictureParams { +public final class PictureInPictureArgs implements Parcelable { /** - * Creates a new set of picture-in-picture arguments. - * - * TODO: Remove once we remove PictureInPictureArgs. + * Builder class for {@link PictureInPictureArgs} objects. */ - @Deprecated - public PictureInPictureArgs() { - // Empty constructor + public static class Builder { + + @Nullable + private Rational mAspectRatio; + + @Nullable + private List<RemoteAction> mUserActions; + + @Nullable + private Rect mSourceRectHint; + + /** + * Sets the aspect ratio. This aspect ratio is defined as the desired width / height, and + * does not change upon device rotation. + * + * @param aspectRatio the new aspect ratio for the activity in picture-in-picture, must be + * between 2.39:1 and 1:2.39 (inclusive). + * + * @return this builder instance. + */ + public Builder setAspectRatio(Rational aspectRatio) { + mAspectRatio = aspectRatio; + return this; + } + + /** + * Sets the user actions. If there are more than + * {@link Activity#getMaxNumPictureInPictureActions()} actions, then the input list + * will be truncated to that number. + * + * @param actions the new actions to show in the picture-in-picture menu. + * + * @return this builder instance. + * + * @see RemoteAction + */ + public Builder setActions(List<RemoteAction> actions) { + if (mUserActions != null) { + mUserActions = null; + } + if (actions != null) { + mUserActions = new ArrayList<>(actions); + } + return this; + } + + /** + * Sets the source bounds hint. These bounds are only used when an activity first enters + * picture-in-picture, and describe the bounds in window coordinates of activity entering + * picture-in-picture that will be visible following the transition. For the best effect, + * these bounds should also match the aspect ratio in the arguments. + * + * @param launchBounds window-coordinate bounds indicating the area of the activity that + * will still be visible following the transition into picture-in-picture (eg. the video + * view bounds in a video player) + * + * @return this builder instance. + */ + public Builder setSourceRectHint(Rect launchBounds) { + if (launchBounds == null) { + mSourceRectHint = null; + } else { + mSourceRectHint = new Rect(launchBounds); + } + return this; + } + + public PictureInPictureArgs build() { + PictureInPictureArgs args = new PictureInPictureArgs(mAspectRatio, mUserActions, + mSourceRectHint); + return args; + } } /** - * Creates a new set of picture-in-picture arguments from the given {@param aspectRatio} and - * {@param actions}. - * - * TODO: Remove once we remove PictureInPictureArgs. + * The expected aspect ratio of the picture-in-picture. */ - @Deprecated - public PictureInPictureArgs(float aspectRatio, List<RemoteAction> actions) { - setAspectRatio(aspectRatio); - if (actions != null) { - setActions(actions); + @Nullable + private Rational mAspectRatio; + + /** + * The set of actions that are associated with this activity when in picture-in-picture. + */ + @Nullable + private List<RemoteAction> mUserActions; + + /** + * The source bounds hint used when entering picture-in-picture, relative to the window bounds. + * We can use this internally for the transition into picture-in-picture to ensure that a + * particular source rect is visible throughout the whole transition. + */ + @Nullable + private Rect mSourceRectHint; + + /** + * The content insets that are used with the source hint rect for the transition into PiP where + * the insets are removed at the beginning of the transition. + */ + @Nullable + private Rect mSourceRectHintInsets; + + private PictureInPictureArgs() { + } + + private PictureInPictureArgs(Parcel in) { + if (in.readInt() != 0) { + mAspectRatio = new Rational(in.readInt(), in.readInt()); + } + if (in.readInt() != 0) { + mUserActions = new ArrayList<>(); + in.readParcelableList(mUserActions, RemoteAction.class.getClassLoader()); + } + if (in.readInt() != 0) { + mSourceRectHint = Rect.CREATOR.createFromParcel(in); + } + if (in.readInt() != 0) { + mSourceRectHintInsets = Rect.CREATOR.createFromParcel(in); } } + private PictureInPictureArgs(Rational aspectRatio, List<RemoteAction> actions, + Rect sourceRectHint) { + mAspectRatio = aspectRatio; + mUserActions = actions; + mSourceRectHint = sourceRectHint; + } + /** - * Sets the aspect ratio. - * - * @param aspectRatio the new aspect ratio for picture-in-picture, must be within 2.39:1 and - * 1:2.39. - * - * TODO: Remove once we remove PictureInPictureArgs. + * Copies the set parameters from the other picture-in-picture args. + * @hide */ - @Deprecated - public void setAspectRatio(float aspectRatio) { - // Temporary workaround - mAspectRatio = new Rational((int) (aspectRatio * 1000000000), 1000000000); + public void copyOnlySet(PictureInPictureArgs otherArgs) { + if (otherArgs.hasSetAspectRatio()) { + mAspectRatio = otherArgs.mAspectRatio; + } + if (otherArgs.hasSetActions()) { + mUserActions = otherArgs.mUserActions; + } + if (otherArgs.hasSourceBoundsHint()) { + mSourceRectHint = new Rect(otherArgs.getSourceRectHint()); + } + if (otherArgs.hasSourceBoundsHintInsets()) { + mSourceRectHintInsets = new Rect(otherArgs.getSourceRectHintInsets()); + } } /** - * Sets the user actions. If there are more than - * {@link ActivityManager#getMaxNumPictureInPictureActions()} actions, then the input will be - * truncated to that number. - * - * @param actions the new actions to show in the picture-in-picture menu. - * - * @see RemoteAction - * - * TODO: Remove once we remove PictureInPictureArgs. + * @return the aspect ratio. If none is set, return 0. + * @hide */ - @Deprecated - public void setActions(List<RemoteAction> actions) { - if (mUserActions != null) { - mUserActions = null; + public float getAspectRatio() { + if (mAspectRatio != null) { + return mAspectRatio.floatValue(); } - if (actions != null) { - mUserActions = new ArrayList<>(actions); + return 0f; + } + + /** {@hide} */ + public Rational getAspectRatioRational() { + return mAspectRatio; + } + + /** + * @return whether the aspect ratio is set. + * @hide + */ + public boolean hasSetAspectRatio() { + return mAspectRatio != null; + } + + /** + * @return the set of user actions. + * @hide + */ + public List<RemoteAction> getActions() { + return mUserActions; + } + + /** + * @return whether the user actions are set. + * @hide + */ + public boolean hasSetActions() { + return mUserActions != null; + } + + /** + * Truncates the set of actions to the given {@param size}. + * @hide + */ + public void truncateActions(int size) { + if (hasSetActions()) { + mUserActions = mUserActions.subList(0, Math.min(mUserActions.size(), size)); } } /** - * Sets the source bounds hint. These bounds are only used when an activity first enters - * picture-in-picture, and describe the bounds in window coordinates of activity entering - * picture-in-picture that will be visible following the transition. For the best effect, these - * bounds should also match the aspect ratio in the arguments. - * - * TODO: Remove once we remove PictureInPictureArgs. + * Sets the insets to be used with the source rect hint bounds. + * @hide */ @Deprecated - public void setSourceRectHint(Rect launchBounds) { - if (launchBounds == null) { - mSourceRectHint = null; + public void setSourceRectHintInsets(Rect insets) { + if (insets == null) { + mSourceRectHintInsets = null; } else { - mSourceRectHint = new Rect(launchBounds); + mSourceRectHintInsets = new Rect(insets); } } -}
\ No newline at end of file + + /** + * @return the source rect hint + * @hide + */ + public Rect getSourceRectHint() { + return mSourceRectHint; + } + + /** + * @return the source rect hint insets. + * @hide + */ + public Rect getSourceRectHintInsets() { + return mSourceRectHintInsets; + } + + /** + * @return whether there are launch bounds set + * @hide + */ + public boolean hasSourceBoundsHint() { + return mSourceRectHint != null && !mSourceRectHint.isEmpty(); + } + + /** + * @return whether there are source rect hint insets set + * @hide + */ + public boolean hasSourceBoundsHintInsets() { + return mSourceRectHintInsets != null; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + if (mAspectRatio != null) { + out.writeInt(1); + out.writeInt(mAspectRatio.getNumerator()); + out.writeInt(mAspectRatio.getDenominator()); + } else { + out.writeInt(0); + } + if (mUserActions != null) { + out.writeInt(1); + out.writeParcelableList(mUserActions, 0); + } else { + out.writeInt(0); + } + if (mSourceRectHint != null) { + out.writeInt(1); + mSourceRectHint.writeToParcel(out, 0); + } else { + out.writeInt(0); + } + if (mSourceRectHintInsets != null) { + out.writeInt(1); + mSourceRectHintInsets.writeToParcel(out, 0); + } else { + out.writeInt(0); + } + } + + public static final Creator<PictureInPictureArgs> CREATOR = + new Creator<PictureInPictureArgs>() { + public PictureInPictureArgs createFromParcel(Parcel in) { + return new PictureInPictureArgs(in); + } + public PictureInPictureArgs[] newArray(int size) { + return new PictureInPictureArgs[size]; + } + }; + + public static PictureInPictureArgs convert(PictureInPictureParams params) { + return new PictureInPictureArgs(params.getAspectRatioRational(), params.getActions(), + params.getSourceRectHint()); + } + + public static PictureInPictureParams convert(PictureInPictureArgs args) { + return new PictureInPictureParams(args.getAspectRatioRational(), args.getActions(), + args.getSourceRectHint()); + } +} diff --git a/core/java/android/app/PictureInPictureParams.java b/core/java/android/app/PictureInPictureParams.java index e1df33b55281..323a0fbaa5b1 100644 --- a/core/java/android/app/PictureInPictureParams.java +++ b/core/java/android/app/PictureInPictureParams.java @@ -28,10 +28,8 @@ import java.util.List; /** * Represents a set of parameters used to initialize and update an Activity in picture-in-picture * mode. - * - * TODO: Make this final after we remove PictureInPictureArgs */ -public class PictureInPictureParams implements Parcelable { +public final class PictureInPictureParams implements Parcelable { /** * Builder class for {@link PictureInPictureParams} objects. @@ -63,7 +61,7 @@ public class PictureInPictureParams implements Parcelable { /** * Sets the user actions. If there are more than - * {@link ActivityManager#getMaxNumPictureInPictureActions()} actions, then the input list + * {@link Activity#getMaxNumPictureInPictureActions()} actions, then the input list * will be truncated to that number. * * @param actions the new actions to show in the picture-in-picture menu. @@ -120,25 +118,22 @@ public class PictureInPictureParams implements Parcelable { /** * The expected aspect ratio of the picture-in-picture. */ - // TODO: Make private once we removed PictureInPictureArgs @Nullable - protected Rational mAspectRatio; + private Rational mAspectRatio; /** * The set of actions that are associated with this activity when in picture-in-picture. */ - // TODO: Make private once we removed PictureInPictureArgs @Nullable - protected List<RemoteAction> mUserActions; + private List<RemoteAction> mUserActions; /** * The source bounds hint used when entering picture-in-picture, relative to the window bounds. * We can use this internally for the transition into picture-in-picture to ensure that a * particular source rect is visible throughout the whole transition. */ - // TODO: Make private once we removed PictureInPictureArgs @Nullable - protected Rect mSourceRectHint; + private Rect mSourceRectHint; /** * The content insets that are used with the source hint rect for the transition into PiP where @@ -147,15 +142,12 @@ public class PictureInPictureParams implements Parcelable { @Nullable private Rect mSourceRectHintInsets; - /** - * TO BE REMOVED - */ - @Deprecated + /** {@hide} */ PictureInPictureParams() { - // TODO: Remove once we remove PictureInPictureArgs } - private PictureInPictureParams(Parcel in) { + /** {@hide} */ + PictureInPictureParams(Parcel in) { if (in.readInt() != 0) { mAspectRatio = new Rational(in.readInt(), in.readInt()); } @@ -171,7 +163,8 @@ public class PictureInPictureParams implements Parcelable { } } - private PictureInPictureParams(Rational aspectRatio, List<RemoteAction> actions, + /** {@hide} */ + PictureInPictureParams(Rational aspectRatio, List<RemoteAction> actions, Rect sourceRectHint) { mAspectRatio = aspectRatio; mUserActions = actions; @@ -208,6 +201,11 @@ public class PictureInPictureParams implements Parcelable { return 0f; } + /** @hide */ + public Rational getAspectRatioRational() { + return mAspectRatio; + } + /** * @return whether the aspect ratio is set. * @hide diff --git a/core/java/android/os/TestLooperManager.java b/core/java/android/os/TestLooperManager.java index 745642efc423..5e7549fa67d8 100644 --- a/core/java/android/os/TestLooperManager.java +++ b/core/java/android/os/TestLooperManager.java @@ -58,11 +58,17 @@ public class TestLooperManager { /** * Returns the {@link MessageQueue} this object is wrapping. */ - public MessageQueue getQueue() { + public MessageQueue getMessageQueue() { checkReleased(); return mQueue; } + /** @removed */ + @Deprecated + public MessageQueue getQueue() { + return getMessageQueue(); + } + /** * Returns the next message that should be executed by this queue, may block * if no messages are ready. diff --git a/core/java/android/service/autofill/AutofillService.java b/core/java/android/service/autofill/AutofillService.java index 416455d596be..88d17ef32c13 100644 --- a/core/java/android/service/autofill/AutofillService.java +++ b/core/java/android/service/autofill/AutofillService.java @@ -119,7 +119,7 @@ public abstract class AutofillService extends Service { try { onFillRequest(request, cancellation, fillCallback); } catch (AbstractMethodError e) { - final ArrayList<FillContext> contexts = request.getFillContexts(); + final List<FillContext> contexts = request.getFillContexts(); onFillRequest(contexts.get(contexts.size() - 1).getStructure(), request.getClientState(), request.getFlags(), cancellation, fillCallback); diff --git a/core/java/android/service/autofill/FillRequest.java b/core/java/android/service/autofill/FillRequest.java index 8ac399c776ec..b1145ee38929 100644 --- a/core/java/android/service/autofill/FillRequest.java +++ b/core/java/android/service/autofill/FillRequest.java @@ -29,6 +29,7 @@ import com.android.internal.util.Preconditions; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; +import java.util.List; /** * This class represents a request to an {@link AutofillService autofill provider} @@ -96,7 +97,7 @@ public final class FillRequest implements Parcelable { /** * @return The contexts associated with each previous fill request. */ - public @NonNull ArrayList<FillContext> getFillContexts() { + public @NonNull List<FillContext> getFillContexts() { return mContexts; } diff --git a/core/java/android/speech/tts/UtteranceProgressListener.java b/core/java/android/speech/tts/UtteranceProgressListener.java index ef81f1211364..7381a12af083 100644 --- a/core/java/android/speech/tts/UtteranceProgressListener.java +++ b/core/java/android/speech/tts/UtteranceProgressListener.java @@ -144,9 +144,8 @@ public abstract class UtteranceProgressListener { onUtteranceRangeStart(utteranceId, start, end); } - /** - * @deprecated Due to internal API changes. Remove when apps catch up. - */ + /** @removed */ + @Deprecated public void onUtteranceRangeStart(String utteranceId, int start, int end) { } diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java index 0a24bfb019ca..d0133ed66535 100644 --- a/core/java/android/view/autofill/AutofillManager.java +++ b/core/java/android/view/autofill/AutofillManager.java @@ -95,7 +95,7 @@ public final class AutofillManager { * Type: {@link android.os.Bundle} */ public static final String EXTRA_CLIENT_STATE = - "android.view.autofill.extra.EXTRA_CLIENT_STATE"; + "android.view.autofill.extra.CLIENT_STATE"; static final String SESSION_ID_TAG = "android:sessionId"; static final String LAST_AUTOFILLED_DATA_TAG = "android:lastAutoFilledData"; |