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

Commit 18e00d63 authored by Gavin Corkery's avatar Gavin Corkery Committed by Automerger Merge Worker
Browse files

Merge "Store native failure reason in session failure message" into rvc-dev...

Merge "Store native failure reason in session failure message" into rvc-dev am: 448b3603 am: 85c62000 am: 320b3187

Change-Id: I3e9b58f31d120a91384529d5edc1c1ebfdc0607a
parents d15944b9 320b3187
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -523,8 +523,12 @@ public class StagingManager {
                // TODO(b/146343545): Persist failure reason across checkpoint reboot
                Slog.d(TAG, "Reverting back to safe state. Marking " + session.sessionId
                        + " as failed.");
                session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_UNKNOWN,
                        "Reverting back to safe state");
                String errorMsg = "Reverting back to safe state";
                if (!TextUtils.isEmpty(mNativeFailureReason)) {
                    errorMsg = "Entered fs-rollback mode and reverted session due to crashing "
                            + "native process: " + mNativeFailureReason;
                }
                session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_UNKNOWN, errorMsg);
                return;
            }
        } catch (RemoteException e) {
@@ -553,6 +557,10 @@ public class StagingManager {
            if (isApexSessionFailed(apexSessionInfo)) {
                String errorMsg = "APEX activation failed. Check logcat messages from apexd for "
                        + "more information.";
                if (!TextUtils.isEmpty(mNativeFailureReason)) {
                    errorMsg = "Session reverted due to crashing native process: "
                            + mNativeFailureReason;
                }
                session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_ACTIVATION_FAILED,
                        errorMsg);
                abortCheckpoint(errorMsg);