mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-16 19:50:53 +01:00
Fix NPE on Wallpaper Service
This commit is contained in:
parent
e2acc418d4
commit
fe0d6a88aa
@ -115,12 +115,14 @@ public class NyanWallpaperService extends WallpaperService implements NyanConsta
|
||||
|
||||
private void updateHelperState() {
|
||||
final PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE);
|
||||
if (pm != null) {
|
||||
if (pm.isScreenOn()) {
|
||||
mHelper.start();
|
||||
} else {
|
||||
mHelper.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateSurface() {
|
||||
if (mPreferences == null) return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user