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

Commit d873062c authored by Peter Li's avatar Peter Li Committed by Android (Google) Code Review
Browse files

Merge "Don't reset the preferred activity just for the home intent" into main

parents d959da39 4ba97f07
Loading
Loading
Loading
Loading
+25 −18
Original line number Original line Diff line number Diff line
@@ -3438,6 +3438,12 @@ public class ComputerEngine implements Computer {
                                }
                                }
                            }
                            }
                        } else {
                        } 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) {
                                if (allowSetMutation) {
                                    Slog.i(TAG,
                                    Slog.i(TAG,
                                            "Result set changed, dropping preferred activity "
                                            "Result set changed, dropping preferred activity "
@@ -3460,6 +3466,7 @@ public class ComputerEngine implements Computer {
                                return result;
                                return result;
                            }
                            }
                        }
                        }
                    }


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