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

Commit e83e621c authored by Gary Mai's avatar Gary Mai
Browse files

Only send feedback for ExternalAccountType if not from tests

Some tests have expected failures and we're currently always sending
feedback for them.
injectedMetadata will only be non-null if the constructor is called
from test code.

Test: added a debug statement within the condition and ran the tests
verifying no feedback was sent from the tests.

Bug: 32636761
Bug: 32635377
Change-Id: I6661e411a5b34daff777b05626d9192181082823
parent 4c9eb4dd
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -153,7 +153,12 @@ public class ExternalAccountType extends BaseAccountType {
            }
            error.append(" for external package ");
            error.append(packageName);
            FeedbackHelper.sendFeedback(context, TAG, "Failed to build external account type", e);
            // Only send feedback if not from tests. There are tests that expect failures so no need
            // to report those.
            if (injectedMetadata == null) {
                FeedbackHelper.sendFeedback(context, TAG, "Failed to build external account type",
                        e);
            }
            return;
        } finally {
            if (parser != null) {