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

Commit c5230acb authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/cm-14.1' into v1-nougat

parents 2694cb52 121236d1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -109,6 +109,11 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi
        }
    }

    @Override
    public boolean isLaunchableInTaskModePinned() {
        return true;
    }

    public void prepareEnterAnimation() {
        getFragment().prepareEnterAnimation();
    }
+9 −1
Original line number Diff line number Diff line
@@ -540,7 +540,7 @@ public class SettingsActivity extends SettingsDrawerActivity
    protected void onCreate(Bundle savedState) {
        super.onCreate(savedState);

        if (isLockTaskModePinned() && !isSettingsRunOnTop()) {
        if (isLockTaskModePinned() && !isSettingsRunOnTop() && !isLaunchableInTaskModePinned()) {
            Log.w(LOG_TAG, "Devices lock task mode pinned.");
            finish();
        }
@@ -1364,6 +1364,14 @@ public class SettingsActivity extends SettingsDrawerActivity
        }
        super.onActivityResult(requestCode, resultCode, data);
    }

    /**
     * @return whether or not the activity can be launched from other apps in the pinning screen.
     */
    public boolean isLaunchableInTaskModePinned() {
        return false;
    }

    private boolean isLockTaskModePinned() {
        final ActivityManager activityManager =
            getApplicationContext().getSystemService(ActivityManager.class);