CTS Verifier on TV does not display menu
bug: 19521217
Change-Id: Ia143991dbd9d5b5f4be5653953103ea1d49d5d0e
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/AbstractTestListActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/AbstractTestListActivity.java
index 6495a05..409b0db 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/AbstractTestListActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/AbstractTestListActivity.java
@@ -20,8 +20,10 @@
import android.app.ListActivity;
import android.content.Intent;
+import android.content.res.Configuration;
import android.os.Bundle;
import android.view.View;
+import android.view.Window;
import android.widget.ListView;
/** {@link ListActivity} that displays a list of manual tests. */
@@ -57,6 +59,10 @@
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ if ((getResources().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_MASK)
+ == Configuration.UI_MODE_TYPE_TELEVISION) {
+ getWindow().requestFeature(Window.FEATURE_OPTIONS_PANEL);
+ }
setContentView(R.layout.list_content);
}