Loading core/api/system-current.txt +15 −0 Original line number Diff line number Diff line Loading @@ -2955,6 +2955,21 @@ package android.app.supervision { method @FlaggedApi("android.permission.flags.enable_system_supervision_role_behavior") @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public boolean shouldAllowBypassingSupervisionRoleQualification(); } @FlaggedApi("android.app.supervision.flags.supervision_manager_apis") public final class SupervisionRecoveryInfo implements android.os.Parcelable { ctor public SupervisionRecoveryInfo(@NonNull String, @NonNull String, int, @Nullable android.os.PersistableBundle); method public int describeContents(); method @NonNull public android.os.PersistableBundle getAccountData(); method @NonNull public String getAccountName(); method @NonNull public String getAccountType(); method public int getState(); method public void readFromParcel(@NonNull android.os.Parcel); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.app.supervision.SupervisionRecoveryInfo> CREATOR; field public static final String EXTRA_SUPERVISION_RECOVERY_INFO = "android.app.supervision.extra.SUPERVISION_RECOVERY_INFO"; field public static final int STATE_PENDING = 0; // 0x0 field public static final int STATE_VERIFIED = 1; // 0x1 } } package android.app.time { core/java/android/app/ActivityOptions.java +3 −4 Original line number Diff line number Diff line Loading @@ -180,8 +180,8 @@ public class ActivityOptions extends ComponentOptions { public static final String KEY_PACKAGE_NAME = "android:activity.packageName"; /** * The bounds (window size) that the activity should be launched in. Set to null explicitly for * full screen. If the key is not found, previous bounds will be preserved. * The bounds (window size) that the activity should be launched in. * If the key is not found, previous bounds will be preserved. * NOTE: This value is ignored on devices that don't have * {@link android.content.pm.PackageManager#FEATURE_FREEFORM_WINDOW_MANAGEMENT} or * {@link android.content.pm.PackageManager#FEATURE_PICTURE_IN_PICTURE} enabled. Loading Loading @@ -1480,12 +1480,11 @@ public class ActivityOptions extends ComponentOptions { /** * Sets the bounds (window size and position) that the activity should be launched in. * Rect position should be provided in pixels and in screen coordinates. * Set to {@code null} to explicitly launch fullscreen. * <p> * <strong>NOTE:</strong> This value is ignored on devices that don't have * {@link android.content.pm.PackageManager#FEATURE_FREEFORM_WINDOW_MANAGEMENT} or * {@link android.content.pm.PackageManager#FEATURE_PICTURE_IN_PICTURE} enabled. * @param screenSpacePixelRect launch bounds or {@code null} for fullscreen * @param screenSpacePixelRect launch bounds * @return {@code this} {@link ActivityOptions} instance */ public ActivityOptions setLaunchBounds(@Nullable Rect screenSpacePixelRect) { Loading core/java/android/app/IActivityTaskManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ import android.view.IRemoteAnimationRunner; import android.view.RemoteAnimationDefinition; import android.view.RemoteAnimationAdapter; import android.window.IWindowOrganizerController; import android.window.ITaskSnapshotManager; import android.window.BackAnimationAdapter; import android.window.BackNavigationInfo; import android.window.SplashScreenView; Loading Loading @@ -247,6 +248,10 @@ interface IActivityTaskManager { /** Returns an interface enabling the management of window organizers. */ IWindowOrganizerController getWindowOrganizerController(); /** Returns an interface enabling the access of task snapshots. */ @EnforcePermission(allOf={"MANAGE_ACTIVITY_TASKS", "READ_FRAME_BUFFER"}) ITaskSnapshotManager getTaskSnapshotManager(); boolean supportsLocalVoiceInteraction(); // Requests the "Open in browser" education to be shown Loading core/java/android/app/Instrumentation.java +15 −12 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Debug; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.MessageQueue; Loading Loading @@ -132,6 +133,7 @@ public class Instrumentation { private final Object mSync = new Object(); private ActivityThread mThread = null; private Handler mMainHandler = null; private MessageQueue mMessageQueue = null; private Context mInstrContext; private Context mAppContext; Loading Loading @@ -447,9 +449,10 @@ public class Instrumentation { * @param recipient Called the next time the thread's message queue is * idle. */ @RavenwoodKeep public void waitForIdle(Runnable recipient) { mMessageQueue.addIdleHandler(new Idler(recipient)); mThread.getHandler().post(new EmptyRunnable()); mMainHandler.post(new EmptyRunnable()); } /** Loading @@ -457,11 +460,12 @@ public class Instrumentation { * from the main application thread -- use {@link #start} to execute * instrumentation in its own thread. */ @RavenwoodKeep public void waitForIdleSync() { validateNotAppThread(); Idler idler = new Idler(null); mMessageQueue.addIdleHandler(idler); mThread.getHandler().post(new EmptyRunnable()); mMainHandler.post(new EmptyRunnable()); idler.waitForIdle(); } Loading @@ -472,18 +476,11 @@ public class Instrumentation { * * @param runner The code to run on the main thread. */ @RavenwoodReplace(blockedBy = ActivityThread.class) @RavenwoodKeep public void runOnMainSync(Runnable runner) { validateNotAppThread(); SyncRunnable sr = new SyncRunnable(runner); mThread.getHandler().post(sr); sr.waitForComplete(); } private void runOnMainSync$ravenwood(Runnable runner) { validateNotAppThread(); SyncRunnable sr = new SyncRunnable(runner); mInstrContext.getMainExecutor().execute(sr); mMainHandler.post(sr); sr.waitForComplete(); } Loading Loading @@ -2383,6 +2380,7 @@ public class Instrumentation { Context instrContext, Context appContext, ComponentName component, IInstrumentationWatcher watcher, IUiAutomationConnection uiAutomationConnection) { mThread = thread; mMainHandler = thread.getHandler(); mMessageQueue = mThread.getLooper().myQueue(); mInstrContext = instrContext; mAppContext = appContext; Loading @@ -2397,15 +2395,18 @@ public class Instrumentation { */ final void basicInit(ActivityThread thread) { mThread = thread; mMainHandler = thread.getHandler(); } /** * Only sets the Context up, keeps everything else null. * Initialize the minimam fields needed for Ravenwood. * * @hide */ @RavenwoodKeep public final void basicInit(Context instrContext, Context appContext, UiAutomation ui) { mMainHandler = instrContext.getMainThreadHandler(); mMessageQueue = mMainHandler.getLooper().getQueue(); mInstrContext = instrContext; mAppContext = appContext; mUiAutomation = ui; Loading Loading @@ -2602,6 +2603,7 @@ public class Instrumentation { } } @RavenwoodKeepWholeClass private static final class EmptyRunnable implements Runnable { public void run() { } Loading Loading @@ -2661,6 +2663,7 @@ public class Instrumentation { } } @RavenwoodKeepWholeClass private static final class Idler implements MessageQueue.IdleHandler { private final Runnable mCallback; private boolean mIdle; Loading core/java/android/app/Notification.java +12 −32 Original line number Diff line number Diff line Loading @@ -2774,12 +2774,9 @@ public class Notification implements Parcelable public Notification() { this.when = System.currentTimeMillis(); if (Flags.sortSectionByTime()) { creationTime = when; extras.putBoolean(EXTRA_SHOW_WHEN, true); } else { this.creationTime = System.currentTimeMillis(); } this.priority = PRIORITY_DEFAULT; } Loading @@ -2790,10 +2787,9 @@ public class Notification implements Parcelable public Notification(Context context, int icon, CharSequence tickerText, long when, CharSequence contentTitle, CharSequence contentText, Intent contentIntent) { if (Flags.sortSectionByTime()) { creationTime = when; extras.putBoolean(EXTRA_SHOW_WHEN, true); } new Builder(context) .setWhen(when) .setSmallIcon(icon) Loading Loading @@ -2823,12 +2819,8 @@ public class Notification implements Parcelable this.icon = icon; this.tickerText = tickerText; this.when = when; if (Flags.sortSectionByTime()) { creationTime = when; extras.putBoolean(EXTRA_SHOW_WHEN, true); } else { this.creationTime = System.currentTimeMillis(); } } /** Loading Loading @@ -7657,10 +7649,6 @@ public class Notification implements Parcelable mN.extras.putAll(saveExtras); } if (!Flags.sortSectionByTime()) { mN.creationTime = System.currentTimeMillis(); } // lazy stuff from mContext; see comment in Builder(Context, Notification) Notification.addFieldsFromContext(mContext, mN); Loading Loading @@ -8258,11 +8246,9 @@ public class Notification implements Parcelable * @hide */ public long getWhen() { if (Flags.sortSectionByTime()) { if (when == 0) { return creationTime; } } return when; } Loading @@ -8271,22 +8257,16 @@ public class Notification implements Parcelable * @hide */ public boolean showsTime() { if (Flags.sortSectionByTime()) { return extras.getBoolean(EXTRA_SHOW_WHEN); } return when != 0 && extras.getBoolean(EXTRA_SHOW_WHEN); } /** * @return true if the notification will show a chronometer; false otherwise * @hide */ public boolean showsChronometer() { if (Flags.sortSectionByTime()) { return extras.getBoolean(EXTRA_SHOW_CHRONOMETER); } return when != 0 && extras.getBoolean(EXTRA_SHOW_CHRONOMETER); } /** * @return true if the notification has image Loading Loading
core/api/system-current.txt +15 −0 Original line number Diff line number Diff line Loading @@ -2955,6 +2955,21 @@ package android.app.supervision { method @FlaggedApi("android.permission.flags.enable_system_supervision_role_behavior") @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public boolean shouldAllowBypassingSupervisionRoleQualification(); } @FlaggedApi("android.app.supervision.flags.supervision_manager_apis") public final class SupervisionRecoveryInfo implements android.os.Parcelable { ctor public SupervisionRecoveryInfo(@NonNull String, @NonNull String, int, @Nullable android.os.PersistableBundle); method public int describeContents(); method @NonNull public android.os.PersistableBundle getAccountData(); method @NonNull public String getAccountName(); method @NonNull public String getAccountType(); method public int getState(); method public void readFromParcel(@NonNull android.os.Parcel); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.app.supervision.SupervisionRecoveryInfo> CREATOR; field public static final String EXTRA_SUPERVISION_RECOVERY_INFO = "android.app.supervision.extra.SUPERVISION_RECOVERY_INFO"; field public static final int STATE_PENDING = 0; // 0x0 field public static final int STATE_VERIFIED = 1; // 0x1 } } package android.app.time {
core/java/android/app/ActivityOptions.java +3 −4 Original line number Diff line number Diff line Loading @@ -180,8 +180,8 @@ public class ActivityOptions extends ComponentOptions { public static final String KEY_PACKAGE_NAME = "android:activity.packageName"; /** * The bounds (window size) that the activity should be launched in. Set to null explicitly for * full screen. If the key is not found, previous bounds will be preserved. * The bounds (window size) that the activity should be launched in. * If the key is not found, previous bounds will be preserved. * NOTE: This value is ignored on devices that don't have * {@link android.content.pm.PackageManager#FEATURE_FREEFORM_WINDOW_MANAGEMENT} or * {@link android.content.pm.PackageManager#FEATURE_PICTURE_IN_PICTURE} enabled. Loading Loading @@ -1480,12 +1480,11 @@ public class ActivityOptions extends ComponentOptions { /** * Sets the bounds (window size and position) that the activity should be launched in. * Rect position should be provided in pixels and in screen coordinates. * Set to {@code null} to explicitly launch fullscreen. * <p> * <strong>NOTE:</strong> This value is ignored on devices that don't have * {@link android.content.pm.PackageManager#FEATURE_FREEFORM_WINDOW_MANAGEMENT} or * {@link android.content.pm.PackageManager#FEATURE_PICTURE_IN_PICTURE} enabled. * @param screenSpacePixelRect launch bounds or {@code null} for fullscreen * @param screenSpacePixelRect launch bounds * @return {@code this} {@link ActivityOptions} instance */ public ActivityOptions setLaunchBounds(@Nullable Rect screenSpacePixelRect) { Loading
core/java/android/app/IActivityTaskManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ import android.view.IRemoteAnimationRunner; import android.view.RemoteAnimationDefinition; import android.view.RemoteAnimationAdapter; import android.window.IWindowOrganizerController; import android.window.ITaskSnapshotManager; import android.window.BackAnimationAdapter; import android.window.BackNavigationInfo; import android.window.SplashScreenView; Loading Loading @@ -247,6 +248,10 @@ interface IActivityTaskManager { /** Returns an interface enabling the management of window organizers. */ IWindowOrganizerController getWindowOrganizerController(); /** Returns an interface enabling the access of task snapshots. */ @EnforcePermission(allOf={"MANAGE_ACTIVITY_TASKS", "READ_FRAME_BUFFER"}) ITaskSnapshotManager getTaskSnapshotManager(); boolean supportsLocalVoiceInteraction(); // Requests the "Open in browser" education to be shown Loading
core/java/android/app/Instrumentation.java +15 −12 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Debug; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.MessageQueue; Loading Loading @@ -132,6 +133,7 @@ public class Instrumentation { private final Object mSync = new Object(); private ActivityThread mThread = null; private Handler mMainHandler = null; private MessageQueue mMessageQueue = null; private Context mInstrContext; private Context mAppContext; Loading Loading @@ -447,9 +449,10 @@ public class Instrumentation { * @param recipient Called the next time the thread's message queue is * idle. */ @RavenwoodKeep public void waitForIdle(Runnable recipient) { mMessageQueue.addIdleHandler(new Idler(recipient)); mThread.getHandler().post(new EmptyRunnable()); mMainHandler.post(new EmptyRunnable()); } /** Loading @@ -457,11 +460,12 @@ public class Instrumentation { * from the main application thread -- use {@link #start} to execute * instrumentation in its own thread. */ @RavenwoodKeep public void waitForIdleSync() { validateNotAppThread(); Idler idler = new Idler(null); mMessageQueue.addIdleHandler(idler); mThread.getHandler().post(new EmptyRunnable()); mMainHandler.post(new EmptyRunnable()); idler.waitForIdle(); } Loading @@ -472,18 +476,11 @@ public class Instrumentation { * * @param runner The code to run on the main thread. */ @RavenwoodReplace(blockedBy = ActivityThread.class) @RavenwoodKeep public void runOnMainSync(Runnable runner) { validateNotAppThread(); SyncRunnable sr = new SyncRunnable(runner); mThread.getHandler().post(sr); sr.waitForComplete(); } private void runOnMainSync$ravenwood(Runnable runner) { validateNotAppThread(); SyncRunnable sr = new SyncRunnable(runner); mInstrContext.getMainExecutor().execute(sr); mMainHandler.post(sr); sr.waitForComplete(); } Loading Loading @@ -2383,6 +2380,7 @@ public class Instrumentation { Context instrContext, Context appContext, ComponentName component, IInstrumentationWatcher watcher, IUiAutomationConnection uiAutomationConnection) { mThread = thread; mMainHandler = thread.getHandler(); mMessageQueue = mThread.getLooper().myQueue(); mInstrContext = instrContext; mAppContext = appContext; Loading @@ -2397,15 +2395,18 @@ public class Instrumentation { */ final void basicInit(ActivityThread thread) { mThread = thread; mMainHandler = thread.getHandler(); } /** * Only sets the Context up, keeps everything else null. * Initialize the minimam fields needed for Ravenwood. * * @hide */ @RavenwoodKeep public final void basicInit(Context instrContext, Context appContext, UiAutomation ui) { mMainHandler = instrContext.getMainThreadHandler(); mMessageQueue = mMainHandler.getLooper().getQueue(); mInstrContext = instrContext; mAppContext = appContext; mUiAutomation = ui; Loading Loading @@ -2602,6 +2603,7 @@ public class Instrumentation { } } @RavenwoodKeepWholeClass private static final class EmptyRunnable implements Runnable { public void run() { } Loading Loading @@ -2661,6 +2663,7 @@ public class Instrumentation { } } @RavenwoodKeepWholeClass private static final class Idler implements MessageQueue.IdleHandler { private final Runnable mCallback; private boolean mIdle; Loading
core/java/android/app/Notification.java +12 −32 Original line number Diff line number Diff line Loading @@ -2774,12 +2774,9 @@ public class Notification implements Parcelable public Notification() { this.when = System.currentTimeMillis(); if (Flags.sortSectionByTime()) { creationTime = when; extras.putBoolean(EXTRA_SHOW_WHEN, true); } else { this.creationTime = System.currentTimeMillis(); } this.priority = PRIORITY_DEFAULT; } Loading @@ -2790,10 +2787,9 @@ public class Notification implements Parcelable public Notification(Context context, int icon, CharSequence tickerText, long when, CharSequence contentTitle, CharSequence contentText, Intent contentIntent) { if (Flags.sortSectionByTime()) { creationTime = when; extras.putBoolean(EXTRA_SHOW_WHEN, true); } new Builder(context) .setWhen(when) .setSmallIcon(icon) Loading Loading @@ -2823,12 +2819,8 @@ public class Notification implements Parcelable this.icon = icon; this.tickerText = tickerText; this.when = when; if (Flags.sortSectionByTime()) { creationTime = when; extras.putBoolean(EXTRA_SHOW_WHEN, true); } else { this.creationTime = System.currentTimeMillis(); } } /** Loading Loading @@ -7657,10 +7649,6 @@ public class Notification implements Parcelable mN.extras.putAll(saveExtras); } if (!Flags.sortSectionByTime()) { mN.creationTime = System.currentTimeMillis(); } // lazy stuff from mContext; see comment in Builder(Context, Notification) Notification.addFieldsFromContext(mContext, mN); Loading Loading @@ -8258,11 +8246,9 @@ public class Notification implements Parcelable * @hide */ public long getWhen() { if (Flags.sortSectionByTime()) { if (when == 0) { return creationTime; } } return when; } Loading @@ -8271,22 +8257,16 @@ public class Notification implements Parcelable * @hide */ public boolean showsTime() { if (Flags.sortSectionByTime()) { return extras.getBoolean(EXTRA_SHOW_WHEN); } return when != 0 && extras.getBoolean(EXTRA_SHOW_WHEN); } /** * @return true if the notification will show a chronometer; false otherwise * @hide */ public boolean showsChronometer() { if (Flags.sortSectionByTime()) { return extras.getBoolean(EXTRA_SHOW_CHRONOMETER); } return when != 0 && extras.getBoolean(EXTRA_SHOW_CHRONOMETER); } /** * @return true if the notification has image Loading