Merge "Fix issue #5273986: The power usage of the mp3 background playback..."
This commit is contained in:
committed by
Android (Google) Code Review
commit
104f6a07c9
@@ -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;
|
||||
@@ -716,7 +717,9 @@ public abstract class WallpaperService extends Service {
|
||||
mSession = ViewRootImpl.getWindowSession(getMainLooper());
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user