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

Commit 42861680 authored by Steve Kondik's avatar Steve Kondik
Browse files

perf: Add plumbing for PerformanceManager

 * Expose a couple of helpers on PowerManagerInternal to handle
   features and hints.

Change-Id: Ic8df7d891dece4e678711a2a5ad1434b4971663a
parent d7ccb5ea
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -65,4 +65,6 @@ interface IPowerManager

    // sets the attention light (used by phone app only)
    void setAttentionLight(boolean on, int color);

    oneway void cpuBoost(int duration);
}
+17 −0
Original line number Diff line number Diff line
@@ -1359,4 +1359,21 @@ public final class PowerManager {
            }
        }
    }

    /**
     * Boost the CPU. Boosts the cpu for the given duration in microseconds.
     *
     * @param duration in microseconds to boost the CPU
     *
     * @hide
     */
    public void cpuBoost(int duration)
    {
        try {
            if (mService != null) {
                mService.cpuBoost(duration);
            }
        } catch (RemoteException e) {
        }
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -165,4 +165,10 @@ public abstract class PowerManagerInternal {
    public abstract void uidGone(int uid);

    public abstract void powerHint(int hintId, int data);

    public abstract boolean setPowerSaveMode(boolean mode);

    public abstract void setFeature(int featureId, int data);

    public abstract int getFeature(int featureId);
}
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ services := \
# The convention is to name each service module 'services.$(module_name)'
LOCAL_STATIC_JAVA_LIBRARIES := $(addprefix services.,$(services))

LOCAL_JAVA_LIBRARIES += org.cyanogenmod.platform.internal

include $(BUILD_JAVA_LIBRARY)

# native library
+2 −0
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ LOCAL_AIDL_INCLUDES += \
LOCAL_JAVA_LIBRARIES := services.net telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := tzdata_update

LOCAL_JAVA_LIBRARIES += org.cyanogenmod.platform.internal

ifneq ($(INCREMENTAL_BUILDS),)
    LOCAL_PROGUARD_ENABLED := disabled
    LOCAL_JACK_ENABLED := incremental
Loading