зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1255461 - Use PrefsHelper to set master password; r=margaret
This commit is contained in:
Родитель
86e5423fc1
Коммит
ed8e672f0d
|
@ -1385,19 +1385,9 @@ OnSharedPreferenceChangeListener
|
||||||
.setPositiveButton(R.string.button_ok, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.button_ok, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
JSONObject jsonPref = new JSONObject();
|
PrefsHelper.setPref(PREFS_MP_ENABLED,
|
||||||
try {
|
input1.getText().toString(),
|
||||||
jsonPref.put("name", PREFS_MP_ENABLED);
|
/* flush */ true);
|
||||||
jsonPref.put("flush", true);
|
|
||||||
jsonPref.put("type", "string");
|
|
||||||
jsonPref.put("value", input1.getText().toString());
|
|
||||||
|
|
||||||
GeckoEvent event = GeckoEvent.createBroadcastEvent("Preferences:Set", jsonPref.toString());
|
|
||||||
GeckoAppShell.sendEventToGecko(event);
|
|
||||||
} catch(Exception ex) {
|
|
||||||
Log.e(LOGTAG, "Error setting master password", ex);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {
|
.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче