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

Commit 774394e2 authored by Alex Stetson's avatar Alex Stetson Committed by Android (Google) Code Review
Browse files

Merge "Re-restrict phone ops on user addition" into tm-dev

parents 0007c4f0 d946a5e1
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -944,6 +944,15 @@ public class InCallController extends CallsManagerListenerBase implements
        }
    };

    private final BroadcastReceiver mUserAddedReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            if (Intent.ACTION_USER_ADDED.equals(intent.getAction())) {
                restrictPhoneCallOps();
            }
        }
    };

    private final SystemStateListener mSystemStateListener = new SystemStateListener() {
        @Override
        public void onCarModeChanged(int priority, String packageName, boolean isCarMode) {
@@ -1052,6 +1061,7 @@ public class InCallController extends CallsManagerListenerBase implements
        mSystemStateHelper.addListener(mSystemStateListener);
        mClockProxy = clockProxy;
        restrictPhoneCallOps();
        mContext.registerReceiver(mUserAddedReceiver, new IntentFilter(Intent.ACTION_USER_ADDED));
    }

    private void restrictPhoneCallOps() {