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

Commit e325e562 authored by Ruchi Kandoi's avatar Ruchi Kandoi Committed by android-build-merger
Browse files

Merge "window: Adds a Sustained Performance Mode window flag." into nyc-dev am: a645c975 am: 75da7b4a

am: a78d8d30

* commit 'a78d8d30':
  window: Adds a Sustained Performance Mode window flag.

Change-Id: I4f2c47cdaa9fa6391e73d725aebb0348ae28f0ac
parents 560b03f4 a78d8d30
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -43635,6 +43635,7 @@ package android.view {
    method public void setSharedElementsUseOverlay(boolean);
    method public void setSoftInputMode(int);
    method public abstract void setStatusBarColor(int);
    method public void setSustainedPerformanceMode(boolean);
    method public abstract void setTitle(java.lang.CharSequence);
    method public abstract deprecated void setTitleColor(int);
    method public void setTransitionBackgroundFadeDuration(long);
+1 −0
Original line number Diff line number Diff line
@@ -46584,6 +46584,7 @@ package android.view {
    method public void setSharedElementsUseOverlay(boolean);
    method public void setSoftInputMode(int);
    method public abstract void setStatusBarColor(int);
    method public void setSustainedPerformanceMode(boolean);
    method public abstract void setTitle(java.lang.CharSequence);
    method public abstract deprecated void setTitleColor(int);
    method public void setTransitionBackgroundFadeDuration(long);
+1 −0
Original line number Diff line number Diff line
@@ -43712,6 +43712,7 @@ package android.view {
    method public void setSharedElementsUseOverlay(boolean);
    method public void setSoftInputMode(int);
    method public abstract void setStatusBarColor(int);
    method public void setSustainedPerformanceMode(boolean);
    method public abstract void setTitle(java.lang.CharSequence);
    method public abstract deprecated void setTitleColor(int);
    method public void setTransitionBackgroundFadeDuration(long);
+6 −2
Original line number Diff line number Diff line
@@ -55,12 +55,16 @@ public abstract class PowerManagerInternal {


    /**
     * Power hint: The user is interacting with the device. The corresponding data field must be
     * Power hint:
     * Interaction: The user is interacting with the device. The corresponding data field must be
     * the expected duration of the fling, or 0 if unknown.
     *
     * This must be kept in sync with the values in hardware/libhardware/include/hardware/power.h
     * Sustained Performance Mode: Enable/Disables Sustained Performance Mode.
     *
     * These must be kept in sync with the values in hardware/libhardware/include/hardware/power.h
     */
    public static final int POWER_HINT_INTERACTION = 2;
    public static final int POWER_HINT_SUSTAINED_PERFORMANCE_MODE = 6;

    public static String wakefulnessToString(int wakefulness) {
        switch (wakefulness) {
+9 −0
Original line number Diff line number Diff line
@@ -1177,6 +1177,15 @@ public abstract class Window {
        return false;
    }

    /* Sets the Sustained Performance requirement for the calling window.
     * @param enable disables or enables the mode.
     */
    public void setSustainedPerformanceMode(boolean enable) {
        setPrivateFlags(enable
                ? WindowManager.LayoutParams.PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE : 0,
                WindowManager.LayoutParams.PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE);
    }

    private boolean isOutOfBounds(Context context, MotionEvent event) {
        final int x = (int) event.getX();
        final int y = (int) event.getY();
Loading