зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1022748 - Part 1: Pass extras through Accounts.launchSetup. r=rnewman
This commit is contained in:
Родитель
293536d1d6
Коммит
3cc13e1e56
|
@ -1130,6 +1130,10 @@ abstract public class BrowserApp extends GeckoApp
|
|||
// Do exactly the same thing as if you tapped 'Sync' in Settings.
|
||||
final Intent intent = new Intent(getContext(), FxAccountGetStartedActivity.class);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
final NativeJSObject extras = message.optObject("extras", null);
|
||||
if (extras != null) {
|
||||
intent.putExtra("extras", extras.toString());
|
||||
}
|
||||
getContext().startActivity(intent);
|
||||
|
||||
} else if ("CharEncoding:Data".equals(event)) {
|
||||
|
|
|
@ -65,12 +65,16 @@ let Accounts = Object.freeze({
|
|||
* Fire-and-forget: open the Firefox accounts activity, which
|
||||
* will be the Getting Started screen if FxA isn't yet set up.
|
||||
*
|
||||
* Optional extras are passed, as a JSON string, to the Firefox
|
||||
* Account Getting Started activity in the extras bundle of the
|
||||
* activity launch intent, under the key "extras".
|
||||
*
|
||||
* There is no return value from this method.
|
||||
*/
|
||||
launchSetup: function () {
|
||||
launchSetup: function (extras) {
|
||||
sendMessageToJava({
|
||||
type: "Accounts:Create",
|
||||
extras: extras,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче