Loading cmds/installd/InstalldNativeService.cpp +26 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,32 @@ static bool prepare_app_profile_dir(const std::string& packageName, int32_t appI return true; } binder::Status InstalldNativeService::createAppDataBatched( const std::unique_ptr<std::vector<std::unique_ptr<std::string>>>& uuids, const std::unique_ptr<std::vector<std::unique_ptr<std::string>>>& packageNames, int32_t userId, int32_t flags, const std::vector<int32_t>& appIds, const std::vector<std::string>& seInfos, const std::vector<int32_t>& targetSdkVersions, int64_t* _aidl_return) { ENFORCE_UID(AID_SYSTEM); std::lock_guard<std::recursive_mutex> lock(mLock); ATRACE_BEGIN("createAppDataBatched"); binder::Status ret; for (size_t i = 0; i < uuids->size(); i++) { if (!packageNames->at(i)) { continue; } ret = createAppData(uuids->at(i), *packageNames->at(i), userId, flags, appIds[i], seInfos[i], targetSdkVersions[i], _aidl_return); if (!ret.isOk()) { ATRACE_END(); return ret; } } ATRACE_END(); return ok(); } binder::Status InstalldNativeService::createAppData(const std::unique_ptr<std::string>& uuid, const std::string& packageName, int32_t userId, int32_t flags, int32_t appId, const std::string& seInfo, int32_t targetSdkVersion, int64_t* _aidl_return) { Loading cmds/installd/InstalldNativeService.h +6 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,12 @@ public: int32_t userSerial, int32_t flags); binder::Status destroyUserData(const std::unique_ptr<std::string>& uuid, int32_t userId, int32_t flags); binder::Status createAppDataBatched( const std::unique_ptr<std::vector<std::unique_ptr<std::string>>>& uuids, const std::unique_ptr<std::vector<std::unique_ptr<std::string>>>& packageNames, int32_t userId, int32_t flags, const std::vector<int32_t>& appIds, const std::vector<std::string>& seInfos, const std::vector<int32_t>& targetSdkVersions, int64_t* _aidl_return); binder::Status createAppData(const std::unique_ptr<std::string>& uuid, const std::string& packageName, int32_t userId, int32_t flags, int32_t appId, const std::string& seInfo, int32_t targetSdkVersion, int64_t* _aidl_return); Loading cmds/installd/binder/android/os/IInstalld.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ interface IInstalld { long createAppData(@nullable @utf8InCpp String uuid, in @utf8InCpp String packageName, int userId, int flags, int appId, in @utf8InCpp String seInfo, int targetSdkVersion); long createAppDataBatched(in @nullable @utf8InCpp String[] uuids, in @nullable @utf8InCpp String[] packageNames, in int userId, int flags, in int[] appIds, in @utf8InCpp String[] seInfos, in int[] targetSdkVersions); void restoreconAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName, int userId, int flags, int appId, @utf8InCpp String seInfo); void migrateAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName, Loading services/surfaceflinger/BufferLayer.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -497,10 +497,6 @@ bool BufferLayer::latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime, } } if (recomputeVisibleRegions == true) { maybeDirtyInput(); } return true; } Loading services/surfaceflinger/Layer.cpp +3 −31 Original line number Diff line number Diff line Loading @@ -220,9 +220,6 @@ void Layer::removeFromCurrentState() { } mFlinger->markLayerPendingRemovalLocked(this); if (hasInput()) { mFlinger->dirtyInput(); } } void Layer::onRemovedFromCurrentState() { Loading Loading @@ -998,8 +995,6 @@ uint32_t Layer::doTransaction(uint32_t flags) { mPendingStatesSnapshot = mPendingStates; mCurrentState.callbackHandles = {}; maybeDirtyInput(); return flags; } Loading Loading @@ -1384,6 +1379,9 @@ bool Layer::setFrameRate(FrameRate frameRate) { return false; } // Activate the layer in Scheduler's LayerHistory mFlinger->mScheduler->recordLayerHistory(this, systemTime()); mCurrentState.sequence++; mCurrentState.frameRate = frameRate; mCurrentState.modified = true; Loading Loading @@ -2545,32 +2543,6 @@ Layer::FrameRateCompatibility Layer::FrameRate::convertCompatibility(int8_t comp } } bool Layer::maybeDirtyInput() { // No sense redirtying input. if (mFlinger->inputDirty()) return true; if (hasInput()) { mFlinger->dirtyInput(); return true; } // If a child or relative dirties the input, no sense continuing to traverse // so we return early and halt the recursion. We traverse ourselves instead // of using traverse() so we can implement this early halt. for (const sp<Layer>& child : mDrawingChildren) { if (child->maybeDirtyInput()) { return true; } } for (const wp<Layer>& weakRelative : mDrawingState.zOrderRelatives) { sp<Layer> relative = weakRelative.promote(); if (relative && relative->maybeDirtyInput()) { return true; } } return false; } // --------------------------------------------------------------------------- }; // namespace android Loading Loading
cmds/installd/InstalldNativeService.cpp +26 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,32 @@ static bool prepare_app_profile_dir(const std::string& packageName, int32_t appI return true; } binder::Status InstalldNativeService::createAppDataBatched( const std::unique_ptr<std::vector<std::unique_ptr<std::string>>>& uuids, const std::unique_ptr<std::vector<std::unique_ptr<std::string>>>& packageNames, int32_t userId, int32_t flags, const std::vector<int32_t>& appIds, const std::vector<std::string>& seInfos, const std::vector<int32_t>& targetSdkVersions, int64_t* _aidl_return) { ENFORCE_UID(AID_SYSTEM); std::lock_guard<std::recursive_mutex> lock(mLock); ATRACE_BEGIN("createAppDataBatched"); binder::Status ret; for (size_t i = 0; i < uuids->size(); i++) { if (!packageNames->at(i)) { continue; } ret = createAppData(uuids->at(i), *packageNames->at(i), userId, flags, appIds[i], seInfos[i], targetSdkVersions[i], _aidl_return); if (!ret.isOk()) { ATRACE_END(); return ret; } } ATRACE_END(); return ok(); } binder::Status InstalldNativeService::createAppData(const std::unique_ptr<std::string>& uuid, const std::string& packageName, int32_t userId, int32_t flags, int32_t appId, const std::string& seInfo, int32_t targetSdkVersion, int64_t* _aidl_return) { Loading
cmds/installd/InstalldNativeService.h +6 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,12 @@ public: int32_t userSerial, int32_t flags); binder::Status destroyUserData(const std::unique_ptr<std::string>& uuid, int32_t userId, int32_t flags); binder::Status createAppDataBatched( const std::unique_ptr<std::vector<std::unique_ptr<std::string>>>& uuids, const std::unique_ptr<std::vector<std::unique_ptr<std::string>>>& packageNames, int32_t userId, int32_t flags, const std::vector<int32_t>& appIds, const std::vector<std::string>& seInfos, const std::vector<int32_t>& targetSdkVersions, int64_t* _aidl_return); binder::Status createAppData(const std::unique_ptr<std::string>& uuid, const std::string& packageName, int32_t userId, int32_t flags, int32_t appId, const std::string& seInfo, int32_t targetSdkVersion, int64_t* _aidl_return); Loading
cmds/installd/binder/android/os/IInstalld.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ interface IInstalld { long createAppData(@nullable @utf8InCpp String uuid, in @utf8InCpp String packageName, int userId, int flags, int appId, in @utf8InCpp String seInfo, int targetSdkVersion); long createAppDataBatched(in @nullable @utf8InCpp String[] uuids, in @nullable @utf8InCpp String[] packageNames, in int userId, int flags, in int[] appIds, in @utf8InCpp String[] seInfos, in int[] targetSdkVersions); void restoreconAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName, int userId, int flags, int appId, @utf8InCpp String seInfo); void migrateAppData(@nullable @utf8InCpp String uuid, @utf8InCpp String packageName, Loading
services/surfaceflinger/BufferLayer.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -497,10 +497,6 @@ bool BufferLayer::latchBuffer(bool& recomputeVisibleRegions, nsecs_t latchTime, } } if (recomputeVisibleRegions == true) { maybeDirtyInput(); } return true; } Loading
services/surfaceflinger/Layer.cpp +3 −31 Original line number Diff line number Diff line Loading @@ -220,9 +220,6 @@ void Layer::removeFromCurrentState() { } mFlinger->markLayerPendingRemovalLocked(this); if (hasInput()) { mFlinger->dirtyInput(); } } void Layer::onRemovedFromCurrentState() { Loading Loading @@ -998,8 +995,6 @@ uint32_t Layer::doTransaction(uint32_t flags) { mPendingStatesSnapshot = mPendingStates; mCurrentState.callbackHandles = {}; maybeDirtyInput(); return flags; } Loading Loading @@ -1384,6 +1379,9 @@ bool Layer::setFrameRate(FrameRate frameRate) { return false; } // Activate the layer in Scheduler's LayerHistory mFlinger->mScheduler->recordLayerHistory(this, systemTime()); mCurrentState.sequence++; mCurrentState.frameRate = frameRate; mCurrentState.modified = true; Loading Loading @@ -2545,32 +2543,6 @@ Layer::FrameRateCompatibility Layer::FrameRate::convertCompatibility(int8_t comp } } bool Layer::maybeDirtyInput() { // No sense redirtying input. if (mFlinger->inputDirty()) return true; if (hasInput()) { mFlinger->dirtyInput(); return true; } // If a child or relative dirties the input, no sense continuing to traverse // so we return early and halt the recursion. We traverse ourselves instead // of using traverse() so we can implement this early halt. for (const sp<Layer>& child : mDrawingChildren) { if (child->maybeDirtyInput()) { return true; } } for (const wp<Layer>& weakRelative : mDrawingState.zOrderRelatives) { sp<Layer> relative = weakRelative.promote(); if (relative && relative->maybeDirtyInput()) { return true; } } return false; } // --------------------------------------------------------------------------- }; // namespace android Loading