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

Commit b8f03072 authored by Winson Chung's avatar Winson Chung
Browse files

Catching launch errors when trying to go Home while Home is updating.

Bug: 21442898

Change-Id: I7fc74422b220cb02acb195b5c9121ff72bc16dbe
parent 9bf9a3a9
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.widget.Toast;

import com.android.systemui.Prefs;
import com.android.systemui.R;
import com.android.systemui.recents.misc.Console;
import com.android.systemui.recents.misc.DebugTrigger;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.recents.misc.SystemServicesProxy;
@@ -108,11 +109,16 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView
        public void run() {
            // Finish Recents
            if (mLaunchIntent != null) {
                try {
                    if (mLaunchOpts != null) {
                        startActivityAsUser(mLaunchIntent, mLaunchOpts.toBundle(), UserHandle.CURRENT);
                    } else {
                        startActivityAsUser(mLaunchIntent, UserHandle.CURRENT);
                    }
                } catch (Exception e) {
                    Console.logError(RecentsActivity.this,
                            getString(R.string.recents_launch_error_message, "Home"));
                }
            } else {
                finish();
                overridePendingTransition(R.anim.recents_to_launcher_enter,