Loading api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -755,6 +755,7 @@ package android.content.pm { public abstract class PackageManager { method @RequiresPermission("android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS") public abstract void addOnPermissionsChangeListener(@NonNull android.content.pm.PackageManager.OnPermissionsChangedListener); method public abstract boolean arePermissionsIndividuallyControlled(); method @Nullable public String getContentCaptureServicePackageName(); method @Nullable @RequiresPermission("android.permission.INTERACT_ACROSS_USERS_FULL") public abstract String getDefaultBrowserPackageNameAsUser(int); method @Nullable public String getIncidentReportApproverPackageName(); method public abstract int getInstallReason(@NonNull String, @NonNull android.os.UserHandle); Loading core/java/android/app/ApplicationPackageManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -3195,6 +3195,15 @@ public class ApplicationPackageManager extends PackageManager { } } @Override public String getContentCaptureServicePackageName() { try { return mPM.getContentCaptureServicePackageName(); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } @Override public boolean isPackageStateProtected(String packageName, int userId) { try { Loading core/java/android/content/pm/IPackageManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -692,6 +692,8 @@ interface IPackageManager { String getIncidentReportApproverPackageName(); String getContentCaptureServicePackageName(); boolean isPackageStateProtected(String packageName, int userId); void sendDeviceCustomizationReadyBroadcast(); Loading core/java/android/content/pm/PackageManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -7457,6 +7457,18 @@ public abstract class PackageManager { "getSetupWizardPackageName not implemented in subclass"); } /** * @return the system defined content capture package name, or null if there's none. * * @hide */ @TestApi @Nullable public String getContentCaptureServicePackageName() { throw new UnsupportedOperationException( "getContentCaptureServicePackageName not implemented in subclass"); } /** * @return the incident report approver app package name, or null if it's not defined * by the OEM. Loading services/core/java/com/android/server/pm/PackageManagerService.java +17 −0 Original line number Diff line number Diff line Loading @@ -19763,6 +19763,23 @@ public class PackageManagerService extends IPackageManager.Stub return telephonyPackageNames; } @Override public String getContentCaptureServicePackageName() { final String flattenedContentCaptureService = mContext.getString(R.string.config_defaultContentCaptureService); if (TextUtils.isEmpty(flattenedContentCaptureService)) { return null; } final ComponentName contentCaptureServiceComponentName = ComponentName.unflattenFromString(flattenedContentCaptureService); if (contentCaptureServiceComponentName == null) { return null; } return contentCaptureServiceComponentName.getPackageName(); } @Override public void setApplicationEnabledSetting(String appPackageName, int newState, int flags, int userId, String callingPackage) { Loading
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -755,6 +755,7 @@ package android.content.pm { public abstract class PackageManager { method @RequiresPermission("android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS") public abstract void addOnPermissionsChangeListener(@NonNull android.content.pm.PackageManager.OnPermissionsChangedListener); method public abstract boolean arePermissionsIndividuallyControlled(); method @Nullable public String getContentCaptureServicePackageName(); method @Nullable @RequiresPermission("android.permission.INTERACT_ACROSS_USERS_FULL") public abstract String getDefaultBrowserPackageNameAsUser(int); method @Nullable public String getIncidentReportApproverPackageName(); method public abstract int getInstallReason(@NonNull String, @NonNull android.os.UserHandle); Loading
core/java/android/app/ApplicationPackageManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -3195,6 +3195,15 @@ public class ApplicationPackageManager extends PackageManager { } } @Override public String getContentCaptureServicePackageName() { try { return mPM.getContentCaptureServicePackageName(); } catch (RemoteException e) { throw e.rethrowAsRuntimeException(); } } @Override public boolean isPackageStateProtected(String packageName, int userId) { try { Loading
core/java/android/content/pm/IPackageManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -692,6 +692,8 @@ interface IPackageManager { String getIncidentReportApproverPackageName(); String getContentCaptureServicePackageName(); boolean isPackageStateProtected(String packageName, int userId); void sendDeviceCustomizationReadyBroadcast(); Loading
core/java/android/content/pm/PackageManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -7457,6 +7457,18 @@ public abstract class PackageManager { "getSetupWizardPackageName not implemented in subclass"); } /** * @return the system defined content capture package name, or null if there's none. * * @hide */ @TestApi @Nullable public String getContentCaptureServicePackageName() { throw new UnsupportedOperationException( "getContentCaptureServicePackageName not implemented in subclass"); } /** * @return the incident report approver app package name, or null if it's not defined * by the OEM. Loading
services/core/java/com/android/server/pm/PackageManagerService.java +17 −0 Original line number Diff line number Diff line Loading @@ -19763,6 +19763,23 @@ public class PackageManagerService extends IPackageManager.Stub return telephonyPackageNames; } @Override public String getContentCaptureServicePackageName() { final String flattenedContentCaptureService = mContext.getString(R.string.config_defaultContentCaptureService); if (TextUtils.isEmpty(flattenedContentCaptureService)) { return null; } final ComponentName contentCaptureServiceComponentName = ComponentName.unflattenFromString(flattenedContentCaptureService); if (contentCaptureServiceComponentName == null) { return null; } return contentCaptureServiceComponentName.getPackageName(); } @Override public void setApplicationEnabledSetting(String appPackageName, int newState, int flags, int userId, String callingPackage) {