VRR: Use appId to replace uid mapping

Uid is combination of user id and app id. Because the allowlist
is recored by pkg for each users. We could ignore the user id part
and it also could solve the issue we didn't update the mapping
when user added case.

Bug: 298722189
Test: atest SmallAreaDetectionAllowMappingsTest
Test: atest SmallAreaDetectionControllerTest
Test: Add new user and open Youtube short to check refresh rate
Change-Id: Ic80be38ebc19938bc061bf6121c68efc4ff9ac4c
diff --git a/services/surfaceflinger/Scheduler/SmallAreaDetectionAllowMappings.h b/services/surfaceflinger/Scheduler/SmallAreaDetectionAllowMappings.h
index cbab690..e10301c 100644
--- a/services/surfaceflinger/Scheduler/SmallAreaDetectionAllowMappings.h
+++ b/services/surfaceflinger/Scheduler/SmallAreaDetectionAllowMappings.h
@@ -24,16 +24,16 @@
 
 namespace android::scheduler {
 class SmallAreaDetectionAllowMappings {
-    using UidThresholdMap = std::unordered_map<uid_t, float>;
+    using AppIdThresholdMap = std::unordered_map<int32_t, float>;
 
 public:
-    void update(std::vector<std::pair<uid_t, float>>& uidThresholdMappings);
-    void setThesholdForUid(uid_t uid, float threshold) EXCLUDES(mLock);
-    std::optional<float> getThresholdForUid(uid_t uid) EXCLUDES(mLock);
+    void update(std::vector<std::pair<int32_t, float>>& appIdThresholdMappings);
+    void setThesholdForAppId(int32_t appId, float threshold) EXCLUDES(mLock);
+    std::optional<float> getThresholdForAppId(int32_t uid) EXCLUDES(mLock);
 
 private:
     static bool isValidThreshold(float threshold) { return threshold >= 0.0f && threshold <= 1.0f; }
     mutable std::mutex mLock;
-    UidThresholdMap mMap GUARDED_BY(mLock);
+    AppIdThresholdMap mMap GUARDED_BY(mLock);
 };
 } // namespace android::scheduler