Skip to content
Snippets Groups Projects
Commit 637aa08f authored by Kamal Negi's avatar Kamal Negi Committed by Gerrit - the friendly Code Review server
Browse files

Check for antenna connected on activity restart

On activity restart, check if antenna connected or not. On activity
restart we request for audio focus and update the UI with Radio text
etc. even if antenna not connected. This enables UI and disable it again
even if FM is turned off.

CRs-Fixed: 1081388
Change-Id: I0c27f4025322451447423e1f5c07da1f8db790e6
parent eead6724
Branches
No related tags found
No related merge requests found
......@@ -439,7 +439,7 @@ public class FMRadio extends Activity
public void onRestart() {
Log.d(LOGTAG, "FMRadio: onRestart");
try {
if (null != mService) {
if (null != mService && isAntennaAvailable()) {
mService.requestFocus();
}
} catch (Exception e) {
......@@ -505,6 +505,9 @@ public class FMRadio extends Activity
super.onResume();
if (!isAntennaAvailable()) {
return;
}
// TODO: We should return on exception or continue?
try {
if (mService != null)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment