Skip to content
Commit 079495ac authored by jiayongqiang's avatar jiayongqiang
Browse files

Fix thread safety issues;



There are two threads can modify "mLastChanged" and "mScreenState" variables:
1. onFinishedWakingUp()/onFinishedGoingToSleep() are called from main thread in system_server;
2. setDeviceFolded() is called from android.display thread in
system_server.

Otherwise, NullPointerException might be throw when invoke method 'long java.lang.Long.longValue()'.

Test: press power key to wake up the device and fold the device at the
same time.

Change-Id: I3a0f1862548f2e567baa8a4a615906dbf87a8243
Signed-off-by: default avatarjiayongqiang <jiayongqiang@xiaomi.com>
parent 5a5c3d75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment