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

Commit 5c1bf501 authored by Alex Johnston's avatar Alex Johnston Committed by Automerger Merge Worker
Browse files

Merge "SettingsLib: Disable USB debugging if USB signaling is off" into sc-dev am: 5dc3fd46

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13901250

Change-Id: Iafc3bf13e1204c5e1f3eda83a325196061fc4547
parents 1b9a60f2 5dc3fd46
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -86,6 +86,15 @@ public abstract class AbstractEnableAdbPreferenceController extends
        }
    }

    @Override
    protected void onDeveloperOptionsSwitchEnabled() {
        super.onDeveloperOptionsSwitchEnabled();
        if (isAvailable()) {
            mPreference.setDisabledByAdmin(
                    checkIfUsbDataSignalingIsDisabled(mContext, UserHandle.myUserId()));
        }
    }

    public void enablePreference(boolean enabled) {
        if (isAvailable()) {
            mPreference.setEnabled(enabled);