diff --git a/mobile/android/base/fxa/FxAccountConstants.java b/mobile/android/base/fxa/FxAccountConstants.java index f579f57f0f53..a07dfc812332 100644 --- a/mobile/android/base/fxa/FxAccountConstants.java +++ b/mobile/android/base/fxa/FxAccountConstants.java @@ -32,7 +32,7 @@ public class FxAccountConstants { // Key for avatar URI in profile JSON. public static final String KEY_PROFILE_JSON_AVATAR = "avatar"; // Key for username in profile JSON. - public static final String KEY_PROFILE_JSON_USERNAME = "username"; + public static final String KEY_PROFILE_JSON_USERNAME = "displayName"; // You must wait 15 minutes after failing an age check before trying to create a different account. public static final long MINIMUM_TIME_TO_WAIT_AFTER_AGE_CHECK_FAILED_IN_MILLISECONDS = 15 * 60 * 1000; diff --git a/mobile/android/base/fxa/activities/FxAccountStatusFragment.java b/mobile/android/base/fxa/activities/FxAccountStatusFragment.java index 765da1e7fb4a..53b5cc590953 100644 --- a/mobile/android/base/fxa/activities/FxAccountStatusFragment.java +++ b/mobile/android/base/fxa/activities/FxAccountStatusFragment.java @@ -242,6 +242,13 @@ 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"); + } + } + 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"); @@ -482,7 +489,6 @@ public class FxAccountStatusFragment FxAccountSyncStatusHelper.getInstance().startObserving(syncStatusDelegate); if (AppConstants.MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES) { - profilePreference.getIntent().setData(Uri.parse("about:accounts?action=avatar")); // Register a local broadcast receiver to get profile cached notification. final IntentFilter intentFilter = new IntentFilter(); intentFilter.addAction(FxAccountConstants.ACCOUNT_PROFILE_JSON_UPDATED_ACTION); diff --git a/mobile/android/base/resources/xml/fxaccount_status_prefscreen.xml b/mobile/android/base/resources/xml/fxaccount_status_prefscreen.xml index 1b029fb05f25..ee64b74ddd24 100644 --- a/mobile/android/base/resources/xml/fxaccount_status_prefscreen.xml +++ b/mobile/android/base/resources/xml/fxaccount_status_prefscreen.xml @@ -10,12 +10,7 @@ android:key="profile" android:icon="@drawable/sync_avatar_default" android:persistent="false" - android:title="" > - - + android:title="" />