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

Commit 0722b663 authored by Rupesh Bansal's avatar Rupesh Bansal Committed by Android (Google) Code Review
Browse files

Merge "ActivityManagerInternal null check while checking process state" into main

parents 8dd4d541 cbc9569f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4157,7 +4157,8 @@ public final class DisplayManagerService extends SystemService {

        public boolean shouldReceiveRefreshRateWithChangeUpdate(int event) {
            if (mFlags.isRefreshRateEventForForegroundAppsEnabled()
                    && event == DisplayManagerGlobal.EVENT_DISPLAY_REFRESH_RATE_CHANGED) {
                    && event == DisplayManagerGlobal.EVENT_DISPLAY_REFRESH_RATE_CHANGED
                    && mActivityManagerInternal != null) {
                int procState = mActivityManagerInternal.getUidProcessState(mUid);
                int importance = ActivityManager.RunningAppProcessInfo
                        .procStateToImportance(procState);
+3 −2
Original line number Diff line number Diff line
@@ -2126,11 +2126,12 @@ public class DisplayManagerServiceTest {

    @Test
    public void test_displayChangedNotified_displayInfoFramerateOverridden() {
        when(mMockFlags.isFramerateOverrideTriggersRrCallbacksEnabled()).thenReturn(false);

        DisplayManagerService displayManager =
                new DisplayManagerService(mContext, mShortMockedInjector);
                new DisplayManagerService(mContext, mBasicInjector);
        DisplayManagerService.BinderService displayManagerBinderService =
                displayManager.new BinderService();
        when(mMockFlags.isFramerateOverrideTriggersRrCallbacksEnabled()).thenReturn(false);

        registerDefaultDisplays(displayManager);
        displayManager.onBootPhase(SystemService.PHASE_WAIT_FOR_DEFAULT_DISPLAY);