Support per-application switch to execute the VM in safe mode.

The new attribute can be set by adding android:safeMode="true"
in AndroidManifest.xml with the SDK.

Tested with pairing locally compiled SDK with Eclipse and verified that the JIT
(the only component currently included in the safe mode) is indeed disabled
with the new attribute.

Bug: 2267583
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 0a6195f..d97b3dd 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1429,6 +1429,12 @@
         }
 
         if (sa.getBoolean(
+                com.android.internal.R.styleable.AndroidManifestApplication_safeMode,
+                false)) {
+            ai.flags |= ApplicationInfo.FLAG_VM_SAFE_MODE;
+        }
+
+        if (sa.getBoolean(
                 com.android.internal.R.styleable.AndroidManifestApplication_hasCode,
                 true)) {
             ai.flags |= ApplicationInfo.FLAG_HAS_CODE;