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

Commit a54f777f authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8762906 from ab56bf20 to tm-qpr1-release

Change-Id: I65408a409d45b79b7a13c7f1753b22a5176f3996
parents cd5a5cc8 ab56bf20
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.wm;
import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR;
import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;

import android.graphics.Rect;
import android.os.RemoteException;
import android.os.SystemClock;
import android.perftests.utils.ManualBenchmarkState;
@@ -86,6 +87,7 @@ public class WindowAddRemovePerfTest extends WindowManagerPerfTestBase
        final InsetsVisibilities mRequestedVisibilities = new InsetsVisibilities();
        final InsetsState mOutInsetsState = new InsetsState();
        final InsetsSourceControl[] mOutControls = new InsetsSourceControl[0];
        final Rect mOutAttachedFrame = new Rect();

        TestWindow() {
            mLayoutParams.setTitle(TestWindow.class.getName());
@@ -104,7 +106,7 @@ public class WindowAddRemovePerfTest extends WindowManagerPerfTestBase
                long startTime = SystemClock.elapsedRealtimeNanos();
                session.addToDisplay(this, mLayoutParams, View.VISIBLE,
                        Display.DEFAULT_DISPLAY, mRequestedVisibilities, inputChannel,
                        mOutInsetsState, mOutControls);
                        mOutInsetsState, mOutControls, mOutAttachedFrame);
                final long elapsedTimeNsOfAdd = SystemClock.elapsedRealtimeNanos() - startTime;
                state.addExtraResult("add", elapsedTimeNsOfAdd);

+9 −0
Original line number Diff line number Diff line
@@ -385,6 +385,12 @@ public class PowerExemptionManager {
     */
    public static final int REASON_ACTIVE_DEVICE_ADMIN = 324;

    /**
     * Media notification re-generate during transferring.
     * @hide
     */
    public static final int REASON_MEDIA_NOTIFICATION_TRANSFER = 325;

    /** @hide The app requests out-out. */
    public static final int REASON_OPT_OUT_REQUESTED = 1000;

@@ -465,6 +471,7 @@ public class PowerExemptionManager {
            REASON_DPO_PROTECTED_APP,
            REASON_DISALLOW_APPS_CONTROL,
            REASON_ACTIVE_DEVICE_ADMIN,
            REASON_MEDIA_NOTIFICATION_TRANSFER,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface ReasonCode {}
@@ -830,6 +837,8 @@ public class PowerExemptionManager {
                return "ACTIVE_DEVICE_ADMIN";
            case REASON_OPT_OUT_REQUESTED:
                return "REASON_OPT_OUT_REQUESTED";
            case REASON_MEDIA_NOTIFICATION_TRANSFER:
                return "REASON_MEDIA_NOTIFICATION_TRANSFER";
            default:
                return "(unknown:" + reasonCode + ")";
        }
+2 −2
Original line number Diff line number Diff line
@@ -60,8 +60,8 @@ platform_bootclasspath {
            module: "art-bootclasspath-fragment",
        },
        {
            apex: "com.android.bluetooth",
            module: "com.android.bluetooth-bootclasspath-fragment",
            apex: "com.android.btservices",
            module: "com.android.btservices-bootclasspath-fragment",
        },
        {
            apex: "com.android.conscrypt",
+1 −32
Original line number Diff line number Diff line
@@ -273,11 +273,6 @@ public final class ActivityThread extends ClientTransactionHandler
    private static final boolean DEBUG_PROVIDER = false;
    public static final boolean DEBUG_ORDER = false;
    private static final long MIN_TIME_BETWEEN_GCS = 5*1000;
    /**
     * If the activity doesn't become idle in time, the timeout will ensure to apply the pending top
     * process state.
     */
    private static final long PENDING_TOP_PROCESS_STATE_TIMEOUT = 1000;
    /**
     * The delay to release the provider when it has no more references. It reduces the number of
     * transactions for acquiring and releasing provider if the client accesses the provider
@@ -367,8 +362,6 @@ public final class ActivityThread extends ClientTransactionHandler
    private final AtomicInteger mNumLaunchingActivities = new AtomicInteger();
    @GuardedBy("mAppThread")
    private int mLastProcessState = PROCESS_STATE_UNKNOWN;
    @GuardedBy("mAppThread")
    private int mPendingProcessState = PROCESS_STATE_UNKNOWN;
    ArrayList<WeakReference<AssistStructure>> mLastAssistStructures = new ArrayList<>();
    private int mLastSessionId;
    final ArrayMap<IBinder, CreateServiceData> mServicesData = new ArrayMap<>();
@@ -2384,7 +2377,6 @@ public final class ActivityThread extends ClientTransactionHandler
            if (stopProfiling) {
                mProfiler.stopProfiling();
            }
            applyPendingProcessState();
            return false;
        }
    }
@@ -3438,16 +3430,7 @@ public final class ActivityThread extends ClientTransactionHandler
                return;
            }
            mLastProcessState = processState;
            // Defer the top state for VM to avoid aggressive JIT compilation affecting activity
            // launch time.
            if (processState == ActivityManager.PROCESS_STATE_TOP
                    && mNumLaunchingActivities.get() > 0) {
                mPendingProcessState = processState;
                mH.postDelayed(this::applyPendingProcessState, PENDING_TOP_PROCESS_STATE_TIMEOUT);
            } else {
                mPendingProcessState = PROCESS_STATE_UNKNOWN;
            updateVmProcessState(processState);
            }
            if (localLOGV) {
                Slog.i(TAG, "******************* PROCESS STATE CHANGED TO: " + processState
                        + (fromIpc ? " (from ipc" : ""));
@@ -3465,20 +3448,6 @@ public final class ActivityThread extends ClientTransactionHandler
        VMRuntime.getRuntime().updateProcessState(state);
    }

    private void applyPendingProcessState() {
        synchronized (mAppThread) {
            if (mPendingProcessState == PROCESS_STATE_UNKNOWN) {
                return;
            }
            final int pendingState = mPendingProcessState;
            mPendingProcessState = PROCESS_STATE_UNKNOWN;
            // Only apply the pending state if the last state doesn't change.
            if (pendingState == mLastProcessState) {
                updateVmProcessState(pendingState);
            }
        }
    }

    @Override
    public void countLaunchingActivities(int num) {
        mNumLaunchingActivities.getAndAdd(num);
+4 −1
Original line number Diff line number Diff line
@@ -420,7 +420,10 @@ public class CompatibilityInfo implements Parcelable {
         * Translate a Rect in screen coordinates into the app window's coordinates.
         */
        @UnsupportedAppUsage
        public void translateRectInScreenToAppWindow(Rect rect) {
        public void translateRectInScreenToAppWindow(@Nullable Rect rect) {
            if (rect == null) {
                return;
            }
            rect.scale(applicationInvertedScale);
        }

Loading