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

Commit cd544e65 authored by Fiona Campbell's avatar Fiona Campbell Committed by Android (Google) Code Review
Browse files

Merge "Make display manager logging conditional" into main

parents 308f7866 6f6010a6
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -1435,12 +1435,10 @@ public final class DisplayManagerGlobal {
            sExtraDisplayListenerLogging = !TextUtils.isEmpty(EXTRA_LOGGING_PACKAGE_NAME)
            sExtraDisplayListenerLogging = !TextUtils.isEmpty(EXTRA_LOGGING_PACKAGE_NAME)
                    && EXTRA_LOGGING_PACKAGE_NAME.equals(sCurrentPackageName);
                    && EXTRA_LOGGING_PACKAGE_NAME.equals(sCurrentPackageName);
        }
        }
        // TODO: b/306170135 - return sExtraDisplayListenerLogging instead
        return sExtraDisplayListenerLogging;
        return true;
    }
    }


    private static boolean extraLogging() {
    private static boolean extraLogging() {
        // TODO: b/306170135 - return sExtraDisplayListenerLogging & package name check instead
        return sExtraDisplayListenerLogging;
        return true;
    }
    }
}
}
+1 −2
Original line number Original line Diff line number Diff line
@@ -1020,8 +1020,7 @@ public final class ViewRootImpl implements ViewParent,
        mDisplay = display;
        mDisplay = display;
        mBasePackageName = context.getBasePackageName();
        mBasePackageName = context.getBasePackageName();
        final String name = DisplayProperties.debug_vri_package().orElse(null);
        final String name = DisplayProperties.debug_vri_package().orElse(null);
        // TODO: b/306170135 - return to using textutils check on package name.
        mExtraDisplayListenerLogging = !TextUtils.isEmpty(name) && name.equals(mBasePackageName);
        mExtraDisplayListenerLogging = true;
        mThread = Thread.currentThread();
        mThread = Thread.currentThread();
        mLocation = new WindowLeaked(null);
        mLocation = new WindowLeaked(null);
        mLocation.fillInStackTrace();
        mLocation.fillInStackTrace();
+2 −4
Original line number Original line Diff line number Diff line
@@ -590,8 +590,7 @@ public final class DisplayManagerService extends SystemService {
        mSystemReady = false;
        mSystemReady = false;
        mConfigParameterProvider = new DeviceConfigParameterProvider(DeviceConfigInterface.REAL);
        mConfigParameterProvider = new DeviceConfigParameterProvider(DeviceConfigInterface.REAL);
        mExtraDisplayLoggingPackageName = DisplayProperties.debug_vri_package().orElse(null);
        mExtraDisplayLoggingPackageName = DisplayProperties.debug_vri_package().orElse(null);
        // TODO: b/306170135 - return TextUtils package name check instead
        mExtraDisplayEventLogging = !TextUtils.isEmpty(mExtraDisplayLoggingPackageName);
        mExtraDisplayEventLogging = true;
    }
    }


    public void setupSchedulerPolicies() {
    public void setupSchedulerPolicies() {
@@ -3048,8 +3047,7 @@ public final class DisplayManagerService extends SystemService {
    }
    }


    private boolean extraLogging(String packageName) {
    private boolean extraLogging(String packageName) {
        // TODO: b/306170135 - return mExtraDisplayLoggingPackageName & package name check instead
        return mExtraDisplayEventLogging && mExtraDisplayLoggingPackageName.equals(packageName);
        return true;
    }
    }


    // Runs on Handler thread.
    // Runs on Handler thread.