FM: Handle the airplane mode change gracefully
Update the OFF state to activity, if activity connected to service.
Change-Id: I3899fc8364450c7820e5442bae59fc88bd531080
CRs-Fixed: 864424
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index f9d9b7f..ec535c5 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -367,6 +367,13 @@
boolean state = intent.getBooleanExtra("state", false);
if (state == true) {
fmOff();
+ try {
+ if ((mServiceInUse) && (mCallbacks != null) ) {
+ mCallbacks.onDisabled();
+ }
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
}
}
}