Loading Android.bp +6 −0 Original line number Diff line number Diff line Loading @@ -125,3 +125,9 @@ filegroup { srcs: ["aidl/android/hardware/display/IDeviceProductInfoConstants.aidl"], path: "aidl", } dirgroup { name: "trusty_dirgroup_frameworks_native", dirs: ["libs/binder"], visibility: ["//trusty/vendor/google/aosp/scripts"], } cmds/dumpstate/DumpstateInternal.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ bool DropRootUser() { const uint32_t cap_syslog_mask = CAP_TO_MASK(CAP_SYSLOG); const uint32_t cap_syslog_index = CAP_TO_INDEX(CAP_SYSLOG); bool has_cap_syslog = (capdata[cap_syslog_index].effective & cap_syslog_mask) != 0; bool has_cap_syslog = (capdata[cap_syslog_index].permitted & cap_syslog_mask) != 0; memset(&capdata, 0, sizeof(capdata)); if (has_cap_syslog) { Loading include/input/InputDevice.h +5 −6 Original line number Diff line number Diff line Loading @@ -266,6 +266,7 @@ class InputDeviceInfo { public: InputDeviceInfo(); InputDeviceInfo(const InputDeviceInfo& other); InputDeviceInfo& operator=(const InputDeviceInfo& other); ~InputDeviceInfo(); struct MotionRange { Loading Loading @@ -315,13 +316,11 @@ public: inline const InputDeviceViewBehavior& getViewBehavior() const { return mViewBehavior; } inline void setKeyCharacterMap(const std::shared_ptr<KeyCharacterMap> value) { mKeyCharacterMap = value; inline void setKeyCharacterMap(std::unique_ptr<KeyCharacterMap> value) { mKeyCharacterMap = std::move(value); } inline const std::shared_ptr<KeyCharacterMap> getKeyCharacterMap() const { return mKeyCharacterMap; } inline const KeyCharacterMap* getKeyCharacterMap() const { return mKeyCharacterMap.get(); } inline void setVibrator(bool hasVibrator) { mHasVibrator = hasVibrator; } inline bool hasVibrator() const { return mHasVibrator; } Loading Loading @@ -364,7 +363,7 @@ private: std::optional<KeyboardLayoutInfo> mKeyboardLayoutInfo; uint32_t mSources; int32_t mKeyboardType; std::shared_ptr<KeyCharacterMap> mKeyCharacterMap; std::unique_ptr<KeyCharacterMap> mKeyCharacterMap; std::optional<InputDeviceUsiVersion> mUsiVersion; ui::LogicalDisplayId mAssociatedDisplayId{ui::LogicalDisplayId::INVALID}; bool mEnabled; Loading include/input/KeyCharacterMap.h +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ public: }; /* Loads a key character map from a file. */ static base::Result<std::shared_ptr<KeyCharacterMap>> load(const std::string& filename, static base::Result<std::unique_ptr<KeyCharacterMap>> load(const std::string& filename, Format format); /* Loads a key character map from its string contents. */ Loading libs/binder/BackendUnifiedServiceManager.cpp +30 −2 Original line number Diff line number Diff line Loading @@ -39,10 +39,14 @@ static const char* kStaticCachableList[] = { "account", "activity", "alarm", "android.frameworks.stats.IStats/default", "android.system.keystore2.IKeystoreService/default", "appops", "audio", "autofill", "batteryproperties", "batterystats", "biometic", "carrier_config", "connectivity", "content", Loading @@ -58,6 +62,7 @@ static const char* kStaticCachableList[] = { "jobscheduler", "legacy_permission", "location", "lock_settings", "media.extractor", "media.metrics", "media.player", Loading @@ -78,15 +83,19 @@ static const char* kStaticCachableList[] = { "phone", "platform_compat", "power", "processinfo", "role", "sensitive_content_protection_service", "sensorservice", "statscompanion", "telephony.registry", "thermalservice", "time_detector", "tracing.proxy", "trust", "uimode", "user", "vibrator", "virtualdevice", "virtualdevice_native", "webviewupdate", Loading Loading @@ -114,11 +123,30 @@ binder::Status BackendUnifiedServiceManager::updateCache(const std::string& serv if (!kUseCache) { return binder::Status::ok(); } std::string traceStr; if (atrace_is_tag_enabled(ATRACE_TAG_AIDL)) { traceStr = "BinderCacheWithInvalidation::updateCache : " + serviceName; } binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL, traceStr.c_str()); if (service.getTag() == os::Service::Tag::binder) { sp<IBinder> binder = service.get<os::Service::Tag::binder>(); if (binder && mCacheForGetService->isClientSideCachingEnabled(serviceName) && binder->isBinderAlive()) { if (!binder) { binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL, "BinderCacheWithInvalidation::updateCache failed: binder_null"); } else if (!binder->isBinderAlive()) { binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL, "BinderCacheWithInvalidation::updateCache failed: " "isBinderAlive_false"); } else if (mCacheForGetService->isClientSideCachingEnabled(serviceName)) { binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL, "BinderCacheWithInvalidation::updateCache successful"); return mCacheForGetService->setItem(serviceName, binder); } else { binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL, "BinderCacheWithInvalidation::updateCache failed: " "caching_not_enabled"); } } return binder::Status::ok(); Loading Loading
Android.bp +6 −0 Original line number Diff line number Diff line Loading @@ -125,3 +125,9 @@ filegroup { srcs: ["aidl/android/hardware/display/IDeviceProductInfoConstants.aidl"], path: "aidl", } dirgroup { name: "trusty_dirgroup_frameworks_native", dirs: ["libs/binder"], visibility: ["//trusty/vendor/google/aosp/scripts"], }
cmds/dumpstate/DumpstateInternal.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ bool DropRootUser() { const uint32_t cap_syslog_mask = CAP_TO_MASK(CAP_SYSLOG); const uint32_t cap_syslog_index = CAP_TO_INDEX(CAP_SYSLOG); bool has_cap_syslog = (capdata[cap_syslog_index].effective & cap_syslog_mask) != 0; bool has_cap_syslog = (capdata[cap_syslog_index].permitted & cap_syslog_mask) != 0; memset(&capdata, 0, sizeof(capdata)); if (has_cap_syslog) { Loading
include/input/InputDevice.h +5 −6 Original line number Diff line number Diff line Loading @@ -266,6 +266,7 @@ class InputDeviceInfo { public: InputDeviceInfo(); InputDeviceInfo(const InputDeviceInfo& other); InputDeviceInfo& operator=(const InputDeviceInfo& other); ~InputDeviceInfo(); struct MotionRange { Loading Loading @@ -315,13 +316,11 @@ public: inline const InputDeviceViewBehavior& getViewBehavior() const { return mViewBehavior; } inline void setKeyCharacterMap(const std::shared_ptr<KeyCharacterMap> value) { mKeyCharacterMap = value; inline void setKeyCharacterMap(std::unique_ptr<KeyCharacterMap> value) { mKeyCharacterMap = std::move(value); } inline const std::shared_ptr<KeyCharacterMap> getKeyCharacterMap() const { return mKeyCharacterMap; } inline const KeyCharacterMap* getKeyCharacterMap() const { return mKeyCharacterMap.get(); } inline void setVibrator(bool hasVibrator) { mHasVibrator = hasVibrator; } inline bool hasVibrator() const { return mHasVibrator; } Loading Loading @@ -364,7 +363,7 @@ private: std::optional<KeyboardLayoutInfo> mKeyboardLayoutInfo; uint32_t mSources; int32_t mKeyboardType; std::shared_ptr<KeyCharacterMap> mKeyCharacterMap; std::unique_ptr<KeyCharacterMap> mKeyCharacterMap; std::optional<InputDeviceUsiVersion> mUsiVersion; ui::LogicalDisplayId mAssociatedDisplayId{ui::LogicalDisplayId::INVALID}; bool mEnabled; Loading
include/input/KeyCharacterMap.h +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ public: }; /* Loads a key character map from a file. */ static base::Result<std::shared_ptr<KeyCharacterMap>> load(const std::string& filename, static base::Result<std::unique_ptr<KeyCharacterMap>> load(const std::string& filename, Format format); /* Loads a key character map from its string contents. */ Loading
libs/binder/BackendUnifiedServiceManager.cpp +30 −2 Original line number Diff line number Diff line Loading @@ -39,10 +39,14 @@ static const char* kStaticCachableList[] = { "account", "activity", "alarm", "android.frameworks.stats.IStats/default", "android.system.keystore2.IKeystoreService/default", "appops", "audio", "autofill", "batteryproperties", "batterystats", "biometic", "carrier_config", "connectivity", "content", Loading @@ -58,6 +62,7 @@ static const char* kStaticCachableList[] = { "jobscheduler", "legacy_permission", "location", "lock_settings", "media.extractor", "media.metrics", "media.player", Loading @@ -78,15 +83,19 @@ static const char* kStaticCachableList[] = { "phone", "platform_compat", "power", "processinfo", "role", "sensitive_content_protection_service", "sensorservice", "statscompanion", "telephony.registry", "thermalservice", "time_detector", "tracing.proxy", "trust", "uimode", "user", "vibrator", "virtualdevice", "virtualdevice_native", "webviewupdate", Loading Loading @@ -114,11 +123,30 @@ binder::Status BackendUnifiedServiceManager::updateCache(const std::string& serv if (!kUseCache) { return binder::Status::ok(); } std::string traceStr; if (atrace_is_tag_enabled(ATRACE_TAG_AIDL)) { traceStr = "BinderCacheWithInvalidation::updateCache : " + serviceName; } binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL, traceStr.c_str()); if (service.getTag() == os::Service::Tag::binder) { sp<IBinder> binder = service.get<os::Service::Tag::binder>(); if (binder && mCacheForGetService->isClientSideCachingEnabled(serviceName) && binder->isBinderAlive()) { if (!binder) { binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL, "BinderCacheWithInvalidation::updateCache failed: binder_null"); } else if (!binder->isBinderAlive()) { binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL, "BinderCacheWithInvalidation::updateCache failed: " "isBinderAlive_false"); } else if (mCacheForGetService->isClientSideCachingEnabled(serviceName)) { binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL, "BinderCacheWithInvalidation::updateCache successful"); return mCacheForGetService->setItem(serviceName, binder); } else { binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL, "BinderCacheWithInvalidation::updateCache failed: " "caching_not_enabled"); } } return binder::Status::ok(); Loading