diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl
index 8d8fb88..8acdaf2 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/IPower.aidl
@@ -43,5 +43,4 @@
   android.hardware.power.IPowerHintSession createHintSessionWithConfig(in int tgid, in int uid, in int[] threadIds, in long durationNanos, in android.hardware.power.SessionTag tag, out android.hardware.power.SessionConfig config);
   android.hardware.power.ChannelConfig getSessionChannel(in int tgid, in int uid);
   oneway void closeSessionChannel(in int tgid, in int uid);
-  android.hardware.power.SupportInfo getSupportInfo();
 }
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
deleted file mode 100644
index 85da2fc..0000000
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SupportInfo.aidl
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-//     the interface (from the latest frozen version), the build system will
-//     prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.power;
-@VintfStability
-parcelable SupportInfo {
-  boolean usesSessions;
-  long boosts;
-  long modes;
-  long sessionHints;
-  long sessionModes;
-  long sessionTags;
-}
diff --git a/power/aidl/android/hardware/power/IPower.aidl b/power/aidl/android/hardware/power/IPower.aidl
index 2f15648..e25714f 100644
--- a/power/aidl/android/hardware/power/IPower.aidl
+++ b/power/aidl/android/hardware/power/IPower.aidl
@@ -22,7 +22,6 @@
 import android.hardware.power.Mode;
 import android.hardware.power.SessionConfig;
 import android.hardware.power.SessionTag;
-import android.hardware.power.SupportInfo;
 
 @VintfStability
 interface IPower {
@@ -145,14 +144,4 @@
      * @param   uid The UID to be associated with this channel.
      */
     oneway void closeSessionChannel(in int tgid, in int uid);
-
-    /**
-     * Called to get detailed information on the support status of various PowerHAL
-     * features, such as hint sessions and specific boosts.
-     *
-     * @return  a SupportInfo giving detailed support information, or
-     *          EX_UNSUPPORTED_OPERATION if detailed support checking is itself
-     *          not supported.
-     */
-    SupportInfo getSupportInfo();
 }
diff --git a/power/aidl/android/hardware/power/SupportInfo.aidl b/power/aidl/android/hardware/power/SupportInfo.aidl
deleted file mode 100644
index 9486f02..0000000
--- a/power/aidl/android/hardware/power/SupportInfo.aidl
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.power;
-
-import android.hardware.power.Boost;
-import android.hardware.power.Mode;
-import android.hardware.power.SessionHint;
-import android.hardware.power.SessionMode;
-
-/**
- * Tells clients the status of various PowerHAL features in a single call.
- * SupportInfo consists of several bitsets, where each bit from the left
- * corresponds to the support status of that same value of that enum index.
- *
- * For "Boost", having the first bit set would mean "INTERACTION"
- * boost is supported, having the second bit set would mean
- * "DISPLAY_UPDATE_IMMINENT" is supported, and so on. The expectation
- * is that if a client should be able to index the bitset like
- * "(supportInfo.boosts >> Boost::AUDIO_LAUNCH) % 2" and it should return
- * the support value of Boost::AUDIO_LAUNCH. This pattern is the same for
- * all four support bitsets.
- */
-@VintfStability
-parcelable SupportInfo {
-    /**
-     * Boolean representing whether hint sessions are supported on this device
-     */
-    boolean usesSessions;
-
-    /**
-     * The set of "Boost" enum values that are supported by this device
-     * Each bit should correspond to a value of the "Boost.aidl" enum
-     */
-    long boosts;
-
-    /**
-     * The set of "Mode" enum values that are supported by this device
-     * Each bit should correspond to a value of the "Mode.aidl" enum
-     */
-    long modes;
-
-    /**
-     * The set of "SessionHint" enum values that are supported by this device
-     * Each bit should correspond to a value of the "SessionHint.aidl" enum
-     */
-    long sessionHints;
-
-    /**
-     * The set of "SessionMode" enum values that are supported by this device
-     * Each bit should correspond to a value of the "SessionMode.aidl" enum
-     */
-    long sessionModes;
-
-    /**
-     * The set of "SessionTag" enum values that are supported by this device
-     * Each bit should correspond to a value of the "SessionTag.aidl" enum
-     */
-    long sessionTags;
-}
diff --git a/power/aidl/default/Power.cpp b/power/aidl/default/Power.cpp
index 36d0055..64294e5 100644
--- a/power/aidl/default/Power.cpp
+++ b/power/aidl/default/Power.cpp
@@ -41,11 +41,6 @@
                                      ndk::enum_range<Boost>().end()};
 const std::vector<Mode> MODE_RANGE{ndk::enum_range<Mode>().begin(), ndk::enum_range<Mode>().end()};
 
