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

Commit 71660e97 authored by Daniel Zheng's avatar Daniel Zheng
Browse files

add getScreenPartStatus to TIM

Flag: com.android.tradeinmode.flags.trade_in_mode_2025q4
Test: th
Change-Id: Ia91c11d0d7d2b07182bea85da077b666ea51f5c8
parent 734bc03e
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -107,4 +107,29 @@ interface ITradeInMode {
     *
     */
    int getHingeLifeSpan(in int hingeId);
    /**
     * Information relating to internal screen panel part originality
     * This is imported from composer HAL's screen part status
     */
    @VintfStability
    @Backing(type="int")
    enum ScreenPartStatus {
        /**
         * Device cannot differentiate an original screen from a replaced screen.
         */
        UNSUPPORTED = 0,
        /**
         * Device has the original screen it was manufactured with.
         */
        ORIGINAL = 1,
        /**
         * Device has a replaced screen.
         */
        REPLACED = 2,
    }
    /**
     * Get ScreenPartStatus
     *
     */
    ScreenPartStatus getScreenPartStatus();
}
+6 −0
Original line number Diff line number Diff line
@@ -247,6 +247,12 @@ public final class TradeInModeService extends SystemService {
            return isForceEnabledForTesting();
        }

        @Override
        @RequiresPermission(android.Manifest.permission.ENTER_TRADE_IN_MODE)
        public int getScreenPartStatus() throws RemoteException {
            return 0;
        }

        @Override
        @RequiresPermission(android.Manifest.permission.ENTER_TRADE_IN_MODE)
        public int getHingeCount() throws RemoteException {