Merge "Add policy check to always show overflow menu button on TV devices." into jb-mr2-dev

This commit is contained in:
Justin Koh
2013-03-01 23:57:26 +00:00
committed by Android (Google) Code Review

View File

@@ -19,6 +19,7 @@ package com.android.internal.view;
import com.android.internal.R;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.os.Build;
@@ -44,7 +45,10 @@ public class ActionBarPolicy {
}
public boolean showsOverflowMenuButton() {
return !ViewConfiguration.get(mContext).hasPermanentMenuKey();
return !ViewConfiguration.get(mContext).hasPermanentMenuKey() ||
((mContext.getResources().getConfiguration().uiMode &
Configuration.UI_MODE_TYPE_TELEVISION) ==
Configuration.UI_MODE_TYPE_TELEVISION);
}
public int getEmbeddedMenuWidthLimit() {