Bug 1225456 - Don't launch about:accounts when MOZ_ANDROID_NATIVE_ACCOUNT_UI=1. r=vivek a=lizzard
authorNick Alexander <nalexander@mozilla.com>
Fri, 27 Nov 2015 12:35:36 -0800
changeset 305813 d7171b0292cd2e09952c678777115c7826e074c0
parent 305812 73c801461275eb575000c70562d6aba3fb948cc0
child 305814 b150c5a2ecadf5258af12c3d16d7c5fe33cc7f62
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvivek, lizzard
bugs1225456
milestone44.0
Bug 1225456 - Don't launch about:accounts when MOZ_ANDROID_NATIVE_ACCOUNT_UI=1. r=vivek a=lizzard Pushing on a CLOSED TREE to address a bad uplift. I haven't been able to test this, since the patch is relevant to Nightly but the behaviour doesn't happen.
mobile/android/base/fxa/activities/FxAccountStatusFragment.java
--- a/mobile/android/base/fxa/activities/FxAccountStatusFragment.java
+++ b/mobile/android/base/fxa/activities/FxAccountStatusFragment.java
@@ -245,16 +245,18 @@ public class FxAccountStatusFragment
 
   @Override
   public boolean onPreferenceClick(Preference preference) {
     if (preference == profilePreference) {
       if (!AppConstants.MOZ_ANDROID_NATIVE_ACCOUNT_UI) {
         // There is no native equivalent, bind the click action to fire an intent.
         ActivityUtils.openURLInFennec(getActivity().getApplicationContext(), "about:accounts?action=avatar");
       }
+      // Either we handled the event or there is no native equivalent.
+      return true;
     }
 
     if (preference == manageAccountPreference) {
       // There's no native equivalent, so no need to re-direct through an Intent filter.
       ActivityUtils.openURLInFennec(getActivity().getApplicationContext(), "about:accounts?action=manage");
       return true;
     }