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

Commit 380c63a5 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6777077 from 1706f9c2 to rvc-qpr1-release

Change-Id: I99fcac5a3e35fa1034ea90660bda55f619d7b652
parents 04bae135 1706f9c2
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -186,6 +186,16 @@ class ContextImpl extends Context {
    private static final String XATTR_INODE_CACHE = "user.inode_cache";
    private static final String XATTR_INODE_CODE_CACHE = "user.inode_code_cache";

    /**
     * Special intent extra that critical system apps can use to hide the notification for a
     * foreground service. This extra should be placed in the intent passed into {@link
     * #startForegroundService(Intent)}.
     *
     * @hide
     */
    private static final String EXTRA_HIDDEN_FOREGROUND_SERVICE =
            "android.intent.extra.HIDDEN_FOREGROUND_SERVICE";

    /**
     * Map from package name, to preference name, to cached preferences.
     */
@@ -1697,9 +1707,12 @@ class ContextImpl extends Context {
        try {
            validateServiceIntent(service);
            service.prepareToLeaveProcess(this);
            final boolean hideForegroundNotification = requireForeground
                    && service.getBooleanExtra(EXTRA_HIDDEN_FOREGROUND_SERVICE, false);
            ComponentName cn = ActivityManager.getService().startService(
                    mMainThread.getApplicationThread(), service,
                    service.resolveTypeIfNeeded(getContentResolver()), requireForeground,
                    hideForegroundNotification,
                    getOpPackageName(), getAttributionTag(), user.getIdentifier());
            if (cn != null) {
                if (cn.getPackageName().equals("!")) {
+2 −1
Original line number Diff line number Diff line
@@ -155,7 +155,8 @@ interface IActivityManager {
    boolean refContentProvider(in IBinder connection, int stableDelta, int unstableDelta);
    PendingIntent getRunningServiceControlPanel(in ComponentName service);
    ComponentName startService(in IApplicationThread caller, in Intent service,
            in String resolvedType, boolean requireForeground, in String callingPackage,
            in String resolvedType, boolean requireForeground,
            boolean hideForegroundNotification, in String callingPackage,
            in String callingFeatureId, int userId);
    @UnsupportedAppUsage
    int stopService(in IApplicationThread caller, in Intent service,
+7 −4
Original line number Diff line number Diff line
@@ -629,7 +629,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
            if (DEBUG) Log.d(TAG, "onStateChanged, notifyInsetsChanged");
            mHost.notifyInsetsChanged();
        }
        if (!mState.equals(state, true /* excludingCaptionInsets */,
        if (!mState.equals(mLastDispatchedState, true /* excludingCaptionInsets */,
                true /* excludeInvisibleIme */)) {
            if (DEBUG) Log.d(TAG, "onStateChanged, send state to WM: " + mState);
            updateRequestedState();
@@ -1138,15 +1138,14 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
        if (invokeCallback) {
            control.cancel();
        }
        boolean stateChanged = false;
        for (int i = mRunningAnimations.size() - 1; i >= 0; i--) {
            RunningAnimation runningAnimation = mRunningAnimations.get(i);
            if (runningAnimation.runner == control) {
                mRunningAnimations.remove(i);
                ArraySet<Integer> types = toInternalType(control.getTypes());
                for (int j = types.size() - 1; j >= 0; j--) {
                    if (getSourceConsumer(types.valueAt(j)).notifyAnimationFinished()) {
                        mHost.notifyInsetsChanged();
                    }
                    stateChanged |= getSourceConsumer(types.valueAt(j)).notifyAnimationFinished();
                }
                if (invokeCallback && runningAnimation.startDispatched) {
                    dispatchAnimationEnd(runningAnimation.runner.getAnimation());
@@ -1154,6 +1153,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
                break;
            }
        }
        if (stateChanged) {
            mHost.notifyInsetsChanged();
            updateRequestedState();
        }
    }

    private void applyLocalVisibilityOverride() {
+2 −0
Original line number Diff line number Diff line
@@ -60,6 +60,8 @@ import java.util.StringJoiner;
 */
public class InsetsState implements Parcelable {

    public static final InsetsState EMPTY = new InsetsState();

    /**
     * Internal representation of inset source types. This is different from the public API in
     * {@link WindowInsets.Type} as one type from the public API might indicate multiple windows
+14 −0
Original line number Diff line number Diff line
@@ -746,6 +746,20 @@ public class InsetsControllerTest {
            mController.onControlsChanged(createSingletonControl(ITYPE_IME));
            assertEquals(newState.getSource(ITYPE_IME),
                    mTestHost.getModifiedState().peekSource(ITYPE_IME));

            // The modified frames cannot be updated if there is an animation.
            mController.onControlsChanged(createSingletonControl(ITYPE_NAVIGATION_BAR));
            mController.hide(navigationBars());
            newState = new InsetsState(mController.getState(), true /* copySource */);
            newState.getSource(ITYPE_NAVIGATION_BAR).getFrame().top--;
            mController.onStateChanged(newState);
            assertNotEquals(newState.getSource(ITYPE_NAVIGATION_BAR),
                    mTestHost.getModifiedState().peekSource(ITYPE_NAVIGATION_BAR));

            // The modified frames can be updated while the animation is done.
            mController.cancelExistingAnimations();
            assertEquals(newState.getSource(ITYPE_NAVIGATION_BAR),
                    mTestHost.getModifiedState().peekSource(ITYPE_NAVIGATION_BAR));
        });
    }

Loading