Ask profile password before unifying to prevent untrusted reset

Test: make -j RunSettingsRoboTests
Test: manual, unify when profile lock is compliant
Test: manual, unify when profile lock is not compliant
Test: manual, unify when profile lock is empty
Fixes: 110262879

Change-Id: I0dfa885f2a0e44e09c217b3e7766b367f1340c9e
This commit is contained in:
Pavel Grafov
2018-06-20 17:20:05 +01:00
parent 8700777839
commit 80d9020cc2
4 changed files with 82 additions and 59 deletions

View File

@@ -59,15 +59,8 @@ public class UnificationConfirmationDialog extends InstrumentedDialogFragment {
.setPositiveButton(
compliant ? R.string.lock_settings_profile_unification_dialog_confirm
: R.string
.lock_settings_profile_unification_dialog_uncompliant_confirm,
(dialog, whichButton) -> {
if (compliant) {
parentFragment.launchConfirmDeviceLockForUnification();
} else {
parentFragment.unifyUncompliantLocks();
}
}
)
.lock_settings_profile_unification_dialog_uncompliant_confirm,
(dialog, whichButton) -> parentFragment.startUnification())
.setNegativeButton(R.string.cancel, null)
.create();
}