mirror of
https://github.com/yuliskov/SmartTube.git
synced 2026-10-02 01:54:34 +08:00
screensaver suspend fix: upd prevent flicker
This commit is contained in:
@@ -204,9 +204,9 @@ public class MotherActivity extends FragmentActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
protected void onStart() {
|
||||
try {
|
||||
super.onResume();
|
||||
super.onStart();
|
||||
} catch (IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -221,8 +221,8 @@ public class MotherActivity extends FragmentActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
|
||||
// Stop managing the screensaver so a paused activity cannot keep the display awake.
|
||||
mScreensaverManager.suspend();
|
||||
|
||||
+1
-2
@@ -180,8 +180,7 @@ public class ScreensaverManager {
|
||||
mIsSuspended = true;
|
||||
// Leave mUnlockInstance queued so the shared registry lock cannot be stranded.
|
||||
Utils.removeCallbacks(mDimScreen, mUndimScreen, mTimeoutHandler);
|
||||
// When constant dimming is enabled, calling hideDimOverlay() introduces flickering every time the user leaves the activity.
|
||||
//hideDimOverlay();
|
||||
hideDimOverlay();
|
||||
releaseScreensaver();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user