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

Commit 2d3ffe08 authored by Nikita Dubrovsky's avatar Nikita Dubrovsky Committed by Android (Google) Code Review
Browse files

Merge "Deprecate and no-op test API getContentCaptureServicePackageName"

parents c768a834 22f3baa8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -822,7 +822,7 @@ package android.content.pm {
  }

  public abstract class PackageManager {
    method @Nullable public String getContentCaptureServicePackageName();
    method @Deprecated @Nullable public final String getContentCaptureServicePackageName();
    method @Nullable public String getDefaultTextClassifierPackageName();
    method @RequiresPermission(android.Manifest.permission.INJECT_EVENTS) public android.os.IBinder getHoldLockToken();
    method public abstract int getInstallReason(@NonNull String, @NonNull android.os.UserHandle);
+0 −9
Original line number Diff line number Diff line
@@ -3656,15 +3656,6 @@ 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 {
+0 −2
Original line number Diff line number Diff line
@@ -715,8 +715,6 @@ interface IPackageManager {

    String getIncidentReportApproverPackageName();

    String getContentCaptureServicePackageName();

    boolean isPackageStateProtected(String packageName, int userId);

    void sendDeviceCustomizationReadyBroadcast();
+9 −3
Original line number Diff line number Diff line
@@ -10083,15 +10083,21 @@ public abstract class PackageManager {
    }

    /**
     * @return the system defined content capture package name, or null if there's none.
     * @deprecated This function throws an {@link UnsupportedOperationException}. For pre-granting
     * permissions, instead of looking up the package that provides {@code ContentCaptureService},
     * use roles.
     *
     * @hide
     */
    // This function cannot yet be removed because it is referenced from GTS tests. The tests have
    // been updated to not rely on it when running on Android T and above, but in order to compile
    // the tests we must keep this method.
    @Deprecated
    @TestApi
    @Nullable
    public String getContentCaptureServicePackageName() {
    public final String getContentCaptureServicePackageName() {
        throw new UnsupportedOperationException(
                "getContentCaptureServicePackageName not implemented in subclass");
                "getContentCaptureServicePackageName is deprecated");
    }

    /**
+0 −8
Original line number Diff line number Diff line
@@ -387,14 +387,6 @@ public abstract class IPackageManagerBase extends IPackageManager.Stub {
        return snapshot().getComponentEnabledSetting(component, Binder.getCallingUid(), userId);
    }

    @Override
    @Deprecated
    public final String getContentCaptureServicePackageName() {
        return mService.ensureSystemPackageName(snapshot(),
                mService.getPackageFromComponentString(
                        R.string.config_defaultContentCaptureService));
    }

    @Nullable
    @Override
    @Deprecated