summaryrefslogtreecommitdiffstats
path: root/overlay
diff options
context:
space:
mode:
authorDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-07-25 04:32:16 +0200
committerDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-07-25 04:32:16 +0200
commit51841ab0c58201c6c45ca22ceac30f1229213f7d (patch)
treea41a43753b458be8976d7684c2741b249d4fc33a /overlay
downloaddevice_samsung_galaxys2-common-51841ab0c58201c6c45ca22ceac30f1229213f7d.zip
device_samsung_galaxys2-common-51841ab0c58201c6c45ca22ceac30f1229213f7d.tar.gz
device_samsung_galaxys2-common-51841ab0c58201c6c45ca22ceac30f1229213f7d.tar.bz2
initial commit
Diffstat (limited to 'overlay')
-rw-r--r--overlay/frameworks/base/core/res/res/values/arrays.xml37
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml169
-rw-r--r--overlay/frameworks/base/core/res/res/xml/power_profile.xml59
-rw-r--r--overlay/frameworks/base/core/res/res/xml/storage_list.xml51
-rw-r--r--overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml22
-rw-r--r--overlay/frameworks/base/packages/SystemUI/res/values/config.xml26
-rw-r--r--overlay/include/hardware/gps.h686
-rw-r--r--overlay/include/hardware/gralloc.h273
-rw-r--r--overlay/packages/apps/Camera/res/values/config.xml27
-rw-r--r--overlay/packages/apps/Phone/res/values/config.xml25
-rw-r--r--overlay/packages/apps/Settings/res/values/config.xml24
-rw-r--r--overlay/packages/apps/Torch/res/values/config.xml27
12 files changed, 1426 insertions, 0 deletions
diff --git a/overlay/frameworks/base/core/res/res/values/arrays.xml b/overlay/frameworks/base/core/res/res/values/arrays.xml
new file mode 100644
index 0000000..fa33631
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values/arrays.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/colors.xml
+**
+** Copyright 2006, 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.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+<!-- Defines the shutdown options shown in the reboot dialog. -->
+ <array name="shutdown_reboot_options" translatable="false">
+ <item>@string/reboot_reboot</item>
+ <item>@string/reboot_recovery</item>
+ <item>@string/reboot_download</item>
+ </array>
+
+ <!-- Do not translate. Defines the shutdown actions passed to the kernel.
+ The first item should be empty for regular reboot. -->
+ <string-array name="shutdown_reboot_actions" translatable="false">
+ <item></item>
+ <item>recovery</item>
+ <item>bootloader</item>
+ </string-array>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..edcae91
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, 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 resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+
+ <!-- Our amoled doesn't animate well. -->
+ <bool name="config_animateScreenLights">false</bool>
+
+ <integer name="config_deskDockKeepsScreenOn">0</integer>
+ <integer name="config_carDockKeepsScreenOn">1</integer>
+
+ <!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
+ <bool name="config_unplugTurnsOnScreen">true</bool>
+
+ <!-- Component name of the service providing network location support. -->
+ <string name="config_networkLocationProviderPackageName">com.google.android.location.NetworkLocationProvider</string>
+
+ <!-- Component name of the service providing geocoder API support. -->
+ <string name="config_geocodeProviderPackageName">com.google.android.location.GeocodeProvider</string>
+
+ <!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
+ autodetected from the Configuration. -->
+ <bool name="config_showNavigationBar">false</bool>
+
+ <!-- XXXXX NOTE THE FOLLOWING RESOURCES USE THE WRONG NAMING CONVENTION.
+ Please don't copy them, copy anything else. -->
+
+ <!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
+ [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
+ <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
+ before automatically restore the default connection. Set -1 if the connection
+ does not require auto-restore. -->
+ <!-- the 6th element indicates boot-time dependency-met value. -->
+ <string-array translatable="false" name="networkAttributes">
+ <item>"wifi,1,1,1,-1,true"</item>
+ <item>"mobile,0,0,0,-1,true"</item>
+ <item>"mobile_mms,2,0,2,60000,true"</item>
+ <item>"mobile_supl,3,0,2,60000,true"</item>
+ <item>"mobile_dun,4,0,3,60000,true"</item>
+ <item>"mobile_hipri,5,0,3,60000,true"</item>
+ <item>"mobile_bluetooth,7,7,1,-1,true"</item>
+ <item>"wifi_p2p,13,1,0,-1,true"</item>
+ </string-array>
+
+ <!-- An Array of "[ConnectivityManager connectionType],
+ [# simultaneous connection types]" -->
+ <string-array translatable="false" name="radioAttributes">
+ <item>"1,1"</item>
+ <item>"0,1"</item>
+ <item>"7,1"</item>
+ </string-array>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ USB interfaces. If the device doesn't want to support tething over USB this should
+ be empty. An example would be "usb.*" -->
+ <string-array translatable="false" name="config_tether_usb_regexs">
+ <item>"rndis0"</item>
+ </string-array>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ Wifi interfaces. If the device doesn't want to support tethering over Wifi this
+ should be empty. An example would be "softap.*" -->
+ <string-array translatable="false" name="config_tether_wifi_regexs">
+ <item>"wlan0"</item>
+ </string-array>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
+ bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
+ should be empty. -->
+ <string-array translatable="false" name="config_tether_bluetooth_regexs">
+ <item>"bnep\\d"</item>
+ </string-array>
+
+ <!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
+ <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
+ <!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
+ <integer-array translatable="false" name="config_tether_upstream_types">
+ <item>0</item>
+ <item>1</item>
+ <item>5</item>
+ <item>7</item>
+ </integer-array>
+
+ <!-- Boolean indicating whether the wifi chipset has dual frequency band support -->
+ <bool translatable="false" name="config_wifi_dual_band_support">true</bool>
+
+ <!-- Boolean indicating whether the wifi chipset has p2p support -->
+ <bool translatable="false" name="config_wifi_p2p_support">true</bool>
+
+ <!-- Boolean indicating whether the wifi chipset has background scan support -->
+ <bool translatable="false" name="config_wifi_background_scan_support">true</bool>
+
+ <bool name="config_ui_enableFadingMarquee">false</bool>
+
+ <!-- Vibrator pattern for feedback about a long screen/key press -->
+ <integer-array name="config_longPressVibePattern">
+ <item>0</item>
+ <item>1</item>
+ <item>20</item>
+ <item>21</item>
+ </integer-array>
+
+ <!-- Vibrator pattern for feedback about touching a virtual key -->
+ <integer-array name="config_virtualKeyVibePattern">
+ <item>0</item>
+ <item>1</item>
+ <item>20</item>
+ <item>21</item>
+ </integer-array>
+
+ <!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap -->
+ <integer-array name="config_keyboardTapVibePattern">
+ <item>20</item>
+ </integer-array>
+
+ <!-- Vibrator pattern for feedback about booting with safe mode disabled -->
+ <integer-array name="config_safeModeDisabledVibePattern">
+ <item>0</item>
+ <item>1</item>
+ <item>20</item>
+ <item>21</item>
+ </integer-array>
+
+ <!-- Vibrator pattern for feedback about booting with safe mode disabled -->
+ <integer-array name="config_safeModeEnabledVibePattern">
+ <item>0</item>
+ <item>1</item>
+ <item>20</item>
+ <item>21</item>
+ <item>500</item>
+ <item>600</item>
+ </integer-array>
+
+ <!-- Vibrator pattern for feedback about hitting a scroll barrier -->
+ <integer-array name="config_scrollBarrierVibePattern">
+ <item>0</item>
+ <item>15</item>
+ <item>10</item>
+ <item>10</item>
+ </integer-array>
+
+ <!-- The default iface on which to monitor data use -->
+ <string name="config_datause_iface">pdp0</string>
+
+ <!-- Allow the menu hard key to be disabled in LockScreen on some devices -->
+ <bool name="config_disableMenuKeyInLockScreen">true</bool>
+
+ <!-- Workaround for devices with broken keyboards -->
+ <bool name="config_forceDisableHardwareKeyboard">true</bool>
+
+</resources>
diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
new file mode 100644
index 0000000..9bb46a8
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2011, 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.
+*/
+-->
+
+<device name="Android">
+ <!-- All values are in mA except as noted -->
+ <item name="none">0</item>
+ <item name="screen.on">200</item> <!-- min brite -->
+ <item name="bluetooth.active">150</item>
+ <item name="bluetooth.on">1</item>
+ <item name="bluetooth.at">1</item> <!-- TBD -->
+ <item name="screen.full">160</item> <!-- 360 max on calendar -->
+ <item name="wifi.on">1</item>
+ <item name="wifi.active">150</item>
+ <item name="wifi.scan">200</item>
+ <item name="dsp.audio">150</item>
+ <item name="dsp.video">200</item>
+ <item name="radio.active">150</item>
+ <item name="gps.on">55</item>
+ <item name="battery.capacity">1750</item>
+ <item name="radio.scanning">90</item> <!-- TBD -->
+ <!-- Current consumed by the radio at different signal strengths, when paging -->
+ <array name="radio.on"> <!-- 1 entry per signal strength bin, TBD -->
+ <value>3.0</value>
+ <value>3.0</value>
+ </array>
+ <array name="cpu.speeds">
+ <value>350000</value>
+ <value>700000</value>
+ <value>920000</value>
+ <value>1200000</value>
+ </array>
+ <!-- Power consumption in suspend -->
+ <item name="cpu.idle">7</item>
+ <!-- Power consumption due to wake lock held -->
+ <item name="cpu.awake">20</item>
+ <!-- Power consumption at different speeds -->
+ <array name="cpu.active">
+ <value>120</value>
+ <value>228</value>
+ <value>299</value>
+ <value>397</value>
+ </array>
+</device>
diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
new file mode 100644
index 0000000..20b5fe8
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2011, 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.
+*/
+-->
+
+<!-- The <device> element should contain one or more <storage> elements.
+ Exactly one of these should have the attribute primary="true".
+ This storage will be the primary external storage and should have path="/mnt/sdcard".
+ Each storage should have both a path and description attribute set.
+ The following boolean attributes are optional:
+
+ primary: this storage is the primary external storage
+ removable: this is removable storage (for example, a real SD card)
+ emulated: the storage is emulated via the FUSE sdcard daemon
+ mtp-reserve: number of megabytes of storage MTP should reserve for free storage
+ (used for emulated storage that is shared with system's data partition)
+
+ A storage should not have both emulated and removable set to true
+-->
+
+<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
+ <storage android:mountPoint="/storage/sdcard0"
+ android:storageDescription="@string/storage_internal"
+ android:primary="true"
+ android:removable="false" />
+
+ <storage android:mountPoint="/storage/sdcard1"
+ android:storageDescription="@string/storage_sd_card"
+ android:primary="false"
+ android:removable="false" />
+
+ <storage android:mountPoint="/storage/usbdisk0"
+ android:storageDescription="@string/storage_usb"
+ android:primary="false"
+ android:removable="true" />
+
+</StorageList>
diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
new file mode 100644
index 0000000..1e32354
--- /dev/null
+++ b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2011, 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.
+ */
+-->
+<resources>
+ <!-- Screen timeout default = 30 seconds -->
+ <integer name="def_screen_off_timeout">30000</integer>
+</resources>
diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
new file mode 100644
index 0000000..88851f7
--- /dev/null
+++ b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, The CyanogenMod 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 resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+ <!-- Control whether status bar should distinguish HSPA data icon form UMTS data icon on devices -->
+ <bool name="config_hspa_data_distinguishable">true</bool>
+</resources>
+
diff --git a/overlay/include/hardware/gps.h b/overlay/include/hardware/gps.h
new file mode 100644
index 0000000..05b3b11
--- /dev/null
+++ b/overlay/include/hardware/gps.h
@@ -0,0 +1,686 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#ifndef ANDROID_INCLUDE_HARDWARE_GPS_H
+#define ANDROID_INCLUDE_HARDWARE_GPS_H
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <pthread.h>
+
+#include <hardware/hardware.h>
+
+__BEGIN_DECLS
+
+/**
+ * The id of this module
+ */
+#define GPS_HARDWARE_MODULE_ID "gps"
+
+
+/** Milliseconds since January 1, 1970 */
+typedef int64_t GpsUtcTime;
+
+/** Maximum number of SVs for gps_sv_status_callback(). */
+#define GPS_MAX_SVS 32
+
+/** Requested operational mode for GPS operation. */
+typedef uint32_t GpsPositionMode;
+// IMPORTANT: Note that the following values must match
+// constants in GpsLocationProvider.java.
+/** Mode for running GPS standalone (no assistance). */
+#define GPS_POSITION_MODE_STANDALONE 0
+/** AGPS MS-Based mode. */
+#define GPS_POSITION_MODE_MS_BASED 1
+/** AGPS MS-Assisted mode. */
+#define GPS_POSITION_MODE_MS_ASSISTED 2
+
+/** Requested recurrence mode for GPS operation. */
+typedef uint32_t GpsPositionRecurrence;
+// IMPORTANT: Note that the following values must match
+// constants in GpsLocationProvider.java.
+/** Receive GPS fixes on a recurring basis at a specified period. */
+#define GPS_POSITION_RECURRENCE_PERIODIC 0
+/** Request a single shot GPS fix. */
+#define GPS_POSITION_RECURRENCE_SINGLE 1
+
+/** GPS status event values. */
+typedef uint16_t GpsStatusValue;
+// IMPORTANT: Note that the following values must match
+// constants in GpsLocationProvider.java.
+/** GPS status unknown. */
+#define GPS_STATUS_NONE 0
+/** GPS has begun navigating. */
+#define GPS_STATUS_SESSION_BEGIN 1
+/** GPS has stopped navigating. */
+#define GPS_STATUS_SESSION_END 2
+/** GPS has powered on but is not navigating. */
+#define GPS_STATUS_ENGINE_ON 3
+/** GPS is powered off. */
+#define GPS_STATUS_ENGINE_OFF 4
+
+/** Flags to indicate which values are valid in a GpsLocation. */
+typedef uint16_t GpsLocationFlags;
+// IMPORTANT: Note that the following values must match
+// constants in GpsLocationProvider.java.
+/** GpsLocation has valid latitude and longitude. */
+#define GPS_LOCATION_HAS_LAT_LONG 0x0001
+/** GpsLocation has valid altitude. */
+#define GPS_LOCATION_HAS_ALTITUDE 0x0002
+/** GpsLocation has valid speed. */
+#define GPS_LOCATION_HAS_SPEED 0x0004
+/** GpsLocation has valid bearing. */
+#define GPS_LOCATION_HAS_BEARING 0x0008
+/** GpsLocation has valid accuracy. */
+#define GPS_LOCATION_HAS_ACCURACY 0x0010
+
+/** Flags for the gps_set_capabilities callback. */
+
+/** GPS HAL schedules fixes for GPS_POSITION_RECURRENCE_PERIODIC mode.
+ If this is not set, then the framework will use 1000ms for min_interval
+ and will start and call start() and stop() to schedule the GPS.
+ */
+#define GPS_CAPABILITY_SCHEDULING 0x0000001
+/** GPS supports MS-Based AGPS mode */
+#define GPS_CAPABILITY_MSB 0x0000002
+/** GPS supports MS-Assisted AGPS mode */
+#define GPS_CAPABILITY_MSA 0x0000004
+/** GPS supports single-shot fixes */
+#define GPS_CAPABILITY_SINGLE_SHOT 0x0000008
+/** GPS supports on demand time injection */
+#define GPS_CAPABILITY_ON_DEMAND_TIME 0x0000010
+
+/** Flags used to specify which aiding data to delete
+ when calling delete_aiding_data(). */
+typedef uint16_t GpsAidingData;
+// IMPORTANT: Note that the following values must match
+// constants in GpsLocationProvider.java.
+#define GPS_DELETE_EPHEMERIS 0x0001
+#define GPS_DELETE_ALMANAC 0x0002
+#define GPS_DELETE_POSITION 0x0004
+#define GPS_DELETE_TIME 0x0008
+#define GPS_DELETE_IONO 0x0010
+#define GPS_DELETE_UTC 0x0020
+#define GPS_DELETE_HEALTH 0x0040
+#define GPS_DELETE_SVDIR 0x0080
+#define GPS_DELETE_SVSTEER 0x0100
+#define GPS_DELETE_SADATA 0x0200
+#define GPS_DELETE_RTI 0x0400
+#define GPS_DELETE_CELLDB_INFO 0x8000
+#define GPS_DELETE_ALL 0xFFFF
+
+/** AGPS type */
+typedef uint16_t AGpsType;
+#define AGPS_TYPE_SUPL 1
+#define AGPS_TYPE_C2K 2
+
+typedef uint16_t AGpsSetIDType;
+#define AGPS_SETID_TYPE_NONE 0
+#define AGPS_SETID_TYPE_IMSI 1
+#define AGPS_SETID_TYPE_MSISDN 2
+
+/**
+ * String length constants
+ */
+#define GPS_NI_SHORT_STRING_MAXLEN 256
+#define GPS_NI_LONG_STRING_MAXLEN 2048
+
+/**
+ * GpsNiType constants
+ */
+typedef uint32_t GpsNiType;
+#define GPS_NI_TYPE_VOICE 1
+#define GPS_NI_TYPE_UMTS_SUPL 2
+#define GPS_NI_TYPE_UMTS_CTRL_PLANE 3
+
+/**
+ * GpsNiNotifyFlags constants
+ */
+typedef uint32_t GpsNiNotifyFlags;
+/** NI requires notification */
+#define GPS_NI_NEED_NOTIFY 0x0001
+/** NI requires verification */
+#define GPS_NI_NEED_VERIFY 0x0002
+/** NI requires privacy override, no notification/minimal trace */
+#define GPS_NI_PRIVACY_OVERRIDE 0x0004
+
+/**
+ * GPS NI responses, used to define the response in
+ * NI structures
+ */
+typedef int GpsUserResponseType;
+#define GPS_NI_RESPONSE_ACCEPT 1
+#define GPS_NI_RESPONSE_DENY 2
+#define GPS_NI_RESPONSE_NORESP 3
+
+/**
+ * NI data encoding scheme
+ */
+typedef int GpsNiEncodingType;
+#define GPS_ENC_NONE 0
+#define GPS_ENC_SUPL_GSM_DEFAULT 1
+#define GPS_ENC_SUPL_UTF8 2
+#define GPS_ENC_SUPL_UCS2 3
+#define GPS_ENC_UNKNOWN -1
+
+/** AGPS status event values. */
+typedef uint16_t AGpsStatusValue;
+/** GPS requests data connection for AGPS. */
+#define GPS_REQUEST_AGPS_DATA_CONN 1
+/** GPS releases the AGPS data connection. */
+#define GPS_RELEASE_AGPS_DATA_CONN 2
+/** AGPS data connection initiated */
+#define GPS_AGPS_DATA_CONNECTED 3
+/** AGPS data connection completed */
+#define GPS_AGPS_DATA_CONN_DONE 4
+/** AGPS data connection failed */
+#define GPS_AGPS_DATA_CONN_FAILED 5
+
+#define AGPS_REF_LOCATION_TYPE_GSM_CELLID 1
+#define AGPS_REF_LOCATION_TYPE_UMTS_CELLID 2
+#define AGPS_REG_LOCATION_TYPE_MAC 3
+
+/** Network types for update_network_state "type" parameter */
+#define AGPS_RIL_NETWORK_TYPE_MOBILE 0
+#define AGPS_RIL_NETWORK_TYPE_WIFI 1
+#define AGPS_RIL_NETWORK_TYPE_MOBILE_MMS 2
+#define AGPS_RIL_NETWORK_TYPE_MOBILE_SUPL 3
+#define AGPS_RIL_NETWORK_TTYPE_MOBILE_DUN 4
+#define AGPS_RIL_NETWORK_TTYPE_MOBILE_HIPRI 5
+#define AGPS_RIL_NETWORK_TTYPE_WIMAX 6
+
+/**
+ * Name for the GPS XTRA interface.
+ */
+#define GPS_XTRA_INTERFACE "gps-xtra"
+
+/**
+ * Name for the GPS DEBUG interface.
+ */
+#define GPS_DEBUG_INTERFACE "gps-debug"
+
+/**
+ * Name for the AGPS interface.
+ */
+#define AGPS_INTERFACE "agps"
+
+/**
+ * Name for NI interface
+ */
+#define GPS_NI_INTERFACE "gps-ni"
+
+/**
+ * Name for the AGPS-RIL interface.
+ */
+#define AGPS_RIL_INTERFACE "agps_ril"
+
+/** Represents a location. */
+typedef struct {
+ /** set to sizeof(GpsLocation) */
+ size_t size;
+ /** Contains GpsLocationFlags bits. */
+ uint16_t flags;
+ /** Represents latitude in degrees. */
+ double latitude;
+ /** Represents longitude in degrees. */
+ double longitude;
+ /** Represents altitude in meters above the WGS 84 reference
+ * ellipsoid. */
+ double altitude;
+ /** Represents speed in meters per second. */
+ float speed;
+ /** Represents heading in degrees. */
+ float bearing;
+ /** Represents expected accuracy in meters. */
+ float accuracy;
+ /** Timestamp for the location fix. */
+ GpsUtcTime timestamp;
+} GpsLocation;
+
+/** Represents the status. */
+typedef struct {
+ /** set to sizeof(GpsStatus) */
+ size_t size;
+ GpsStatusValue status;
+} GpsStatus;
+
+/** Represents SV information. */
+typedef struct {
+ /** set to sizeof(GpsSvInfo) */
+ size_t size;
+ /** Pseudo-random number for the SV. */
+ int prn;
+ /** Signal to noise ratio. */
+ float snr;
+ /** Elevation of SV in degrees. */
+ float elevation;
+ /** Azimuth of SV in degrees. */
+ float azimuth;
+ /** Unknown field in Samsung I9100 libgps
+ May be an indicator for constellation type
+ (GPS, GLONASS, Galileo)?
+ Used on GT-I9100, likely also present on GT-N7000,
+ SGH-I717, SGH-I727 but this needs confirmation.
+ */
+ int unknown_samsung_field;
+} GpsSvInfo;
+
+/** Represents SV status. */
+typedef struct {
+ /** set to sizeof(GpsSvStatus) */
+ size_t size;
+
+ /** Number of SVs currently visible. */
+ int num_svs;
+
+ /** Contains an array of SV information. */
+ GpsSvInfo sv_list[GPS_MAX_SVS];
+
+ /** Represents a bit mask indicating which SVs
+ * have ephemeris data.
+ */
+ uint32_t ephemeris_mask;
+
+ /** Represents a bit mask indicating which SVs
+ * have almanac data.
+ */
+ uint32_t almanac_mask;
+
+ /**
+ * Represents a bit mask indicating which SVs
+ * were used for computing the most recent position fix.
+ */
+ uint32_t used_in_fix_mask;
+} GpsSvStatus;
+
+/* 2G and 3G */
+/* In 3G lac is discarded */
+typedef struct {
+ uint16_t type;
+ uint16_t mcc;
+ uint16_t mnc;
+ uint16_t lac;
+ uint32_t cid;
+} AGpsRefLocationCellID;
+
+typedef struct {
+ uint8_t mac[6];
+} AGpsRefLocationMac;
+
+/** Represents ref locations */
+typedef struct {
+ uint16_t type;
+ union {
+ AGpsRefLocationCellID cellID;
+ AGpsRefLocationMac mac;
+ } u;
+} AGpsRefLocation;
+
+/** Callback with location information.
+ * Can only be called from a thread created by create_thread_cb.
+ */
+typedef void (* gps_location_callback)(GpsLocation* location);
+
+/** Callback with status information.
+ * Can only be called from a thread created by create_thread_cb.
+ */
+typedef void (* gps_status_callback)(GpsStatus* status);
+
+/** Callback with SV status information.
+ * Can only be called from a thread created by create_thread_cb.
+ */
+typedef void (* gps_sv_status_callback)(GpsSvStatus* sv_info);
+
+/** Callback for reporting NMEA sentences.
+ * Can only be called from a thread created by create_thread_cb.
+ */
+typedef void (* gps_nmea_callback)(GpsUtcTime timestamp, const char* nmea, int length);
+
+/** Callback to inform framework of the GPS engine's capabilities.
+ * Capability parameter is a bit field of GPS_CAPABILITY_* flags.
+ */
+typedef void (* gps_set_capabilities)(uint32_t capabilities);
+
+/** Callback utility for acquiring the GPS wakelock.
+ * This can be used to prevent the CPU from suspending while handling GPS events.
+ */
+typedef void (* gps_acquire_wakelock)();
+
+/** Callback utility for releasing the GPS wakelock. */
+typedef void (* gps_release_wakelock)();
+
+/** Callback for requesting NTP time */
+typedef void (* gps_request_utc_time)();
+
+/** Callback for creating a thread that can call into the Java framework code.
+ * This must be used to create any threads that report events up to the framework.
+ */
+typedef pthread_t (* gps_create_thread)(const char* name, void (*start)(void *), void* arg);
+
+/** GPS callback structure. */
+typedef struct {
+ /** set to sizeof(GpsCallbacks) */
+ size_t size;
+ gps_location_callback location_cb;
+ gps_status_callback status_cb;
+ gps_sv_status_callback sv_status_cb;
+ gps_nmea_callback nmea_cb;
+ gps_set_capabilities set_capabilities_cb;
+ gps_acquire_wakelock acquire_wakelock_cb;
+ gps_release_wakelock release_wakelock_cb;
+ gps_create_thread create_thread_cb;
+ gps_request_utc_time request_utc_time_cb;
+} GpsCallbacks;
+
+
+/** Represents the standard GPS interface. */
+typedef struct {
+ /** set to sizeof(GpsInterface) */
+ size_t size;
+ /**
+ * Opens the interface and provides the callback routines
+ * to the implemenation of this interface.
+ */
+ int (*init)( GpsCallbacks* callbacks );
+
+ /** Starts navigating. */
+ int (*start)( void );
+
+ /** Stops navigating. */
+ int (*stop)( void );
+
+ /** Closes the interface. */
+ void (*cleanup)( void );
+
+ /** Injects the current time. */
+ int (*inject_time)(GpsUtcTime time, int64_t timeReference,
+ int uncertainty);
+
+ /** Injects current location from another location provider
+ * (typically cell ID).
+ * latitude and longitude are measured in degrees
+ * expected accuracy is measured in meters
+ */
+ int (*inject_location)(double latitude, double longitude, float accuracy);
+
+ /**
+ * Specifies that the next call to start will not use the
+ * information defined in the flags. GPS_DELETE_ALL is passed for
+ * a cold start.
+ */
+ void (*delete_aiding_data)(GpsAidingData flags);
+
+ /**
+ * min_interval represents the time between fixes in milliseconds.
+ * preferred_accuracy represents the requested fix accuracy in meters.
+ * preferred_time represents the requested time to first fix in milliseconds.
+ */
+ int (*set_position_mode)(GpsPositionMode mode, GpsPositionRecurrence recurrence,
+ uint32_t min_interval, uint32_t preferred_accuracy, uint32_t preferred_time);
+
+ /** Get a pointer to extension information. */
+ const void* (*get_extension)(const char* name);
+} GpsInterface;
+
+/** Callback to request the client to download XTRA data.
+ * The client should download XTRA data and inject it by calling inject_xtra_data().
+ * Can only be called from a thread created by create_thread_cb.
+ */
+typedef void (* gps_xtra_download_request)();
+
+/** Callback structure for the XTRA interface. */
+typedef struct {
+ gps_xtra_download_request download_request_cb;
+ gps_create_thread create_thread_cb;
+} GpsXtraCallbacks;
+
+/** Extended interface for XTRA support. */
+typedef struct {
+ /** set to sizeof(GpsXtraInterface) */
+ size_t size;
+ /**
+ * Opens the XTRA interface and provides the callback routines
+ * to the implemenation of this interface.
+ */
+ int (*init)( GpsXtraCallbacks* callbacks );
+ /** Injects XTRA data into the GPS. */
+ int (*inject_xtra_data)( char* data, int length );
+} GpsXtraInterface;
+
+/** Extended interface for DEBUG support. */
+typedef struct {
+ /** set to sizeof(GpsDebugInterface) */
+ size_t size;
+
+ /**
+ * This function should return any information that the native
+ * implementation wishes to include in a bugreport.
+ */
+ size_t (*get_internal_state)(char* buffer, size_t bufferSize);
+} GpsDebugInterface;
+
+/** Represents the status of AGPS. */
+typedef struct {
+ /** set to sizeof(AGpsStatus) */
+ size_t size;
+
+ AGpsType type;
+ AGpsStatusValue status;
+ uint32_t ipaddr;
+} AGpsStatus;
+
+/** Callback with AGPS status information.
+ * Can only be called from a thread created by create_thread_cb.
+ */
+typedef void (* agps_status_callback)(AGpsStatus* status);
+
+/** Callback structure for the AGPS interface. */
+typedef struct {
+ agps_status_callback status_cb;
+ gps_create_thread create_thread_cb;
+} AGpsCallbacks;
+
+
+/** Extended interface for AGPS support. */
+typedef struct {
+ /** set to sizeof(AGpsInterface) */
+ size_t size;
+
+ /**
+ * Opens the AGPS interface and provides the callback routines
+ * to the implemenation of this interface.
+ */
+ void (*init)( AGpsCallbacks* callbacks );
+ /**
+ * Notifies that a data connection is available and sets
+ * the name of the APN to be used for SUPL.
+ */
+ int (*data_conn_open)( const char* apn );
+ /**
+ * Notifies that the AGPS data connection has been closed.
+ */
+ int (*data_conn_closed)();
+ /**
+ * Notifies that a data connection is not available for AGPS.
+ */
+ int (*data_conn_failed)();
+ /**
+ * Sets the hostname and port for the AGPS server.
+ */
+ int (*set_server)( AGpsType type, const char* hostname, int port );
+} AGpsInterface;
+
+
+/** Represents an NI request */
+typedef struct {
+ /** set to sizeof(GpsNiNotification) */
+ size_t size;
+
+ /**
+ * An ID generated by HAL to associate NI notifications and UI
+ * responses
+ */
+ int notification_id;
+
+ /**
+ * An NI type used to distinguish different categories of NI
+ * events, such as GPS_NI_TYPE_VOICE, GPS_NI_TYPE_UMTS_SUPL, ...
+ */
+ GpsNiType ni_type;
+
+ /**
+ * Notification/verification options, combinations of GpsNiNotifyFlags constants
+ */
+ GpsNiNotifyFlags notify_flags;
+
+ /**
+ * Timeout period to wait for user response.
+ * Set to 0 for no time out limit.
+ */
+ int timeout;
+
+ /**
+ * Default response when time out.
+ */
+ GpsUserResponseType default_response;
+
+ /**
+ * Requestor ID
+ */
+ char requestor_id[GPS_NI_SHORT_STRING_MAXLEN];
+
+ /**
+ * Notification message. It can also be used to store client_id in some cases
+ */
+ char text[GPS_NI_LONG_STRING_MAXLEN];
+
+ /**
+ * Client name decoding scheme
+ */
+ GpsNiEncodingType requestor_id_encoding;
+
+ /**
+ * Client name decoding scheme
+ */
+ GpsNiEncodingType text_encoding;
+
+ /**
+ * A pointer to extra data. Format:
+ * key_1 = value_1
+ * key_2 = value_2
+ */
+ char extras[GPS_NI_LONG_STRING_MAXLEN];
+
+} GpsNiNotification;
+
+/** Callback with NI notification.
+ * Can only be called from a thread created by create_thread_cb.
+ */
+typedef void (*gps_ni_notify_callback)(GpsNiNotification *notification);
+
+/** GPS NI callback structure. */
+typedef struct
+{
+ /**
+ * Sends the notification request from HAL to GPSLocationProvider.
+ */
+ gps_ni_notify_callback notify_cb;
+ gps_create_thread create_thread_cb;
+} GpsNiCallbacks;
+
+/**
+ * Extended interface for Network-initiated (NI) support.
+ */
+typedef struct
+{
+ /** set to sizeof(GpsNiInterface) */
+ size_t size;
+
+ /** Registers the callbacks for HAL to use. */
+ void (*init) (GpsNiCallbacks *callbacks);
+
+ /** Sends a response to HAL. */
+ void (*respond) (int notif_id, GpsUserResponseType user_response);
+} GpsNiInterface;
+
+struct gps_device_t {
+ struct hw_device_t common;
+
+ /**
+ * Set the provided lights to the provided values.
+ *
+ * Returns: 0 on succes, error code on failure.
+ */
+ const GpsInterface* (*get_gps_interface)(struct gps_device_t* dev);
+};
+
+#define AGPS_RIL_REQUEST_SETID_IMSI (1<<0L)
+#define AGPS_RIL_REQUEST_SETID_MSISDN (1<<1L)
+
+#define AGPS_RIL_REQUEST_REFLOC_CELLID (1<<0L)
+#define AGPS_RIL_REQUEST_REFLOC_MAC (1<<1L)
+
+typedef void (*agps_ril_request_set_id)(uint32_t flags);
+typedef void (*agps_ril_request_ref_loc)(uint32_t flags);
+
+typedef struct {
+ agps_ril_request_set_id request_setid;
+ agps_ril_request_ref_loc request_refloc;
+ gps_create_thread create_thread_cb;
+} AGpsRilCallbacks;
+
+/** Extended interface for AGPS_RIL support. */
+typedef struct {
+ /** set to sizeof(AGpsRilInterface) */
+ size_t size;
+ /**
+ * Opens the AGPS interface and provides the callback routines
+ * to the implemenation of this interface.
+ */
+ void (*init)( AGpsRilCallbacks* callbacks );
+
+ /**
+ * Sets the reference location.
+ */
+ void (*set_ref_location) (const AGpsRefLocation *agps_reflocation, size_t sz_struct);
+ /**
+ * Sets the set ID.
+ */
+ void (*set_set_id) (AGpsSetIDType type, const char* setid);
+
+ /**
+ * Send network initiated message.
+ */
+ void (*ni_message) (uint8_t *msg, size_t len);
+
+ /**
+ * Notify GPS of network status changes.
+ * These parameters match values in the android.net.NetworkInfo class.
+ */
+ void (*update_network_state) (int connected, int type, int roaming, const char* extra_info);
+
+ /**
+ * Notify GPS of network status changes.
+ * These parameters match values in the android.net.NetworkInfo class.
+ */
+ void (*update_network_availability) (int avaiable, const char* apn);
+} AGpsRilInterface;
+
+__END_DECLS
+
+#endif /* ANDROID_INCLUDE_HARDWARE_GPS_H */
+
diff --git a/overlay/include/hardware/gralloc.h b/overlay/include/hardware/gralloc.h
new file mode 100644
index 0000000..8c4ac1b
--- /dev/null
+++ b/overlay/include/hardware/gralloc.h
@@ -0,0 +1,273 @@
+/*
+ * Copyright (C) 2008 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.
+ */
+
+
+#ifndef ANDROID_GRALLOC_INTERFACE_H
+#define ANDROID_GRALLOC_INTERFACE_H
+
+#include <system/window.h>
+#include <hardware/hardware.h>
+
+#include <stdint.h>
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#include <cutils/native_handle.h>
+
+#include <hardware/hardware.h>
+#include <hardware/fb.h>
+
+__BEGIN_DECLS
+
+#define GRALLOC_API_VERSION 1
+
+/**
+ * The id of this module
+ */
+#define GRALLOC_HARDWARE_MODULE_ID "gralloc"
+
+/**
+ * Name of the graphics device to open
+ */
+
+#define GRALLOC_HARDWARE_GPU0 "gpu0"
+
+enum {
+ /* buffer is never read in software */
+ GRALLOC_USAGE_SW_READ_NEVER = 0x00000000,
+ /* buffer is rarely read in software */
+ GRALLOC_USAGE_SW_READ_RARELY = 0x00000002,
+ /* buffer is often read in software */
+ GRALLOC_USAGE_SW_READ_OFTEN = 0x00000003,
+ /* mask for the software read values */
+ GRALLOC_USAGE_SW_READ_MASK = 0x0000000F,
+
+ /* buffer is never written in software */
+ GRALLOC_USAGE_SW_WRITE_NEVER = 0x00000000,
+ /* buffer is never written in software */
+ GRALLOC_USAGE_SW_WRITE_RARELY = 0x00000020,
+ /* buffer is never written in software */
+ GRALLOC_USAGE_SW_WRITE_OFTEN = 0x00000030,
+ /* mask for the software write values */
+ GRALLOC_USAGE_SW_WRITE_MASK = 0x000000F0,
+
+ /* buffer will be used as an OpenGL ES texture */
+ GRALLOC_USAGE_HW_TEXTURE = 0x00000100,
+ /* buffer will be used as an OpenGL ES render target */
+ GRALLOC_USAGE_HW_RENDER = 0x00000200,
+ /* buffer will be used by the 2D hardware blitter */
+ GRALLOC_USAGE_HW_2D = 0x00000400,
+ /* buffer will be used by the HWComposer HAL module */
+ GRALLOC_USAGE_HW_COMPOSER = 0x00000800,
+ /* buffer will be used with the framebuffer device */
+ GRALLOC_USAGE_HW_FB = 0x00001000,
+ /* buffer will be used with the HW video encoder */
+ GRALLOC_USAGE_HW_VIDEO_ENCODER = 0x00010000,
+ /* mask for the software usage bit-mask */
+ GRALLOC_USAGE_HW_MASK = 0x00011F00,
+
+ /* buffer should be displayed full-screen on an external display when
+ * possible
+ */
+ GRALLOC_USAGE_EXTERNAL_DISP = 0x00002000,
+
+ /* Must have a hardware-protected path to external display sink for
+ * this buffer. If a hardware-protected path is not available, then
+ * either don't composite only this buffer (preferred) to the
+ * external sink, or (less desirable) do not route the entire
+ * composition to the external sink.
+ */
+ GRALLOC_USAGE_PROTECTED = 0x00004000,
+
+ /* implementation-specific private usage flags */
+ GRALLOC_USAGE_PRIVATE_0 = 0x10000000,
+ GRALLOC_USAGE_PRIVATE_1 = 0x20000000,
+ GRALLOC_USAGE_PRIVATE_2 = 0x40000000,
+ GRALLOC_USAGE_PRIVATE_3 = 0x80000000,
+ GRALLOC_USAGE_PRIVATE_MASK = 0xF0000000,
+
+ /* SAMSUNG */
+ GRALLOC_USAGE_HW_FIMC1 = 0x01000000,
+ GRALLOC_USAGE_HW_ION = 0x02000000,
+ GRALLOC_USAGE_YUV_ADDR = 0x04000000,
+
+ /* SEC Private usage , for Overlay path at HWC */
+ GRALLOC_USAGE_HWC_HWOVERLAY = 0x20000000,
+};
+
+/*****************************************************************************/
+
+/**
+ * Every hardware module must have a data structure named HAL_MODULE_INFO_SYM
+ * and the fields of this data structure must begin with hw_module_t
+ * followed by module specific information.
+ */
+typedef struct gralloc_module_t {
+ struct hw_module_t common;
+
+ /*
+ * (*registerBuffer)() must be called before a buffer_handle_t that has not
+ * been created with (*alloc_device_t::alloc)() can be used.
+ *
+ * This is intended to be used with buffer_handle_t's that have been
+ * received in this process through IPC.
+ *
+ * This function checks that the handle is indeed a valid one and prepares
+ * it for use with (*lock)() and (*unlock)().
+ *
+ * It is not necessary to call (*registerBuffer)() on a handle created
+ * with (*alloc_device_t::alloc)().
+ *
+ * returns an error if this buffer_handle_t is not valid.
+ */
+ int (*registerBuffer)(struct gralloc_module_t const* module,
+ buffer_handle_t handle);
+
+ /*
+ * (*unregisterBuffer)() is called once this handle is no longer needed in
+ * this process. After this call, it is an error to call (*lock)(),
+ * (*unlock)(), or (*registerBuffer)().
+ *
+ * This function doesn't close or free the handle itself; this is done
+ * by other means, usually through libcutils's native_handle_close() and
+ * native_handle_free().
+ *
+ * It is an error to call (*unregisterBuffer)() on a buffer that wasn't
+ * explicitly registered first.
+ */
+ int (*unregisterBuffer)(struct gralloc_module_t const* module,
+ buffer_handle_t handle);
+
+ /*
+ * The (*lock)() method is called before a buffer is accessed for the
+ * specified usage. This call may block, for instance if the h/w needs
+ * to finish rendering or if CPU caches need to be synchronized.
+ *
+ * The caller promises to modify only pixels in the area specified
+ * by (l,t,w,h).
+ *
+ * The content of the buffer outside of the specified area is NOT modified
+ * by this call.
+ *
+ * If usage specifies GRALLOC_USAGE_SW_*, vaddr is filled with the address
+ * of the buffer in virtual memory.
+ *
+ * THREADING CONSIDERATIONS:
+ *
+ * It is legal for several different threads to lock a buffer from
+ * read access, none of the threads are blocked.
+ *
+ * However, locking a buffer simultaneously for write or read/write is
+ * undefined, but:
+ * - shall not result in termination of the process
+ * - shall not block the caller
+ * It is acceptable to return an error or to leave the buffer's content
+ * into an indeterminate state.
+ *
+ * If the buffer was created with a usage mask incompatible with the
+ * requested usage flags here, -EINVAL is returned.
+ *
+ */
+
+ int (*lock)(struct gralloc_module_t const* module,
+ buffer_handle_t handle, int usage,
+ int l, int t, int w, int h,
+ void** vaddr);
+
+
+ /*
+ * The (*unlock)() method must be called after all changes to the buffer
+ * are completed.
+ */
+
+ int (*unlock)(struct gralloc_module_t const* module,
+ buffer_handle_t handle);
+
+#ifdef EXYNOS4210_ENHANCEMENTS
+ int (*getphys) (struct gralloc_module_t const* module,
+ buffer_handle_t handle, void** paddr);
+#endif
+
+ /* reserved for future use */
+ int (*perform)(struct gralloc_module_t const* module,
+ int operation, ... );
+
+ /* reserved for future use */
+ void* reserved_proc[7];
+} gralloc_module_t;
+
+/*****************************************************************************/
+
+/**
+ * Every device data structure must begin with hw_device_t
+ * followed by module specific public methods and attributes.
+ */
+
+typedef struct alloc_device_t {
+ struct hw_device_t common;
+
+ /*
+ * (*alloc)() Allocates a buffer in graphic memory with the requested
+ * parameters and returns a buffer_handle_t and the stride in pixels to
+ * allow the implementation to satisfy hardware constraints on the width
+ * of a pixmap (eg: it may have to be multiple of 8 pixels).
+ * The CALLER TAKES OWNERSHIP of the buffer_handle_t.
+ *
+ * Returns 0 on success or -errno on error.
+ */
+
+ int (*alloc)(struct alloc_device_t* dev,
+ int w, int h, int format, int usage,
+ buffer_handle_t* handle, int* stride);
+
+ /*
+ * (*free)() Frees a previously allocated buffer.
+ * Behavior is undefined if the buffer is still mapped in any process,
+ * but shall not result in termination of the program or security breaches
+ * (allowing a process to get access to another process' buffers).
+ * THIS FUNCTION TAKES OWNERSHIP of the buffer_handle_t which becomes
+ * invalid after the call.
+ *
+ * Returns 0 on success or -errno on error.
+ */
+ int (*free)(struct alloc_device_t* dev,
+ buffer_handle_t handle);
+
+ /* This hook is OPTIONAL.
+ *
+ * If non NULL it will be caused by SurfaceFlinger on dumpsys
+ */
+ void (*dump)(struct alloc_device_t *dev, char *buff, int buff_len);
+
+ void* reserved_proc[7];
+} alloc_device_t;
+
+
+/** convenience API for opening and closing a supported device */
+
+static inline int gralloc_open(const struct hw_module_t* module,
+ struct alloc_device_t** device) {
+ return module->methods->open(module,
+ GRALLOC_HARDWARE_GPU0, (struct hw_device_t**)device);
+}
+
+static inline int gralloc_close(struct alloc_device_t* device) {
+ return device->common.close(&device->common);
+}
+
+__END_DECLS
+
+#endif // ANDROID_GRALLOC_INTERFACE_H
diff --git a/overlay/packages/apps/Camera/res/values/config.xml b/overlay/packages/apps/Camera/res/values/config.xml
new file mode 100644
index 0000000..472a0b2
--- /dev/null
+++ b/overlay/packages/apps/Camera/res/values/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, The CyanogenMod 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.
+*/
+-->
+
+<resources>
+ <!-- Allows setting video size before recording starts -->
+ <bool name="needsEarlyVideoSize">true</bool>
+ <!-- Samsung Camcorder Mode -->
+ <bool name="needsSamsungCamMode">true</bool>
+ <!-- Samsung Camera Settings -->
+ <bool name="hasSamsungCamSettings">true</bool>
+</resources>
diff --git a/overlay/packages/apps/Phone/res/values/config.xml b/overlay/packages/apps/Phone/res/values/config.xml
new file mode 100644
index 0000000..f788afe
--- /dev/null
+++ b/overlay/packages/apps/Phone/res/values/config.xml
@@ -0,0 +1,25 @@
+<?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.
+-->
+
+<!-- Phone app resources that may need to be customized
+ for different hardware or product builds. -->
+<resources>
+ <!-- Determines if device implements a noise suppression device for in call audio-->
+<!-- <bool name="has_in_call_noise_suppression">true</bool> -->
+
+ <!-- Audio parameter for setting noise suppression-->
+<!-- <string name="in_call_noise_suppression_audioparameter">dualmic_enabled=true=false</string> -->
+</resources>
diff --git a/overlay/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml
new file mode 100644
index 0000000..ab33e19
--- /dev/null
+++ b/overlay/packages/apps/Settings/res/values/config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2012 The CyanogenMod 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.
+-->
+
+<resources xmlns:xliff="urnasis:names:tc:xliff:document:1.2 ">
+ <!-- LED Flashlight -->
+<!-- <bool name="has_led_flash">true</bool> -->
+
+ <!-- Dock Settings -->
+<!-- <bool name="has_dock_settings">true</bool> -->
+</resources>
diff --git a/overlay/packages/apps/Torch/res/values/config.xml b/overlay/packages/apps/Torch/res/values/config.xml
new file mode 100644
index 0000000..86b2399
--- /dev/null
+++ b/overlay/packages/apps/Torch/res/values/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, The CyanogenMod 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 resources are around just to allow their values to be customized
+ for different hardware and product builds. -->
+<resources>
+
+ <!-- If there is no sysfs-based control mechanism, enable this -->
+ <bool name="useCameraInterface">true</bool>
+
+</resources>