@@ -1509,7 +1509,7 @@ private void doCancel() {
15091509 /**
15101510 * ADFA-5119: erase every trace of a system the user decided not to build.
15111511 *
1512- * <p>Five things claimed that system existed or was about to. Leaving any one of them behind is
1512+ * <p>Four things claimed that system existed or was about to. Leaving any one of them behind is
15131513 * a specific bug, not untidiness:
15141514 *
15151515 * <ol>
@@ -1523,11 +1523,13 @@ private void doCancel() {
15231523 * the content chosen for the tier being given up is not drained into the next one.</li>
15241524 * <li><b>{@code installed_tier}</b>, which a later "Get more" reads to size content against a
15251525 * system that was never installed.</li>
1526- * <li><b>{@code setup_complete}</b>, which is what decides whether the next launch opens the
1527- * library or the wizard. This is the one that keeps the promise: no path ends in the app
1528- * with no system.</li>
15291526 * </ol>
15301527 *
1528+ * <p>There used to be a fifth: {@code setup_complete} → false, which was what kept the promise that
1529+ * no path ends in the app with no system. ADFA-5137 deleted the flag, so the promise is now kept by
1530+ * not having anything to unset — the launch asks whether a rootfs, an install or a deep operation
1531+ * is there, and after this cleanup none of the three is.
1532+ *
15311533 * <p>The install marker is a sixth, and it is already handled — {@link #teardown()} clears it on
15321534 * every clean terminal. Left set, the next launch would open in damaged-system recovery over a
15331535 * system nobody asked for.
@@ -1564,22 +1566,22 @@ private void forgetTheAbandonedSystem() {
15641566 org .iiab .controller .system .data .ContentStateInvalidator .replacementSucceeded (this ,
15651567 org .iiab .controller .system .domain .SystemReplacement .Cause .ABANDONED_INSTALL );
15661568
1567- // 4 + 5 . The decision itself , and last on purpose. If the process is killed part-way
1569+ // 4. The recorded tier , and last on purpose. If the process is killed part-way
15681570 // through this method, everything above it is disposable wreckage and the install marker
15691571 // is still set, so the next launch enters damaged-system recovery — which offers a
15701572 // reinstall. Clearing setup_complete first and dying here would instead send the user to
15711573 // the wizard while the marker still says an install is running.
15721574 //
1573- // commit(), not apply(): the state posted below sends the UI
1574- // to the tier selection immediately, and a later cold launch reads setup_complete to
1575- // decide between the library and the wizard. An asynchronous write is a race with both.
1575+ // commit(), not apply(): the state posted below sends the UI to the tier selection
1576+ // immediately, and an asynchronous write would race it.
15761577 //
1577- // We are the first writer to set setup_complete false — the other four only ever set it
1578- // true, which is why an abandoned install used to strand the user on an empty library.
1578+ // ADFA-5119 added a setup_complete → false here and called itself the first writer of
1579+ // false among five. ADFA-5137 removed the flag altogether, so there is nothing to unset:
1580+ // the marker cleared by teardown() and the absent rootfs now say the same thing between
1581+ // them, and they cannot disagree with each other the way the flag could disagree with both.
15791582 getSharedPreferences (getString (R .string .pref_file_internal ), Context .MODE_PRIVATE )
15801583 .edit ()
15811584 .remove ("installed_tier" )
1582- .putBoolean (getString (R .string .pref_key_setup_complete ), false )
15831585 .commit ();
15841586 } catch (Exception e ) {
15851587 // Never leave the UI waiting because a cleanup step failed: the state below is what
@@ -1602,7 +1604,7 @@ private void teardown() {
16021604 * no system, so forgetting that an install happened is exactly what let the
16031605 * app open an empty library. Success, cancellation and every module or reset
16041606 * path still pass true — a cancellation has already removed the residue and
1605- * cleared setup_complete , so it needs no marker to be recovered from .
1607+ * removed the residue and left no rootfs , so it needs no marker to say so .
16061608 */
16071609 private void teardown (boolean clearMarker ) {
16081610 // ADFA-5119: nothing to wait for once this is over — neither the window nor a queued attempt.
0 commit comments