Bug 1207307 - Remove MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES flag. r=vivek,nalexander

--HG--
extra : commitid : EDAzygqNz9I
extra : rebase_source : 39b977fddd43906b15024efce1e34362cf0e3259
This commit is contained in:
Kalpesh Krishna 2015-11-09 10:57:01 -08:00
parent e688976ffe
commit bd454774aa
9 changed files with 14 additions and 65 deletions

View File

@ -4883,13 +4883,6 @@ if test -n "$MOZ_ANDROID_SHARE_OVERLAY"; then
AC_DEFINE(MOZ_ANDROID_SHARE_OVERLAY)
fi
dnl ========================================================
dnl = Show Firefox Account profile details on Android
dnl ========================================================
if test -n "$MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES"; then
AC_DEFINE(MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES)
fi
dnl = Include Tab Queue on Android
dnl = Temporary build flag to allow development in Nightly
dnl ========================================================
@ -8625,7 +8618,6 @@ AC_SUBST(MOZ_ANDROID_GECKOLIBS_AAR)
AC_SUBST(MOZ_ANDROID_READING_LIST_SERVICE)
AC_SUBST(MOZ_ANDROID_SEARCH_ACTIVITY)
AC_SUBST(MOZ_ANDROID_SHARE_OVERLAY)
AC_SUBST(MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES)
AC_SUBST(MOZ_ANDROID_TAB_QUEUE)
AC_SUBST(MOZ_ANDROID_MLS_STUMBLER)
AC_SUBST(MOZ_ANDROID_DOWNLOADS_INTEGRATION)

View File

@ -102,11 +102,6 @@ fi
# Use the low-memory GC tuning.
export JS_GC_SMALL_CHUNK_SIZE=1
# Enable FxAccount Avatar
if test "$NIGHTLY_BUILD"; then
MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES=1
fi
# Enable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=1
if test "$MOZ_OFFICIAL_BRANDING"; then

View File

