File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
telephony/java/com/android/internal/telephony Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,11 @@ public RILSender(Looper looper) {
360360 rr .onError (GENERIC_FAILURE , null );
361361 rr .release ();
362362 }
363+ } finally {
364+ // Note: We are "Done" only if there are no outstanding
365+ // requests or replies. Thus this code path will only release
366+ // the wake lock on errors.
367+ releaseWakeLockIfDone ();
363368 }
364369
365370 if (!alreadySubtracted ) {
@@ -2044,6 +2049,12 @@ private void switchToRadioState(RadioState newState) {
20442049 send (RILRequest rr ) {
20452050 Message msg ;
20462051
2052+ if (mSocket == null ) {
2053+ rr .onError (RADIO_NOT_AVAILABLE , null );
2054+ rr .release ();
2055+ return ;
2056+ }
2057+
20472058 msg = mSender .obtainMessage (EVENT_SEND , rr );
20482059
20492060 acquireWakeLock ();
You can’t perform that action at this time.
0 commit comments