summaryrefslogtreecommitdiffstats
path: root/core/tests
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2014-08-20 16:26:32 -0700
committerJeff Sharkey <jsharkey@android.com>2014-08-22 16:25:04 -0700
commit941a8ba1a6043cf84a7bf622e44a0b4f7abd0178 (patch)
treec783987f68caaa4cc827b3c720f269bcc9d34667 /core/tests
parent7653a30ea0232ab8323ec51ddcba8d8054ca8a2f (diff)
downloadframeworks_base-941a8ba1a6043cf84a7bf622e44a0b4f7abd0178.zip
frameworks_base-941a8ba1a6043cf84a7bf622e44a0b4f7abd0178.tar.gz
frameworks_base-941a8ba1a6043cf84a7bf622e44a0b4f7abd0178.tar.bz2
Installing splits into ASECs!
Sessions can now zero-copy data directly into pre-allocated ASEC containers. Then at commit time, we compute the total size of the final app, including any inherited APKs and unpacked libraries, and resize the container in one step. This supports both brand new ASEC installs and inheriting from existing ASEC installs. To keep things simple, it currently requires copying any inherited ASEC contents, but this could be optimized in the future. Expose new vold resize command, and allow read-write mounting of ASEC containers. Move native library extraction into the installer flow, since it needs to happen before ASEC is sealed. Move multiArch flag into NativeLibraryHelper, instead of making everyone pass it around. Migrate size calculation to shared location. Separate "other" package name in public API, provide a path to a storage device when relevant, and add more docs. Bug: 16514385 Change-Id: I06c6ce588d312ee7e64cce02733895d640b88456
Diffstat (limited to 'core/tests')
-rw-r--r--core/tests/coretests/src/android/content/pm/PackageHelperTests.java8
-rw-r--r--core/tests/coretests/src/android/os/storage/AsecTests.java2
2 files changed, 6 insertions, 4 deletions
diff --git a/core/tests/coretests/src/android/content/pm/PackageHelperTests.java b/core/tests/coretests/src/android/content/pm/PackageHelperTests.java
index 7ad35d0..06c495e 100644
--- a/core/tests/coretests/src/android/content/pm/PackageHelperTests.java
+++ b/core/tests/coretests/src/android/content/pm/PackageHelperTests.java
@@ -16,7 +16,7 @@
package android.content.pm;
-import com.android.internal.content.PackageHelper;
+import static android.net.TrafficStats.MB_IN_BYTES;
import android.os.IBinder;
import android.os.RemoteException;
@@ -25,6 +25,8 @@ import android.os.storage.IMountService;
import android.test.AndroidTestCase;
import android.util.Log;
+import com.android.internal.content.PackageHelper;
+
public class PackageHelperTests extends AndroidTestCase {
private static final boolean localLOGV = true;
public static final String TAG = "PackageHelperTests";
@@ -81,8 +83,8 @@ public class PackageHelperTests extends AndroidTestCase {
public void testMountAndPullSdCard() {
try {
fullId = PREFIX;
- fullId2 = PackageHelper.createSdDir(1024, fullId, "none", android.os.Process.myUid(),
- true);
+ fullId2 = PackageHelper.createSdDir(1024 * MB_IN_BYTES, fullId, "none",
+ android.os.Process.myUid(), true);
Log.d(TAG,PackageHelper.getSdDir(fullId));
PackageHelper.unMountSdDir(fullId);
diff --git a/core/tests/coretests/src/android/os/storage/AsecTests.java b/core/tests/coretests/src/android/os/storage/AsecTests.java
index abb8eae..4f724fe 100644
--- a/core/tests/coretests/src/android/os/storage/AsecTests.java
+++ b/core/tests/coretests/src/android/os/storage/AsecTests.java
@@ -90,7 +90,7 @@ public class AsecTests extends AndroidTestCase {
String fullId = SECURE_CONTAINER_PREFIX + localId;
IMountService ms = getMs();
- return ms.mountSecureContainer(fullId, key, android.os.Process.myUid());
+ return ms.mountSecureContainer(fullId, key, android.os.Process.myUid(), true);
}
private int renameContainer(String localId1, String localId2) throws Exception {