diff options
author | Jeff Davidson <jpd@google.com> | 2015-06-22 16:54:34 -0700 |
---|---|---|
committer | Jeff Davidson <jpd@google.com> | 2015-06-23 09:55:23 -0700 |
commit | 2a880312086147577e1e814bda6985fa97fb343b (patch) | |
tree | 58cbe4c66daf8ec1da048e9af62043ded63fd274 /core/java/android/content | |
parent | 0b50e56c070878211d9003e072128716bee445ba (diff) | |
download | frameworks_base-2a880312086147577e1e814bda6985fa97fb343b.zip frameworks_base-2a880312086147577e1e814bda6985fa97fb343b.tar.gz frameworks_base-2a880312086147577e1e814bda6985fa97fb343b.tar.bz2 |
Default permissions for carrier apps.
Grant permissions in the PHONE and LOCATION buckets to default carrier
apps as defined by the telephony stack. Provide a system API to grant
default permissions for carrier apps, as the set of apps may change
when a new SIM is inserted.
Since the phone process is separate from the system process, we need
to allow for binder calls to these APIs.
Also fix a log tag that is too long (android.util.Log drops messages
silently if the tag is > 23 characters).
Bug: 21696731
Change-Id: I98ca0c49c69f621f835ba57c1fd0505f2cec0d0d
Diffstat (limited to 'core/java/android/content')
-rw-r--r-- | core/java/android/content/pm/IPackageManager.aidl | 20 | ||||
-rw-r--r-- | core/java/android/content/pm/IPackagesProvider.aidl | 22 |
2 files changed, 34 insertions, 8 deletions
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl index 0c07bc3..dbbfce8 100644 --- a/core/java/android/content/pm/IPackageManager.aidl +++ b/core/java/android/content/pm/IPackageManager.aidl @@ -31,6 +31,7 @@ import android.content.pm.IPackageDeleteObserver2; import android.content.pm.IPackageDataObserver; import android.content.pm.IPackageMoveObserver; import android.content.pm.IPackageStatsObserver; +import android.content.pm.IPackagesProvider; import android.content.pm.IOnPermissionsChangeListener; import android.content.pm.IntentFilterVerificationInfo; import android.content.pm.InstrumentationInfo; @@ -299,18 +300,18 @@ interface IPackageManager { * As per {@link android.content.pm.PackageManager#getComponentEnabledSetting}. */ int getComponentEnabledSetting(in ComponentName componentName, int userId); - + /** * As per {@link android.content.pm.PackageManager#setApplicationEnabledSetting}. */ void setApplicationEnabledSetting(in String packageName, in int newState, int flags, int userId, String callingPackage); - + /** * As per {@link android.content.pm.PackageManager#getApplicationEnabledSetting}. */ int getApplicationEnabledSetting(in String packageName, int userId); - + /** * Set whether the given package should be considered stopped, making * it not visible to implicit intents that filter out stopped packages. @@ -363,7 +364,7 @@ interface IPackageManager { */ void freeStorage(in String volumeUuid, in long freeStorageSize, in IntentSender pi); - + /** * Delete all the cache files in an applications cache directory * @param packageName The package name of the application whose cache @@ -371,7 +372,7 @@ interface IPackageManager { * @param observer a callback used to notify when the deletion is finished. */ void deleteApplicationCacheFiles(in String packageName, IPackageDataObserver observer); - + /** * Clear the user data directory of an application. * @param packageName The package name of the application whose cache @@ -379,7 +380,7 @@ interface IPackageManager { * @param observer a callback used to notify when the operation is completed. */ void clearApplicationUserData(in String packageName, IPackageDataObserver observer, int userId); - + /** * Get package statistics including the code, data and cache size for * an already installed package @@ -389,7 +390,7 @@ interface IPackageManager { * retrieval of information is complete. */ void getPackageSizeInfo(in String packageName, int userHandle, IPackageStatsObserver observer); - + /** * Get a list of shared libraries that are available on the * system. @@ -403,7 +404,7 @@ interface IPackageManager { FeatureInfo[] getSystemAvailableFeatures(); boolean hasSystemFeature(String name); - + void enterSafeMode(); boolean isSafeMode(); void systemReady(); @@ -494,4 +495,7 @@ interface IPackageManager { void addOnPermissionsChangeListener(in IOnPermissionsChangeListener listener); void removeOnPermissionsChangeListener(in IOnPermissionsChangeListener listener); + + void grantDefaultPermissions(int userId); + void setCarrierAppPackagesProvider(in IPackagesProvider provider); } diff --git a/core/java/android/content/pm/IPackagesProvider.aidl b/core/java/android/content/pm/IPackagesProvider.aidl new file mode 100644 index 0000000..7d76c88 --- /dev/null +++ b/core/java/android/content/pm/IPackagesProvider.aidl @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.content.pm; + +/** {@hide} */ +interface IPackagesProvider { + String[] getPackages(int userId); +} |