Ensure enable autofill checkbox appearance matches setting

This commit is contained in:
Matthew Wong
2015-08-14 17:00:28 -04:00
parent ebe1f831e7
commit 5caa665111

View File

@@ -212,14 +212,15 @@ public class UserPreference extends AppCompatActivity {
startActivity(intent); startActivity(intent);
} }
}). }).
setNegativeButton(R.string.dialog_cancel,new DialogInterface.OnClickListener() { setNegativeButton(R.string.dialog_cancel, null).
setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onDismiss(DialogInterface dialog) {
((CheckBoxPreference) findPreference("autofill_enable")) ((CheckBoxPreference) findPreference("autofill_enable"))
.setChecked(((UserPreference) getActivity()).isServiceEnabled()); .setChecked(((UserPreference) getActivity()).isServiceEnabled());
} }
}).show(); }).show();
return false; return true;
} }
}); });
} }