From a8866e2a5166b017ad36289c79ff9ec9291154b3 Mon Sep 17 00:00:00 2001 From: Preeti Ahuja Date: Fri, 11 Jul 2014 02:04:40 -0400 Subject: Don't display the option menu when all option menu items invisible When all option menu items are invisible, return false in onPrepareOptionsMenu(), don't display the blank option menu. Change-Id: I17de5523e9fa5ae47daee79a9f374809275c386d --- src/com/android/stk/StkMenuActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/android/stk/StkMenuActivity.java b/src/com/android/stk/StkMenuActivity.java index 2005971..2d2f004 100644 --- a/src/com/android/stk/StkMenuActivity.java +++ b/src/com/android/stk/StkMenuActivity.java @@ -271,7 +271,7 @@ public class StkMenuActivity extends ListActivity implements View.OnCreateContex public void onDestroy() { getListView().setOnCreateContextMenuListener(null); super.onDestroy(); - CatLog.d(LOG_TAG, "onDestroy" + "," + mState); + CatLog.d(LOG_TAG, "onDestroy" + ", " + mState); //isMenuPending: if input act is finish by stkappservice when OP_LAUNCH_APP again, //we can not send TR here, since the input cmd is waiting user to process. if (!mIsResponseSent && !appService.isMenuPending(mSlotId)) { @@ -311,7 +311,7 @@ public class StkMenuActivity extends ListActivity implements View.OnCreateContex menu.findItem(StkApp.MENU_ID_END_SESSION).setVisible(mainVisible); menu.findItem(StkApp.MENU_ID_HELP).setVisible(helpVisible); - return true; + return (mainVisible || helpVisible); } @Override -- cgit v1.2.3