diff options
| -rw-r--r-- | core/api/current.txt | 8 | ||||
| -rw-r--r-- | core/java/android/app/Notification.java | 50 | ||||
| -rw-r--r-- | core/java/android/content/pm/multiuser.aconfig | 7 | ||||
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityStarter.java | 5 |
4 files changed, 37 insertions, 33 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 5c624a996e6b..df077729e86b 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -6882,19 +6882,19 @@ package android.app { public static final class Notification.ProgressStyle.Segment { ctor public Notification.ProgressStyle.Segment(int); method @ColorInt public int getColor(); + method public int getId(); method public int getLength(); - method public int getStableId(); method @NonNull public android.app.Notification.ProgressStyle.Segment setColor(@ColorInt int); - method @NonNull public android.app.Notification.ProgressStyle.Segment setStableId(int); + method @NonNull public android.app.Notification.ProgressStyle.Segment setId(int); } public static final class Notification.ProgressStyle.Step { ctor public Notification.ProgressStyle.Step(int); method @ColorInt public int getColor(); + method public int getId(); method public int getPosition(); - method public int getStableId(); method @NonNull public android.app.Notification.ProgressStyle.Step setColor(@ColorInt int); - method @NonNull public android.app.Notification.ProgressStyle.Step setStableId(int); + method @NonNull public android.app.Notification.ProgressStyle.Step setId(int); } public abstract static class Notification.Style { diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index e8b0a36ffcfc..34d0f3b734f4 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -11199,7 +11199,7 @@ public class Notification implements Parcelable */ @FlaggedApi(Flags.FLAG_API_RICH_ONGOING) public static class ProgressStyle extends Notification.Style { - private static final String KEY_ELEMENT_STABLE_ID = "stableId"; + private static final String KEY_ELEMENT_ID = "id"; private static final String KEY_ELEMENT_COLOR = "colorInt"; private static final String KEY_SEGMENT_LENGTH = "length"; private static final String KEY_STEP_POSITION = "position"; @@ -11626,7 +11626,7 @@ public class Notification implements Parcelable final Bundle bundle = new Bundle(); bundle.putInt(KEY_SEGMENT_LENGTH, segment.getLength()); - bundle.putInt(KEY_ELEMENT_STABLE_ID, segment.getStableId()); + bundle.putInt(KEY_ELEMENT_ID, segment.getId()); bundle.putInt(KEY_ELEMENT_COLOR, segment.getColor()); segments.add(bundle); @@ -11647,11 +11647,11 @@ public class Notification implements Parcelable continue; } - final int stableId = segmentBundle.getInt(KEY_ELEMENT_STABLE_ID); + final int id = segmentBundle.getInt(KEY_ELEMENT_ID); final int color = segmentBundle.getInt(KEY_ELEMENT_COLOR, Notification.COLOR_DEFAULT); final Segment segment = new Segment(length) - .setStableId(stableId).setColor(color); + .setId(id).setColor(color); segments.add(segment); } @@ -11672,7 +11672,7 @@ public class Notification implements Parcelable final Bundle bundle = new Bundle(); bundle.putInt(KEY_STEP_POSITION, step.getPosition()); - bundle.putInt(KEY_ELEMENT_STABLE_ID, step.getStableId()); + bundle.putInt(KEY_ELEMENT_ID, step.getId()); bundle.putInt(KEY_ELEMENT_COLOR, step.getColor()); steps.add(bundle); @@ -11693,10 +11693,10 @@ public class Notification implements Parcelable if (position < 0) { continue; } - final int stableId = segmentBundle.getInt(KEY_ELEMENT_STABLE_ID); + final int id = segmentBundle.getInt(KEY_ELEMENT_ID); final int color = segmentBundle.getInt(KEY_ELEMENT_COLOR, Notification.COLOR_DEFAULT); - final Step step = new Step(position).setStableId(stableId).setColor(color); + final Step step = new Step(position).setId(id).setColor(color); steps.add(step); } } @@ -11712,7 +11712,7 @@ public class Notification implements Parcelable */ public static final class Segment { private int mLength; - private int mStableId = 0; + private int mId = 0; @ColorInt private int mColor = Notification.COLOR_DEFAULT; @@ -11735,19 +11735,19 @@ public class Notification implements Parcelable } /** - * Gets the stable id of this Segment. + * Gets the id of this Segment. * - * @see #setStableId + * @see #setId */ - public int getStableId() { - return mStableId; + public int getId() { + return mId; } /** * Optional ID used to uniquely identify the element across updates. */ - public @NonNull Segment setStableId(int stableId) { - mStableId = stableId; + public @NonNull Segment setId(int id) { + mId = id; return this; } @@ -11777,13 +11777,13 @@ public class Notification implements Parcelable if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Segment segment = (Segment) o; - return mLength == segment.mLength && mStableId == segment.mStableId + return mLength == segment.mLength && mId == segment.mId && mColor == segment.mColor; } @Override public int hashCode() { - return Objects.hash(mLength, mStableId, mColor); + return Objects.hash(mLength, mId, mColor); } } @@ -11797,7 +11797,7 @@ public class Notification implements Parcelable public static final class Step { private int mPosition; - private int mStableId; + private int mId; @ColorInt private int mColor = Notification.COLOR_DEFAULT; @@ -11823,17 +11823,17 @@ public class Notification implements Parcelable /** - * Optional ID used to uniqurely identify the element across updates. + * Optional ID used to uniquely identify the element across updates. */ - public int getStableId() { - return mStableId; + public int getId() { + return mId; } /** - * Optional ID used to uniqurely identify the element across updates. + * Optional ID used to uniquely identify the element across updates. */ - public @NonNull Step setStableId(int stableId) { - mStableId = stableId; + public @NonNull Step setId(int id) { + mId = id; return this; } @@ -11863,13 +11863,13 @@ public class Notification implements Parcelable if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Step step = (Step) o; - return mPosition == step.mPosition && mStableId == step.mStableId + return mPosition == step.mPosition && mId == step.mId && mColor == step.mColor; } @Override public int hashCode() { - return Objects.hash(mPosition, mStableId, mColor); + return Objects.hash(mPosition, mId, mColor); } } } diff --git a/core/java/android/content/pm/multiuser.aconfig b/core/java/android/content/pm/multiuser.aconfig index fd1a89692da2..d5edc928a994 100644 --- a/core/java/android/content/pm/multiuser.aconfig +++ b/core/java/android/content/pm/multiuser.aconfig @@ -68,6 +68,13 @@ flag { } flag { + name: "multiuser_widget" + namespace: "multiuser" + description: "Implement the Multiuser Widget" + bug: "365748524" +} + +flag { name: "enable_biometrics_to_unlock_private_space" is_exported: true namespace: "profile_experiences" diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java index 49380d4b8797..87fa62ac0e3b 100644 --- a/services/core/java/com/android/server/wm/ActivityStarter.java +++ b/services/core/java/com/android/server/wm/ActivityStarter.java @@ -2759,10 +2759,7 @@ class ActivityStarter { mInTask = null; // Launch ResolverActivity in the source task, so that it stays in the task bounds // when in freeform workspace. - // Also put noDisplay activities in the source task. These by itself can be placed - // in any task/root-task, however it could launch other activities like - // ResolverActivity, and we want those to stay in the original task. - if ((mStartActivity.isResolverOrDelegateActivity() || mStartActivity.noDisplay) + if (mStartActivity.isResolverOrDelegateActivity() && mSourceRecord != null && mSourceRecord.inFreeformWindowingMode()) { mAddingToTask = true; } |