Use onBackPressed in stead of onKeyUp for back press events
Repro:
- Navigate to audio file
- Open audio file with small player (e.g. Play Music)
- Press back
- Observe: audio player closes and CMFM navigates up one directory
Change-Id: Ia7440c45241ec957b2405b932525235c92b9211c
}
return true;
}
- if (keyCode == KeyEvent.KEYCODE_BACK) {
- if (checkBackAction()) {
- performHideEasyMode();
- return true;
- }
+ return super.onKeyUp(keyCode, event);
+ }
- // An exit event has occurred, force the destroy the consoles
- exit();
+ @Override
+ public void onBackPressed() {
+ if (checkBackAction()) {
+ performHideEasyMode();
+ return;
}
- return super.onKeyUp(keyCode, event);
+
+ // An exit event has occurred, force the destroy the consoles
+ exit();
}
/**