gpt4 book ai didi

java - AOSP 方法名称结尾

转载 作者:太空宇宙 更新时间:2023-11-04 14:37:33 24 4
gpt4 key购买 nike

我正在阅读 Android 开源项目中的代码,我看到方法名称具有有趣的结尾,如下所示:addSharedUserLPw()(在 com.android.server.pm.Settings 中)installPackageLI()(在 com.android.server.pm.PackageManagerService 中)

我确信 LPw 和 LI 等都有含义,我只是不知道如何弄清楚它们。谁能提供更多这方面的信息吗?

最佳答案

FWIW,Initial commit frameworks/base/services/java/com/android/server/PackageManagerService.java 提到 LILP 如下:

177. // Lock for state used when installing and doing other long running
178. // operations. Methods that must be called with this lock held have
179. // the prefix "LI".

...

196. // Keys are String (package name), values are Package. This also serves
197. // as the lock for the global state. Methods that must be called with
198. // this lock held have the prefix "LP".

关于java - AOSP 方法名称结尾,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25372850/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com