Commit 26b3d1f
committed
Fix bug 5357295 NPE on display when remote control client dies
When a IRemoteControlClient dies, that client is set to null
in the stack of remote control entries (mRCStack). This is done
by calling registerRemoteControlClient() with a null client.
The bug is that registerRemoteControlClient(), after storing
the new client, uses it to let it know what the current
remote control display is. When that display is non null, the
client is sent the current display. So when a client died
when there was a display, the client reference was accessed
in the part of the method where we haven't yet checked whether
it is null or not.
The fix consists in moving the setting of the display on the
client (method plugRemoteControlDisplay) only after having
checked that the client is non-null.
Change-Id: Ic74d6cba9e3a3a16e78cd80a1ae5901abfeb39051 parent 2b2adbd commit 26b3d1f
1 file changed
+18
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2958 | 2958 | | |
2959 | 2959 | | |
2960 | 2960 | | |
2961 | | - | |
| 2961 | + | |
2962 | 2962 | | |
2963 | 2963 | | |
2964 | 2964 | | |
| |||
3366 | 3366 | | |
3367 | 3367 | | |
3368 | 3368 | | |
3369 | | - | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
| 3373 | + | |
| 3374 | + | |
3370 | 3375 | | |
3371 | 3376 | | |
3372 | 3377 | | |
| |||
3384 | 3389 | | |
3385 | 3390 | | |
3386 | 3391 | | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
| 3395 | + | |
| 3396 | + | |
| 3397 | + | |
| 3398 | + | |
| 3399 | + | |
| 3400 | + | |
3387 | 3401 | | |
3388 | 3402 | | |
3389 | 3403 | | |
| |||
3392 | 3406 | | |
3393 | 3407 | | |
3394 | 3408 | | |
3395 | | - | |
3396 | | - | |
3397 | | - | |
3398 | | - | |
3399 | | - | |
3400 | | - | |
3401 | | - | |
3402 | | - | |
| 3409 | + | |
| 3410 | + | |
3403 | 3411 | | |
3404 | 3412 | | |
3405 | 3413 | | |
| |||
0 commit comments