OSDN Git Service

Fixed null callback issue
authorJack Yu <jackyu@google.com>
Mon, 19 Aug 2019 01:51:30 +0000 (18:51 -0700)
committerJack Yu <jackyu@google.com>
Thu, 22 Aug 2019 08:41:03 +0000 (01:41 -0700)
commit7302b24f486b3e700a6b9e45a57119ecb63f0cce
tree394e765426e9831d5fa7aa21cd58b85d965a0bd7
parent594931f5d993106ec66768f2f08e8eedc47cc302
Fixed null callback issue

Fixed the vendor data/network service non-responsive
issue. The callback binder passed from frameworks
might be GC'd so that vendor data/network service skipped
calling the callback. This eventually caused data
connection state machine messed up.

Fixed by turning the weak refernce to the callback into
a strong reference. This ensure the binder alive when
vendor service needs to invoke the callback.

Test: Telephony sanity tests
Bug: 139076980
Merged-In: Ica0b7b810ffd5416ffd1b2b61f7ebc4af0dcb8ce
Change-Id: Ica0b7b810ffd5416ffd1b2b61f7ebc4af0dcb8ce
(cherry picked from commit 09ef1cb126ee59dcb4eacfc3a8afefcb0f991945)
telephony/java/android/telephony/NetworkServiceCallback.java
telephony/java/android/telephony/data/DataServiceCallback.java