Loading core/java/android/view/ViewRootImpl.java +17 −0 Original line number Original line Diff line number Diff line Loading @@ -114,6 +114,7 @@ import static android.view.accessibility.Flags.fixMergedContentChangeEventV2; import static android.view.accessibility.Flags.forceInvertColor; import static android.view.accessibility.Flags.forceInvertColor; import static android.view.accessibility.Flags.reduceWindowContentChangedEventThrottle; import static android.view.accessibility.Flags.reduceWindowContentChangedEventThrottle; import static android.view.flags.Flags.addSchandleToVriSurface; import static android.view.flags.Flags.addSchandleToVriSurface; import static android.view.flags.Flags.disableDrawWakeLock; import static android.view.flags.Flags.sensitiveContentAppProtection; import static android.view.flags.Flags.sensitiveContentAppProtection; import static android.view.flags.Flags.sensitiveContentPrematureProtectionRemovedFix; import static android.view.flags.Flags.sensitiveContentPrematureProtectionRemovedFix; import static android.view.flags.Flags.toolkitFrameRateFunctionEnablingReadOnly; import static android.view.flags.Flags.toolkitFrameRateFunctionEnablingReadOnly; Loading Loading @@ -149,6 +150,8 @@ import android.app.ResourcesManager; import android.app.WindowConfiguration; import android.app.WindowConfiguration; import android.app.compat.CompatChanges; import android.app.compat.CompatChanges; import android.app.servertransaction.WindowStateTransactionItem; import android.app.servertransaction.WindowStateTransactionItem; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledSince; import android.compat.annotation.UnsupportedAppUsage; import android.compat.annotation.UnsupportedAppUsage; import android.content.ClipData; import android.content.ClipData; import android.content.ClipDescription; import android.content.ClipDescription; Loading Loading @@ -336,6 +339,15 @@ public final class ViewRootImpl implements ViewParent, private static final int LOGTAG_INPUT_FOCUS = 62001; private static final int LOGTAG_INPUT_FOCUS = 62001; private static final int LOGTAG_VIEWROOT_DRAW_EVENT = 60004; private static final int LOGTAG_VIEWROOT_DRAW_EVENT = 60004; /** * This change disables the {@code DRAW_WAKE_LOCK}, an internal wakelock acquired per-frame * duration display DOZE. It was added to allow animation during AOD. This wakelock consumes * battery severely if the animation is too heavy, so, it will be removed. */ @ChangeId @EnabledSince(targetSdkVersion = Build.VERSION_CODES.VANILLA_ICE_CREAM) private static final long DISABLE_DRAW_WAKE_LOCK = 349153669L; /** /** * Set to false if we do not want to use the multi threaded renderer even though * Set to false if we do not want to use the multi threaded renderer even though * threaded renderer (aka hardware renderering) is used. Note that by disabling * threaded renderer (aka hardware renderering) is used. Note that by disabling Loading Loading @@ -2459,6 +2471,11 @@ public final class ViewRootImpl implements ViewParent, } } void pokeDrawLockIfNeeded() { void pokeDrawLockIfNeeded() { // Disable DRAW_WAKE_LOCK starting U. Otherwise, only need to acquire it for DOZE state. if (CompatChanges.isChangeEnabled(DISABLE_DRAW_WAKE_LOCK) && disableDrawWakeLock()) { return; } if (!Display.isDozeState(mAttachInfo.mDisplayState)) { if (!Display.isDozeState(mAttachInfo.mDisplayState)) { // Only need to acquire wake lock for DOZE state. // Only need to acquire wake lock for DOZE state. return; return; Loading core/java/android/view/flags/view_flags.aconfig +8 −0 Original line number Original line Diff line number Diff line Loading @@ -90,3 +90,11 @@ flag { purpose: PURPOSE_BUGFIX purpose: PURPOSE_BUGFIX } } } } flag { name: "disable_draw_wake_lock" namespace: "wear_frameworks" description: "Disable Draw Wakelock starting U." bug: "331698645" is_fixed_read_only: true } No newline at end of file Loading
core/java/android/view/ViewRootImpl.java +17 −0 Original line number Original line Diff line number Diff line Loading @@ -114,6 +114,7 @@ import static android.view.accessibility.Flags.fixMergedContentChangeEventV2; import static android.view.accessibility.Flags.forceInvertColor; import static android.view.accessibility.Flags.forceInvertColor; import static android.view.accessibility.Flags.reduceWindowContentChangedEventThrottle; import static android.view.accessibility.Flags.reduceWindowContentChangedEventThrottle; import static android.view.flags.Flags.addSchandleToVriSurface; import static android.view.flags.Flags.addSchandleToVriSurface; import static android.view.flags.Flags.disableDrawWakeLock; import static android.view.flags.Flags.sensitiveContentAppProtection; import static android.view.flags.Flags.sensitiveContentAppProtection; import static android.view.flags.Flags.sensitiveContentPrematureProtectionRemovedFix; import static android.view.flags.Flags.sensitiveContentPrematureProtectionRemovedFix; import static android.view.flags.Flags.toolkitFrameRateFunctionEnablingReadOnly; import static android.view.flags.Flags.toolkitFrameRateFunctionEnablingReadOnly; Loading Loading @@ -149,6 +150,8 @@ import android.app.ResourcesManager; import android.app.WindowConfiguration; import android.app.WindowConfiguration; import android.app.compat.CompatChanges; import android.app.compat.CompatChanges; import android.app.servertransaction.WindowStateTransactionItem; import android.app.servertransaction.WindowStateTransactionItem; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledSince; import android.compat.annotation.UnsupportedAppUsage; import android.compat.annotation.UnsupportedAppUsage; import android.content.ClipData; import android.content.ClipData; import android.content.ClipDescription; import android.content.ClipDescription; Loading Loading @@ -336,6 +339,15 @@ public final class ViewRootImpl implements ViewParent, private static final int LOGTAG_INPUT_FOCUS = 62001; private static final int LOGTAG_INPUT_FOCUS = 62001; private static final int LOGTAG_VIEWROOT_DRAW_EVENT = 60004; private static final int LOGTAG_VIEWROOT_DRAW_EVENT = 60004; /** * This change disables the {@code DRAW_WAKE_LOCK}, an internal wakelock acquired per-frame * duration display DOZE. It was added to allow animation during AOD. This wakelock consumes * battery severely if the animation is too heavy, so, it will be removed. */ @ChangeId @EnabledSince(targetSdkVersion = Build.VERSION_CODES.VANILLA_ICE_CREAM) private static final long DISABLE_DRAW_WAKE_LOCK = 349153669L; /** /** * Set to false if we do not want to use the multi threaded renderer even though * Set to false if we do not want to use the multi threaded renderer even though * threaded renderer (aka hardware renderering) is used. Note that by disabling * threaded renderer (aka hardware renderering) is used. Note that by disabling Loading Loading @@ -2459,6 +2471,11 @@ public final class ViewRootImpl implements ViewParent, } } void pokeDrawLockIfNeeded() { void pokeDrawLockIfNeeded() { // Disable DRAW_WAKE_LOCK starting U. Otherwise, only need to acquire it for DOZE state. if (CompatChanges.isChangeEnabled(DISABLE_DRAW_WAKE_LOCK) && disableDrawWakeLock()) { return; } if (!Display.isDozeState(mAttachInfo.mDisplayState)) { if (!Display.isDozeState(mAttachInfo.mDisplayState)) { // Only need to acquire wake lock for DOZE state. // Only need to acquire wake lock for DOZE state. return; return; Loading
core/java/android/view/flags/view_flags.aconfig +8 −0 Original line number Original line Diff line number Diff line Loading @@ -90,3 +90,11 @@ flag { purpose: PURPOSE_BUGFIX purpose: PURPOSE_BUGFIX } } } } flag { name: "disable_draw_wake_lock" namespace: "wear_frameworks" description: "Disable Draw Wakelock starting U." bug: "331698645" is_fixed_read_only: true } No newline at end of file