Bug 1182248 - Debug mode setting updated from static flag r=nalexander.

* The checkbox setting would be reflected until the FxAccountUtils is not gc-ed.

--HG--
extra : commitid : 7DYPFsmPhsh
extra : rebase_source : 8871d267f831e9411db521184c13e5e19a1948a1
This commit is contained in:
vivek 2015-07-10 00:34:51 +03:00
parent 03b699b5f3
commit 950c51e39d

View File

@ -202,6 +202,12 @@ public class FxAccountStatusActivity extends LocaleAwareFragmentActivity {
boolean enabled = !AppConstants.MOZILLA_OFFICIAL || AppConstants.NIGHTLY_BUILD || AppConstants.DEBUG_BUILD;
if (!enabled) {
menu.removeItem(R.id.enable_debug_mode);
} else {
final MenuItem debugModeItem = menu.findItem(R.id.enable_debug_mode);
if (debugModeItem != null) {
// Update checked state based on internal flag.
menu.findItem(R.id.enable_debug_mode).setChecked(FxAccountUtils.LOG_PERSONAL_INFORMATION);
}
}
return super.onCreateOptionsMenu(menu);
};