Loading api/current.txt +0 −11 Original line number Diff line number Diff line Loading @@ -8582,9 +8582,6 @@ package android.content.pm { field public java.lang.String targetPackage; } public class KeySet { } public class LabeledIntent extends android.content.Intent { ctor public LabeledIntent(android.content.Intent, java.lang.String, int, int); ctor public LabeledIntent(android.content.Intent, java.lang.String, java.lang.CharSequence, int); Loading Loading @@ -8820,7 +8817,6 @@ package android.content.pm { method public abstract java.util.List<android.content.pm.PackageInfo> getInstalledPackages(int); method public abstract java.lang.String getInstallerPackageName(java.lang.String); method public abstract android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException; method public abstract android.content.pm.KeySet getKeySetByAlias(java.lang.String, java.lang.String); method public abstract android.content.Intent getLaunchIntentForPackage(java.lang.String); method public abstract android.content.Intent getLeanbackLaunchIntentForPackage(java.lang.String); method public abstract java.lang.String getNameForUid(int); Loading @@ -8840,15 +8836,12 @@ package android.content.pm { method public abstract android.content.res.Resources getResourcesForApplication(android.content.pm.ApplicationInfo) throws android.content.pm.PackageManager.NameNotFoundException; method public abstract android.content.res.Resources getResourcesForApplication(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException; method public abstract android.content.pm.ServiceInfo getServiceInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException; method public abstract android.content.pm.KeySet getSigningKeySet(java.lang.String); method public abstract android.content.pm.FeatureInfo[] getSystemAvailableFeatures(); method public abstract java.lang.String[] getSystemSharedLibraryNames(); method public abstract java.lang.CharSequence getText(java.lang.String, int, android.content.pm.ApplicationInfo); method public abstract android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo); method public abstract boolean hasSystemFeature(java.lang.String); method public abstract boolean isSafeMode(); method public abstract boolean isSignedBy(java.lang.String, android.content.pm.KeySet); method public abstract boolean isSignedByExactly(java.lang.String, android.content.pm.KeySet); method public abstract java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers(android.content.Intent, int); method public abstract java.util.List<android.content.pm.ProviderInfo> queryContentProviders(java.lang.String, int, int); method public abstract java.util.List<android.content.pm.InstrumentationInfo> queryInstrumentation(java.lang.String, int); Loading Loading @@ -29805,7 +29798,6 @@ package android.test.mock { method public java.util.List<android.content.pm.PackageInfo> getInstalledPackages(int); method public java.lang.String getInstallerPackageName(java.lang.String); method public android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException; method public android.content.pm.KeySet getKeySetByAlias(java.lang.String, java.lang.String); method public android.content.Intent getLaunchIntentForPackage(java.lang.String); method public android.content.Intent getLeanbackLaunchIntentForPackage(java.lang.String); method public java.lang.String getNameForUid(int); Loading @@ -29824,15 +29816,12 @@ package android.test.mock { method public android.content.res.Resources getResourcesForApplication(android.content.pm.ApplicationInfo); method public android.content.res.Resources getResourcesForApplication(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException; method public android.content.pm.ServiceInfo getServiceInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException; method public android.content.pm.KeySet getSigningKeySet(java.lang.String); method public android.content.pm.FeatureInfo[] getSystemAvailableFeatures(); method public java.lang.String[] getSystemSharedLibraryNames(); method public java.lang.CharSequence getText(java.lang.String, int, android.content.pm.ApplicationInfo); method public android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo); method public boolean hasSystemFeature(java.lang.String); method public boolean isSafeMode(); method public boolean isSignedBy(java.lang.String, android.content.pm.KeySet); method public boolean isSignedByExactly(java.lang.String, android.content.pm.KeySet); method public java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers(android.content.Intent, int); method public java.util.List<android.content.pm.ProviderInfo> queryContentProviders(java.lang.String, int, int); method public java.util.List<android.content.pm.InstrumentationInfo> queryInstrumentation(java.lang.String, int); core/java/android/app/ApplicationPackageManager.java +12 −17 Original line number Diff line number Diff line Loading @@ -1494,57 +1494,52 @@ final class ApplicationPackageManager extends PackageManager { return false; } /** @hide */ @Override public KeySet getKeySetByAlias(String packageName, String alias) { Preconditions.checkNotNull(packageName); Preconditions.checkNotNull(alias); IBinder keySetToken; KeySet ks; try { keySetToken = mPM.getKeySetByAlias(packageName, alias); ks = mPM.getKeySetByAlias(packageName, alias); } catch (RemoteException e) { return null; } if (keySetToken == null) { return null; } return new KeySet(keySetToken); return ks; } /** @hide */ @Override public KeySet getSigningKeySet(String packageName) { Preconditions.checkNotNull(packageName); IBinder keySetToken; KeySet ks; try { keySetToken = mPM.getSigningKeySet(packageName); ks = mPM.getSigningKeySet(packageName); } catch (RemoteException e) { return null; } if (keySetToken == null) { return null; return ks; } return new KeySet(keySetToken); } /** @hide */ @Override public boolean isSignedBy(String packageName, KeySet ks) { Preconditions.checkNotNull(packageName); Preconditions.checkNotNull(ks); IBinder keySetToken = ks.getToken(); try { return mPM.isPackageSignedByKeySet(packageName, keySetToken); return mPM.isPackageSignedByKeySet(packageName, ks); } catch (RemoteException e) { return false; } } /** @hide */ @Override public boolean isSignedByExactly(String packageName, KeySet ks) { Preconditions.checkNotNull(packageName); Preconditions.checkNotNull(ks); IBinder keySetToken = ks.getToken(); try { return mPM.isPackageSignedByKeySetExactly(packageName, keySetToken); return mPM.isPackageSignedByKeySetExactly(packageName, ks); } catch (RemoteException e) { return false; } Loading core/java/android/content/pm/IPackageManager.aidl +5 −4 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.content.pm.IPackageDataObserver; import android.content.pm.IPackageMoveObserver; import android.content.pm.IPackageStatsObserver; import android.content.pm.InstrumentationInfo; import android.content.pm.KeySet; import android.content.pm.PackageInfo; import android.content.pm.ManifestDigest; import android.content.pm.PackageCleanItem; Loading Loading @@ -454,8 +455,8 @@ interface IPackageManager { boolean setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId); boolean getBlockUninstallForUser(String packageName, int userId); IBinder getKeySetByAlias(String packageName, String alias); IBinder getSigningKeySet(String packageName); boolean isPackageSignedByKeySet(String packageName, IBinder ks); boolean isPackageSignedByKeySetExactly(String packageName, IBinder ks); KeySet getKeySetByAlias(String packageName, String alias); KeySet getSigningKeySet(String packageName); boolean isPackageSignedByKeySet(String packageName, in KeySet ks); boolean isPackageSignedByKeySetExactly(String packageName, in KeySet ks); } core/java/android/content/pm/KeySet.aidl 0 → 100644 +19 −0 Original line number Diff line number Diff line /** * Copyright (c) 2014, 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; parcelable KeySet; No newline at end of file core/java/android/content/pm/KeySet.java +59 −1 Original line number Diff line number Diff line Loading @@ -17,13 +17,16 @@ package android.content.pm; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; /** * Represents a {@code KeySet} that has been declared in the AndroidManifest.xml * file for the application. A {@code KeySet} can be used explicitly to * represent a trust relationship with other applications on the device. * @hide */ public class KeySet { public class KeySet implements Parcelable { private IBinder token; Loading @@ -40,6 +43,7 @@ public class KeySet { return token; } /** @hide */ @Override public boolean equals(Object o) { if (o instanceof KeySet) { Loading @@ -48,4 +52,58 @@ public class KeySet { } return false; } /** @hide */ @Override public int hashCode() { return token.hashCode(); } /** * Implement Parcelable * @hide */ public static final Parcelable.Creator<KeySet> CREATOR = new Parcelable.Creator<KeySet>() { /** * Create a KeySet from a Parcel * * @param in The parcel containing the KeySet */ public KeySet createFromParcel(Parcel source) { return readFromParcel(source); } /** * Create an array of null KeySets */ public KeySet[] newArray(int size) { return new KeySet[size]; } }; /** * @hide */ private static KeySet readFromParcel(Parcel in) { IBinder token = in.readStrongBinder(); return new KeySet(token); } /** * @hide */ @Override public void writeToParcel(Parcel out, int flags) { out.writeStrongBinder(token); } /** * @hide */ @Override public int describeContents() { return 0; } } No newline at end of file Loading
api/current.txt +0 −11 Original line number Diff line number Diff line Loading @@ -8582,9 +8582,6 @@ package android.content.pm { field public java.lang.String targetPackage; } public class KeySet { } public class LabeledIntent extends android.content.Intent { ctor public LabeledIntent(android.content.Intent, java.lang.String, int, int); ctor public LabeledIntent(android.content.Intent, java.lang.String, java.lang.CharSequence, int); Loading Loading @@ -8820,7 +8817,6 @@ package android.content.pm { method public abstract java.util.List<android.content.pm.PackageInfo> getInstalledPackages(int); method public abstract java.lang.String getInstallerPackageName(java.lang.String); method public abstract android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException; method public abstract android.content.pm.KeySet getKeySetByAlias(java.lang.String, java.lang.String); method public abstract android.content.Intent getLaunchIntentForPackage(java.lang.String); method public abstract android.content.Intent getLeanbackLaunchIntentForPackage(java.lang.String); method public abstract java.lang.String getNameForUid(int); Loading @@ -8840,15 +8836,12 @@ package android.content.pm { method public abstract android.content.res.Resources getResourcesForApplication(android.content.pm.ApplicationInfo) throws android.content.pm.PackageManager.NameNotFoundException; method public abstract android.content.res.Resources getResourcesForApplication(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException; method public abstract android.content.pm.ServiceInfo getServiceInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException; method public abstract android.content.pm.KeySet getSigningKeySet(java.lang.String); method public abstract android.content.pm.FeatureInfo[] getSystemAvailableFeatures(); method public abstract java.lang.String[] getSystemSharedLibraryNames(); method public abstract java.lang.CharSequence getText(java.lang.String, int, android.content.pm.ApplicationInfo); method public abstract android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo); method public abstract boolean hasSystemFeature(java.lang.String); method public abstract boolean isSafeMode(); method public abstract boolean isSignedBy(java.lang.String, android.content.pm.KeySet); method public abstract boolean isSignedByExactly(java.lang.String, android.content.pm.KeySet); method public abstract java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers(android.content.Intent, int); method public abstract java.util.List<android.content.pm.ProviderInfo> queryContentProviders(java.lang.String, int, int); method public abstract java.util.List<android.content.pm.InstrumentationInfo> queryInstrumentation(java.lang.String, int); Loading Loading @@ -29805,7 +29798,6 @@ package android.test.mock { method public java.util.List<android.content.pm.PackageInfo> getInstalledPackages(int); method public java.lang.String getInstallerPackageName(java.lang.String); method public android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException; method public android.content.pm.KeySet getKeySetByAlias(java.lang.String, java.lang.String); method public android.content.Intent getLaunchIntentForPackage(java.lang.String); method public android.content.Intent getLeanbackLaunchIntentForPackage(java.lang.String); method public java.lang.String getNameForUid(int); Loading @@ -29824,15 +29816,12 @@ package android.test.mock { method public android.content.res.Resources getResourcesForApplication(android.content.pm.ApplicationInfo); method public android.content.res.Resources getResourcesForApplication(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException; method public android.content.pm.ServiceInfo getServiceInfo(android.content.ComponentName, int) throws android.content.pm.PackageManager.NameNotFoundException; method public android.content.pm.KeySet getSigningKeySet(java.lang.String); method public android.content.pm.FeatureInfo[] getSystemAvailableFeatures(); method public java.lang.String[] getSystemSharedLibraryNames(); method public java.lang.CharSequence getText(java.lang.String, int, android.content.pm.ApplicationInfo); method public android.content.res.XmlResourceParser getXml(java.lang.String, int, android.content.pm.ApplicationInfo); method public boolean hasSystemFeature(java.lang.String); method public boolean isSafeMode(); method public boolean isSignedBy(java.lang.String, android.content.pm.KeySet); method public boolean isSignedByExactly(java.lang.String, android.content.pm.KeySet); method public java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceivers(android.content.Intent, int); method public java.util.List<android.content.pm.ProviderInfo> queryContentProviders(java.lang.String, int, int); method public java.util.List<android.content.pm.InstrumentationInfo> queryInstrumentation(java.lang.String, int);
core/java/android/app/ApplicationPackageManager.java +12 −17 Original line number Diff line number Diff line Loading @@ -1494,57 +1494,52 @@ final class ApplicationPackageManager extends PackageManager { return false; } /** @hide */ @Override public KeySet getKeySetByAlias(String packageName, String alias) { Preconditions.checkNotNull(packageName); Preconditions.checkNotNull(alias); IBinder keySetToken; KeySet ks; try { keySetToken = mPM.getKeySetByAlias(packageName, alias); ks = mPM.getKeySetByAlias(packageName, alias); } catch (RemoteException e) { return null; } if (keySetToken == null) { return null; } return new KeySet(keySetToken); return ks; } /** @hide */ @Override public KeySet getSigningKeySet(String packageName) { Preconditions.checkNotNull(packageName); IBinder keySetToken; KeySet ks; try { keySetToken = mPM.getSigningKeySet(packageName); ks = mPM.getSigningKeySet(packageName); } catch (RemoteException e) { return null; } if (keySetToken == null) { return null; return ks; } return new KeySet(keySetToken); } /** @hide */ @Override public boolean isSignedBy(String packageName, KeySet ks) { Preconditions.checkNotNull(packageName); Preconditions.checkNotNull(ks); IBinder keySetToken = ks.getToken(); try { return mPM.isPackageSignedByKeySet(packageName, keySetToken); return mPM.isPackageSignedByKeySet(packageName, ks); } catch (RemoteException e) { return false; } } /** @hide */ @Override public boolean isSignedByExactly(String packageName, KeySet ks) { Preconditions.checkNotNull(packageName); Preconditions.checkNotNull(ks); IBinder keySetToken = ks.getToken(); try { return mPM.isPackageSignedByKeySetExactly(packageName, keySetToken); return mPM.isPackageSignedByKeySetExactly(packageName, ks); } catch (RemoteException e) { return false; } Loading
core/java/android/content/pm/IPackageManager.aidl +5 −4 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.content.pm.IPackageDataObserver; import android.content.pm.IPackageMoveObserver; import android.content.pm.IPackageStatsObserver; import android.content.pm.InstrumentationInfo; import android.content.pm.KeySet; import android.content.pm.PackageInfo; import android.content.pm.ManifestDigest; import android.content.pm.PackageCleanItem; Loading Loading @@ -454,8 +455,8 @@ interface IPackageManager { boolean setBlockUninstallForUser(String packageName, boolean blockUninstall, int userId); boolean getBlockUninstallForUser(String packageName, int userId); IBinder getKeySetByAlias(String packageName, String alias); IBinder getSigningKeySet(String packageName); boolean isPackageSignedByKeySet(String packageName, IBinder ks); boolean isPackageSignedByKeySetExactly(String packageName, IBinder ks); KeySet getKeySetByAlias(String packageName, String alias); KeySet getSigningKeySet(String packageName); boolean isPackageSignedByKeySet(String packageName, in KeySet ks); boolean isPackageSignedByKeySetExactly(String packageName, in KeySet ks); }
core/java/android/content/pm/KeySet.aidl 0 → 100644 +19 −0 Original line number Diff line number Diff line /** * Copyright (c) 2014, 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; parcelable KeySet; No newline at end of file
core/java/android/content/pm/KeySet.java +59 −1 Original line number Diff line number Diff line Loading @@ -17,13 +17,16 @@ package android.content.pm; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; /** * Represents a {@code KeySet} that has been declared in the AndroidManifest.xml * file for the application. A {@code KeySet} can be used explicitly to * represent a trust relationship with other applications on the device. * @hide */ public class KeySet { public class KeySet implements Parcelable { private IBinder token; Loading @@ -40,6 +43,7 @@ public class KeySet { return token; } /** @hide */ @Override public boolean equals(Object o) { if (o instanceof KeySet) { Loading @@ -48,4 +52,58 @@ public class KeySet { } return false; } /** @hide */ @Override public int hashCode() { return token.hashCode(); } /** * Implement Parcelable * @hide */ public static final Parcelable.Creator<KeySet> CREATOR = new Parcelable.Creator<KeySet>() { /** * Create a KeySet from a Parcel * * @param in The parcel containing the KeySet */ public KeySet createFromParcel(Parcel source) { return readFromParcel(source); } /** * Create an array of null KeySets */ public KeySet[] newArray(int size) { return new KeySet[size]; } }; /** * @hide */ private static KeySet readFromParcel(Parcel in) { IBinder token = in.readStrongBinder(); return new KeySet(token); } /** * @hide */ @Override public void writeToParcel(Parcel out, int flags) { out.writeStrongBinder(token); } /** * @hide */ @Override public int describeContents() { return 0; } } No newline at end of file