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/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 53d6bb1..b6c64cb 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1645,6 +1645,9 @@
             }
         }
 
+        ai.uiOptions = sa.getInt(
+                com.android.internal.R.styleable.AndroidManifestApplication_uiOptions, 0);
+
         sa.recycle();
 
         if (outError[0] != null) {
@@ -1850,6 +1853,10 @@
         a.info.theme = sa.getResourceId(
                 com.android.internal.R.styleable.AndroidManifestActivity_theme, 0);
 
+        a.info.uiOptions = sa.getInt(
+                com.android.internal.R.styleable.AndroidManifestActivity_uiOptions,
+                a.info.applicationInfo.uiOptions);
+
         String str;
         str = sa.getNonConfigurationString(
                 com.android.internal.R.styleable.AndroidManifestActivity_permission, 0);
@@ -2091,6 +2098,7 @@
         info.screenOrientation = target.info.screenOrientation;
         info.taskAffinity = target.info.taskAffinity;
         info.theme = target.info.theme;
+        info.uiOptions = target.info.uiOptions;
         
         Activity a = new Activity(mParseActivityAliasArgs, info);
         if (outError[0] != null) {