Loading core/java/android/app/ActivityThread.java +8 −7 Original line number Diff line number Diff line Loading @@ -4226,21 +4226,22 @@ public final class ActivityThread extends ClientTransactionHandler decorView.addView(view); view.requestLayout(); view.getViewTreeObserver().addOnDrawListener(new ViewTreeObserver.OnDrawListener() { view.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { private boolean mHandled = false; @Override public void onDraw() { public boolean onPreDraw() { if (mHandled) { return; return true; } mHandled = true; // Transfer the splash screen view from shell to client. // Call syncTransferSplashscreenViewTransaction at the first onDraw so we can ensure // the client view is ready to show and we can use applyTransactionOnDraw to make // all transitions happen at the same frame. // Call syncTransferSplashscreenViewTransaction at the first onPreDraw, so we can // ensure the client view is ready to show, and can use applyTransactionOnDraw to // make all transitions happen at the same frame. syncTransferSplashscreenViewTransaction( view, r.token, decorView, startingWindowLeash); view.post(() -> view.getViewTreeObserver().removeOnDrawListener(this)); view.post(() -> view.getViewTreeObserver().removeOnPreDrawListener(this)); return true; } }); } Loading core/java/android/app/Notification.java +16 −1 Original line number Diff line number Diff line Loading @@ -2171,6 +2171,10 @@ public class Notification implements Parcelable } } private void visitUris(@NonNull Consumer<Uri> visitor) { visitIconUri(visitor, getIcon()); } @Override public Action clone() { return new Action( Loading Loading @@ -2856,7 +2860,7 @@ public class Notification implements Parcelable if (actions != null) { for (Action action : actions) { visitIconUri(visitor, action.getIcon()); action.visitUris(visitor); } } Loading Loading @@ -2947,6 +2951,11 @@ public class Notification implements Parcelable if (mBubbleMetadata != null) { visitIconUri(visitor, mBubbleMetadata.getIcon()); } if (extras != null && extras.containsKey(WearableExtender.EXTRA_WEARABLE_EXTENSIONS)) { WearableExtender extender = new WearableExtender(this); extender.visitUris(visitor); } } /** Loading Loading @@ -11711,6 +11720,12 @@ public class Notification implements Parcelable mFlags &= ~mask; } } private void visitUris(@NonNull Consumer<Uri> visitor) { for (Action action : mActions) { action.visitUris(visitor); } } } /** Loading core/java/android/app/NotificationManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -571,6 +571,12 @@ public class NotificationManager { */ public static final int BUBBLE_PREFERENCE_SELECTED = 2; /** * Maximum length of the component name of a registered NotificationListenerService. * @hide */ public static int MAX_SERVICE_COMPONENT_NAME_LENGTH = 500; @UnsupportedAppUsage private static INotificationManager sService; Loading core/java/android/content/pm/PackageManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,24 @@ public abstract class PackageManager { public static final String PROPERTY_COMPAT_OVERRIDE_LANDSCAPE_TO_PORTRAIT = "android.camera.PROPERTY_COMPAT_OVERRIDE_LANDSCAPE_TO_PORTRAIT"; /** * Application level {@link android.content.pm.PackageManager.Property PackageManager * .Property} for a privileged system installer to define a list of up to 500 packages that * should not have their updates owned by any installer. The list must be provided via a default * XML resource with the following format: * * <pre> * <deny-ownership>PACKAGE_NAME</deny-ownership> * <deny-ownership>PACKAGE_NAME</deny-ownership> * </pre> * * <b>NOTE:</b> Installers that provide this property will not granted update ownership for any * packages that they request update ownership of. * @hide */ public static final String PROPERTY_LEGACY_UPDATE_OWNERSHIP_DENYLIST = "android.app.PROPERTY_LEGACY_UPDATE_OWNERSHIP_DENYLIST"; /** * A property value set within the manifest. * <p> Loading core/java/android/content/res/Resources.java +25 −11 Original line number Diff line number Diff line Loading @@ -2009,13 +2009,25 @@ public class Resources { private int mHashCode = 0; private boolean containsValue(int resId, boolean force) { private int findValue(int resId, boolean force) { for (int i = 0; i < mCount; ++i) { if (mResId[i] == resId && mForce[i] == force) { return true; return i; } } return false; return -1; } private void moveToLast(int index) { if (index < 0 || index >= mCount - 1) { return; } final int id = mResId[index]; final boolean force = mForce[index]; System.arraycopy(mResId, index + 1, mResId, index, mCount - index - 1); mResId[mCount - 1] = id; System.arraycopy(mForce, index + 1, mForce, index, mCount - index - 1); mForce[mCount - 1] = force; } public void append(int resId, boolean force) { Loading @@ -2028,16 +2040,18 @@ public class Resources { } // Some apps tend to keep adding same resources over and over, let's protect from it. if (containsValue(resId, force)) { return; } // Note: the order still matters, as the values that come later override the earlier // ones. final int index = findValue(resId, force); if (index >= 0) { moveToLast(index); } else { mResId = GrowingArrayUtils.append(mResId, mCount, resId); mForce = GrowingArrayUtils.append(mForce, mCount, force); mCount++; mHashCode = 31 * (31 * mHashCode + resId) + (force ? 1 : 0); } } /** * Sets up this key as a deep copy of another key. Loading Loading
core/java/android/app/ActivityThread.java +8 −7 Original line number Diff line number Diff line Loading @@ -4226,21 +4226,22 @@ public final class ActivityThread extends ClientTransactionHandler decorView.addView(view); view.requestLayout(); view.getViewTreeObserver().addOnDrawListener(new ViewTreeObserver.OnDrawListener() { view.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { private boolean mHandled = false; @Override public void onDraw() { public boolean onPreDraw() { if (mHandled) { return; return true; } mHandled = true; // Transfer the splash screen view from shell to client. // Call syncTransferSplashscreenViewTransaction at the first onDraw so we can ensure // the client view is ready to show and we can use applyTransactionOnDraw to make // all transitions happen at the same frame. // Call syncTransferSplashscreenViewTransaction at the first onPreDraw, so we can // ensure the client view is ready to show, and can use applyTransactionOnDraw to // make all transitions happen at the same frame. syncTransferSplashscreenViewTransaction( view, r.token, decorView, startingWindowLeash); view.post(() -> view.getViewTreeObserver().removeOnDrawListener(this)); view.post(() -> view.getViewTreeObserver().removeOnPreDrawListener(this)); return true; } }); } Loading
core/java/android/app/Notification.java +16 −1 Original line number Diff line number Diff line Loading @@ -2171,6 +2171,10 @@ public class Notification implements Parcelable } } private void visitUris(@NonNull Consumer<Uri> visitor) { visitIconUri(visitor, getIcon()); } @Override public Action clone() { return new Action( Loading Loading @@ -2856,7 +2860,7 @@ public class Notification implements Parcelable if (actions != null) { for (Action action : actions) { visitIconUri(visitor, action.getIcon()); action.visitUris(visitor); } } Loading Loading @@ -2947,6 +2951,11 @@ public class Notification implements Parcelable if (mBubbleMetadata != null) { visitIconUri(visitor, mBubbleMetadata.getIcon()); } if (extras != null && extras.containsKey(WearableExtender.EXTRA_WEARABLE_EXTENSIONS)) { WearableExtender extender = new WearableExtender(this); extender.visitUris(visitor); } } /** Loading Loading @@ -11711,6 +11720,12 @@ public class Notification implements Parcelable mFlags &= ~mask; } } private void visitUris(@NonNull Consumer<Uri> visitor) { for (Action action : mActions) { action.visitUris(visitor); } } } /** Loading
core/java/android/app/NotificationManager.java +6 −0 Original line number Diff line number Diff line Loading @@ -571,6 +571,12 @@ public class NotificationManager { */ public static final int BUBBLE_PREFERENCE_SELECTED = 2; /** * Maximum length of the component name of a registered NotificationListenerService. * @hide */ public static int MAX_SERVICE_COMPONENT_NAME_LENGTH = 500; @UnsupportedAppUsage private static INotificationManager sService; Loading
core/java/android/content/pm/PackageManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,24 @@ public abstract class PackageManager { public static final String PROPERTY_COMPAT_OVERRIDE_LANDSCAPE_TO_PORTRAIT = "android.camera.PROPERTY_COMPAT_OVERRIDE_LANDSCAPE_TO_PORTRAIT"; /** * Application level {@link android.content.pm.PackageManager.Property PackageManager * .Property} for a privileged system installer to define a list of up to 500 packages that * should not have their updates owned by any installer. The list must be provided via a default * XML resource with the following format: * * <pre> * <deny-ownership>PACKAGE_NAME</deny-ownership> * <deny-ownership>PACKAGE_NAME</deny-ownership> * </pre> * * <b>NOTE:</b> Installers that provide this property will not granted update ownership for any * packages that they request update ownership of. * @hide */ public static final String PROPERTY_LEGACY_UPDATE_OWNERSHIP_DENYLIST = "android.app.PROPERTY_LEGACY_UPDATE_OWNERSHIP_DENYLIST"; /** * A property value set within the manifest. * <p> Loading
core/java/android/content/res/Resources.java +25 −11 Original line number Diff line number Diff line Loading @@ -2009,13 +2009,25 @@ public class Resources { private int mHashCode = 0; private boolean containsValue(int resId, boolean force) { private int findValue(int resId, boolean force) { for (int i = 0; i < mCount; ++i) { if (mResId[i] == resId && mForce[i] == force) { return true; return i; } } return false; return -1; } private void moveToLast(int index) { if (index < 0 || index >= mCount - 1) { return; } final int id = mResId[index]; final boolean force = mForce[index]; System.arraycopy(mResId, index + 1, mResId, index, mCount - index - 1); mResId[mCount - 1] = id; System.arraycopy(mForce, index + 1, mForce, index, mCount - index - 1); mForce[mCount - 1] = force; } public void append(int resId, boolean force) { Loading @@ -2028,16 +2040,18 @@ public class Resources { } // Some apps tend to keep adding same resources over and over, let's protect from it. if (containsValue(resId, force)) { return; } // Note: the order still matters, as the values that come later override the earlier // ones. final int index = findValue(resId, force); if (index >= 0) { moveToLast(index); } else { mResId = GrowingArrayUtils.append(mResId, mCount, resId); mForce = GrowingArrayUtils.append(mForce, mCount, force); mCount++; mHashCode = 31 * (31 * mHashCode + resId) + (force ? 1 : 0); } } /** * Sets up this key as a deep copy of another key. Loading