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

Commit a78d8d30 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

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

Change-Id: Id029aa2f10e4d278c385487739978075607f29a1
parents 04121ec1 75da7b4a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -43630,6 +43630,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
@@ -46579,6 +46579,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
@@ -43707,6 +43707,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