PMS 笔记

@PMS
PMS中常见的锁:
// Lock for state used when installing and doing other long running
// operations. Methods that must be called with this lock held have
// the suffix “LI”.
final Object mInstallLock = new Object();

// Used for privilege escalation. MUST NOT BE CALLED WITH mPackages
// LOCK HELD.  Can be called with mInstallLock held.
@GuardedBy("mInstallLock")
final Installer mInstaller;



// Keys are String (package name), values are Package.  This also serves
// as the lock for the global state.  Methods that must be called with
// this lock held have the prefix "LP".
@GuardedBy("mPackages")
final ArrayMap<String, PackageParser.Package> mPackages =
        new ArrayMap<String, PackageParser.Package>(); 
    原文作者:head_first545
    原文地址: https://blog.csdn.net/songyinzhong/article/details/52423652
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