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

Commit 02350fec authored by Garfield Tan's avatar Garfield Tan
Browse files

Remove stack trace under hourglass.

Test: No stack trace is shown.

Change-Id: Ia2d64509ebf2eefe5bc035bc640cb796796ad524
parent 4143e376
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -165,16 +165,6 @@ public final class Shared {
            : new ArrayList<>(list);
    }

    /**
     * Returns a condensed stacktrace in String format, separated by \n.
     */
    public static String getStackTrace(Exception e) {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        e.printStackTrace(pw);
        return sw.toString();
    }

    /**
     * Compare two strings against each other using system default collator in a
     * case-insensitive mode. Clusters strings prefixed with {@link DIR_PREFIX}
+4 −10
Original line number Diff line number Diff line
@@ -144,8 +144,7 @@ abstract class Message {
        void update(Update event) {
            reset();
            if (event.hasException() && !event.hasAuthenticationException()) {
                updateToInflatedErrorMesage(
                        Shared.DEBUG ? Shared.getStackTrace(event.getException()) : null);
                updateToInflatedErrorMesage();
            } else if (event.hasAuthenticationException()) {
                updateToCantDisplayContentMessage();
            } else if (mEnv.getModel().getModelIds().length == 0) {
@@ -153,14 +152,9 @@ abstract class Message {
            }
        }

        private void updateToInflatedErrorMesage(@Nullable String debugString) {
            if (debugString == null) {
        private void updateToInflatedErrorMesage() {
            update(mEnv.getContext().getResources().getText(R.string.query_error), null,
                    mEnv.getContext().getDrawable(R.drawable.hourglass));
            } else {
                assert (Shared.DEBUG);
                update(debugString, null, mEnv.getContext().getDrawable(R.drawable.hourglass));
            }
        }

        private void updateToCantDisplayContentMessage() {