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

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

Merge "Add secondary launcher mechanism (1/3)"

parents 89ce20df 2ef71f75
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10267,6 +10267,7 @@ package android.content {
    field public static final java.lang.String CATEGORY_OPENABLE = "android.intent.category.OPENABLE";
    field public static final java.lang.String CATEGORY_PREFERENCE = "android.intent.category.PREFERENCE";
    field public static final java.lang.String CATEGORY_SAMPLE_CODE = "android.intent.category.SAMPLE_CODE";
    field public static final java.lang.String CATEGORY_SECONDARY_HOME = "android.intent.category.SECONDARY_HOME";
    field public static final java.lang.String CATEGORY_SELECTED_ALTERNATIVE = "android.intent.category.SELECTED_ALTERNATIVE";
    field public static final java.lang.String CATEGORY_TAB = "android.intent.category.TAB";
    field public static final java.lang.String CATEGORY_TEST = "android.intent.category.TEST";
+5 −0
Original line number Diff line number Diff line
@@ -4221,6 +4221,11 @@ public class Intent implements Parcelable, Cloneable {
     */
    @SdkConstant(SdkConstantType.INTENT_CATEGORY)
    public static final String CATEGORY_HOME_MAIN = "android.intent.category.HOME_MAIN";
    /**
     * The home activity shown on secondary displays that support showing home activities.
     */
    @SdkConstant(SdkConstantType.INTENT_CATEGORY)
    public static final String CATEGORY_SECONDARY_HOME = "android.intent.category.SECONDARY_HOME";
    /**
     * This is the setup wizard activity, that is the first activity that is displayed
     * when the user sets up the device for the first time.
+7 −0
Original line number Diff line number Diff line
@@ -3647,4 +3647,11 @@

    <!-- Component name for the default module metadata provider on this device -->
    <string name="config_defaultModuleMetadataProvider">com.android.modulemetadata</string>

    <!-- This is the default launcher component to use on secondary displays that support system
         decorations.
         This launcher activity must support multiple instances and have corresponding launch mode
         set in AndroidManifest.
         {@see android.view.Display#FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS} -->
    <string name="config_secondaryHomeComponent" translatable="false">com.android.launcher3/com.android.launcher3.SecondaryDisplayLauncher</string>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -3521,4 +3521,7 @@
  <java-symbol type="dimen" name="rounded_corner_radius_bottom" />

  <java-symbol type="string" name="config_defaultModuleMetadataProvider" />

  <!-- For Secondary Launcher -->
  <java-symbol type="string" name="config_secondaryHomeComponent" />
</resources>
+3 −1
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import static android.app.WindowConfiguration.activityTypeToString;
import static android.content.Intent.ACTION_MAIN;
import static android.content.Intent.CATEGORY_HOME;
import static android.content.Intent.CATEGORY_LAUNCHER;
import static android.content.Intent.CATEGORY_SECONDARY_HOME;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
import static android.content.Intent.FLAG_ACTIVITY_NO_HISTORY;
import static android.content.pm.ActivityInfo.CONFIG_ORIENTATION;
@@ -1178,7 +1179,8 @@ final class ActivityRecord extends ConfigurationContainer {

    private boolean isHomeIntent(Intent intent) {
        return ACTION_MAIN.equals(intent.getAction())
                && intent.hasCategory(CATEGORY_HOME)
                && (intent.hasCategory(CATEGORY_HOME)
                || intent.hasCategory(CATEGORY_SECONDARY_HOME))
                && intent.getCategories().size() == 1
                && intent.getData() == null
                && intent.getType() == null;
Loading