Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,9 +39,8 @@ public class BluetoothSetupActivity extends SubBaseActivity {
            Intent intent = new Intent();
            intent.setComponent(SetupWizardUtils.mTvAddAccessorySettingsActivity);
            intent.setAction(ACTION_CONNECT_INPUT);
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            intent.putExtra(INTENT_EXTRA_NO_INPUT_MODE, true);
            startSubactivity(intent, REQUEST_CODE_SETUP_BLUETOOTH);
            startActivityForResult(intent, REQUEST_CODE_SETUP_BLUETOOTH);
        } catch (Exception e) {
            Log.e(TAG, "Error starting bluetooth setup", e);
            nextAction(RESULT_OK);
@@ -52,6 +51,7 @@ public class BluetoothSetupActivity extends SubBaseActivity {

    @Override
    protected int getSubactivityNextTransition() {
        nextAction(RESULT_OK);
        return TRANSITION_ID_SLIDE;
    }
}