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

Unverified Commit fdcb0e39 authored by Steve Kondik's avatar Steve Kondik Committed by Michael Bestas
Browse files

perf: Add plumbing for PerformanceManager

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

Change-Id: Ic8df7d891dece4e678711a2a5ad1434b4971663a
parent 1a635fd0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -67,4 +67,6 @@ interface IPowerManager
    void setAttentionLight(boolean on, int color);
    // update the uids being synchronized by network socket request manager
    void updateBlockedUids(int uid, boolean isBlocked);

    oneway void cpuBoost(int duration);
}
+17 −0
Original line number Diff line number Diff line
@@ -1393,4 +1393,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
@@ -170,4 +170,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
@@ -36,6 +36,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
@@ -21,6 +21,8 @@ LOCAL_JAVA_LIBRARIES := services.net telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := tzdata_update
LOCAL_PROTOC_OPTIMIZE_TYPE := nano

LOCAL_JAVA_LIBRARIES += org.cyanogenmod.platform.internal

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