resolve merge conflicts of 380b01a to nyc-mr1-dev-plus-aosp

Change-Id: If97f5d5b4d67177b8160b96894a35d685573c46a
This commit is contained in:
Adrian Roos
2016-06-16 18:58:04 -07:00
6 changed files with 31 additions and 61 deletions

View File

@@ -82,13 +82,11 @@ public class RedactionInterstitial extends SettingsActivity {
}
public static class RedactionInterstitialFragment extends SettingsPreferenceFragment
implements RadioGroup.OnCheckedChangeListener, CompoundButton.OnCheckedChangeListener,
View.OnClickListener {
implements RadioGroup.OnCheckedChangeListener, View.OnClickListener {
private RadioGroup mRadioGroup;
private RestrictedRadioButton mShowAllButton;
private RestrictedRadioButton mRedactSensitiveButton;
private RestrictedCheckBox mRemoteInputCheckbox;
private int mUserId;
@Override
@@ -109,9 +107,6 @@ public class RedactionInterstitial extends SettingsActivity {
mShowAllButton = (RestrictedRadioButton) view.findViewById(R.id.show_all);
mRedactSensitiveButton =
(RestrictedRadioButton) view.findViewById(R.id.redact_sensitive);
mRemoteInputCheckbox =
(RestrictedCheckBox) view.findViewById(R.id.lockscreen_remote_input);
mRemoteInputCheckbox.setOnCheckedChangeListener(this);
mRadioGroup.setOnCheckedChangeListener(this);
mUserId = Utils.getUserIdFromBundle(
@@ -151,9 +146,6 @@ public class RedactionInterstitial extends SettingsActivity {
KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS);
checkNotificationFeaturesAndSetDisabled(mRedactSensitiveButton,
KEYGUARD_DISABLE_SECURE_NOTIFICATIONS);
mRemoteInputCheckbox.setDisabledByAdmin(
RestrictedLockUtils.checkIfKeyguardFeaturesDisabled(getActivity(),
DevicePolicyManager.KEYGUARD_DISABLE_REMOTE_INPUT, mUserId));
loadFromSettings();
}
@@ -180,12 +172,6 @@ public class RedactionInterstitial extends SettingsActivity {
}
mRadioGroup.check(checkedButtonId);
boolean allowRemoteInput = Settings.Secure.getIntForUser(getContentResolver(),
Settings.Secure.LOCK_SCREEN_ALLOW_REMOTE_INPUT, 0, mUserId) != 0;
mRemoteInputCheckbox.setChecked(!allowRemoteInput);
updateRemoteInputCheckboxVisibility();
}
@Override
@@ -198,23 +184,6 @@ public class RedactionInterstitial extends SettingsActivity {
Settings.Secure.putIntForUser(getContentResolver(),
Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, enabled ? 1 : 0, mUserId);
updateRemoteInputCheckboxVisibility();
}
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
if (buttonView == mRemoteInputCheckbox) {
Settings.Secure.putIntForUser(getContentResolver(),
Settings.Secure.LOCK_SCREEN_ALLOW_REMOTE_INPUT, checked ? 0 : 1, mUserId);
}
}
private void updateRemoteInputCheckboxVisibility() {
boolean visible = mRadioGroup.getCheckedRadioButtonId() == R.id.show_all;
boolean isManagedProfile = Utils.isManagedProfile(UserManager.get(getPrefContext()),
mUserId);
mRemoteInputCheckbox
.setVisibility((visible && !isManagedProfile) ? View.VISIBLE : View.INVISIBLE);
}
}
}