summaryrefslogtreecommitdiff
path: root/libs/androidfw/AssetsProvider.cpp
diff options
context:
space:
mode:
author jiayongqiang <jiayongqiang@xiaomi.com> 2021-08-11 10:12:50 +0800
committer jiayongqiang <jiayongqiang@xiaomi.com> 2021-08-11 10:57:15 +0800
commit079495ac6326081b86d912bae084d3fdb916adb4 (patch)
treeec1b563bfac46eebd6ecc31d8c23938145be1826 /libs/androidfw/AssetsProvider.cpp
parent5a5c3d7562ec8c5d037f65f393d17a5a143a084d (diff)
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: jiayongqiang <jiayongqiang@xiaomi.com>
Diffstat (limited to 'libs/androidfw/AssetsProvider.cpp')
0 files changed, 0 insertions, 0 deletions