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

Commit a5e8bfe9 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Rename restartOnConfigChanges to recreateOnConfigChanges." into oc-dev

parents f3a5f661 c93c3b9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1061,6 +1061,7 @@ package android {
    field public static final int ratingBarStyleSmall = 16842877; // 0x101007d
    field public static final int readPermission = 16842759; // 0x1010007
    field public static final int recognitionService = 16843932; // 0x101049c
    field public static final int recreateOnConfigChanges = 16844105; // 0x1010549
    field public static final int recycleEnabled = 16844124; // 0x101055c
    field public static final int relinquishTaskIdentity = 16843894; // 0x1010476
    field public static final int reparent = 16843964; // 0x10104bc
@@ -1085,7 +1086,6 @@ package android {
    field public static final int resizeable = 16843405; // 0x101028d
    field public static final int resizeableActivity = 16844022; // 0x10104f6
    field public static final int resource = 16842789; // 0x1010025
    field public static final int restartOnConfigChanges = 16844105; // 0x1010549
    field public static final int restoreAnyVersion = 16843450; // 0x10102ba
    field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
    field public static final int restrictedAccountType = 16843733; // 0x10103d5
+1 −1
Original line number Diff line number Diff line
@@ -1182,6 +1182,7 @@ package android {
    field public static final int ratingBarStyleSmall = 16842877; // 0x101007d
    field public static final int readPermission = 16842759; // 0x1010007
    field public static final int recognitionService = 16843932; // 0x101049c
    field public static final int recreateOnConfigChanges = 16844105; // 0x1010549
    field public static final int recycleEnabled = 16844124; // 0x101055c
    field public static final int relinquishTaskIdentity = 16843894; // 0x1010476
    field public static final int reparent = 16843964; // 0x10104bc
@@ -1208,7 +1209,6 @@ package android {
    field public static final int resizeable = 16843405; // 0x101028d
    field public static final int resizeableActivity = 16844022; // 0x10104f6
    field public static final int resource = 16842789; // 0x1010025
    field public static final int restartOnConfigChanges = 16844105; // 0x1010549
    field public static final int restoreAnyVersion = 16843450; // 0x10102ba
    field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
    field public static final int restrictedAccountType = 16843733; // 0x10103d5
+1 −1
Original line number Diff line number Diff line
@@ -1061,6 +1061,7 @@ package android {
    field public static final int ratingBarStyleSmall = 16842877; // 0x101007d
    field public static final int readPermission = 16842759; // 0x1010007
    field public static final int recognitionService = 16843932; // 0x101049c
    field public static final int recreateOnConfigChanges = 16844105; // 0x1010549
    field public static final int recycleEnabled = 16844124; // 0x101055c
    field public static final int relinquishTaskIdentity = 16843894; // 0x1010476
    field public static final int reparent = 16843964; // 0x10104bc
@@ -1085,7 +1086,6 @@ package android {
    field public static final int resizeable = 16843405; // 0x101028d
    field public static final int resizeableActivity = 16844022; // 0x10104f6
    field public static final int resource = 16842789; // 0x1010025
    field public static final int restartOnConfigChanges = 16844105; // 0x1010549
    field public static final int restoreAnyVersion = 16843450; // 0x10102ba
    field public static final deprecated int restoreNeedsApplication = 16843421; // 0x101029d
    field public static final int restrictedAccountType = 16843733; // 0x10103d5
+7 −7
Original line number Diff line number Diff line
@@ -201,10 +201,10 @@ public class PackageParser {
    private static final String META_DATA_INSTANT_APPS = "instantapps.clients.allowed";

    /**
     * Bit mask of all the valid bits that can be set in restartOnConfigChanges.
     * Bit mask of all the valid bits that can be set in recreateOnConfigChanges.
     * @hide
     */
    private static final int RESTART_ON_CONFIG_CHANGES_MASK =
    private static final int RECREATE_ON_CONFIG_CHANGES_MASK =
            ActivityInfo.CONFIG_MCC | ActivityInfo.CONFIG_MNC;

    // These are the tags supported by child packages
@@ -4219,7 +4219,7 @@ public class PackageParser {
                    ActivityManager.getDefaultAppRecentsLimitStatic());
            a.info.configChanges = getActivityConfigChanges(
                    sa.getInt(R.styleable.AndroidManifestActivity_configChanges, 0),
                    sa.getInt(R.styleable.AndroidManifestActivity_restartOnConfigChanges, 0));
                    sa.getInt(R.styleable.AndroidManifestActivity_recreateOnConfigChanges, 0));
            a.info.softInputMode = sa.getInt(
                    R.styleable.AndroidManifestActivity_windowSoftInputMode, 0);

@@ -4523,13 +4523,13 @@ public class PackageParser {

    /**
     * @param configChanges The bit mask of configChanges fetched from AndroidManifest.xml.
     * @param restartOnConfigChanges The bit mask restartOnConfigChanges fetched from
     * @param recreateOnConfigChanges The bit mask recreateOnConfigChanges fetched from
     *                                AndroidManifest.xml.
     * @hide Exposed for unit testing only.
     */
    @TestApi
    public static int getActivityConfigChanges(int configChanges, int restartOnConfigChanges) {
        return configChanges | ((~restartOnConfigChanges) & RESTART_ON_CONFIG_CHANGES_MASK);
    public static int getActivityConfigChanges(int configChanges, int recreateOnConfigChanges) {
        return configChanges | ((~recreateOnConfigChanges) & RECREATE_ON_CONFIG_CHANGES_MASK);
    }

    private void parseLayout(Resources res, AttributeSet attrs, Activity a) {
+11 −11
Original line number Diff line number Diff line
@@ -784,13 +784,13 @@
        <enum name="locked" value="14" />
    </attr>

    <!-- Specify the configuration changes that trigger the system to restart the
    <!-- Specify the configuration changes that trigger the system to recreate the
         current activity if any of these configuration changes happen in the system.
         The valid configuration changes include mcc and mnc which are the same with
         those in configChanges. By default from Android O, we don't restart the activity
         those in configChanges. By default from Android O, we don't recreate the activity
         even the app doesn't specify mcc or mnc in configChanges. If the app wants to
         restart, specify them in restartOnConfigChanges. -->
    <attr name="restartOnConfigChanges">
         be recreated, specify them in recreateOnConfigChanges. -->
    <attr name="recreateOnConfigChanges">
        <!-- The IMSI MCC has changed, that is a SIM has been detected and
             updated the Mobile Country Code. -->
        <flag name="mcc" value="0x0001" />
@@ -817,15 +817,15 @@
    <attr name="configChanges">
        <!-- The IMSI MCC has changed, that is a SIM has been detected and
             updated the Mobile Country Code. By default from Android O, we
             don't restart the activity even the app doesn't specify mcc in
             configChanges. If the app wants to restart, specify mcc in
             restartOnConfigChanges. -->
             don't recreate the activity even the app doesn't specify mcc in
             configChanges. If the app wants to recreate the activity, specify
             mcc in recreateOnConfigChanges. -->
        <flag name="mcc" value="0x0001" />
        <!-- The IMSI MNC has changed, that is a SIM has been detected and
             updated the Mobile Network Code. By default from Android O, we
             don't restart the activity even the app doesn't specify mnc in
             configChanges. If the app wants to restart, specify mnc in
             restartOnConfigChanges. -->
             don't recreate the activity even the app doesn't specify mnc in
             configChanges. If the app wants to recreate the acvitity, specify
             mnc in recreateOnConfigChanges. -->
        <flag name="mnc" value="0x0002" />
        <!-- The locale has changed, that is the user has selected a new
             language that text should be displayed in. -->
@@ -2048,7 +2048,7 @@
        <attr name="launchMode" />
        <attr name="screenOrientation" />
        <attr name="configChanges" />
        <attr name="restartOnConfigChanges" />
        <attr name="recreateOnConfigChanges" />
        <attr name="permission" />
        <attr name="multiprocess" />
        <attr name="process" />
Loading