diff options
| author | Dan Morrill <morrildl@google.com> | 2010-03-05 16:16:19 -0800 |
|---|---|---|
| committer | Dan Morrill <morrildl@google.com> | 2010-03-08 19:28:28 -0800 |
| commit | 50ab63f5831fed5cfa888fb67f0a27eb4c0a86c4 (patch) | |
| tree | 156e3ff391ff48fa39a52ee16c10fe11961d8ca7 /data | |
| parent | 8d8a915a935378405fcf9978b83bd815ac5a265c (diff) | |
| download | frameworks_base-50ab63f5831fed5cfa888fb67f0a27eb4c0a86c4.zip frameworks_base-50ab63f5831fed5cfa888fb67f0a27eb4c0a86c4.tar.gz frameworks_base-50ab63f5831fed5cfa888fb67f0a27eb4c0a86c4.tar.bz2 | |
Adding definitions & APIs for features that are newly-optional in FroYo.
This also refactors the files containing the features so that they are more
modular. Note that this also changes data/etc/Android.mk so that
required_hardware.xml is NOT copied automatically for all devices
anymore. Accordingly, that file is removed.
Diffstat (limited to 'data')
| -rw-r--r-- | data/etc/Android.mk | 14 | ||||
| -rw-r--r-- | data/etc/android.hardware.camera.xml | 20 | ||||
| -rw-r--r-- | data/etc/android.hardware.location.gps.xml (renamed from data/etc/required_hardware.xml) | 9 | ||||
| -rw-r--r-- | data/etc/android.hardware.location.xml | 22 | ||||
| -rw-r--r-- | data/etc/android.hardware.sensor.accelerometer.xml | 20 | ||||
| -rw-r--r-- | data/etc/android.hardware.sensor.compass.xml | 20 | ||||
| -rw-r--r-- | data/etc/android.hardware.telephony.cdma.xml | 2 | ||||
| -rw-r--r-- | data/etc/android.hardware.telephony.gsm.xml | 2 | ||||
| -rw-r--r-- | data/etc/android.hardware.touchscreen.multitouch.distinct.xml | 23 | ||||
| -rw-r--r-- | data/etc/android.hardware.touchscreen.multitouch.xml | 4 | ||||
| -rw-r--r-- | data/etc/android.hardware.touchscreen.xml | 21 | ||||
| -rw-r--r-- | data/etc/android.hardware.wifi.xml | 20 | ||||
| -rw-r--r-- | data/etc/handheld_core_hardware.xml | 49 |
13 files changed, 208 insertions, 18 deletions
diff --git a/data/etc/Android.mk b/data/etc/Android.mk index 041c5d3..71a9a15 100644 --- a/data/etc/Android.mk +++ b/data/etc/Android.mk @@ -34,18 +34,18 @@ LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT) ######################## -include $(CLEAR_VARS) +#include $(CLEAR_VARS) -LOCAL_MODULE := required_hardware.xml +#LOCAL_MODULE := required_hardware.xml -LOCAL_MODULE_TAGS := user +#LOCAL_MODULE_TAGS := user -LOCAL_MODULE_CLASS := ETC +#LOCAL_MODULE_CLASS := ETC # This will install the file in /system/etc/permissions # -LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions +#LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions -LOCAL_SRC_FILES := $(LOCAL_MODULE) +#LOCAL_SRC_FILES := $(LOCAL_MODULE) -include $(BUILD_PREBUILT) +#include $(BUILD_PREBUILT) diff --git a/data/etc/android.hardware.camera.xml b/data/etc/android.hardware.camera.xml new file mode 100644 index 0000000..00a1ed7 --- /dev/null +++ b/data/etc/android.hardware.camera.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- This is the standard set of features for a non auto-focus camera. --> +<permissions> + <feature name="android.hardware.camera" /> +</permissions> diff --git a/data/etc/required_hardware.xml b/data/etc/android.hardware.location.gps.xml index 3ffe6b2..72ab732 100644 --- a/data/etc/required_hardware.xml +++ b/data/etc/android.hardware.location.gps.xml @@ -14,16 +14,9 @@ limitations under the License. --> -<!-- These are the hardware features that all devices must possess. - These are always added for you by the build system, you do not need - to add them yourself. --> +<!-- These are the location-related features for devices that include GPS. --> <permissions> <feature name="android.hardware.location" /> <feature name="android.hardware.location.network" /> <feature name="android.hardware.location.gps" /> - <feature name="android.hardware.sensor.compass" /> - <feature name="android.hardware.sensor.accelerometer" /> - <feature name="android.hardware.bluetooth" /> - <feature name="android.hardware.wifi" /> - <feature name="android.hardware.touchscreen" /> </permissions> diff --git a/data/etc/android.hardware.location.xml b/data/etc/android.hardware.location.xml new file mode 100644 index 0000000..ab901cf --- /dev/null +++ b/data/etc/android.hardware.location.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- These are the location features for devices that do not include GPS. Note + that network location is required for all devices. --> +<permissions> + <feature name="android.hardware.location" /> + <feature name="android.hardware.location.network" /> +</permissions> diff --git a/data/etc/android.hardware.sensor.accelerometer.xml b/data/etc/android.hardware.sensor.accelerometer.xml new file mode 100644 index 0000000..22f18b8 --- /dev/null +++ b/data/etc/android.hardware.sensor.accelerometer.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- Feature for devices with an accelerometer sensor. --> +<permissions> + <feature name="android.hardware.sensor.accelerometer" /> +</permissions> diff --git a/data/etc/android.hardware.sensor.compass.xml b/data/etc/android.hardware.sensor.compass.xml new file mode 100644 index 0000000..963847d --- /dev/null +++ b/data/etc/android.hardware.sensor.compass.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- Feature for devices with a compass. --> +<permissions> + <feature name="android.hardware.sensor.compass" /> +</permissions> diff --git a/data/etc/android.hardware.telephony.cdma.xml b/data/etc/android.hardware.telephony.cdma.xml index 72e0485..082378d 100644 --- a/data/etc/android.hardware.telephony.cdma.xml +++ b/data/etc/android.hardware.telephony.cdma.xml @@ -14,7 +14,7 @@ limitations under the License. --> -<!-- This is the standard set of features for a CDMA phone. --> +<!-- This is the standard set of telephony features for a CDMA phone. --> <permissions> <feature name="android.hardware.telephony" /> <feature name="android.hardware.telephony.cdma" /> diff --git a/data/etc/android.hardware.telephony.gsm.xml b/data/etc/android.hardware.telephony.gsm.xml index ffde433..7927fa8 100644 --- a/data/etc/android.hardware.telephony.gsm.xml +++ b/data/etc/android.hardware.telephony.gsm.xml @@ -14,7 +14,7 @@ limitations under the License. --> -<!-- This is the standard set of features for a GSM phone. --> +<!-- This is the standard set of telephony features for a GSM phone. --> <permissions> <feature name="android.hardware.telephony" /> <feature name="android.hardware.telephony.gsm" /> diff --git a/data/etc/android.hardware.touchscreen.multitouch.distinct.xml b/data/etc/android.hardware.touchscreen.multitouch.distinct.xml new file mode 100644 index 0000000..a3c116a --- /dev/null +++ b/data/etc/android.hardware.touchscreen.multitouch.distinct.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- This is the standard set of features for a touchscreen that supports + independently-trackable multiple-finger multitouch. --> +<permissions> + <feature name="android.hardware.touchscreen" /> + <feature name="android.hardware.touchscreen.multitouch" /> + <feature name="android.hardware.touchscreen.multitouch.distinct" /> +</permissions> diff --git a/data/etc/android.hardware.touchscreen.multitouch.xml b/data/etc/android.hardware.touchscreen.multitouch.xml index 3d2399a..34b518a 100644 --- a/data/etc/android.hardware.touchscreen.multitouch.xml +++ b/data/etc/android.hardware.touchscreen.multitouch.xml @@ -15,7 +15,9 @@ --> <!-- This is the standard set of features for a touchscreen that supports - multitouch. --> + basic multitouch capable of gestures but not fully-indendent finger + tracking. --> <permissions> + <feature name="android.hardware.touchscreen" /> <feature name="android.hardware.touchscreen.multitouch" /> </permissions> diff --git a/data/etc/android.hardware.touchscreen.xml b/data/etc/android.hardware.touchscreen.xml new file mode 100644 index 0000000..10c91f1 --- /dev/null +++ b/data/etc/android.hardware.touchscreen.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- This is the standard set of features for a touchscreen that does not + support multitouch. --> +<permissions> + <feature name="android.hardware.touchscreen" /> +</permissions> diff --git a/data/etc/android.hardware.wifi.xml b/data/etc/android.hardware.wifi.xml new file mode 100644 index 0000000..512570c --- /dev/null +++ b/data/etc/android.hardware.wifi.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- This is the standard feature indicating that the device includes WiFi. --> +<permissions> + <feature name="android.hardware.wifi" /> +</permissions> diff --git a/data/etc/handheld_core_hardware.xml b/data/etc/handheld_core_hardware.xml new file mode 100644 index 0000000..564fa84 --- /dev/null +++ b/data/etc/handheld_core_hardware.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- These are the hardware components that all handheld devices + must include. Devices with optional hardware must also include extra + hardware files, per the comments below. + + Handheld devices include phones, mobile Internet devices (MIDs), + Personal Media Players (PMPs), small tablets (7" or less), and similar + devices. +--> +<permissions> + <feature name="android.hardware.camera" /> + <feature name="android.hardware.location" /> + <feature name="android.hardware.location.network" /> + <feature name="android.hardware.sensor.compass" /> + <feature name="android.hardware.sensor.accelerometer" /> + <feature name="android.hardware.bluetooth" /> + <feature name="android.hardware.touchscreen" /> + <feature name="android.hardware.microphone" /> + <!-- devices with GPS must include android.hardware.location.gps.xml --> + <!-- devices with an autofocus camera and/or flash must include either + android.hardware.camera.autofocus.xml or + android.hardware.camera.autofocus-flash.xml --> + <!-- devices with WiFi must also include android.hardware.wifi.xml --> + <!-- devices with limited/gestural multitouch must also include + android.hardware.touchscreen.multitouch.xml --> + <!-- devices with full multitouch must also include + android.hardware.touchscreen.multitouch.distinct.xml --> + <!-- devices with an ambient light sensor must also include + android.hardware.sensor.light.xml --> + <!-- devices with a proximity sensor must also include + android.hardware.sensor.proximity.xml --> + <!-- GSM phones must also include android.hardware.telephony.gsm.xml --> + <!-- CDMA phones must also include android.hardware.telephony.cdma.xml --> +</permissions> |
