Ignore any error when killing our process
Bug: 113929153 Change-Id: Ie9a8b59fda1f813748404ed529269cccb1e28c61
This commit is contained in:
parent
cf300fc980
commit
e3fec0f177
|
@ -111,8 +111,12 @@ public class ConfigMonitor extends BroadcastReceiver implements DisplayListener
|
|||
|
||||
private void killProcess() {
|
||||
Log.d(TAG, "restarting launcher");
|
||||
mContext.unregisterReceiver(this);
|
||||
mContext.getSystemService(DisplayManager.class).unregisterDisplayListener(this);
|
||||
try {
|
||||
mContext.unregisterReceiver(this);
|
||||
mContext.getSystemService(DisplayManager.class).unregisterDisplayListener(this);
|
||||
} catch (Exception e) {
|
||||
// We are going to die anyway, ignore any error die to race condition in registering.
|
||||
}
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue