Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75da5da9 authored by Xin Li's avatar Xin Li
Browse files

Merge UP1A.230905.019

Merged-In: I67149c6faa2766be6d2537f2315dd2734bdd0447
Change-Id: I5d35bf3f01914320970b64392555617b774cfa38
parents c8c09435 4ee2ba0c
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -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;
            }
        });
    }
+16 −1
Original line number Diff line number Diff line
@@ -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(
@@ -2856,7 +2860,7 @@ public class Notification implements Parcelable
        if (actions != null) {
            for (Action action : actions) {
                visitIconUri(visitor, action.getIcon());
                action.visitUris(visitor);
            }
        }
@@ -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);
        }
    }
    /**
@@ -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);
            }
        }
    }
    /**
+6 −0
Original line number Diff line number Diff line
@@ -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;

+18 −0
Original line number Diff line number Diff line
@@ -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>
     * &lt;deny-ownership&gt;PACKAGE_NAME&lt;/deny-ownership&gt;
     * &lt;deny-ownership&gt;PACKAGE_NAME&lt;/deny-ownership&gt;
     * </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>
+25 −11
Original line number Diff line number Diff line
@@ -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) {
@@ -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