Commit 356dcde8 authored by Abhisek Devkota's avatar Abhisek Devkota
Browse files

[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
parent e7dce25f
...@@ -39,9 +39,8 @@ public class BluetoothSetupActivity extends SubBaseActivity { ...@@ -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 { ...@@ -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;
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment