diff options
author | Amith Yamasani <yamasani@google.com> | 2012-03-13 16:08:00 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-03-22 10:08:24 -0700 |
commit | 483f3b06ea84440a082e21b68ec2c2e54046f5a6 (patch) | |
tree | cc0dff8ea3d133a4dc910bc1e90c85380cea2064 /core/tests | |
parent | 8fca15f1f2273fa429e58f783d0970251d0942e5 (diff) | |
download | frameworks_base-483f3b06ea84440a082e21b68ec2c2e54046f5a6.zip frameworks_base-483f3b06ea84440a082e21b68ec2c2e54046f5a6.tar.gz frameworks_base-483f3b06ea84440a082e21b68ec2c2e54046f5a6.tar.bz2 |
Package restrictions per user
Packages can be enabled/disabled per user.
This requires maintaining stopped/launched states and
enabled / disabled components and packages per user.
Refactored pm.Settings and PackageSettingsBase to keep
track of states per user.
Migrated the stopped-packages.xml to users/<u>/package-restrictions.xml
Changed intent resolution to handle individual user restrictions.
Bunch of IPackageManager calls now have a userId argument.
Make AppWidgetService handle removals of packages.
Added some tests for pm.Settings and PackageManager.
Change-Id: Ia83b529e1df88dbcb3bd55ebfc952a6e9b20e861
Diffstat (limited to 'core/tests')
-rwxr-xr-x | core/tests/coretests/src/android/content/pm/AppCacheTest.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/tests/coretests/src/android/content/pm/AppCacheTest.java b/core/tests/coretests/src/android/content/pm/AppCacheTest.java index 2982816..0c31e2d 100755 --- a/core/tests/coretests/src/android/content/pm/AppCacheTest.java +++ b/core/tests/coretests/src/android/content/pm/AppCacheTest.java @@ -24,6 +24,7 @@ import android.content.IntentFilter; import android.os.RemoteException; import android.os.ServiceManager; import android.os.StatFs; +import android.os.UserId; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.MediumTest; @@ -674,7 +675,7 @@ public class AppCacheTest extends AndroidTestCase { PackageDataObserver observer = new PackageDataObserver(); //wait on observer synchronized(observer) { - getPm().clearApplicationUserData(packageName, observer); + getPm().clearApplicationUserData(packageName, observer, 0 /* TODO: Other users */); long waitTime = 0; while(!observer.isDone() || (waitTime > MAX_WAIT_TIME)) { observer.wait(WAIT_TIME_INCR); @@ -717,7 +718,8 @@ public class AppCacheTest extends AndroidTestCase { File getDataDir() { try { - ApplicationInfo appInfo = getPm().getApplicationInfo(mContext.getPackageName(), 0); + ApplicationInfo appInfo = getPm().getApplicationInfo(mContext.getPackageName(), 0, + UserId.myUserId()); return new File(appInfo.dataDir); } catch (RemoteException e) { throw new RuntimeException("Pacakge manager dead", e); @@ -746,7 +748,7 @@ public class AppCacheTest extends AndroidTestCase { @LargeTest public void testClearApplicationUserDataNoObserver() throws Exception { - getPm().clearApplicationUserData(mContext.getPackageName(), null); + getPm().clearApplicationUserData(mContext.getPackageName(), null, UserId.myUserId()); //sleep for 1 minute Thread.sleep(60*1000); //confirm files dont exist |