mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Ignore any error when killing our process
Bug: 113929153 Change-Id: Ie9a8b59fda1f813748404ed529269cccb1e28c61
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user