Merge "Add documents for isOem/Vendor/Product" am: 67b816def6

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1657399

Change-Id: Ib6deea94f8e17808b355b586dc29c2e1c6aa380c
This commit is contained in:
Paul Hu
2021-03-31 07:13:18 +00:00
committed by Automerger Merge Worker

View File

@@ -2167,7 +2167,10 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
return (flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) == 0; return (flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) == 0;
} }
/** @hide */ /**
* True if the application is pre-installed on the OEM partition of the system image.
* @hide
*/
@SystemApi @SystemApi
public boolean isOem() { public boolean isOem() {
return (privateFlags & ApplicationInfo.PRIVATE_FLAG_OEM) != 0; return (privateFlags & ApplicationInfo.PRIVATE_FLAG_OEM) != 0;
@@ -2215,13 +2218,19 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
return (flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; return (flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
} }
/** @hide */ /**
* True if the application is pre-installed on the vendor partition of the system image.
* @hide
*/
@SystemApi @SystemApi
public boolean isVendor() { public boolean isVendor() {
return (privateFlags & ApplicationInfo.PRIVATE_FLAG_VENDOR) != 0; return (privateFlags & ApplicationInfo.PRIVATE_FLAG_VENDOR) != 0;
} }
/** @hide */ /**
* True if the application is pre-installed on the product partition of the system image.
* @hide
*/
@SystemApi @SystemApi
public boolean isProduct() { public boolean isProduct() {
return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0; return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0;