Fix bug 5098288 - Rethink the suite of new themes
Cut down the list of new themes for ICS. Holo apps now have
Theme.Holo, Theme.Holo.Light, and Theme.Holo.Light.DarkActionBar to
choose from.
Add manifest attribute android:uiOptions to express
splitActionBarWhenNarrow. Other options may move into this later as
well. (DialogWhenLarge?) This attribute is valid on both activity and
application tags; application settings will serve as the default for
activities that do not explicitly set uiOptions.
uiOptions are not currently reflected in the startup window for new
activities.
Change-Id: Iffdc2ce4cc69f79c9bd4e541b7923286e6936c1e
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index ddb6ef0..65a8750 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -91,6 +91,13 @@
public String backupAgentName;
/**
+ * The default extra UI options for activities in this application.
+ * Set from the {@link android.R.attr#uiOptions} attribute in the
+ * activity's manifest.
+ */
+ public int uiOptions = 0;
+
+ /**
* Value for {@link #flags}: if set, this application is installed in the
* device's system image.
*/
@@ -456,6 +463,9 @@
if (descriptionRes != 0) {
pw.println(prefix + "description=0x"+Integer.toHexString(descriptionRes));
}
+ if (uiOptions != 0) {
+ pw.println(prefix + "uiOptions=0x" + Integer.toHexString(uiOptions));
+ }
super.dumpBack(pw, prefix);
}
@@ -509,6 +519,7 @@
installLocation = orig.installLocation;
manageSpaceActivityName = orig.manageSpaceActivityName;
descriptionRes = orig.descriptionRes;
+ uiOptions = orig.uiOptions;
}
@@ -547,6 +558,7 @@
dest.writeString(manageSpaceActivityName);
dest.writeString(backupAgentName);
dest.writeInt(descriptionRes);
+ dest.writeInt(uiOptions);
}
public static final Parcelable.Creator<ApplicationInfo> CREATOR
@@ -584,6 +596,7 @@
manageSpaceActivityName = source.readString();
backupAgentName = source.readString();
descriptionRes = source.readInt();
+ uiOptions = source.readInt();
}
/**