diff options
author | Svet Ganov <svetoslavganov@google.com> | 2015-06-19 22:26:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-19 22:26:32 +0000 |
commit | 1e575a0f32a00fc6a2f9a71fe1d1eb4426c71787 (patch) | |
tree | 542a3e7078fcf45f101aba84677a0bf04b1dbde3 /core | |
parent | 53a33da9af0cb09fb154db7dbd7c25e8a9936a7f (diff) | |
parent | adc1cf46045ae756d3a9ccbccf6b0f894e4c1edd (diff) | |
download | frameworks_base-1e575a0f32a00fc6a2f9a71fe1d1eb4426c71787.zip frameworks_base-1e575a0f32a00fc6a2f9a71fe1d1eb4426c71787.tar.gz frameworks_base-1e575a0f32a00fc6a2f9a71fe1d1eb4426c71787.tar.bz2 |
Merge "Only grant runtime permissions to special components." into mnc-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 7 | ||||
-rw-r--r-- | core/java/android/content/pm/PackageManagerInternal.java | 58 | ||||
-rw-r--r-- | core/java/android/content/pm/PackageParser.java | 7 |
3 files changed, 72 insertions, 0 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 9fb6f4d..6feb860 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -962,6 +962,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { /** * @hide */ + public boolean isPrivilegedApp() { + return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0; + } + + /** + * @hide + */ public boolean isUpdatedSystemApp() { return (flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; } diff --git a/core/java/android/content/pm/PackageManagerInternal.java b/core/java/android/content/pm/PackageManagerInternal.java new file mode 100644 index 0000000..7599bd6 --- /dev/null +++ b/core/java/android/content/pm/PackageManagerInternal.java @@ -0,0 +1,58 @@ +/* + * 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; + +import android.annotation.NonNull; + +/** + * Package manager local system service interface. + * + * @hide Only for use within the system server. + */ +public abstract class PackageManagerInternal { + + /** + * Provider for package names. + */ + public interface PackagesProvider { + + /** + * Gets the packages for a given user. + * @param userId The user id. + * @return The package names. + */ + public String[] getPackages(int userId); + } + + /** + * Sets the location provider packages provider. + * @param provider The packages provider. + */ + public abstract void setLocationPackagesProvider(PackagesProvider provider); + + /** + * Sets the input method packages provider. + * @param provider The packages provider. + */ + public abstract void setImePackagesProvider(PackagesProvider provider); + + /** + * Sets the voice interaction packages provider. + * @param provider The packages provider. + */ + public abstract void setVoiceInteractionPackagesProvider(PackagesProvider provider); +} diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 287e0c5..faf71ee 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -4508,6 +4508,13 @@ public class PackageParser { /** * @hide */ + public boolean isPrivilegedApp() { + return applicationInfo.isPrivilegedApp(); + } + + /** + * @hide + */ public boolean isUpdatedSystemApp() { return applicationInfo.isUpdatedSystemApp(); } |