Loading core/java/android/app/ActivityThread.java +1 −1 Original line number Diff line number Diff line Loading @@ -3275,7 +3275,7 @@ public final class ActivityThread { // If this activity doesn't handle any of the config changes // then don't bother calling onConfigurationChanged as we're // going to destroy it. if ((~activity.mActivityInfo.configChanges & diff) == 0) { if ((~activity.mActivityInfo.getRealConfigChanged() & diff) == 0) { shouldChangeConfig = true; } } Loading core/java/android/content/pm/ActivityInfo.java +29 −2 Original line number Diff line number Diff line Loading @@ -335,13 +335,25 @@ public class ActivityInfo extends ComponentInfo /** * Bit in {@link #configChanges} that indicates that the activity * can itself handle the screen size. Set from the * {@link android.R.attr#configChanges} attribute. * {@link android.R.attr#configChanges} attribute. This will be * set by default for applications that target an earlier version * than {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}... * <b>however</b>, you will not see the bit set here becomes some * applications incorrectly compare {@link #configChanges} against * an absolute value rather than correctly masking out the bits * they are interested in. Please don't do that, thanks. */ public static final int CONFIG_SCREEN_SIZE = 0x0400; /** * Bit in {@link #configChanges} that indicates that the activity * can itself handle the smallest screen size. Set from the * {@link android.R.attr#configChanges} attribute. * {@link android.R.attr#configChanges} attribute. This will be * set by default for applications that target an earlier version * than {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}... * <b>however</b>, you will not see the bit set here becomes some * applications incorrectly compare {@link #configChanges} against * an absolute value rather than correctly masking out the bits * they are interested in. Please don't do that, thanks. */ public static final int CONFIG_SMALLEST_SCREEN_SIZE = 0x0800; /** Loading Loading @@ -385,6 +397,21 @@ public class ActivityInfo extends ComponentInfo return output; } /** * @hide * Unfortunately some developers (OpenFeint I am looking at you) have * compared the configChanges bit field against absolute values, so if we * introduce a new bit they break. To deal with that, we will make sure * the public field will not have a value that breaks them, and let the * framework call here to get the real value. */ public int getRealConfigChanged() { return applicationInfo.targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB_MR2 ? (configChanges | ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE) : configChanges; } /** * Bit mask of kinds of configuration changes that this activity * can handle itself (without being restarted by the system). Loading core/java/android/content/pm/PackageParser.java +0 −5 Original line number Diff line number Diff line Loading @@ -1948,11 +1948,6 @@ public class PackageParser { a.info.configChanges = sa.getInt( com.android.internal.R.styleable.AndroidManifestActivity_configChanges, 0); if (owner.applicationInfo.targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB_MR2) { a.info.configChanges |= ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE; } a.info.softInputMode = sa.getInt( com.android.internal.R.styleable.AndroidManifestActivity_windowSoftInputMode, 0); Loading core/java/android/os/Build.java +10 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,16 @@ public class Build { /** * Current development version. * * <p>Update to Honeycomb MR1 to support 7 inch tablets, improve * screen compatibility mode, etc.</p> * * <p>As of this version, applications that don't say whether they * support XLARGE screens will be assumed to do so only if they target * {@link #HONEYCOMB} or later; it had been {@link #GINGERBREAD} or * later. Applications that don't support a screen size at least as * large as the current screen will provide the user with a UI to * switch them in to screen size compatibility mode.</p> */ public static final int HONEYCOMB_MR2 = CUR_DEVELOPMENT; Loading services/java/com/android/server/am/ActivityStack.java +2 −2 Original line number Diff line number Diff line Loading @@ -3907,10 +3907,10 @@ final class ActivityStack { if (DEBUG_SWITCH || DEBUG_CONFIGURATION) { Slog.v(TAG, "Checking to restart " + r.info.name + ": changed=0x" + Integer.toHexString(changes) + ", handles=0x" + Integer.toHexString(r.info.configChanges) + Integer.toHexString(r.info.getRealConfigChanged()) + ", newConfig=" + newConfig); } if ((changes&(~r.info.configChanges)) != 0 || r.forceNewConfig) { if ((changes&(~r.info.getRealConfigChanged())) != 0 || r.forceNewConfig) { // Aha, the activity isn't handling the change, so DIE DIE DIE. r.configChangeFlags |= changes; r.startFreezingScreenLocked(r.app, globalChanges); Loading Loading
core/java/android/app/ActivityThread.java +1 −1 Original line number Diff line number Diff line Loading @@ -3275,7 +3275,7 @@ public final class ActivityThread { // If this activity doesn't handle any of the config changes // then don't bother calling onConfigurationChanged as we're // going to destroy it. if ((~activity.mActivityInfo.configChanges & diff) == 0) { if ((~activity.mActivityInfo.getRealConfigChanged() & diff) == 0) { shouldChangeConfig = true; } } Loading
core/java/android/content/pm/ActivityInfo.java +29 −2 Original line number Diff line number Diff line Loading @@ -335,13 +335,25 @@ public class ActivityInfo extends ComponentInfo /** * Bit in {@link #configChanges} that indicates that the activity * can itself handle the screen size. Set from the * {@link android.R.attr#configChanges} attribute. * {@link android.R.attr#configChanges} attribute. This will be * set by default for applications that target an earlier version * than {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}... * <b>however</b>, you will not see the bit set here becomes some * applications incorrectly compare {@link #configChanges} against * an absolute value rather than correctly masking out the bits * they are interested in. Please don't do that, thanks. */ public static final int CONFIG_SCREEN_SIZE = 0x0400; /** * Bit in {@link #configChanges} that indicates that the activity * can itself handle the smallest screen size. Set from the * {@link android.R.attr#configChanges} attribute. * {@link android.R.attr#configChanges} attribute. This will be * set by default for applications that target an earlier version * than {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}... * <b>however</b>, you will not see the bit set here becomes some * applications incorrectly compare {@link #configChanges} against * an absolute value rather than correctly masking out the bits * they are interested in. Please don't do that, thanks. */ public static final int CONFIG_SMALLEST_SCREEN_SIZE = 0x0800; /** Loading Loading @@ -385,6 +397,21 @@ public class ActivityInfo extends ComponentInfo return output; } /** * @hide * Unfortunately some developers (OpenFeint I am looking at you) have * compared the configChanges bit field against absolute values, so if we * introduce a new bit they break. To deal with that, we will make sure * the public field will not have a value that breaks them, and let the * framework call here to get the real value. */ public int getRealConfigChanged() { return applicationInfo.targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB_MR2 ? (configChanges | ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE) : configChanges; } /** * Bit mask of kinds of configuration changes that this activity * can handle itself (without being restarted by the system). Loading
core/java/android/content/pm/PackageParser.java +0 −5 Original line number Diff line number Diff line Loading @@ -1948,11 +1948,6 @@ public class PackageParser { a.info.configChanges = sa.getInt( com.android.internal.R.styleable.AndroidManifestActivity_configChanges, 0); if (owner.applicationInfo.targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB_MR2) { a.info.configChanges |= ActivityInfo.CONFIG_SCREEN_SIZE | ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE; } a.info.softInputMode = sa.getInt( com.android.internal.R.styleable.AndroidManifestActivity_windowSoftInputMode, 0); Loading
core/java/android/os/Build.java +10 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,16 @@ public class Build { /** * Current development version. * * <p>Update to Honeycomb MR1 to support 7 inch tablets, improve * screen compatibility mode, etc.</p> * * <p>As of this version, applications that don't say whether they * support XLARGE screens will be assumed to do so only if they target * {@link #HONEYCOMB} or later; it had been {@link #GINGERBREAD} or * later. Applications that don't support a screen size at least as * large as the current screen will provide the user with a UI to * switch them in to screen size compatibility mode.</p> */ public static final int HONEYCOMB_MR2 = CUR_DEVELOPMENT; Loading
services/java/com/android/server/am/ActivityStack.java +2 −2 Original line number Diff line number Diff line Loading @@ -3907,10 +3907,10 @@ final class ActivityStack { if (DEBUG_SWITCH || DEBUG_CONFIGURATION) { Slog.v(TAG, "Checking to restart " + r.info.name + ": changed=0x" + Integer.toHexString(changes) + ", handles=0x" + Integer.toHexString(r.info.configChanges) + Integer.toHexString(r.info.getRealConfigChanged()) + ", newConfig=" + newConfig); } if ((changes&(~r.info.configChanges)) != 0 || r.forceNewConfig) { if ((changes&(~r.info.getRealConfigChanged())) != 0 || r.forceNewConfig) { // Aha, the activity isn't handling the change, so DIE DIE DIE. r.configChangeFlags |= changes; r.startFreezingScreenLocked(r.app, globalChanges); Loading