Merge "Addess API council comments" into oc-dev

This commit is contained in:
TreeHugger Robot
2017-05-01 22:48:58 +00:00
committed by Android (Google) Code Review
5 changed files with 6 additions and 8 deletions

View File

@@ -10927,7 +10927,7 @@ package android.content.pm {
method public java.util.List<android.content.pm.VersionedPackage> getDependentPackages();
method public java.lang.String getName();
method public int getType();
method public long getVersion();
method public int getVersion();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.content.pm.SharedLibraryInfo> CREATOR;
field public static final int TYPE_BUILTIN = 0; // 0x0

View File

@@ -11693,7 +11693,7 @@ package android.content.pm {
method public java.util.List<android.content.pm.VersionedPackage> getDependentPackages();
method public java.lang.String getName();
method public int getType();
method public long getVersion();
method public int getVersion();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.content.pm.SharedLibraryInfo> CREATOR;
field public static final int TYPE_BUILTIN = 0; // 0x0

View File

@@ -10968,7 +10968,7 @@ package android.content.pm {
method public java.util.List<android.content.pm.VersionedPackage> getDependentPackages();
method public java.lang.String getName();
method public int getType();
method public long getVersion();
method public int getVersion();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.content.pm.SharedLibraryInfo> CREATOR;
field public static final int TYPE_BUILTIN = 0; // 0x0

View File

@@ -131,7 +131,7 @@ public final class SharedLibraryInfo implements Parcelable {
*
* @return The version.
*/
public @IntRange(from = -1) long getVersion() {
public @IntRange(from = -1) int getVersion() {
return mVersion;
}

View File

@@ -4360,8 +4360,7 @@ public class PackageManagerService extends IPackageManager.Stub
}
SharedLibraryInfo resLibInfo = new SharedLibraryInfo(libInfo.getName(),
// TODO: Remove cast for lib version once internally we support longs.
(int) libInfo.getVersion(), libInfo.getType(),
libInfo.getVersion(), libInfo.getType(),
libInfo.getDeclaringPackage(), getPackagesUsingSharedLibraryLPr(libInfo,
flags, userId));
@@ -17750,8 +17749,7 @@ public class PackageManagerService extends IPackageManager.Stub
for (int i = 0; i < versionCount; i++) {
SharedLibraryEntry libEntry = versionedLib.valueAt(i);
if (versionsCallerCanSee != null && versionsCallerCanSee.indexOfKey(
// TODO: Remove cast for lib version once internally we support longs.
(int) libEntry.info.getVersion()) < 0) {
libEntry.info.getVersion()) < 0) {
continue;
}
// TODO: We will change version code to long, so in the new API it is long