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>(); 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章