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

Commit 7fae0798 authored by Xiang Wang's avatar Xiang Wang Committed by Android (Google) Code Review
Browse files

Merge "Revert the hint session support part" into main

parents 1d41d55c e6177f7a
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;