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

Commit 9fe6cb5c authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #5273986: The power usage of the mp3 background playback...

...increased from ~50mA to 260mA

Change-Id: I24d7188185f4ec5ff9e1f29c15472ae56c851e5e
parent 4ee36669
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.os.Bundle;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
import android.util.Log;
@@ -717,6 +718,8 @@ public abstract class WallpaperService extends Service {
            
            mWindow.setSession(mSession);

            mScreenOn = ((PowerManager)getSystemService(Context.POWER_SERVICE)).isScreenOn();

            IntentFilter filter = new IntentFilter();
            filter.addAction(Intent.ACTION_SCREEN_ON);
            filter.addAction(Intent.ACTION_SCREEN_OFF);