@ -201,13 +201,6 @@ public class AppConstants {
false;
//#endif
public static final boolean MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES =
//#ifdef MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES
true;
//#else
false;
//#endif
public static final boolean MOZ_TELEMETRY_ON_BY_DEFAULT =
//#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT
true;

View File

@ -95,7 +95,6 @@ public class FxAccountStatusFragment
protected PreferenceCategory accountCategory;
protected Preference profilePreference;
protected Preference emailPreference;
protected Preference manageAccountPreference;
protected Preference authServerPreference;
protected Preference removeAccountPreference;
@ -167,12 +166,6 @@ public class FxAccountStatusFragment
accountCategory = (PreferenceCategory) ensureFindPreference("signed_in_as_category");
profilePreference = ensureFindPreference("profile");
emailPreference = ensureFindPreference("email");
if (AppConstants.MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES) {
accountCategory.removePreference(emailPreference);
} else {
accountCategory.removePreference(profilePreference);
}
manageAccountPreference = ensureFindPreference("manage_account");
if (AppConstants.MOZ_ANDROID_NATIVE_ACCOUNT_UI) {
accountCategory.removePreference(manageAccountPreference);
@ -201,11 +194,7 @@ public class FxAccountStatusFragment
ALWAYS_SHOW_SYNC_SERVER = true;
}
if (AppConstants.MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES) {
profilePreference.setOnPreferenceClickListener(this);
} else {
emailPreference.setOnPreferenceClickListener(this);
}
profilePreference.setOnPreferenceClickListener(this);
manageAccountPreference.setOnPreferenceClickListener(this);
removeAccountPreference.setOnPreferenceClickListener(this);
@ -496,17 +485,15 @@ public class FxAccountStatusFragment
// register/unregister calls.
FxAccountSyncStatusHelper.getInstance().startObserving(syncStatusDelegate);
if (AppConstants.MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES) {
// Register a local broadcast receiver to get profile cached notification.
final IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(FxAccountConstants.ACCOUNT_PROFILE_JSON_UPDATED_ACTION);
accountProfileInformationReceiver = new FxAccountProfileInformationReceiver();
LocalBroadcastManager.getInstance(getActivity()).registerReceiver(accountProfileInformationReceiver, intentFilter);
// Register a local broadcast receiver to get profile cached notification.
final IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(FxAccountConstants.ACCOUNT_PROFILE_JSON_UPDATED_ACTION);
accountProfileInformationReceiver = new FxAccountProfileInformationReceiver();
LocalBroadcastManager.getInstance(getActivity()).registerReceiver(accountProfileInformationReceiver, intentFilter);
// profilePreference is set during onCreate, so it's definitely not null here.
final float cornerRadius = getResources().getDimension(R.dimen.fxaccount_profile_image_width) / 2;
profileAvatarTarget = new PicassoPreferenceIconTarget(getResources(), profilePreference, cornerRadius);
}
// profilePreference is set during onCreate, so it's definitely not null here.
final float cornerRadius = getResources().getDimension(R.dimen.fxaccount_profile_image_width) / 2;
profileAvatarTarget = new PicassoPreferenceIconTarget(getResources(), profilePreference, cornerRadius);
refresh();
}
@ -624,11 +611,6 @@ public class FxAccountStatusFragment
}
private void updateProfileInformation() {
if (!AppConstants.MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES) {
// Life is so much simpler.
emailPreference.setTitle(fxAccount.getEmail());
return;
}
final ExtendedJSONObject profileJSON = fxAccount.getProfileJSON();
if (profileJSON == null) {

View File

@ -90,9 +90,7 @@ public class AndroidFxAccount {
if (AppConstants.MOZ_ANDROID_READING_LIST_SERVICE) {
list.add(ReadingListConstants.AUTH_TOKEN_TYPE);
}
if (AppConstants.MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES) {
list.add(PROFILE_OAUTH_TOKEN_TYPE);
}
list.add(PROFILE_OAUTH_TOKEN_TYPE);
KNOWN_OAUTH_TOKEN_TYPES = Collections.unmodifiableList(list);
}

View File

@ -541,11 +541,9 @@ public class FxAccountSyncAdapter extends AbstractThreadedSyncAdapter {
final String clientState = married.getClientState();
syncWithAssertion(audience, assertion, tokenServerEndpointURI, tokenBackoffHandler, sharedPrefs, syncKeyBundle, clientState, sessionCallback, extras, fxAccount);
if (AppConstants.MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES) {
// Force fetch the profile avatar information.
Logger.info(LOG_TAG, "Fetching profile avatar information.");
fxAccount.fetchProfileJSON();
}
// Force fetch the profile avatar information.
Logger.info(LOG_TAG, "Fetching profile avatar information.");
fxAccount.fetchProfileJSON();
} catch (Exception e) {
syncDelegate.handleError(e);
return;

View File

@ -877,8 +877,7 @@ ANDROID_ASSETS_DIRS += [
for var in ('MOZ_ANDROID_ANR_REPORTER', 'MOZ_LINKER_EXTRACT', 'MOZ_DEBUG',
'MOZ_ANDROID_SEARCH_ACTIVITY', 'MOZ_NATIVE_DEVICES', 'MOZ_ANDROID_MLS_STUMBLER',
'MOZ_ANDROID_SHARE_OVERLAY', 'MOZ_ANDROID_DOWNLOADS_INTEGRATION', 'MOZ_INSTALL_TRACKING',
'MOZ_ANDROID_GCM',
'MOZ_ANDROID_TAB_QUEUE', 'MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES'):
'MOZ_ANDROID_GCM', 'MOZ_ANDROID_TAB_QUEUE'):
if CONFIG[var]:
DEFINES[var] = 1

View File

@ -12,11 +12,6 @@
android:icon="@drawable/sync_avatar_default"
android:persistent="false"
android:title="" />
<Preference
android:editable="false"
android:key="email"
android:persistent="false"
android:title="@string/fxaccount_email_hint" />
<Preference
android:editable="false"
android:key="manage_account"

View File

@ -107,9 +107,6 @@ if test "$NIGHTLY_BUILD"; then
MOZ_ANDROID_GCM=1
fi
# Enable Firefox Account avatars.
MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES=1
# Enable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=1