OSDN Git Service

Use the correct lock to protect members in PolicyControl
authortiger_huang <tiger_huang@htc.com>
Mon, 29 Jun 2015 09:17:30 +0000 (17:17 +0800)
committerTiger Huang <tiger_huang@htc.com>
Mon, 29 Jun 2015 09:22:01 +0000 (09:22 +0000)
commite8befb35313e37f519ef61b35669d848eb464437
tree1a02ecf583e217b1d78a8dbf4713d9b94f1cfcb3
parent78db19c25a3a18d9ccf19b91be17e791e4fd782c
Use the correct lock to protect members in PolicyControl

Members in PolicyControl can be accessed by multiple threads via the
public functions called by PhoneWindowManager. Most of the functions
are called with the window-manager-lock held, but reloadFromSetting()
is an exception.

In this patch, we acquire the window-manager-lock before calling
reloadFromSetting() to ensure accessing the members with the same
lock held.

Change-Id: I54ac5cab2a2d74c568fa96145f7a6741c6d99e36
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java