Skip to content

Commit 0cf2c8a

Browse files
author
Dianne Hackborn
committed
Fix issue #6515427: Add android.hardware.television and fix...
...logic for notouch in Configuration Added new TELEVISION feature. We now force the configuration to "television" if the TELEVISION feature is set, and "notouch" if the TOUCHSCREEN feature is not set. Also cleaned up documentation, deprecated some configurations that are not used. Change-Id: If1c7a284b580a8a66bda2a75f0c7fa841b3dc9b7
1 parent 20c0cdb commit 0cf2c8a

File tree

7 files changed

+191
-34
lines changed

7 files changed

+191
-34
lines changed

api/16.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6519,6 +6519,7 @@ package android.content.pm {
65196519
field public static final java.lang.String FEATURE_TELEPHONY = "android.hardware.telephony";
65206520
field public static final java.lang.String FEATURE_TELEPHONY_CDMA = "android.hardware.telephony.cdma";
65216521
field public static final java.lang.String FEATURE_TELEPHONY_GSM = "android.hardware.telephony.gsm";
6522+
field public static final java.lang.String FEATURE_TELEVISION = "android.hardware.type.television";
65226523
field public static final java.lang.String FEATURE_TOUCHSCREEN = "android.hardware.touchscreen";
65236524
field public static final java.lang.String FEATURE_TOUCHSCREEN_MULTITOUCH = "android.hardware.touchscreen.multitouch";
65246525
field public static final java.lang.String FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT = "android.hardware.touchscreen.multitouch.distinct";
@@ -6794,7 +6795,7 @@ package android.content.res {
67946795
field public static final int NAVIGATION_WHEEL = 4; // 0x4
67956796
field public static final int ORIENTATION_LANDSCAPE = 2; // 0x2
67966797
field public static final int ORIENTATION_PORTRAIT = 1; // 0x1
6797-
field public static final int ORIENTATION_SQUARE = 3; // 0x3
6798+
field public static final deprecated int ORIENTATION_SQUARE = 3; // 0x3
67986799
field public static final int ORIENTATION_UNDEFINED = 0; // 0x0
67996800
field public static final int SCREENLAYOUT_LONG_MASK = 48; // 0x30
68006801
field public static final int SCREENLAYOUT_LONG_NO = 16; // 0x10
@@ -6811,7 +6812,7 @@ package android.content.res {
68116812
field public static final int SMALLEST_SCREEN_WIDTH_DP_UNDEFINED = 0; // 0x0
68126813
field public static final int TOUCHSCREEN_FINGER = 3; // 0x3
68136814
field public static final int TOUCHSCREEN_NOTOUCH = 1; // 0x1
6814-
field public static final int TOUCHSCREEN_STYLUS = 2; // 0x2
6815+
field public static final deprecated int TOUCHSCREEN_STYLUS = 2; // 0x2
68156816
field public static final int TOUCHSCREEN_UNDEFINED = 0; // 0x0
68166817
field public static final int UI_MODE_NIGHT_MASK = 48; // 0x30
68176818
field public static final int UI_MODE_NIGHT_NO = 16; // 0x10

api/current.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6519,6 +6519,7 @@ package android.content.pm {
65196519
field public static final java.lang.String FEATURE_TELEPHONY = "android.hardware.telephony";
65206520
field public static final java.lang.String FEATURE_TELEPHONY_CDMA = "android.hardware.telephony.cdma";
65216521
field public static final java.lang.String FEATURE_TELEPHONY_GSM = "android.hardware.telephony.gsm";
6522+
field public static final java.lang.String FEATURE_TELEVISION = "android.hardware.type.television";
65226523
field public static final java.lang.String FEATURE_TOUCHSCREEN = "android.hardware.touchscreen";
65236524
field public static final java.lang.String FEATURE_TOUCHSCREEN_MULTITOUCH = "android.hardware.touchscreen.multitouch";
65246525
field public static final java.lang.String FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT = "android.hardware.touchscreen.multitouch.distinct";
@@ -6794,7 +6795,7 @@ package android.content.res {
67946795
field public static final int NAVIGATION_WHEEL = 4; // 0x4
67956796
field public static final int ORIENTATION_LANDSCAPE = 2; // 0x2
67966797
field public static final int ORIENTATION_PORTRAIT = 1; // 0x1
6797-
field public static final int ORIENTATION_SQUARE = 3; // 0x3
6798+
field public static final deprecated int ORIENTATION_SQUARE = 3; // 0x3
67986799
field public static final int ORIENTATION_UNDEFINED = 0; // 0x0
67996800
field public static final int SCREENLAYOUT_LONG_MASK = 48; // 0x30
68006801
field public static final int SCREENLAYOUT_LONG_NO = 16; // 0x10
@@ -6811,7 +6812,7 @@ package android.content.res {
68116812
field public static final int SMALLEST_SCREEN_WIDTH_DP_UNDEFINED = 0; // 0x0
68126813
field public static final int TOUCHSCREEN_FINGER = 3; // 0x3
68136814
field public static final int TOUCHSCREEN_NOTOUCH = 1; // 0x1
6814-
field public static final int TOUCHSCREEN_STYLUS = 2; // 0x2
6815+
field public static final deprecated int TOUCHSCREEN_STYLUS = 2; // 0x2
68156816
field public static final int TOUCHSCREEN_UNDEFINED = 0; // 0x0
68166817
field public static final int UI_MODE_NIGHT_MASK = 48; // 0x30
68176818
field public static final int UI_MODE_NIGHT_NO = 16; // 0x10

core/java/android/content/pm/PackageManager.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,17 @@ public NameNotFoundException(String name) {
10491049
@SdkConstant(SdkConstantType.FEATURE)
10501050
public static final String FEATURE_WIFI_DIRECT = "android.hardware.wifi.direct";
10511051

1052+
/**
1053+
* Feature for {@link #getSystemAvailableFeatures} and
1054+
* {@link #hasSystemFeature}: This is a device dedicated to showing UI
1055+
* on a television. Television here is defined to be a typical living
1056+
* room television experience: displayed on a big screen, where the user
1057+
* is sitting far away from it, and the dominant form of input will be
1058+
* something like a DPAD, not through touch or mouse.
1059+
*/
1060+
@SdkConstant(SdkConstantType.FEATURE)
1061+
public static final String FEATURE_TELEVISION = "android.hardware.type.television";
1062+
10521063
/**
10531064
* Action to external storage service to clean out removed apps.
10541065
* @hide

0 commit comments

Comments
 (0)