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

Commit dfb9868b authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Add component name in FGS WTF log

Bug: 276963716
Test: Manual test
Change-Id: Ib9325b0befff16e74ef662659419e17abc6ccc48
parent 6885dcad
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -286,6 +286,12 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
                + ")");
    }

    private String getFgsInfoForWtf() {
        return " cmp: " + this.getComponentName().toShortString()
                + " sdk: " + this.appInfo.targetSdkVersion
                ;
    }

    void maybeLogFgsLogicChange() {
        final int origWiu = reasonOr(mAllowWhileInUsePermissionInFgsReasonNoBinding,
                mAllowWIUInBindService);
@@ -311,7 +317,8 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
                + " OS:" // Orig-start
                + changeMessage(mAllowStartForegroundNoBinding, mAllowStartInBindService)
                + " NS:" // New-start
                + changeMessage(mAllowStartForegroundNoBinding, mAllowStartByBindings);
                + changeMessage(mAllowStartForegroundNoBinding, mAllowStartByBindings)
                + getFgsInfoForWtf();
        Slog.wtf(TAG_SERVICE, message);
    }