Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 package org.mozilla.gecko.fxa.receivers;
7 import org.mozilla.gecko.background.common.log.Logger;
9 import android.content.BroadcastReceiver;
10 import android.content.Context;
11 import android.content.Intent;
13 public class FxAccountDeletedReceiver extends BroadcastReceiver {
14 public static final String LOG_TAG = FxAccountDeletedReceiver.class.getSimpleName();
16 /**
17 * This receiver can be killed as soon as it returns, but we have things to do
18 * that can't be done on the main thread (network activity). Therefore we
19 * start a service to do our clean up work for us, with Android doing the
20 * heavy lifting for the service's lifecycle.
21 * <p>
22 * See <a href="http://developer.android.com/reference/android/content/BroadcastReceiver.html#ReceiverLifecycle">the Android documentation</a>
23 * for details.
24 */
25 @Override
26 public void onReceive(final Context context, Intent broadcastIntent) {
27 Logger.debug(LOG_TAG, "FxAccount deleted broadcast received.");
29 Intent serviceIntent = new Intent(context, FxAccountDeletedService.class);
30 serviceIntent.putExtras(broadcastIntent);
31 context.startService(serviceIntent);
32 }
33 }