summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/AppOpsManager.java13
-rw-r--r--core/java/android/app/ContextImpl.java9
-rw-r--r--core/java/android/content/Context.java13
-rw-r--r--core/java/android/content/pm/PackageManager.java18
-rw-r--r--core/java/android/content/pm/PackageParser.java170
-rw-r--r--core/java/android/provider/Settings.java6
-rw-r--r--core/java/android/service/trust/TrustAgentService.java52
-rwxr-xr-xcore/java/android/text/format/DateFormat.java2
-rw-r--r--core/java/android/util/TimeUtils.java5
-rw-r--r--core/java/android/view/View.java6
-rw-r--r--core/java/android/view/ViewAnimationUtils.java2
-rw-r--r--core/java/android/webkit/WebChromeClient.java6
-rw-r--r--core/java/android/widget/TextView.java2
-rw-r--r--core/java/android/widget/VideoView.java2
-rw-r--r--core/jni/com_android_internal_os_Zygote.cpp137
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.pngbin487 -> 468 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.pngbin487 -> 468 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.pngbin447 -> 443 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.pngbin447 -> 443 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.pngbin503 -> 420 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.pngbin503 -> 420 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.pngbin486 -> 456 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.pngbin486 -> 458 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.pngbin548 -> 530 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.pngbin548 -> 530 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.pngbin569 -> 567 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.pngbin569 -> 567 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.pngbin577 -> 493 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.pngbin577 -> 493 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.pngbin615 -> 592 bytes
-rw-r--r--core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.pngbin615 -> 608 bytes
-rw-r--r--core/res/res/drawable-hdpi/work_icon.pngbin4442 -> 0 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.pngbin357 -> 351 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.pngbin357 -> 351 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.pngbin333 -> 321 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.pngbin333 -> 321 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.pngbin365 -> 320 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.pngbin365 -> 320 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.pngbin347 -> 349 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.pngbin347 -> 358 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.pngbin381 -> 376 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.pngbin381 -> 376 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.pngbin386 -> 374 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.pngbin386 -> 374 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.pngbin394 -> 364 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.pngbin394 -> 364 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.pngbin406 -> 413 bytes
-rw-r--r--core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.pngbin406 -> 427 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.pngbin575 -> 547 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.pngbin575 -> 547 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.pngbin571 -> 535 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.pngbin571 -> 535 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.pngbin596 -> 505 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.pngbin596 -> 505 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.pngbin608 -> 572 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.pngbin608 -> 585 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.pngbin655 -> 660 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.pngbin655 -> 660 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.pngbin713 -> 677 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.pngbin713 -> 677 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.pngbin691 -> 620 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.pngbin691 -> 620 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.pngbin767 -> 728 bytes
-rw-r--r--core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.pngbin767 -> 772 bytes
-rw-r--r--core/tests/coretests/src/android/content/pm/PackageManagerTests.java20
65 files changed, 289 insertions, 174 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 5867232..a480219 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -189,7 +189,9 @@ public class AppOpsManager {
/** @hide Retrieve current usage stats via {@link UsageStatsManager}. */
public static final int OP_GET_USAGE_STATS = 43;
/** @hide */
- public static final int _NUM_OP = 44;
+ public static final int OP_MUTE_MICROPHONE = 44;
+ /** @hide */
+ public static final int _NUM_OP = 45;
/** Access to coarse location information. */
public static final String OPSTR_COARSE_LOCATION =
@@ -257,6 +259,7 @@ public class AppOpsManager {
OP_COARSE_LOCATION,
OP_COARSE_LOCATION,
OP_GET_USAGE_STATS,
+ OP_MUTE_MICROPHONE
};
/**
@@ -308,6 +311,7 @@ public class AppOpsManager {
OPSTR_MONITOR_LOCATION,
OPSTR_MONITOR_HIGH_POWER_LOCATION,
null,
+ null,
};
/**
@@ -358,7 +362,8 @@ public class AppOpsManager {
"WAKE_LOCK",
"MONITOR_LOCATION",
"MONITOR_HIGH_POWER_LOCATION",
- "GET_USAGE_STATS"
+ "GET_USAGE_STATS",
+ "OP_MUTE_MICROPHONE",
};
/**
@@ -410,6 +415,7 @@ public class AppOpsManager {
null, // no permission for generic location monitoring
null, // no permission for high power location monitoring
android.Manifest.permission.PACKAGE_USAGE_STATS,
+ null, // no permission for muting/unmuting microphone
};
/**
@@ -462,6 +468,7 @@ public class AppOpsManager {
null, //MONITOR_LOCATION
null, //MONITOR_HIGH_POWER_LOCATION
null, //GET_USAGE_STATS
+ UserManager.DISALLOW_UNMUTE_MICROPHONE, // MUTE_MICROPHONE
};
/**
@@ -512,6 +519,7 @@ public class AppOpsManager {
AppOpsManager.MODE_ALLOWED,
AppOpsManager.MODE_ALLOWED,
AppOpsManager.MODE_IGNORED, // OP_GET_USAGE_STATS
+ AppOpsManager.MODE_ALLOWED,
};
/**
@@ -566,6 +574,7 @@ public class AppOpsManager {
false,
false,
false,
+ false,
};
private static HashMap<String, Integer> sOpStrToOp = new HashMap<String, Integer>();
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 52d4585..ab3bb49 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -118,6 +118,7 @@ import android.print.PrintManager;
import android.service.fingerprint.FingerprintManager;
import android.service.fingerprint.FingerprintManagerReceiver;
import android.service.fingerprint.FingerprintService;
+import android.telecomm.TelecommManager;
import android.telephony.TelephonyManager;
import android.content.ClipboardManager;
import android.util.AndroidRuntimeException;
@@ -142,6 +143,7 @@ import com.android.internal.annotations.GuardedBy;
import com.android.internal.app.IAppOpsService;
import com.android.internal.appwidget.IAppWidgetService.Stub;
import com.android.internal.os.IDropBoxManagerService;
+import com.android.internal.telecomm.ITelecommService;
import java.io.File;
import java.io.FileInputStream;
@@ -554,6 +556,13 @@ class ContextImpl extends Context {
return new TelephonyManager(ctx.getOuterContext());
}});
+ registerService(TELECOMM_SERVICE, new ServiceFetcher() {
+ public Object createService(ContextImpl ctx) {
+ IBinder b = ServiceManager.getService(TELECOMM_SERVICE);
+ return new TelecommManager(ctx.getOuterContext(),
+ ITelecommService.Stub.asInterface(b));
+ }});
+
registerService(UI_MODE_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
return new UiModeManager();
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index ccf8451..fd19b40 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -2035,6 +2035,7 @@ public abstract class Context {
AUDIO_SERVICE,
MEDIA_ROUTER_SERVICE,
TELEPHONY_SERVICE,
+ TELECOMM_SERVICE,
CLIPBOARD_SERVICE,
INPUT_METHOD_SERVICE,
TEXT_SERVICES_MANAGER_SERVICE,
@@ -2163,6 +2164,8 @@ public abstract class Context {
* @see android.media.MediaRouter
* @see #TELEPHONY_SERVICE
* @see android.telephony.TelephonyManager
+ * @see #TELECOMM_SERVICE
+ * @see android.telecomm.TelecommManager
* @see #INPUT_METHOD_SERVICE
* @see android.view.inputmethod.InputMethodManager
* @see #UI_MODE_SERVICE
@@ -2494,6 +2497,16 @@ public abstract class Context {
/**
* Use with {@link #getSystemService} to retrieve a
+ * {@link android.telecomm.TelecommManager} to manage telecomm-related features
+ * of the device.
+ *
+ * @see #getSystemService
+ * @see android.telecomm.TelecommManager
+ */
+ public static final String TELECOMM_SERVICE = "telecomm";
+
+ /**
+ * Use with {@link #getSystemService} to retrieve a
* {@link android.text.ClipboardManager} for accessing and modifying
* the contents of the global clipboard.
*
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 550c1f1..8d9b8d9 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -26,6 +26,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.IntentSender;
+import android.content.pm.PackageParser.PackageParserException;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.graphics.drawable.Drawable;
@@ -2873,16 +2874,17 @@ public abstract class PackageManager {
DisplayMetrics metrics = new DisplayMetrics();
metrics.setToDefaults();
final File sourceFile = new File(archiveFilePath);
- PackageParser.Package pkg = packageParser.parsePackage(
- sourceFile, archiveFilePath, metrics, 0);
- if (pkg == null) {
+ try {
+ PackageParser.Package pkg = packageParser.parseMonolithicPackage(sourceFile, metrics,
+ 0);
+ if ((flags & GET_SIGNATURES) != 0) {
+ packageParser.collectCertificates(pkg, 0);
+ }
+ PackageUserState state = new PackageUserState();
+ return PackageParser.generatePackageInfo(pkg, null, flags, 0, 0, null, state);
+ } catch (PackageParserException e) {
return null;
}
- if ((flags & GET_SIGNATURES) != 0) {
- packageParser.collectCertificates(pkg, 0);
- }
- PackageUserState state = new PackageUserState();
- return PackageParser.generatePackageInfo(pkg, null, flags, 0, 0, null, state);
}
/**
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 4cac7fd..91895ff 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -18,6 +18,7 @@ package android.content.pm;
import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME;
import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED;
+import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_NOT_APK;
import android.content.ComponentName;
import android.content.Intent;
@@ -31,6 +32,7 @@ import android.os.Build;
import android.os.Bundle;
import android.os.PatternMatcher;
import android.os.UserHandle;
+import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Base64;
import android.util.DisplayMetrics;
@@ -81,6 +83,8 @@ public class PackageParser {
private static final boolean DEBUG_PARSER = false;
private static final boolean DEBUG_BACKUP = false;
+ // TODO: switch outError users to PackageParserException
+
/** File name in an APK for the Android manifest. */
private static final String ANDROID_MANIFEST_FILENAME = "AndroidManifest.xml";
@@ -207,10 +211,10 @@ public class PackageParser {
}
}
- /* Light weight package info.
- * @hide
+ /**
+ * Lightweight parsed details about a single APK file.
*/
- public static class PackageLite {
+ public static class ApkLite {
public final String packageName;
public final String splitName;
public final int versionCode;
@@ -218,7 +222,7 @@ public class PackageParser {
public final VerifierInfo[] verifiers;
public final Signature[] signatures;
- public PackageLite(String packageName, String splitName, int versionCode,
+ public ApkLite(String packageName, String splitName, int versionCode,
int installLocation, List<VerifierInfo> verifiers, Signature[] signatures) {
this.packageName = packageName;
this.splitName = splitName;
@@ -247,6 +251,10 @@ public class PackageParser {
mArchiveSourcePath = archiveSourcePath;
}
+ public PackageParser(File archiveSource) {
+ this(archiveSource.getAbsolutePath());
+ }
+
public void setSeparateProcesses(String[] procs) {
mSeparateProcesses = procs;
}
@@ -255,6 +263,10 @@ public class PackageParser {
mOnlyCoreApps = onlyCoreApps;
}
+ private static final boolean isPackageFilename(File file) {
+ return isPackageFilename(file.getName());
+ }
+
private static final boolean isPackageFilename(String name) {
return name.endsWith(".apk");
}
@@ -497,26 +509,84 @@ public class PackageParser {
public final static int PARSE_IS_PRIVILEGED = 1<<7;
public final static int PARSE_GET_SIGNATURES = 1<<8;
- public int getParseError() {
- return mParseError;
+ /**
+ * Parse all APK files under the given directory as a single package.
+ */
+ public Package parseSplitPackage(File apkDir, DisplayMetrics metrics, int flags,
+ boolean trustedOverlay) throws PackageParserException {
+ final File[] files = apkDir.listFiles();
+ if (ArrayUtils.isEmpty(files)) {
+ throw new PackageParserException(INSTALL_PARSE_FAILED_NOT_APK,
+ "No packages found in split");
+ }
+
+ File baseFile = null;
+ for (File file : files) {
+ if (file.isFile() && isPackageFilename(file)) {
+ ApkLite lite = parseApkLite(file.getAbsolutePath(), 0);
+ if (lite == null) {
+ throw new PackageParserException(INSTALL_PARSE_FAILED_NOT_APK,
+ "Invalid package file: " + file);
+ }
+
+ if (TextUtils.isEmpty(lite.splitName)) {
+ baseFile = file;
+ break;
+ }
+ }
+ }
+
+ if (baseFile == null) {
+ throw new PackageParserException(INSTALL_PARSE_FAILED_NOT_APK,
+ "Missing base APK in " + apkDir);
+ }
+
+ final Package pkg = parseBaseApk(baseFile, metrics, flags, trustedOverlay);
+ if (pkg == null) {
+ throw new PackageParserException(INSTALL_PARSE_FAILED_NOT_APK,
+ "Failed to parse base APK: " + baseFile);
+ }
+
+ for (File file : files) {
+ if (file.isFile() && isPackageFilename(file) && !file.equals(baseFile)) {
+ parseSplitApk(pkg, file, metrics, flags, trustedOverlay);
+ }
+ }
+
+ // Always use a well-defined sort order
+ if (pkg.splitCodePaths != null) {
+ Arrays.sort(pkg.splitCodePaths);
+ }
+
+ return pkg;
+ }
+
+ public Package parseMonolithicPackage(File apkFile, DisplayMetrics metrics, int flags)
+ throws PackageParserException {
+ return parseMonolithicPackage(apkFile, metrics, flags, false);
}
- public Package parsePackage(File sourceFile, String destCodePath,
- DisplayMetrics metrics, int flags) {
- return parsePackage(sourceFile, destCodePath, metrics, flags, false);
+ public Package parseMonolithicPackage(File apkFile, DisplayMetrics metrics, int flags,
+ boolean trustedOverlay) throws PackageParserException {
+ final Package pkg = parseBaseApk(apkFile, metrics, flags, trustedOverlay);
+ if (pkg != null) {
+ return pkg;
+ } else {
+ throw new PackageParserException(mParseError, "Failed to parse " + apkFile);
+ }
}
- public Package parsePackage(File sourceFile, String destCodePath,
- DisplayMetrics metrics, int flags, boolean trustedOverlay) {
+ private Package parseBaseApk(File apkFile, DisplayMetrics metrics, int flags,
+ boolean trustedOverlay) {
mParseError = PackageManager.INSTALL_SUCCEEDED;
- mArchiveSourcePath = sourceFile.getPath();
- if (!sourceFile.isFile()) {
+ mArchiveSourcePath = apkFile.getAbsolutePath();
+ if (!apkFile.isFile()) {
Slog.w(TAG, "Skipping dir: " + mArchiveSourcePath);
mParseError = PackageManager.INSTALL_PARSE_FAILED_NOT_APK;
return null;
}
- if (!isPackageFilename(sourceFile.getName())
+ if (!isPackageFilename(apkFile.getName())
&& (flags&PARSE_MUST_BE_APK) != 0) {
if ((flags&PARSE_IS_SYSTEM) == 0) {
// We expect to have non-.apk files in the system dir,
@@ -560,13 +630,12 @@ public class PackageParser {
Exception errorException = null;
try {
// XXXX todo: need to figure out correct configuration.
- pkg = parsePackage(res, parser, flags, trustedOverlay, errorText);
+ pkg = parseBaseApk(res, parser, flags, trustedOverlay, errorText);
} catch (Exception e) {
errorException = e;
mParseError = PackageManager.INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION;
}
-
if (pkg == null) {
// If we are only parsing core apps, then a null with INSTALL_SUCCEEDED
// just means to skip this app so don't make a fuss about it.
@@ -590,22 +659,25 @@ public class PackageParser {
parser.close();
assmgr.close();
- // Set code and resource paths
- pkg.mPath = destCodePath;
- pkg.mScanPath = mArchiveSourcePath;
- //pkg.applicationInfo.sourceDir = destCodePath;
- //pkg.applicationInfo.publicSourceDir = destRes;
+ pkg.codePath = mArchiveSourcePath;
pkg.mSignatures = null;
return pkg;
}
+ private void parseSplitApk(Package pkg, File apkFile, DisplayMetrics metrics, int flags,
+ boolean trustedOverlay) throws PackageParserException {
+ // TODO: expand split APK parsing
+ pkg.splitCodePaths = ArrayUtils.appendElement(String.class, pkg.splitCodePaths,
+ apkFile.getAbsolutePath());
+ }
+
/**
* Gathers the {@link ManifestDigest} for {@code pkg} if it exists in the
* APK. If it successfully scanned the package and found the
* {@code AndroidManifest.xml}, {@code true} is returned.
*/
- public boolean collectManifestDigest(Package pkg) {
+ public void collectManifestDigest(Package pkg) throws PackageParserException {
try {
final StrictJarFile jarFile = new StrictJarFile(mArchiveSourcePath);
try {
@@ -616,13 +688,19 @@ public class PackageParser {
} finally {
jarFile.close();
}
- return true;
} catch (IOException e) {
- return false;
+ throw new PackageParserException(INSTALL_PARSE_FAILED_MANIFEST_MALFORMED,
+ "Failed to collect manifest digest");
+ }
+ }
+
+ public void collectCertificates(Package pkg, int flags) throws PackageParserException {
+ if (!collectCertificatesInternal(pkg, flags)) {
+ throw new PackageParserException(mParseError, "Failed to collect certificates");
}
}
- public boolean collectCertificates(Package pkg, int flags) {
+ private boolean collectCertificatesInternal(Package pkg, int flags) {
pkg.mSignatures = null;
WeakReference<byte[]> readBufferRef;
@@ -808,7 +886,7 @@ public class PackageParser {
* @param flags Special parse flags
* @return PackageLite object with package information or null on failure.
*/
- public static PackageLite parsePackageLite(String packageFilePath, int flags) {
+ public static ApkLite parseApkLite(String packageFilePath, int flags) {
AssetManager assmgr = null;
final XmlResourceParser parser;
final Resources res;
@@ -844,9 +922,9 @@ public class PackageParser {
final AttributeSet attrs = parser;
final String errors[] = new String[1];
- PackageLite packageLite = null;
+ ApkLite packageLite = null;
try {
- packageLite = parsePackageLite(res, parser, attrs, flags, signatures, errors);
+ packageLite = parseApkLite(res, parser, attrs, flags, signatures, errors);
} catch (PackageParserException e) {
Slog.w(TAG, packageFilePath, e);
} catch (IOException e) {
@@ -930,7 +1008,7 @@ public class PackageParser {
(splitName != null) ? splitName.intern() : splitName);
}
- private static PackageLite parsePackageLite(Resources res, XmlPullParser parser,
+ private static ApkLite parseApkLite(Resources res, XmlPullParser parser,
AttributeSet attrs, int flags, Signature[] signatures, String[] outError)
throws IOException, XmlPullParserException, PackageParserException {
final Pair<String, String> packageSplit = parsePackageSplitNames(parser, attrs, flags);
@@ -972,7 +1050,7 @@ public class PackageParser {
}
}
- return new PackageLite(packageSplit.first, packageSplit.second, versionCode,
+ return new ApkLite(packageSplit.first, packageSplit.second, versionCode,
installLocation, verifiers, signatures);
}
@@ -988,9 +1066,8 @@ public class PackageParser {
return new Signature(sig);
}
- private Package parsePackage(
- Resources res, XmlResourceParser parser, int flags, boolean trustedOverlay,
- String[] outError) throws XmlPullParserException, IOException {
+ private Package parseBaseApk(Resources res, XmlResourceParser parser, int flags,
+ boolean trustedOverlay, String[] outError) throws XmlPullParserException, IOException {
AttributeSet attrs = parser;
mParseInstrumentationArgs = null;
@@ -1019,7 +1096,13 @@ public class PackageParser {
}
}
- final Package pkg = new Package(pkgName, splitName);
+ if (!TextUtils.isEmpty(splitName)) {
+ outError[0] = "Expected base APK, but found split " + splitName;
+ mParseError = PackageManager.INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME;
+ return null;
+ }
+
+ final Package pkg = new Package(pkgName);
boolean foundApp = false;
TypedArray sa = res.obtainAttributes(attrs,
@@ -3580,10 +3663,17 @@ public class PackageParser {
return true;
}
+ /**
+ * Representation of a full package parsed from APK files on disk. A package
+ * consists of a single base APK, and zero or more split APKs.
+ */
public final static class Package {
public String packageName;
- public String splitName;
+
+ // TODO: work towards making these paths invariant
+ public String codePath;
+ public String[] splitCodePaths;
// For now we only support one application per package.
public final ApplicationInfo applicationInfo = new ApplicationInfo();
@@ -3615,9 +3705,6 @@ public class PackageParser {
// We store the application meta-data independently to avoid multiple unwanted references
public Bundle mAppMetaData = null;
- // If this is a 3rd party app, this is the path of the zip file.
- public String mPath;
-
// The version code declared for this package.
public int mVersionCode;
@@ -3637,10 +3724,6 @@ public class PackageParser {
// preferred up order.
public int mPreferredOrder = 0;
- // For use by the package manager to keep track of the path to the
- // file an app came from.
- public String mScanPath;
-
// For use by package manager to keep track of where it needs to do dexopt.
public boolean mDexOptNeeded = true;
@@ -3700,9 +3783,8 @@ public class PackageParser {
public Set<PublicKey> mSigningKeys;
public Map<String, Set<PublicKey>> mKeySetMapping;
- public Package(String packageName, String splitName) {
+ public Package(String packageName) {
this.packageName = packageName;
- this.splitName = splitName;
applicationInfo.packageName = packageName;
applicationInfo.uid = -1;
}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 2a5e9fd..06c05ee 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -4537,6 +4537,12 @@ public final class Settings {
public static final String SMS_DEFAULT_APPLICATION = "sms_default_application";
/**
+ * Specifies the package name currently configured to be the primary phone application
+ * @hide
+ */
+ public static final String PHONE_DEFAULT_APPLICATION = "phone_default_application";
+
+ /**
* Name of a package that the current user has explicitly allowed to see all of that
* user's notifications.
*
diff --git a/core/java/android/service/trust/TrustAgentService.java b/core/java/android/service/trust/TrustAgentService.java
index a6cddae..8fa45e6 100644
--- a/core/java/android/service/trust/TrustAgentService.java
+++ b/core/java/android/service/trust/TrustAgentService.java
@@ -80,6 +80,11 @@ public class TrustAgentService extends Service {
private ITrustAgentServiceCallback mCallback;
+ private Runnable mPendingGrantTrustTask;
+
+ // Lock used to access mPendingGrantTrustTask and mCallback.
+ private final Object mLock = new Object();
+
private Handler mHandler = new Handler() {
public void handleMessage(android.os.Message msg) {
switch (msg.what) {
@@ -127,12 +132,24 @@ public class TrustAgentService extends Service {
* @param initiatedByUser indicates that the user has explicitly initiated an action that proves
* the user is about to use the device.
*/
- public final void grantTrust(CharSequence message, long durationMs, boolean initiatedByUser) {
- if (mCallback != null) {
- try {
- mCallback.grantTrust(message.toString(), durationMs, initiatedByUser);
- } catch (RemoteException e) {
- onError("calling enableTrust()");
+ public final void grantTrust(
+ final CharSequence message, final long durationMs, final boolean initiatedByUser) {
+ synchronized (mLock) {
+ if (mCallback != null) {
+ try {
+ mCallback.grantTrust(message.toString(), durationMs, initiatedByUser);
+ } catch (RemoteException e) {
+ onError("calling enableTrust()");
+ }
+ } else {
+ // Remember trust has been granted so we can effectively grant it once the service
+ // is bound.
+ mPendingGrantTrustTask = new Runnable() {
+ @Override
+ public void run() {
+ grantTrust(message, durationMs, initiatedByUser);
+ }
+ };
}
}
}
@@ -141,11 +158,16 @@ public class TrustAgentService extends Service {
* Call to revoke trust on the device.
*/
public final void revokeTrust() {
- if (mCallback != null) {
- try {
- mCallback.revokeTrust();
- } catch (RemoteException e) {
- onError("calling revokeTrust()");
+ synchronized (mLock) {
+ if (mPendingGrantTrustTask != null) {
+ mPendingGrantTrustTask = null;
+ }
+ if (mCallback != null) {
+ try {
+ mCallback.revokeTrust();
+ } catch (RemoteException e) {
+ onError("calling revokeTrust()");
+ }
}
}
}
@@ -164,7 +186,13 @@ public class TrustAgentService extends Service {
}
public void setCallback(ITrustAgentServiceCallback callback) {
- mCallback = callback;
+ synchronized (mLock) {
+ mCallback = callback;
+ if (mPendingGrantTrustTask != null) {
+ mPendingGrantTrustTask.run();
+ mPendingGrantTrustTask = null;
+ }
+ }
}
}
diff --git a/core/java/android/text/format/DateFormat.java b/core/java/android/text/format/DateFormat.java
index d1f35dd..9fec9a1 100755
--- a/core/java/android/text/format/DateFormat.java
+++ b/core/java/android/text/format/DateFormat.java
@@ -195,7 +195,7 @@ public class DateFormat {
* @return a string pattern suitable for use with {@link java.text.SimpleDateFormat}.
*/
public static String getBestDateTimePattern(Locale locale, String skeleton) {
- return ICU.getBestDateTimePattern(skeleton, locale.toString());
+ return ICU.getBestDateTimePattern(skeleton, locale);
}
/**
diff --git a/core/java/android/util/TimeUtils.java b/core/java/android/util/TimeUtils.java
index 8f4b710..f7d2821 100644
--- a/core/java/android/util/TimeUtils.java
+++ b/core/java/android/util/TimeUtils.java
@@ -62,10 +62,7 @@ public class TimeUtils {
*/
public static TimeZone getTimeZone(int offset, boolean dst, long when, String country) {
TimeZone best = null;
-
- Resources r = Resources.getSystem();
- XmlResourceParser parser = r.getXml(com.android.internal.R.xml.time_zones_by_country);
- Date d = new Date(when);
+ final Date d = new Date(when);
TimeZone current = TimeZone.getDefault();
String currentName = current.getID();
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 41037a5..b9e56f3 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6116,6 +6116,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
*/
protected boolean fitSystemWindows(Rect insets) {
if ((mPrivateFlags3 & PFLAG3_APPLYING_INSETS) == 0) {
+ if (insets == null) {
+ // Null insets by definition have already been consumed.
+ // This call cannot apply insets since there are none to apply,
+ // so return false.
+ return false;
+ }
// If we're not in the process of dispatching the newer apply insets call,
// that means we're not in the compatibility path. Dispatch into the newer
// apply insets path and take things from there.
diff --git a/core/java/android/view/ViewAnimationUtils.java b/core/java/android/view/ViewAnimationUtils.java
index 3854f34..29e865f 100644
--- a/core/java/android/view/ViewAnimationUtils.java
+++ b/core/java/android/view/ViewAnimationUtils.java
@@ -23,7 +23,7 @@ import android.animation.ValueAnimator;
* Defines common utilities for working with View's animations.
*
*/
-public class ViewAnimationUtils {
+public final class ViewAnimationUtils {
private ViewAnimationUtils() {}
/**
* Returns a ValueAnimator which can animate a clipping circle.
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index ec396aa..470d413 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -408,7 +408,6 @@ public class WebChromeClient {
* @return true if filePathCallback will be invoked, false to use default handling.
*
* @see FileChooserParams
- * @hide For API approval
*/
public boolean showFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback,
FileChooserParams fileChooserParams) {
@@ -416,11 +415,8 @@ public class WebChromeClient {
}
/**
- * Parameters used in the {@link #showFileChooser(WebView,ValueCallback<String[]>,FileChooserParams)}
- * method.
- *
+ * Parameters used in the {@link #showFileChooser} method.
* This is intended to be used as a read-only data struct by the application.
- * @hide For API approval
*/
public static class FileChooserParams {
// Flags for mode
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 22f5e23..71817c2 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -2727,7 +2727,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
/**
* Sets whether the soft input method will be made visible when this
* TextView gets focused. The default is true.
- * @hide
*/
@android.view.RemotableViewMethod
public final void setShowSoftInputOnFocus(boolean show) {
@@ -2738,7 +2737,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
/**
* Returns whether the soft input method will be made visible when this
* TextView gets focused. The default is true.
- * @hide
*/
public final boolean getShowSoftInputOnFocus() {
// When there is no Editor, return default true value
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java
index 2b62552..8ee0a1b 100644
--- a/core/java/android/widget/VideoView.java
+++ b/core/java/android/widget/VideoView.java
@@ -22,6 +22,7 @@ import android.content.DialogInterface;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.media.AudioManager;
+import android.media.ClosedCaptionRenderer;
import android.media.MediaFormat;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
@@ -316,6 +317,7 @@ public class VideoView extends SurfaceView
context, mMediaPlayer.getMediaTimeProvider(), mMediaPlayer);
controller.registerRenderer(new WebVttRenderer(context));
controller.registerRenderer(new TtmlRenderer(context));
+ controller.registerRenderer(new ClosedCaptionRenderer(context));
mMediaPlayer.setSubtitleAnchor(controller, this);
if (mAudioSession != 0) {
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index c58bf04..0cdddba 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -14,46 +14,40 @@
* limitations under the License.
*/
-#include "android_runtime/AndroidRuntime.h"
+#define LOG_TAG "Zygote"
// sys/mount.h has to come before linux/fs.h due to redefinition of MS_RDONLY, MS_BIND, etc
#include <sys/mount.h>
#include <linux/fs.h>
#include <grp.h>
+#include <fcntl.h>
#include <paths.h>
#include <signal.h>
#include <stdlib.h>
+#include <unistd.h>
+#include <sys/capability.h>
+#include <sys/personality.h>
+#include <sys/prctl.h>
#include <sys/resource.h>
-#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/utsname.h>
#include <sys/wait.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include "cutils/fs.h"
-#include "cutils/multiuser.h"
-#include "cutils/sched_policy.h"
-#include "utils/String8.h"
+
+#include <cutils/fs.h>
+#include <cutils/multiuser.h>
+#include <cutils/sched_policy.h>
+#include <utils/String8.h>
+#include <selinux/android.h>
+
+#include "android_runtime/AndroidRuntime.h"
#include "JNIHelp.h"
#include "ScopedLocalRef.h"
#include "ScopedPrimitiveArray.h"
#include "ScopedUtfChars.h"
-#if defined(HAVE_PRCTL)
-#include <sys/prctl.h>
-#endif
-
-#include <selinux/android.h>
-
-#if defined(__linux__)
-#include <sys/personality.h>
-#include <sys/utsname.h>
-#if defined(HAVE_ANDROID_OS)
-#include <sys/capability.h>
-#endif
-#endif
-
namespace {
using android::String8;
@@ -97,11 +91,9 @@ static void SigChldHandler(int /*signal_number*/) {
if (WTERMSIG(status) != SIGKILL) {
ALOGI("Process %d exited due to signal (%d)", pid, WTERMSIG(status));
}
-#ifdef WCOREDUMP
if (WCOREDUMP(status)) {
ALOGI("Process %d dumped core.", pid);
}
-#endif /* ifdef WCOREDUMP */
}
// If the just-crashed process is the system_server, bring down zygote
@@ -199,8 +191,6 @@ static void SetRLimits(JNIEnv* env, jobjectArray javaRlimits) {
}
}
-#if defined(HAVE_ANDROID_OS)
-
// The debug malloc library needs to know whether it's the zygote or a child.
extern "C" int gMallocLeakZygoteChild;
@@ -254,17 +244,6 @@ static void SetSchedulerPolicy(JNIEnv* env) {
}
}
-#else
-
-static int gMallocLeakZygoteChild = 0;
-
-static void EnableKeepCapabilities(JNIEnv*) {}
-static void DropCapabilitiesBoundingSet(JNIEnv*) {}
-static void SetCapabilities(JNIEnv*, int64_t, int64_t) {}
-static void SetSchedulerPolicy(JNIEnv*) {}
-
-#endif
-
// Create a private mount namespace and bind mount appropriate emulated
// storage for the given user.
static bool MountEmulatedStorage(uid_t uid, jint mount_mode) {
@@ -337,7 +316,6 @@ static bool MountEmulatedStorage(uid_t uid, jint mount_mode) {
return true;
}
-#if defined(__linux__)
static bool NeedsNoRandomizeWorkaround() {
#if !defined(__arm__)
return false;
@@ -357,7 +335,6 @@ static bool NeedsNoRandomizeWorkaround() {
return (major < 3) || ((major == 3) && (minor < 4));
#endif
}
-#endif
// Utility to close down the Zygote socket file descriptors while
// the child is still running as root with Zygote's privileges. Each
@@ -474,7 +451,6 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
RuntimeAbort(env);
}
-#if defined(__linux__)
if (NeedsNoRandomizeWorkaround()) {
// Work around ARM kernel ASLR lossage (http://b/5817320).
int old_personality = personality(0xffffffff);
@@ -483,58 +459,49 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
ALOGW("personality(%d) failed", new_personality);
}
}
-#endif
SetCapabilities(env, permittedCapabilities, effectiveCapabilities);
SetSchedulerPolicy(env);
-#if defined(HAVE_ANDROID_OS)
- { // NOLINT(whitespace/braces)
- const char* se_info_c_str = NULL;
- ScopedUtfChars* se_info = NULL;
- if (java_se_info != NULL) {
- se_info = new ScopedUtfChars(env, java_se_info);
- se_info_c_str = se_info->c_str();
- if (se_info_c_str == NULL) {
- ALOGE("se_info_c_str == NULL");
- RuntimeAbort(env);
- }
- }
- const char* se_name_c_str = NULL;
- ScopedUtfChars* se_name = NULL;
- if (java_se_name != NULL) {
- se_name = new ScopedUtfChars(env, java_se_name);
- se_name_c_str = se_name->c_str();
- if (se_name_c_str == NULL) {
- ALOGE("se_name_c_str == NULL");
- RuntimeAbort(env);
- }
- }
- rc = selinux_android_setcontext(uid, is_system_server, se_info_c_str, se_name_c_str);
- if (rc == -1) {
- ALOGE("selinux_android_setcontext(%d, %d, \"%s\", \"%s\") failed", uid,
- is_system_server, se_info_c_str, se_name_c_str);
- RuntimeAbort(env);
- }
-
- // Make it easier to debug audit logs by setting the main thread's name to the
- // nice name rather than "app_process".
- if (se_info_c_str == NULL && is_system_server) {
- se_name_c_str = "system_server";
- }
- if (se_info_c_str != NULL) {
- SetThreadName(se_name_c_str);
- }
+ const char* se_info_c_str = NULL;
+ ScopedUtfChars* se_info = NULL;
+ if (java_se_info != NULL) {
+ se_info = new ScopedUtfChars(env, java_se_info);
+ se_info_c_str = se_info->c_str();
+ if (se_info_c_str == NULL) {
+ ALOGE("se_info_c_str == NULL");
+ RuntimeAbort(env);
+ }
+ }
+ const char* se_name_c_str = NULL;
+ ScopedUtfChars* se_name = NULL;
+ if (java_se_name != NULL) {
+ se_name = new ScopedUtfChars(env, java_se_name);
+ se_name_c_str = se_name->c_str();
+ if (se_name_c_str == NULL) {
+ ALOGE("se_name_c_str == NULL");
+ RuntimeAbort(env);
+ }
+ }
+ rc = selinux_android_setcontext(uid, is_system_server, se_info_c_str, se_name_c_str);
+ if (rc == -1) {
+ ALOGE("selinux_android_setcontext(%d, %d, \"%s\", \"%s\") failed", uid,
+ is_system_server, se_info_c_str, se_name_c_str);
+ RuntimeAbort(env);
+ }
- delete se_info;
- delete se_name;
+ // Make it easier to debug audit logs by setting the main thread's name to the
+ // nice name rather than "app_process".
+ if (se_info_c_str == NULL && is_system_server) {
+ se_name_c_str = "system_server";
}
-#else
- UNUSED(is_system_server);
- UNUSED(java_se_info);
- UNUSED(java_se_name);
-#endif
+ if (se_info_c_str != NULL) {
+ SetThreadName(se_name_c_str);
+ }
+
+ delete se_info;
+ delete se_name;
UnsetSigChldHandler();
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
index 17acfc5..c5c0e97 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png
index 17acfc5..c5c0e97 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png
index 9b8ca22..3b31225 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png
index 9b8ca22..3b31225 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png
index bc20f6c..b65009e 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png
index bc20f6c..b65009e 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png
index 571819b..a2dfcae 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png
index 571819b..c3fda0e 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
index 1f83b5a..bae60a7 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png
index 1f83b5a..bae60a7 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png
index 733cf45..a9653b0 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png
index 733cf45..a9653b0 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png
index 2265de4..394cb5e 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png
index 2265de4..394cb5e 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png
index f3ada58..aa23c6e 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png
index f3ada58..028b3b8 100644
--- a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/work_icon.png b/core/res/res/drawable-hdpi/work_icon.png
deleted file mode 100644
index be8a36e..0000000
--- a/core/res/res/drawable-hdpi/work_icon.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
index 3fdd3bc..4e6d076 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png
index 3fdd3bc..4e6d076 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png
index eaa02b3..ca61cb2 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png
index eaa02b3..ca61cb2 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png
index 28c8b94..b5999be 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png
index 28c8b94..b5999be 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png
index 6090cce..8392ac3 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png
index 6090cce..522bafd 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
index 3f2e982..ebb2f8b 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png
index 3f2e982..ebb2f8b 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png
index 14b958b..3fa20ca 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png
index 14b958b..3fa20ca 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png
index 4db22d4..6cc59ed 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png
index 4db22d4..6cc59ed 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png
index a11e1c7..a1fcd08 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png
index a11e1c7..c6c0224 100644
--- a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
index c08deab..1e45530 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png
index c08deab..1e45530 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png
index 8b1a55c..2c63c5d 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png
index 8b1a55c..2c63c5d 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png
index 77cd1fa..dd5e26e 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png
index 77cd1fa..dd5e26e 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png
index e0e3540..aa9b3c5 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png
index e0e3540..367c25a 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
index 324e490..df28ad0 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png
index 324e490..df28ad0 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png
index e126cc6..3a27831 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png
index e126cc6..3a27831 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png
index 4c1f1b9..d68bdf4 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png
index 4c1f1b9..d68bdf4 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png
index 219d37b..da03ec9 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png
index 219d37b..482b249 100644
--- a/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png
+++ b/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png
Binary files differ
diff --git a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
index 07a6a10..7251e7c 100644
--- a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
+++ b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
@@ -29,6 +29,7 @@ import android.content.IntentFilter;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.PackageParser.PackageParserException;
import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.net.Uri;
@@ -60,7 +61,6 @@ import android.util.Log;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
-
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -303,14 +303,13 @@ public class PackageManagerTests extends AndroidTestCase {
return Uri.fromFile(outFile);
}
- private PackageParser.Package parsePackage(Uri packageURI) {
+ private PackageParser.Package parsePackage(Uri packageURI) throws PackageParserException {
final String archiveFilePath = packageURI.getPath();
PackageParser packageParser = new PackageParser(archiveFilePath);
File sourceFile = new File(archiveFilePath);
DisplayMetrics metrics = new DisplayMetrics();
metrics.setToDefaults();
- PackageParser.Package pkg = packageParser.parsePackage(sourceFile, archiveFilePath,
- metrics, 0);
+ PackageParser.Package pkg = packageParser.parseMonolithicPackage(sourceFile, metrics, 0);
packageParser = null;
return pkg;
}
@@ -579,18 +578,18 @@ public class PackageManagerTests extends AndroidTestCase {
PackageParser.Package pkg;
- InstallParams(String outFileName, int rawResId) {
+ InstallParams(String outFileName, int rawResId) throws PackageParserException {
this.pkg = getParsedPackage(outFileName, rawResId);
- this.packageURI = Uri.fromFile(new File(pkg.mScanPath));
+ this.packageURI = Uri.fromFile(new File(pkg.codePath));
}
InstallParams(PackageParser.Package pkg) {
- this.packageURI = Uri.fromFile(new File(pkg.mScanPath));
+ this.packageURI = Uri.fromFile(new File(pkg.codePath));
this.pkg = pkg;
}
long getApkSize() {
- File file = new File(pkg.mScanPath);
+ File file = new File(pkg.codePath);
return file.length();
}
}
@@ -691,7 +690,8 @@ public class PackageManagerTests extends AndroidTestCase {
}
}
- private PackageParser.Package getParsedPackage(String outFileName, int rawResId) {
+ private PackageParser.Package getParsedPackage(String outFileName, int rawResId)
+ throws PackageParserException {
PackageManager pm = mContext.getPackageManager();
File filesDir = mContext.getFilesDir();
File outFile = new File(filesDir, outFileName);
@@ -1343,7 +1343,7 @@ public class PackageManagerTests extends AndroidTestCase {
assertUninstalled(info);
}
} finally {
- File outFile = new File(ip.pkg.mScanPath);
+ File outFile = new File(ip.pkg.codePath);
if (outFile != null && outFile.exists()) {
outFile.delete();
}