Skip to content

Commit

Permalink
Fix Lockscreen FC/reboot
Browse files Browse the repository at this point in the history
PS2: register receiver in onResume()

Change-Id: If475f0750bbc408e727eb0d3cf532c936ad418e8
Signed-off-by: Gergely Szell (sethyx) <szell@hu.ibm.com>
  • Loading branch information
Gergely Szell (sethyx) authored and MarcLandis committed Jun 12, 2013
1 parent aa077a0 commit 74fba2b
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -523,14 +523,22 @@ public boolean needsInput() {
@Override
public void onPause() {
KeyguardUpdateMonitor.getInstance(getContext()).removeCallback(mInfoCallback);
if (mUnlockReceiver != null) {
if (mReceiverRegistered) {
mContext.unregisterReceiver(mUnlockReceiver);
mReceiverRegistered = false;
}
}

@Override
public void onResume(int reason) {
KeyguardUpdateMonitor.getInstance(getContext()).registerCallback(mInfoCallback);
if (!mReceiverRegistered) {
if (mUnlockReceiver == null) {
mUnlockReceiver = new UnlockReceiver();
}
mContext.registerReceiver(mUnlockReceiver, filter);
mReceiverRegistered = true;
}
}

@Override
Expand Down

0 comments on commit 74fba2b

Please sign in to comment.