mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1220892 - Part 4: Clean up FxAccountAbstractSetupActivity. r=mcomella
The web based Activity sub-classes never used the other intent extras, and in fact, filter them out immediately; so it doesn't hurt to clean this all up.
This commit is contained in:
parent
1dd706cffb
commit
a462987a66
@ -852,7 +852,6 @@ sync_java_files = [TOPSRCDIR + '/mobile/android/services/src/main/java/org/mozil
|
||||
'fxa/AccountLoader.java',
|
||||
'fxa/activities/CustomColorPreference.java',
|
||||
'fxa/activities/FxAccountAbstractActivity.java',
|
||||
'fxa/activities/FxAccountAbstractSetupActivity.java',
|
||||
'fxa/activities/FxAccountConfirmAccountActivityWeb.java',
|
||||
'fxa/activities/FxAccountFinishMigratingActivityWeb.java',
|
||||
'fxa/activities/FxAccountGetStartedActivityWeb.java',
|
||||
|
@ -1,30 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.gecko.fxa.activities;
|
||||
|
||||
abstract public class FxAccountAbstractSetupActivity extends FxAccountAbstractActivity {
|
||||
public static final String EXTRA_EMAIL = "email";
|
||||
public static final String EXTRA_PASSWORD = "password";
|
||||
public static final String EXTRA_PASSWORD_SHOWN = "password_shown";
|
||||
public static final String EXTRA_YEAR = "year";
|
||||
public static final String EXTRA_MONTH = "month";
|
||||
public static final String EXTRA_DAY = "day";
|
||||
public static final String EXTRA_EXTRAS = "extras";
|
||||
|
||||
public static final String JSON_KEY_AUTH = "auth";
|
||||
public static final String JSON_KEY_SERVICES = "services";
|
||||
public static final String JSON_KEY_SYNC = "sync";
|
||||
public static final String JSON_KEY_PROFILE = "profile";
|
||||
|
||||
public FxAccountAbstractSetupActivity() {
|
||||
super(CANNOT_RESUME_WHEN_ACCOUNTS_EXIST);
|
||||
}
|
||||
|
||||
protected FxAccountAbstractSetupActivity(int resume) {
|
||||
super(resume);
|
||||
}
|
||||
|
||||
private static final String LOG_TAG = FxAccountAbstractSetupActivity.class.getSimpleName();
|
||||
}
|
@ -244,10 +244,6 @@ public class FxAccountStatusFragment
|
||||
if (preference == needsPasswordPreference) {
|
||||
final Intent intent = new Intent(FxAccountConstants.ACTION_FXA_UPDATE_CREDENTIALS);
|
||||
intent.putExtra(FxAccountWebFlowActivity.EXTRA_ENDPOINT, FxAccountConstants.ENDPOINT_PREFERENCES);
|
||||
final Bundle extras = getExtrasForAccount();
|
||||
if (extras != null) {
|
||||
intent.putExtras(extras);
|
||||
}
|
||||
// Per http://stackoverflow.com/a/8992365, this triggers a known bug with
|
||||
// the soft keyboard not being shown for the started activity. Why, Android, why?
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
@ -259,10 +255,6 @@ public class FxAccountStatusFragment
|
||||
if (preference == needsFinishMigratingPreference) {
|
||||
final Intent intent = new Intent(FxAccountConstants.ACTION_FXA_FINISH_MIGRATING);
|
||||
intent.putExtra(FxAccountWebFlowActivity.EXTRA_ENDPOINT, FxAccountConstants.ENDPOINT_PREFERENCES);
|
||||
final Bundle extras = getExtrasForAccount();
|
||||
if (extras != null) {
|
||||
intent.putExtras(extras);
|
||||
}
|
||||
// Per http://stackoverflow.com/a/8992365, this triggers a known bug with
|
||||
// the soft keyboard not being shown for the started activity. Why, Android, why?
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
@ -305,18 +297,6 @@ public class FxAccountStatusFragment
|
||||
return false;
|
||||
}
|
||||
|
||||
protected Bundle getExtrasForAccount() {
|
||||
final Bundle extras = new Bundle();
|
||||
final ExtendedJSONObject o = new ExtendedJSONObject();
|
||||
o.put(FxAccountAbstractSetupActivity.JSON_KEY_AUTH, fxAccount.getAccountServerURI());
|
||||
final ExtendedJSONObject services = new ExtendedJSONObject();
|
||||
services.put(FxAccountAbstractSetupActivity.JSON_KEY_SYNC, fxAccount.getTokenServerURI());
|
||||
services.put(FxAccountAbstractSetupActivity.JSON_KEY_PROFILE, fxAccount.getProfileServerURI());
|
||||
o.put(FxAccountAbstractSetupActivity.JSON_KEY_SERVICES, services);
|
||||
extras.putString(FxAccountAbstractSetupActivity.EXTRA_EXTRAS, o.toJSONString());
|
||||
return extras;
|
||||
}
|
||||
|
||||
protected void setCheckboxesEnabled(boolean enabled) {
|
||||
bookmarksPreference.setEnabled(enabled);
|
||||
historyPreference.setEnabled(enabled);
|
||||
|
Loading…
Reference in New Issue
Block a user