[Fugu] Fix bluetooth setup loop
As we launch a new activity, the results are auto-cancelled. - ActivityManager: Activity is launching as a new task, so cancelling activity result. - SubBaseActivity: subactivity result {(5), RESULT_CANCELED(0), null} Change-Id: I724832fc0fea8930136fbf9878ae6e2f82b909b3
This commit is contained in:
@@ -39,9 +39,8 @@ public class BluetoothSetupActivity extends SubBaseActivity {
|
|||||||
Intent intent = new Intent();
|
Intent intent = new Intent();
|
||||||
intent.setComponent(SetupWizardUtils.mTvAddAccessorySettingsActivity);
|
intent.setComponent(SetupWizardUtils.mTvAddAccessorySettingsActivity);
|
||||||
intent.setAction(ACTION_CONNECT_INPUT);
|
intent.setAction(ACTION_CONNECT_INPUT);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
||||||
intent.putExtra(INTENT_EXTRA_NO_INPUT_MODE, true);
|
intent.putExtra(INTENT_EXTRA_NO_INPUT_MODE, true);
|
||||||
startSubactivity(intent, REQUEST_CODE_SETUP_BLUETOOTH);
|
startActivityForResult(intent, REQUEST_CODE_SETUP_BLUETOOTH);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(TAG, "Error starting bluetooth setup", e);
|
Log.e(TAG, "Error starting bluetooth setup", e);
|
||||||
nextAction(RESULT_OK);
|
nextAction(RESULT_OK);
|
||||||
@@ -52,6 +51,7 @@ public class BluetoothSetupActivity extends SubBaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getSubactivityNextTransition() {
|
protected int getSubactivityNextTransition() {
|
||||||
|
nextAction(RESULT_OK);
|
||||||
return TRANSITION_ID_SLIDE;
|
return TRANSITION_ID_SLIDE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user