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

Commit 44071449 authored by LuK1337's avatar LuK1337 Committed by Łukasz Patron
Browse files

DreamBackend: Fix launching settings

* Calling startActivity() from outside of an Activity
  context requires the FLAG_ACTIVITY_NEW_TASK flag.

Change-Id: I2f9499953d131c79487bc8b1fc76e386cdd0f3be
parent 2f74bada
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -260,7 +260,10 @@ public class DreamBackend {
        logd("launchSettings(%s)", dreamInfo);
        if (dreamInfo == null || dreamInfo.settingsComponentName == null)
            return;
        mContext.startActivity(new Intent().setComponent(dreamInfo.settingsComponentName));
        Intent intent = new Intent()
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                .setComponent(dreamInfo.settingsComponentName);
        mContext.startActivity(intent);
    }

    public void preview(DreamInfo dreamInfo) {