Loading AconfigFlags.bp +5 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,11 @@ java_aconfig_library { defaults: ["framework-minus-apex-aconfig-java-defaults"], } cc_aconfig_library { name: "com.android.window.flags.window-aconfig_flags_c_lib", aconfig_declarations: "com.android.window.flags.window-aconfig", } // DeviceStateManager aconfig_declarations { name: "android.hardware.devicestate.feature.flags-aconfig", Loading apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java +19 −5 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package android.wm; import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; import static com.android.window.flags.Flags.windowSessionRelayoutInfo; import android.app.Activity; import android.content.Context; import android.os.Bundle; Loading @@ -35,6 +37,7 @@ import android.view.SurfaceControl; import android.view.View; import android.view.WindowManager; import android.view.WindowManagerGlobal; import android.view.WindowRelayoutResult; import android.widget.LinearLayout; import android.window.ClientWindowFrames; Loading Loading @@ -128,7 +131,8 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase final MergedConfiguration mOutMergedConfiguration = new MergedConfiguration(); final InsetsState mOutInsetsState = new InsetsState(); final InsetsSourceControl.Array mOutControls = new InsetsSourceControl.Array(); final Bundle mOutBundle = new Bundle(); final Bundle mOutBundle = windowSessionRelayoutInfo() ? null : new Bundle(); final WindowRelayoutResult mOutRelayoutResult; final IWindow mWindow; final View mView; final WindowManager.LayoutParams mParams; Loading @@ -148,16 +152,26 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase mHeight = mView.getMeasuredHeight(); mOutSurfaceControl = mView.getViewRootImpl().getSurfaceControl(); mViewVisibility = visibilitySupplier; mOutRelayoutResult = windowSessionRelayoutInfo() ? new WindowRelayoutResult(mOutFrames, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState, mOutControls) : null; } void runBenchmark(BenchmarkState state) throws RemoteException { final IWindowSession session = WindowManagerGlobal.getWindowSession(); while (state.keepRunning()) { mRelayoutSeq++; if (windowSessionRelayoutInfo()) { session.relayout(mWindow, mParams, mWidth, mHeight, mViewVisibility.getAsInt(), mFlags, mRelayoutSeq, 0 /* lastSyncSeqId */, mOutFrames, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState, mOutControls, mOutBundle); mOutRelayoutResult); } else { session.relayoutLegacy(mWindow, mParams, mWidth, mHeight, mViewVisibility.getAsInt(), mFlags, mRelayoutSeq, 0 /* lastSyncSeqId */, mOutFrames, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState, mOutControls, mOutBundle); } } } } Loading apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java +4 −1 Original line number Diff line number Diff line Loading @@ -107,22 +107,25 @@ public final class ConnectivityController extends RestrictingController implemen private static final long MIN_ADJUST_CALLBACK_INTERVAL_MS = 1_000L; private static final int UNBYPASSABLE_BG_BLOCKED_REASONS = ~ConnectivityManager.BLOCKED_REASON_NONE; ~ConnectivityManager.BLOCKED_REASON_APP_BACKGROUND; private static final int UNBYPASSABLE_EJ_BLOCKED_REASONS = ~(ConnectivityManager.BLOCKED_REASON_APP_STANDBY | ConnectivityManager.BLOCKED_REASON_BATTERY_SAVER | ConnectivityManager.BLOCKED_REASON_APP_BACKGROUND | ConnectivityManager.BLOCKED_REASON_DOZE); private static final int UNBYPASSABLE_UI_BLOCKED_REASONS = ~(ConnectivityManager.BLOCKED_REASON_APP_STANDBY | ConnectivityManager.BLOCKED_REASON_BATTERY_SAVER | ConnectivityManager.BLOCKED_REASON_DOZE | ConnectivityManager.BLOCKED_METERED_REASON_DATA_SAVER | ConnectivityManager.BLOCKED_REASON_APP_BACKGROUND | ConnectivityManager.BLOCKED_METERED_REASON_USER_RESTRICTED); private static final int UNBYPASSABLE_FOREGROUND_BLOCKED_REASONS = ~(ConnectivityManager.BLOCKED_REASON_APP_STANDBY | ConnectivityManager.BLOCKED_REASON_BATTERY_SAVER | ConnectivityManager.BLOCKED_REASON_DOZE | ConnectivityManager.BLOCKED_METERED_REASON_DATA_SAVER | ConnectivityManager.BLOCKED_REASON_APP_BACKGROUND | ConnectivityManager.BLOCKED_METERED_REASON_USER_RESTRICTED); @VisibleForTesting Loading core/java/android/app/ActivityThread.java +9 −0 Original line number Diff line number Diff line Loading @@ -353,6 +353,9 @@ public final class ActivityThread extends ClientTransactionHandler private static final String DEFAULT_FULL_BACKUP_AGENT = "android.app.backup.FullBackupAgent"; private static final long BINDER_CALLBACK_THROTTLE = 10_100L; private long mBinderCallbackLast = -1; /** * Denotes the sequence number of the process state change for which the main thread needs * to block until the network rules are updated for it. Loading Loading @@ -7525,6 +7528,12 @@ public final class ActivityThread extends ClientTransactionHandler Binder.setTransactionCallback(new IBinderCallback() { @Override public void onTransactionError(int pid, int code, int flags, int err) { final long now = SystemClock.uptimeMillis(); if (now < mBinderCallbackLast + BINDER_CALLBACK_THROTTLE) { Slog.d(TAG, "Too many transaction errors, throttling freezer binder callback."); return; } mBinderCallbackLast = now; try { mgr.frozenBinderTransactionDetected(pid, code, flags, err); } catch (RemoteException ex) { Loading core/java/android/app/AppOpInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ class AppOpInfo { /** * This specifies whether each option is only allowed to be read * by apps with manage appops permission. * by apps with privileged appops permission. */ public final boolean restrictRead; Loading Loading
AconfigFlags.bp +5 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,11 @@ java_aconfig_library { defaults: ["framework-minus-apex-aconfig-java-defaults"], } cc_aconfig_library { name: "com.android.window.flags.window-aconfig_flags_c_lib", aconfig_declarations: "com.android.window.flags.window-aconfig", } // DeviceStateManager aconfig_declarations { name: "android.hardware.devicestate.feature.flags-aconfig", Loading
apct-tests/perftests/windowmanager/src/android/wm/RelayoutPerfTest.java +19 −5 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ package android.wm; import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; import static com.android.window.flags.Flags.windowSessionRelayoutInfo; import android.app.Activity; import android.content.Context; import android.os.Bundle; Loading @@ -35,6 +37,7 @@ import android.view.SurfaceControl; import android.view.View; import android.view.WindowManager; import android.view.WindowManagerGlobal; import android.view.WindowRelayoutResult; import android.widget.LinearLayout; import android.window.ClientWindowFrames; Loading Loading @@ -128,7 +131,8 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase final MergedConfiguration mOutMergedConfiguration = new MergedConfiguration(); final InsetsState mOutInsetsState = new InsetsState(); final InsetsSourceControl.Array mOutControls = new InsetsSourceControl.Array(); final Bundle mOutBundle = new Bundle(); final Bundle mOutBundle = windowSessionRelayoutInfo() ? null : new Bundle(); final WindowRelayoutResult mOutRelayoutResult; final IWindow mWindow; final View mView; final WindowManager.LayoutParams mParams; Loading @@ -148,16 +152,26 @@ public class RelayoutPerfTest extends WindowManagerPerfTestBase mHeight = mView.getMeasuredHeight(); mOutSurfaceControl = mView.getViewRootImpl().getSurfaceControl(); mViewVisibility = visibilitySupplier; mOutRelayoutResult = windowSessionRelayoutInfo() ? new WindowRelayoutResult(mOutFrames, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState, mOutControls) : null; } void runBenchmark(BenchmarkState state) throws RemoteException { final IWindowSession session = WindowManagerGlobal.getWindowSession(); while (state.keepRunning()) { mRelayoutSeq++; if (windowSessionRelayoutInfo()) { session.relayout(mWindow, mParams, mWidth, mHeight, mViewVisibility.getAsInt(), mFlags, mRelayoutSeq, 0 /* lastSyncSeqId */, mOutFrames, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState, mOutControls, mOutBundle); mOutRelayoutResult); } else { session.relayoutLegacy(mWindow, mParams, mWidth, mHeight, mViewVisibility.getAsInt(), mFlags, mRelayoutSeq, 0 /* lastSyncSeqId */, mOutFrames, mOutMergedConfiguration, mOutSurfaceControl, mOutInsetsState, mOutControls, mOutBundle); } } } } Loading
apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java +4 −1 Original line number Diff line number Diff line Loading @@ -107,22 +107,25 @@ public final class ConnectivityController extends RestrictingController implemen private static final long MIN_ADJUST_CALLBACK_INTERVAL_MS = 1_000L; private static final int UNBYPASSABLE_BG_BLOCKED_REASONS = ~ConnectivityManager.BLOCKED_REASON_NONE; ~ConnectivityManager.BLOCKED_REASON_APP_BACKGROUND; private static final int UNBYPASSABLE_EJ_BLOCKED_REASONS = ~(ConnectivityManager.BLOCKED_REASON_APP_STANDBY | ConnectivityManager.BLOCKED_REASON_BATTERY_SAVER | ConnectivityManager.BLOCKED_REASON_APP_BACKGROUND | ConnectivityManager.BLOCKED_REASON_DOZE); private static final int UNBYPASSABLE_UI_BLOCKED_REASONS = ~(ConnectivityManager.BLOCKED_REASON_APP_STANDBY | ConnectivityManager.BLOCKED_REASON_BATTERY_SAVER | ConnectivityManager.BLOCKED_REASON_DOZE | ConnectivityManager.BLOCKED_METERED_REASON_DATA_SAVER | ConnectivityManager.BLOCKED_REASON_APP_BACKGROUND | ConnectivityManager.BLOCKED_METERED_REASON_USER_RESTRICTED); private static final int UNBYPASSABLE_FOREGROUND_BLOCKED_REASONS = ~(ConnectivityManager.BLOCKED_REASON_APP_STANDBY | ConnectivityManager.BLOCKED_REASON_BATTERY_SAVER | ConnectivityManager.BLOCKED_REASON_DOZE | ConnectivityManager.BLOCKED_METERED_REASON_DATA_SAVER | ConnectivityManager.BLOCKED_REASON_APP_BACKGROUND | ConnectivityManager.BLOCKED_METERED_REASON_USER_RESTRICTED); @VisibleForTesting Loading
core/java/android/app/ActivityThread.java +9 −0 Original line number Diff line number Diff line Loading @@ -353,6 +353,9 @@ public final class ActivityThread extends ClientTransactionHandler private static final String DEFAULT_FULL_BACKUP_AGENT = "android.app.backup.FullBackupAgent"; private static final long BINDER_CALLBACK_THROTTLE = 10_100L; private long mBinderCallbackLast = -1; /** * Denotes the sequence number of the process state change for which the main thread needs * to block until the network rules are updated for it. Loading Loading @@ -7525,6 +7528,12 @@ public final class ActivityThread extends ClientTransactionHandler Binder.setTransactionCallback(new IBinderCallback() { @Override public void onTransactionError(int pid, int code, int flags, int err) { final long now = SystemClock.uptimeMillis(); if (now < mBinderCallbackLast + BINDER_CALLBACK_THROTTLE) { Slog.d(TAG, "Too many transaction errors, throttling freezer binder callback."); return; } mBinderCallbackLast = now; try { mgr.frozenBinderTransactionDetected(pid, code, flags, err); } catch (RemoteException ex) { Loading
core/java/android/app/AppOpInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ class AppOpInfo { /** * This specifies whether each option is only allowed to be read * by apps with manage appops permission. * by apps with privileged appops permission. */ public final boolean restrictRead; Loading