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

Commit ad6fe7e0 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Shift IntentFilter.toString() for RAM regression.

We have a hunch that apps might have already been using toString()
here, and a recent improvement that added more debugging information
might be causing a RAM regression.

If this idea proves itself out, we can potentially bring back the
improved toString() guarded by a CompatChange.

Bug: 269579722
Test: TH
Change-Id: I05acb0d4404325b6cd6e2ca7da6383a5f45e02fe
parent 0e6239a9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -531,8 +531,9 @@ public class IntentFilter implements Parcelable {
        mInstantAppVisibility = o.mInstantAppVisibility;
    }

    /** {@inheritDoc} */
    public String toString() {
    /** @hide */
    public String toLongString() {
        // Not implemented directly as toString() due to potential memory regression
        final StringBuilder sb = new StringBuilder();
        sb.append("IntentFilter {");
        sb.append(" pri=");
+3 −2
Original line number Diff line number Diff line
@@ -13649,7 +13649,8 @@ public class ActivityManagerService extends IActivityManager.Stub
                                || action.startsWith("android.intent.action.UID_")
                                || action.startsWith("android.intent.action.EXTERNAL_")) {
                            if (DEBUG_BROADCAST) {
                                Slog.wtf(TAG, "System internals registering for " + filter
                                Slog.wtf(TAG,
                                        "System internals registering for " + filter.toLongString()
                                                + " with app priority; this will race with apps!",
                                        new Throwable());
                            }