Revert "PowerManager: Adds a call to reduce refresh rate while device is in BatterySaverMode"
This reverts commit d54157e2e92f58e997c4bdb50e026e6a0d0121fd. Bug: 16654179 Change-Id: Id4f22c0a4e23518881ac58ad969c16c4612306a2
This commit is contained in:
@@ -58,8 +58,6 @@ import android.os.SystemProperties;
|
||||
import android.os.SystemService;
|
||||
import android.os.UserHandle;
|
||||
import android.os.WorkSource;
|
||||
import android.os.Parcel;
|
||||
import android.os.ServiceManager;
|
||||
import android.provider.Settings;
|
||||
import android.service.dreams.DreamManagerInternal;
|
||||
import android.util.EventLog;
|
||||
@@ -709,7 +707,6 @@ public final class PowerManagerService extends com.android.server.SystemService
|
||||
if (mLowPowerModeEnabled != lowPowerModeEnabled) {
|
||||
mLowPowerModeEnabled = lowPowerModeEnabled;
|
||||
powerHintInternal(POWER_HINT_LOW_POWER_MODE, lowPowerModeEnabled ? 1 : 0);
|
||||
setSurfaceFlingerLowPowerMode(lowPowerModeEnabled ? 1 : 0);
|
||||
mLowPowerModeEnabled = lowPowerModeEnabled;
|
||||
BackgroundThread.getHandler().post(new Runnable() {
|
||||
@Override
|
||||
@@ -2198,21 +2195,6 @@ public final class PowerManagerService extends com.android.server.SystemService
|
||||
nativeSendPowerHint(hintId, data);
|
||||
}
|
||||
|
||||
private static void setSurfaceFlingerLowPowerMode(int enabled) {
|
||||
try {
|
||||
final IBinder flinger = ServiceManager.getService("SurfaceFlinger");
|
||||
if (flinger != null) {
|
||||
final Parcel data = Parcel.obtain();
|
||||
data.writeInterfaceToken("android.ui.ISurfaceComposer");
|
||||
data.writeInt(enabled);
|
||||
flinger.transact(1016, data, null, 0);
|
||||
data.recycle();
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
Slog.e(TAG, "Failed to reduce refresh rate", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Low-level function turn the device off immediately, without trying
|
||||
* to be clean. Most people should use {@link ShutdownThread} for a clean shutdown.
|
||||
|
||||
Reference in New Issue
Block a user