Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc8b163d authored by paulhu's avatar paulhu Committed by Paul Hu
Browse files

Expose some ApplicationInfo#is* methods as in-process API

Connectivity service is going to become a mainline module which
will not able to access hidden APIs. But PermissionMonitor needs
ApplicationInfo#is(Vendor|Oem|Product) APIs to know the package
partition. Thus, expose them as in-process API to support the
usage.

Bug: 170593746
Test: atest FrameworksNetTests
Change-Id: Ie4ffb2b47539786dd51b885ca93c8813d039c4da
parent a1c0a065
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2101,6 +2101,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
    }

    /** @hide */
    @SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
    public boolean isOem() {
        return (privateFlags & ApplicationInfo.PRIVATE_FLAG_OEM) != 0;
    }
@@ -2148,11 +2149,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
    }

    /** @hide */
    @SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
    public boolean isVendor() {
        return (privateFlags & ApplicationInfo.PRIVATE_FLAG_VENDOR) != 0;
    }

    /** @hide */
    @SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
    public boolean isProduct() {
        return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0;
    }