mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 21:55:31 +00:00
Bug 1178378 - Enable profile click action based on native accounts UI r=nalexander
--HG-- extra : commitid : AtIRplgWF9O extra : rebase_source : 9ccd0809733de5b0d7c78540b9622a17635b7d97
This commit is contained in:
parent
8556917eae
commit
e1f1409f3d
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -10,12 +10,7 @@
|
||||
android:key="profile"
|
||||
android:icon="@drawable/sync_avatar_default"
|
||||
android:persistent="false"
|
||||
android:title="" >
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:targetClass="@string/browser_intent_class"
|
||||
android:targetPackage="@string/browser_intent_package" />
|
||||
</Preference>
|
||||
android:title="" />
|
||||
<Preference
|
||||
android:editable="false"
|
||||
android:key="email"
|
||||
|
Loading…
Reference in New Issue
Block a user