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

Commit 4ba97f07 authored by lpeter's avatar lpeter
Browse files

Don't reset the preferred activity just for the home intent

Don't reset the preferred activity just for the home intent,
we should respect the default home app even though there any
new home activity is enabled.

Bug: 283847427
Test: Manual test with com.myhomescreen.email app
Change-Id: I415fc2a7a3006befdd86e10add96e9895724275d
parent 21c42492
Loading
Loading
Loading
Loading
+25 −18
Original line number Diff line number Diff line
@@ -3438,6 +3438,12 @@ public class ComputerEngine implements Computer {
                                }
                            }
                        } else {
                            final boolean isHomeActivity = ACTION_MAIN.equals(intent.getAction())
                                    && intent.hasCategory(CATEGORY_HOME);
                            if (!Flags.improveHomeAppBehavior() || !isHomeActivity) {
                                // Don't reset the preferred activity just for the home intent, we
                                // should respect the default home app even though there any new
                                // home activity is enabled.
                                if (allowSetMutation) {
                                    Slog.i(TAG,
                                            "Result set changed, dropping preferred activity "
@@ -3460,6 +3466,7 @@ public class ComputerEngine implements Computer {
                                return result;
                            }
                        }
                    }

                    // Yay! Either the set matched or we're looking for the last chosen
                    if (DEBUG_PREFERRED || debug) {