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

Commit d9a2db75 authored by Todd Lee's avatar Todd Lee
Browse files

Wear App Launch Optimization

This change allows low end (e.g. dual-core) devices to opt-out of
"high performance transition sessions" (i.e. don't try to boost
frame rate etc)

Bug: b/326091597
Test: hermetic app launch

Change-Id: I5c206e0457704c472295b160f02c224760a11146
parent 5024b7a0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6985,4 +6985,8 @@

    <!-- The key containing the branching boolean for legacy Search. -->
    <string name="config_defaultContextualSearchLegacyEnabled" translatable="false" />

    <!-- Whether WM DisplayContent supports high performance transitions
         (lower-end devices may want to disable) -->
    <bool name="config_deviceSupportsHighPerfTransitions">true</bool>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -5376,4 +5376,7 @@
  <java-symbol type="string" name="config_defaultContextualSearchLegacyEnabled" />

  <java-symbol type="string" name="unarchival_session_app_label" />

  <!-- Whether WM DisplayContent supports high performance transitions -->
  <java-symbol type="bool" name="config_deviceSupportsHighPerfTransitions" />
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -3515,6 +3515,9 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    }

    void enableHighPerfTransition(boolean enable) {
        if (!mWmService.mSupportsHighPerfTransitions) {
            return;
        }
        if (!explicitRefreshRateHints()) {
            if (enable) {
                getPendingTransaction().setEarlyWakeupStart();
+4 −1
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ public class WindowManagerService extends IWindowManager.Stub
    final boolean mHasPermanentDpad;
    final long mDrawLockTimeoutMillis;
    final boolean mAllowAnimationsInLowPowerMode;

    final boolean mSupportsHighPerfTransitions;
    final boolean mAllowBootMessages;

    // Indicates whether the Assistant should show on top of the Dream (respectively, above
@@ -1181,6 +1181,8 @@ public class WindowManagerService extends IWindowManager.Stub
                com.android.internal.R.bool.config_allowAnimationsInLowPowerMode);
        mMaxUiWidth = context.getResources().getInteger(
                com.android.internal.R.integer.config_maxUiWidth);
        mSupportsHighPerfTransitions = context.getResources().getBoolean(
                com.android.internal.R.bool.config_deviceSupportsHighPerfTransitions);
        mDisableTransitionAnimation = context.getResources().getBoolean(
                com.android.internal.R.bool.config_disableTransitionAnimation);
        mPerDisplayFocusEnabled = context.getResources().getBoolean(
@@ -1192,6 +1194,7 @@ public class WindowManagerService extends IWindowManager.Stub
        final boolean isScreenSizeDecoupledFromStatusBarAndCutout = context.getResources()
                .getBoolean(R.bool.config_decoupleStatusBarAndDisplayCutoutFromScreenSize)
                && mFlags.mAllowsScreenSizeDecoupledFromStatusBarAndCutout;

        if (mFlags.mInsetsDecoupledConfiguration) {
            mDecorTypes = 0;
            mConfigTypes = 0;