Disable/enable radio on factory reset
Recording was failing to stop on factory reset. Also mute button status
was not being reset. Also, FM Radio should also be restarted.
CRs-Fixed: 968376
Change-Id: If9966a887a09a5fd6813637b61b075616362ff39
diff --git a/fmapp2/src/com/caf/fmradio/FMRadio.java b/fmapp2/src/com/caf/fmradio/FMRadio.java
index b1b613b..76b961c 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadio.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadio.java
@@ -970,9 +970,10 @@
String action = data.getAction();
if (action != null) {
if (action.equals(Settings.RESTORE_FACTORY_DEFAULT_ACTION)) {
+ disableRadio();
RestoreDefaults();
- enableRadioOnOffUI();
- tuneRadio(FmSharedPreferences.DEFAULT_NO_FREQUENCY);
+ FmSharedPreferences.setTunedFrequency(FmSharedPreferences.DEFAULT_NO_FREQUENCY);
+ enableRadio();
FmSharedPreferences.addStation("", FmSharedPreferences.DEFAULT_NO_FREQUENCY, 0);
}
}