Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50ab63f5 authored by Dan Morrill's avatar Dan Morrill
Browse files

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.
parent 8d8a915a
Loading
Loading
Loading
Loading
+99 −0
Original line number Diff line number Diff line
@@ -45353,6 +45353,105 @@
 visibility="public"
>
</field>
<field name="FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.touchscreen.multitouch.distinct&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FEATURE_BLUETOOTH"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.bluetooth&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FEATURE_LOCATION"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.location&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FEATURE_LOCATION_GPS"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.location.gps&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FEATURE_LOCATION_NETWORK"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.location.network&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FEATURE_MICROPHONE"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.microphone&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FEATURE_WIFI"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.wifi&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FEATURE_SENSOR_ACCELEROMETER"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.sensor.accelerometer&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="FEATURE_SENSOR_COMPASS"
 type="java.lang.String"
 transient="false"
 volatile="false"
 value="&quot;android.hardware.sensor.compass&quot;"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="GET_ACTIVITIES"
 type="int"
 transient="false"
+75 −5
Original line number Diff line number Diff line
@@ -600,6 +600,14 @@ public abstract class PackageManager {
     */
    public static final int MOVE_EXTERNAL_MEDIA = 0x00000002;

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device is capable of communicating with
     * other devices via Bluetooth.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_BLUETOOTH = "android.hardware.bluetooth";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device has a camera facing away
@@ -622,6 +630,52 @@ public abstract class PackageManager {
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_CAMERA_FLASH = "android.hardware.camera.flash";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device supports one or more methods of
     * reporting current location.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_LOCATION = "android.hardware.location";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device has a Global Positioning System
     * receiver and can report precise location.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_LOCATION_GPS = "android.hardware.location.gps";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device can report location with coarse
     * accuracy using a network-based geolocation system.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_LOCATION_NETWORK = "android.hardware.location.network";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device can record audio via a
     * microphone.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_MICROPHONE = "android.hardware.microphone";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device includes a magnetometer (compass).
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_SENSOR_COMPASS = "android.hardware.sensor.compass";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device includes an accelerometer.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_SENSOR_ACCELEROMETER = "android.hardware.sensor.accelerometer";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device includes a light sensor.
@@ -660,11 +714,20 @@ public abstract class PackageManager {
    
    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device's touch screen supports multitouch.
     * {@link #hasSystemFeature}: The device's touch screen supports
     * multitouch sufficient for basic two-finger gesture detection.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_TOUCHSCREEN_MULTITOUCH = "android.hardware.touchscreen.multitouch";
    
    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device's touch screen is capable of
     * tracking two or more fingers fully independently.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT = "android.hardware.touchscreen.multitouch.distinct";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device supports live wallpapers.
@@ -672,6 +735,13 @@ public abstract class PackageManager {
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_LIVE_WALLPAPER = "android.software.live_wallpaper";

    /**
     * Feature for {@link #getSystemAvailableFeatures} and
     * {@link #hasSystemFeature}: The device supports WiFi (802.11) networking.
     */
    @SdkConstant(SdkConstantType.FEATURE)
    public static final String FEATURE_WIFI = "android.hardware.wifi";

    /**
     * Action to external storage service to clean out removed apps.
     * @hide
+7 −7
Original line number Diff line number Diff line
@@ -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)
+20 −0
Original line number Diff line number Diff line
<?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>
+1 −8
Original line number Diff line number Diff line
@@ -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>
Loading