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

Commit 77df6f31 authored by Svet Ganov's avatar Svet Ganov
Browse files

Remove permission review build property - framework

Change-Id: Ifcfd436f2d57a6006ef804292d2875434e4669da
parent 7791cc9b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -179,6 +179,10 @@ package android.os {
    ctor public BatteryManager();
  }

  public class Build {
    field public static final boolean PERMISSIONS_REVIEW_REQUIRED;
  }

  public final class PowerManager {
    method public void goToSleep(long);
    method public deprecated void userActivity(long, boolean);
+4 −0
Original line number Diff line number Diff line
@@ -179,6 +179,10 @@ package android.os {
    ctor public BatteryManager();
  }

  public class Build {
    field public static final boolean PERMISSIONS_REVIEW_REQUIRED;
  }

  public final class PowerManager {
    method public void goToSleep(long);
    method public deprecated void userActivity(long, boolean);
+1 −0
Original line number Diff line number Diff line
@@ -847,6 +847,7 @@ public class Build {
     * is installed.
     *
     * @hide
     * @removed
     */
    @SystemApi
    public static final boolean PERMISSIONS_REVIEW_REQUIRED =
+11 −3
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.bluetooth.IBluetoothManager;
import android.bluetooth.IBluetoothManagerCallback;
import android.bluetooth.IBluetoothProfileServiceConnection;
import android.bluetooth.IBluetoothStateChangeCallback;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
@@ -248,8 +249,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {

        mContext = context;

        mPermissionReviewRequired = Build.PERMISSIONS_REVIEW_REQUIRED
                    || context.getResources().getBoolean(
        mPermissionReviewRequired = context.getResources().getBoolean(
                com.android.internal.R.bool.config_permissionReviewRequired);

        mBluetooth = null;
@@ -742,7 +742,15 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
            // Legacy apps in permission review mode trigger a user prompt
            if (applicationInfo.targetSdkVersion < Build.VERSION_CODES.M) {
                Intent intent = new Intent(intentAction);
                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                        | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
                try {
                    mContext.startActivity(intent);
                } catch (ActivityNotFoundException e) {
                    // Shouldn't happen
                    Slog.e(TAG, "Intent to handle action " + intentAction + " missing");
                    return false;
                }
                return true;
            }
        } catch (PackageManager.NameNotFoundException e) {
+2 −2
Original line number Diff line number Diff line
@@ -368,7 +368,7 @@ public final class ActiveServices {
        // we do not start the service and launch a review activity if the calling app
        // is in the foreground passing it a pending intent to start the service when
        // review is completed.
        if (mAm.mPermissionReviewRequired || Build.PERMISSIONS_REVIEW_REQUIRED) {
        if (mAm.mPermissionReviewRequired) {
            if (!requestStartTargetPermissionsReviewIfNeededLocked(r, callingPackage,
                    callingUid, service, callerFg, userId)) {
                return null;
@@ -912,7 +912,7 @@ public final class ActiveServices {
        // we schedule binding to the service but do not start its process, then
        // we launch a review activity to which is passed a callback to invoke
        // when done to start the bound service's process to completing the binding.
        if (mAm.mPermissionReviewRequired || Build.PERMISSIONS_REVIEW_REQUIRED) {
        if (mAm.mPermissionReviewRequired) {
            if (mAm.getPackageManagerInternalLocked().isPermissionsReviewRequired(
                    s.packageName, s.userId)) {

Loading