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

Commit 6cd6cec2 authored by Craig Mautner's avatar Craig Mautner
Browse files

Revert "Add lockTaskOnLaunch attribute."

This reverts commit 0fb1cb56.
parent 85ba7500
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -648,12 +648,6 @@ public class ActivityInfo extends ComponentInfo
     */
    public boolean resizeable;

    /**
     * Value indicating if the activity is to be locked at startup.
     * @hide
     */
    public boolean lockTaskOnLaunch;

    public ActivityInfo() {
    }

@@ -671,8 +665,6 @@ public class ActivityInfo extends ComponentInfo
        uiOptions = orig.uiOptions;
        parentActivityName = orig.parentActivityName;
        maxRecents = orig.maxRecents;
        resizeable = orig.resizeable;
        lockTaskOnLaunch = orig.lockTaskOnLaunch;
    }
    
    /**
@@ -717,7 +709,7 @@ public class ActivityInfo extends ComponentInfo
        if (uiOptions != 0) {
            pw.println(prefix + " uiOptions=0x" + Integer.toHexString(uiOptions));
        }
        pw.println(prefix + "resizeable=" + resizeable + " lockTaskOnLaunch=" + lockTaskOnLaunch);
        pw.println(prefix + "resizeable=" + resizeable);
        super.dumpBack(pw, prefix);
    }
    
@@ -747,7 +739,6 @@ public class ActivityInfo extends ComponentInfo
        dest.writeInt(persistableMode);
        dest.writeInt(maxRecents);
        dest.writeInt(resizeable ? 1 : 0);
        dest.writeInt(lockTaskOnLaunch ? 1 : 0);
    }

    public static final Parcelable.Creator<ActivityInfo> CREATOR
@@ -776,6 +767,5 @@ public class ActivityInfo extends ComponentInfo
        persistableMode = source.readInt();
        maxRecents = source.readInt();
        resizeable = (source.readInt() == 1);
        lockTaskOnLaunch = (source.readInt() == 1);
    }
}
+0 −3
Original line number Diff line number Diff line
@@ -3113,9 +3113,6 @@ public class PackageParser {
                        R.styleable.AndroidManifestActivity_screenOrientation,
                        ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
            }

            a.info.lockTaskOnLaunch =
                    sa.getBoolean(R.styleable.AndroidManifestActivity_lockTaskOnLaunch, false);
        } else {
            a.info.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
            a.info.configChanges = 0;
+5 −13
Original line number Diff line number Diff line
@@ -1038,13 +1038,6 @@
         activity. -->
    <attr name="resizeableActivity" format="boolean" />

    <!-- Tasks rooted at this activity will start up in lock-task mode. That means that they
         cannot be navigated away from until they finish or explicitly release lock-task mode.
         This only works for system privileged activities. An exception will be thrown for
         non-privileged activities that use this attribute.
         @hide -->
    <attr name="lockTaskOnLaunch" format="boolean" />

    <!-- When set installer will extract native libraries. If set to false
         libraries in the apk must be stored and page-aligned.  -->
    <attr name="extractNativeLibs" format="boolean"/>
@@ -1756,7 +1749,6 @@
        <attr name="relinquishTaskIdentity" />
        <attr name="resumeWhilePausing" />
        <attr name="resizeableActivity" />
        <attr name="lockTaskOnLaunch" />
    </declare-styleable>
    
    <!-- The <code>activity-alias</code> tag declares a new
+0 −1
Original line number Diff line number Diff line
@@ -2657,5 +2657,4 @@
  <!--IntentFilter auto verification -->
  <public type="attr" name="autoVerify" />

  <public type="attr" name="lockTaskOnLaunch" />
</resources>
+5 −5
Original line number Diff line number Diff line
@@ -3911,9 +3911,9 @@ public final class ActivityManagerService extends ActivityManagerNative
            }
            // Do not allow task to finish in Lock Task mode.
            if (tr == mStackSupervisor.mLockTaskModeTask) {
                if (rootR == r && tr.getTopActivity() == r) {
                if (rootR == r) {
                    Slog.i(TAG, "Not finishing task in lock task mode");
                    mStackSupervisor.showLockTaskToastLocked();
                    mStackSupervisor.showLockTaskToast();
                    return false;
                }
            }
@@ -4074,7 +4074,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                // Do not allow task to finish in Lock Task mode.
                if (r.task == mStackSupervisor.mLockTaskModeTask) {
                    if (rootR == r) {
                        mStackSupervisor.showLockTaskToastLocked();
                        mStackSupervisor.showLockTaskToast();
                        return false;
                    }
                }
@@ -8238,7 +8238,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                return;
            }
            if (mStackSupervisor.isLockTaskModeViolation(task)) {
                mStackSupervisor.showLockTaskToastLocked();
                mStackSupervisor.showLockTaskToast();
                Slog.e(TAG, "moveTaskToFront: Attempt to violate Lock Task Mode");
                return;
            }
@@ -8272,7 +8272,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                if (taskId >= 0) {
                    if ((mStackSupervisor.mLockTaskModeTask != null)
                            && (mStackSupervisor.mLockTaskModeTask.taskId == taskId)) {
                        mStackSupervisor.showLockTaskToastLocked();
                        mStackSupervisor.showLockTaskToast();
                        return false;
                    }
                    return ActivityRecord.getStackLocked(token).moveTaskToBackLocked(taskId);
Loading