Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 297ee90d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ignore any error when killing our process" into ub-launcher3-master

parents 04dce798 e3fec0f1
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -111,8 +111,12 @@ public class ConfigMonitor extends BroadcastReceiver implements DisplayListener

    private void killProcess() {
        Log.d(TAG, "restarting launcher");
        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());
    }