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

Commit 5dc3fd46 authored by Alex Johnston's avatar Alex Johnston Committed by Android (Google) Code Review
Browse files

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

parents 745af612 aaea2d22
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);