diff options
author | songjinshi <songjinshi@xiaomi.com> | 2017-03-15 16:16:05 +0800 |
---|---|---|
committer | Peng Xu <pengxu@google.com> | 2017-04-27 02:40:45 +0000 |
commit | b5322b2be5e16ee809eabbee4fca8b523a1d8290 (patch) | |
tree | 582c75985d1fa5b801f00d047b373564df39d5ca /tools/aapt2/java/JavaClassGenerator.cpp | |
parent | f9e5395081b0a4edf2ca1773029c5ab3a1f083e0 (diff) |
[Stability]: fix system_server crash issue caused by fd leak.
If an app incorrect use of registerListener, it will cause
system_server socket fd leak, for example:
protected void onResume() {
super.onResume();
mSensorManager.registerListener(new MySensorEventListener(),
mSensor, SensorManager.SENSOR_DELAY_UI);
Each time a new SensorEventQueue, then in the system_server
will open a new socket fd, as time increases system_server's
fd will be more than 1024 and crash, so we needed add count limit
for sensor listener to improve the system stability.
Test: use the apk attached in the issue
https://code.google.com/p/android/issues/detail?id=258634
Bug: 37543280
Change-Id: I35006966a1638c25bb0f54611e117e16a764e12b
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions