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

Commit e6177f7a authored by Xiang Wang's avatar Xiang Wang
Browse files

Revert the hint session support part

It's from a rebased parent change which was not submitted yet

Bug: 346604998
Change-Id: I8b86d5be56be3b517986c6d0d5e11baa5c8ff36f
Flag: android.os.cpu_gpu_headrooms
Test: atest HintManagerServiceTest
parent 62c60503
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
@@ -325,36 +325,6 @@ public final class HintManagerService extends SystemService {
        }

        SupportInfo supportInfo = new SupportInfo();
        supportInfo.usesSessions = isHintSessionSupported();
        // Global boosts & modes aren't currently relevant for HMS clients
        supportInfo.boosts = 0;
        supportInfo.modes = 0;
        supportInfo.sessionHints = 0;
        supportInfo.sessionModes = 0;
        supportInfo.sessionTags = 0;
        if (isHintSessionSupported()) {
            if (mPowerHalVersion == 4) {
                // Assume we support the V4 hints & modes unless specified
                // otherwise; this is to avoid breaking backwards compat
                // since we historically just assumed they were.
                supportInfo.sessionHints = 31; // first 5 bits are ones
            }
            if (mPowerHalVersion == 5) {
                // Assume we support the V5 hints & modes unless specified
                // otherwise; this is to avoid breaking backwards compat
                // since we historically just assumed they were.

                // Hal V5 has 8 modes, all of which it assumes are supported,
                // so we represent that by having the first 8 bits set
                supportInfo.sessionHints = 255; // first 8 bits are ones
                // Hal V5 has 1 mode which it assumes is supported, so we
                // represent that by having the first bit set
                supportInfo.sessionModes = 1;
                // Hal V5 has 5 tags, all of which it assumes are supported,
                // so we represent that by having the first 5 bits set
                supportInfo.sessionTags = 31;
            }
        }
        supportInfo.headroom = new SupportInfo.HeadroomSupportInfo();
        supportInfo.headroom.isCpuSupported = false;
        supportInfo.headroom.isGpuSupported = false;
+0 −6
Original line number Diff line number Diff line
@@ -182,12 +182,6 @@ public class HintManagerServiceTest {
        ApplicationInfo applicationInfo = new ApplicationInfo();
        applicationInfo.category = ApplicationInfo.CATEGORY_GAME;
        mSupportInfo = new SupportInfo();
        mSupportInfo.usesSessions = true;
        mSupportInfo.sessionHints = 5;
        mSupportInfo.sessionModes = 1;
        mSupportInfo.modes = 3;
        mSupportInfo.boosts = 3;
        mSupportInfo.sessionTags = 63;
        mSupportInfo.headroom = new SupportInfo.HeadroomSupportInfo();
        mSupportInfo.headroom.isCpuSupported = true;
        mSupportInfo.headroom.cpuMinIntervalMillis = 2000;