Bug 738676 - Pair a device not working a second time. r=rnewman, a=blocking-fennec

This commit is contained in:
Chenxia Liu 2012-05-08 15:14:48 -07:00
parent 9e34e52e44
commit 54196bb2d0
3 changed files with 19 additions and 4 deletions

View File

@ -38,6 +38,7 @@
package org.mozilla.gecko.sync.setup.activities;
import org.mozilla.gecko.R;
import org.mozilla.gecko.sync.Logger;
import org.mozilla.gecko.sync.setup.Constants;
import android.app.Activity;
@ -49,7 +50,6 @@ import android.view.View;
import android.widget.TextView;
public class SetupSuccessActivity extends Activity {
@SuppressWarnings("unused")
private final static String LOG_TAG = "SetupSuccessActivity";
private TextView setupSubtitle;
private Context mContext;
@ -70,12 +70,17 @@ public class SetupSuccessActivity extends Activity {
}
}
@Override
public void onDestroy() {
Logger.debug(LOG_TAG, "onDestroy() called.");
super.onDestroy();
}
/* Click Handlers */
public void settingsClickHandler(View target) {
Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
intent.setFlags(Constants.FLAG_ACTIVITY_REORDER_TO_FRONT_NO_ANIMATION);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
startActivity(intent);
finish();
}
public void pairClickHandler(View target) {

View File

@ -153,13 +153,21 @@ public class SetupSyncActivity extends AccountAuthenticatorActivity {
if (jClient != null) {
jClient.abort(Constants.JPAKE_ERROR_USERABORT);
}
if (pairWithPin) {
finish();
}
}
@Override
public void onNewIntent(Intent intent) {
Logger.debug(LOG_TAG, "Started SetupSyncActivity with new intent.");
setIntent(intent);
onResume();
}
@Override
public void onDestroy() {
Logger.debug(LOG_TAG, "onDestroy() called.");
super.onDestroy();
}
/* Click Handlers */

View File

@ -15,8 +15,10 @@
android:name="org.mozilla.gecko.sync.setup.activities.AccountActivity"
android:windowSoftInputMode="adjustPan|stateHidden"/>
<activity
android:noHistory="true"
android:name="org.mozilla.gecko.sync.setup.activities.SetupFailureActivity" />
<activity
android:noHistory="true"
android:name="org.mozilla.gecko.sync.setup.activities.SetupSuccessActivity" />
<receiver
android:name="org.mozilla.gecko.sync.receivers.UpgradeReceiver">