-template <class T>
-constexpr size_t enum_size() {
-    return static_cast<size_t>(*(ndk::enum_range<T>().end() - 1)) + 1;
-}
-
 ScopedAStatus Power::setMode(Mode type, bool enabled) {
     LOG(VERBOSE) << "Power setMode: " << static_cast<int32_t>(type) << " to: " << enabled;
     return ScopedAStatus::ok();
@@ -110,30 +105,11 @@
     return ndk::ScopedAStatus::ok();
 }
 
-ndk::ScopedAStatus Power::getHintSessionPreferredRate(int64_t* outNanoseconds) {
+ScopedAStatus Power::getHintSessionPreferredRate(int64_t* outNanoseconds) {
     *outNanoseconds = std::chrono::nanoseconds(1ms).count();
     return ScopedAStatus::ok();
 }
 
-template <class E>
-int64_t bitsForEnum() {
-    return static_cast<int64_t>(std::bitset<enum_size<E>()>().set().to_ullong());
-}
-
-ndk::ScopedAStatus Power::getSupportInfo(SupportInfo* _aidl_return) {
-    static SupportInfo supportInfo = {
-            .usesSessions = false,
-            .modes = bitsForEnum<Mode>(),
-            .boosts = bitsForEnum<Boost>(),
-            .sessionHints = 0,
-            .sessionModes = 0,
-            .sessionTags = 0,
-    };
-    // Copy the support object into the binder
-    *_aidl_return = supportInfo;
-    return ndk::ScopedAStatus::ok();
-}
-
 }  // namespace example
 }  // namespace impl
 }  // namespace power
diff --git a/power/aidl/default/Power.h b/power/aidl/default/Power.h
index ef524e1..baabaa7 100644
--- a/power/aidl/default/Power.h
+++ b/power/aidl/default/Power.h
@@ -44,7 +44,6 @@
     ndk::ScopedAStatus getSessionChannel(int32_t tgid, int32_t uid,
                                          ChannelConfig* _aidl_return) override;
     ndk::ScopedAStatus closeSessionChannel(int32_t tgid, int32_t uid) override;
-    ndk::ScopedAStatus getSupportInfo(SupportInfo* _aidl_return) override;
 
   private:
     std::vector<std::shared_ptr<IPowerHintSession>> mPowerHintSessions;
diff --git a/power/aidl/vts/VtsHalPowerTargetTest.cpp b/power/aidl/vts/VtsHalPowerTargetTest.cpp
index 9684c38..272674f 100644
--- a/power/aidl/vts/VtsHalPowerTargetTest.cpp
+++ b/power/aidl/vts/VtsHalPowerTargetTest.cpp
@@ -45,7 +45,6 @@
 using android::hardware::power::Mode;
 using android::hardware::power::SessionHint;
 using android::hardware::power::SessionMode;
-using android::hardware::power::SupportInfo;
 using android::hardware::power::WorkDuration;
 using ChannelMessageContents = ChannelMessage::ChannelMessageContents;
 using ModeSetter = ChannelMessage::ChannelMessageContents::SessionModeSetter;
@@ -84,16 +83,6 @@
         static_cast<SessionMode>(static_cast<int32_t>(kSessionModes.back()) + 1),
 };
 
-template <class T>
-constexpr size_t enum_size() {
-    return static_cast<size_t>(*(ndk::enum_range<T>().end() - 1)) + 1;
-}
-
-template <class E>
-bool supportFromBitset(int64_t& supportInt, E type) {
-    return (supportInt >> static_cast<int>(type)) % 2;
-}
-
 class DurationWrapper : public WorkDuration {
   public:
     DurationWrapper(int64_t dur, int64_t time) {
@@ -299,21 +288,6 @@
     ASSERT_TRUE(supported);
 }
 
-TEST_P(PowerAidl, hasSupportInfo) {
-    SupportInfo config;
-    ASSERT_TRUE(power->getSupportInfo(&config).isOk());
-    for (Mode mode : kModes) {
-        bool supported;
-        power->isModeSupported(mode, &supported);
-        ASSERT_EQ(supported, supportFromBitset(config.modes, mode));
-    }
-    for (Boost boost : kBoosts) {
-        bool supported;
-        power->isBoostSupported(boost, &supported);
-        ASSERT_EQ(supported, supportFromBitset(config.boosts, boost));
-    }
-}
-
 TEST_P(HintSessionAidl, createAndCloseHintSession) {
     if (!mSessionSupport) {
         GTEST_SKIP() << "DEVICE not support Hint Session.";
