Merge "Framework Tests Cleanup: Removing CTS duplicate files"
diff --git a/Android.mk b/Android.mk
index 8a1013f..ded8173 100644
--- a/Android.mk
+++ b/Android.mk
@@ -165,7 +165,6 @@
telephony/java/com/android/internal/telephony/IExtendedNetworkService.aidl \
vpn/java/android/net/vpn/IVpnService.aidl \
-LOCAL_SRC_FILES += core/java/android/content/EventLogTags.logtags
# FRAMEWORKS_BASE_JAVA_SRC_DIRS comes from build/core/pathmap.mk
LOCAL_AIDL_INCLUDES += $(FRAMEWORKS_BASE_JAVA_SRC_DIRS)
@@ -365,6 +364,8 @@
resources/samples/ApiDemos "API Demos" \
-samplecode $(sample_dir)/BluetoothChat \
resources/samples/BluetoothChat "Bluetooth Chat" \
+ -samplecode $(sample_dir)/BusinessCard \
+ resources/samples/BusinessCard "Business Card" \
-samplecode $(sample_dir)/ContactManager \
resources/samples/ContactManager "Contact Manager" \
-samplecode $(sample_dir)/Home \
diff --git a/api/current.xml b/api/current.xml
index 9801036..f3e614a 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -34,6 +34,17 @@
visibility="public"
>
</constructor>
+<field name="ACCESS_CACHE_FILESYSTEM"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.permission.ACCESS_CACHE_FILESYSTEM""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="ACCESS_CHECKIN_PROPERTIES"
type="java.lang.String"
transient="false"
@@ -595,6 +606,17 @@
visibility="public"
>
</field>
+<field name="KILL_BACKGROUND_PROCESSES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.permission.KILL_BACKGROUND_PROCESSES""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="MANAGE_ACCOUNTS"
type="java.lang.String"
transient="false"
@@ -899,7 +921,7 @@
value=""android.permission.RESTART_PACKAGES""
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</field>
@@ -3140,7 +3162,7 @@
value="16843395"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</field>
@@ -3217,7 +3239,7 @@
value="16843362"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</field>
@@ -5087,7 +5109,7 @@
value="16842997"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</field>
@@ -5208,7 +5230,7 @@
value="16842996"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</field>
@@ -17534,7 +17556,7 @@
<exception name="SecurityException" type="java.lang.SecurityException">
</exception>
</method>
-<method name="restartPackage"
+<method name="killBackgroundProcesses"
return="void"
abstract="false"
native="false"
@@ -17547,6 +17569,19 @@
<parameter name="packageName" type="java.lang.String">
</parameter>
</method>
+<method name="restartPackage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
+<parameter name="packageName" type="java.lang.String">
+</parameter>
+</method>
<field name="RECENT_WITH_EXCLUDED"
type="int"
transient="false"
@@ -17818,6 +17853,16 @@
visibility="public"
>
</field>
+<field name="stackTrace"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="tag"
type="java.lang.String"
transient="false"
@@ -23694,6 +23739,19 @@
</implements>
<implements name="android.content.DialogInterface.OnDismissListener">
</implements>
+<method name="getSearchableInfo"
+ return="android.app.SearchableInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="componentName" type="android.content.ComponentName">
+</parameter>
+</method>
<method name="getSearchablesInGlobalSearch"
return="java.util.List<android.app.SearchableInfo>"
abstract="false"
@@ -23872,6 +23930,17 @@
visibility="public"
>
</field>
+<field name="INTENT_ACTION_SELECT_SEARCH_SOURCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.intent.action.SELECT_SEARCH_SOURCE""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="INTENT_ACTION_WEB_SEARCH_SETTINGS"
type="java.lang.String"
transient="false"
@@ -74858,6 +74927,75 @@
</exception>
</method>
</class>
+<class name="GeocoderParams"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getClientPackage"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getLocale"
+ return="java.util.Locale"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="parcel" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
<class name="GpsSatellite"
extends="java.lang.Object"
abstract="false"
@@ -75874,6 +76012,32 @@
<parameter name="enabledOnly" type="boolean">
</parameter>
</method>
+<method name="installGeocodeProvider"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.location.LocationManager.GeocodeProvider">
+</parameter>
+</method>
+<method name="installLocationProvider"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="provider" type="android.location.LocationProviderImpl">
+</parameter>
+</method>
<method name="isProviderEnabled"
return="boolean"
abstract="false"
@@ -75965,6 +76129,19 @@
<parameter name="intent" type="android.app.PendingIntent">
</parameter>
</method>
+<method name="reportLocation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="android.location.Location">
+</parameter>
+</method>
<method name="requestLocationUpdates"
return="void"
abstract="false"
@@ -76157,6 +76334,62 @@
>
</field>
</class>
+<interface name="LocationManager.GeocodeProvider"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getFromLocation"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="latitude" type="double">
+</parameter>
+<parameter name="longitude" type="double">
+</parameter>
+<parameter name="maxResults" type="int">
+</parameter>
+<parameter name="params" type="android.location.GeocoderParams">
+</parameter>
+<parameter name="addrs" type="java.util.List<android.location.Address>">
+</parameter>
+</method>
+<method name="getFromLocationName"
+ return="java.lang.String"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="locationName" type="java.lang.String">
+</parameter>
+<parameter name="lowerLeftLatitude" type="double">
+</parameter>
+<parameter name="lowerLeftLongitude" type="double">
+</parameter>
+<parameter name="upperRightLatitude" type="double">
+</parameter>
+<parameter name="upperRightLongitude" type="double">
+</parameter>
+<parameter name="maxResults" type="int">
+</parameter>
+<parameter name="params" type="android.location.GeocoderParams">
+</parameter>
+<parameter name="addrs" type="java.util.List<android.location.Address>">
+</parameter>
+</method>
+</interface>
<class name="LocationProvider"
extends="java.lang.Object"
abstract="true"
@@ -76322,6 +76555,177 @@
>
</field>
</class>
+<class name="LocationProviderImpl"
+ extends="android.location.LocationProvider"
+ abstract="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="LocationProviderImpl"
+ type="android.location.LocationProviderImpl"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</constructor>
+<method name="addListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="disable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enable"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enableLocationTracking"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enable" type="boolean">
+</parameter>
+</method>
+<method name="getStatus"
+ return="int"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="getStatusUpdateTime"
+ return="long"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isEnabled"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeListener"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="uid" type="int">
+</parameter>
+</method>
+<method name="sendExtraCommand"
+ return="boolean"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="command" type="java.lang.String">
+</parameter>
+<parameter name="extras" type="android.os.Bundle">
+</parameter>
+</method>
+<method name="setMinTime"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="minTime" type="long">
+</parameter>
+</method>
+<method name="updateLocation"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="location" type="android.location.Location">
+</parameter>
+</method>
+<method name="updateNetworkState"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="int">
+</parameter>
+<parameter name="info" type="android.net.NetworkInfo">
+</parameter>
+</method>
+</class>
</package>
<package name="android.media"
>
@@ -83470,6 +83874,50 @@
visibility="public"
>
</field>
+<field name="TYPE_MOBILE_DUN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE_HIPRI"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="5"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE_MMS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_MOBILE_SUPL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="TYPE_WIFI"
type="int"
transient="false"
@@ -88168,6 +88616,401 @@
</package>
<package name="android.opengl"
>
+<class name="ETC1"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ETC1"
+ type="android.opengl.ETC1"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="decodeBlock"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.Buffer">
+</parameter>
+<parameter name="out" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="decodeImage"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.Buffer">
+</parameter>
+<parameter name="out" type="java.nio.Buffer">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="pixelSize" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+</method>
+<method name="encodeBlock"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.Buffer">
+</parameter>
+<parameter name="validPixelMask" type="int">
+</parameter>
+<parameter name="out" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="encodeImage"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="java.nio.Buffer">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="pixelSize" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+<parameter name="out" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="formatHeader"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="java.nio.Buffer">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="getEncodedDataSize"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="java.nio.Buffer">
+</parameter>
+</method>
+<method name="isValid"
+ return="boolean"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="header" type="java.nio.Buffer">
+</parameter>
+</method>
+<field name="DECODED_BLOCK_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="48"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ENCODED_BLOCK_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="8"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ETC1_RGB8_OES"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="36196"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ETC_PKM_HEADER_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="ETC1Util"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ETC1Util"
+ type="android.opengl.ETC1Util"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="compressTexture"
+ return="android.opengl.ETC1Util.ETC1Texture"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.nio.Buffer">
+</parameter>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="pixelSize" type="int">
+</parameter>
+<parameter name="stride" type="int">
+</parameter>
+</method>
+<method name="createTexture"
+ return="android.opengl.ETC1Util.ETC1Texture"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="input" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="isETC1Supported"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadTexture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="fallbackFormat" type="int">
+</parameter>
+<parameter name="fallbackType" type="int">
+</parameter>
+<parameter name="input" type="java.io.InputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="loadTexture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="int">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+<parameter name="border" type="int">
+</parameter>
+<parameter name="fallbackFormat" type="int">
+</parameter>
+<parameter name="fallbackType" type="int">
+</parameter>
+<parameter name="texture" type="android.opengl.ETC1Util.ETC1Texture">
+</parameter>
+</method>
+<method name="writeTexture"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="texture" type="android.opengl.ETC1Util.ETC1Texture">
+</parameter>
+<parameter name="output" type="java.io.OutputStream">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<class name="ETC1Util.ETC1Texture"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ETC1Util.ETC1Texture"
+ type="android.opengl.ETC1Util.ETC1Texture"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="width" type="int">
+</parameter>
+<parameter name="height" type="int">
+</parameter>
+<parameter name="data" type="java.nio.ByteBuffer">
+</parameter>
+</constructor>
+<method name="getData"
+ return="java.nio.ByteBuffer"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getHeight"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
<class name="GLDebugHelper"
extends="java.lang.Object"
abstract="false"
@@ -107369,6 +108212,16 @@
visibility="public"
>
</field>
+<field name="CPU_ABI2"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="DEVICE"
type="java.lang.String"
transient="false"
@@ -107479,6 +108332,17 @@
visibility="public"
>
</field>
+<field name="UNKNOWN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""unknown""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="USER"
type="java.lang.String"
transient="false"
@@ -114611,6 +115475,97 @@
>
</field>
</class>
+<class name="RecoverySystem"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="RecoverySystem"
+ type="android.os.RecoverySystem"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="installPackage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="packageFile" type="java.io.File">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="rebootWipeUserData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="verifyPackage"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="packageFile" type="java.io.File">
+</parameter>
+<parameter name="listener" type="android.os.RecoverySystem.ProgressListener">
+</parameter>
+<parameter name="deviceCertsZipFile" type="java.io.File">
+</parameter>
+<exception name="GeneralSecurityException" type="java.security.GeneralSecurityException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+</class>
+<interface name="RecoverySystem.ProgressListener"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onProgress"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="progress" type="int">
+</parameter>
+</method>
+</interface>
<class name="RemoteCallbackList"
extends="java.lang.Object"
abstract="false"
@@ -126045,6 +127000,17 @@
visibility="public"
>
</field>
+<field name="EXTRA_DURATION_LIMIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.intent.extra.durationLimit""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="EXTRA_FINISH_ON_COMPLETION"
type="java.lang.String"
transient="false"
@@ -126056,6 +127022,17 @@
visibility="public"
>
</field>
+<field name="EXTRA_FULL_SCREEN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.intent.extra.fullScreen""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="EXTRA_MEDIA_ALBUM"
type="java.lang.String"
transient="false"
@@ -126122,6 +127099,28 @@
visibility="public"
>
</field>
+<field name="EXTRA_SHOW_ACTION_ICONS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.intent.extra.showActionIcons""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_SIZE_LIMIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.intent.extra.sizeLimit""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="EXTRA_VIDEO_QUALITY"
type="java.lang.String"
transient="false"
@@ -126177,6 +127176,17 @@
visibility="public"
>
</field>
+<field name="UNKNOWN_STRING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""<unknown>""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
</class>
<class name="MediaStore.Audio"
extends="java.lang.Object"
@@ -126661,6 +127671,17 @@
visibility="public"
>
</field>
+<field name="BOOKMARK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""bookmark""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="COMPOSER"
type="java.lang.String"
transient="false"
@@ -126716,6 +127737,17 @@
visibility="public"
>
</field>
+<field name="IS_PODCAST"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""is_podcast""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="IS_RINGTONE"
type="java.lang.String"
transient="false"
@@ -127174,6 +128206,25 @@
<parameter name="playlistId" type="long">
</parameter>
</method>
+<method name="moveItem"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="res" type="android.content.ContentResolver">
+</parameter>
+<parameter name="playlistId" type="long">
+</parameter>
+<parameter name="from" type="int">
+</parameter>
+<parameter name="to" type="int">
+</parameter>
+</method>
<field name="AUDIO_ID"
type="java.lang.String"
transient="false"
@@ -130832,6 +131883,17 @@
visibility="public"
>
</field>
+<field name="VOLUME_BLUETOOTH_SCO"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""volume_bluetooth_sco""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="VOLUME_MUSIC"
type="java.lang.String"
transient="false"
@@ -156792,7 +157854,7 @@
>
</field>
</class>
-<class name="EventLogTags"
+<class name="EventLog"
extends="java.lang.Object"
abstract="false"
static="false"
@@ -156800,6 +157862,190 @@
deprecated="not deprecated"
visibility="public"
>
+<constructor name="EventLog"
+ type="android.util.EventLog"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getTagCode"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getTagName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+</method>
+<method name="readEvents"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tags" type="int[]">
+</parameter>
+<parameter name="output" type="java.util.Collection<android.util.EventLog.Event>">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="writeEvent"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+<parameter name="value" type="int">
+</parameter>
+</method>
+<method name="writeEvent"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+<parameter name="value" type="long">
+</parameter>
+</method>
+<method name="writeEvent"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+<parameter name="str" type="java.lang.String">
+</parameter>
+</method>
+<method name="writeEvent"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="int">
+</parameter>
+<parameter name="list" type="java.lang.Object...">
+</parameter>
+</method>
+</class>
+<class name="EventLog.Event"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getData"
+ return="java.lang.Object"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getProcessId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTag"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getThreadId"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTimeNanos"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
+<class name="EventLogTags"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
<constructor name="EventLogTags"
type="android.util.EventLogTags"
static="false"
@@ -157180,6 +158426,53 @@
<parameter name="tr" type="java.lang.Throwable">
</parameter>
</method>
+<method name="wtf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+</method>
+<method name="wtf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
+<method name="wtf"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="tag" type="java.lang.String">
+</parameter>
+<parameter name="msg" type="java.lang.String">
+</parameter>
+<parameter name="tr" type="java.lang.Throwable">
+</parameter>
+</method>
<field name="ASSERT"
type="int"
transient="false"
@@ -172815,6 +174108,17 @@
value="-1"
static="true"
final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+</field>
+<field name="MATCH_PARENT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="-1"
+ static="true"
+ final="true"
deprecated="not deprecated"
visibility="public"
>
@@ -186803,6 +188107,17 @@
<parameter name="response" type="android.os.Message">
</parameter>
</method>
+<method name="emulateShiftHeld"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="enablePlatformNotifications"
return="void"
abstract="false"
@@ -187973,7 +189288,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
<parameter name="view" type="android.webkit.WebView">
@@ -199260,6 +200575,23 @@
<parameter name="value" type="boolean">
</parameter>
</method>
+<method name="setBundle"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="viewId" type="int">
+</parameter>
+<parameter name="methodName" type="java.lang.String">
+</parameter>
+<parameter name="value" type="android.os.Bundle">
+</parameter>
+</method>
<method name="setByte"
return="void"
abstract="false"
diff --git a/camera/libcameraservice/CameraService.cpp b/camera/libcameraservice/CameraService.cpp
index 6419a5c..fae1f26 100644
--- a/camera/libcameraservice/CameraService.cpp
+++ b/camera/libcameraservice/CameraService.cpp
@@ -16,7 +16,6 @@
** limitations under the License.
*/
-//#define LOG_NDEBUG 0
#define LOG_TAG "CameraService"
#include <utils/Log.h>
@@ -95,7 +94,7 @@
sp<ICamera> CameraService::connect(const sp<ICameraClient>& cameraClient)
{
int callingPid = getCallingPid();
- LOGD("CameraService::connect E (pid %d, client %p)", callingPid,
+ LOGV("CameraService::connect E (pid %d, client %p)", callingPid,
cameraClient->asBinder().get());
Mutex::Autolock lock(mServiceLock);
@@ -106,30 +105,30 @@
sp<ICameraClient> currentCameraClient(currentClient->getCameraClient());
if (cameraClient->asBinder() == currentCameraClient->asBinder()) {
// This is the same client reconnecting...
- LOGD("CameraService::connect X (pid %d, same client %p) is reconnecting...",
+ LOGV("CameraService::connect X (pid %d, same client %p) is reconnecting...",
callingPid, cameraClient->asBinder().get());
return currentClient;
} else {
// It's another client... reject it
- LOGD("CameraService::connect X (pid %d, new client %p) rejected. "
+ LOGV("CameraService::connect X (pid %d, new client %p) rejected. "
"(old pid %d, old client %p)",
callingPid, cameraClient->asBinder().get(),
currentClient->mClientPid, currentCameraClient->asBinder().get());
if (kill(currentClient->mClientPid, 0) == -1 && errno == ESRCH) {
- LOGD("The old client is dead!");
+ LOGV("The old client is dead!");
}
return client;
}
} else {
// can't promote, the previous client has died...
- LOGD("New client (pid %d) connecting, old reference was dangling...",
+ LOGV("New client (pid %d) connecting, old reference was dangling...",
callingPid);
mClient.clear();
}
}
if (mUsers > 0) {
- LOGD("Still have client, rejected");
+ LOGV("Still have client, rejected");
return client;
}
@@ -141,7 +140,7 @@
// the refcount.
client->trackMe(true, true);
#endif
- LOGD("CameraService::connect X");
+ LOGV("CameraService::connect X");
return client;
}
@@ -157,7 +156,7 @@
if (mClient == 0) {
// This happens when we have already disconnected.
- LOGD("removeClient (pid %d): already disconnected", callingPid);
+ LOGV("removeClient (pid %d): already disconnected", callingPid);
return;
}
@@ -165,7 +164,7 @@
// Client::~Client() -> disconnect() -> removeClient().
client = mClient.promote();
if (client == 0) {
- LOGD("removeClient (pid %d): no more strong reference", callingPid);
+ LOGV("removeClient (pid %d): no more strong reference", callingPid);
mClient.clear();
return;
}
@@ -178,7 +177,7 @@
mClient.clear();
}
- LOGD("removeClient (pid %d) done", callingPid);
+ LOGV("removeClient (pid %d) done", callingPid);
}
// The reason we need this count is a new CameraService::connect() request may
@@ -212,7 +211,7 @@
const sp<ICameraClient>& cameraClient, pid_t clientPid)
{
int callingPid = getCallingPid();
- LOGD("Client::Client E (pid %d)", callingPid);
+ LOGV("Client::Client E (pid %d)", callingPid);
mCameraService = cameraService;
mCameraClient = cameraClient;
mClientPid = clientPid;
@@ -237,7 +236,7 @@
// Callback is disabled by default
mPreviewCallbackFlag = FRAME_CALLBACK_FLAG_NOOP;
cameraService->incUsers();
- LOGD("Client::Client X (pid %d)", callingPid);
+ LOGV("Client::Client X (pid %d)", callingPid);
}
status_t CameraService::Client::checkPid()
@@ -253,7 +252,7 @@
status_t CameraService::Client::lock()
{
int callingPid = getCallingPid();
- LOGD("lock from pid %d (mClientPid %d)", callingPid, mClientPid);
+ LOGV("lock from pid %d (mClientPid %d)", callingPid, mClientPid);
Mutex::Autolock _l(mLock);
// lock camera to this client if the the camera is unlocked
if (mClientPid == 0) {
@@ -267,13 +266,13 @@
status_t CameraService::Client::unlock()
{
int callingPid = getCallingPid();
- LOGD("unlock from pid %d (mClientPid %d)", callingPid, mClientPid);
+ LOGV("unlock from pid %d (mClientPid %d)", callingPid, mClientPid);
Mutex::Autolock _l(mLock);
// allow anyone to use camera
status_t result = checkPid();
if (result == NO_ERROR) {
mClientPid = 0;
- LOGD("clear mCameraClient (pid %d)", callingPid);
+ LOGV("clear mCameraClient (pid %d)", callingPid);
// we need to remove the reference so that when app goes
// away, the reference count goes to 0.
mCameraClient.clear();
@@ -286,7 +285,7 @@
int callingPid = getCallingPid();
// connect a new process to the camera
- LOGD("Client::connect E (pid %d, client %p)", callingPid, client->asBinder().get());
+ LOGV("Client::connect E (pid %d, client %p)", callingPid, client->asBinder().get());
// I hate this hack, but things get really ugly when the media recorder
// service is handing back the camera to the app. The ICameraClient
@@ -310,14 +309,14 @@
// did the client actually change?
if ((mCameraClient != NULL) && (client->asBinder() == mCameraClient->asBinder())) {
- LOGD("Connect to the same client");
+ LOGV("Connect to the same client");
return NO_ERROR;
}
mCameraClient = client;
mClientPid = -1;
mPreviewCallbackFlag = FRAME_CALLBACK_FLAG_NOOP;
- LOGD("Connect to the new client (pid %d, client %p)",
+ LOGV("Connect to the new client (pid %d, client %p)",
callingPid, mCameraClient->asBinder().get());
}
@@ -344,7 +343,7 @@
int callingPid = getCallingPid();
// tear down client
- LOGD("Client::~Client E (pid %d, client %p)",
+ LOGV("Client::~Client E (pid %d, client %p)",
callingPid, getCameraClient()->asBinder().get());
if (mSurface != 0 && !mUseOverlay) {
#if HAVE_ANDROID_OS
@@ -373,23 +372,23 @@
// make sure we tear down the hardware
mClientPid = callingPid;
disconnect();
- LOGD("Client::~Client X (pid %d)", mClientPid);
+ LOGV("Client::~Client X (pid %d)", mClientPid);
}
void CameraService::Client::disconnect()
{
int callingPid = getCallingPid();
- LOGD("Client::disconnect() E (pid %d client %p)",
+ LOGV("Client::disconnect() E (pid %d client %p)",
callingPid, getCameraClient()->asBinder().get());
Mutex::Autolock lock(mLock);
if (mClientPid <= 0) {
- LOGD("camera is unlocked (mClientPid = %d), don't tear down hardware", mClientPid);
+ LOGV("camera is unlocked (mClientPid = %d), don't tear down hardware", mClientPid);
return;
}
if (checkPid() != NO_ERROR) {
- LOGD("Different client - don't disconnect");
+ LOGV("Different client - don't disconnect");
return;
}
@@ -397,7 +396,7 @@
// from the user directly, or called by the destructor.
if (mHardware == 0) return;
- LOGD("hardware teardown");
+ LOGV("hardware teardown");
// Before destroying mHardware, we must make sure it's in the
// idle state.
mHardware->stopPreview();
@@ -421,13 +420,13 @@
mCameraService->removeClient(mCameraClient);
mCameraService->decUsers();
- LOGD("Client::disconnect() X (pid %d)", callingPid);
+ LOGV("Client::disconnect() X (pid %d)", callingPid);
}
// pass the buffered ISurface to the camera service
status_t CameraService::Client::setPreviewDisplay(const sp<ISurface>& surface)
{
- LOGD("setPreviewDisplay(%p) (pid %d)",
+ LOGV("setPreviewDisplay(%p) (pid %d)",
((surface == NULL) ? NULL : surface.get()), getCallingPid());
Mutex::Autolock lock(mLock);
status_t result = checkPid();
@@ -438,7 +437,7 @@
// asBinder() is safe on NULL (returns NULL)
if (surface->asBinder() != mSurface->asBinder()) {
if (mSurface != 0) {
- LOGD("clearing old preview surface %p", mSurface.get());
+ LOGV("clearing old preview surface %p", mSurface.get());
if ( !mUseOverlay)
{
mSurface->unregisterBuffers();
@@ -487,7 +486,7 @@
{
int callingPid = getCallingPid();
- LOGD("startCameraMode(%d) (pid %d)", mode, callingPid);
+ LOGV("startCameraMode(%d) (pid %d)", mode, callingPid);
/* we cannot call into mHardware with mLock held because
* mHardware has callbacks onto us which acquire this lock
@@ -512,7 +511,7 @@
default: // CAMERA_PREVIEW_MODE
if (mSurface == 0) {
- LOGD("mSurface is not set yet.");
+ LOGV("mSurface is not set yet.");
}
return startPreviewMode();
}
@@ -520,7 +519,7 @@
status_t CameraService::Client::startRecordingMode()
{
- LOGD("startRecordingMode (pid %d)", getCallingPid());
+ LOGV("startRecordingMode (pid %d)", getCallingPid());
status_t ret = UNKNOWN_ERROR;
@@ -547,7 +546,7 @@
status_t CameraService::Client::setOverlay()
{
- LOGD("setOverlay");
+ LOGV("setOverlay");
int w, h;
CameraParameters params(mHardware->getParameters());
params.getPreviewSize(&w, &h);
@@ -573,7 +572,7 @@
for (int retry = 0; retry < 50; ++retry) {
mOverlayRef = mSurface->createOverlay(w, h, OVERLAY_FORMAT_DEFAULT);
if (mOverlayRef != NULL) break;
- LOGD("Overlay create failed - retrying");
+ LOGW("Overlay create failed - retrying");
usleep(20000);
}
if ( mOverlayRef.get() == NULL )
@@ -623,7 +622,7 @@
status_t CameraService::Client::startPreviewMode()
{
- LOGD("startPreviewMode (pid %d)", getCallingPid());
+ LOGV("startPreviewMode (pid %d)", getCallingPid());
// if preview has been enabled, nothing needs to be done
if (mHardware->previewEnabled()) {
@@ -659,14 +658,14 @@
status_t CameraService::Client::startPreview()
{
- LOGD("startPreview (pid %d)", getCallingPid());
+ LOGV("startPreview (pid %d)", getCallingPid());
return startCameraMode(CAMERA_PREVIEW_MODE);
}
status_t CameraService::Client::startRecording()
{
- LOGD("startRecording (pid %d)", getCallingPid());
+ LOGV("startRecording (pid %d)", getCallingPid());
if (mMediaPlayerBeep.get() != NULL) {
// do not play record jingle if stream volume is 0
@@ -687,7 +686,7 @@
// stop preview mode
void CameraService::Client::stopPreview()
{
- LOGD("stopPreview (pid %d)", getCallingPid());
+ LOGV("stopPreview (pid %d)", getCallingPid());
// hold main lock during state transition
{
@@ -701,7 +700,7 @@
mHardware->stopPreview();
mHardware->disableMsgType(CAMERA_MSG_PREVIEW_FRAME);
- LOGD("stopPreview(), hardware stopped OK");
+ LOGV("stopPreview(), hardware stopped OK");
if (mSurface != 0 && !mUseOverlay) {
mSurface->unregisterBuffers();
@@ -718,7 +717,7 @@
// stop recording mode
void CameraService::Client::stopRecording()
{
- LOGD("stopRecording (pid %d)", getCallingPid());
+ LOGV("stopRecording (pid %d)", getCallingPid());
// hold main lock during state transition
{
@@ -737,7 +736,7 @@
mHardware->stopRecording();
mHardware->disableMsgType(CAMERA_MSG_VIDEO_FRAME);
- LOGD("stopRecording(), hardware stopped OK");
+ LOGV("stopRecording(), hardware stopped OK");
}
// hold preview buffer lock
@@ -805,14 +804,14 @@
int nw, cnt = 0;
uint32_t written = 0;
- LOGD("opening file [%s]\n", fname);
+ LOGV("opening file [%s]\n", fname);
int fd = open(fname, O_RDWR | O_CREAT);
if (fd < 0) {
LOGE("failed to create file [%s]: %s", fname, strerror(errno));
return;
}
- LOGD("writing %d bytes to file [%s]\n", size, fname);
+ LOGV("writing %d bytes to file [%s]\n", size, fname);
while (written < size) {
nw = ::write(fd,
buf + written,
@@ -825,7 +824,7 @@
written += nw;
cnt++;
}
- LOGD("done writing %d bytes to file [%s] in %d passes\n",
+ LOGV("done writing %d bytes to file [%s] in %d passes\n",
size, fname, cnt);
::close(fd);
}
@@ -833,7 +832,7 @@
status_t CameraService::Client::autoFocus()
{
- LOGD("autoFocus (pid %d)", getCallingPid());
+ LOGV("autoFocus (pid %d)", getCallingPid());
Mutex::Autolock lock(mLock);
status_t result = checkPid();
@@ -849,7 +848,7 @@
status_t CameraService::Client::cancelAutoFocus()
{
- LOGD("cancelAutoFocus (pid %d)", getCallingPid());
+ LOGV("cancelAutoFocus (pid %d)", getCallingPid());
Mutex::Autolock lock(mLock);
status_t result = checkPid();
@@ -866,7 +865,7 @@
// take a picture - image is returned in callback
status_t CameraService::Client::takePicture()
{
- LOGD("takePicture (pid %d)", getCallingPid());
+ LOGV("takePicture (pid %d)", getCallingPid());
Mutex::Autolock lock(mLock);
status_t result = checkPid();
@@ -933,7 +932,7 @@
h = size->height;
w &= ~1;
h &= ~1;
- LOGD("Snapshot image width=%d, height=%d", w, h);
+ LOGV("Snapshot image width=%d, height=%d", w, h);
}
ISurface::BufferHeap buffers(w, h, w, h,
PIXEL_FORMAT_YCbCr_420_SP, transform, 0, mHardware->getRawHeap());
@@ -952,7 +951,7 @@
#if DEBUG_HEAP_LEAKS && 0 // debugging
if (gWeakHeap == NULL) {
if (gWeakHeap != heap) {
- LOGD("SETTING PREVIEW HEAP");
+ LOGV("SETTING PREVIEW HEAP");
heap->trackMe(true, true);
gWeakHeap = heap;
}
@@ -1189,7 +1188,7 @@
// set preview/capture parameters - key/value pairs
status_t CameraService::Client::setParameters(const String8& params)
{
- LOGD("setParameters(%s)", params.string());
+ LOGV("setParameters(%s)", params.string());
Mutex::Autolock lock(mLock);
status_t result = checkPid();
@@ -1215,13 +1214,13 @@
}
String8 params(mHardware->getParameters().flatten());
- LOGD("getParameters(%s)", params.string());
+ LOGV("getParameters(%s)", params.string());
return params;
}
status_t CameraService::Client::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2)
{
- LOGD("sendCommand (pid %d)", getCallingPid());
+ LOGV("sendCommand (pid %d)", getCallingPid());
Mutex::Autolock lock(mLock);
status_t result = checkPid();
if (result != NO_ERROR) return result;
@@ -1327,7 +1326,7 @@
status_t err = BnCameraService::onTransact(code, data, reply, flags);
#if DEBUG_HEAP_LEAKS
- LOGD("+++ onTransact err %d code %d", err, code);
+ LOGV("+++ onTransact err %d code %d", err, code);
if (err == UNKNOWN_TRANSACTION || err == PERMISSION_DENIED) {
// the 'service' command interrogates this binder for its name, and then supplies it
@@ -1335,7 +1334,7 @@
// ISurfaceComposer (since we delegated the INTERFACE_TRANSACTION handling to
// BnSurfaceComposer before falling through to this code).
- LOGD("+++ onTransact code %d", code);
+ LOGV("+++ onTransact code %d", code);
CHECK_INTERFACE(ICameraService, data, reply);
@@ -1345,13 +1344,13 @@
if (gWeakHeap != 0) {
sp<IMemoryHeap> h = gWeakHeap.promote();
IMemoryHeap *p = gWeakHeap.unsafe_get();
- LOGD("CHECKING WEAK REFERENCE %p (%p)", h.get(), p);
+ LOGV("CHECKING WEAK REFERENCE %p (%p)", h.get(), p);
if (h != 0)
h->printRefs();
bool attempt_to_delete = data.readInt32() == 1;
if (attempt_to_delete) {
// NOT SAFE!
- LOGD("DELETING WEAK REFERENCE %p (%p)", h.get(), p);
+ LOGV("DELETING WEAK REFERENCE %p (%p)", h.get(), p);
if (p) delete p;
}
return NO_ERROR;
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index 236c0fe..a2b5d8d 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -28,7 +28,7 @@
#include <cutils/sockets.h>
#include "private/android_filesystem_config.h"
-#define LOG_NDEBUG 0
+
#define LOG_TAG "dumpstate"
#include <utils/Log.h>
diff --git a/cmds/keystore/keystore.c b/cmds/keystore/keystore.c
index 37155e4..4426874 100644
--- a/cmds/keystore/keystore.c
+++ b/cmds/keystore/keystore.c
@@ -170,16 +170,12 @@
return SYSTEM_ERROR;
}
- length = (blob.length + blob.value - blob.encrypted) % AES_BLOCK_SIZE;
- if (length) {
- length = AES_BLOCK_SIZE - length;
- }
+ length = blob.length + blob.value - blob.encrypted;
+ length = (length + AES_BLOCK_SIZE - 1) / AES_BLOCK_SIZE * AES_BLOCK_SIZE;
- length += blob.length + blob.value - blob.digested;
blob.length = htonl(blob.length);
- MD5(blob.digested, length, blob.digest);
+ MD5(blob.digested, length - (blob.digested - blob.encrypted), blob.digest);
- length += blob.digested - blob.encrypted;
memcpy(vector, blob.vector, AES_BLOCK_SIZE);
AES_cbc_encrypt(blob.encrypted, blob.encrypted, length, aes_key, vector,
AES_ENCRYPT);
diff --git a/common/java/com/android/common/AndroidHttpClient.java b/common/java/com/android/common/AndroidHttpClient.java
index 6fa6da1..99faf6e 100644
--- a/common/java/com/android/common/AndroidHttpClient.java
+++ b/common/java/com/android/common/AndroidHttpClient.java
@@ -339,19 +339,9 @@
* Shorter data will not be compressed.
*/
public static long getMinGzipSize(ContentResolver resolver) {
- String sMinGzipBytes = Settings.Gservices.getString(resolver,
- Settings.Gservices.SYNC_MIN_GZIP_BYTES);
-
- if (!TextUtils.isEmpty(sMinGzipBytes)) {
- try {
- return Long.parseLong(sMinGzipBytes);
- } catch (NumberFormatException nfe) {
- Log.w(TAG, "Unable to parse " +
- Settings.Gservices.SYNC_MIN_GZIP_BYTES + " " +
- sMinGzipBytes, nfe);
- }
- }
- return DEFAULT_SYNC_MIN_GZIP_BYTES;
+ return Settings.Secure.getLong(resolver,
+ Settings.Secure.SYNC_MIN_GZIP_BYTES,
+ DEFAULT_SYNC_MIN_GZIP_BYTES);
}
/* cURL logging support. */
diff --git a/common/java/com/android/common/DNParser.java b/common/java/com/android/common/DNParser.java
new file mode 100644
index 0000000..32d57c0
--- /dev/null
+++ b/common/java/com/android/common/DNParser.java
@@ -0,0 +1,447 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+package com.android.common;
+
+import android.util.Log;
+
+import java.io.IOException;
+
+import javax.security.auth.x500.X500Principal;
+
+/**
+ * A simple distinguished name(DN) parser.
+ *
+ * <p>This class is based on org.apache.harmony.security.x509.DNParser. It's customized to remove
+ * external references which are unnecessary for our requirements.
+ *
+ * <p>This class is only meant for extracting a string value from a DN. e.g. it doesn't support
+ * values in the hex-string style.
+ *
+ * <p>This class is used by {@link DomainNameValidator} only. However, in order to make this
+ * class visible from unit tests, it's made public.
+ */
+public final class DNParser {
+ private static final String TAG = "DNParser";
+
+ /** DN to be parsed. */
+ private final String dn;
+
+ // length of distinguished name string
+ private final int length;
+
+ private int pos, beg, end;
+
+ // tmp vars to store positions of the currently parsed item
+ private int cur;
+
+ // distinguished name chars
+ private char[] chars;
+
+ /**
+ * Exception message thrown when we failed to parse DN, which shouldn't happen because we
+ * only handle DNs that {@link X500Principal#getName} returns, which shouldn't be malformed.
+ */
+ private static final String ERROR_PARSE_ERROR = "Failed to parse DN";
+
+ /**
+ * Constructor.
+ *
+ * @param principal - {@link X500Principal} to be parsed
+ */
+ public DNParser(X500Principal principal) {
+ this.dn = principal.getName(X500Principal.RFC2253);
+ this.length = dn.length();
+ }
+
+ // gets next attribute type: (ALPHA 1*keychar) / oid
+ private String nextAT() throws IOException {
+
+ // skip preceding space chars, they can present after
+ // comma or semicolon (compatibility with RFC 1779)
+ for (; pos < length && chars[pos] == ' '; pos++) {
+ }
+ if (pos == length) {
+ return null; // reached the end of DN
+ }
+
+ // mark the beginning of attribute type
+ beg = pos;
+
+ // attribute type chars
+ pos++;
+ for (; pos < length && chars[pos] != '=' && chars[pos] != ' '; pos++) {
+ // we don't follow exact BNF syntax here:
+ // accept any char except space and '='
+ }
+ if (pos >= length) {
+ // unexpected end of DN
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+
+ // mark the end of attribute type
+ end = pos;
+
+ // skip trailing space chars between attribute type and '='
+ // (compatibility with RFC 1779)
+ if (chars[pos] == ' ') {
+ for (; pos < length && chars[pos] != '=' && chars[pos] == ' '; pos++) {
+ }
+
+ if (chars[pos] != '=' || pos == length) {
+ // unexpected end of DN
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+ }
+
+ pos++; //skip '=' char
+
+ // skip space chars between '=' and attribute value
+ // (compatibility with RFC 1779)
+ for (; pos < length && chars[pos] == ' '; pos++) {
+ }
+
+ // in case of oid attribute type skip its prefix: "oid." or "OID."
+ // (compatibility with RFC 1779)
+ if ((end - beg > 4) && (chars[beg + 3] == '.')
+ && (chars[beg] == 'O' || chars[beg] == 'o')
+ && (chars[beg + 1] == 'I' || chars[beg + 1] == 'i')
+ && (chars[beg + 2] == 'D' || chars[beg + 2] == 'd')) {
+ beg += 4;
+ }
+
+ return new String(chars, beg, end - beg);
+ }
+
+ // gets quoted attribute value: QUOTATION *( quotechar / pair ) QUOTATION
+ private String quotedAV() throws IOException {
+
+ pos++;
+ beg = pos;
+ end = beg;
+ while (true) {
+
+ if (pos == length) {
+ // unexpected end of DN
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+
+ if (chars[pos] == '"') {
+ // enclosing quotation was found
+ pos++;
+ break;
+ } else if (chars[pos] == '\\') {
+ chars[end] = getEscaped();
+ } else {
+ // shift char: required for string with escaped chars
+ chars[end] = chars[pos];
+ }
+ pos++;
+ end++;
+ }
+
+ // skip trailing space chars before comma or semicolon.
+ // (compatibility with RFC 1779)
+ for (; pos < length && chars[pos] == ' '; pos++) {
+ }
+
+ return new String(chars, beg, end - beg);
+ }
+
+ // gets hex string attribute value: "#" hexstring
+ private String hexAV() throws IOException {
+
+ if (pos + 4 >= length) {
+ // encoded byte array must be not less then 4 c
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+
+ beg = pos; // store '#' position
+ pos++;
+ while (true) {
+
+ // check for end of attribute value
+ // looks for space and component separators
+ if (pos == length || chars[pos] == '+' || chars[pos] == ','
+ || chars[pos] == ';') {
+ end = pos;
+ break;
+ }
+
+ if (chars[pos] == ' ') {
+ end = pos;
+ pos++;
+ // skip trailing space chars before comma or semicolon.
+ // (compatibility with RFC 1779)
+ for (; pos < length && chars[pos] == ' '; pos++) {
+ }
+ break;
+ } else if (chars[pos] >= 'A' && chars[pos] <= 'F') {
+ chars[pos] += 32; //to low case
+ }
+
+ pos++;
+ }
+
+ // verify length of hex string
+ // encoded byte array must be not less then 4 and must be even number
+ int hexLen = end - beg; // skip first '#' char
+ if (hexLen < 5 || (hexLen & 1) == 0) {
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+
+ // get byte encoding from string representation
+ byte[] encoded = new byte[hexLen / 2];
+ for (int i = 0, p = beg + 1; i < encoded.length; p += 2, i++) {
+ encoded[i] = (byte) getByte(p);
+ }
+
+ return new String(chars, beg, hexLen);
+ }
+
+ // gets string attribute value: *( stringchar / pair )
+ private String escapedAV() throws IOException {
+
+ beg = pos;
+ end = pos;
+ while (true) {
+
+ if (pos >= length) {
+ // the end of DN has been found
+ return new String(chars, beg, end - beg);
+ }
+
+ switch (chars[pos]) {
+ case '+':
+ case ',':
+ case ';':
+ // separator char has beed found
+ return new String(chars, beg, end - beg);
+ case '\\':
+ // escaped char
+ chars[end++] = getEscaped();
+ pos++;
+ break;
+ case ' ':
+ // need to figure out whether space defines
+ // the end of attribute value or not
+ cur = end;
+
+ pos++;
+ chars[end++] = ' ';
+
+ for (; pos < length && chars[pos] == ' '; pos++) {
+ chars[end++] = ' ';
+ }
+ if (pos == length || chars[pos] == ',' || chars[pos] == '+'
+ || chars[pos] == ';') {
+ // separator char or the end of DN has beed found
+ return new String(chars, beg, cur - beg);
+ }
+ break;
+ default:
+ chars[end++] = chars[pos];
+ pos++;
+ }
+ }
+ }
+
+ // returns escaped char
+ private char getEscaped() throws IOException {
+
+ pos++;
+ if (pos == length) {
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+
+ switch (chars[pos]) {
+ case '"':
+ case '\\':
+ case ',':
+ case '=':
+ case '+':
+ case '<':
+ case '>':
+ case '#':
+ case ';':
+ case ' ':
+ case '*':
+ case '%':
+ case '_':
+ //FIXME: escaping is allowed only for leading or trailing space char
+ return chars[pos];
+ default:
+ // RFC doesn't explicitly say that escaped hex pair is
+ // interpreted as UTF-8 char. It only contains an example of such DN.
+ return getUTF8();
+ }
+ }
+
+ // decodes UTF-8 char
+ // see http://www.unicode.org for UTF-8 bit distribution table
+ private char getUTF8() throws IOException {
+
+ int res = getByte(pos);
+ pos++; //FIXME tmp
+
+ if (res < 128) { // one byte: 0-7F
+ return (char) res;
+ } else if (res >= 192 && res <= 247) {
+
+ int count;
+ if (res <= 223) { // two bytes: C0-DF
+ count = 1;
+ res = res & 0x1F;
+ } else if (res <= 239) { // three bytes: E0-EF
+ count = 2;
+ res = res & 0x0F;
+ } else { // four bytes: F0-F7
+ count = 3;
+ res = res & 0x07;
+ }
+
+ int b;
+ for (int i = 0; i < count; i++) {
+ pos++;
+ if (pos == length || chars[pos] != '\\') {
+ return 0x3F; //FIXME failed to decode UTF-8 char - return '?'
+ }
+ pos++;
+
+ b = getByte(pos);
+ pos++; //FIXME tmp
+ if ((b & 0xC0) != 0x80) {
+ return 0x3F; //FIXME failed to decode UTF-8 char - return '?'
+ }
+
+ res = (res << 6) + (b & 0x3F);
+ }
+ return (char) res;
+ } else {
+ return 0x3F; //FIXME failed to decode UTF-8 char - return '?'
+ }
+ }
+
+ // Returns byte representation of a char pair
+ // The char pair is composed of DN char in
+ // specified 'position' and the next char
+ // According to BNF syntax:
+ // hexchar = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
+ // / "a" / "b" / "c" / "d" / "e" / "f"
+ private int getByte(int position) throws IOException {
+
+ if ((position + 1) >= length) {
+ // to avoid ArrayIndexOutOfBoundsException
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+
+ int b1, b2;
+
+ b1 = chars[position];
+ if (b1 >= '0' && b1 <= '9') {
+ b1 = b1 - '0';
+ } else if (b1 >= 'a' && b1 <= 'f') {
+ b1 = b1 - 87; // 87 = 'a' - 10
+ } else if (b1 >= 'A' && b1 <= 'F') {
+ b1 = b1 - 55; // 55 = 'A' - 10
+ } else {
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+
+ b2 = chars[position + 1];
+ if (b2 >= '0' && b2 <= '9') {
+ b2 = b2 - '0';
+ } else if (b2 >= 'a' && b2 <= 'f') {
+ b2 = b2 - 87; // 87 = 'a' - 10
+ } else if (b2 >= 'A' && b2 <= 'F') {
+ b2 = b2 - 55; // 55 = 'A' - 10
+ } else {
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+
+ return (b1 << 4) + b2;
+ }
+
+ /**
+ * Parses the DN and returns the attribute value for an attribute type.
+ *
+ * @param attributeType attribute type to look for (e.g. "ca")
+ * @return value of the attribute that first found, or null if none found
+ */
+ public String find(String attributeType) {
+ try {
+ // Initialize internal state.
+ pos = 0;
+ beg = 0;
+ end = 0;
+ cur = 0;
+ chars = dn.toCharArray();
+
+ String attType = nextAT();
+ if (attType == null) {
+ return null;
+ }
+ while (true) {
+ String attValue = "";
+
+ if (pos == length) {
+ return null;
+ }
+
+ switch (chars[pos]) {
+ case '"':
+ attValue = quotedAV();
+ break;
+ case '#':
+ attValue = hexAV();
+ break;
+ case '+':
+ case ',':
+ case ';': // compatibility with RFC 1779: semicolon can separate RDNs
+ //empty attribute value
+ break;
+ default:
+ attValue = escapedAV();
+ }
+
+ if (attributeType.equalsIgnoreCase(attType)) {
+ return attValue;
+ }
+
+ if (pos >= length) {
+ return null;
+ }
+
+ if (chars[pos] == ',' || chars[pos] == ';') {
+ } else if (chars[pos] != '+') {
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+
+ pos++;
+ attType = nextAT();
+ if (attType == null) {
+ throw new IOException(ERROR_PARSE_ERROR);
+ }
+ }
+ } catch (IOException e) {
+ // Parse error shouldn't happen, because we only handle DNs that
+ // X500Principal.getName() returns, which shouldn't be malformed.
+ Log.e(TAG, "Failed to parse DN: " + dn);
+ return null;
+ }
+ }
+}
diff --git a/core/java/android/net/http/DomainNameChecker.java b/common/java/com/android/common/DomainNameValidator.java
similarity index 83%
rename from core/java/android/net/http/DomainNameChecker.java
rename to common/java/com/android/common/DomainNameValidator.java
index e4c8009..ad44a7d 100644
--- a/core/java/android/net/http/DomainNameChecker.java
+++ b/common/java/com/android/common/DomainNameValidator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * 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.
@@ -13,29 +13,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+package com.android.common;
-package android.net.http;
-
-import org.bouncycastle.asn1.x509.X509Name;
+import android.util.Config;
+import android.util.Log;
import java.net.InetAddress;
import java.net.UnknownHostException;
-import java.security.cert.X509Certificate;
import java.security.cert.CertificateParsingException;
+import java.security.cert.X509Certificate;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
-import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
-import java.util.Vector;
-/**
- * Implements basic domain-name validation as specified by RFC2818.
- *
- * {@hide}
- */
-public class DomainNameChecker {
+import javax.security.auth.x500.X500Principal;
+
+public class DomainNameValidator {
+ private final static String TAG = "DomainNameValidator";
+
+ private static final boolean DEBUG = false;
+ private static final boolean LOG_ENABLED = DEBUG ? Config.LOGD : Config.LOGV;
+
private static Pattern QUICK_IP_PATTERN;
static {
try {
@@ -84,8 +84,8 @@
errorMessage = "unknown host exception";
}
- if (HttpLog.LOGV) {
- HttpLog.v("DomainNameChecker.isIpAddress(): " + errorMessage);
+ if (LOG_ENABLED) {
+ Log.v(TAG, "DomainNameValidator.isIpAddress(): " + errorMessage);
}
rval = false;
@@ -102,8 +102,8 @@
* @return True iff if there is a domain match as specified by RFC2818
*/
private static boolean matchIpAddress(X509Certificate certificate, String thisDomain) {
- if (HttpLog.LOGV) {
- HttpLog.v("DomainNameChecker.matchIpAddress(): this domain: " + thisDomain);
+ if (LOG_ENABLED) {
+ Log.v(TAG, "DomainNameValidator.matchIpAddress(): this domain: " + thisDomain);
}
try {
@@ -118,8 +118,8 @@
if (altNameType.intValue() == ALT_IPA_NAME) {
String altName = (String)(altNameEntry.get(1));
if (altName != null) {
- if (HttpLog.LOGV) {
- HttpLog.v("alternative IP: " + altName);
+ if (LOG_ENABLED) {
+ Log.v(TAG, "alternative IP: " + altName);
}
if (thisDomain.equalsIgnoreCase(altName)) {
return true;
@@ -171,26 +171,26 @@
// spec (a valid DNS name must start with a letter); there is no
// good way around this, and in order to be compatible we proceed
// to check the common name (ie, ignore alternative names)
- if (HttpLog.LOGV) {
+ if (LOG_ENABLED) {
String errorMessage = e.getMessage();
if (errorMessage == null) {
errorMessage = "failed to parse certificate";
}
- if (HttpLog.LOGV) {
- HttpLog.v("DomainNameChecker.matchDns(): " + errorMessage);
- }
+ Log.v(TAG, "DomainNameValidator.matchDns(): " + errorMessage);
}
}
if (!hasDns) {
- X509Name xName = new X509Name(certificate.getSubjectDN().getName());
- Vector val = xName.getValues();
- Vector oid = xName.getOIDs();
- for (int i = 0; i < oid.size(); i++) {
- if (oid.elementAt(i).equals(X509Name.CN)) {
- return matchDns(thisDomain, (String)(val.elementAt(i)));
- }
+ final String cn = new DNParser(certificate.getSubjectX500Principal())
+ .find("cn");
+ if (LOG_ENABLED) {
+ Log.v(TAG, "Validating subject: DN:"
+ + certificate.getSubjectX500Principal().getName(X500Principal.CANONICAL)
+ + " CN:" + cn);
+ }
+ if (cn != null) {
+ return matchDns(thisDomain, cn);
}
}
@@ -202,9 +202,10 @@
* @param thatDomain The domain name from the certificate
* @return True iff thisDomain matches thatDomain as specified by RFC2818
*/
- private static boolean matchDns(String thisDomain, String thatDomain) {
- if (HttpLog.LOGV) {
- HttpLog.v("DomainNameChecker.matchDns():" +
+ // not private for testing
+ public static boolean matchDns(String thisDomain, String thatDomain) {
+ if (LOG_ENABLED) {
+ Log.v(TAG, "DomainNameValidator.matchDns():" +
" this domain: " + thisDomain +
" that domain: " + thatDomain);
}
@@ -231,7 +232,7 @@
rval = thisDomainTokens[i].equals(thatDomainTokens[i]);
if (!rval) {
// (c) OR we have a special *-match:
- // Z.Y.X matches *.Y.X but does not match *.X
+ // *.Y.X matches Z.Y.X but *.X doesn't match Z.Y.X
rval = (i == 0 && thisDomainTokensNum == thatDomainTokensNum);
if (rval) {
rval = thatDomainTokens[0].equals("*");
@@ -242,10 +243,13 @@
thisDomainTokens[0], thatDomainTokens[0]);
}
}
-
break;
}
}
+ } else {
+ // (e) OR thatHost has a '*.'-prefix of thisHost:
+ // *.Y.X matches Y.X
+ rval = thatDomain.equals("*." + thisDomain);
}
}
diff --git a/common/tests/src/com/android/common/DNParserTest.java b/common/tests/src/com/android/common/DNParserTest.java
new file mode 100644
index 0000000..34b140a
--- /dev/null
+++ b/common/tests/src/com/android/common/DNParserTest.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package com.android.common;
+
+import javax.security.auth.x500.X500Principal;
+
+import junit.framework.TestCase;
+
+public class DNParserTest extends TestCase {
+ public void testFind() {
+ checkFind("", "cn", null);
+ checkFind("ou=xxx", "cn", null);
+ checkFind("ou=xxx,cn=xxx", "cn", "xxx");
+ checkFind("ou=xxx+cn=yyy,cn=zzz+cn=abc", "cn", "yyy");
+ checkFind("2.5.4.3=a,ou=xxx", "cn", "a"); // OID
+ checkFind("cn=a,cn=b", "cn", "a");
+ checkFind("ou=Cc,ou=Bb,ou=Aa", "ou", "Cc");
+ checkFind("cn=imap.gmail.com", "cn", "imap.gmail.com");
+
+ // Quoted string (see http://www.ietf.org/rfc/rfc2253.txt)
+ checkFind("o=\"\\\" a ,=<>#;\"", "o", "\" a ,=<>#;");
+ checkFind("o=abc\\,def", "o", "abc,def");
+
+ // UTF-8 (example in rfc 2253)
+ checkFind("cn=Lu\\C4\\8Di\\C4\\87", "cn", "\u004c\u0075\u010d\u0069\u0107");
+
+ // whitespaces
+ checkFind("ou=a, o= a b ,cn=x", "o", "a b");
+ checkFind("o=\" a b \" ,cn=x", "o", " a b ");
+ }
+
+ private void checkFind(String dn, String attrType, String expected) {
+ String actual = new DNParser(new X500Principal(dn)).find(attrType);
+ assertEquals("dn:" + dn + " attr:" + attrType, expected, actual);
+ }
+}
diff --git a/common/tests/src/com/android/common/DomainNameValidatorTest.java b/common/tests/src/com/android/common/DomainNameValidatorTest.java
new file mode 100644
index 0000000..4fdd4cdc
--- /dev/null
+++ b/common/tests/src/com/android/common/DomainNameValidatorTest.java
@@ -0,0 +1,336 @@
+/*
+ * 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.
+ */
+package com.android.common;
+
+import java.math.BigInteger;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Principal;
+import java.security.PublicKey;
+import java.security.SignatureException;
+import java.security.cert.CertificateEncodingException;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateExpiredException;
+import java.security.cert.CertificateNotYetValidException;
+import java.security.cert.CertificateParsingException;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import javax.security.auth.x500.X500Principal;
+
+import junit.framework.TestCase;
+
+public class DomainNameValidatorTest extends TestCase {
+ private static final int ALT_UNKNOWN = 0;
+ private static final int ALT_DNS_NAME = 2;
+ private static final int ALT_IPA_NAME = 7;
+
+ /**
+ * Tests {@link DomainNameValidator#match}
+ */
+ public void testMatch() {
+ // TODO Use actual X509Certificate objects, instead of StubX509Certificate.
+ // Comment in DomainNameValidator suggests X509Certificate fails to parse a certificate
+ // if subject alternative names contain a domain name that begins with '*'.
+ // This test won't cover this kind of errors.
+
+ checkMatch("11", new StubX509Certificate("cn=imap.g.com"), "imap.g.com", true);
+ checkMatch("12", new StubX509Certificate("cn=imap2.g.com"), "imap.g.com", false);
+ checkMatch("13", new StubX509Certificate("cn=sub.imap.g.com"), "imap.g.com", false);
+
+ // If a subjectAltName extension of type dNSName is present, that MUST
+ // be used as the identity
+ checkMatch("21", new StubX509Certificate("")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "a.y.com")
+ , "imap.g.com", false);
+ checkMatch("22", new StubX509Certificate("cn=imap.g.com") // This cn should be ignored
+ .addSubjectAlternativeName(ALT_DNS_NAME, "a.y.com")
+ , "imap.g.com", false);
+ checkMatch("23", new StubX509Certificate("")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "imap.g.com")
+ , "imap.g.com", true);
+
+ // With wildcards
+ checkMatch("24", new StubX509Certificate("")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "*.g.com")
+ , "imap.g.com", true);
+
+
+ // host name is ip address
+ checkMatch("31", new StubX509Certificate("")
+ .addSubjectAlternativeName(ALT_IPA_NAME, "1.2.3.4")
+ , "1.2.3.4", true);
+ checkMatch("32", new StubX509Certificate("")
+ .addSubjectAlternativeName(ALT_IPA_NAME, "1.2.3.4")
+ , "1.2.3.5", false);
+ checkMatch("32", new StubX509Certificate("")
+ .addSubjectAlternativeName(ALT_IPA_NAME, "1.2.3.4")
+ .addSubjectAlternativeName(ALT_IPA_NAME, "192.168.100.1")
+ , "192.168.100.1", true);
+
+ // Has unknown subject alternative names
+ checkMatch("41", new StubX509Certificate("")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 1")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 2")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "a.b.c.d")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "*.google.com")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "imap.g.com")
+ .addSubjectAlternativeName(ALT_IPA_NAME, "2.33.44.55")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 3")
+ , "imap.g.com", true);
+
+ checkMatch("42", new StubX509Certificate("")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 1")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 2")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "a.b.c.d")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "*.google.com")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "imap.g.com")
+ .addSubjectAlternativeName(ALT_IPA_NAME, "2.33.44.55")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 3")
+ , "2.33.44.55", true);
+
+ checkMatch("43", new StubX509Certificate("")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 1")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 2")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "a.b.c.d")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "*.google.com")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "imap.g.com")
+ .addSubjectAlternativeName(ALT_IPA_NAME, "2.33.44.55")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 3")
+ , "g.com", false);
+
+ checkMatch("44", new StubX509Certificate("")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 1")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 2")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "a.b.c.d")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "*.google.com")
+ .addSubjectAlternativeName(ALT_DNS_NAME, "imap.g.com")
+ .addSubjectAlternativeName(ALT_IPA_NAME, "2.33.44.55")
+ .addSubjectAlternativeName(ALT_UNKNOWN, "random string 3")
+ , "2.33.44.1", false);
+ }
+
+ private void checkMatch(String message, X509Certificate certificate, String thisDomain,
+ boolean expected) {
+ Boolean actual = DomainNameValidator.match(certificate, thisDomain);
+ assertEquals(message, (Object) expected, (Object) actual);
+ }
+
+ /**
+ * Tests {@link DomainNameValidator#matchDns}
+ */
+ public void testMatchDns() {
+ checkMatchDns("11", "a.b.c.d", "a.b.c.d", true);
+ checkMatchDns("12", "a.b.c.d", "*.b.c.d", true);
+ checkMatchDns("13", "b.c.d", "*.b.c.d", true);
+ checkMatchDns("14", "b.c.d", "b*.c.d", true);
+
+ checkMatchDns("15", "a.b.c.d", "*.*.c.d", false);
+ checkMatchDns("16", "a.b.c.d", "*.c.d", false);
+
+ checkMatchDns("21", "imap.google.com", "imap.google.com", true);
+ checkMatchDns("22", "imap2.google.com", "imap.google.com", false);
+ checkMatchDns("23", "imap.google.com", "*.google.com", true);
+ checkMatchDns("24", "imap2.google.com", "*.google.com", true);
+ checkMatchDns("25", "imap.google.com", "*.googl.com", false);
+ checkMatchDns("26", "imap2.google2.com", "*.google3.com", false);
+ checkMatchDns("27", "imap.google.com", "ima*.google.com", true);
+ checkMatchDns("28", "imap.google.com", "imap*.google.com", true);
+ checkMatchDns("29", "imap.google.com", "*.imap.google.com", true);
+
+ checkMatchDns("41", "imap.google.com", "a*.google.com", false);
+ checkMatchDns("42", "imap.google.com", "ix*.google.com", false);
+
+ checkMatchDns("51", "imap.google.com", "iMap.Google.Com", true);
+ }
+
+ private void checkMatchDns(String message, String thisDomain, String thatDomain,
+ boolean expected) {
+ boolean actual = DomainNameValidator.matchDns(thisDomain, thatDomain);
+ assertEquals(message, expected, actual);
+ }
+
+ /**
+ * Minimal {@link X509Certificate} implementation for {@link DomainNameValidator}.
+ */
+ private static class StubX509Certificate extends X509Certificate {
+ private final X500Principal subjectX500Principal;
+ private Collection<List<?>> subjectAlternativeNames;
+
+ public StubX509Certificate(String subjectDn) {
+ subjectX500Principal = new X500Principal(subjectDn);
+ subjectAlternativeNames = null;
+ }
+
+ public StubX509Certificate addSubjectAlternativeName(int type, String name) {
+ if (subjectAlternativeNames == null) {
+ subjectAlternativeNames = new ArrayList<List<?>>();
+ }
+ LinkedList<Object> entry = new LinkedList<Object>();
+ entry.add(type);
+ entry.add(name);
+ subjectAlternativeNames.add(entry);
+ return this;
+ }
+
+ @Override
+ public Collection<List<?>> getSubjectAlternativeNames() throws CertificateParsingException {
+ return subjectAlternativeNames;
+ }
+
+ @Override
+ public X500Principal getSubjectX500Principal() {
+ return subjectX500Principal;
+ }
+
+ @Override
+ public void checkValidity() throws CertificateExpiredException,
+ CertificateNotYetValidException {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public void checkValidity(Date date) throws CertificateExpiredException,
+ CertificateNotYetValidException {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public int getBasicConstraints() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public Principal getIssuerDN() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public boolean[] getIssuerUniqueID() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public boolean[] getKeyUsage() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public Date getNotAfter() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public Date getNotBefore() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public BigInteger getSerialNumber() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public String getSigAlgName() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public String getSigAlgOID() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public byte[] getSigAlgParams() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public byte[] getSignature() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public Principal getSubjectDN() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public boolean[] getSubjectUniqueID() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public byte[] getTBSCertificate() throws CertificateEncodingException {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public int getVersion() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public byte[] getEncoded() throws CertificateEncodingException {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public PublicKey getPublicKey() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public String toString() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public void verify(PublicKey key) throws CertificateException, NoSuchAlgorithmException,
+ InvalidKeyException, NoSuchProviderException, SignatureException {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ @Override
+ public void verify(PublicKey key, String sigProvider) throws CertificateException,
+ NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException,
+ SignatureException {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ public Set<String> getCriticalExtensionOIDs() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ public byte[] getExtensionValue(String oid) {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ public Set<String> getNonCriticalExtensionOIDs() {
+ throw new RuntimeException("Method not implemented");
+ }
+
+ public boolean hasUnsupportedCriticalExtension() {
+ throw new RuntimeException("Method not implemented");
+ }
+ }
+}
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java
index 54e03759..d5a9b02 100644
--- a/core/java/android/accounts/AccountManagerService.java
+++ b/core/java/android/accounts/AccountManagerService.java
@@ -155,8 +155,7 @@
new AtomicReference<AccountManagerService>();
private static final boolean isDebuggableMonkeyBuild =
- SystemProperties.getBoolean("ro.monkey", false)
- && SystemProperties.getBoolean("ro.debuggable", false);
+ SystemProperties.getBoolean("ro.monkey", false);
private static final Account[] EMPTY_ACCOUNT_ARRAY = new Account[]{};
static {
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 49ebce3..1c3414d 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -2087,8 +2087,8 @@
event.setPackageName(getPackageName());
LayoutParams params = getWindow().getAttributes();
- boolean isFullScreen = (params.width == LayoutParams.FILL_PARENT) &&
- (params.height == LayoutParams.FILL_PARENT);
+ boolean isFullScreen = (params.width == LayoutParams.MATCH_PARENT) &&
+ (params.height == LayoutParams.MATCH_PARENT);
event.setFullScreen(isFullScreen);
CharSequence title = getTitle();
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 7d07604..932ad53 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -622,7 +622,6 @@
/**
* The stack trace where the error originated. May be null.
- * @pending
*/
public String stackTrace;
@@ -891,6 +890,38 @@
}
/**
+ * @deprecated This is now just a wrapper for
+ * {@link #killBackgroundProcesses(String)}; the previous behavior here
+ * is no longer available to applications because it allows them to
+ * break other applications by removing their alarms, stopping their
+ * services, etc.
+ */
+ @Deprecated
+ public void restartPackage(String packageName) {
+ killBackgroundProcesses(packageName);
+ }
+
+ /**
+ * Have the system immediately kill all background processes associated
+ * with the given package. This is the same as the kernel killing those
+ * processes to reclaim memory; the system will take care of restarting
+ * these processes in the future as needed.
+ *
+ * <p>You must hold the permission
+ * {@link android.Manifest.permission#KILL_BACKGROUND_PROCESSES} to be able to
+ * call this method.
+ *
+ * @param packageName The name of the package whose processes are to
+ * be killed.
+ */
+ public void killBackgroundProcesses(String packageName) {
+ try {
+ ActivityManagerNative.getDefault().killBackgroundProcesses(packageName);
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
* Have the system perform a force stop of everything associated with
* the given application package. All processes that share its uid
* will be killed, all services it has running stopped, all activities
@@ -899,14 +930,18 @@
* be stopped, notifications removed, etc.
*
* <p>You must hold the permission
- * {@link android.Manifest.permission#RESTART_PACKAGES} to be able to
+ * {@link android.Manifest.permission#FORCE_STOP_PACKAGES} to be able to
* call this method.
*
* @param packageName The name of the package to be stopped.
+ *
+ * @hide This is not available to third party applications due to
+ * it allowing them to break other applications by stopping their
+ * services, removing their alarms, etc.
*/
- public void restartPackage(String packageName) {
+ public void forceStopPackage(String packageName) {
try {
- ActivityManagerNative.getDefault().restartPackage(packageName);
+ ActivityManagerNative.getDefault().forceStopPackage(packageName);
} catch (RemoteException e) {
}
}
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 90f46dd..09b88ee 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -1007,10 +1007,18 @@
return true;
}
- case RESTART_PACKAGE_TRANSACTION: {
- data.enforceInterface(IActivityManager.descriptor);
+ case KILL_BACKGROUND_PROCESSES_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
String packageName = data.readString();
- restartPackage(packageName);
+ killBackgroundProcesses(packageName);
+ reply.writeNoException();
+ return true;
+ }
+
+ case FORCE_STOP_PACKAGE_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
+ String packageName = data.readString();
+ forceStopPackage(packageName);
reply.writeNoException();
return true;
}
@@ -2388,12 +2396,23 @@
reply.recycle();
}
- public void restartPackage(String packageName) throws RemoteException {
+ public void killBackgroundProcesses(String packageName) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(packageName);
- mRemote.transact(RESTART_PACKAGE_TRANSACTION, data, reply, 0);
+ mRemote.transact(KILL_BACKGROUND_PROCESSES_TRANSACTION, data, reply, 0);
+ reply.readException();
+ data.recycle();
+ reply.recycle();
+ }
+
+ public void forceStopPackage(String packageName) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ data.writeString(packageName);
+ mRemote.transact(FORCE_STOP_PACKAGE_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java
index 20a579a..2603579 100644
--- a/core/java/android/app/AlertDialog.java
+++ b/core/java/android/app/AlertDialog.java
@@ -40,7 +40,7 @@
*
* <pre>
* FrameLayout fl = (FrameLayout) findViewById(R.id.body);
- * fl.add(myView, new LayoutParams(FILL_PARENT, WRAP_CONTENT));
+ * fl.add(myView, new LayoutParams(MATCH_PARENT, WRAP_CONTENT));
* </pre>
*
* <p>The AlertDialog class takes care of automatically setting
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index 58e8b32..fa5d4a88 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -668,8 +668,8 @@
event.setPackageName(mContext.getPackageName());
LayoutParams params = getWindow().getAttributes();
- boolean isFullScreen = (params.width == LayoutParams.FILL_PARENT) &&
- (params.height == LayoutParams.FILL_PARENT);
+ boolean isFullScreen = (params.width == LayoutParams.MATCH_PARENT) &&
+ (params.height == LayoutParams.MATCH_PARENT);
event.setFullScreen(isFullScreen);
return false;
diff --git a/core/java/android/app/ExpandableListActivity.java b/core/java/android/app/ExpandableListActivity.java
index a2e048f..9651078 100644
--- a/core/java/android/app/ExpandableListActivity.java
+++ b/core/java/android/app/ExpandableListActivity.java
@@ -65,21 +65,21 @@
* <?xml version="1.0" encoding="UTF-8"?>
* <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
* android:orientation="vertical"
- * android:layout_width="fill_parent"
- * android:layout_height="fill_parent"
+ * android:layout_width="match_parent"
+ * android:layout_height="match_parent"
* android:paddingLeft="8dp"
* android:paddingRight="8dp">
*
* <ExpandableListView android:id="@id/android:list"
- * android:layout_width="fill_parent"
- * android:layout_height="fill_parent"
+ * android:layout_width="match_parent"
+ * android:layout_height="match_parent"
* android:background="#00FF00"
* android:layout_weight="1"
* android:drawSelectorOnTop="false"/>
*
* <TextView android:id="@id/android:empty"
- * android:layout_width="fill_parent"
- * android:layout_height="fill_parent"
+ * android:layout_width="match_parent"
+ * android:layout_height="match_parent"
* android:background="#FF0000"
* android:text="No data"/>
* </LinearLayout>
@@ -114,19 +114,19 @@
* <pre>
* <?xml version="1.0" encoding="utf-8"?>
* <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- * android:layout_width="fill_parent"
+ * android:layout_width="match_parent"
* android:layout_height="wrap_content"
* android:orientation="vertical">
*
* <TextView android:id="@+id/text1"
* android:textSize="16sp"
* android:textStyle="bold"
- * android:layout_width="fill_parent"
+ * android:layout_width="match_parent"
* android:layout_height="wrap_content"/>
*
* <TextView android:id="@+id/text2"
* android:textSize="16sp"
- * android:layout_width="fill_parent"
+ * android:layout_width="match_parent"
* android:layout_height="wrap_content"/>
* </LinearLayout>
* </pre>
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index ca6bfa7..016d465 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -216,7 +216,8 @@
public void getMemoryInfo(ActivityManager.MemoryInfo outInfo) throws RemoteException;
- public void restartPackage(final String packageName) throws RemoteException;
+ public void killBackgroundProcesses(final String packageName) throws RemoteException;
+ public void forceStopPackage(final String packageName) throws RemoteException;
// Note: probably don't want to allow applications access to these.
public void goingToSleep() throws RemoteException;
@@ -424,7 +425,7 @@
int GET_MEMORY_INFO_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+75;
int GET_PROCESSES_IN_ERROR_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+76;
int CLEAR_APP_DATA_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+77;
- int RESTART_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+78;
+ int FORCE_STOP_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+78;
int KILL_PIDS_FOR_MEMORY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+79;
int GET_SERVICES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+80;
int REPORT_PSS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+81;
@@ -448,4 +449,5 @@
int START_ACTIVITY_INTENT_SENDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+99;
int OVERRIDE_PENDING_TRANSITION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+100;
int HANDLE_APPLICATION_WTF_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+101;
+ int KILL_BACKGROUND_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+102;
}
diff --git a/core/java/android/app/ListActivity.java b/core/java/android/app/ListActivity.java
index 19b99c8..4b4cc05 100644
--- a/core/java/android/app/ListActivity.java
+++ b/core/java/android/app/ListActivity.java
@@ -56,21 +56,21 @@
* <?xml version="1.0" encoding="utf-8"?>
* <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
* android:orientation="vertical"
- * android:layout_width="fill_parent"
- * android:layout_height="fill_parent"
+ * android:layout_width="match_parent"
+ * android:layout_height="match_parent"
* android:paddingLeft="8dp"
* android:paddingRight="8dp">
*
* <ListView android:id="@id/android:list"
- * android:layout_width="fill_parent"
- * android:layout_height="fill_parent"
+ * android:layout_width="match_parent"
+ * android:layout_height="match_parent"
* android:background="#00FF00"
* android:layout_weight="1"
* android:drawSelectorOnTop="false"/>
*
* <TextView id="@id/android:empty"
- * android:layout_width="fill_parent"
- * android:layout_height="fill_parent"
+ * android:layout_width="match_parent"
+ * android:layout_height="match_parent"
* android:background="#FF0000"
* android:text="No data"/>
* </LinearLayout>
@@ -100,19 +100,19 @@
* <pre>
* <?xml version="1.0" encoding="utf-8"?>
* <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- * android:layout_width="fill_parent"
+ * android:layout_width="match_parent"
* android:layout_height="wrap_content"
* android:orientation="vertical">
*
* <TextView android:id="@+id/text1"
* android:textSize="16sp"
* android:textStyle="bold"
- * android:layout_width="fill_parent"
+ * android:layout_width="match_parent"
* android:layout_height="wrap_content"/>
*
* <TextView android:id="@+id/text2"
* android:textSize="16sp"
- * android:layout_width="fill_parent"
+ * android:layout_width="match_parent"
* android:layout_height="wrap_content"/>
* </LinearLayout>
* </pre>
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index b204c79..b396396 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -60,7 +60,6 @@
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.ImageButton;
-import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
@@ -106,7 +105,7 @@
// views & widgets
private TextView mBadgeLabel;
- private ImageView mAppIcon;
+ private SearchSourceSelector mSourceSelector;
private SearchAutoComplete mSearchAutoComplete;
private Button mGoButton;
private ImageButton mVoiceButton;
@@ -182,11 +181,11 @@
Window theWindow = getWindow();
WindowManager.LayoutParams lp = theWindow.getAttributes();
lp.type = WindowManager.LayoutParams.TYPE_SEARCH_BAR;
- lp.width = ViewGroup.LayoutParams.FILL_PARENT;
+ lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
// taking up the whole window (even when transparent) is less than ideal,
// but necessary to show the popup window until the window manager supports
// having windows anchored by their parent but not clipped by them.
- lp.height = ViewGroup.LayoutParams.FILL_PARENT;
+ lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
theWindow.setAttributes(lp);
@@ -209,7 +208,8 @@
mBadgeLabel = (TextView) findViewById(com.android.internal.R.id.search_badge);
mSearchAutoComplete = (SearchAutoComplete)
findViewById(com.android.internal.R.id.search_src_text);
- mAppIcon = (ImageView) findViewById(com.android.internal.R.id.search_app_icon);
+ mSourceSelector = new SearchSourceSelector(
+ findViewById(com.android.internal.R.id.search_source_selector));
mGoButton = (Button) findViewById(com.android.internal.R.id.search_go_btn);
mVoiceButton = (ImageButton) findViewById(com.android.internal.R.id.search_voice_btn);
mSearchPlate = findViewById(com.android.internal.R.id.search_plate);
@@ -606,13 +606,16 @@
}
private void updateSearchAppIcon() {
+ mSourceSelector.setSource(mSearchable.getSearchActivity());
+ mSourceSelector.setAppSearchData(mAppSearchData);
+
// In Donut, we special-case the case of the browser to hide the app icon as if it were
// global search, for extra space for url entry.
//
// TODO: Remove this special case once the issue has been reconciled in Eclair.
if (mGlobalSearchMode || isBrowserSearch()) {
- mAppIcon.setImageResource(0);
- mAppIcon.setVisibility(View.GONE);
+ mSourceSelector.setSourceIcon(null);
+ mSourceSelector.setVisibility(View.GONE);
mSearchPlate.setPadding(SEARCH_PLATE_LEFT_PADDING_GLOBAL,
mSearchPlate.getPaddingTop(),
mSearchPlate.getPaddingRight(),
@@ -628,8 +631,8 @@
icon = pm.getDefaultActivityIcon();
Log.w(LOG_TAG, mLaunchComponent + " not found, using generic app icon");
}
- mAppIcon.setImageDrawable(icon);
- mAppIcon.setVisibility(View.VISIBLE);
+ mSourceSelector.setSourceIcon(icon);
+ mSourceSelector.setVisibility(View.VISIBLE);
mSearchPlate.setPadding(SEARCH_PLATE_LEFT_PADDING_NON_GLOBAL,
mSearchPlate.getPaddingTop(),
mSearchPlate.getPaddingRight(),
@@ -812,6 +815,7 @@
if (!mSearchAutoComplete.isPerformingCompletion()) {
// The user changed the query, remember it.
mUserQuery = s == null ? "" : s.toString();
+ mSourceSelector.setQuery(mUserQuery);
}
}
@@ -1927,6 +1931,7 @@
query = "";
}
mUserQuery = query;
+ mSourceSelector.setQuery(query);
mSearchAutoComplete.setText(query);
mSearchAutoComplete.setSelection(query.length());
}
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java
index 5d9034b..a75e8dc 100644
--- a/core/java/android/app/SearchManager.java
+++ b/core/java/android/app/SearchManager.java
@@ -1346,6 +1346,7 @@
* @hide Pending API council approval
*/
public final static String SELECT_INITIAL_QUERY = "select_initial_query";
+
/**
* Defines the constants used in the communication between {@link android.app.SearchDialog} and
* the global search provider via {@link Cursor#respond(android.os.Bundle)}.
@@ -1612,6 +1613,15 @@
public final static String SUGGEST_PARAMETER_LIMIT = "limit";
/**
+ * Intent action for opening the search source selection activity.
+ * The intent may include these extra values:
+ * {@link #QUERY},
+ * {@link #APP_DATA}.
+ */
+ public static final String INTENT_ACTION_SELECT_SEARCH_SOURCE
+ = "android.intent.action.SELECT_SEARCH_SOURCE";
+
+ /**
* If a suggestion has this value in {@link #SUGGEST_COLUMN_INTENT_ACTION},
* the search dialog will switch to a different suggestion source when the
* suggestion is clicked.
@@ -2020,8 +2030,23 @@
}
/**
- * Gets information about a searchable activity. This method is static so that it can
- * be used from non-Activity contexts.
+ * Gets information about a searchable activity.
+ *
+ * @param componentName The activity to get searchable information for.
+ * @return Searchable information, or <code>null</code> if the activity does not
+ * exist, or is not searchable.
+ */
+ public SearchableInfo getSearchableInfo(ComponentName componentName) {
+ try {
+ return mService.getSearchableInfo(componentName, false);
+ } catch (RemoteException ex) {
+ Log.e(TAG, "getSearchableInfo() failed: " + ex);
+ return null;
+ }
+ }
+
+ /**
+ * Gets information about a searchable activity.
*
* @param componentName The activity to get searchable information for.
* @param globalSearch If <code>false</code>, return information about the given activity.
diff --git a/core/java/android/app/SearchSourceSelector.java b/core/java/android/app/SearchSourceSelector.java
new file mode 100644
index 0000000..fabf858a
--- /dev/null
+++ b/core/java/android/app/SearchSourceSelector.java
@@ -0,0 +1,197 @@
+/*
+ * 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.
+ */
+
+package android.app;
+
+import com.android.internal.R;
+
+import android.content.ActivityNotFoundException;
+import android.content.ComponentName;
+import android.content.ContentResolver;
+import android.content.Intent;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.View;
+import android.widget.ImageButton;
+
+import java.util.List;
+
+/**
+ * Utilities for setting up the search source selector.
+ *
+ * This class has two copies:
+ * android.app.SearchSourceSelector
+ * com.android.quicksearchbox.ui.SearchSourceSelector
+ *
+ * They should keep the same look and feel as much as possible,
+ * but only the intent details must absolutely stay in sync.
+ *
+ * @hide
+ */
+public class SearchSourceSelector implements View.OnClickListener {
+
+ private static final String TAG = "SearchSourceSelector";
+
+ // TODO: This should be defined in android.provider.Applications,
+ // and have a less made-up value.
+ private static final String APPLICATION_TYPE = "application/vnd.android.application";
+
+ public static final int ICON_VIEW_ID = R.id.search_source_selector_icon;
+
+ private final View mView;
+
+ private final ImageButton mIconView;
+
+ private ComponentName mSource;
+
+ private Bundle mAppSearchData;
+
+ private String mQuery;
+
+ public SearchSourceSelector(View view) {
+ mView = view;
+ mIconView = (ImageButton) view.findViewById(ICON_VIEW_ID);
+ mIconView.setOnClickListener(this);
+ }
+
+ /**
+ * Sets the icon displayed in the search source selector.
+ */
+ public void setSourceIcon(Drawable icon) {
+ mIconView.setImageDrawable(icon);
+ }
+
+ /**
+ * Sets the current search source.
+ */
+ public void setSource(ComponentName source) {
+ mSource = source;
+ }
+
+ /**
+ * Sets the app-specific data that will be passed to the search activity if
+ * the user opens the source selector and chooses a source.
+ */
+ public void setAppSearchData(Bundle appSearchData) {
+ mAppSearchData = appSearchData;
+ }
+
+ /**
+ * Sets the initial query that will be passed to the search activity if
+ * the user opens the source selector and chooses a source.
+ */
+ public void setQuery(String query) {
+ mQuery = query;
+ }
+
+ public void setVisibility(int visibility) {
+ mView.setVisibility(visibility);
+ }
+
+ /**
+ * Creates an intent for opening the search source selector activity.
+ *
+ * @param source The current search source.
+ * @param query The initial query that will be passed to the search activity if
+ * the user opens the source selector and chooses a source.
+ * @param appSearchData The app-specific data that will be passed to the search
+ * activity if the user opens the source selector and chooses a source.
+ */
+ public static Intent createIntent(ComponentName source, String query, Bundle appSearchData) {
+ Intent intent = new Intent(SearchManager.INTENT_ACTION_SELECT_SEARCH_SOURCE);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_CLEAR_TOP
+ | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+ Uri sourceUri = componentNameToUri(source);
+ if (sourceUri != null) {
+ intent.setDataAndType(sourceUri, APPLICATION_TYPE);
+ }
+ if (query != null) {
+ intent.putExtra(SearchManager.QUERY, query);
+ }
+ if (query != null) {
+ intent.putExtra(SearchManager.APP_DATA, appSearchData);
+ }
+ return intent;
+ }
+
+ /**
+ * Gets the search source from which the given
+ * {@link SearchManager.INTENT_ACTION_SELECT_SEARCH_SOURCE} intent was sent.
+ */
+ public static ComponentName getSource(Intent intent) {
+ return uriToComponentName(intent.getData());
+ }
+
+ private static Uri componentNameToUri(ComponentName name) {
+ if (name == null) return null;
+ // TODO: This URI format is specificed in android.provider.Applications which is @hidden
+ return new Uri.Builder()
+ .scheme(ContentResolver.SCHEME_CONTENT)
+ .authority("applications")
+ .appendEncodedPath("applications")
+ .appendPath(name.getPackageName())
+ .appendPath(name.getClassName())
+ .build();
+ }
+
+ private static ComponentName uriToComponentName(Uri uri) {
+ if (uri == null) return null;
+ List<String> path = uri.getPathSegments();
+ if (path == null || path.size() != 3) return null;
+ String pkg = path.get(1);
+ String cls = path.get(2);
+ if (TextUtils.isEmpty(pkg) || TextUtils.isEmpty(cls)) return null;
+ return new ComponentName(pkg, cls);
+ }
+
+ public void onClick(View v) {
+ trigger();
+ }
+
+ private void trigger() {
+ try {
+ Intent intent = createIntent(mSource, mQuery, mAppSearchData);
+ intent.setSourceBounds(getOnScreenRect(mIconView));
+ mIconView.getContext().startActivity(intent);
+ } catch (ActivityNotFoundException ex) {
+ Log.e(TAG, "No source selector activity found", ex);
+ }
+ }
+
+ // TODO: This code is replicated in lots of places:
+ // - android.provider.ContactsContract.QuickContact.showQuickContact()
+ // - android.widget.RemoteViews.setOnClickPendingIntent()
+ // - com.android.launcher2.Launcher.onClick()
+ // - com.android.launcher.Launcher.onClick()
+ // - com.android.server.status.StatusBarService.Launcher.onClick()
+ private static Rect getOnScreenRect(View v) {
+ final float appScale = v.getResources().getCompatibilityInfo().applicationScale;
+ final int[] pos = new int[2];
+ v.getLocationOnScreen(pos);
+ final Rect rect = new Rect();
+ rect.left = (int) (pos[0] * appScale + 0.5f);
+ rect.top = (int) (pos[1] * appScale + 0.5f);
+ rect.right = (int) ((pos[0] + v.getWidth()) * appScale + 0.5f);
+ rect.bottom = (int) ((pos[1] + v.getHeight()) * appScale + 0.5f);
+ return rect;
+ }
+
+}
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java
index 2f719f3..792b289 100644
--- a/core/java/android/appwidget/AppWidgetHostView.java
+++ b/core/java/android/appwidget/AppWidgetHostView.java
@@ -311,8 +311,8 @@
// Take requested dimensions from child, but apply default gravity.
FrameLayout.LayoutParams requested = (FrameLayout.LayoutParams)view.getLayoutParams();
if (requested == null) {
- requested = new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT,
- LayoutParams.FILL_PARENT);
+ requested = new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,
+ LayoutParams.MATCH_PARENT);
}
requested.gravity = Gravity.CENTER;
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 6e7e6d7f..eb2d7b1 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -88,11 +88,11 @@
* <code>content://com.company.provider.imap/inbox/1</code> for a particular
* message in the inbox, whose MIME type would be reported as
* <code>CURSOR_ITEM_BASE_TYPE + "/vnd.company.imap-msg"</code>
- *
+ *
* <p>Compare with {@link #CURSOR_DIR_BASE_TYPE}.
*/
public static final String CURSOR_ITEM_BASE_TYPE = "vnd.android.cursor.item";
-
+
/**
* This is the Android platform's base MIME type for a content: URI
* containing a Cursor of zero or more items. Applications should use this
@@ -102,7 +102,7 @@
* <code>content://com.company.provider.imap/inbox</code> for all of the
* messages in its inbox, whose MIME type would be reported as
* <code>CURSOR_DIR_BASE_TYPE + "/vnd.company.imap-msg"</code>
- *
+ *
* <p>Note how the base MIME type varies between this and
* {@link #CURSOR_ITEM_BASE_TYPE} depending on whether there is
* one single item or multiple items in the data set, while the sub-type
@@ -173,13 +173,25 @@
}
/**
+ * <p>
* Query the given URI, returning a {@link Cursor} over the result set.
+ * </p>
+ * <p>
+ * For best performance, the caller should follow these guidelines:
+ * <ul>
+ * <li>Provide an explicit projection, to prevent
+ * reading data from storage that aren't going to be used.</li>
+ * <li>Use question mark parameter markers such as 'phone=?' instead of
+ * explicit values in the {@code selection} parameter, so that queries
+ * that differ only by those values will be recognized as the same
+ * for caching purposes.</li>
+ * </ul>
+ * </p>
*
* @param uri The URI, using the content:// scheme, for the content to
* retrieve.
* @param projection A list of which columns to return. Passing null will
- * return all columns, which is discouraged to prevent reading data
- * from storage that isn't going to be used.
+ * return all columns, which is inefficient.
* @param selection A filter declaring which rows to return, formatted as an
* SQL WHERE clause (excluding the WHERE itself). Passing null will
* return all rows for the given URI.
@@ -225,10 +237,10 @@
* <li>android.resource ({@link #SCHEME_ANDROID_RESOURCE})</li>
* <li>file ({@link #SCHEME_FILE})</li>
* </ul>
- *
+ *
* <p>See {@link #openAssetFileDescriptor(Uri, String)} for more information
* on these schemes.
- *
+ *
* @param uri The desired URI.
* @return InputStream
* @throws FileNotFoundException if the provided URI could not be opened.
@@ -283,7 +295,7 @@
*
* <p>See {@link #openAssetFileDescriptor(Uri, String)} for more information
* on these schemes.
- *
+ *
* @param uri The desired URI.
* @param mode May be "w", "wa", "rw", or "rwt".
* @return OutputStream
@@ -318,7 +330,7 @@
*
* <p>See {@link #openAssetFileDescriptor(Uri, String)} for more information
* on these schemes.
- *
+ *
* @param uri The desired URI to open.
* @param mode The file mode to use, as per {@link ContentProvider#openFile
* ContentProvider.openFile}.
@@ -334,19 +346,19 @@
if (afd == null) {
return null;
}
-
+
if (afd.getDeclaredLength() < 0) {
// This is a full file!
return afd.getParcelFileDescriptor();
}
-
+
// Client can't handle a sub-section of a file, so close what
// we got and bail with an exception.
try {
afd.close();
} catch (IOException e) {
}
-
+
throw new FileNotFoundException("Not a whole file");
}
@@ -491,7 +503,7 @@
res.id = id;
return res;
}
-
+
/** @hide */
static public int modeToMode(Uri uri, String mode) throws FileNotFoundException {
int modeBits;
@@ -518,7 +530,7 @@
}
return modeBits;
}
-
+
/**
* Inserts a row into a table at the given URL.
*
@@ -1146,7 +1158,7 @@
/** @hide */
public static final String CONTENT_SERVICE_NAME = "content";
-
+
/** @hide */
public static IContentService getContentService() {
if (sContentService != null) {
@@ -1158,7 +1170,7 @@
if (Config.LOGV) Log.v("ContentService", "default service = " + sContentService);
return sContentService;
}
-
+
private static IContentService sContentService;
private final Context mContext;
private static final String TAG = "ContentResolver";
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 2ab5357..0fafe5d 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -1314,7 +1314,7 @@
/**
* Use with {@link #getSystemService} to retrieve a
- * {@blink android.appwidget.AppWidgetManager} for accessing AppWidgets.
+ * {@link android.appwidget.AppWidgetManager} for accessing AppWidgets.
*
* @hide
* @see #getSystemService
@@ -1323,7 +1323,7 @@
/**
* Use with {@link #getSystemService} to retrieve an
- * {@blink android.backup.IBackupManager IBackupManager} for communicating
+ * {@link android.backup.IBackupManager IBackupManager} for communicating
* with the backup mechanism.
* @hide
*
@@ -1333,7 +1333,7 @@
/**
* Use with {@link #getSystemService} to retrieve a
- * {@blink android.os.DropBox DropBox} instance for recording
+ * {@link android.os.DropBoxManager} instance for recording
* diagnostic logs.
* @see #getSystemService
*/
diff --git a/core/java/android/content/EventLogTags.logtags b/core/java/android/content/EventLogTags.logtags
deleted file mode 100644
index af50a3c..0000000
--- a/core/java/android/content/EventLogTags.logtags
+++ /dev/null
@@ -1,10 +0,0 @@
-# See system/core/logcat/event.logtags for a description of the format of this file.
-
-option java_package android.content
-
-# ---------------------------
-# SyncAdapter.java
-# ---------------------------
-# What happens in a sync operation (bytes sent and received, and
-# operation details)
-2743 sync_details (authority|3),(send|1|2),(recv|1|2),(details|3)
diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java
index d436365..a9c61dc 100644
--- a/core/java/android/content/SyncManager.java
+++ b/core/java/android/content/SyncManager.java
@@ -859,8 +859,8 @@
}
// Cap the delay
- long maxSyncRetryTimeInSeconds = Settings.Gservices.getLong(mContext.getContentResolver(),
- Settings.Gservices.SYNC_MAX_RETRY_DELAY_IN_SECONDS,
+ long maxSyncRetryTimeInSeconds = Settings.Secure.getLong(mContext.getContentResolver(),
+ Settings.Secure.SYNC_MAX_RETRY_DELAY_IN_SECONDS,
DEFAULT_MAX_SYNC_RETRY_TIME_IN_SECONDS);
if (newDelayInMs > maxSyncRetryTimeInSeconds * 1000) {
newDelayInMs = maxSyncRetryTimeInSeconds * 1000;
diff --git a/core/java/android/content/package.html b/core/java/android/content/package.html
index dd5360f..eac679d 100644
--- a/core/java/android/content/package.html
+++ b/core/java/android/content/package.html
@@ -421,7 +421,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<EditText id="text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
<b>android:textSize="18" android:textColor="#008"</b>
android:text="Hello, World!" />
</root>
@@ -447,7 +447,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<EditText id="text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
<b>android:textColor="@color/opaque_red"</b>
android:text="Hello, World!" />
</root>
@@ -463,7 +463,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<EditText id="text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
android:textColor="@<b>android:</b>color/opaque_red"
android:text="Hello, World!" />
</root>
@@ -476,7 +476,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<EditText id="text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
android:textColor="@android:color/opaque_red"
android:text="@string/hello_world" />
</root>
@@ -509,7 +509,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<EditText id="text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
<b>android:textColor="?android:textDisabledColor"</b>
android:text="@string/hello_world" />
</root>
@@ -637,10 +637,10 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<EditText id="text1" <b>style="@style/SpecialText"</b>
- android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="Hello, World!" />
<EditText id="text2" <b>style="@style/SpecialText"</b>
- android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:layout_width="match_parent" android:layout_height="wrap_content"
android:text="I love you all." />
</root></pre>
<h4> </h4>
diff --git a/core/java/android/content/res/ColorStateList.java b/core/java/android/content/res/ColorStateList.java
index 453a83d3..70baaef 100644
--- a/core/java/android/content/res/ColorStateList.java
+++ b/core/java/android/content/res/ColorStateList.java
@@ -44,7 +44,7 @@
* <selector xmlns:android="http://schemas.android.com/apk/res/android">
* <item android:state_focused="true" android:color="@color/testcolor1"/>
* <item android:state_pressed="true" android:state_enabled="false" android:color="@color/testcolor2" />
- * <item android:state_enabled="false" android:colore="@color/testcolor3" />
+ * <item android:state_enabled="false" android:color="@color/testcolor3" />
* <item android:state_active="true" android:color="@color/testcolor4" />
* <item android:color="@color/testcolor5"/>
* </selector>
diff --git a/core/java/android/database/sqlite/SQLiteCursor.java b/core/java/android/database/sqlite/SQLiteCursor.java
index 70b9b83..b178d4f 100644
--- a/core/java/android/database/sqlite/SQLiteCursor.java
+++ b/core/java/android/database/sqlite/SQLiteCursor.java
@@ -582,21 +582,23 @@
@Override
protected void finalize() {
try {
+ // if the cursor hasn't been closed yet, close it first
if (mWindow != null) {
close();
- String message = "Finalizing cursor " + this + " on " + mEditTable
- + " that has not been deactivated or closed";
+ Log.e(TAG, "Finalizing cursor that has not been deactivated or closed."
+ + " database = " + mDatabase.getPath() + ", table = " + mEditTable
+ + ", query = " + mQuery.mSql);
if (SQLiteDebug.DEBUG_ACTIVE_CURSOR_FINALIZATION) {
- Log.d(TAG, message + "\nThis cursor was created in:");
+ Log.d(TAG, "This cursor was created in:");
for (StackTraceElement ste : mStackTraceElements) {
Log.d(TAG, " " + ste);
}
}
SQLiteDebug.notifyActiveCursorFinalized();
- throw new IllegalStateException(message);
} else {
if (Config.LOGV) {
- Log.v(TAG, "Finalizing cursor " + this + " on " + mEditTable);
+ Log.v(TAG, "Finalizing cursor on database = " + mDatabase.getPath() +
+ ", table = " + mEditTable + ", query = " + mQuery.mSql);
}
}
} finally {
diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java
index 657bbcc..f310586 100644
--- a/core/java/android/database/sqlite/SQLiteDatabase.java
+++ b/core/java/android/database/sqlite/SQLiteDatabase.java
@@ -323,6 +323,7 @@
close();
} finally {
Log.e(TAG, "Removing corrupt database: " + mPath);
+ EventLog.writeEvent(EVENT_DB_CORRUPT, mPath);
// Delete the corrupt file. Don't re-create it now -- that would just confuse people
// -- but the next time someone tries to open it, they can set it up from scratch.
new File(mPath).delete();
diff --git a/core/java/android/hardware/SensorManager.java b/core/java/android/hardware/SensorManager.java
index 01c67cf..0c6bb1a 100644
--- a/core/java/android/hardware/SensorManager.java
+++ b/core/java/android/hardware/SensorManager.java
@@ -545,8 +545,8 @@
i = sensors_module_get_next_sensor(sensor, i);
if (i>=0) {
- Log.d(TAG, "found sensor: " + sensor.getName() +
- ", handle=" + sensor.getHandle());
+ //Log.d(TAG, "found sensor: " + sensor.getName() +
+ // ", handle=" + sensor.getHandle());
sensor.setLegacyType(getLegacySensorType(sensor.getType()));
fullList.add(sensor);
sHandleToSensor.append(sensor.getHandle(), sensor);
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 5499bba..5d5bd9c 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -16,7 +16,7 @@
package android.inputmethodservice;
-import static android.view.ViewGroup.LayoutParams.FILL_PARENT;
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import android.app.Dialog;
@@ -556,7 +556,7 @@
Context.LAYOUT_INFLATER_SERVICE);
mWindow = new SoftInputWindow(this, mTheme, mDispatcherState);
initViews();
- mWindow.getWindow().setLayout(FILL_PARENT, WRAP_CONTENT);
+ mWindow.getWindow().setLayout(MATCH_PARENT, WRAP_CONTENT);
}
/**
@@ -803,8 +803,8 @@
* candidates only mode changes.
*
* <p>The default implementation makes the layout for the window
- * FILL_PARENT x FILL_PARENT when in fullscreen mode, and
- * FILL_PARENT x WRAP_CONTENT when in non-fullscreen mode.
+ * MATCH_PARENT x MATCH_PARENT when in fullscreen mode, and
+ * MATCH_PARENT x WRAP_CONTENT when in non-fullscreen mode.
*
* @param win The input method's window.
* @param isFullscreen If true, the window is running in fullscreen mode
@@ -816,9 +816,9 @@
public void onConfigureWindow(Window win, boolean isFullscreen,
boolean isCandidatesOnly) {
if (isFullscreen) {
- mWindow.getWindow().setLayout(FILL_PARENT, FILL_PARENT);
+ mWindow.getWindow().setLayout(MATCH_PARENT, MATCH_PARENT);
} else {
- mWindow.getWindow().setLayout(FILL_PARENT, WRAP_CONTENT);
+ mWindow.getWindow().setLayout(MATCH_PARENT, WRAP_CONTENT);
}
}
@@ -841,7 +841,14 @@
*/
public boolean onEvaluateFullscreenMode() {
Configuration config = getResources().getConfiguration();
- return config.orientation == Configuration.ORIENTATION_LANDSCAPE;
+ if (config.orientation != Configuration.ORIENTATION_LANDSCAPE) {
+ return false;
+ }
+ if (mInputEditorInfo != null
+ && (mInputEditorInfo.imeOptions & EditorInfo.IME_FLAG_NO_FULLSCREEN) != 0) {
+ return false;
+ }
+ return true;
}
/**
@@ -1049,8 +1056,8 @@
public void setExtractView(View view) {
mExtractFrame.removeAllViews();
mExtractFrame.addView(view, new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mExtractView = view;
if (view != null) {
mExtractEditText = (ExtractEditText)view.findViewById(
@@ -1079,7 +1086,7 @@
public void setCandidatesView(View view) {
mCandidatesFrame.removeAllViews();
mCandidatesFrame.addView(view, new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
}
@@ -1092,7 +1099,7 @@
public void setInputView(View view) {
mInputFrame.removeAllViews();
mInputFrame.addView(view, new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
mInputView = view;
}
diff --git a/core/java/android/inputmethodservice/KeyboardView.java b/core/java/android/inputmethodservice/KeyboardView.java
index 76131fc..b0c3909 100755
--- a/core/java/android/inputmethodservice/KeyboardView.java
+++ b/core/java/android/inputmethodservice/KeyboardView.java
@@ -1118,6 +1118,11 @@
if (action == MotionEvent.ACTION_DOWN) mSwipeTracker.clear();
mSwipeTracker.addMovement(me);
+ // Ignore all motion events until a DOWN.
+ if (mAbortKey && action != MotionEvent.ACTION_DOWN) {
+ return true;
+ }
+
if (mGestureDetector.onTouchEvent(me)) {
showPreview(NOT_A_KEY);
mHandler.removeMessages(MSG_REPEAT);
@@ -1150,9 +1155,14 @@
mKeys[keyIndex].codes[0] : 0);
if (mCurrentKey >= 0 && mKeys[mCurrentKey].repeatable) {
mRepeatKeyIndex = mCurrentKey;
- repeatKey();
Message msg = mHandler.obtainMessage(MSG_REPEAT);
mHandler.sendMessageDelayed(msg, REPEAT_START_DELAY);
+ repeatKey();
+ // Delivering the key could have caused an abort
+ if (mAbortKey) {
+ mRepeatKeyIndex = NOT_A_KEY;
+ break;
+ }
}
if (mCurrentKey != NOT_A_KEY) {
Message msg = mHandler.obtainMessage(MSG_LONGPRESS, me);
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index a127df0..30799ec 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -129,37 +129,33 @@
public static final int TYPE_WIFI = 1;
/**
* An MMS-specific Mobile data connection. This connection may be the
- * same as {@link #TYPEMOBILE} but it may be different. This is used
+ * same as {@link #TYPE_MOBILE} but it may be different. This is used
* by applications needing to talk to the carrier's Multimedia Messaging
* Service servers. It may coexist with default data connections.
- * {@hide}
*/
public static final int TYPE_MOBILE_MMS = 2;
/**
* A SUPL-specific Mobile data connection. This connection may be the
- * same as {@link #TYPEMOBILE} but it may be different. This is used
+ * same as {@link #TYPE_MOBILE} but it may be different. This is used
* by applications needing to talk to the carrier's Secure User Plane
* Location servers for help locating the device. It may coexist with
* default data connections.
- * {@hide}
*/
public static final int TYPE_MOBILE_SUPL = 3;
/**
* A DUN-specific Mobile data connection. This connection may be the
- * same as {@link #TYPEMOBILE} but it may be different. This is used
+ * same as {@link #TYPE_MOBILE} but it may be different. This is used
* by applicaitons performing a Dial Up Networking bridge so that
* the carrier is aware of DUN traffic. It may coexist with default data
* connections.
- * {@hide}
*/
public static final int TYPE_MOBILE_DUN = 4;
/**
* A High Priority Mobile data connection. This connection is typically
- * the same as {@link #TYPEMOBILE} but the routing setup is different.
+ * the same as {@link #TYPE_MOBILE} but the routing setup is different.
* Only requesting processes will have access to the Mobile DNS servers
* and only IP's explicitly requested via {@link #requestRouteToHost}
- * will route over this interface.
- *{@hide}
+ * will route over this interface if a default route exists.
*/
public static final int TYPE_MOBILE_HIPRI = 5;
/** {@hide} */
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index a97b9e5..e40f1b8 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -16,11 +16,12 @@
package android.net;
-import android.net.http.DomainNameChecker;
import android.os.SystemProperties;
import android.util.Config;
import android.util.Log;
+import com.android.common.DomainNameValidator;
+
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
@@ -200,7 +201,7 @@
X509Certificate lastChainCert = (X509Certificate) certs[0];
- if (!DomainNameChecker.match(lastChainCert, destHost)) {
+ if (!DomainNameValidator.match(lastChainCert, destHost)) {
if (Config.LOGD) {
Log.d(LOG_TAG,"validateSocket(): domain name check failed");
}
diff --git a/core/java/android/net/http/CertificateChainValidator.java b/core/java/android/net/http/CertificateChainValidator.java
index ed6b4c2..da6af9d 100644
--- a/core/java/android/net/http/CertificateChainValidator.java
+++ b/core/java/android/net/http/CertificateChainValidator.java
@@ -16,6 +16,8 @@
package android.net.http;
+import com.android.common.DomainNameValidator;
+
import org.apache.harmony.xnet.provider.jsse.SSLParameters;
import java.io.IOException;
@@ -112,7 +114,7 @@
closeSocketThrowException(
sslSocket, "certificate for this site is null");
} else {
- if (!DomainNameChecker.match(currCertificate, domain)) {
+ if (!DomainNameValidator.match(currCertificate, domain)) {
String errorMessage = "certificate not for this host: " + domain;
if (HttpLog.LOGV) {
diff --git a/core/java/android/os/AsyncTask.java b/core/java/android/os/AsyncTask.java
index 7d2c698..d28148c 100644
--- a/core/java/android/os/AsyncTask.java
+++ b/core/java/android/os/AsyncTask.java
@@ -82,7 +82,7 @@
* <li><code>Result</code>, the type of the result of the background
* computation.</li>
* </ol>
- * <p>Not all types are always used by am asynchronous task. To mark a type as unused,
+ * <p>Not all types are always used by an asynchronous task. To mark a type as unused,
* simply use the type {@link Void}:</p>
* <pre>
* private class MyTask extends AsyncTask<Void, Void, Void> { ... }
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index e9353d8..fcd8f38 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -21,7 +21,7 @@
*/
public class Build {
/** Value used for when a build property is unknown. */
- private static final String UNKNOWN = "unknown";
+ public static final String UNKNOWN = "unknown";
/** Either a changelist number, or a label like "M4-rc20". */
public static final String ID = getString("ro.build.id");
@@ -41,6 +41,9 @@
/** The name of the instruction set (CPU type + ABI convention) of native code. */
public static final String CPU_ABI = getString("ro.product.cpu.abi");
+ /** The name of the second instruction set (CPU type + ABI convention) of native code. */
+ public static final String CPU_ABI2 = getString("ro.product.cpu.abi2");
+
/** The manufacturer of the product/hardware. */
public static final String MANUFACTURER = getString("ro.product.manufacturer");
@@ -50,6 +53,15 @@
/** The end-user-visible name for the end product. */
public static final String MODEL = getString("ro.product.model");
+ /** @pending The system bootloader version number. */
+ public static final String BOOTLOADER = getString("ro.bootloader");
+
+ /** @pending The radio firmware version number. */
+ public static final String RADIO = getString("gsm.version.baseband");
+
+ /** @pending The device serial number. */
+ public static final String SERIAL = getString("ro.serialno");
+
/** Various version strings. */
public static class VERSION {
/**
diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java
index 6212b17..9491bd4 100644
--- a/core/java/android/os/Environment.java
+++ b/core/java/android/os/Environment.java
@@ -18,6 +18,8 @@
import java.io.File;
+import android.os.IMountService;
+
/**
* Provides access to environment variables.
*/
@@ -28,6 +30,8 @@
private static final String SYSTEM_PROPERTY_EFS_ENABLED = "persist.security.efs.enabled";
+ private static IMountService mMntSvc = null;
+
/**
* Gets the Android root directory.
*/
@@ -167,9 +171,19 @@
/**
* Gets the current state of the external storage device.
+ * Note: This call should be deprecated as it doesn't support
+ * multiple volumes.
*/
public static String getExternalStorageState() {
- return SystemProperties.get("EXTERNAL_STORAGE_STATE", MEDIA_REMOVED);
+ try {
+ if (mMntSvc == null) {
+ mMntSvc = IMountService.Stub.asInterface(ServiceManager
+ .getService("mount"));
+ }
+ return mMntSvc.getVolumeState(getExternalStorageDirectory().toString());
+ } catch (Exception rex) {
+ return Environment.MEDIA_REMOVED;
+ }
}
static File getDirectory(String variableName, String defaultPath) {
diff --git a/core/java/android/os/FileUtils.java b/core/java/android/os/FileUtils.java
index 51dfb5b..4780cf3 100644
--- a/core/java/android/os/FileUtils.java
+++ b/core/java/android/os/FileUtils.java
@@ -153,14 +153,16 @@
public static String readTextFile(File file, int max, String ellipsis) throws IOException {
InputStream input = new FileInputStream(file);
try {
- if (max > 0) { // "head" mode: read the first N bytes
+ long size = file.length();
+ if (max > 0 || (size > 0 && max == 0)) { // "head" mode: read the first N bytes
+ if (size > 0 && (max == 0 || size < max)) max = (int) size;
byte[] data = new byte[max + 1];
int length = input.read(data);
if (length <= 0) return "";
if (length <= max) return new String(data, 0, length);
if (ellipsis == null) return new String(data, 0, max);
return new String(data, 0, max) + ellipsis;
- } else if (max < 0) { // "tail" mode: read it all, keep the last N
+ } else if (max < 0) { // "tail" mode: keep the last N
int len;
boolean rolled = false;
byte[] last = null, data = null;
@@ -180,7 +182,7 @@
}
if (ellipsis == null || !rolled) return new String(last);
return ellipsis + new String(last);
- } else { // "cat" mode: read it all
+ } else { // "cat" mode: size unknown, read it all in streaming fashion
ByteArrayOutputStream contents = new ByteArrayOutputStream();
int len;
byte[] data = new byte[1024];
diff --git a/core/java/android/os/IMountService.aidl b/core/java/android/os/IMountService.aidl
index 96d44b6..e73569a 100644
--- a/core/java/android/os/IMountService.aidl
+++ b/core/java/android/os/IMountService.aidl
@@ -42,17 +42,17 @@
/**
* Mount external storage at given mount point.
*/
- void mountMedia(String mountPoint);
+ void mountVolume(String mountPoint);
/**
* Safely unmount external storage at given mount point.
*/
- void unmountMedia(String mountPoint);
+ void unmountVolume(String mountPoint);
/**
* Format external storage given a mount point.
*/
- void formatMedia(String mountPoint);
+ void formatVolume(String mountPoint);
/**
* Returns true if media notification sounds are enabled.
@@ -65,14 +65,46 @@
void setPlayNotificationSounds(boolean value);
/**
- * Returns true if USB Mass Storage is automatically started
- * when a UMS host is detected.
+ * Gets the state of an volume via it's mountpoint.
*/
- boolean getAutoStartUms();
+ String getVolumeState(String mountPoint);
+
+ /*
+ * Creates a secure container with the specified parameters.
+ * On success, the filesystem container-path is returned.
+ */
+ String createSecureContainer(String id, int sizeMb, String fstype, String key, int ownerUid);
+
+ /*
+ * Finalize a container which has just been created and populated.
+ * After finalization, the container is immutable.
+ */
+ void finalizeSecureContainer(String id);
+
+ /*
+ * Destroy a secure container, and free up all resources associated with it.
+ * NOTE: Ensure all references are released prior to deleting.
+ */
+ void destroySecureContainer(String id);
+
+ /*
+ * Mount a secure container with the specified key and owner UID.
+ * On success, the filesystem container-path is returned.
+ */
+ String mountSecureContainer(String id, String key, int ownerUid);
+
+ /*
+ * Returns the filesystem path of a mounted secure container.
+ */
+ String getSecureContainerPath(String id);
/**
- * Sets whether or not USB Mass Storage is automatically started
- * when a UMS host is detected.
+ * Gets an Array of currently known secure container IDs
*/
- void setAutoStartUms(boolean value);
+ String[] getSecureContainerList();
+
+ /**
+ * Shuts down the MountService and gracefully unmounts all external media.
+ */
+ void shutdown();
}
diff --git a/core/java/android/os/MemoryFile.java b/core/java/android/os/MemoryFile.java
index 03542dd..9742b05 100644
--- a/core/java/android/os/MemoryFile.java
+++ b/core/java/android/os/MemoryFile.java
@@ -52,7 +52,7 @@
private static native void native_write(FileDescriptor fd, int address, byte[] buffer,
int srcOffset, int destOffset, int count, boolean isUnpinned) throws IOException;
private static native void native_pin(FileDescriptor fd, boolean pin) throws IOException;
- private static native int native_get_mapped_size(FileDescriptor fd) throws IOException;
+ private static native int native_get_size(FileDescriptor fd) throws IOException;
private FileDescriptor mFD; // ashmem file descriptor
private int mAddress; // address of ashmem memory
@@ -300,20 +300,19 @@
* @hide
*/
public static boolean isMemoryFile(FileDescriptor fd) throws IOException {
- return (native_get_mapped_size(fd) >= 0);
+ return (native_get_size(fd) >= 0);
}
/**
- * Returns the size of the memory file, rounded up to a page boundary, that
- * the file descriptor refers to, or -1 if the file descriptor does not
- * refer to a memory file.
+ * Returns the size of the memory file that the file descriptor refers to,
+ * or -1 if the file descriptor does not refer to a memory file.
*
* @throws IOException If <code>fd</code> is not a valid file descriptor.
*
* @hide
*/
- public static int getMappedSize(FileDescriptor fd) throws IOException {
- return native_get_mapped_size(fd);
+ public static int getSize(FileDescriptor fd) throws IOException {
+ return native_get_size(fd);
}
/**
diff --git a/core/java/android/os/Power.java b/core/java/android/os/Power.java
index 3679e47..bc76180 100644
--- a/core/java/android/os/Power.java
+++ b/core/java/android/os/Power.java
@@ -17,6 +17,8 @@
package android.os;
import java.io.IOException;
+import android.os.ServiceManager;
+import android.os.IMountService;
/**
* Class that provides access to some of the power management functions.
@@ -97,5 +99,19 @@
* @throws IOException if reboot fails for some reason (eg, lack of
* permission)
*/
- public static native void reboot(String reason) throws IOException;
+ public static void reboot(String reason) throws IOException
+ {
+ IMountService mSvc = IMountService.Stub.asInterface(
+ ServiceManager.getService("mount"));
+
+ if (mSvc != null) {
+ try {
+ mSvc.shutdown();
+ } catch (Exception e) {
+ }
+ }
+ rebootNative(reason);
+ }
+
+ private static native void rebootNative(String reason) throws IOException ;
}
diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java
new file mode 100644
index 0000000..3dd3918
--- /dev/null
+++ b/core/java/android/os/RecoverySystem.java
@@ -0,0 +1,418 @@
+/*
+ * 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.
+ */
+
+package android.os;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.security.GeneralSecurityException;
+import java.security.PublicKey;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import android.content.Context;
+import android.util.Log;
+
+import org.apache.harmony.security.asn1.BerInputStream;
+import org.apache.harmony.security.pkcs7.ContentInfo;
+import org.apache.harmony.security.pkcs7.SignedData;
+import org.apache.harmony.security.pkcs7.SignerInfo;
+import org.apache.harmony.security.provider.cert.X509CertImpl;
+
+/**
+ * RecoverySystem contains methods for interacting with the Android
+ * recovery system (the separate partition that can be used to install
+ * system updates, wipe user data, etc.)
+ */
+public class RecoverySystem {
+ private static final String TAG = "RecoverySystem";
+
+ /**
+ * Default location of zip file containing public keys (X509
+ * certs) authorized to sign OTA updates.
+ */
+ private static final File DEFAULT_KEYSTORE =
+ new File("/system/etc/security/otacerts.zip");
+
+ /** Send progress to listeners no more often than this (in ms). */
+ private static final long PUBLISH_PROGRESS_INTERVAL_MS = 500;
+
+ /** Used to communicate with recovery. See bootable/recovery/recovery.c. */
+ private static File RECOVERY_DIR = new File("/cache/recovery");
+ private static File COMMAND_FILE = new File(RECOVERY_DIR, "command");
+ private static File LOG_FILE = new File(RECOVERY_DIR, "log");
+
+ // Length limits for reading files.
+ private static int LOG_FILE_MAX_LENGTH = 8 * 1024;
+
+ /**
+ * Interface definition for a callback to be invoked regularly as
+ * verification proceeds.
+ */
+ public interface ProgressListener {
+ /**
+ * Called periodically as the verification progresses.
+ *
+ * @param progress the approximate percentage of the
+ * verification that has been completed, ranging from 0
+ * to 100 (inclusive).
+ */
+ public void onProgress(int progress);
+ }
+
+ /** @return the set of certs that can be used to sign an OTA package. */
+ private static HashSet<Certificate> getTrustedCerts(File keystore)
+ throws IOException, GeneralSecurityException {
+ HashSet<Certificate> trusted = new HashSet<Certificate>();
+ if (keystore == null) {
+ keystore = DEFAULT_KEYSTORE;
+ }
+ ZipFile zip = new ZipFile(keystore);
+ try {
+ CertificateFactory cf = CertificateFactory.getInstance("X.509");
+ Enumeration<? extends ZipEntry> entries = zip.entries();
+ while (entries.hasMoreElements()) {
+ ZipEntry entry = entries.nextElement();
+ trusted.add(cf.generateCertificate(zip.getInputStream(entry)));
+ }
+ } finally {
+ zip.close();
+ }
+ return trusted;
+ }
+
+ /**
+ * Verify the cryptographic signature of a system update package
+ * before installing it. Note that the package is also verified
+ * separately by the installer once the device is rebooted into
+ * the recovery system. This function will return only if the
+ * package was successfully verified; otherwise it will throw an
+ * exception.
+ *
+ * Verification of a package can take significant time, so this
+ * function should not be called from a UI thread.
+ *
+ * @param packageFile the package to be verified
+ * @param listener an object to receive periodic progress
+ * updates as verification proceeds. May be null.
+ * @param deviceCertsZipFile the zip file of certificates whose
+ * public keys we will accept. Verification succeeds if the
+ * package is signed by the private key corresponding to any
+ * public key in this file. May be null to use the system default
+ * file (currently "/system/etc/security/otacerts.zip").
+ *
+ * @throws IOException if there were any errors reading the
+ * package or certs files.
+ * @throws GeneralSecurityException if verification failed
+ */
+ public static void verifyPackage(File packageFile,
+ ProgressListener listener,
+ File deviceCertsZipFile)
+ throws IOException, GeneralSecurityException {
+ long fileLen = packageFile.length();
+
+ RandomAccessFile raf = new RandomAccessFile(packageFile, "r");
+ try {
+ int lastPercent = 0;
+ long lastPublishTime = System.currentTimeMillis();
+ if (listener != null) {
+ listener.onProgress(lastPercent);
+ }
+
+ raf.seek(fileLen - 6);
+ byte[] footer = new byte[6];
+ raf.readFully(footer);
+
+ if (footer[2] != (byte)0xff || footer[3] != (byte)0xff) {
+ throw new SignatureException("no signature in file (no footer)");
+ }
+
+ int commentSize = (footer[4] & 0xff) | ((footer[5] & 0xff) << 8);
+ int signatureStart = (footer[0] & 0xff) | ((footer[1] & 0xff) << 8);
+ Log.v(TAG, String.format("comment size %d; signature start %d",
+ commentSize, signatureStart));
+
+ byte[] eocd = new byte[commentSize + 22];
+ raf.seek(fileLen - (commentSize + 22));
+ raf.readFully(eocd);
+
+ // Check that we have found the start of the
+ // end-of-central-directory record.
+ if (eocd[0] != (byte)0x50 || eocd[1] != (byte)0x4b ||
+ eocd[2] != (byte)0x05 || eocd[3] != (byte)0x06) {
+ throw new SignatureException("no signature in file (bad footer)");
+ }
+
+ for (int i = 4; i < eocd.length-3; ++i) {
+ if (eocd[i ] == (byte)0x50 && eocd[i+1] == (byte)0x4b &&
+ eocd[i+2] == (byte)0x05 && eocd[i+3] == (byte)0x06) {
+ throw new SignatureException("EOCD marker found after start of EOCD");
+ }
+ }
+
+ // The following code is largely copied from
+ // JarUtils.verifySignature(). We could just *call* that
+ // method here if that function didn't read the entire
+ // input (ie, the whole OTA package) into memory just to
+ // compute its message digest.
+
+ BerInputStream bis = new BerInputStream(
+ new ByteArrayInputStream(eocd, commentSize+22-signatureStart, signatureStart));
+ ContentInfo info = (ContentInfo)ContentInfo.ASN1.decode(bis);
+ SignedData signedData = info.getSignedData();
+ if (signedData == null) {
+ throw new IOException("signedData is null");
+ }
+ Collection encCerts = signedData.getCertificates();
+ if (encCerts.isEmpty()) {
+ throw new IOException("encCerts is empty");
+ }
+ // Take the first certificate from the signature (packages
+ // should contain only one).
+ Iterator it = encCerts.iterator();
+ X509Certificate cert = null;
+ if (it.hasNext()) {
+ cert = new X509CertImpl((org.apache.harmony.security.x509.Certificate)it.next());
+ } else {
+ throw new SignatureException("signature contains no certificates");
+ }
+
+ List sigInfos = signedData.getSignerInfos();
+ SignerInfo sigInfo;
+ if (!sigInfos.isEmpty()) {
+ sigInfo = (SignerInfo)sigInfos.get(0);
+ } else {
+ throw new IOException("no signer infos!");
+ }
+
+ // Check that the public key of the certificate contained
+ // in the package equals one of our trusted public keys.
+
+ HashSet<Certificate> trusted = getTrustedCerts(
+ deviceCertsZipFile == null ? DEFAULT_KEYSTORE : deviceCertsZipFile);
+
+ PublicKey signatureKey = cert.getPublicKey();
+ boolean verified = false;
+ for (Certificate c : trusted) {
+ if (c.getPublicKey().equals(signatureKey)) {
+ verified = true;
+ break;
+ }
+ }
+ if (!verified) {
+ throw new SignatureException("signature doesn't match any trusted key");
+ }
+
+ // The signature cert matches a trusted key. Now verify that
+ // the digest in the cert matches the actual file data.
+
+ // The verifier in recovery *only* handles SHA1withRSA
+ // signatures. SignApk.java always uses SHA1withRSA, no
+ // matter what the cert says to use. Ignore
+ // cert.getSigAlgName(), and instead use whatever
+ // algorithm is used by the signature (which should be
+ // SHA1withRSA).
+
+ String da = sigInfo.getdigestAlgorithm();
+ String dea = sigInfo.getDigestEncryptionAlgorithm();
+ String alg = null;
+ if (da == null || dea == null) {
+ // fall back to the cert algorithm if the sig one
+ // doesn't look right.
+ alg = cert.getSigAlgName();
+ } else {
+ alg = da + "with" + dea;
+ }
+ Signature sig = Signature.getInstance(alg);
+ sig.initVerify(cert);
+
+ // The signature covers all of the OTA package except the
+ // archive comment and its 2-byte length.
+ long toRead = fileLen - commentSize - 2;
+ long soFar = 0;
+ raf.seek(0);
+ byte[] buffer = new byte[4096];
+ while (soFar < toRead) {
+ int size = buffer.length;
+ if (soFar + size > toRead) {
+ size = (int)(toRead - soFar);
+ }
+ int read = raf.read(buffer, 0, size);
+ sig.update(buffer, 0, read);
+ soFar += read;
+
+ if (listener != null) {
+ long now = System.currentTimeMillis();
+ int p = (int)(soFar * 100 / toRead);
+ if (p > lastPercent &&
+ now - lastPublishTime > PUBLISH_PROGRESS_INTERVAL_MS) {
+ lastPercent = p;
+ lastPublishTime = now;
+ listener.onProgress(lastPercent);
+ }
+ }
+ }
+ if (listener != null) {
+ listener.onProgress(100);
+ }
+
+ if (!sig.verify(sigInfo.getEncryptedDigest())) {
+ throw new SignatureException("signature digest verification failed");
+ }
+ } finally {
+ raf.close();
+ }
+ }
+
+ /**
+ * Reboots the device in order to install the given update
+ * package.
+ * Requires the {@link android.Manifest.permission#REBOOT}
+ * and {@link android.Manifest.permission#ACCESS_CACHE_FILESYSTEM}
+ * permissions.
+ *
+ * @param context the Context to use
+ * @param packageFile the update package to install. Currently
+ * must be on the /cache or /data partitions.
+ *
+ * @throws IOException if writing the recovery command file
+ * fails, or if the reboot itself fails.
+ */
+ public static void installPackage(Context context, File packageFile)
+ throws IOException {
+ String filename = packageFile.getCanonicalPath();
+
+ if (filename.startsWith("/cache/")) {
+ filename = "CACHE:" + filename.substring(7);
+ } else if (filename.startsWith("/data/")) {
+ filename = "DATA:" + filename.substring(6);
+ } else {
+ throw new IllegalArgumentException(
+ "Must start with /cache or /data: " + filename);
+ }
+ Log.w(TAG, "!!! REBOOTING TO INSTALL " + filename + " !!!");
+ String arg = "--update_package=" + filename;
+ bootCommand(context, arg);
+ }
+
+ /**
+ * Reboots the device and wipes the user data partition. This is
+ * sometimes called a "factory reset", which is something of a
+ * misnomer because the system partition is not restored to its
+ * factory state.
+ * Requires the {@link android.Manifest.permission#REBOOT}
+ * and {@link android.Manifest.permission#ACCESS_CACHE_FILESYSTEM}
+ * permissions.
+ *
+ * @param context the Context to use
+ *
+ * @throws IOException if writing the recovery command file
+ * fails, or if the reboot itself fails.
+ */
+ public static void rebootWipeUserData(Context context)
+ throws IOException {
+ bootCommand(context, "--wipe_data");
+ }
+
+ /**
+ * Reboot into the recovery system to wipe the /data partition and toggle
+ * Encrypted File Systems on/off.
+ * @param extras to add to the RECOVERY_COMPLETED intent after rebooting.
+ * @throws IOException if something goes wrong.
+ *
+ * @hide
+ */
+ public static void rebootToggleEFS(Context context, boolean efsEnabled)
+ throws IOException {
+ if (efsEnabled) {
+ bootCommand(context, "--set_encrypted_filesystem=on");
+ } else {
+ bootCommand(context, "--set_encrypted_filesystem=off");
+ }
+ }
+
+ /**
+ * Reboot into the recovery system with the supplied argument.
+ * @param arg to pass to the recovery utility.
+ * @throws IOException if something goes wrong.
+ */
+ private static void bootCommand(Context context, String arg) throws IOException {
+ RECOVERY_DIR.mkdirs(); // In case we need it
+ COMMAND_FILE.delete(); // In case it's not writable
+ LOG_FILE.delete();
+
+ FileWriter command = new FileWriter(COMMAND_FILE);
+ try {
+ command.write(arg);
+ command.write("\n");
+ } finally {
+ command.close();
+ }
+
+ // Having written the command file, go ahead and reboot
+ PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
+ pm.reboot("recovery");
+
+ throw new IOException("Reboot failed (no permissions?)");
+ }
+
+ /**
+ * Called after booting to process and remove recovery-related files.
+ * @return the log file from recovery, or null if none was found.
+ *
+ * @hide
+ */
+ public static String handleAftermath() {
+ // Record the tail of the LOG_FILE
+ String log = null;
+ try {
+ log = FileUtils.readTextFile(LOG_FILE, -LOG_FILE_MAX_LENGTH, "...\n");
+ } catch (FileNotFoundException e) {
+ Log.i(TAG, "No recovery log file");
+ } catch (IOException e) {
+ Log.e(TAG, "Error reading recovery log", e);
+ }
+
+ // Delete everything in RECOVERY_DIR
+ String[] names = RECOVERY_DIR.list();
+ for (int i = 0; names != null && i < names.length; i++) {
+ File f = new File(RECOVERY_DIR, names[i]);
+ if (!f.delete()) {
+ Log.e(TAG, "Can't delete: " + f);
+ } else {
+ Log.i(TAG, "Deleted: " + f);
+ }
+ }
+
+ return log;
+ }
+
+ private void RecoverySystem() { } // Do not instantiate
+}
diff --git a/core/java/android/pim/vcard/VCardComposer.java b/core/java/android/pim/vcard/VCardComposer.java
index 4eaea6a..389c9f4 100644
--- a/core/java/android/pim/vcard/VCardComposer.java
+++ b/core/java/android/pim/vcard/VCardComposer.java
@@ -54,6 +54,7 @@
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
+import java.lang.reflect.Method;
import java.nio.charset.UnsupportedCharsetException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -197,7 +198,7 @@
if (mIsDoCoMo) {
try {
// Create one empty entry.
- mWriter.write(createOneEntryInternal("-1"));
+ mWriter.write(createOneEntryInternal("-1", null));
} catch (IOException e) {
Log.e(LOG_TAG,
"IOException occurred during exportOneContactData: "
@@ -428,6 +429,14 @@
}
public boolean createOneEntry() {
+ return createOneEntry(null);
+ }
+
+ /**
+ * @param getEntityIteratorMethod For Dependency Injection.
+ * @hide just for testing.
+ */
+ public boolean createOneEntry(Method getEntityIteratorMethod) {
if (mCursor == null || mCursor.isAfterLast()) {
mErrorReason = FAILURE_REASON_NOT_INITIALIZED;
return false;
@@ -439,7 +448,8 @@
vcard = createOneCallLogEntryInternal();
} else {
if (mIdColumn >= 0) {
- vcard = createOneEntryInternal(mCursor.getString(mIdColumn));
+ vcard = createOneEntryInternal(mCursor.getString(mIdColumn),
+ getEntityIteratorMethod);
} else {
Log.e(LOG_TAG, "Incorrect mIdColumn: " + mIdColumn);
return true;
@@ -475,7 +485,8 @@
return true;
}
- private String createOneEntryInternal(final String contactId) {
+ private String createOneEntryInternal(final String contactId,
+ Method getEntityIteratorMethod) {
final Map<String, List<ContentValues>> contentValuesListMap =
new HashMap<String, List<ContentValues>>();
// The resolver may return the entity iterator with no data. It is possiible.
@@ -484,13 +495,34 @@
boolean dataExists = false;
EntityIterator entityIterator = null;
try {
- final Uri uri = RawContacts.CONTENT_URI.buildUpon()
- .appendEncodedPath(contactId)
- .appendEncodedPath(RawContacts.Entity.CONTENT_DIRECTORY)
- .appendQueryParameter(Data.FOR_EXPORT_ONLY, "1")
- .build();
- entityIterator = RawContacts.newEntityIterator(mContentResolver.query(
- uri, null, null, null, null));
+
+ if (getEntityIteratorMethod != null) {
+ try {
+ final Uri uri = RawContacts.CONTENT_URI.buildUpon()
+ .appendQueryParameter(Data.FOR_EXPORT_ONLY, "1")
+ .build();
+ final String selection = Data.CONTACT_ID + "=?";
+ final String[] selectionArgs = new String[] {contactId};
+ entityIterator = (EntityIterator)getEntityIteratorMethod.invoke(null,
+ mContentResolver, uri, selection, selectionArgs, null);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else {
+ final Uri uri = RawContacts.CONTENT_URI.buildUpon()
+ .appendEncodedPath(contactId)
+ .appendEncodedPath(RawContacts.Entity.CONTENT_DIRECTORY)
+ .appendQueryParameter(Data.FOR_EXPORT_ONLY, "1")
+ .build();
+ entityIterator = RawContacts.newEntityIterator(mContentResolver.query(
+ uri, null, null, null, null));
+ }
+
+ if (entityIterator == null) {
+ Log.e(LOG_TAG, "EntityIterator is null");
+ return "";
+ }
+
dataExists = entityIterator.hasNext();
while (entityIterator.hasNext()) {
Entity entity = entityIterator.next();
diff --git a/core/java/android/pim/vcard/VCardParser_V21.java b/core/java/android/pim/vcard/VCardParser_V21.java
index e7c19cf..c2928cb 100644
--- a/core/java/android/pim/vcard/VCardParser_V21.java
+++ b/core/java/android/pim/vcard/VCardParser_V21.java
@@ -110,11 +110,11 @@
private long mTimeHandleBase64;
public VCardParser_V21() {
- this(VCardConfig.PARSE_TYPE_UNKNOWN);
+ this(null);
}
public VCardParser_V21(VCardSourceDetector detector) {
- this(detector.getEstimatedType());
+ this(detector != null ? detector.getEstimatedType() : VCardConfig.PARSE_TYPE_UNKNOWN);
}
public VCardParser_V21(int parseType) {
diff --git a/core/java/android/preference/EditTextPreference.java b/core/java/android/preference/EditTextPreference.java
index 84ee950..aa27627 100644
--- a/core/java/android/preference/EditTextPreference.java
+++ b/core/java/android/preference/EditTextPreference.java
@@ -28,7 +28,6 @@
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.EditText;
-import android.widget.LinearLayout;
/**
* A {@link Preference} that allows for string
@@ -128,7 +127,7 @@
ViewGroup container = (ViewGroup) dialogView
.findViewById(com.android.internal.R.id.edittext_container);
if (container != null) {
- container.addView(editText, ViewGroup.LayoutParams.FILL_PARENT,
+ container.addView(editText, ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
}
diff --git a/core/java/android/provider/Calendar.java b/core/java/android/provider/Calendar.java
index b74564a..509aac5 100644
--- a/core/java/android/provider/Calendar.java
+++ b/core/java/android/provider/Calendar.java
@@ -583,14 +583,14 @@
* {@link #ACCOUNT_TYPE} identifies a specific account.
* <P>Type: TEXT</P>
*/
- public static final String ACCOUNT_NAME = "account_name";
+ public static final String ACCOUNT_NAME = "_sync_account";
/**
* The type of account to which this row belongs, which when paired with
* {@link #ACCOUNT_NAME} identifies a specific account.
* <P>Type: TEXT</P>
*/
- public static final String ACCOUNT_TYPE = "account_type";
+ public static final String ACCOUNT_TYPE = "_sync_account_type";
public static EntityIterator newEntityIterator(Cursor cursor, ContentResolver resolver) {
return new EntityIteratorImpl(cursor, resolver);
@@ -1049,58 +1049,39 @@
public static final String MAX_INSTANCE = "maxInstance";
/**
- * The minimum Julian day in the BusyBits table.
+ * The minimum Julian day in the EventDays table.
* <P>Type: INTEGER</P>
*/
- public static final String MIN_BUSYBITS = "minBusyBits";
+ public static final String MIN_EVENTDAYS = "minEventDays";
/**
- * The maximum Julian day in the BusyBits table.
+ * The maximum Julian day in the EventDays table.
* <P>Type: INTEGER</P>
*/
- public static final String MAX_BUSYBITS = "maxBusyBits";
+ public static final String MAX_EVENTDAYS = "maxEventDays";
}
public static final class CalendarMetaData implements CalendarMetaDataColumns {
}
- public interface BusyBitsColumns {
+ public interface EventDaysColumns {
/**
- * The Julian day number.
+ * The Julian starting day number.
* <P>Type: INTEGER (int)</P>
*/
- public static final String DAY = "day";
+ public static final String STARTDAY = "startDay";
+ public static final String ENDDAY = "endDay";
- /**
- * The 24 bits representing the 24 1-hour time slots in a day.
- * If an event in the Instances table overlaps part of a 1-hour
- * time slot then the corresponding bit is set. The first time slot
- * (12am to 1am) is bit 0. The last time slot (11pm to midnight)
- * is bit 23.
- * <P>Type: INTEGER (int)</P>
- */
- public static final String BUSYBITS = "busyBits";
-
- /**
- * The number of all-day events that occur on this day.
- * <P>Type: INTEGER (int)</P>
- */
- public static final String ALL_DAY_COUNT = "allDayCount";
}
- public static final class BusyBits implements BusyBitsColumns {
- public static final Uri CONTENT_URI = Uri.parse("content://calendar/busybits/when");
+ public static final class EventDays implements EventDaysColumns {
+ public static final Uri CONTENT_URI = Uri.parse("content://calendar/instances/groupbyday");
- public static final String[] PROJECTION = { DAY, BUSYBITS, ALL_DAY_COUNT };
-
- // The number of minutes represented by one busy bit
- public static final int MINUTES_PER_BUSY_INTERVAL = 60;
-
- // The number of intervals in a day
- public static final int INTERVALS_PER_DAY = 24 * 60 / MINUTES_PER_BUSY_INTERVAL;
+ public static final String[] PROJECTION = { STARTDAY, ENDDAY };
+ public static final String SELECTION = "selected==1";
/**
- * Retrieves the busy bits for the Julian days starting at "startDay"
+ * Retrieves the days with events for the Julian days starting at "startDay"
* for "numDays".
*
* @param cr the ContentResolver
@@ -1116,8 +1097,8 @@
Uri.Builder builder = CONTENT_URI.buildUpon();
ContentUris.appendId(builder, startDay);
ContentUris.appendId(builder, endDay);
- return cr.query(builder.build(), PROJECTION, null /* selection */,
- null /* selection args */, DAY);
+ return cr.query(builder.build(), PROJECTION, SELECTION,
+ null /* selection args */, STARTDAY);
}
}
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index ac8bf91..7fb9daf 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -23,10 +23,10 @@
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
-import android.content.Intent;
import android.content.CursorEntityIterator;
-import android.content.EntityIterator;
import android.content.Entity;
+import android.content.EntityIterator;
+import android.content.Intent;
import android.content.res.Resources;
import android.database.Cursor;
import android.database.DatabaseUtils;
@@ -53,49 +53,50 @@
* ContactsContract defines an extensible database of contact-related
* information. Contact information is stored in a three-tier data model:
* </p>
- * <blockquote>
- * <p>
+ * <ul>
+ * <li>
* The {@link Data} table contains all kinds of personal data: phone numbers,
* email addresses etc. The list of data kinds that can be stored in this table
* is open-ended. There is a predefined set of common kinds, but any application
* can add its own data kinds.
- * </p>
- * <p>
+ * </li>
+ * <li>
* A row in the {@link RawContacts} table represents a set of Data describing a
- * person and associated with a single account.
- * </p>
- * <p>
+ * person and associated with a single account (for example, a single Gmail
+ * account).
+ * </li>
+ * <li>
* A row in the {@link Contacts} table represents an aggregate of one or more
* RawContacts presumably describing the same person.
- * </p>
- * </blockquote>
+ * </li>
+ * </ul>
* <p>
* Other tables include:
* </p>
- * <blockquote>
- * <p>
+ * <ul>
+ * <li>
* {@link Groups}, which contains information about raw contact groups - the
* current API does not support the notion of groups spanning multiple accounts.
- * </p>
- * <p>
+ * </li>
+ * <li>
* {@link StatusUpdates}, which contains social status updates including IM
* availability.
- * </p>
- * <p>
+ * </li>
+ * <li>
* {@link AggregationExceptions}, which is used for manual aggregation and
* disaggregation of raw contacts
- * </p>
- * <p>
+ * </li>
+ * <li>
* {@link Settings}, which contains visibility and sync settings for accounts
* and groups.
- * </p>
- * <p>
+ * </li>
+ * <li>
* {@link SyncState}, which contains free-form data maintained on behalf of sync
* adapters
- * </p>
- * <p>
- * {@link PhoneLookup}, which is used for quick caller-ID lookup</id>
- * </blockquote>
+ * </li>
+ * <li>
+ * {@link PhoneLookup}, which is used for quick caller-ID lookup</li>
+ * </ul>
*/
@SuppressWarnings("unused")
public final class ContactsContract {
@@ -245,6 +246,9 @@
}
/**
+ * Columns of {@link ContactsContract.Contacts} that track the user's
+ * preferences for, or interactions with, the contact.
+ *
* @see Contacts
* @see RawContacts
* @see ContactsContract.Data
@@ -271,20 +275,25 @@
public static final String STARRED = "starred";
/**
- * A custom ringtone associated with a contact. Not always present.
+ * URI for a custom ringtone associated with the contact. If null or missing,
+ * the default ringtone is used.
* <P>Type: TEXT (URI to the ringtone)</P>
*/
public static final String CUSTOM_RINGTONE = "custom_ringtone";
/**
- * Whether the contact should always be sent to voicemail. Not always
- * present.
+ * Whether the contact should always be sent to voicemail. If missing,
+ * defaults to false.
* <P>Type: INTEGER (0 for false, 1 for true)</P>
*/
public static final String SEND_TO_VOICEMAIL = "send_to_voicemail";
}
/**
+ * Columns of {@link ContactsContract.Contacts} that refer to intrinsic
+ * properties of the contact, as opposed to the user-specified options
+ * found in {@link ContactOptionsColumns}.
+ *
* @see Contacts
* @see ContactsContract.Data
* @see PhoneLookup
@@ -441,6 +450,8 @@
}
/**
+ * Contact name and contact name metadata columns in the RawContacts table.
+ *
* @see Contacts
* @see RawContacts
* @hide
@@ -1616,14 +1627,34 @@
@Deprecated
public static final String PRESENCE_STATUS = PRESENCE;
- /*
- * Presence Status definition
+ /**
+ * An allowed value of {@link #PRESENCE}.
*/
int OFFLINE = 0;
+
+ /**
+ * An allowed value of {@link #PRESENCE}.
+ */
int INVISIBLE = 1;
+
+ /**
+ * An allowed value of {@link #PRESENCE}.
+ */
int AWAY = 2;
+
+ /**
+ * An allowed value of {@link #PRESENCE}.
+ */
int IDLE = 3;
+
+ /**
+ * An allowed value of {@link #PRESENCE}.
+ */
int DO_NOT_DISTURB = 4;
+
+ /**
+ * An allowed value of {@link #PRESENCE}.
+ */
int AVAILABLE = 5;
/**
@@ -1635,6 +1666,7 @@
/**
* @deprecated use {@link #STATUS}
*/
+ @Deprecated
public static final String PRESENCE_CUSTOM_STATUS = STATUS;
/**
@@ -1691,7 +1723,7 @@
public static final String RAW_CONTACT_ID = "raw_contact_id";
/**
- * Whether this is the primary entry of its kind for the raw contact it belongs to
+ * Whether this is the primary entry of its kind for the raw contact it belongs to.
* <P>Type: INTEGER (if set, non-0 means true)</P>
*/
public static final String IS_PRIMARY = "is_primary";
@@ -1740,7 +1772,10 @@
public static final String DATA13 = "data13";
/** Generic data column, the meaning is {@link #MIMETYPE} specific */
public static final String DATA14 = "data14";
- /** Generic data column, the meaning is {@link #MIMETYPE} specific */
+ /**
+ * Generic data column, the meaning is {@link #MIMETYPE} specific. By convention,
+ * this field is used to store BLOBs (binary data).
+ */
public static final String DATA15 = "data15";
/** Generic column for use by sync adapters. */
@@ -1766,23 +1801,28 @@
/**
* <p>
* Constants for the data table, which contains data points tied to a raw
- * contact. For example, a phone number or email address.
+ * contact. Each row of the data table is typically used to store a single
+ * piece of contact
+ * information (such as a phone number) and its
+ * associated metadata (such as whether it is a work or home number).
* </p>
* <h3>Data kinds</h3>
* <p>
- * Data is a generic table that can hold all kinds of data. Sync adapters
- * and applications can introduce their own data kinds. The kind of data
- * stored in a particular row is determined by the mime type in the row.
- * Fields from {@link #DATA1} through {@link #DATA15} are generic columns
- * whose specific use is determined by the kind of data stored in the row.
+ * Data is a generic table that can hold any kind of contact data.
+ * The kind of data stored in a given row is specified by the row's
+ * {@link #MIMETYPE} value, which determines the meaning of the
+ * generic columns {@link #DATA1} through
+ * {@link #DATA15}.
* For example, if the data kind is
- * {@link CommonDataKinds.Phone Phone.CONTENT_ITEM_TYPE}, then DATA1 stores the
+ * {@link CommonDataKinds.Phone Phone.CONTENT_ITEM_TYPE}, then the column
+ * {@link #DATA1} stores the
* phone number, but if the data kind is
- * {@link CommonDataKinds.Email Email.CONTENT_ITEM_TYPE}, then DATA1 stores the
- * email address.
+ * {@link CommonDataKinds.Email Email.CONTENT_ITEM_TYPE}, then {@link #DATA1}
+ * stores the email address.
+ * Sync adapters and applications can introduce their own data kinds.
* </p>
* <p>
- * ContactsContract defines a small number of common data kinds, e.g.
+ * ContactsContract defines a small number of pre-defined data kinds, e.g.
* {@link CommonDataKinds.Phone}, {@link CommonDataKinds.Email} etc. As a
* convenience, these classes define data kind specific aliases for DATA1 etc.
* For example, {@link CommonDataKinds.Phone Phone.NUMBER} is the same as
@@ -1799,8 +1839,8 @@
* By convention, {@link #DATA15} is used for storing BLOBs (binary data).
* </p>
* <p>
- * Typically you should refrain from introducing new kinds of data for 3rd
- * party account types. For example, if you add a data row for
+ * Typically you should refrain from introducing new kinds of data for an other
+ * party's account types. For example, if you add a data row for
* "favorite song" to a raw contact owned by a Google account, it will not
* get synced to the server, because the Google sync adapter does not know
* how to handle this data kind. Thus new data kinds are typically
@@ -1937,6 +1977,10 @@
* </dd>
* </dl>
* <h2>Columns</h2>
+ * <p>
+ * Many columns are available via a {@link Data#CONTENT_URI} query. For best performance you
+ * should explicitly specify a projection to only those columns that you need.
+ * </p>
* <table class="jd-sumtable">
* <tr>
* <th colspan='4'>Data</th>
@@ -1946,7 +1990,7 @@
* <td style="width: 20em;">{@link #_ID}</td>
* <td style="width: 5em;">read-only</td>
* <td>Row ID. Sync adapter should try to preserve row IDs during updates. In other words,
- * it would be a bad idea to delete and reinsert a data rows. A sync adapter should
+ * it would be a bad idea to delete and reinsert a data row. A sync adapter should
* always do an update instead.</td>
* </tr>
* <tr>
@@ -1978,21 +2022,15 @@
* <td>long</td>
* <td>{@link #RAW_CONTACT_ID}</td>
* <td>read/write-once</td>
- * <td>A reference to the {@link RawContacts#_ID} that this data belongs to.</td>
- * </tr>
- * <tr>
- * <td>long</td>
- * <td>{@link #CONTACT_ID}</td>
- * <td>read-only</td>
- * <td>A reference to the {@link ContactsContract.Contacts#_ID} that this data row belongs
- * to. It is obtained through a join with RawContacts.</td>
+ * <td>The id of the row in the {@link RawContacts} table that this data belongs to.</td>
* </tr>
* <tr>
* <td>int</td>
* <td>{@link #IS_PRIMARY}</td>
* <td>read/write</td>
* <td>Whether this is the primary entry of its kind for the raw contact it belongs to.
- * "1" if true, "0" if false.</td>
+ * "1" if true, "0" if false.
+ * </td>
* </tr>
* <tr>
* <td>int</td>
@@ -2000,7 +2038,9 @@
* <td>read/write</td>
* <td>Whether this is the primary entry of its kind for the aggregate
* contact it belongs to. Any data record that is "super primary" must
- * also be "primary".</td>
+ * also be "primary". For example, the super-primary entry may be
+ * interpreted as the default contact value of its kind (for example,
+ * the default phone number to use for the contact).</td>
* </tr>
* <tr>
* <td>int</td>
@@ -2029,7 +2069,19 @@
* {@link #DATA15}
* </td>
* <td>read/write</td>
- * <td>Generic data columns, the meaning is {@link #MIMETYPE} specific.</td>
+ * <td>
+ * <p>
+ * Generic data columns. The meaning of each column is determined by the
+ * {@link #MIMETYPE}. By convention, {@link #DATA15} is used for storing
+ * BLOBs (binary data).
+ * </p>
+ * <p>
+ * Data columns whose meaning is not explicitly defined for a given MIMETYPE
+ * should not be used. There is no guarantee that any sync adapter will
+ * preserve them. Sync adapters themselves should not use such columns either,
+ * but should instead use {@link #SYNC1}-{@link #SYNC4}.
+ * </p>
+ * </td>
* </tr>
* <tr>
* <td>Any type</td>
@@ -2046,6 +2098,10 @@
* </tr>
* </table>
*
+ * <p>
+ * Some columns from the most recent associated status update are also available
+ * through an implicit join.
+ * </p>
* <table class="jd-sumtable">
* <tr>
* <th colspan='4'>Join with {@link StatusUpdates}</th>
@@ -2098,18 +2154,26 @@
* </table>
*
* <p>
- * Columns from the associated raw contact are also available through an
- * implicit join.
+ * Some columns from the associated raw contact are also available through an
+ * implicit join. The other columns are excluded as uninteresting in this
+ * context.
* </p>
*
* <table class="jd-sumtable">
* <tr>
- * <th colspan='4'>Join with {@link RawContacts}</th>
+ * <th colspan='4'>Join with {@link ContactsContract.RawContacts}</th>
* </tr>
* <tr>
- * <td style="width: 7em;">int</td>
- * <td style="width: 20em;">{@link #AGGREGATION_MODE}</td>
+ * <td style="width: 7em;">long</td>
+ * <td style="width: 20em;">{@link #CONTACT_ID}</td>
* <td style="width: 5em;">read-only</td>
+ * <td>The id of the row in the {@link Contacts} table that this data belongs
+ * to.</td>
+ * </tr>
+ * <tr>
+ * <td>int</td>
+ * <td>{@link #AGGREGATION_MODE}</td>
+ * <td>read-only</td>
* <td>See {@link RawContacts}.</td>
* </tr>
* <tr>
@@ -2121,13 +2185,18 @@
* </table>
*
* <p>
- * Columns from the associated aggregated contact are also available through an
- * implicit join.
+ * The ID column for the associated aggregated contact table
+ * {@link ContactsContract.Contacts} is available
+ * via the implicit join to the {@link RawContacts} table, see above.
+ * The remaining columns from this table are also
+ * available, through an implicit join. This
+ * facilitates lookup by
+ * the value of a single data element, such as the email address.
* </p>
*
* <table class="jd-sumtable">
* <tr>
- * <th colspan='4'>Join with {@link Contacts}</th>
+ * <th colspan='4'>Join with {@link ContactsContract.Contacts}</th>
* </tr>
* <tr>
* <td style="width: 7em;">String</td>
@@ -2234,24 +2303,30 @@
private Data() {}
/**
- * The content:// style URI for this table
+ * The content:// style URI for this table, which requests a directory
+ * of data rows matching the selection criteria.
*/
public static final Uri CONTENT_URI = Uri.withAppendedPath(AUTHORITY_URI, "data");
/**
- * The MIME type of {@link #CONTENT_URI} providing a directory of data.
+ * The MIME type of the results from {@link #CONTENT_URI}.
*/
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/data";
/**
+ * <p>
* If {@link #FOR_EXPORT_ONLY} is explicitly set to "1", returned Cursor toward
* Data.CONTENT_URI contains only exportable data.
- *
+ * </p>
+ * <p>
* This flag is useful (currently) only for vCard exporter in Contacts app, which
* needs to exclude "un-exportable" data from available data to export, while
* Contacts app itself has priviledge to access all data including "un-exportable"
* ones and providers return all of them regardless of the callers' intention.
- * <P>Type: INTEGER</p>
+ * </p>
+ * <p>
+ * Type: INTEGER
+ * </p>
*
* @hide Maybe available only in Eclair and not really ready for public use.
* TODO: remove, or implement this feature completely. As of now (Eclair),
@@ -2260,9 +2335,17 @@
public static final String FOR_EXPORT_ONLY = "for_export_only";
/**
+ * <p>
* Build a {@link android.provider.ContactsContract.Contacts#CONTENT_LOOKUP_URI}
* style {@link Uri} for the parent {@link android.provider.ContactsContract.Contacts}
* entry of the given {@link ContactsContract.Data} entry.
+ * </p>
+ * <p>
+ * Returns the Uri for the contact in the first entry returned by
+ * {@link ContentResolver#query(Uri, String[], String, String[], String)}
+ * for the provided {@code dataUri}. If the query returns null or empty
+ * results, silently returns null.
+ * </p>
*/
public static Uri getContactLookupUri(ContentResolver resolver, Uri dataUri) {
final Cursor cursor = resolver.query(dataUri, new String[] {
@@ -2285,7 +2368,7 @@
/**
* <p>
- * Constants for the raw contacts entities table, which can be though of as
+ * Constants for the raw contacts entities table, which can be thought of as
* an outer join of the raw_contacts table with the data table. It is a strictly
* read-only table.
* </p>
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index ae53dbe2..1b938ee 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -96,14 +96,12 @@
/**
* The name of an Intent-extra used to control the UI of a ViewImage.
* This is a boolean property that overrides the activity's default fullscreen state.
- * @hide
*/
public static final String EXTRA_FULL_SCREEN = "android.intent.extra.fullScreen";
/**
* The name of an Intent-extra used to control the UI of a ViewImage.
* This is a boolean property that specifies whether or not to show action icons.
- * @hide
*/
public static final String EXTRA_SHOW_ACTION_ICONS = "android.intent.extra.showActionIcons";
@@ -162,13 +160,11 @@
/**
* Specify the maximum allowed size.
- * @hide
*/
public final static String EXTRA_SIZE_LIMIT = "android.intent.extra.sizeLimit";
/**
* Specify the maximum allowed recording duration in seconds.
- * @hide
*/
public final static String EXTRA_DURATION_LIMIT = "android.intent.extra.durationLimit";
@@ -179,6 +175,13 @@
public final static String EXTRA_OUTPUT = "output";
/**
+ * The string that is used when a media attribute is not known. For example,
+ * if an audio file does not have any meta data, the artist and album columns
+ * will be set to this value.
+ */
+ public static final String UNKNOWN_STRING = "<unknown>";
+
+ /**
* Common fields for most MediaProvider tables
*/
@@ -844,7 +847,6 @@
* The position, in ms, playback was at when playback for this file
* was last stopped.
* <P>Type: INTEGER (long)</P>
- * @hide
*/
public static final String BOOKMARK = "bookmark";
@@ -923,7 +925,6 @@
/**
* Non-zero if the audio file is a podcast
* <P>Type: INTEGER (boolean)</P>
- * @hide
*/
public static final String IS_PODCAST = "is_podcast";
@@ -964,7 +965,7 @@
public static String keyFor(String name) {
if (name != null) {
boolean sortfirst = false;
- if (name.equals(android.media.MediaFile.UNKNOWN_STRING)) {
+ if (name.equals(UNKNOWN_STRING)) {
return "\001";
}
// Check if the first character is \001. We use this to
@@ -1258,7 +1259,6 @@
* @param from The position of the item to move
* @param to The position to move the item to
* @return true on success
- * @hide
*/
public static final boolean moveItem(ContentResolver res,
long playlistId, int from, int to) {
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 09651f1..7db9fdc 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1194,6 +1194,12 @@
public static final String VOLUME_NOTIFICATION = "volume_notification";
/**
+ * Bluetooth Headset volume. This is used internally, changing this value will
+ * not change the volume. See AudioManager.
+ */
+ public static final String VOLUME_BLUETOOTH_SCO = "volume_bluetooth_sco";
+
+ /**
* Whether the notifications should use the ring volume (value of 1) or
* a separate notification volume (value of 0). In most cases, users
* will have this enabled so the notification and ringer volumes will be
@@ -1214,7 +1220,7 @@
*/
public static final String[] VOLUME_SETTINGS = {
VOLUME_VOICE, VOLUME_SYSTEM, VOLUME_RING, VOLUME_MUSIC,
- VOLUME_ALARM, VOLUME_NOTIFICATION
+ VOLUME_ALARM, VOLUME_NOTIFICATION, VOLUME_BLUETOOTH_SCO
};
/**
@@ -1471,12 +1477,14 @@
VOLUME_MUSIC,
VOLUME_ALARM,
VOLUME_NOTIFICATION,
+ VOLUME_BLUETOOTH_SCO,
VOLUME_VOICE + APPEND_FOR_LAST_AUDIBLE,
VOLUME_SYSTEM + APPEND_FOR_LAST_AUDIBLE,
VOLUME_RING + APPEND_FOR_LAST_AUDIBLE,
VOLUME_MUSIC + APPEND_FOR_LAST_AUDIBLE,
VOLUME_ALARM + APPEND_FOR_LAST_AUDIBLE,
VOLUME_NOTIFICATION + APPEND_FOR_LAST_AUDIBLE,
+ VOLUME_BLUETOOTH_SCO + APPEND_FOR_LAST_AUDIBLE,
TEXT_AUTO_REPLACE,
TEXT_AUTO_CAPS,
TEXT_AUTO_PUNCTUATE,
@@ -2444,6 +2452,504 @@
public static final String LAST_SETUP_SHOWN = "last_setup_shown";
/**
+ * How frequently (in seconds) to check the memory status of the
+ * device.
+ * @hide
+ */
+ public static final String MEMCHECK_INTERVAL = "memcheck_interval";
+
+ /**
+ * Max frequency (in seconds) to log memory check stats, in realtime
+ * seconds. This allows for throttling of logs when the device is
+ * running for large amounts of time.
+ * @hide
+ */
+ public static final String MEMCHECK_LOG_REALTIME_INTERVAL =
+ "memcheck_log_realtime_interval";
+
+ /**
+ * Boolean indicating whether rebooting due to system memory checks
+ * is enabled.
+ * @hide
+ */
+ public static final String MEMCHECK_SYSTEM_ENABLED = "memcheck_system_enabled";
+
+ /**
+ * How many bytes the system process must be below to avoid scheduling
+ * a soft reboot. This reboot will happen when it is next determined
+ * to be a good time.
+ * @hide
+ */
+ public static final String MEMCHECK_SYSTEM_SOFT_THRESHOLD = "memcheck_system_soft";
+
+ /**
+ * How many bytes the system process must be below to avoid scheduling
+ * a hard reboot. This reboot will happen immediately.
+ * @hide
+ */
+ public static final String MEMCHECK_SYSTEM_HARD_THRESHOLD = "memcheck_system_hard";
+
+ /**
+ * How many bytes the phone process must be below to avoid scheduling
+ * a soft restart. This restart will happen when it is next determined
+ * to be a good time.
+ * @hide
+ */
+ public static final String MEMCHECK_PHONE_SOFT_THRESHOLD = "memcheck_phone_soft";
+
+ /**
+ * How many bytes the phone process must be below to avoid scheduling
+ * a hard restart. This restart will happen immediately.
+ * @hide
+ */
+ public static final String MEMCHECK_PHONE_HARD_THRESHOLD = "memcheck_phone_hard";
+
+ /**
+ * Boolean indicating whether restarting the phone process due to
+ * memory checks is enabled.
+ * @hide
+ */
+ public static final String MEMCHECK_PHONE_ENABLED = "memcheck_phone_enabled";
+
+ /**
+ * First time during the day it is okay to kill processes
+ * or reboot the device due to low memory situations. This number is
+ * in seconds since midnight.
+ * @hide
+ */
+ public static final String MEMCHECK_EXEC_START_TIME = "memcheck_exec_start_time";
+
+ /**
+ * Last time during the day it is okay to kill processes
+ * or reboot the device due to low memory situations. This number is
+ * in seconds since midnight.
+ * @hide
+ */
+ public static final String MEMCHECK_EXEC_END_TIME = "memcheck_exec_end_time";
+
+ /**
+ * How long the screen must have been off in order to kill processes
+ * or reboot. This number is in seconds. A value of -1 means to
+ * entirely disregard whether the screen is on.
+ * @hide
+ */
+ public static final String MEMCHECK_MIN_SCREEN_OFF = "memcheck_min_screen_off";
+
+ /**
+ * How much time there must be until the next alarm in order to kill processes
+ * or reboot. This number is in seconds. Note: this value must be
+ * smaller than {@link #MEMCHECK_RECHECK_INTERVAL} or else it will
+ * always see an alarm scheduled within its time.
+ * @hide
+ */
+ public static final String MEMCHECK_MIN_ALARM = "memcheck_min_alarm";
+
+ /**
+ * How frequently to check whether it is a good time to restart things,
+ * if the device is in a bad state. This number is in seconds. Note:
+ * this value must be larger than {@link #MEMCHECK_MIN_ALARM} or else
+ * the alarm to schedule the recheck will always appear within the
+ * minimum "do not execute now" time.
+ * @hide
+ */
+ public static final String MEMCHECK_RECHECK_INTERVAL = "memcheck_recheck_interval";
+
+ /**
+ * How frequently (in DAYS) to reboot the device. If 0, no reboots
+ * will occur.
+ * @hide
+ */
+ public static final String REBOOT_INTERVAL = "reboot_interval";
+
+ /**
+ * First time during the day it is okay to force a reboot of the
+ * device (if REBOOT_INTERVAL is set). This number is
+ * in seconds since midnight.
+ * @hide
+ */
+ public static final String REBOOT_START_TIME = "reboot_start_time";
+
+ /**
+ * The window of time (in seconds) after each REBOOT_INTERVAL in which
+ * a reboot can be executed. If 0, a reboot will always be executed at
+ * exactly the given time. Otherwise, it will only be executed if
+ * the device is idle within the window.
+ * @hide
+ */
+ public static final String REBOOT_WINDOW = "reboot_window";
+
+ /**
+ * Threshold values for the duration and level of a discharge cycle, under
+ * which we log discharge cycle info.
+ * @hide
+ */
+ public static final String BATTERY_DISCHARGE_DURATION_THRESHOLD =
+ "battery_discharge_duration_threshold";
+ /** @hide */
+ public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold";
+
+ /**
+ * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR intents
+ * on application crashes and ANRs. If this is disabled, the crash/ANR dialog
+ * will never display the "Report" button.
+ * Type: int ( 0 = disallow, 1 = allow )
+ * @hide
+ */
+ public static final String SEND_ACTION_APP_ERROR = "send_action_app_error";
+
+ /**
+ * Nonzero causes Log.wtf() to crash.
+ * @hide
+ */
+ public static final String WTF_IS_FATAL = "wtf_is_fatal";
+
+ /**
+ * Maximum age of entries kept by {@link android.os.IDropBox}.
+ * @hide
+ */
+ public static final String DROPBOX_AGE_SECONDS =
+ "dropbox_age_seconds";
+ /**
+ * Maximum amount of disk space used by {@link android.os.IDropBox} no matter what.
+ * @hide
+ */
+ public static final String DROPBOX_QUOTA_KB =
+ "dropbox_quota_kb";
+ /**
+ * Percent of free disk (excluding reserve) which {@link android.os.IDropBox} will use.
+ * @hide
+ */
+ public static final String DROPBOX_QUOTA_PERCENT =
+ "dropbox_quota_percent";
+ /**
+ * Percent of total disk which {@link android.os.IDropBox} will never dip into.
+ * @hide
+ */
+ public static final String DROPBOX_RESERVE_PERCENT =
+ "dropbox_reserve_percent";
+ /**
+ * Prefix for per-tag dropbox disable/enable settings.
+ * @hide
+ */
+ public static final String DROPBOX_TAG_PREFIX =
+ "dropbox:";
+
+
+ /**
+ * Screen timeout in milliseconds corresponding to the
+ * PowerManager's POKE_LOCK_SHORT_TIMEOUT flag (i.e. the fastest
+ * possible screen timeout behavior.)
+ * @hide
+ */
+ public static final String SHORT_KEYLIGHT_DELAY_MS =
+ "short_keylight_delay_ms";
+
+ /**
+ * The interval in minutes after which the amount of free storage left on the
+ * device is logged to the event log
+ * @hide
+ */
+ public static final String SYS_FREE_STORAGE_LOG_INTERVAL =
+ "sys_free_storage_log_interval";
+
+ /**
+ * Threshold for the amount of change in disk free space required to report the amount of
+ * free space. Used to prevent spamming the logs when the disk free space isn't changing
+ * frequently.
+ * @hide
+ */
+ public static final String DISK_FREE_CHANGE_REPORTING_THRESHOLD =
+ "disk_free_change_reporting_threshold";
+
+
+ /**
+ * Minimum percentage of free storage on the device that is used to determine if
+ * the device is running low on storage.
+ * Say this value is set to 10, the device is considered running low on storage
+ * if 90% or more of the device storage is filled up.
+ * @hide
+ */
+ public static final String SYS_STORAGE_THRESHOLD_PERCENTAGE =
+ "sys_storage_threshold_percentage";
+
+ /**
+ * The interval in milliseconds after which Wi-Fi is considered idle.
+ * When idle, it is possible for the device to be switched from Wi-Fi to
+ * the mobile data network.
+ * @hide
+ */
+ public static final String WIFI_IDLE_MS = "wifi_idle_ms";
+
+ /**
+ * The interval in milliseconds at which to check packet counts on the
+ * mobile data interface when screen is on, to detect possible data
+ * connection problems.
+ * @hide
+ */
+ public static final String PDP_WATCHDOG_POLL_INTERVAL_MS =
+ "pdp_watchdog_poll_interval_ms";
+
+ /**
+ * The interval in milliseconds at which to check packet counts on the
+ * mobile data interface when screen is off, to detect possible data
+ * connection problems.
+ * @hide
+ */
+ public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS =
+ "pdp_watchdog_long_poll_interval_ms";
+
+ /**
+ * The interval in milliseconds at which to check packet counts on the
+ * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT}
+ * outgoing packets has been reached without incoming packets.
+ * @hide
+ */
+ public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS =
+ "pdp_watchdog_error_poll_interval_ms";
+
+ /**
+ * The number of outgoing packets sent without seeing an incoming packet
+ * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT}
+ * device is logged to the event log
+ * @hide
+ */
+ public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT =
+ "pdp_watchdog_trigger_packet_count";
+
+ /**
+ * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS})
+ * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before
+ * attempting data connection recovery.
+ * @hide
+ */
+ public static final String PDP_WATCHDOG_ERROR_POLL_COUNT =
+ "pdp_watchdog_error_poll_count";
+
+ /**
+ * The number of failed PDP reset attempts before moving to something more
+ * drastic: re-registering to the network.
+ * @hide
+ */
+ public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT =
+ "pdp_watchdog_max_pdp_reset_fail_count";
+
+ /**
+ * Address to ping as a last sanity check before attempting any recovery.
+ * Unset or set to "0.0.0.0" to skip this check.
+ * @hide
+ */
+ public static final String PDP_WATCHDOG_PING_ADDRESS = "pdp_watchdog_ping_address";
+
+ /**
+ * The "-w deadline" parameter for the ping, ie, the max time in
+ * seconds to spend pinging.
+ * @hide
+ */
+ public static final String PDP_WATCHDOG_PING_DEADLINE = "pdp_watchdog_ping_deadline";
+
+ /**
+ * The interval in milliseconds at which to check gprs registration
+ * after the first registration mismatch of gprs and voice service,
+ * to detect possible data network registration problems.
+ *
+ * @hide
+ */
+ public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
+ "gprs_register_check_period_ms";
+
+ /**
+ * The length of time in milli-seconds that automatic small adjustments to
+ * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
+ * @hide
+ */
+ public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
+
+ /**
+ * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
+ * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
+ * exceeded.
+ * @hide
+ */
+ public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
+
+ /**
+ * The maximum reconnect delay for short network outages or when the network is suspended
+ * due to phone use.
+ * @hide
+ */
+ public static final String SYNC_MAX_RETRY_DELAY_IN_SECONDS =
+ "sync_max_retry_delay_in_seconds";
+
+ /**
+ * The interval in milliseconds at which to check the number of SMS sent
+ * out without asking for use permit, to limit the un-authorized SMS
+ * usage.
+ * @hide
+ */
+ public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
+ "sms_outgoing_check_interval_ms";
+
+ /**
+ * The number of outgoing SMS sent without asking for user permit
+ * (of {@link #SMS_OUTGOING_CHECK_INTERVAL_MS}
+ * @hide
+ */
+ public static final String SMS_OUTGOING_CHECK_MAX_COUNT =
+ "sms_outgoing_check_max_count";
+
+ /**
+ * Enable use of ssl session caching.
+ * 'db' - save each session in a (per process) database
+ * 'file' - save each session in a (per process) file
+ * not set or any other value - normal java in-memory caching
+ * @hide
+ */
+ public static final String SSL_SESSION_CACHE = "ssl_session_cache";
+
+ /**
+ * How many bytes long a message has to be, in order to be gzipped.
+ * @hide
+ */
+ public static final String SYNC_MIN_GZIP_BYTES =
+ "sync_min_gzip_bytes";
+
+ /**
+ * The number of promoted sources in GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources";
+ /**
+ * The maximum number of suggestions returned by GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display";
+ /**
+ * The number of suggestions GlobalSearch will ask each non-web search source for.
+ * @hide
+ */
+ public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source";
+ /**
+ * The number of suggestions the GlobalSearch will ask the web search source for.
+ * @hide
+ */
+ public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT =
+ "search_web_results_override_limit";
+ /**
+ * The number of milliseconds that GlobalSearch will wait for suggestions from
+ * promoted sources before continuing with all other sources.
+ * @hide
+ */
+ public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS =
+ "search_promoted_source_deadline_millis";
+ /**
+ * The number of milliseconds before GlobalSearch aborts search suggesiton queries.
+ * @hide
+ */
+ public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis";
+ /**
+ * The maximum number of milliseconds that GlobalSearch shows the previous results
+ * after receiving a new query.
+ * @hide
+ */
+ public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis";
+ /**
+ * The maximum age of log data used for shortcuts in GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis";
+ /**
+ * The maximum age of log data used for source ranking in GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS =
+ "search_max_source_event_age_millis";
+ /**
+ * The minimum number of impressions needed to rank a source in GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING =
+ "search_min_impressions_for_source_ranking";
+ /**
+ * The minimum number of clicks needed to rank a source in GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING =
+ "search_min_clicks_for_source_ranking";
+ /**
+ * The maximum number of shortcuts shown by GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned";
+ /**
+ * The size of the core thread pool for suggestion queries in GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE =
+ "search_query_thread_core_pool_size";
+ /**
+ * The maximum size of the thread pool for suggestion queries in GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE =
+ "search_query_thread_max_pool_size";
+ /**
+ * The size of the core thread pool for shortcut refreshing in GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE =
+ "search_shortcut_refresh_core_pool_size";
+ /**
+ * The maximum size of the thread pool for shortcut refreshing in GlobalSearch.
+ * @hide
+ */
+ public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE =
+ "search_shortcut_refresh_max_pool_size";
+ /**
+ * The maximun time that excess threads in the GlobalSeach thread pools will
+ * wait before terminating.
+ * @hide
+ */
+ public static final String SEARCH_THREAD_KEEPALIVE_SECONDS =
+ "search_thread_keepalive_seconds";
+ /**
+ * The maximum number of concurrent suggestion queries to each source.
+ * @hide
+ */
+ public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT =
+ "search_per_source_concurrent_query_limit";
+
+ /**
+ * Whether or not alert sounds are played on MountService events. (0 = false, 1 = true)
+ * @hide
+ */
+ public static final String MOUNT_PLAY_NOTIFICATION_SND = "mount_play_not_snd";
+
+ /**
+ * Whether or not UMS auto-starts on UMS host detection. (0 = false, 1 = true)
+ * @hide
+ */
+ public static final String MOUNT_UMS_AUTOSTART = "mount_ums_autostart";
+
+ /**
+ * Whether or not a notification is displayed on UMS host detection. (0 = false, 1 = true)
+ * @hide
+ */
+ public static final String MOUNT_UMS_PROMPT = "mount_ums_prompt";
+
+ /**
+ * Whether or not a notification is displayed while UMS is enabled. (0 = false, 1 = true)
+ * @hide
+ */
+ public static final String MOUNT_UMS_NOTIFY_ENABLED = "mount_ums_notify_enabled";
+
+ /**
+ * If nonzero, ANRs in invisible background processes bring up a dialog.
+ * Otherwise, the process will be silently killed.
+ * @hide
+ */
+ public static final String ANR_SHOW_BACKGROUND = "anr_show_background";
+
+ /**
* @hide
*/
public static final String[] SETTINGS_TO_BACKUP = {
@@ -2464,6 +2970,10 @@
WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
WIFI_NUM_ALLOWED_CHANNELS,
WIFI_NUM_OPEN_NETWORKS_KEPT,
+ MOUNT_PLAY_NOTIFICATION_SND,
+ MOUNT_UMS_AUTOSTART,
+ MOUNT_UMS_PROMPT,
+ MOUNT_UMS_NOTIFY_ENABLED
};
/**
@@ -2508,1254 +3018,6 @@
}
/**
- * Gservices settings, containing the network names for Google's
- * various services. This table holds simple name/addr pairs.
- * Addresses can be accessed through the getString() method.
- *
- * TODO: This should move to partner/google/... somewhere.
- *
- * @hide
- */
- public static final class Gservices extends NameValueTable {
- public static final String SYS_PROP_SETTING_VERSION = "sys.settings_gservices_version";
-
- /**
- * Intent action broadcast when the Gservices table is updated by the server.
- * This is broadcast once after settings change (so many values may have been updated).
- */
- @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String CHANGED_ACTION =
- "com.google.gservices.intent.action.GSERVICES_CHANGED";
-
- /**
- * Intent action to override Gservices for testing. (Requires WRITE_GSERVICES permission.)
- */
- @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String OVERRIDE_ACTION =
- "com.google.gservices.intent.action.GSERVICES_OVERRIDE";
-
- /**
- * Intent action to set Gservices with new values. (Requires WRITE_GSERVICES permission.)
- */
- @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String UPDATE_ACTION =
- "com.google.gservices.intent.action.GSERVICES_UPDATE";
-
- private static volatile NameValueCache mNameValueCache = null;
- private static final Object mNameValueCacheLock = new Object();
-
- /**
- * Look up a name in the database.
- * @param resolver to access the database with
- * @param name to look up in the table
- * @return the corresponding value, or null if not present
- */
- public static String getString(ContentResolver resolver, String name) {
- synchronized (mNameValueCacheLock) {
- if (mNameValueCache == null) {
- mNameValueCache = new NameValueCache(SYS_PROP_SETTING_VERSION, CONTENT_URI);
- }
- return mNameValueCache.getString(resolver, name);
- }
- }
-
- /**
- * Store a name/value pair into the database.
- * @param resolver to access the database with
- * @param name to store
- * @param value to associate with the name
- * @return true if the value was set, false on database errors
- */
- public static boolean putString(ContentResolver resolver,
- String name, String value) {
- return putString(resolver, CONTENT_URI, name, value);
- }
-
- /**
- * Look up the value for name in the database, convert it to an int using Integer.parseInt
- * and return it. If it is null or if a NumberFormatException is caught during the
- * conversion then return defValue.
- */
- public static int getInt(ContentResolver resolver, String name, int defValue) {
- String valString = getString(resolver, name);
- int value;
- try {
- value = valString != null ? Integer.parseInt(valString) : defValue;
- } catch (NumberFormatException e) {
- value = defValue;
- }
- return value;
- }
-
- /**
- * Look up the value for name in the database, convert it to a long using Long.parseLong
- * and return it. If it is null or if a NumberFormatException is caught during the
- * conversion then return defValue.
- */
- public static long getLong(ContentResolver resolver, String name, long defValue) {
- String valString = getString(resolver, name);
- long value;
- try {
- value = valString != null ? Long.parseLong(valString) : defValue;
- } catch (NumberFormatException e) {
- value = defValue;
- }
- return value;
- }
-
- /**
- * Construct the content URI for a particular name/value pair,
- * useful for monitoring changes with a ContentObserver.
- * @param name to look up in the table
- * @return the corresponding content URI, or null if not present
- */
- public static Uri getUriFor(String name) {
- return getUriFor(CONTENT_URI, name);
- }
-
- /**
- * The content:// style URL for this table
- */
- public static final Uri CONTENT_URI =
- Uri.parse("content://" + AUTHORITY + "/gservices");
-
- /**
- * MMS - URL to use for HTTP "x-wap-profile" header
- */
- public static final String MMS_X_WAP_PROFILE_URL
- = "mms_x_wap_profile_url";
-
- /**
- * YouTube - the flag to indicate whether to use proxy
- */
- public static final String YOUTUBE_USE_PROXY
- = "youtube_use_proxy";
-
- /**
- * MMS - maximum message size in bytes for a MMS message.
- */
- public static final String MMS_MAXIMUM_MESSAGE_SIZE
- = "mms_maximum_message_size";
-
- /**
- * Event tags from the kernel event log to upload during checkin.
- */
- public static final String CHECKIN_EVENTS = "checkin_events";
-
- /**
- * Comma-separated list of service names to dump and upload during checkin.
- */
- public static final String CHECKIN_DUMPSYS_LIST = "checkin_dumpsys_list";
-
- /**
- * Comma-separated list of packages to specify for each service that is
- * dumped (currently only meaningful for user activity).
- */
- public static final String CHECKIN_PACKAGE_LIST = "checkin_package_list";
-
- /**
- * The interval (in seconds) between periodic checkin attempts.
- */
- public static final String CHECKIN_INTERVAL = "checkin_interval";
-
- /**
- * The interval (in seconds) between event log aggregation runs.
- */
- public static final String AGGREGATION_INTERVAL_SECONDS = "aggregation_interval_seconds";
-
- /**
- * Boolean indicating if the market app should force market only checkins on
- * install/uninstall. Any non-0 value is considered true.
- */
- public static final String MARKET_FORCE_CHECKIN = "market_force_checkin";
-
- /**
- * How frequently (in seconds) to check the memory status of the
- * device.
- */
- public static final String MEMCHECK_INTERVAL = "memcheck_interval";
-
- /**
- * Max frequency (in seconds) to log memory check stats, in realtime
- * seconds. This allows for throttling of logs when the device is
- * running for large amounts of time.
- */
- public static final String MEMCHECK_LOG_REALTIME_INTERVAL =
- "memcheck_log_realtime_interval";
-
- /**
- * Boolean indicating whether rebooting due to system memory checks
- * is enabled.
- */
- public static final String MEMCHECK_SYSTEM_ENABLED = "memcheck_system_enabled";
-
- /**
- * How many bytes the system process must be below to avoid scheduling
- * a soft reboot. This reboot will happen when it is next determined
- * to be a good time.
- */
- public static final String MEMCHECK_SYSTEM_SOFT_THRESHOLD = "memcheck_system_soft";
-
- /**
- * How many bytes the system process must be below to avoid scheduling
- * a hard reboot. This reboot will happen immediately.
- */
- public static final String MEMCHECK_SYSTEM_HARD_THRESHOLD = "memcheck_system_hard";
-
- /**
- * How many bytes the phone process must be below to avoid scheduling
- * a soft restart. This restart will happen when it is next determined
- * to be a good time.
- */
- public static final String MEMCHECK_PHONE_SOFT_THRESHOLD = "memcheck_phone_soft";
-
- /**
- * How many bytes the phone process must be below to avoid scheduling
- * a hard restart. This restart will happen immediately.
- */
- public static final String MEMCHECK_PHONE_HARD_THRESHOLD = "memcheck_phone_hard";
-
- /**
- * Boolean indicating whether restarting the phone process due to
- * memory checks is enabled.
- */
- public static final String MEMCHECK_PHONE_ENABLED = "memcheck_phone_enabled";
-
- /**
- * First time during the day it is okay to kill processes
- * or reboot the device due to low memory situations. This number is
- * in seconds since midnight.
- */
- public static final String MEMCHECK_EXEC_START_TIME = "memcheck_exec_start_time";
-
- /**
- * Last time during the day it is okay to kill processes
- * or reboot the device due to low memory situations. This number is
- * in seconds since midnight.
- */
- public static final String MEMCHECK_EXEC_END_TIME = "memcheck_exec_end_time";
-
- /**
- * How long the screen must have been off in order to kill processes
- * or reboot. This number is in seconds. A value of -1 means to
- * entirely disregard whether the screen is on.
- */
- public static final String MEMCHECK_MIN_SCREEN_OFF = "memcheck_min_screen_off";
-
- /**
- * How much time there must be until the next alarm in order to kill processes
- * or reboot. This number is in seconds. Note: this value must be
- * smaller than {@link #MEMCHECK_RECHECK_INTERVAL} or else it will
- * always see an alarm scheduled within its time.
- */
- public static final String MEMCHECK_MIN_ALARM = "memcheck_min_alarm";
-
- /**
- * How frequently to check whether it is a good time to restart things,
- * if the device is in a bad state. This number is in seconds. Note:
- * this value must be larger than {@link #MEMCHECK_MIN_ALARM} or else
- * the alarm to schedule the recheck will always appear within the
- * minimum "do not execute now" time.
- */
- public static final String MEMCHECK_RECHECK_INTERVAL = "memcheck_recheck_interval";
-
- /**
- * How frequently (in DAYS) to reboot the device. If 0, no reboots
- * will occur.
- */
- public static final String REBOOT_INTERVAL = "reboot_interval";
-
- /**
- * First time during the day it is okay to force a reboot of the
- * device (if REBOOT_INTERVAL is set). This number is
- * in seconds since midnight.
- */
- public static final String REBOOT_START_TIME = "reboot_start_time";
-
- /**
- * The window of time (in seconds) after each REBOOT_INTERVAL in which
- * a reboot can be executed. If 0, a reboot will always be executed at
- * exactly the given time. Otherwise, it will only be executed if
- * the device is idle within the window.
- */
- public static final String REBOOT_WINDOW = "reboot_window";
-
- /**
- * The minimum version of the server that is required in order for the device to accept
- * the server's recommendations about the initial sync settings to use. When this is unset,
- * blank or can't be interpreted as an integer then we will not ask the server for a
- * recommendation.
- */
- public static final String GMAIL_CONFIG_INFO_MIN_SERVER_VERSION =
- "gmail_config_info_min_server_version";
-
- /**
- * Controls whether Gmail offers a preview button for images.
- */
- public static final String GMAIL_DISALLOW_IMAGE_PREVIEWS = "gmail_disallow_image_previews";
-
- /**
- * The maximal size in bytes allowed for attachments when composing messages in Gmail
- */
- public static final String GMAIL_MAX_ATTACHMENT_SIZE = "gmail_max_attachment_size_bytes";
-
- /**
- * The timeout in milliseconds that Gmail uses when opening a connection and reading
- * from it. A missing value or a value of -1 instructs Gmail to use the defaults provided
- * by GoogleHttpClient.
- */
- public static final String GMAIL_TIMEOUT_MS = "gmail_timeout_ms";
-
- /**
- * Controls whether Gmail will request an expedited sync when a message is sent. Value must
- * be an integer where non-zero means true. Defaults to 1.
- */
- public static final String GMAIL_SEND_IMMEDIATELY = "gmail_send_immediately";
-
- /**
- * Controls whether gmail buffers server responses. Possible values are "memory", for a
- * memory-based buffer, or "file", for a temp-file-based buffer. All other values
- * (including not set) disable buffering.
- */
- public static final String GMAIL_BUFFER_SERVER_RESPONSE = "gmail_buffer_server_response";
-
- /**
- * The maximum size in bytes allowed for the provider to gzip a protocol buffer uploaded to
- * the server.
- */
- public static final String GMAIL_MAX_GZIP_SIZE = "gmail_max_gzip_size_bytes";
-
- /**
- * Controls whether Gmail will discard uphill operations that repeatedly fail. Value must be
- * an integer where non-zero means true. Defaults to 1. This flag controls Donut devices.
- */
- public static final String GMAIL_DISCARD_ERROR_UPHILL_OP = "gmail_discard_error_uphill_op";
-
- /**
- * Controls whether Gmail will discard uphill operations that repeatedly fail. Value must be
- * an integer where non-zero means true. Defaults to 1. This flag controls Eclair and
- * future devices.
- */
- public static final String GMAIL_DISCARD_ERROR_UPHILL_OP_NEW =
- "gmail_discard_error_uphill_op_new";
-
- /**
- * Controls how many attempts Gmail will try to upload an uphill operations before it
- * abandons the operation. Defaults to 20.
- */
- public static final String GMAIL_NUM_RETRY_UPHILL_OP = "gmail_num_retry_uphill_op";
-
- /**
- * How much time in seconds Gmail will try to upload an uphill operations before it
- * abandons the operation. Defaults to 36400 (one day).
- */
- public static final String GMAIL_WAIT_TIME_RETRY_UPHILL_OP =
- "gmail_wait_time_retry_uphill_op";
-
- /**
- * Controls if Gmail should delay sending operations that have previously failed.
- */
- public static final String GMAIL_DELAY_BAD_OP = "gmail_delay_bad_op";
-
- /**
- * Controls if the protocol buffer version of the protocol will use a multipart request for
- * attachment uploads. Value must be an integer where non-zero means true. Defaults to 0.
- */
- public static final String GMAIL_USE_MULTIPART_PROTOBUF = "gmail_use_multipart_protobuf";
-
- /**
- * the transcoder URL for mobile devices.
- */
- public static final String TRANSCODER_URL = "mobile_transcoder_url";
-
- /**
- * URL that points to the privacy terms of the Google Talk service.
- */
- public static final String GTALK_TERMS_OF_SERVICE_URL = "gtalk_terms_of_service_url";
-
- /**
- * Hostname of the GTalk server.
- */
- public static final String GTALK_SERVICE_HOSTNAME = "gtalk_hostname";
-
- /**
- * Secure port of the GTalk server.
- */
- public static final String GTALK_SERVICE_SECURE_PORT = "gtalk_secure_port";
-
- /**
- * The server configurable RMQ acking interval
- */
- public static final String GTALK_SERVICE_RMQ_ACK_INTERVAL = "gtalk_rmq_ack_interval";
-
- /**
- * The minimum reconnect delay for short network outages or when the network is suspended
- * due to phone use.
- */
- public static final String GTALK_SERVICE_MIN_RECONNECT_DELAY_SHORT =
- "gtalk_min_reconnect_delay_short";
-
- /**
- * The reconnect variant range for short network outages or when the network is suspended
- * due to phone use. A random number between 0 and this constant is computed and
- * added to {@link #GTALK_SERVICE_MIN_RECONNECT_DELAY_SHORT} to form the initial reconnect
- * delay.
- */
- public static final String GTALK_SERVICE_RECONNECT_VARIANT_SHORT =
- "gtalk_reconnect_variant_short";
-
- /**
- * The minimum reconnect delay for long network outages
- */
- public static final String GTALK_SERVICE_MIN_RECONNECT_DELAY_LONG =
- "gtalk_min_reconnect_delay_long";
-
- /**
- * The reconnect variant range for long network outages. A random number between 0 and this
- * constant is computed and added to {@link #GTALK_SERVICE_MIN_RECONNECT_DELAY_LONG} to
- * form the initial reconnect delay.
- */
- public static final String GTALK_SERVICE_RECONNECT_VARIANT_LONG =
- "gtalk_reconnect_variant_long";
-
- /**
- * The maximum reconnect delay time, in milliseconds.
- */
- public static final String GTALK_SERVICE_MAX_RECONNECT_DELAY =
- "gtalk_max_reconnect_delay";
-
- /**
- * The network downtime that is considered "short" for the above calculations,
- * in milliseconds.
- */
- public static final String GTALK_SERVICE_SHORT_NETWORK_DOWNTIME =
- "gtalk_short_network_downtime";
-
- /**
- * How frequently we send heartbeat pings to the GTalk server. Receiving a server packet
- * will reset the heartbeat timer. The away heartbeat should be used when the user is
- * logged into the GTalk app, but not actively using it.
- */
- public static final String GTALK_SERVICE_AWAY_HEARTBEAT_INTERVAL_MS =
- "gtalk_heartbeat_ping_interval_ms"; // keep the string backward compatible
-
- /**
- * How frequently we send heartbeat pings to the GTalk server. Receiving a server packet
- * will reset the heartbeat timer. The active heartbeat should be used when the user is
- * actively using the GTalk app.
- */
- public static final String GTALK_SERVICE_ACTIVE_HEARTBEAT_INTERVAL_MS =
- "gtalk_active_heartbeat_ping_interval_ms";
-
- /**
- * How frequently we send heartbeat pings to the GTalk server. Receiving a server packet
- * will reset the heartbeat timer. The sync heartbeat should be used when the user isn't
- * logged into the GTalk app, but auto-sync is enabled.
- */
- public static final String GTALK_SERVICE_SYNC_HEARTBEAT_INTERVAL_MS =
- "gtalk_sync_heartbeat_ping_interval_ms";
-
- /**
- * How frequently we send heartbeat pings to the GTalk server. Receiving a server packet
- * will reset the heartbeat timer. The no sync heartbeat should be used when the user isn't
- * logged into the GTalk app, and auto-sync is not enabled.
- */
- public static final String GTALK_SERVICE_NOSYNC_HEARTBEAT_INTERVAL_MS =
- "gtalk_nosync_heartbeat_ping_interval_ms";
-
- /**
- * The maximum heartbeat interval used while on the WIFI network.
- */
- public static final String GTALK_SERVICE_WIFI_MAX_HEARTBEAT_INTERVAL_MS =
- "gtalk_wifi_max_heartbeat_ping_interval_ms";
-
- /**
- * How long we wait to receive a heartbeat ping acknowledgement (or another packet)
- * from the GTalk server, before deeming the connection dead.
- */
- public static final String GTALK_SERVICE_HEARTBEAT_ACK_TIMEOUT_MS =
- "gtalk_heartbeat_ack_timeout_ms";
-
- /**
- * How long after screen is turned off before we consider the user to be idle.
- */
- public static final String GTALK_SERVICE_IDLE_TIMEOUT_MS =
- "gtalk_idle_timeout_ms";
-
- /**
- * By default, GTalkService will always connect to the server regardless of the auto-sync
- * setting. However, if this parameter is true, then GTalkService will only connect
- * if auto-sync is enabled. Using the GTalk app will trigger the connection too.
- */
- public static final String GTALK_SERVICE_CONNECT_ON_AUTO_SYNC =
- "gtalk_connect_on_auto_sync";
-
- /**
- * GTalkService holds a wakelock while broadcasting the intent for data message received.
- * It then automatically release the wakelock after a timeout. This setting controls what
- * the timeout should be.
- */
- public static final String GTALK_DATA_MESSAGE_WAKELOCK_MS =
- "gtalk_data_message_wakelock_ms";
-
- /**
- * The socket read timeout used to control how long ssl handshake wait for reads before
- * timing out. This is needed so the ssl handshake doesn't hang for a long time in some
- * circumstances.
- */
- public static final String GTALK_SSL_HANDSHAKE_TIMEOUT_MS =
- "gtalk_ssl_handshake_timeout_ms";
-
- /**
- * Compress the gtalk stream.
- */
- public static final String GTALK_COMPRESS = "gtalk_compress";
-
- /**
- * This is the timeout for which Google Talk will send the message using bareJID. In a
- * established chat between two XMPP endpoints, Google Talk uses fullJID in the format
- * of user@domain/resource in order to send the message to the specific client. However,
- * if Google Talk hasn't received a message from that client after some time, it would
- * fall back to use the bareJID, which would broadcast the message to all clients for
- * the other user.
- */
- public static final String GTALK_USE_BARE_JID_TIMEOUT_MS = "gtalk_use_barejid_timeout_ms";
-
- /**
- * This is the threshold of retry number when there is an authentication expired failure
- * for Google Talk. In some situation, e.g. when a Google Apps account is disabled chat
- * service, the connection keeps failing. This threshold controls when we should stop
- * the retrying.
- */
- public static final String GTALK_MAX_RETRIES_FOR_AUTH_EXPIRED =
- "gtalk_max_retries_for_auth_expired";
-
- /**
- * a boolean setting indicating whether the GTalkService should use RMQ2 protocol or not.
- */
- public static final String GTALK_USE_RMQ2_PROTOCOL =
- "gtalk_use_rmq2";
-
- /**
- * a boolean setting indicating whether the GTalkService should support both RMQ and
- * RMQ2 protocols. This setting is true for the transitional period when we need to
- * support both protocols.
- */
- public static final String GTALK_SUPPORT_RMQ_AND_RMQ2_PROTOCOLS =
- "gtalk_support_rmq_and_rmq2";
-
- /**
- * a boolean setting controlling whether the rmq2 protocol will include stream ids in
- * the protobufs. This is used for debugging.
- */
- public static final String GTALK_RMQ2_INCLUDE_STREAM_ID =
- "gtalk_rmq2_include_stream_id";
-
- /**
- * when receiving a chat message from the server, the message could be an older message
- * whose "time sent" is x seconds from now. If x is significant enough, we want to flag
- * it so the UI can give it some special treatment when displaying the "time sent" for
- * it. This setting is to control what x is.
- */
- public static final String GTALK_OLD_CHAT_MESSAGE_THRESHOLD_IN_SEC =
- "gtalk_old_chat_msg_threshold_in_sec";
-
- /**
- * a setting to control the max connection history record GTalkService stores.
- */
- public static final String GTALK_MAX_CONNECTION_HISTORY_RECORDS =
- "gtalk_max_conn_history_records";
-
- /**
- * This is gdata url to lookup album and picture info from picasa web. It also controls
- * whether url scraping for picasa is enabled (NULL to disable).
- */
- public static final String GTALK_PICASA_ALBUM_URL =
- "gtalk_picasa_album_url";
-
- /**
- * This is the url to lookup picture info from flickr. It also controls
- * whether url scraping for flickr is enabled (NULL to disable).
- */
- public static final String GTALK_FLICKR_PHOTO_INFO_URL =
- "gtalk_flickr_photo_info_url";
-
- /**
- * This is the url to lookup an actual picture from flickr.
- */
- public static final String GTALK_FLICKR_PHOTO_URL =
- "gtalk_flickr_photo_url";
-
- /**
- * This is the gdata url to lookup info on a youtube video. It also controls
- * whether url scraping for youtube is enabled (NULL to disable).
- */
- public static final String GTALK_YOUTUBE_VIDEO_URL =
- "gtalk_youtube_video_url";
-
- /**
- * Enable/disable GTalk URL scraping for JPG images ("true" to enable).
- */
- public static final String GTALK_URL_SCRAPING_FOR_JPG =
- "gtalk_url_scraping_for_jpg";
-
- /**
- * Chat message lifetime (for pruning old chat messages).
- */
- public static final String GTALK_CHAT_MESSAGE_LIFETIME =
- "gtalk_chat_message_lifetime";
-
- /**
- * OTR message lifetime (for pruning old otr messages).
- */
- public static final String GTALK_OTR_MESSAGE_LIFETIME =
- "gtalk_otr_message_lifetime";
-
- /**
- * Chat expiration time, i.e., time since last message in the chat (for pruning old chats).
- */
- public static final String GTALK_CHAT_EXPIRATION_TIME =
- "gtalk_chat_expiration_time";
-
- /**
- * This is the url for getting the app token for server-to-device push messaging.
- */
- public static final String PUSH_MESSAGING_REGISTRATION_URL =
- "push_messaging_registration_url";
-
- /**
- * Use android://<it> routing infos for Google Sync Server subcriptions.
- */
- public static final String GSYNC_USE_RMQ2_ROUTING_INFO = "gsync_use_rmq2_routing_info";
-
- /**
- * Enable use of ssl session caching.
- * 'db' - save each session in a (per process) database
- * 'file' - save each session in a (per process) file
- * not set or any other value - normal java in-memory caching
- */
- public static final String SSL_SESSION_CACHE = "ssl_session_cache";
-
- /**
- * How many bytes long a message has to be, in order to be gzipped.
- */
- public static final String SYNC_MIN_GZIP_BYTES =
- "sync_min_gzip_bytes";
-
- /**
- * The hash value of the current provisioning settings
- */
- public static final String PROVISIONING_DIGEST = "digest";
-
- /**
- * Provisioning keys to block from server update
- */
- public static final String PROVISIONING_OVERRIDE = "override";
-
- /**
- * "Generic" service name for authentication requests.
- */
- public static final String GOOGLE_LOGIN_GENERIC_AUTH_SERVICE
- = "google_login_generic_auth_service";
-
- /**
- * Duration in milliseconds after setup at which market does not reconcile applications
- * which are installed during restore.
- */
- public static final String VENDING_RESTORE_WINDOW_MS = "vending_restore_window_ms";
-
-
- /**
- * Frequency in milliseconds at which we should sync the locally installed Vending Machine
- * content with the server.
- */
- public static final String VENDING_SYNC_FREQUENCY_MS = "vending_sync_frequency_ms";
-
- /**
- * Support URL that is opened in a browser when user clicks on 'Help and Info' in Vending
- * Machine.
- */
- public static final String VENDING_SUPPORT_URL = "vending_support_url";
-
- /**
- * Indicates if Vending Machine requires a SIM to be in the phone to allow a purchase.
- *
- * true = SIM is required
- * false = SIM is not required
- */
- public static final String VENDING_REQUIRE_SIM_FOR_PURCHASE =
- "vending_require_sim_for_purchase";
-
- /**
- * Indicates the Vending Machine backup state. It is set if the
- * Vending application has been backed up at least once.
- */
- public static final String VENDING_BACKUP_STATE = "vending_backup_state";
-
- /**
- * The current version id of the Vending Machine terms of service.
- */
- public static final String VENDING_TOS_VERSION = "vending_tos_version";
-
- /**
- * URL that points to the terms of service for Vending Machine.
- */
- public static final String VENDING_TOS_URL = "vending_tos_url";
-
- /**
- * URL to navigate to in browser (not Market) when the terms of service
- * for Vending Machine could not be accessed due to bad network
- * connection.
- */
- public static final String VENDING_TOS_MISSING_URL = "vending_tos_missing_url";
-
- /**
- * Whether to use sierraqa instead of sierra tokens for the purchase flow in
- * Vending Machine.
- *
- * true = use sierraqa
- * false = use sierra (default)
- */
- public static final String VENDING_USE_CHECKOUT_QA_SERVICE =
- "vending_use_checkout_qa_service";
-
- /**
- * Default value to use for all/free/priced filter in Market.
- * Valid values: ALL, FREE, PAID (case insensitive)
- */
- public static final String VENDING_DEFAULT_FILTER = "vending_default_filter";
- /**
- * Ranking type value to use for the first category tab (currently popular)
- */
- public static final String VENDING_TAB_1_RANKING_TYPE = "vending_tab_1_ranking_type";
-
- /**
- * Title string to use for first category tab.
- */
- public static final String VENDING_TAB_1_TITLE = "vending_tab_1_title";
-
- /**
- * Ranking type value to use for the second category tab (currently newest)
- */
- public static final String VENDING_TAB_2_RANKING_TYPE = "vending_tab_2_ranking_type";
-
- /**
- * Title string to use for second category tab.
- */
- public static final String VENDING_TAB_2_TITLE = "vending_tab_2_title";
-
- /**
- * Frequency in milliseconds at which we should request MCS heartbeats
- * from the Vending Machine client.
- */
- public static final String VENDING_HEARTBEAT_FREQUENCY_MS =
- "vending_heartbeat_frequency_ms";
-
- /**
- * Frequency in milliseconds at which we should resend pending download
- * requests to the API Server from the Vending Machine client.
- */
- public static final String VENDING_PENDING_DOWNLOAD_RESEND_FREQUENCY_MS =
- "vending_pd_resend_frequency_ms";
-
- /**
- * Time before an asset in the 'DOWNLOADING' state is considered ready
- * for an install kick on the client.
- */
- public static final String VENDING_DOWNLOADING_KICK_TIMEOUT_MS =
- "vending_downloading_kick_ms";
-
- /**
- * Size of buffer in bytes for Vending to use when reading cache files.
- */
- public static final String VENDING_DISK_INPUT_BUFFER_BYTES =
- "vending_disk_input_buffer_bytes";
-
- /**
- * Size of buffer in bytes for Vending to use when writing cache files.
- */
- public static final String VENDING_DISK_OUTPUT_BUFFER_BYTES =
- "vending_disk_output_buffer_bytes";
-
- /**
- * Frequency in milliseconds at which we should cycle through the promoted applications
- * on the home screen or the categories page.
- */
- public static final String VENDING_PROMO_REFRESH_FREQUENCY_MS =
- "vending_promo_refresh_freq_ms";
-
- /**
- * Frequency in milliseconds when we should refresh the provisioning information from
- * the carrier backend.
- */
- public static final String VENDING_CARRIER_PROVISIONING_REFRESH_FREQUENCY_MS =
- "vending_carrier_ref_freq_ms";
-
- /**
- * Interval in milliseconds after which a failed provisioning request should be retried.
- */
- public static final String VENDING_CARRIER_PROVISIONING_RETRY_MS =
- "vending_carrier_prov_retry_ms";
-
- /**
- * Buffer in milliseconds for carrier credentials to be considered valid.
- */
- public static final String VENDING_CARRIER_CREDENTIALS_BUFFER_MS =
- "vending_carrier_cred_buf_ms";
-
- /**
- * Whether to turn on performance logging in the Market client.
- */
- public static final String VENDING_LOG_PERFORMANCE =
- "vending_log_perf";
-
- /**
- * URL that points to the legal terms of service to display in Settings.
- * <p>
- * This should be a https URL. For a pretty user-friendly URL, use
- * {@link #SETTINGS_TOS_PRETTY_URL}.
- */
- public static final String SETTINGS_TOS_URL = "settings_tos_url";
-
- /**
- * URL that points to the legal terms of service to display in Settings.
- * <p>
- * This should be a pretty http URL. For the URL the device will access
- * via Settings, use {@link #SETTINGS_TOS_URL}.
- */
- public static final String SETTINGS_TOS_PRETTY_URL = "settings_tos_pretty_url";
-
- /**
- * URL that points to the contributors to display in Settings.
- * <p>
- * This should be a https URL. For a pretty user-friendly URL, use
- * {@link #SETTINGS_CONTRIBUTORS_PRETTY_URL}.
- */
- public static final String SETTINGS_CONTRIBUTORS_URL = "settings_contributors_url";
-
- /**
- * URL that points to the contributors to display in Settings.
- * <p>
- * This should be a pretty http URL. For the URL the device will access
- * via Settings, use {@link #SETTINGS_CONTRIBUTORS_URL}.
- */
- public static final String SETTINGS_CONTRIBUTORS_PRETTY_URL =
- "settings_contributors_pretty_url";
-
- /**
- * URL that points to the Terms Of Service for the device.
- * <p>
- * This should be a pretty http URL.
- */
- public static final String SETUP_GOOGLE_TOS_URL = "setup_google_tos_url";
-
- /**
- * URL that points to the Android privacy policy for the device.
- * <p>
- * This should be a pretty http URL.
- */
- public static final String SETUP_ANDROID_PRIVACY_URL = "setup_android_privacy_url";
-
- /**
- * URL that points to the Google privacy policy for the device.
- * <p>
- * This should be a pretty http URL.
- */
- public static final String SETUP_GOOGLE_PRIVACY_URL = "setup_google_privacy_url";
-
- /**
- * Request an MSISDN token for various Google services.
- */
- public static final String USE_MSISDN_TOKEN = "use_msisdn_token";
-
- /**
- * RSA public key used to encrypt passwords stored in the database.
- */
- public static final String GLS_PUBLIC_KEY = "google_login_public_key";
-
- /**
- * Only check parental control status if this is set to "true".
- */
- public static final String PARENTAL_CONTROL_CHECK_ENABLED =
- "parental_control_check_enabled";
-
- /**
- * The list of applications we need to block if parental control is
- * enabled.
- */
- public static final String PARENTAL_CONTROL_APPS_LIST =
- "parental_control_apps_list";
-
- /**
- * Duration in which parental control status is valid.
- */
- public static final String PARENTAL_CONTROL_TIMEOUT_IN_MS =
- "parental_control_timeout_in_ms";
-
- /**
- * When parental control is off, we expect to get this string from the
- * litmus url.
- */
- public static final String PARENTAL_CONTROL_EXPECTED_RESPONSE =
- "parental_control_expected_response";
-
- /**
- * When the litmus url returns a 302, declare parental control to be on
- * only if the redirect url matches this regular expression.
- */
- public static final String PARENTAL_CONTROL_REDIRECT_REGEX =
- "parental_control_redirect_regex";
-
- /**
- * Threshold for the amount of change in disk free space required to report the amount of
- * free space. Used to prevent spamming the logs when the disk free space isn't changing
- * frequently.
- */
- public static final String DISK_FREE_CHANGE_REPORTING_THRESHOLD =
- "disk_free_change_reporting_threshold";
-
- /**
- * Prefix for new Google services published by the checkin
- * server.
- */
- public static final String GOOGLE_SERVICES_PREFIX
- = "google_services:";
-
- /**
- * The maximum reconnect delay for short network outages or when the network is suspended
- * due to phone use.
- */
- public static final String SYNC_MAX_RETRY_DELAY_IN_SECONDS =
- "sync_max_retry_delay_in_seconds";
-
- /**
- * Minimum percentage of free storage on the device that is used to determine if
- * the device is running low on storage.
- * Say this value is set to 10, the device is considered running low on storage
- * if 90% or more of the device storage is filled up.
- */
- public static final String SYS_STORAGE_THRESHOLD_PERCENTAGE =
- "sys_storage_threshold_percentage";
-
- /**
- * The interval in minutes after which the amount of free storage left on the
- * device is logged to the event log
- */
- public static final String SYS_FREE_STORAGE_LOG_INTERVAL =
- "sys_free_storage_log_interval";
-
- /**
- * The interval in milliseconds at which to check the number of SMS sent
- * out without asking for use permit, to limit the un-authorized SMS
- * usage.
- */
- public static final String SMS_OUTGOING_CHECK_INTERVAL_MS =
- "sms_outgoing_check_interval_ms";
-
- /**
- * The number of outgoing SMS sent without asking for user permit
- * (of {@link #SMS_OUTGOING_CHECK_INTERVAL_MS}
- */
- public static final String SMS_OUTGOING_CEHCK_MAX_COUNT =
- "sms_outgoing_check_max_count";
-
- /**
- * The interval in milliseconds at which to check packet counts on the
- * mobile data interface when screen is on, to detect possible data
- * connection problems.
- */
- public static final String PDP_WATCHDOG_POLL_INTERVAL_MS =
- "pdp_watchdog_poll_interval_ms";
-
- /**
- * The interval in milliseconds at which to check packet counts on the
- * mobile data interface when screen is off, to detect possible data
- * connection problems.
- */
- public static final String PDP_WATCHDOG_LONG_POLL_INTERVAL_MS =
- "pdp_watchdog_long_poll_interval_ms";
-
- /**
- * The interval in milliseconds at which to check packet counts on the
- * mobile data interface after {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT}
- * outgoing packets has been reached without incoming packets.
- */
- public static final String PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS =
- "pdp_watchdog_error_poll_interval_ms";
-
- /**
- * The number of outgoing packets sent without seeing an incoming packet
- * that triggers a countdown (of {@link #PDP_WATCHDOG_ERROR_POLL_COUNT}
- * device is logged to the event log
- */
- public static final String PDP_WATCHDOG_TRIGGER_PACKET_COUNT =
- "pdp_watchdog_trigger_packet_count";
-
- /**
- * The number of polls to perform (at {@link #PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS})
- * after hitting {@link #PDP_WATCHDOG_TRIGGER_PACKET_COUNT} before
- * attempting data connection recovery.
- */
- public static final String PDP_WATCHDOG_ERROR_POLL_COUNT =
- "pdp_watchdog_error_poll_count";
-
- /**
- * The number of failed PDP reset attempts before moving to something more
- * drastic: re-registering to the network.
- */
- public static final String PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT =
- "pdp_watchdog_max_pdp_reset_fail_count";
-
- /**
- * Address to ping as a last sanity check before attempting any recovery.
- * Unset or set to "0.0.0.0" to skip this check.
- */
- public static final String PDP_WATCHDOG_PING_ADDRESS = "pdp_watchdog_ping_address";
-
- /**
- * The "-w deadline" parameter for the ping, ie, the max time in
- * seconds to spend pinging.
- */
- public static final String PDP_WATCHDOG_PING_DEADLINE = "pdp_watchdog_ping_deadline";
-
- /**
- * The interval in milliseconds at which to check gprs registration
- * after the first registration mismatch of gprs and voice service,
- * to detect possible data network registration problems.
- *
- */
- public static final String GPRS_REGISTER_CHECK_PERIOD_MS =
- "gprs_register_check_period_ms";
-
- /**
- * The interval in milliseconds after which Wi-Fi is considered idle.
- * When idle, it is possible for the device to be switched from Wi-Fi to
- * the mobile data network.
- */
- public static final String WIFI_IDLE_MS = "wifi_idle_ms";
-
- /**
- * Screen timeout in milliseconds corresponding to the
- * PowerManager's POKE_LOCK_SHORT_TIMEOUT flag (i.e. the fastest
- * possible screen timeout behavior.)
- */
- public static final String SHORT_KEYLIGHT_DELAY_MS =
- "short_keylight_delay_ms";
-
- /**
- * List of test suites (local disk filename) for the automatic instrumentation test runner.
- * The file format is similar to automated_suites.xml, see AutoTesterService.
- * If this setting is missing or empty, the automatic test runner will not start.
- */
- public static final String AUTOTEST_SUITES_FILE = "autotest_suites_file";
-
- /**
- * Interval between synchronous checkins forced by the automatic test runner.
- * If you set this to a value smaller than CHECKIN_INTERVAL, then the test runner's
- * frequent checkins will prevent asynchronous background checkins from interfering
- * with any performance measurements.
- */
- public static final String AUTOTEST_CHECKIN_SECONDS = "autotest_checkin_seconds";
-
- /**
- * Interval between reboots forced by the automatic test runner.
- */
- public static final String AUTOTEST_REBOOT_SECONDS = "autotest_reboot_seconds";
-
-
- /**
- * Threshold values for the duration and level of a discharge cycle, under
- * which we log discharge cycle info.
- */
- public static final String BATTERY_DISCHARGE_DURATION_THRESHOLD =
- "battery_discharge_duration_threshold";
- public static final String BATTERY_DISCHARGE_THRESHOLD = "battery_discharge_threshold";
-
- /**
- * An email address that anr bugreports should be sent to.
- */
- public static final String ANR_BUGREPORT_RECIPIENT = "anr_bugreport_recipient";
-
- /**
- * Flag for allowing service provider to use location information to improve products and
- * services.
- * Type: int ( 0 = disallow, 1 = allow )
- * @deprecated
- */
- public static final String USE_LOCATION_FOR_SERVICES = "use_location";
-
- /**
- * The number of promoted sources in GlobalSearch.
- */
- public static final String SEARCH_NUM_PROMOTED_SOURCES = "search_num_promoted_sources";
- /**
- * The maximum number of suggestions returned by GlobalSearch.
- */
- public static final String SEARCH_MAX_RESULTS_TO_DISPLAY = "search_max_results_to_display";
- /**
- * The number of suggestions GlobalSearch will ask each non-web search source for.
- */
- public static final String SEARCH_MAX_RESULTS_PER_SOURCE = "search_max_results_per_source";
- /**
- * The number of suggestions the GlobalSearch will ask the web search source for.
- */
- public static final String SEARCH_WEB_RESULTS_OVERRIDE_LIMIT =
- "search_web_results_override_limit";
- /**
- * The number of milliseconds that GlobalSearch will wait for suggestions from
- * promoted sources before continuing with all other sources.
- */
- public static final String SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS =
- "search_promoted_source_deadline_millis";
- /**
- * The number of milliseconds before GlobalSearch aborts search suggesiton queries.
- */
- public static final String SEARCH_SOURCE_TIMEOUT_MILLIS = "search_source_timeout_millis";
- /**
- * The maximum number of milliseconds that GlobalSearch shows the previous results
- * after receiving a new query.
- */
- public static final String SEARCH_PREFILL_MILLIS = "search_prefill_millis";
- /**
- * The maximum age of log data used for shortcuts in GlobalSearch.
- */
- public static final String SEARCH_MAX_STAT_AGE_MILLIS = "search_max_stat_age_millis";
- /**
- * The maximum age of log data used for source ranking in GlobalSearch.
- */
- public static final String SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS =
- "search_max_source_event_age_millis";
- /**
- * The minimum number of impressions needed to rank a source in GlobalSearch.
- */
- public static final String SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING =
- "search_min_impressions_for_source_ranking";
- /**
- * The minimum number of clicks needed to rank a source in GlobalSearch.
- */
- public static final String SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING =
- "search_min_clicks_for_source_ranking";
- /**
- * The maximum number of shortcuts shown by GlobalSearch.
- */
- public static final String SEARCH_MAX_SHORTCUTS_RETURNED = "search_max_shortcuts_returned";
- /**
- * The size of the core thread pool for suggestion queries in GlobalSearch.
- */
- public static final String SEARCH_QUERY_THREAD_CORE_POOL_SIZE =
- "search_query_thread_core_pool_size";
- /**
- * The maximum size of the thread pool for suggestion queries in GlobalSearch.
- */
- public static final String SEARCH_QUERY_THREAD_MAX_POOL_SIZE =
- "search_query_thread_max_pool_size";
- /**
- * The size of the core thread pool for shortcut refreshing in GlobalSearch.
- */
- public static final String SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE =
- "search_shortcut_refresh_core_pool_size";
- /**
- * The maximum size of the thread pool for shortcut refreshing in GlobalSearch.
- */
- public static final String SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE =
- "search_shortcut_refresh_max_pool_size";
- /**
- * The maximun time that excess threads in the GlobalSeach thread pools will
- * wait before terminating.
- */
- public static final String SEARCH_THREAD_KEEPALIVE_SECONDS =
- "search_thread_keepalive_seconds";
- /**
- * The maximum number of concurrent suggestion queries to each source.
- */
- public static final String SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT =
- "search_per_source_concurrent_query_limit";
- /**
- * Flag for allowing ActivityManagerService to send ACTION_APP_ERROR intents
- * on application crashes and ANRs. If this is disabled, the crash/ANR dialog
- * will never display the "Report" button.
- * Type: int ( 0 = disallow, 1 = allow )
- */
- public static final String SEND_ACTION_APP_ERROR = "send_action_app_error";
-
- /**
- * Maximum size of /proc/last_kmsg content to upload after reboot.
- */
- public static final String LAST_KMSG_KB = "last_kmsg_kb";
-
- /**
- * Maximum age of entries kept by {@link android.os.IDropBox}.
- */
- public static final String DROPBOX_AGE_SECONDS =
- "dropbox_age_seconds";
- /**
- * Maximum amount of disk space used by {@link android.os.IDropBox} no matter what.
- */
- public static final String DROPBOX_QUOTA_KB =
- "dropbox_quota_kb";
- /**
- * Percent of free disk (excluding reserve) which {@link android.os.IDropBox} will use.
- */
- public static final String DROPBOX_QUOTA_PERCENT =
- "dropbox_quota_percent";
- /**
- * Percent of total disk which {@link android.os.IDropBox} will never dip into.
- */
- public static final String DROPBOX_RESERVE_PERCENT =
- "dropbox_reserve_percent";
- /**
- * Prefix for per-tag dropbox disable/enable settings.
- */
- public static final String DROPBOX_TAG_PREFIX =
- "dropbox:";
-
- /**
- * Nonzero causes Log.wtf() to crash.
- */
- public static final String WTF_IS_FATAL = "wtf_is_fatal";
-
- /**
- * The length of time in milli-seconds that automatic small adjustments to
- * SystemClock are ignored if NITZ_UPDATE_DIFF is not exceeded.
- */
- public static final String NITZ_UPDATE_SPACING = "nitz_update_spacing";
-
- /**
- * If the NITZ_UPDATE_DIFF time is exceeded then an automatic adjustment
- * to SystemClock will be allowed even if NITZ_UPDATE_SPACING has not been
- * exceeded.
- */
- public static final String NITZ_UPDATE_DIFF = "nitz_update_diff";
-
- /**
- * @deprecated
- * @hide
- */
- @Deprecated // Obviated by NameValueCache: just fetch the value directly.
- public static class QueryMap extends ContentQueryMap {
-
- public QueryMap(ContentResolver contentResolver, Cursor cursor, boolean keepUpdated,
- Handler handlerForUpdateNotifications) {
- super(cursor, NAME, keepUpdated, handlerForUpdateNotifications);
- }
-
- public QueryMap(ContentResolver contentResolver, boolean keepUpdated,
- Handler handlerForUpdateNotifications) {
- this(contentResolver,
- contentResolver.query(CONTENT_URI, null, null, null, null),
- keepUpdated, handlerForUpdateNotifications);
- }
-
- public String getString(String name) {
- ContentValues cv = getValues(name);
- if (cv == null) return null;
- return cv.getAsString(VALUE);
- }
- }
-
- }
-
- /**
* User-defined bookmarks and shortcuts. The target of each bookmark is an
* Intent URL, allowing it to be either a web page or a particular
* application activity.
diff --git a/core/java/android/server/BluetoothA2dpService.java b/core/java/android/server/BluetoothA2dpService.java
index 816ae14..22bb43c 100644
--- a/core/java/android/server/BluetoothA2dpService.java
+++ b/core/java/android/server/BluetoothA2dpService.java
@@ -100,7 +100,6 @@
setSinkPriority(device, BluetoothA2dp.PRIORITY_ON);
}
break;
- case BluetoothDevice.BOND_BONDING:
case BluetoothDevice.BOND_NONE:
setSinkPriority(device, BluetoothA2dp.PRIORITY_UNDEFINED);
break;
@@ -407,7 +406,7 @@
mContext.enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
return Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.getBluetoothA2dpSinkPriorityKey(device.getAddress()),
- BluetoothA2dp.PRIORITY_OFF);
+ BluetoothA2dp.PRIORITY_UNDEFINED);
}
public synchronized boolean setSinkPriority(BluetoothDevice device, int priority) {
@@ -466,11 +465,8 @@
checkSinkSuspendState(state);
mTargetA2dpState = -1;
- if (state == BluetoothA2dp.STATE_CONNECTING) {
- mAudioManager.setParameters("A2dpSuspended=false");
- }
-
- if (state == BluetoothA2dp.STATE_CONNECTING ||
+ if (getSinkPriority(device) > BluetoothA2dp.PRIORITY_OFF &&
+ state == BluetoothA2dp.STATE_CONNECTING ||
state == BluetoothA2dp.STATE_CONNECTED) {
// We have connected or attempting to connect.
// Bump priority
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 45719e4..fe3b149 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -434,9 +434,9 @@
}
int myWidth = mSurfaceHolder.getRequestedWidth();
- if (myWidth <= 0) myWidth = ViewGroup.LayoutParams.FILL_PARENT;
+ if (myWidth <= 0) myWidth = ViewGroup.LayoutParams.MATCH_PARENT;
int myHeight = mSurfaceHolder.getRequestedHeight();
- if (myHeight <= 0) myHeight = ViewGroup.LayoutParams.FILL_PARENT;
+ if (myHeight <= 0) myHeight = ViewGroup.LayoutParams.MATCH_PARENT;
final boolean creating = !mCreated;
final boolean formatChanged = mFormat != mSurfaceHolder.getRequestedFormat();
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index bd19f9e..bbbeb3f 100755
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -129,8 +129,8 @@
* {@link TextToSpeech#synthesizeToFile(String, HashMap, String)} with the
* {@link TextToSpeech.Engine#KEY_PARAM_UTTERANCE_ID} key.
* @param utteranceId the identifier of the utterance.
- */
- public void onUtteranceCompleted(String utteranceId);
+ */
+ public void onUtteranceCompleted(String utteranceId);
}
@@ -286,6 +286,10 @@
*/
public static final String KEY_PARAM_VARIANT = "variant";
/**
+ * {@hide}
+ */
+ public static final String KEY_PARAM_ENGINE = "engine";
+ /**
* Parameter key to specify the audio stream type to be used when speaking text
* or playing back a file.
* @see TextToSpeech#speak(String, int, HashMap)
@@ -327,10 +331,16 @@
* {@hide}
*/
protected static final int PARAM_POSITION_UTTERANCE_ID = 10;
+
/**
* {@hide}
*/
- protected static final int NB_CACHED_PARAMS = 6;
+ protected static final int PARAM_POSITION_ENGINE = 12;
+
+ /**
+ * {@hide}
+ */
+ protected static final int NB_CACHED_PARAMS = 7;
}
/**
@@ -373,6 +383,7 @@
mCachedParams[Engine.PARAM_POSITION_VARIANT] = Engine.KEY_PARAM_VARIANT;
mCachedParams[Engine.PARAM_POSITION_STREAM] = Engine.KEY_PARAM_STREAM;
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID] = Engine.KEY_PARAM_UTTERANCE_ID;
+ mCachedParams[Engine.PARAM_POSITION_ENGINE] = Engine.KEY_PARAM_ENGINE;
mCachedParams[Engine.PARAM_POSITION_RATE + 1] =
String.valueOf(Engine.DEFAULT_RATE);
@@ -381,10 +392,10 @@
mCachedParams[Engine.PARAM_POSITION_LANGUAGE + 1] = defaultLoc.getISO3Language();
mCachedParams[Engine.PARAM_POSITION_COUNTRY + 1] = defaultLoc.getISO3Country();
mCachedParams[Engine.PARAM_POSITION_VARIANT + 1] = defaultLoc.getVariant();
-
mCachedParams[Engine.PARAM_POSITION_STREAM + 1] =
String.valueOf(Engine.DEFAULT_STREAM);
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = "";
+ mCachedParams[Engine.PARAM_POSITION_ENGINE + 1] = Engine.DEFAULT_SYNTH;
initTts();
}
@@ -684,6 +695,10 @@
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = extra;
}
+ extra = params.get(Engine.KEY_PARAM_ENGINE);
+ if (extra != null) {
+ mCachedParams[Engine.PARAM_POSITION_ENGINE + 1] = extra;
+ }
}
result = mITts.speak(mPackageName, text, queueMode, mCachedParams);
} catch (RemoteException e) {
@@ -819,7 +834,7 @@
mStarted = false;
initTts();
} finally {
- return result;
+ return result;
}
}
}
@@ -894,7 +909,7 @@
mStarted = false;
initTts();
} finally {
- return result;
+ return result;
}
}
}
@@ -943,7 +958,7 @@
mStarted = false;
initTts();
} finally {
- return result;
+ return result;
}
}
}
@@ -990,7 +1005,7 @@
mStarted = false;
initTts();
} finally {
- return result;
+ return result;
}
}
}
@@ -1046,7 +1061,7 @@
mStarted = false;
initTts();
} finally {
- return result;
+ return result;
}
}
}
@@ -1064,7 +1079,7 @@
return null;
}
try {
- String[] locStrings = mITts.getLanguage();
+ String[] locStrings = mITts.getLanguage();
if ((locStrings != null) && (locStrings.length == 3)) {
return new Locale(locStrings[0], locStrings[1], locStrings[2]);
} else {
@@ -1131,7 +1146,7 @@
mStarted = false;
initTts();
} finally {
- return result;
+ return result;
}
}
}
@@ -1166,6 +1181,10 @@
if (extra != null) {
mCachedParams[Engine.PARAM_POSITION_UTTERANCE_ID + 1] = extra;
}
+ extra = params.get(Engine.KEY_PARAM_ENGINE);
+ if (extra != null) {
+ mCachedParams[Engine.PARAM_POSITION_ENGINE + 1] = extra;
+ }
}
if (mITts.synthesizeToFile(mPackageName, text, mCachedParams, filename)){
result = SUCCESS;
@@ -1214,19 +1233,19 @@
*
* @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}.
*/
- public int setOnUtteranceCompletedListener(
- final OnUtteranceCompletedListener listener) {
+ public int setOnUtteranceCompletedListener(
+ final OnUtteranceCompletedListener listener) {
synchronized (mStartLock) {
int result = ERROR;
if (!mStarted) {
return result;
}
mITtscallback = new ITtsCallback.Stub() {
- public void utteranceCompleted(String utteranceId) throws RemoteException {
- if (listener != null) {
- listener.onUtteranceCompleted(utteranceId);
- }
- }
+ public void utteranceCompleted(String utteranceId) throws RemoteException {
+ if (listener != null) {
+ listener.onUtteranceCompleted(utteranceId);
+ }
+ }
};
try {
result = mITts.registerCallback(mPackageName, mITtscallback);
@@ -1251,7 +1270,7 @@
} finally {
return result;
}
- }
+ }
}
/**
@@ -1262,36 +1281,39 @@
*
* @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}.
*/
- public int setEngineByPackageName(String enginePackageName) {
- synchronized (mStartLock) {
- int result = TextToSpeech.ERROR;
- if (!mStarted) {
- return result;
- }
- try {
- result = mITts.setEngineByPackageName(enginePackageName);
- } catch (RemoteException e) {
- // TTS died; restart it.
- Log.e("TextToSpeech.java - setEngineByPackageName", "RemoteException");
- e.printStackTrace();
- mStarted = false;
- initTts();
- } catch (NullPointerException e) {
- // TTS died; restart it.
- Log.e("TextToSpeech.java - setEngineByPackageName", "NullPointerException");
- e.printStackTrace();
- mStarted = false;
- initTts();
- } catch (IllegalStateException e) {
- // TTS died; restart it.
- Log.e("TextToSpeech.java - setEngineByPackageName", "IllegalStateException");
- e.printStackTrace();
- mStarted = false;
- initTts();
- } finally {
- return result;
- }
- }
+ public int setEngineByPackageName(String enginePackageName) {
+ synchronized (mStartLock) {
+ int result = TextToSpeech.ERROR;
+ if (!mStarted) {
+ return result;
+ }
+ try {
+ result = mITts.setEngineByPackageName(enginePackageName);
+ if (result == TextToSpeech.SUCCESS){
+ mCachedParams[Engine.PARAM_POSITION_ENGINE + 1] = enginePackageName;
+ }
+ } catch (RemoteException e) {
+ // TTS died; restart it.
+ Log.e("TextToSpeech.java - setEngineByPackageName", "RemoteException");
+ e.printStackTrace();
+ mStarted = false;
+ initTts();
+ } catch (NullPointerException e) {
+ // TTS died; restart it.
+ Log.e("TextToSpeech.java - setEngineByPackageName", "NullPointerException");
+ e.printStackTrace();
+ mStarted = false;
+ initTts();
+ } catch (IllegalStateException e) {
+ // TTS died; restart it.
+ Log.e("TextToSpeech.java - setEngineByPackageName", "IllegalStateException");
+ e.printStackTrace();
+ mStarted = false;
+ initTts();
+ } finally {
+ return result;
+ }
+ }
}
}
diff --git a/core/java/android/text/method/ArrowKeyMovementMethod.java b/core/java/android/text/method/ArrowKeyMovementMethod.java
index 0d04b13..7b307f8 100644
--- a/core/java/android/text/method/ArrowKeyMovementMethod.java
+++ b/core/java/android/text/method/ArrowKeyMovementMethod.java
@@ -247,10 +247,11 @@
KeyEvent.META_SHIFT_ON) == 1) ||
(MetaKeyKeyListener.getMetaState(buffer,
MetaKeyKeyListener.META_SELECTING) != 0);
+ int x = (int) event.getX();
+ int y = (int) event.getY();
+ int offset = getOffset(x, y, widget);
+
if (cap) {
- int x = (int) event.getX();
- int y = (int) event.getY();
- int offset = getOffset(x, y, widget);
buffer.setSpan(LAST_TAP_DOWN, offset, offset,
Spannable.SPAN_POINT_POINT);
@@ -260,6 +261,30 @@
// without this, users would get booted out of select
// mode once the view detected it needed to scroll.
widget.getParent().requestDisallowInterceptTouchEvent(true);
+ } else {
+ OnePointFiveTapState[] tap = buffer.getSpans(0, buffer.length(),
+ OnePointFiveTapState.class);
+
+ if (tap.length > 0) {
+ if (event.getEventTime() - tap[0].mWhen <=
+ ViewConfiguration.getDoubleTapTimeout() &&
+ sameWord(buffer, offset, Selection.getSelectionEnd(buffer))) {
+
+ tap[0].active = true;
+ MetaKeyKeyListener.startSelecting(widget, buffer);
+ widget.getParent().requestDisallowInterceptTouchEvent(true);
+ buffer.setSpan(LAST_TAP_DOWN, offset, offset,
+ Spannable.SPAN_POINT_POINT);
+ }
+
+ tap[0].mWhen = event.getEventTime();
+ } else {
+ OnePointFiveTapState newtap = new OnePointFiveTapState();
+ newtap.mWhen = event.getEventTime();
+ newtap.active = false;
+ buffer.setSpan(newtap, 0, buffer.length(),
+ Spannable.SPAN_INCLUSIVE_INCLUSIVE);
+ }
}
} else if (event.getAction() == MotionEvent.ACTION_MOVE ) {
boolean cap = (MetaKeyKeyListener.getMetaState(buffer,
@@ -287,7 +312,7 @@
// user started the selection)
int lastDownOffset = buffer.getSpanStart(LAST_TAP_DOWN);
- // Compute the selection boundries
+ // Compute the selection boundaries
int spanstart;
int spanend;
if (offset >= lastDownOffset) {
@@ -324,6 +349,19 @@
// XXX should do the same adjust for x as we do for the line.
+ OnePointFiveTapState[] onepointfivetap = buffer.getSpans(0, buffer.length(),
+ OnePointFiveTapState.class);
+ if (onepointfivetap.length > 0 && onepointfivetap[0].active &&
+ Selection.getSelectionStart(buffer) == Selection.getSelectionEnd(buffer)) {
+ // If we've set select mode, because there was a onepointfivetap,
+ // but there was no ensuing swipe gesture, undo the select mode
+ // and remove reference to the last onepointfivetap.
+ MetaKeyKeyListener.stopSelecting(widget, buffer);
+ for (int i=0; i < onepointfivetap.length; i++) {
+ buffer.removeSpan(onepointfivetap[i]);
+ }
+ buffer.removeSpan(LAST_TAP_DOWN);
+ }
boolean cap = (MetaKeyKeyListener.getMetaState(buffer,
KeyEvent.META_SHIFT_ON) == 1) ||
(MetaKeyKeyListener.getMetaState(buffer,
@@ -335,10 +373,10 @@
if (tap.length > 0) {
if (event.getEventTime() - tap[0].mWhen <=
- ViewConfiguration.getDoubleTapTimeout()) {
- if (sameWord(buffer, off, Selection.getSelectionEnd(buffer))) {
- doubletap = true;
- }
+ ViewConfiguration.getDoubleTapTimeout() &&
+ sameWord(buffer, off, Selection.getSelectionEnd(buffer))) {
+
+ doubletap = true;
}
tap[0].mWhen = event.getEventTime();
@@ -351,6 +389,11 @@
if (cap) {
buffer.removeSpan(LAST_TAP_DOWN);
+ if (onepointfivetap.length > 0 && onepointfivetap[0].active) {
+ // If we selecting something with the onepointfivetap-and
+ // swipe gesture, stop it on finger up.
+ MetaKeyKeyListener.stopSelecting(widget, buffer);
+ }
} else if (doubletap) {
Selection.setSelection(buffer,
findWordStart(buffer, off),
@@ -373,6 +416,19 @@
long mWhen;
}
+ /* We check for a onepointfive tap. This is similar to
+ * doubletap gesture (where a finger goes down, up, down, up, in a short
+ * time period), except in the onepointfive tap, a users finger only needs
+ * to go down, up, down in a short time period. We detect this type of tap
+ * to implement the onepointfivetap-and-swipe selection gesture.
+ * This gesture allows users to select a segment of text without going
+ * through the "select text" option in the context menu.
+ */
+ private static class OnePointFiveTapState implements NoCopySpan {
+ long mWhen;
+ boolean active;
+ }
+
private static boolean sameWord(CharSequence text, int one, int two) {
int start = findWordStart(text, one);
int end = findWordEnd(text, one);
diff --git a/core/java/android/util/EventLog.java b/core/java/android/util/EventLog.java
index 81dd96e..b596d32 100644
--- a/core/java/android/util/EventLog.java
+++ b/core/java/android/util/EventLog.java
@@ -16,134 +16,41 @@
package android.util;
-import com.google.android.collect.Lists;
-
+import java.io.BufferedReader;
+import java.io.FileReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
+import java.nio.BufferUnderflowException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.List;
+import java.util.HashMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
- * {@hide}
- * Dynamically defined (in terms of event types), space efficient (i.e. "tight") event logging
- * to help instrument code for large scale stability and performance monitoring.
+ * Access to the system diagnostic event record. System diagnostic events are
+ * used to record certain system-level events (such as garbage collection,
+ * activity manager state, system watchdogs, and other low level activity),
+ * which may be automatically collected and analyzed during system development.
*
- * Note that this class contains all static methods. This is done for efficiency reasons.
+ * <p>This is <b>not</b> the main "logcat" debugging log ({@link android.util.Log})!
+ * These diagnostic events are for system integrators, not application authors.
*
- * Events for the event log are self-describing binary data structures. They start with a 20 byte
- * header (generated automatically) which contains all of the following in order:
- *
- * <ul>
- * <li> Payload length: 2 bytes - length of the non-header portion </li>
- * <li> Padding: 2 bytes - no meaning at this time </li>
- * <li> Timestamp:
- * <ul>
- * <li> Seconds: 4 bytes - seconds since Epoch </li>
- * <li> Nanoseconds: 4 bytes - plus extra nanoseconds </li>
- * </ul></li>
- * <li> Process ID: 4 bytes - matching {@link android.os.Process#myPid} </li>
- * <li> Thread ID: 4 bytes - matching {@link android.os.Process#myTid} </li>
- * </li>
- * </ul>
- *
- * The above is followed by a payload, comprised of the following:
- * <ul>
- * <li> Tag: 4 bytes - unique integer used to identify a particular event. This number is also
- * used as a key to map to a string that can be displayed by log reading tools.
- * </li>
- * <li> Type: 1 byte - can be either {@link #INT}, {@link #LONG}, {@link #STRING},
- * or {@link #LIST}. </li>
- * <li> Event log value: the size and format of which is one of:
- * <ul>
- * <li> INT: 4 bytes </li>
- * <li> LONG: 8 bytes </li>
- * <li> STRING:
- * <ul>
- * <li> Size of STRING: 4 bytes </li>
- * <li> The string: n bytes as specified in the size fields above. </li>
- * </ul></li>
- * <li> {@link List LIST}:
- * <ul>
- * <li> Num items: 1 byte </li>
- * <li> N value payloads, where N is the number of items specified above. </li>
- * </ul></li>
- * </ul>
- * </li>
- * <li> '\n': 1 byte - an automatically generated newline, used to help detect and recover from log
- * corruption and enable standard unix tools like grep, tail and wc to operate
- * on event logs. </li>
- * </ul>
- *
- * Note that all output is done in the endian-ness of the device (as determined
- * by {@link ByteOrder#nativeOrder()}).
+ * <p>Events use integer tag codes corresponding to /system/etc/event-log-tags.
+ * They carry a payload of one or more int, long, or String values. The
+ * event-log-tags file defines the payload contents for each type code.
*/
-
public class EventLog {
+ private static final String TAG = "EventLog";
- // Value types
- public static final byte INT = 0;
- public static final byte LONG = 1;
- public static final byte STRING = 2;
- public static final byte LIST = 3;
+ private static final String TAGS_FILE = "/system/etc/event-log-tags";
+ private static final String COMMENT_PATTERN = "^\\s*(#.*)?$";
+ private static final String TAG_PATTERN = "^\\s*(\\d+)\\s+(\\w+)\\s*(\\(.*\\))?\\s*$";
+ private static HashMap<String, Integer> sTagCodes = null;
+ private static HashMap<Integer, String> sTagNames = null;
- /**
- * An immutable tuple used to log a heterogeneous set of loggable items.
- * The items can be Integer, Long, String, or {@link List}.
- * The maximum number of items is 127
- */
- public static final class List {
- private Object[] mItems;
-
- /**
- * Get a particular tuple item
- * @param pos The position of the item in the tuple
- */
- public final Object getItem(int pos) {
- return mItems[pos];
- }
-
- /**
- * Get the number of items in the tuple.
- */
- public final byte getNumItems() {
- return (byte) mItems.length;
- }
-
- /**
- * Create a new tuple.
- * @param items The items to create the tuple with, as varargs.
- * @throws IllegalArgumentException if the arguments are too few (0),
- * too many, or aren't loggable types.
- */
- public List(Object... items) throws IllegalArgumentException {
- if (items.length > Byte.MAX_VALUE) {
- throw new IllegalArgumentException(
- "A List must have fewer than "
- + Byte.MAX_VALUE + " items in it.");
- }
- for (int i = 0; i < items.length; i++) {
- final Object item = items[i];
- if (item == null) {
- // Would be nice to be able to write null strings...
- items[i] = "";
- } else if (!(item instanceof List ||
- item instanceof String ||
- item instanceof Integer ||
- item instanceof Long)) {
- throw new IllegalArgumentException(
- "Attempt to create a List with illegal item type.");
- }
- }
- this.mItems = items;
- }
- }
-
- /**
- * A previously logged event read from the logs.
- */
+ /** A previously logged event read from the logs. */
public static final class Event {
private final ByteBuffer mBuffer;
@@ -158,77 +65,84 @@
private static final int TAG_OFFSET = 20;
private static final int DATA_START = 24;
+ // Value types
+ private static final byte INT_TYPE = 0;
+ private static final byte LONG_TYPE = 1;
+ private static final byte STRING_TYPE = 2;
+ private static final byte LIST_TYPE = 3;
+
/** @param data containing event, read from the system */
- public Event(byte[] data) {
+ /*package*/ Event(byte[] data) {
mBuffer = ByteBuffer.wrap(data);
mBuffer.order(ByteOrder.nativeOrder());
}
+ /** @return the process ID which wrote the log entry */
public int getProcessId() {
return mBuffer.getInt(PROCESS_OFFSET);
}
+ /** @return the thread ID which wrote the log entry */
public int getThreadId() {
return mBuffer.getInt(THREAD_OFFSET);
}
+ /** @return the wall clock time when the entry was written */
public long getTimeNanos() {
return mBuffer.getInt(SECONDS_OFFSET) * 1000000000l
+ mBuffer.getInt(NANOSECONDS_OFFSET);
}
+ /** @return the type tag code of the entry */
public int getTag() {
return mBuffer.getInt(TAG_OFFSET);
}
- /** @return one of Integer, Long, String, or List. */
+ /** @return one of Integer, Long, String, null, or Object[] of same. */
public synchronized Object getData() {
- mBuffer.limit(PAYLOAD_START + mBuffer.getShort(LENGTH_OFFSET));
- mBuffer.position(DATA_START); // Just after the tag.
- return decodeObject();
- }
-
- public byte[] getRawData() {
- return mBuffer.array();
+ try {
+ mBuffer.limit(PAYLOAD_START + mBuffer.getShort(LENGTH_OFFSET));
+ mBuffer.position(DATA_START); // Just after the tag.
+ return decodeObject();
+ } catch (IllegalArgumentException e) {
+ Log.wtf(TAG, "Illegal entry payload: tag=" + getTag(), e);
+ return null;
+ } catch (BufferUnderflowException e) {
+ Log.wtf(TAG, "Truncated entry payload: tag=" + getTag(), e);
+ return null;
+ }
}
/** @return the loggable item at the current position in mBuffer. */
private Object decodeObject() {
- if (mBuffer.remaining() < 1) return null;
- switch (mBuffer.get()) {
- case INT:
- if (mBuffer.remaining() < 4) return null;
+ byte type = mBuffer.get();
+ switch (type) {
+ case INT_TYPE:
return (Integer) mBuffer.getInt();
- case LONG:
- if (mBuffer.remaining() < 8) return null;
+ case LONG_TYPE:
return (Long) mBuffer.getLong();
- case STRING:
+ case STRING_TYPE:
try {
- if (mBuffer.remaining() < 4) return null;
int length = mBuffer.getInt();
- if (length < 0 || mBuffer.remaining() < length) return null;
int start = mBuffer.position();
mBuffer.position(start + length);
return new String(mBuffer.array(), start, length, "UTF-8");
} catch (UnsupportedEncodingException e) {
- throw new RuntimeException(e); // UTF-8 is guaranteed.
+ Log.wtf(TAG, "UTF-8 is not supported", e);
+ return null;
}
- case LIST:
- if (mBuffer.remaining() < 1) return null;
+ case LIST_TYPE:
int length = mBuffer.get();
- if (length < 0) return null;
+ if (length < 0) length += 256; // treat as signed byte
Object[] array = new Object[length];
- for (int i = 0; i < length; ++i) {
- array[i] = decodeObject();
- if (array[i] == null) return null;
- }
- return new List(array);
+ for (int i = 0; i < length; ++i) array[i] = decodeObject();
+ return array;
default:
- return null;
+ throw new IllegalArgumentException("Unknown entry type: " + type);
}
}
}
@@ -236,46 +150,36 @@
// We assume that the native methods deal with any concurrency issues.
/**
- * Send an event log message.
- * @param tag An event identifer
+ * Record an event log message.
+ * @param tag The event type tag code
* @param value A value to log
* @return The number of bytes written
*/
public static native int writeEvent(int tag, int value);
/**
- * Send an event log message.
- * @param tag An event identifer
+ * Record an event log message.
+ * @param tag The event type tag code
* @param value A value to log
* @return The number of bytes written
*/
public static native int writeEvent(int tag, long value);
/**
- * Send an event log message.
- * @param tag An event identifer
+ * Record an event log message.
+ * @param tag The event type tag code
* @param str A value to log
* @return The number of bytes written
*/
public static native int writeEvent(int tag, String str);
/**
- * Send an event log message.
- * @param tag An event identifer
- * @param list A {@link List} to log
- * @return The number of bytes written
- */
- public static native int writeEvent(int tag, List list);
-
- /**
- * Send an event log message.
- * @param tag An event identifer
+ * Record an event log message.
+ * @param tag The event type tag code
* @param list A list of values to log
* @return The number of bytes written
*/
- public static int writeEvent(int tag, Object... list) {
- return writeEvent(tag, new List(list));
- }
+ public static native int writeEvent(int tag, Object... list);
/**
* Read events from the log, filtered by type.
@@ -287,11 +191,65 @@
throws IOException;
/**
- * Read events from a file.
- * @param path to read from
- * @param output container to add events into
- * @throws IOException if something goes wrong reading events
+ * Get the name associated with an event type tag code.
+ * @param tag code to look up
+ * @return the name of the tag, or null if no tag has that number
*/
- public static native void readEvents(String path, Collection<Event> output)
- throws IOException;
+ public static String getTagName(int tag) {
+ readTagsFile();
+ return sTagNames.get(tag);
+ }
+
+ /**
+ * Get the event type tag code associated with an event name.
+ * @param name of event to look up
+ * @return the tag code, or -1 if no tag has that name
+ */
+ public static int getTagCode(String name) {
+ readTagsFile();
+ Integer code = sTagCodes.get(name);
+ return code != null ? code : -1;
+ }
+
+ /**
+ * Read TAGS_FILE, populating sTagCodes and sTagNames, if not already done.
+ */
+ private static synchronized void readTagsFile() {
+ if (sTagCodes != null && sTagNames != null) return;
+
+ sTagCodes = new HashMap<String, Integer>();
+ sTagNames = new HashMap<Integer, String>();
+
+ Pattern comment = Pattern.compile(COMMENT_PATTERN);
+ Pattern tag = Pattern.compile(TAG_PATTERN);
+ BufferedReader reader = null;
+ String line;
+
+ try {
+ reader = new BufferedReader(new FileReader(TAGS_FILE), 256);
+ while ((line = reader.readLine()) != null) {
+ if (comment.matcher(line).matches()) continue;
+
+ Matcher m = tag.matcher(line);
+ if (!m.matches()) {
+ Log.wtf(TAG, "Bad entry in " + TAGS_FILE + ": " + line);
+ continue;
+ }
+
+ try {
+ int num = Integer.parseInt(m.group(1));
+ String name = m.group(2);
+ sTagCodes.put(name, num);
+ sTagNames.put(num, name);
+ } catch (NumberFormatException e) {
+ Log.wtf(TAG, "Error in " + TAGS_FILE + ": " + line, e);
+ }
+ }
+ } catch (IOException e) {
+ Log.wtf(TAG, "Error reading " + TAGS_FILE, e);
+ // Leave the maps existing but unpopulated
+ } finally {
+ try { if (reader != null) reader.close(); } catch (IOException e) {}
+ }
+ }
}
diff --git a/core/java/android/util/EventLogTags.java b/core/java/android/util/EventLogTags.java
index be905e3..5cf5332 100644
--- a/core/java/android/util/EventLogTags.java
+++ b/core/java/android/util/EventLogTags.java
@@ -25,16 +25,14 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-/** Parsed representation of /etc/event-log-tags. */
+/**
+ * @deprecated This class is no longer functional.
+ * Use {@link android.util.EventLog} instead.
+ */
public class EventLogTags {
- private final static String TAG = "EventLogTags";
-
- private final static String TAGS_FILE = "/etc/event-log-tags";
-
public static class Description {
public final int mTag;
public final String mName;
- // TODO: Parse parameter descriptions when anyone has a use for them.
Description(int tag, String name) {
mTag = tag;
@@ -42,49 +40,11 @@
}
}
- private final static Pattern COMMENT_PATTERN = Pattern.compile(
- "^\\s*(#.*)?$");
+ public EventLogTags() throws IOException {}
- private final static Pattern TAG_PATTERN = Pattern.compile(
- "^\\s*(\\d+)\\s+(\\w+)\\s*(\\(.*\\))?\\s*$");
+ public EventLogTags(BufferedReader input) throws IOException {}
- private final HashMap<String, Description> mNameMap =
- new HashMap<String, Description>();
+ public Description get(String name) { return null; }
- private final HashMap<Integer, Description> mTagMap =
- new HashMap<Integer, Description>();
-
- public EventLogTags() throws IOException {
- this(new BufferedReader(new FileReader(TAGS_FILE), 256));
- }
-
- public EventLogTags(BufferedReader input) throws IOException {
- String line;
- while ((line = input.readLine()) != null) {
- Matcher m = COMMENT_PATTERN.matcher(line);
- if (m.matches()) continue;
-
- m = TAG_PATTERN.matcher(line);
- if (m.matches()) {
- try {
- int tag = Integer.parseInt(m.group(1));
- Description d = new Description(tag, m.group(2));
- mNameMap.put(d.mName, d);
- mTagMap.put(d.mTag, d);
- } catch (NumberFormatException e) {
- Log.e(TAG, "Error in event log tags entry: " + line, e);
- }
- } else {
- Log.e(TAG, "Can't parse event log tags entry: " + line);
- }
- }
- }
-
- public Description get(String name) {
- return mNameMap.get(name);
- }
-
- public Description get(int tag) {
- return mTagMap.get(tag);
- }
+ public Description get(int tag) { return null; }
}
diff --git a/core/java/android/util/Log.java b/core/java/android/util/Log.java
index 7a959a6..75b1b90 100644
--- a/core/java/android/util/Log.java
+++ b/core/java/android/util/Log.java
@@ -234,7 +234,6 @@
* immediately with an error dialog.
* @param tag Used to identify the source of a log message.
* @param msg The message you would like logged.
- * @pending
*/
public static int wtf(String tag, String msg) {
return wtf(tag, msg, null);
@@ -245,7 +244,6 @@
* Similar to {@link #wtf(String, String)}, with an exception to log.
* @param tag Used to identify the source of a log message.
* @param tr An exception to log.
- * @pending
*/
public static int wtf(String tag, Throwable tr) {
return wtf(tag, tr.getMessage(), tr);
@@ -257,7 +255,6 @@
* @param tag Used to identify the source of a log message.
* @param msg The message you would like logged.
* @param tr An exception to log. May be null.
- * @pending
*/
public static int wtf(String tag, String msg, Throwable tr) {
tr = new TerribleFailure(msg, tr);
diff --git a/core/java/android/view/TransformGestureDetector.java b/core/java/android/view/TransformGestureDetector.java
new file mode 100644
index 0000000..196716a
--- /dev/null
+++ b/core/java/android/view/TransformGestureDetector.java
@@ -0,0 +1,316 @@
+/*
+ * 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.
+ */
+
+package android.view;
+
+import android.content.Context;
+import android.util.Log;
+import android.view.GestureDetector.SimpleOnGestureListener;
+
+/**
+ * Detects transformation gestures involving more than one pointer ("multitouch")
+ * using the supplied {@link MotionEvent}s. The {@link OnGestureListener} callback
+ * will notify users when a particular gesture event has occurred. This class
+ * should only be used with {@link MotionEvent}s reported via touch.
+ *
+ * To use this class:
+ * <ul>
+ * <li>Create an instance of the {@code TransformGestureDetector} for your
+ * {@link View}
+ * <li>In the {@link View#onTouchEvent(MotionEvent)} method ensure you call
+ * {@link #onTouchEvent(MotionEvent)}. The methods defined in your
+ * callback will be executed when the events occur.
+ * </ul>
+ * @hide Pending API approval
+ */
+public class TransformGestureDetector {
+ /**
+ * The listener for receiving notifications when gestures occur.
+ * If you want to listen for all the different gestures then implement
+ * this interface. If you only want to listen for a subset it might
+ * be easier to extend {@link SimpleOnGestureListener}.
+ *
+ * An application will receive events in the following order:
+ * One onTransformBegin()
+ * Zero or more onTransform()
+ * One onTransformEnd() or onTransformFling()
+ */
+ public interface OnTransformGestureListener {
+ /**
+ * Responds to transformation events for a gesture in progress.
+ * Reported by pointer motion.
+ *
+ * @param detector The detector reporting the event - use this to
+ * retrieve extended info about event state.
+ * @return true if the event was handled, false otherwise.
+ */
+ public boolean onTransform(TransformGestureDetector detector);
+
+ /**
+ * Responds to the beginning of a transformation gesture. Reported by
+ * new pointers going down.
+ *
+ * @param detector The detector reporting the event - use this to
+ * retrieve extended info about event state.
+ * @return true if the event was handled, false otherwise.
+ */
+ public boolean onTransformBegin(TransformGestureDetector detector);
+
+ /**
+ * Responds to the end of a transformation gesture. Reported by existing
+ * pointers going up. If the end of a gesture would result in a fling,
+ * onTransformFling is called instead.
+ *
+ * @param detector The detector reporting the event - use this to
+ * retrieve extended info about event state.
+ * @return true if the event was handled, false otherwise.
+ */
+ public boolean onTransformEnd(TransformGestureDetector detector);
+
+ /**
+ * Responds to the end of a transformation gesture that begins a fling.
+ * Reported by existing pointers going up. If the end of a gesture
+ * would not result in a fling, onTransformEnd is called instead.
+ *
+ * @param detector The detector reporting the event - use this to
+ * retrieve extended info about event state.
+ * @return true if the event was handled, false otherwise.
+ */
+ public boolean onTransformFling(TransformGestureDetector detector);
+ }
+
+ private static final boolean DEBUG = false;
+
+ private static final int INITIAL_EVENT_IGNORES = 2;
+
+ private Context mContext;
+ private float mTouchSizeScale;
+ private OnTransformGestureListener mListener;
+ private int mVelocityTimeUnits;
+ private MotionEvent mInitialEvent;
+
+ private MotionEvent mPrevEvent;
+ private MotionEvent mCurrEvent;
+ private VelocityTracker mVelocityTracker;
+
+ private float mCenterX;
+ private float mCenterY;
+ private float mTransX;
+ private float mTransY;
+ private float mPrevFingerDiffX;
+ private float mPrevFingerDiffY;
+ private float mCurrFingerDiffX;
+ private float mCurrFingerDiffY;
+ private float mRotateDegrees;
+ private float mCurrLen;
+ private float mPrevLen;
+ private float mScaleFactor;
+
+ // Units in pixels. Current value is pulled out of thin air for debugging only.
+ private float mPointerJumpLimit = 30;
+
+ private int mEventIgnoreCount;
+
+ public TransformGestureDetector(Context context, OnTransformGestureListener listener,
+ int velocityTimeUnits) {
+ mContext = context;
+ mListener = listener;
+ mTouchSizeScale = context.getResources().getDisplayMetrics().widthPixels/3;
+ mVelocityTimeUnits = velocityTimeUnits;
+ mEventIgnoreCount = INITIAL_EVENT_IGNORES;
+ }
+
+ public TransformGestureDetector(Context context, OnTransformGestureListener listener) {
+ this(context, listener, 1000);
+ }
+
+ public boolean onTouchEvent(MotionEvent event) {
+ final int action = event.getAction();
+ boolean handled = true;
+
+ if (mInitialEvent == null) {
+ // No transform gesture in progress
+ if ((action == MotionEvent.ACTION_POINTER_1_DOWN ||
+ action == MotionEvent.ACTION_POINTER_2_DOWN) &&
+ event.getPointerCount() >= 2) {
+ // We have a new multi-finger gesture
+ mInitialEvent = MotionEvent.obtain(event);
+ mPrevEvent = MotionEvent.obtain(event);
+ mVelocityTracker = VelocityTracker.obtain();
+ handled = mListener.onTransformBegin(this);
+ }
+ } else {
+ // Transform gesture in progress - attempt to handle it
+ switch (action) {
+ case MotionEvent.ACTION_POINTER_1_UP:
+ case MotionEvent.ACTION_POINTER_2_UP:
+ // Gesture ended
+ handled = mListener.onTransformEnd(this);
+
+ reset();
+ break;
+
+ case MotionEvent.ACTION_CANCEL:
+ handled = mListener.onTransformEnd(this);
+
+ reset();
+ break;
+
+ case MotionEvent.ACTION_MOVE:
+ setContext(event);
+
+ // Our first few events can be crazy from some touchscreens - drop them.
+ if (mEventIgnoreCount == 0) {
+ mVelocityTracker.addMovement(event);
+ handled = mListener.onTransform(this);
+ } else {
+ mEventIgnoreCount--;
+ }
+
+ mPrevEvent.recycle();
+ mPrevEvent = MotionEvent.obtain(event);
+ break;
+ }
+ }
+ return handled;
+ }
+
+ private void setContext(MotionEvent curr) {
+ mCurrEvent = MotionEvent.obtain(curr);
+
+ mRotateDegrees = -1;
+ mCurrLen = -1;
+ mPrevLen = -1;
+ mScaleFactor = -1;
+
+ final MotionEvent prev = mPrevEvent;
+
+ float px0 = prev.getX(0);
+ float py0 = prev.getY(0);
+ float px1 = prev.getX(1);
+ float py1 = prev.getY(1);
+ float cx0 = curr.getX(0);
+ float cy0 = curr.getY(0);
+ float cx1 = curr.getX(1);
+ float cy1 = curr.getY(1);
+
+ // Some touchscreens do weird things with pointer values where points are
+ // too close along one axis. Try to detect this here and smooth things out.
+ // The main indicator is that we get the X or Y value from the other pointer.
+ final float dx0 = cx0 - px0;
+ final float dy0 = cy0 - py0;
+ final float dx1 = cx1 - px1;
+ final float dy1 = cy1 - py1;
+
+ if (cx0 == cx1) {
+ if (Math.abs(dx0) > mPointerJumpLimit) {
+ cx0 = px0;
+ } else if (Math.abs(dx1) > mPointerJumpLimit) {
+ cx1 = px1;
+ }
+ } else if (cy0 == cy1) {
+ if (Math.abs(dy0) > mPointerJumpLimit) {
+ cy0 = py0;
+ } else if (Math.abs(dy1) > mPointerJumpLimit) {
+ cy1 = py1;
+ }
+ }
+
+ final float pvx = px1 - px0;
+ final float pvy = py1 - py0;
+ final float cvx = cx1 - cx0;
+ final float cvy = cy1 - cy0;
+ mPrevFingerDiffX = pvx;
+ mPrevFingerDiffY = pvy;
+ mCurrFingerDiffX = cvx;
+ mCurrFingerDiffY = cvy;
+
+ final float pmidx = px0 + pvx * 0.5f;
+ final float pmidy = py0 + pvy * 0.5f;
+ final float cmidx = cx0 + cvx * 0.5f;
+ final float cmidy = cy0 + cvy * 0.5f;
+
+ mCenterX = cmidx;
+ mCenterY = cmidy;
+ mTransX = cmidx - pmidx;
+ mTransY = cmidy - pmidy;
+ }
+
+ private void reset() {
+ if (mInitialEvent != null) {
+ mInitialEvent.recycle();
+ mInitialEvent = null;
+ }
+ if (mPrevEvent != null) {
+ mPrevEvent.recycle();
+ mPrevEvent = null;
+ }
+ if (mCurrEvent != null) {
+ mCurrEvent.recycle();
+ mCurrEvent = null;
+ }
+ if (mVelocityTracker != null) {
+ mVelocityTracker.recycle();
+ mVelocityTracker = null;
+ }
+ mEventIgnoreCount = INITIAL_EVENT_IGNORES;
+ }
+
+ public float getCenterX() {
+ return mCenterX;
+ }
+
+ public float getCenterY() {
+ return mCenterY;
+ }
+
+ public float getTranslateX() {
+ return mTransX;
+ }
+
+ public float getTranslateY() {
+ return mTransY;
+ }
+
+ public float getCurrentSpan() {
+ if (mCurrLen == -1) {
+ final float cvx = mCurrFingerDiffX;
+ final float cvy = mCurrFingerDiffY;
+ mCurrLen = (float)Math.sqrt(cvx*cvx + cvy*cvy);
+ }
+ return mCurrLen;
+ }
+
+ public float getPreviousSpan() {
+ if (mPrevLen == -1) {
+ final float pvx = mPrevFingerDiffX;
+ final float pvy = mPrevFingerDiffY;
+ mPrevLen = (float)Math.sqrt(pvx*pvx + pvy*pvy);
+ }
+ return mPrevLen;
+ }
+
+ public float getScaleFactor() {
+ if (mScaleFactor == -1) {
+ mScaleFactor = getCurrentSpan() / getPreviousSpan();
+ }
+ return mScaleFactor;
+ }
+
+ public float getRotation() {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/core/java/android/view/VelocityTracker.java b/core/java/android/view/VelocityTracker.java
index 5d89c46..9581080 100644
--- a/core/java/android/view/VelocityTracker.java
+++ b/core/java/android/view/VelocityTracker.java
@@ -55,12 +55,12 @@
}
}, 2));
- final float mPastX[] = new float[NUM_PAST];
- final float mPastY[] = new float[NUM_PAST];
- final long mPastTime[] = new long[NUM_PAST];
+ final float mPastX[][] = new float[MotionEvent.BASE_AVAIL_POINTERS][NUM_PAST];
+ final float mPastY[][] = new float[MotionEvent.BASE_AVAIL_POINTERS][NUM_PAST];
+ final long mPastTime[][] = new long[MotionEvent.BASE_AVAIL_POINTERS][NUM_PAST];
- float mYVelocity;
- float mXVelocity;
+ float mYVelocity[] = new float[MotionEvent.BASE_AVAIL_POINTERS];
+ float mXVelocity[] = new float[MotionEvent.BASE_AVAIL_POINTERS];
private VelocityTracker mNext;
@@ -105,7 +105,9 @@
* Reset the velocity tracker back to its initial state.
*/
public void clear() {
- mPastTime[0] = 0;
+ for (int i = 0; i < MotionEvent.BASE_AVAIL_POINTERS; i++) {
+ mPastTime[i][0] = 0;
+ }
}
/**
@@ -120,18 +122,21 @@
public void addMovement(MotionEvent ev) {
long time = ev.getEventTime();
final int N = ev.getHistorySize();
- for (int i=0; i<N; i++) {
- addPoint(ev.getHistoricalX(i), ev.getHistoricalY(i),
- ev.getHistoricalEventTime(i));
+ final int pointerCount = ev.getPointerCount();
+ for (int p = 0; p < pointerCount; p++) {
+ for (int i=0; i<N; i++) {
+ addPoint(p, ev.getHistoricalX(p, i), ev.getHistoricalY(p, i),
+ ev.getHistoricalEventTime(i));
+ }
+ addPoint(p, ev.getX(p), ev.getY(p), time);
}
- addPoint(ev.getX(), ev.getY(), time);
}
- private void addPoint(float x, float y, long time) {
+ private void addPoint(int pos, float x, float y, long time) {
int drop = -1;
int i;
if (localLOGV) Log.v(TAG, "Adding past y=" + y + " time=" + time);
- final long[] pastTime = mPastTime;
+ final long[] pastTime = mPastTime[pos];
for (i=0; i<NUM_PAST; i++) {
if (pastTime[i] == 0) {
break;
@@ -146,8 +151,8 @@
drop = 0;
}
if (drop == i) drop--;
- final float[] pastX = mPastX;
- final float[] pastY = mPastY;
+ final float[] pastX = mPastX[pos];
+ final float[] pastY = mPastY[pos];
if (drop >= 0) {
if (localLOGV) Log.v(TAG, "Dropping up to #" + drop);
final int start = drop+1;
@@ -190,44 +195,48 @@
* must be positive.
*/
public void computeCurrentVelocity(int units, float maxVelocity) {
- final float[] pastX = mPastX;
- final float[] pastY = mPastY;
- final long[] pastTime = mPastTime;
-
- // Kind-of stupid.
- final float oldestX = pastX[0];
- final float oldestY = pastY[0];
- final long oldestTime = pastTime[0];
- float accumX = 0;
- float accumY = 0;
- int N=0;
- while (N < NUM_PAST) {
- if (pastTime[N] == 0) {
- break;
+ for (int pos = 0; pos < MotionEvent.BASE_AVAIL_POINTERS; pos++) {
+ final float[] pastX = mPastX[pos];
+ final float[] pastY = mPastY[pos];
+ final long[] pastTime = mPastTime[pos];
+
+ // Kind-of stupid.
+ final float oldestX = pastX[0];
+ final float oldestY = pastY[0];
+ final long oldestTime = pastTime[0];
+ float accumX = 0;
+ float accumY = 0;
+ int N=0;
+ while (N < NUM_PAST) {
+ if (pastTime[N] == 0) {
+ break;
+ }
+ N++;
}
- N++;
+ // Skip the last received event, since it is probably pretty noisy.
+ if (N > 3) N--;
+
+ for (int i=1; i < N; i++) {
+ final int dur = (int)(pastTime[i] - oldestTime);
+ if (dur == 0) continue;
+ float dist = pastX[i] - oldestX;
+ float vel = (dist/dur) * units; // pixels/frame.
+ if (accumX == 0) accumX = vel;
+ else accumX = (accumX + vel) * .5f;
+
+ dist = pastY[i] - oldestY;
+ vel = (dist/dur) * units; // pixels/frame.
+ if (accumY == 0) accumY = vel;
+ else accumY = (accumY + vel) * .5f;
+ }
+ mXVelocity[pos] = accumX < 0.0f ? Math.max(accumX, -maxVelocity)
+ : Math.min(accumX, maxVelocity);
+ mYVelocity[pos] = accumY < 0.0f ? Math.max(accumY, -maxVelocity)
+ : Math.min(accumY, maxVelocity);
+
+ if (localLOGV) Log.v(TAG, "Y velocity=" + mYVelocity +" X velocity="
+ + mXVelocity + " N=" + N);
}
- // Skip the last received event, since it is probably pretty noisy.
- if (N > 3) N--;
-
- for (int i=1; i < N; i++) {
- final int dur = (int)(pastTime[i] - oldestTime);
- if (dur == 0) continue;
- float dist = pastX[i] - oldestX;
- float vel = (dist/dur) * units; // pixels/frame.
- if (accumX == 0) accumX = vel;
- else accumX = (accumX + vel) * .5f;
-
- dist = pastY[i] - oldestY;
- vel = (dist/dur) * units; // pixels/frame.
- if (accumY == 0) accumY = vel;
- else accumY = (accumY + vel) * .5f;
- }
- mXVelocity = accumX < 0.0f ? Math.max(accumX, -maxVelocity) : Math.min(accumX, maxVelocity);
- mYVelocity = accumY < 0.0f ? Math.max(accumY, -maxVelocity) : Math.min(accumY, maxVelocity);
-
- if (localLOGV) Log.v(TAG, "Y velocity=" + mYVelocity +" X velocity="
- + mXVelocity + " N=" + N);
}
/**
@@ -237,7 +246,7 @@
* @return The previously computed X velocity.
*/
public float getXVelocity() {
- return mXVelocity;
+ return mXVelocity[0];
}
/**
@@ -247,6 +256,32 @@
* @return The previously computed Y velocity.
*/
public float getYVelocity() {
- return mYVelocity;
+ return mYVelocity[0];
+ }
+
+ /**
+ * Retrieve the last computed X velocity. You must first call
+ * {@link #computeCurrentVelocity(int)} before calling this function.
+ *
+ * @param pos Which pointer's velocity to return.
+ * @return The previously computed X velocity.
+ *
+ * @hide Pending API approval
+ */
+ public float getXVelocity(int pos) {
+ return mXVelocity[pos];
+ }
+
+ /**
+ * Retrieve the last computed Y velocity. You must first call
+ * {@link #computeCurrentVelocity(int)} before calling this function.
+ *
+ * @param pos Which pointer's velocity to return.
+ * @return The previously computed Y velocity.
+ *
+ * @hide Pending API approval
+ */
+ public float getYVelocity(int pos) {
+ return mYVelocity[pos];
}
}
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 5bd45a66a..df4cab0 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -379,7 +379,7 @@
* dimension, it can specify one of:
* <ul>
* <li> an exact number
- * <li>FILL_PARENT, which means the view wants to be as big as its parent
+ * <li>MATCH_PARENT, which means the view wants to be as big as its parent
* (minus padding)
* <li> WRAP_CONTENT, which means that the view wants to be just big enough to
* enclose its content (plus padding).
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 6646136..763f273 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -3070,7 +3070,7 @@
if (childDimension >= 0) {
resultSize = childDimension;
resultMode = MeasureSpec.EXACTLY;
- } else if (childDimension == LayoutParams.FILL_PARENT) {
+ } else if (childDimension == LayoutParams.MATCH_PARENT) {
// Child wants to be our size. So be it.
resultSize = size;
resultMode = MeasureSpec.EXACTLY;
@@ -3088,7 +3088,7 @@
// Child wants a specific size... so be it
resultSize = childDimension;
resultMode = MeasureSpec.EXACTLY;
- } else if (childDimension == LayoutParams.FILL_PARENT) {
+ } else if (childDimension == LayoutParams.MATCH_PARENT) {
// Child wants to be our size, but our size is not fixed.
// Constrain child to not be bigger than us.
resultSize = size;
@@ -3107,7 +3107,7 @@
// Child wants a specific size... let him have it
resultSize = childDimension;
resultMode = MeasureSpec.EXACTLY;
- } else if (childDimension == LayoutParams.FILL_PARENT) {
+ } else if (childDimension == LayoutParams.MATCH_PARENT) {
// Child wants to be our size... find out how big it should
// be
resultSize = 0;
@@ -3362,7 +3362,7 @@
* for both width and height. For each dimension, it can specify one of:
* <ul>
* <li> an exact number
- * <li>FILL_PARENT, which means the view wants to be as big as its parent
+ * <li>MATCH_PARENT, which means the view wants to be as big as its parent
* (minus padding)
* <li> WRAP_CONTENT, which means that the view wants to be just big enough
* to enclose its content (plus padding)
@@ -3376,14 +3376,22 @@
*/
public static class LayoutParams {
/**
- * Special value for the height or width requested by a View.
- * FILL_PARENT means that the view wants to fill the available space
- * within the parent, taking the parent's padding into account.
+ * This value has the same meaning as {@link #MATCH_PARENT} but has
+ * been deprecated.
*/
+ @SuppressWarnings({"UnusedDeclaration"})
+ @Deprecated
public static final int FILL_PARENT = -1;
/**
* Special value for the height or width requested by a View.
+ * MATCH_PARENT means that the view wants to be as bigas its parent,
+ * minus the parent's padding, if any.
+ */
+ public static final int MATCH_PARENT = -1;
+
+ /**
+ * Special value for the height or width requested by a View.
* WRAP_CONTENT means that the view wants to be just large enough to fit
* its own internal content, taking its own padding into account.
*/
@@ -3391,20 +3399,20 @@
/**
* Information about how wide the view wants to be. Can be an exact
- * size, or one of the constants FILL_PARENT or WRAP_CONTENT.
+ * size, or one of the constants MATCH_PARENT or WRAP_CONTENT.
*/
@ViewDebug.ExportedProperty(mapping = {
- @ViewDebug.IntToString(from = FILL_PARENT, to = "FILL_PARENT"),
+ @ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"),
@ViewDebug.IntToString(from = WRAP_CONTENT, to = "WRAP_CONTENT")
})
public int width;
/**
* Information about how tall the view wants to be. Can be an exact
- * size, or one of the constants FILL_PARENT or WRAP_CONTENT.
+ * size, or one of the constants MATCH_PARENT or WRAP_CONTENT.
*/
@ViewDebug.ExportedProperty(mapping = {
- @ViewDebug.IntToString(from = FILL_PARENT, to = "FILL_PARENT"),
+ @ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"),
@ViewDebug.IntToString(from = WRAP_CONTENT, to = "WRAP_CONTENT")
})
public int height;
@@ -3421,9 +3429,9 @@
*
* <ul>
* <li><code>layout_width</code>: the width, either an exact value,
- * {@link #WRAP_CONTENT} or {@link #FILL_PARENT}</li>
+ * {@link #WRAP_CONTENT} or {@link #MATCH_PARENT}</li>
* <li><code>layout_height</code>: the height, either an exact value,
- * {@link #WRAP_CONTENT} or {@link #FILL_PARENT}</li>
+ * {@link #WRAP_CONTENT} or {@link #MATCH_PARENT}</li>
* </ul>
*
* @param c the application environment
@@ -3442,9 +3450,9 @@
* Creates a new set of layout parameters with the specified width
* and height.
*
- * @param width the width, either {@link #FILL_PARENT},
+ * @param width the width, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
- * @param height the height, either {@link #FILL_PARENT},
+ * @param height the height, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
*/
public LayoutParams(int width, int height) {
@@ -3507,8 +3515,8 @@
if (size == WRAP_CONTENT) {
return "wrap-content";
}
- if (size == FILL_PARENT) {
- return "fill-parent";
+ if (size == MATCH_PARENT) {
+ return "match-parent";
}
return String.valueOf(size);
}
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index 47b976b..094b7dd 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -1167,7 +1167,7 @@
int measureSpec;
switch (rootDimension) {
- case ViewGroup.LayoutParams.FILL_PARENT:
+ case ViewGroup.LayoutParams.MATCH_PARENT:
// Window can't resize. Force root view to be windowSize.
measureSpec = MeasureSpec.makeMeasureSpec(windowSize, MeasureSpec.EXACTLY);
break;
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 1932765..7dd5085 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -484,7 +484,7 @@
/**
* Set the width and height layout parameters of the window. The default
- * for both of these is FILL_PARENT; you can change them to WRAP_CONTENT to
+ * for both of these is MATCH_PARENT; you can change them to WRAP_CONTENT to
* make a window that is not full-screen.
*
* @param width The desired layout width of the window.
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index fe329f2..8e15f89 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -771,26 +771,26 @@
public LayoutParams() {
- super(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
type = TYPE_APPLICATION;
format = PixelFormat.OPAQUE;
}
public LayoutParams(int _type) {
- super(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
type = _type;
format = PixelFormat.OPAQUE;
}
public LayoutParams(int _type, int _flags) {
- super(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
type = _type;
flags = _flags;
format = PixelFormat.OPAQUE;
}
public LayoutParams(int _type, int _flags, int _format) {
- super(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ super(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
type = _type;
flags = _flags;
format = _format;
@@ -1036,9 +1036,9 @@
sb.append(',');
sb.append(y);
sb.append(")(");
- sb.append((width==FILL_PARENT?"fill":(width==WRAP_CONTENT?"wrap":width)));
+ sb.append((width== MATCH_PARENT ?"fill":(width==WRAP_CONTENT?"wrap":width)));
sb.append('x');
- sb.append((height==FILL_PARENT?"fill":(height==WRAP_CONTENT?"wrap":height)));
+ sb.append((height== MATCH_PARENT ?"fill":(height==WRAP_CONTENT?"wrap":height)));
sb.append(")");
if (softInputMode != 0) {
sb.append(" sim=#");
diff --git a/core/java/android/view/WindowOrientationListener.java b/core/java/android/view/WindowOrientationListener.java
index 13606e7..2aba60b 100755
--- a/core/java/android/view/WindowOrientationListener.java
+++ b/core/java/android/view/WindowOrientationListener.java
@@ -33,13 +33,12 @@
public abstract class WindowOrientationListener {
private static final String TAG = "WindowOrientationListener";
private static final boolean DEBUG = false;
- private static final boolean localLOGV = DEBUG ? Config.LOGD : Config.LOGV;
+ private static final boolean localLOGV = DEBUG || Config.DEBUG;
private SensorManager mSensorManager;
private boolean mEnabled = false;
private int mRate;
private Sensor mSensor;
- private SensorEventListener mSensorEventListener;
- private int mSensorRotation = -1;
+ private SensorEventListenerImpl mSensorEventListener;
/**
* Creates a new WindowOrientationListener.
@@ -80,7 +79,6 @@
}
if (mEnabled == false) {
if (localLOGV) Log.d(TAG, "WindowOrientationListener enabled");
- mSensorRotation = -1;
mSensorManager.registerListener(mSensorEventListener, mSensor, mRate);
mEnabled = true;
}
@@ -96,23 +94,22 @@
}
if (mEnabled == true) {
if (localLOGV) Log.d(TAG, "WindowOrientationListener disabled");
- mSensorRotation = -1;
mSensorManager.unregisterListener(mSensorEventListener);
mEnabled = false;
}
}
public int getCurrentRotation() {
- return mSensorRotation;
+ if (mEnabled) {
+ return mSensorEventListener.getCurrentRotation();
+ }
+ return -1;
}
class SensorEventListenerImpl implements SensorEventListener {
private static final int _DATA_X = 0;
private static final int _DATA_Y = 1;
private static final int _DATA_Z = 2;
- // Angle around x-axis thats considered almost perfect vertical to hold
- // the device
- private static final int PIVOT = 20;
// Angle around x-asis that's considered almost too vertical. Beyond
// this angle will not result in any orientation changes. f phone faces uses,
// the device is leaning backward.
@@ -121,30 +118,61 @@
// angle will not result in any orientation changes. If phone faces uses,
// the device is leaning forward.
private static final int PIVOT_LOWER = -10;
- // Upper threshold limit for switching from portrait to landscape
- private static final int PL_UPPER = 295;
- // Lower threshold limit for switching from landscape to portrait
- private static final int LP_LOWER = 320;
- // Lower threshold limt for switching from portrait to landscape
- private static final int PL_LOWER = 270;
- // Upper threshold limit for switching from landscape to portrait
- private static final int LP_UPPER = 359;
- // Minimum angle which is considered landscape
- private static final int LANDSCAPE_LOWER = 235;
- // Minimum angle which is considered portrait
- private static final int PORTRAIT_LOWER = 60;
+ static final int ROTATION_0 = 0;
+ static final int ROTATION_90 = 1;
+ static final int ROTATION_180 = 2;
+ static final int ROTATION_270 = 3;
+ int mRotation = ROTATION_0;
+
+ // Threshold values defined for device rotation positions
+ // follow order ROTATION_0 .. ROTATION_270
+ final int THRESHOLDS[][][] = new int[][][] {
+ {{60, 135}, {135, 225}, {225, 300}},
+ {{0, 45}, {45, 135}, {135, 210}, {330, 360}},
+ {{0, 45}, {45, 120}, {240, 315}, {315, 360}},
+ {{0, 30}, {150, 225}, {225, 315}, {315, 360}}
+ };
+
+ // Transform rotation ranges based on THRESHOLDS. This
+ // has to be in step with THESHOLDS
+ final int ROTATE_TO[][] = new int[][] {
+ {ROTATION_270, ROTATION_180, ROTATION_90},
+ {ROTATION_0, ROTATION_270, ROTATION_180, ROTATION_0},
+ {ROTATION_0, ROTATION_270, ROTATION_90, ROTATION_0},
+ {ROTATION_0, ROTATION_180, ROTATION_90, ROTATION_0}
+ };
+
+ // Mapping into actual Surface rotation values
+ final int TRANSFORM_ROTATIONS[] = new int[]{Surface.ROTATION_0,
+ Surface.ROTATION_90, Surface.ROTATION_180, Surface.ROTATION_270};
+
+ int getCurrentRotation() {
+ return TRANSFORM_ROTATIONS[mRotation];
+ }
- // Internal value used for calculating linear variant
- private static final float PL_LF_UPPER =
- ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT_UPPER-PIVOT));
- private static final float PL_LF_LOWER =
- ((float)(PL_UPPER-PL_LOWER))/((float)(PIVOT-PIVOT_LOWER));
- // Internal value used for calculating linear variant
- private static final float LP_LF_UPPER =
- ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT_UPPER-PIVOT));
- private static final float LP_LF_LOWER =
- ((float)(LP_UPPER - LP_LOWER))/((float)(PIVOT-PIVOT_LOWER));
-
+ private void calculateNewRotation(int orientation, int zyangle) {
+ if (localLOGV) Log.i(TAG, orientation + ", " + zyangle + ", " + mRotation);
+ int rangeArr[][] = THRESHOLDS[mRotation];
+ int row = -1;
+ for (int i = 0; i < rangeArr.length; i++) {
+ if ((orientation >= rangeArr[i][0]) && (orientation < rangeArr[i][1])) {
+ row = i;
+ break;
+ }
+ }
+ if (row != -1) {
+ // Find new rotation based on current rotation value.
+ // This also takes care of irregular rotations as well.
+ int rotation = ROTATE_TO[mRotation][row];
+ if (localLOGV) Log.i(TAG, " new rotation = " + rotation);
+ if (rotation != mRotation) {
+ mRotation = rotation;
+ // Trigger orientation change
+ onOrientationChanged(TRANSFORM_ROTATIONS[rotation]);
+ }
+ }
+ }
+
public void onSensorChanged(SensorEvent event) {
float[] values = event.values;
float X = values[_DATA_X];
@@ -153,53 +181,19 @@
float OneEightyOverPi = 57.29577957855f;
float gravity = (float) Math.sqrt(X*X+Y*Y+Z*Z);
float zyangle = (float)Math.asin(Z/gravity)*OneEightyOverPi;
- int rotation = -1;
if ((zyangle <= PIVOT_UPPER) && (zyangle >= PIVOT_LOWER)) {
// Check orientation only if the phone is flat enough
// Don't trust the angle if the magnitude is small compared to the y value
float angle = (float)Math.atan2(Y, -X) * OneEightyOverPi;
- int orientation = 90 - (int)Math.round(angle);
+ int orientation = 90 - Math.round(angle);
// normalize to 0 - 359 range
while (orientation >= 360) {
orientation -= 360;
- }
+ }
while (orientation < 0) {
orientation += 360;
}
- // Orientation values between LANDSCAPE_LOWER and PL_LOWER
- // are considered landscape.
- // Ignore orientation values between 0 and LANDSCAPE_LOWER
- // For orientation values between LP_UPPER and PL_LOWER,
- // the threshold gets set linearly around PIVOT.
- if ((orientation >= PL_LOWER) && (orientation <= LP_UPPER)) {
- float threshold;
- float delta = zyangle - PIVOT;
- if (mSensorRotation == Surface.ROTATION_90) {
- if (delta < 0) {
- // Delta is negative
- threshold = LP_LOWER - (LP_LF_LOWER * delta);
- } else {
- threshold = LP_LOWER + (LP_LF_UPPER * delta);
- }
- rotation = (orientation >= threshold) ? Surface.ROTATION_0 : Surface.ROTATION_90;
- } else {
- if (delta < 0) {
- // Delta is negative
- threshold = PL_UPPER+(PL_LF_LOWER * delta);
- } else {
- threshold = PL_UPPER-(PL_LF_UPPER * delta);
- }
- rotation = (orientation <= threshold) ? Surface.ROTATION_90: Surface.ROTATION_0;
- }
- } else if ((orientation >= LANDSCAPE_LOWER) && (orientation < LP_LOWER)) {
- rotation = Surface.ROTATION_90;
- } else if ((orientation >= PL_UPPER) || (orientation <= PORTRAIT_LOWER)) {
- rotation = Surface.ROTATION_0;
- }
- if ((rotation != -1) && (rotation != mSensorRotation)) {
- mSensorRotation = rotation;
- onOrientationChanged(mSensorRotation);
- }
+ calculateNewRotation(orientation, Math.round(zyangle));
}
}
diff --git a/core/java/android/view/inputmethod/EditorInfo.java b/core/java/android/view/inputmethod/EditorInfo.java
index c718bac..3da18d6 100644
--- a/core/java/android/view/inputmethod/EditorInfo.java
+++ b/core/java/android/view/inputmethod/EditorInfo.java
@@ -111,7 +111,15 @@
* flag for you on multi-line text views.
*/
public static final int IME_FLAG_NO_ENTER_ACTION = 0x40000000;
-
+
+ /**
+ * Flag of {@link #imeOptions}: used to request that the IME never go
+ * into fullscreen mode. Applications need to be aware that the flag is not
+ * a guarantee, and not all IMEs will respect it.
+ * @hide
+ */
+ public static final int IME_FLAG_NO_FULLSCREEN = 0x80000000;
+
/**
* Generic unspecified type for {@link #imeOptions}.
*/
diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java
index c4e26bc..22dca3a 100644
--- a/core/java/android/webkit/CacheManager.java
+++ b/core/java/android/webkit/CacheManager.java
@@ -56,6 +56,9 @@
private static long CACHE_THRESHOLD = 6 * 1024 * 1024;
private static long CACHE_TRIM_AMOUNT = 2 * 1024 * 1024;
+ // Limit the maximum cache file size to half of the normal capacity
+ static long CACHE_MAX_SIZE = (CACHE_THRESHOLD - CACHE_TRIM_AMOUNT) / 2;
+
private static boolean mDisabled;
// Reference count the enable/disable transaction
@@ -448,7 +451,6 @@
return;
}
- cacheRet.contentLength = cacheRet.outFile.length();
boolean redirect = checkCacheRedirect(cacheRet.httpStatusCode);
if (redirect) {
// location is in database, no need to keep the file
@@ -470,6 +472,15 @@
}
}
+ static boolean cleanupCacheFile(CacheResult cacheRet) {
+ try {
+ cacheRet.outStream.close();
+ } catch (IOException e) {
+ return false;
+ }
+ return cacheRet.outFile.delete();
+ }
+
/**
* remove all cache files
*
@@ -644,6 +655,9 @@
private static CacheResult parseHeaders(int statusCode, Headers headers,
String mimeType) {
+ // if the contentLength is already larger than CACHE_MAX_SIZE, skip it
+ if (headers.getContentLength() > CACHE_MAX_SIZE) return null;
+
// TODO: if authenticated or secure, return null
CacheResult ret = new CacheResult();
ret.httpStatusCode = statusCode;
diff --git a/core/java/android/webkit/CallbackProxy.java b/core/java/android/webkit/CallbackProxy.java
index fb369d3..6790c5d 100644
--- a/core/java/android/webkit/CallbackProxy.java
+++ b/core/java/android/webkit/CallbackProxy.java
@@ -90,7 +90,6 @@
private static final int JS_PROMPT = 114;
private static final int JS_UNLOAD = 115;
private static final int ASYNC_KEYEVENTS = 116;
- private static final int TOO_MANY_REDIRECTS = 117;
private static final int DOWNLOAD_FILE = 118;
private static final int REPORT_ERROR = 119;
private static final int RESEND_POST_DATA = 120;
@@ -276,19 +275,6 @@
}
break;
- case TOO_MANY_REDIRECTS:
- Message cancelMsg =
- (Message) msg.getData().getParcelable("cancelMsg");
- Message continueMsg =
- (Message) msg.getData().getParcelable("continueMsg");
- if (mWebViewClient != null) {
- mWebViewClient.onTooManyRedirects(mWebView, cancelMsg,
- continueMsg);
- } else {
- cancelMsg.sendToTarget();
- }
- break;
-
case REPORT_ERROR:
if (mWebViewClient != null) {
int reasonCode = msg.arg1;
@@ -790,19 +776,10 @@
sendMessage(msg);
}
+ // Because this method is public and because CallbackProxy is mistakenly
+ // party of the public classes, we cannot remove this method.
public void onTooManyRedirects(Message cancelMsg, Message continueMsg) {
- // Do an unsynchronized quick check to avoid posting if no callback has
- // been set.
- if (mWebViewClient == null) {
- cancelMsg.sendToTarget();
- return;
- }
-
- Message msg = obtainMessage(TOO_MANY_REDIRECTS);
- Bundle bundle = msg.getData();
- bundle.putParcelable("cancelMsg", cancelMsg);
- bundle.putParcelable("continueMsg", continueMsg);
- sendMessage(msg);
+ // deprecated.
}
public void onReceivedError(int errorCode, String description,
diff --git a/core/java/android/webkit/DateSorter.java b/core/java/android/webkit/DateSorter.java
index c46702e..16feaa9 100644
--- a/core/java/android/webkit/DateSorter.java
+++ b/core/java/android/webkit/DateSorter.java
@@ -38,7 +38,7 @@
/** must be >= 3 */
public static final int DAY_COUNT = 5;
- private long [] mBins = new long[DAY_COUNT];
+ private long [] mBins = new long[DAY_COUNT-1];
private String [] mLabels = new String[DAY_COUNT];
private static final int NUM_DAYS_AGO = 5;
@@ -54,15 +54,13 @@
// Create the bins
mBins[0] = c.getTimeInMillis(); // Today
- c.roll(Calendar.DAY_OF_YEAR, -1);
+ c.add(Calendar.DAY_OF_YEAR, -1);
mBins[1] = c.getTimeInMillis(); // Yesterday
- c.roll(Calendar.DAY_OF_YEAR, -(NUM_DAYS_AGO - 1));
+ c.add(Calendar.DAY_OF_YEAR, -(NUM_DAYS_AGO - 1));
mBins[2] = c.getTimeInMillis(); // Five days ago
- c.roll(Calendar.DAY_OF_YEAR, NUM_DAYS_AGO); // move back to today
- c.roll(Calendar.MONTH, -1);
+ c.add(Calendar.DAY_OF_YEAR, NUM_DAYS_AGO); // move back to today
+ c.add(Calendar.MONTH, -1);
mBins[3] = c.getTimeInMillis(); // One month ago
- c.roll(Calendar.MONTH, -1);
- mBins[4] = c.getTimeInMillis(); // Over one month ago
// build labels
mLabels[0] = context.getText(com.android.internal.R.string.today).toString();
@@ -84,11 +82,11 @@
* date bin this date belongs to
*/
public int getIndex(long time) {
- // Lame linear search
- for (int i = 0; i < DAY_COUNT; i++) {
+ int lastDay = DAY_COUNT - 1;
+ for (int i = 0; i < lastDay; i++) {
if (time > mBins[i]) return i;
}
- return DAY_COUNT - 1;
+ return lastDay;
}
/**
@@ -96,6 +94,7 @@
* @return string label suitable for display to user
*/
public String getLabel(int index) {
+ if (index < 0 || index >= DAY_COUNT) return "";
return mLabels[index];
}
@@ -105,17 +104,22 @@
* @return date boundary at given index
*/
public long getBoundary(int index) {
+ int lastDay = DAY_COUNT - 1;
+ // Error case
+ if (index < 0 || index > lastDay) index = 0;
+ // Since this provides a lower boundary on dates that will be included
+ // in the given bin, provide the smallest value
+ if (index == lastDay) return Long.MIN_VALUE;
return mBins[index];
}
/**
* Calcuate 12:00am by zeroing out hour, minute, second, millisecond
*/
- private Calendar beginningOfDay(Calendar c) {
+ private void beginningOfDay(Calendar c) {
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
- return c;
}
}
diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java
index 3e0be1c..429b335 100644
--- a/core/java/android/webkit/HTML5VideoViewProxy.java
+++ b/core/java/android/webkit/HTML5VideoViewProxy.java
@@ -48,6 +48,8 @@
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
+import java.util.Timer;
+import java.util.TimerTask;
/**
* <p>Proxy for HTML5 video views.
@@ -71,6 +73,9 @@
private static final int ENDED = 201;
private static final int POSTER_FETCHED = 202;
+ // Timer thread -> UI thread
+ private static final int TIMEUPDATE = 300;
+
// The C++ MediaPlayerPrivateAndroid object.
int mNativePointer;
// The handler for WebCore thread messages;
@@ -95,6 +100,22 @@
private static View mProgressView;
// The container for the progress view and video view
private static FrameLayout mLayout;
+ // The timer for timeupate events.
+ // See http://www.whatwg.org/specs/web-apps/current-work/#event-media-timeupdate
+ private static Timer mTimer;
+ private static final class TimeupdateTask extends TimerTask {
+ private HTML5VideoViewProxy mProxy;
+
+ public TimeupdateTask(HTML5VideoViewProxy proxy) {
+ mProxy = proxy;
+ }
+
+ public void run() {
+ mProxy.onTimeupdate();
+ }
+ }
+ // The spec says the timer should fire every 250 ms or less.
+ private static final int TIMEUPDATE_PERIOD = 250; // ms
private static final WebChromeClient.CustomViewCallback mCallback =
new WebChromeClient.CustomViewCallback() {
@@ -104,6 +125,8 @@
// which happens when the video view is detached from its parent
// view. This happens in the WebChromeClient before this method
// is invoked.
+ mTimer.cancel();
+ mTimer = null;
mCurrentProxy.playbackEnded();
mCurrentProxy = null;
mLayout.removeView(mVideoView);
@@ -118,11 +141,19 @@
public static void play(String url, int time, HTML5VideoViewProxy proxy,
WebChromeClient client) {
+ if (mCurrentProxy == proxy) {
+ if (!mVideoView.isPlaying()) {
+ mVideoView.start();
+ }
+ return;
+ }
+
if (mCurrentProxy != null) {
// Some other video is already playing. Notify the caller that its playback ended.
proxy.playbackEnded();
return;
}
+
mCurrentProxy = proxy;
// Create a FrameLayout that will contain the VideoView and the
// progress view (if any).
@@ -146,10 +177,23 @@
mProgressView.setVisibility(View.VISIBLE);
}
mLayout.setVisibility(View.VISIBLE);
+ mTimer = new Timer();
mVideoView.start();
client.onShowCustomView(mLayout, mCallback);
}
+ public static boolean isPlaying(HTML5VideoViewProxy proxy) {
+ return (mCurrentProxy == proxy && mVideoView != null && mVideoView.isPlaying());
+ }
+
+ public static int getCurrentPosition() {
+ int currentPosMs = 0;
+ if (mVideoView != null) {
+ currentPosMs = mVideoView.getCurrentPosition();
+ }
+ return currentPosMs;
+ }
+
public static void seek(int time, HTML5VideoViewProxy proxy) {
if (mCurrentProxy == proxy && time >= 0 && mVideoView != null) {
mVideoView.seekTo(time);
@@ -159,10 +203,13 @@
public static void pause(HTML5VideoViewProxy proxy) {
if (mCurrentProxy == proxy && mVideoView != null) {
mVideoView.pause();
+ mTimer.purge();
}
}
public static void onPrepared() {
+ mTimer.schedule(new TimeupdateTask(mCurrentProxy), TIMEUPDATE_PERIOD, TIMEUPDATE_PERIOD);
+
if (mProgressView == null || mLayout == null) {
return;
}
@@ -203,7 +250,11 @@
sendMessage(obtainMessage(ENDED));
}
- // Handler for the messages from WebCore thread to the UI thread.
+ public void onTimeupdate() {
+ sendMessage(obtainMessage(TIMEUPDATE));
+ }
+
+ // Handler for the messages from WebCore or Timer thread to the UI thread.
@Override
public void handleMessage(Message msg) {
// This executes on the UI thread.
@@ -241,6 +292,12 @@
}
break;
}
+ case TIMEUPDATE: {
+ if (VideoPlayer.isPlaying(this)) {
+ sendTimeupdate();
+ }
+ break;
+ }
}
}
@@ -410,6 +467,9 @@
Bitmap poster = (Bitmap) msg.obj;
nativeOnPosterFetched(poster, mNativePointer);
break;
+ case TIMEUPDATE:
+ nativeOnTimeupdate(msg.arg1, mNativePointer);
+ break;
}
}
};
@@ -426,6 +486,12 @@
mWebCoreHandler.sendMessage(msg);
}
+ private void sendTimeupdate() {
+ Message msg = Message.obtain(mWebCoreHandler, TIMEUPDATE);
+ msg.arg1 = VideoPlayer.getCurrentPosition();
+ mWebCoreHandler.sendMessage(msg);
+ }
+
public Context getContext() {
return mWebView.getContext();
}
@@ -506,4 +572,5 @@
private native void nativeOnPrepared(int duration, int width, int height, int nativePointer);
private native void nativeOnEnded(int nativePointer);
private native void nativeOnPosterFetched(Bitmap poster, int nativePointer);
+ private native void nativeOnTimeupdate(int position, int nativePointer);
}
diff --git a/core/java/android/webkit/LoadListener.java b/core/java/android/webkit/LoadListener.java
index c2b9f20..cdc6608 100644
--- a/core/java/android/webkit/LoadListener.java
+++ b/core/java/android/webkit/LoadListener.java
@@ -936,8 +936,11 @@
void downloadFile() {
// Setting the Cache Result to null ensures that this
// content is not added to the cache
- mCacheResult = null;
-
+ if (mCacheResult != null) {
+ CacheManager.cleanupCacheFile(mCacheResult);
+ mCacheResult = null;
+ }
+
// Inform the client that they should download a file
mBrowserFrame.getCallbackProxy().onDownloadStart(url(),
mBrowserFrame.getUserAgentString(),
@@ -1096,10 +1099,18 @@
if (c.mLength != 0) {
if (mCacheResult != null) {
- try {
- mCacheResult.outStream.write(c.mArray, 0, c.mLength);
- } catch (IOException e) {
+ mCacheResult.contentLength += c.mLength;
+ if (mCacheResult.contentLength > CacheManager.CACHE_MAX_SIZE) {
+ CacheManager.cleanupCacheFile(mCacheResult);
mCacheResult = null;
+ } else {
+ try {
+ mCacheResult.outStream
+ .write(c.mArray, 0, c.mLength);
+ } catch (IOException e) {
+ CacheManager.cleanupCacheFile(mCacheResult);
+ mCacheResult = null;
+ }
}
}
nativeAddData(c.mArray, c.mLength);
@@ -1117,6 +1128,8 @@
if (mCacheResult != null) {
if (getErrorID() == OK) {
CacheManager.saveCacheFile(mUrl, mPostIdentifier, mCacheResult);
+ } else {
+ CacheManager.cleanupCacheFile(mCacheResult);
}
// we need to reset mCacheResult to be null
@@ -1181,7 +1194,10 @@
mRequestHandle = null;
}
- mCacheResult = null;
+ if (mCacheResult != null) {
+ CacheManager.cleanupCacheFile(mCacheResult);
+ mCacheResult = null;
+ }
mCancelled = true;
clearNativeLoader();
@@ -1246,6 +1262,8 @@
if (getErrorID() == OK) {
CacheManager.saveCacheFile(mUrl, mPostIdentifier,
mCacheResult);
+ } else {
+ CacheManager.cleanupCacheFile(mCacheResult);
}
mCacheResult = null;
}
diff --git a/core/java/android/webkit/MimeTypeMap.java b/core/java/android/webkit/MimeTypeMap.java
index 84a8a3c..a9d6ff6 100644
--- a/core/java/android/webkit/MimeTypeMap.java
+++ b/core/java/android/webkit/MimeTypeMap.java
@@ -124,6 +124,11 @@
return null;
}
+ // Static method called by jni.
+ private static String mimeTypeFromExtension(String extension) {
+ return getSingleton().getMimeTypeFromExtension(extension);
+ }
+
/**
* Return true if the given extension has a registered MIME type.
* @param extension A file extension without the leading '.'
@@ -344,6 +349,7 @@
sMimeTypeMap.loadEntry("application/x-pkcs7-crl", "crl");
sMimeTypeMap.loadEntry("application/x-quicktimeplayer", "qtl");
sMimeTypeMap.loadEntry("application/x-shar", "shar");
+ sMimeTypeMap.loadEntry("application/x-shockwave-flash", "swf");
sMimeTypeMap.loadEntry("application/x-stuffit", "sit");
sMimeTypeMap.loadEntry("application/x-sv4cpio", "sv4cpio");
sMimeTypeMap.loadEntry("application/x-sv4crc", "sv4crc");
diff --git a/core/java/android/webkit/PluginFullScreenHolder.java b/core/java/android/webkit/PluginFullScreenHolder.java
index 6a0b145..b641803 100644
--- a/core/java/android/webkit/PluginFullScreenHolder.java
+++ b/core/java/android/webkit/PluginFullScreenHolder.java
@@ -30,6 +30,7 @@
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewGroup;
class PluginFullScreenHolder extends Dialog {
@@ -37,6 +38,7 @@
private final WebView mWebView;
private final int mNpp;
+ private View mContentView;
private int mX;
private int mY;
private int mWidth;
@@ -64,6 +66,12 @@
}
@Override
+ public void setContentView(View contentView) {
+ super.setContentView(contentView);
+ mContentView = contentView;
+ }
+
+ @Override
public void onBackPressed() {
mWebView.mPrivateHandler.obtainMessage(WebView.HIDE_FULLSCREEN)
.sendToTarget();
@@ -113,6 +121,11 @@
@Override
protected void onStop() {
super.onStop();
+ // manually remove the contentView's parent since the dialog does not
+ if (mContentView != null && mContentView.getParent() != null) {
+ ViewGroup vg = (ViewGroup) mContentView.getParent();
+ vg.removeView(mContentView);
+ }
mWebView.getWebViewCore().sendMessage(
WebViewCore.EventHub.HIDE_FULLSCREEN, mNpp, 0);
}
diff --git a/core/java/android/webkit/PluginManager.java b/core/java/android/webkit/PluginManager.java
index 141984a..cdcb662 100644
--- a/core/java/android/webkit/PluginManager.java
+++ b/core/java/android/webkit/PluginManager.java
@@ -21,6 +21,7 @@
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
@@ -31,8 +32,6 @@
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.SystemProperties;
import android.util.Log;
-import android.webkit.plugin.NativePlugin;
-import android.webkit.plugin.WebkitPlugin;
/**
* Class for managing the relationship between the {@link WebView} and installed
@@ -43,12 +42,6 @@
*/
public class PluginManager {
- private class PluginInfo {
- public PackageInfo packageInfo;
- public boolean isNative;
- public Class<? extends WebkitPlugin> pluginClass;
- }
-
/**
* Service Action: A plugin wishes to be loaded in the WebView must provide
* {@link android.content.IntentFilter IntentFilter} that accepts this
@@ -75,7 +68,7 @@
private final Context mContext;
- private ArrayList<PluginInfo> mPluginInfoCache;
+ private ArrayList<PackageInfo> mPackageInfoCache;
// Only plugin matches one of the signatures in the list can be loaded
// inside the WebView process
@@ -87,7 +80,7 @@
private PluginManager(Context context) {
mContext = context;
- mPluginInfoCache = new ArrayList<PluginInfo>();
+ mPackageInfoCache = new ArrayList<PackageInfo>();
}
public static synchronized PluginManager getInstance(Context context) {
@@ -122,10 +115,10 @@
PLUGIN_ACTION), PackageManager.GET_SERVICES
| PackageManager.GET_META_DATA);
- synchronized(mPluginInfoCache) {
+ synchronized(mPackageInfoCache) {
// clear the list of existing packageInfo objects
- mPluginInfoCache.clear();
+ mPackageInfoCache.clear();
for (ResolveInfo info : plugins) {
@@ -192,9 +185,6 @@
}
}
- PluginInfo pluginInfo = new PluginInfo();
- pluginInfo.packageInfo = pkgInfo;
-
// determine the type of plugin from the manifest
if (serviceInfo.metaData == null) {
Log.e(LOGTAG, "The plugin '" + serviceInfo.name + "' has no type defined");
@@ -202,9 +192,7 @@
}
String pluginType = serviceInfo.metaData.getString(PLUGIN_TYPE);
- if (TYPE_NATIVE.equals(pluginType)) {
- pluginInfo.isNative = true;
- } else {
+ if (!TYPE_NATIVE.equals(pluginType)) {
Log.e(LOGTAG, "Unrecognized plugin type: " + pluginType);
continue;
}
@@ -212,17 +200,11 @@
try {
Class<?> cls = getPluginClass(serviceInfo.packageName, serviceInfo.name);
- boolean classFound = false;
- for(Class<?> implemented : cls.getInterfaces()) {
- if (pluginInfo.isNative && implemented.equals(NativePlugin.class)) {
- pluginInfo.pluginClass = cls.asSubclass(WebkitPlugin.class);
- classFound = true;
- break;
- }
- }
+ //TODO implement any requirements of the plugin class here!
+ boolean classFound = true;
if (!classFound) {
- Log.e(LOGTAG, "The plugin's class'" + serviceInfo.name + "' does not extend the appropriate interface.");
+ Log.e(LOGTAG, "The plugin's class' " + serviceInfo.name + "' does not extend the appropriate class.");
continue;
}
@@ -235,7 +217,7 @@
}
// if all checks have passed then make the plugin available
- mPluginInfoCache.add(pluginInfo);
+ mPackageInfoCache.add(pkgInfo);
directories.add(directory);
}
}
@@ -252,9 +234,8 @@
}
// must be synchronized to ensure the consistency of the cache
- synchronized(mPluginInfoCache) {
- for (PluginInfo pluginInfo : mPluginInfoCache) {
- PackageInfo pkgInfo = pluginInfo.packageInfo;
+ synchronized(mPackageInfoCache) {
+ for (PackageInfo pkgInfo : mPackageInfoCache) {
if (pluginLib.startsWith(pkgInfo.applicationInfo.dataDir)) {
return pkgInfo.packageName;
}
@@ -270,39 +251,6 @@
}
/* package */
- WebkitPlugin getPluginInstance(String pkgName, int npp) {
-
- // must be synchronized to ensure the consistency of the cache
- synchronized(mPluginInfoCache) {
-
- // lookup plugin based on pkgName and instantiate if possible.
- for (PluginInfo pluginInfo : mPluginInfoCache) {
-
- if (pluginInfo.packageInfo.packageName.equals(pkgName)) {
-
- try {
- WebkitPlugin webkitPlugin = pluginInfo.pluginClass.newInstance();
-
- if (pluginInfo.isNative) {
- NativePlugin nativePlugin = (NativePlugin) webkitPlugin;
- nativePlugin.initializePlugin(npp, mContext);
- }
-
- return webkitPlugin;
- } catch (Exception e) {
- // Any number of things could have happened. Log the exception and
- // return null. Careful not to use Log.e(LOGTAG, "String", e)
- // because that reports the exception to the checkin service.
- Log.e(LOGTAG, Log.getStackTraceString(e));
- }
- break;
- }
- }
- }
- return null;
- }
-
- /* package */
Class<?> getPluginClass(String packageName, String className)
throws NameNotFoundException, ClassNotFoundException {
Context pluginContext = mContext.createPackageContext(packageName,
diff --git a/core/java/android/webkit/WebStorage.java b/core/java/android/webkit/WebStorage.java
index a182287..cf71a84 100644
--- a/core/java/android/webkit/WebStorage.java
+++ b/core/java/android/webkit/WebStorage.java
@@ -389,8 +389,8 @@
mOrigins = new HashMap<String, Origin>();
for (String origin : tmp) {
Origin website = new Origin(origin,
- nativeGetUsageForOrigin(origin),
- nativeGetQuotaForOrigin(origin));
+ nativeGetQuotaForOrigin(origin),
+ nativeGetUsageForOrigin(origin));
mOrigins.put(origin, website);
}
}
diff --git a/core/java/android/webkit/WebTextView.java b/core/java/android/webkit/WebTextView.java
index 92da456..6d0be43 100644
--- a/core/java/android/webkit/WebTextView.java
+++ b/core/java/android/webkit/WebTextView.java
@@ -84,12 +84,6 @@
// True if the most recent drag event has caused either the TextView to
// scroll or the web page to scroll. Gets reset after a touch down.
private boolean mScrolled;
- // Gets set to true any time the WebTextView has focus, but the navigation
- // cache does not yet know that the focus has been changed. This happens
- // if the user presses "Next", if the user moves the cursor to a textfield
- // and starts typing or clicks the trackball/center key, and when the user
- // touches a textfield.
- boolean mOkayForFocusNotToMatch;
// Whether or not a selection change was generated from webkit. If it was,
// we do not need to pass the selection back to webkit.
private boolean mFromWebKit;
@@ -151,22 +145,6 @@
break;
}
- if (down) {
- if (mOkayForFocusNotToMatch) {
- if (mWebView.nativeFocusNodePointer() == mNodePointer) {
- mOkayForFocusNotToMatch = false;
- }
- } else if (mWebView.nativeFocusNodePointer() != mNodePointer
- && !isArrowKey) {
- mWebView.nativeClearCursor();
- // Do not call remove() here, which hides the soft keyboard. If
- // the soft keyboard is being displayed, the user will still want
- // it there.
- mWebView.removeView(this);
- mWebView.requestFocus();
- return mWebView.dispatchKeyEvent(event);
- }
- }
Spannable text = (Spannable) getText();
int oldLength = text.length();
// Normally the delete key's dom events are sent via onTextChanged.
@@ -324,7 +302,6 @@
// focus, set the focus controller back to inactive
mWebView.setFocusControllerInactive();
mWebView.nativeMoveCursorToNextTextInput();
- mOkayForFocusNotToMatch = true;
// Preemptively rebuild the WebTextView, so that the action will
// be set properly.
mWebView.rebuildWebTextView();
@@ -830,19 +807,21 @@
int maxLength = -1;
int inputType = EditorInfo.TYPE_CLASS_TEXT
| EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT;
+ int imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI
+ | EditorInfo.IME_FLAG_NO_FULLSCREEN;
switch (type) {
case 1: // TEXT_AREA
single = false;
inputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE
| EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES
| EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT;
- setImeOptions(EditorInfo.IME_ACTION_NONE);
+ imeOptions |= EditorInfo.IME_ACTION_NONE;
break;
case 2: // PASSWORD
inPassword = true;
break;
case 3: // SEARCH
- setImeOptions(EditorInfo.IME_ACTION_SEARCH);
+ imeOptions |= EditorInfo.IME_ACTION_SEARCH;
break;
case 4: // EMAIL
// TYPE_TEXT_VARIATION_WEB_EDIT_TEXT prevents EMAIL_ADDRESS
@@ -865,7 +844,10 @@
default:
break;
}
+ setHint(null);
if (single) {
+ mWebView.requestLabel(mWebView.nativeFocusCandidateFramePointer(),
+ mNodePointer);
maxLength = mWebView.nativeFocusCandidateMaxLength();
if (type != 2 /* PASSWORD */) {
String name = mWebView.nativeFocusCandidateName();
@@ -878,14 +860,14 @@
switch (action) {
// Keep in sync with CachedRoot::ImeAction
case 0: // NEXT
- setImeOptions(EditorInfo.IME_ACTION_NEXT);
+ imeOptions |= EditorInfo.IME_ACTION_NEXT;
break;
case 1: // GO
- setImeOptions(EditorInfo.IME_ACTION_GO);
+ imeOptions |= EditorInfo.IME_ACTION_GO;
break;
case -1: // FAILURE
case 2: // DONE
- setImeOptions(EditorInfo.IME_ACTION_DONE);
+ imeOptions |= EditorInfo.IME_ACTION_DONE;
break;
}
}
@@ -894,6 +876,7 @@
setMaxLength(maxLength);
setHorizontallyScrolling(single);
setInputType(inputType);
+ setImeOptions(imeOptions);
setInPassword(inPassword);
AutoCompleteAdapter adapter = null;
setAdapterCustom(adapter);
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index fb8148b..c349606 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -25,11 +25,9 @@
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
-import android.graphics.Paint;
import android.graphics.Picture;
import android.graphics.Point;
import android.graphics.Rect;
-import android.graphics.Region;
import android.graphics.drawable.Drawable;
import android.net.http.SslCertificate;
import android.net.Uri;
@@ -55,7 +53,6 @@
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
-import android.view.ViewParent;
import android.view.ViewTreeObserver;
import android.view.animation.AlphaAnimation;
import android.view.inputmethod.InputMethodManager;
@@ -203,11 +200,16 @@
implements ViewTreeObserver.OnGlobalFocusChangeListener,
ViewGroup.OnHierarchyChangeListener {
+ // enable debug output for drag trackers
+ private static final boolean DEBUG_DRAG_TRACKER = false;
// if AUTO_REDRAW_HACK is true, then the CALL key will toggle redrawing
// the screen all-the-time. Good for profiling our drawing code
static private final boolean AUTO_REDRAW_HACK = false;
// true means redraw the screen all-the-time. Only with AUTO_REDRAW_HACK
private boolean mAutoRedraw;
+ private int mRootLayer; // C++ pointer to the root layer
+ private boolean mLayersHaveAnimations;
+ private EvaluateLayersAnimations mEvaluateThread;
static final String LOGTAG = "webview";
@@ -483,7 +485,7 @@
static final int MOVE_OUT_OF_PLUGIN = 19;
static final int CLEAR_TEXT_ENTRY = 20;
static final int UPDATE_TEXT_SELECTION_MSG_ID = 21;
- static final int UPDATE_CLIPBOARD = 22;
+
static final int LONG_PRESS_CENTER = 23;
static final int PREVENT_TOUCH_ID = 24;
static final int WEBCORE_NEED_TOUCH_EVENTS = 25;
@@ -493,6 +495,10 @@
static final int DO_MOTION_UP = 28;
static final int SHOW_FULLSCREEN = 29;
static final int HIDE_FULLSCREEN = 30;
+ static final int DOM_FOCUS_CHANGED = 31;
+ static final int IMMEDIATE_REPAINT_MSG_ID = 32;
+ static final int SET_ROOT_LAYER_MSG_ID = 33;
+ static final int RETURN_LABEL = 34;
static final String[] HandlerDebugString = {
"REMEMBER_PASSWORD", // = 1;
@@ -516,7 +522,7 @@
"MOVE_OUT_OF_PLUGIN", // = 19;
"CLEAR_TEXT_ENTRY", // = 20;
"UPDATE_TEXT_SELECTION_MSG_ID", // = 21;
- "UPDATE_CLIPBOARD", // = 22;
+ "22", // = 22;
"LONG_PRESS_CENTER", // = 23;
"PREVENT_TOUCH_ID", // = 24;
"WEBCORE_NEED_TOUCH_EVENTS", // = 25;
@@ -524,7 +530,11 @@
"REQUEST_KEYBOARD", // = 27;
"DO_MOTION_UP", // = 28;
"SHOW_FULLSCREEN", // = 29;
- "HIDE_FULLSCREEN" // = 30;
+ "HIDE_FULLSCREEN", // = 30;
+ "DOM_FOCUS_CHANGED", // = 31;
+ "IMMEDIATE_REPAINT_MSG_ID", // = 32;
+ "SET_ROOT_LAYER_MSG_ID", // = 33;
+ "RETURN_LABEL" // = 34;
};
// If the site doesn't use the viewport meta tag to specify the viewport,
@@ -1726,6 +1736,13 @@
return result;
}
+ // Called by JNI when the DOM has changed the focus. Clear the focus so
+ // that new keys will go to the newly focused field
+ private void domChangedFocus() {
+ if (inEditingMode()) {
+ mPrivateHandler.obtainMessage(DOM_FOCUS_CHANGED).sendToTarget();
+ }
+ }
/**
* Request the href of an anchor element due to getFocusNodePath returning
* "href." If hrefMsg is null, this method returns immediately and does not
@@ -1829,7 +1846,7 @@
}
if (null != v) {
addView(v, new AbsoluteLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, 0, 0));
if (mTitleShadow == null) {
mTitleShadow = (Drawable) mContext.getResources().getDrawable(
@@ -2910,6 +2927,7 @@
if (AUTO_REDRAW_HACK && mAutoRedraw) {
invalidate();
}
+ mWebViewCore.signalRepaintDone();
}
@Override
@@ -2977,11 +2995,20 @@
}
}
+ private void drawLayers(Canvas canvas) {
+ if (mRootLayer != 0) {
+ float scrollY = Math.max(mScrollY - getTitleHeight(), 0);
+ nativeDrawLayers(mRootLayer, mScrollX, scrollY,
+ mActualScale, canvas);
+ }
+ }
+
private void drawCoreAndCursorRing(Canvas canvas, int color,
boolean drawCursorRing) {
if (mDrawHistory) {
canvas.scale(mActualScale, mActualScale);
canvas.drawPicture(mHistoryPicture);
+ drawLayers(canvas);
return;
}
@@ -3060,6 +3087,8 @@
mWebViewCore.drawContentPicture(canvas, color, animateZoom,
animateScroll);
+ drawLayers(canvas);
+
if (mNativeClass == 0) return;
if (mShiftIsPressed && !animateZoom) {
if (mTouchSelection || mExtendSelection) {
@@ -3163,14 +3192,17 @@
mWebViewCore.sendMessage(EventHub.SET_SELECTION, start, end);
}
- // Called by JNI when a touch event puts a textfield into focus.
+ /**
+ * Called in response to a message from webkit telling us that the soft
+ * keyboard should be launched.
+ */
private void displaySoftKeyboard(boolean isTextView) {
InputMethodManager imm = (InputMethodManager)
getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
if (isTextView) {
- if (mWebTextView == null) return;
-
+ rebuildWebTextView();
+ if (!inEditingMode()) return;
imm.showSoftInput(mWebTextView, 0);
if (mInZoomOverview) {
// if in zoom overview mode, call doDoubleTap() to bring it back
@@ -3191,16 +3223,6 @@
imm.hideSoftInputFromWindow(this.getWindowToken(), 0);
}
- /**
- * Only for calling from JNI. Allows a click on an unfocused textfield to
- * put the textfield in focus.
- */
- private void setOkayNotToMatch() {
- if (inEditingMode()) {
- mWebTextView.mOkayForFocusNotToMatch = true;
- }
- }
-
/*
* This method checks the current focus and cursor and potentially rebuilds
* mWebTextView to have the appropriate properties, such as password,
@@ -3290,6 +3312,51 @@
}
}
+ /**
+ * Pass a message to find out the <label> associated with the <input>
+ * identified by nodePointer
+ * @param framePointer Pointer to the frame containing the <input> node
+ * @param nodePointer Pointer to the node for which a <label> is desired.
+ */
+ /* package */ void requestLabel(int framePointer, int nodePointer) {
+ mWebViewCore.sendMessage(EventHub.REQUEST_LABEL, framePointer,
+ nodePointer);
+ }
+
+ /*
+ * This class runs the layers animations in their own thread,
+ * so that we do not slow down the UI.
+ */
+ private class EvaluateLayersAnimations extends Thread {
+ boolean mRunning = true;
+ // delay corresponds to 40fps, no need to go faster.
+ int mDelay = 25; // in ms
+ public void run() {
+ while (mRunning) {
+ if (mLayersHaveAnimations && mRootLayer != 0) {
+ // updates is a C++ pointer to a Vector of AnimationValues
+ int updates = nativeEvaluateLayersAnimations(mRootLayer);
+ if (updates == 0) {
+ mRunning = false;
+ }
+ Message.obtain(mPrivateHandler,
+ WebView.IMMEDIATE_REPAINT_MSG_ID,
+ updates, 0).sendToTarget();
+ } else {
+ mRunning = false;
+ }
+ try {
+ Thread.currentThread().sleep(mDelay);
+ } catch (InterruptedException e) {
+ mRunning = false;
+ }
+ }
+ }
+ public void cancel() {
+ mRunning = false;
+ }
+ }
+
/*
* This class requests an Adapter for the WebTextView which shows past
* entries stored in the database. It is a Runnable so that it can be done
@@ -3462,7 +3529,6 @@
// Now we need to pass the event to it
if (inEditingMode()) {
mWebTextView.setDefaultSelection();
- mWebTextView.mOkayForFocusNotToMatch = true;
return mWebTextView.dispatchKeyEvent(event);
}
} else if (nativeHasFocusNode()) {
@@ -3559,7 +3625,6 @@
centerKeyPressOnTextField();
if (inEditingMode()) {
mWebTextView.setDefaultSelection();
- mWebTextView.mOkayForFocusNotToMatch = true;
}
return true;
}
@@ -3600,9 +3665,6 @@
nativeHideCursor();
}
- /**
- * @hide
- */
public void emulateShiftHeld() {
if (0 == mNativeClass) return; // client isn't initialized
setUpSelectXY();
@@ -3611,14 +3673,22 @@
private boolean commitCopy() {
boolean copiedSomething = false;
if (mExtendSelection) {
- // copy region so core operates on copy without touching orig.
- Region selection = new Region(nativeGetSelection());
- if (selection.isEmpty() == false) {
+ String selection = nativeGetSelection();
+ if (selection != "") {
+ if (DebugFlags.WEB_VIEW) {
+ Log.v(LOGTAG, "commitCopy \"" + selection + "\"");
+ }
Toast.makeText(mContext
, com.android.internal.R.string.text_copied
, Toast.LENGTH_SHORT).show();
- mWebViewCore.sendMessage(EventHub.GET_SELECTION, selection);
copiedSomething = true;
+ try {
+ IClipboard clip = IClipboard.Stub.asInterface(
+ ServiceManager.getService("clipboard"));
+ clip.setClipboardText(selection);
+ } catch (android.os.RemoteException e) {
+ Log.e(LOGTAG, "Clipboard failed", e);
+ }
}
mExtendSelection = false;
}
@@ -3822,7 +3892,9 @@
public void run() {
// we always force, in case our height changed, in which case we
// still want to send the notification over to webkit
- setNewZoomScale(mActualScale, true);
+ if (mWebViewCore != null) {
+ setNewZoomScale(mActualScale, true);
+ }
}
});
}
@@ -3899,7 +3971,7 @@
mMinDY = -viewTop;
mMaxDY = docBottom - viewBottom;
- if (DebugFlags.DRAG_TRACKER) {
+ if (DebugFlags.DRAG_TRACKER || DEBUG_DRAG_TRACKER) {
Log.d(DebugFlags.DRAG_TRACKER_LOGTAG, " dragtracker y= " + y +
" up/down= " + mMinDY + " " + mMaxDY);
}
@@ -3936,7 +4008,7 @@
if (mCurrStretchX != sx || mCurrStretchY != sy) {
mCurrStretchX = sx;
mCurrStretchY = sy;
- if (DebugFlags.DRAG_TRACKER) {
+ if (DebugFlags.DRAG_TRACKER || DEBUG_DRAG_TRACKER) {
Log.d(DebugFlags.DRAG_TRACKER_LOGTAG, "---- stretch " + sx +
" " + sy);
}
@@ -3947,7 +4019,7 @@
}
public void stopDrag() {
- if (DebugFlags.DRAG_TRACKER) {
+ if (DebugFlags.DRAG_TRACKER || DEBUG_DRAG_TRACKER) {
Log.d(DebugFlags.DRAG_TRACKER_LOGTAG, "----- stopDrag");
}
mProxy.onStopDrag();
@@ -3984,7 +4056,7 @@
canvas.restoreToCount(count);
return true;
}
- if (DebugFlags.DRAG_TRACKER) {
+ if (DebugFlags.DRAG_TRACKER || DEBUG_DRAG_TRACKER) {
Log.d(DebugFlags.DRAG_TRACKER_LOGTAG, " -- draw false " +
mCurrStretchX + " " + mCurrStretchY);
}
@@ -3999,7 +4071,7 @@
canvas.translate(-sx, -sy);
drawContent(canvas);
- if (DebugFlags.DRAG_TRACKER) {
+ if (DebugFlags.DRAG_TRACKER || DEBUG_DRAG_TRACKER) {
Log.d(DebugFlags.DRAG_TRACKER_LOGTAG, "--- buildBitmap " + sx +
" " + sy + " " + w + " " + h);
}
@@ -5036,10 +5108,6 @@
/*package*/ void centerKeyPressOnTextField() {
mWebViewCore.sendMessage(EventHub.CLICK, nativeCursorFramePointer(),
nativeCursorNodePointer());
- // Need to show the soft keyboard if it's not readonly.
- if (!nativeCursorIsReadOnly()) {
- displaySoftKeyboard(true);
- }
}
private void doShortPress() {
@@ -5061,12 +5129,12 @@
mWebViewCore.sendMessageAtFrontOfQueue(EventHub.VALID_NODE_BOUNDS,
motionUpData);
} else {
- doMotionUp(contentX, contentY, false);
+ doMotionUp(contentX, contentY);
}
}
- private void doMotionUp(int contentX, int contentY, boolean useNavCache) {
- if (nativeMotionUp(contentX, contentY, useNavCache ? mNavSlop : 0)) {
+ private void doMotionUp(int contentX, int contentY) {
+ if (nativeMotionUp(contentX, contentY, mNavSlop)) {
if (mLogEvent) {
Checkin.updateStats(mContext.getContentResolver(),
Checkin.Stats.Tag.BROWSER_SNAP_CENTER, 1, 0.0);
@@ -5311,7 +5379,7 @@
// exclude INVAL_RECT_MSG_ID since it is frequently output
if (DebugFlags.WEB_VIEW && msg.what != INVAL_RECT_MSG_ID) {
Log.v(LOGTAG, msg.what < REMEMBER_PASSWORD || msg.what
- > HIDE_FULLSCREEN ? Integer.toString(msg.what)
+ > RETURN_LABEL ? Integer.toString(msg.what)
: HandlerDebugString[msg.what - REMEMBER_PASSWORD]);
}
if (mWebViewCore == null) {
@@ -5542,6 +5610,20 @@
tData.mEnd);
}
break;
+ case RETURN_LABEL:
+ if (inEditingMode()
+ && mWebTextView.isSameTextField(msg.arg1)) {
+ mWebTextView.setHint((String) msg.obj);
+ InputMethodManager imm
+ = InputMethodManager.peekInstance();
+ // The hint is propagated to the IME in
+ // onCreateInputConnection. If the IME is already
+ // active, restart it so that its hint text is updated.
+ if (imm != null && imm.isActive(mWebTextView)) {
+ imm.restartInput(mWebTextView);
+ }
+ }
+ break;
case MOVE_OUT_OF_PLUGIN:
navHandledKey(msg.arg1, 1, false, 0, true);
break;
@@ -5567,25 +5649,44 @@
}
break;
}
+ case IMMEDIATE_REPAINT_MSG_ID: {
+ int updates = msg.arg1;
+ if (updates != 0) {
+ // updates is a C++ pointer to a Vector of
+ // AnimationValues that we apply to the layers.
+ // The Vector is deallocated in nativeUpdateLayers().
+ nativeUpdateLayers(mRootLayer, updates);
+ }
+ invalidate();
+ break;
+ }
+ case SET_ROOT_LAYER_MSG_ID: {
+ int oldLayer = mRootLayer;
+ mRootLayer = msg.arg1;
+ if (oldLayer > 0) {
+ nativeDestroyLayer(oldLayer);
+ }
+ if (mRootLayer == 0) {
+ mLayersHaveAnimations = false;
+ }
+ if (mEvaluateThread != null) {
+ mEvaluateThread.cancel();
+ mEvaluateThread = null;
+ }
+ if (nativeLayersHaveAnimations(mRootLayer)) {
+ mLayersHaveAnimations = true;
+ mEvaluateThread = new EvaluateLayersAnimations();
+ mEvaluateThread.start();
+ }
+ invalidate();
+ break;
+ }
case REQUEST_FORM_DATA:
AutoCompleteAdapter adapter = (AutoCompleteAdapter) msg.obj;
if (mWebTextView.isSameTextField(msg.arg1)) {
mWebTextView.setAdapterCustom(adapter);
}
break;
- case UPDATE_CLIPBOARD:
- String str = (String) msg.obj;
- if (DebugFlags.WEB_VIEW) {
- Log.v(LOGTAG, "UPDATE_CLIPBOARD " + str);
- }
- try {
- IClipboard clip = IClipboard.Stub.asInterface(
- ServiceManager.getService("clipboard"));
- clip.setClipboardText(str);
- } catch (android.os.RemoteException e) {
- Log.e(LOGTAG, "Clipboard failed", e);
- }
- break;
case RESUME_WEBCORE_UPDATE:
WebViewCore.resumeUpdate(mWebViewCore);
break;
@@ -5634,12 +5735,7 @@
if (msg.arg1 == 0) {
hideSoftKeyboard();
} else {
- displaySoftKeyboard(false);
- if (DebugFlags.WEB_VIEW) {
- Log.v(LOGTAG, "REQUEST_KEYBOARD"
- + " focusCandidateIsPlugin="
- + nativeFocusCandidateIsPlugin());
- }
+ displaySoftKeyboard(1 == msg.arg2);
}
break;
@@ -5667,7 +5763,7 @@
break;
case DO_MOTION_UP:
- doMotionUp(msg.arg1, msg.arg2, (Boolean) msg.obj);
+ doMotionUp(msg.arg1, msg.arg2);
break;
case SHOW_FULLSCREEN:
@@ -5736,6 +5832,13 @@
}
break;
+ case DOM_FOCUS_CHANGED:
+ if (inEditingMode()) {
+ nativeClearCursor();
+ rebuildWebTextView();
+ }
+ break;
+
default:
super.handleMessage(msg);
break;
@@ -6231,11 +6334,10 @@
private native void nativeCreate(int ptr);
private native int nativeCursorFramePointer();
private native Rect nativeCursorNodeBounds();
- /* package */ native int nativeCursorNodePointer();
+ private native int nativeCursorNodePointer();
/* package */ native boolean nativeCursorMatchesFocus();
private native boolean nativeCursorIntersects(Rect visibleRect);
private native boolean nativeCursorIsAnchor();
- private native boolean nativeCursorIsReadOnly();
private native boolean nativeCursorIsTextInput();
private native Point nativeCursorPosition();
private native String nativeCursorText();
@@ -6247,6 +6349,13 @@
private native void nativeDebugDump();
private native void nativeDestroy();
private native void nativeDrawCursorRing(Canvas content);
+ private native void nativeDestroyLayer(int layer);
+ private native int nativeEvaluateLayersAnimations(int layer);
+ private native boolean nativeLayersHaveAnimations(int layer);
+ private native void nativeUpdateLayers(int layer, int updates);
+ private native void nativeDrawLayers(int layer,
+ float scrollX, float scrollY,
+ float scale, Canvas canvas);
private native void nativeDrawMatches(Canvas canvas);
private native void nativeDrawSelectionPointer(Canvas content,
float scale, int x, int y, boolean extendSelection);
@@ -6254,15 +6363,14 @@
private native void nativeDumpDisplayTree(String urlOrNull);
private native int nativeFindAll(String findLower, String findUpper);
private native void nativeFindNext(boolean forward);
- private native int nativeFocusCandidateFramePointer();
+ /* package */ native int nativeFocusCandidateFramePointer();
private native boolean nativeFocusCandidateIsPassword();
- private native boolean nativeFocusCandidateIsPlugin();
private native boolean nativeFocusCandidateIsRtlText();
private native boolean nativeFocusCandidateIsTextInput();
/* package */ native int nativeFocusCandidateMaxLength();
/* package */ native String nativeFocusCandidateName();
private native Rect nativeFocusCandidateNodeBounds();
- /* package */ native int nativeFocusCandidatePointer();
+ private native int nativeFocusCandidatePointer();
private native String nativeFocusCandidateText();
private native int nativeFocusCandidateTextSize();
/**
@@ -6273,7 +6381,7 @@
private native boolean nativeFocusIsPlugin();
/* package */ native int nativeFocusNodePointer();
private native Rect nativeGetCursorRingBounds();
- private native Region nativeGetSelection();
+ private native String nativeGetSelection();
private native boolean nativeHasCursorNode();
private native boolean nativeHasFocusNode();
private native void nativeHideCursor();
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java
index 032295d..02c7210 100644
--- a/core/java/android/webkit/WebViewClient.java
+++ b/core/java/android/webkit/WebViewClient.java
@@ -86,6 +86,8 @@
* @param view The WebView that is initiating the callback.
* @param cancelMsg The message to send if the host wants to cancel
* @param continueMsg The message to send if the host wants to continue
+ * @deprecated This method is no longer called. When the WebView encounters
+ * a redirect loop, it will cancel the load.
*/
public void onTooManyRedirects(WebView view, Message cancelMsg,
Message continueMsg) {
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index fc22f37..949b318 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -41,8 +41,6 @@
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
-import android.webkit.plugin.SurfaceDrawingModel;
-import android.webkit.plugin.WebkitPlugin;
import java.util.ArrayList;
import java.util.Collection;
@@ -547,8 +545,6 @@
*/
private native void nativeSetSelection(int start, int end);
- private native String nativeGetSelection(Region sel);
-
// Register a scheme to be treated as local scheme so that it can access
// local asset files for resources
private native void nativeRegisterURLSchemeAsLocal(String scheme);
@@ -746,6 +742,7 @@
}
static final String[] HandlerDebugString = {
+ "REQUEST_LABEL", // 97
"UPDATE_FRAME_CACHE_IF_LOADING", // = 98
"SCROLL_TEXT_INPUT", // = 99
"LOAD_URL", // = 100;
@@ -777,7 +774,7 @@
"SET_BACKGROUND_COLOR", // = 126;
"SET_MOVE_FOCUS", // = 127
"SAVE_DOCUMENT_STATE", // = 128;
- "GET_SELECTION", // = 129;
+ "129", // = 129;
"WEBKIT_DRAW", // = 130;
"SYNC_SCROLL", // = 131;
"POST_URL", // = 132;
@@ -799,6 +796,7 @@
class EventHub {
// Message Ids
+ static final int REQUEST_LABEL = 97;
static final int UPDATE_FRAME_CACHE_IF_LOADING = 98;
static final int SCROLL_TEXT_INPUT = 99;
static final int LOAD_URL = 100;
@@ -829,7 +827,7 @@
static final int SET_BACKGROUND_COLOR = 126;
static final int SET_MOVE_FOCUS = 127;
static final int SAVE_DOCUMENT_STATE = 128;
- static final int GET_SELECTION = 129;
+
static final int WEBKIT_DRAW = 130;
static final int SYNC_SCROLL = 131;
static final int POST_URL = 132;
@@ -911,11 +909,11 @@
@Override
public void handleMessage(Message msg) {
if (DebugFlags.WEB_VIEW_CORE) {
- Log.v(LOGTAG, (msg.what < UPDATE_FRAME_CACHE_IF_LOADING
+ Log.v(LOGTAG, (msg.what < REQUEST_LABEL
|| msg.what
> VALID_NODE_BOUNDS ? Integer.toString(msg.what)
: HandlerDebugString[msg.what
- - UPDATE_FRAME_CACHE_IF_LOADING])
+ - REQUEST_LABEL])
+ " arg1=" + msg.arg1 + " arg2=" + msg.arg2
+ " obj=" + msg.obj);
}
@@ -936,6 +934,19 @@
}
break;
+ case REQUEST_LABEL:
+ if (mWebView != null) {
+ int nodePointer = msg.arg2;
+ String label = nativeRequestLabel(msg.arg1,
+ nodePointer);
+ if (label != null && label.length() > 0) {
+ Message.obtain(mWebView.mPrivateHandler,
+ WebView.RETURN_LABEL, nodePointer,
+ 0, label).sendToTarget();
+ }
+ }
+ break;
+
case UPDATE_FRAME_CACHE_IF_LOADING:
nativeUpdateFrameCacheIfLoading();
break;
@@ -1253,13 +1264,6 @@
nativeSetBackgroundColor(msg.arg1);
break;
- case GET_SELECTION:
- String str = nativeGetSelection((Region) msg.obj);
- Message.obtain(mWebView.mPrivateHandler
- , WebView.UPDATE_CLIPBOARD, str)
- .sendToTarget();
- break;
-
case DUMP_DOMTREE:
nativeDumpDomTree(msg.arg1 == 1);
break;
@@ -1312,13 +1316,14 @@
case VALID_NODE_BOUNDS: {
MotionUpData motionUpData = (MotionUpData) msg.obj;
- boolean result = nativeValidNodeAndBounds(
+ if (!nativeValidNodeAndBounds(
motionUpData.mFrame, motionUpData.mNode,
- motionUpData.mBounds);
+ motionUpData.mBounds)) {
+ nativeUpdateFrameCache();
+ }
Message message = mWebView.mPrivateHandler
.obtainMessage(WebView.DO_MOTION_UP,
- motionUpData.mX, motionUpData.mY,
- new Boolean(result));
+ motionUpData.mX, motionUpData.mY);
mWebView.mPrivateHandler.sendMessageAtFrontOfQueue(
message);
break;
@@ -1908,6 +1913,33 @@
}
}
+ private static boolean mRepaintScheduled = false;
+
+ /*
+ * Called by the WebView thread
+ */
+ /* package */ void signalRepaintDone() {
+ mRepaintScheduled = false;
+ }
+
+ // called by JNI
+ private void sendImmediateRepaint() {
+ if (mWebView != null && !mRepaintScheduled) {
+ mRepaintScheduled = true;
+ Message.obtain(mWebView.mPrivateHandler,
+ WebView.IMMEDIATE_REPAINT_MSG_ID).sendToTarget();
+ }
+ }
+
+ // called by JNI
+ private void setRootLayer(int layer) {
+ if (mWebView != null) {
+ Message.obtain(mWebView.mPrivateHandler,
+ WebView.SET_ROOT_LAYER_MSG_ID,
+ layer, 0).sendToTarget();
+ }
+ }
+
/* package */ WebView getWebView() {
return mWebView;
}
@@ -2174,7 +2206,7 @@
}
private native void nativeUpdateFrameCacheIfLoading();
-
+ private native String nativeRequestLabel(int framePtr, int nodePtr);
/**
* Scroll the focused textfield to (xPercent, y) in document space
*/
@@ -2203,15 +2235,21 @@
}
// called by JNI
- private void requestKeyboard(boolean showKeyboard) {
+ private void requestKeyboard(boolean showKeyboard, boolean isTextView) {
if (mWebView != null) {
Message.obtain(mWebView.mPrivateHandler,
- WebView.REQUEST_KEYBOARD, showKeyboard ? 1 : 0, 0)
+ WebView.REQUEST_KEYBOARD, showKeyboard ? 1 : 0,
+ isTextView ? 1 : 0)
.sendToTarget();
}
}
// called by JNI
+ private Context getContext() {
+ return mContext;
+ }
+
+ // called by JNI
private Class<?> getPluginClass(String libName, String clsName) {
if (mWebView == null) {
@@ -2238,40 +2276,17 @@
return null;
}
- private WebkitPlugin createPluginJavaInstance(String libName, int npp) {
-
- if (mWebView == null) {
- return null;
- }
-
- PluginManager pluginManager = PluginManager.getInstance(null);
-
- String pkgName = pluginManager.getPluginsAPKName(libName);
- if (pkgName == null) {
- Log.w(LOGTAG, "Unable to resolve " + libName + " to a plugin APK");
- return null;
- }
-
- return pluginManager.getPluginInstance(pkgName, npp);
- }
-
// called by JNI. PluginWidget function to launch a full-screen view using a
// View object provided by the plugin class.
- private void showFullScreenPlugin(WebkitPlugin webkitPlugin, final int npp,
- int x, int y, int width, int height) {
- if (mWebView == null) {
- return;
- }
+ private void showFullScreenPlugin(ViewManager.ChildView childView,
+ final int npp, int x, int y, int width, int height) {
- final SurfaceDrawingModel surface = webkitPlugin.getFullScreenSurface();
- if(surface == null) {
- Log.e(LOGTAG, "Attempted to create an full-screen surface with a " +
- "null drawing model");
+ if (mWebView == null) {
return;
}
PluginFullScreenData data = new PluginFullScreenData();
- data.mView = surface.getSurface();
+ data.mView = childView.mView;
data.mNpp = npp;
data.mDocX = x;
data.mDocY = y;
@@ -2308,20 +2323,18 @@
// called by JNI. PluginWidget functions for creating an embedded View for
// the surface drawing model.
- private ViewManager.ChildView createSurface(WebkitPlugin webkitPlugin,
- int x, int y, int width, int height) {
-
+ private ViewManager.ChildView addSurface(View pluginView, int x, int y,
+ int width, int height) {
if (mWebView == null) {
return null;
}
- SurfaceDrawingModel embeddedSurface = webkitPlugin.getEmbeddedSurface();
- if(embeddedSurface == null) {
- Log.e(LOGTAG, "Attempted to create an embedded surface with a null drawing model");
+ if (pluginView == null) {
+ Log.e(LOGTAG, "Attempted to add an empty plugin view to the view hierarchy");
return null;
}
- View pluginView = embeddedSurface.getSurface();
+ // ensures the view system knows the view can redraw itself
pluginView.setWillNotDraw(false);
ViewManager.ChildView view = mWebView.mViewManager.createView();
diff --git a/core/java/android/webkit/plugin/NativePlugin.java b/core/java/android/webkit/plugin/NativePlugin.java
deleted file mode 100644
index 5019c35..0000000
--- a/core/java/android/webkit/plugin/NativePlugin.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2009, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package android.webkit.plugin;
-
-import android.content.Context;
-
-/**
- *
- * @hide pending API solidification
- */
-public interface NativePlugin extends WebkitPlugin {
-
- void initializePlugin(int npp, Context context);
-
-}
diff --git a/core/java/android/webkit/plugin/SurfaceDrawingModel.java b/core/java/android/webkit/plugin/SurfaceDrawingModel.java
deleted file mode 100644
index 93ba466..0000000
--- a/core/java/android/webkit/plugin/SurfaceDrawingModel.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2009, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package android.webkit.plugin;
-
-import android.view.View;
-
-/**
- *
- * @hide pending API solidification
- */
-public interface SurfaceDrawingModel {
-
- public View getSurface();
-
-}
diff --git a/core/java/android/webkit/plugin/WebkitPlugin.java b/core/java/android/webkit/plugin/WebkitPlugin.java
deleted file mode 100644
index 3d13c1c..0000000
--- a/core/java/android/webkit/plugin/WebkitPlugin.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2009, The Android Open Source Project
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-package android.webkit.plugin;
-
-/**
- *
- * @hide pending API solidification
- */
-public interface WebkitPlugin {
-
- SurfaceDrawingModel getEmbeddedSurface();
- SurfaceDrawingModel getFullScreenSurface();
-
-}
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 92ff315..e241c77 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -127,11 +127,6 @@
static final int TOUCH_MODE_FLING = 4;
/**
- * Indicates that the user is currently dragging the fast scroll thumb
- */
- static final int TOUCH_MODE_FAST_SCROLL = 5;
-
- /**
* Regular layout - usually an unsolicited layout from the view system
*/
static final int LAYOUT_NORMAL = 0;
@@ -440,6 +435,8 @@
private Runnable mClearScrollingCache;
private int mMinimumVelocity;
private int mMaximumVelocity;
+
+ final boolean[] mIsScrap = new boolean[1];
/**
* Interface definition for a callback to be invoked when the list or grid
@@ -1239,9 +1236,13 @@
* converting an old view or making a new one.
*
* @param position The position to display
+ * @param isScrap Array of at least 1 boolean, the first entry will become true if
+ * the returned view was taken from the scrap heap, false if otherwise.
+ *
* @return A view displaying the data associated with the specified position
*/
- View obtainView(int position) {
+ View obtainView(int position, boolean[] isScrap) {
+ isScrap[0] = false;
View scrapView;
scrapView = mRecycler.getScrapView(position);
@@ -1269,6 +1270,8 @@
ViewDebug.trace(scrapView, ViewDebug.RecyclerTraceType.MOVE_TO_SCRAP_HEAP,
position, -1);
}
+ } else {
+ isScrap[0] = true;
}
} else {
child = mAdapter.getView(position, null, this);
@@ -1543,6 +1546,9 @@
// Dismiss the popup in case onSaveInstanceState() was not invoked
dismissPopup();
+ // Detach any view left in the scrap heap
+ mRecycler.clear();
+
final ViewTreeObserver treeObserver = getViewTreeObserver();
if (treeObserver != null) {
treeObserver.removeOnTouchModeChangeListener(this);
@@ -1636,6 +1642,7 @@
if (mDataChanged) return;
if (mAdapter != null && mItemCount > 0 &&
+ mClickMotionPosition != INVALID_POSITION &&
mClickMotionPosition < mAdapter.getCount() && sameWindow()) {
performItemClick(mChild, mClickMotionPosition, getAdapter().getItemId(
mClickMotionPosition));
@@ -2969,7 +2976,7 @@
break;
case KeyEvent.KEYCODE_SPACE:
// Only send spaces once we are filtered
- okToSend = mFiltered = true;
+ okToSend = mFiltered;
break;
}
@@ -3594,12 +3601,12 @@
for (int i = 0; i < count; ++i) {
final View victim = activeViews[i];
if (victim != null) {
- int whichScrap = ((AbsListView.LayoutParams)
- victim.getLayoutParams()).viewType;
+ int whichScrap = ((AbsListView.LayoutParams) victim.getLayoutParams()).viewType;
activeViews[i] = null;
if (whichScrap == AdapterView.ITEM_VIEW_TYPE_IGNORE) {
+ removeDetachedView(victim, false);
// Do not move views that should be ignored
continue;
}
diff --git a/core/java/android/widget/AbsSeekBar.java b/core/java/android/widget/AbsSeekBar.java
index d25530b..d6dd872 100644
--- a/core/java/android/widget/AbsSeekBar.java
+++ b/core/java/android/widget/AbsSeekBar.java
@@ -26,7 +26,6 @@
import android.view.MotionEvent;
public abstract class AbsSeekBar extends ProgressBar {
-
private Drawable mThumb;
private int mThumbOffset;
@@ -66,8 +65,9 @@
Drawable thumb = a.getDrawable(com.android.internal.R.styleable.SeekBar_thumb);
setThumb(thumb); // will guess mThumbOffset if thumb != null...
// ...but allow layout to override this
- int thumbOffset =
- a.getDimensionPixelOffset(com.android.internal.R.styleable.SeekBar_thumbOffset, getThumbOffset());
+ int thumbOffset = a.getDimensionPixelOffset(
+ com.android.internal.R.styleable.SeekBar_thumbOffset, getThumbOffset());
+ setThumbOffset(thumbOffset);
a.recycle();
a = context.obtainStyledAttributes(attrs,
@@ -91,7 +91,7 @@
// Assuming the thumb drawable is symmetric, set the thumb offset
// such that the thumb will hang halfway off either edge of the
// progress bar.
- mThumbOffset = (int)thumb.getIntrinsicWidth() / 2;
+ mThumbOffset = thumb.getIntrinsicWidth() / 2;
}
mThumb = thumb;
invalidate();
@@ -368,20 +368,21 @@
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
- int progress = getProgress();
-
- switch (keyCode) {
- case KeyEvent.KEYCODE_DPAD_LEFT:
- if (progress <= 0) break;
- setProgress(progress - mKeyProgressIncrement, true);
- onKeyChange();
- return true;
-
- case KeyEvent.KEYCODE_DPAD_RIGHT:
- if (progress >= getMax()) break;
- setProgress(progress + mKeyProgressIncrement, true);
- onKeyChange();
- return true;
+ if (isEnabled()) {
+ int progress = getProgress();
+ switch (keyCode) {
+ case KeyEvent.KEYCODE_DPAD_LEFT:
+ if (progress <= 0) break;
+ setProgress(progress - mKeyProgressIncrement, true);
+ onKeyChange();
+ return true;
+
+ case KeyEvent.KEYCODE_DPAD_RIGHT:
+ if (progress >= getMax()) break;
+ setProgress(progress + mKeyProgressIncrement, true);
+ onKeyChange();
+ return true;
+ }
}
return super.onKeyDown(keyCode, event);
diff --git a/core/java/android/widget/AbsSpinner.java b/core/java/android/widget/AbsSpinner.java
index 424a936..c939e3f 100644
--- a/core/java/android/widget/AbsSpinner.java
+++ b/core/java/android/widget/AbsSpinner.java
@@ -249,7 +249,7 @@
@Override
protected ViewGroup.LayoutParams generateDefaultLayoutParams() {
return new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
diff --git a/core/java/android/widget/AbsoluteLayout.java b/core/java/android/widget/AbsoluteLayout.java
index c77f7ae..b829655 100644
--- a/core/java/android/widget/AbsoluteLayout.java
+++ b/core/java/android/widget/AbsoluteLayout.java
@@ -161,9 +161,9 @@
* Creates a new set of layout parameters with the specified width,
* height and location.
*
- * @param width the width, either {@link #FILL_PARENT},
+ * @param width the width, either {@link #MATCH_PARENT},
{@link #WRAP_CONTENT} or a fixed size in pixels
- * @param height the height, either {@link #FILL_PARENT},
+ * @param height the height, either {@link #MATCH_PARENT},
{@link #WRAP_CONTENT} or a fixed size in pixels
* @param x the X location of the child
* @param y the Y location of the child
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index ce985e3..bb9a672 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -172,7 +172,7 @@
mDropDownAnchorId = a.getResourceId(R.styleable.AutoCompleteTextView_dropDownAnchor,
View.NO_ID);
- // For dropdown width, the developer can specify a specific width, or FILL_PARENT
+ // For dropdown width, the developer can specify a specific width, or MATCH_PARENT
// (for full screen width) or WRAP_CONTENT (to match the width of the anchored view).
mDropDownWidth = a.getLayoutDimension(R.styleable.AutoCompleteTextView_dropDownWidth,
ViewGroup.LayoutParams.WRAP_CONTENT);
@@ -240,7 +240,7 @@
/**
* <p>Returns the current width for the auto-complete drop down list. This can
- * be a fixed width, or {@link ViewGroup.LayoutParams#FILL_PARENT} to fill the screen, or
+ * be a fixed width, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill the screen, or
* {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the width of its anchor view.</p>
*
* @return the width for the drop down list
@@ -253,7 +253,7 @@
/**
* <p>Sets the current width for the auto-complete drop down list. This can
- * be a fixed width, or {@link ViewGroup.LayoutParams#FILL_PARENT} to fill the screen, or
+ * be a fixed width, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill the screen, or
* {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the width of its anchor view.</p>
*
* @param width the width to use
@@ -266,7 +266,7 @@
/**
* <p>Returns the current height for the auto-complete drop down list. This can
- * be a fixed height, or {@link ViewGroup.LayoutParams#FILL_PARENT} to fill
+ * be a fixed height, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill
* the screen, or {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the height
* of the drop down's content.</p>
*
@@ -280,7 +280,7 @@
/**
* <p>Sets the current height for the auto-complete drop down list. This can
- * be a fixed height, or {@link ViewGroup.LayoutParams#FILL_PARENT} to fill
+ * be a fixed height, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill
* the screen, or {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the height
* of the drop down's content.</p>
*
@@ -1129,7 +1129,7 @@
boolean noInputMethod = isInputMethodNotNeeded();
if (mPopup.isShowing()) {
- if (mDropDownWidth == ViewGroup.LayoutParams.FILL_PARENT) {
+ if (mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT) {
// The call to PopupWindow's update method below can accept -1 for any
// value you do not want to update.
widthSpec = -1;
@@ -1139,19 +1139,19 @@
widthSpec = mDropDownWidth;
}
- if (mDropDownHeight == ViewGroup.LayoutParams.FILL_PARENT) {
+ if (mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
// The call to PopupWindow's update method below can accept -1 for any
// value you do not want to update.
- heightSpec = noInputMethod ? height : ViewGroup.LayoutParams.FILL_PARENT;
+ heightSpec = noInputMethod ? height : ViewGroup.LayoutParams.MATCH_PARENT;
if (noInputMethod) {
mPopup.setWindowLayoutMode(
- mDropDownWidth == ViewGroup.LayoutParams.FILL_PARENT ?
- ViewGroup.LayoutParams.FILL_PARENT : 0, 0);
+ mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT ?
+ ViewGroup.LayoutParams.MATCH_PARENT : 0, 0);
} else {
mPopup.setWindowLayoutMode(
- mDropDownWidth == ViewGroup.LayoutParams.FILL_PARENT ?
- ViewGroup.LayoutParams.FILL_PARENT : 0,
- ViewGroup.LayoutParams.FILL_PARENT);
+ mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT ?
+ ViewGroup.LayoutParams.MATCH_PARENT : 0,
+ ViewGroup.LayoutParams.MATCH_PARENT);
}
} else if (mDropDownHeight == ViewGroup.LayoutParams.WRAP_CONTENT) {
heightSpec = height;
@@ -1164,8 +1164,8 @@
mPopup.update(getDropDownAnchorView(), mDropDownHorizontalOffset,
mDropDownVerticalOffset, widthSpec, heightSpec);
} else {
- if (mDropDownWidth == ViewGroup.LayoutParams.FILL_PARENT) {
- widthSpec = ViewGroup.LayoutParams.FILL_PARENT;
+ if (mDropDownWidth == ViewGroup.LayoutParams.MATCH_PARENT) {
+ widthSpec = ViewGroup.LayoutParams.MATCH_PARENT;
} else {
if (mDropDownWidth == ViewGroup.LayoutParams.WRAP_CONTENT) {
mPopup.setWidth(getDropDownAnchorView().getWidth());
@@ -1174,8 +1174,8 @@
}
}
- if (mDropDownHeight == ViewGroup.LayoutParams.FILL_PARENT) {
- heightSpec = ViewGroup.LayoutParams.FILL_PARENT;
+ if (mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
+ heightSpec = ViewGroup.LayoutParams.MATCH_PARENT;
} else {
if (mDropDownHeight == ViewGroup.LayoutParams.WRAP_CONTENT) {
mPopup.setHeight(height);
@@ -1295,7 +1295,7 @@
hintContainer.setOrientation(LinearLayout.VERTICAL);
LinearLayout.LayoutParams hintParams = new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT, 0, 1.0f
+ ViewGroup.LayoutParams.MATCH_PARENT, 0, 1.0f
);
hintContainer.addView(dropDownView, hintParams);
hintContainer.addView(hintView);
@@ -1331,7 +1331,7 @@
final int maxHeight = mPopup.getMaxAvailableHeight(
getDropDownAnchorView(), mDropDownVerticalOffset, ignoreBottomDecorations);
- if (mDropDownAlwaysVisible || mDropDownHeight == ViewGroup.LayoutParams.FILL_PARENT) {
+ if (mDropDownAlwaysVisible || mDropDownHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
// getMaxAvailableHeight() subtracts the padding, so we put it back,
// to get the available height for the whole window
int padding = 0;
@@ -1485,8 +1485,8 @@
* @return the view for the specified item
*/
@Override
- protected View obtainView(int position) {
- View view = super.obtainView(position);
+ View obtainView(int position, boolean[] isScrap) {
+ View view = super.obtainView(position, isScrap);
if (view instanceof TextView) {
((TextView) view).setHorizontallyScrolling(true);
diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java
index 3afd5d4..65a4673 100644
--- a/core/java/android/widget/FrameLayout.java
+++ b/core/java/android/widget/FrameLayout.java
@@ -164,12 +164,12 @@
/**
* Returns a set of layout parameters with a width of
- * {@link android.view.ViewGroup.LayoutParams#FILL_PARENT},
- * and a height of {@link android.view.ViewGroup.LayoutParams#FILL_PARENT}.
+ * {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT},
+ * and a height of {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT}.
*/
@Override
protected LayoutParams generateDefaultLayoutParams() {
- return new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
}
/**
@@ -467,9 +467,9 @@
* Creates a new set of layout parameters with the specified width, height
* and weight.
*
- * @param width the width, either {@link #FILL_PARENT},
+ * @param width the width, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
- * @param height the height, either {@link #FILL_PARENT},
+ * @param height the height, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
* @param gravity the gravity
*
diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java
index ffe9908..30a38df 100644
--- a/core/java/android/widget/GridView.java
+++ b/core/java/android/widget/GridView.java
@@ -931,11 +931,11 @@
mItemCount = mAdapter == null ? 0 : mAdapter.getCount();
final int count = mItemCount;
if (count > 0) {
- final View child = obtainView(0);
+ final View child = obtainView(0, mIsScrap);
AbsListView.LayoutParams p = (AbsListView.LayoutParams)child.getLayoutParams();
if (p == null) {
- p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+ p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, 0);
child.setLayoutParams(p);
}
@@ -1203,7 +1203,7 @@
View child;
if (!mDataChanged) {
- // Try to use an exsiting view for this position
+ // Try to use an existing view for this position
child = mRecycler.getActiveView(position);
if (child != null) {
// Found it -- we're using an existing child
@@ -1215,10 +1215,10 @@
// Make a new view for this position, or convert an unused view if
// possible
- child = obtainView(position);
+ child = obtainView(position, mIsScrap);
// This needs to be positioned and measured
- setupChild(child, position, y, flow, childrenLeft, selected, false, where);
+ setupChild(child, position, y, flow, childrenLeft, selected, mIsScrap[0], where);
return child;
}
@@ -1254,7 +1254,7 @@
// some up...
AbsListView.LayoutParams p = (AbsListView.LayoutParams)child.getLayoutParams();
if (p == null) {
- p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+ p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, 0);
}
p.viewType = mAdapter.getItemViewType(position);
diff --git a/core/java/android/widget/ImageButton.java b/core/java/android/widget/ImageButton.java
index 2fc29bc..5c05170 100644
--- a/core/java/android/widget/ImageButton.java
+++ b/core/java/android/widget/ImageButton.java
@@ -57,6 +57,11 @@
* based on the state of the button and the corresponding images
* defined in the XML.</p>
*
+ * <p>The order of the {@code <item>} elements is important because they are
+ * evaluated in order. This is why the "normal" button image comes last, because
+ * it will only be applied after {@code android:state_pressed} and {@code
+ * android:state_focused} have both evaluated false.</p>
+ *
* <p><strong>XML attributes</strong></p>
* <p>
* See {@link android.R.styleable#ImageView Button Attributes},
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java
index 8f24041..3853359 100644
--- a/core/java/android/widget/ImageView.java
+++ b/core/java/android/widget/ImageView.java
@@ -491,8 +491,16 @@
}
} else if (mUri != null) {
String scheme = mUri.getScheme();
- if (ContentResolver.SCHEME_CONTENT.equals(scheme)
- || ContentResolver.SCHEME_ANDROID_RESOURCE.equals(scheme)
+ if (ContentResolver.SCHEME_ANDROID_RESOURCE.equals(scheme)) {
+ try {
+ // Load drawable through Resources, to get the source density information
+ ContentResolver.OpenResourceIdResult r =
+ mContext.getContentResolver().getResourceId(mUri);
+ d = r.r.getDrawable(r.id);
+ } catch (Exception e) {
+ Log.w("ImageView", "Unable to open content: " + mUri, e);
+ }
+ } else if (ContentResolver.SCHEME_CONTENT.equals(scheme)
|| ContentResolver.SCHEME_FILE.equals(scheme)) {
try {
d = Drawable.createFromStream(
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java
index f49079c..37372c5 100644
--- a/core/java/android/widget/LinearLayout.java
+++ b/core/java/android/widget/LinearLayout.java
@@ -378,7 +378,7 @@
}
boolean matchWidthLocally = false;
- if (widthMode != MeasureSpec.EXACTLY && lp.width == LayoutParams.FILL_PARENT) {
+ if (widthMode != MeasureSpec.EXACTLY && lp.width == LayoutParams.MATCH_PARENT) {
// The width of the linear layout will scale, and at least one
// child said it wanted to match our width. Set a flag
// indicating that we need to remeasure at least that view when
@@ -391,7 +391,7 @@
final int measuredWidth = child.getMeasuredWidth() + margin;
maxWidth = Math.max(maxWidth, measuredWidth);
- allFillParent = allFillParent && lp.width == LayoutParams.FILL_PARENT;
+ allFillParent = allFillParent && lp.width == LayoutParams.MATCH_PARENT;
if (lp.weight > 0) {
/*
* Widths of weighted Views are bogus if we end up
@@ -472,12 +472,12 @@
maxWidth = Math.max(maxWidth, measuredWidth);
boolean matchWidthLocally = widthMode != MeasureSpec.EXACTLY &&
- lp.width == LayoutParams.FILL_PARENT;
+ lp.width == LayoutParams.MATCH_PARENT;
alternativeMaxWidth = Math.max(alternativeMaxWidth,
matchWidthLocally ? margin : measuredWidth);
- allFillParent = allFillParent && lp.width == LayoutParams.FILL_PARENT;
+ allFillParent = allFillParent && lp.width == LayoutParams.MATCH_PARENT;
mTotalLength += child.getMeasuredHeight() + lp.topMargin +
lp.bottomMargin + getNextLocationOffset(child);
@@ -515,7 +515,7 @@
if (child.getVisibility() != GONE) {
LinearLayout.LayoutParams lp = ((LinearLayout.LayoutParams)child.getLayoutParams());
- if (lp.width == LayoutParams.FILL_PARENT) {
+ if (lp.width == LayoutParams.MATCH_PARENT) {
// Temporarily force children to reuse their old measured height
// FIXME: this may not be right for something like wrapping text?
int oldHeight = lp.height;
@@ -629,7 +629,7 @@
}
boolean matchHeightLocally = false;
- if (heightMode != MeasureSpec.EXACTLY && lp.height == LayoutParams.FILL_PARENT) {
+ if (heightMode != MeasureSpec.EXACTLY && lp.height == LayoutParams.MATCH_PARENT) {
// The height of the linear layout will scale, and at least one
// child said it wanted to match our height. Set a flag indicating that
// we need to remeasure at least that view when we know our height.
@@ -657,7 +657,7 @@
maxHeight = Math.max(maxHeight, childHeight);
- allFillParent = allFillParent && lp.height == LayoutParams.FILL_PARENT;
+ allFillParent = allFillParent && lp.height == LayoutParams.MATCH_PARENT;
if (lp.weight > 0) {
/*
* Heights of weighted Views are bogus if we end up
@@ -758,7 +758,7 @@
lp.rightMargin + getNextLocationOffset(child);
boolean matchHeightLocally = heightMode != MeasureSpec.EXACTLY &&
- lp.height == LayoutParams.FILL_PARENT;
+ lp.height == LayoutParams.MATCH_PARENT;
final int margin = lp.topMargin + lp .bottomMargin;
int childHeight = child.getMeasuredHeight() + margin;
@@ -766,7 +766,7 @@
alternativeMaxHeight = Math.max(alternativeMaxHeight,
matchHeightLocally ? margin : childHeight);
- allFillParent = allFillParent && lp.height == LayoutParams.FILL_PARENT;
+ allFillParent = allFillParent && lp.height == LayoutParams.MATCH_PARENT;
if (baselineAligned) {
final int childBaseline = child.getBaseline();
@@ -832,7 +832,7 @@
if (child.getVisibility() != GONE) {
LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) child.getLayoutParams();
- if (lp.height == LayoutParams.FILL_PARENT) {
+ if (lp.height == LayoutParams.MATCH_PARENT) {
// Temporarily force children to reuse their old measured width
// FIXME: this may not be right for something like wrapping text?
int oldWidth = lp.width;
@@ -1065,7 +1065,7 @@
final LinearLayout.LayoutParams lp =
(LinearLayout.LayoutParams) child.getLayoutParams();
- if (baselineAligned && lp.height != LayoutParams.FILL_PARENT) {
+ if (baselineAligned && lp.height != LayoutParams.MATCH_PARENT) {
childBaseline = child.getBaseline();
}
@@ -1199,7 +1199,7 @@
/**
* Returns a set of layout parameters with a width of
- * {@link android.view.ViewGroup.LayoutParams#FILL_PARENT}
+ * {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT}
* and a height of {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT}
* when the layout's orientation is {@link #VERTICAL}. When the orientation is
* {@link #HORIZONTAL}, the width is set to {@link LayoutParams#WRAP_CONTENT}
@@ -1210,7 +1210,7 @@
if (mOrientation == HORIZONTAL) {
return new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
} else if (mOrientation == VERTICAL) {
- return new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
+ return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
}
return null;
}
@@ -1290,9 +1290,9 @@
* Creates a new set of layout parameters with the specified width, height
* and weight.
*
- * @param width the width, either {@link #FILL_PARENT},
+ * @param width the width, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
- * @param height the height, either {@link #FILL_PARENT},
+ * @param height the height, either {@link #MATCH_PARENT},
* {@link #WRAP_CONTENT} or a fixed size in pixels
* @param weight the weight
*/
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index e0d2cef..c63774a 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -1033,7 +1033,7 @@
mItemCount = mAdapter == null ? 0 : mAdapter.getCount();
if (mItemCount > 0 && (widthMode == MeasureSpec.UNSPECIFIED ||
heightMode == MeasureSpec.UNSPECIFIED)) {
- final View child = obtainView(0);
+ final View child = obtainView(0, mIsScrap);
measureScrapChild(child, 0, widthMeasureSpec);
@@ -1067,7 +1067,7 @@
private void measureScrapChild(View child, int position, int widthMeasureSpec) {
LayoutParams p = (LayoutParams) child.getLayoutParams();
if (p == null) {
- p = new LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+ p = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, 0);
child.setLayoutParams(p);
}
@@ -1142,9 +1142,10 @@
endPosition = (endPosition == NO_POSITION) ? adapter.getCount() - 1 : endPosition;
final AbsListView.RecycleBin recycleBin = mRecycler;
final boolean recyle = recycleOnMeasure();
+ final boolean[] isScrap = mIsScrap;
for (i = startPosition; i <= endPosition; ++i) {
- child = obtainView(i);
+ child = obtainView(i, isScrap);
measureScrapChild(child, i, widthMeasureSpec);
@@ -1665,10 +1666,10 @@
}
// Make a new view for this position, or convert an unused view if possible
- child = obtainView(position);
+ child = obtainView(position, mIsScrap);
// This needs to be positioned and measured
- setupChild(child, position, y, flow, childrenLeft, selected, false);
+ setupChild(child, position, y, flow, childrenLeft, selected, mIsScrap[0]);
return child;
}
@@ -1701,7 +1702,7 @@
// noinspection unchecked
AbsListView.LayoutParams p = (AbsListView.LayoutParams) child.getLayoutParams();
if (p == null) {
- p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+ p = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT, 0);
}
p.viewType = mAdapter.getItemViewType(position);
@@ -2387,7 +2388,7 @@
ViewGroup.LayoutParams p = child.getLayoutParams();
if (p == null) {
p = new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
@@ -2823,17 +2824,19 @@
private View addViewAbove(View theView, int position) {
int abovePosition = position - 1;
- View view = obtainView(abovePosition);
+ View view = obtainView(abovePosition, mIsScrap);
int edgeOfNewChild = theView.getTop() - mDividerHeight;
- setupChild(view, abovePosition, edgeOfNewChild, false, mListPadding.left, false, false);
+ setupChild(view, abovePosition, edgeOfNewChild, false, mListPadding.left,
+ false, mIsScrap[0]);
return view;
}
private View addViewBelow(View theView, int position) {
int belowPosition = position + 1;
- View view = obtainView(belowPosition);
+ View view = obtainView(belowPosition, mIsScrap);
int edgeOfNewChild = theView.getBottom() + mDividerHeight;
- setupChild(view, belowPosition, edgeOfNewChild, true, mListPadding.left, false, false);
+ setupChild(view, belowPosition, edgeOfNewChild, true, mListPadding.left,
+ false, mIsScrap[0]);
return view;
}
diff --git a/core/java/android/widget/MediaController.java b/core/java/android/widget/MediaController.java
index 446a992..c246c247 100644
--- a/core/java/android/widget/MediaController.java
+++ b/core/java/android/widget/MediaController.java
@@ -167,8 +167,8 @@
mAnchor = view;
FrameLayout.LayoutParams frameParams = new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT
);
removeAllViews();
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index e4cc609..d20ab3b 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -569,7 +569,7 @@
* the current width or height is requested as an explicit size from
* the window manager. You can supply
* {@link ViewGroup.LayoutParams#WRAP_CONTENT} or
- * {@link ViewGroup.LayoutParams#FILL_PARENT} to have that measure
+ * {@link ViewGroup.LayoutParams#MATCH_PARENT} to have that measure
* spec supplied instead, replacing the absolute width and height that
* has been set in the popup.</p>
*
@@ -578,11 +578,11 @@
*
* @param widthSpec an explicit width measure spec mode, either
* {@link ViewGroup.LayoutParams#WRAP_CONTENT},
- * {@link ViewGroup.LayoutParams#FILL_PARENT}, or 0 to use the absolute
+ * {@link ViewGroup.LayoutParams#MATCH_PARENT}, or 0 to use the absolute
* width.
* @param heightSpec an explicit height measure spec mode, either
* {@link ViewGroup.LayoutParams#WRAP_CONTENT},
- * {@link ViewGroup.LayoutParams#FILL_PARENT}, or 0 to use the absolute
+ * {@link ViewGroup.LayoutParams#MATCH_PARENT}, or 0 to use the absolute
* height.
*/
public void setWindowLayoutMode(int widthSpec, int heightSpec) {
@@ -785,7 +785,7 @@
if (mBackground != null) {
final ViewGroup.LayoutParams layoutParams = mContentView.getLayoutParams();
- int height = ViewGroup.LayoutParams.FILL_PARENT;
+ int height = ViewGroup.LayoutParams.MATCH_PARENT;
if (layoutParams != null &&
layoutParams.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
height = ViewGroup.LayoutParams.WRAP_CONTENT;
@@ -795,7 +795,7 @@
// within another view that owns the background drawable
PopupViewContainer popupViewContainer = new PopupViewContainer(mContext);
PopupViewContainer.LayoutParams listParams = new PopupViewContainer.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT, height
+ ViewGroup.LayoutParams.MATCH_PARENT, height
);
popupViewContainer.setBackgroundDrawable(mBackground);
popupViewContainer.addView(mContentView, listParams);
diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java
index e19a93d..1aa1df3 100644
--- a/core/java/android/widget/RelativeLayout.java
+++ b/core/java/android/widget/RelativeLayout.java
@@ -45,8 +45,7 @@
/**
* A Layout where the positions of the children can be described in relation to each other or to the
- * parent. For the sake of efficiency, the relations between views are evaluated in one pass, so if
- * view Y is dependent on the position of view X, make sure the view X comes first in the layout.
+ * parent.
*
* <p>
* Note that you cannot have a circular dependency between the size of the RelativeLayout and the
@@ -292,6 +291,8 @@
}
}
+ // TODO: we need to find another way to implement RelativeLayout
+ // This implementation cannot handle every case
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (mDirtyHierarchy) {
@@ -439,6 +440,10 @@
final int[] rules = params.getRules();
if (rules[CENTER_IN_PARENT] != 0 || rules[CENTER_HORIZONTAL] != 0) {
centerHorizontal(child, params, width);
+ } else if (rules[ALIGN_PARENT_RIGHT] != 0) {
+ final int childWidth = child.getMeasuredWidth();
+ params.mLeft = width - mPaddingRight - childWidth;
+ params.mRight = params.mLeft + childWidth;
}
}
}
@@ -465,6 +470,10 @@
final int[] rules = params.getRules();
if (rules[CENTER_IN_PARENT] != 0 || rules[CENTER_VERTICAL] != 0) {
centerVertical(child, params, height);
+ } else if (rules[ALIGN_PARENT_BOTTOM] != 0) {
+ final int childHeight = child.getMeasuredHeight();
+ params.mTop = height - mPaddingBottom - childHeight;
+ params.mBottom = params.mTop + childHeight;
}
}
}
@@ -561,7 +570,7 @@
mPaddingLeft, mPaddingRight,
myWidth);
int childHeightMeasureSpec;
- if (params.width == LayoutParams.FILL_PARENT) {
+ if (params.width == LayoutParams.MATCH_PARENT) {
childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(myHeight, MeasureSpec.EXACTLY);
} else {
childHeightMeasureSpec = MeasureSpec.makeMeasureSpec(myHeight, MeasureSpec.AT_MOST);
@@ -623,7 +632,7 @@
// We can grow in this dimension.
childSpecSize = childSize;
}
- } else if (childSize == LayoutParams.FILL_PARENT) {
+ } else if (childSize == LayoutParams.MATCH_PARENT) {
// Child wanted to be as big as possible. Give all availble
// space
childSpecMode = MeasureSpec.EXACTLY;
@@ -674,7 +683,7 @@
params.mRight = params.mLeft + child.getMeasuredWidth();
}
}
- return false;
+ return rules[ALIGN_PARENT_RIGHT] != 0;
}
private boolean positionChildVertical(View child, LayoutParams params, int myHeight,
@@ -703,7 +712,7 @@
params.mBottom = params.mTop + child.getMeasuredHeight();
}
}
- return false;
+ return rules[ALIGN_PARENT_BOTTOM] != 0;
}
private void applyHorizontalSizeRules(LayoutParams childParams, int myWidth) {
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index c115073..3003580 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -26,6 +26,7 @@
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.net.Uri;
+import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
@@ -37,7 +38,6 @@
import android.view.LayoutInflater.Filter;
import android.view.View.OnClickListener;
-import java.lang.Class;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -283,6 +283,7 @@
static final int CHAR_SEQUENCE = 10;
static final int URI = 11;
static final int BITMAP = 12;
+ static final int BUNDLE = 13;
int viewId;
String methodName;
@@ -342,6 +343,9 @@
case BITMAP:
this.value = Bitmap.CREATOR.createFromParcel(in);
break;
+ case BUNDLE:
+ this.value = in.readBundle();
+ break;
default:
break;
}
@@ -394,6 +398,9 @@
case BITMAP:
((Bitmap)this.value).writeToParcel(out, flags);
break;
+ case BUNDLE:
+ out.writeBundle((Bundle) this.value);
+ break;
default:
break;
}
@@ -425,6 +432,8 @@
return Uri.class;
case BITMAP:
return Bitmap.class;
+ case BUNDLE:
+ return Bundle.class;
default:
return null;
}
@@ -886,6 +895,17 @@
}
/**
+ * Call a method taking one Bundle on a view in the layout for this RemoteViews.
+ *
+ * @param viewId The id of the view whose text should change
+ * @param methodName The name of the method to call.
+ * @param value The value to pass to the method.
+ */
+ public void setBundle(int viewId, String methodName, Bundle value) {
+ addAction(new ReflectionAction(viewId, methodName, ReflectionAction.BUNDLE, value));
+ }
+
+ /**
* Inflates the view hierarchy represented by this object and applies
* all of the actions.
*
diff --git a/core/java/android/widget/SimpleAdapter.java b/core/java/android/widget/SimpleAdapter.java
index 9dd4d15..479965a 100644
--- a/core/java/android/widget/SimpleAdapter.java
+++ b/core/java/android/widget/SimpleAdapter.java
@@ -25,7 +25,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import java.util.WeakHashMap;
/**
* An easy adapter to map static data to views defined in an XML file. You can specify the data
@@ -58,7 +57,6 @@
private int mResource;
private int mDropDownResource;
private LayoutInflater mInflater;
- private final WeakHashMap<View, View[]> mHolders = new WeakHashMap<View, View[]>();
private SimpleFilter mFilter;
private ArrayList<Map<String, ?>> mUnfilteredData;
@@ -121,16 +119,6 @@
View v;
if (convertView == null) {
v = mInflater.inflate(resource, parent, false);
-
- final int[] to = mTo;
- final int count = to.length;
- final View[] holder = new View[count];
-
- for (int i = 0; i < count; i++) {
- holder[i] = v.findViewById(to[i]);
- }
-
- mHolders.put(v, holder);
} else {
v = convertView;
}
@@ -162,13 +150,12 @@
}
final ViewBinder binder = mViewBinder;
- final View[] holder = mHolders.get(view);
final String[] from = mFrom;
final int[] to = mTo;
final int count = to.length;
for (int i = 0; i < count; i++) {
- final View v = holder[i];
+ final View v = view.findViewById(to[i]);
if (v != null) {
final Object data = dataSet.get(from[i]);
String text = data == null ? "" : data.toString();
@@ -187,7 +174,8 @@
((Checkable) v).setChecked((Boolean) data);
} else {
throw new IllegalStateException(v.getClass().getName() +
- " should be bound to a Boolean, not a " + data.getClass());
+ " should be bound to a Boolean, not a " +
+ (data == null ? "<unknown type>" : data.getClass()));
}
} else if (v instanceof TextView) {
// Note: keep the instanceof TextView check at the bottom of these
diff --git a/core/java/android/widget/SimpleCursorAdapter.java b/core/java/android/widget/SimpleCursorAdapter.java
index 436b79b..7d3459e 100644
--- a/core/java/android/widget/SimpleCursorAdapter.java
+++ b/core/java/android/widget/SimpleCursorAdapter.java
@@ -20,9 +20,6 @@
import android.database.Cursor;
import android.net.Uri;
import android.view.View;
-import android.view.ViewGroup;
-
-import java.util.WeakHashMap;
/**
* An easy adapter to map columns from a cursor to TextViews or ImageViews
@@ -66,7 +63,6 @@
private CursorToStringConverter mCursorToStringConverter;
private ViewBinder mViewBinder;
private String[] mOriginalFrom;
- private final WeakHashMap<View, View[]> mHolders = new WeakHashMap<View, View[]>();
/**
* Constructor.
@@ -91,29 +87,6 @@
findColumns(from);
}
- @Override
- public View newView(Context context, Cursor cursor, ViewGroup parent) {
- return generateViewHolder(super.newView(context, cursor, parent));
- }
-
- @Override
- public View newDropDownView(Context context, Cursor cursor, ViewGroup parent) {
- return generateViewHolder(super.newDropDownView(context, cursor, parent));
- }
-
- private View generateViewHolder(View v) {
- final int[] to = mTo;
- final int count = to.length;
- final View[] holder = new View[count];
-
- for (int i = 0; i < count; i++) {
- holder[i] = v.findViewById(to[i]);
- }
- mHolders.put(v, holder);
-
- return v;
- }
-
/**
* Binds all of the field names passed into the "to" parameter of the
* constructor with their corresponding cursor columns as specified in the
@@ -140,13 +113,13 @@
*/
@Override
public void bindView(View view, Context context, Cursor cursor) {
- final View[] holder = mHolders.get(view);
final ViewBinder binder = mViewBinder;
final int count = mTo.length;
final int[] from = mFrom;
+ final int[] to = mTo;
for (int i = 0; i < count; i++) {
- final View v = holder[i];
+ final View v = view.findViewById(to[i]);
if (v != null) {
boolean bound = false;
if (binder != null) {
diff --git a/core/java/android/widget/SlidingDrawer.java b/core/java/android/widget/SlidingDrawer.java
index f706744..11d72de 100644
--- a/core/java/android/widget/SlidingDrawer.java
+++ b/core/java/android/widget/SlidingDrawer.java
@@ -43,7 +43,7 @@
* SlidingDrawer should be used as an overlay inside layouts. This means SlidingDrawer
* should only be used inside of a FrameLayout or a RelativeLayout for instance. The
* size of the SlidingDrawer defines how much space the content will occupy once slid
- * out so SlidingDrawer should usually use fill_parent for both its dimensions.
+ * out so SlidingDrawer should usually use match_parent for both its dimensions.
*
* Inside an XML layout, SlidingDrawer must define the id of the handle and of the
* content:
@@ -51,8 +51,8 @@
* <pre class="prettyprint">
* <SlidingDrawer
* android:id="@+id/drawer"
- * android:layout_width="fill_parent"
- * android:layout_height="fill_parent"
+ * android:layout_width="match_parent"
+ * android:layout_height="match_parent"
*
* android:handle="@+id/handle"
* android:content="@+id/content">
@@ -64,8 +64,8 @@
*
* <GridView
* android:id="@id/content"
- * android:layout_width="fill_parent"
- * android:layout_height="fill_parent" />
+ * android:layout_width="match_parent"
+ * android:layout_height="match_parent" />
*
* </SlidingDrawer>
* </pre>
diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java
index 412f817..78e2fee 100644
--- a/core/java/android/widget/TabHost.java
+++ b/core/java/android/widget/TabHost.java
@@ -327,8 +327,8 @@
.addView(
mCurrentView,
new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
}
if (!mTabWidget.hasFocus()) {
diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java
index c12d098..aa47e6d 100644
--- a/core/java/android/widget/TabWidget.java
+++ b/core/java/android/widget/TabWidget.java
@@ -16,8 +16,6 @@
package android.widget;
-import com.android.internal.R;
-
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -26,7 +24,6 @@
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnFocusChangeListener;
@@ -313,7 +310,7 @@
if (child.getLayoutParams() == null) {
final LinearLayout.LayoutParams lp = new LayoutParams(
0,
- ViewGroup.LayoutParams.FILL_PARENT, 1.0f);
+ ViewGroup.LayoutParams.MATCH_PARENT, 1.0f);
lp.setMargins(0, 0, 0, 0);
child.setLayoutParams(lp);
}
@@ -328,7 +325,7 @@
ImageView divider = new ImageView(mContext);
final LinearLayout.LayoutParams lp = new LayoutParams(
mDividerDrawable.getIntrinsicWidth(),
- LayoutParams.FILL_PARENT);
+ LayoutParams.MATCH_PARENT);
lp.setMargins(0, 0, 0, 0);
divider.setLayoutParams(lp);
divider.setBackgroundDrawable(mDividerDrawable);
diff --git a/core/java/android/widget/TableLayout.java b/core/java/android/widget/TableLayout.java
index afa2f3b..66500a3 100644
--- a/core/java/android/widget/TableLayout.java
+++ b/core/java/android/widget/TableLayout.java
@@ -52,7 +52,7 @@
* {@link #setColumnCollapsed(int,boolean) setColumnCollapsed()}.</p>
*
* <p>The children of a TableLayout cannot specify the <code>layout_width</code>
- * attribute. Width is always <code>FILL_PARENT</code>. However, the
+ * attribute. Width is always <code>MATCH_PARENT</code>. However, the
* <code>layout_height</code> attribute can be defined by a child; default value
* is {@link android.widget.TableLayout.LayoutParams#WRAP_CONTENT}. If the child
* is a {@link android.widget.TableRow}, then the height is always
@@ -621,7 +621,7 @@
/**
* Returns a set of layout parameters with a width of
- * {@link android.view.ViewGroup.LayoutParams#FILL_PARENT},
+ * {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT},
* and a height of {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT}.
*/
@Override
@@ -647,7 +647,7 @@
/**
* <p>This set of layout parameters enforces the width of each child to be
- * {@link #FILL_PARENT} and the height of each child to be
+ * {@link #MATCH_PARENT} and the height of each child to be
* {@link #WRAP_CONTENT}, but only if the height is not specified.</p>
*/
@SuppressWarnings({"UnusedDeclaration"})
@@ -663,14 +663,14 @@
* {@inheritDoc}
*/
public LayoutParams(int w, int h) {
- super(FILL_PARENT, h);
+ super(MATCH_PARENT, h);
}
/**
* {@inheritDoc}
*/
public LayoutParams(int w, int h, float initWeight) {
- super(FILL_PARENT, h, initWeight);
+ super(MATCH_PARENT, h, initWeight);
}
/**
@@ -679,7 +679,7 @@
* {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT}.</p>
*/
public LayoutParams() {
- super(FILL_PARENT, WRAP_CONTENT);
+ super(MATCH_PARENT, WRAP_CONTENT);
}
/**
@@ -698,7 +698,7 @@
/**
* <p>Fixes the row's width to
- * {@link android.view.ViewGroup.LayoutParams#FILL_PARENT}; the row's
+ * {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT}; the row's
* height is fixed to
* {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} if no layout
* height is specified.</p>
@@ -710,7 +710,7 @@
@Override
protected void setBaseAttributes(TypedArray a,
int widthAttr, int heightAttr) {
- this.width = FILL_PARENT;
+ this.width = MATCH_PARENT;
if (a.hasValue(heightAttr)) {
this.height = a.getLayoutDimension(heightAttr, "layout_height");
} else {
diff --git a/core/java/android/widget/TableRow.java b/core/java/android/widget/TableRow.java
index 5628cab..abf08bf 100644
--- a/core/java/android/widget/TableRow.java
+++ b/core/java/android/widget/TableRow.java
@@ -35,7 +35,7 @@
* <p>The children of a TableRow do not need to specify the
* <code>layout_width</code> and <code>layout_height</code> attributes in the
* XML file. TableRow always enforces those values to be respectively
- * {@link android.widget.TableLayout.LayoutParams#FILL_PARENT} and
+ * {@link android.widget.TableLayout.LayoutParams#MATCH_PARENT} and
* {@link android.widget.TableLayout.LayoutParams#WRAP_CONTENT}.</p>
*
* <p>
@@ -299,7 +299,7 @@
case LayoutParams.WRAP_CONTENT:
spec = getChildMeasureSpec(widthMeasureSpec, 0, LayoutParams.WRAP_CONTENT);
break;
- case LayoutParams.FILL_PARENT:
+ case LayoutParams.MATCH_PARENT:
spec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
break;
default:
@@ -351,7 +351,7 @@
/**
* Returns a set of layout parameters with a width of
- * {@link android.view.ViewGroup.LayoutParams#FILL_PARENT},
+ * {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT},
* a height of {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} and no spanning.
*/
@Override
@@ -451,7 +451,7 @@
* {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT}.</p>
*/
public LayoutParams() {
- super(FILL_PARENT, WRAP_CONTENT);
+ super(MATCH_PARENT, WRAP_CONTENT);
column = -1;
span = 1;
}
@@ -459,7 +459,7 @@
/**
* <p>Puts the view in the specified column.</p>
*
- * <p>Sets the child width to {@link android.view.ViewGroup.LayoutParams#FILL_PARENT}
+ * <p>Sets the child width to {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT}
* and the child height to
* {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT}.</p>
*
@@ -490,7 +490,7 @@
if (a.hasValue(widthAttr)) {
width = a.getLayoutDimension(widthAttr, "layout_width");
} else {
- width = FILL_PARENT;
+ width = MATCH_PARENT;
}
// We don't want to force users to specify a layout_height
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 455b593..12e8e29 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4992,7 +4992,7 @@
final int height = mLayoutParams.height;
// If the size of the view does not depend on the size of the text, try to
// start the marquee immediately
- if (height != LayoutParams.WRAP_CONTENT && height != LayoutParams.FILL_PARENT) {
+ if (height != LayoutParams.WRAP_CONTENT && height != LayoutParams.MATCH_PARENT) {
startMarquee();
} else {
// Defer the start of the marquee until we know our width (see setFrame())
@@ -5307,7 +5307,7 @@
if (desiredHeight != this.getHeight()) {
sizeChanged = true;
}
- } else if (mLayoutParams.height == LayoutParams.FILL_PARENT) {
+ } else if (mLayoutParams.height == LayoutParams.MATCH_PARENT) {
if (mDesiredHeightAtMeasure >= 0) {
int desiredHeight = getDesiredHeight();
@@ -5354,7 +5354,7 @@
if (mEllipsize != TextUtils.TruncateAt.MARQUEE) {
// In a fixed-height view, so use our new text layout.
if (mLayoutParams.height != LayoutParams.WRAP_CONTENT &&
- mLayoutParams.height != LayoutParams.FILL_PARENT) {
+ mLayoutParams.height != LayoutParams.MATCH_PARENT) {
invalidate();
return;
}
diff --git a/core/java/android/widget/ViewSwitcher.java b/core/java/android/widget/ViewSwitcher.java
index 0dcaf95..71ae624 100644
--- a/core/java/android/widget/ViewSwitcher.java
+++ b/core/java/android/widget/ViewSwitcher.java
@@ -80,7 +80,7 @@
View child = mFactory.makeView();
LayoutParams lp = (LayoutParams) child.getLayoutParams();
if (lp == null) {
- lp = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
+ lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
}
addView(child, lp);
return child;
diff --git a/core/java/android/widget/ZoomButtonsController.java b/core/java/android/widget/ZoomButtonsController.java
index e55fbb8..bea009c0 100644
--- a/core/java/android/widget/ZoomButtonsController.java
+++ b/core/java/android/widget/ZoomButtonsController.java
@@ -247,7 +247,7 @@
LayoutParams.FLAG_LAYOUT_NO_LIMITS |
LayoutParams.FLAG_ALT_FOCUSABLE_IM;
lp.height = LayoutParams.WRAP_CONTENT;
- lp.width = LayoutParams.FILL_PARENT;
+ lp.width = LayoutParams.MATCH_PARENT;
lp.type = LayoutParams.TYPE_APPLICATION_PANEL;
lp.format = PixelFormat.TRANSLUCENT;
lp.windowAnimations = com.android.internal.R.style.Animation_ZoomButtons;
diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java
index 57dbb44..f56b15c 100644
--- a/core/java/com/android/internal/app/AlertController.java
+++ b/core/java/com/android/internal/app/AlertController.java
@@ -16,7 +16,7 @@
package com.android.internal.app;
-import static android.view.ViewGroup.LayoutParams.FILL_PARENT;
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
@@ -361,7 +361,7 @@
if (mView != null) {
customPanel = (FrameLayout) mWindow.findViewById(R.id.customPanel);
FrameLayout custom = (FrameLayout) mWindow.findViewById(R.id.custom);
- custom.addView(mView, new LayoutParams(FILL_PARENT, FILL_PARENT));
+ custom.addView(mView, new LayoutParams(MATCH_PARENT, MATCH_PARENT));
if (mViewSpacingSpecified) {
custom.setPadding(mViewSpacingLeft, mViewSpacingTop, mViewSpacingRight,
mViewSpacingBottom);
@@ -391,7 +391,7 @@
if (mCustomTitleView != null) {
// Add the custom title view directly to the topPanel layout
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
- LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
+ LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
topPanel.addView(mCustomTitleView, lp);
@@ -460,8 +460,8 @@
if (mListView != null) {
contentPanel.removeView(mWindow.findViewById(R.id.scrollView));
contentPanel.addView(mListView,
- new LinearLayout.LayoutParams(FILL_PARENT, FILL_PARENT));
- contentPanel.setLayoutParams(new LinearLayout.LayoutParams(FILL_PARENT, 0, 1.0f));
+ new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));
+ contentPanel.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, 0, 1.0f));
} else {
contentPanel.setVisibility(View.GONE);
}
@@ -657,8 +657,8 @@
ViewGroup parent = (ViewGroup) mWindow.findViewById(R.id.parentPanel);
parent.removeView(buttonPanel);
AbsListView.LayoutParams params = new AbsListView.LayoutParams(
- AbsListView.LayoutParams.FILL_PARENT,
- AbsListView.LayoutParams.FILL_PARENT);
+ AbsListView.LayoutParams.MATCH_PARENT,
+ AbsListView.LayoutParams.MATCH_PARENT);
buttonPanel.setLayoutParams(params);
mListView.addFooterView(buttonPanel);
*/
diff --git a/core/java/com/android/internal/app/ExternalMediaFormatActivity.java b/core/java/com/android/internal/app/ExternalMediaFormatActivity.java
index 000f6c4..2b07ae6 100644
--- a/core/java/com/android/internal/app/ExternalMediaFormatActivity.java
+++ b/core/java/com/android/internal/app/ExternalMediaFormatActivity.java
@@ -102,7 +102,7 @@
.getService("mount"));
if (mountService != null) {
try {
- mountService.formatMedia(Environment.getExternalStorageDirectory().toString());
+ mountService.formatVolume(Environment.getExternalStorageDirectory().toString());
} catch (RemoteException e) {
}
}
diff --git a/core/java/com/android/internal/app/ShutdownThread.java b/core/java/com/android/internal/app/ShutdownThread.java
index 2060cf8..c110f95 100644
--- a/core/java/com/android/internal/app/ShutdownThread.java
+++ b/core/java/com/android/internal/app/ShutdownThread.java
@@ -32,6 +32,7 @@
import android.os.Power;
import android.os.ServiceManager;
import android.os.SystemClock;
+import android.os.IMountService;
import com.android.internal.telephony.ITelephony;
import android.util.Log;
@@ -189,6 +190,10 @@
final IBluetooth bluetooth =
IBluetooth.Stub.asInterface(ServiceManager.checkService(
BluetoothAdapter.BLUETOOTH_SERVICE));
+
+ final IMountService mount =
+ IMountService.Stub.asInterface(
+ ServiceManager.checkService("mount"));
try {
bluetoothOff = bluetooth == null ||
@@ -241,6 +246,17 @@
SystemClock.sleep(PHONE_STATE_POLL_SLEEP_MSEC);
}
+ // Shutdown MountService to ensure media is in a safe state
+ try {
+ if (mount != null) {
+ mount.shutdown();
+ } else {
+ Log.w(TAG, "MountService unavailable for shutdown");
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "Exception during MountService shutdown", e);
+ }
+
//shutdown power
Log.i(TAG, "Performing low-level shutdown...");
Power.shutdown();
diff --git a/core/java/com/android/internal/net/DbSSLSessionCache.java b/core/java/com/android/internal/net/DbSSLSessionCache.java
deleted file mode 100644
index 842d40b..0000000
--- a/core/java/com/android/internal/net/DbSSLSessionCache.java
+++ /dev/null
@@ -1,289 +0,0 @@
-// Copyright 2009 The Android Open Source Project
-
-package com.android.internal.net;
-
-import android.content.ContentValues;
-import android.content.Context;
-import android.database.Cursor;
-import android.database.SQLException;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteOpenHelper;
-import android.util.Log;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.harmony.xnet.provider.jsse.SSLClientSessionCache;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.net.ssl.SSLSession;
-
-/**
- * Hook into harmony SSL cache to persist the SSL sessions.
- *
- * Current implementation is suitable for saving a small number of hosts -
- * like google services. It can be extended with expiration and more features
- * to support more hosts.
- *
- * {@hide}
- */
-public class DbSSLSessionCache implements SSLClientSessionCache {
- private static final String TAG = "DbSSLSessionCache";
-
- /**
- * Table where sessions are stored.
- */
- public static final String SSL_CACHE_TABLE = "ssl_sessions";
-
- private static final String SSL_CACHE_ID = "_id";
-
- /**
- * Key is host:port - port is not optional.
- */
- private static final String SSL_CACHE_HOSTPORT = "hostport";
-
- /**
- * Base64-encoded DER value of the session.
- */
- private static final String SSL_CACHE_SESSION = "session";
-
- /**
- * Time when the record was added - should be close to the time
- * of the initial session negotiation.
- */
- private static final String SSL_CACHE_TIME_SEC = "time_sec";
-
- public static final String DATABASE_NAME = "ssl_sessions.db";
-
- public static final int DATABASE_VERSION = 2;
-
- /** public for testing
- */
- public static final int SSL_CACHE_ID_COL = 0;
- public static final int SSL_CACHE_HOSTPORT_COL = 1;
- public static final int SSL_CACHE_SESSION_COL = 2;
- public static final int SSL_CACHE_TIME_SEC_COL = 3;
-
- public static final int MAX_CACHE_SIZE = 256;
-
- private final Map<String, byte[]> mExternalCache =
- new HashMap<String, byte[]>();
-
-
- private DatabaseHelper mDatabaseHelper;
-
- private boolean mNeedsCacheLoad = true;
-
- public static final String[] PROJECTION = new String[] {
- SSL_CACHE_ID,
- SSL_CACHE_HOSTPORT,
- SSL_CACHE_SESSION,
- SSL_CACHE_TIME_SEC
- };
-
- private static final Map<String,DbSSLSessionCache> sInstances =
- new HashMap<String,DbSSLSessionCache>();
-
- /**
- * Returns a singleton instance of the DbSSLSessionCache that should be used for this
- * context's package.
- *
- * @param context The context that should be used for getting/creating the singleton instance.
- * @return The singleton instance for the context's package.
- */
- public static synchronized DbSSLSessionCache getInstanceForPackage(Context context) {
- String packageName = context.getPackageName();
- if (sInstances.containsKey(packageName)) {
- return sInstances.get(packageName);
- }
- DbSSLSessionCache cache = new DbSSLSessionCache(context);
- sInstances.put(packageName, cache);
- return cache;
- }
-
- /**
- * Create a SslSessionCache instance, using the specified context to
- * initialize the database.
- *
- * This constructor will use the default database - created for the application
- * context.
- *
- * @param activityContext
- */
- private DbSSLSessionCache(Context activityContext) {
- Context appContext = activityContext.getApplicationContext();
- mDatabaseHelper = new DatabaseHelper(appContext);
- }
-
- /**
- * Create a SslSessionCache that uses a specific database.
- *
- *
- * @param database
- */
- public DbSSLSessionCache(DatabaseHelper database) {
- this.mDatabaseHelper = database;
- }
-
- public void putSessionData(SSLSession session, byte[] der) {
- if (mDatabaseHelper == null) {
- return;
- }
- synchronized (this.getClass()) {
- SQLiteDatabase db = mDatabaseHelper.getWritableDatabase();
- if (mExternalCache.size() == MAX_CACHE_SIZE) {
- // remove oldest.
- // TODO: check if the new one is in cached already ( i.e. update ).
- Cursor byTime = mDatabaseHelper.getReadableDatabase().query(SSL_CACHE_TABLE,
- PROJECTION, null, null, null, null, SSL_CACHE_TIME_SEC);
- if (byTime.moveToFirst()) {
- // TODO: can I do byTime.deleteRow() ?
- String hostPort = byTime.getString(SSL_CACHE_HOSTPORT_COL);
- db.delete(SSL_CACHE_TABLE,
- SSL_CACHE_HOSTPORT + "= ?" , new String[] { hostPort });
- mExternalCache.remove(hostPort);
- } else {
- Log.w(TAG, "No rows found");
- // something is wrong, clear it
- clear();
- }
- }
- // Serialize native session to standard DER encoding
- long t0 = System.currentTimeMillis();
-
- String b64 = new String(Base64.encodeBase64(der));
- String key = session.getPeerHost() + ":" + session.getPeerPort();
-
- ContentValues values = new ContentValues();
- values.put(SSL_CACHE_HOSTPORT, key);
- values.put(SSL_CACHE_SESSION, b64);
- values.put(SSL_CACHE_TIME_SEC, System.currentTimeMillis() / 1000);
-
- mExternalCache.put(key, der);
-
- try {
- db.insert(SSL_CACHE_TABLE, null /*nullColumnHack */ , values);
- } catch(SQLException ex) {
- // Ignore - nothing we can do to recover, and caller shouldn't
- // be affected.
- Log.w(TAG, "Ignoring SQL exception when caching session", ex);
- }
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- long t1 = System.currentTimeMillis();
- Log.d(TAG, "New SSL session " + session.getPeerHost() +
- " DER len: " + der.length + " " + (t1 - t0));
- }
- }
-
- }
-
- public byte[] getSessionData(String host, int port) {
- // Current (simple) implementation does a single lookup to DB, then saves
- // all entries to the cache.
-
- // This works for google services - i.e. small number of certs.
- // If we extend this to all processes - we should hold a separate cache
- // or do lookups to DB each time.
- if (mDatabaseHelper == null) {
- return null;
- }
- synchronized(this.getClass()) {
- if (mNeedsCacheLoad) {
- // Don't try to load again, if something is wrong on the first
- // request it'll likely be wrong each time.
- mNeedsCacheLoad = false;
- long t0 = System.currentTimeMillis();
-
- Cursor cur = null;
- try {
- cur = mDatabaseHelper.getReadableDatabase().query(SSL_CACHE_TABLE,
- PROJECTION, null, null, null, null, null);
- if (cur.moveToFirst()) {
- do {
- String hostPort = cur.getString(SSL_CACHE_HOSTPORT_COL);
- String value = cur.getString(SSL_CACHE_SESSION_COL);
-
- if (hostPort == null || value == null) {
- continue;
- }
- // TODO: blob support ?
- byte[] der = Base64.decodeBase64(value.getBytes());
- mExternalCache.put(hostPort, der);
- } while (cur.moveToNext());
-
- }
- } catch (SQLException ex) {
- Log.d(TAG, "Error loading SSL cached entries ", ex);
- } finally {
- if (cur != null) {
- cur.close();
- }
- if (Log.isLoggable(TAG, Log.DEBUG)) {
- long t1 = System.currentTimeMillis();
- Log.d(TAG, "LOADED CACHED SSL " + (t1 - t0) + " ms");
- }
- }
- }
-
- String key = host + ":" + port;
-
- return mExternalCache.get(key);
- }
- }
-
- /**
- * Reset the database and internal state.
- * Used for testing or to free space.
- */
- public void clear() {
- synchronized(this) {
- try {
- mExternalCache.clear();
- mNeedsCacheLoad = true;
- mDatabaseHelper.getWritableDatabase().delete(SSL_CACHE_TABLE,
- null, null);
- } catch (SQLException ex) {
- Log.d(TAG, "Error removing SSL cached entries ", ex);
- // ignore - nothing we can do about it
- }
- }
- }
-
- public byte[] getSessionData(byte[] id) {
- // We support client side only - the cache will do nothing for
- // server-side sessions.
- return null;
- }
-
- /** Visible for testing.
- */
- public static class DatabaseHelper extends SQLiteOpenHelper {
-
- public DatabaseHelper(Context context) {
- super(context, DATABASE_NAME, null /* factory */, DATABASE_VERSION);
- }
-
- @Override
- public void onCreate(SQLiteDatabase db) {
- db.execSQL("CREATE TABLE " + SSL_CACHE_TABLE + " (" +
- SSL_CACHE_ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
- SSL_CACHE_HOSTPORT + " TEXT UNIQUE ON CONFLICT REPLACE," +
- SSL_CACHE_SESSION + " TEXT," +
- SSL_CACHE_TIME_SEC + " INTEGER" +
- ");");
-
- // No index - we load on startup, index would slow down inserts.
- // If we want to scale this to lots of rows - we could use
- // index, but then we'll hit DB a bit too often ( including
- // negative hits )
- }
-
- @Override
- public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
- db.execSQL("DROP TABLE IF EXISTS " + SSL_CACHE_TABLE );
- onCreate(db);
- }
-
- }
-
-}
diff --git a/core/java/com/android/internal/os/RecoverySystem.java b/core/java/com/android/internal/os/RecoverySystem.java
deleted file mode 100644
index 3aca683..0000000
--- a/core/java/com/android/internal/os/RecoverySystem.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.internal.os;
-
-import android.os.FileUtils;
-import android.os.Power;
-import android.util.Log;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * Utility class for interacting with the Android recovery partition.
- * The recovery partition is a small standalone system which can perform
- * operations that are difficult while the main system is running, like
- * upgrading system software or reformatting the data partition.
- * Note that most of these operations must be run as root.
- *
- * @hide
- */
-public class RecoverySystem {
- private static final String TAG = "RecoverySystem"; // for logging
-
- // Used to communicate with recovery. See commands/recovery/recovery.c.
- private static File RECOVERY_DIR = new File("/cache/recovery");
- private static File COMMAND_FILE = new File(RECOVERY_DIR, "command");
- private static File LOG_FILE = new File(RECOVERY_DIR, "log");
-
- // Length limits for reading files.
- private static int LOG_FILE_MAX_LENGTH = 8 * 1024;
-
- /**
- * Reboot into the recovery system to install a system update.
- * @param update package to install (must be in /cache or /data).
- * @throws IOException if something goes wrong.
- */
- public static void rebootAndUpdate(File update) throws IOException {
- String path = update.getCanonicalPath();
- if (path.startsWith("/cache/")) {
- path = "CACHE:" + path.substring(7);
- } else if (path.startsWith("/data/")) {
- path = "DATA:" + path.substring(6);
- } else {
- throw new IllegalArgumentException(
- "Must start with /cache or /data: " + path);
- }
- bootCommand("--update_package=" + path);
- }
-
- /**
- * Reboot into the recovery system to wipe the /data partition.
- * @param extras to add to the RECOVERY_COMPLETED intent after rebooting.
- * @throws IOException if something goes wrong.
- */
- public static void rebootAndWipe() throws IOException {
- bootCommand("--wipe_data");
- }
-
- /**
- * Reboot into the recovery system to wipe the /data partition and toggle
- * Encrypted File Systems on/off.
- * @param extras to add to the RECOVERY_COMPLETED intent after rebooting.
- * @throws IOException if something goes wrong.
- * @hide
- */
- public static void rebootAndToggleEFS(boolean efsEnabled) throws IOException {
- if (efsEnabled) {
- bootCommand("--set_encrypted_filesystem=on");
- } else {
- bootCommand("--set_encrypted_filesystem=off");
- }
- }
-
- /**
- * Reboot into the recovery system with the supplied argument.
- * @param arg to pass to the recovery utility.
- * @throws IOException if something goes wrong.
- */
- private static void bootCommand(String arg) throws IOException {
- RECOVERY_DIR.mkdirs(); // In case we need it
- COMMAND_FILE.delete(); // In case it's not writable
- LOG_FILE.delete();
-
- FileWriter command = new FileWriter(COMMAND_FILE);
- try {
- command.write(arg);
- command.write("\n");
- } finally {
- command.close();
- }
-
- // Having written the command file, go ahead and reboot
- Power.reboot("recovery");
- throw new IOException("Reboot failed (no permissions?)");
- }
-
- /**
- * Called after booting to process and remove recovery-related files.
- * @return the log file from recovery, or null if none was found.
- */
- public static String handleAftermath() {
- // Record the tail of the LOG_FILE
- String log = null;
- try {
- log = FileUtils.readTextFile(LOG_FILE, -LOG_FILE_MAX_LENGTH, "...\n");
- } catch (FileNotFoundException e) {
- Log.i(TAG, "No recovery log file");
- } catch (IOException e) {
- Log.e(TAG, "Error reading recovery log", e);
- }
-
- // Delete everything in RECOVERY_DIR
- String[] names = RECOVERY_DIR.list();
- for (int i = 0; names != null && i < names.length; i++) {
- File f = new File(RECOVERY_DIR, names[i]);
- if (!f.delete()) {
- Log.e(TAG, "Can't delete: " + f);
- } else {
- Log.i(TAG, "Deleted: " + f);
- }
- }
-
- return log;
- }
-}
diff --git a/core/java/com/android/internal/view/menu/IconMenuItemView.java b/core/java/com/android/internal/view/menu/IconMenuItemView.java
index 66e15c1..3c5b422 100644
--- a/core/java/com/android/internal/view/menu/IconMenuItemView.java
+++ b/core/java/com/android/internal/view/menu/IconMenuItemView.java
@@ -254,7 +254,7 @@
if (lp == null) {
// Default layout parameters
lp = new IconMenuView.LayoutParams(
- IconMenuView.LayoutParams.FILL_PARENT, IconMenuView.LayoutParams.FILL_PARENT);
+ IconMenuView.LayoutParams.MATCH_PARENT, IconMenuView.LayoutParams.MATCH_PARENT);
}
// Set the desired width of item
diff --git a/core/java/com/android/internal/widget/ContactHeaderWidget.java b/core/java/com/android/internal/widget/ContactHeaderWidget.java
index 19debec..33fd936 100644
--- a/core/java/com/android/internal/widget/ContactHeaderWidget.java
+++ b/core/java/com/android/internal/widget/ContactHeaderWidget.java
@@ -119,12 +119,12 @@
int CONTACT_STATUS_RES_PACKAGE = 8;
int CONTACT_STATUS_LABEL = 9;
}
-
+
private interface PhotoQuery {
String[] COLUMNS = new String[] {
Photo.PHOTO
};
-
+
int PHOTO = 0;
}
@@ -241,13 +241,13 @@
case TOKEN_PHOTO_QUERY: {
//Set the photo
Bitmap photoBitmap = null;
- if (cursor != null && cursor.moveToFirst()
+ if (cursor != null && cursor.moveToFirst()
&& !cursor.isNull(PhotoQuery.PHOTO)) {
byte[] photoData = cursor.getBlob(PhotoQuery.PHOTO);
photoBitmap = BitmapFactory.decodeByteArray(photoData, 0,
photoData.length, null);
}
-
+
if (photoBitmap == null) {
photoBitmap = loadPlaceholderPhoto(null);
}
@@ -261,7 +261,7 @@
case TOKEN_CONTACT_INFO: {
if (cursor != null && cursor.moveToFirst()) {
bindContactInfo(cursor);
- Uri lookupUri = Contacts.getLookupUri(cursor.getLong(ContactQuery._ID),
+ Uri lookupUri = Contacts.getLookupUri(cursor.getLong(ContactQuery._ID),
cursor.getString(ContactQuery.LOOKUP_KEY));
startPhotoQuery(cursor.getLong(ContactQuery.PHOTO_ID), lookupUri);
invalidate();
@@ -277,6 +277,7 @@
} else {
String phoneNumber = (String) cookie;
setDisplayName(phoneNumber, null);
+ setSocialSnippet(null);
mPhotoView.assignContactFromPhone(phoneNumber, true);
}
break;
@@ -290,6 +291,7 @@
} else {
String emailAddress = (String) cookie;
setDisplayName(emailAddress, null);
+ setSocialSnippet(null);
mPhotoView.assignContactFromEmail(emailAddress, true);
}
break;
@@ -374,6 +376,7 @@
public void setSocialSnippet(CharSequence snippet) {
if (snippet == null) {
mStatusView.setVisibility(View.GONE);
+ mStatusAttributionView.setVisibility(View.GONE);
} else {
mStatusView.setText(snippet);
mStatusView.setVisibility(View.VISIBLE);
@@ -446,7 +449,9 @@
*
*/
public void wipeClean() {
+ setDisplayName(null, null);
setPhoto(null);
+ setSocialSnippet(null);
mContactUri = null;
mExcludeMimes = null;
}
@@ -457,11 +462,11 @@
}
protected void startPhotoQuery(long photoId, Uri lookupKey) {
- mQueryHandler.startQuery(TOKEN_PHOTO_QUERY, lookupKey,
+ mQueryHandler.startQuery(TOKEN_PHOTO_QUERY, lookupKey,
ContentUris.withAppendedId(Data.CONTENT_URI, photoId), PhotoQuery.COLUMNS,
null, null, null);
}
-
+
/**
* Bind the contact details provided by the given {@link Cursor}.
*/
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 58056bd..3c5a753 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -38,8 +38,9 @@
public class LockPatternUtils {
private static final String TAG = "LockPatternUtils";
-
+
private static final String LOCK_PATTERN_FILE = "/system/gesture.key";
+ private static final String LOCK_PASSWORD_FILE = "/system/password.key";
/**
* The maximum number of incorrect attempts before the user is prevented
@@ -70,20 +71,32 @@
public static final int MIN_LOCK_PATTERN_SIZE = 4;
/**
+ * Type of password being stored.
+ * pattern = pattern screen
+ * pin = digit-only password
+ * password = alphanumeric password
+ */
+ public static final int MODE_PATTERN = 0;
+ public static final int MODE_PIN = 1;
+ public static final int MODE_PASSWORD = 2;
+
+ /**
* The minimum number of dots the user must include in a wrong pattern
* attempt for it to be counted against the counts that affect
* {@link #FAILED_ATTEMPTS_BEFORE_TIMEOUT} and {@link #FAILED_ATTEMPTS_BEFORE_RESET}
*/
- public static final int MIN_PATTERN_REGISTER_FAIL = 3;
+ public static final int MIN_PATTERN_REGISTER_FAIL = 3;
private final static String LOCKOUT_PERMANENT_KEY = "lockscreen.lockedoutpermanently";
private final static String LOCKOUT_ATTEMPT_DEADLINE = "lockscreen.lockoutattemptdeadline";
- private final static String PATTERN_EVER_CHOSEN = "lockscreen.patterneverchosen";
+ private final static String PATTERN_EVER_CHOSEN_KEY = "lockscreen.patterneverchosen";
+ public final static String PASSWORD_TYPE_KEY = "lockscreen.password_type";
private final ContentResolver mContentResolver;
private static String sLockPatternFilename;
-
+ private static String sLockPasswordFilename;
+
/**
* @param contentResolver Used to look up and save settings.
*/
@@ -91,16 +104,19 @@
mContentResolver = contentResolver;
// Initialize the location of gesture lock file
if (sLockPatternFilename == null) {
- sLockPatternFilename = android.os.Environment.getDataDirectory()
+ sLockPatternFilename = android.os.Environment.getDataDirectory()
.getAbsolutePath() + LOCK_PATTERN_FILE;
+ sLockPasswordFilename = android.os.Environment.getDataDirectory()
+ .getAbsolutePath() + LOCK_PASSWORD_FILE;
}
+
}
/**
* Check to see if a pattern matches the saved pattern. If no pattern exists,
* always returns true.
* @param pattern The pattern to check.
- * @return Whether the pattern matchees the stored one.
+ * @return Whether the pattern matches the stored one.
*/
public boolean checkPattern(List<LockPatternView.Cell> pattern) {
try {
@@ -122,13 +138,40 @@
}
/**
- * Check to see if the user has stored a lock pattern.
- * @return Whether a saved pattern exists.
+ * Check to see if a password matches the saved password. If no password exists,
+ * always returns true.
+ * @param password The password to check.
+ * @return Whether the password matches the stored one.
*/
- public boolean savedPatternExists() {
+ public boolean checkPassword(String password) {
+ try {
+ // Read all the bytes from the file
+ RandomAccessFile raf = new RandomAccessFile(sLockPasswordFilename, "r");
+ final byte[] stored = new byte[(int) raf.length()];
+ int got = raf.read(stored, 0, stored.length);
+ raf.close();
+ if (got <= 0) {
+ return true;
+ }
+ // Compare the hash from the file with the entered password's hash
+ return Arrays.equals(stored, LockPatternUtils.passwordToHash(password));
+ } catch (FileNotFoundException fnfe) {
+ return true;
+ } catch (IOException ioe) {
+ return true;
+ }
+ }
+
+ /**
+ * Checks to see if the given file exists and contains any data. Returns true if it does,
+ * false otherwise.
+ * @param filename
+ * @return true if file exists and is non-empty.
+ */
+ private boolean nonEmptyFileExists(String filename) {
try {
// Check if we can read a byte from the file
- RandomAccessFile raf = new RandomAccessFile(sLockPatternFilename, "r");
+ RandomAccessFile raf = new RandomAccessFile(filename, "r");
byte first = raf.readByte();
raf.close();
return true;
@@ -140,13 +183,29 @@
}
/**
+ * Check to see if the user has stored a lock pattern.
+ * @return Whether a saved pattern exists.
+ */
+ public boolean savedPatternExists() {
+ return nonEmptyFileExists(sLockPatternFilename);
+ }
+
+ /**
+ * Check to see if the user has stored a lock pattern.
+ * @return Whether a saved pattern exists.
+ */
+ public boolean savedPasswordExists() {
+ return nonEmptyFileExists(sLockPasswordFilename);
+ }
+
+ /**
* Return true if the user has ever chosen a pattern. This is true even if the pattern is
* currently cleared.
*
* @return True if the user has ever chosen a pattern.
*/
public boolean isPatternEverChosen() {
- return getBoolean(PATTERN_EVER_CHOSEN);
+ return getBoolean(PATTERN_EVER_CHOSEN_KEY);
}
/**
@@ -166,7 +225,8 @@
raf.write(hash, 0, hash.length);
}
raf.close();
- setBoolean(PATTERN_EVER_CHOSEN, true);
+ setBoolean(PATTERN_EVER_CHOSEN_KEY, true);
+ setLong(PASSWORD_TYPE_KEY, MODE_PATTERN);
} catch (FileNotFoundException fnfe) {
// Cant do much, unless we want to fail over to using the settings provider
Log.e(TAG, "Unable to save lock pattern to " + sLockPatternFilename);
@@ -177,6 +237,38 @@
}
/**
+ * Save a lock password.
+ * @param password The password to save
+ */
+ public void saveLockPassword(String password) {
+ // Compute the hash
+ boolean numericHint = password != null ? TextUtils.isDigitsOnly(password) : false;
+ final byte[] hash = LockPatternUtils.passwordToHash(password);
+ try {
+ // Write the hash to file
+ RandomAccessFile raf = new RandomAccessFile(sLockPasswordFilename, "rw");
+ // Truncate the file if pattern is null, to clear the lock
+ if (password == null) {
+ raf.setLength(0);
+ } else {
+ raf.write(hash, 0, hash.length);
+ }
+ raf.close();
+ setLong(PASSWORD_TYPE_KEY, numericHint ? MODE_PIN : MODE_PASSWORD);
+ } catch (FileNotFoundException fnfe) {
+ // Cant do much, unless we want to fail over to using the settings provider
+ Log.e(TAG, "Unable to save lock pattern to " + sLockPasswordFilename);
+ } catch (IOException ioe) {
+ // Cant do much
+ Log.e(TAG, "Unable to save lock pattern to " + sLockPasswordFilename);
+ }
+ }
+
+ public int getPasswordMode() {
+ return (int) getLong(PASSWORD_TYPE_KEY, MODE_PATTERN);
+ }
+
+ /**
* Deserialize a pattern.
* @param string The pattern serialized with {@link #patternToString}
* @return The pattern.
@@ -210,7 +302,7 @@
}
return new String(res);
}
-
+
/*
* Generate an SHA-1 hash for the pattern. Not the most secure, but it is
* at least a second level of protection. First level is that the file
@@ -218,11 +310,11 @@
* @param pattern the gesture pattern.
* @return the hash of the pattern in a byte array.
*/
- static byte[] patternToHash(List<LockPatternView.Cell> pattern) {
+ private static byte[] patternToHash(List<LockPatternView.Cell> pattern) {
if (pattern == null) {
return null;
}
-
+
final int patternSize = pattern.size();
byte[] res = new byte[patternSize];
for (int i = 0; i < patternSize; i++) {
@@ -238,11 +330,55 @@
}
}
+ /*
+ * Generate a hash for the given password. To avoid brute force attacks, we use a salted hash.
+ * Not the most secure, but it is at least a second level of protection. First level is that
+ * the file is in a location only readable by the system process.
+ * @param password the gesture pattern.
+ * @return the hash of the pattern in a byte array.
+ */
+ public static byte[] passwordToHash(String password) {
+ if (password == null) {
+ return null;
+ }
+ String algo = null;
+ byte[] hashed = null;
+ try {
+ long salt = 0x2374868151054924L; // TODO: make this unique to device
+ byte[] saltedPassword = (password + Long.toString(salt)).getBytes();
+ byte[] sha1 = MessageDigest.getInstance(algo = "SHA-1").digest(saltedPassword);
+ byte[] md5 = MessageDigest.getInstance(algo = "MD5").digest(saltedPassword);
+ hashed = (toHex(sha1) + toHex(md5)).getBytes();
+ } catch (NoSuchAlgorithmException e) {
+ Log.w(TAG, "Failed to encode string because of missing algorithm: " + algo);
+ }
+ return hashed;
+ }
+
+ private static String toHex(byte[] ary) {
+ final String hex = "0123456789ABCDEF";
+ String ret = "";
+ for (int i = 0; i < ary.length; i++) {
+ ret += hex.charAt((ary[i] >> 4) & 0xf);
+ ret += hex.charAt(ary[i] & 0xf);
+ }
+ return ret;
+ }
+
+ /**
+ * @return Whether the lock password is enabled.
+ */
+ public boolean isLockPasswordEnabled() {
+ long mode = getLong(PASSWORD_TYPE_KEY, 0);
+ return savedPasswordExists() && (mode == MODE_PASSWORD || mode == MODE_PIN);
+ }
+
/**
* @return Whether the lock pattern is enabled.
*/
public boolean isLockPatternEnabled() {
- return getBoolean(Settings.System.LOCK_PATTERN_ENABLED);
+ return getBoolean(Settings.System.LOCK_PATTERN_ENABLED)
+ && getLong(PASSWORD_TYPE_KEY, MODE_PATTERN) == MODE_PATTERN;
}
/**
@@ -361,5 +497,10 @@
android.provider.Settings.System.putLong(mContentResolver, systemSettingKey, value);
}
-
+ public boolean isSecure() {
+ long mode = getPasswordMode();
+ boolean secure = mode == MODE_PATTERN && isLockPatternEnabled() && savedPatternExists()
+ || (mode == MODE_PIN || mode == MODE_PASSWORD) && savedPasswordExists();
+ return secure;
+ }
}
diff --git a/core/java/com/android/internal/widget/SlidingTab.java b/core/java/com/android/internal/widget/SlidingTab.java
index f07b2f1..adafbb4 100644
--- a/core/java/com/android/internal/widget/SlidingTab.java
+++ b/core/java/com/android/internal/widget/SlidingTab.java
@@ -23,8 +23,6 @@
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
-import android.os.Handler;
-import android.os.Message;
import android.os.Vibrator;
import android.util.AttributeSet;
import android.util.Log;
@@ -34,7 +32,6 @@
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
-import android.view.animation.AnimationSet;
import android.view.animation.LinearInterpolator;
import android.view.animation.TranslateAnimation;
import android.view.animation.Animation.AnimationListener;
@@ -214,7 +211,7 @@
// Create hint TextView
text = new TextView(parent.getContext());
text.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
- LayoutParams.FILL_PARENT));
+ LayoutParams.MATCH_PARENT));
text.setBackgroundResource(barId);
text.setTextAppearance(parent.getContext(), R.style.TextAppearance_SlidingTabNormal);
// hint.setSingleLine(); // Hmm.. this causes the text to disappear off-screen
diff --git a/core/java/com/android/internal/widget/VerticalTextSpinner.java b/core/java/com/android/internal/widget/VerticalTextSpinner.java
deleted file mode 100644
index 50c528c..0000000
--- a/core/java/com/android/internal/widget/VerticalTextSpinner.java
+++ /dev/null
@@ -1,467 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.internal.widget;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-import android.text.TextPaint;
-import android.util.AttributeSet;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.View;
-
-
-public class VerticalTextSpinner extends View {
-
- private static final int SELECTOR_ARROW_HEIGHT = 15;
-
- private static final int TEXT_SPACING = 18;
- private static final int TEXT_MARGIN_RIGHT = 25;
- private static final int TEXT_SIZE = 22;
-
- /* Keep the calculations as this is really a for loop from
- * -2 to 2 but precalculated so we don't have to do in the onDraw.
- */
- private static final int TEXT1_Y = (TEXT_SIZE * (-2 + 2)) + (TEXT_SPACING * (-2 + 1));
- private static final int TEXT2_Y = (TEXT_SIZE * (-1 + 2)) + (TEXT_SPACING * (-1 + 1));
- private static final int TEXT3_Y = (TEXT_SIZE * (0 + 2)) + (TEXT_SPACING * (0 + 1));
- private static final int TEXT4_Y = (TEXT_SIZE * (1 + 2)) + (TEXT_SPACING * (1 + 1));
- private static final int TEXT5_Y = (TEXT_SIZE * (2 + 2)) + (TEXT_SPACING * (2 + 1));
-
- private static final int SCROLL_MODE_NONE = 0;
- private static final int SCROLL_MODE_UP = 1;
- private static final int SCROLL_MODE_DOWN = 2;
-
- private static final long DEFAULT_SCROLL_INTERVAL_MS = 400;
- private static final int SCROLL_DISTANCE = TEXT_SIZE + TEXT_SPACING;
- private static final int MIN_ANIMATIONS = 4;
-
- private final Drawable mBackgroundFocused;
- private final Drawable mSelectorFocused;
- private final Drawable mSelectorNormal;
- private final int mSelectorDefaultY;
- private final int mSelectorMinY;
- private final int mSelectorMaxY;
- private final int mSelectorHeight;
- private final TextPaint mTextPaintDark;
- private final TextPaint mTextPaintLight;
-
- private int mSelectorY;
- private Drawable mSelector;
- private int mDownY;
- private boolean isDraggingSelector;
- private int mScrollMode;
- private long mScrollInterval;
- private boolean mIsAnimationRunning;
- private boolean mStopAnimation;
- private boolean mWrapAround = true;
-
- private int mTotalAnimatedDistance;
- private int mNumberOfAnimations;
- private long mDelayBetweenAnimations;
- private int mDistanceOfEachAnimation;
-
- private String[] mTextList;
- private int mCurrentSelectedPos;
- private OnChangedListener mListener;
-
- private String mText1;
- private String mText2;
- private String mText3;
- private String mText4;
- private String mText5;
-
- public interface OnChangedListener {
- void onChanged(
- VerticalTextSpinner spinner, int oldPos, int newPos, String[] items);
- }
-
- public VerticalTextSpinner(Context context) {
- this(context, null);
- }
-
- public VerticalTextSpinner(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public VerticalTextSpinner(Context context, AttributeSet attrs,
- int defStyle) {
- super(context, attrs, defStyle);
-
- mBackgroundFocused = context.getResources().getDrawable(com.android.internal.R.drawable.pickerbox_background);
- mSelectorFocused = context.getResources().getDrawable(com.android.internal.R.drawable.pickerbox_selected);
- mSelectorNormal = context.getResources().getDrawable(com.android.internal.R.drawable.pickerbox_unselected);
-
- mSelectorHeight = mSelectorFocused.getIntrinsicHeight();
- mSelectorDefaultY = (mBackgroundFocused.getIntrinsicHeight() - mSelectorHeight) / 2;
- mSelectorMinY = 0;
- mSelectorMaxY = mBackgroundFocused.getIntrinsicHeight() - mSelectorHeight;
-
- mSelector = mSelectorNormal;
- mSelectorY = mSelectorDefaultY;
-
- mTextPaintDark = new TextPaint(Paint.ANTI_ALIAS_FLAG);
- mTextPaintDark.setTextSize(TEXT_SIZE);
- mTextPaintDark.setColor(context.getResources().getColor(com.android.internal.R.color.primary_text_light));
-
- mTextPaintLight = new TextPaint(Paint.ANTI_ALIAS_FLAG);
- mTextPaintLight.setTextSize(TEXT_SIZE);
- mTextPaintLight.setColor(context.getResources().getColor(com.android.internal.R.color.secondary_text_dark));
-
- mScrollMode = SCROLL_MODE_NONE;
- mScrollInterval = DEFAULT_SCROLL_INTERVAL_MS;
- calculateAnimationValues();
- }
-
- public void setOnChangeListener(OnChangedListener listener) {
- mListener = listener;
- }
-
- public void setItems(String[] textList) {
- mTextList = textList;
- calculateTextPositions();
- }
-
- public void setSelectedPos(int selectedPos) {
- mCurrentSelectedPos = selectedPos;
- calculateTextPositions();
- postInvalidate();
- }
-
- public void setScrollInterval(long interval) {
- mScrollInterval = interval;
- calculateAnimationValues();
- }
-
- public void setWrapAround(boolean wrap) {
- mWrapAround = wrap;
- }
-
- @Override
- public boolean onKeyDown(int keyCode, KeyEvent event) {
-
- /* This is a bit confusing, when we get the key event
- * DPAD_DOWN we actually roll the spinner up. When the
- * key event is DPAD_UP we roll the spinner down.
- */
- if ((keyCode == KeyEvent.KEYCODE_DPAD_UP) && canScrollDown()) {
- mScrollMode = SCROLL_MODE_DOWN;
- scroll();
- mStopAnimation = true;
- return true;
- } else if ((keyCode == KeyEvent.KEYCODE_DPAD_DOWN) && canScrollUp()) {
- mScrollMode = SCROLL_MODE_UP;
- scroll();
- mStopAnimation = true;
- return true;
- }
- return super.onKeyDown(keyCode, event);
- }
-
- private boolean canScrollDown() {
- return (mCurrentSelectedPos > 0) || mWrapAround;
- }
-
- private boolean canScrollUp() {
- return ((mCurrentSelectedPos < (mTextList.length - 1)) || mWrapAround);
- }
-
- @Override
- protected void onFocusChanged(boolean gainFocus, int direction,
- Rect previouslyFocusedRect) {
- if (gainFocus) {
- setBackgroundDrawable(mBackgroundFocused);
- mSelector = mSelectorFocused;
- } else {
- setBackgroundDrawable(null);
- mSelector = mSelectorNormal;
- mSelectorY = mSelectorDefaultY;
- }
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- final int action = event.getAction();
- final int y = (int) event.getY();
-
- switch (action) {
- case MotionEvent.ACTION_DOWN:
- requestFocus();
- mDownY = y;
- isDraggingSelector = (y >= mSelectorY) && (y <= (mSelectorY + mSelector.getIntrinsicHeight()));
- break;
-
- case MotionEvent.ACTION_MOVE:
- if (isDraggingSelector) {
- int top = mSelectorDefaultY + (y - mDownY);
- if (top <= mSelectorMinY && canScrollDown()) {
- mSelectorY = mSelectorMinY;
- mStopAnimation = false;
- if (mScrollMode != SCROLL_MODE_DOWN) {
- mScrollMode = SCROLL_MODE_DOWN;
- scroll();
- }
- } else if (top >= mSelectorMaxY && canScrollUp()) {
- mSelectorY = mSelectorMaxY;
- mStopAnimation = false;
- if (mScrollMode != SCROLL_MODE_UP) {
- mScrollMode = SCROLL_MODE_UP;
- scroll();
- }
- } else {
- mSelectorY = top;
- mStopAnimation = true;
- }
- }
- break;
-
- case MotionEvent.ACTION_UP:
- case MotionEvent.ACTION_CANCEL:
- default:
- mSelectorY = mSelectorDefaultY;
- mStopAnimation = true;
- invalidate();
- break;
- }
- return true;
- }
-
- @Override
- protected void onDraw(Canvas canvas) {
-
- /* The bounds of the selector */
- final int selectorLeft = 0;
- final int selectorTop = mSelectorY;
- final int selectorRight = mMeasuredWidth;
- final int selectorBottom = mSelectorY + mSelectorHeight;
-
- /* Draw the selector */
- mSelector.setBounds(selectorLeft, selectorTop, selectorRight, selectorBottom);
- mSelector.draw(canvas);
-
- if (mTextList == null) {
-
- /* We're not setup with values so don't draw anything else */
- return;
- }
-
- final TextPaint textPaintDark = mTextPaintDark;
- if (hasFocus()) {
-
- /* The bounds of the top area where the text should be light */
- final int topLeft = 0;
- final int topTop = 0;
- final int topRight = selectorRight;
- final int topBottom = selectorTop + SELECTOR_ARROW_HEIGHT;
-
- /* Assign a bunch of local finals for performance */
- final String text1 = mText1;
- final String text2 = mText2;
- final String text3 = mText3;
- final String text4 = mText4;
- final String text5 = mText5;
- final TextPaint textPaintLight = mTextPaintLight;
-
- /*
- * Draw the 1st, 2nd and 3rd item in light only, clip it so it only
- * draws in the area above the selector
- */
- canvas.save();
- canvas.clipRect(topLeft, topTop, topRight, topBottom);
- drawText(canvas, text1, TEXT1_Y
- + mTotalAnimatedDistance, textPaintLight);
- drawText(canvas, text2, TEXT2_Y
- + mTotalAnimatedDistance, textPaintLight);
- drawText(canvas, text3,
- TEXT3_Y + mTotalAnimatedDistance, textPaintLight);
- canvas.restore();
-
- /*
- * Draw the 2nd, 3rd and 4th clipped to the selector bounds in dark
- * paint
- */
- canvas.save();
- canvas.clipRect(selectorLeft, selectorTop + SELECTOR_ARROW_HEIGHT,
- selectorRight, selectorBottom - SELECTOR_ARROW_HEIGHT);
- drawText(canvas, text2, TEXT2_Y
- + mTotalAnimatedDistance, textPaintDark);
- drawText(canvas, text3,
- TEXT3_Y + mTotalAnimatedDistance, textPaintDark);
- drawText(canvas, text4,
- TEXT4_Y + mTotalAnimatedDistance, textPaintDark);
- canvas.restore();
-
- /* The bounds of the bottom area where the text should be light */
- final int bottomLeft = 0;
- final int bottomTop = selectorBottom - SELECTOR_ARROW_HEIGHT;
- final int bottomRight = selectorRight;
- final int bottomBottom = mMeasuredHeight;
-
- /*
- * Draw the 3rd, 4th and 5th in white text, clip it so it only draws
- * in the area below the selector.
- */
- canvas.save();
- canvas.clipRect(bottomLeft, bottomTop, bottomRight, bottomBottom);
- drawText(canvas, text3,
- TEXT3_Y + mTotalAnimatedDistance, textPaintLight);
- drawText(canvas, text4,
- TEXT4_Y + mTotalAnimatedDistance, textPaintLight);
- drawText(canvas, text5,
- TEXT5_Y + mTotalAnimatedDistance, textPaintLight);
- canvas.restore();
-
- } else {
- drawText(canvas, mText3, TEXT3_Y, textPaintDark);
- }
- if (mIsAnimationRunning) {
- if ((Math.abs(mTotalAnimatedDistance) + mDistanceOfEachAnimation) > SCROLL_DISTANCE) {
- mTotalAnimatedDistance = 0;
- if (mScrollMode == SCROLL_MODE_UP) {
- int oldPos = mCurrentSelectedPos;
- int newPos = getNewIndex(1);
- if (newPos >= 0) {
- mCurrentSelectedPos = newPos;
- if (mListener != null) {
- mListener.onChanged(this, oldPos, mCurrentSelectedPos, mTextList);
- }
- }
- if (newPos < 0 || ((newPos >= mTextList.length - 1) && !mWrapAround)) {
- mStopAnimation = true;
- }
- calculateTextPositions();
- } else if (mScrollMode == SCROLL_MODE_DOWN) {
- int oldPos = mCurrentSelectedPos;
- int newPos = getNewIndex(-1);
- if (newPos >= 0) {
- mCurrentSelectedPos = newPos;
- if (mListener != null) {
- mListener.onChanged(this, oldPos, mCurrentSelectedPos, mTextList);
- }
- }
- if (newPos < 0 || (newPos == 0 && !mWrapAround)) {
- mStopAnimation = true;
- }
- calculateTextPositions();
- }
- if (mStopAnimation) {
- final int previousScrollMode = mScrollMode;
-
- /* No longer scrolling, we wait till the current animation
- * completes then we stop.
- */
- mIsAnimationRunning = false;
- mStopAnimation = false;
- mScrollMode = SCROLL_MODE_NONE;
-
- /* If the current selected item is an empty string
- * scroll past it.
- */
- if ("".equals(mTextList[mCurrentSelectedPos])) {
- mScrollMode = previousScrollMode;
- scroll();
- mStopAnimation = true;
- }
- }
- } else {
- if (mScrollMode == SCROLL_MODE_UP) {
- mTotalAnimatedDistance -= mDistanceOfEachAnimation;
- } else if (mScrollMode == SCROLL_MODE_DOWN) {
- mTotalAnimatedDistance += mDistanceOfEachAnimation;
- }
- }
- if (mDelayBetweenAnimations > 0) {
- postInvalidateDelayed(mDelayBetweenAnimations);
- } else {
- invalidate();
- }
- }
- }
-
- /**
- * Called every time the text items or current position
- * changes. We calculate store we don't have to calculate
- * onDraw.
- */
- private void calculateTextPositions() {
- mText1 = getTextToDraw(-2);
- mText2 = getTextToDraw(-1);
- mText3 = getTextToDraw(0);
- mText4 = getTextToDraw(1);
- mText5 = getTextToDraw(2);
- }
-
- private String getTextToDraw(int offset) {
- int index = getNewIndex(offset);
- if (index < 0) {
- return "";
- }
- return mTextList[index];
- }
-
- private int getNewIndex(int offset) {
- int index = mCurrentSelectedPos + offset;
- if (index < 0) {
- if (mWrapAround) {
- index += mTextList.length;
- } else {
- return -1;
- }
- } else if (index >= mTextList.length) {
- if (mWrapAround) {
- index -= mTextList.length;
- } else {
- return -1;
- }
- }
- return index;
- }
-
- private void scroll() {
- if (mIsAnimationRunning) {
- return;
- }
- mTotalAnimatedDistance = 0;
- mIsAnimationRunning = true;
- invalidate();
- }
-
- private void calculateAnimationValues() {
- mNumberOfAnimations = (int) mScrollInterval / SCROLL_DISTANCE;
- if (mNumberOfAnimations < MIN_ANIMATIONS) {
- mNumberOfAnimations = MIN_ANIMATIONS;
- mDistanceOfEachAnimation = SCROLL_DISTANCE / mNumberOfAnimations;
- mDelayBetweenAnimations = 0;
- } else {
- mDistanceOfEachAnimation = SCROLL_DISTANCE / mNumberOfAnimations;
- mDelayBetweenAnimations = mScrollInterval / mNumberOfAnimations;
- }
- }
-
- private void drawText(Canvas canvas, String text, int y, TextPaint paint) {
- int width = (int) paint.measureText(text);
- int x = getMeasuredWidth() - width - TEXT_MARGIN_RIGHT;
- canvas.drawText(text, x, y, paint);
- }
-
- public int getCurrentSelectedPos() {
- return mCurrentSelectedPos;
- }
-}
diff --git a/core/java/com/google/android/net/NetworkStatsEntity.java b/core/java/com/google/android/net/NetworkStatsEntity.java
deleted file mode 100644
index a22fa1e..0000000
--- a/core/java/com/google/android/net/NetworkStatsEntity.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.
- */
-
-package com.google.android.net;
-
-import android.net.TrafficStats;
-import android.os.SystemClock;
-import android.os.SystemProperties;
-import android.util.EventLog;
-import org.apache.http.HttpEntity;
-import org.apache.http.entity.HttpEntityWrapper;
-
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-
-public class NetworkStatsEntity extends HttpEntityWrapper {
-
- private static final int HTTP_STATS_EVENT = 52001;
-
- private class NetworkStatsInputStream extends FilterInputStream {
-
- public NetworkStatsInputStream(InputStream wrapped) {
- super(wrapped);
- }
-
- @Override
- public void close() throws IOException {
- try {
- super.close();
- } finally {
- long processingTime = SystemClock.elapsedRealtime() - mProcessingStartTime;
- long tx = TrafficStats.getUidTxBytes(mUid);
- long rx = TrafficStats.getUidRxBytes(mUid);
-
- EventLog.writeEvent(HTTP_STATS_EVENT, mUa, mResponseLatency, processingTime,
- tx - mStartTx, rx - mStartRx);
- }
- }
- }
-
- private final String mUa;
- private final int mUid;
- private final long mStartTx;
- private final long mStartRx;
- private final long mResponseLatency;
- private final long mProcessingStartTime;
-
- public NetworkStatsEntity(HttpEntity orig, String ua,
- int uid, long startTx, long startRx, long responseLatency,
- long processingStartTime) {
- super(orig);
- this.mUa = ua;
- this.mUid = uid;
- this.mStartTx = startTx;
- this.mStartRx = startRx;
- this.mResponseLatency = responseLatency;
- this.mProcessingStartTime = processingStartTime;
- }
-
- public static boolean shouldLogNetworkStats() {
- return "1".equals(SystemProperties.get("googlehttpclient.logstats"));
- }
-
- @Override
- public InputStream getContent() throws IOException {
- InputStream orig = super.getContent();
- return new NetworkStatsInputStream(orig);
- }
-}
diff --git a/core/java/com/google/android/net/SSLClientSessionCacheFactory.java b/core/java/com/google/android/net/SSLClientSessionCacheFactory.java
deleted file mode 100644
index 6570a9bd..0000000
--- a/core/java/com/google/android/net/SSLClientSessionCacheFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.google.android.net;
-
-import org.apache.harmony.xnet.provider.jsse.SSLClientSessionCache;
-import org.apache.harmony.xnet.provider.jsse.FileClientSessionCache;
-import android.content.Context;
-import android.provider.Settings;
-import android.util.Log;
-
-import java.io.File;
-import java.io.IOException;
-
-import com.android.internal.net.DbSSLSessionCache;
-
-/**
- * Factory that returns the appropriate implementation of a {@link SSLClientSessionCache} based
- * on gservices.
- *
- * @hide
- */
-// TODO: return a proxied implementation that is updated as the gservices value changes.
-public final class SSLClientSessionCacheFactory {
-
- private static final String TAG = "SSLClientSessionCacheFactory";
-
- public static final String DB = "db";
- public static final String FILE = "file";
-
- // utility class
- private SSLClientSessionCacheFactory() {}
-
- /**
- * Returns a new {@link SSLClientSessionCache} based on the persistent cache that's specified,
- * if any, in gservices. If no cache is specified, returns null.
- * @param context The application context used for the per-process persistent cache.
- * @return A new {@link SSLClientSessionCache}, or null if no persistent cache is configured.
- */
- public static SSLClientSessionCache getCache(Context context) {
- String type = Settings.Gservices.getString(context.getContentResolver(),
- Settings.Gservices.SSL_SESSION_CACHE);
-
- if (type != null) {
- if (DB.equals(type)) {
- return DbSSLSessionCache.getInstanceForPackage(context);
- } else if (FILE.equals(type)) {
- File dir = context.getFilesDir();
- File cacheDir = new File(dir, "sslcache");
- if (!cacheDir.exists()) {
- cacheDir.mkdir();
- }
- try {
- return FileClientSessionCache.usingDirectory(cacheDir);
- } catch (IOException ioe) {
- Log.w(TAG, "Unable to create FileClientSessionCache in " + cacheDir.getName(), ioe);
- return null;
- }
- } else {
- Log.w(TAG, "Ignoring unrecognized type: '" + type + "'");
- }
- }
- return null;
- }
-}
diff --git a/core/java/com/google/android/net/UrlRules.java b/core/java/com/google/android/net/UrlRules.java
deleted file mode 100644
index 54d139d..0000000
--- a/core/java/com/google/android/net/UrlRules.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * 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.
- */
-
-package com.google.android.net;
-
-import android.content.ContentResolver;
-import android.database.Cursor;
-import android.provider.Checkin;
-import android.provider.Settings;
-import android.util.Config;
-import android.util.Log;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * A set of rules rewriting and blocking URLs. Used to offer a point of
- * control for redirecting HTTP requests, often to the Android proxy server.
- *
- * <p>Each rule has the following format:
- *
- * <pre><em>url-prefix</em> [REWRITE <em>new-prefix</em>] [BLOCK]</pre>
- *
- * <p>Any URL which starts with <em>url-prefix</em> will trigger the rule.
- * If BLOCK is specified, requests to that URL will be blocked and fail.
- * If REWRITE is specified, the matching prefix will be removed and replaced
- * with <em>new-prefix</em>. (If both are specified, BLOCK wins.) Case is
- * insensitive for the REWRITE and BLOCK keywords, but sensitive for URLs.
- *
- * <p>In Gservices, the value of any key that starts with "url:" will be
- * interpreted as a rule. The full name of the key is unimportant (but can
- * be used to document the intent of the rule, and must be unique).
- * Example gservices keys:
- *
- * <pre>
- * url:use_proxy_for_calendar = "http://www.google.com/calendar/ REWRITE http://android.clients.google.com/proxy/calendar/"
- * url:stop_crash_reports = "http://android.clients.google.com/crash/ BLOCK"
- * url:use_ssl_for_contacts = "http://www.google.com/m8/ REWRITE https://www.google.com/m8/"
- * </pre>
- */
-public class UrlRules {
- public static final String TAG = "UrlRules";
- public static final boolean LOCAL_LOGV = Config.LOGV || false;
-
- /** Thrown when the rewrite rules can't be parsed. */
- public static class RuleFormatException extends Exception {
- public RuleFormatException(String msg) { super(msg); }
- }
-
- /** A single rule specifying actions for URLs matching a certain prefix. */
- public static class Rule implements Comparable {
- /** Name assigned to the rule (for logging and debugging). */
- public final String mName;
-
- /** Prefix required to match this rule. */
- public final String mPrefix;
-
- /** Text to replace mPrefix with (null to leave alone). */
- public final String mRewrite;
-
- /** True if matching URLs should be blocked. */
- public final boolean mBlock;
-
- /** Default rule that does nothing. */
- public static final Rule DEFAULT = new Rule();
-
- /** Parse a rewrite rule as given in a Gservices value. */
- public Rule(String name, String rule) throws RuleFormatException {
- mName = name;
- String[] words = PATTERN_SPACE_PLUS.split(rule);
- if (words.length == 0) throw new RuleFormatException("Empty rule");
-
- mPrefix = words[0];
- String rewrite = null;
- boolean block = false;
- for (int pos = 1; pos < words.length; ) {
- String word = words[pos].toLowerCase();
- if (word.equals("rewrite") && pos + 1 < words.length) {
- rewrite = words[pos + 1];
- pos += 2;
- } else if (word.equals("block")) {
- block = true;
- pos += 1;
- } else {
- throw new RuleFormatException("Illegal rule: " + rule);
- }
- // TODO: Parse timeout specifications, etc.
- }
-
- mRewrite = rewrite;
- mBlock = block;
- }
-
- /** Create the default Rule. */
- private Rule() {
- mName = "DEFAULT";
- mPrefix = "";
- mRewrite = null;
- mBlock = false;
- }
-
- /**
- * Apply the rule to a particular URL (assumed to match the rule).
- * @param url to rewrite or modify.
- * @return modified URL, or null if the URL is blocked.
- */
- public String apply(String url) {
- if (mBlock) {
- return null;
- } else if (mRewrite != null) {
- return mRewrite + url.substring(mPrefix.length());
- } else {
- return url;
- }
- }
-
- /** More generic rules are greater than more specific rules. */
- public int compareTo(Object o) {
- return ((Rule) o).mPrefix.compareTo(mPrefix);
- }
- }
-
- /** Cached rule set from Gservices. */
- private static UrlRules sCachedRules = new UrlRules(new Rule[] {});
-
- private static final Pattern PATTERN_SPACE_PLUS = Pattern.compile(" +");
- private static final Pattern RULE_PATTERN = Pattern.compile("\\W");
-
- /** Gservices digest when sCachedRules was cached. */
- private static String sCachedDigest = null;
-
- /** Currently active set of Rules. */
- private final Rule[] mRules;
-
- /** Regular expression with one capturing group for each Rule. */
- private final Pattern mPattern;
-
- /**
- * Create a rewriter from an array of Rules. Normally used only for
- * testing. Instead, use {@link #getRules} to get rules from Gservices.
- * @param rules to use.
- */
- public UrlRules(Rule[] rules) {
- // Sort the rules to put the most specific rules first.
- Arrays.sort(rules);
-
- // Construct a regular expression, escaping all the prefix strings.
- StringBuilder pattern = new StringBuilder("(");
- for (int i = 0; i < rules.length; ++i) {
- if (i > 0) pattern.append(")|(");
- pattern.append(RULE_PATTERN.matcher(rules[i].mPrefix).replaceAll("\\\\$0"));
- }
- mPattern = Pattern.compile(pattern.append(")").toString());
- mRules = rules;
- }
-
- /**
- * Match a string against every Rule and find one that matches.
- * @param uri to match against the Rules in the rewriter.
- * @return the most specific matching Rule, or Rule.DEFAULT if none match.
- */
- public Rule matchRule(String url) {
- Matcher matcher = mPattern.matcher(url);
- if (matcher.lookingAt()) {
- for (int i = 0; i < mRules.length; ++i) {
- if (matcher.group(i + 1) != null) {
- return mRules[i]; // Rules are sorted most specific first.
- }
- }
- }
- return Rule.DEFAULT;
- }
-
- /**
- * Get the (possibly cached) UrlRules based on the rules in Gservices.
- * @param resolver to use for accessing the Gservices database.
- * @return an updated UrlRules instance
- */
- public static synchronized UrlRules getRules(ContentResolver resolver) {
- String digest = Settings.Gservices.getString(resolver,
- Settings.Gservices.PROVISIONING_DIGEST);
- if (sCachedDigest != null && sCachedDigest.equals(digest)) {
- // The digest is the same, so the rules are the same.
- if (LOCAL_LOGV) Log.v(TAG, "Using cached rules for digest: " + digest);
- return sCachedRules;
- }
-
- if (LOCAL_LOGV) Log.v(TAG, "Scanning for Gservices \"url:*\" rules");
- Cursor cursor = resolver.query(Settings.Gservices.CONTENT_URI,
- new String[] {
- Settings.Gservices.NAME,
- Settings.Gservices.VALUE
- },
- Settings.Gservices.NAME + " like \"url:%\"", null,
- Settings.Gservices.NAME);
- try {
- ArrayList<Rule> rules = new ArrayList<Rule>();
- while (cursor.moveToNext()) {
- try {
- String name = cursor.getString(0).substring(4); // "url:X"
- String value = cursor.getString(1);
- if (value == null || value.length() == 0) continue;
- if (LOCAL_LOGV) Log.v(TAG, " Rule " + name + ": " + value);
- rules.add(new Rule(name, value));
- } catch (RuleFormatException e) {
- // Oops, Gservices has an invalid rule! Skip it.
- Log.e(TAG, "Invalid rule from Gservices", e);
- Checkin.logEvent(resolver,
- Checkin.Events.Tag.GSERVICES_ERROR, e.toString());
- }
- }
- sCachedRules = new UrlRules(rules.toArray(new Rule[rules.size()]));
- sCachedDigest = digest;
- if (LOCAL_LOGV) Log.v(TAG, "New rules stored for digest: " + digest);
- } finally {
- cursor.close();
- }
-
- return sCachedRules;
- }
-}
diff --git a/core/java/com/google/android/util/GoogleWebContentHelper.java b/core/java/com/google/android/util/GoogleWebContentHelper.java
deleted file mode 100644
index 8291e29..0000000
--- a/core/java/com/google/android/util/GoogleWebContentHelper.java
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * 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.
- */
-
-package com.google.android.util;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.net.http.SslError;
-import android.os.Message;
-import android.provider.Settings;
-import android.text.TextUtils;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.webkit.HttpAuthHandler;
-import android.webkit.SslErrorHandler;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
-import android.webkit.WebViewClient;
-import android.widget.TextView;
-
-import java.util.Locale;
-
-/**
- * Helper to display Google web content, and fallback on a static message if the
- * web content is unreachable. For example, this can be used to display
- * "Legal terms".
- * <p>
- * The typical usage pattern is to have two Gservices settings defined:
- * <ul>
- * <li>A secure URL that will be displayed on the device. This should be HTTPS
- * so hotspots won't intercept it giving us a false positive that the page
- * loaded successfully.
- * <li>A pretty human-readable URL that will be displayed to the user in case we
- * cannot reach the above URL.
- * </ul>
- * <p>
- * The typical call sequence is {@link #setUrlsFromGservices(String, String)},
- * {@link #setUnsuccessfulMessage(String)}, and {@link #loadUrl()}. At some
- * point, you'll want to display the layout via {@link #getLayout()}.
- */
-public class GoogleWebContentHelper {
-
- private Context mContext;
-
- private String mSecureUrl;
- private String mPrettyUrl;
-
- private String mUnsuccessfulMessage;
-
- private ViewGroup mLayout;
- private WebView mWebView;
- private View mProgressBar;
- private TextView mTextView;
-
- private boolean mReceivedResponse;
-
- public GoogleWebContentHelper(Context context) {
- mContext = context;
- }
-
- /**
- * Fetches the URLs from Gservices.
- *
- * @param secureSetting The setting key whose value contains the HTTPS URL.
- * @param prettySetting The setting key whose value contains the pretty URL.
- * @return This {@link GoogleWebContentHelper} so methods can be chained.
- */
- public GoogleWebContentHelper setUrlsFromGservices(String secureSetting, String prettySetting) {
- ContentResolver contentResolver = mContext.getContentResolver();
- mSecureUrl = fillUrl(Settings.Gservices.getString(contentResolver, secureSetting),
- mContext);
- mPrettyUrl = fillUrl(Settings.Gservices.getString(contentResolver, prettySetting),
- mContext);
- return this;
- }
-
- /**
- * Fetch directly from provided urls.
- *
- * @param secureUrl The HTTPS URL.
- * @param prettyUrl The pretty URL.
- * @return This {@link GoogleWebContentHelper} so methods can be chained.
- */
- public GoogleWebContentHelper setUrls(String secureUrl, String prettyUrl) {
- mSecureUrl = fillUrl(secureUrl, mContext);
- mPrettyUrl = fillUrl(prettyUrl, mContext);
- return this;
- }
-
-
- /**
- * Sets the message that will be shown if we are unable to load the page.
- * <p>
- * This should be called after {@link #setUrlsFromGservices(String, String)}
- * .
- *
- * @param message The message to load. The first argument, according to
- * {@link java.util.Formatter}, will be substituted with the pretty
- * URL.
- * @return This {@link GoogleWebContentHelper} so methods can be chained.
- */
- public GoogleWebContentHelper setUnsuccessfulMessage(String message) {
- Locale locale = mContext.getResources().getConfiguration().locale;
- mUnsuccessfulMessage = String.format(locale, message, mPrettyUrl);
- return this;
- }
-
- /**
- * Begins loading the secure URL.
- *
- * @return This {@link GoogleWebContentHelper} so methods can be chained.
- */
- public GoogleWebContentHelper loadUrl() {
- ensureViews();
- mWebView.loadUrl(mSecureUrl);
- return this;
- }
-
- /**
- * Loads data into the webview and also provides a failback url
- * @return This {@link GoogleWebContentHelper} so methods can be chained.
- */
- public GoogleWebContentHelper loadDataWithFailUrl(String base, String data,
- String mimeType, String encoding, String failUrl) {
- ensureViews();
- mWebView.loadDataWithBaseURL(base, data, mimeType, encoding, failUrl);
- return this;
- }
-
- /**
- * Helper to handle the back key. Returns true if the back key was handled,
- * otherwise returns false.
- * @param event the key event sent to {@link Activity#dispatchKeyEvent()}
- */
- public boolean handleKey(KeyEvent event) {
- if (event.getKeyCode() == KeyEvent.KEYCODE_BACK
- && event.getAction() == KeyEvent.ACTION_DOWN) {
- if (mWebView.canGoBack()) {
- mWebView.goBack();
- return true;
- }
- }
- return false;
- }
-
- /**
- * Returns the layout containing the web view, progress bar, and text view.
- * This class takes care of setting each one's visibility based on current
- * state.
- *
- * @return The layout you should display.
- */
- public ViewGroup getLayout() {
- ensureViews();
- return mLayout;
- }
-
- private synchronized void ensureViews() {
- if (mLayout == null) {
- initializeViews();
- }
- }
-
- /**
- * Fills the URL with the locale.
- *
- * @param url The URL in Formatter style for the extra info to be filled in.
- * @return The filled URL.
- */
- private static String fillUrl(String url, Context context) {
-
- if (TextUtils.isEmpty(url)) {
- return "";
- }
-
- /* We add another layer of indirection here to allow mcc's to fill
- * in Locales for TOS. TODO - REMOVE when needed locales supported
- * natively (when not shipping devices to country X without support
- * for their locale).
- */
- String localeReplacement = context.
- getString(com.android.internal.R.string.locale_replacement);
- if (localeReplacement != null && localeReplacement.length() != 0) {
- url = String.format(url, localeReplacement);
- }
-
- Locale locale = Locale.getDefault();
- String tmp = locale.getLanguage() + "_" + locale.getCountry().toLowerCase();
- return String.format(url, tmp);
- }
-
- private void initializeViews() {
-
- LayoutInflater inflater =
- (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-
- mLayout = (ViewGroup) inflater.inflate(
- com.android.internal.R.layout.google_web_content_helper_layout, null);
-
- mWebView = (WebView) mLayout.findViewById(com.android.internal.R.id.web);
- mWebView.setWebViewClient(new MyWebViewClient());
- WebSettings settings = mWebView.getSettings();
- settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
-
- mProgressBar = mLayout.findViewById(com.android.internal.R.id.progressContainer);
- TextView message = (TextView) mProgressBar.findViewById(com.android.internal.R.id.message);
- message.setText(com.android.internal.R.string.googlewebcontenthelper_loading);
-
- mTextView = (TextView) mLayout.findViewById(com.android.internal.R.id.text);
- mTextView.setText(mUnsuccessfulMessage);
- }
-
- private synchronized void handleWebViewCompletion(boolean success) {
-
- if (mReceivedResponse) {
- return;
- } else {
- mReceivedResponse = true;
- }
-
- // In both cases, remove the progress bar
- ((ViewGroup) mProgressBar.getParent()).removeView(mProgressBar);
-
- // Remove the view that isn't relevant
- View goneView = success ? mTextView : mWebView;
- ((ViewGroup) goneView.getParent()).removeView(goneView);
-
- // Show the next view, which depends on success
- View visibleView = success ? mWebView : mTextView;
- visibleView.setVisibility(View.VISIBLE);
- }
-
- private class MyWebViewClient extends WebViewClient {
-
- @Override
- public void onPageFinished(WebView view, String url) {
- handleWebViewCompletion(true);
- }
-
- @Override
- public void onReceivedError(WebView view, int errorCode,
- String description, String failingUrl) {
- handleWebViewCompletion(false);
- }
-
- @Override
- public void onReceivedHttpAuthRequest(WebView view,
- HttpAuthHandler handler, String host, String realm) {
- handleWebViewCompletion(false);
- }
-
- @Override
- public void onReceivedSslError(WebView view, SslErrorHandler handler,
- SslError error) {
- handleWebViewCompletion(false);
- }
-
- @Override
- public void onTooManyRedirects(WebView view, Message cancelMsg,
- Message continueMsg) {
- handleWebViewCompletion(false);
- }
-
- }
-
-}
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index c92a86c..67a0bda 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -165,6 +165,7 @@
libEGL \
libGLESv1_CM \
libGLESv2 \
+ libETC1 \
libhardware \
libhardware_legacy \
libsonivox \
diff --git a/core/jni/android/opengl/util.cpp b/core/jni/android/opengl/util.cpp
index 4041346..589b255 100644
--- a/core/jni/android/opengl/util.cpp
+++ b/core/jni/android/opengl/util.cpp
@@ -23,6 +23,7 @@
#include <dlfcn.h>
#include <GLES/gl.h>
+#include <ETC1/etc1.h>
#include <core/SkBitmap.h>
@@ -39,6 +40,7 @@
static jclass gIAEClass;
static jclass gUOEClass;
+static jclass gAIOOBEClass;
static inline
void mx4transform(float x, float y, float z, float w, const float* pM, float* pDest) {
@@ -712,6 +714,297 @@
}
/*
+ * ETC1 methods.
+ */
+
+static jclass nioAccessClass;
+static jclass bufferClass;
+static jmethodID getBasePointerID;
+static jmethodID getBaseArrayID;
+static jmethodID getBaseArrayOffsetID;
+static jfieldID positionID;
+static jfieldID limitID;
+static jfieldID elementSizeShiftID;
+
+/* Cache method IDs each time the class is loaded. */
+
+static void
+nativeClassInitBuffer(JNIEnv *_env)
+{
+ jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
+ nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
+
+ jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
+ bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
+
+ getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
+ "getBasePointer", "(Ljava/nio/Buffer;)J");
+ getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
+ "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
+ getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
+ "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
+ positionID = _env->GetFieldID(bufferClass, "position", "I");
+ limitID = _env->GetFieldID(bufferClass, "limit", "I");
+ elementSizeShiftID =
+ _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
+}
+
+static void *
+getPointer(JNIEnv *_env, jobject buffer, jint *remaining)
+{
+ jint position;
+ jint limit;
+ jint elementSizeShift;
+ jlong pointer;
+ jint offset;
+ void *data;
+
+ position = _env->GetIntField(buffer, positionID);
+ limit = _env->GetIntField(buffer, limitID);
+ elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID);
+ *remaining = (limit - position) << elementSizeShift;
+ pointer = _env->CallStaticLongMethod(nioAccessClass,
+ getBasePointerID, buffer);
+ if (pointer != 0L) {
+ return (void *) (jint) pointer;
+ }
+ return NULL;
+}
+
+class BufferHelper {
+public:
+ BufferHelper(JNIEnv *env, jobject buffer) {
+ mEnv = env;
+ mBuffer = buffer;
+ mData = NULL;
+ mRemaining = 0;
+ }
+
+ bool checkPointer(const char* errorMessage) {
+ if (mBuffer) {
+ mData = getPointer(mEnv, mBuffer, &mRemaining);
+ if (mData == NULL) {
+ mEnv->ThrowNew(gIAEClass, errorMessage);
+ }
+ return mData != NULL;
+ } else {
+ mEnv->ThrowNew(gIAEClass, errorMessage);
+ return false;
+ }
+ }
+
+ inline void* getData() {
+ return mData;
+ }
+
+ inline jint remaining() {
+ return mRemaining;
+ }
+
+private:
+ JNIEnv* mEnv;
+ jobject mBuffer;
+ void* mData;
+ jint mRemaining;
+};
+
+/**
+ * Encode a block of pixels.
+ *
+ * @param in a pointer to a ETC1_DECODED_BLOCK_SIZE array of bytes that represent a
+ * 4 x 4 square of 3-byte pixels in form R, G, B. Byte (3 * (x + 4 * y) is the R
+ * value of pixel (x, y).
+ *
+ * @param validPixelMask is a 16-bit mask where bit (1 << (x + y * 4)) indicates whether
+ * the corresponding (x,y) pixel is valid. Invalid pixel color values are ignored when compressing.
+ *
+ * @param out an ETC1 compressed version of the data.
+ *
+ */
+static void etc1_encodeBlock(JNIEnv *env, jclass clazz,
+ jobject in, jint validPixelMask, jobject out) {
+ if (validPixelMask < 0 || validPixelMask > 15) {
+ env->ThrowNew(gIAEClass, "validPixelMask");
+ return;
+ }
+ BufferHelper inB(env, in);
+ BufferHelper outB(env, out);
+ if (inB.checkPointer("in") && outB.checkPointer("out")) {
+ if (inB.remaining() < ETC1_DECODED_BLOCK_SIZE) {
+ env->ThrowNew(gIAEClass, "in's remaining data < DECODED_BLOCK_SIZE");
+ } else if (outB.remaining() < ETC1_ENCODED_BLOCK_SIZE) {
+ env->ThrowNew(gIAEClass, "out's remaining data < ENCODED_BLOCK_SIZE");
+ } else {
+ etc1_encode_block((etc1_byte*) inB.getData(), validPixelMask,
+ (etc1_byte*) outB.getData());
+ }
+ }
+}
+
+/**
+ * Decode a block of pixels.
+ *
+ * @param in an ETC1 compressed version of the data.
+ *
+ * @param out a pointer to a ETC_DECODED_BLOCK_SIZE array of bytes that represent a
+ * 4 x 4 square of 3-byte pixels in form R, G, B. Byte (3 * (x + 4 * y) is the R
+ * value of pixel (x, y).
+ */
+static void etc1_decodeBlock(JNIEnv *env, jclass clazz,
+ jobject in, jobject out){
+ BufferHelper inB(env, in);
+ BufferHelper outB(env, out);
+ if (inB.checkPointer("in") && outB.checkPointer("out")) {
+ if (inB.remaining() < ETC1_ENCODED_BLOCK_SIZE) {
+ env->ThrowNew(gIAEClass, "in's remaining data < ENCODED_BLOCK_SIZE");
+ } else if (outB.remaining() < ETC1_DECODED_BLOCK_SIZE) {
+ env->ThrowNew(gIAEClass, "out's remaining data < DECODED_BLOCK_SIZE");
+ } else {
+ etc1_decode_block((etc1_byte*) inB.getData(),
+ (etc1_byte*) outB.getData());
+ }
+ }
+}
+
+/**
+ * Return the size of the encoded image data (does not include size of PKM header).
+ */
+static jint etc1_getEncodedDataSize(JNIEnv *env, jclass clazz,
+ jint width, jint height) {
+ return etc1_get_encoded_data_size(width, height);
+}
+
+/**
+ * Encode an entire image.
+ * @param in pointer to the image data. Formatted such that
+ * pixel (x,y) is at pIn + pixelSize * x + stride * y + redOffset;
+ * @param out pointer to encoded data. Must be large enough to store entire encoded image.
+ */
+static void etc1_encodeImage(JNIEnv *env, jclass clazz,
+ jobject in, jint width, jint height,
+ jint pixelSize, jint stride, jobject out) {
+ if (pixelSize < 2 || pixelSize > 3) {
+ env->ThrowNew(gIAEClass, "pixelSize must be 2 or 3");
+ return;
+ }
+ BufferHelper inB(env, in);
+ BufferHelper outB(env, out);
+ if (inB.checkPointer("in") && outB.checkPointer("out")) {
+ jint imageSize = stride * height;
+ jint encodedImageSize = etc1_get_encoded_data_size(width, height);
+ if (inB.remaining() < imageSize) {
+ env->ThrowNew(gIAEClass, "in's remaining data < image size");
+ } else if (outB.remaining() < encodedImageSize) {
+ env->ThrowNew(gIAEClass, "out's remaining data < encoded image size");
+ } else {
+ int result = etc1_encode_image((etc1_byte*) inB.getData(),
+ width, height, pixelSize,
+ stride,
+ (etc1_byte*) outB.getData());
+ }
+ }
+}
+
+/**
+ * Decode an entire image.
+ * @param in the encoded data.
+ * @param out pointer to the image data. Will be written such that
+ * pixel (x,y) is at pIn + pixelSize * x + stride * y. Must be
+ * large enough to store entire image.
+ */
+static void etc1_decodeImage(JNIEnv *env, jclass clazz,
+ jobject in, jobject out,
+ jint width, jint height,
+ jint pixelSize, jint stride) {
+ if (pixelSize < 2 || pixelSize > 3) {
+ env->ThrowNew(gIAEClass, "pixelSize must be 2 or 3");
+ return;
+ }
+ BufferHelper inB(env, in);
+ BufferHelper outB(env, out);
+ if (inB.checkPointer("in") && outB.checkPointer("out")) {
+ jint imageSize = stride * height;
+ jint encodedImageSize = etc1_get_encoded_data_size(width, height);
+ if (inB.remaining() < encodedImageSize) {
+ env->ThrowNew(gIAEClass, "in's remaining data < encoded image size");
+ } else if (outB.remaining() < imageSize) {
+ env->ThrowNew(gIAEClass, "out's remaining data < image size");
+ } else {
+ int result = etc1_decode_image((etc1_byte*) inB.getData(),
+ (etc1_byte*) outB.getData(),
+ width, height, pixelSize,
+ stride);
+ }
+ }
+}
+
+/**
+ * Format a PKM header
+ */
+static void etc1_formatHeader(JNIEnv *env, jclass clazz,
+ jobject header, jint width, jint height) {
+ BufferHelper headerB(env, header);
+ if (headerB.checkPointer("header") ){
+ if (headerB.remaining() < ETC_PKM_HEADER_SIZE) {
+ env->ThrowNew(gIAEClass, "header's remaining data < ETC_PKM_HEADER_SIZE");
+ } else {
+ etc1_pkm_format_header((etc1_byte*) headerB.getData(), width, height);
+ }
+ }
+}
+
+/**
+ * Check if a PKM header is correctly formatted.
+ */
+static jboolean etc1_isValid(JNIEnv *env, jclass clazz,
+ jobject header) {
+ jboolean result = false;
+ BufferHelper headerB(env, header);
+ if (headerB.checkPointer("header") ){
+ if (headerB.remaining() < ETC_PKM_HEADER_SIZE) {
+ env->ThrowNew(gIAEClass, "header's remaining data < ETC_PKM_HEADER_SIZE");
+ } else {
+ result = etc1_pkm_is_valid((etc1_byte*) headerB.getData());
+ }
+ }
+ return result;
+}
+
+/**
+ * Read the image width from a PKM header
+ */
+static jint etc1_getWidth(JNIEnv *env, jclass clazz,
+ jobject header) {
+ jint result = 0;
+ BufferHelper headerB(env, header);
+ if (headerB.checkPointer("header") ){
+ if (headerB.remaining() < ETC_PKM_HEADER_SIZE) {
+ env->ThrowNew(gIAEClass, "header's remaining data < ETC_PKM_HEADER_SIZE");
+ } else {
+ result = etc1_pkm_get_width((etc1_byte*) headerB.getData());
+ }
+ }
+ return result;
+}
+
+/**
+ * Read the image height from a PKM header
+ */
+static int etc1_getHeight(JNIEnv *env, jclass clazz,
+ jobject header) {
+ jint result = 0;
+ BufferHelper headerB(env, header);
+ if (headerB.checkPointer("header") ){
+ if (headerB.remaining() < ETC_PKM_HEADER_SIZE) {
+ env->ThrowNew(gIAEClass, "header's remaining data < ETC_PKM_HEADER_SIZE");
+ } else {
+ result = etc1_pkm_get_height((etc1_byte*) headerB.getData());
+ }
+ }
+ return result;
+}
+
+/*
* JNI registration
*/
@@ -721,6 +1014,8 @@
env->FindClass("java/lang/IllegalArgumentException"));
gUOEClass = (jclass) env->NewGlobalRef(
env->FindClass("java/lang/UnsupportedOperationException"));
+ gAIOOBEClass = (jclass) env->NewGlobalRef(
+ env->FindClass("java/lang/ArrayIndexOutOfBoundsException"));
}
static JNINativeMethod gMatrixMethods[] = {
@@ -742,6 +1037,18 @@
{ "native_texSubImage2D", "(IIIILandroid/graphics/Bitmap;II)I", (void*)util_texSubImage2D },
};
+static JNINativeMethod gEtc1Methods[] = {
+ { "encodeBlock", "(Ljava/nio/Buffer;ILjava/nio/Buffer;)V", (void*) etc1_encodeBlock },
+ { "decodeBlock", "(Ljava/nio/Buffer;Ljava/nio/Buffer;)V", (void*) etc1_decodeBlock },
+ { "getEncodedDataSize", "(II)I", (void*) etc1_getEncodedDataSize },
+ { "encodeImage", "(Ljava/nio/Buffer;IIIILjava/nio/Buffer;)V", (void*) etc1_encodeImage },
+ { "decodeImage", "(Ljava/nio/Buffer;Ljava/nio/Buffer;IIII)V", (void*) etc1_decodeImage },
+ { "formatHeader", "(Ljava/nio/Buffer;II)V", (void*) etc1_formatHeader },
+ { "isValid", "(Ljava/nio/Buffer;)Z", (void*) etc1_isValid },
+ { "getWidth", "(Ljava/nio/Buffer;)I", (void*) etc1_getWidth },
+ { "getHeight", "(Ljava/nio/Buffer;)I", (void*) etc1_getHeight },
+};
+
typedef struct _ClassRegistrationInfo {
const char* classPath;
JNINativeMethod* methods;
@@ -752,11 +1059,13 @@
{"android/opengl/Matrix", gMatrixMethods, NELEM(gMatrixMethods)},
{"android/opengl/Visibility", gVisiblityMethods, NELEM(gVisiblityMethods)},
{"android/opengl/GLUtils", gUtilsMethods, NELEM(gUtilsMethods)},
+ {"android/opengl/ETC1", gEtc1Methods, NELEM(gEtc1Methods)},
};
int register_android_opengl_classes(JNIEnv* env)
{
lookupClasses(env);
+ nativeClassInitBuffer(env);
int result = 0;
for (int i = 0; i < NELEM(gClasses); i++) {
ClassRegistrationInfo* cri = &gClasses[i];
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index d57e526..64ee4f0 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -220,7 +220,7 @@
break;
default:
// TODO: Change to LOGV
- LOGD("dataCallback(%d, %p)", msgType, dataPtr.get());
+ LOGV("dataCallback(%d, %p)", msgType, dataPtr.get());
copyAndPost(env, dataPtr, msgType);
break;
}
@@ -328,7 +328,7 @@
static void android_hardware_Camera_release(JNIEnv *env, jobject thiz)
{
// TODO: Change to LOGV
- LOGD("release camera");
+ LOGV("release camera");
JNICameraContext* context = NULL;
sp<Camera> camera;
{
@@ -526,7 +526,7 @@
static void android_hardware_Camera_startSmoothZoom(JNIEnv *env, jobject thiz, jint value)
{
- LOGD("startSmoothZoom");
+ LOGV("startSmoothZoom");
sp<Camera> camera = get_native_camera(env, thiz, NULL);
if (camera == 0) return;
@@ -537,7 +537,7 @@
static void android_hardware_Camera_stopSmoothZoom(JNIEnv *env, jobject thiz)
{
- LOGD("stopSmoothZoom");
+ LOGV("stopSmoothZoom");
sp<Camera> camera = get_native_camera(env, thiz, NULL);
if (camera == 0) return;
diff --git a/core/jni/android_hardware_SensorManager.cpp b/core/jni/android_hardware_SensorManager.cpp
index 3e27978..9a90b72 100644
--- a/core/jni/android_hardware_SensorManager.cpp
+++ b/core/jni/android_hardware_SensorManager.cpp
@@ -16,7 +16,6 @@
#define LOG_TAG "SensorManager"
-#define LOG_NDEBUG 0
#include "utils/Log.h"
#include <hardware/sensors.h>
diff --git a/core/jni/android_os_MemoryFile.cpp b/core/jni/android_os_MemoryFile.cpp
index 1ae3ec7..ee8d836 100644
--- a/core/jni/android_os_MemoryFile.cpp
+++ b/core/jni/android_os_MemoryFile.cpp
@@ -30,8 +30,6 @@
{
const char* namestr = (name ? env->GetStringUTFChars(name, NULL) : NULL);
- // round up length to page boundary
- length = (((length - 1) / getpagesize()) + 1) * getpagesize();
int result = ashmem_create_region(namestr, length);
if (name)
@@ -118,7 +116,7 @@
}
}
-static jint android_os_MemoryFile_get_mapped_size(JNIEnv* env, jobject clazz,
+static jint android_os_MemoryFile_get_size(JNIEnv* env, jobject clazz,
jobject fileDescriptor) {
int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
// Use ASHMEM_GET_SIZE to find out if the fd refers to an ashmem region.
@@ -146,8 +144,8 @@
{"native_read", "(Ljava/io/FileDescriptor;I[BIIIZ)I", (void*)android_os_MemoryFile_read},
{"native_write", "(Ljava/io/FileDescriptor;I[BIIIZ)V", (void*)android_os_MemoryFile_write},
{"native_pin", "(Ljava/io/FileDescriptor;Z)V", (void*)android_os_MemoryFile_pin},
- {"native_get_mapped_size", "(Ljava/io/FileDescriptor;)I",
- (void*)android_os_MemoryFile_get_mapped_size}
+ {"native_get_size", "(Ljava/io/FileDescriptor;)I",
+ (void*)android_os_MemoryFile_get_size}
};
static const char* const kClassPathName = "android/os/MemoryFile";
diff --git a/core/jni/android_os_Power.cpp b/core/jni/android_os_Power.cpp
index df5edba..a46c2dd 100644
--- a/core/jni/android_os_Power.cpp
+++ b/core/jni/android_os_Power.cpp
@@ -105,7 +105,7 @@
{ "setLastUserActivityTimeout", "(J)I", (void*)setLastUserActivityTimeout },
{ "setScreenState", "(Z)I", (void*)setScreenState },
{ "shutdown", "()V", (void*)android_os_Power_shutdown },
- { "reboot", "(Ljava/lang/String;)V", (void*)android_os_Power_reboot },
+ { "rebootNative", "(Ljava/lang/String;)V", (void*)android_os_Power_reboot },
};
int register_android_os_Power(JNIEnv *env)
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index e83d2e2..2fff727 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -524,7 +524,6 @@
}
for (int i=0; i<N; i++) {
- LOGD("locale %2d: '%s'", i, locales[i].string());
env->SetObjectArrayElement(result, i, env->NewStringUTF(locales[i].string()));
}
diff --git a/core/jni/android_util_EventLog.cpp b/core/jni/android_util_EventLog.cpp
index 34b7c89..75f6cb2 100644
--- a/core/jni/android_util_EventLog.cpp
+++ b/core/jni/android_util_EventLog.cpp
@@ -21,12 +21,8 @@
#include "jni.h"
#include "cutils/logger.h"
-#define END_DELIMITER '\n'
-#define INT_BUFFER_SIZE (sizeof(jbyte)+sizeof(jint)+sizeof(END_DELIMITER))
-#define LONG_BUFFER_SIZE (sizeof(jbyte)+sizeof(jlong)+sizeof(END_DELIMITER))
-#define INITAL_BUFFER_CAPACITY 256
-
-#define MAX(a,b) ((a>b)?a:b)
+// The size of the tag number comes out of the payload size.
+#define MAX_EVENT_PAYLOAD (LOGGER_ENTRY_MAX_PAYLOAD - sizeof(int32_t))
namespace android {
@@ -47,107 +43,6 @@
static jclass gStringClass;
-struct ByteBuf {
- size_t len;
- size_t capacity;
- uint8_t* buf;
-
- ByteBuf(size_t initSize) {
- buf = (uint8_t*)malloc(initSize);
- len = 0;
- capacity = initSize;
- }
-
- ~ByteBuf() {
- free(buf);
- }
-
- bool ensureExtraCapacity(size_t extra) {
- size_t spaceNeeded = len + extra;
- if (spaceNeeded > capacity) {
- size_t newCapacity = MAX(spaceNeeded, 2 * capacity);
- void* newBuf = realloc(buf, newCapacity);
- if (newBuf == NULL) {
- return false;
- }
- capacity = newCapacity;
- buf = (uint8_t*)newBuf;
- return true;
- } else {
- return true;
- }
- }
-
- void putIntEvent(jint value) {
- bool succeeded = ensureExtraCapacity(INT_BUFFER_SIZE);
- buf[len++] = EVENT_TYPE_INT;
- memcpy(buf+len, &value, sizeof(jint));
- len += sizeof(jint);
- }
-
- void putByte(uint8_t value) {
- bool succeeded = ensureExtraCapacity(sizeof(uint8_t));
- buf[len++] = value;
- }
-
- void putLongEvent(jlong value) {
- bool succeeded = ensureExtraCapacity(LONG_BUFFER_SIZE);
- buf[len++] = EVENT_TYPE_LONG;
- memcpy(buf+len, &value, sizeof(jlong));
- len += sizeof(jlong);
- }
-
-
- void putStringEvent(JNIEnv* env, jstring value) {
- const char* strValue = env->GetStringUTFChars(value, NULL);
- uint32_t strLen = strlen(strValue); //env->GetStringUTFLength(value);
- bool succeeded = ensureExtraCapacity(1 + sizeof(uint32_t) + strLen);
- buf[len++] = EVENT_TYPE_STRING;
- memcpy(buf+len, &strLen, sizeof(uint32_t));
- len += sizeof(uint32_t);
- memcpy(buf+len, strValue, strLen);
- env->ReleaseStringUTFChars(value, strValue);
- len += strLen;
- }
-
- void putList(JNIEnv* env, jobject list) {
- jobjectArray items = (jobjectArray) env->GetObjectField(list, gListItemsID);
- if (items == NULL) {
- jniThrowException(env, "java/lang/NullPointerException", NULL);
- return;
- }
-
- jsize numItems = env->GetArrayLength(items);
- putByte(EVENT_TYPE_LIST);
- putByte(numItems);
- // We'd like to call GetPrimitveArrayCritical() but that might
- // not be safe since we're going to be doing some I/O
- for (int i = 0; i < numItems; i++) {
- jobject item = env->GetObjectArrayElement(items, i);
- if (env->IsInstanceOf(item, gIntegerClass)) {
- jint intVal = env->GetIntField(item, gIntegerValueID);
- putIntEvent(intVal);
- } else if (env->IsInstanceOf(item, gLongClass)) {
- jlong longVal = env->GetLongField(item, gLongValueID);
- putLongEvent(longVal);
- } else if (env->IsInstanceOf(item, gStringClass)) {
- putStringEvent(env, (jstring)item);
- } else if (env->IsInstanceOf(item, gListClass)) {
- putList(env, item);
- } else {
- jniThrowException(
- env,
- "java/lang/IllegalArgumentException",
- "Attempt to log an illegal item type.");
- return;
- }
- env->DeleteLocalRef(item);
- }
-
- env->DeleteLocalRef(items);
- }
-};
-
/*
* In class android.util.EventLog:
* static native int writeEvent(int tag, int value)
@@ -170,41 +65,80 @@
/*
* In class android.util.EventLog:
- * static native int writeEvent(long tag, List value)
- */
-static jint android_util_EventLog_writeEvent_List(JNIEnv* env, jobject clazz,
- jint tag, jobject value) {
- if (value == NULL) {
- jclass clazz = env->FindClass("java/lang/IllegalArgumentException");
- env->ThrowNew(clazz, "writeEvent needs a value.");
- return -1;
- }
- ByteBuf byteBuf(INITAL_BUFFER_CAPACITY);
- byteBuf.putList(env, value);
- byteBuf.putByte((uint8_t)END_DELIMITER);
- int numBytesPut = byteBuf.len;
- int bytesWritten = android_bWriteLog(tag, byteBuf.buf, numBytesPut);
- return bytesWritten;
-}
-
-/*
- * In class android.util.EventLog:
* static native int writeEvent(int tag, String value)
*/
static jint android_util_EventLog_writeEvent_String(JNIEnv* env, jobject clazz,
jint tag, jstring value) {
+ uint8_t buf[MAX_EVENT_PAYLOAD];
+
+ // Don't throw NPE -- I feel like it's sort of mean for a logging function
+ // to be all crashy if you pass in NULL -- but make the NULL value explicit.
+ const char *str = value != NULL ? env->GetStringUTFChars(value, NULL) : "NULL";
+ jint len = strlen(str);
+ const int max = sizeof(buf) - sizeof(len) - 2; // Type byte, final newline
+ if (len > max) len = max;
+
+ buf[0] = EVENT_TYPE_STRING;
+ memcpy(&buf[1], &len, sizeof(len));
+ memcpy(&buf[1 + sizeof(len)], str, len);
+ buf[1 + sizeof(len) + len] = '\n';
+
+ if (value != NULL) env->ReleaseStringUTFChars(value, str);
+ return android_bWriteLog(tag, buf, 2 + sizeof(len) + len);
+}
+
+/*
+ * In class android.util.EventLog:
+ * static native int writeEvent(long tag, Object... value)
+ */
+static jint android_util_EventLog_writeEvent_Array(JNIEnv* env, jobject clazz,
+ jint tag, jobjectArray value) {
if (value == NULL) {
- jclass clazz = env->FindClass("java/lang/IllegalArgumentException");
- env->ThrowNew(clazz, "logEvent needs a value.");
- return -1;
+ return android_util_EventLog_writeEvent_String(env, clazz, tag, NULL);
}
- ByteBuf byteBuf(INITAL_BUFFER_CAPACITY);
- byteBuf.putStringEvent(env, value);
- byteBuf.putByte((uint8_t)END_DELIMITER);
- int numBytesPut = byteBuf.len;
- int bytesWritten = android_bWriteLog(tag, byteBuf.buf, numBytesPut);
- return bytesWritten;
+ uint8_t buf[MAX_EVENT_PAYLOAD];
+ const size_t max = sizeof(buf) - 1; // leave room for final newline
+ size_t pos = 2; // Save room for type tag & array count
+
+ jsize copied = 0, num = env->GetArrayLength(value);
+ for (; copied < num && copied < 255; ++copied) {
+ jobject item = env->GetObjectArrayElement(value, copied);
+ if (item == NULL || env->IsInstanceOf(item, gStringClass)) {
+ if (pos + 1 + sizeof(jint) > max) break;
+ const char *str = item != NULL ? env->GetStringUTFChars((jstring) item, NULL) : "NULL";
+ jint len = strlen(str);
+ if (pos + 1 + sizeof(len) + len > max) len = max - pos - 1 - sizeof(len);
+ buf[pos++] = EVENT_TYPE_STRING;
+ memcpy(&buf[pos], &len, sizeof(len));
+ memcpy(&buf[pos + sizeof(len)], str, len);
+ pos += sizeof(len) + len;
+ if (item != NULL) env->ReleaseStringUTFChars((jstring) item, str);
+ } else if (env->IsInstanceOf(item, gIntegerClass)) {
+ jint intVal = env->GetIntField(item, gIntegerValueID);
+ if (pos + 1 + sizeof(intVal) > max) break;
+ buf[pos++] = EVENT_TYPE_INT;
+ memcpy(&buf[pos], &intVal, sizeof(intVal));
+ pos += sizeof(intVal);
+ } else if (env->IsInstanceOf(item, gLongClass)) {
+ jlong longVal = env->GetLongField(item, gLongValueID);
+ if (pos + 1 + sizeof(longVal) > max) break;
+ buf[pos++] = EVENT_TYPE_LONG;
+ memcpy(&buf[pos], &longVal, sizeof(longVal));
+ pos += sizeof(longVal);
+ } else {
+ jniThrowException(env,
+ "java/lang/IllegalArgumentException",
+ "Invalid payload item type");
+ return -1;
+ }
+ env->DeleteLocalRef(item);
+ }
+
+ buf[0] = EVENT_TYPE_LIST;
+ buf[1] = copied;
+ buf[pos++] = '\n';
+ return android_bWriteLog(tag, buf, pos);
}
/*
@@ -276,81 +210,6 @@
}
/*
- * In class android.util.EventLog:
- * static native void readEvents(String path, Collection<Event> output)
- *
- * Reads events from a file (See Checkin.Aggregation). Events are stored in
- * native raw format (logger_entry + payload).
- */
-static void android_util_EventLog_readEventsFile(JNIEnv* env, jobject clazz, jstring path,
- jobject out) {
- if (path == NULL || out == NULL) {
- jniThrowException(env, "java/lang/NullPointerException", NULL);
- return;
- }
-
- const char *pathString = env->GetStringUTFChars(path, 0);
- int fd = open(pathString, O_RDONLY | O_NONBLOCK);
- env->ReleaseStringUTFChars(path, pathString);
-
- if (fd < 0) {
- jniThrowIOException(env, errno);
- return;
- }
-
- uint8_t buf[LOGGER_ENTRY_MAX_LEN];
- for (;;) {
- // read log entry structure from file
- int len = read(fd, buf, sizeof(logger_entry));
- if (len == 0) {
- break; // end of file
- } else if (len < 0) {
- jniThrowIOException(env, errno);
- } else if ((size_t) len < sizeof(logger_entry)) {
- jniThrowException(env, "java/io/IOException", "Event header too short");
- break;
- }
-
- // read event payload
- logger_entry* entry = (logger_entry*) buf;
- if (entry->len > LOGGER_ENTRY_MAX_PAYLOAD) {
- jniThrowException(env,
- "java/lang/IllegalArgumentException",
- "Too much data for event payload. Corrupt file?");
- break;
- }
-
- len = read(fd, buf + sizeof(logger_entry), entry->len);
- if (len == 0) {
- break; // end of file
- } else if (len < 0) {
- jniThrowIOException(env, errno);
- } else if ((size_t) len < entry->len) {
- jniThrowException(env, "java/io/IOException", "Event payload too short");
- break;
- }
-
- // create EventLog$Event and add it to the collection
- int buffer_size = sizeof(logger_entry) + entry->len;
- jbyteArray array = env->NewByteArray(buffer_size);
- if (array == NULL) break;
-
- jbyte *bytes = env->GetByteArrayElements(array, NULL);
- memcpy(bytes, buf, buffer_size);
- env->ReleaseByteArrayElements(array, bytes, 0);
-
- jobject event = env->NewObject(gEventClass, gEventInitID, array);
- if (event == NULL) break;
-
- env->CallBooleanMethod(out, gCollectionAddID, event);
- env->DeleteLocalRef(event);
- env->DeleteLocalRef(array);
- }
-
- close(fd);
-}
-
-/*
* JNI registration.
*/
static JNINativeMethod gRegisterMethods[] = {
@@ -362,22 +221,17 @@
(void*) android_util_EventLog_writeEvent_String
},
{ "writeEvent",
- "(ILandroid/util/EventLog$List;)I",
- (void*) android_util_EventLog_writeEvent_List
+ "(I[Ljava/lang/Object;)I",
+ (void*) android_util_EventLog_writeEvent_Array
},
{ "readEvents",
"([ILjava/util/Collection;)V",
(void*) android_util_EventLog_readEvents
},
- { "readEvents",
- "(Ljava/lang/String;Ljava/util/Collection;)V",
- (void*) android_util_EventLog_readEventsFile
- }
};
static struct { const char *name; jclass *clazz; } gClasses[] = {
{ "android/util/EventLog$Event", &gEventClass },
- { "android/util/EventLog$List", &gListClass },
{ "java/lang/Integer", &gIntegerClass },
{ "java/lang/Long", &gLongClass },
{ "java/lang/String", &gStringClass },
@@ -386,7 +240,6 @@
static struct { jclass *c; const char *name, *ft; jfieldID *id; } gFields[] = {
{ &gIntegerClass, "value", "I", &gIntegerValueID },
- { &gListClass, "mItems", "[Ljava/lang/Object;", &gListItemsID },
{ &gLongClass, "value", "J", &gLongValueID },
};
@@ -430,4 +283,3 @@
}
}; // namespace android
-
diff --git a/core/res/Android.mk b/core/res/Android.mk
index 78cb86d..7d11148 100644
--- a/core/res/Android.mk
+++ b/core/res/Android.mk
@@ -24,7 +24,7 @@
# since these resources will be used by many apps.
LOCAL_AAPT_FLAGS := -x
-LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
# Install this alongside the libraries.
LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES)
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 72ad324..c49a86a 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -556,12 +556,30 @@
android:label="@string/permlab_changeConfiguration"
android:description="@string/permdesc_changeConfiguration" />
- <!-- Allows an application to restart other applications. -->
+ <!-- @deprecated The {@link android.app.ActivityManager#restartPackage}
+ API is no longer supported. -->
<permission android:name="android.permission.RESTART_PACKAGES"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
- android:protectionLevel="dangerous"
- android:label="@string/permlab_restartPackages"
- android:description="@string/permdesc_restartPackages" />
+ android:protectionLevel="normal"
+ android:label="@string/permlab_killBackgroundProcesses"
+ android:description="@string/permdesc_killBackgroundProcesses" />
+
+ <!-- Allows an application to call
+ {@link android.app.ActivityManager#killBackgroundProcesses}. -->
+ <permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"
+ android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+ android:protectionLevel="normal"
+ android:label="@string/permlab_killBackgroundProcesses"
+ android:description="@string/permdesc_killBackgroundProcesses" />
+
+ <!-- Allows an application to call
+ {@link android.app.ActivityManager#forceStopPackage}.
+ @hide -->
+ <permission android:name="android.permission.FORCE_STOP_PACKAGES"
+ android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+ android:protectionLevel="signature"
+ android:label="@string/permlab_forceStopPackages"
+ android:description="@string/permdesc_forceStopPackages" />
<!-- Allows an application to retrieve state dump information from system
services. -->
@@ -1132,6 +1150,12 @@
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="signatureOrSystem" />
+ <!-- Allow an application to read and write the cache partition. -->
+ <permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM"
+ android:label="@string/permlab_cache_filesystem"
+ android:description="@string/permdesc_cache_filesystem"
+ android:protectionLevel="signatureOrSystem" />
+
<application android:process="system"
android:persistent="true"
android:hasCode="false"
diff --git a/core/res/res/drawable-hdpi/pickerbox_background.png b/core/res/res/drawable-hdpi/pickerbox_background.png
deleted file mode 100644
index 9315a31..0000000
--- a/core/res/res/drawable-hdpi/pickerbox_background.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/pickerbox_selected.9.png b/core/res/res/drawable-hdpi/pickerbox_selected.9.png
deleted file mode 100644
index a88ec63..0000000
--- a/core/res/res/drawable-hdpi/pickerbox_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/pickerbox_unselected.9.png b/core/res/res/drawable-hdpi/pickerbox_unselected.9.png
deleted file mode 100644
index 9f6b7cb..0000000
--- a/core/res/res/drawable-hdpi/pickerbox_unselected.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/search_source_selector_indicator.png b/core/res/res/drawable-hdpi/search_source_selector_indicator.png
new file mode 100644
index 0000000..b93a0c0
--- /dev/null
+++ b/core/res/res/drawable-hdpi/search_source_selector_indicator.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pickerbox_background.png b/core/res/res/drawable-mdpi/pickerbox_background.png
deleted file mode 100644
index 6494cd8..0000000
--- a/core/res/res/drawable-mdpi/pickerbox_background.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pickerbox_selected.9.png b/core/res/res/drawable-mdpi/pickerbox_selected.9.png
deleted file mode 100644
index d986a31..0000000
--- a/core/res/res/drawable-mdpi/pickerbox_selected.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/pickerbox_unselected.9.png b/core/res/res/drawable-mdpi/pickerbox_unselected.9.png
deleted file mode 100644
index 27ec6b9..0000000
--- a/core/res/res/drawable-mdpi/pickerbox_unselected.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/search_source_selector_indicator.png b/core/res/res/drawable-mdpi/search_source_selector_indicator.png
new file mode 100644
index 0000000..26bf18a
--- /dev/null
+++ b/core/res/res/drawable-mdpi/search_source_selector_indicator.png
Binary files differ
diff --git a/core/res/res/drawable/pickerbox.xml b/core/res/res/drawable/search_source_selector_background.xml
similarity index 74%
rename from core/res/res/drawable/pickerbox.xml
rename to core/res/res/drawable/search_source_selector_background.xml
index 9cb2436..fcacd89 100644
--- a/core/res/res/drawable/pickerbox.xml
+++ b/core/res/res/drawable/search_source_selector_background.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
+<!-- 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.
@@ -15,7 +15,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/pickerbox_selected" />
- <item android:drawable="@drawable/pickerbox_unselected" />
-</selector>
+ <!-- TODO: Need focused and pressed backgrounds -->
+
+</selector>
diff --git a/core/res/res/layout-ja/contact_header_name.xml b/core/res/res/layout-ja/contact_header_name.xml
index 7c0f63e..39d5593 100644
--- a/core/res/res/layout-ja/contact_header_name.xml
+++ b/core/res/res/layout-ja/contact_header_name.xml
@@ -20,11 +20,11 @@
android:orientation="vertical"
android:layout_width="0dip"
android:layout_weight="1"
- android:layout_height="fill_parent">
+ android:layout_height="match_parent">
<TextView android:id="@+id/name"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:singleLine="true"
android:ellipsize="end"
android:textAppearance="?android:attr/textAppearanceMedium"
diff --git a/core/res/res/layout-land/icon_menu_layout.xml b/core/res/res/layout-land/icon_menu_layout.xml
index d1b25d91..58f7bfb 100644
--- a/core/res/res/layout-land/icon_menu_layout.xml
+++ b/core/res/res/layout-land/icon_menu_layout.xml
@@ -16,7 +16,7 @@
<com.android.internal.view.menu.IconMenuView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+android:id/icon_menu"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:rowHeight="65dip"
android:maxItems="6"
diff --git a/core/res/res/layout-port/icon_menu_layout.xml b/core/res/res/layout-port/icon_menu_layout.xml
index 08edfcc..c84f7d2 100644
--- a/core/res/res/layout-port/icon_menu_layout.xml
+++ b/core/res/res/layout-port/icon_menu_layout.xml
@@ -16,7 +16,7 @@
<com.android.internal.view.menu.IconMenuView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+android:id/icon_menu"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:rowHeight="65dip"
android:maxItems="6"
diff --git a/core/res/res/layout/activity_list.xml b/core/res/res/layout/activity_list.xml
index 2967f0f..f489ab7 100644
--- a/core/res/res/layout/activity_list.xml
+++ b/core/res/res/layout/activity_list.xml
@@ -15,20 +15,20 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
>
<ListView
android:id="@android:id/list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
/>
<TextView
android:id="@android:id/empty"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:gravity="center"
android:text="@string/activity_list_empty"
android:visibility="gone"
diff --git a/core/res/res/layout/activity_list_item.xml b/core/res/res/layout/activity_list_item.xml
index 7a2a0e2..25d95fd 100644
--- a/core/res/res/layout/activity_list_item.xml
+++ b/core/res/res/layout/activity_list_item.xml
@@ -18,7 +18,7 @@
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="1dip"
android:paddingBottom="1dip"
diff --git a/core/res/res/layout/activity_list_item_2.xml b/core/res/res/layout/activity_list_item_2.xml
index 78eca02..e937d7b 100644
--- a/core/res/res/layout/activity_list_item_2.xml
+++ b/core/res/res/layout/activity_list_item_2.xml
@@ -15,7 +15,7 @@
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
diff --git a/core/res/res/layout/alert_dialog.xml b/core/res/res/layout/alert_dialog.xml
index 40e3f42..409dcd3 100644
--- a/core/res/res/layout/alert_dialog.xml
+++ b/core/res/res/layout/alert_dialog.xml
@@ -20,7 +20,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/parentPanel"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="9dip"
@@ -30,12 +30,12 @@
>
<LinearLayout android:id="@+id/topPanel"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="54dip"
android:orientation="vertical">
<LinearLayout android:id="@+id/title_template"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
@@ -54,11 +54,11 @@
style="?android:attr/textAppearanceLarge"
android:singleLine="true"
android:ellipsize="end"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<ImageView android:id="@+id/titleDivider"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:visibility="gone"
android:scaleType="fitXY"
@@ -68,12 +68,12 @@
</LinearLayout>
<LinearLayout android:id="@+id/contentPanel"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<ScrollView android:id="@+id/scrollView"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="2dip"
android:paddingBottom="12dip"
@@ -81,30 +81,30 @@
android:paddingRight="10dip">
<TextView android:id="@+id/message"
style="?android:attr/textAppearanceMedium"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dip" />
</ScrollView>
</LinearLayout>
<FrameLayout android:id="@+id/customPanel"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<FrameLayout android:id="@+android:id/custom"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:paddingBottom="5dip" />
</FrameLayout>
<LinearLayout android:id="@+id/buttonPanel"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="54dip"
android:orientation="vertical" >
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="4dip"
diff --git a/core/res/res/layout/alert_dialog_progress.xml b/core/res/res/layout/alert_dialog_progress.xml
index d2bb691..c519692 100644
--- a/core/res/res/layout/alert_dialog_progress.xml
+++ b/core/res/res/layout/alert_dialog_progress.xml
@@ -15,10 +15,10 @@
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content" android:layout_height="fill_parent">
+ android:layout_width="wrap_content" android:layout_height="match_parent">
<ProgressBar android:id="@+id/progress"
style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dip"
android:layout_marginBottom="1dip"
diff --git a/core/res/res/layout/always_use_checkbox.xml b/core/res/res/layout/always_use_checkbox.xml
index 1f8d256..baa4bee 100644
--- a/core/res/res/layout/always_use_checkbox.xml
+++ b/core/res/res/layout/always_use_checkbox.xml
@@ -18,7 +18,7 @@
to make their selection the preferred activity. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="14dip"
android:paddingRight="15dip"
diff --git a/core/res/res/layout/app_permission_item.xml b/core/res/res/layout/app_permission_item.xml
index 8db4dd7..1bd267f 100644
--- a/core/res/res/layout/app_permission_item.xml
+++ b/core/res/res/layout/app_permission_item.xml
@@ -21,7 +21,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
diff --git a/core/res/res/layout/app_perms_summary.xml b/core/res/res/layout/app_perms_summary.xml
index 009eb8f..7160743 100755
--- a/core/res/res/layout/app_perms_summary.xml
+++ b/core/res/res/layout/app_perms_summary.xml
@@ -18,8 +18,8 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical">
<TextView
@@ -36,7 +36,7 @@
<LinearLayout
android:id="@+id/dangerous_perms_list"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:paddingLeft="16dip"
android:paddingRight="12dip"
android:layout_height="wrap_content" />
@@ -45,20 +45,20 @@
<LinearLayout
android:id="@+id/show_more"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_marginTop="12dip"
android:layout_marginBottom="16dip">
<View
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
<LinearLayout
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dip"
android:layout_marginBottom="12dip"
@@ -77,13 +77,13 @@
android:layout_alignTop="@id/show_more_icon"
android:layout_gravity="center_vertical"
android:paddingLeft="6dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<View
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:background="?android:attr/listDivider" />
@@ -95,7 +95,7 @@
android:orientation="vertical"
android:paddingLeft="16dip"
android:paddingRight="12dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
diff --git a/core/res/res/layout/auto_complete_list.xml b/core/res/res/layout/auto_complete_list.xml
index addda11..8ad5dbb 100644
--- a/core/res/res/layout/auto_complete_list.xml
+++ b/core/res/res/layout/auto_complete_list.xml
@@ -17,7 +17,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/content"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:drawable/edit_text"
android:divider="@android:drawable/divider_horizontal_textfield"
@@ -25,14 +25,14 @@
<LinearLayout android:id="@+id/container"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="0dip"
/>
<AutoCompleteTextView android:id="@+id/edit"
android:completionThreshold="1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:layout_gravity="center_vertical"
diff --git a/core/res/res/layout/battery_low.xml b/core/res/res/layout/battery_low.xml
index 116eae7..3b62fb0 100644
--- a/core/res/res/layout/battery_low.xml
+++ b/core/res/res/layout/battery_low.xml
@@ -25,7 +25,7 @@
>
<TextView android:id="@+id/subtitle"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18dp"
android:paddingLeft="19dp"
@@ -35,7 +35,7 @@
/>
<TextView android:id="@+id/level_percent"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18dp"
android:textColor="#ffffffff"
diff --git a/core/res/res/layout/battery_status.xml b/core/res/res/layout/battery_status.xml
index 8b9828c..7cfec05 100644
--- a/core/res/res/layout/battery_status.xml
+++ b/core/res/res/layout/battery_status.xml
@@ -32,13 +32,13 @@
<LinearLayout
android:id="@+id/meter"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
>
<ImageView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="15dip"
/>
<ImageView
@@ -55,8 +55,8 @@
</LinearLayout>
<TextView android:id="@+id/level_percent"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:textStyle="bold"
android:textSize="48dp"
android:textColor="#ffffffff"
diff --git a/core/res/res/layout/character_picker.xml b/core/res/res/layout/character_picker.xml
index 70867d0..2508f72e 100644
--- a/core/res/res/layout/character_picker.xml
+++ b/core/res/res/layout/character_picker.xml
@@ -17,7 +17,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="304dp"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:background="@drawable/keyboard_popup_panel_trans_background">
<GridView
diff --git a/core/res/res/layout/contact_header.xml b/core/res/res/layout/contact_header.xml
index d551a26..128adc5 100644
--- a/core/res/res/layout/contact_header.xml
+++ b/core/res/res/layout/contact_header.xml
@@ -16,8 +16,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/banner"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="horizontal"
android:background="@drawable/title_bar_medium"
android:paddingRight="5dip">
@@ -37,7 +37,7 @@
android:layout_gravity="center_vertical" >
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
@@ -56,7 +56,7 @@
</LinearLayout>
<TextView android:id="@+id/status"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:singleLine="true"
@@ -65,7 +65,7 @@
/>
<TextView android:id="@+id/status_date"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceSmall"
diff --git a/core/res/res/layout/contact_header_name.xml b/core/res/res/layout/contact_header_name.xml
index 4a53252..24db2f2 100644
--- a/core/res/res/layout/contact_header_name.xml
+++ b/core/res/res/layout/contact_header_name.xml
@@ -17,7 +17,7 @@
<!-- In the default locale, the "Name" field is a single TextView -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/name"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"
diff --git a/core/res/res/layout/dialog_custom_title.xml b/core/res/res/layout/dialog_custom_title.xml
index 68578f5..e52fba6 100644
--- a/core/res/res/layout/dialog_custom_title.xml
+++ b/core/res/res/layout/dialog_custom_title.xml
@@ -22,19 +22,19 @@
android:orientation="vertical"
android:fitsSystemWindows="true">
<FrameLayout android:id="@android:id/title_container"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="24dip"
android:layout_weight="0"
style="?android:attr/windowTitleBackgroundStyle">
</FrameLayout>
<FrameLayout
- android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:foreground="?android:attr/windowContentOverlay">
<FrameLayout android:id="@android:id/content"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:paddingTop="6dip"
android:paddingBottom="10dip"
android:paddingLeft="10dip"
diff --git a/core/res/res/layout/dialog_title.xml b/core/res/res/layout/dialog_title.xml
index 8cfc716..949f86e 100644
--- a/core/res/res/layout/dialog_title.xml
+++ b/core/res/res/layout/dialog_title.xml
@@ -25,7 +25,7 @@
android:orientation="vertical"
android:fitsSystemWindows="true">
<TextView android:id="@android:id/title" style="?android:attr/windowTitleStyle"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="53dip"
android:paddingTop="9dip"
@@ -33,13 +33,13 @@
android:paddingLeft="10dip"
android:paddingRight="10dip" />
<FrameLayout
- android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:foreground="?android:attr/windowContentOverlay">
<FrameLayout android:id="@android:id/content"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
</FrameLayout>
</LinearLayout>
diff --git a/core/res/res/layout/dialog_title_icons.xml b/core/res/res/layout/dialog_title_icons.xml
index 7c3f274..0ca6706 100644
--- a/core/res/res/layout/dialog_title_icons.xml
+++ b/core/res/res/layout/dialog_title_icons.xml
@@ -24,7 +24,7 @@
android:fitsSystemWindows="true">
<LinearLayout android:id="@+id/title_container"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
@@ -57,13 +57,13 @@
</LinearLayout>
<FrameLayout
- android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:foreground="?android:attr/windowContentOverlay">
<FrameLayout android:id="@android:id/content"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
</FrameLayout>
</LinearLayout>
diff --git a/core/res/res/layout/expandable_list_content.xml b/core/res/res/layout/expandable_list_content.xml
index 05d74a6..4ed905c 100644
--- a/core/res/res/layout/expandable_list_content.xml
+++ b/core/res/res/layout/expandable_list_content.xml
@@ -19,6 +19,6 @@
-->
<ExpandableListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:drawSelectorOnTop="false" />
diff --git a/core/res/res/layout/global_actions_item.xml b/core/res/res/layout/global_actions_item.xml
index 63bb0f4..68fe960 100644
--- a/core/res/res/layout/global_actions_item.xml
+++ b/core/res/res/layout/global_actions_item.xml
@@ -15,7 +15,7 @@
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:paddingLeft="11dip"
@@ -25,7 +25,7 @@
<ImageView android:id="@+id/icon"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="9dip"
@@ -33,7 +33,7 @@
<TextView android:id="@+id/status"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="26dip"
android:layout_toRightOf="@id/icon"
@@ -45,7 +45,7 @@
<TextView android:id="@+id/message"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/icon"
diff --git a/core/res/res/layout/google_web_content_helper_layout.xml b/core/res/res/layout/google_web_content_helper_layout.xml
index 546c458..f16ffc9 100644
--- a/core/res/res/layout/google_web_content_helper_layout.xml
+++ b/core/res/res/layout/google_web_content_helper_layout.xml
@@ -43,8 +43,8 @@
<WebView
android:id="@+id/web"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:visibility="invisible"
/>
diff --git a/core/res/res/layout/grant_credentials_permission.xml b/core/res/res/layout/grant_credentials_permission.xml
index 84b66230..4133ea9 100644
--- a/core/res/res/layout/grant_credentials_permission.xml
+++ b/core/res/res/layout/grant_credentials_permission.xml
@@ -20,13 +20,13 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<!-- The header -->
<TextView
android:id="@+id/header_text"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/white"
@@ -43,7 +43,7 @@
<!-- The list of packages that correspond to the requesting UID
and the account/authtokenType that is being requested -->
<ScrollView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:layout_weight="1"
@@ -51,8 +51,8 @@
android:foreground="@drawable/title_bar_shadow">
<LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:paddingTop="14dip"
android:orientation="vertical">
@@ -70,13 +70,13 @@
android:orientation="vertical"
android:paddingLeft="16dip"
android:paddingRight="12dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<RelativeLayout
android:paddingLeft="16dip"
android:paddingRight="12dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
@@ -137,7 +137,7 @@
<!-- The buttons to allow or deny -->
<LinearLayout
android:id="@+id/buttons"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="52dip"
android:background="@drawable/bottom_bar"
android:paddingTop="4dip"
diff --git a/core/res/res/layout/icon_menu_item_layout.xml b/core/res/res/layout/icon_menu_item_layout.xml
index c6d9496..a73dccc 100644
--- a/core/res/res/layout/icon_menu_item_layout.xml
+++ b/core/res/res/layout/icon_menu_item_layout.xml
@@ -16,8 +16,8 @@
<com.android.internal.view.menu.IconMenuItemView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/title"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:paddingBottom="1dip"
android:paddingLeft="3dip"
android:paddingRight="3dip"
diff --git a/core/res/res/layout/input_method.xml b/core/res/res/layout/input_method.xml
index 1a701e9..f80d628 100644
--- a/core/res/res/layout/input_method.xml
+++ b/core/res/res/layout/input_method.xml
@@ -20,27 +20,27 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/parentPanel"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<LinearLayout
android:id="@+id/fullscreenArea"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<FrameLayout android:id="@android:id/extractArea"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
android:visibility="gone">
</FrameLayout>
<FrameLayout android:id="@android:id/candidatesArea"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible">
</FrameLayout>
@@ -48,7 +48,7 @@
</LinearLayout>
<FrameLayout android:id="@android:id/inputArea"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
</FrameLayout>
diff --git a/core/res/res/layout/input_method_extract_view.xml b/core/res/res/layout/input_method_extract_view.xml
index 1244c1d..689ba7b 100644
--- a/core/res/res/layout/input_method_extract_view.xml
+++ b/core/res/res/layout/input_method_extract_view.xml
@@ -25,7 +25,7 @@
<android.inputmethodservice.ExtractEditText
android:id="@+id/inputExtractEditText"
android:layout_width="0px"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:scrollbars="vertical"
android:gravity="top"
@@ -38,7 +38,7 @@
<FrameLayout
android:id="@+id/inputExtractAccessories"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:background="@android:drawable/keyboard_accessory_bg_landscape"
diff --git a/core/res/res/layout/js_prompt.xml b/core/res/res/layout/js_prompt.xml
index 86974ba..d80fbc8 100644
--- a/core/res/res/layout/js_prompt.xml
+++ b/core/res/res/layout/js_prompt.xml
@@ -16,18 +16,18 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
>
<TextView android:id="@+id/message"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<EditText android:id="@+id/value"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="bold"
android:inputType="text"
diff --git a/core/res/res/layout/keyboard_popup_keyboard.xml b/core/res/res/layout/keyboard_popup_keyboard.xml
index 1092cc0..5eb2732 100644
--- a/core/res/res/layout/keyboard_popup_keyboard.xml
+++ b/core/res/res/layout/keyboard_popup_keyboard.xml
@@ -19,7 +19,7 @@
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@android:drawable/keyboard_popup_panel_background"
@@ -29,7 +29,7 @@
android:id="@android:id/keyboardView"
android:background="@android:color/transparent"
android:layout_alignParentBottom="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:keyPreviewLayout="@layout/keyboard_key_preview"
android:popupLayout="@layout/keyboard_popup_keyboard"
diff --git a/core/res/res/layout/keyguard_screen_glogin_unlock.xml b/core/res/res/layout/keyguard_screen_glogin_unlock.xml
index 6e00d11..8a46546 100644
--- a/core/res/res/layout/keyguard_screen_glogin_unlock.xml
+++ b/core/res/res/layout/keyguard_screen_glogin_unlock.xml
@@ -17,24 +17,24 @@
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:color/background_dark"
>
<ScrollView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
android:layout_above="@+id/emergencyCall">
<RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
>
<TextView
android:id="@+id/topHeader"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="64dip"
android:layout_alignParentTop="true"
android:layout_marginLeft="4dip"
@@ -47,14 +47,14 @@
<!-- spacer below header -->
<View
android:id="@+id/spacerTop"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_below="@id/topHeader"
android:background="@drawable/divider_horizontal_dark"/>
<TextView
android:id="@+id/instructions"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/spacerTop"
android:layout_marginTop="8dip"
@@ -65,7 +65,7 @@
<EditText
android:id="@+id/login"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/instructions"
android:layout_marginTop="8dip"
@@ -77,7 +77,7 @@
<EditText
android:id="@+id/password"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/login"
android:layout_marginTop="15dip"
@@ -106,7 +106,7 @@
<!-- spacer above emergency call -->
<View
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginBottom="4dip"
diff --git a/core/res/res/layout/keyguard_screen_lock.xml b/core/res/res/layout/keyguard_screen_lock.xml
index b5fbace..6e4fa7d 100644
--- a/core/res/res/layout/keyguard_screen_lock.xml
+++ b/core/res/res/layout/keyguard_screen_lock.xml
@@ -24,13 +24,13 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:gravity="bottom"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
>
<LinearLayout
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="15dip"
@@ -43,25 +43,25 @@
<!-- when sim is present -->
<TextView android:id="@+id/headerSimOk1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="34sp"/>
<TextView android:id="@+id/headerSimOk2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="34sp"/>
<!-- when sim is missing / locked -->
<TextView android:id="@+id/headerSimBad1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@android:string/lockscreen_missing_sim_message"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<TextView android:id="@+id/headerSimBad2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7dip"
android:layout_marginBottom="7dip"
@@ -71,27 +71,27 @@
<!-- spacer after carrier info / sim messages -->
<View
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginTop="8dip"
android:background="@android:drawable/divider_horizontal_dark"/>
<!-- time and date -->
<TextView android:id="@+id/time"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="34sp"/>
<TextView android:id="@+id/date"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="18sp"/>
<!-- spacer after time and date -->
<View
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginBottom="8dip"
android:background="@android:drawable/divider_horizontal_dark"
@@ -100,7 +100,7 @@
<!-- battery info -->
<LinearLayout android:id="@+id/batteryInfo"
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
>
@@ -124,7 +124,7 @@
<!-- spacer after battery info -->
<View android:id="@+id/batteryInfoSpacer"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginTop="8dip"
android:layout_marginBottom="8dip"
@@ -135,7 +135,7 @@
<LinearLayout android:id="@+id/nextAlarmInfo"
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
>
@@ -159,7 +159,7 @@
<!-- spacer after alarm info -->
<View android:id="@+id/nextAlarmSpacer"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginTop="8dip"
android:layout_marginBottom="8dip"
@@ -169,7 +169,7 @@
(shown when SIM card is present) -->
<LinearLayout android:id="@+id/screenLockedInfo"
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
>
@@ -195,7 +195,7 @@
<!-- message about how to unlock
(shown when SIM card is present) -->
<TextView android:id="@+id/lockInstructions"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:gravity="center"
diff --git a/core/res/res/layout/keyguard_screen_password_landscape.xml b/core/res/res/layout/keyguard_screen_password_landscape.xml
new file mode 100644
index 0000000..5bc034b
--- /dev/null
+++ b/core/res/res/layout/keyguard_screen_password_landscape.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 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.
+*/
+-->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:background="@android:color/background_dark">
+
+ <!-- displays dots as user enters pin -->
+ <LinearLayout android:id="@+id/pinDisplayGroup"
+ android:orientation="horizontal"
+ android:layout_centerInParent="true"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:addStatesFromChildren="true"
+ android:gravity="center_vertical"
+ android:baselineAligned="false"
+ android:paddingRight="0dip"
+ android:layout_marginRight="30dip"
+ android:layout_marginLeft="30dip"
+ android:layout_marginTop="6dip"
+ android:background="@android:drawable/edit_text">
+
+ <EditText android:id="@+id/pinDisplay"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:layout_height="fill_parent"
+ android:maxLines="1"
+ android:background="@null"
+ android:textSize="32sp"
+ android:inputType="textPassword"
+ />
+
+ <ImageButton android:id="@+id/backspace"
+ android:src="@android:drawable/ic_input_delete"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_marginTop="2dip"
+ android:layout_marginRight="2dip"
+ android:layout_marginBottom="2dip"
+ android:gravity="center"
+ />
+
+ </LinearLayout>
+
+ <!-- header text ('Enter Pin Code') -->
+ <TextView android:id="@+id/headerText"
+ android:layout_above="@id/pinDisplayGroup"
+ android:layout_centerHorizontal="true"
+ android:layout_marginBottom="30dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="24sp"
+ />
+
+ <LinearLayout
+ android:orientation="horizontal"
+ android:layout_alignParentBottom="true"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dip"
+ android:layout_marginLeft="8dip"
+ android:layout_marginRight="8dip">
+
+ <Button android:id="@+id/ok"
+ android:text="@android:string/ok"
+ android:layout_alignParentBottom="true"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1.0"
+ android:layout_marginBottom="8dip"
+ android:layout_marginRight="8dip"
+ android:textSize="18sp"
+ />
+
+ <Button android:id="@+id/emergencyCall"
+ android:text="@android:string/lockscreen_emergency_call"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1.0"
+ android:layout_marginBottom="8dip"
+ android:layout_marginLeft="8dip"
+ android:textSize="18sp"
+ android:drawableLeft="@drawable/ic_emergency"
+ android:drawablePadding="8dip"
+ />
+ </LinearLayout>
+
+ <!-- Not currently visible on this screen -->
+ <TextView
+ android:id="@+id/carrier"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_marginTop="6dip"
+ android:layout_alignParentRight="true"
+ android:layout_marginRight="8dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:visibility="gone"
+ />
+
+</RelativeLayout>
diff --git a/core/res/res/layout/keyguard_screen_password_portrait.xml b/core/res/res/layout/keyguard_screen_password_portrait.xml
new file mode 100644
index 0000000..a7814af
--- /dev/null
+++ b/core/res/res/layout/keyguard_screen_password_portrait.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 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.
+*/
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:background="#70000000"
+ android:gravity="center_horizontal">
+
+ <LinearLayout android:id="@+id/topDisplayGroup"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <RelativeLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
+
+ <com.android.internal.widget.DigitalClock android:id="@+id/time"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="6dip"
+ android:layout_marginLeft="6dip"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true">
+
+ <TextView android:id="@+id/timeDisplay"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="bottom"
+ android:singleLine="true"
+ android:ellipsize="none"
+ android:textSize="56sp"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:shadowColor="#C0000000"
+ android:shadowDx="0"
+ android:shadowDy="0"
+ android:shadowRadius="3.0"
+ android:layout_marginBottom="6dip"
+ />
+
+ <TextView android:id="@+id/am_pm"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:gravity="bottom"
+ android:singleLine="true"
+ android:ellipsize="none"
+ android:textSize="18sp"
+ android:layout_marginLeft="4dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:shadowColor="#C0000000"
+ android:shadowDx="0"
+ android:shadowDy="0"
+ android:shadowRadius="3.0"
+ />
+
+ </com.android.internal.widget.DigitalClock>
+
+ <TextView android:id="@+id/carrier"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_marginTop="6dip"
+ android:layout_alignParentRight="true"
+ android:layout_marginRight="8dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ />
+
+ </RelativeLayout>
+
+ <!-- password entry -->
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_marginRight="6dip"
+ android:layout_marginLeft="6dip"
+ android:gravity="center_vertical"
+ android:hint="@android:string/keyguard_password_enter_password_code"
+ android:background="@android:drawable/edit_text">
+
+ <!-- displays dots as user enters pin -->
+ <TextView android:id="@+id/pinDisplay"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:maxLines="1"
+ android:textAppearance="?android:attr/textAppearanceLargeInverse"
+ android:textStyle="bold"
+ android:inputType="textPassword"
+ />
+
+ <ImageButton android:id="@+id/backspace"
+ android:src="@android:drawable/ic_input_delete"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="-3dip"
+ android:layout_marginBottom="-3dip"
+ />
+ </LinearLayout>
+
+ </LinearLayout>
+
+ <include
+ android:id="@+id/keyPad"
+ layout="@android:layout/twelve_key_entry"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/topDisplayGroup"
+ android:layout_marginTop="10dip"
+ />
+
+ <!-- spacer below keypad -->
+ <View
+ android:id="@+id/spacerBottom"
+ android:layout_width="fill_parent"
+ android:layout_height="1dip"
+ android:layout_marginTop="6dip"
+ android:layout_above="@id/emergencyCall"
+ android:background="@android:drawable/divider_horizontal_dark"
+ />
+
+ <!-- The emergency button should take the rest of the space and be centered vertically -->
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1"
+ android:gravity="center"
+ android:orientation="vertical">
+
+ <!-- emergency call button -->
+ <Button
+ android:id="@+id/emergencyCall"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:drawableLeft="@android:drawable/ic_emergency"
+ android:drawablePadding="8dip"
+ android:text="@android:string/lockscreen_emergency_call"
+ />
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/core/res/res/layout/keyguard_screen_rotary_unlock.xml b/core/res/res/layout/keyguard_screen_rotary_unlock.xml
deleted file mode 100644
index 59b69cd..0000000
--- a/core/res/res/layout/keyguard_screen_rotary_unlock.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 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 general lock screen which shows information about the
- state of the device, as well as instructions on how to get past it
- depending on the state of the device. It is the same for landscape
- and portrait.-->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:id="@+id/root"
- >
-
-<RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="#70000000"
- >
-
- <TextView
- android:id="@+id/carrier"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="20dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- />
-
- <TextView
- android:id="@+id/time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/carrier"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="25dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="55sp"
- />
-
- <TextView
- android:id="@+id/date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/time"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="-12dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- />
-
- <View
- android:id="@+id/divider"
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:layout_marginTop="10dip"
- android:layout_below="@id/date"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
- <TextView
- android:id="@+id/status1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/divider"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="6dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:drawablePadding="4dip"
- />
-
- <TextView
- android:id="@+id/status2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/status1"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="6dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:drawablePadding="4dip"
- />
-
- <TextView
- android:id="@+id/screenLocked"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/status2"
- android:layout_centerHorizontal="true"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:gravity="center"
- android:layout_marginTop="12dip"
- />
-
- <!-- By having the rotary selector hang from the top, we get a layout more
- robust for different screen sizes. On hvga, the widget should be flush with the bottom.-->
- <com.android.internal.widget.RotarySelector
- android:id="@+id/rotary"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_alignParentTop="true"
- android:layout_marginTop="286dip"
- />
-
- <!-- emergency call button shown when sim is missing or PUKd -->
- <Button
- android:id="@+id/emergencyCallButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/screenLocked"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="24dip"
- android:drawableLeft="@drawable/ic_emergency"
- android:drawablePadding="8dip"
- />
-
-</RelativeLayout>
-
-</FrameLayout>
diff --git a/core/res/res/layout/keyguard_screen_rotary_unlock_land.xml b/core/res/res/layout/keyguard_screen_rotary_unlock_land.xml
deleted file mode 100644
index c503455..0000000
--- a/core/res/res/layout/keyguard_screen_rotary_unlock_land.xml
+++ /dev/null
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-**
-** Copyright 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 general lock screen which shows information about the
- state of the device, as well as instructions on how to get past it
- depending on the state of the device.-->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:rotaryunlock="http://schemas.android.com/apk/res/com.android.rotaryunlock"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:id="@+id/root"
- >
-<LinearLayout
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:background="#70000000"
- >
-
- <!-- left side -->
- <RelativeLayout
- android:orientation="vertical"
- android:layout_width="0dip"
- android:layout_height="fill_parent"
- android:layout_weight="1.0"
- android:gravity="center_horizontal"
- >
-
- <TextView
- android:id="@+id/carrier"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="20dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- />
-
- <TextView
- android:id="@+id/time"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/carrier"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="25dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="55sp"
- />
-
- <TextView
- android:id="@+id/date"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/time"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="-12dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- />
-
- <View
- android:id="@+id/divider"
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:layout_marginTop="10dip"
- android:layout_below="@id/date"
- android:background="@android:drawable/divider_horizontal_dark"
- />
-
- <TextView
- android:id="@+id/status1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/divider"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="6dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:drawablePadding="4dip"
- />
-
- <TextView
- android:id="@+id/status2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/status1"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="6dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:drawablePadding="4dip"
- />
-
- <TextView
- android:id="@+id/screenLocked"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/status2"
- android:layout_centerHorizontal="true"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textColor="?android:attr/textColorSecondary"
- android:gravity="center"
- android:layout_marginTop="12dip"
- />
- <!-- emergency call button shown when sim is missing or PUKd -->
- <Button
- android:id="@+id/emergencyCallButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/screenLocked"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="24dip"
- android:drawableLeft="@drawable/ic_emergency"
- android:drawablePadding="8dip"
- />
- </RelativeLayout>
-
-
- <!-- right side -->
- <com.android.internal.widget.RotarySelector
- android:id="@+id/rotary"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- />
-
-
-</LinearLayout>
-</FrameLayout>
\ No newline at end of file
diff --git a/core/res/res/layout/keyguard_screen_sim_pin_landscape.xml b/core/res/res/layout/keyguard_screen_sim_pin_landscape.xml
index 4c583d8..2fa7aaa 100644
--- a/core/res/res/layout/keyguard_screen_sim_pin_landscape.xml
+++ b/core/res/res/layout/keyguard_screen_sim_pin_landscape.xml
@@ -18,8 +18,8 @@
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:background="@android:color/background_dark"
>
@@ -27,7 +27,7 @@
<LinearLayout android:id="@+id/pinDisplayGroup"
android:orientation="horizontal"
android:layout_centerInParent="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:addStatesFromChildren="true"
android:gravity="center_vertical"
@@ -41,7 +41,7 @@
<EditText android:id="@+id/pinDisplay"
android:layout_width="0dip"
android:layout_weight="1"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:maxLines="1"
android:background="@null"
android:textSize="32sp"
@@ -51,7 +51,7 @@
<ImageButton android:id="@+id/backspace"
android:src="@android:drawable/ic_input_delete"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_marginTop="2dip"
android:layout_marginRight="2dip"
android:layout_marginBottom="2dip"
@@ -73,7 +73,7 @@
<LinearLayout
android:orientation="horizontal"
android:layout_alignParentBottom="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dip"
android:layout_marginLeft="8dip"
diff --git a/core/res/res/layout/keyguard_screen_sim_pin_portrait.xml b/core/res/res/layout/keyguard_screen_sim_pin_portrait.xml
index 2a23ada..1f7f8f7 100644
--- a/core/res/res/layout/keyguard_screen_sim_pin_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_sim_pin_portrait.xml
@@ -17,20 +17,20 @@
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:color/background_dark"
android:gravity="center_horizontal">
<LinearLayout android:id="@+id/topDisplayGroup"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- header text ('Enter Pin Code') -->
<TextView android:id="@+id/headerText"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:lines="2"
@@ -38,7 +38,7 @@
<!-- password entry -->
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginRight="6dip"
@@ -68,175 +68,19 @@
</LinearLayout>
- <!-- Keypad section -->
- <LinearLayout android:id="@+id/keyPad"
+ <include
+ android:id="@+id/keyPad"
+ layout="@android:layout/twelve_key_entry"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/topDisplayGroup"
android:layout_marginTop="10dip"
- android:orientation="vertical">
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="64dip"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:orientation="horizontal">
-
- <Button android:id="@+id/one"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
- />
-
- <Button android:id="@+id/two"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
- />
-
- <Button android:id="@+id/three"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
- />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="64dip"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:orientation="horizontal">
-
- <Button android:id="@+id/four"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
- />
-
- <Button android:id="@+id/five"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
- />
-
- <Button android:id="@+id/six"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
- />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="64dip"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:orientation="horizontal">
-
- <Button android:id="@+id/seven"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
- />
-
- <Button android:id="@+id/eight"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
- />
-
- <Button android:id="@+id/nine"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
- />
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="64dip"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:orientation="horizontal">
-
- <Button android:id="@+id/ok"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold"
- android:text="@android:string/ok"
- />
-
- <Button android:id="@+id/zero"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textStyle="bold"
- />
-
- <Button android:id="@+id/cancel"
- android:layout_width="0sp"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:layout_marginLeft="2dip"
- android:layout_marginRight="2dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold"
- android:text="@android:string/cancel"
- />
- </LinearLayout>
-
- <!-- end keypad -->
- </LinearLayout>
+ />
<!-- spacer below keypad -->
<View
android:id="@+id/spacerBottom"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginTop="6dip"
android:layout_above="@id/emergencyCall"
@@ -245,7 +89,7 @@
<!-- The emergency button should take the rest of the space and be centered vertically -->
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center"
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock.xml b/core/res/res/layout/keyguard_screen_tab_unlock.xml
index 7e365fc..f9566d8 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock.xml
@@ -23,8 +23,8 @@
and portrait.-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tabunlock="http://schemas.android.com/apk/res/com.android.tabunlock"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:background="#70000000"
android:gravity="center_horizontal"
android:id="@+id/root">
@@ -81,7 +81,7 @@
<TextView android:id="@+id/am_pm"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:gravity="bottom"
android:singleLine="true"
android:ellipsize="none"
@@ -141,7 +141,7 @@
<com.android.internal.widget.SlidingTab
android:id="@+id/tab_selector"
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="80dip"
diff --git a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
index 33afe93..9965554 100644
--- a/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout/keyguard_screen_tab_unlock_land.xml
@@ -22,8 +22,8 @@
depending on the state of the device.-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tabunlock="http://schemas.android.com/apk/res/com.android.tabunlock"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="horizontal"
android:background="#70000000"
android:id="@+id/root">
@@ -31,7 +31,7 @@
<!-- left side -->
<RelativeLayout
android:layout_width="0dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1.0"
android:layout_marginLeft="24dip"
android:gravity="left">
@@ -82,7 +82,7 @@
<TextView android:id="@+id/am_pm"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:gravity="bottom"
android:singleLine="true"
android:ellipsize="none"
@@ -144,7 +144,7 @@
android:id="@+id/tab_selector"
android:orientation="vertical"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_marginRight="80dip"
/>
diff --git a/core/res/res/layout/keyguard_screen_unlock_landscape.xml b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
index f8f326a..58f36ed 100644
--- a/core/res/res/layout/keyguard_screen_unlock_landscape.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
@@ -24,8 +24,8 @@
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:background="#70000000"
>
@@ -33,7 +33,7 @@
<LinearLayout
android:orientation="vertical"
android:layout_width="0dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1.0"
android:layout_marginLeft="24dip"
android:gravity="left"
@@ -81,7 +81,7 @@
<TextView android:id="@+id/am_pm"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:gravity="bottom"
android:singleLine="true"
android:ellipsize="none"
@@ -136,20 +136,20 @@
<!-- fill space between header and button below -->
<View
android:layout_weight="1.0"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
/>
<!-- footer -->
<FrameLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dip"
>
<!-- option 1: a single emergency call button -->
<RelativeLayout android:id="@+id/footerNormal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
>
@@ -166,18 +166,18 @@
<!-- option 2: an emergency call button, and a 'forgot pattern?' button -->
<LinearLayout android:id="@+id/footerForgotPattern"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
>
<Button android:id="@+id/forgotPattern"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/Widget.Button.Transparent"
android:visibility="invisible"
/>
<Button android:id="@+id/emergencyCallTogether"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/lockscreen_emergency_call"
style="@style/Widget.Button.Transparent"
diff --git a/core/res/res/layout/keyguard_screen_unlock_portrait.xml b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
index d7c4aae..ac6cf19 100644
--- a/core/res/res/layout/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
@@ -23,14 +23,14 @@
<com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:gravity="center_horizontal"
android:background="#70000000"
>
<RelativeLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<TextView
@@ -70,7 +70,7 @@
<TextView android:id="@+id/am_pm"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:gravity="bottom"
android:singleLine="true"
android:ellipsize="none"
@@ -98,7 +98,7 @@
<View
android:id="@+id/divider"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:layout_marginTop="8dip"
android:layout_marginBottom="8dip"
@@ -109,7 +109,7 @@
status. -->
<LinearLayout
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="0dip"
android:layout_marginLeft="12dip"
@@ -145,7 +145,7 @@
<com.android.internal.widget.LockPatternView
android:id="@+id/lockPattern"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:layout_marginTop="2dip"
@@ -153,14 +153,14 @@
<!-- footer -->
<FrameLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<!-- option 1: a single emergency call button -->
<RelativeLayout android:id="@+id/footerNormal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
>
<Button android:id="@+id/emergencyCallAlone"
android:layout_width="wrap_content"
@@ -177,13 +177,13 @@
<!-- option 2: an emergency call button, and a 'forgot pattern?' button -->
<LinearLayout android:id="@+id/footerForgotPattern"
android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:gravity="center"
>
<Button android:id="@+id/emergencyCallTogether"
android:layout_width="0dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1.0"
android:layout_marginTop="4dip"
android:layout_marginBottom="4dip"
@@ -196,7 +196,7 @@
/>
<Button android:id="@+id/forgotPattern"
android:layout_width="0dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1.0"
android:layout_marginTop="4dip"
android:layout_marginBottom="4dip"
diff --git a/core/res/res/layout/list_content.xml b/core/res/res/layout/list_content.xml
index a7f3e2d..6f9f1e0 100644
--- a/core/res/res/layout/list_content.xml
+++ b/core/res/res/layout/list_content.xml
@@ -18,7 +18,7 @@
*/
-->
<ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:drawSelectorOnTop="false"
/>
diff --git a/core/res/res/layout/list_gestures_overlay.xml b/core/res/res/layout/list_gestures_overlay.xml
index 54d72c8..5ebf092 100644
--- a/core/res/res/layout/list_gestures_overlay.xml
+++ b/core/res/res/layout/list_gestures_overlay.xml
@@ -15,5 +15,5 @@
-->
<android.gesture.GestureOverlayView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
diff --git a/core/res/res/layout/list_menu_item_layout.xml b/core/res/res/layout/list_menu_item_layout.xml
index df4958f..39c88722 100644
--- a/core/res/res/layout/list_menu_item_layout.xml
+++ b/core/res/res/layout/list_menu_item_layout.xml
@@ -15,7 +15,7 @@
-->
<com.android.internal.view.menu.ListMenuItemView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight">
<!-- Icon will be inserted here. -->
@@ -32,7 +32,7 @@
<TextView
android:id="@+id/title"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
diff --git a/core/res/res/layout/media_controller.xml b/core/res/res/layout/media_controller.xml
index 32db60a..f4a701e 100644
--- a/core/res/res/layout/media_controller.xml
+++ b/core/res/res/layout/media_controller.xml
@@ -15,17 +15,17 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#CC666666"
android:orientation="vertical">
- <ImageView android:layout_width="fill_parent"
+ <ImageView android:layout_width="match_parent"
android:layout_height="1px"
android:background="@android:drawable/divider_horizontal_dark" />
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="4dip"
@@ -40,7 +40,7 @@
</LinearLayout>
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
diff --git a/core/res/res/layout/number_picker.xml b/core/res/res/layout/number_picker.xml
index 6380d25..44dca33 100644
--- a/core/res/res/layout/number_picker.xml
+++ b/core/res/res/layout/number_picker.xml
@@ -20,12 +20,12 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.common.widget.NumberPickerButton android:id="@+id/increment"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/timepicker_up_btn" />
<EditText android:id="@+id/timepicker_input"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:singleLine="true"
@@ -35,7 +35,7 @@
android:background="@drawable/timepicker_input" />
<com.android.common.widget.NumberPickerButton android:id="@+id/decrement"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/timepicker_down_btn" />
diff --git a/core/res/res/layout/permissions_account_and_authtokentype.xml b/core/res/res/layout/permissions_account_and_authtokentype.xml
index 4494a2c5..833572603 100644
--- a/core/res/res/layout/permissions_account_and_authtokentype.xml
+++ b/core/res/res/layout/permissions_account_and_authtokentype.xml
@@ -21,7 +21,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
diff --git a/core/res/res/layout/permissions_package_list_item.xml b/core/res/res/layout/permissions_package_list_item.xml
index 1bffe51..3c9570e 100644
--- a/core/res/res/layout/permissions_package_list_item.xml
+++ b/core/res/res/layout/permissions_package_list_item.xml
@@ -21,7 +21,7 @@
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
diff --git a/core/res/res/layout/power_dialog.xml b/core/res/res/layout/power_dialog.xml
index 7c59ab4..60298d2 100644
--- a/core/res/res/layout/power_dialog.xml
+++ b/core/res/res/layout/power_dialog.xml
@@ -18,30 +18,30 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<Button android:id="@+id/keyguard"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
<Button android:id="@+id/off"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/power_off" />
<Button android:id="@+id/silent"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<Button android:id="@+id/radio_power"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
diff --git a/core/res/res/layout/preference.xml b/core/res/res/layout/preference.xml
index 00745b4..e1fa230 100644
--- a/core/res/res/layout/preference.xml
+++ b/core/res/res/layout/preference.xml
@@ -18,7 +18,7 @@
Preference is able to place a specific widget for its particular
type in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
@@ -54,7 +54,7 @@
<!-- Preference should place its actual preference widget here. -->
<LinearLayout android:id="@+android:id/widget_frame"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical" />
diff --git a/core/res/res/layout/preference_child.xml b/core/res/res/layout/preference_child.xml
index 5f8ddd4..8975ed6 100644
--- a/core/res/res/layout/preference_child.xml
+++ b/core/res/res/layout/preference_child.xml
@@ -16,7 +16,7 @@
<!-- Layout for a visually child-like Preference in a PreferenceActivity. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
@@ -53,7 +53,7 @@
<!-- Preference should place its actual preference widget here. -->
<LinearLayout android:id="@+android:id/widget_frame"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical" />
diff --git a/core/res/res/layout/preference_dialog_edittext.xml b/core/res/res/layout/preference_dialog_edittext.xml
index 7d1faac..5cc1ea2 100644
--- a/core/res/res/layout/preference_dialog_edittext.xml
+++ b/core/res/res/layout/preference_dialog_edittext.xml
@@ -24,7 +24,7 @@
<TextView android:id="@+android:id/message"
style="?android:attr/textAppearanceSmall"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary" />
diff --git a/core/res/res/layout/preference_information.xml b/core/res/res/layout/preference_information.xml
index 8f05a8e..a5cf31a 100644
--- a/core/res/res/layout/preference_information.xml
+++ b/core/res/res/layout/preference_information.xml
@@ -18,7 +18,7 @@
Preference is able to place a specific widget for its particular
type in the "widget_frame" layout. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
@@ -54,7 +54,7 @@
<!-- Preference should place its actual preference widget here. -->
<LinearLayout android:id="@+android:id/widget_frame"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical" />
diff --git a/core/res/res/layout/preference_list_content.xml b/core/res/res/layout/preference_list_content.xml
index 31113e1..8f86981 100644
--- a/core/res/res/layout/preference_list_content.xml
+++ b/core/res/res/layout/preference_list_content.xml
@@ -18,8 +18,8 @@
*/
-->
<ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:drawSelectorOnTop="false"
android:scrollbarAlwaysDrawVerticalTrack="true"
/>
diff --git a/core/res/res/layout/progress_dialog.xml b/core/res/res/layout/progress_dialog.xml
index 8f66451..298173a 100644
--- a/core/res/res/layout/progress_dialog.xml
+++ b/core/res/res/layout/progress_dialog.xml
@@ -19,13 +19,13 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout android:id="@+id/body"
android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:baselineAligned="false"
android:paddingLeft="8dip"
android:paddingTop="10dip"
@@ -40,7 +40,7 @@
android:layout_marginRight="12dip" />
<TextView android:id="@+id/message"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical" />
</LinearLayout>
diff --git a/core/res/res/layout/recent_apps_dialog.xml b/core/res/res/layout/recent_apps_dialog.xml
index c4ee95d..4e416e1 100644
--- a/core/res/res/layout/recent_apps_dialog.xml
+++ b/core/res/res/layout/recent_apps_dialog.xml
@@ -19,7 +19,7 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="3dip"
android:orientation="vertical">
diff --git a/core/res/res/layout/resolve_list_item.xml b/core/res/res/layout/resolve_list_item.xml
index 4c5c456..6ed43de 100644
--- a/core/res/res/layout/resolve_list_item.xml
+++ b/core/res/res/layout/resolve_list_item.xml
@@ -22,7 +22,7 @@
android:orientation="horizontal"
android:minHeight="?android:attr/listPreferredItemHeight"
android:layout_height="wrap_content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:paddingLeft="10dip"
android:paddingRight="15dip">
diff --git a/core/res/res/layout/screen.xml b/core/res/res/layout/screen.xml
index ded97e2..dfa9731 100644
--- a/core/res/res/layout/screen.xml
+++ b/core/res/res/layout/screen.xml
@@ -22,13 +22,13 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:fitsSystemWindows="true"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
>
<!-- Title bar -->
<RelativeLayout android:id="@android:id/title_container"
style="?android:attr/windowTitleBackgroundStyle"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/windowTitleSize"
>
<ImageView android:id="@android:id/left_icon"
@@ -66,7 +66,7 @@
</LinearLayout>
<ProgressBar android:id="@+id/progress_horizontal"
style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="2dip"
android:layout_toLeftOf="@android:id/right_container"
@@ -77,8 +77,8 @@
/>
<TextView android:id="@android:id/title"
style="?android:attr/windowTitleStyle"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:background="@null"
android:fadingEdge="horizontal"
android:scrollHorizontally="true"
@@ -90,7 +90,7 @@
<!-- Content -->
<FrameLayout android:id="@android:id/content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:foregroundGravity="fill_horizontal|top"
diff --git a/core/res/res/layout/screen_custom_title.xml b/core/res/res/layout/screen_custom_title.xml
index 12ed1d0..34c9de0 100644
--- a/core/res/res/layout/screen_custom_title.xml
+++ b/core/res/res/layout/screen_custom_title.xml
@@ -22,12 +22,12 @@
android:orientation="vertical"
android:fitsSystemWindows="true">
<FrameLayout android:id="@android:id/title_container"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/windowTitleSize"
style="?android:attr/windowTitleBackgroundStyle">
</FrameLayout>
<FrameLayout android:id="@android:id/content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:foregroundGravity="fill_horizontal|top"
diff --git a/core/res/res/layout/screen_progress.xml b/core/res/res/layout/screen_progress.xml
index 477cadb..6e694c1 100644
--- a/core/res/res/layout/screen_progress.xml
+++ b/core/res/res/layout/screen_progress.xml
@@ -23,12 +23,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:fitsSystemWindows="true"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
>
<RelativeLayout android:id="@android:id/title_container"
style="?android:attr/windowTitleBackgroundStyle"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/windowTitleSize"
>
<ProgressBar android:id="@+android:id/progress_circular"
@@ -43,7 +43,7 @@
/>
<ProgressBar android:id="@+android:id/progress_horizontal"
style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="2dip"
android:layout_alignParentLeft="true"
@@ -54,8 +54,8 @@
/>
<TextView android:id="@android:id/title"
style="?android:attr/windowTitleStyle"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@android:id/progress_circular"
android:background="@null"
@@ -65,7 +65,7 @@
/>
</RelativeLayout>
<FrameLayout android:id="@android:id/content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:foregroundGravity="fill_horizontal|top"
diff --git a/core/res/res/layout/screen_title.xml b/core/res/res/layout/screen_title.xml
index 5fcd2dd..39ea131 100644
--- a/core/res/res/layout/screen_title.xml
+++ b/core/res/res/layout/screen_title.xml
@@ -23,7 +23,7 @@
android:orientation="vertical"
android:fitsSystemWindows="true">
<FrameLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/windowTitleSize"
style="?android:attr/windowTitleBackgroundStyle">
<TextView android:id="@android:id/title"
@@ -31,11 +31,11 @@
android:background="@null"
android:fadingEdge="horizontal"
android:gravity="center_vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
</FrameLayout>
<FrameLayout android:id="@android:id/content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:foregroundGravity="fill_horizontal|top"
diff --git a/core/res/res/layout/screen_title_icons.xml b/core/res/res/layout/screen_title_icons.xml
index 5415909..62a0228 100644
--- a/core/res/res/layout/screen_title_icons.xml
+++ b/core/res/res/layout/screen_title_icons.xml
@@ -21,11 +21,11 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:fitsSystemWindows="true"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<RelativeLayout android:id="@android:id/title_container"
style="?android:attr/windowTitleBackgroundStyle"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/windowTitleSize">
<!-- The title background has 9px left padding. -->
<ImageView android:id="@android:id/left_icon"
@@ -51,7 +51,7 @@
the left of the title text left edge. -->
<ProgressBar android:id="@+id/progress_horizontal"
style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="-3dip"
android:layout_toLeftOf="@android:id/progress_circular"
@@ -60,8 +60,8 @@
android:visibility="gone"
android:max="10000" />
<LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="horizontal"
android:layout_toLeftOf="@id/progress_circular"
android:layout_toRightOf="@android:id/left_icon"
@@ -69,7 +69,7 @@
<TextView android:id="@android:id/title"
style="?android:attr/windowTitleStyle"
android:layout_width="0dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:fadingEdge="horizontal"
@@ -89,7 +89,7 @@
</LinearLayout>
</RelativeLayout>
<FrameLayout android:id="@android:id/content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:foregroundGravity="fill_horizontal|top"
diff --git a/core/res/res/layout/search_bar.xml b/core/res/res/layout/search_bar.xml
index 964af9b..12285fd 100644
--- a/core/res/res/layout/search_bar.xml
+++ b/core/res/res/layout/search_bar.xml
@@ -21,7 +21,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
class="android.app.SearchDialog$SearchBar"
android:id="@+id/search_bar"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:focusable="true"
@@ -30,7 +30,7 @@
<!-- Outer layout defines the entire search bar at the top of the screen -->
<LinearLayout
android:id="@+id/search_plate"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="12dip"
@@ -52,17 +52,14 @@
<!-- Inner layout contains the app icon, button(s) and EditText -->
<LinearLayout
android:id="@+id/search_edit_frame"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
-
- <ImageView
- android:id="@+id/search_app_icon"
- android:layout_height="36dip"
- android:layout_width="36dip"
+
+ <include android:id="@+id/search_source_selector"
+ layout="@layout/search_source_selector"
android:layout_marginRight="7dip"
- android:layout_gravity="center_vertical"
- />
+ android:layout_gravity="center_vertical" />
<view class="android.app.SearchDialog$SearchAutoComplete"
android:id="@+id/search_src_text"
@@ -76,8 +73,8 @@
android:singleLine="true"
android:ellipsize="end"
android:inputType="text|textAutoComplete"
- android:dropDownWidth="fill_parent"
- android:dropDownHeight="fill_parent"
+ android:dropDownWidth="match_parent"
+ android:dropDownHeight="match_parent"
android:dropDownAnchor="@id/search_plate"
android:dropDownVerticalOffset="-9dip"
android:popupBackground="@android:drawable/search_dropdown_background"
@@ -88,13 +85,13 @@
android:id="@+id/search_go_btn"
android:background="@drawable/btn_search_dialog"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
/>
<ImageButton
android:id="@+id/search_voice_btn"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_marginLeft="8dip"
android:background="@drawable/btn_search_dialog_voice"
android:src="@android:drawable/ic_btn_speak_now"
diff --git a/core/res/res/layout/search_dropdown_item_1line.xml b/core/res/res/layout/search_dropdown_item_1line.xml
index bf3dd48..eed8b7d 100644
--- a/core/res/res/layout/search_dropdown_item_1line.xml
+++ b/core/res/res/layout/search_dropdown_item_1line.xml
@@ -22,5 +22,5 @@
style="?android:attr/dropDownItemStyle"
android:textAppearance="?android:attr/textAppearanceSearchResultTitle"
android:singleLine="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/searchResultListItemHeight" />
\ No newline at end of file
diff --git a/core/res/res/layout/search_dropdown_item_icons_2line.xml b/core/res/res/layout/search_dropdown_item_icons_2line.xml
index 2710b3b..d71b4f7 100644
--- a/core/res/res/layout/search_dropdown_item_icons_2line.xml
+++ b/core/res/res/layout/search_dropdown_item_icons_2line.xml
@@ -21,7 +21,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingLeft="4dip"
android:paddingRight="2dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/searchResultListItemHeight" >
<!-- Icons come first in the layout, since their placement doesn't depend on
@@ -50,7 +50,7 @@
style="?android:attr/dropDownItemStyle"
android:textAppearance="?android:attr/textAppearanceSearchResultSubtitle"
android:singleLine="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="29dip"
android:paddingBottom="4dip"
android:gravity="top"
@@ -66,7 +66,7 @@
style="?android:attr/dropDownItemStyle"
android:textAppearance="?android:attr/textAppearanceSearchResultTitle"
android:singleLine="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="@android:id/icon1"
diff --git a/core/res/res/layout/search_source_selector.xml b/core/res/res/layout/search_source_selector.xml
new file mode 100644
index 0000000..c69dfc0
--- /dev/null
+++ b/core/res/res/layout/search_source_selector.xml
@@ -0,0 +1,35 @@
+<?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.
+-->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="48dip"
+ android:layout_height="match_parent"
+ android:foreground="@drawable/search_source_selector_indicator"
+ android:foregroundGravity="bottom|right"
+ >
+
+ <ImageButton
+ android:id="@+id/search_source_selector_icon"
+ android:background="@drawable/search_source_selector_background"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerInside"
+ android:focusable="true"
+ android:clickable="true"
+ />
+
+</FrameLayout>
diff --git a/core/res/res/layout/seekbar_dialog.xml b/core/res/res/layout/seekbar_dialog.xml
index f61f435..84352a5 100644
--- a/core/res/res/layout/seekbar_dialog.xml
+++ b/core/res/res/layout/seekbar_dialog.xml
@@ -15,8 +15,8 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_horizontal">
@@ -26,7 +26,7 @@
android:paddingTop="20dip" />
<SeekBar android:id="@+id/seekbar"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dip" />
diff --git a/core/res/res/layout/select_dialog.xml b/core/res/res/layout/select_dialog.xml
index 249b527..c665f7a 100644
--- a/core/res/res/layout/select_dialog.xml
+++ b/core/res/res/layout/select_dialog.xml
@@ -26,8 +26,8 @@
<view class="com.android.internal.app.AlertController$RecycleListView"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+android:id/select_dialog_listview"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:layout_marginTop="5px"
android:cacheColorHint="@null"
android:divider="@android:drawable/divider_horizontal_bright"
diff --git a/core/res/res/layout/select_dialog_item.xml b/core/res/res/layout/select_dialog_item.xml
index 60a74a4..30fe02e 100644
--- a/core/res/res/layout/select_dialog_item.xml
+++ b/core/res/res/layout/select_dialog_item.xml
@@ -25,7 +25,7 @@
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
diff --git a/core/res/res/layout/select_dialog_multichoice.xml b/core/res/res/layout/select_dialog_multichoice.xml
index 55fc39b..5785d3b 100644
--- a/core/res/res/layout/select_dialog_multichoice.xml
+++ b/core/res/res/layout/select_dialog_multichoice.xml
@@ -16,7 +16,7 @@
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
diff --git a/core/res/res/layout/select_dialog_singlechoice.xml b/core/res/res/layout/select_dialog_singlechoice.xml
index 220af64..3560fee 100644
--- a/core/res/res/layout/select_dialog_singlechoice.xml
+++ b/core/res/res/layout/select_dialog_singlechoice.xml
@@ -16,7 +16,7 @@
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
diff --git a/core/res/res/layout/simple_dropdown_hint.xml b/core/res/res/layout/simple_dropdown_hint.xml
index 44be46d..df9d720 100644
--- a/core/res/res/layout/simple_dropdown_hint.xml
+++ b/core/res/res/layout/simple_dropdown_hint.xml
@@ -25,5 +25,5 @@
android:layout_marginTop="3dip"
android:layout_marginRight="3dip"
android:layout_marginBottom="3dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
diff --git a/core/res/res/layout/simple_dropdown_item_1line.xml b/core/res/res/layout/simple_dropdown_item_1line.xml
index 5745d15..18e7b88 100644
--- a/core/res/res/layout/simple_dropdown_item_1line.xml
+++ b/core/res/res/layout/simple_dropdown_item_1line.xml
@@ -22,6 +22,6 @@
style="?android:attr/dropDownItemStyle"
android:textAppearance="?android:attr/textAppearanceLargeInverse"
android:singleLine="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:ellipsize="marquee" />
diff --git a/core/res/res/layout/simple_dropdown_item_2line.xml b/core/res/res/layout/simple_dropdown_item_2line.xml
index a04c849..903adb0 100644
--- a/core/res/res/layout/simple_dropdown_item_2line.xml
+++ b/core/res/res/layout/simple_dropdown_item_2line.xml
@@ -19,7 +19,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
android:gravity="center_vertical"
@@ -39,7 +39,7 @@
style="?android:attr/dropDownItemStyle"
android:textAppearance="?android:attr/textAppearanceLargeInverse"
android:singleLine="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
@@ -48,7 +48,7 @@
android:textAppearance="?android:attr/textAppearanceSmallInverse"
android:textColor="#323232"
android:singleLine="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@android:id/text1"
android:layout_alignLeft="@android:id/text1" />
diff --git a/core/res/res/layout/simple_expandable_list_item_1.xml b/core/res/res/layout/simple_expandable_list_item_1.xml
index 052b353..dc3e58e 100644
--- a/core/res/res/layout/simple_expandable_list_item_1.xml
+++ b/core/res/res/layout/simple_expandable_list_item_1.xml
@@ -16,7 +16,7 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:paddingLeft="?android:attr/expandableListPreferredItemPaddingLeft"
android:textAppearance="?android:attr/textAppearanceLarge"
diff --git a/core/res/res/layout/simple_expandable_list_item_2.xml b/core/res/res/layout/simple_expandable_list_item_2.xml
index 741f1db..b48b444 100644
--- a/core/res/res/layout/simple_expandable_list_item_2.xml
+++ b/core/res/res/layout/simple_expandable_list_item_2.xml
@@ -15,7 +15,7 @@
-->
<TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:paddingTop="2dip"
android:paddingBottom="2dip"
@@ -24,14 +24,14 @@
>
<TextView android:id="@android:id/text1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dip"
android:textAppearance="?android:attr/textAppearanceLarge"
/>
<TextView android:id="@android:id/text2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@android:id/text1"
android:layout_alignLeft="@android:id/text1"
diff --git a/core/res/res/layout/simple_list_item_1.xml b/core/res/res/layout/simple_list_item_1.xml
index fe617ac..c9c77a5 100644
--- a/core/res/res/layout/simple_list_item_1.xml
+++ b/core/res/res/layout/simple_list_item_1.xml
@@ -16,7 +16,7 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
diff --git a/core/res/res/layout/simple_list_item_2.xml b/core/res/res/layout/simple_list_item_2.xml
index b5e2385..5eab54e 100644
--- a/core/res/res/layout/simple_list_item_2.xml
+++ b/core/res/res/layout/simple_list_item_2.xml
@@ -17,14 +17,14 @@
<TwoLineListItem xmlns:android="http://schemas.android.com/apk/res/android"
android:paddingTop="2dip"
android:paddingBottom="2dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:mode="twoLine"
>
<TextView android:id="@android:id/text1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="6dip"
android:layout_marginTop="6dip"
@@ -32,7 +32,7 @@
/>
<TextView android:id="@android:id/text2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@android:id/text1"
android:layout_alignLeft="@android:id/text1"
diff --git a/core/res/res/layout/simple_list_item_checked.xml b/core/res/res/layout/simple_list_item_checked.xml
index 95612f6..5f99044 100644
--- a/core/res/res/layout/simple_list_item_checked.xml
+++ b/core/res/res/layout/simple_list_item_checked.xml
@@ -16,7 +16,7 @@
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
diff --git a/core/res/res/layout/simple_list_item_multiple_choice.xml b/core/res/res/layout/simple_list_item_multiple_choice.xml
index 102e5fc..05c66f3 100644
--- a/core/res/res/layout/simple_list_item_multiple_choice.xml
+++ b/core/res/res/layout/simple_list_item_multiple_choice.xml
@@ -16,7 +16,7 @@
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
diff --git a/core/res/res/layout/simple_list_item_single_choice.xml b/core/res/res/layout/simple_list_item_single_choice.xml
index 326de1d..27afd1d 100644
--- a/core/res/res/layout/simple_list_item_single_choice.xml
+++ b/core/res/res/layout/simple_list_item_single_choice.xml
@@ -16,7 +16,7 @@
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
diff --git a/core/res/res/layout/simple_spinner_dropdown_item.xml b/core/res/res/layout/simple_spinner_dropdown_item.xml
index 7006b09..5fd7a09 100644
--- a/core/res/res/layout/simple_spinner_dropdown_item.xml
+++ b/core/res/res/layout/simple_spinner_dropdown_item.xml
@@ -21,6 +21,6 @@
android:id="@android:id/text1"
style="?android:attr/spinnerDropDownItemStyle"
android:singleLine="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:ellipsize="marquee" />
diff --git a/core/res/res/layout/simple_spinner_item.xml b/core/res/res/layout/simple_spinner_item.xml
index 4dd739fd5..77929ee 100644
--- a/core/res/res/layout/simple_spinner_item.xml
+++ b/core/res/res/layout/simple_spinner_item.xml
@@ -21,6 +21,6 @@
android:id="@android:id/text1"
style="?android:attr/spinnerItemStyle"
android:singleLine="true"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee" />
diff --git a/core/res/res/layout/status_bar.xml b/core/res/res/layout/status_bar.xml
index 0bc0dac..e8d8866 100644
--- a/core/res/res/layout/status_bar.xml
+++ b/core/res/res/layout/status_bar.xml
@@ -27,14 +27,14 @@
>
<LinearLayout android:id="@+id/icons"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="horizontal">
<com.android.server.status.IconMerger android:id="@+id/notificationIcons"
android:layout_width="0dip"
android:layout_weight="1"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:paddingLeft="6dip"
android:gravity="center_vertical"
@@ -42,7 +42,7 @@
<LinearLayout android:id="@+id/statusIcons"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:paddingRight="6dip"
android:gravity="center_vertical"
@@ -50,14 +50,14 @@
</LinearLayout>
<LinearLayout android:id="@+id/ticker"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:paddingLeft="6dip"
android:animationCache="false"
android:orientation="horizontal" >
<ImageSwitcher android:id="@+id/tickerIcon"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_marginRight="8dip"
>
<com.android.server.status.AnimatedImageView
@@ -76,12 +76,12 @@
android:paddingTop="2dip"
android:paddingRight="10dip">
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="#ff000000" />
<TextView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="#ff000000" />
@@ -90,7 +90,7 @@
<com.android.server.status.DateView android:id="@+id/date"
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:singleLine="true"
android:textSize="16sp"
android:textStyle="bold"
diff --git a/core/res/res/layout/status_bar_expanded.xml b/core/res/res/layout/status_bar_expanded.xml
index fd9d26e..a0cd11d 100644
--- a/core/res/res/layout/status_bar_expanded.xml
+++ b/core/res/res/layout/status_bar_expanded.xml
@@ -25,7 +25,7 @@
android:descendantFocusability="afterDescendants">
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="3dp"
@@ -77,26 +77,26 @@
</LinearLayout>
<FrameLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<ScrollView
android:id="@+id/scroll"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:fadingEdge="none"
>
<com.android.server.status.NotificationLinearLayout
android:id="@+id/notificationLinearLayout"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
>
<TextView android:id="@+id/noNotificationsTitle"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/title_bar_portrait"
android:paddingLeft="5dp"
@@ -105,7 +105,7 @@
/>
<TextView android:id="@+id/ongoingTitle"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/title_bar_portrait"
android:paddingLeft="5dp"
@@ -113,13 +113,13 @@
android:text="@string/status_bar_ongoing_events_title"
/>
<LinearLayout android:id="@+id/ongoingItems"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
/>
<TextView android:id="@+id/latestTitle"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/title_bar_portrait"
android:paddingLeft="5dp"
@@ -127,7 +127,7 @@
android:text="@string/status_bar_latest_events_title"
/>
<LinearLayout android:id="@+id/latestItems"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
/>
@@ -135,7 +135,7 @@
</ScrollView>
<ImageView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/title_bar_shadow"
android:scaleType="fitXY"
diff --git a/core/res/res/layout/status_bar_icon.xml b/core/res/res/layout/status_bar_icon.xml
index 1516036..0536792 100644
--- a/core/res/res/layout/status_bar_icon.xml
+++ b/core/res/res/layout/status_bar_icon.xml
@@ -26,8 +26,8 @@
>
<com.android.server.status.AnimatedImageView android:id="@+id/image"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
/>
<TextView android:id="@+id/number"
diff --git a/core/res/res/layout/status_bar_latest_event.xml b/core/res/res/layout/status_bar_latest_event.xml
index d524bb6..59cc90d 100644
--- a/core/res/res/layout/status_bar_latest_event.xml
+++ b/core/res/res/layout/status_bar_latest_event.xml
@@ -1,11 +1,11 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="65sp"
android:orientation="vertical"
>
<com.android.server.status.LatestItemView android:id="@+id/content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="64sp"
android:background="@drawable/status_bar_item_background"
android:focusable="true"
@@ -15,7 +15,7 @@
</com.android.server.status.LatestItemView>
<View
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1sp"
android:background="@drawable/divider_horizontal_bright"
/>
diff --git a/core/res/res/layout/status_bar_latest_event_content.xml b/core/res/res/layout/status_bar_latest_event_content.xml
index eeb9d9d..2f7036f 100644
--- a/core/res/res/layout/status_bar_latest_event_content.xml
+++ b/core/res/res/layout/status_bar_latest_event_content.xml
@@ -1,13 +1,13 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="7dp"
android:paddingLeft="5dp"
>
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="3dp"
@@ -18,7 +18,7 @@
android:scaleType="fitCenter"
android:src="@drawable/arrow_down_float"/>
<TextView android:id="@+id/title"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true"
@@ -30,7 +30,7 @@
android:textColor="#ff000000" />
</LinearLayout>
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
diff --git a/core/res/res/layout/status_bar_tracking.xml b/core/res/res/layout/status_bar_tracking.xml
index aa3b733..c0a7a97 100644
--- a/core/res/res/layout/status_bar_tracking.xml
+++ b/core/res/res/layout/status_bar_tracking.xml
@@ -26,18 +26,18 @@
>
<com.android.server.status.TrackingPatternView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
/>
<com.android.server.status.CloseDragHandle android:id="@+id/close"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<ImageView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:scaleType="fitXY"
diff --git a/core/res/res/layout/tab_content.xml b/core/res/res/layout/tab_content.xml
index 8f67af0..0ee87ce 100644
--- a/core/res/res/layout/tab_content.xml
+++ b/core/res/res/layout/tab_content.xml
@@ -19,13 +19,13 @@
-->
<TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost"
- android:layout_width="fill_parent" android:layout_height="fill_parent">
+ android:layout_width="match_parent" android:layout_height="match_parent">
<LinearLayout android:orientation="vertical"
- android:layout_width="fill_parent" android:layout_height="fill_parent">
- <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent">
+ <TabWidget android:id="@android:id/tabs" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_weight="0" />
<FrameLayout android:id="@android:id/tabcontent"
- android:layout_width="fill_parent" android:layout_height="0dip"
+ android:layout_width="match_parent" android:layout_height="0dip"
android:layout_weight="1"/>
</LinearLayout>
</TabHost>
diff --git a/core/res/res/layout/test_list_item.xml b/core/res/res/layout/test_list_item.xml
index f4e0d3c..ede32e8 100644
--- a/core/res/res/layout/test_list_item.xml
+++ b/core/res/res/layout/test_list_item.xml
@@ -19,6 +19,6 @@
android:textAppearance="?android:attr/textAppearanceSmall"
android:paddingTop="2dip"
android:paddingBottom="3dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
diff --git a/core/res/res/layout/textview_hint.xml b/core/res/res/layout/textview_hint.xml
index d69a2f6..4978be5 100644
--- a/core/res/res/layout/textview_hint.xml
+++ b/core/res/res/layout/textview_hint.xml
@@ -15,8 +15,8 @@
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:background="@drawable/popup_inline_error"
android:textAppearance="?android:attr/textAppearanceSmallInverse"
/>
diff --git a/core/res/res/layout/transient_notification.xml b/core/res/res/layout/transient_notification.xml
index 1d3be14..12b67f1 100644
--- a/core/res/res/layout/transient_notification.xml
+++ b/core/res/res/layout/transient_notification.xml
@@ -19,8 +19,8 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/toast_frame">
diff --git a/core/res/res/layout/twelve_key_entry.xml b/core/res/res/layout/twelve_key_entry.xml
new file mode 100644
index 0000000..46301cd
--- /dev/null
+++ b/core/res/res/layout/twelve_key_entry.xml
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<!-- This is not a standalone element it can be included into apps that need 12-key input -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical">
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="64dip"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:orientation="horizontal">
+
+ <Button android:id="@+id/one"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold"
+ />
+
+ <Button android:id="@+id/two"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold"
+ />
+
+ <Button android:id="@+id/three"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold"
+ />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="64dip"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:orientation="horizontal">
+
+ <Button android:id="@+id/four"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold"
+ />
+
+ <Button android:id="@+id/five"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold"
+ />
+
+ <Button android:id="@+id/six"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold"
+ />
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="64dip"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:orientation="horizontal">
+
+ <Button android:id="@+id/seven"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold"
+ />
+
+ <Button android:id="@+id/eight"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold"
+ />
+
+ <Button android:id="@+id/nine"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold"
+ />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="64dip"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:orientation="horizontal">
+
+ <Button android:id="@+id/ok"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold"
+ android:text="@android:string/ok"
+ />
+
+ <Button android:id="@+id/zero"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textStyle="bold"
+ />
+
+ <Button android:id="@+id/cancel"
+ android:layout_width="0sp"
+ android:layout_height="fill_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold"
+ android:text="@android:string/cancel"
+ />
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/core/res/res/layout/two_line_list_item.xml b/core/res/res/layout/two_line_list_item.xml
index 2a2e759..24ba47a 100644
--- a/core/res/res/layout/two_line_list_item.xml
+++ b/core/res/res/layout/two_line_list_item.xml
@@ -18,19 +18,19 @@
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView android:id="@android:id/text1"
android:textSize="16sp"
android:textStyle="bold"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<TextView android:id="@android:id/text2"
android:textSize="16sp"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 67fac9f..016900d 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"K souboru nelze získat přístup."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Požadovaný soubor nebyl nalezen."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Je zpracováváno příliš mnoho požadavků. Opakujte akci později."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Chyba přihlášení k účtu <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Synchronizace"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synchronizace"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Příliš mnoho smazaných položek služby <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Sleduje vaši fyzickou polohu"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Síťová komunikace"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Umožňuje aplikacím získat přístup k různým funkcím sítě."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Vaše účty"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Přístup k dostupným účtům."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Řízení hardwaru"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Přímý přístup k hardwaru telefonu."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefonní hovory"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Umožňuje aplikaci povolit ladění jiné aplikace. Škodlivé aplikace mohou pomocí tohoto nastavení ukončit jiné aplikace."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"změna vašeho nastavení uživatelského rozhraní"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Umožňuje aplikaci změnit aktuální konfiguraci, např. národní prostředí či obecnou velikost písma."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"restartování ostatních aplikací"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Umožňuje aplikaci vynutit restartování jiných aplikací."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"vynucení zavření aplikace"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Umožňuje aplikaci vynutit zavření a přesunutí libovolné činnosti v popředí na pozadí. Běžné aplikace by toto nastavení neměly nikdy využívat."</string>
<string name="permlab_dump" msgid="1681799862438954752">"načtení interního stavu systému"</string>
@@ -319,7 +322,7 @@
<string name="permlab_callPrivileged" msgid="4198349211108497879">"přímé volání na libovolná telefonní čísla"</string>
<string name="permdesc_callPrivileged" msgid="244405067160028452">"Umožňuje aplikaci bez vašeho zásahu vytočit jakékoli telefonní číslo, včetně čísel tísňového volání. Škodlivé aplikace mohou provádět zbytečná a nezákonná volání na tísňové linky."</string>
<string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"přímo spustit nastavení telefonu CDMA"</string>
- <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Umožňuje aplikaci zahájit zřizování CDMA. Škodlivé aplikace mohou zřizování CDMA zahájit samovolně."</string>
+ <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Umožňuje aplikaci zahájit poskytování CDMA. Škodlivé aplikace mohou poskytování CDMA zahájit samovolně."</string>
<string name="permlab_locationUpdates" msgid="7785408253364335740">"ovládání oznámení o aktualizaci polohy"</string>
<string name="permdesc_locationUpdates" msgid="2300018303720930256">"Umožňuje povolit či zakázat aktualizace polohy prostřednictvím bezdrátového připojení. Aplikace toto nastavení obvykle nepoužívají."</string>
<string name="permlab_checkinProperties" msgid="7855259461268734914">"přístup k vlastnostem Checkin"</string>
@@ -356,7 +359,7 @@
<string name="permdesc_useCredentials" msgid="7416570544619546974">"Umožňuje aplikaci požadovat ověřovací tokeny."</string>
<string name="permlab_accessNetworkState" msgid="6865575199464405769">"zobrazení stavu sítě"</string>
<string name="permdesc_accessNetworkState" msgid="558721128707712766">"Umožňuje aplikaci zobrazit stav všech sítí."</string>
- <string name="permlab_createNetworkSockets" msgid="9121633680349549585">"plný přístup k Internetu"</string>
+ <string name="permlab_createNetworkSockets" msgid="9121633680349549585">"plný přístup k internetu"</string>
<string name="permdesc_createNetworkSockets" msgid="4593339106921772192">"Umožňuje aplikaci vytvořit síťové sokety."</string>
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"zápis nastavení názvu přístupového bodu (APN)"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Umožňuje aplikaci změnit nastavení APN, jako je například proxy či port APN."</string>
@@ -390,8 +393,12 @@
<string name="permdesc_readDictionary" msgid="1082972603576360690">"Umožní aplikaci číst soukromá slova, jména a fráze, která uživatel mohl uložit do svého slovníku."</string>
<string name="permlab_writeDictionary" msgid="6703109511836343341">"zápis do slovníku definovaného uživatelem"</string>
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Umožní aplikaci zapisovat nová slova do uživatelského slovníku."</string>
- <string name="permlab_sdcardWrite" msgid="8079403759001777291">"změna/smazání obsah karty SD"</string>
+ <string name="permlab_sdcardWrite" msgid="8079403759001777291">"změna/smazání obsahu karty SD"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Umožní aplikaci zápis na kartu SD."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Domů"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -405,7 +412,7 @@
<string-array name="emailAddressTypes">
<item msgid="8073994352956129127">"Domů"</item>
<item msgid="7084237356602625604">"Práce"</item>
- <item msgid="1112044410659011023">"Ostatní"</item>
+ <item msgid="1112044410659011023">"(další)"</item>
<item msgid="2374913952870110618">"Vlastní"</item>
</string-array>
<string-array name="postalAddressTypes">
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Vlastní"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Domů"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Práce"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Pracovní fax"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Domácí fax"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Jiné"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Zpětné volání"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Auto"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Firma (hlavní)"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Hlavní"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Jiný fax"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Radiotelefon"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Telefon pro sluchově postižené (TTY/TDD)"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Pracovní mobil"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pracovní pager"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Asistent"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Narozeniny"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Výročí"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Událost"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Vlastní"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Domů"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Práce"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Jiné"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Vlastní"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Domů"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Práce"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Jiné"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Vlastní"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Domů"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Práce"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Jiné"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Vlastní"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Práce"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Jiné"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Vlastní"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"pomocí <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> pomocí <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Zadejte kód PIN"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Nesprávný kód PIN"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Chcete-li telefon odemknout, stiskněte Menu a poté 0."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Zkuste to prosím znovu"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Nabíjení (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Nabito."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Připojte dobíjecí zařízení."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Není vložena SIM karta."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"V telefonu není žádná karta SIM."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Přihlásit se"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Neplatné uživatelské jméno nebo heslo."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Probíhá kontrola..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Odemknout"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Zapnout zvuk"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Vypnout zvuk"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Vymazat"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"Nabíjení..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Prosím připojte dobíjecí zařízení"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Baterie je vybitá:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"Zbývá <xliff:g id="NUMBER">%d%%</xliff:g> nebo méně."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Využití baterie"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Test továrního nastavení se nezdařil"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"Test FACTORY_TEST lze provést pouze u balíčků nainstalovaných ve složce /system/app."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Chcete opustit tuto stránku?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Vyberte OK, chcete-li pokračovat, nebo Zrušit, chcete-li na stránce zůstat."</string>
<string name="save_password_label" msgid="6860261758665825069">"Potvrdit"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Tip: Dvojitým klepnutím můžete zobrazení přiblížit nebo oddálit."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"čtení historie a záložek Prohlížeče"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Umožňuje aplikaci číst všechny navštívené adresy URL a záložky Prohlížeče."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"zápis do historie a záložek Prohlížeče"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Ukončit aplikaci"</string>
<string name="report" msgid="4060218260984795706">"Nahlásit"</string>
<string name="wait" msgid="7147118217226317732">"Počkat"</string>
- <string name="debug" msgid="9103374629678531849">"Ladit"</string>
<string name="sendText" msgid="5132506121645618310">"Vyberte činnost s textem"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Hlasitost vyzvánění"</string>
<string name="volume_music" msgid="5421651157138628171">"Hlasitost médií"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"Opravdu chcete kartu SD naformátovat? Všechna data na kartě budou ztracena."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Formátovat"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"Ladění přes rozhraní USB připojeno"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Vyberte, chcete-li zakázat ladění USB."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Výběr metody zadávání dat"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" AÁBCČDĎEÉĚFGHCHIÍJKLMNŇOÓPQRŘSŠTŤUÚVWXYÝZŽ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789AÁBCČDĎEÉĚFGHCHIÍJKLMNŇOÓPQRŘSŠTŤUÚVWXYÝZŽ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"kandidáti"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Vytvořit kontakt"\n"pro <xliff:g id="NUMBER">%s</xliff:g>."</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"Zaškrtnuto"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"Nezaškrtnuto"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Povolit"</string>
<string name="deny" msgid="2081879885755434506">"Odepřít"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Požadováno oprávnění"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Požadováno oprávnění"\n"pro účet <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Metoda zadávání dat"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Synchronizace"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Usnadnění"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Tapeta"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Změnit tapetu"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Protokol PPTP (Point-to-Point Tunneling Protocol)"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protokol L2TP (Layer 2 Tunneling Protocol)"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Síť VPN L2TP/IPSec s předsdíleným klíčem"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Síť VPN L2TP/IPSec s certifikátem"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 7b37709..61ee2e7 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -33,7 +33,7 @@
<string name="serviceEnabledFor" msgid="6856228140453471041">"Tjenesten blev aktiveret for:"</string>
<string name="serviceDisabled" msgid="1937553226592516411">"Tjenesten er deaktiveret."</string>
<string name="serviceRegistered" msgid="6275019082598102493">"Registreringen er afsluttet."</string>
- <string name="serviceErased" msgid="1288584695297200972">"Sletning afsluttet."</string>
+ <string name="serviceErased" msgid="1288584695297200972">"Sletningen er fuldført."</string>
<string name="passwordIncorrect" msgid="7612208839450128715">"Forkert adgangskode."</string>
<string name="mmiComplete" msgid="8232527495411698359">"MMI-nummer afsluttet."</string>
<string name="badPin" msgid="5085454289896032547">"Den gamle PIN-kode, du indtastede, er ikke korrekt."</string>
@@ -49,11 +49,11 @@
<string name="BaMmi" msgid="455193067926770581">"Opkaldsspærring"</string>
<string name="PwdMmi" msgid="7043715687905254199">"Ændring af adgangskode"</string>
<string name="PinMmi" msgid="3113117780361190304">"ændring af PIN-kode"</string>
- <string name="CnipMmi" msgid="3110534680557857162">"Opkaldsnummer til stede"</string>
- <string name="CnirMmi" msgid="3062102121430548731">"Opkaldsnummer begrænset"</string>
+ <string name="CnipMmi" msgid="3110534680557857162">"Opkaldsnummeret er til stede"</string>
+ <string name="CnirMmi" msgid="3062102121430548731">"Opkaldsnummeret er begrænset"</string>
<string name="ThreeWCMmi" msgid="9051047170321190368">"Trevejsopkald"</string>
<string name="RuacMmi" msgid="7827887459138308886">"Afvisning af uønskede, irriterende opkald"</string>
- <string name="CndMmi" msgid="3116446237081575808">"Opkaldsnummer levering"</string>
+ <string name="CndMmi" msgid="3116446237081575808">"Levering af opkaldsnummer"</string>
<string name="DndMmi" msgid="1265478932418334331">"Forstyr ikke"</string>
<string name="CLIRDefaultOnNextCallOn" msgid="429415409145781923">"Standarder for opkalds-id til begrænset. Næste opkald: Begrænset"</string>
<string name="CLIRDefaultOnNextCallOff" msgid="3092918006077864624">"Standarder for opkalds-id til begrænset. Næste opkald: Ikke begrænset"</string>
@@ -62,14 +62,14 @@
<string name="serviceNotProvisioned" msgid="8614830180508686666">"Tjenesten leveres ikke!"</string>
<string name="CLIRPermanent" msgid="5460892159398802465">"Indstillingen for opkalds-id kan ikke ændres."</string>
<string name="RestrictedChangedTitle" msgid="5592189398956187498">"Begrænset adgang ændret"</string>
- <string name="RestrictedOnData" msgid="8653794784690065540">"Datatjeneste er blokeret."</string>
- <string name="RestrictedOnEmergency" msgid="6581163779072833665">"Nødtjeneste er blokeret."</string>
- <string name="RestrictedOnNormal" msgid="2045364908281990708">"Stemme-/SMS-tjeneste er blokeret."</string>
- <string name="RestrictedOnAll" msgid="4923139582141626159">"Alle stemme-/SMS-tjenester er blokerede."</string>
+ <string name="RestrictedOnData" msgid="8653794784690065540">"Datatjenesten er blokeret."</string>
+ <string name="RestrictedOnEmergency" msgid="6581163779072833665">"Nødtjenesten er blokeret."</string>
+ <string name="RestrictedOnNormal" msgid="2045364908281990708">"Stemme-/sms-tjenesten er blokeret."</string>
+ <string name="RestrictedOnAll" msgid="4923139582141626159">"Alle stemme-/sms-tjenester er blokerede."</string>
<string name="serviceClassVoice" msgid="1258393812335258019">"Stemme"</string>
<string name="serviceClassData" msgid="872456782077937893">"Data"</string>
<string name="serviceClassFAX" msgid="5566624998840486475">"FAX"</string>
- <string name="serviceClassSMS" msgid="2015460373701527489">"SMS"</string>
+ <string name="serviceClassSMS" msgid="2015460373701527489">"sms"</string>
<string name="serviceClassDataAsync" msgid="4523454783498551468">"Asynkroniser"</string>
<string name="serviceClassDataSync" msgid="7530000519646054776">"Synkroniser"</string>
<string name="serviceClassPacket" msgid="6991006557993423453">"Pakke"</string>
@@ -77,8 +77,8 @@
<string name="roamingText0" msgid="7170335472198694945">"Roamingindikator til"</string>
<string name="roamingText1" msgid="5314861519752538922">"Roamingindikator fra"</string>
<string name="roamingText2" msgid="8969929049081268115">"Roamingindikator blinker"</string>
- <string name="roamingText3" msgid="5148255027043943317">"Ude af kvarteret"</string>
- <string name="roamingText4" msgid="8808456682550796530">"Ude af bygningen"</string>
+ <string name="roamingText3" msgid="5148255027043943317">"Ikke i kvarteret"</string>
+ <string name="roamingText4" msgid="8808456682550796530">"Ikke i bygningen"</string>
<string name="roamingText5" msgid="7604063252850354350">"Roaming – Foretrukket system"</string>
<string name="roamingText6" msgid="2059440825782871513">"Roaming – Tilgængeligt system"</string>
<string name="roamingText7" msgid="7112078724097233605">"Roaming – Alliance Partner"</string>
@@ -88,12 +88,12 @@
<string name="roamingText11" msgid="4154476854426920970">"Roamingbanner til"</string>
<string name="roamingText12" msgid="1189071119992726320">"Roamingbanner fra"</string>
<string name="roamingTextSearching" msgid="8360141885972279963">"Søger efter tjeneste"</string>
- <string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Ikke videresendt"</string>
+ <string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Ikke viderestillet"</string>
<string name="cfTemplateForwarded" msgid="1302922117498590521">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
<string name="cfTemplateForwardedTime" msgid="9206251736527085256">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: <xliff:g id="DIALING_NUMBER">{1}</xliff:g> efter <xliff:g id="TIME_DELAY">{2}</xliff:g> sekunder"</string>
- <string name="cfTemplateRegistered" msgid="5073237827620166285">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Ikke videresendt"</string>
- <string name="cfTemplateRegisteredTime" msgid="6781621964320635172">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Ikke videresendt"</string>
- <string name="fcComplete" msgid="3118848230966886575">"Funktionskode komplet."</string>
+ <string name="cfTemplateRegistered" msgid="5073237827620166285">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Ikke viderestillet"</string>
+ <string name="cfTemplateRegisteredTime" msgid="6781621964320635172">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>: Ikke viderestillet"</string>
+ <string name="fcComplete" msgid="3118848230966886575">"Funktionskoden er komplet."</string>
<string name="fcError" msgid="3327560126588500777">"Forbindelsesproblemer eller ugyldig funktionskode."</string>
<string name="httpErrorOk" msgid="1191919378083472204">"OK"</string>
<string name="httpError" msgid="2567300624552921790">"Websiden indeholder en fejl."</string>
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Der kunne ikke oprettes adgang til filen."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Den anmodede fil blev ikke fundet."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Der behandles for mange anmodninger. Prøv igen senere."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Loginfejl for <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Synkroniser"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synkroniser"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"For mange <xliff:g id="CONTENT_TYPE">%s</xliff:g> sletninger"</string>
@@ -125,33 +124,31 @@
<string name="screen_lock" msgid="799094655496098153">"Skærmlås"</string>
<string name="power_off" msgid="4266614107412865048">"Sluk"</string>
<string name="shutdown_progress" msgid="2281079257329981203">"Lukker ned ..."</string>
- <string name="shutdown_confirm" msgid="649792175242821353">"Din telefon lukkes ned."</string>
+ <string name="shutdown_confirm" msgid="649792175242821353">"lydstyrke for opkald"</string>
<string name="no_recent_tasks" msgid="279702952298056674">"Der er ingen nye programmer."</string>
- <string name="global_actions" msgid="2406416831541615258">"Telefonvalgmuligheder"</string>
+ <string name="global_actions" msgid="2406416831541615258">"Indstillinger for telefon"</string>
<string name="global_action_lock" msgid="2844945191792119712">"Skærmlås"</string>
<string name="global_action_power_off" msgid="4471879440839879722">"Sluk"</string>
<string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"Lydløs"</string>
- <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Lyden er FRA"</string>
+ <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Lyden er slået FRA"</string>
<string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Lyden er TIL"</string>
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Flytilstand"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Flytilstand er TIL"</string>
- <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Flytilstand er FRA"</string>
+ <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Flytilstand er slået FRA"</string>
<string name="safeMode" msgid="2788228061547930246">"Sikker tilstand"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Tjenester, der koster dig penge"</string>
- <string name="permgroupdesc_costMoney" msgid="8193824940620517189">"Tillader et program at gøre ting, som kan koste penge."</string>
+ <string name="permgroupdesc_costMoney" msgid="8193824940620517189">"Tillader, at et program kan gøre ting, som kan koste penge."</string>
<string name="permgrouplab_messages" msgid="7521249148445456662">"Dine beskeder"</string>
- <string name="permgroupdesc_messages" msgid="7045736972019211994">"Læs og skriv dine SMS-, e-mail- og andre beskeder."</string>
+ <string name="permgroupdesc_messages" msgid="7045736972019211994">"Læs og skriv dine sms-, e-mail- og andre beskeder."</string>
<string name="permgrouplab_personalInfo" msgid="3519163141070533474">"Dine personlige oplysninger"</string>
<string name="permgroupdesc_personalInfo" msgid="5488050357388806068">"Få direkte adgang til dine kontakter og din kalender, der er gemt på telefonen."</string>
<string name="permgrouplab_location" msgid="635149742436692049">"Din placering"</string>
<string name="permgroupdesc_location" msgid="2430258821648348660">"Overvåg din fysiske placering"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Netværkskommunikation"</string>
- <string name="permgroupdesc_network" msgid="5035763698958415998">"Tillader programmer at få adgang til forskellige netværksfunktioner."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgroupdesc_network" msgid="5035763698958415998">"Tillader, at programmerne får adgang til forskellige netværksfunktioner."</string>
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Dine konti"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Få adgang til de tilgængelige konti."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Hardwarekontroller"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Direkte adgang til hardware på håndsættet."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefonopkald"</string>
@@ -163,123 +160,129 @@
<string name="permgrouplab_storage" msgid="1971118770546336966">"Lagring"</string>
<string name="permgroupdesc_storage" msgid="9203302214915355774">"Få adgang til SD-kortet."</string>
<string name="permlab_statusBar" msgid="7417192629601890791">"deaktiver eller rediger statuslinje"</string>
- <string name="permdesc_statusBar" msgid="1365473595331989732">"Tillader et program at deaktivere statuslinjen eller tilføje eller fjerne systemikoner."</string>
+ <string name="permdesc_statusBar" msgid="1365473595331989732">"Tillader, at et program deaktiverer statuslinjen eller tilføjer eller fjerner systemikoner."</string>
<string name="permlab_expandStatusBar" msgid="1148198785937489264">"udvid/skjul statuslinje"</string>
- <string name="permdesc_expandStatusBar" msgid="7088604400110768665">"Tillader et program at udvide eller skjule statuslinjen."</string>
+ <string name="permdesc_expandStatusBar" msgid="7088604400110768665">"Tillader, at et program udvider eller skjuler statuslinjen."</string>
<string name="permlab_processOutgoingCalls" msgid="1136262550878335980">"opfang udgående opkald"</string>
- <string name="permdesc_processOutgoingCalls" msgid="2228988201852654461">"Tillader et program at behandle udgående opkald og ændre nummeret, der skal ringes til. Ondsindede programmer kan overvåge, omdirigere eller forhindre udgående opkald."</string>
- <string name="permlab_receiveSms" msgid="2697628268086208535">"modtag SMS"</string>
- <string name="permdesc_receiveSms" msgid="6298292335965966117">"Tillader et program at modtage og behandle SMS-beskeder. Ondsindede programmer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
- <string name="permlab_receiveMms" msgid="8894700916188083287">"modtag MMS"</string>
- <string name="permdesc_receiveMms" msgid="4563346832000174373">"Tillader et program at modtage og behandle MMS-beskeder. Ondsindede programmer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
- <string name="permlab_sendSms" msgid="5600830612147671529">"send SMS-beskeder"</string>
- <string name="permdesc_sendSms" msgid="1946540351763502120">"Tillader et program at sende SMS-beskeder. Ondsindede programmer kan eventuelt koste dig penge ved at sende beskeder uden din bekræftelse."</string>
- <string name="permlab_readSms" msgid="4085333708122372256">"læs SMS eller MMS"</string>
- <string name="permdesc_readSms" msgid="3002170087197294591">"Tillader et program at læse SMS-beskeder, der er gemt på din telefon eller dit SIM-kort. Ondsindede programmer kan eventuelt læse dine fortrolige beskeder."</string>
- <string name="permlab_writeSms" msgid="6881122575154940744">"rediger SMS eller MMS"</string>
- <string name="permdesc_writeSms" msgid="6299398896177548095">"Tillader et program at skrive til SMS-beskeder, der er gemt på din telefon eller dit SIM-kort. Ondsindede programmer kan eventuelt slette dine beskeder."</string>
+ <string name="permdesc_processOutgoingCalls" msgid="2228988201852654461">"Tillader, at et program behandler udgående opkald og ændrer det nummer, der ringes til. Ondsindede programmer kan overvåge, omdirigere eller forhindre udgående opkald."</string>
+ <string name="permlab_receiveSms" msgid="2697628268086208535">"modtag sms"</string>
+ <string name="permdesc_receiveSms" msgid="6298292335965966117">"Tillader, at et program modtager og behandler sms-beskeder. Ondsindede programmer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
+ <string name="permlab_receiveMms" msgid="8894700916188083287">"modtag mms"</string>
+ <string name="permdesc_receiveMms" msgid="4563346832000174373">"Tillader, at et program modtager og behandler mms-beskeder. Ondsindede programmer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
+ <string name="permlab_sendSms" msgid="5600830612147671529">"send sms-beskeder"</string>
+ <string name="permdesc_sendSms" msgid="1946540351763502120">"Tillader, at et program at sender sms-beskeder. Ondsindede programmer kan eventuelt koste dig penge ved at sende beskeder uden din bekræftelse."</string>
+ <string name="permlab_readSms" msgid="4085333708122372256">"læs sms eller mms"</string>
+ <string name="permdesc_readSms" msgid="3002170087197294591">"Tillader, at et program læser sms-beskeder, der er gemt på din telefon eller dit SIM-kort. Ondsindede programmer kan eventuelt læse dine fortrolige beskeder."</string>
+ <string name="permlab_writeSms" msgid="6881122575154940744">"rediger sms eller mms"</string>
+ <string name="permdesc_writeSms" msgid="6299398896177548095">"Tillader, at et program skriver i sms-beskeder, der er gemt på din telefon eller dit SIM-kort. Ondsindede programmer kan eventuelt slette dine beskeder."</string>
<string name="permlab_receiveWapPush" msgid="8258226427716551388">"modtag WAP"</string>
- <string name="permdesc_receiveWapPush" msgid="5979623826128082171">"Tillader et program at modtage og behandle WAP-beskeder. Ondsindede programmer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
+ <string name="permdesc_receiveWapPush" msgid="5979623826128082171">"Tillader, at et program modtager og behandler WAP-beskeder. Ondsindede programmer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
<string name="permlab_getTasks" msgid="5005277531132573353">"hent kørende programmer"</string>
- <string name="permdesc_getTasks" msgid="7048711358713443341">"Tillader et program at hente oplysninger om nuværende og for nyligt kørende opgaver. Tillader eventuelt ondsindede programmer at finde private oplysninger om andre programmer."</string>
+ <string name="permdesc_getTasks" msgid="7048711358713443341">"Tillader, at et program henter oplysninger om nuværende og for nyligt kørende opgaver. Tillader, at eventuelt ondsindede programmer finder private oplysninger om andre programmer."</string>
<string name="permlab_reorderTasks" msgid="5669588525059921549">"omorganiser kørende programmer"</string>
- <string name="permdesc_reorderTasks" msgid="126252774270522835">"Tillader et program at flytte opgaver til forgrunden og baggrunden. Ondsindede programmer kan tvinge dem selv til forgrunden uden din kontrol."</string>
+ <string name="permdesc_reorderTasks" msgid="126252774270522835">"Tillader, at et program flytter opgaver til forgrunden og baggrunden. Ondsindede programmer kan tvinge dem selv til forgrunden uden din kontrol."</string>
<string name="permlab_setDebugApp" msgid="4339730312925176742">"aktiver programfejlretning"</string>
- <string name="permdesc_setDebugApp" msgid="5584310661711990702">"Tillader et program at slå fejlretning af andet program til. Ondsindede programmer kan bruge dette til at standse andre programmer."</string>
- <string name="permlab_changeConfiguration" msgid="8214475779521218295">"skift dine UI-indstillinger"</string>
- <string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Tillader et program at ændre den nuværende konfiguration, som f.eks. den lokale eller overordnede skrifttypestørrelse."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"genstart andre programmer"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Tillader et program at tvangsgenstarte andre programmer."</string>
+ <string name="permdesc_setDebugApp" msgid="5584310661711990702">"Tillader, at et program slår fejlretning af andet program til. Ondsindede programmer kan bruge dette til at standse andre programmer."</string>
+ <string name="permlab_changeConfiguration" msgid="8214475779521218295">"skift indstillinger for brugergrænsefladen"</string>
+ <string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Tillader, at et program ændrer den nuværende konfiguration, f.eks. den lokale eller overordnede skrifttypestørrelse."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"tving programmet til at lukke"</string>
- <string name="permdesc_forceBack" msgid="6534109744159919013">"Tillader et program at tvinge alle programmer, der er i forgrunden, til at lukke og gå tilbage. Bør aldrig være nødvendigt til normale programmer."</string>
+ <string name="permdesc_forceBack" msgid="6534109744159919013">"Tillader, at et program tvinger alle programmer, der er i forgrunden, til at lukke og køre i baggrunden. Bør aldrig være nødvendigt til normale programmer."</string>
<string name="permlab_dump" msgid="1681799862438954752">"hent intern systemtilstand"</string>
- <string name="permdesc_dump" msgid="2198776174276275220">"Tillader et program at hente systemets interne tilstand. Ondsindede programmer kan hente en række private og sikre oplysninger, som de normalt aldrig bør have brug for."</string>
+ <string name="permdesc_dump" msgid="2198776174276275220">"Tillader, at et program henter systemets interne tilstand. Ondsindede programmer kan hente en række private og sikre oplysninger, som de normalt aldrig bør have brug for."</string>
<string name="permlab_shutdown" msgid="7185747824038909016">"delvis lukning"</string>
<string name="permdesc_shutdown" msgid="7046500838746291775">"Sætter aktivitetsadministratoren i lukningstilstand. Lukker ikke helt ned."</string>
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"undgå programskift"</string>
<string name="permdesc_stopAppSwitches" msgid="3857886086919033794">"Forhindrer brugeren i at skifte til et andet program."</string>
<string name="permlab_runSetActivityWatcher" msgid="7811586187574696296">"overvåg og kontroller start af alle programmer"</string>
- <string name="permdesc_runSetActivityWatcher" msgid="3228701938345388092">"Tillader et program at overvåge og kontrollere, hvordan systemet starter aktiviteter. Ondsindede programmer kan fuldstændig kompromittere systemet. Denne tilladelse er kun nødvendig til udvikling, aldrig til normal telefonbrug."</string>
+ <string name="permdesc_runSetActivityWatcher" msgid="3228701938345388092">"Tillader, at et program overvåger og kontrollerer, hvordan systemet starter aktiviteter. Ondsindede programmer kan fuldstændig kompromittere systemet. Denne tilladelse er kun nødvendig til udvikling, aldrig til normal telefonbrug."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"send udsendelse om fjernet pakke"</string>
- <string name="permdesc_broadcastPackageRemoved" msgid="3453286591439891260">"Tillader et program at udsende en meddelelse om, at en programpakke er fjernet. Ondsindede programmer kan bruge dette til at afslutte et andet kørende program."</string>
- <string name="permlab_broadcastSmsReceived" msgid="5689095009030336593">"send SMS-modtaget udsendelse"</string>
- <string name="permdesc_broadcastSmsReceived" msgid="9122419277306740155">"Tillader et program at udsende en meddelelse om, at der er modtaget en SMS-besked. Ondsindede programmer kan eventuelt bruge dette til at forfalske indgående SMS-beskeder."</string>
+ <string name="permdesc_broadcastPackageRemoved" msgid="3453286591439891260">"Tillader, at et program udsender en meddelelse om, at en programpakke er fjernet. Ondsindede programmer kan bruge dette til at afslutte et andet kørende program."</string>
+ <string name="permlab_broadcastSmsReceived" msgid="5689095009030336593">"send sms-modtaget udsendelse"</string>
+ <string name="permdesc_broadcastSmsReceived" msgid="9122419277306740155">"Tillader, at et program udsender en meddelelse om, at der er modtaget en sms-besked. Ondsindede programmer kan eventuelt bruge dette til at forfalske indgående sms-beskeder."</string>
<string name="permlab_broadcastWapPush" msgid="3145347413028582371">"send WAP-PUSH-modtaget udsendelse"</string>
- <string name="permdesc_broadcastWapPush" msgid="3955303669461378091">"Tillader et program at udsende en meddelelse om, at der er modtaget en WAP PUSH-besked. Ondsindede programmer kan eventuelt bruge dette til at forfalske modtagelse af MMS-besked eller i det skjulte erstatte indholdet på alle websider med ondsindede varianter."</string>
+ <string name="permdesc_broadcastWapPush" msgid="3955303669461378091">"Tillader, at et program udsender en meddelelse om, at der er modtaget en WAP PUSH-besked. Ondsindede programmer kan eventuelt bruge dette til at forfalske modtagelse af mms-besked eller i det skjulte erstatte indholdet på alle websider med ondsindede varianter."</string>
<string name="permlab_setProcessLimit" msgid="2451873664363662666">"begræns antallet af kørende processer"</string>
- <string name="permdesc_setProcessLimit" msgid="7824786028557379539">"Tillader et program at kontrollere det maksimale antal processer, der kan køre. Er aldrig nødvendigt til normale programmer."</string>
+ <string name="permdesc_setProcessLimit" msgid="7824786028557379539">"Tillader, at et program kontrollerer det maksimale antal processer, der kan køre. Er aldrig nødvendigt til normale programmer."</string>
<string name="permlab_setAlwaysFinish" msgid="5342837862439543783">"få alle baggrundsprogrammer til at lukke"</string>
- <string name="permdesc_setAlwaysFinish" msgid="8773936403987091620">"Tillader et program at kontrollere, om aktiviteter altid afsluttes, så snart de går i baggrunden. Aldrig nødvendigt til normale programmer."</string>
+ <string name="permdesc_setAlwaysFinish" msgid="8773936403987091620">"Tillader, at et program kontrollerer, om aktiviteter altid afsluttes, så snart de går i baggrunden. Aldrig nødvendigt til normale programmer."</string>
<string name="permlab_batteryStats" msgid="7863923071360031652">"rediger batteristatistikker"</string>
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Tillader ændring af indsamlede batteristatistikker. Ikke til brug for normale programmer."</string>
<string name="permlab_backup" msgid="470013022865453920">"kontroller sikkerhedskopiering af system, og gendan"</string>
- <string name="permdesc_backup" msgid="4837493065154256525">"Tillader et program at kontrollere systemets sikkerhedskopierings- og gendannelsesmekanisme. Ikke til brug til normale programmer."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"Sikkerhedskopier og gendan programmets data"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Tillader et program at kontrollere systemets sikkerhedskopierings- og gendannelsesmekanisme."</string>
+ <string name="permdesc_backup" msgid="4837493065154256525">"Tillader, at et program kontrollerer systemets sikkerhedskopierings- og gendannelsesfunktion. Ikke til brug til normale programmer."</string>
+ <string name="permlab_backup_data" msgid="4057625941707926463">"sikkerhedskopier og gendan programmets data"</string>
+ <string name="permdesc_backup_data" msgid="8274426305151227766">"Tillader, at et program deltager i systemets sikkerhedskopierings- og gendannelsesfunktion."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"vis uautoriserede vinduer"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Tillader oprettelse af vinduer, der er beregnet til at blive brugt af den interne systembrugergrænseflade. Ikke til brug for normale programmer."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"vis underretninger på systemniveau"</string>
- <string name="permdesc_systemAlertWindow" msgid="5109622689323490558">"Tillader et program at vise systemunderretningsvinduer. Ondsindede programmer kan overtage hele telefonens skærm."</string>
+ <string name="permdesc_systemAlertWindow" msgid="5109622689323490558">"Tillader, at et program viser vinduer med systemunderretninger. Ondsindede programmer kan overtage hele telefonens skærm."</string>
<string name="permlab_setAnimationScale" msgid="2805103241153907174">"rediger global animationshastighed"</string>
- <string name="permdesc_setAnimationScale" msgid="7181522138912391988">"Tillader et program at ændre den globale animationshastighed (hurtigere eller langsommere animationer) når som helst."</string>
+ <string name="permdesc_setAnimationScale" msgid="7181522138912391988">"Tillader, at et program altid kan ændre den globale animationshastighed (hurtigere eller langsommere animationer)."</string>
<string name="permlab_manageAppTokens" msgid="17124341698093865">"administrer programtokens"</string>
- <string name="permdesc_manageAppTokens" msgid="977127907524195988">"Tillader programmet at oprette og administrere deres egen tokens og gå uden om deres normale Z-rækkefølge. Bør aldrig være nødvendigt til normale programmer."</string>
+ <string name="permdesc_manageAppTokens" msgid="977127907524195988">"Tillader, at programmet opretter og administrerer sine egen tokens og gå uden om sin normale Z-rækkefølge. Bør aldrig være nødvendigt til normale programmer."</string>
<string name="permlab_injectEvents" msgid="1378746584023586600">"tryk på taster og kontrolknapper"</string>
- <string name="permdesc_injectEvents" msgid="3946098050410874715">"Tillader et program at levere sine egne inputbegivenheder (tastetryk osv.) til andre programmer. Ondsindede programmer kan bruge dette til at overtage telefonen."</string>
+ <string name="permdesc_injectEvents" msgid="3946098050410874715">"Tillader, at et program leverer sine egne inputbegivenheder (tastetryk osv.) til andre programmer. Ondsindede programmer kan bruge dette til at overtage telefonen."</string>
<string name="permlab_readInputState" msgid="469428900041249234">"registrerer, hvad du indtaster, og hvilke handlinger du foretager dig"</string>
- <string name="permdesc_readInputState" msgid="5132879321450325445">"Tillader et program at holde øje med de taster, du trykker på, selv når du interagerer med andre programmer (som f.eks. indtastning af adgangskode). Bør aldrig være nødvendigt til normale programmer."</string>
+ <string name="permdesc_readInputState" msgid="5132879321450325445">"Tillader, at et program registrerer taster, du trykker på, selv når du interagerer med andre programmer (f.eks. ved indtastning af adgangskode). Bør aldrig være nødvendigt til normale programmer."</string>
<string name="permlab_bindInputMethod" msgid="3360064620230515776">"forpligt til en inputmetode"</string>
- <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Tillader brugeren at forpligte sig på en inputmetodes grænseflade på øverste niveau. Bør aldrig være nødvendig til normale programmer."</string>
+ <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Tillader, at brugeren forpligter sig til en inputmetodes grænseflade på øverste niveau. Bør aldrig være nødvendig til normale programmer."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"forpligt til et tapet"</string>
- <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Tillader brugeren at forpligte sig på et tapets grænseflade på øverste niveau. Bør aldrig være nødvendig til normale programmer."</string>
+ <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Tillader, at brugeren forpligter sig til et tapets grænseflade på øverste niveau. Bør aldrig være nødvendig til normale programmer."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"skift skærmretning"</string>
- <string name="permdesc_setOrientation" msgid="6335814461615851863">"Tillader et program at ændre rotationen af skærmen når som helst. Bør aldrig være nødvendigt til normale programmer."</string>
+ <string name="permdesc_setOrientation" msgid="6335814461615851863">"Tillader, at et program ændrer rotationen af skærmen når som helst. Bør aldrig være nødvendigt til normale programmer."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"send Linux-signaler til programmer"</string>
- <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Tillader program at anmode om, at det leverede signal sendes til alle vedholdende processer."</string>
+ <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Tillader, at programmet kan anmode om, at det leverede signal sendes til alle vedholdende processer."</string>
<string name="permlab_persistentActivity" msgid="8659652042401085862">"lad altid programmet køre"</string>
- <string name="permdesc_persistentActivity" msgid="5037199778265006008">"Tillader et program at gøre dele af sig selv vedholdende, så systemet ikke kan bruge det til andre programmer."</string>
+ <string name="permdesc_persistentActivity" msgid="5037199778265006008">"Tillader, at et program gør dele af sig selv vedholdende, så systemet ikke kan bruge det til andre programmer."</string>
<string name="permlab_deletePackages" msgid="3343439331576348805">"slet programmer"</string>
- <string name="permdesc_deletePackages" msgid="3634943677518723314">"Tillader et program at slette Android-pakker. Ondsindede programmer kan bruge dette til at slette vigtige programmer."</string>
+ <string name="permdesc_deletePackages" msgid="3634943677518723314">"Tillader, at et program sletter Android-pakker. Ondsindede programmer kan bruge dette til at slette vigtige programmer."</string>
<string name="permlab_clearAppUserData" msgid="2192134353540277878">"slet andre programmers data"</string>
- <string name="permdesc_clearAppUserData" msgid="7546345080434325456">"Lader et program rydde brugerdata."</string>
+ <string name="permdesc_clearAppUserData" msgid="7546345080434325456">"Tillader, at et program rydder brugerdata."</string>
<string name="permlab_deleteCacheFiles" msgid="1518556602634276725">"slet andre programmers cacher"</string>
- <string name="permdesc_deleteCacheFiles" msgid="2283074077168165971">"Tillader et program at slette cachefiler."</string>
- <string name="permlab_getPackageSize" msgid="4799785352306641460">"måler programmets lagerplads"</string>
- <string name="permdesc_getPackageSize" msgid="5557253039670753437">"Tillader et program at hente dets kode, data og cachestørrelser"</string>
+ <string name="permdesc_deleteCacheFiles" msgid="2283074077168165971">"Tillader, at et program sletter cachefiler."</string>
+ <string name="permlab_getPackageSize" msgid="4799785352306641460">"vis programmets lagerplads"</string>
+ <string name="permdesc_getPackageSize" msgid="5557253039670753437">"Tillader, at et program henter sin kode, data og cachestørrelser"</string>
<string name="permlab_installPackages" msgid="335800214119051089">"installer programmer direkte"</string>
- <string name="permdesc_installPackages" msgid="526669220850066132">"Tillader et program at installere nye eller opdaterede Android-pakker. Ondsindede programmer kan bruge dette til at tilføje nye programmer med vilkårlige, effektive tilladelser."</string>
+ <string name="permdesc_installPackages" msgid="526669220850066132">"Tillader, at et program installerer nye eller opdaterede Android-pakker. Ondsindede programmer kan bruge dette til at tilføje nye programmer med vilkårlige, effektive tilladelser."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"slet alle cachedata for programmet"</string>
- <string name="permdesc_clearAppCache" msgid="7740465694193671402">"Tillader et program at frigøre plads på telefonen ved at slette filer i programmets cachemappe. Adgang er normalt meget begrænset til systemprocesser."</string>
+ <string name="permdesc_clearAppCache" msgid="7740465694193671402">"Tillader, at et program frigør plads på telefonen ved at slette filer i programmets cachemappe. Adgang er normalt meget begrænset til systemprocesser."</string>
<string name="permlab_readLogs" msgid="4811921703882532070">"læs systemlogfiler"</string>
- <string name="permdesc_readLogs" msgid="2257937955580475902">"Tillader et program at læse fra systemets forskellige logfiler. Dermed kan generelle oplysninger om, hvad du laver med telefonen, opdages, men logfilerne skulle ikke indeholde personlige eller private oplysninger."</string>
+ <string name="permdesc_readLogs" msgid="2257937955580475902">"Tillader, at et program læser fra systemets forskellige logfiler. Dermed kan generelle oplysninger om, hvad du laver med telefonen, registreres, men logfilerne bør ikke indeholde personlige eller private oplysninger."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"læs/skriv til ressourcer ejet af diag"</string>
- <string name="permdesc_diagnostic" msgid="3121238373951637049">"Tillader et program at læse og skrive til alle ressourcer, der ejes af diag-gruppen, som f.eks. flier i /dev. Dette kan muligvis påvirke systemets stabilitet og sikkerhed. Dette bør KUN bruges til hardwarespecifikke diagnosticeringer foretaget af producent eller udbyder."</string>
+ <string name="permdesc_diagnostic" msgid="3121238373951637049">"Tillader, at et program læser og skriver til alle ressourcer, der ejes af diag-gruppen, som f.eks. flier i /dev. Dette kan muligvis påvirke systemets stabilitet og sikkerhed. Dette bør KUN bruges til hardwarespecifikke diagnosticeringer foretaget af producent eller udbyder."</string>
<string name="permlab_changeComponentState" msgid="79425198834329406">"aktiver eller deaktiver programkomponenter"</string>
- <string name="permdesc_changeComponentState" msgid="4569107043246700630">"Tillader et program at ændre, om en komponent fra et andet program er aktiveret eller ej. Ondsindede programmer kan bruge dette til at deaktivere vigtige telefonfunktioner. Denne tilladelse skal anvendes med forsigtighed, da det kan forårsage ubrugelige, inkonsekvente eller ustabile programkomponenter."</string>
- <string name="permlab_setPreferredApplications" msgid="3393305202145172005">"indstil foretrukne programmer"</string>
- <string name="permdesc_setPreferredApplications" msgid="760008293501937546">"Tillader et program at ændre dine foretrukne programmer. Dette kan tillade, at ondsindede programmer ændrer kørende programmer i det skjulte og narrer dine eksisterende programmer til at indsamle personlige data fra dig."</string>
+ <string name="permdesc_changeComponentState" msgid="4569107043246700630">"Tillader, at et program ændrer, om en komponent fra et andet program er aktiveret eller ej. Ondsindede programmer kan bruge dette til at deaktivere vigtige telefonfunktioner. Denne tilladelse skal anvendes med forsigtighed, da det kan forårsage ubrugelige, inkonsekvente eller ustabile programkomponenter."</string>
+ <string name="permlab_setPreferredApplications" msgid="3393305202145172005">"angiv foretrukne programmer"</string>
+ <string name="permdesc_setPreferredApplications" msgid="760008293501937546">"Tillader, at et program ændrer dine foretrukne programmer. Dette kan medføre, at ondsindede programmer ændrer kørende programmer i det skjulte og narrer dine eksisterende programmer til at indsamle personlige oplysninger fra dig."</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"rediger globale systemindstillinger"</string>
- <string name="permdesc_writeSettings" msgid="838789419871034696">"Tillader et program at ændre systemets indstillingsdata. Ondsindede programmer kan skade systemets konfiguration."</string>
+ <string name="permdesc_writeSettings" msgid="838789419871034696">"Tillader, at et program ændrer systemets indstillingsdata. Ondsindede programmer kan skade systemets konfiguration."</string>
<string name="permlab_writeSecureSettings" msgid="204676251876718288">"rediger sikre systemindstillinger"</string>
- <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Tillader et program at ændre systemernes sikre indstillingsdata. Ikke til brug til almindelige programmer."</string>
+ <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Tillader, at et program ændrer systemernes sikre indstillingsdata. Ikke til brug til almindelige programmer."</string>
<string name="permlab_writeGservices" msgid="2149426664226152185">"rediger kortet over Google-tjenester"</string>
- <string name="permdesc_writeGservices" msgid="6602362746516676175">"Tillader et program at ændre kortet over Google-tjenester. Ikke til brug til normale programmer."</string>
+ <string name="permdesc_writeGservices" msgid="6602362746516676175">"Tillader, at et program ændrer kortet over Google-tjenester. Ikke til brug til normale programmer."</string>
<string name="permlab_receiveBootCompleted" msgid="7776779842866993377">"start automatisk ved opstart"</string>
- <string name="permdesc_receiveBootCompleted" msgid="698336728415008796">"Tillader et program at starte selv, når systemet er færdig med at starte. Dette kan gøre start af telefonen langsommere og generelt gøre telefonen langsommere ved altid at lade programmet køre."</string>
+ <string name="permdesc_receiveBootCompleted" msgid="698336728415008796">"Tillader, at et program starter selv, når systemet er færdig med at starte. Dette kan gøre startem af telefonen langsommere og generelt gøre telefonen langsommere ved altid at lade programmet køre."</string>
<string name="permlab_broadcastSticky" msgid="7919126372606881614">"send klæbende udsendelse"</string>
- <string name="permdesc_broadcastSticky" msgid="1920045289234052219">"Tillader et program at sende klæbende udsendelser, der bliver tilbage, efter udsendelsen er slut. Ondsindede programmer kan gøre telefonen langsom eller ustabil ved at få den til at bruge for meget hukommelse."</string>
+ <string name="permdesc_broadcastSticky" msgid="1920045289234052219">"Tillader, at et program sender klæbende udsendelser, der bliver tilbage, efter udsendelsen er slut. Ondsindede programmer kan gøre telefonen langsom eller ustabil ved at få den til at bruge for meget hukommelse."</string>
<string name="permlab_readContacts" msgid="6219652189510218240">"læs kontaktdata"</string>
- <string name="permdesc_readContacts" msgid="3371591512896545975">"Tillader et program at læse alle kontaktdata (adresse), der er gemt på din telefon. Ondsindede programmer kan bruge dette til at sende dine data til andre mennesker."</string>
+ <string name="permdesc_readContacts" msgid="3371591512896545975">"Tillader, at et program læser alle kontaktdata (adresser), der er gemt på din telefon. Ondsindede programmer kan bruge dette til at sende dine data til andre mennesker."</string>
<string name="permlab_writeContacts" msgid="644616215860933284">"skriv kontaktdata"</string>
- <string name="permdesc_writeContacts" msgid="3924383579108183601">"Tillader et program at ændre telefonens kontaktdata (adresse), der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre kontaktdata."</string>
+ <string name="permdesc_writeContacts" msgid="3924383579108183601">"Tillader, at et program ændrer kontaktdata (adresser), der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre kontaktdata."</string>
<string name="permlab_writeOwnerData" msgid="4892555913849295393">"skriv ejerdata"</string>
- <string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Tillader et program at ændre telefonens ejerdata, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre ejerdata."</string>
+ <string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Tillader, at et program ændrer rtelefonens ejerdata, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre ejerdata."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"læs ejerdata"</string>
- <string name="permdesc_readOwnerData" msgid="3088486383128434507">"Tillader et program at læse telefonens ejerdata, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at læse ejerdata."</string>
+ <string name="permdesc_readOwnerData" msgid="3088486383128434507">"Tillader, at et program læser telefonens ejerdata, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at læse ejerdata."</string>
<string name="permlab_readCalendar" msgid="3728905909383989370">"læs kalenderdata"</string>
- <string name="permdesc_readCalendar" msgid="5533029139652095734">"Tillader et program at læse alle kalenderbegivenheder, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at sende dine kalenderbegivenheder til andre mennesker."</string>
+ <string name="permdesc_readCalendar" msgid="5533029139652095734">"Tillader, at et program læser alle kalenderbegivenheder, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at sende dine kalenderbegivenheder til andre mennesker."</string>
<string name="permlab_writeCalendar" msgid="377926474603567214">"skriv kalenderdata"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Tillader et program at ændre telefonens kalenderbegivenheder, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre kalenderdata."</string>
+ <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Tillader, at et program ændrer de kalenderbegivenheder, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre kalenderdata."</string>
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"imiterede placeringskilder til test"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Opret imiterede placeringskilder til testning. Ondsindede programmer kan bruge dette til at tilsidesætte den returnerede placering og/eller status fra rigtige placeringskilder som f.eks. GPS eller netværksudbydere."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"få adgang til ekstra kommandoer for placeringsudbyder"</string>
@@ -291,109 +294,113 @@
<string name="permlab_accessCoarseLocation" msgid="4642255009181975828">"grov (netværksbaseret) placering"</string>
<string name="permdesc_accessCoarseLocation" msgid="8235655958070862293">"Få adgang til grove placeringskilder som f.eks. den mobile netværksdatabase for at finde en omtrentlig placering for telefonen, hvor det er muligt. Ondsindede programmer kan bruge dette til at finde ud af, hvor du omtrent er."</string>
<string name="permlab_accessSurfaceFlinger" msgid="2363969641792388947">"få adgang til SurfaceFlinger"</string>
- <string name="permdesc_accessSurfaceFlinger" msgid="6805241830020733025">"Tillader et program at bruge SurfaceFlinger-funktioner på lavt niveau."</string>
+ <string name="permdesc_accessSurfaceFlinger" msgid="6805241830020733025">"Tillader, at et program bruger SurfaceFlinger-funktioner på lavt niveau."</string>
<string name="permlab_readFrameBuffer" msgid="6690504248178498136">"læs rammebuffer"</string>
- <string name="permdesc_readFrameBuffer" msgid="7530020370469942528">"Tillader et program at læse indholdet fra rammebufferen."</string>
+ <string name="permdesc_readFrameBuffer" msgid="7530020370469942528">"Tillader, at et program læser indholdet fra rammebufferen."</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"skift dine lydindstillinger"</string>
- <string name="permdesc_modifyAudioSettings" msgid="5793461287365991922">"Tillader et program at ændre globale lydindstillinger som f.eks. lydstyrke og kanalisering."</string>
+ <string name="permdesc_modifyAudioSettings" msgid="5793461287365991922">"Tillader, at et program ændrer globale lydindstillinger som f.eks. lydstyrke og kanalisering."</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"optag lyd"</string>
- <string name="permdesc_recordAudio" msgid="6493228261176552356">"Tillader et program at få adgang til lydregistreringsstien."</string>
+ <string name="permdesc_recordAudio" msgid="6493228261176552356">"Tillader, at et program får adgang til lydregistreringsstien."</string>
<string name="permlab_camera" msgid="8059288807274039014">"tag billeder"</string>
- <string name="permdesc_camera" msgid="9013476258810982546">"Tillader programmet at tage billeder med kameraet. Dette tillader programmet til hver en tid at indsamle de billeder, kameraet ser."</string>
+ <string name="permdesc_camera" msgid="9013476258810982546">"Tillader, at programmet tager billeder med kameraet. Dette giver programmet mulighed for altid at indsamle de billeder, kameraet ser."</string>
<string name="permlab_brick" msgid="8337817093326370537">"deaktiver telefonen permanent"</string>
- <string name="permdesc_brick" msgid="5569526552607599221">"Tillader programmet at deaktivere hele telefonen permanent. Dette er meget farligt."</string>
+ <string name="permdesc_brick" msgid="5569526552607599221">"Tillader, at programmet deaktiverer hele telefonen permanent. Dette er meget farligt."</string>
<string name="permlab_reboot" msgid="2898560872462638242">"tving telefon til at genstarte"</string>
- <string name="permdesc_reboot" msgid="7914933292815491782">"Tillader programmet at tvinge telefonen til at genstarte."</string>
+ <string name="permdesc_reboot" msgid="7914933292815491782">"Tillader, at programmet tvinger telefonen til at genstarte."</string>
<string name="permlab_mount_unmount_filesystems" msgid="1761023272170956541">"monter eller demonter filsystemer"</string>
- <string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Tillader programmet at montere eller demontere filsystemer til flytbar lagring."</string>
+ <string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Tillader, at programmet monterer eller demonterer filsystemer til flytbar lagring."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"formater ekstern lagring"</string>
- <string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Tillader et program at formatere flytbar lagring."</string>
+ <string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Tillader, at et program formaterer flytbart lager."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"kontroller vibrator"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Lader programmet kontrollere vibratoren."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"kontroller lommelygte"</string>
- <string name="permdesc_flashlight" msgid="6433045942283802309">"Tillader programmet at kontrollere lommelygten."</string>
+ <string name="permdesc_flashlight" msgid="6433045942283802309">"Tillader, at programmet kontrollerer lommelygten."</string>
<string name="permlab_hardware_test" msgid="4148290860400659146">"test hardware"</string>
- <string name="permdesc_hardware_test" msgid="3668894686500081699">"Tillader et program at kontrollere forskellige perifere enheder med det formål at teste hardwaren."</string>
+ <string name="permdesc_hardware_test" msgid="3668894686500081699">"Tillader, at et program kontrollerer forskellige perifere enheder for at teste hardwaren."</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"ring direkte op til telefonnumre"</string>
- <string name="permdesc_callPhone" msgid="3369867353692722456">"Tillader programmet at ringe til telefonnumre uden din indgriben. Ondsindede programmer kan forårsage uventede opkald på din telefonregning. Vær opmærksom på, at det ikke tillader programmet at ringe til nødnumre."</string>
+ <string name="permdesc_callPhone" msgid="3369867353692722456">"Tillader, at programmet ringer til telefonnumre uden din indgriben. Ondsindede programmer kan forårsage uventede opkald på din telefonregning. Vær opmærksom på, at programmet ikke kan ringe til nødnumre."</string>
<string name="permlab_callPrivileged" msgid="4198349211108497879">"ring direkte op til alle telefonnumre"</string>
- <string name="permdesc_callPrivileged" msgid="244405067160028452">"Tillader programmet at ringe til alle telefonnumre inklusive nødnumre uden din indgriben. Ondsindede programmer kan eventuelt foretage unødvendige og ulovlige opkald til nødtjenester."</string>
+ <string name="permdesc_callPrivileged" msgid="244405067160028452">"Tillader, at programmet ringer til alle telefonnumre inklusive nødnumre uden din indgriben. Ondsindede programmer kan eventuelt foretage unødvendige og ulovlige opkald til nødtjenester."</string>
<string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"start CDMA-telefonopsætning direkte"</string>
- <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Tillader, at programmet starter CDMA-levering. Onsindede programmer kan starte unødvendig CDMA-levering"</string>
+ <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Tillader, at programmet starter CDMA-levering. Ondsindede programmer kan starte unødvendig CDMA-levering"</string>
<string name="permlab_locationUpdates" msgid="7785408253364335740">"kontroller meddelelser om placeringsopdatering"</string>
<string name="permdesc_locationUpdates" msgid="2300018303720930256">"Tillader aktivering/deaktivering af placeringsdata fra radioen. Ikke til brug til normale programmer."</string>
<string name="permlab_checkinProperties" msgid="7855259461268734914">"egenskaber for adgangskontrol"</string>
<string name="permdesc_checkinProperties" msgid="7150307006141883832">"Tillader læse/skrive-adgang til egenskaber, der er uploadet af kontroltjenesten. Ikke til brug til normale programmer."</string>
<string name="permlab_bindGadget" msgid="776905339015863471">"vælg widgets"</string>
- <string name="permdesc_bindGadget" msgid="2098697834497452046">"Tillader programmet at fortælle systemet, hvilke widgets der kan bruges af hvilke programmer. Med denne tilladelse kan programmer give adgang til personlige data til andre programmer. Ikke til brug til normale programmer."</string>
+ <string name="permdesc_bindGadget" msgid="2098697834497452046">"Tillader, at programmet fortæller systemet, hvilke widgets der kan bruges af hvilke programmer. Med denne tilladelse kan programmer give adgang til personlige oplysninger til andre programmer. Ikke til brug til normale programmer."</string>
<string name="permlab_modifyPhoneState" msgid="8423923777659292228">"rediger telefontilstand"</string>
- <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Tillader programmet at kontrollere enhedens telefonfunktioner. Et program med denne tilladelse kan skifte netværk, slå telefonens radio til og fra og lignende uden nogensinde at underrette dig."</string>
+ <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Tillader, at programmet kontrollerer enhedens telefonfunktioner. Et program med denne tilladelse kan skifte netværk, slå telefonens radio til og fra og lignende uden nogensinde at informere dig."</string>
<string name="permlab_readPhoneState" msgid="2326172951448691631">"læs telefontilstand og identitet"</string>
- <string name="permdesc_readPhoneState" msgid="188877305147626781">"Tillader programmet at få adgang til enhedens telefonfunktioner. Et program med denne tilladelse kan afgøre denne telefons telefon- og serienummer, om et opkald er aktivt, nummeret som opkaldet er forbundet til osv."</string>
+ <string name="permdesc_readPhoneState" msgid="188877305147626781">"Tillader, at programmet får adgang til enhedens telefonfunktioner. Et program kan med denne tilladelse registrere denne telefons telefon- og serienummer, om et opkald er aktivt, nummeret som det opkald er forbundet til osv."</string>
<string name="permlab_wakeLock" msgid="573480187941496130">"afhold telefonen fra at gå i dvale"</string>
- <string name="permdesc_wakeLock" msgid="7584036471227467099">"Tillader et program at forhindre telefonen i at gå i dvale."</string>
- <string name="permlab_devicePower" msgid="4928622470980943206">"Tænd eller sluk for telefonen"</string>
- <string name="permdesc_devicePower" msgid="4577331933252444818">"Tillader programmet at slå telefonen til eller fra."</string>
+ <string name="permdesc_wakeLock" msgid="7584036471227467099">"Tillader, at et program forhindrer telefonen i at gå i dvale."</string>
+ <string name="permlab_devicePower" msgid="4928622470980943206">"tænd eller sluk for telefonen"</string>
+ <string name="permdesc_devicePower" msgid="4577331933252444818">"Tillader, at programmet slukker og tænder telefonen."</string>
<string name="permlab_factoryTest" msgid="3715225492696416187">"kør i fabriksindstillet testtilstand"</string>
<string name="permdesc_factoryTest" msgid="8136644990319244802">"Kør som en producenttest på lavt niveau. Giver fuld adgang til telefonens hardware. Kun tilgængeligt når en telefon kører i producenttesttilstand."</string>
<string name="permlab_setWallpaper" msgid="6627192333373465143">"angiv tapet"</string>
- <string name="permdesc_setWallpaper" msgid="6417041752170585837">"Tillader programmet at opsætte systemets tapet."</string>
+ <string name="permdesc_setWallpaper" msgid="6417041752170585837">"Tillader, at programmet opsætter systemets tapet."</string>
<string name="permlab_setWallpaperHints" msgid="3600721069353106851">"opsæt tip til tapetstørrelse"</string>
- <string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Tillader programmet at opsætte størrelsestip for systemets tapet."</string>
+ <string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Tillader, at programmet opsætter størrelsestip for systemets tapet."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"nulstil system til fabriksstandarder"</string>
- <string name="permdesc_masterClear" msgid="5033465107545174514">"Tillader et program fuldstændig at nulstille systemet til fabriksindstillingerne, slette alle data, konfigurationen og installerede programmer."</string>
- <string name="permlab_setTimeZone" msgid="2945079801013077340">"indstil tidszone"</string>
- <string name="permdesc_setTimeZone" msgid="1902540227418179364">"Tillader et program at ændre telefonens tidszone."</string>
+ <string name="permdesc_masterClear" msgid="5033465107545174514">"Tillader, at et program nulstiller systemet fuldstændig til fabriksindstillingerne, sletter alle data, konfigurationer og installerede programmer."</string>
+ <string name="permlab_setTimeZone" msgid="2945079801013077340">"angiv tidszone"</string>
+ <string name="permdesc_setTimeZone" msgid="1902540227418179364">"Tillader, at et program ændrer telefonens tidszone."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"fungerer som kontoadministrationstjeneste"</string>
- <string name="permdesc_accountManagerService" msgid="6056903274106394752">"Tillader et program at foretage opkald til kontogodkendere"</string>
- <string name="permlab_getAccounts" msgid="4549918644233460103">"opdag kendte konti"</string>
- <string name="permdesc_getAccounts" msgid="6839262446413155394">"Tillader et program at hente listen over konti, der er kendt af telefonen."</string>
+ <string name="permdesc_accountManagerService" msgid="6056903274106394752">"Tillader, at et program foretager opkald til kontogodkendere"</string>
+ <string name="permlab_getAccounts" msgid="4549918644233460103">"registrer kendte konti"</string>
+ <string name="permdesc_getAccounts" msgid="6839262446413155394">"Tillader, at et program henter listen over konti, der er kendt af telefonen."</string>
<string name="permlab_authenticateAccounts" msgid="3940505577982882450">"fungerer som en kontogodkender"</string>
- <string name="permdesc_authenticateAccounts" msgid="4006839406474208874">"Tillader et program at bruge kontoadministratorens kontogodkendelsesegenskaber, bl.a. oprettelse af konti samt hentning og indstilling af deres adgangskoder."</string>
- <string name="permlab_manageAccounts" msgid="4440380488312204365">"administrer kontilisten"</string>
- <string name="permdesc_manageAccounts" msgid="8804114016661104517">"Tillader et program at foretage handlinger, som f.eks. at tilføje og fjerne konti samt slette deres adgangskode."</string>
+ <string name="permdesc_authenticateAccounts" msgid="4006839406474208874">"Tillader, at et program bruger kontoadministratorens kontogodkendelsesegenskaber, bl.a. oprettelse af konti samt hentning og indstilling af deres adgangskoder."</string>
+ <string name="permlab_manageAccounts" msgid="4440380488312204365">"administrer kontolisten"</string>
+ <string name="permdesc_manageAccounts" msgid="8804114016661104517">"Tillader, at et program foretager handlinger, f.eks. at tilføje og fjerne konti samt slette sin adgangskode."</string>
<string name="permlab_useCredentials" msgid="6401886092818819856">"brug en kontos godkendelsesoplysninger"</string>
- <string name="permdesc_useCredentials" msgid="7416570544619546974">"Tillader et program at anmode om godkendelsestokens"</string>
+ <string name="permdesc_useCredentials" msgid="7416570544619546974">"Tillader, at et program anmoder om godkendelsestokens"</string>
<string name="permlab_accessNetworkState" msgid="6865575199464405769">"vis netværkstilstand"</string>
- <string name="permdesc_accessNetworkState" msgid="558721128707712766">"Tillader et program at vise tilstanden for alle netværk."</string>
+ <string name="permdesc_accessNetworkState" msgid="558721128707712766">"Tillader, at et program viser tilstanden for alle netværk."</string>
<string name="permlab_createNetworkSockets" msgid="9121633680349549585">"Fuld internetadgang"</string>
- <string name="permdesc_createNetworkSockets" msgid="4593339106921772192">"Tillader et program at oprette netværks-sockets."</string>
+ <string name="permdesc_createNetworkSockets" msgid="4593339106921772192">"Tillader, at et program opretter netværks-sockets."</string>
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"skriv indstillinger for adgangspunktnavn"</string>
- <string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Tillader et program at ændre APN-indstillingerne, som f.eks. enhver APNs Proxy og Port."</string>
+ <string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Tillader, at et program ændrer APN-indstillingerne, f.eks. enhver APNs Proxy og Port."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"skift netværksforbindelse"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Tillader et program at ændre netværksforbindelsens tilstand."</string>
+ <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Tillader, at et program ændrer netværksforbindelsens tilstand."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"skift brugerindstilling for baggrundsdata"</string>
- <string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Tillader et program at ændre brugerindstillingerne for baggrundsdata."</string>
+ <string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Tillader, at et program ændrer brugerindstillingerne for baggrundsdata."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"vis Wi-Fi-tilstand"</string>
- <string name="permdesc_accessWifiState" msgid="485796529139236346">"Tillader et program at vise oplysninger om Wi-Fi-tilstanden."</string>
+ <string name="permdesc_accessWifiState" msgid="485796529139236346">"Tillader, at et program viser oplysninger om Wi-Fi-tilstanden."</string>
<string name="permlab_changeWifiState" msgid="7280632711057112137">"skift Wi-Fi-tilstand"</string>
- <string name="permdesc_changeWifiState" msgid="2950383153656873267">"Tillader et program at oprette og afbryde forbindelse fra Wi-Fi-adgangspunkter og foretage ændringer til konfigurerede Wi-Fi-netværk."</string>
+ <string name="permdesc_changeWifiState" msgid="2950383153656873267">"Tillader, at et program opretter og afbryder forbindelsen fra Wi-Fi-adgangspunkter og foretager ændringer i konfigurerede Wi-Fi-netværk."</string>
<string name="permlab_changeWifiMulticastState" msgid="1368253871483254784">"tillad Wi-Fi-multicastmodtagelse"</string>
- <string name="permdesc_changeWifiMulticastState" msgid="8199464507656067553">"Tillader et program at modtage pakker, der ikke er direkte adresseret til din enhed. Dette kan være nyttigt, hvis du finder tjenester, der er tilbudt i nærheden. Det bruger mere strøm end multicasttilstanden."</string>
+ <string name="permdesc_changeWifiMulticastState" msgid="8199464507656067553">"Tillader, at et program modtager pakker, der ikke er direkte adresseret til din enhed. Dette kan være nyttigt, hvis du finder tjenester, der tilbydes i nærheden. Det bruger mere strøm end multicasttilstanden."</string>
<string name="permlab_bluetoothAdmin" msgid="1092209628459341292">"bluetooth-administration"</string>
- <string name="permdesc_bluetoothAdmin" msgid="7256289774667054555">"Tillader et program at konfigurere den lokale Bluetooth-telefon samt at opdage og parre med fjerne enheder."</string>
+ <string name="permdesc_bluetoothAdmin" msgid="7256289774667054555">"Tillader, at et program konfigurerer den lokale Bluetooth-telefon samt opdager og parrer med fjerne enheder."</string>
<string name="permlab_bluetooth" msgid="8361038707857018732">"opret Bluetooth-forbindelser"</string>
- <string name="permdesc_bluetooth" msgid="762515380679392945">"Tillader et program at vise konfigurationen af den lokale Bluetooth-telefon samt at oprette og acceptere forbindelse med parrede enheder."</string>
+ <string name="permdesc_bluetooth" msgid="762515380679392945">"Tillader, at et program viser konfigurationen af den lokale Bluetooth-telefon samt opretter og accepterer forbindelse med parrede enheder."</string>
<string name="permlab_disableKeyguard" msgid="4977406164311535092">"deaktiver tastaturlås"</string>
- <string name="permdesc_disableKeyguard" msgid="3189763479326302017">"Tillader et program at deaktivere tastaturlåsen og al associeret adgangskodesikkerhed. Et legitimt eksempel på dette er, at telefonen deaktiverer tastaturlåsen, når der modtages et indgående telefonopkald, og genaktiverer tastaturlåsen, når opkaldet er afsluttet."</string>
- <string name="permlab_readSyncSettings" msgid="6201810008230503052">"læs synkroniseringsindstillinger"</string>
- <string name="permdesc_readSyncSettings" msgid="5315925706353341823">"Tillader et program at læse synkroniseringsindstillingerne, som f.eks. om synkronisering er aktiveret for kontakter."</string>
- <string name="permlab_writeSyncSettings" msgid="6297138566442486462">"skriv synkroniseringsindstillinger"</string>
- <string name="permdesc_writeSyncSettings" msgid="2498201614431360044">"Tillader et program at ændre synkroniseringsindstillingerne, som f.eks. om synkronisering er aktiveret for kontakter."</string>
+ <string name="permdesc_disableKeyguard" msgid="3189763479326302017">"Tillader, at et program deaktiverer tastaturlåsen og al associeret adgangskodesikkerhed. Et legitimt eksempel på dette er, at telefonen deaktiverer tastaturlåsen, når der modtages et indgående telefonopkald, og genaktiverer tastaturlåsen, når opkaldet er afsluttet."</string>
+ <string name="permlab_readSyncSettings" msgid="6201810008230503052">"læs indstillinger for synkronisering"</string>
+ <string name="permdesc_readSyncSettings" msgid="5315925706353341823">"Tillader, at et program læser synkroniseringsindstillingerne, f.eks. om kontakter skal synkroniseres."</string>
+ <string name="permlab_writeSyncSettings" msgid="6297138566442486462">"skriv indstillinger for synkronisering"</string>
+ <string name="permdesc_writeSyncSettings" msgid="2498201614431360044">"Tillader, at et program ændrer indstillingerne for synkronisering, f.eks. kontakter skal synkroniseres."</string>
<string name="permlab_readSyncStats" msgid="7396577451360202448">"læs synkroniseringsstatistikker"</string>
- <string name="permdesc_readSyncStats" msgid="7511448343374465000">"Tillader et program at læse synkroniseringsstatistikkerne, som f.eks. oversigt over forekomne synkroniseringer."</string>
+ <string name="permdesc_readSyncStats" msgid="7511448343374465000">"Tillader, at et program læser synkroniseringsstatistikker, f.eks. oversigten over forrige synkroniseringer."</string>
<string name="permlab_subscribedFeedsRead" msgid="4756609637053353318">"læs abonnerede feeds"</string>
- <string name="permdesc_subscribedFeedsRead" msgid="3622200625634207660">"Lader et program få detaljer om de aktuelt synkroniserede feeds."</string>
+ <string name="permdesc_subscribedFeedsRead" msgid="3622200625634207660">"Tillader, at et program får detaljer om de aktuelt synkroniserede feeds."</string>
<string name="permlab_subscribedFeedsWrite" msgid="9015246325408209296">"skriv abonnerede feeds"</string>
- <string name="permdesc_subscribedFeedsWrite" msgid="8121607099326533878">"Tillader et program at ændre dine aktuelle synkroniserede feeds. Dette kan muligvis lade et ondsindet program ændre dine synkroniserede feeds."</string>
+ <string name="permdesc_subscribedFeedsWrite" msgid="8121607099326533878">"Tillader, at et program ændrer dine aktuelle synkroniserede feeds. Dette kan muligvis lade et ondsindet program ændre dine synkroniserede feeds."</string>
<string name="permlab_readDictionary" msgid="432535716804748781">"læs brugerdefineret ordbog"</string>
- <string name="permdesc_readDictionary" msgid="1082972603576360690">"Tillader et program at læse alle private ord, navne og sætninger, som brugeren eventuelt har gemt i brugerordbogen."</string>
- <string name="permlab_writeDictionary" msgid="6703109511836343341">"skriv til den brugerdefinerede mappe"</string>
- <string name="permdesc_writeDictionary" msgid="2241256206524082880">"Tillader et program at skrive nye ord i brugermappen."</string>
- <string name="permlab_sdcardWrite" msgid="8079403759001777291">"ret/slet indholdet af SD-kort"</string>
- <string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Tillader et program at skrive til SD-kortet."</string>
+ <string name="permdesc_readDictionary" msgid="1082972603576360690">"Tillader, at et program læser alle private ord, navne og sætninger, som brugeren eventuelt har gemt i brugerordbogen."</string>
+ <string name="permlab_writeDictionary" msgid="6703109511836343341">"skriv til den brugerdefinerede ordbog"</string>
+ <string name="permdesc_writeDictionary" msgid="2241256206524082880">"Tillader, at et program skriver nye ord i brugerordbogen."</string>
+ <string name="permlab_sdcardWrite" msgid="8079403759001777291">"ret/slet indholdet på SD-kortet"</string>
+ <string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Tillader, at et program skriver til SD-kortet."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
- <item msgid="8901098336658710359">"Start"</item>
+ <item msgid="8901098336658710359">"Hjem"</item>
<item msgid="869923650527136615">"Mobil"</item>
<item msgid="7897544654242874543">"Arbejde"</item>
<item msgid="1103601433382158155">"Arbejdsfax"</item>
@@ -403,19 +410,19 @@
<item msgid="9192514806975898961">"Tilpasset"</item>
</string-array>
<string-array name="emailAddressTypes">
- <item msgid="8073994352956129127">"Start"</item>
+ <item msgid="8073994352956129127">"Hjem"</item>
<item msgid="7084237356602625604">"Arbejde"</item>
<item msgid="1112044410659011023">"Andre"</item>
<item msgid="2374913952870110618">"Tilpasset"</item>
</string-array>
<string-array name="postalAddressTypes">
- <item msgid="6880257626740047286">"Start"</item>
+ <item msgid="6880257626740047286">"Hjem"</item>
<item msgid="5629153956045109251">"Arbejde"</item>
<item msgid="4966604264500343469">"Andre"</item>
<item msgid="4932682847595299369">"Tilpasset"</item>
</string-array>
<string-array name="imAddressTypes">
- <item msgid="1738585194601476694">"Start"</item>
+ <item msgid="1738585194601476694">"Hjem"</item>
<item msgid="1359644565647383708">"Arbejde"</item>
<item msgid="7868549401053615677">"Anden"</item>
<item msgid="3145118944639869809">"Tilpasset"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Tilpasset"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Hjem"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Arbejde"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Arbejdsfax"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Hjemmefax"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Personsøger"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Andre"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Tilbagekald"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Bil"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Virksomhed (hovednummer)"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Hoved"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Andre faxbeskeder"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Arbejdsmobiltelefon"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Personsøger"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistent"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"mms"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Fødselsdato"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Årsdag"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Begivenhed"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Tilpasset"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Hjem"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Arbejde"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Andre"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Tilpasset"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Hjem"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Arbejde"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Andre"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Tilpasset"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Hjem"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Arbejde"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Andre"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Tilpasset"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Arbejde"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Andre"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Tilpasset"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Indtast PIN-kode"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Forkert PIN-kode!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Tryk på Menu og dernæst på 0 for at låse op."</string>
@@ -547,47 +502,48 @@
<string name="lockscreen_screen_locked" msgid="7288443074806832904">"Skærmen er låst."</string>
<string name="lockscreen_instructions_when_pattern_enabled" msgid="46154051614126049">"Tryk på Menu for at låse op eller foretage et nødopkald."</string>
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Tryk på Menu for at låse op."</string>
- <string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Tegn mønster til at låse op"</string>
+ <string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Tegn oplåsningsmønster"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Nødopkald"</string>
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Rigtigt!"</string>
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Beklager! Prøv igen"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Oplader (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Opladt."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Tilslut din oplader."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Der er ikke noget SIM-kort."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Der er ikke noget SIM-kort i telefonen."</string>
<string name="lockscreen_missing_sim_instructions" msgid="8874620818937719067">"Indsæt et SIM-kort."</string>
<string name="lockscreen_network_locked_message" msgid="143389224986028501">"Netværket er låst"</string>
- <string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"SIM-kort er låst med PUK-koden."</string>
+ <string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"SIM-kortet er låst med PUK-koden."</string>
<string name="lockscreen_sim_puk_locked_instructions" msgid="635967534992394321">"Se brugervejledningen, eller kontakt kundeservice."</string>
<string name="lockscreen_sim_locked_message" msgid="8066660129206001039">"SIM-kortet er låst."</string>
<string name="lockscreen_sim_unlock_progress_dialog_message" msgid="595323214052881264">"Låser SIM-kortet op ..."</string>
- <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="3514742106066877476">"Du har tegnet dit mønster til at låse op forkert <xliff:g id="NUMBER_0">%d</xliff:g> gange. "\n\n"Prøv igen om <xliff:g id="NUMBER_1">%d</xliff:g> sekunder."</string>
- <string name="lockscreen_failed_attempts_almost_glogin" msgid="3351013842320127827">"Du har tegnet dit mønster til at låse op forkert <xliff:g id="NUMBER_0">%d</xliff:g> gange. Efter <xliff:g id="NUMBER_1">%d</xliff:g> forsøg mere vil du blive bedt om at låse din telefon op ved hjælp af dit Google-login"\n\n" Prøv igen om <xliff:g id="NUMBER_2">%d</xliff:g> sekunder."</string>
+ <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="3514742106066877476">"Du har tegnet dit oplåsningsmønster forkert <xliff:g id="NUMBER_0">%d</xliff:g> gange. "\n\n"Prøv igen om <xliff:g id="NUMBER_1">%d</xliff:g> sekunder."</string>
+ <string name="lockscreen_failed_attempts_almost_glogin" msgid="3351013842320127827">"Du har tegnet dit oplåsningsmønster forkert <xliff:g id="NUMBER_0">%d</xliff:g> gange. Efter <xliff:g id="NUMBER_1">%d</xliff:g> forsøg mere vil du blive bedt om at låse din telefon op ved hjælp af dit Google-login"\n\n" Prøv igen om <xliff:g id="NUMBER_2">%d</xliff:g> sekunder."</string>
<string name="lockscreen_too_many_failed_attempts_countdown" msgid="6251480343394389665">"Prøv igen om <xliff:g id="NUMBER">%d</xliff:g> sekunder."</string>
- <string name="lockscreen_forgot_pattern_button_text" msgid="2626999449610695930">"Har du glemt mønster?"</string>
+ <string name="lockscreen_forgot_pattern_button_text" msgid="2626999449610695930">"Har du glemt mønstret?"</string>
<string name="lockscreen_glogin_forgot_pattern" msgid="2588521501166032747">"Oplåsning af konto"</string>
- <string name="lockscreen_glogin_too_many_attempts" msgid="2446246026221678244">"For mange mønsterforsøg!"</string>
+ <string name="lockscreen_glogin_too_many_attempts" msgid="2446246026221678244">"For mange forsøg på at tegne mønstret korrekt!"</string>
<string name="lockscreen_glogin_instructions" msgid="1816635201812207709">"For at låse op skal du logge ind med din Google-konto"</string>
<string name="lockscreen_glogin_username_hint" msgid="8846881424106484447">"Brugernavn (e-mail)"</string>
<string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Adgangskode"</string>
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Log ind"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Ugyldigt brugernavn eller ugyldig adgangskode."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Kontrollerer ..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Lås op"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Lyd slået til"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Lyd slået fra"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Ryd"</string>
<string name="status_bar_no_notifications_title" msgid="4755261167193833213">"Ingen meddelelser"</string>
- <string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"Løbende"</string>
+ <string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"I gang"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"Meddelelser"</string>
<string name="battery_status_text_percent_format" msgid="7660311274698797147">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="battery_status_charging" msgid="756617993998772213">"Oplader ..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Forbind oplader"</string>
- <string name="battery_low_subtitle" msgid="7388781709819722764">"Batteriet er ved at blive tomt:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_subtitle" msgid="7388781709819722764">"Batteriet er ved at være fladt:"</string>
+ <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> eller mindre tilbage."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Batteriforbrug"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Fabrikstest mislykkedes"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"Handlingen FACTORY_TEST understøttes kun af pakker installeret i /system/app."</string>
@@ -597,12 +553,11 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"Javascript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Naviger væk fra denne side?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n" Vælg OK for at fortsætte eller Annuller for at blive på den aktuelle side."</string>
<string name="save_password_label" msgid="6860261758665825069">"Bekræft"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Tip: Dobbeltklik for at zoome ind eller ud."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"læs browserens oversigt og bogmærker"</string>
- <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Tillader programmet at læse alle de webadresser, browseren har besøgt, og alle browserens bogmærker."</string>
+ <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Tillader, at programmet læser alle de webadresser, browseren har besøgt, og alle browserens bogmærker."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skriv browserens oversigt og bogmærker"</string>
- <string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Tillader et program at ændre browseroversigten eller bogmærker, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre din browsers data."</string>
+ <string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Tillader, at et program ændrer browseroversigten eller bogmærker, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre din browsers data."</string>
<string name="save_password_message" msgid="767344687139195790">"Ønsker du, at browseren skal huske denne adgangskode?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Ikke nu"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Husk"</string>
@@ -681,7 +636,7 @@
<item quantity="one" msgid="2178576254385739855">"i morgen"</item>
<item quantity="other" msgid="2973062968038355991">"om <xliff:g id="COUNT">%d</xliff:g> dage"</item>
</plurals>
- <string name="preposition_for_date" msgid="9093949757757445117">"til <xliff:g id="DATE">%s</xliff:g>"</string>
+ <string name="preposition_for_date" msgid="9093949757757445117">"den <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"i <xliff:g id="YEAR">%s</xliff:g>"</string>
<string name="day" msgid="8144195776058119424">"dag"</string>
@@ -696,12 +651,12 @@
<string name="weeks" msgid="6509623834583944518">"uger"</string>
<string name="year" msgid="4001118221013892076">"år"</string>
<string name="years" msgid="6881577717993213522">"år"</string>
- <string name="every_weekday" msgid="8777593878457748503">"Hver ugedag (man.-fre.)"</string>
+ <string name="every_weekday" msgid="8777593878457748503">"Hverdage (man.-fre.)"</string>
<string name="daily" msgid="5738949095624133403">"Dagligt"</string>
<string name="weekly" msgid="983428358394268344">"Ugentlig hver <xliff:g id="DAY">%s</xliff:g>"</string>
<string name="monthly" msgid="2667202947170988834">"Månedligt"</string>
<string name="yearly" msgid="1519577999407493836">"Årligt"</string>
- <string name="VideoView_error_title" msgid="3359437293118172396">"Video kan ikke afspilles"</string>
+ <string name="VideoView_error_title" msgid="3359437293118172396">"Videoen kan ikke afspilles"</string>
<string name="VideoView_error_text_invalid_progressive_playback" msgid="897920883624437033">"Beklager! Denne video er ikke gyldig til streaming på denne enhed."</string>
<string name="VideoView_error_text_unknown" msgid="710301040038083944">"Beklager! Denne video kan ikke afspilles."</string>
<string name="VideoView_error_button" msgid="2822238215100679592">"OK"</string>
@@ -713,8 +668,8 @@
<string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string>
<string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string>
<string name="selectAll" msgid="6876518925844129331">"Vælg alle"</string>
- <string name="selectText" msgid="3889149123626888637">"Vælg tekst"</string>
- <string name="stopSelectingText" msgid="4157931463872320996">"Stands med at vælge tekst"</string>
+ <string name="selectText" msgid="3889149123626888637">"Marker tekst"</string>
+ <string name="stopSelectingText" msgid="4157931463872320996">"Hold op med at markere tekst"</string>
<string name="cut" msgid="3092569408438626261">"Klip"</string>
<string name="cutAll" msgid="2436383270024931639">"Klip alle"</string>
<string name="copy" msgid="2681946229533511987">"Kopier"</string>
@@ -733,7 +688,7 @@
<string name="dialog_alert_title" msgid="2049658708609043103">"Bemærk"</string>
<string name="capital_on" msgid="1544682755514494298">"TIL"</string>
<string name="capital_off" msgid="6815870386972805832">"FRA"</string>
- <string name="whichApplication" msgid="4533185947064773386">"Afslut handling ved hjælp af"</string>
+ <string name="whichApplication" msgid="4533185947064773386">"Fuldfør handling ved hjælp af"</string>
<string name="alwaysUse" msgid="4583018368000610438">"Brug som standard til denne handling."</string>
<string name="clearDefaultHintMsg" msgid="4815455344600932173">"Ryd standard i Startindstillinger > Programmer > Administrer programmer."</string>
<string name="chooseActivity" msgid="1009246475582238425">"Vælg en handling"</string>
@@ -749,16 +704,15 @@
<string name="force_close" msgid="3653416315450806396">"Tving til at lukke"</string>
<string name="report" msgid="4060218260984795706">"Rapporter"</string>
<string name="wait" msgid="7147118217226317732">"Vent"</string>
- <string name="debug" msgid="9103374629678531849">"Fejlretning"</string>
<string name="sendText" msgid="5132506121645618310">"Vælg en handling for teksten"</string>
- <string name="volume_ringtone" msgid="6885421406845734650">"Opkaldslydstyrke"</string>
- <string name="volume_music" msgid="5421651157138628171">"Medielydstyrke"</string>
- <string name="volume_music_hint_playing_through_bluetooth" msgid="9165984379394601533">"Spiller gennem Bluetooth"</string>
- <string name="volume_music_hint_silent_ringtone_selected" msgid="6158339745293431194">"Lydløs ringetone valgt"</string>
- <string name="volume_call" msgid="3941680041282788711">"Opkaldslydstyrke"</string>
- <string name="volume_bluetooth_call" msgid="2002891926351151534">"Bluetooth-lydstyrke under opkald"</string>
- <string name="volume_alarm" msgid="1985191616042689100">"Alarmlydstyrke"</string>
- <string name="volume_notification" msgid="2422265656744276715">"Meddelelseslydstyrke"</string>
+ <string name="volume_ringtone" msgid="6885421406845734650">"Lydstyrke for opkald"</string>
+ <string name="volume_music" msgid="5421651157138628171">"Lydstyrke for medier"</string>
+ <string name="volume_music_hint_playing_through_bluetooth" msgid="9165984379394601533">"Afspilning via Bluetooth"</string>
+ <string name="volume_music_hint_silent_ringtone_selected" msgid="6158339745293431194">"Lydløs ringetone er valgt"</string>
+ <string name="volume_call" msgid="3941680041282788711">"Lydstyrke for opkald"</string>
+ <string name="volume_bluetooth_call" msgid="2002891926351151534">"Lydstyrke for Bluetooth under opkald"</string>
+ <string name="volume_alarm" msgid="1985191616042689100">"Lydstyrke for alarm"</string>
+ <string name="volume_notification" msgid="2422265656744276715">"Lydstyrke for meddelelser"</string>
<string name="volume_unknown" msgid="1400219669770445902">"Lydstyrke"</string>
<string name="ringtone_default" msgid="3789758980357696936">"Standardringetone"</string>
<string name="ringtone_default_with_actual" msgid="8129563480895990372">"Standardringetone (<xliff:g id="ACTUAL_RINGTONE">%1$s</xliff:g>)"</string>
@@ -775,48 +729,46 @@
</plurals>
<string name="select_character" msgid="3365550120617701745">"Indsæt tegn"</string>
<string name="sms_control_default_app_name" msgid="7630529934366549163">"Ukendt program"</string>
- <string name="sms_control_title" msgid="7296612781128917719">"Sender SMS-beskeder"</string>
- <string name="sms_control_message" msgid="1289331457999236205">"Der sendes et stort antal SMS-beskeder. Vælg \"OK\" for at fortsætte eller \"Annuller\" for at stoppe med at sende."</string>
+ <string name="sms_control_title" msgid="7296612781128917719">"Sender sms-beskeder"</string>
+ <string name="sms_control_message" msgid="1289331457999236205">"Der sendes et stort antal sms-beskeder. Vælg \"OK\" for at fortsætte eller \"Annuller\" for at stoppe afsendelsen."</string>
<string name="sms_control_yes" msgid="2532062172402615953">"OK"</string>
<string name="sms_control_no" msgid="1715320703137199869">"Annuller"</string>
- <string name="date_time_set" msgid="5777075614321087758">"Indstil"</string>
+ <string name="date_time_set" msgid="5777075614321087758">"Angiv"</string>
<string name="default_permission_group" msgid="2690160991405646128">"Standard"</string>
<string name="no_permissions" msgid="7283357728219338112">"Der kræves ingen tilladelser"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Skjul"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Vis alle"</b></string>
<string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Indlæser ..."</string>
- <string name="usb_storage_title" msgid="5901459041398751495">"USB forbundet"</string>
+ <string name="usb_storage_title" msgid="5901459041398751495">"USB er tilsluttet"</string>
<string name="usb_storage_message" msgid="2759542180575016871">"Du har forbundet din telefon til din computer via USB. Vælg \"Monter\", hvis du ønsker at kopiere filer mellem din computer og din telefons SD-kort."</string>
<string name="usb_storage_button_mount" msgid="8063426289195405456">"Monter"</string>
<string name="usb_storage_button_unmount" msgid="6092146330053864766">"Indsæt ikke"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Der opstod et problem med at bruge dit SD-kort til USB-lagring."</string>
- <string name="usb_storage_notification_title" msgid="8175892554757216525">"USB forbundet"</string>
+ <string name="usb_storage_notification_title" msgid="8175892554757216525">"USB er tilsluttet"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Vælg for at kopiere filer til/fra din computer."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Slå USB-lagringen fra"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Vælg for at slå USB-lagring fra."</string>
<string name="usb_storage_stop_title" msgid="6014127947456185321">"Slå USB-lagring fra"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Inden du slår USB-lagringen fra, skal du sørge for, at du demonterer USB-værten. Vælg \"Slå fra\" for at slå USB-lagringen fra."</string>
+ <string name="usb_storage_stop_message" msgid="2390958966725232848">"Inden du slår USB-lagringen fra, skal du sørge for, at USB-værten er demonteret. Vælg \"Slå fra\" for at slå USB-lagringen fra."</string>
<string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Slå fra"</string>
<string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Annuller"</string>
<string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Der opstod et problem med at slå USB-lagringen fra. Sørg for, at du har demonteret USB-værten, og prøv så igen."</string>
<string name="extmedia_format_title" msgid="8663247929551095854">"Formater SD-kort"</string>
<string name="extmedia_format_message" msgid="3621369962433523619">"Er du sikker på, du ønsker at formatere SD-kortet? Alle data på kortet mistes."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Formater"</string>
- <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-fejlretning forbundet"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_title" msgid="6729044778949189918">"USB-fejlretning er tilsluttet"</string>
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Vælg for at deaktivere USB-fejlretning."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Vælg indtastningsmetode"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"kandidater"</u></string>
- <string name="ext_media_checking_notification_title" msgid="5457603418970994050">"Forbereder SD-kort"</string>
+ <string name="ext_media_checking_notification_title" msgid="5457603418970994050">"Forbereder SD-kortet"</string>
<string name="ext_media_checking_notification_message" msgid="8287319882926737053">"Kontrollerer for fejl."</string>
- <string name="ext_media_nofs_notification_title" msgid="780477838241212997">"Blankt SD-kort"</string>
+ <string name="ext_media_nofs_notification_title" msgid="780477838241212997">"Tomt SD-kort"</string>
<string name="ext_media_nofs_notification_message" msgid="3817704088027829380">"SD-kortet er tomt eller har et ikke understøttet filsystem."</string>
<string name="ext_media_unmountable_notification_title" msgid="6410723906019100189">"Beskadiget SD-kort"</string>
- <string name="ext_media_unmountable_notification_message" msgid="6902531775948238989">"SD-kort beskadiget. Du bliver muligvis nødt til at omformatere det."</string>
- <string name="ext_media_badremoval_notification_title" msgid="6872152882604407837">"SD-kort blev uventet fjernet"</string>
+ <string name="ext_media_unmountable_notification_message" msgid="6902531775948238989">"SD-kortet er beskadiget. Du bliver muligvis nødt til at formatere det igen."</string>
+ <string name="ext_media_badremoval_notification_title" msgid="6872152882604407837">"SD-kortet blev fjernet uventet"</string>
<string name="ext_media_badremoval_notification_message" msgid="7260183293747448241">"Demonter SD-kortet inden fjernelse for at undgå tab af data."</string>
<string name="ext_media_safe_unmount_notification_title" msgid="6729801130790616200">"SD-kortet kan fjernes sikkert"</string>
<string name="ext_media_safe_unmount_notification_message" msgid="568841278138377604">"Du kan nu fjerne SD-kortet."</string>
@@ -826,33 +778,40 @@
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"opdater brugerstatistikker for komponenter"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Tillader ændring af indsamlede brugerstatistikker for komponenter. Ikke til brug til normale programmer."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Tryk to gange for zoomkontrol"</string>
- <string name="gadget_host_error_inflating" msgid="2613287218853846830">"Der opstod en fejl under forøgelsen af widgeten"</string>
+ <string name="gadget_host_error_inflating" msgid="2613287218853846830">"Der opstod en fejl under forøgelsen af widgetten"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Gå"</string>
<string name="ime_action_search" msgid="658110271822807811">"Søg"</string>
<string name="ime_action_send" msgid="2316166556349314424">"Send"</string>
<string name="ime_action_next" msgid="3138843904009813834">"Næste"</string>
- <string name="ime_action_done" msgid="8971516117910934605">"Færdig"</string>
+ <string name="ime_action_done" msgid="8971516117910934605">"Udfør"</string>
<string name="ime_action_default" msgid="2840921885558045721">"Udfør"</string>
<string name="dial_number_using" msgid="5789176425167573586">"Ring til nummer"\n"ved hjælp af <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="create_contact_using" msgid="4947405226788104538">"Opret kontakt"\n"ved hjælp af <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"kontrolleret"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"ikke kontrolleret"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Tillad"</string>
<string name="deny" msgid="2081879885755434506">"Afvis"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Der er anmodet om tilladelse"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Der er anmodet om tilladelse"\n"til kontoen <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Inputmetode"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Synkroniser"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Tilgængelighed"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Tapet"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Skift tapet"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Point-to-Point Tunneling Protocol"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Layer 2 Tunneling Protocol"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"L2TP/IPSec VPN baseret på forhåndsdelt nøglekodning"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Certifikatbaseret L2TP/IPSec VPN"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index af68303c..9ad1614 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Auf die Datei konnte nicht zugegriffen werden."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Die angeforderte Datei wurde nicht gefunden."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Es werden zurzeit zu viele Anfragen verarbeitet. Versuchen Sie es später erneut."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Fehler bei Anmeldung für <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Synchronisieren"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synchronisieren"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Zu viele <xliff:g id="CONTENT_TYPE">%s</xliff:g> gelöscht."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Ihren physischen Standort überwachen"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Netzwerkkommunikation"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Ermöglicht Anwendungen den Zugriff auf verschiedene Netzwerkfunktionen."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Ihre Konten"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Zugriff auf verfügbare Konten"</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Hardware-Steuerelemente"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Direkter Zugriff auf Hardware über Headset"</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Anrufe"</string>
@@ -180,7 +177,7 @@
<string name="permdesc_writeSms" msgid="6299398896177548095">"Ermöglicht einer Anwendung, auf Ihrem Telefon oder Ihrer SIM-Karte gespeicherte Kurznachrichten zu bearbeiten. Schädliche Anwendungen löschen möglicherweise Ihre Nachrichten."</string>
<string name="permlab_receiveWapPush" msgid="8258226427716551388">"WAP-Nachrichten empfangen"</string>
<string name="permdesc_receiveWapPush" msgid="5979623826128082171">"Ermöglicht der Anwendung, WAP-Mitteilungen zu empfangen und zu verarbeiten. Schädliche Anwendungen können Ihre Nachrichten möglicherweise überwachen oder löschen, bevor sie angezeigt werden."</string>
- <string name="permlab_getTasks" msgid="5005277531132573353">"Laufende Anwendungen abrufen"</string>
+ <string name="permlab_getTasks" msgid="5005277531132573353">"laufende Anwendungen abrufen"</string>
<string name="permdesc_getTasks" msgid="7048711358713443341">"Ermöglicht der Anwendung, Informationen zu aktuellen und kürzlich ausführten Aufgaben abzurufen. Schädliche Anwendungen können so eventuell geheime Informationen zu anderen Anwendungen entdecken."</string>
<string name="permlab_reorderTasks" msgid="5669588525059921549">"Laufende Anwendungen neu ordnen"</string>
<string name="permdesc_reorderTasks" msgid="126252774270522835">"Ermöglicht einer Anwendung, Aufgaben in den Vorder- und Hintergrund zu verschieben. Schädliche Anwendungen können so ohne Ihr Zutun eine Anzeige im Vordergrund erzwingen."</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Ermöglicht einer Anwendung, die Fehlerbeseitigung für eine andere Anwendung zu aktivieren. Schädliche Anwendungen können so andere Anwendungen löschen."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"UI-Einstellungen ändern"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Ermöglicht einer Anwendung, die aktuelle Konfiguration zu ändern, etwa das Gebietsschema oder die Schriftgröße."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"Andere Anwendungen neu starten"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Ermöglicht einer Anwendung, den Neustart anderer Anwendungen zu erzwingen."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"Schließen von Anwendung erzwingen"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Ermöglicht einer Anwendung, alle Aktivitäten, die im Vordergrund ablaufen, zu beenden und in den Hintergrund zu schieben. Sollte nicht für normale Anwendungen benötigt werden."</string>
<string name="permlab_dump" msgid="1681799862438954752">"Systeminternen Status abrufen"</string>
@@ -256,9 +259,9 @@
<string name="permdesc_diagnostic" msgid="3121238373951637049">"Ermöglicht einer Anwendung, alle Elemente in der Diagnosegruppe zu lesen und zu bearbeiten, etwa Dateien in \"/dev\". Dies könnte eine potenzielle Gefährdung für die Stabilität und Sicherheit des Systems darstellen und sollte NUR für Hardware-spezifische Diagnosen des Herstellers oder Netzbetreibers verwendet werden."</string>
<string name="permlab_changeComponentState" msgid="79425198834329406">"Anwendungskomponenten aktivieren oder deaktivieren"</string>
<string name="permdesc_changeComponentState" msgid="4569107043246700630">"Ermöglicht einer Anwendung, die Komponente einer anderen Anwendung nach Belieben zu aktivieren oder zu deaktivieren. Schädliche Anwendungen können so wichtige Funktionen des Telefons deaktivieren. Bei der Erteilung von Berechtigungen ist daher Vorsicht geboten, da die Anwendungskomponenten unbrauchbar, inkonsistent und unstabil werden können."</string>
- <string name="permlab_setPreferredApplications" msgid="3393305202145172005">"Bevorzugte Einstellungen festlegen"</string>
+ <string name="permlab_setPreferredApplications" msgid="3393305202145172005">"bevorzugte Einstellungen festlegen"</string>
<string name="permdesc_setPreferredApplications" msgid="760008293501937546">"Ermöglicht einer Anwendung, Ihre bevorzugten Einstellungen zu ändern. Schädliche Anwendungen können so laufende Anwendungen ohne Ihr Wissen ändern, damit die vorhandenen Anwendungen private Daten von Ihnen sammeln."</string>
- <string name="permlab_writeSettings" msgid="1365523497395143704">"Allgemeine Systemeinstellungen ändern"</string>
+ <string name="permlab_writeSettings" msgid="1365523497395143704">"allgemeine Systemeinstellungen ändern"</string>
<string name="permdesc_writeSettings" msgid="838789419871034696">"Ermöglicht einer Anwendung, die Einstellungsdaten des Systems zu ändern. Schädliche Anwendungen können so die Systemkonfiguration beschädigen."</string>
<string name="permlab_writeSecureSettings" msgid="204676251876718288">"Sicherheitseinstellungen für das System ändern"</string>
<string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Der Anwendung wird das Ändern der Sicherheitseinstellungsdaten des Systems ermöglicht. Nicht für normale Anwendungen vorgesehen."</string>
@@ -356,7 +359,7 @@
<string name="permdesc_useCredentials" msgid="7416570544619546974">"Ermöglicht einer Anwendung, Authentifizierungs-Token anzufordern."</string>
<string name="permlab_accessNetworkState" msgid="6865575199464405769">"Netzwerkstatus anzeigen"</string>
<string name="permdesc_accessNetworkState" msgid="558721128707712766">"Ermöglicht einer Anwendung, den Status aller Netzwerke anzuzeigen."</string>
- <string name="permlab_createNetworkSockets" msgid="9121633680349549585">"Uneingeschränkter Internetzugriff"</string>
+ <string name="permlab_createNetworkSockets" msgid="9121633680349549585">"uneingeschränkter Internetzugriff"</string>
<string name="permdesc_createNetworkSockets" msgid="4593339106921772192">"Ermöglicht einer Anwendung, Netzwerk-Sockets einzurichten."</string>
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"Einstellungen für Zugriffspunktname schreiben"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Ermöglicht einer Anwendung, die APN-Einstellungen wie Proxy und Port eines Zugriffspunkts zu ändern."</string>
@@ -382,16 +385,20 @@
<string name="permdesc_writeSyncSettings" msgid="2498201614431360044">"Ermöglicht einer Anwendung, die Synchronisierungseinstellungen zu ändern, etwa ob die Synchronisierung für Kontakte aktiviert ist oder nicht."</string>
<string name="permlab_readSyncStats" msgid="7396577451360202448">"Synchronisierungsstatistiken lesen"</string>
<string name="permdesc_readSyncStats" msgid="7511448343374465000">"Ermöglicht einer Anwendung, die Synchronisierungsstatistiken zu lesen, etwa den Verlauf der bereits durchgeführten Synchronisierungen."</string>
- <string name="permlab_subscribedFeedsRead" msgid="4756609637053353318">"Abonnierte Feeds lesen"</string>
+ <string name="permlab_subscribedFeedsRead" msgid="4756609637053353318">"abonnierte Feeds lesen"</string>
<string name="permdesc_subscribedFeedsRead" msgid="3622200625634207660">"Ermöglicht einer Anwendung, Details zu den zurzeit synchronisierten Feeds abzurufen."</string>
- <string name="permlab_subscribedFeedsWrite" msgid="9015246325408209296">"Abonnierte Feeds schreiben"</string>
+ <string name="permlab_subscribedFeedsWrite" msgid="9015246325408209296">"abonnierte Feeds schreiben"</string>
<string name="permdesc_subscribedFeedsWrite" msgid="8121607099326533878">"Ermöglicht einer Anwendung, Änderungen an den kürzlich synchronisierten Feeds vorzunehmen. Schädliche Anwendungen könnten so Ihre synchronisierten Feeds ändern."</string>
- <string name="permlab_readDictionary" msgid="432535716804748781">"Nutzerdefiniertes Wörterbuch lesen"</string>
+ <string name="permlab_readDictionary" msgid="432535716804748781">"nutzerdefiniertes Wörterbuch lesen"</string>
<string name="permdesc_readDictionary" msgid="1082972603576360690">"Erlaubt einer Anwendung, alle privaten Wörter, Namen und Ausdrücke zu lesen, die ein Nutzer in seinem Wörterbuch gespeichert hat."</string>
<string name="permlab_writeDictionary" msgid="6703109511836343341">"in nutzerdefiniertes Wörterbuch schreiben"</string>
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Erlaubt einer Anwendung, neue Wörter in das Wörterbuch des Nutzers zu schreiben."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"SD-Karten-Inhalt ändern/löschen"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Ermöglicht einer Anwendung, auf die SD-Karte zu schreiben"</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Privat"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Benutzerdefiniert"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Privat"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Arbeit"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax (Beruflich)"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax (privat)"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Andere"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Rückruf"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Auto"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Firma (Hauptnummer)"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Hauptnummer"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Weitere Faxnummer"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY/TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Handy (geschäftlich)"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pager (beruflich)"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Zweite Nummer"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Geburtstag"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Jahrestag"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Termin"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Benutzerdefiniert"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Privat"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Beruflich"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Andere"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Benutzerdefiniert"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Privat"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Beruflich"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Andere"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Benutzerdefiniert"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Privat"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Beruflich"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Andere"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Benutzerdefiniert"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Beruflich"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Andere"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Benutzerdefiniert"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"über <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> über <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN-Code eingeben"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Falscher PIN-Code!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Drücken Sie zum Entsperren die Menütaste und dann auf \"0\"."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Tut uns leid. Versuchen Sie es noch einmal."</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Wird geladen (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Aufgeladen"</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Bitte Ladegerät anschließen"</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Keine SIM-Karte."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Keine SIM-Karte im Telefon."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Anmelden"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Ungültiger Nutzername oder ungültiges Passwort."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Überprüfung..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Entsperren"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Ton ein"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Ton aus"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Löschen"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"Wird aufgeladen..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Ladegerät anschließen"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Akku ist fast leer."</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> oder weniger verbleiben."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Akkuverbrauch"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Werkstest fehlgeschlagen"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"Die Aktion FACTORY_TEST wird nur für unter \"/system/app\" gespeicherte Pakete unterstützt."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Von dieser Seite navigieren?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Wählen Sie \"OK\", um fortzufahren, oder wählen Sie \"Abbrechen\", um auf der aktuellen Seite zu bleiben."</string>
<string name="save_password_label" msgid="6860261758665825069">"Bestätigen"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Tipp: Zum Heranzoomen und Vergrößern zweimal tippen"</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"Browserverlauf und Lesezeichen lesen"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Ermöglicht der Anwendung, alle URLs, die mit dem Browser besucht wurden, sowie alle Lesezeichen des Browsers zu lesen."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"Browserverlauf und Lesezeichen schreiben"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Schließen erzwingen"</string>
<string name="report" msgid="4060218260984795706">"Bericht"</string>
<string name="wait" msgid="7147118217226317732">"Warten"</string>
- <string name="debug" msgid="9103374629678531849">"Fehler suchen"</string>
<string name="sendText" msgid="5132506121645618310">"Aktion für Text auswählen"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Klingeltonlautstärke"</string>
<string name="volume_music" msgid="5421651157138628171">"Medienlautstärke"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"Möchten Sie die SD-Karte wirklich formatieren? Alle Daten auf Ihrer Karte gehen dann verloren."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Format"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"USB-Debugging verbunden"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Zum Deaktivieren des USB-Debugging auswählen"</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Eingabemethode auswählen"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"Kandidaten"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Neuer Kontakt"\n"mit <xliff:g id="NUMBER">%s</xliff:g> erstellen"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"aktiviert"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"nicht aktiviert"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Zulassen"</string>
<string name="deny" msgid="2081879885755434506">"Ablehnen"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Berechtigung angefordert"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Berechtigung erforderlich"\n"für Konto <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Eingabemethode"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Synchronisieren"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Eingabehilfen"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Hintergrund"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Hintergrundbild ändern"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Point-to-Point-Tunneling-Protokoll"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Layer-2-Tunneling-Protokoll"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"L2TP/IPSec-VPN mit vorinstalliertem Schlüssel"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Zertifikat mit vorinstalliertem Schlüssel"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index a4ec8c1..33a3a41 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Η πρόσβαση στο αρχείο δεν ήταν δυνατή."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Το αρχείο που ζητήθηκε δεν βρέθηκε."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Πραγματοποιείται επεξεργασία πάρα πολλών αιτημάτων. Προσπαθήστε ξανά αργότερα."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Σφάλμα σύνδεσης για <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Συγχρονισμός"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Συγχρονισμός"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Πάρα πολλές <xliff:g id="CONTENT_TYPE">%s</xliff:g> διαγραφές."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Παρακολούθηση της φυσικής τοποθεσίας σας"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Επικοινωνία δικτύου"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Επιτρέπει σε εφαρμογές να αποκτήσουν πρόσβαση σε διάφορες λειτουργίες δικτύου."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Οι λογαριασμοί σας"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Πρόσβαση στους διαθέσιμους λογαριασμούς."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Στοιχεία ελέγχου υλικού"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Άμεση πρόσβαση στο υλικό της συσκευής τηλεφώνου."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Τηλεφωνικές κλήσεις"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Επιτρέπει σε μια εφαρμογή να ενεργοποιήσει τον εντοπισμό σφαλμάτων για μια άλλη εφαρμογή. Κακόβουλες εφαρμογές μπορούν να το χρησιμοποιήσουν για να τερματίσουν άλλες εφαρμογές."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"αλλαγή των ρυθμίσεων του UI"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Επιτρέπει σε μια εφαρμογή την αλλαγή της τρέχουσας διαμόρφωσης, όπως οι τοπικές ρυθμίσεις ή το μέγεθος γραμματοσειράς γενικά."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"επανεκκίνηση άλλων εφαρμογών"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Επιτρέπει σε μια εφαρμογή να πραγματοποιήσει αναγκαστική επανεκκίνηση άλλων εφαρμογών."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"αναγκαστικός τερματισμός εφαρμογής"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Επιτρέπει σε μια εφαρμογή να εξαναγκάσει οποιαδήποτε δραστηριότητα που βρίσκεται στο προσκήνιο να κλείσει και να μεταβεί στο φόντο. Δεν είναι απαραίτητο για κανονικές εφαρμογές."</string>
<string name="permlab_dump" msgid="1681799862438954752">"ανάκτηση εσωτερικής κατάστασης συστήματος"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Επιτρέπει σε μια εφαρμογή την εγγραφή νέων λέξεων στο λεξικό χρήστη."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"τροποποίηση/διαγραφή περιεχομένων κάρτας SD"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Επιτρέπει στην εφαρμογή την εγγραφή στην κάρτα SD."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Οικία"</item>
<item msgid="869923650527136615">"Κινητό"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Προσαρμοσμένο"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Οικία"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Κινητό"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Εργασία"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Φαξ εργασίας"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Φαξ οικίας"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Βομβητής"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Άλλο"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Επανάκληση"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Αυτοκίνητο"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Κύρια εταιρική γραμμή"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Κύριος"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Άλλο fax"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Πομπός"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Τέλεξ"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Τηλέφωνο TTY/TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Κινητό τηλέφωνο εργασίας"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Βομβητής εργασίας"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Βοηθός"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Γενέθλια"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Επέτειος"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Συμβάν"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Προσαρμοσμένο"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Οικία"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Εργασία"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Άλλο"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Κινητό"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Προσαρμοσμένο"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Οικία"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Εργασία"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Άλλο"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Προσαρμοσμένο"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Οικία"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Εργασία"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Άλλο"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Προσαρμοσμένο"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Εργασία"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Άλλο"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Προσαρμοσμένο"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"μέσω <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> μέσω <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Πληκτρολογήστε τον κωδικό αριθμό PIN"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Εσφαλμένος κωδικός αριθμός PIN!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Για ξεκλείδωμα, πατήστε το πλήκτρο Menu και, στη συνέχεια, το πλήκτρο 0."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Προσπαθήστε αργότερα"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Φόρτιση (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Φορτίστηκε."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Συνδέστε τον φορτιστή."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Δεν υπάρχει κάρτα SIM."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Δεν υπάρχει κάρτα SIM στο τηλέφωνο."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Σύνδεση"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Μη έγκυρο όνομα χρήστη ή κωδικός πρόσβασης."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Έλεγχος..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Ξεκλείδωμα"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Ενεργοποίηση ήχου"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Απενεργοποίηση ήχου"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Εκκαθάριση"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"Φόρτιση..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Συνδέστε τον φορτιστή"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Η στάθμη της μπαταρίας είναι χαμηλή:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"Απομένει <xliff:g id="NUMBER">%d%%</xliff:g> ή λιγότερο."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Χρήση μπαταρίας"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Η εργοστασιακή δοκιμή απέτυχε"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"Η ενέργεια FACTORY_TEST υποστηρίζεται μόνο για πακέτα που είναι εγκατεστημένα στον κατάλογο /system/app."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Απομάκρυνση από αυτή τη σελίδα;"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Επιλέξτε OK για συνέχεια, ή Ακύρωση για παραμονή στην τρέχουσα σελίδα."</string>
<string name="save_password_label" msgid="6860261758665825069">"Επιβεβαίωση"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Συμβουλή: διπλό άγγιγμα για μεγέθυνση και σμίκρυνση."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"ανάγνωση ιστορικού και σελιδοδεικτών προγράμματος περιήγησης"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Επιτρέπει στην εφαρμογή την ανάγνωση όλων των διευθύνσεων URL που το πρόγραμμα περιήγησης έχει επισκεφθεί και όλων των σελιδοδεικτών του προγράμματος περιήγησης."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"εγγραφή ιστορικού και σελιδοδεικτών προγράμματος περιήγησης"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Αναγκαστικό κλείσιμο"</string>
<string name="report" msgid="4060218260984795706">"Αναφορά"</string>
<string name="wait" msgid="7147118217226317732">"Αναμονή"</string>
- <string name="debug" msgid="9103374629678531849">"Εντοπισμός σφαλμάτων"</string>
<string name="sendText" msgid="5132506121645618310">"Επιλέξτε μια ενέργεια για το κείμενο"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Ένταση ειδοποίησης ήχου"</string>
<string name="volume_music" msgid="5421651157138628171">"Ένταση ήχου πολυμέσων"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"Είστε βέβαιοι ότι θέλετε να διαμορφώσετε την κάρτα SD; Όλα τα δεδομένα στην κάρτα σας θα χαθούν."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Διαμόρφωση"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"Συνδέθηκε ο εντοπισμός σφαλμάτων USB"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Επιλογή για απενεργοποίηση του εντοπισμού σφαλμάτων USB."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Επιλογή μεθόδου εισόδου"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"υποψήφιοι"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Δημιουργία επαφής"\n"με τη χρήση του <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"επιλεγμένο"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"δεν ελέγχθηκε"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Να επιτρέπεται"</string>
<string name="deny" msgid="2081879885755434506">"Άρνηση"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Απαιτείται άδεια"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Ζητήθηκε άδεια"\n"για τον λογαριασμό <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Μέθοδος εισόδου"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Συγχρονισμός"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Προσβασιμότητα"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Ταπετσαρία"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Αλλαγή ταπετσαρίας"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Πρωτόκολλο Point-to-Point Tunneling Protocol (PPTP)"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Πρωτόκολλο Layer 2 Tunneling Protocol (L2TP)"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Κλειδί pre-shared βάσει L2TP/IPSec VPN"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Πιστοποιητικό βάσει L2TP/IPSec VPN"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 025ae60..806d64e 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -185,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Admite una aplicación que activa la depuración en otra aplicación. Las aplicaciones maliciosas pueden utilizarlo para suprimir otras aplicaciones."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"cambiar tu configuración de la interfaz de usuario"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Admite una aplicación para cambiar la configuración actual, como el tamaño de fuente local o general."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"reiniciar otras aplicaciones"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Admite una aplicación que reinicia otras aplicaciones por la fuerza."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"provocar que la aplicación se acerque"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Admite una aplicación que provoca que cualquier actividad del fondo se acerque y vuelva a alejarse. Se debe evitar utilizarlo en aplicaciones normales."</string>
<string name="permlab_dump" msgid="1681799862438954752">"recuperar el estado interno del sistema"</string>
@@ -389,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Admite una aplicación que escribe palabras nuevas en el diccionario del usuario."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"modificar/suprimir el contenido de la tarjeta SD"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Admite que una aplicación escriba en la tarjeta SD."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Página principal"</item>
<item msgid="869923650527136615">"Celular"</item>
@@ -520,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Inicia sesión"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nombre de usuario o contraseña incorrecta."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Comprobando..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Desbloquear"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Sonido encendido"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Sonido apagado"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Borrar"</string>
@@ -691,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Provocar acercamiento"</string>
<string name="report" msgid="4060218260984795706">"Notificar"</string>
<string name="wait" msgid="7147118217226317732">"Espera"</string>
- <string name="debug" msgid="9103374629678531849">"Depurar"</string>
<string name="sendText" msgid="5132506121645618310">"Selecciona una acción para el texto"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Volumen del timbre"</string>
<string name="volume_music" msgid="5421651157138628171">"Volumen de los medios"</string>
@@ -777,6 +789,12 @@
<string name="create_contact_using" msgid="4947405226788104538">"Crear contacto "\n"con <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"verificado"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"no verificado"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Permitir"</string>
<string name="deny" msgid="2081879885755434506">"Denegar"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Permiso solicitado"</string>
@@ -790,4 +808,10 @@
<string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocolo de túnel de nivel 2"</string>
<string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Clave previamente compartida según L2TP/IPSec VPN"</string>
<string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Certificado según L2TP/IPSec VPN"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
+ <skip />
+ <!-- no translation found for reset (2448168080964209908) -->
+ <skip />
+ <!-- no translation found for submit (1602335572089911941) -->
+ <skip />
</resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index ebe1bb0..4626326 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -101,7 +101,7 @@
<string name="httpErrorUnsupportedAuthScheme" msgid="2781440683514730227">"No se admite el esquema de autenticación del sitio."</string>
<string name="httpErrorAuth" msgid="7293960746955020542">"La autenticación no se ha realizado correctamente."</string>
<string name="httpErrorProxyAuth" msgid="1788207010559081331">"La autenticación mediante el servidor proxy no se ha realizado correctamente."</string>
- <string name="httpErrorConnect" msgid="7623096283505770433">"La conexión al servidor no se ha realizado correctamente."</string>
+ <string name="httpErrorConnect" msgid="7623096283505770433">"La conexión con el servidor no se ha realizado correctamente."</string>
<string name="httpErrorIO" msgid="5047872902739125260">"El servidor no ha podido establecer la comunicación. Vuelve a intentarlo más tarde."</string>
<string name="httpErrorTimeout" msgid="4743403703762883954">"Se ha agotado el tiempo de espera de conexión al servidor."</string>
<string name="httpErrorRedirectLoop" msgid="8679596090392779516">"La página contiene demasiados redireccionamientos de servidor."</string>
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"No se ha podido acceder al archivo."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"No se ha encontrado el archivo solicitado."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Se están procesando demasiadas solicitudes. Vuelve a intentarlo más tarde."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Error de acceso a la cuenta <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Sincronización"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Sincronización"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Demasiadas eliminaciones de <xliff:g id="CONTENT_TYPE">%s</xliff:g>"</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Controlar su ubicación física"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Comunicación de red"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Permite que las aplicaciones accedan a distintas funciones de red."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Tus cuentas"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Acceder a las cuentas disponibles"</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Controles de hardware"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Acceso directo al hardware del móvil"</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Llamadas de teléfono"</string>
@@ -159,7 +156,7 @@
<string name="permgrouplab_systemTools" msgid="4652191644082714048">"Herramientas del sistema"</string>
<string name="permgroupdesc_systemTools" msgid="8162102602190734305">"Acceso de nivel inferior y control del sistema"</string>
<string name="permgrouplab_developmentTools" msgid="3446164584710596513">"Herramientas de desarrollo"</string>
- <string name="permgroupdesc_developmentTools" msgid="9056431193893809814">"Funciones necesarias sólo para desarrolladores de aplicaciones"</string>
+ <string name="permgroupdesc_developmentTools" msgid="9056431193893809814">"Funciones necesarias solo para desarrolladores de aplicaciones"</string>
<string name="permgrouplab_storage" msgid="1971118770546336966">"Almacenamiento"</string>
<string name="permgroupdesc_storage" msgid="9203302214915355774">"Acceder a la tarjeta SD"</string>
<string name="permlab_statusBar" msgid="7417192629601890791">"inhabilitar o modificar la barra de estado"</string>
@@ -183,13 +180,19 @@
<string name="permlab_getTasks" msgid="5005277531132573353">"recuperar aplicaciones en ejecución"</string>
<string name="permdesc_getTasks" msgid="7048711358713443341">"Permite que la aplicación recupere información sobre tareas que se están ejecutando en este momento o que se han ejecutado recientemente. Puede permitir que las aplicaciones malintencionadas vean información privada sobre otras aplicaciones."</string>
<string name="permlab_reorderTasks" msgid="5669588525059921549">"reorganizar aplicaciones en ejecución"</string>
- <string name="permdesc_reorderTasks" msgid="126252774270522835">"Permite que una aplicación mueva tareas a segundo plano y a primer plano. Las aplicaciones malintencionadas pueden aparecer en primer plano sin su control."</string>
+ <string name="permdesc_reorderTasks" msgid="126252774270522835">"Permite que una aplicación mueva tareas a segundo plano y a primer plano. Las aplicaciones malintencionadas pueden aparecer en primer plano sin tu control."</string>
<string name="permlab_setDebugApp" msgid="4339730312925176742">"habilitar depuración de aplicación"</string>
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Permite que una aplicación active la depuración de otra aplicación. Las aplicaciones malintencionadas pueden utilizar este permiso para desactivar otras aplicaciones."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"cambiar la configuración de la interfaz de usuario"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Permite que una aplicación cambie la configuración actual como, por ejemplo, la configuración local o el tamaño de fuente general."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"reiniciar otras aplicaciones"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Permite que una aplicación reinicie de forma forzosa otras aplicaciones."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"forzar el cierre de la aplicación"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Permite que una aplicación fuerce a cualquier actividad en segundo plano a cerrarse y volver a la pantalla anterior. No debería ser necesario nunca para las aplicaciones normales."</string>
<string name="permlab_dump" msgid="1681799862438954752">"recuperar estado interno del sistema"</string>
@@ -199,7 +202,7 @@
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"evitar cambios de aplicación"</string>
<string name="permdesc_stopAppSwitches" msgid="3857886086919033794">"Evita que el usuario cambie a otra aplicación."</string>
<string name="permlab_runSetActivityWatcher" msgid="7811586187574696296">"supervisar y controlar la ejecución de todas las aplicaciones"</string>
- <string name="permdesc_runSetActivityWatcher" msgid="3228701938345388092">"Permite que una aplicación supervise y controle la ejecución de las actividades por parte del sistema. Las aplicaciones malintencionadas pueden vulnerar la seguridad del sistema. Este permiso sólo es necesario para tareas de desarrollo, nunca para el uso habitual del teléfono."</string>
+ <string name="permdesc_runSetActivityWatcher" msgid="3228701938345388092">"Permite que una aplicación supervise y controle la ejecución de las actividades por parte del sistema. Las aplicaciones malintencionadas pueden vulnerar la seguridad del sistema. Este permiso solo es necesario para tareas de desarrollo, nunca para el uso habitual del teléfono."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"enviar emisión eliminada de paquete"</string>
<string name="permdesc_broadcastPackageRemoved" msgid="3453286591439891260">"Permite que una aplicación emita una notificación de que se ha eliminado un paquete de aplicación. Las aplicaciones malintencionadas pueden utilizar este permiso para interrumpir la ejecución de cualquier otra aplicación."</string>
<string name="permlab_broadcastSmsReceived" msgid="5689095009030336593">"enviar una emisión recibida mediante SMS"</string>
@@ -287,7 +290,7 @@
<string name="permlab_installLocationProvider" msgid="6578101199825193873">"permiso para instalar un proveedor de ubicación"</string>
<string name="permdesc_installLocationProvider" msgid="5449175116732002106">"Crear fuentes de origen simuladas para realizar pruebas. Las aplicaciones malintencionadas pueden utilizar este permiso para sobrescribir la ubicación o el estado devueltos por orígenes de ubicación reales, tales como los proveedores de red o GPS, o para controlar y notificar tu ubicación a una fuente externa."</string>
<string name="permlab_accessFineLocation" msgid="8116127007541369477">"precisar la ubicación (GPS)"</string>
- <string name="permdesc_accessFineLocation" msgid="7411213317434337331">"Permite precisar las fuentes de ubicación como, por ejemplo, el sistema de posicionamiento global, en el teléfono, en los casos en que estén disponibles. Las aplicaciones malintencionadas pueden utilizar este permiso para determinar dónde se encuentra en usuario y pueden consumir batería adicional."</string>
+ <string name="permdesc_accessFineLocation" msgid="7411213317434337331">"Permite precisar las fuentes de ubicación como, por ejemplo, el sistema de posicionamiento global, en el teléfono, en los casos en que estén disponibles. Las aplicaciones malintencionadas pueden utilizar este permiso para determinar dónde se encuentra el usuario y pueden consumir batería adicional."</string>
<string name="permlab_accessCoarseLocation" msgid="4642255009181975828">"ubicación común (basada en red)"</string>
<string name="permdesc_accessCoarseLocation" msgid="8235655958070862293">"Acceder a fuentes de ubicación comunes como, por ejemplo, la base de datos de red de un teléfono móvil, para determinar una ubicación telefónica aproximada, en los casos en que esté disponible. Las aplicaciones malintencionadas pueden utilizar este permiso para determinar dónde te encuentras aproximadamente."</string>
<string name="permlab_accessSurfaceFlinger" msgid="2363969641792388947">"acceder a SurfaceFlinger"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Permite a una aplicación escribir palabras nuevas en el diccionario del usuario."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"modificar/eliminar contenido de la tarjeta SD"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Permite que una aplicación escriba en la tarjeta SD."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Casa"</item>
<item msgid="869923650527136615">"Móvil"</item>
@@ -409,7 +416,7 @@
<item msgid="2374913952870110618">"Personalizar"</item>
</string-array>
<string-array name="postalAddressTypes">
- <item msgid="6880257626740047286">"Casa"</item>
+ <item msgid="6880257626740047286">"Página principal"</item>
<item msgid="5629153956045109251">"Trabajo"</item>
<item msgid="4966604264500343469">"Otra"</item>
<item msgid="4932682847595299369">"Personalizar"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Personalizado"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Casa"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Móvil"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Trabajo"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax del trabajo"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax de casa"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Buscapersonas"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Otro"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Devolución de llamada"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Coche"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Teléfono principal de la empresa"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"RDSI"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Principal"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Otro fax"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Télex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Móvil del trabajo"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Buscapersonas del trabajo"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Asistente"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Cumpleaños"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Aniversario"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Evento"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Personalizado"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Casa"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Trabajo"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Otro"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Móvil"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Personalizada"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Casa"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Trabajo"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Otro"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Personalizada"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Casa"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Trabajo"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Otro"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Personalizada"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo!"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Trabajo"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Otra"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Personalizada"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"a través de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> a través de <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Introduce el código PIN"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"El código PIN es incorrecto."</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Para desbloquear el teléfono, pulsa la tecla de menú y, a continuación, pulsa 0."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Inténtalo de nuevo"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Cargando (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Cargado"</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Conecta el cargador"</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Falta la tarjeta SIM"</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"No se ha insertado ninguna tarjeta SIM en el teléfono."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Acceder"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nombre de usuario o contraseña no válido"</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Comprobando..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Desbloquear"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Activar sonido"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Desactivar sonido"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g> <xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g> <xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Borrar"</string>
@@ -586,19 +543,17 @@
<string name="battery_status_charging" msgid="756617993998772213">"Cargando..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Conecta el cargador"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Se está agotando la batería:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> o menos disponible"</string>
<string name="battery_low_why" msgid="7279169609518386372">"Uso de la batería"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Fallo en la prueba de fábrica"</string>
- <string name="factorytest_not_system" msgid="4435201656767276723">"La acción FACTORY_TEST sólo es compatible con los paquetes instalados en /system/app."</string>
+ <string name="factorytest_not_system" msgid="4435201656767276723">"La acción FACTORY_TEST solo es compatible con los paquetes instalados en /system/app."</string>
<string name="factorytest_no_action" msgid="872991874799998561">"No se ha encontrado ningún paquete que proporcione la acción FACTORY_TEST."</string>
<string name="factorytest_reboot" msgid="6320168203050791643">"Reiniciar"</string>
<string name="js_dialog_title" msgid="8143918455087008109">"La página \"<xliff:g id="TITLE">%s</xliff:g>\" dice:"</string>
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"¿Quieres salir de esta página?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Selecciona \"Aceptar\" para continuar o \"Cancelar\" para permanecer en la página actual."</string>
<string name="save_password_label" msgid="6860261758665825069">"Confirmar"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Sugerencia: toca dos veces para ampliar o reducir."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"leer información de marcadores y del historial del navegador"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Permite que la aplicación lea todas las URL que ha visitado el navegador y todos sus marcadores."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"escribir en marcadores y en el historial del navegador"</string>
@@ -682,7 +637,7 @@
<item quantity="other" msgid="2973062968038355991">"dentro de <xliff:g id="COUNT">%d</xliff:g> días"</item>
</plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"el <xliff:g id="DATE">%s</xliff:g>"</string>
- <string name="preposition_for_time" msgid="5506831244263083793">"a las <xliff:g id="TIME">%s</xliff:g>"</string>
+ <string name="preposition_for_time" msgid="5506831244263083793">"a la(s) <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"en <xliff:g id="YEAR">%s</xliff:g>"</string>
<string name="day" msgid="8144195776058119424">"día"</string>
<string name="days" msgid="4774547661021344602">"días"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Forzar cierre"</string>
<string name="report" msgid="4060218260984795706">"Informe"</string>
<string name="wait" msgid="7147118217226317732">"Esperar"</string>
- <string name="debug" msgid="9103374629678531849">"Depurar"</string>
<string name="sendText" msgid="5132506121645618310">"Seleccionar la opción para compartir"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Volumen del timbre"</string>
<string name="volume_music" msgid="5421651157138628171">"Volumen multimedia"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"¿Estás seguro de que quieres formatear la tarjeta SD? Se perderán todos los datos de la tarjeta."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Formato"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"Dispositivo de depuración USB conectado"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Seleccionar para inhabilitar la depuración USB"</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Seleccionar método de introducción de texto"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"candidatos"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Crear un contacto"\n"a partir de <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"seleccionado"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"no seleccionado"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Permitir"</string>
<string name="deny" msgid="2081879885755434506">"Denegar"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Permiso solicitado"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Permiso solicitado"\n"para la cuenta <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Método de introducción de texto"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Sincronización"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Accesibilidad"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Fondo de pantalla"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Cambiar fondo de pantalla"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocolo de túnel punto a punto"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocolo de túnel de nivel 2"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Red privada virtual L2TP/IPSec basada en clave compartida previamente"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Red privada virtual L2TP/IPSec basada en certificado"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 5647063..d46820a 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Impossible d\'accéder au fichier."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Le fichier demandé est introuvable."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Trop de requêtes sont en cours de traitement. Veuillez réessayer ultérieurement."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Erreur de connexion au compte <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Synchroniser"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synchronisation"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Trop de contenus supprimés (<xliff:g id="CONTENT_TYPE">%s</xliff:g>)."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Suivre votre position géographique"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Communications réseau"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Permet à des applications d\'accéder à différentes fonctionnalités du réseau."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Vos comptes"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Accéder aux comptes disponibles"</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Commandes du matériel"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Permet d\'accéder directement au matériel de l\'appareil."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Appels"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Permet à une application d\'activer le mode de débogage d\'une autre application. Des applications malveillantes peuvent utiliser cette fonctionnalité pour interrompre d\'autres applications de façon inopinée."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"Modification des paramètres de l\'IU"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Permet à une application de modifier la configuration actuelle (par ex. : la taille de la police générale ou des paramètres régionaux)."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"Démarrage d\'autres applications"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Permet à une application de forcer le lancement d\'autres applications."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"Fermeture forcée de l\'application"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Permet à une application de forcer une autre application exécutée au premier plan à se fermer et à passer en arrière-plan. Les applications normales ne devraient jamais avoir recours à cette fonctionnalité."</string>
<string name="permlab_dump" msgid="1681799862438954752">"Vérification de l\'état interne du système"</string>
@@ -280,16 +283,16 @@
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Permet à une application de lire tous les événements de l\'agenda enregistrés sur votre téléphone. Des applications malveillantes peuvent utiliser cette fonctionnalité pour envoyer les événements de votre agenda à d\'autres personnes."</string>
<string name="permlab_writeCalendar" msgid="377926474603567214">"Écriture des données de l\'agenda"</string>
<string name="permdesc_writeCalendar" msgid="8674240662630003173">"Permet à une application de modifier les événements de l\'agenda enregistrés sur votre téléphone. Des applications malveillantes peuvent utiliser cette fonctionnalité pour effacer ou modifier les données de votre agenda."</string>
- <string name="permlab_accessMockLocation" msgid="8688334974036823330">"Création de sources de positionnement fictives à des fins de test"</string>
- <string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Permet de créer des sources de positionnement fictives à des fins de test. Des applications malveillantes peuvent utiliser cette fonctionnalité pour remplacer la position géographique et/ou l\'état fournis par des sources réelles comme le GPS ou les fournisseurs d\'accès."</string>
+ <string name="permlab_accessMockLocation" msgid="8688334974036823330">"Création de sources de localisation fictives à des fins de test"</string>
+ <string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Permet de créer des sources de localisation fictives à des fins de test. Des applications malveillantes peuvent utiliser cette fonctionnalité pour remplacer la position géographique et/ou l\'état fournis par des sources réelles comme le GPS ou les fournisseurs d\'accès."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"Accès aux commandes de fournisseur de position géographique supplémentaires"</string>
- <string name="permdesc_accessLocationExtraCommands" msgid="1948144701382451721">"Permet d\'accéder à des commandes de fournisseur de position géographique supplémentaires. Des applications malveillantes peuvent utiliser cette fonctionnalité pour interférer avec l\'utilisation du GPS ou d\'autres sources de positionnement géographique."</string>
+ <string name="permdesc_accessLocationExtraCommands" msgid="1948144701382451721">"Permet d\'accéder à des commandes de fournisseur de position géographique supplémentaires. Des applications malveillantes peuvent utiliser cette fonctionnalité pour interférer avec l\'utilisation du GPS ou d\'autres sources de localisation géographique."</string>
<string name="permlab_installLocationProvider" msgid="6578101199825193873">"autoriser l\'installation d\'un fournisseur de services de localisation"</string>
<string name="permdesc_installLocationProvider" msgid="5449175116732002106">"Créer des sources de données de localisation factices à des fins de test. Les applications malveillantes peuvent exploiter cette fonction pour remplacer la position géographique et/ou l\'état renvoyé par les sources de données de localisation réelles, telles que le GPS ou les fournisseurs réseau, ou pour surveiller et transmettre votre position géographique à une source externe."</string>
<string name="permlab_accessFineLocation" msgid="8116127007541369477">"Localisation OK (GPS)"</string>
- <string name="permdesc_accessFineLocation" msgid="7411213317434337331">"Permet d\'accéder à des sources de positionnement précises comme le Global Positioning System (GPS) sur le téléphone, lorsque ces services sont disponibles. Des applications malveillantes peuvent utiliser cette fonctionnalité pour déterminer l\'endroit où vous vous trouvez et augmenter la consommation de la batterie de votre téléphone."</string>
+ <string name="permdesc_accessFineLocation" msgid="7411213317434337331">"Permet d\'accéder à des sources de localisation précises comme le Global Positioning System (GPS) sur le téléphone, lorsque ces services sont disponibles. Des applications malveillantes peuvent utiliser cette fonctionnalité pour déterminer l\'endroit où vous vous trouvez et augmenter la consommation de la batterie de votre téléphone."</string>
<string name="permlab_accessCoarseLocation" msgid="4642255009181975828">"Position géo. approximative (selon le réseau)"</string>
- <string name="permdesc_accessCoarseLocation" msgid="8235655958070862293">"Accès à des sources de positionnement approximatif (par ex. des bases de données de réseaux mobiles) pour déterminer la position géographique du téléphone, lorsque cette option est disponible. Des applications malveillantes peuvent utiliser cette fonctionnalité pour déterminer approximativement l\'endroit où vous vous trouvez."</string>
+ <string name="permdesc_accessCoarseLocation" msgid="8235655958070862293">"Accès à des sources de localisation approximative (par ex. des bases de données de réseaux mobiles) pour déterminer la position géographique du téléphone, lorsque cette option est disponible. Des applications malveillantes peuvent utiliser cette fonctionnalité pour déterminer approximativement l\'endroit où vous vous trouvez."</string>
<string name="permlab_accessSurfaceFlinger" msgid="2363969641792388947">"Accès à SurfaceFlinger"</string>
<string name="permdesc_accessSurfaceFlinger" msgid="6805241830020733025">"Permet à certaines applications d\'utiliser les fonctionnalités SurfaceFlinger de bas niveau."</string>
<string name="permlab_readFrameBuffer" msgid="6690504248178498136">"Lecture de la mémoire tampon graphique"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Permet à une application d\'enregistrer de nouveaux mots dans le dictionnaire personnel de l\'utilisateur."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"modifier/supprimer le contenu de la carte SD"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Autorise une application à écrire sur la carte SD."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Domicile"</item>
<item msgid="869923650527136615">"Portable"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Personnalisé"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Domicile"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobile"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Bureau"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Télécopie bureau"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Télécopie domicile"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Téléavertisseur"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Autre"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Rappel"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Voiture"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Société (principal)"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"RNIS"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Principal"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Autre télécopie"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Télex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY/TTD (malentendants)"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Mobile (professionnel)"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Téléavertisseur (professionnel)"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistant"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Anniversaire"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Fête"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Événement"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Personnalisé"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Domicile"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Bureau"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Autre"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Mobile"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Personnalisée"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Domicile"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Bureau"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Autre"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Personnalisée"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Domicile"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Bureau"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Autre"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Personnalisée"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Bureau"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Autre"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Personnalisée"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Saisissez le code PIN"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Le code PIN est incorrect !"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Pour débloquer le clavier, appuyez sur \"Menu\" puis sur 0."</string>
@@ -550,11 +505,10 @@
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Dessinez un schéma pour déverrouiller le téléphone"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Appel d\'urgence"</string>
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Combinaison correcte !"</string>
- <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Désolé. Merci de réessayer."</string>
+ <string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Incorrect. Merci de réessayer."</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Chargement (<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Chargé"</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Branchez votre chargeur."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Aucune carte SIM n\'a été trouvée."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Aucune carte SIM n\'est insérée dans le téléphone."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Se connecter"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nom d\'utilisateur ou mot de passe incorrect."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Vérification..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Débloquer"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Son activé"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Son désactivé"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Effacer"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"Chargement..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Branchez le chargeur"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Le niveau de la batterie est bas :"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"Maximum <xliff:g id="NUMBER">%d%%</xliff:g> restants."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Utilisation de la batterie"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Échec du test usine"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"L\'action FACTORY_TEST est uniquement prise en charge pour les paquets de données installés dans in/system/app."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Vous souhaitez quitter cette page ?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Sélectionnez OK pour continuer ou Annuler pour rester sur la page actuelle."</string>
<string name="save_password_label" msgid="6860261758665825069">"Confirmer"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Conseil : Appuyez deux fois pour effectuer un zoom avant ou arrière."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"lire l\'historique et les favoris du navigateur"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Autorise l\'application à lire toutes les URL auxquelles le navigateur a accédé et tous ses favoris."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"écrire dans l\'historique et les favoris du navigateur"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Forcer la fermeture"</string>
<string name="report" msgid="4060218260984795706">"Rapport"</string>
<string name="wait" msgid="7147118217226317732">"Attendre"</string>
- <string name="debug" msgid="9103374629678531849">"Débogage"</string>
<string name="sendText" msgid="5132506121645618310">"Sélectionner une action pour le texte"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Volume de la sonnerie"</string>
<string name="volume_music" msgid="5421651157138628171">"Volume"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"Voulez-vous vraiment formater la carte SD ? Toutes les données de cette carte seront perdues."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Format"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"Débogage USB connecté"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Sélectionnez cette option pour désactiver le débogage USB."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Sélectionner un mode de saisie"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"candidats"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Ajouter un contact"\n"en utilisant <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"sélectionné"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"non sélectionné"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Autoriser"</string>
<string name="deny" msgid="2081879885755434506">"Refuser"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Autorisation demandée"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Autorisation demandée"\n"pour le compte <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Mode de saisie"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Synchronisation"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Accessibilité"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Fond d\'écran"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Changer de fond d\'écran"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocole de tunnelisation point-à-point"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocole de tunnelisation de niveau 2"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Clé pré-partagée basée sur L2TP/IPSec VPN"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Certificat basé sur L2TP/IPSec VPN"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index f0647e7..ff6107a 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Impossibile accedere al file."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Impossibile trovare il file richiesto."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Troppe richieste in fase di elaborazione. Riprova più tardi."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Errore di accesso per <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Sinc"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Sincronizzazione"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Troppe eliminazioni di <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
@@ -134,8 +133,8 @@
<string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Audio non attivo"</string>
<string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Audio attivo"</string>
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Modalità aereo"</string>
- <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Modalità aereo attiva"</string>
- <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Modalità aereo non attiva"</string>
+ <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Disattiva modalità aereo"</string>
+ <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Disattiva modalità aeereo"</string>
<string name="safeMode" msgid="2788228061547930246">"Modalità provvisoria"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Servizi che prevedono un costo"</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Monitorare la posizione fisica dell\'utente"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Comunicazione di rete"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Consentono l\'accesso delle applicazioni a varie funzionalità di rete."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"I tuoi account"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Accedere agli account disponibili."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Controlli hardware"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Accedere direttamente all\'hardware del ricevitore."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefonate"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Consente a un\'applicazione di attivare il debug per un\'altra applicazione. Le applicazioni dannose possono sfruttare questa possibilità per interrompere altre applicazioni."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"modifica impostazioni UI"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Consente a un\'applicazione di modificare la configurazione corrente, come le dimensioni dei caratteri locali o complessive."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"riavvio altre applicazioni"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Consente a un\'applicazione di riavviare forzatamente altre applicazioni."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"chiusura forzata dell\'applicazione"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Consente a un\'applicazione di forzare la chiusura di attività in primo piano. Non dovrebbe essere mai necessario per le normali applicazioni."</string>
<string name="permlab_dump" msgid="1681799862438954752">"recupero stato interno del sistema"</string>
@@ -319,7 +322,7 @@
<string name="permlab_callPrivileged" msgid="4198349211108497879">"chiamata diretta di tutti i n. telefono"</string>
<string name="permdesc_callPrivileged" msgid="244405067160028452">"Consente all\'applicazione di chiamare qualsiasi numero, compresi quelli di emergenza, automaticamente. Le applicazioni dannose potrebbero effettuare chiamate non necessarie e illegali a servizi di emergenza."</string>
<string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"avviare direttamente la configurazione del telefono CDMA"</string>
- <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Consente all\'applicazione di avviare il servizio di CDMA provisioning. Le applicazioni dannose potrebbero avviare il servizio di CDMA provisioning quando non è necessario"</string>
+ <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Consente all\'applicazione di avviare il servizio di provisioning CDMA. Le applicazioni dannose potrebbero avviare il servizio di provisioning CDMA quando non è necessario"</string>
<string name="permlab_locationUpdates" msgid="7785408253364335740">"controllo notifiche aggiornamento posizione"</string>
<string name="permdesc_locationUpdates" msgid="2300018303720930256">"Consente l\'attivazione/disattivazione delle notifiche di aggiornamento della posizione dal segnale cellulare. Da non usare per normali applicazioni."</string>
<string name="permlab_checkinProperties" msgid="7855259461268734914">"accesso a proprietà di archiviazione"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Consente a un\'applicazione di scrivere nuove parole nel dizionario utente."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"modificare/eliminare i contenuti della scheda SD"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Consente a un\'applicazione di scrivere sulla scheda SD."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Casa"</item>
<item msgid="869923650527136615">"Cellulare"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Personalizzato"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Casa"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Cellulare"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Ufficio"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax ufficio"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax casa"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Cercapersone"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Altro"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Callback"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Automobile"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Azienda, principale"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Principale"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Altro fax"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Segnale radio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Cellulare lavoro"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Cercapersone ufficio"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistente"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Compleanno"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Anniversario"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Evento"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Personalizzato"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Casa"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Ufficio"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Altro"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Cellulare"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Personalizzato"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Casa"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Ufficio"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Altro"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Personalizzato"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Casa"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Ufficio"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Altro"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Personalizzato"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Ufficio"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Altro"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Personalizzato"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"tramite <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> tramite <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Inserisci il PIN"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Codice PIN errato."</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Per sbloccare, premi Menu, poi 0."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Riprova"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"In carica (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Carico."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Collegare il caricabatterie."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Nessuna SIM presente."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Nessuna SIM presente nel telefono."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Accedi"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Password o nome utente non valido."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Controllo in corso..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Sblocca"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Audio attivato"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Audio disattivato"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Cancella"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"In carica..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Collegare il caricabatterie"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Batteria quasi scarica:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> rimanente o meno."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Utilizzo batteria"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Test di fabbrica non riuscito"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"L\'azione FACTORY_TEST è supportata soltanto per i pacchetti installati in /system/app."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Uscire da questa pagina?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Seleziona OK per continuare o Annulla per rimanere nella pagina corrente."</string>
<string name="save_password_label" msgid="6860261758665825069">"Conferma"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Suggerimento. Tocca due volte per aumentare/ridurre lo zoom."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"lettura cronologia e segnalibri del browser"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Consente all\'applicazione di leggere tutti gli URL visitati e tutti i segnalibri del browser."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"creazione cronologia e segnalibri del browser"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Termina"</string>
<string name="report" msgid="4060218260984795706">"Segnala"</string>
<string name="wait" msgid="7147118217226317732">"Attendi"</string>
- <string name="debug" msgid="9103374629678531849">"Debug"</string>
<string name="sendText" msgid="5132506121645618310">"Selezione un\'opzione di invio"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Volume suoneria"</string>
<string name="volume_music" msgid="5421651157138628171">"Volume app. multimediali"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"Formattare la scheda SD? Tutti i dati sulla scheda verranno persi."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatta"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"Debug USB collegato"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Seleziona per disattivare il debug USB."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Seleziona metodo di inserimento"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"candidati"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Crea contatto"\n"utilizzando <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"selezionato"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"non selezionato"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Consenti"</string>
<string name="deny" msgid="2081879885755434506">"Nega"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Autorizzazione richiesta"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Autorizzazione richiesta"\n"per l\'account <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Metodo inserimento"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Sinc"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Accesso facilitato"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Sfondo"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Cambia sfondo"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocollo di tunneling Point-to-Point"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocollo di tunneling livello 2"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"VPN L2TP/IPSec basata su chiave precondivisa"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"VPN L2TP/IPSec basata su certificato"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 9517af5..31c823c 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"ファイルにアクセスできませんでした。"</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"要求されたファイルが見つかりませんでした。"</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"処理中のリクエストが多すぎます。しばらくしてからもう一度試してください。"</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"ログインエラー: <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"同期"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"同期"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"<xliff:g id="CONTENT_TYPE">%s</xliff:g>での削除が多すぎます。"</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"現在地を追跡"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"ネットワーク通信"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"ネットワークのさまざまな機能へのアクセスをアプリケーションに許可します。"</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"アカウント"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"利用可能なアカウントにアクセスします。"</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"ハードウェアの制御"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"携帯電話のハードウェアに直接アクセスします。"</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"電話/通話"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"別のアプリケーションをデバッグモードにすることをアプリケーションに許可します。悪意のあるアプリケーションが別のアプリケーションを終了させる恐れがあります。"</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"UI設定の変更"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"地域/言語やフォントのサイズなど、現在の設定の変更をアプリケーションに許可します。"</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"他のアプリケーションの再起動"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"他のアプリケーションの強制的な再起動をアプリケーションに許可します。"</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"アプリケーションの強制終了"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"フォアグラウンドで実行されている操作を強制終了して戻ることをアプリケーションに許可します。通常のアプリケーションではまったく必要ありません。"</string>
<string name="permlab_dump" msgid="1681799862438954752">"システムの内部状態の取得"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"アプリケーションがユーザー辞書に新しい語句を書き込むことを許可します。"</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"SDカードのコンテンツを修正/削除する"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"SDカードへの書き込みをアプリケーションに許可します。"</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"自宅"</item>
<item msgid="869923650527136615">"携帯"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"カスタム"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"自宅"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"携帯"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"勤務先"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"FAX(勤務先)"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"FAX(自宅)"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"ポケベル"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"その他"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"コールバック"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"クルマ"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"会社代表番号"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"メイン"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"FAX(その他)"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"無線"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"テレックス"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"携帯電話(勤務先)"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"ポケベル(勤務先)"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"アシスタント"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"誕生日"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"記念日"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"予定"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"カスタム"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"自宅"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"勤務先"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"その他"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"携帯"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"カスタム"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"自宅"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"勤務先"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"その他"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"カスタム"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"自宅"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"勤務先"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"その他"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"カスタム"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Googleトーク"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"勤務先"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"その他"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"カスタム"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"<xliff:g id="SOURCE">%1$s</xliff:g>経由"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g>、更新元: <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PINコードを入力"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PINコードが正しくありません。"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"MENU、0キーでロック解除"</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"やり直してください"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"充電中(<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"充電完了。"</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"充電してください。"</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"SIMカードが挿入されていません"</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"SIMカードが挿入されていません"</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"ログイン"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"ユーザー名またはパスワードが正しくありません。"</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"確認中..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"ロック解除"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"サウンドON"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"サウンドOFF"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"通知を消去"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"充電中..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"充電してください"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"電池が残り少なくなっています:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"残り<xliff:g id="NUMBER">%d%%</xliff:g>未満です。"</string>
<string name="battery_low_why" msgid="7279169609518386372">"電池使用量"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"出荷時試験が失敗"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"FACTORY_TEST操作は、/system/appにインストールされたパッケージのみが対象です。"</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"このページから移動しますか?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"移動する場合は[OK]、今のページに残る場合は[キャンセル]を選択してください。"</string>
<string name="save_password_label" msgid="6860261758665825069">"確認"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"ヒント: ダブルタップで拡大/縮小できます。"</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"ブラウザの履歴とブックマークを読み取る"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"ブラウザでアクセスしたすべてのURLおよびブラウザのすべてのブックマークの読み取りをアプリケーションに許可します。"</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"ブラウザの履歴とブックマークを書き込む"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"強制終了"</string>
<string name="report" msgid="4060218260984795706">"レポート"</string>
<string name="wait" msgid="7147118217226317732">"待機"</string>
- <string name="debug" msgid="9103374629678531849">"デバッグ"</string>
<string name="sendText" msgid="5132506121645618310">"アプリケーションを選択"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"着信音量"</string>
<string name="volume_music" msgid="5421651157138628171">"メディアの音量"</string>
@@ -781,7 +735,7 @@
<string name="sms_control_no" msgid="1715320703137199869">"キャンセル"</string>
<string name="date_time_set" msgid="5777075614321087758">"設定"</string>
<string name="default_permission_group" msgid="2690160991405646128">"端末既定"</string>
- <string name="no_permissions" msgid="7283357728219338112">"権限付与の必要はありません"</string>
+ <string name="no_permissions" msgid="7283357728219338112">"権限の許可は必要ありません"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"隠す"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"すべて表示"</b></string>
<string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"読み込み中..."</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"SDカードをフォーマットしてもよろしいですか?カード内のすべてのデータが失われます。"</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"フォーマット"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"USBデバッグが接続されました"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"USBデバッグを無効にする場合に選択します。"</string>
+ <string name="select_input_method" msgid="6865512749462072765">"入力方法の選択"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"候補"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"<xliff:g id="NUMBER">%s</xliff:g>を使って"\n"連絡先を新規登録"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"オン"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"オフ"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"許可"</string>
<string name="deny" msgid="2081879885755434506">"拒否"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"リクエスト済み権限"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"次のアカウントにアクセスする権限が"\n"リクエストされました:<xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"入力方法"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"同期"</string>
- <string name="accessibility_binding_label" msgid="4148120742096474641">"アクセシビリティ"</string>
+ <string name="accessibility_binding_label" msgid="4148120742096474641">"ユーザー補助"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"壁紙"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"壁紙を変更"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"ポイントツーポイントトンネリングプロトコル"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"レイヤー2トンネリングプロトコル"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"L2TP/IPSec VPNベースの事前共有鍵"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"L2TP/IPSec VPNベースの証明書"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 0ef3824..8afa494 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"파일에 액세스할 수 없습니다."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"요청한 파일을 찾을 수 없습니다."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"처리 중인 요청이 너무 많습니다. 잠시 후에 다시 시도해 주세요."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"<xliff:g id="ACCOUNT">%1$s</xliff:g>에 로그인 오류 발생"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"동기화"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"동기화"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"<xliff:g id="CONTENT_TYPE">%s</xliff:g> 삭제가 너무 많습니다."</string>
@@ -123,13 +122,13 @@
<string name="turn_on_radio" msgid="3912793092339962371">"무선 사용"</string>
<string name="turn_off_radio" msgid="8198784949987062346">"무선 끄기"</string>
<string name="screen_lock" msgid="799094655496098153">"화면 잠금"</string>
- <string name="power_off" msgid="4266614107412865048">"끄기"</string>
+ <string name="power_off" msgid="4266614107412865048">"종료"</string>
<string name="shutdown_progress" msgid="2281079257329981203">"종료 중..."</string>
<string name="shutdown_confirm" msgid="649792175242821353">"휴대전화가 종료됩니다."</string>
<string name="no_recent_tasks" msgid="279702952298056674">"최신 응용프로그램이 아닙니다."</string>
<string name="global_actions" msgid="2406416831541615258">"휴대전화 옵션"</string>
<string name="global_action_lock" msgid="2844945191792119712">"화면 잠금"</string>
- <string name="global_action_power_off" msgid="4471879440839879722">"끄기"</string>
+ <string name="global_action_power_off" msgid="4471879440839879722">"종료"</string>
<string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"무음 모드"</string>
<string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"소리 꺼짐"</string>
<string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"소리 켜짐"</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"실제 위치 모니터링"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"네트워크 통신"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"응용프로그램이 다양한 네트워크 기능에 액세스할 수 있도록 합니다."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"계정"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"사용 가능한 계정에 액세스합니다."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"하드웨어 제어"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"휴대전화의 하드웨어에 직접 액세스합니다."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"전화 통화"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"응용프로그램이 다른 응용프로그램에 대해 디버깅을 사용할 수 있도록 합니다. 이 경우 악성 응용프로그램이 다른 응용프로그램을 중지시킬 수 있습니다."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"UI 설정 변경"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"응용프로그램이 로케일 또는 전체 글꼴 크기와 같은 현재 구성을 변경할 수 있도록 합니다."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"다른 응용프로그램 다시 시작"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"응용프로그램이 다른 응용프로그램을 강제로 다시 시작할 수 있도록 합니다."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"강제로 응용프로그램 닫기"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"응용프로그램이 포그라운드에 있는 활동을 강제로 닫고 되돌아갈 수 있도록 합니다. 일반 응용프로그램에는 필요하지 않습니다."</string>
<string name="permlab_dump" msgid="1681799862438954752">"시스템 내부 상태 검색"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"응용프로그램이 사용자 사전에 새 단어를 입력할 수 있도록 합니다."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"SD 카드 콘텐츠 수정/삭제"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"응용프로그램이 SD 카드에 쓸 수 있도록 합니다."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"집"</item>
<item msgid="869923650527136615">"모바일"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"맞춤설정"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"집"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"휴대전화"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"직장"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"직장 팩스"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"집(팩스)"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"호출기"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"기타"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"콜백"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"카폰"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"회사 기본전화"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"기본"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"기타 팩스"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"무선통신"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"텔렉스"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"직장 휴대전화"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"직장 호출기"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"비서"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"생일"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"기념일"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"일정"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"맞춤설정"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"집"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"직장"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"기타"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"모바일"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"맞춤설정"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"집"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"직장"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"기타"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"맞춤설정"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"집"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"직장"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"기타"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"맞춤설정"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google 토크"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"직장"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"기타"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"맞춤설정"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"<xliff:g id="SOURCE">%1$s</xliff:g>을(를) 통해"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g>(<xliff:g id="SOURCE">%2$s</xliff:g> 사용)"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN 코드 입력"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN 코드가 잘못되었습니다."</string>
<string name="keyguard_label_text" msgid="861796461028298424">"잠금해제하려면 메뉴를 누른 다음 0을 누릅니다."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"죄송합니다. 다시 시도하세요."</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"충전 중(<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"충전되었습니다."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"충전기를 연결하세요."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"SIM 카드가 없습니다."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"휴대전화에 SIM 카드가 없습니다."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"로그인"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"사용자 이름 또는 비밀번호가 잘못되었습니다."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"확인 중..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"잠금해제"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"사운드 켜기"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"사운드 끄기"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"지우기"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"충전 중..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"충전기를 연결하세요."</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"배터리 전원이 부족합니다."</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"잔여 배터리가 <xliff:g id="NUMBER">%d%%</xliff:g> 이하입니다."</string>
<string name="battery_low_why" msgid="7279169609518386372">"배터리 사용"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"출고 테스트 불합격"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"FACTORY_TEST 작업은 /system/app 디렉토리에 설치된 패키지에 대해서만 지원됩니다."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"자바스크립트"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"다른 페이지를 탐색하시겠습니까?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"계속하려면 \'확인\'을 선택하고 현재 페이지에 그대로 있으려면 \'취소\'를 선택하세요."</string>
<string name="save_password_label" msgid="6860261758665825069">"확인"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"도움말: 축소/확대하려면 두 번 누릅니다."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"브라우저의 기록 및 북마크 읽기"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"응용프로그램이 브라우저로 방문한 모든 URL과 브라우저의 모든 북마크를 읽도록 허용합니다."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"브라우저의 기록 및 북마크 쓰기"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"닫기"</string>
<string name="report" msgid="4060218260984795706">"신고"</string>
<string name="wait" msgid="7147118217226317732">"대기"</string>
- <string name="debug" msgid="9103374629678531849">"디버그"</string>
<string name="sendText" msgid="5132506121645618310">"텍스트에 대한 작업 선택"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"벨소리 볼륨"</string>
<string name="volume_music" msgid="5421651157138628171">"미디어 볼륨"</string>
@@ -798,15 +752,13 @@
<string name="usb_storage_stop_message" msgid="2390958966725232848">"USB 저장소를 끄기 전에 반드시 USB 호스트에서 마운트 해제하세요. USB 저장소를 끄려면 \'끄기\'를 선택하세요."</string>
<string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"USB 저장소 끄기"</string>
<string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"취소"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"USB 저장소를 끄는 동안 문제가 발생했습니다. USB 호스트를 마운트 해제했는지 확인한 다음 다시 시도하세요."</string>
+ <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"USB 저장소를 끄는 동안 문제가 발생했습니다. USB 호스트와 연결을 해제했는지 확인한 다음 다시 시도하세요."</string>
<string name="extmedia_format_title" msgid="8663247929551095854">"SD 카드 포맷"</string>
<string name="extmedia_format_message" msgid="3621369962433523619">"SD 카드를 포맷하시겠습니까? 포맷하면 카드의 모든 데이터를 잃게 됩니다."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"포맷"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"USB 디버깅 연결됨"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"USB 디버깅을 사용하지 않으려면 선택합니다."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"입력 방법 선택"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"가능한 원인"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"전화번호부에"\n"<xliff:g id="NUMBER">%s</xliff:g> 추가"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"선택함"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"선택 안함"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"허용"</string>
<string name="deny" msgid="2081879885755434506">"거부"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"권한 요청"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"<xliff:g id="ACCOUNT">%s</xliff:g> 계정에 대해"\n"권한 요청"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"입력 방법"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"동기화"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"접근성"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"배경화면"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"배경화면 변경"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"PPTP(Point-to-Point Tunneling Protocol)"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"L2TP(Layer 2 Tunneling Protocol)"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"사전 공유 키 기반 L2TP/IPSec VPN"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"인증서 기반 L2TP/IPSec VPN"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index aa15ad1..ed4f596 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Kunne ikke åpne filen."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Fant ikke den forespurte filen."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"For mange forespørsler blir behandlet. Prøv igjen senere."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Innloggingsfeil for <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Synkronisering"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synkronisering"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"For mange slettinger av <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Overvåking av telefonens fysiske plassering"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Nettverkstilgang"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Gir applikasjoner tilgang til diverse nettverksfunksjoner."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Google-kontoer"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Tilgang til tilgjengelige Google-kontoer."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Maskinvarekontroll"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Direkte tilgang til maskinvaren på telefonen."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefonsamtaler"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Lar applikasjonen skru på debugging for en annen applikasjon. Ondsinnede applikasjoner kan bruke dette til å drepe andre applikasjoner."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"endre innstillingene for brukergrensesnitt"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Tillater applikasjonen å endre gjeldende innstillinger, slik som språk eller skriftstørrelse."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"omstarte andre applikasjoner"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Lar applikasjonen tvinge andre applikasjoner til å starte på nytt."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"tvinge applikasjoner til å lukkes"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Lar applikasjonen tvinge enhver aktivitet som er i forgrunnen til å lukkes og gå tilbake. Vanlige applikasjoner bør aldri trenge dette."</string>
<string name="permlab_dump" msgid="1681799862438954752">"hente intern systemtilstand"</string>
@@ -198,7 +201,7 @@
<string name="permdesc_shutdown" msgid="7046500838746291775">"Lar applikasjonen sette aktivitetshåndtereren i avslutningstilstand. Slår ikke systemet helt av."</string>
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"forhindre applikasjonsbytte"</string>
<string name="permdesc_stopAppSwitches" msgid="3857886086919033794">"Lar applikasjonen forhindre brukeren fra å bytte til en annen applikasjon."</string>
- <string name="permlab_runSetActivityWatcher" msgid="7811586187574696296">"Blokker popup-vinduer"</string>
+ <string name="permlab_runSetActivityWatcher" msgid="7811586187574696296">"overvåke og kontrollere all applikasjonsoppstart"</string>
<string name="permdesc_runSetActivityWatcher" msgid="3228701938345388092">"Lar applikasjonen overvåke og kontrollere hvordan systemet starter applikasjoner. Ondsinnede applikasjoner kan ta over systemet helt. Denne rettigheten behøves bare for utvikling, aldri for vanlig bruk av telefonen."</string>
<string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"kringkaste melding om fjernet pakke"</string>
<string name="permdesc_broadcastPackageRemoved" msgid="3453286591439891260">"Lar applikasjonen kringkaste en melding om at en applikasjonspakke er blitt fjernet. Ondsinnede applikasjoner kan bruke dette til å drepe vilkårlige andre kjørende applikasjoner."</string>
@@ -213,9 +216,9 @@
<string name="permlab_batteryStats" msgid="7863923071360031652">"endre batteristatistikk"</string>
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Lar applikasjonen endre på innsamlet batteristatistikk. Ikke ment for vanlige applikasjoner."</string>
<string name="permlab_backup" msgid="470013022865453920">"kontrollere backup og gjenoppretting"</string>
- <string name="permdesc_backup" msgid="4837493065154256525">"Gir programmet tillatelse til å kontrollere systemets mekanismer for sikkerhetskopiering gjenoppretting. Ikke beregnet på vanlige programmer."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"sikkerhetskopier og gjenopprett programmets data"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Gir programmet tillatelse til å ta del i systemets mekanismer for sikkerhetskopiering og gjenoppretting."</string>
+ <string name="permdesc_backup" msgid="4837493065154256525">"Lar applikasjonen kontrollere systemets backup- og gjenopprettingsmekanisme. Ikke ment for vanlige applikasjoner."</string>
+ <string name="permlab_backup_data" msgid="4057625941707926463">"foreta backup og gjenoppretting av applikasjonens data"</string>
+ <string name="permdesc_backup_data" msgid="8274426305151227766">"Lar applikasjonen delta i systemets backup- og gjenopprettingsmekanisme."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"vis uautoriserte vinduer"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Tillater at det opprettes vinduer ment for bruk av systemets interne brukergrensesnitt. Ikke ment for vanlige applikasjoner."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"vise advarsler på systemnivå"</string>
@@ -261,7 +264,7 @@
<string name="permlab_writeSettings" msgid="1365523497395143704">"endre globale systeminnstillinger"</string>
<string name="permdesc_writeSettings" msgid="838789419871034696">"Lar applikasjonen endre systemets innstillingsdata. Ondsinnede applikasjoner kan skade systemets innstillinger."</string>
<string name="permlab_writeSecureSettings" msgid="204676251876718288">"endre sikre systeminnstillinger"</string>
- <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Gir programmet tillatelse til å endre systemets data for sikkerhetsinnstilling. Ikke beregnet på vanlige programmer."</string>
+ <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Gir programmet tillatelse til å endre systemets data for sikkerhetsinnstilling. Ikke ment for vanlige programmer."</string>
<string name="permlab_writeGservices" msgid="2149426664226152185">"redigere Google-tjenestekartet"</string>
<string name="permdesc_writeGservices" msgid="6602362746516676175">"Lar applikasjonen redigere Google-tjenestekartet. Ikke ment for bruk av vanlige applikasjoner."</string>
<string name="permlab_receiveBootCompleted" msgid="7776779842866993377">"starte automatisk sammen med systemet"</string>
@@ -318,8 +321,8 @@
<string name="permdesc_callPhone" msgid="3369867353692722456">"Lar applikasjonen ringe telefonnummer uten inngripen fra brukeren. Ondsinnede applikasjoner kan forårsake uventede oppringinger på telefonregningen. Merk at dette ikke gir applikasjonen lov til å ringe nødnummer."</string>
<string name="permlab_callPrivileged" msgid="4198349211108497879">"ringe vilkårlige telefonnummer direkte"</string>
<string name="permdesc_callPrivileged" msgid="244405067160028452">"Lar applikasjonen ringe hvilket som helst telefonnummer, inkludert nødnummer, uten inngripen fra brukeren. Ondsinnede applikasjoner kan forårsake unødvendige og ulovlige samtaler til nødtjenester."</string>
- <string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"start CDMA-telefonoppsett direkte"</string>
- <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Gir programmet tillatelse til å starte klargjøring av CDMA. Skadelige programmer kan starte klargjøring av CDMA uten grunn"</string>
+ <string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"begynne CDMA-telefonoppsett direkte"</string>
+ <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Lar applikasjonen begynne CDMA-oppsett. Ondsinnede applikasjoner kan bruke dette til å starte CDMA-oppsett uten grunn."</string>
<string name="permlab_locationUpdates" msgid="7785408253364335740">"kontrollere varsling for plasseringsendring"</string>
<string name="permdesc_locationUpdates" msgid="2300018303720930256">"Lar applikasjonen slå av/på varsling om plasseringsendringer fra radioen. Ikke ment for vanlige applikasjoner."</string>
<string name="permlab_checkinProperties" msgid="7855259461268734914">"få tilgang til egenskaper for innsjekking"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Lar applikasjonen skrive nye ord til den brukerdefinerte ordlisten."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"redigere/slette innhold på minnekort"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Lar applikasjonen skrive til minnekortet."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Hjemmenummer"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Egendefinert"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Hjemme"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Arbeid"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Faks arbeid"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Faks hjemme"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Personsøker"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Annen"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Tilbakering"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Bil"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Firma hoved"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Hoved"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Faks annen"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Teleks"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Teksttelefon"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Mobil arbeid"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Personsøker arbeid"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistent"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Bursdag"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Jubileum"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Akivitet"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Egendefinert"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Hjemme"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Arbeid"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Annen"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Egendefinert"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Hjemme"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Arbeid"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Annen"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Egendefinert"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Hjemme"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Arbeid"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Annen"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Egendefinert"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"OQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Arbeid"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Annen"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Egendefinert"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Skriv inn PIN-kode:"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Gal PIN-kode!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"For å låse opp, trykk på menyknappen og deretter 0."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Beklager, prøv igjen:"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Lader (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Fullt ladet"</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Koble til en batterilader."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Mangler SIM-kort."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Ikke noe SIM-kort i telefonen."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Logg på"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Ugyldig brukernavn eller passord."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Kontrollerer ..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Lås opp"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Lyd på"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Lyd av"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Fjern"</string>
@@ -586,19 +543,17 @@
<string name="battery_status_charging" msgid="756617993998772213">"Lader…"</string>
<string name="battery_low_title" msgid="7923774589611311406">"Koble til en lader"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Batteriet er nesten tomt:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"mindre enn <xliff:g id="NUMBER">%d%%</xliff:g> igjen."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Batteribruk"</string>
- <string name="factorytest_failed" msgid="5410270329114212041">"Factory test failed"</string>
+ <string name="factorytest_failed" msgid="5410270329114212041">"Fabrikktesten feilet"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"The FACTORY_TEST action is only supported for packages installed in /system/app."</string>
<string name="factorytest_no_action" msgid="872991874799998561">"No package was found that provides the FACTORY_TEST action."</string>
- <string name="factorytest_reboot" msgid="6320168203050791643">"Reboot"</string>
+ <string name="factorytest_reboot" msgid="6320168203050791643">"Omstart"</string>
<string name="js_dialog_title" msgid="8143918455087008109">"Siden \'<xliff:g id="TITLE">%s</xliff:g> sier:"</string>
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Naviger bort fra denne siden?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Velg OK for å fortsette, eller Avbryt for å forbli på denne siden."</string>
<string name="save_password_label" msgid="6860261758665825069">"Bekreft"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Dobbelttrykk for å zoome inn og ut."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"lese nettleserens logg og bokmerker"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Lar applikasjonen lese alle adresser nettleseren har besøkt, og alle nettleserens bokmerker."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skrive til nettleserens logg og bokmerker"</string>
@@ -681,7 +636,7 @@
<item quantity="one" msgid="2178576254385739855">"i morgen"</item>
<item quantity="other" msgid="2973062968038355991">"om <xliff:g id="COUNT">%d</xliff:g> d"</item>
</plurals>
- <string name="preposition_for_date" msgid="9093949757757445117">"den <xliff:g id="DATE">%s</xliff:g>"</string>
+ <string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"i <xliff:g id="YEAR">%s</xliff:g>"</string>
<string name="day" msgid="8144195776058119424">"dag"</string>
@@ -733,24 +688,23 @@
<string name="dialog_alert_title" msgid="2049658708609043103">"Merk"</string>
<string name="capital_on" msgid="1544682755514494298">"På"</string>
<string name="capital_off" msgid="6815870386972805832">"Av"</string>
- <string name="whichApplication" msgid="4533185947064773386">"Complete action using"</string>
- <string name="alwaysUse" msgid="4583018368000610438">"Use by default for this action."</string>
- <string name="clearDefaultHintMsg" msgid="4815455344600932173">"Clear default in Home Settings > Applications > Manage applications."</string>
- <string name="chooseActivity" msgid="1009246475582238425">"Select an action"</string>
- <string name="noApplications" msgid="1691104391758345586">"No applications can perform this action."</string>
- <string name="aerr_title" msgid="653922989522758100">"Sorry!"</string>
- <string name="aerr_application" msgid="4683614104336409186">"The application <xliff:g id="APPLICATION">%1$s</xliff:g> (process <xliff:g id="PROCESS">%2$s</xliff:g>) has stopped unexpectedly. Please try again."</string>
- <string name="aerr_process" msgid="1551785535966089511">"The process <xliff:g id="PROCESS">%1$s</xliff:g> has stopped unexpectedly. Please try again."</string>
- <string name="anr_title" msgid="3100070910664756057">"Sorry!"</string>
- <string name="anr_activity_application" msgid="3538242413112507636">"Activity <xliff:g id="ACTIVITY">%1$s</xliff:g> (in application <xliff:g id="APPLICATION">%2$s</xliff:g>) is not responding."</string>
- <string name="anr_activity_process" msgid="5420826626009561014">"Activity <xliff:g id="ACTIVITY">%1$s</xliff:g> (in process <xliff:g id="PROCESS">%2$s</xliff:g>) is not responding."</string>
- <string name="anr_application_process" msgid="4185842666452210193">"Application <xliff:g id="APPLICATION">%1$s</xliff:g> (in process <xliff:g id="PROCESS">%2$s</xliff:g>) is not responding."</string>
- <string name="anr_process" msgid="1246866008169975783">"Process <xliff:g id="PROCESS">%1$s</xliff:g> is not responding."</string>
- <string name="force_close" msgid="3653416315450806396">"Force close"</string>
+ <string name="whichApplication" msgid="4533185947064773386">"Fullfør med"</string>
+ <string name="alwaysUse" msgid="4583018368000610438">"Bruk som standardvalg."</string>
+ <string name="clearDefaultHintMsg" msgid="4815455344600932173">"Fjern standardvalg i Innstillinger > Applikasjoner > Installerte applikasjoner."</string>
+ <string name="chooseActivity" msgid="1009246475582238425">"Velg en aktivitet"</string>
+ <string name="noApplications" msgid="1691104391758345586">"Ingen applikasjoner kan gjøre dette."</string>
+ <string name="aerr_title" msgid="653922989522758100">"Beklager!"</string>
+ <string name="aerr_application" msgid="4683614104336409186">"Applikasjonen <xliff:g id="APPLICATION">%1$s</xliff:g> (prosess <xliff:g id="PROCESS">%2$s</xliff:g>) stoppet uventet. Prøv igjen."</string>
+ <string name="aerr_process" msgid="1551785535966089511">"Prosessen <xliff:g id="PROCESS">%1$s</xliff:g> stoppet uventet. Prøv igjen."</string>
+ <string name="anr_title" msgid="3100070910664756057">"Beklager!"</string>
+ <string name="anr_activity_application" msgid="3538242413112507636">"Aktiviteten <xliff:g id="ACTIVITY">%1$s</xliff:g> (i applikasjonen <xliff:g id="APPLICATION">%2$s</xliff:g>) svarer ikke."</string>
+ <string name="anr_activity_process" msgid="5420826626009561014">"Aktiviteten <xliff:g id="ACTIVITY">%1$s</xliff:g> (i prosessen <xliff:g id="PROCESS">%2$s</xliff:g>) svarer ikke."</string>
+ <string name="anr_application_process" msgid="4185842666452210193">"Applikasjonen <xliff:g id="APPLICATION">%1$s</xliff:g> (i prosessen <xliff:g id="PROCESS">%2$s</xliff:g>) svarer ikke."</string>
+ <string name="anr_process" msgid="1246866008169975783">"Prosessen <xliff:g id="PROCESS">%1$s</xliff:g> svarer ikke."</string>
+ <string name="force_close" msgid="3653416315450806396">"Tving avslutning"</string>
<string name="report" msgid="4060218260984795706">"Rapportér"</string>
- <string name="wait" msgid="7147118217226317732">"Wait"</string>
- <string name="debug" msgid="9103374629678531849">"Debug"</string>
- <string name="sendText" msgid="5132506121645618310">"Select an action for text"</string>
+ <string name="wait" msgid="7147118217226317732">"Vent"</string>
+ <string name="sendText" msgid="5132506121645618310">"Velg mål for tekst"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Ringetonevolum"</string>
<string name="volume_music" msgid="5421651157138628171">"Medievolum"</string>
<string name="volume_music_hint_playing_through_bluetooth" msgid="9165984379394601533">"Spiller over Bluetooth"</string>
@@ -801,12 +755,10 @@
<string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Det har oppstått et problem ved deaktiveringen av USB-lagring. Kontroller at du har demontert USB-verten, og prøv igjen."</string>
<string name="extmedia_format_title" msgid="8663247929551095854">"Formatere minnekort"</string>
<string name="extmedia_format_message" msgid="3621369962433523619">"Er du sikker på at du ønsker å formatere minnekortet? Alle data på kortet vil gå tapt."</string>
- <string name="extmedia_format_button_format" msgid="4131064560127478695">"Format"</string>
+ <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatér"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"USB-debugging tilkoblet"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Velg for å deaktivere USB-debugging."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Velg inndatametode"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ"</string>
<string name="candidates_style" msgid="4333913089637062257">"TAG_FONT"<u>"kandidater"</u>"CLOSE_FONT"</string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Lag kontakt"\n"med nummeret <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"valgt"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"ikke valgt"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Tillat"</string>
<string name="deny" msgid="2081879885755434506">"Avslå"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Tillatelse forespurt"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Trenger tillatelse"\n"for konto <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Inndatametode"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Synkronisering"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Tilgjengelighet"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Bakgrunnsbilde"</string>
- <string name="chooser_wallpaper" msgid="7873476199295190279">"Endre bakgrunnsbilde"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="chooser_wallpaper" msgid="7873476199295190279">"Velg bakgrunnsbilde"</string>
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Punkt-til-punkt-tunneleringsprotokoll"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Lag 2-tunneleringsprotokoll"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Passordbasert L2TP/IPSec-VPN"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Sertifikatbasert L2TP/IPSec-VPN"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index c299ef8..a6ebcde 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Het bestand kan niet worden geopend."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Het opgevraagde bestand is niet gevonden."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Er worden te veel aanvragen verwerkt. Probeer het later opnieuw."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Fout bij aanmelding voor \'<xliff:g id="ACCOUNT">%1$s</xliff:g>\'"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Synchroniseren"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synchroniseren"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Te veel verwijderen voor <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Uw fysieke locatie bijhouden"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Netwerkcommunicatie"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Toepassingen toestaan verschillende netwerkfuncties te openen."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Uw accounts"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Toegang tot de beschikbare accounts."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Bedieningselementen hardware"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Rechtstreekse toegang tot hardware op de handset."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefoonoproepen"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Hiermee kan een toepassing de foutopsporing voor een andere toepassing inschakelen. Schadelijke toepassingen kunnen dit gebruiken om andere toepassingen af te sluiten."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"uw UI-instellingen wijzigen"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Hiermee kan een toepassing de huidige configuratie, zoals de landinstelling of de algemene lettergrootte, wijzigen."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"andere toepassingen opnieuw starten"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Hiermee kan een toepassing andere toepassingen opnieuw starten."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"toepassing nu sluiten"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Hiermee kan een toepassing elke willekeurige activiteit die op de voorgrond wordt uitgevoerd, sluiten en naar de achtergrond verplaatsen. Nooit vereist voor normale toepassingen."</string>
<string name="permlab_dump" msgid="1681799862438954752">"interne systeemstatus ophalen"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Hiermee kan een toepassing nieuwe woorden schrijven naar het gebruikerswoordenboek."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"inhoud op de SD-kaart aanpassen/verwijderen"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Hiermee kan een toepassing schrijven naar de SD-kaart."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Thuis"</item>
<item msgid="869923650527136615">"Mobiel"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Aangepast"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Thuis"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobiel"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Werk"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax werk"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax thuis"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Overig"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Terugbelnummer"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Auto"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Bedrijf, algemeen"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Algemeen"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Andere fax"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Teksttelefoon"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Mobiel werk"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pager werk"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistent"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Verjaardag"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Jubileum"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Afspraak"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Aangepast"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Thuis"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Werk"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Overig"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Mobiel"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Aangepast"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Thuis"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Werk"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Overig"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Aangepast"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Thuis"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Werk"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Overig"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Aangepast"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Werk"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Overig"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Aangepast"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN-code invoeren"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Onjuiste PIN-code!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Druk op \'Menu\' en vervolgens op 0 om te ontgrendelen."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Probeer het opnieuw"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Opladen (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Opgeladen."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Sluit de oplader aan."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Geen SIM-kaart."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Geen SIM-kaart in telefoon."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Aanmelden"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Gebruikersnaam of wachtwoord ongeldig."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Controleren..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Ontgrendelen"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Geluid aan"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Geluid uit"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Wissen"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"Opladen..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Sluit de oplader aan"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"De accu raakt op:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> of minder resterend."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Accugebruik"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Fabriekstest mislukt"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"De actie FACTORY_TEST wordt alleen ondersteund voor pakketten die zijn geïnstalleerd in /system/app."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Wilt u deze pagina verlaten?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Kies OK om door te gaan of Annuleren om op de huidige pagina te blijven."</string>
<string name="save_password_label" msgid="6860261758665825069">"Bevestigen"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Tip: tik tweemaal om in of uit te zoomen."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"browsergeschiedenis en bladwijzers lezen"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Hiermee kan een toepassing de URL\'s lezen die u via de browser heeft bezocht, evenals alle bladwijzers van de browser."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"browsergeschiedenis en bladwijzers schrijven"</string>
@@ -722,7 +677,7 @@
<string name="paste" msgid="5629880836805036433">"Plakken"</string>
<string name="copyUrl" msgid="2538211579596067402">"URL kopiëren"</string>
<string name="inputMethod" msgid="1653630062304567879">"Invoermethode"</string>
- <string name="addToDictionary" msgid="8793624991686948709">"\' <xliff:g id="WORD">%s</xliff:g>\' toevoegen aan woordenboek"</string>
+ <string name="addToDictionary" msgid="8793624991686948709">"\'<xliff:g id="WORD">%s</xliff:g>\' toevoegen aan woordenboek"</string>
<string name="editTextMenuTitle" msgid="1672989176958581452">"Tekst bewerken"</string>
<string name="low_internal_storage_view_title" msgid="1399732408701697546">"Weinig ruimte"</string>
<string name="low_internal_storage_view_text" msgid="635106544616378836">"Opslagruimte van telefoon raakt op."</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Nu sluiten"</string>
<string name="report" msgid="4060218260984795706">"Rapport"</string>
<string name="wait" msgid="7147118217226317732">"Wachten"</string>
- <string name="debug" msgid="9103374629678531849">"Foutopsporing"</string>
<string name="sendText" msgid="5132506121645618310">"Selecteer een actie voor tekst"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Belvolume"</string>
<string name="volume_music" msgid="5421651157138628171">"Mediavolume"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"Weet u zeker dat u de SD-kaart wilt formatteren? Alle gegevens op uw kaart gaan dan verloren."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatteren"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"USB-foutopsporing verbonden"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Selecteer deze optie om USB-foutopsporing uit te schakelen."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Invoermethode selecteren"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"kandidaten"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Contact maken"\n"met <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"aangevinkt"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"niet aangevinkt"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Toestaan"</string>
<string name="deny" msgid="2081879885755434506">"Weigeren"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Toestemming gevraagd"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Toestemming gevraagd"\n"voor account \'<xliff:g id="ACCOUNT">%s</xliff:g>\'"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Invoermethode"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Synchroniseren"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Toegankelijkheid"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Achtergrond"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Achtergrond wijzigen"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Point-to-Point Tunneling Protocol (PPTP)"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Layer 2 Tunneling Protocol (L2TP)"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Vooraf gedeelde sleutel op basis van L2TP/IPSec VPN"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Certificaat op basis van L2TP/IPSec VPN"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index f53bd4c5..6d0539e 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Nie można uzyskać dostępu do pliku."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Nie znaleziono żądanego pliku."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Zbyt wiele żądań jest przetwarzanych. Spróbuj ponownie później."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Błąd logowania na konto <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Synchronizacja"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synchronizuj"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Zbyt wiele usuwanych <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Monitorowanie fizycznej lokalizacji"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Połączenia sieciowe"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Pozwól aplikacjom na dostęp do różnych funkcji sieci."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Twoje konta"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Dostęp do udostępnionych kont."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Sterowanie sprzętowe"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Bezpośredni dostęp do elementów sprzętowych telefonu."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Połączenia telefoniczne"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Pozwala aplikacji na włączenie debugowania innej aplikacji. Szkodliwe aplikacje mogą to wykorzystać do wyłączenia innych programów."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"zmienianie ustawień interfejsu użytkownika"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Pozwala aplikacji zmieniać bieżącą konfigurację, na przykład lokalny lub globalny rozmiar czcionki."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"resetowanie innych aplikacji"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Pozwala aplikacji na wymuszenie ponownego uruchomienia innych aplikacji."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"wymuszanie zamknięcia aplikacji"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Pozwala aplikacji na wymuszenie zamknięcia i cofnięcia dowolnej operacji działającej na pierwszym planie. Nigdy nie powinno być potrzebne normalnym aplikacjom."</string>
<string name="permlab_dump" msgid="1681799862438954752">"pobieranie informacji o wewnętrznym stanie systemu"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Zezwala aplikacjom na zapisywanie nowych słów w słowniku użytkownika."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"modyfikowanie/usuwanie zawartości karty SD"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Umożliwia aplikacji zapis na karcie SD."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Dom"</item>
<item msgid="869923650527136615">"Komórka"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Niestandardowy"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Domowy"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Komórka"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Służbowy"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Faks służbowy"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Faks domowy"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Inny"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Połączenie zwrotne"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Samochód"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Firmowy główny"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Główny"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Inny faks"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Teleks"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Służbowa komórka"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pager służbowy"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Asystent"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"Wiadomość MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Urodziny"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Rocznica"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Wydarzenie"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Niestandardowy"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Domowy"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Służbowy"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Inny"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Komórka"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Niestandardowy"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Domowy"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Służbowy"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Inny"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Niestandardowy"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Domowy"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Służbowy"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Inny"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Niestandardowy"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Służbowy"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Inny"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Niestandardowy"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"przez <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> za pośrednictwem: <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Wprowadź kod PIN"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Błędny kod PIN!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Aby odblokować, naciśnij Menu, a następnie 0."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Niestety, spróbuj ponownie"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Ładowanie (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Naładowany."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Podłącz ładowarkę."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Brak karty SIM."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Brak karty SIM w telefonie."</string>
@@ -573,9 +527,12 @@
<string name="lockscreen_glogin_instructions" msgid="1816635201812207709">"Aby odblokować, zaloguj się za pomocą konta Google"</string>
<string name="lockscreen_glogin_username_hint" msgid="8846881424106484447">"Nazwa użytkownika (e-mail)"</string>
<string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"Hasło"</string>
- <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Zaloguj"</string>
+ <string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Zaloguj się"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Błędna nazwa użytkownika lub hasło."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Trwa sprawdzanie..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Odblokuj"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Włącz dźwięk"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Wyłącz dźwięk"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Wyczyść"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"Ładowanie..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Podłącz ładowarkę"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Bateria się rozładowuje:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"Pozostało: <xliff:g id="NUMBER">%d%%</xliff:g> lub mniej."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Użycie baterii"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Nieudany test fabryczny"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"Czynność FACTORY_TEST jest obsługiwana tylko dla pakietów zainstalowanych w katalogu /system/app."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Czy opuścić tę stronę?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Wybierz opcję OK, aby kontynuować, lub opcję Anuluj, aby pozostać na tej stronie."</string>
<string name="save_password_label" msgid="6860261758665825069">"Potwierdź"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Wskazówka: dotknij dwukrotnie, aby powiększyć lub pomniejszyć."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"odczyt historii i zakładek przeglądarki"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Umożliwia aplikacji odczyt wszystkich adresów URL odwiedzonych przez przeglądarkę, a także wszystkich zakładek przeglądarki."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"zapis historii i zakładek przeglądarki"</string>
@@ -651,7 +606,7 @@
</plurals>
<plurals name="abbrev_num_seconds_ago">
<item quantity="one" msgid="1849036840200069118">"sekundę temu"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> sek. temu"</item>
+ <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> s temu"</item>
</plurals>
<plurals name="abbrev_num_minutes_ago">
<item quantity="one" msgid="6361490147113871545">"minutę temu"</item>
@@ -667,7 +622,7 @@
</plurals>
<plurals name="abbrev_in_num_seconds">
<item quantity="one" msgid="5842225370795066299">"za sekundę"</item>
- <item quantity="other" msgid="5495880108825805108">"za <xliff:g id="COUNT">%d</xliff:g> sek."</item>
+ <item quantity="other" msgid="5495880108825805108">"za <xliff:g id="COUNT">%d</xliff:g> s"</item>
</plurals>
<plurals name="abbrev_in_num_minutes">
<item quantity="one" msgid="562786149928284878">"za minutę"</item>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Wymuś zamknięcie"</string>
<string name="report" msgid="4060218260984795706">"Zgłoś"</string>
<string name="wait" msgid="7147118217226317732">"Czekaj"</string>
- <string name="debug" msgid="9103374629678531849">"Debuguj"</string>
<string name="sendText" msgid="5132506121645618310">"Jak wysłać tekst?"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Głośność dzwonka"</string>
<string name="volume_music" msgid="5421651157138628171">"Głośność multimediów"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"Czy na pewno sformatować kartę SD? Wszystkie dane na karcie zostaną utracone."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatuj"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"Podłączono moduł debugowania USB"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Wybierz, aby wyłączyć debugowanie USB."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Wybierz metodę wprowadzania"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" AĄBCĆDEĘFGHIJKLŁMNŃOÓPQRSŚTUVWXYZŹŻ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"kandydaci"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Utwórz kontakt"\n"dla numeru <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"zaznaczone"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"niezaznaczone"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Zezwól"</string>
<string name="deny" msgid="2081879885755434506">"Odmów"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Żądane pozwolenie"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Prośba o pozwolenie"\n"dotyczące konta <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Metoda wprowadzania"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Synchronizacja"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Ułatwienia dostępu"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Tapeta"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Zmień tapetę"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Protokół PPTP"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protokół L2TP"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"Sieć VPN L2TP/IPSec z kluczem PSK"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Sieć VPN L2TP/IPSec z certyfikatem"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 891e7ce..1872cb4 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Não foi possível aceder ao ficheiro."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Não foi possível localizar o ficheiro pedido."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Existem demasiados pedidos em processamento. Tente novamente mais tarde."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Erro de início de sessão para <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Sincronização"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Sincronização"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Demasiadas eliminações de <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Monitorizar a sua localização física"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Comunicação de rede"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Permite o acesso de aplicações a várias funcionalidades de rede."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"As suas contas"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Aceda às contas disponíveis."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Controlos de hardware"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Aceda directamente ao hardware no telefone."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Chamadas"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Permite a uma aplicação activar a depuração para outra aplicação. Algumas aplicações maliciosas podem utilizar este item para eliminar outras aplicações."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"alterar definições da IU"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Permite a uma aplicação mudar a configuração actual como, por exemplo, a região ou o tamanho global do tipo de letra."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"reiniciar outras aplicações"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Permite a uma aplicação efectuar o reinício forçado de outras aplicações."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"forçar fecho da aplicação"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Permite a uma aplicação forçar qualquer actividade em primeiro plano a fechar e retroceder. Nunca deve ser necessário para aplicações normais."</string>
<string name="permlab_dump" msgid="1681799862438954752">"obter estado interno do sistema"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Permite a uma aplicação escrever novas palavras no dicionário do utilizador."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"modificar/eliminar os conteúdos do cartão SD"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Permite que uma aplicação escreva no cartão SD."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Residência"</item>
<item msgid="869923650527136615">"Móvel"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Personalizado"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Residência"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Telemóvel"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Emprego"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax do emprego"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax da residência"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Outro"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Rechamada"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Automóvel"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Telefone principal da empresa"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"RDIS"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Principal"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Outro fax"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Rádio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Telemóvel do emprego"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pager do trabalho"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistente"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Data de nascimento"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Aniversário"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Evento"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Personalizado"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Residência"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Emprego"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Outro"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Telemóvel"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Personalizado"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Residência"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Emprego"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Outro"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Personalizado"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Residência"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Emprego"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Outro"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Personalizado"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Emprego"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Outro"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Personalizado"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"através do <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> através de <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Introduzir código PIN"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Código PIN incorrecto!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Para desbloquear, prima Menu e, em seguida, 0."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Lamentamos, tente novamente"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"A carregar (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Carregado."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Ligue o carregador."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Nenhum cartão SIM."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Nenhum cartão SIM no telefone."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Iniciar sessão"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nome de utilizador ou palavra-passe inválidos."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"A verificar..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Desbloquear"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Som activado"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Som desactivado"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g> <xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g> <xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Limpar"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"A carregar..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Ligue o carregador"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"A bateria está a ficar fraca:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"Restam <xliff:g id="NUMBER">%d%%</xliff:g> ou menos."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Utilização da bateria"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"O teste de fábrica falhou"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"A acção FACTORY_TEST apenas é suportada para pacotes instalados em /system/app."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Navegar para outra página?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Seleccione OK para continuar ou Cancelar para permanecer na página actual."</string>
<string name="save_password_label" msgid="6860261758665825069">"Confirmar"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Sugestão: toque duas vezes para aumentar ou diminuir o zoom."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"ler histórico e marcadores do browser"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Permite que a aplicação leia todos os URLs visitados pelo browser e todos os marcadores do browser."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"gravar histórico e marcadores do browser"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Forçar fecho"</string>
<string name="report" msgid="4060218260984795706">"Relatório"</string>
<string name="wait" msgid="7147118217226317732">"Esperar"</string>
- <string name="debug" msgid="9103374629678531849">"Depuração"</string>
<string name="sendText" msgid="5132506121645618310">"Seleccionar uma acção para texto"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Volume da campainha"</string>
<string name="volume_music" msgid="5421651157138628171">"Volume de multimédia"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"Tem a certeza de que pretende formatar o cartão SD? Perder-se-ão todos os dados no cartão."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatar"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"Depuração USB ligada"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Seleccione para desactivar depuração USB."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Seleccionar método de entrada"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"candidatos"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Criar contacto"\n"utilizando <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"verificado"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"não verificado"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Permitir"</string>
<string name="deny" msgid="2081879885755434506">"Recusar"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Autorização Solicitada"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Autorização solicitada"\n"para a conta <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Método de entrada"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Sincronização"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Acessibilidade"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Imagem de fundo"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Alterar imagem de fundo"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocolo de túnel ponto a ponto (PPTP)"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocolo de túnel de camada 2 (L2TP)"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"VPN L2TP/IPSec baseada em chave pré- partilhada"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"VPN L2TP/IPSec baseada em certificado"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 265fb62..6841fec 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Não foi possível acessar o arquivo."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"O arquivo solicitado não foi encontrado."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Há muitas solicitações sendo processadas. Tente novamente mais tarde."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Erro de login para <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Sincronizar"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Sincronizar"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Muitas exclusões de <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Monitora o seu local físico."</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Comunicação da rede"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Permite que os aplicativos acessem diversos recursos de rede."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Suas contas"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Acessar as contas disponíveis."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Controles de hardware"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Acessa o hardware diretamente no aparelho."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Chamadas telefônicas"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Permite que um aplicativo ative a depuração de outro aplicativo. Aplicativos maliciosos podem usar isso para encerrar outros aplicativos."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"alterar as suas configurações de UI"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Permite que um aplicativo altere a configuração atual, como o local ou o tamanho geral da fonte."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"reiniciar outros aplicativos"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Permite que um aplicativo reinicie forçosamente outros aplicativos."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"forçar fechamento do aplicativo"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Permite que um aplicativo force o fechamento de qualquer atividade que esteja em primeiro plano. Aplicativos normais não devem precisar disso em momento algum."</string>
<string name="permlab_dump" msgid="1681799862438954752">"recuperar o estado interno do sistema"</string>
@@ -392,8 +395,12 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Permite que um aplicativo grave novas palavras no dicionário do usuário."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"modificar/excluir conteúdo do cartão SD"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Permite que um aplicativo grave no cartão SD."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
- <item msgid="8901098336658710359">"Página inicial"</item>
+ <item msgid="8901098336658710359">"Residencial"</item>
<item msgid="869923650527136615">"Celular"</item>
<item msgid="7897544654242874543">"Trabalho"</item>
<item msgid="1103601433382158155">"Fax do trabalho"</item>
@@ -403,19 +410,19 @@
<item msgid="9192514806975898961">"Personalizado"</item>
</string-array>
<string-array name="emailAddressTypes">
- <item msgid="8073994352956129127">"Página inicial"</item>
+ <item msgid="8073994352956129127">"Residencial"</item>
<item msgid="7084237356602625604">"Trabalho"</item>
<item msgid="1112044410659011023">"Outros"</item>
<item msgid="2374913952870110618">"Personalizado"</item>
</string-array>
<string-array name="postalAddressTypes">
- <item msgid="6880257626740047286">"Página inicial"</item>
+ <item msgid="6880257626740047286">"Residencial"</item>
<item msgid="5629153956045109251">"Trabalho"</item>
<item msgid="4966604264500343469">"Outros"</item>
<item msgid="4932682847595299369">"Personalizado"</item>
</string-array>
<string-array name="imAddressTypes">
- <item msgid="1738585194601476694">"Página inicial"</item>
+ <item msgid="1738585194601476694">"Residencial"</item>
<item msgid="1359644565647383708">"Trabalho"</item>
<item msgid="7868549401053615677">"Outros"</item>
<item msgid="3145118944639869809">"Personalizado"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Personalizado"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Residencial"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Celular"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Comercial"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Fax comercial"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Fax residencial"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Pager"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Outros"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Retorno de chamada"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Carro"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Empresa (principal)"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Principal"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Outro fax"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Rádio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Celular comercial"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Pager comercial"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistente"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Aniversário"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Data comemorativa"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Evento"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Personalizado"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Residencial"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Comercial"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Outros"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Celular"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Personalizado"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Residencial"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Comercial"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Outros"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Personalizado"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Residencial"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Comercial"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Outros"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Personalizado"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Comercial"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Outros"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Personalizado"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"por meio de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Digite o código PIN"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Código PIN incorreto!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Para desbloquear, pressione Menu e, em seguida, 0."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Tente novamente"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Carregando (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Carregado."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Conecte o seu carregador."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Sem cartão SIM."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Não há um cartão SIM no telefone."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Fazer login"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Nome de usuário ou senha inválida."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Verificando..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Desbloquear"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Som ativado"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Som desativado"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Limpar"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"Carregando..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Conecte o carregador"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"A bateria está ficando baixa:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> ou menos restante(s)."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Uso da bateria"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Falha no teste de fábrica"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"A ação FACTORY_TEST é suportada apenas para pacotes instalados em /system/app."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Deseja sair desta página?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Selecione OK para continuar ou Cancelar para permanecer na página atual."</string>
<string name="save_password_label" msgid="6860261758665825069">"Confirmar"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Dica: toque duas vezes para aumentar e diminuir o zoom."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"ler histórico e favoritos do Navegador"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Permite que o aplicativo leia todos os URLs visitados pelo Navegador e todos os favoritos do Navegador."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"gravar histórico e favoritos do Navegador"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Forçar fechamento"</string>
<string name="report" msgid="4060218260984795706">"Informar"</string>
<string name="wait" msgid="7147118217226317732">"Aguardar"</string>
- <string name="debug" msgid="9103374629678531849">"Depurar"</string>
<string name="sendText" msgid="5132506121645618310">"Selecione uma ação para o texto"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Volume da campainha"</string>
<string name="volume_music" msgid="5421651157138628171">"Volume da mídia"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"Tem certeza de que deseja formatar o cartão SD? Todos os dados no seu cartão serão perdidos."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatar"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"Depuração USB conectada"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Selecione para desativar a depuração USB."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Selecionar método de entrada"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"candidatos"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Criar contato "\n"usando <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"selecionado"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"não selecionado"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Permitir"</string>
<string name="deny" msgid="2081879885755434506">"Negar"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Autorização solicitada"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Solicitada a permissão"\n"para a conta <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Método de entrada"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Sincronizar"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Acessibilidade"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Papel de parede"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Alterar papel de parede"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Protocolo de encapsulamento ponto a ponto"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Protocolo de encapsulamento de camada 2"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"VPN L2TP/IPSec com base em chave pré-compartilhada"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"VPN L2TP/IPSec com base em certificado"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 373c45e..0fa02dc 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Не удается получить доступ к файлу."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Не удалось найти указанные файлы."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Обрабатывается слишком много запросов. Повторите попытку позднее."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Ошибка входа (<xliff:g id="ACCOUNT">%1$s</xliff:g>)"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Синхр."</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Синхр."</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Слишком много удалений <xliff:g id="CONTENT_TYPE">%s</xliff:g>."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Отслеживание физического местоположения"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Сетевой обмен данными"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Позволяет приложениям получать доступ к различным сетевым функциям."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Ваши аккаунты"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Доступ к имеющимся аккаунтам."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Элементы управления аппаратным обеспечением"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Прямой доступ к аппаратному обеспечению телефона."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Телефонные вызовы"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Позволяет приложению запускать процесс отладки другого приложения. Вредоносные приложения могут использовать эту возможность для остановки других приложений."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"изменять настройки пользовательского интерфейса"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Позволяет приложению изменять текущую конфигурацию, например региональные настройки или размер шрифта."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"перезапускать другие приложения"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Позволяет приложению принудительно перезапускать другие приложения."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"принудительно закрывать приложения"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Позволяет приложению принудительно закрыть или вернуть в исходное состояние процессы, выполняемые в активном режиме. Не требуется для обычных приложений."</string>
<string name="permlab_dump" msgid="1681799862438954752">"извлекать данные о внутреннем состоянии системы"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Позволяет приложению записывать новые слова в пользовательский словарь."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"изменять/удалять содержание SD-карты"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Разрешает приложению запись на SD-карту"</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Домашний"</item>
<item msgid="869923650527136615">"Мобильный"</item>
@@ -400,30 +407,30 @@
<item msgid="1735177144948329370">"Домашний факс"</item>
<item msgid="603878674477207394">"Пейджер"</item>
<item msgid="1650824275177931637">"Другой"</item>
- <item msgid="9192514806975898961">"Особый"</item>
+ <item msgid="9192514806975898961">"Создать свой ярлык"</item>
</string-array>
<string-array name="emailAddressTypes">
- <item msgid="8073994352956129127">"Домашний"</item>
+ <item msgid="8073994352956129127">"Личный"</item>
<item msgid="7084237356602625604">"Рабочий"</item>
<item msgid="1112044410659011023">"Другой"</item>
- <item msgid="2374913952870110618">"Особый"</item>
+ <item msgid="2374913952870110618">"Создать свой ярлык"</item>
</string-array>
<string-array name="postalAddressTypes">
<item msgid="6880257626740047286">"Домашний"</item>
<item msgid="5629153956045109251">"Рабочий"</item>
<item msgid="4966604264500343469">"Другой"</item>
- <item msgid="4932682847595299369">"Особый"</item>
+ <item msgid="4932682847595299369">"Создать свой ярлык"</item>
</string-array>
<string-array name="imAddressTypes">
<item msgid="1738585194601476694">"Домашний"</item>
<item msgid="1359644565647383708">"Рабочий"</item>
<item msgid="7868549401053615677">"Другое"</item>
- <item msgid="3145118944639869809">"Особый"</item>
+ <item msgid="3145118944639869809">"Создать свой ярлык"</item>
</string-array>
<string-array name="organizationTypes">
<item msgid="7546335612189115615">"Рабочий"</item>
- <item msgid="4378074129049520373">"Другой"</item>
- <item msgid="3455047468583965104">"Особый"</item>
+ <item msgid="4378074129049520373">"Другое"</item>
+ <item msgid="3455047468583965104">"Создать свой ярлык"</item>
</string-array>
<string-array name="imProtocols">
<item msgid="8595261363518459565">"AIM"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Создать свой ярлык"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Домашний"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Мобильный"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Рабочий"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Рабочий факс"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Домашний факс"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Пейджер"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Другой"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Обр. вызов"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"В авто"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Телефон офиса"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Основной"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Доп. факс"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Радио"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Телекс"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"Телетайп"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Рабочий мобильный"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Рабочий пейджер"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Секретарь"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"День рождения"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Юбилей"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Мероприятие"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Создать свой ярлык"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Личный"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Рабочий"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Другой"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Мобильный"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Создать свой ярлык"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Домашний"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Рабочий"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Другой"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Создать свой ярлык"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Домашний"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Рабочий"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Другой"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Создать свой ярлык"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Работа"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Другое"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Создать свой ярлык"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"с помощью <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> с помощью <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Введите PIN-код"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Неверный PIN-код!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Для разблокировки нажмите \"Меню\", а затем 0."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Повторите попытку"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Идет зарядка (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Заряжена."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Подключите зарядное устройство."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Нет SIM-карты."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"SIM-карта не установлена."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Вход"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Неверное имя пользователя или пароль."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Проверка..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Разблокировать"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Вкл. звук"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Откл. звук"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Очистить"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"Идет зарядка..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"Подключите зарядное устройство"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Батарея разряжена:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"Осталось <xliff:g id="NUMBER">%d%%</xliff:g> или меньше."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Расход заряда батареи"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Не удалось провести стандартный тест"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"Действие FACTORY_TEST поддерживается только для пакетов, установленных в /system/app."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Перейти с этой страницы?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Нажмите \"ОК\", чтобы продолжить, или \"Отмена\", чтобы остаться на текущей странице."</string>
<string name="save_password_label" msgid="6860261758665825069">"Подтвердите"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Совет: нажмите дважды, чтобы увеличить и уменьшить масштаб."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"считывать историю и закладки браузера"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Разрешает приложению считывать все URL, посещенные браузером, и все его закладки."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"записывать историю и закладки браузера"</string>
@@ -742,14 +697,13 @@
<string name="aerr_application" msgid="4683614104336409186">"Произошла неожиданная остановка приложения <xliff:g id="APPLICATION">%1$s</xliff:g> (процесс <xliff:g id="PROCESS">%2$s</xliff:g>). Повторите попытку."</string>
<string name="aerr_process" msgid="1551785535966089511">"Произошла неожиданная остановка процесса <xliff:g id="PROCESS">%1$s</xliff:g>. Повторите попытку."</string>
<string name="anr_title" msgid="3100070910664756057">"Извините!"</string>
- <string name="anr_activity_application" msgid="3538242413112507636">"Действие <xliff:g id="ACTIVITY">%1$s</xliff:g> (в приложении <xliff:g id="APPLICATION">%2$s</xliff:g>) не отвечает."</string>
- <string name="anr_activity_process" msgid="5420826626009561014">"Действие <xliff:g id="ACTIVITY">%1$s</xliff:g> (в процессе <xliff:g id="PROCESS">%2$s</xliff:g>) не отвечает."</string>
+ <string name="anr_activity_application" msgid="3538242413112507636">"<xliff:g id="ACTIVITY">%1$s</xliff:g> не отвечает (приложение: <xliff:g id="APPLICATION">%2$s</xliff:g>)."</string>
+ <string name="anr_activity_process" msgid="5420826626009561014">"Приложение <xliff:g id="ACTIVITY">%1$s</xliff:g> не отвечает (процесс: <xliff:g id="PROCESS">%2$s</xliff:g>)."</string>
<string name="anr_application_process" msgid="4185842666452210193">"Приложение <xliff:g id="APPLICATION">%1$s</xliff:g> (в процессе <xliff:g id="PROCESS">%2$s</xliff:g>) не отвечает."</string>
<string name="anr_process" msgid="1246866008169975783">"Процесс <xliff:g id="PROCESS">%1$s</xliff:g> не отвечает."</string>
- <string name="force_close" msgid="3653416315450806396">"Принудительное закрытие"</string>
+ <string name="force_close" msgid="3653416315450806396">"Закрыть"</string>
<string name="report" msgid="4060218260984795706">"Отчет"</string>
- <string name="wait" msgid="7147118217226317732">"Подождите"</string>
- <string name="debug" msgid="9103374629678531849">"Выполнить отладку"</string>
+ <string name="wait" msgid="7147118217226317732">"Подождать"</string>
<string name="sendText" msgid="5132506121645618310">"Выберите действие для текста"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Громкость звонка"</string>
<string name="volume_music" msgid="5421651157138628171">"Громкость мультимедиа"</string>
@@ -802,11 +756,9 @@
<string name="extmedia_format_title" msgid="8663247929551095854">"Форматировать карту SD"</string>
<string name="extmedia_format_message" msgid="3621369962433523619">"Отформатировать карту SD? Все данные, находящиеся на карте, будут уничтожены."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Формат"</string>
- <string name="adb_active_notification_title" msgid="6729044778949189918">"Отладка USB подключена"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_title" msgid="6729044778949189918">"Отладка по USB разрешена"</string>
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Нажмите, чтобы отключить отладку USB."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Выберите способ ввода"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"варианты"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Создать контакт"\n"с номером <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"отмечено"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"не проверено"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Разрешить"</string>
<string name="deny" msgid="2081879885755434506">"Отклонить"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Разрешение запрошено"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Требуется разрешение"\n"для аккаунта <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Способ ввода"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Синхр."</string>
- <string name="accessibility_binding_label" msgid="4148120742096474641">"Специальные возможности"</string>
+ <string name="accessibility_binding_label" msgid="4148120742096474641">"Спец. возможности"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Фоновый рисунок"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Изменить фоновый рисунок"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Протокол PPTP"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Протокол L2TP"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"L2TP/IPSec VPN (на основе предв. общ. ключа)"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"L2TP/IPSec VPN (на основе сертификата)"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index db77ee1..313073f 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Det gick inte att komma åt filen."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"Den begärda filen hittades inte."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"För många begäranden bearbetas. Försök igen senare."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"Inloggningsfel för <xliff:g id="ACCOUNT">%1$s</xliff:g>"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Synkronisera"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Synkronisera"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"För många <xliff:g id="CONTENT_TYPE">%s</xliff:g>-borttagningar."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Övervaka din fysiska plats"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Nätverkskommunikation"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Tillåt att program kommer åt olika nätverksfunktioner."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Dina konton"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Få åtkomst till tillgängliga konton."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Kontroller för maskinvara"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Direkt åtkomst till maskinvara på handenheten."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefonsamtal"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Tillåter att ett program aktiverar felsökning för ett annat program. Skadliga program kan använda detta för att avsluta andra program."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"ändra dina gränssnittsinställningar"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Tillåter att ett program ändrar den aktuella konfigurationen, till exempel språk eller övergripande teckenformat."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"starta om andra program"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Tillåter att ett program framtvingar omstart av andra program."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"tvinga program att avsluta"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Tillåter att ett program tvingar en aktivitet som finns i förgrunden att avsluta och gå tillbaka. Behövs inte för vanliga program."</string>
<string name="permlab_dump" msgid="1681799862438954752">"hämta systemets interna status"</string>
@@ -319,7 +322,7 @@
<string name="permlab_callPrivileged" msgid="4198349211108497879">"ringa telefonnummer direkt"</string>
<string name="permdesc_callPrivileged" msgid="244405067160028452">"Tillåter att programmet ringer ett telefonnummer, inklusive nödnummer, utan att du behöver göra något. Skadliga program kan ringa onödiga och olagliga samtal till räddningtjänsten."</string>
<string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"starta CDMA-telefoninställningar direkt"</string>
- <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Tillåter att programmet startar CDMA-anslutning. Skadliga program kan skada CDMA-anslutningar i onödan."</string>
+ <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Tillåter att programmet startar CDMA-anslutning. Skadliga program kan starta CDMA-anslutningar i onödan."</string>
<string name="permlab_locationUpdates" msgid="7785408253364335740">"styra meddelanden för platsuppdatering"</string>
<string name="permdesc_locationUpdates" msgid="2300018303720930256">"Tillåter aktivering och inaktivering av avisering om platsuppdatering i radion. Används inte av vanliga program."</string>
<string name="permlab_checkinProperties" msgid="7855259461268734914">"få åtkomst till incheckningsegenskaper"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Tillåter att ett program skriver in nya ord i användarordlistan."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"ändra/ta bort innehåll på SD-kortet"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Tillåter att ett program skriver till SD-kortet."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Hem"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -435,126 +442,73 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Anpassad"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Hem"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"Arbete"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"Arbetsfax"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Hemfax"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Personsökare"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Övrigt"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Återuppringning"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Bil"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Nummer till företag"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Telefonnummer"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Annat faxnummer"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Radio"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"Mobiltelefon, arbetet"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"Personsökare, arbetet"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Assistent"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Födelsedag"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Högtidsdag"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Händelse"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Anpassad"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Hem"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"Arbete"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Övrigt"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Anpassad"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Hem"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"Arbete"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Övrigt"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Anpassad"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Hem"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"Arbete"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Övrigt"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Anpassad"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"Arbete"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Övrigt"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Anpassad"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Ange PIN-kod"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Fel PIN-kod!"</string>
- <string name="keyguard_label_text" msgid="861796461028298424">"Tryck på Meny och sedan på 0 om du vill låsa upp."</string>
+ <string name="keyguard_label_text" msgid="861796461028298424">"Tryck på Menu och sedan på 0 om du vill låsa upp."</string>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Nödsamtalsnummer"</string>
<string name="lockscreen_carrier_default" msgid="8812714795156374435">"(Ingen tjänst)"</string>
<string name="lockscreen_screen_locked" msgid="7288443074806832904">"Skärmen har låsts."</string>
- <string name="lockscreen_instructions_when_pattern_enabled" msgid="46154051614126049">"Tryck på Meny om du vill låsa upp eller ringa nödsamtal."</string>
- <string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Tryck på Meny om du vill låsa upp."</string>
+ <string name="lockscreen_instructions_when_pattern_enabled" msgid="46154051614126049">"Tryck på Menu om du vill låsa upp eller ringa nödsamtal."</string>
+ <string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Tryck på Menu om du vill låsa upp."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Rita grafiskt lösenord för att låsa upp"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Nödsamtal"</string>
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Korrekt!"</string>
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Försök igen"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Laddar (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Laddad."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Anslut din laddare."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"Inget SIM-kort."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Inget SIM-kort i telefonen."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Logga in"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Ogiltigt användarnamn eller lösenord."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Kontrollerar ..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Lås upp"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Ljud på"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Ljud av"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Ta bort"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"Laddar…"</string>
<string name="battery_low_title" msgid="7923774589611311406">"Anslut laddaren"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Batteriet håller på att ta slut:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> eller mindre kvar."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Batteriförbrukning"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Det gick fel vid fabrikstestet"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"Åtgärden FACTORY_TEST stöds endast för paket som har installerats i /system/app."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Vill du lämna den här den här sidan?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Tryck på OK om du vill fortsätta eller på Avbryt om du vill vara kvar på den aktuella sidan."</string>
<string name="save_password_label" msgid="6860261758665825069">"Bekräfta"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"Tips! Dubbelklicka om du vill zooma in eller ut."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"läsa webbläsarhistorik och bokmärken"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Tillåter att program läser alla webbadresser som webbläsaren har öppnat och alla webbläsarens bokmärken."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skriva webbläsarhistorik och bokmärken"</string>
@@ -610,7 +565,7 @@
<string name="open_permission_deny" msgid="5661861460947222274">"Du har inte behörighet att öppna den här sidan."</string>
<string name="text_copied" msgid="4985729524670131385">"Text har kopierats till urklipp."</string>
<string name="more_item_label" msgid="4650918923083320495">"Mer"</string>
- <string name="prepend_shortcut_label" msgid="2572214461676015642">"Meny+"</string>
+ <string name="prepend_shortcut_label" msgid="2572214461676015642">"Menu+"</string>
<string name="menu_space_shortcut_label" msgid="2410328639272162537">"utrymme"</string>
<string name="menu_enter_shortcut_label" msgid="2743362785111309668">"retur"</string>
<string name="menu_delete_shortcut_label" msgid="3658178007202748164">"ta bort"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Tvinga fram en stängning"</string>
<string name="report" msgid="4060218260984795706">"Rapportera"</string>
<string name="wait" msgid="7147118217226317732">"Vänta"</string>
- <string name="debug" msgid="9103374629678531849">"Felsökning"</string>
<string name="sendText" msgid="5132506121645618310">"Välj en åtgärd för text"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Ringvolym"</string>
<string name="volume_music" msgid="5421651157138628171">"Mediavolym"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"Vill du formatera SD-kortet? Alla data på ditt kort kommer att gå förlorade."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Format"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"USB-felsökning ansluten"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"Välj att inaktivera USB-felsökning."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Välj indatametod"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"kandidater"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"Skapa kontakt"\n"med <xliff:g id="NUMBER">%s</xliff:g>"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"markerad"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"inte markerad"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"Tillåt"</string>
<string name="deny" msgid="2081879885755434506">"Neka"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Begärd behörighet"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"Behörighet krävs"\n"för kontot <xliff:g id="ACCOUNT">%s</xliff:g>"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Indatametod"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Synkronisera"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Tillgänglighet"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Bakgrund"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Ändra bakgrund"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Point-to-Point Tunneling Protocol"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Layer 2 Tunneling Protocol"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"I förväg delad L2TP/IPSec VPN-nyckel"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"Certifikatsbaserad L2TP/IPSec VPN"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 503ad7d..d7a02bc 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"Dosyaya erişilemedi."</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"İstenen dosya bulunamadı."</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"Çok fazla sayıda istek işleniyor. Daha sonra yeniden deneyin."</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"<xliff:g id="ACCOUNT">%1$s</xliff:g> hesabı için oturum açma hatası"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"Senk."</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"Senk."</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"Çok fazla <xliff:g id="CONTENT_TYPE">%s</xliff:g> silme var."</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"Fiziksel konumunuzu izleyin"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"Ağ iletişimi"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"Uygulamaların çeşitli ağ özelliklerine erişmesine izin verir."</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"Hesaplarınız"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Kullanılabilir hesaplara erişin."</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Donanım denetimleri"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"Telefon donanımına doğrudan erişim."</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"Telefon çağrıları"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Bir uygulamanın başka bir uygulama için hata ayıklamayı çalıştırmasına izin verir. Kötü amaçlı uygulamalar bu işlevi başka uygulamaları kapatmak için kullanabilir."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"kullanıcı arayüzü ayarlarınızı değiştirin"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Uygulamaların güncel yapılandırmayı; örneğin yerel ayarı veya genel yazı tipi boyutunu değiştirmesine izin verir."</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"diğer uygulamaları yeniden başlat"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"Uygulamaların başka uygulamaları zorla yeniden başlatmasına izin verir."</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"uygulamayı kapanmaya zorla"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Uygulamaların, ön plandaki herhangi bir etkinliği kapanmaya ve arka plana geçmeye zorlamasına izin verir. Normal uygulamalarda hiçbir zaman gerekmemelidir."</string>
<string name="permlab_dump" msgid="1681799862438954752">"sistemin dahili durumunu al"</string>
@@ -314,9 +317,9 @@
<string name="permdesc_flashlight" msgid="6433045942283802309">"Uygulamaların flaş ışığını denetlemesine izin verir."</string>
<string name="permlab_hardware_test" msgid="4148290860400659146">"donanımı test et"</string>
<string name="permdesc_hardware_test" msgid="3668894686500081699">"Uygulamanın donanım testi için çeşitli çevre birimlerini denetlemesine izin verir."</string>
- <string name="permlab_callPhone" msgid="3925836347681847954">"telefon numaralarını doğrudan ara"</string>
- <string name="permdesc_callPhone" msgid="3369867353692722456">"Uygulamanın müdahaleniz olmadan telefon numaralarını aramasına izin verir. Kötü amaçlı uygulamalar, telefon faturanızda beklenmedik görüşmeler çıkmasına neden olabilir. Bu işlev, uygulamanın acil numara aramasına izin vermez."</string>
- <string name="permlab_callPrivileged" msgid="4198349211108497879">"herhangi bir telefon numarasını doğrudan ara"</string>
+ <string name="permlab_callPhone" msgid="3925836347681847954">"telefon numaralarına doğrudan çağrı yap"</string>
+ <string name="permdesc_callPhone" msgid="3369867353692722456">"Uygulamanın müdahaleniz olmadan telefon numaralarına çağrı yapmasına izin verir. Kötü amaçlı uygulamalar, telefon faturanızda beklenmedik görüşmeler çıkmasına neden olabilir. Bu işlev, uygulamanın acil numaralara çağrı yapmasına izin vermez."</string>
+ <string name="permlab_callPrivileged" msgid="4198349211108497879">"herhangi bir telefon numarasına doğrudan çağrı yap"</string>
<string name="permdesc_callPrivileged" msgid="244405067160028452">"Uygulamanın, siz müdahale etmeden acil numaralar dahil herhangi bir numarayı aramasına izin verir. Kötü amaçlı uygulamalar acil servisleri gereksiz yere ve yasal olmayan şekilde arayabilir."</string>
<string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"CDMA telefon kurulumunu doğrudan başlat"</string>
<string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Uygulamaya CDMA hazırlığını başlatma izni verir. Kötü niyetli uygulamalar CDMA hazırlığını gereksiz yere başlatabilir"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"Uygulamaların kullanıcı sözlüğüne yeni kelimeler yazmasına izin verir."</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"SD kart içeriklerini değiştir/sil"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"Bir uygulamaya SD karta yazma izni verir."</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Ev"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"Özel"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"Ev"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"Mobil"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"İş"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"İş Faksı"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"Ev Faksı"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"Çağrı cihazı"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"Diğer"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"Geri Arama"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"Araç"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"Şirket Merkezi"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"Ana"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"Diğer Faks"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"Telsiz"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Teleks"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"İş Yeri Cep Telefonu"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"İş Yeri Çağrı Cihazı"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"Yardımcı"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"Doğum günü"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"Yıldönümü"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"Etkinlik"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"Özel"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"Ev"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"İş"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"Diğer"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"Mobil"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"Özel"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"Ev"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"İş"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"Diğer"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"Özel"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"Ev"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"İş"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"Diğer"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"Özel"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"İş"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"Diğer"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"Özel"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"<xliff:g id="SOURCE">%1$s</xliff:g> aracılığıyla"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="SOURCE">%2$s</xliff:g> ile <xliff:g id="DATE">%1$s</xliff:g> tarihinde"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"PIN kodunu gir"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Yanlış PIN kodu!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Kilidi açmak için önce Menü\'ye, sonra 0\'a basın."</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Üzgünüz, lütfen yeniden deneyin"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Şarj oluyor (<xliff:g id="PERCENT">%%</xliff:g><xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Şarj oldu."</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Şarj cihazınızı bağlayın."</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"SIM kart yok."</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"Telefonda SIM kart yok."</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"Oturum aç"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"Geçersiz kullanıcı adı veya şifre."</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"Kontrol ediliyor..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"Kilit Aç"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"Sesi aç"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"Sesi kapat"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g> <xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g> <xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"Temizle"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"Şarj oluyor…"</string>
<string name="battery_low_title" msgid="7923774589611311406">"Lütfen şarj cihazını takın"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"Pil tükeniyor:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"<xliff:g id="NUMBER">%d%%</xliff:g> veya daha az kaldı."</string>
<string name="battery_low_why" msgid="7279169609518386372">"Pil kullanımı"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"Fabrika testi yapılamadı"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"FACTORY_TEST işlemi yalnızca /system/app dizinine yüklenmiş paketler için desteklenir."</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"Bu sayfadan ayrılıyor musunuz?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"Devam etmek için Tamam\'ı, sayfada kalmak için İptal\'i tıklatın."</string>
<string name="save_password_label" msgid="6860261758665825069">"Onayla"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"İpucu: Yakınlaştırmak ve uzaklaştırmak için iki kez hafifçe vurun."</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"Tarayıcı geçmişini ve favorileri oku"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Uygulamaya Tarayıcının ziyaret etmiş olduğu tüm URL\'leri ve Tarayıcının tüm favorilerini okuma izni verir."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"Tarayıcı geçmişini ve favorileri yaz"</string>
@@ -713,7 +668,7 @@
<string name="elapsed_time_short_format_mm_ss" msgid="4431555943828711473">"<xliff:g id="MINUTES">%1$02d</xliff:g>:<xliff:g id="SECONDS">%2$02d</xliff:g>"</string>
<string name="elapsed_time_short_format_h_mm_ss" msgid="1846071997616654124">"<xliff:g id="HOURS">%1$d</xliff:g>:<xliff:g id="MINUTES">%2$02d</xliff:g>:<xliff:g id="SECONDS">%3$02d</xliff:g>"</string>
<string name="selectAll" msgid="6876518925844129331">"Tümünü seç"</string>
- <string name="selectText" msgid="3889149123626888637">"Metni seç"</string>
+ <string name="selectText" msgid="3889149123626888637">"Metin seç"</string>
<string name="stopSelectingText" msgid="4157931463872320996">"Metin seçmeyi durdur"</string>
<string name="cut" msgid="3092569408438626261">"Kes"</string>
<string name="cutAll" msgid="2436383270024931639">"Tümünü kes"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"Kapanmaya zorla"</string>
<string name="report" msgid="4060218260984795706">"Rapor"</string>
<string name="wait" msgid="7147118217226317732">"Bekle"</string>
- <string name="debug" msgid="9103374629678531849">"Hata ayıkla"</string>
<string name="sendText" msgid="5132506121645618310">"Metin için bir işlem seçin"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"Zil sesi düzeyi"</string>
<string name="volume_music" msgid="5421651157138628171">"Medya ses düzeyi"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"SD kartı biçimlendirmek istediğinizden emin misiniz? Kartınızdaki tüm veriler yok olacak."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Biçimlendir"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"USB hata ayıklaması bağlandı"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"USB hata ayıklamasını devre dışı bırakmak için tıklayın."</string>
+ <string name="select_input_method" msgid="6865512749462072765">"Giriş yöntemini seç"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"adaylar"</u></string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"<xliff:g id="NUMBER">%s</xliff:g>"\n" ile kişi oluştur"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"seçildi"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"seçilmedi"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"İzin Ver"</string>
<string name="deny" msgid="2081879885755434506">"Reddet"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"İzin İstendi"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"<xliff:g id="ACCOUNT">%s</xliff:g> hesabı için"\n"İzin İstendi"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"Giriş yöntemi"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"Senkronizasyon"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"Erişebilirlik"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"Duvar Kağıdı"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"Duvar kağıdını değiştir"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"Noktadan Noktaya Tünel Protokolü Kuralları"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"Katman 2 Tünel Protokolü"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"L2TP/IPSec VPN temelli önceden paylaşılmış anahtar"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"L2TP/IPSec VPN temelli sertifika"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 474fffc..3f3549b 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -35,32 +35,32 @@
<string name="serviceRegistered" msgid="6275019082598102493">"注册成功。"</string>
<string name="serviceErased" msgid="1288584695297200972">"清除成功。"</string>
<string name="passwordIncorrect" msgid="7612208839450128715">"密码不正确。"</string>
- <string name="mmiComplete" msgid="8232527495411698359">"MMI 完成。"</string>
+ <string name="mmiComplete" msgid="8232527495411698359">"MMI 码已完成。"</string>
<string name="badPin" msgid="5085454289896032547">"您输入的旧 PIN 不正确。"</string>
- <string name="badPuk" msgid="5702522162746042460">"您输入的 PUK 不正确。"</string>
+ <string name="badPuk" msgid="5702522162746042460">"您输入的 PUK 码不正确。"</string>
<string name="mismatchPin" msgid="3695902225843339274">"您输入的 PIN 码不一致。"</string>
- <string name="invalidPin" msgid="3850018445187475377">"输入一个 4 至 8 位数的 PIN。"</string>
- <string name="needPuk" msgid="919668385956251611">"您的 SIM 卡被 PUK 锁定。请输入 PUK 码进行解锁。"</string>
- <string name="needPuk2" msgid="4526033371987193070">"输入 PUK2 以解锁 SIM 卡。"</string>
- <string name="ClipMmi" msgid="6952821216480289285">"来电者信息"</string>
- <string name="ClirMmi" msgid="7784673673446833091">"外拨者信息"</string>
- <string name="CfMmi" msgid="5123218989141573515">"呼叫转接"</string>
- <string name="CwMmi" msgid="9129678056795016867">"呼叫等待"</string>
+ <string name="invalidPin" msgid="3850018445187475377">"输入一个 4 至 8 位数的 PIN 码。"</string>
+ <string name="needPuk" msgid="919668385956251611">"已对 SIM 卡进行 PUK 码锁定。键入 PUK 码将其解锁。"</string>
+ <string name="needPuk2" msgid="4526033371987193070">"输入 PUK2 码以解锁 SIM 卡。"</string>
+ <string name="ClipMmi" msgid="6952821216480289285">"来电显示"</string>
+ <string name="ClirMmi" msgid="7784673673446833091">"本机号码"</string>
+ <string name="CfMmi" msgid="5123218989141573515">"来电转接"</string>
+ <string name="CwMmi" msgid="9129678056795016867">"来电等待"</string>
<string name="BaMmi" msgid="455193067926770581">"呼叫限制"</string>
<string name="PwdMmi" msgid="7043715687905254199">"密码更改"</string>
<string name="PinMmi" msgid="3113117780361190304">"PIN 码更改"</string>
- <string name="CnipMmi" msgid="3110534680557857162">"来电显示"</string>
+ <string name="CnipMmi" msgid="3110534680557857162">"显示号码"</string>
<string name="CnirMmi" msgid="3062102121430548731">"来电显示受限制"</string>
<string name="ThreeWCMmi" msgid="9051047170321190368">"三方通话"</string>
<string name="RuacMmi" msgid="7827887459138308886">"拒绝不想接听的骚扰电话"</string>
<string name="CndMmi" msgid="3116446237081575808">"主叫号码传送"</string>
<string name="DndMmi" msgid="1265478932418334331">"请勿打扰"</string>
- <string name="CLIRDefaultOnNextCallOn" msgid="429415409145781923">"来电者信息在默认情况下受限制。在下一次通话中:受限制"</string>
- <string name="CLIRDefaultOnNextCallOff" msgid="3092918006077864624">"来电者信息在默认情况受限制。在下一次通话中:不受限制"</string>
- <string name="CLIRDefaultOffNextCallOn" msgid="6179425182856418465">"来电者信息在默认情况下不受限制。在下一次通话中:受限制"</string>
- <string name="CLIRDefaultOffNextCallOff" msgid="2567998633124408552">"来电者信息在默认情况下不受限制。在下一次通话中:不受限制"</string>
+ <string name="CLIRDefaultOnNextCallOn" msgid="429415409145781923">"默认不显示本机号码,在下一次通话中也不显示"</string>
+ <string name="CLIRDefaultOnNextCallOff" msgid="3092918006077864624">"默认不显示本机号码,但在下一次通话中显示"</string>
+ <string name="CLIRDefaultOffNextCallOn" msgid="6179425182856418465">"默认显示本机号码,但在下一次通话中不显示"</string>
+ <string name="CLIRDefaultOffNextCallOff" msgid="2567998633124408552">"默认显示本机号码,在下一次通话中也显示"</string>
<string name="serviceNotProvisioned" msgid="8614830180508686666">"未提供服务。"</string>
- <string name="CLIRPermanent" msgid="5460892159398802465">"无法更改来电者信息设置。"</string>
+ <string name="CLIRPermanent" msgid="5460892159398802465">"本机号码显示设置无法更改。"</string>
<string name="RestrictedChangedTitle" msgid="5592189398956187498">"访问受限情况已发生变化"</string>
<string name="RestrictedOnData" msgid="8653794784690065540">"数据服务已禁用。"</string>
<string name="RestrictedOnEmergency" msgid="6581163779072833665">"紧急服务已禁用。"</string>
@@ -72,7 +72,7 @@
<string name="serviceClassSMS" msgid="2015460373701527489">"短信"</string>
<string name="serviceClassDataAsync" msgid="4523454783498551468">"异步"</string>
<string name="serviceClassDataSync" msgid="7530000519646054776">"同步"</string>
- <string name="serviceClassPacket" msgid="6991006557993423453">"封包"</string>
+ <string name="serviceClassPacket" msgid="6991006557993423453">"包"</string>
<string name="serviceClassPAD" msgid="3235259085648271037">"PAD"</string>
<string name="roamingText0" msgid="7170335472198694945">"启用漫游指示符"</string>
<string name="roamingText1" msgid="5314861519752538922">"禁用漫游指示符"</string>
@@ -90,29 +90,28 @@
<string name="roamingTextSearching" msgid="8360141885972279963">"正在搜索服务"</string>
<string name="cfTemplateNotForwarded" msgid="1683685883841272560">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>:无法转接"</string>
<string name="cfTemplateForwarded" msgid="1302922117498590521">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>:<xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
- <string name="cfTemplateForwardedTime" msgid="9206251736527085256">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>:<xliff:g id="TIME_DELAY">{2}</xliff:g> 秒后拨打 <xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
- <string name="cfTemplateRegistered" msgid="5073237827620166285">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>:没有转接"</string>
- <string name="cfTemplateRegisteredTime" msgid="6781621964320635172">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>:没有转接"</string>
+ <string name="cfTemplateForwardedTime" msgid="9206251736527085256">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>:<xliff:g id="TIME_DELAY">{2}</xliff:g> 秒后<xliff:g id="DIALING_NUMBER">{1}</xliff:g>"</string>
+ <string name="cfTemplateRegistered" msgid="5073237827620166285">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>:无法转接"</string>
+ <string name="cfTemplateRegisteredTime" msgid="6781621964320635172">"<xliff:g id="BEARER_SERVICE_CODE">{0}</xliff:g>:无法转接"</string>
<string name="fcComplete" msgid="3118848230966886575">"功能代码已拨完。"</string>
<string name="fcError" msgid="3327560126588500777">"出现连接问题或功能代码无效。"</string>
<string name="httpErrorOk" msgid="1191919378083472204">"确定"</string>
- <string name="httpError" msgid="2567300624552921790">"网页包含错误。"</string>
- <string name="httpErrorLookup" msgid="4517085806977851374">"找不到网址。"</string>
+ <string name="httpError" msgid="2567300624552921790">"此网页包含错误。"</string>
+ <string name="httpErrorLookup" msgid="4517085806977851374">"找不到该网址。"</string>
<string name="httpErrorUnsupportedAuthScheme" msgid="2781440683514730227">"不支持此网站身份验证方案。"</string>
<string name="httpErrorAuth" msgid="7293960746955020542">"身份验证失败。"</string>
<string name="httpErrorProxyAuth" msgid="1788207010559081331">"通过代理服务器进行身份验证失败。"</string>
<string name="httpErrorConnect" msgid="7623096283505770433">"未能连接到服务器。"</string>
- <string name="httpErrorIO" msgid="5047872902739125260">"服务器无法通信,请稍后重试。"</string>
+ <string name="httpErrorIO" msgid="5047872902739125260">"服务器无法通讯,请稍后重试。"</string>
<string name="httpErrorTimeout" msgid="4743403703762883954">"与服务器的连接超时。"</string>
- <string name="httpErrorRedirectLoop" msgid="8679596090392779516">"网页包含过多服务器重定向。"</string>
+ <string name="httpErrorRedirectLoop" msgid="8679596090392779516">"该页面包含太多服务器重定向。"</string>
<string name="httpErrorUnsupportedScheme" msgid="5257172771607996054">"不支持该协议。"</string>
<string name="httpErrorFailedSslHandshake" msgid="3088290300440289771">"无法建立安全连接。"</string>
<string name="httpErrorBadUrl" msgid="6088183159988619736">"网址无效,此网页无法打开。"</string>
<string name="httpErrorFile" msgid="8250549644091165175">"无法访问该文件。"</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"找不到请求的文件。"</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"正在处理的请求太多,请稍后重试。"</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"<xliff:g id="ACCOUNT">%1$s</xliff:g> 发生登录错误"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"同步"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"同步"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"太多<xliff:g id="CONTENT_TYPE">%s</xliff:g>删除项。"</string>
@@ -120,113 +119,117 @@
<string name="me" msgid="6545696007631404292">"我"</string>
<string name="power_dialog" msgid="1319919075463988638">"手机选项"</string>
<string name="silent_mode" msgid="7167703389802618663">"静音模式"</string>
- <string name="turn_on_radio" msgid="3912793092339962371">"打开无线电"</string>
- <string name="turn_off_radio" msgid="8198784949987062346">"关闭无线电"</string>
+ <string name="turn_on_radio" msgid="3912793092339962371">"打开收音机"</string>
+ <string name="turn_off_radio" msgid="8198784949987062346">"关闭收音机"</string>
<string name="screen_lock" msgid="799094655496098153">"屏幕锁定"</string>
<string name="power_off" msgid="4266614107412865048">"关机"</string>
<string name="shutdown_progress" msgid="2281079257329981203">"正在关机..."</string>
- <string name="shutdown_confirm" msgid="649792175242821353">"您的手机会关闭。"</string>
- <string name="no_recent_tasks" msgid="279702952298056674">"无最近的应用程序。"</string>
+ <string name="shutdown_confirm" msgid="649792175242821353">"您的手机会关机。"</string>
+ <string name="no_recent_tasks" msgid="279702952298056674">"没有最近的应用程序。"</string>
<string name="global_actions" msgid="2406416831541615258">"手机选项"</string>
<string name="global_action_lock" msgid="2844945191792119712">"屏幕锁定"</string>
<string name="global_action_power_off" msgid="4471879440839879722">"关机"</string>
<string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"静音模式"</string>
- <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"已关闭声音"</string>
- <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"已打开声音"</string>
+ <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"声音已关闭"</string>
+ <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"声音已开启"</string>
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"飞行模式"</string>
- <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"飞行模式已开启"</string>
- <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"飞行模式已关闭"</string>
+ <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"已开启飞行模式"</string>
+ <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"已关闭飞行模式"</string>
<string name="safeMode" msgid="2788228061547930246">"安全模式"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android 系统"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"需要您付费的服务"</string>
<string name="permgroupdesc_costMoney" msgid="8193824940620517189">"允许应用程序执行可能需要您付费的操作。"</string>
- <string name="permgrouplab_messages" msgid="7521249148445456662">"您的消息"</string>
- <string name="permgroupdesc_messages" msgid="7045736972019211994">"读/写短信、电子邮件和其他消息。"</string>
+ <string name="permgrouplab_messages" msgid="7521249148445456662">"您的信息"</string>
+ <string name="permgroupdesc_messages" msgid="7045736972019211994">"读写短信、电子邮件和其他信息。"</string>
<string name="permgrouplab_personalInfo" msgid="3519163141070533474">"您的个人信息"</string>
<string name="permgroupdesc_personalInfo" msgid="5488050357388806068">"直接访问手机上存储的联系人和日历。"</string>
<string name="permgrouplab_location" msgid="635149742436692049">"您的位置"</string>
<string name="permgroupdesc_location" msgid="2430258821648348660">"监视您的物理位置"</string>
- <string name="permgrouplab_network" msgid="5808983377727109831">"网络通信"</string>
+ <string name="permgrouplab_network" msgid="5808983377727109831">"网络通讯"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"允许应用程序访问各种网络功能。"</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
- <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"硬件控制"</string>
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"您的帐户"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"访问可用的帐户。"</string>
+ <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"硬件控件"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"直接访问手机上的硬件。"</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"手机通话"</string>
- <string name="permgroupdesc_phoneCalls" msgid="7489701620446183770">"监视、记录和处理电话。"</string>
+ <string name="permgroupdesc_phoneCalls" msgid="7489701620446183770">"监管、记录和处理电话呼叫。"</string>
<string name="permgrouplab_systemTools" msgid="4652191644082714048">"系统工具"</string>
- <string name="permgroupdesc_systemTools" msgid="8162102602190734305">"对系统的低级别访问和控制。"</string>
+ <string name="permgroupdesc_systemTools" msgid="8162102602190734305">"对系统进行低级访问和控制。"</string>
<string name="permgrouplab_developmentTools" msgid="3446164584710596513">"开发工具"</string>
- <string name="permgroupdesc_developmentTools" msgid="9056431193893809814">"只有应用程序开发人员需要这些功能。"</string>
+ <string name="permgroupdesc_developmentTools" msgid="9056431193893809814">"只有应用程序开发人员才会用到的功能。"</string>
<string name="permgrouplab_storage" msgid="1971118770546336966">"存储"</string>
<string name="permgroupdesc_storage" msgid="9203302214915355774">"访问 SD 卡。"</string>
<string name="permlab_statusBar" msgid="7417192629601890791">"停用或修改状态栏"</string>
- <string name="permdesc_statusBar" msgid="1365473595331989732">"允许应用程序停用状态栏,或者添加和删除系统图标。"</string>
- <string name="permlab_expandStatusBar" msgid="1148198785937489264">"展开/折叠状态栏"</string>
- <string name="permdesc_expandStatusBar" msgid="7088604400110768665">"允许应用程序展开或折叠状态栏。"</string>
+ <string name="permdesc_statusBar" msgid="1365473595331989732">"允许应用程序停用状态栏或者增删系统图标。"</string>
+ <string name="permlab_expandStatusBar" msgid="1148198785937489264">"展开/收拢状态栏"</string>
+ <string name="permdesc_expandStatusBar" msgid="7088604400110768665">"允许应用程序展开或收拢状态栏。"</string>
<string name="permlab_processOutgoingCalls" msgid="1136262550878335980">"拦截外拨电话"</string>
- <string name="permdesc_processOutgoingCalls" msgid="2228988201852654461">"允许应用程序处理外拨电话和更改要拨打的号码。恶意应用程序可借此监视、重定向或阻止外拨电话。"</string>
+ <string name="permdesc_processOutgoingCalls" msgid="2228988201852654461">"允许应用程序处理外拨电话或更改要拨打的号码。恶意应用程序可能会借此监视、另行转接甚至阻止外拨电话。"</string>
<string name="permlab_receiveSms" msgid="2697628268086208535">"接收短信"</string>
<string name="permdesc_receiveSms" msgid="6298292335965966117">"允许应用程序接收和处理短信。恶意应用程序可借此监视您的信息,或者将信息删除而不向您显示。"</string>
<string name="permlab_receiveMms" msgid="8894700916188083287">"接收彩信"</string>
<string name="permdesc_receiveMms" msgid="4563346832000174373">"允许应用程序接收和处理彩信。恶意应用程序可借此监视您的信息,或者将信息删除而不向您显示。"</string>
<string name="permlab_sendSms" msgid="5600830612147671529">"发送短信"</string>
- <string name="permdesc_sendSms" msgid="1946540351763502120">"允许应用程序发送短信。恶意应用程序可借此不经您的确认发送信息来让您付费。"</string>
+ <string name="permdesc_sendSms" msgid="1946540351763502120">"允许应用程序发送短信。恶意应用程序可能会不经您的确认就发送信息,给您带来费用。"</string>
<string name="permlab_readSms" msgid="4085333708122372256">"读取短信或彩信"</string>
<string name="permdesc_readSms" msgid="3002170087197294591">"允许应用程序读取您的手机或 SIM 卡中存储的短信。恶意应用程序可借此读取您的机密信息。"</string>
<string name="permlab_writeSms" msgid="6881122575154940744">"编辑短信或彩信"</string>
<string name="permdesc_writeSms" msgid="6299398896177548095">"允许应用程序写入手机或 SIM 卡中存储的短信。恶意应用程序可借此删除您的信息。"</string>
<string name="permlab_receiveWapPush" msgid="8258226427716551388">"接收 WAP"</string>
- <string name="permdesc_receiveWapPush" msgid="5979623826128082171">"允许应用程序接收和处理 WAP 消息。恶意应用程序可借此监视您的消息,或者将消息删除而不向您显示。"</string>
+ <string name="permdesc_receiveWapPush" msgid="5979623826128082171">"允许应用程序接收和处理 WAP 信息。恶意应用程序可借此监视您的信息,或者将信息删除而不向您显示。"</string>
<string name="permlab_getTasks" msgid="5005277531132573353">"检索当前运行的应用程序"</string>
- <string name="permdesc_getTasks" msgid="7048711358713443341">"允许应用程序检索有关当前和最近运行的任务的信息。恶意应用程序可借此发现有关其他应用程序的私有信息。"</string>
+ <string name="permdesc_getTasks" msgid="7048711358713443341">"允许应用程序检索有关当前和最近运行的任务的信息。恶意应用程序可借此发现有关其他应用程序的保密信息。"</string>
<string name="permlab_reorderTasks" msgid="5669588525059921549">"对正在运行的应用程序重新排序"</string>
- <string name="permdesc_reorderTasks" msgid="126252774270522835">"允许应用程序将任务移至前台和后台。恶意应用程序可借此强行进到前台,而不受您的控制。"</string>
+ <string name="permdesc_reorderTasks" msgid="126252774270522835">"允许应用程序将任务移至前端和后台。恶意应用程序可借此强行进入前端,而不受您的控制。"</string>
<string name="permlab_setDebugApp" msgid="4339730312925176742">"启用应用程序调试"</string>
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"允许应用程序启动对其他应用程序的调试。恶意应用程序可借此终止其他应用程序。"</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"更改用户界面设置"</string>
- <string name="permdesc_changeConfiguration" msgid="3465121501528064399">"允许应用程序更改当前配置,例如语言区域或整体字号。"</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"重新启动其他应用程序"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"允许应用程序强行重新启动其他应用程序。"</string>
- <string name="permlab_forceBack" msgid="1804196839880393631">"强行关闭应用程序"</string>
- <string name="permdesc_forceBack" msgid="6534109744159919013">"允许应用程序强行关闭前台中的任何活动并返回。普通应用程序从不需要使用此权限。"</string>
+ <string name="permdesc_changeConfiguration" msgid="3465121501528064399">"允许应用程序更改当前配置,例如语言设置或整体的字体大小。"</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
+ <string name="permlab_forceBack" msgid="1804196839880393631">"强制应用程序关闭"</string>
+ <string name="permdesc_forceBack" msgid="6534109744159919013">"允许应用程序强制前端的任何活动关闭并重新开始。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_dump" msgid="1681799862438954752">"检索系统内部状态"</string>
- <string name="permdesc_dump" msgid="2198776174276275220">"允许应用程序检索系统的内部状态。恶意应用程序可借此检索它们通常并不需要的各种私有信息和安全信息。"</string>
+ <string name="permdesc_dump" msgid="2198776174276275220">"允许应用程序检索系统的内部状态。恶意应用程序可借此检索它们本不需要的各种保密信息和安全信息。"</string>
<string name="permlab_shutdown" msgid="7185747824038909016">"部分关机"</string>
<string name="permdesc_shutdown" msgid="7046500838746291775">"使活动管理器进入关闭状态。不执行彻底关机。"</string>
<string name="permlab_stopAppSwitches" msgid="4138608610717425573">"禁止切换应用程序"</string>
<string name="permdesc_stopAppSwitches" msgid="3857886086919033794">"禁止用户切换到另一应用程序。"</string>
<string name="permlab_runSetActivityWatcher" msgid="7811586187574696296">"监控所有应用程序的启动"</string>
- <string name="permdesc_runSetActivityWatcher" msgid="3228701938345388092">"允许应用程序监控系统启动活动的方式。恶意应用程序可借此彻底损坏系统。这一权限只在开发过程中需要,普通的手机操作不需要。"</string>
- <string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"发送已删除包的广播"</string>
- <string name="permdesc_broadcastPackageRemoved" msgid="3453286591439891260">"允许应用程序广播已删除应用程序包的通知。恶意应用程序可借此终止任何正在运行的其他应用程序。"</string>
- <string name="permlab_broadcastSmsReceived" msgid="5689095009030336593">"发送可通过短信接收的广播"</string>
+ <string name="permdesc_runSetActivityWatcher" msgid="3228701938345388092">"允许应用程序监控系统启动活动的方式。恶意应用程序可借此彻底损坏系统。此权限仅在开发时才需要,普通的手机应用不需要。"</string>
+ <string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"发送包删除的广播"</string>
+ <string name="permdesc_broadcastPackageRemoved" msgid="3453286591439891260">"允许应用程序广播已删除某应用程序包的通知。恶意应用程序可借此终止任何正在运行的其他应用程序。"</string>
+ <string name="permlab_broadcastSmsReceived" msgid="5689095009030336593">"发送短信收到的广播"</string>
<string name="permdesc_broadcastSmsReceived" msgid="9122419277306740155">"允许应用程序广播已收到短信的通知。恶意应用程序可借此伪造收到的短信。"</string>
- <string name="permlab_broadcastWapPush" msgid="3145347413028582371">"发送 WAP 一键接收广播"</string>
- <string name="permdesc_broadcastWapPush" msgid="3955303669461378091">"允许应用程序广播收到 WAP 一键信息的通知。恶意应用程序可借此乱发彩信或暗中用恶意内容替换任意网页中的内容。"</string>
+ <string name="permlab_broadcastWapPush" msgid="3145347413028582371">"发送 WAP-PUSH 收到的广播"</string>
+ <string name="permdesc_broadcastWapPush" msgid="3955303669461378091">"允许应用程序播报收到 WAP PUSH 消息的通知。恶意应用程序可能会借此乱发彩信或暗中用恶意内容替换任意网页中的内容。"</string>
<string name="permlab_setProcessLimit" msgid="2451873664363662666">"限制运行的进程个数"</string>
- <string name="permdesc_setProcessLimit" msgid="7824786028557379539">"允许应用程序控制将运行的最大进程数。普通应用程序从不需要使用此权限。"</string>
+ <string name="permdesc_setProcessLimit" msgid="7824786028557379539">"允许应用程序控制将运行的进程数上限。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_setAlwaysFinish" msgid="5342837862439543783">"关闭所有后台应用程序"</string>
<string name="permdesc_setAlwaysFinish" msgid="8773936403987091620">"允许应用程序控制活动是否始终是一转至后台就完成。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_batteryStats" msgid="7863923071360031652">"修改电池统计信息"</string>
<string name="permdesc_batteryStats" msgid="5847319823772230560">"允许修改收集的电池使用情况统计信息。普通应用程序不能使用此权限。"</string>
<string name="permlab_backup" msgid="470013022865453920">"控制系统备份和还原"</string>
- <string name="permdesc_backup" msgid="4837493065154256525">"允许应用程序控制系统的备份和还原机制。不适用于普通应用程序。"</string>
+ <string name="permdesc_backup" msgid="4837493065154256525">"允许应用程序控制系统的备份和还原机制。普通应用程序不能使用此权限。"</string>
<string name="permlab_backup_data" msgid="4057625941707926463">"备份与还原应用程序数据"</string>
<string name="permdesc_backup_data" msgid="8274426305151227766">"允许应用程序参与系统的备份和还原机制。"</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"显示未授权的窗口"</string>
- <string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"允许创建专供内部系统用户界面使用的窗口。普通应用程序不能使用此权限。"</string>
+ <string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"允许创建专用于内部系统用户界面的窗口。普通应用程序不能使用此权限。"</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"显示系统级警报"</string>
<string name="permdesc_systemAlertWindow" msgid="5109622689323490558">"允许应用程序显示系统警报窗口。恶意应用程序可借此掌控整个手机屏幕。"</string>
<string name="permlab_setAnimationScale" msgid="2805103241153907174">"修改全局动画速度"</string>
<string name="permdesc_setAnimationScale" msgid="7181522138912391988">"允许应用程序随时更改全局动画速度(加快或放慢动画)。"</string>
<string name="permlab_manageAppTokens" msgid="17124341698093865">"管理应用程序令牌"</string>
- <string name="permdesc_manageAppTokens" msgid="977127907524195988">"允许应用程序创建和管理自己的令牌,从而绕开正常的 Z 方向排序。普通应用程序从不需要使用此权限。"</string>
+ <string name="permdesc_manageAppTokens" msgid="977127907524195988">"允许应用程序创建和管理自己的令牌,从而绕开其常规的 Z 方向。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_injectEvents" msgid="1378746584023586600">"按键和控制按钮"</string>
<string name="permdesc_injectEvents" msgid="3946098050410874715">"允许应用程序将其自己的输入活动(按键等)提供给其他应用程序。恶意应用程序可借此掌控手机。"</string>
- <string name="permlab_readInputState" msgid="469428900041249234">"记录您输入的内容和采取的操作"</string>
+ <string name="permlab_readInputState" msgid="469428900041249234">"记录您键入的内容和执行的操作"</string>
<string name="permdesc_readInputState" msgid="5132879321450325445">"允许应用程序查看您按的键,即使在与其他应用程序交互(例如输入密码)时也不例外。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_bindInputMethod" msgid="3360064620230515776">"绑定至输入法"</string>
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"允许手机用户绑定至输入法的顶级界面。普通应用程序从不需要使用此权限。"</string>
@@ -235,33 +238,33 @@
<string name="permlab_setOrientation" msgid="3365947717163866844">"更改屏幕显示方向"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"允许应用程序随时更改屏幕的旋转方向。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"向应用程序发送 Linux 信号"</string>
- <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"允许应用程序请求将提供的信号发送给所有持续的进程。"</string>
+ <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"允许应用程序请求将所提供的信号发送给所有持久进程。"</string>
<string name="permlab_persistentActivity" msgid="8659652042401085862">"让应用程序始终运行"</string>
<string name="permdesc_persistentActivity" msgid="5037199778265006008">"允许应用程序部分持续运行,这样系统便不能将其用于其他应用程序。"</string>
<string name="permlab_deletePackages" msgid="3343439331576348805">"删除应用程序"</string>
<string name="permdesc_deletePackages" msgid="3634943677518723314">"允许应用程序删除 Android 包。恶意应用程序可借此删除重要的应用程序。"</string>
<string name="permlab_clearAppUserData" msgid="2192134353540277878">"删除其他应用程序的数据"</string>
<string name="permdesc_clearAppUserData" msgid="7546345080434325456">"允许应用程序清除用户数据。"</string>
- <string name="permlab_deleteCacheFiles" msgid="1518556602634276725">"删除其他应用程序缓存"</string>
+ <string name="permlab_deleteCacheFiles" msgid="1518556602634276725">"删除其他应用程序的缓存"</string>
<string name="permdesc_deleteCacheFiles" msgid="2283074077168165971">"允许应用程序删除缓存文件。"</string>
<string name="permlab_getPackageSize" msgid="4799785352306641460">"计算应用程序存储空间"</string>
<string name="permdesc_getPackageSize" msgid="5557253039670753437">"允许应用程序检索其代码、数据和缓存大小"</string>
<string name="permlab_installPackages" msgid="335800214119051089">"直接安装应用程序"</string>
- <string name="permdesc_installPackages" msgid="526669220850066132">"允许应用程序安装新的或更新的 Android 包。恶意应用程序可借此添加具有极大权限的新应用程序。"</string>
+ <string name="permdesc_installPackages" msgid="526669220850066132">"允许应用程序安装全新的或更新的 Android 包。恶意应用程序可能会借此添加其具有任意权限的新应用程序。"</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"删除所有应用程序缓存数据"</string>
- <string name="permdesc_clearAppCache" msgid="7740465694193671402">"允许应用程序通过删除应用程序缓存目录中的文件释放手机内存。通常严格限制访问系统进程。"</string>
+ <string name="permdesc_clearAppCache" msgid="7740465694193671402">"允许应用程序通过删除应用程序缓存目录中的文件释放手机存储空间。通常此权限只适用于系统进程。"</string>
<string name="permlab_readLogs" msgid="4811921703882532070">"读取系统日志文件"</string>
- <string name="permdesc_readLogs" msgid="2257937955580475902">"允许应用程序读取系统的各日志文件。这样应用程序可以发现有关您操作手机的一般信息,但这些信息不应包含任何个人信息或私有信息。"</string>
+ <string name="permdesc_readLogs" msgid="2257937955580475902">"允许应用程序从系统的各日志文件中读取信息。这样应用程序可以发现您的手机使用情况,但这些信息不应包含任何个人信息或保密信息。"</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"读取/写入诊断所拥有的资源"</string>
- <string name="permdesc_diagnostic" msgid="3121238373951637049">"允许应用程序读取/写入诊断组所拥有的任何资源;例如,/dev 中的文件。这可能会影响系统稳定性和安全性。此权限只应由制造商或运营商用于硬件特定的诊断。"</string>
+ <string name="permdesc_diagnostic" msgid="3121238373951637049">"允许应用程序读取/写入诊断组所拥有的任何资源(例如,/dev 中的文件)。这可能会影响系统稳定性和安全性。此权限仅供制造商或运营商诊断硬件问题。"</string>
<string name="permlab_changeComponentState" msgid="79425198834329406">"启用或停用应用程序组件"</string>
<string name="permdesc_changeComponentState" msgid="4569107043246700630">"允许应用程序更改是否启用其他应用程序的组件。恶意应用程序可借此停用重要的手机功能。使用此权限时务必谨慎,因为这可能导致应用程序组件进入不可用、不一致或不稳定的状态。"</string>
<string name="permlab_setPreferredApplications" msgid="3393305202145172005">"设置首选应用程序"</string>
- <string name="permdesc_setPreferredApplications" msgid="760008293501937546">"允许应用程序修改首选的应用程序。这样恶意应用程序可能会暗中更改运行的应用程序,从而骗过您的现有应用程序来收集您的私有数据。"</string>
+ <string name="permdesc_setPreferredApplications" msgid="760008293501937546">"允许应用程序修改首选的应用程序。这样恶意应用程序可能会暗中更改运行的应用程序,从而骗过您的现有应用程序来收集您的保密数据。"</string>
<string name="permlab_writeSettings" msgid="1365523497395143704">"修改全局系统设置"</string>
- <string name="permdesc_writeSettings" msgid="838789419871034696">"允许应用程序修改系统的设置数据。恶意应用程序可借此破坏您的系统配置。"</string>
+ <string name="permdesc_writeSettings" msgid="838789419871034696">"允许应用程序修改系统设置方面的数据。恶意应用程序可借此破坏您的系统配置。"</string>
<string name="permlab_writeSecureSettings" msgid="204676251876718288">"修改安全系统设置"</string>
- <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"允许应用程序修改系统的安全设置数据。不适用于普通应用程序。"</string>
+ <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"允许应用程序修改系统的安全设置数据。普通应用程序不能使用此权限。"</string>
<string name="permlab_writeGservices" msgid="2149426664226152185">"修改 Google 服务地图"</string>
<string name="permdesc_writeGservices" msgid="6602362746516676175">"允许应用程序修改 Google 服务地图。普通应用程序不能使用此权限。"</string>
<string name="permlab_receiveBootCompleted" msgid="7776779842866993377">"开机时自动启动"</string>
@@ -272,40 +275,40 @@
<string name="permdesc_readContacts" msgid="3371591512896545975">"允许应用程序读取您手机上存储的所有联系人(地址)数据。恶意应用程序可借此将您的数据发送给其他人。"</string>
<string name="permlab_writeContacts" msgid="644616215860933284">"写入联系数据"</string>
<string name="permdesc_writeContacts" msgid="3924383579108183601">"允许应用程序修改您手机上存储的联系人(地址)数据。恶意应用程序可借此清除或修改您的联系人数据。"</string>
- <string name="permlab_writeOwnerData" msgid="4892555913849295393">"写入拥有者数据"</string>
- <string name="permdesc_writeOwnerData" msgid="2344055317969787124">"允许应用程序修改您手机上存储的手机拥有者数据。恶意应用程序可借此清除或修改拥有者数据。"</string>
- <string name="permlab_readOwnerData" msgid="6668525984731523563">"读取拥有者数据"</string>
- <string name="permdesc_readOwnerData" msgid="3088486383128434507">"允许应用程序读取您手机上存储的手机拥有者数据。恶意应用程序可借此读取手机拥有者数据。"</string>
+ <string name="permlab_writeOwnerData" msgid="4892555913849295393">"写入所有者数据"</string>
+ <string name="permdesc_writeOwnerData" msgid="2344055317969787124">"允许应用程序修改您手机上存储的手机所有者数据。恶意应用程序可借此清除或修改所有者数据。"</string>
+ <string name="permlab_readOwnerData" msgid="6668525984731523563">"读取所有者数据"</string>
+ <string name="permdesc_readOwnerData" msgid="3088486383128434507">"允许应用程序读取您手机上存储的手机所有者数据。恶意应用程序可借此读取手机所有者数据。"</string>
<string name="permlab_readCalendar" msgid="3728905909383989370">"读取日历数据"</string>
<string name="permdesc_readCalendar" msgid="5533029139652095734">"允许应用程序读取您手机上存储的所有日历活动。恶意应用程序可借此将您的日历活动发送给其他人。"</string>
<string name="permlab_writeCalendar" msgid="377926474603567214">"写入日历数据"</string>
<string name="permdesc_writeCalendar" msgid="8674240662630003173">"允许应用程序修改您手机上存储的日历活动。恶意应用程序可借此清除或修改您的日历数据。"</string>
- <string name="permlab_accessMockLocation" msgid="8688334974036823330">"禁止使用位置来源进行测试"</string>
- <string name="permdesc_accessMockLocation" msgid="7648286063459727252">"创建用于测试的模拟位置源。恶意应用程序可借此替代真正的位置源(如 GPS 或网络提供商)返回的位置和/或状态。"</string>
- <string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"访问更多位置提供者的命令"</string>
- <string name="permdesc_accessLocationExtraCommands" msgid="1948144701382451721">"访问额外的位置提供程序命令。恶意应用程序可借此干扰 GPS 或其他位置源的运作。"</string>
- <string name="permlab_installLocationProvider" msgid="6578101199825193873">"安装位置信息提供程序"</string>
- <string name="permdesc_installLocationProvider" msgid="5449175116732002106">"创建用于测试的模拟地点信息源。恶意应用程序可借此覆盖真正的地点信息源(如 GPS 或网络提供商)返回的地点和/或状态,或者监视您的地点并向外部信息源报告。"</string>
- <string name="permlab_accessFineLocation" msgid="8116127007541369477">"精准位置 (GPS)"</string>
- <string name="permdesc_accessFineLocation" msgid="7411213317434337331">"访问精准的位置源,例如手机上的全球定位系统(如果适用)。恶意应用程序可能借此确定您所处的位置,并消耗额外的电池电量。"</string>
- <string name="permlab_accessCoarseLocation" msgid="4642255009181975828">"粗略位置(以网络为基础)"</string>
- <string name="permdesc_accessCoarseLocation" msgid="8235655958070862293">"访问粗略的位置源(例如蜂窝网络数据库)以确定手机的大体位置(如果适用)。恶意应用程序可借此确定您所处的大体位置。"</string>
+ <string name="permlab_accessMockLocation" msgid="8688334974036823330">"使用模拟地点来源进行测试"</string>
+ <string name="permdesc_accessMockLocation" msgid="7648286063459727252">"创建模拟地点来源进行测试。恶意应用程序可能利用此选项覆盖由真实地点来源(如 GPS 或网络提供商)传回的地点和/或状态。"</string>
+ <string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"访问额外的位置信息提供程序命令"</string>
+ <string name="permdesc_accessLocationExtraCommands" msgid="1948144701382451721">"访问额外的位置信息提供程序命令。恶意应用程序可借此干扰 GPS 或其他位置源的正常工作。"</string>
+ <string name="permlab_installLocationProvider" msgid="6578101199825193873">"允许安装位置信息提供程序"</string>
+ <string name="permdesc_installLocationProvider" msgid="5449175116732002106">"创建模拟地点来源进行测试。恶意应用程序可能利用此选项覆盖由真实地点来源(如 GPS 或网络提供商)所传回的地点和/或状态,或者监视您的位置并将其提供给外部来源。"</string>
+ <string name="permlab_accessFineLocation" msgid="8116127007541369477">"精准的(GPS)位置"</string>
+ <string name="permdesc_accessFineLocation" msgid="7411213317434337331">"访问精准的位置源,例如手机上的全球定位系统(如果有)。恶意应用程序可能会借此确定您所处的位置,并可能消耗额外的电池电量。"</string>
+ <string name="permlab_accessCoarseLocation" msgid="4642255009181975828">"(基于网络的)粗略位置"</string>
+ <string name="permdesc_accessCoarseLocation" msgid="8235655958070862293">"访问粗略的位置源(例如蜂窝网络数据库)以确定手机的大体位置(如果可以)。恶意应用程序可借此确定您所处的大体位置。"</string>
<string name="permlab_accessSurfaceFlinger" msgid="2363969641792388947">"访问 SurfaceFlinger"</string>
<string name="permdesc_accessSurfaceFlinger" msgid="6805241830020733025">"允许应用程序使用 SurfaceFlinger 低级别功能。"</string>
<string name="permlab_readFrameBuffer" msgid="6690504248178498136">"读取帧缓冲区"</string>
<string name="permdesc_readFrameBuffer" msgid="7530020370469942528">"允许应用程序读取帧缓冲区中的内容。"</string>
<string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"更改您的音频设置"</string>
- <string name="permdesc_modifyAudioSettings" msgid="5793461287365991922">"允许应用程序修改全局音频设置,如音量和路由。"</string>
+ <string name="permdesc_modifyAudioSettings" msgid="5793461287365991922">"允许应用程序修改整个系统的音频设置,如音量和路由。"</string>
<string name="permlab_recordAudio" msgid="3876049771427466323">"录音"</string>
<string name="permdesc_recordAudio" msgid="6493228261176552356">"允许应用程序访问录音路径。"</string>
<string name="permlab_camera" msgid="8059288807274039014">"拍照"</string>
- <string name="permdesc_camera" msgid="9013476258810982546">"允许应用程序使用相机拍照。此权限允许应用程序随时收集相机看到的图片。"</string>
+ <string name="permdesc_camera" msgid="9013476258810982546">"允许应用程序使用相机拍照,这样应用程序可随时收集进入相机镜头的图像。"</string>
<string name="permlab_brick" msgid="8337817093326370537">"永久停用手机"</string>
<string name="permdesc_brick" msgid="5569526552607599221">"允许应用程序永久停用整个手机,这非常危险。"</string>
<string name="permlab_reboot" msgid="2898560872462638242">"强行重新启动手机"</string>
<string name="permdesc_reboot" msgid="7914933292815491782">"允许应用程序强行重新启动手机。"</string>
- <string name="permlab_mount_unmount_filesystems" msgid="1761023272170956541">"安装和卸载文件系统"</string>
- <string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"允许应用程序安装和卸载可移动存储器的文件系统。"</string>
+ <string name="permlab_mount_unmount_filesystems" msgid="1761023272170956541">"装载和卸载文件系统"</string>
+ <string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"允许应用程序装载和卸载可移动存储器的文件系统。"</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"格式化外部存储设备"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"允许应用程序格式化可移除的存储设备。"</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"控制振动器"</string>
@@ -313,21 +316,21 @@
<string name="permlab_flashlight" msgid="2155920810121984215">"控制闪光灯"</string>
<string name="permdesc_flashlight" msgid="6433045942283802309">"允许应用程序控制闪光灯。"</string>
<string name="permlab_hardware_test" msgid="4148290860400659146">"测试硬件"</string>
- <string name="permdesc_hardware_test" msgid="3668894686500081699">"允许应用程序控制各种用于硬件测试的外围设备。"</string>
+ <string name="permdesc_hardware_test" msgid="3668894686500081699">"允许应用程序控制各外围设备以进行硬件测试。"</string>
<string name="permlab_callPhone" msgid="3925836347681847954">"直接拨打电话号码"</string>
- <string name="permdesc_callPhone" msgid="3369867353692722456">"允许应用程序在无人操作的情况下拨打电话。恶意应用程序可借此在您的话费单上产生意外通话费。请注意,此权限不允许应用程序拨打紧急电话。"</string>
+ <string name="permdesc_callPhone" msgid="3369867353692722456">"允许应用程序在您不介入的情况下拨打电话。恶意应用程序可借此在您的话费单上产生意外通话费。请注意,此权限不允许应用程序拨打紧急呼救电话。"</string>
<string name="permlab_callPrivileged" msgid="4198349211108497879">"直接呼叫任何电话号码"</string>
- <string name="permdesc_callPrivileged" msgid="244405067160028452">"允许应用程序在无人操作的情况下拨打任何电话(包括紧急电话)。恶意应用程序可借此向紧急服务拨打骚扰电话和非法电话。"</string>
+ <string name="permdesc_callPrivileged" msgid="244405067160028452">"允许应用程序在您不介入的情况下拨打任何电话(包括紧急呼救)。恶意应用程序可借此向应急服务机构拨打骚扰电话甚至非法电话。"</string>
<string name="permlab_performCdmaProvisioning" msgid="5604848095315421425">"直接启动 CDMA 电话设置"</string>
<string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"允许应用程序启动 CDMA 服务。恶意应用程序可能会无端启动 CDMA 服务"</string>
<string name="permlab_locationUpdates" msgid="7785408253364335740">"控制位置更新通知"</string>
- <string name="permdesc_locationUpdates" msgid="2300018303720930256">"允许启用/停用收音机的位置更新通知。普通应用程序不能使用此权限。"</string>
+ <string name="permdesc_locationUpdates" msgid="2300018303720930256">"允许启用/停用来自收音机的位置更新通知。普通应用程序不能使用此权限。"</string>
<string name="permlab_checkinProperties" msgid="7855259461268734914">"访问检入属性"</string>
<string name="permdesc_checkinProperties" msgid="7150307006141883832">"允许对检入服务上传的属性进行读/写访问。普通应用程序不能使用此权限。"</string>
<string name="permlab_bindGadget" msgid="776905339015863471">"选择窗口小部件"</string>
- <string name="permdesc_bindGadget" msgid="2098697834497452046">"允许应用程序告诉系统哪个应用程序可以使用哪些窗口小部件。具有该权限的应用程序可以允许其他应用程序访问个人数据。普通应用程序不适合使用此权限。"</string>
+ <string name="permdesc_bindGadget" msgid="2098697834497452046">"允许应用程序告诉系统哪个应用程序可以使用哪些窗口小部件。具有该权限的应用程序可以允许其他应用程序访问个人数据。普通应用程序不能使用此权限。"</string>
<string name="permlab_modifyPhoneState" msgid="8423923777659292228">"修改手机状态"</string>
- <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"允许应用程序控制设备的手机功能。具有此权限的应用程序可切换网络、打开和关闭手机收音机等,而不通知您。"</string>
+ <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"允许应用程序控制设备的电话功能。拥有此权限的应用程序可自行切换网络、打开和关闭无线通信等,而不会通知您。"</string>
<string name="permlab_readPhoneState" msgid="2326172951448691631">"读取手机状态和身份"</string>
<string name="permdesc_readPhoneState" msgid="188877305147626781">"允许应用程序访问设备的手机功能。有此权限的应用程序可确定此手机的号码和序列号,是否正在通话,以及对方的号码等。"</string>
<string name="permlab_wakeLock" msgid="573480187941496130">"防止手机休眠"</string>
@@ -335,13 +338,13 @@
<string name="permlab_devicePower" msgid="4928622470980943206">"开机或关机"</string>
<string name="permdesc_devicePower" msgid="4577331933252444818">"允许应用程序打开或关闭手机。"</string>
<string name="permlab_factoryTest" msgid="3715225492696416187">"在出厂测试模式下运行"</string>
- <string name="permdesc_factoryTest" msgid="8136644990319244802">"作为低级别制造商测试运行,以允许完全访问手机硬件。此权限只有当手机在制造商测试模式下运行时才可用。"</string>
+ <string name="permdesc_factoryTest" msgid="8136644990319244802">"作为一项低级制造商测试来运行,从而允许对手机硬件进行完全访问。此权限仅当手机在制造商测试模式下运行时才可用。。"</string>
<string name="permlab_setWallpaper" msgid="6627192333373465143">"设置壁纸"</string>
<string name="permdesc_setWallpaper" msgid="6417041752170585837">"允许应用程序设置系统壁纸。"</string>
- <string name="permlab_setWallpaperHints" msgid="3600721069353106851">"设置壁纸大小提示"</string>
- <string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"允许应用程序设置系统壁纸大小提示。"</string>
- <string name="permlab_masterClear" msgid="2315750423139697397">"将系统重置为出厂时的默认设置"</string>
- <string name="permdesc_masterClear" msgid="5033465107545174514">"允许应用程序将系统完全重置为出厂设置,即清除所有数据、配置和安装的应用程序。"</string>
+ <string name="permlab_setWallpaperHints" msgid="3600721069353106851">"设置有关壁纸大小的提示"</string>
+ <string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"允许应用程序设置有关壁纸大小的提示。"</string>
+ <string name="permlab_masterClear" msgid="2315750423139697397">"将系统恢复为出厂设置"</string>
+ <string name="permdesc_masterClear" msgid="5033465107545174514">"允许应用程序将系统恢复为出厂设置,即清除所有数据、配置以及所安装的应用程序。"</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"设置时区"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"允许应用程序更改手机的时区。"</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"作为 AccountManagerService"</string>
@@ -356,12 +359,12 @@
<string name="permdesc_useCredentials" msgid="7416570544619546974">"允许应用程序请求身份验证标记。"</string>
<string name="permlab_accessNetworkState" msgid="6865575199464405769">"查看网络状态"</string>
<string name="permdesc_accessNetworkState" msgid="558721128707712766">"允许应用程序查看所有网络的状态。"</string>
- <string name="permlab_createNetworkSockets" msgid="9121633680349549585">"完全访问互联网"</string>
+ <string name="permlab_createNetworkSockets" msgid="9121633680349549585">"完全的互联网访问权限"</string>
<string name="permdesc_createNetworkSockets" msgid="4593339106921772192">"允许应用程序创建网络套接字。"</string>
- <string name="permlab_writeApnSettings" msgid="7823599210086622545">"写入接入点名称设置"</string>
+ <string name="permlab_writeApnSettings" msgid="7823599210086622545">"写入“接入点名称”设置"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"允许应用程序修改 APN 设置,例如任何 APN 的代理和端口。"</string>
- <string name="permlab_changeNetworkState" msgid="958884291454327309">"更改网络连接"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"允许应用程序更改网络连接状态。"</string>
+ <string name="permlab_changeNetworkState" msgid="958884291454327309">"更改网络连接性"</string>
+ <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"允许应用程序更改状态网络连接性。"</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"更改背景数据使用设置"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"允许应用程序更改背景数据使用设置。"</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"查看 Wi-Fi 状态"</string>
@@ -371,15 +374,15 @@
<string name="permlab_changeWifiMulticastState" msgid="1368253871483254784">"允许接收 Wi-Fi 多播"</string>
<string name="permdesc_changeWifiMulticastState" msgid="8199464507656067553">"允许应用程序接收并非直接向您的设备发送的数据包。这样在查找附近提供的服务时很有用。这种操作所耗电量大于非多播模式。"</string>
<string name="permlab_bluetoothAdmin" msgid="1092209628459341292">"蓝牙管理"</string>
- <string name="permdesc_bluetoothAdmin" msgid="7256289774667054555">"允许应用程序配置本地蓝牙手机,以及查找远程设备并与之配对。"</string>
+ <string name="permdesc_bluetoothAdmin" msgid="7256289774667054555">"允许应用程序配置本地蓝牙手机,以及发现远程设备并与其配对。"</string>
<string name="permlab_bluetooth" msgid="8361038707857018732">"创建蓝牙连接"</string>
- <string name="permdesc_bluetooth" msgid="762515380679392945">"允许应用程序查看本地蓝牙手机的配置,以及建立和接受与配对设备的连接。"</string>
+ <string name="permdesc_bluetooth" msgid="762515380679392945">"允许应用程序查看本地蓝牙手机的配置,以及建立或接受与配对设备的连接。"</string>
<string name="permlab_disableKeyguard" msgid="4977406164311535092">"停用键锁"</string>
- <string name="permdesc_disableKeyguard" msgid="3189763479326302017">"允许应用程序停用键锁和任何关联的密码安全设置。这种情况的一个恰当示例就是这样一个手机:在接听来电时停用键锁,在通话结束后重新启用键锁。"</string>
+ <string name="permdesc_disableKeyguard" msgid="3189763479326302017">"允许应用程序停用键锁和任何关联的密码安全设置。例如,在手机上接听电话时停用键锁,在通话结束后重新启用键锁。"</string>
<string name="permlab_readSyncSettings" msgid="6201810008230503052">"读取同步设置"</string>
- <string name="permdesc_readSyncSettings" msgid="5315925706353341823">"允许应用程序读取同步设置,例如是否针对联系人启用同步。"</string>
+ <string name="permdesc_readSyncSettings" msgid="5315925706353341823">"允许应用程序读取同步设置,例如是否为“联系人”启用同步。"</string>
<string name="permlab_writeSyncSettings" msgid="6297138566442486462">"写入同步设置"</string>
- <string name="permdesc_writeSyncSettings" msgid="2498201614431360044">"允许应用程序修改同步设置,例如是否针对联系人启用同步。"</string>
+ <string name="permdesc_writeSyncSettings" msgid="2498201614431360044">"允许应用程序修改同步设置,例如是否为“联系人”启用同步。"</string>
<string name="permlab_readSyncStats" msgid="7396577451360202448">"读取同步统计信息"</string>
<string name="permdesc_readSyncStats" msgid="7511448343374465000">"允许应用程序读取同步统计信息;例如已发生的同步历史记录。"</string>
<string name="permlab_subscribedFeedsRead" msgid="4756609637053353318">"读取订阅的供稿"</string>
@@ -392,21 +395,25 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"允许应用程序向用户词典中写入新词。"</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"修改/删除 SD 卡内容"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"允许应用程序写入 SD 卡。"</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
- <item msgid="8901098336658710359">"住宅电话"</item>
+ <item msgid="8901098336658710359">"住宅"</item>
<item msgid="869923650527136615">"手机"</item>
<item msgid="7897544654242874543">"单位电话"</item>
<item msgid="1103601433382158155">"单位传真"</item>
<item msgid="1735177144948329370">"住宅传真"</item>
<item msgid="603878674477207394">"寻呼机"</item>
- <item msgid="1650824275177931637">"其他电话"</item>
- <item msgid="9192514806975898961">"自定义电话"</item>
+ <item msgid="1650824275177931637">"其他"</item>
+ <item msgid="9192514806975898961">"自定义"</item>
</string-array>
<string-array name="emailAddressTypes">
- <item msgid="8073994352956129127">"主要邮箱"</item>
- <item msgid="7084237356602625604">"单位邮箱"</item>
- <item msgid="1112044410659011023">"其他邮箱"</item>
- <item msgid="2374913952870110618">"自定义邮箱"</item>
+ <item msgid="8073994352956129127">"家庭"</item>
+ <item msgid="7084237356602625604">"单位"</item>
+ <item msgid="1112044410659011023">"其他"</item>
+ <item msgid="2374913952870110618">"自定义"</item>
</string-array>
<string-array name="postalAddressTypes">
<item msgid="6880257626740047286">"住宅"</item>
@@ -415,15 +422,15 @@
<item msgid="4932682847595299369">"自定义"</item>
</string-array>
<string-array name="imAddressTypes">
- <item msgid="1738585194601476694">"住宅聊天工具"</item>
- <item msgid="1359644565647383708">"单位聊天工具"</item>
- <item msgid="7868549401053615677">"其他聊天工具"</item>
- <item msgid="3145118944639869809">"自定义聊天工具"</item>
+ <item msgid="1738585194601476694">"住宅"</item>
+ <item msgid="1359644565647383708">"单位"</item>
+ <item msgid="7868549401053615677">"其他"</item>
+ <item msgid="3145118944639869809">"自定义"</item>
</string-array>
<string-array name="organizationTypes">
<item msgid="7546335612189115615">"单位"</item>
- <item msgid="4378074129049520373">"其他组织"</item>
- <item msgid="3455047468583965104">"自定义组织"</item>
+ <item msgid="4378074129049520373">"其他"</item>
+ <item msgid="3455047468583965104">"自定义"</item>
</string-array>
<string-array name="imProtocols">
<item msgid="8595261363518459565">"AIM"</item>
@@ -435,180 +442,128 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"自定义"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"住宅"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"手机"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"单位"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"单位传真"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"住宅传真"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"寻呼机"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"其他"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"回拨号码"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"车载电话"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"公司总机"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"总机"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"其他传真"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"无线装置"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"电报"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"单位手机"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"单位寻呼机"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"助理"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"彩信"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"生日"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"周年纪念"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"活动"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"自定义"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"住宅"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"单位"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"其他"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"手机"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"自定义"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"住宅"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"单位"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"其他"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"自定义"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"住宅"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"单位"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"其他"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"自定义"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"雅虎"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"NetMeeting"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"公司"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"其他"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"自定义"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"通过 <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"时间:<xliff:g id="DATE">%1$s</xliff:g>,方式:<xliff:g id="SOURCE">%2$s</xliff:g>"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"输入 PIN 码"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN 码不正确!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"要解锁,请先按 MENU 再按 0。"</string>
- <string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"紧急电话号码"</string>
+ <string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"急救或报警电话"</string>
<string name="lockscreen_carrier_default" msgid="8812714795156374435">"(无服务)"</string>
<string name="lockscreen_screen_locked" msgid="7288443074806832904">"屏幕已锁定。"</string>
- <string name="lockscreen_instructions_when_pattern_enabled" msgid="46154051614126049">"按 MENU 解锁或拨打紧急电话。"</string>
+ <string name="lockscreen_instructions_when_pattern_enabled" msgid="46154051614126049">"按 Menu 解锁或进行紧急呼救。"</string>
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"按 MENU 解锁。"</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"绘制解锁图案"</string>
- <string name="lockscreen_emergency_call" msgid="5347633784401285225">"紧急呼叫"</string>
+ <string name="lockscreen_emergency_call" msgid="5347633784401285225">"紧急呼救"</string>
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"正确!"</string>
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"很抱歉,请重试"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"正在充电 (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"已充满。"</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"连接您的充电器。"</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"没有 SIM 卡"</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"手机中无 SIM 卡"</string>
<string name="lockscreen_missing_sim_instructions" msgid="8874620818937719067">"请插入 SIM 卡"</string>
<string name="lockscreen_network_locked_message" msgid="143389224986028501">"网络已锁定"</string>
- <string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"SIM 卡被 PUK 锁定"</string>
+ <string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"SIM 卡已用 PUK 码锁定"</string>
<string name="lockscreen_sim_puk_locked_instructions" msgid="635967534992394321">"请参阅《用户指南》或联系客服人员。"</string>
<string name="lockscreen_sim_locked_message" msgid="8066660129206001039">"SIM 卡被锁定"</string>
<string name="lockscreen_sim_unlock_progress_dialog_message" msgid="595323214052881264">"正在解锁 SIM 卡..."</string>
- <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="3514742106066877476">"您已经 <xliff:g id="NUMBER_0">%d</xliff:g> 次错误地绘制了解锁图案。"\n\n"请在 <xliff:g id="NUMBER_1">%d</xliff:g> 秒后重试。"</string>
- <string name="lockscreen_failed_attempts_almost_glogin" msgid="3351013842320127827">"您已经 <xliff:g id="NUMBER_0">%d</xliff:g> 次错误地绘制了解锁图案。如果再尝试 <xliff:g id="NUMBER_1">%d</xliff:g> 次后仍不成功,系统会要求您使用自己的 Google 登录信息解锁手机。"\n\n"请在 <xliff:g id="NUMBER_2">%d</xliff:g> 秒后重试。"</string>
+ <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="3514742106066877476">"您已经 <xliff:g id="NUMBER_0">%d</xliff:g> 次绘错了自己的解锁图案。"\n\n"请在 <xliff:g id="NUMBER_1">%d</xliff:g> 秒后重试。"</string>
+ <string name="lockscreen_failed_attempts_almost_glogin" msgid="3351013842320127827">"您已经 <xliff:g id="NUMBER_0">%d</xliff:g> 次绘错了自己的解锁图案。如果再尝试 <xliff:g id="NUMBER_1">%d</xliff:g> 次后仍不成功,系统会要求您使用自己的 Google 登录信息解锁手机。"\n\n"请在 <xliff:g id="NUMBER_2">%d</xliff:g> 秒后重试。"</string>
<string name="lockscreen_too_many_failed_attempts_countdown" msgid="6251480343394389665">"<xliff:g id="NUMBER">%d</xliff:g> 秒后重试。"</string>
<string name="lockscreen_forgot_pattern_button_text" msgid="2626999449610695930">"忘记了图案?"</string>
<string name="lockscreen_glogin_forgot_pattern" msgid="2588521501166032747">"帐户解锁"</string>
- <string name="lockscreen_glogin_too_many_attempts" msgid="2446246026221678244">"图案尝试次数过多!"</string>
+ <string name="lockscreen_glogin_too_many_attempts" msgid="2446246026221678244">"图案尝试次数太多!"</string>
<string name="lockscreen_glogin_instructions" msgid="1816635201812207709">"要解除锁定,请使用您的 Google 帐户登录"</string>
<string name="lockscreen_glogin_username_hint" msgid="8846881424106484447">"用户名(电子邮件)"</string>
<string name="lockscreen_glogin_password_hint" msgid="5958028383954738528">"密码"</string>
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"登录"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"用户名或密码无效。"</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"正在检查..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"解锁"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"打开声音"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"关闭声音"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="AMPM">%P</xliff:g><xliff:g id="HOUR">%-l</xliff:g>点"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="AMPM">%p</xliff:g><xliff:g id="HOUR">%-l</xliff:g>点"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"清除"</string>
<string name="status_bar_no_notifications_title" msgid="4755261167193833213">"无通知"</string>
- <string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"正在进行"</string>
+ <string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"正在进行的"</string>
<string name="status_bar_latest_events_title" msgid="6594767438577593172">"通知"</string>
<string name="battery_status_text_percent_format" msgid="7660311274698797147">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="battery_status_charging" msgid="756617993998772213">"正在充电..."</string>
<string name="battery_low_title" msgid="7923774589611311406">"请连接充电器"</string>
- <string name="battery_low_subtitle" msgid="7388781709819722764">"电量在减少:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_subtitle" msgid="7388781709819722764">"电量所剩不多:"</string>
+ <string name="battery_low_percent_format" msgid="696154104579022959">"电量剩余 <xliff:g id="NUMBER">%d%%</xliff:g> 或更少。"</string>
<string name="battery_low_why" msgid="7279169609518386372">"电量使用情况"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"出厂测试失败"</string>
- <string name="factorytest_not_system" msgid="4435201656767276723">"只有 /system/app 中安装的包支持 FACTORY_TEST 操作。"</string>
+ <string name="factorytest_not_system" msgid="4435201656767276723">"只有在 /system/app 中安装的包支持 FACTORY_TEST 操作。"</string>
<string name="factorytest_no_action" msgid="872991874799998561">"未发现支持 FACTORY_TEST 操作的包。"</string>
<string name="factorytest_reboot" msgid="6320168203050791643">"重新启动"</string>
<string name="js_dialog_title" msgid="8143918455087008109">"“<xliff:g id="TITLE">%s</xliff:g>”处的页面表明:"</string>
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"是否从该页面导航至它处?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n"选择“确定”继续,或选择“取消”留在当前页面。"</string>
<string name="save_password_label" msgid="6860261758665825069">"确认"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"提示:点按两次可放大和缩小。"</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"读取浏览器的历史记录和书签"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"允许应用程序读取用浏览器访问过的所有网址,以及浏览器的所有书签。"</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"写入浏览器的历史记录和书签"</string>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"允许应用程序修改存储在手机中的浏览器历史记录或书签。恶意应用程序可借此清除或修改浏览器数据。"</string>
<string name="save_password_message" msgid="767344687139195790">"是否希望浏览器记住此密码?"</string>
- <string name="save_password_notnow" msgid="6389675316706699758">"此时不保存密码"</string>
+ <string name="save_password_notnow" msgid="6389675316706699758">"暂不保存"</string>
<string name="save_password_remember" msgid="6491879678996749466">"记住"</string>
<string name="save_password_never" msgid="8274330296785855105">"从不"</string>
<string name="open_permission_deny" msgid="5661861460947222274">"您无权打开此网页。"</string>
- <string name="text_copied" msgid="4985729524670131385">"文字已复制到剪贴板。"</string>
+ <string name="text_copied" msgid="4985729524670131385">"文本已复制到剪贴板。"</string>
<string name="more_item_label" msgid="4650918923083320495">"更多"</string>
<string name="prepend_shortcut_label" msgid="2572214461676015642">"MENU+"</string>
<string name="menu_space_shortcut_label" msgid="2410328639272162537">"空格"</string>
@@ -724,8 +679,8 @@
<string name="inputMethod" msgid="1653630062304567879">"输入法"</string>
<string name="addToDictionary" msgid="8793624991686948709">"将“<xliff:g id="WORD">%s</xliff:g>”添加到词典"</string>
<string name="editTextMenuTitle" msgid="1672989176958581452">"编辑文字"</string>
- <string name="low_internal_storage_view_title" msgid="1399732408701697546">"空间不足"</string>
- <string name="low_internal_storage_view_text" msgid="635106544616378836">"手机内存空间正在减少。"</string>
+ <string name="low_internal_storage_view_title" msgid="1399732408701697546">"存储空间不足"</string>
+ <string name="low_internal_storage_view_text" msgid="635106544616378836">"手机内存空间所剩不多了。"</string>
<string name="ok" msgid="5970060430562524910">"确定"</string>
<string name="cancel" msgid="6442560571259935130">"取消"</string>
<string name="yes" msgid="5362982303337969312">"确定"</string>
@@ -735,25 +690,24 @@
<string name="capital_off" msgid="6815870386972805832">"关闭"</string>
<string name="whichApplication" msgid="4533185947064773386">"使用以下方式发送"</string>
<string name="alwaysUse" msgid="4583018368000610438">"默认使用此方式发送。"</string>
- <string name="clearDefaultHintMsg" msgid="4815455344600932173">"清除“主屏幕设置”>“应用程序”>“管理应用程序”中的默认设置。"</string>
+ <string name="clearDefaultHintMsg" msgid="4815455344600932173">"通过主屏幕上的“设置”>“应用程序”>“管理应用程序”清除默认设置。"</string>
<string name="chooseActivity" msgid="1009246475582238425">"选择一项操作"</string>
<string name="noApplications" msgid="1691104391758345586">"没有应用程序可执行此操作。"</string>
<string name="aerr_title" msgid="653922989522758100">"很抱歉!"</string>
- <string name="aerr_application" msgid="4683614104336409186">"<xliff:g id="APPLICATION">%1$s</xliff:g>应用程序(<xliff:g id="PROCESS">%2$s</xliff:g> 进程)意外停止,请重试。"</string>
- <string name="aerr_process" msgid="1551785535966089511">"<xliff:g id="PROCESS">%1$s</xliff:g> 进程意外停止,请重试。"</string>
+ <string name="aerr_application" msgid="4683614104336409186">"“<xliff:g id="APPLICATION">%1$s</xliff:g>”应用程序(在“<xliff:g id="PROCESS">%2$s</xliff:g>”进程中)意外停止,请重试。"</string>
+ <string name="aerr_process" msgid="1551785535966089511">"“<xliff:g id="PROCESS">%1$s</xliff:g>”进程意外停止,请重试。"</string>
<string name="anr_title" msgid="3100070910664756057">"很抱歉!"</string>
- <string name="anr_activity_application" msgid="3538242413112507636">"<xliff:g id="ACTIVITY">%1$s</xliff:g>活动(在<xliff:g id="APPLICATION">%2$s</xliff:g>应用程序中)无响应。"</string>
- <string name="anr_activity_process" msgid="5420826626009561014">"<xliff:g id="ACTIVITY">%1$s</xliff:g>活动(在 <xliff:g id="PROCESS">%2$s</xliff:g> 进程中)无响应。"</string>
- <string name="anr_application_process" msgid="4185842666452210193">"<xliff:g id="APPLICATION">%1$s</xliff:g>应用程序(在 <xliff:g id="PROCESS">%2$s</xliff:g> 进程中)无响应。"</string>
- <string name="anr_process" msgid="1246866008169975783">"<xliff:g id="PROCESS">%1$s</xliff:g> 进程无响应。"</string>
+ <string name="anr_activity_application" msgid="3538242413112507636">"“<xliff:g id="ACTIVITY">%1$s</xliff:g>”活动(在“<xliff:g id="APPLICATION">%2$s</xliff:g>”应用程序中)无响应。"</string>
+ <string name="anr_activity_process" msgid="5420826626009561014">"“<xliff:g id="ACTIVITY">%1$s</xliff:g>”活动(在“<xliff:g id="PROCESS">%2$s</xliff:g>”进程中)无响应。"</string>
+ <string name="anr_application_process" msgid="4185842666452210193">"“<xliff:g id="APPLICATION">%1$s</xliff:g>”应用程序(在“<xliff:g id="PROCESS">%2$s</xliff:g>”进程中)无响应。"</string>
+ <string name="anr_process" msgid="1246866008169975783">"“<xliff:g id="PROCESS">%1$s</xliff:g>”进程无响应。"</string>
<string name="force_close" msgid="3653416315450806396">"强行关闭"</string>
<string name="report" msgid="4060218260984795706">"报告"</string>
<string name="wait" msgid="7147118217226317732">"等待"</string>
- <string name="debug" msgid="9103374629678531849">"调试"</string>
<string name="sendText" msgid="5132506121645618310">"选择要对文字执行的操作"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"铃声音量"</string>
<string name="volume_music" msgid="5421651157138628171">"媒体音量"</string>
- <string name="volume_music_hint_playing_through_bluetooth" msgid="9165984379394601533">"通过蓝牙播放"</string>
+ <string name="volume_music_hint_playing_through_bluetooth" msgid="9165984379394601533">"正通过蓝牙播放"</string>
<string name="volume_music_hint_silent_ringtone_selected" msgid="6158339745293431194">"选择的是静音铃声"</string>
<string name="volume_call" msgid="3941680041282788711">"通话音量"</string>
<string name="volume_bluetooth_call" msgid="2002891926351151534">"使用蓝牙时的通话音量"</string>
@@ -786,12 +740,12 @@
<string name="perms_show_all" msgid="2671791163933091180"><b>"全部显示"</b></string>
<string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"正在载入..."</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB 已连接"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"您已通过 USB 将手机连接至计算机。如果要在计算机和手机的 SD 卡之间复制文件,请选择“安装”。"</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"安装"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"不安装"</string>
+ <string name="usb_storage_message" msgid="2759542180575016871">"已通过 USB 连接与计算机。若要在计算机和手机 SD 卡之间复制文件,请选择“装载”。"</string>
+ <string name="usb_storage_button_mount" msgid="8063426289195405456">"装载"</string>
+ <string name="usb_storage_button_unmount" msgid="6092146330053864766">"不装载"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"使用 SD 卡进行 USB 存储时出现问题。"</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB 已连接"</string>
- <string name="usb_storage_notification_message" msgid="7380082404288219341">"选择将文件复制到计算机/从计算机复制到存储设备。"</string>
+ <string name="usb_storage_notification_message" msgid="7380082404288219341">"选择将文件复制到计算机或从计算机复制到存储设备。"</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"关闭 USB 存储设备"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"选中以关闭 USB 存储设备。"</string>
<string name="usb_storage_stop_title" msgid="6014127947456185321">"关闭 USB 存储设备"</string>
@@ -800,28 +754,26 @@
<string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"取消"</string>
<string name="usb_storage_stop_error_message" msgid="3746037090369246731">"关闭 USB 存储设备时遇到问题。请检查是否卸载了 USB 主设备,然后重试。"</string>
<string name="extmedia_format_title" msgid="8663247929551095854">"格式化 SD 卡"</string>
- <string name="extmedia_format_message" msgid="3621369962433523619">"您确定要格式化 SD 卡?卡上的所有数据都会丢失。"</string>
+ <string name="extmedia_format_message" msgid="3621369962433523619">"确定要将 SD 卡格式化吗?该卡上的所有数据都将丢失。"</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"格式化"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"已连接 USB 调试"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"选择停用 USB 调试。"</string>
+ <string name="select_input_method" msgid="6865512749462072765">"选择输入法"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"候选"</u></string>
<string name="ext_media_checking_notification_title" msgid="5457603418970994050">"正在准备 SD 卡"</string>
<string name="ext_media_checking_notification_message" msgid="8287319882926737053">"正在检查是否有错误。"</string>
<string name="ext_media_nofs_notification_title" msgid="780477838241212997">"空 SD 卡"</string>
- <string name="ext_media_nofs_notification_message" msgid="3817704088027829380">"SD 卡是空的或其文件系统不受支持。"</string>
+ <string name="ext_media_nofs_notification_message" msgid="3817704088027829380">"SD 卡无文件系统,或文件系统不受支持。"</string>
<string name="ext_media_unmountable_notification_title" msgid="6410723906019100189">"SD 卡受损"</string>
- <string name="ext_media_unmountable_notification_message" msgid="6902531775948238989">"SD 卡已损坏。可能必须重新格式化。"</string>
- <string name="ext_media_badremoval_notification_title" msgid="6872152882604407837">"SD 卡被意外拔除"</string>
- <string name="ext_media_badremoval_notification_message" msgid="7260183293747448241">"先卸载 SD 卡再拔除,以避免数据丢失。"</string>
+ <string name="ext_media_unmountable_notification_message" msgid="6902531775948238989">"SD 卡已损坏。您可能必须将其重新格式化。"</string>
+ <string name="ext_media_badremoval_notification_title" msgid="6872152882604407837">"SD 卡未正常移除"</string>
+ <string name="ext_media_badremoval_notification_message" msgid="7260183293747448241">"请先卸载 SD 卡,再将其移除,以防数据丢失。"</string>
<string name="ext_media_safe_unmount_notification_title" msgid="6729801130790616200">"SD 卡已安全移除"</string>
- <string name="ext_media_safe_unmount_notification_message" msgid="568841278138377604">"可安全地取出 SD 卡。"</string>
+ <string name="ext_media_safe_unmount_notification_message" msgid="568841278138377604">"您现在可以安全移除 SD 卡。"</string>
<string name="ext_media_nomedia_notification_title" msgid="8902518030404381318">"已移除 SD 卡"</string>
- <string name="ext_media_nomedia_notification_message" msgid="3870120652983659641">"SD 卡已取出。请插入另一 SD 卡。"</string>
+ <string name="ext_media_nomedia_notification_message" msgid="3870120652983659641">"SD 卡已移除。请插入新的 SD 卡。"</string>
<string name="activity_list_empty" msgid="4168820609403385789">"找不到匹配的活动"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"更新组件使用情况统计"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"允许修改收集的组件使用情况统计。普通应用程序不能使用此权限。"</string>
@@ -837,22 +789,29 @@
<string name="create_contact_using" msgid="4947405226788104538">"创建电话号码为"\n"<xliff:g id="NUMBER">%s</xliff:g> 的联系人"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"已选中"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"未选中"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"允许"</string>
<string name="deny" msgid="2081879885755434506">"拒绝"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"已请求权限"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"已为帐户<xliff:g id="ACCOUNT">%s</xliff:g>"\n"请求了权限"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"输入法"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"同步"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"辅助功能"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"壁纸"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"更改壁纸"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"点对点隧道协议"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"第 2 层隧道协议"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"基于预共享密钥的 L2TP/IPSec VPN"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"基于证书的 L2TP/IPSec VPN"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 3542536..ee31333 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -111,8 +111,7 @@
<string name="httpErrorFile" msgid="8250549644091165175">"無法存取此檔案。"</string>
<string name="httpErrorFileNotFound" msgid="5588380756326017105">"找不到要求的檔案。"</string>
<string name="httpErrorTooManyRequests" msgid="1235396927087188253">"太多執行要求。請稍後再試一次。"</string>
- <!-- no translation found for notification_title (1259940370369187045) -->
- <skip />
+ <string name="notification_title" msgid="1259940370369187045">"<xliff:g id="ACCOUNT">%1$s</xliff:g>登入錯誤"</string>
<string name="contentServiceSync" msgid="8353523060269335667">"同步處理"</string>
<string name="contentServiceSyncNotificationTitle" msgid="397743349191901458">"同步處理"</string>
<string name="contentServiceTooManyDeletesNotificationDesc" msgid="8100981435080696431">"同時刪除太多 <xliff:g id="CONTENT_TYPE">%s</xliff:g>。"</string>
@@ -148,10 +147,8 @@
<string name="permgroupdesc_location" msgid="2430258821648348660">"監視實際位置"</string>
<string name="permgrouplab_network" msgid="5808983377727109831">"網路通訊"</string>
<string name="permgroupdesc_network" msgid="5035763698958415998">"允許應用程式存取多項網路功能。"</string>
- <!-- no translation found for permgrouplab_accounts (3359646291125325519) -->
- <skip />
- <!-- no translation found for permgroupdesc_accounts (4948732641827091312) -->
- <skip />
+ <string name="permgrouplab_accounts" msgid="3359646291125325519">"您的帳戶"</string>
+ <string name="permgroupdesc_accounts" msgid="4948732641827091312">"存取可用帳戶。"</string>
<string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"硬體控制"</string>
<string name="permgroupdesc_hardwareControls" msgid="4357057861225462702">"在免持設備上直接存取硬體。"</string>
<string name="permgrouplab_phoneCalls" msgid="9067173988325865923">"撥打電話"</string>
@@ -188,8 +185,14 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"允許應用程式為其他程式開啟偵錯功能。請注意:惡意程式可利用此功能終止其他應用程式。"</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"變更介面設定"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"允許應用程式變更目前設定,例如:地區設定或字型大小。"</string>
- <string name="permlab_restartPackages" msgid="2386396847203622628">"重新啟動其他應用程式"</string>
- <string name="permdesc_restartPackages" msgid="1076364837492936814">"允許應用程式強制重新啟動其他應用程式。"</string>
+ <!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
+ <skip />
+ <!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
+ <skip />
+ <!-- no translation found for permlab_forceStopPackages (1447830113260156236) -->
+ <skip />
+ <!-- no translation found for permdesc_forceStopPackages (7263036616161367402) -->
+ <skip />
<string name="permlab_forceBack" msgid="1804196839880393631">"強制關閉應用程式"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"允許應用程式強制關閉在前端運作的活動並返回。一般應用程式不需要此功能。"</string>
<string name="permlab_dump" msgid="1681799862438954752">"接收系統內部狀態"</string>
@@ -392,6 +395,10 @@
<string name="permdesc_writeDictionary" msgid="2241256206524082880">"允許應用程式將新字詞寫入使用者的字典。"</string>
<string name="permlab_sdcardWrite" msgid="8079403759001777291">"修改/刪除 SD 卡的內容"</string>
<string name="permdesc_sdcardWrite" msgid="6643963204976471878">"允許應用程式寫入 SD 卡。"</string>
+ <!-- no translation found for permlab_cache_filesystem (5656487264819669824) -->
+ <skip />
+ <!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"住家電話"</item>
<item msgid="869923650527136615">"行動電話"</item>
@@ -435,110 +442,58 @@
<item msgid="2506857312718630823">"ICQ"</item>
<item msgid="1648797903785279353">"Jabber"</item>
</string-array>
- <!-- no translation found for phoneTypeCustom (1644738059053355820) -->
- <skip />
- <!-- no translation found for phoneTypeHome (2570923463033985887) -->
- <skip />
- <!-- no translation found for phoneTypeMobile (6501463557754751037) -->
- <skip />
- <!-- no translation found for phoneTypeWork (8863939667059911633) -->
- <skip />
- <!-- no translation found for phoneTypeFaxWork (3517792160008890912) -->
- <skip />
- <!-- no translation found for phoneTypeFaxHome (2067265972322971467) -->
- <skip />
- <!-- no translation found for phoneTypePager (7582359955394921732) -->
- <skip />
- <!-- no translation found for phoneTypeOther (1544425847868765990) -->
- <skip />
- <!-- no translation found for phoneTypeCallback (2712175203065678206) -->
- <skip />
- <!-- no translation found for phoneTypeCar (8738360689616716982) -->
- <skip />
- <!-- no translation found for phoneTypeCompanyMain (540434356461478916) -->
- <skip />
- <!-- no translation found for phoneTypeIsdn (8022453193171370337) -->
- <skip />
- <!-- no translation found for phoneTypeMain (6766137010628326916) -->
- <skip />
- <!-- no translation found for phoneTypeOtherFax (8587657145072446565) -->
- <skip />
- <!-- no translation found for phoneTypeRadio (4093738079908667513) -->
- <skip />
- <!-- no translation found for phoneTypeTelex (3367879952476250512) -->
- <skip />
- <!-- no translation found for phoneTypeTtyTdd (8606514378585000044) -->
- <skip />
- <!-- no translation found for phoneTypeWorkMobile (1311426989184065709) -->
- <skip />
- <!-- no translation found for phoneTypeWorkPager (649938731231157056) -->
- <skip />
- <!-- no translation found for phoneTypeAssistant (5596772636128562884) -->
- <skip />
- <!-- no translation found for phoneTypeMms (7254492275502768992) -->
- <skip />
- <!-- no translation found for eventTypeBirthday (2813379844211390740) -->
- <skip />
- <!-- no translation found for eventTypeAnniversary (3876779744518284000) -->
- <skip />
- <!-- no translation found for eventTypeOther (5834288791948564594) -->
- <skip />
- <!-- no translation found for emailTypeCustom (8525960257804213846) -->
- <skip />
- <!-- no translation found for emailTypeHome (449227236140433919) -->
- <skip />
- <!-- no translation found for emailTypeWork (3548058059601149973) -->
- <skip />
- <!-- no translation found for emailTypeOther (2923008695272639549) -->
- <skip />
- <!-- no translation found for emailTypeMobile (119919005321166205) -->
- <skip />
- <!-- no translation found for postalTypeCustom (8903206903060479902) -->
- <skip />
- <!-- no translation found for postalTypeHome (8165756977184483097) -->
- <skip />
- <!-- no translation found for postalTypeWork (5268172772387694495) -->
- <skip />
- <!-- no translation found for postalTypeOther (2726111966623584341) -->
- <skip />
- <!-- no translation found for imTypeCustom (2074028755527826046) -->
- <skip />
- <!-- no translation found for imTypeHome (6241181032954263892) -->
- <skip />
- <!-- no translation found for imTypeWork (1371489290242433090) -->
- <skip />
- <!-- no translation found for imTypeOther (5377007495735915478) -->
- <skip />
- <!-- no translation found for imProtocolCustom (6919453836618749992) -->
- <skip />
- <!-- no translation found for imProtocolAim (7050360612368383417) -->
- <skip />
- <!-- no translation found for imProtocolMsn (144556545420769442) -->
- <skip />
- <!-- no translation found for imProtocolYahoo (8271439408469021273) -->
- <skip />
- <!-- no translation found for imProtocolSkype (9019296744622832951) -->
- <skip />
- <!-- no translation found for imProtocolQq (8887484379494111884) -->
- <skip />
- <!-- no translation found for imProtocolGoogleTalk (3808393979157698766) -->
- <skip />
- <!-- no translation found for imProtocolIcq (1574870433606517315) -->
- <skip />
- <!-- no translation found for imProtocolJabber (2279917630875771722) -->
- <skip />
- <!-- no translation found for imProtocolNetMeeting (8287625655986827971) -->
- <skip />
- <!-- no translation found for orgTypeWork (29268870505363872) -->
- <skip />
- <!-- no translation found for orgTypeOther (3951781131570124082) -->
- <skip />
- <!-- no translation found for orgTypeCustom (225523415372088322) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution (5112589886094402795) -->
- <skip />
- <!-- no translation found for contact_status_update_attribution_with_date (5945386376369979909) -->
- <skip />
+ <string name="phoneTypeCustom" msgid="1644738059053355820">"自訂"</string>
+ <string name="phoneTypeHome" msgid="2570923463033985887">"住家"</string>
+ <string name="phoneTypeMobile" msgid="6501463557754751037">"行動裝置"</string>
+ <string name="phoneTypeWork" msgid="8863939667059911633">"公司"</string>
+ <string name="phoneTypeFaxWork" msgid="3517792160008890912">"公司傳真"</string>
+ <string name="phoneTypeFaxHome" msgid="2067265972322971467">"住家傳真"</string>
+ <string name="phoneTypePager" msgid="7582359955394921732">"呼叫器"</string>
+ <string name="phoneTypeOther" msgid="1544425847868765990">"其他"</string>
+ <string name="phoneTypeCallback" msgid="2712175203065678206">"回撥電話"</string>
+ <string name="phoneTypeCar" msgid="8738360689616716982">"汽車電話"</string>
+ <string name="phoneTypeCompanyMain" msgid="540434356461478916">"公司代表號"</string>
+ <string name="phoneTypeIsdn" msgid="8022453193171370337">"ISDN"</string>
+ <string name="phoneTypeMain" msgid="6766137010628326916">"代表號"</string>
+ <string name="phoneTypeOtherFax" msgid="8587657145072446565">"其他傳真"</string>
+ <string name="phoneTypeRadio" msgid="4093738079908667513">"無線電"</string>
+ <string name="phoneTypeTelex" msgid="3367879952476250512">"Telex"</string>
+ <string name="phoneTypeTtyTdd" msgid="8606514378585000044">"TTY/TDD"</string>
+ <string name="phoneTypeWorkMobile" msgid="1311426989184065709">"公司行動電話"</string>
+ <string name="phoneTypeWorkPager" msgid="649938731231157056">"公司呼叫器"</string>
+ <string name="phoneTypeAssistant" msgid="5596772636128562884">"助理"</string>
+ <string name="phoneTypeMms" msgid="7254492275502768992">"MMS"</string>
+ <string name="eventTypeBirthday" msgid="2813379844211390740">"生日"</string>
+ <string name="eventTypeAnniversary" msgid="3876779744518284000">"週年紀念日"</string>
+ <string name="eventTypeOther" msgid="5834288791948564594">"活動"</string>
+ <string name="emailTypeCustom" msgid="8525960257804213846">"自訂"</string>
+ <string name="emailTypeHome" msgid="449227236140433919">"住家"</string>
+ <string name="emailTypeWork" msgid="3548058059601149973">"公司"</string>
+ <string name="emailTypeOther" msgid="2923008695272639549">"其他"</string>
+ <string name="emailTypeMobile" msgid="119919005321166205">"行動裝置"</string>
+ <string name="postalTypeCustom" msgid="8903206903060479902">"自訂"</string>
+ <string name="postalTypeHome" msgid="8165756977184483097">"住家"</string>
+ <string name="postalTypeWork" msgid="5268172772387694495">"公司"</string>
+ <string name="postalTypeOther" msgid="2726111966623584341">"其他"</string>
+ <string name="imTypeCustom" msgid="2074028755527826046">"自訂"</string>
+ <string name="imTypeHome" msgid="6241181032954263892">"住家"</string>
+ <string name="imTypeWork" msgid="1371489290242433090">"公司"</string>
+ <string name="imTypeOther" msgid="5377007495735915478">"其他"</string>
+ <string name="imProtocolCustom" msgid="6919453836618749992">"自訂"</string>
+ <string name="imProtocolAim" msgid="7050360612368383417">"AIM"</string>
+ <string name="imProtocolMsn" msgid="144556545420769442">"Windows Live"</string>
+ <string name="imProtocolYahoo" msgid="8271439408469021273">"Yahoo"</string>
+ <string name="imProtocolSkype" msgid="9019296744622832951">"Skype"</string>
+ <string name="imProtocolQq" msgid="8887484379494111884">"QQ"</string>
+ <string name="imProtocolGoogleTalk" msgid="3808393979157698766">"Google Talk"</string>
+ <string name="imProtocolIcq" msgid="1574870433606517315">"ICQ"</string>
+ <string name="imProtocolJabber" msgid="2279917630875771722">"Jabber"</string>
+ <string name="imProtocolNetMeeting" msgid="8287625655986827971">"網路會議"</string>
+ <string name="orgTypeWork" msgid="29268870505363872">"公司"</string>
+ <string name="orgTypeOther" msgid="3951781131570124082">"其他"</string>
+ <string name="orgTypeCustom" msgid="225523415372088322">"自訂"</string>
+ <string name="contact_status_update_attribution" msgid="5112589886094402795">"透過 <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="contact_status_update_attribution_with_date" msgid="5945386376369979909">"<xliff:g id="DATE">%1$s</xliff:g>透過「<xliff:g id="SOURCE">%2$s</xliff:g>」"</string>
<string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"輸入 PIN 碼"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN 碼錯誤!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"如要解鎖,請按 Menu 鍵,然後按 0。"</string>
@@ -553,8 +508,7 @@
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"很抱歉,請再試一次"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"正在充電 (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"充電完成。"</string>
- <!-- no translation found for lockscreen_battery_short (3617549178603354656) -->
- <skip />
+ <string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"請連接充電器。"</string>
<string name="lockscreen_missing_sim_message_short" msgid="7381499217732227295">"沒有 SIM 卡。"</string>
<string name="lockscreen_missing_sim_message" msgid="2186920585695169078">"手機未插入 SIM 卡。"</string>
@@ -576,6 +530,9 @@
<string name="lockscreen_glogin_submit_button" msgid="7130893694795786300">"登入"</string>
<string name="lockscreen_glogin_invalid_input" msgid="1364051473347485908">"使用者名稱或密碼錯誤。"</string>
<string name="lockscreen_glogin_checking_password" msgid="6758890536332363322">"檢查中..."</string>
+ <string name="lockscreen_unlock_label" msgid="737440483220667054">"解除封鎖"</string>
+ <string name="lockscreen_sound_on_label" msgid="9068877576513425970">"開啟音效"</string>
+ <string name="lockscreen_sound_off_label" msgid="996822825154319026">"關閉音效"</string>
<string name="hour_ampm" msgid="4329881288269772723">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%P</xliff:g>"</string>
<string name="hour_cap_ampm" msgid="1829009197680861107">"<xliff:g id="HOUR">%-l</xliff:g><xliff:g id="AMPM">%p</xliff:g>"</string>
<string name="status_bar_clear_all_button" msgid="7774721344716731603">"清除"</string>
@@ -586,8 +543,7 @@
<string name="battery_status_charging" msgid="756617993998772213">"充電中"</string>
<string name="battery_low_title" msgid="7923774589611311406">"請連接充電器"</string>
<string name="battery_low_subtitle" msgid="7388781709819722764">"電池電量即將不足:"</string>
- <!-- no translation found for battery_low_percent_format (696154104579022959) -->
- <skip />
+ <string name="battery_low_percent_format" msgid="696154104579022959">"還剩 <xliff:g id="NUMBER">%d%%</xliff:g> 以下。"</string>
<string name="battery_low_why" msgid="7279169609518386372">"電池使用狀況"</string>
<string name="factorytest_failed" msgid="5410270329114212041">"出廠測試失敗"</string>
<string name="factorytest_not_system" msgid="4435201656767276723">"只有安裝在 /system/app 裡的程式才能支援 FACTORY_TEST 操作。"</string>
@@ -597,8 +553,7 @@
<string name="js_dialog_title_default" msgid="6961903213729667573">"JavaScript"</string>
<string name="js_dialog_before_unload" msgid="1901675448179653089">"離開此頁?"\n\n"<xliff:g id="MESSAGE">%s</xliff:g>"\n\n" 選取 [確定] 離開此頁;或 [取消] 留在此頁。"</string>
<string name="save_password_label" msgid="6860261758665825069">"確認"</string>
- <!-- no translation found for double_tap_toast (1068216937244567247) -->
- <skip />
+ <string name="double_tap_toast" msgid="1068216937244567247">"提示:輕按兩下可放大縮小。"</string>
<string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"讀取瀏覽器的記錄與書籤"</string>
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"允許應用程式讀取瀏覽器曾經造訪過的所有網址,以及瀏覽器的所有書籤。"</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"寫入瀏覽器的記錄與書籤"</string>
@@ -749,7 +704,6 @@
<string name="force_close" msgid="3653416315450806396">"強制關閉"</string>
<string name="report" msgid="4060218260984795706">"回報"</string>
<string name="wait" msgid="7147118217226317732">"等待"</string>
- <string name="debug" msgid="9103374629678531849">"偵錯"</string>
<string name="sendText" msgid="5132506121645618310">"訊息傳送方式"</string>
<string name="volume_ringtone" msgid="6885421406845734650">"鈴聲音量"</string>
<string name="volume_music" msgid="5421651157138628171">"媒體音量"</string>
@@ -803,10 +757,8 @@
<string name="extmedia_format_message" msgid="3621369962433523619">"確定要將 SD 卡格式化嗎?該 SD 卡中的所有資料將會遺失。"</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"格式化"</string>
<string name="adb_active_notification_title" msgid="6729044778949189918">"USB 偵錯模式已啟用"</string>
- <!-- no translation found for adb_active_notification_message (8470296818270110396) -->
- <skip />
- <!-- no translation found for select_input_method (6865512749462072765) -->
- <skip />
+ <string name="adb_active_notification_message" msgid="8470296818270110396">"選取以停用 USB 偵錯。"</string>
+ <string name="select_input_method" msgid="6865512749462072765">"選取輸入方式"</string>
<string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string>
<string name="candidates_style" msgid="4333913089637062257"><u>"待選項目"</u></string>
@@ -830,29 +782,36 @@
<string name="ime_action_go" msgid="8320845651737369027">"開始"</string>
<string name="ime_action_search" msgid="658110271822807811">"搜尋"</string>
<string name="ime_action_send" msgid="2316166556349314424">"傳送"</string>
- <string name="ime_action_next" msgid="3138843904009813834">"下一步"</string>
+ <string name="ime_action_next" msgid="3138843904009813834">"下一頁"</string>
<string name="ime_action_done" msgid="8971516117910934605">"完成"</string>
<string name="ime_action_default" msgid="2840921885558045721">"執行"</string>
<string name="dial_number_using" msgid="5789176425167573586">"使用 <xliff:g id="NUMBER">%s</xliff:g>"\n"撥號"</string>
<string name="create_contact_using" msgid="4947405226788104538">"建立手機號碼為 <xliff:g id="NUMBER">%s</xliff:g>"\n"的聯絡人"</string>
<string name="accessibility_compound_button_selected" msgid="5612776946036285686">"已勾選"</string>
<string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"未勾選"</string>
+ <!-- no translation found for grant_credentials_permission_message_header (6824538733852821001) -->
+ <skip />
+ <!-- no translation found for grant_credentials_permission_message_footer (3125211343379376561) -->
+ <skip />
+ <!-- no translation found for grant_permissions_header_text (2722567482180797717) -->
+ <skip />
<string name="allow" msgid="7225948811296386551">"允許"</string>
<string name="deny" msgid="2081879885755434506">"拒絕"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"已要求權限"</string>
- <!-- no translation found for permission_request_notification_with_subtitle (4325409589686688000) -->
- <skip />
+ <string name="permission_request_notification_with_subtitle" msgid="4325409589686688000">"帳戶 <xliff:g id="ACCOUNT">%s</xliff:g> 的"\n"權限要求"</string>
<string name="input_method_binding_label" msgid="1283557179944992649">"輸入方式"</string>
<string name="sync_binding_label" msgid="3687969138375092423">"同步處理"</string>
<string name="accessibility_binding_label" msgid="4148120742096474641">"協助工具"</string>
<string name="wallpaper_binding_label" msgid="1240087844304687662">"桌布"</string>
<string name="chooser_wallpaper" msgid="7873476199295190279">"變更桌布"</string>
- <!-- no translation found for pptp_vpn_description (2688045385181439401) -->
+ <string name="pptp_vpn_description" msgid="2688045385181439401">"點對點通道通訊協定"</string>
+ <string name="l2tp_vpn_description" msgid="3750692169378923304">"第二層通道通訊協定"</string>
+ <string name="l2tp_ipsec_psk_vpn_description" msgid="3945043564008303239">"採用預先共用金鑰的 L2TP/IPSec VPN"</string>
+ <string name="l2tp_ipsec_crt_vpn_description" msgid="5382714073103653577">"採用憑證的 L2TP/IPSec VPN"</string>
+ <!-- no translation found for upload_file (2897957172366730416) -->
<skip />
- <!-- no translation found for l2tp_vpn_description (3750692169378923304) -->
+ <!-- no translation found for reset (2448168080964209908) -->
<skip />
- <!-- no translation found for l2tp_ipsec_psk_vpn_description (3945043564008303239) -->
- <skip />
- <!-- no translation found for l2tp_ipsec_crt_vpn_description (5382714073103653577) -->
+ <!-- no translation found for submit (1602335572089911941) -->
<skip />
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 0b605ed..8dadd88 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1394,8 +1394,10 @@
be a dimension (such as "12dip") for a constant width or one of
the special constants. -->
<attr name="layout_width" format="dimension">
- <!-- The view should be as big as its parent (minus padding). -->
+ <!-- {@deprecated Use match_parent instead.} -->
<enum name="fill_parent" value="-1" />
+ <!-- The view should be as big as its parent (minus padding). -->
+ <enum name="match_parent" value="-1" />
<!-- The view should be only big enough to enclose its content (plus padding). -->
<enum name="wrap_content" value="-2" />
</attr>
@@ -1405,8 +1407,10 @@
be a dimension (such as "12dip") for a constant height or one of
the special constants. -->
<attr name="layout_height" format="dimension">
- <!-- The view should be as big as its parent (minus padding). -->
+ <!-- {@deprecated Use match_parent instead.} -->
<enum name="fill_parent" value="-1" />
+ <!-- The view should be as big as its parent (minus padding). -->
+ <enum name="match_parent" value="-1" />
<!-- The view should be only big enough to enclose its content (plus padding). -->
<enum name="wrap_content" value="-2" />
</attr>
@@ -2110,22 +2114,26 @@
is used. -->
<attr name="dropDownAnchor" format="reference" />
<!-- Specifies the basic width of the dropdown. Its value may
- be a dimension (such as "12dip") for a constant width, fill_parent
- to fill the width of the screen, or wrap_content to match the width
+ be a dimension (such as "12dip") for a constant width, match_parent
+ to match the width of the screen, or wrap_content to match the width
of the anchored view. -->
<attr name="dropDownWidth" format="dimension">
- <!-- The dropdown should fill the width of the screen. -->
+ <!-- {@deprecated Use match_parent instead.} -->
<enum name="fill_parent" value="-1" />
+ <!-- The dropdown should fit the width of the screen. -->
+ <enum name="match_parent" value="-1" />
<!-- The dropdown should fit the width of its anchor. -->
<enum name="wrap_content" value="-2" />
</attr>
<!-- Specifies the basic width of the dropdown. Its value may
- be a dimension (such as "12dip") for a constant width, fill_parent
+ be a dimension (such as "12dip") for a constant width, match_parent
to fill the width of the screen, or wrap_content to match the height of
the content of the drop down. -->
<attr name="dropDownHeight" format="dimension">
- <!-- The dropdown should fill the width of the screen. -->
+ <!-- {@deprecated Use match_parent instead.} -->
<enum name="fill_parent" value="-1" />
+ <!-- The dropdown should fill the width of the screen. -->
+ <enum name="match_parent" value="-1" />
<!-- The dropdown should fit the width of its anchor. -->
<enum name="wrap_content" value="-2" />
</attr>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index bc354c5..539db83 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -462,10 +462,17 @@
size.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_restartPackages">restart other applications</string>
+ <string name="permlab_killBackgroundProcesses">kill background processes</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permdesc_restartPackages">Allows an application to
- forcibly restart other applications.</string>
+ <string name="permdesc_killBackgroundProcesses">Allows an application to
+ kill background processes of other applications, even if memory
+ isn\'t low.</string>
+
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_forceStopPackages">force stop other applications</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_forceStopPackages">Allows an application to
+ forcibly stop other applications.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_forceBack">force application to close</string>
@@ -1139,6 +1146,11 @@
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_sdcardWrite">Allows an application to write to the SD card.</string>
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_cache_filesystem">access the cache filesystem</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_cache_filesystem">Allows an application to read and write the cache filesystem.</string>
+
<!-- The order of these is important, don't reorder without changing Contacts.java --> <skip />
<!-- Phone number types from android.provider.Contacts. This could be used when adding a new phone number for a contact, for example. -->
<string-array name="phoneTypes">
@@ -1313,10 +1325,14 @@
<!-- Attbution of a contact status update, when the time of update is known -->
<string name="contact_status_update_attribution_with_date"><xliff:g id="date" example="3 hours ago">%1$s</xliff:g> via <xliff:g id="source" example="Google Talk">%2$s</xliff:g></string>
- <!-- Instructions telling the user to enter their pin to unlock the keyguard.
+ <!-- Instructions telling the user to enter their SIM PIN to unlock the keyguard.
Displayed in one line in a large font. -->
<string name="keyguard_password_enter_pin_code">Enter PIN code</string>
+ <!-- Instructions telling the user to enter their PIN password to unlock the keyguard.
+ Displayed in one line in a large font. -->
+ <string name="keyguard_password_enter_password_code">Enter password to unlock</string>
+
<!-- Instructions telling the user that they entered the wrong pin while trying
to unlock the keyguard. Displayed in one line in a large font. -->
<string name="keyguard_password_wrong_pin_code">Incorrect PIN code!</string>
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index f2b52d9..58e9f45 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -371,7 +371,7 @@
<style name="Widget.TextView.ListSeparator">
<item name="android:background">@android:drawable/dark_header_dither</item>
- <item name="android:layout_width">fill_parent</item>
+ <item name="android:layout_width">match_parent</item>
<item name="android:layout_height">25dip</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">?textColorSecondary</item>
diff --git a/docs/html/guide/appendix/api-levels.jd b/docs/html/guide/appendix/api-levels.jd
index 272d027..398d863 100644
--- a/docs/html/guide/appendix/api-levels.jd
+++ b/docs/html/guide/appendix/api-levels.jd
@@ -83,6 +83,7 @@
<table>
<tr><th>Platform Version</th><th>API Level</th></tr>
+ <tr><td>Android 2.1</td><td>7</td></tr>
<tr><td>Android 2.0.1</td><td>6</td></tr>
<tr><td>Android 2.0</td><td>5</td></tr>
<tr><td>Android 1.6</td><td>4</td></tr>
diff --git a/docs/html/guide/appendix/faq/commontasks.jd b/docs/html/guide/appendix/faq/commontasks.jd
index c4fc52a..38a89ef 100644
--- a/docs/html/guide/appendix/faq/commontasks.jd
+++ b/docs/html/guide/appendix/faq/commontasks.jd
@@ -160,11 +160,9 @@
<li>Create an {@link android.app.AlertDialog app.AlertDialog} class </li>
<li>Set the {@link android.R.style#Theme_Dialog} <em>theme</em> attribute to <code>@android:style/Theme.Dialog</code>
in your AndroidManifest.xml file. For example:
-</ul>
-<blockquote>
<pre><activity class="AddRssItem" android:label="Add an item" android:theme="@android:style/Theme.Dialog"/>
-</pre>
-</blockquote>
+</pre></li>
+</ul>
<p>Calling startActivity() or startActivityForResult() will open a new screen in whatever
way it defines itself (if it uses a floating theme it will be floating,
otherwise it will be full screen). </p>
diff --git a/docs/html/guide/developing/tools/adb.jd b/docs/html/guide/developing/tools/adb.jd
index 2970e61..04eed8e 100644
--- a/docs/html/guide/developing/tools/adb.jd
+++ b/docs/html/guide/developing/tools/adb.jd
@@ -83,12 +83,12 @@
<p>The server then sets up connections to all running emulator/device instances. It locates emulator/device instances by scanning odd-numbered ports in the range 5555 to 5585, the range used by emulators/devices. Where the server finds an adb daemon, it sets up a connection to that port. Note that each emulator/device instance acquires a pair of sequential ports — an even-numbered port for console connections and an odd-numbered port for adb connections. For example: </p>
-<blockquote>
+<p style="margin-left:2em">
Emulator 1, console: 5554<br/>
Emulator 1, adb: 5555<br>
Emulator 2, console: 5556<br>
Emulator 2, adb: 5557 ...
-</blockquote>
+</p>
<p>As shown, the emulator instance connected to adb on port 5555 is the same as the instance whose console listens on port 5554. </p>
diff --git a/docs/html/guide/practices/design/performance.jd b/docs/html/guide/practices/design/performance.jd
index 1eef342..ec34ac9 100644
--- a/docs/html/guide/practices/design/performance.jd
+++ b/docs/html/guide/practices/design/performance.jd
@@ -22,6 +22,7 @@
<p>This document covers these topics: </p>
<ul>
<li><a href="#intro">Introduction</a></li>
+ <li><a href="#optimize_judiciously">Optimize Judiciously</a></li>
<li><a href="#object_creation">Avoid Creating Objects</a></li>
<li><a href="#native_methods">Use Native Methods</a></li>
<li><a href="#prefer_virtual">Prefer Virtual Over Interface</a></li>
@@ -74,6 +75,180 @@
probably be as fast or faster than compiled bar(). It is unwise to rely on a
compiler to "save" you and make your code fast enough.</p>
+<h2 id="optimize_judiciously">Optimize Judiciously</h2>
+
+<p>As you get started thinking about how to design your application, consider
+the cautionary points about optimization that Josh Bloch makes in his book
+<em>Effective Java</em>. Here's "Item 47: Optimize Judiciously", excerpted from
+the latest edition of the book with permission. Although Josh didn't have
+Android application development in mind when writing this section — for
+example, the <code style="color:black">java.awt.Component</code> class
+referenced is not available in Android, and Android uses the
+Dalvik VM, rather than a standard JVM — his points are still valid. </p>
+
+<blockquote>
+
+<p>There are three aphorisms concerning optimization that everyone should know.
+They are perhaps beginning to suffer from overexposure, but in case you aren't
+yet familiar with them, here they are:</p>
+
+<div style="padding-left:3em;padding-right:4em;">
+
+<p style="margin-bottom:.5em;">More computing sins are committed in the name of
+efficiency (without necessarily achieving it) than for any other single
+reason—including blind stupidity.</p>
+<p>—William A. Wulf <span style="font-size:80%;"><sup>1</sup></span></p>
+
+<p style="margin-bottom:.5em;">We should forget about small efficiencies, say
+about 97% of the time: premature optimization is the root of all evil. </p>
+<p>—Donald E. Knuth <span style="font-size:80%;"><sup>2</sup></span></p>
+
+
+<p style="margin-bottom:.5em;">We follow two rules in the matter of optimization:</p>
+<ul style="margin-bottom:0">
+<li>Rule 1. Don't do it.</li>
+<li>Rule 2 (for experts only). Don't do it yet — that is, not until you have a
+perfectly clear and unoptimized solution. </li>
+</ul>
+<p>—M. A. Jackson <span style="font-size:80%;"><sup>3</sup></span></p>
+</div>
+
+<p>All of these aphorisms predate the Java programming language by two decades.
+They tell a deep truth about optimization: it is easy to do more harm than good,
+especially if you optimize prematurely. In the process, you may produce software
+that is neither fast nor correct and cannot easily be fixed.</p>
+
+<p>Don't sacrifice sound architectural principles for performance.
+<strong>Strive to write good programs rather than fast ones.</strong> If a good
+program is not fast enough, its architecture will allow it to be optimized. Good
+programs embody the principle of <em>information hiding</em>: where possible,
+they localize design decisions within individual modules, so individual
+decisions can be changed without affecting the remainder of the system (Item
+13).</p>
+
+<p>This does <em>not</em> mean that you can ignore performance concerns until
+your program is complete. Implementation problems can be fixed by later
+optimization, but pervasive architectural flaws that limit performance can be
+impossible to fix without rewriting the system. Changing a fundamental facet of
+your design after the fact can result in an ill-structured system that is
+difficult to maintain and evolve. Therefore you must think about performance
+during the design process.</p>
+
+<p><strong>Strive to avoid design decisions that limit performance.</strong> The
+components of a design that are most difficult to change after the fact are
+those specifying interactions between modules and with the outside world. Chief
+among these design components are APIs, wire-level protocols, and persistent
+data formats. Not only are these design components difficult or impossible to
+change after the fact, but all of them can place significant limitations on the
+performance that a system can ever achieve.</p>
+
+<p><strong>Consider the performance consequences of your API design
+decisions.</strong> Making a public type mutable may require a lot of needless
+defensive copying (Item 39). Similarly, using inheritance in a public class
+where composition would have been appropriate ties the class forever to its
+superclass, which can place artificial limits on the performance of the subclass
+(Item 16). As a final example, using an implementation type rather than an
+interface in an API ties you to a specific implementation, even though faster
+implementations may be written in the future (Item 52).</p>
+
+<p>The effects of API design on performance are very real. Consider the <code
+style="color:black">getSize</code> method in the <code
+style="color:black">java.awt.Component</code> class. The decision that this
+performance-critical method was to return a <code
+style="color:black">Dimension</code> instance, coupled with the decision that
+<code style="color:black">Dimension</code> instances are mutable, forces any
+implementation of this method to allocate a new <code
+style="color:black">Dimension</code> instance on every invocation. Even though
+allocating small objects is inexpensive on a modern VM, allocating millions of
+objects needlessly can do real harm to performance.</p>
+
+<p>In this case, several alternatives existed. Ideally, <code
+style="color:black">Dimension</code> should have been immutable (Item 15);
+alternatively, the <code style="color:black">getSize</code> method could have
+been replaced by two methods returning the individual primitive components of a
+<code style="color:black">Dimension</code> object. In fact, two such methods
+were added to the Component API in the 1.2 release for performance reasons.
+Preexisting client code, however, still uses the <code
+style="color:black">getSize</code> method and still suffers the performance
+consequences of the original API design decisions.</p>
+
+<p>Luckily, it is generally the case that good API design is consistent with
+good performance. <strong>It is a very bad idea to warp an API to achieve good
+performance.</strong> The performance issue that caused you to warp the API may
+go away in a future release of the platform or other underlying software, but
+the warped API and the support headaches that come with it will be with you for
+life.</p>
+
+<p>Once you've carefully designed your program and produced a clear, concise,
+and well-structured implementation, <em>then</em> it may be time to consider
+optimization, assuming you're not already satisfied with the performance of the
+program.</p>
+
+<p>Recall that Jackson's two rules of optimization were "Don't do it," and "(for
+experts only). Don't do it yet." He could have added one more: <strong>measure
+performance before and after each attempted optimization.</strong> You may be
+surprised by what you find. Often, attempted optimizations have no measurable
+effect on performance; sometimes, they make it worse. The main reason is that
+it's difficult to guess where your program is spending its time. The part of the
+program that you think is slow may not be at fault, in which case you'd be
+wasting your time trying to optimize it. Common wisdom says that programs spend
+80 percent of their time in 20 percent of their code.</p>
+
+<p>Profiling tools can help you decide where to focus your optimization efforts.
+Such tools give you runtime information, such as roughly how much time each
+method is consuming and how many times it is invoked. In addition to focusing
+your tuning efforts, this can alert you to the need for algorithmic changes. If
+a quadratic (or worse) algorithm lurks inside your program, no amount of tuning
+will fix the problem. You must replace the algorithm with one that is more
+efficient. The more code in the system, the more important it is to use a
+profiler. It's like looking for a needle in a haystack: the bigger the haystack,
+the more useful it is to have a metal detector. The JDK comes with a simple
+profiler and modern IDEs provide more sophisticated profiling tools.</p>
+
+<p>The need to measure the effects of attempted optimization is even greater on
+the Java platform than on more traditional platforms, because the Java
+programming language does not have a strong <em>performance model</em>. The
+relative costs of the various primitive operations are not well defined. The
+"semantic gap" between what the programmer writes and what the CPU executes is
+far greater than in traditional statically compiled languages, which makes it
+very difficult to reliably predict the performance consequences of any
+optimization. There are plenty of performance myths floating around that turn
+out to be half-truths or outright lies.</p>
+
+<p>Not only is Java's performance model ill-defined, but it varies from JVM
+implementation to JVM implementation, from release to release, and from
+processor to processor. If you will be running your program on multiple JVM
+implementations or multiple hardware platforms, it is important that you measure
+the effects of your optimization on each. Occasionally you may be forced to make
+trade-offs between performance on different JVM implementations or hardware
+platforms.</p>
+
+<p>To summarize, do not strive to write fast programs — strive to write
+good ones; speed will follow. Do think about performance issues while you're
+designing systems and especially while you're designing APIs, wire-level
+protocols, and persistent data formats. When you've finished building the
+system, measure its performance. If it's fast enough, you're done. If not,
+locate the source of the problems with the aid of a profiler, and go to work
+optimizing the relevant parts of the system. The first step is to examine your
+choice of algorithms: no amount of low-level optimization can make up for a poor
+choice of algorithm. Repeat this process as necessary, measuring the performance
+after every change, until you're satisfied.</p>
+
+<p>—Excerpted from Josh Bloch's <em>Effective Java</em>, Second Ed.
+(Addison-Wesley, 2008).</em></p>
+
+<p style="font-size:80%;margin-bottom:0;"><sup>1</sup> Wulf, W. A Case Against
+the GOTO. <em>Proceedings of the 25th ACM National
+Conference</em> 2 (1972): 791–797.</p>
+<p style="font-size:80%;margin-bottom:0;"><sup>2</sup> Knuth, Donald. Structured
+Programming with go to Statements. <em>Computing
+Surveys 6</em> (1974): 261–301.</p>
+<p style="font-size:80%"><sup>3</sup> Jackson, M. A. <em>Principles of Program
+Design</em>, Academic Press, London, 1975.
+ISBN: 0123790506.</p>
+
+</blockquote>
+
<a name="object_creation"></a>
<h2>Avoid Creating Objects</h2>
diff --git a/docs/html/guide/practices/screens_support.jd b/docs/html/guide/practices/screens_support.jd
index 10f4485..643d307 100644
--- a/docs/html/guide/practices/screens_support.jd
+++ b/docs/html/guide/practices/screens_support.jd
@@ -289,11 +289,11 @@
compatibility features that together manage the rendering of application
resources in an appropriate way for the current device screen. The platform
handles most of the work of rendering your application, but also gives you two
-key ways to control the way your application is displayed, if you need or want
+key ways to control how your application is displayed, if you need or want
to use them:</p>
<ul>
- <li>The platform provides a set of resource qualifiers that let you provide
+ <li>The platform supports a set of resource qualifiers that let you provide
size- and density-specific resources, if needed. The qualifiers for
size-specific resources are <code>large</code>, <code>normal</code>, and
<code>small</code>, and those for density-specific resources are
@@ -303,7 +303,7 @@
<li>The platform also provides a
<a href="{@docRoot}guide/topics/manifest/supports-screens-element.html">
<code><supports-screens></code></a>
-element, whose attributes
+manifest element, whose attributes
<code>android:largeScreens</code>, <code>android:normalScreens</code>, and
<code>android:smallScreens</code> let you specify what generalized screen sizes
your application supports. A fourth attribute, <code>android:anyDensity</code>,
diff --git a/docs/html/guide/practices/ui_guidelines/menu_design.jd b/docs/html/guide/practices/ui_guidelines/menu_design.jd
index 518cea1..ebf8a4b 100644
--- a/docs/html/guide/practices/ui_guidelines/menu_design.jd
+++ b/docs/html/guide/practices/ui_guidelines/menu_design.jd
@@ -93,10 +93,10 @@
<h2 id="tour_of_the_menus">Tour of the Menus</h2>
-<blockquote>
- <b>NOTE</b> - Your menus and screens might not look like those shown in this document;
- they may vary from one version of Android or device to another.
-</blockquote>
+<p class="note"><strong>Note:</strong> Your menus and screens might not look
+like those shown in this document; they may vary from one version of Android
+or device to another.
+</p>
<h3 id="options_menu">Options Menu</h3>
diff --git a/docs/html/guide/samples/index.jd b/docs/html/guide/samples/index.jd
index fc437e9..7923532 100644
--- a/docs/html/guide/samples/index.jd
+++ b/docs/html/guide/samples/index.jd
@@ -77,7 +77,7 @@
<dt><a href="{@docRoot}resources/samples/SoftKeyboard/index.html">Soft Keyboard</a></dt>
<dd>An example of writing an input method for a software keyboard.</dd>
- <dt><a href={@docRoot}resources/samples/Wiktionary/index.html">Wiktionary</a></dt>
+ <dt><a href=""{@docRoot}resources/samples/Wiktionary/index.html">Wiktionary</a></dt>
<dd>An example of creating interactive widgets for display on the Android
home screen.</dd>
diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd
index 63bb934..d7fc563 100644
--- a/docs/html/guide/topics/manifest/uses-feature-element.jd
+++ b/docs/html/guide/topics/manifest/uses-feature-element.jd
@@ -5,11 +5,9 @@
<dt>syntax:</dt>
<dd>
-<pre class="stx">
-<uses-feature android:<a href="#glEsVersion">glEsVersion</a>="<em>integer</em>"
+<pre class="stx"><uses-feature android:<a href="#glEsVersion">glEsVersion</a>="<em>integer</em>"
android:<a href="#name">name</a>="<em>string</em>"
- android:<a href="#required">required</a>=["true" | "false"] />
-</pre>
+ android:<a href="#required">required</a>=["true" | "false"] /></pre>
</dd>
<dt>contained in:</dt>
diff --git a/docs/html/guide/topics/resources/resources-i18n.jd b/docs/html/guide/topics/resources/resources-i18n.jd
index 0e7d585..fcf2af9 100755
--- a/docs/html/guide/topics/resources/resources-i18n.jd
+++ b/docs/html/guide/topics/resources/resources-i18n.jd
@@ -643,14 +643,14 @@
<p>Android will pick which of the various underlying resource files should be
used at runtime, depending on the current configuration of the device.
The example used here assumes the following device configuration:</p>
-<blockquote>
- <p>Locale = <code>en-GB</code><br>
+
+ <p style="margin-left:2em">Locale = <code>en-GB</code><br>
Screen orientation = <code>port</code><br>
Screen pixel density = <code>mdpi</code><br>
Touchscreen type = <code>notouch</code><br>
Primary text input method = <code>12key</code><br>
</p>
-</blockquote>
+
<p>Here is how Android makes the selection: </p>
<ol>
<li>
diff --git a/docs/html/index.jd b/docs/html/index.jd
index b9854c9..7c28583 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -47,7 +47,7 @@
<td class="imageCell"><a href="{@docRoot}sdk/index.html"><img src="{@docRoot}assets/images/icon_download.jpg" style="padding:0" /></a></td>
<td>
<h2 class="green">Download</h2>
- <p>The Android SDK the tools, sample code, and docs you need to create great apps.</p>
+ <p>The Android SDK has the tools, sample code, and docs you need to create great apps.</p>
<p><a href="{@docRoot}sdk/index.html">Learn more »</a></p>
</td>
</tr>
diff --git a/docs/html/resources/articles/qsb.jd b/docs/html/resources/articles/qsb.jd
index 1249f21..e497f50 100644
--- a/docs/html/resources/articles/qsb.jd
+++ b/docs/html/resources/articles/qsb.jd
@@ -23,8 +23,8 @@
<p class="note"><strong>Note:</strong> The code fragments in this document are
related to a sample app called <a
-href="http://developer.android.com/guide/samples/SearchableDictionary/index.
-html" title="Searchable Dictionary">Searchable Dictionary</a>. The app is
+href="{@docRoot}resources/samples/SearchableDictionary/index.html"
+title="Searchable Dictionary">Searchable Dictionary</a>. The app is
available for Android 1.6 and later platforms.</p>
<h3>The story before now: searching within your app</h3>
diff --git a/docs/html/resources/dashboard/platform-versions.jd b/docs/html/resources/dashboard/platform-versions.jd
index 883f64a..ec7e9da 100644
--- a/docs/html/resources/dashboard/platform-versions.jd
+++ b/docs/html/resources/dashboard/platform-versions.jd
@@ -45,9 +45,11 @@
<div class="dashboard-panel">
<img alt="" width="400" height="250"
-src="http://chart.apis.google.com/chart?cht=p&chs=400x250&chd=t:0.3,27.7,54.2,2.9,14.8&chl=Android%201.1|Android%201.5|Android%201.6|Android%202.0|Android%202.0.1&chco=c4df9b,6fad0c" />
+src="http://chart.apis.google.com/chart?cht=p&chs=400x250&chd=t:0.3,31.0,47.6,0.7,20.4&chl=Android%201.1|Android%201.5|Android%201.6|Android%202.0|Android%202.0.1&chco=c4df9b,6fad0c" />
-<!-- f6faf2,a3c539 -->
+<!-- HISTORY
+12/14/09 http://chart.apis.google.com/chart?cht=p&chs=400x250&chd=t:0.3,27.7,54.2,2.9,14.8&chl=Android%201.1|Android%201.5|Android%201.6|Android%202.0|Android%202.0.1&chco=c4df9b,6fad0c
+-->
<table>
<tr>
@@ -60,20 +62,20 @@
</tr>
<tr>
<td>Android 1.5</td>
- <td>27.7%</td>
+ <td>31.0%</td>
</tr>
<tr>
<td>Android 1.6</td>
- <td>54.2%</td></tr>
+ <td>47.6%</td></tr>
<tr>
<td>Android 2.0</td>
- <td>2.9%</td>
+ <td>0.7%</td>
</tr>
<tr>
<td>Android 2.0.1</td>
- <td>14.8%</td>
+ <td>20.4%</td>
</tr>
</table>
</div>
-<p><em>Data collected during two weeks ending on 12/14/2009</em></p>
+<p><em>Data collected during two weeks ending on 1/4/2010</em></p>
diff --git a/docs/html/resources/faq/commontasks.jd b/docs/html/resources/faq/commontasks.jd
index fa487f7..2f09b00 100644
--- a/docs/html/resources/faq/commontasks.jd
+++ b/docs/html/resources/faq/commontasks.jd
@@ -160,11 +160,9 @@
<li>Create an {@link android.app.AlertDialog app.AlertDialog} class </li>
<li>Set the {@link android.R.style#Theme_Dialog} <em>theme</em> attribute to <code>@android:style/Theme.Dialog</code>
in your AndroidManifest.xml file. For example:
+ <pre><activity class="AddRssItem" android:label="Add an item" android:theme="@android:style/Theme.Dialog"/></pre></li>
</ul>
-<blockquote>
- <pre><activity class="AddRssItem" android:label="Add an item" android:theme="@android:style/Theme.Dialog"/>
-</pre>
-</blockquote>
+
<p>Calling startActivity() or startActivityForResult() will open a new screen in whatever
way it defines itself (if it uses a floating theme it will be floating,
otherwise it will be full screen). </p>
diff --git a/docs/html/resources/resources_toc.cs b/docs/html/resources/resources_toc.cs
index 40ee818..f5c573e 100644
--- a/docs/html/resources/resources_toc.cs
+++ b/docs/html/resources/resources_toc.cs
@@ -38,93 +38,93 @@
<span class="en">List of Articles</span>
</a> <span class="new">new!</span></div>
<ul>
- <li><a href="<?cs var:toroot ?>resources/articles/avoiding-memory-leaks.html">
- <span class="en">Avoiding Memory Leaks</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/backward-compatibility.html">
- <span class="en">Backward Compatibility</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/can-i-use-this-intent.html">
- <span class="en">Can I Use this Intent?</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/creating-input-method.html">
- <span class="en">Creating an Input Method</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/drawable-mutations.html">
- <span class="en">Drawable Mutations</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/faster-screen-orientation-change.html">
- <span class="en">Faster Screen Orientation Change</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/future-proofing.html">
- <span class="en">Future-Proofing Your Apps</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/gestures.html">
- <span class="en">Gestures</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/glsurfaceview.html">
- <span class="en">Introducing GLSurfaceView</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/layout-tricks-reuse.html">
- <span class="en">Layout Tricks: Reusing </span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/layout-tricks-efficiency.html">
- <span class="en">Layout Tricks: Efficiency</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/layout-tricks-stubs.html">
- <span class="en">Layout Tricks: ViewStubs </span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/layout-tricks-merge.html">
- <span class="en">Layout Tricks: Merging </span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/listview-backgrounds.html">
- <span class="en">ListView Backgrounds</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/live-folders.html">
- <span class="en">Live Folders</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/on-screen-inputs.html">
- <span class="en">Onscreen Input Methods</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/painless-threading.html">
- <span class="en">Painless Threading</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/qsb.html">
- <span class="en">Quick Search Box</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/touch-mode.html">
- <span class="en">Touch Mode</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/track-mem.html">
- <span class="en">Tracking Memory Allocations</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/ui-1.5.html">
- <span class="en">UI Framework Changes in Android 1.5</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/ui-1.6.html">
- <span class="en">UI Framework Changes in Android 1.6</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/timed-ui-updates.html">
- <span class="en">Updating the UI from a Timer</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/tts.html">
- <span class="en">Using Text-to-Speech</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/using-webviews.html">
- <span class="en">Using WebViews</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/wikinotes-linkify.html">
- <span class="en">WikiNotes: Linkify your Text!</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/wikinotes-intents.html">
- <span class="en">WikiNotes: Routing Intents</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/window-bg-speed.html">
- <span class="en">Window Backgrounds & UI Speed</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/articles/zipalign.html">
- <span class="en">Zipalign: An Easy Optimization</span>
- </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/avoiding-memory-leaks.html">
+ <span class="en">Avoiding Memory Leaks</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/backward-compatibility.html">
+ <span class="en">Backward Compatibility</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/can-i-use-this-intent.html">
+ <span class="en">Can I Use this Intent?</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/creating-input-method.html">
+ <span class="en">Creating an Input Method</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/drawable-mutations.html">
+ <span class="en">Drawable Mutations</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/faster-screen-orientation-change.html">
+ <span class="en">Faster Screen Orientation Change</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/future-proofing.html">
+ <span class="en">Future-Proofing Your Apps</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/gestures.html">
+ <span class="en">Gestures</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/glsurfaceview.html">
+ <span class="en">Introducing GLSurfaceView</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/layout-tricks-reuse.html">
+ <span class="en">Layout Tricks: Reusing </span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/layout-tricks-efficiency.html">
+ <span class="en">Layout Tricks: Efficiency</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/layout-tricks-stubs.html">
+ <span class="en">Layout Tricks: ViewStubs </span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/layout-tricks-merge.html">
+ <span class="en">Layout Tricks: Merging </span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/listview-backgrounds.html">
+ <span class="en">ListView Backgrounds</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/live-folders.html">
+ <span class="en">Live Folders</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/on-screen-inputs.html">
+ <span class="en">Onscreen Input Methods</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/painless-threading.html">
+ <span class="en">Painless Threading</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/qsb.html">
+ <span class="en">Quick Search Box</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/touch-mode.html">
+ <span class="en">Touch Mode</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/track-mem.html">
+ <span class="en">Tracking Memory Allocations</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/ui-1.5.html">
+ <span class="en">UI Framework Changes in Android 1.5</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/ui-1.6.html">
+ <span class="en">UI Framework Changes in Android 1.6</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/timed-ui-updates.html">
+ <span class="en">Updating the UI from a Timer</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/tts.html">
+ <span class="en">Using Text-to-Speech</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/using-webviews.html">
+ <span class="en">Using WebViews</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/wikinotes-linkify.html">
+ <span class="en">WikiNotes: Linkify your Text!</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/wikinotes-intents.html">
+ <span class="en">WikiNotes: Routing Intents</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/window-bg-speed.html">
+ <span class="en">Window Backgrounds & UI Speed</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/articles/zipalign.html">
+ <span class="en">Zipalign: An Easy Optimization</span>
+ </a></li>
</ul>
</li>
</ul>
@@ -179,6 +179,9 @@
<li><a href="<?cs var:toroot ?>resources/samples/BluetoothChat/index.html">
<span class="en">Bluetooth Chat</span>
</a> <span class="new">new!</span></li>
+ <li><a href="<?cs var:toroot ?>resources/samples/BusinessCard/index.html">
+ <span class="en">Business Card</span>
+ </a> <span class="new">new!</span></li>
<li><a href="<?cs var:toroot ?>resources/samples/ContactManager/index.html">
<span class="en">Contact Manager</span>
</a> <span class="new">new!</span></li>
@@ -234,15 +237,15 @@
<span class="en">FAQs</span>
</a></div>
<ul>
- <li><a href="<?cs var:toroot ?>resources/faq/framework.html">
- <span class="en">App Framework FAQ</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/faq/licensingandoss.html">
- <span class="en">Licensing FAQ</span>
- </a></li>
- <li><a href="<?cs var:toroot ?>resources/faq/security.html">
- <span class="en">Security FAQ</span>
- </a></li>
+ <li><a href="<?cs var:toroot ?>resources/faq/framework.html">
+ <span class="en">App Framework FAQ</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/faq/licensingandoss.html">
+ <span class="en">Licensing FAQ</span>
+ </a></li>
+ <li><a href="<?cs var:toroot ?>resources/faq/security.html">
+ <span class="en">Security FAQ</span>
+ </a></li>
</ul>
</li>
</ul>
diff --git a/docs/html/resources/samples/images/BusinessCard1.png b/docs/html/resources/samples/images/BusinessCard1.png
new file mode 100644
index 0000000..55ff7e5
--- /dev/null
+++ b/docs/html/resources/samples/images/BusinessCard1.png
Binary files differ
diff --git a/docs/html/resources/samples/images/BusinessCard2.png b/docs/html/resources/samples/images/BusinessCard2.png
new file mode 100644
index 0000000..347c317
--- /dev/null
+++ b/docs/html/resources/samples/images/BusinessCard2.png
Binary files differ
diff --git a/docs/html/resources/samples/index.jd b/docs/html/resources/samples/index.jd
index 8ab6f43b..0beb781 100644
--- a/docs/html/resources/samples/index.jd
+++ b/docs/html/resources/samples/index.jd
@@ -42,6 +42,12 @@
<dt><a href="BluetoothChat/index.html">Bluetooth Chat</a></dt>
<dd>An application for two-way text messaging over Bluetooth.</dd>
+ <dt><a href="BusinessCard/index.html">BusinessCard</a></dt>
+ <dd>An application that demonstrates how to launch the built-in contact
+ picker from within an activity. This sample also uses reflection to ensure
+ that the correct version of the contacts API is used, depending on which
+ API level the application is running under.</dd>
+
<dt><a href="ContactManager/index.html">Contact Manager</a></dt>
<dd>An application that demonstrates how to query the system contacts provider
using the <code>ContactsContract</code> API, as
diff --git a/docs/html/resources/tutorials/notepad/codelab/NotepadCodeLab.zip b/docs/html/resources/tutorials/notepad/codelab/NotepadCodeLab.zip
index 24fefc1..502a326 100644
--- a/docs/html/resources/tutorials/notepad/codelab/NotepadCodeLab.zip
+++ b/docs/html/resources/tutorials/notepad/codelab/NotepadCodeLab.zip
Binary files differ
diff --git a/docs/html/resources/tutorials/notepad/notepad-ex2.jd b/docs/html/resources/tutorials/notepad/notepad-ex2.jd
index bab9471..44a04ab 100644
--- a/docs/html/resources/tutorials/notepad/notepad-ex2.jd
+++ b/docs/html/resources/tutorials/notepad/notepad-ex2.jd
@@ -5,7 +5,7 @@
<p><em>In this exercise, you will add a second Activity to your notepad application, to let the user
-create and edit notes. You will also allow the user to delete existing notes through a context menu.
+create and edit notes. You will also allow the user to delete existing notes through a context menu.
The new Activity assumes responsibility for creating new notes by
collecting user input and packing it into a return Bundle provided by the intent. This exercise
demonstrates:</em></p>
@@ -55,7 +55,7 @@
</li>
<li>
There are also a couple of new overridden methods
- (<code>onCreateContextMenu()</code>, <code>onContextItemSelected()</code>,
+ (<code>onCreateContextMenu()</code>, <code>onContextItemSelected()</code>,
<code>onListItemClick()</code> and <code>onActivityResult()</code>)
which we will be filling in below.
</li>
@@ -75,7 +75,7 @@
<ol>
<li>In order for each list item in the ListView to register for the context menu, we call
- <code>registerForContextMenu()</code> and pass it our ListView. So, at the very end of
+ <code>registerForContextMenu()</code> and pass it our ListView. So, at the very end of
the <code>onCreate()</code> method add this line:
<pre>registerForContextMenu(getListView());</pre>
<p>Because our Activity extends the ListActivity class, <code>getListView()</code> will return us
@@ -91,7 +91,7 @@
super.onCreateContextMenu(menu, v, menuInfo);
menu.add(0, DELETE_ID, 0, R.string.menu_delete);
}</pre>
- <p>The <code>onCreateContextMenu()</code> callback some passes other information in addition to the Menu object,
+ <p>The <code>onCreateContextMenu()</code> callback passes some other information in addition to the Menu object,
such as the View that has been triggered for the menu and
an extra object that may contain additional information about the object selected. However, we don't care about
these here, because we only have one kind of object in the Activity that uses context menus. In the next
@@ -102,7 +102,7 @@
<h2>Step 3</h2>
<p>Now that the we've registered our ListView for a context menu and defined our context menu item, we need
to handle the callback when it is selected. For this, we need to identify the list ID of the
- selected item, then delete it. So fill in the
+ selected item, then delete it. So fill in the
<code>onContextItemSelected()</code> method like this:</p>
<pre>
public boolean onContextItemSelected(MenuItem item) {
@@ -127,15 +127,15 @@
margin-bottom:.5em;margin-top:1em;padding:0em;width:240px;">
<h2 style="border:0;font-size:12px;padding:.5em .5em .5em 1em;margin:0;
background-color:#FFFFDD;">Starting Other Activities</h2>
- <p style="padding-left:.5em;font-size:12px;margin:0;
+ <p style="padding-left:.5em;font-size:12px;margin:0;
padding:.0em .5em .5em 1em;">In this example our Intent uses a class name specifically.
- As well as
- <a href="{@docRoot}resources/faq/commontasks.html#intentexamples">starting intents</a> in
- classes we already know about, be they in our own application or another
- application, we can also create Intents without knowing exactly which
+ As well as
+ <a href="{@docRoot}resources/faq/commontasks.html#intentexamples">starting intents</a> in
+ classes we already know about, be they in our own application or another
+ application, we can also create Intents without knowing exactly which
application will handle it.</p>
- <p style="padding-left:.5em;font-size:12px;margin:0;
- padding:.0em .5em .5em 1em;">For example, we might want to open a page in a
+ <p style="padding-left:.5em;font-size:12px;margin:0;
+ padding:.0em .5em .5em 1em;">For example, we might want to open a page in a
browser, and for this we still use
an Intent. But instead of specifying a class to handle it, we use
a predefined Intent constant, and a content URI that describes what we
@@ -155,7 +155,7 @@
<code>NoteEdit</code>. Since the Intent class will need to communicate with the Android
operating system to route requests, we also have to provide a Context (<code>this</code>).</p>
<p>The <code>startActivityForResult()</code> method fires the Intent in a way that causes a method
- in our Activity to be called when the new Activity is completed. The method in our Activity
+ in our Activity to be called when the new Activity is completed. The method in our Activity
that receives the callback is called
<code>onActivityResult()</code> and we will implement it in a later step. The other way
to call an Activity is using <code>startActivity()</code> but this is a "fire-and-forget" way
@@ -164,7 +164,7 @@
<p>Don't worry about the fact that <code>NoteEdit</code> doesn't exist yet,
we will fix that soon. </p>
</li>
-
+
<h2>Step 5</h2>
@@ -180,7 +180,7 @@
interested in is the <code>position</code> that the user selected. We use
this to get the data from the correct row, and bundle it up to send to
the <code>NoteEdit</code> Activity.</p>
- <p>In our implementation of the callback, the method creates an
+ <p>In our implementation of the callback, the method creates an
<code>Intent</code> to edit the note using
the <code>NoteEdit</code> class. It then adds data into the extras Bundle of
the Intent, which will be passed to the called Activity. We use it
@@ -207,7 +207,7 @@
</li>
<li>
The details of the note are pulled out from our query Cursor, which we move to the
- proper position for the element that was selected in the list, with
+ proper position for the element that was selected in the list, with
the <code>moveToPosition()</code> method.</li>
<li>With the extras added to the Intent, we invoke the Intent on the
<code>NoteEdit</code> class by passing <code>startActivityForResult()</code>
@@ -219,7 +219,7 @@
variable is much more efficient than accessing a field in the Dalvik VM, so by doing this
we make only one access to the field, and five accesses to the local variable, making the
routine much more efficient. It is recommended that you use this optimization when possible.</p>
-
+
<h2>Step 6</h2>
@@ -243,7 +243,7 @@
<li><code>intent</code> — this is an Intent created by the Activity returning
results. It can be used to return data in the Intent "extras."
</li>
- </ul>
+ </ul>
<p>The combination of <code>startActivityForResult()</code> and
<code>onActivityResult()</code> can be thought of as an asynchronous RPC
(remote procedure call) and forms the recommended way for an Activity to invoke
@@ -277,7 +277,7 @@
<code>ACTIVITY_EDIT</code> activity results in this method.
</li>
<li>
- In the case of a create, we pull the title and body from the extras (retrieved from the
+ In the case of a create, we pull the title and body from the extras (retrieved from the
returned Intent) and use them to create a new note.
</li>
<li>
@@ -288,7 +288,7 @@
<code>fillData()</code> at the end ensures everything is up to date .
</li>
</ul>
-
+
<h2>Step 7</h2>
@@ -305,8 +305,8 @@
good UI is part art and part science, and the rest is work. Mastery of <a
href="{@docRoot}guide/topics/ui/declaring-layout.html">Declaring Layout</a> is an essential part of creating
a good looking Android application.</p>
- <p style="padding-left:.5em;font-size:12px;margin:0;
- padding:.0em .5em .5em 1em;">Take a look at the
+ <p style="padding-left:.5em;font-size:12px;margin:0;
+ padding:.0em .5em .5em 1em;">Take a look at the
<a href="{@docRoot}resources/tutorials/views/index.html">Hello Views</a>
for some example layouts and how to use them. The ApiDemos sample project is also a
great resource from which to learn how to create different layouts.</p>
@@ -335,7 +335,7 @@
<code>layout_weight</code> specified, so it takes up the minimum space
required to render. If the <code>layout_weight</code> of each of the two
text edit elements is set to 1, the remaining width in the parent layout will
- be split equally between them (because we claim they are equally important).
+ be split equally between them (because we claim they are equally important).
If the first one has a <code>layout_weight</code> of 1
and the second has a <code>layout_weight</code> of 2, then one third of the
remaining space will be given to the first, and two thirds to the
@@ -373,7 +373,7 @@
<code>onCreate(Bundle)</code> — and check the box next to it.</li>
<li>Click <strong>OK</strong>.<p>The method should now appear in your class.</p></li>
</ol>
-
+
<h2>Step 9</h2>
<p>Fill in the body of the <code>onCreate()</code> method for <code>NoteEdit</code>.</p>
@@ -388,7 +388,7 @@
<p>We can then unbundle the values that were passed in to the Activity
with the extras Bundle attached to the calling Intent. We'll use them to pre-populate
the title and body text edit views so that the user can edit them.
- Then we will grab and store the <code>mRowId</code> so we can keep
+ Then we will grab and store the <code>mRowId</code> so we can keep
track of what note the user is editing.</p>
<ol>
@@ -406,14 +406,14 @@
mTitleText = (EditText) findViewById(R.id.title);
mBodyText = (EditText) findViewById(R.id.body);
Button confirmButton = (Button) findViewById(R.id.confirm);</pre>
- <p>Note that <code>mTitleText</code> and <code>mBodyText</code> are member
+ <p>Note that <code>mTitleText</code> and <code>mBodyText</code> are member
fields (you need to declare them at the top of the class definition).</p>
</li>
<li>At the top of the class, declare a <code>Long mRowId</code> private field to store
the current <code>mRowId</code> being edited (if any).
</li>
- <li>Continuing inside <code>onCreate()</code>,
- add code to initialize the <code>title</code>, <code>body</code> and
+ <li>Continuing inside <code>onCreate()</code>,
+ add code to initialize the <code>title</code>, <code>body</code> and
<code>mRowId</code> from the extras Bundle in
the Intent (if it is present):<br>
<pre>
@@ -423,7 +423,7 @@
String title = extras.getString(NotesDbAdapter.KEY_TITLE);
String body = extras.getString(NotesDbAdapter.KEY_BODY);
mRowId = extras.getLong(NotesDbAdapter.KEY_ROWID);
-
+
if (title != null) {
mTitleText.setText(title);
}
@@ -459,16 +459,16 @@
confirmButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
-
+
}
-
+
});</pre>
</li>
</ol>
<h2>Step 10</h2>
<p>Fill in the body of the <code>onClick()</code> method of the <code>OnClickListener</code> created in the last step.</p>
-
+
<p>This is the code that will be run when the user clicks on the
confirm button. We want this to grab the title and body text from the edit
text fields, and put them into the return Bundle so that they can be passed
@@ -483,7 +483,7 @@
constants defined in Notepadv2 as keys:<br>
<pre>
Bundle bundle = new Bundle();
-
+
bundle.putString(NotesDbAdapter.KEY_TITLE, mTitleText.getText().toString());
bundle.putString(NotesDbAdapter.KEY_BODY, mBodyText.getText().toString());
if (mRowId != null) {
@@ -498,7 +498,7 @@
setResult(RESULT_OK, mIntent);
finish();</pre>
<ul>
- <li>The Intent is simply our data carrier that carries our Bundle
+ <li>The Intent is simply our data carrier that carries our Bundle
(with the title, body and mRowId).</li>
<li>The <code>setResult()</code> method is used to set the result
code and return Intent to be passed back to the
@@ -521,19 +521,19 @@
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.note_edit);
-
+
mTitleText = (EditText) findViewById(R.id.title);
mBodyText = (EditText) findViewById(R.id.body);
-
+
Button confirmButton = (Button) findViewById(R.id.confirm);
-
+
mRowId = null;
Bundle extras = getIntent().getExtras();
if (extras != null) {
String title = extras.getString(NotesDbAdapter.KEY_TITLE);
String body = extras.getString(NotesDbAdapter.KEY_BODY);
mRowId = extras.getLong(NotesDbAdapter.KEY_ROWID);
-
+
if (title != null) {
mTitleText.setText(title);
}
@@ -541,12 +541,12 @@
mBodyText.setText(body);
}
}
-
+
confirmButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Bundle bundle = new Bundle();
-
+
bundle.putString(NotesDbAdapter.KEY_TITLE, mTitleText.getText().toString());
bundle.putString(NotesDbAdapter.KEY_BODY, mBodyText.getText().toString());
if (mRowId != null) {
@@ -562,7 +562,7 @@
}</pre>
</li>
</ol>
-
+
<h2>Step 11</h2>
<div class="sidebox" style="border:2px solid #FFFFDD;float:right;
@@ -570,16 +570,16 @@
margin-bottom:.5em;margin-top:1em;padding:0em;width:240px;">
<h2 style="border:0;font-size:12px;padding:.5em .5em .5em 1em;margin:0;
background-color:#FFFFDD;">The All-Important Android Manifest File</h2>
- <p style="padding-left:.5em;font-size:12px;margin:0;
- padding:.0em .5em .5em 1em;">The AndroidManifest.xml file is the way in which Android sees your
+ <p style="padding-left:.5em;font-size:12px;margin:0;
+ padding:.0em .5em .5em 1em;">The AndroidManifest.xml file is the way in which Android sees your
application. This file defines the category of the application, where
it shows up (or even if it shows up) in the launcher or settings, what
activities, services, and content providers it defines, what intents it can
receive, and more. </p>
- <p style="padding-left:.5em;font-size:12px;margin:0;
- padding:.0em .5em .5em 1em;">For more information, see the reference document
+ <p style="padding-left:.5em;font-size:12px;margin:0;
+ padding:.0em .5em .5em 1em;">For more information, see the reference document
<a href="{@docRoot}guide/topics/manifest/manifest-intro.html">The AndroidManifest.xml File</a></p>
- </div>
+ </div>
<p>Finally, the new Activity has to be defined in the manifest file:</p>
<p>Before the new Activity can be seen by Android, it needs its own
@@ -597,10 +597,10 @@
</li>
<li>Click the <strong>Application</strong> tab at the bottom of the Manifest editor.</li>
<li>Click <strong>Add...</strong> in the Application Nodes section.
- <p>If you see a dialog with radiobuttons at the top, select the top radio button:
+ <p>If you see a dialog with radiobuttons at the top, select the top radio button:
"Create a new element at the top level, in Application".</p></li>
<li>Make sure "(A) Activity" is selected in the selection pane of the dialog, and click <strong>OK</strong>.</li>
- <li>Click on the new "Activity" node, in the Application Nodes section, then
+ <li>Click on the new "Activity" node, in the Application Nodes section, then
type <code>.NoteEdit</code> into the <em>Name*</em>
field to the right. Press Return/Enter.</li>
</ol>
@@ -608,28 +608,28 @@
file, have a look around at some of the other options available (but be careful not to select
them otherwise they will be added to your Manifest). This editor should help you understand
and alter the AndroidManifest.xml file as you move on to more advanced Android applications.</p>
-
+
<p class="note">If you prefer to edit this file directly, simply open the
<code>AndroidManifest.xml</code> file and look at the source (use the
<code>AndroidManifest.xml</code> tab in the eclipse editor to see the source code directly).
Then edit the file as follows:<br>
- <code><activity android:name=".NoteEdit"></activity></code><br><br>
+ <code><activity android:name=".NoteEdit" /></code><br><br>
This should be placed just below the line that reads:<br>
<code></activity></code> for the <code>.Notepadv2</code> activity.</p>
<h2 style="clear:right;">Step 12</h2>
<p>Now Run it!</p>
-<p>You should now be able to add real notes from
-the menu, as well as delete an existing one. Notice that in order to delete, you must
+<p>You should now be able to add real notes from
+the menu, as well as delete an existing one. Notice that in order to delete, you must
first use the directional controls on the device to highlight the note.
-Furthermore, selecting a note title from the list should bring up the note
-editor to let you edit it. Press confirm when finished to save the changes
+Furthermore, selecting a note title from the list should bring up the note
+editor to let you edit it. Press confirm when finished to save the changes
back to the database.
<h2>Solution and Next Steps</h2>
-<p>You can see the solution to this exercise in <code>Notepadv2Solution</code>
+<p>You can see the solution to this exercise in <code>Notepadv2Solution</code>
from the zip file to compare with your own.</p>
<p>Now try editing a note, and then hitting the back button on the emulator
instead of the confirm button (the back button is below the menu button). You
diff --git a/docs/html/resources/tutorials/notepad/notepad-ex3.jd b/docs/html/resources/tutorials/notepad/notepad-ex3.jd
index 8737280..2da113f 100644
--- a/docs/html/resources/tutorials/notepad/notepad-ex3.jd
+++ b/docs/html/resources/tutorials/notepad/notepad-ex3.jd
@@ -36,7 +36,7 @@
<ol>
<li>Remove the code in <code>NoteEdit</code> that parses the title and body
- from the extras Bundle.
+ from the extras Bundle.
<p>Instead, we are going to use the <code>DBHelper</code> class
to access the notes from the database directly. All we need passed into the
NoteEdit Activity is a <code>mRowId</code> (but only if we are editing, if creating we pass
@@ -57,7 +57,7 @@
}</pre>
</li>
</ol>
-
+
<h2>Step 2</h2>
<p>Create a class field for a <code>NotesDbAdapter</code> at the top of the NoteEdit class:</p>
@@ -67,11 +67,11 @@
<pre>
mDbHelper = new NotesDbAdapter(this);<br>
mDbHelper.open();</pre>
-
+
<h2>Step 3</h2>
<p>In <code>NoteEdit</code>, we need to check the <var>savedInstanceState</var> for the
-<code>mRowId</code>, in case the note
+<code>mRowId</code>, in case the note
editing contains a saved state in the Bundle, which we should recover (this would happen
if our Activity lost focus and then restarted).</p>
<ol>
@@ -87,11 +87,11 @@
</pre>
with this:
<pre>
- mRowId = savedInstanceState != null ? savedInstanceState.getLong(NotesDbAdapter.KEY_ROWID)
- : null;
+ mRowId = (savedInstanceState == null) ? null :
+ (Long) savedInstanceState.getSerializable(NotesDbAdapter.KEY_ROWID);
if (mRowId == null) {
- Bundle extras = getIntent().getExtras();
- mRowId = extras != null ? extras.getLong(NotesDbAdapter.KEY_ROWID)
+ Bundle extras = getIntent().getExtras();
+ mRowId = extras != null ? extras.getLong(NotesDbAdapter.KEY_ROWID)
: null;
}
</pre>
@@ -100,10 +100,15 @@
Note the null check for <code>savedInstanceState</code>, and we still need to load up
<code>mRowId</code> from the <code>extras</code> Bundle if it is not
provided by the <code>savedInstanceState</code>. This is a ternary operator shorthand
- to safely either use the value or null if it is not present.
+ to safely either use the value or null if it is not present.
+ </li>
+ <li>
+ Note the use of <code>Bundle.getSerializable()</code> instead of
+ <code>Bundle.getLong()</code>. The latter encoding returns a <code>long</code> primitive and
+ so can not be used to represent the case when <code>mRowId</code> is <code>null</code>.
</li>
</ol>
-
+
<h2>Step 4</h2>
<p>Next, we need to populate the fields based on the <code>mRowId</code> if we
@@ -126,38 +131,38 @@
}</pre>
<p>We will take care of storing the updates or new notes in the database
ourselves, using the life-cycle methods.</p>
-
+
<p>The whole <code>onCreate()</code> method should now look like this:</p>
<pre>
super.onCreate(savedInstanceState);
-
+
mDbHelper = new NotesDbAdapter(this);
mDbHelper.open();
-
+
setContentView(R.layout.note_edit);
-
+
mTitleText = (EditText) findViewById(R.id.title);
mBodyText = (EditText) findViewById(R.id.body);
-
+
Button confirmButton = (Button) findViewById(R.id.confirm);
-
-mRowId = savedInstanceState != null ? savedInstanceState.getLong(NotesDbAdapter.KEY_ROWID)
- : null;
+
+mRowId = (savedInstanceState == null) ? null :
+ (Long) savedInstanceState.getSerializable(NotesDbAdapter.KEY_ROWID);
if (mRowId == null) {
Bundle extras = getIntent().getExtras();
- mRowId = extras != null ? extras.getLong(NotesDbAdapter.KEY_ROWID)
+ mRowId = extras != null ? extras.getLong(NotesDbAdapter.KEY_ROWID)
: null;
}
-
+
populateFields();
-
+
confirmButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
setResult(RESULT_OK);
finish();
}
-
+
});</pre>
<h2>Step 6</h2>
@@ -180,7 +185,7 @@
and re-create resources as dictated by the Activity life-cycle, so we don't need to worry about
doing that ourselves. After that, we just look up the title and body values from the Cursor
and populate the View elements with them.</p>
-
+
<h2>Step 7</h2>
@@ -189,12 +194,12 @@
margin-top:1em;padding:0em;width:240px;">
<h2 style="border:0;font-size:12px;padding:.5em .5em .5em 1em;margin:0;
background-color:#FFFFDD;">Why handling life-cycle events is important</h2>
- <p style="padding-left:.5em;font-size:12px;margin:0;
+ <p style="padding-left:.5em;font-size:12px;margin:0;
padding:.0em .5em .5em 1em;">If you are used to always having control in your applications, you
might not understand why all this life-cycle work is necessary. The reason
- is that in Android, you are not in control of your Activity, the
+ is that in Android, you are not in control of your Activity, the
operating system is!</p>
- <p style="padding-left:.5em;font-size:12px;margin:0;
+ <p style="padding-left:.5em;font-size:12px;margin:0;
padding:.0em .5em .5em 1em;">As we have already seen, the Android model is based around activities
calling each other. When one Activity calls another, the current Activity
is paused at the very least, and may be killed altogether if the
@@ -209,9 +214,9 @@
out while the call Activity takes over.</p>
</div>
-<p>Still in the <code>NoteEdit</code> class, we now override the methods
- <code>onSaveInstanceState()</code>, <code>onPause()</code> and
- <code>onResume()</code>. These are our life-cycle methods
+<p>Still in the <code>NoteEdit</code> class, we now override the methods
+ <code>onSaveInstanceState()</code>, <code>onPause()</code> and
+ <code>onResume()</code>. These are our life-cycle methods
(along with <code>onCreate()</code> which we already have).</p>
<p><code>onSaveInstanceState()</code> is called by Android if the
@@ -241,8 +246,10 @@
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
- outState.putLong(NotesDbAdapter.KEY_ROWID, mRowId);
+ saveState();
+ outState.putSerializable(NotesDbAdapter.KEY_ROWID, mRowId);
}</pre>
+ <p>We'll define <code>saveState()</code> next.</p>
</li>
<li><code>
onPause()</code>:
@@ -252,7 +259,6 @@
super.onPause();
saveState();
}</pre>
- <p>We'll define <code>saveState()</code> next.</p>
</li>
<li><code>
onResume()</code>:
@@ -264,6 +270,10 @@
}</pre>
</li>
</ol>
+<p>Note that <code>saveState()</code> must be called in both <code>onSaveInstanceState()</code>
+and <code>onPause()</code> to ensure that the data is saved. This is because there is no
+guarantee that <code>onSaveInstanceState()</code> will be called and because when it <em>is</em>
+called, it is called before <code>onPause()</code>.</p>
<h2 style="clear:right;">Step 8</h2>
@@ -301,19 +311,18 @@
necessary. The resulting method should look like this:</p>
<pre>
@Override
-protected void onActivityResult(int requestCode, int resultCode,
- Intent intent) {
+protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
fillData();
}</pre>
<p>Because the other class now does the work, all this has to do is refresh
the data.</p>
-
+
<h2>Step 10</h2>
<p>Also remove the lines which set the title and body from the
- <code>onListItemClick()</code> method (again they are no longer needed,
+ <code>onListItemClick()</code> method (again they are no longer needed,
only the <code>mRowId</code> is):</p>
<pre>
Cursor c = mNotesCursor;
@@ -344,13 +353,13 @@
other occurrences of <code>mNotesCursor</code> in your <code>fillData()</code> method.
</ol>
<p>
-Run it! (use <em>Run As -> Android Application</em> on the project right
+Run it! (use <em>Run As -> Android Application</em> on the project right
click menu again)</p>
<h2>Solution and Next Steps</h2>
<p>You can see the solution to this exercise in <code>Notepadv3Solution</code>
-from
+from
the zip file to compare with your own.</p>
<p>
When you are ready, move on to the <a href="notepad-extra-credit.html">Tutorial
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 209a67b..25d0a82 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -68,7 +68,8 @@
the latest documentation package. The documentation covers all versions of the
API and lets you filter out those versions that your application won't support.
Once installed, the documentation is also available to you directly from the
-Eclipse IDE. </p>
+Eclipse IDE. When you are online, you can always access the latest documentation
+at the Android Developers site.</p>
<p><strong>5. Download other SDK components</strong></p>
diff --git a/graphics/java/android/graphics/BitmapFactory.java b/graphics/java/android/graphics/BitmapFactory.java
index f60a7be..3c03eed 100644
--- a/graphics/java/android/graphics/BitmapFactory.java
+++ b/graphics/java/android/graphics/BitmapFactory.java
@@ -532,7 +532,7 @@
public static Bitmap decodeFileDescriptor(FileDescriptor fd, Rect outPadding, Options opts) {
try {
if (MemoryFile.isMemoryFile(fd)) {
- int mappedlength = MemoryFile.getMappedSize(fd);
+ int mappedlength = MemoryFile.getSize(fd);
MemoryFile file = new MemoryFile(fd, mappedlength, "r");
InputStream is = file.getInputStream();
Bitmap bm = decodeStream(is, outPadding, opts);
diff --git a/graphics/java/android/graphics/drawable/NinePatchDrawable.java b/graphics/java/android/graphics/drawable/NinePatchDrawable.java
index 67a8015..bad94fb 100644
--- a/graphics/java/android/graphics/drawable/NinePatchDrawable.java
+++ b/graphics/java/android/graphics/drawable/NinePatchDrawable.java
@@ -81,7 +81,7 @@
*/
@Deprecated
public NinePatchDrawable(NinePatch patch) {
- this(new NinePatchState(patch, null), null);
+ this(new NinePatchState(patch, new Rect()), null);
}
/**
@@ -89,7 +89,7 @@
* based on the display metrics of the resources.
*/
public NinePatchDrawable(Resources res, NinePatch patch) {
- this(new NinePatchState(patch, null), res);
+ this(new NinePatchState(patch, new Rect()), res);
mNinePatchState.mTargetDensity = mTargetDensity;
}
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java
index 880e459..7d100eb 100644
--- a/graphics/java/android/renderscript/Allocation.java
+++ b/graphics/java/android/renderscript/Allocation.java
@@ -39,6 +39,10 @@
mType = t;
}
+ public Type getType() {
+ return mType;
+ }
+
public void uploadToTexture(int baseMipLevel) {
mRS.validate();
mRS.validateSurface();
@@ -266,7 +270,7 @@
return new Allocation(id, rs, null);
}
- static public Allocation createFromBitmapBoxed(RenderScript rs, Bitmap b, Element dstFmt, boolean genMips)
+ static Allocation createFromBitmapBoxed(RenderScript rs, Bitmap b, Element dstFmt, boolean genMips)
throws IllegalArgumentException {
rs.validate();
diff --git a/graphics/java/android/renderscript/Element.java b/graphics/java/android/renderscript/Element.java
index 1324179..10ef05a 100644
--- a/graphics/java/android/renderscript/Element.java
+++ b/graphics/java/android/renderscript/Element.java
@@ -298,7 +298,8 @@
dk == DataKind.POSITION ||
dk == DataKind.TEXTURE ||
dk == DataKind.NORMAL ||
- dk == DataKind.POINT_SIZE)) {
+ dk == DataKind.POINT_SIZE ||
+ dk == DataKind.USER)) {
throw new IllegalArgumentException("Unsupported DataKind");
}
diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java
index 9d70cb2..1614ec5 100644
--- a/graphics/java/android/renderscript/Program.java
+++ b/graphics/java/android/renderscript/Program.java
@@ -111,12 +111,13 @@
mOutputs[mOutputCount++] = e;
}
- public void addConstant(Type t) throws IllegalStateException {
+ public int addConstant(Type t) throws IllegalStateException {
// Should check for consistant and non-conflicting names...
if(mConstantCount >= MAX_CONSTANT) {
throw new IllegalArgumentException("Max input count exceeded.");
}
- mConstants[mConstantCount++] = t;
+ mConstants[mConstantCount] = t;
+ return mConstantCount++;
}
public void setTextureCount(int count) throws IllegalArgumentException {
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index cc97a8f..b558de0 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -76,8 +76,6 @@
native void nContextBindProgramFragment(int pf);
native void nContextBindProgramVertex(int pf);
native void nContextBindProgramRaster(int pr);
- native void nContextAddDefineI32(String name, int value);
- native void nContextAddDefineF(String name, float value);
native void nContextPause();
native void nContextResume();
native int nContextGetMessage(int[] data, boolean wait);
diff --git a/graphics/java/android/renderscript/Type.java b/graphics/java/android/renderscript/Type.java
index 8e59a31..62d3867 100644
--- a/graphics/java/android/renderscript/Type.java
+++ b/graphics/java/android/renderscript/Type.java
@@ -34,6 +34,9 @@
private int mNativeCache;
Class mJavaClass;
+ public Element getElement() {
+ return mElement;
+ }
public int getX() {
return mDimX;
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index f4e752f..7ded133 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -1212,26 +1212,6 @@
rsContextBindProgramRaster(con, (RsProgramRaster)pf);
}
-static void
-nContextAddDefineI32(JNIEnv *_env, jobject _this, jstring name, jint value)
-{
- RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- const char* n = _env->GetStringUTFChars(name, NULL);
- LOG_API("nScriptCAddDefineI32, con(%p) name(%s) value(%d)", con, n, value);
- rsContextSetDefineI32(con, n, value);
- _env->ReleaseStringUTFChars(name, n);
-}
-
-static void
-nContextAddDefineF(JNIEnv *_env, jobject _this, jstring name, jfloat value)
-{
- RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- const char* n = _env->GetStringUTFChars(name, NULL);
- LOG_API("nScriptCAddDefineF, con(%p) name(%s) value(%f)", con, n, value);
- rsContextSetDefineF(con, n, value);
- _env->ReleaseStringUTFChars(name, n);
-}
-
// ---------------------------------------------------------------------------
diff --git a/include/media/stagefright/DataSource.h b/include/media/stagefright/DataSource.h
index b843cd9..f88666a 100644
--- a/include/media/stagefright/DataSource.h
+++ b/include/media/stagefright/DataSource.h
@@ -31,6 +31,8 @@
class DataSource : public RefBase {
public:
+ static sp<DataSource> CreateFromURI(const char *uri);
+
DataSource() {}
virtual status_t initCheck() const = 0;
diff --git a/include/media/stagefright/MediaExtractor.h b/include/media/stagefright/MediaExtractor.h
index d56d4b3..4bc996e 100644
--- a/include/media/stagefright/MediaExtractor.h
+++ b/include/media/stagefright/MediaExtractor.h
@@ -43,6 +43,10 @@
virtual sp<MetaData> getTrackMetaData(
size_t index, uint32_t flags = 0) = 0;
+ // Return container specific meta-data. The default implementation
+ // returns an empty metadata object.
+ virtual sp<MetaData> getMetaData();
+
protected:
MediaExtractor() {}
virtual ~MediaExtractor() {}
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h
index c6ac6c2..2bc2734 100644
--- a/include/media/stagefright/MetaData.h
+++ b/include/media/stagefright/MetaData.h
@@ -48,6 +48,18 @@
kKeyBufferID = 'bfID',
kKeyMaxInputSize = 'inpS',
kKeyThumbnailTime = 'thbT', // int64_t (usecs)
+
+ kKeyAlbum = 'albu', // cstring
+ kKeyArtist = 'arti', // cstring
+ kKeyComposer = 'comp', // cstring
+ kKeyGenre = 'genr', // cstring
+ kKeyTitle = 'titl', // cstring
+ kKeyYear = 'year', // cstring
+ kKeyAlbumArt = 'albA', // compressed image data
+ kKeyAlbumArtMIME = 'alAM', // cstring
+ kKeyAuthor = 'auth', // cstring
+ kKeyCDTrackNumber = 'cdtr', // cstring
+ kKeyDate = 'date', // cstring
};
enum {
diff --git a/media/libmedia/StagefrightMediaScanner.h b/include/media/stagefright/StagefrightMediaScanner.h
similarity index 93%
rename from media/libmedia/StagefrightMediaScanner.h
rename to include/media/stagefright/StagefrightMediaScanner.h
index 108acb4..af125dc 100644
--- a/media/libmedia/StagefrightMediaScanner.h
+++ b/include/media/stagefright/StagefrightMediaScanner.h
@@ -22,6 +22,8 @@
namespace android {
+struct StagefrightMetadataRetriever;
+
struct StagefrightMediaScanner : public MediaScanner {
StagefrightMediaScanner();
virtual ~StagefrightMediaScanner();
@@ -33,6 +35,8 @@
virtual char *extractAlbumArt(int fd);
private:
+ sp<StagefrightMetadataRetriever> mRetriever;
+
StagefrightMediaScanner(const StagefrightMediaScanner &);
StagefrightMediaScanner &operator=(const StagefrightMediaScanner &);
};
diff --git a/keystore/java/android/security/SystemKeyStore.java b/keystore/java/android/security/SystemKeyStore.java
new file mode 100644
index 0000000..452125a4
--- /dev/null
+++ b/keystore/java/android/security/SystemKeyStore.java
@@ -0,0 +1,113 @@
+/*
+ * 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.
+ */
+
+package android.security;
+
+import android.os.Environment;
+import android.os.Process;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+
+import javax.crypto.KeyGenerator;
+import javax.crypto.SecretKey;
+
+/**
+ *@hide
+ */
+public class SystemKeyStore {
+
+ private static final String SYSTEM_KEYSTORE_DIRECTORY = "misc/systemkeys";
+ private static SystemKeyStore mInstance = new SystemKeyStore();
+
+ private SystemKeyStore() { }
+
+ public static SystemKeyStore getInstance() {
+ return mInstance;
+ }
+
+ public byte[] generateNewKey(int numBits, String algName, String keyName)
+ throws NoSuchAlgorithmException {
+
+ // Check if key with similar name exists. If so, return null.
+ File keyFile = getKeyFile(keyName);
+ if (keyFile.exists()) {
+ throw new IllegalArgumentException();
+ }
+
+ KeyGenerator skg = KeyGenerator.getInstance(algName);
+ SecureRandom srng = SecureRandom.getInstance("SHA1PRNG");
+ skg.init(numBits, srng);
+
+ SecretKey sk = skg.generateKey();
+ byte[] retKey = sk.getEncoded();
+
+ try {
+ // Store the key
+ if (!keyFile.createNewFile()) {
+ throw new IllegalArgumentException();
+ }
+
+ FileOutputStream fos = new FileOutputStream(keyFile);
+ fos.write(retKey);
+ fos.flush();
+ fos.close();
+ } catch (IOException ioe) {
+ return null;
+ }
+ return retKey;
+ }
+
+ private File getKeyFile(String keyName) {
+ File sysKeystoreDir = new File(Environment.getDataDirectory(),
+ SYSTEM_KEYSTORE_DIRECTORY);
+ File keyFile = new File(sysKeystoreDir, keyName);
+ return keyFile;
+ }
+
+ public byte[] retrieveKey(String keyName) {
+
+ File keyFile = getKeyFile(keyName);
+ if (!keyFile.exists()) {
+ return null;
+ }
+
+ try {
+ FileInputStream fis = new FileInputStream(keyFile);
+ int keyLen = fis.available();
+ byte[] retKey = new byte[keyLen];
+ fis.read(retKey);
+ fis.close();
+ return retKey;
+ } catch (IOException ioe) { }
+ throw new IllegalArgumentException();
+ }
+
+ public void deleteKey(String keyName) {
+
+ // Get the file first.
+ File keyFile = getKeyFile(keyName);
+ if (!keyFile.exists()) {
+ throw new IllegalArgumentException();
+ }
+
+ keyFile.delete();
+ }
+}
diff --git a/keystore/tests/src/android/security/KeyStoreTestRunner.java b/keystore/tests/src/android/security/KeyStoreTestRunner.java
index c85922d..c56eeb9 100644
--- a/keystore/tests/src/android/security/KeyStoreTestRunner.java
+++ b/keystore/tests/src/android/security/KeyStoreTestRunner.java
@@ -37,6 +37,7 @@
public TestSuite getAllTests() {
TestSuite suite = new InstrumentationTestSuite(this);
suite.addTestSuite(android.security.tests.KeyStoreTest.class);
+ suite.addTestSuite(android.security.tests.SystemKeyStoreTest.class);
return suite;
}
diff --git a/keystore/tests/src/android/security/SystemKeyStoreTest.java b/keystore/tests/src/android/security/SystemKeyStoreTest.java
new file mode 100644
index 0000000..a85f889
--- /dev/null
+++ b/keystore/tests/src/android/security/SystemKeyStoreTest.java
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+
+package android.security.tests;
+
+import android.app.Activity;
+import android.security.SystemKeyStore;
+import android.test.ActivityUnitTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
+
+/**
+ * Junit / Instrumentation test case for KeyStore class
+ *
+ * Running the test suite:
+ *
+ * adb shell am instrument -w android.security.tests/.KeyStoreTestRunner
+ */
+@MediumTest
+public class SystemKeyStoreTest extends ActivityUnitTestCase<Activity> {
+
+ private static final String keyName = "TestKey";
+ private SystemKeyStore mSysKeyStore = null;
+
+ public SystemKeyStoreTest() {
+ super(Activity.class);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ mSysKeyStore = SystemKeyStore.getInstance();
+ try {
+ mSysKeyStore.deleteKey(keyName);
+ } catch (Exception e) { }
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ try {
+ mSysKeyStore.deleteKey(keyName);
+ } catch (Exception e) { }
+ super.tearDown();
+ }
+
+ public void testBasicAccess() throws Exception {
+ try {
+ byte[] newKey = mSysKeyStore.generateNewKey(128, "AES", keyName);
+ assertNotNull(newKey);
+ byte[] recKey = mSysKeyStore.retrieveKey(keyName);
+ assertEquals(newKey.length, recKey.length);
+ for (int i = 0; i < newKey.length; i++) {
+ assertEquals(newKey[i], recKey[i]);
+ }
+ mSysKeyStore.deleteKey(keyName);
+ byte[] nullKey = mSysKeyStore.retrieveKey(keyName);
+ assertNull(nullKey);
+ } catch (Exception e) {
+ fail();
+ }
+ }
+}
diff --git a/libs/rs/RenderScript.h b/libs/rs/RenderScript.h
index bb2c06a..6662333 100644
--- a/libs/rs/RenderScript.h
+++ b/libs/rs/RenderScript.h
@@ -64,6 +64,7 @@
void rsContextDeinitToClient(RsContext);
#define RS_MAX_TEXTURE 2
+#define RS_MAX_ATTRIBS 16
enum RsDataType {
RS_TYPE_NONE,
diff --git a/libs/rs/java/Film/Android.mk b/libs/rs/java/Film/Android.mk
index b7f98fc..9e6ed7e 100644
--- a/libs/rs/java/Film/Android.mk
+++ b/libs/rs/java/Film/Android.mk
@@ -17,6 +17,8 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional
+
LOCAL_SRC_FILES := $(call all-java-files-under, src)
#LOCAL_STATIC_JAVA_LIBRARIES := android.renderscript
diff --git a/libs/rs/java/Film/src/com/android/film/FilmRS.java b/libs/rs/java/Film/src/com/android/film/FilmRS.java
index fcf487c..b80e619 100644
--- a/libs/rs/java/Film/src/com/android/film/FilmRS.java
+++ b/libs/rs/java/Film/src/com/android/film/FilmRS.java
@@ -156,9 +156,7 @@
mBufferIDs.length);
Element ie = Element.createPixel(mRS, Element.DataType.UNSIGNED_5_6_5, Element.DataKind.PIXEL_RGB);
- android.util.Log.e("rs", "load 1");
mImages[0] = Allocation.createFromBitmapResourceBoxed(mRS, mRes, R.drawable.p01, ie, true);
- android.util.Log.e("rs", "load 2");
mImages[1] = Allocation.createFromBitmapResourceBoxed(mRS, mRes, R.drawable.p02, ie, true);
mImages[2] = Allocation.createFromBitmapResourceBoxed(mRS, mRes, R.drawable.p03, ie, true);
mImages[3] = Allocation.createFromBitmapResourceBoxed(mRS, mRes, R.drawable.p04, ie, true);
diff --git a/libs/rs/java/Fountain/Android.mk b/libs/rs/java/Fountain/Android.mk
index b6a9f10..f7e53a8 100644
--- a/libs/rs/java/Fountain/Android.mk
+++ b/libs/rs/java/Fountain/Android.mk
@@ -17,6 +17,8 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional
+
LOCAL_SRC_FILES := $(call all-java-files-under, src)
#LOCAL_STATIC_JAVA_LIBRARIES := android.renderscript
diff --git a/libs/rs/java/ImageProcessing/Android.mk b/libs/rs/java/ImageProcessing/Android.mk
index 5a844d5..833427b 100644
--- a/libs/rs/java/ImageProcessing/Android.mk
+++ b/libs/rs/java/ImageProcessing/Android.mk
@@ -17,6 +17,8 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_MODULE_TAGS := optional
+
LOCAL_SRC_FILES := $(call all-java-files-under, src)
#LOCAL_STATIC_JAVA_LIBRARIES := android.renderscript
diff --git a/libs/rs/java/ImageProcessing/res/layout/main.xml b/libs/rs/java/ImageProcessing/res/layout/main.xml
index 0872cf2a..6770c18 100644
--- a/libs/rs/java/ImageProcessing/res/layout/main.xml
+++ b/libs/rs/java/ImageProcessing/res/layout/main.xml
@@ -31,7 +31,7 @@
android:layout_marginBottom="10dip"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" />
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec
index d12431f..ac115d3 100644
--- a/libs/rs/rs.spec
+++ b/libs/rs/rs.spec
@@ -20,16 +20,6 @@
param RsProgramRaster pgm
}
-ContextSetDefineF {
- param const char* name
- param float value
- }
-
-ContextSetDefineI32 {
- param const char* name
- param int32_t value
- }
-
ContextPause {
}
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 19699dc..b4ec1a2 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -463,8 +463,9 @@
{
const Element *src = static_cast<const Element *>(_src);
const Element *dst = static_cast<const Element *>(_dst);
- rsAssert(!(w & (w-1)));
- rsAssert(!(h & (h-1)));
+
+ // Check for pow2 on pre es 2.0 versions.
+ rsAssert(rsc->checkVersion2_0() || (!(w & (w-1)) && !(h & (h-1))));
//LOGE("rsi_AllocationCreateFromBitmap %i %i %i %i %i", w, h, dstFmt, srcFmt, genMips);
rsi_TypeBegin(rsc, _dst);
diff --git a/libs/rs/rsComponent.cpp b/libs/rs/rsComponent.cpp
index 0574343..15a56f7 100644
--- a/libs/rs/rsComponent.cpp
+++ b/libs/rs/rsComponent.cpp
@@ -264,6 +264,27 @@
return s;
}
+String8 Component::getGLSLType() const
+{
+ if (mType == RS_TYPE_SIGNED_32) {
+ switch(mVectorSize) {
+ case 1: return String8("int");
+ case 2: return String8("ivec2");
+ case 3: return String8("ivec3");
+ case 4: return String8("ivec4");
+ }
+ }
+ if (mType == RS_TYPE_FLOAT_32) {
+ switch(mVectorSize) {
+ case 1: return String8("float");
+ case 2: return String8("vec2");
+ case 3: return String8("vec3");
+ case 4: return String8("vec4");
+ }
+ }
+ return String8();
+}
+
static const char * gTypeStrings[] = {
"NONE",
"F16",
diff --git a/libs/rs/rsComponent.h b/libs/rs/rsComponent.h
index c122c8e..71de324 100644
--- a/libs/rs/rsComponent.h
+++ b/libs/rs/rsComponent.h
@@ -36,6 +36,7 @@
uint32_t getGLType() const;
uint32_t getGLFormat() const;
String8 getCType() const;
+ String8 getGLSLType() const;
void dumpLOGV(const char *prefix) const;
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 11f26b9..261b827 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -274,8 +274,8 @@
rsc->props.mLogTimes = getProp("debug.rs.profile");
rsc->props.mLogScripts = getProp("debug.rs.script");
- rsc->props.mLogObjects = getProp("debug.rs.objects");
- rsc->props.mLogShaders = getProp("debug.rs.shaders");
+ rsc->props.mLogObjects = getProp("debug.rs.object");
+ rsc->props.mLogShaders = getProp("debug.rs.shader");
ScriptTLSStruct *tlsStruct = new ScriptTLSStruct;
if (!tlsStruct) {
@@ -632,26 +632,6 @@
}
}
-void Context::appendVarDefines(String8 *str) const
-{
- char buf[256];
- for (size_t ct=0; ct < mInt32Defines.size(); ct++) {
- str->append("#define ");
- str->append(mInt32Defines.keyAt(ct));
- str->append(" ");
- sprintf(buf, "%i\n", (int)mInt32Defines.valueAt(ct));
- str->append(buf);
-
- }
- for (size_t ct=0; ct < mFloatDefines.size(); ct++) {
- str->append("#define ");
- str->append(mFloatDefines.keyAt(ct));
- str->append(" ");
- sprintf(buf, "%ff\n", mFloatDefines.valueAt(ct));
- str->append(buf);
- }
-}
-
bool Context::objDestroyOOBInit()
{
int status = pthread_mutex_init(&mObjDestroy.mMutex, NULL);
@@ -851,16 +831,6 @@
ob->decUserRef();
}
-void rsi_ContextSetDefineF(Context *rsc, const char* name, float value)
-{
- rsc->addInt32Define(name, value);
-}
-
-void rsi_ContextSetDefineI32(Context *rsc, const char* name, int32_t value)
-{
- rsc->addFloatDefine(name, value);
-}
-
void rsi_ContextPause(Context *rsc)
{
rsc->pause();
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index aa7436d..2edd16d 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -105,7 +105,6 @@
void removeName(ObjectBase *obj);
ObjectBase * lookupName(const char *name) const;
void appendNameDefines(String8 *str) const;
- void appendVarDefines(String8 *str) const;
uint32_t getMessageToClient(void *data, size_t *receiveLen, size_t bufferLen, bool wait);
bool sendMessageToClient(void *data, uint32_t cmdID, size_t len, bool waitForSpace);
@@ -127,14 +126,6 @@
return mStateRaster.mDefault.get();
}
- void addInt32Define(const char* name, int32_t value) {
- mInt32Defines.add(String8(name), value);
- }
-
- void addFloatDefine(const char* name, float value) {
- mFloatDefines.add(String8(name), value);
- }
-
uint32_t getWidth() const {return mEGL.mWidth;}
uint32_t getHeight() const {return mEGL.mHeight;}
@@ -249,8 +240,6 @@
Surface *mWndSurface;
Vector<ObjectBase *> mNames;
- KeyedVector<String8,int> mInt32Defines;
- KeyedVector<String8,float> mFloatDefines;
uint64_t mTimers[_RS_TIMER_TOTAL];
Timers mTimerActive;
diff --git a/libs/rs/rsElement.cpp b/libs/rs/rsElement.cpp
index 9944c0e..207ad15 100644
--- a/libs/rs/rsElement.cpp
+++ b/libs/rs/rsElement.cpp
@@ -43,17 +43,6 @@
mFields = NULL;
mFieldCount = 0;
}
-/*
-void Element::setComponent(uint32_t idx, Component *c)
-{
- rsAssert(!mComponents[idx].get());
- rsAssert(idx < mComponentCount);
- mComponents[idx].set(c);
-
-// Fixme: This should probably not be here
- c->incUserRef();
-}
-*/
size_t Element::getSizeBits() const
{
@@ -152,6 +141,24 @@
return s;
}
+String8 Element::getGLSLType(uint32_t indent) const
+{
+ String8 s;
+ for (uint32_t ct=0; ct < indent; ct++) {
+ s.append(" ");
+ }
+
+ if (!mFieldCount) {
+ // Basic component.
+ s.append(mComponent.getGLSLType());
+ } else {
+ rsAssert(0);
+ //s.append("struct ");
+ //s.append(getCStructBody(indent));
+ }
+
+ return s;
+}
@@ -194,58 +201,6 @@
return e;
}
-/*
-void rsi_ElementAdd(Context *rsc, RsDataKind dk, RsDataType dt, bool isNormalized, size_t bits, const char *name)
-{
- ElementState * sec = &rsc->mStateElement;
-
- rsAssert(bits > 0);
-
- Element *c = Element::create(rsc, dk, dt, isNormalized, bits);
- sec->mBuildList.add(c);
- if (name)
- sec->mNames.add(String8(name));
- else
- sec->mNames.add(String8(""));
-}
-
-RsElement rsi_ElementCreate(Context *rsc)
-{
- ElementState * sec = &rsc->mStateElement;
-
- size_t count = sec->mBuildList.size();
- rsAssert(count > 0);
-
- if (count == 1) {
- Element *se = sec->mBuildList[0];
- se->incUserRef();
- sec->mBuildList.clear();
- sec->mNames.clear();
- return se;
- }
-
- Element ** tmpElements = (Element **)calloc(count, sizeof(Element *));
- const char ** tmpNames = (const char **)calloc(count, sizeof(char *));
- size_t * tmpLengths = (size_t *)calloc(count, sizeof(size_t));
-
-
- for (size_t ct = 0; ct < count; ct++) {
- tmpElements[ct] = sec->mBuildList[ct];
- tmpNames[ct] = sec->mNames[ct].string();
- tmpLengths[ct] = sec->mNames[ct].length();
- }
- Element *se = Element::create(rsc, tmpElements, tmpNames, tmpLengths, count);
-
- sec->mBuildList.clear();
- sec->mNames.clear();
- se->incUserRef();
- free(tmpElements);
- free(tmpNames);
- free(tmpLengths);
- return se;
-}
-*/
-
}
}
diff --git a/libs/rs/rsElement.h b/libs/rs/rsElement.h
index c46922c..777e8ee 100644
--- a/libs/rs/rsElement.h
+++ b/libs/rs/rsElement.h
@@ -32,13 +32,9 @@
public:
~Element();
-
- //void setComponent(uint32_t idx, Component *c);
-
uint32_t getGLType() const;
uint32_t getGLFormat() const;
-
size_t getSizeBits() const;
size_t getSizeBytes() const {
return (getSizeBits() + 7) >> 3;
@@ -55,13 +51,12 @@
const Component & getComponent() const {return mComponent;}
RsDataType getType() const {return mComponent.getType();}
- //bool getIsNormalized() const {return mIsNormalized;}
RsDataKind getKind() const {return mComponent.getKind();}
uint32_t getBits() const {return mBits;}
- //uint32_t getGLType() const;
String8 getCType(uint32_t indent=0) const;
String8 getCStructBody(uint32_t indent=0) const;
+ String8 getGLSLType(uint32_t indent=0) const;
void dumpLOGV(const char *prefix) const;
@@ -94,8 +89,6 @@
ElementState();
~ElementState();
- Vector<Element *> mBuildList;
- Vector<String8> mNames;
};
diff --git a/libs/rs/rsProgram.cpp b/libs/rs/rsProgram.cpp
index ede8c86..b528c46 100644
--- a/libs/rs/rsProgram.cpp
+++ b/libs/rs/rsProgram.cpp
@@ -95,7 +95,9 @@
Program::~Program()
{
- bindAllocation(NULL);
+ for (uint32_t ct=0; ct < MAX_UNIFORMS; ct++) {
+ bindAllocation(NULL, ct);
+ }
delete[] mInputElements;
delete[] mOutputElements;
@@ -106,15 +108,16 @@
}
-void Program::bindAllocation(Allocation *alloc)
+void Program::bindAllocation(Allocation *alloc, uint32_t slot)
{
- if (mConstants.get() == alloc) {
+ LOGE("bind alloc %p %i", alloc, slot);
+ if (mConstants[slot].get() == alloc) {
return;
}
- if (mConstants.get()) {
- mConstants.get()->removeProgramToDirty(this);
+ if (mConstants[slot].get()) {
+ mConstants[slot].get()->removeProgramToDirty(this);
}
- mConstants.set(alloc);
+ mConstants[slot].set(alloc);
if (alloc) {
alloc->addProgramToDirty(this);
}
@@ -144,6 +147,42 @@
mDirty = true;
}
+String8 Program::getGLSLInputString() const
+{
+ String8 s;
+ for (uint32_t ct=0; ct < mInputCount; ct++) {
+ const Element *e = mInputElements[ct].get();
+ for (uint32_t field=0; field < e->getFieldCount(); field++) {
+ const Element *f = e->getField(field);
+
+ // Cannot be complex
+ rsAssert(!f->getFieldCount());
+ switch(f->getComponent().getVectorSize()) {
+ case 1: s.append("attribute float ATTRIB_"); break;
+ case 2: s.append("attribute vec2 ATTRIB_"); break;
+ case 3: s.append("attribute vec3 ATTRIB_"); break;
+ case 4: s.append("attribute vec4 ATTRIB_"); break;
+ default:
+ rsAssert(0);
+ }
+
+ s.append(e->getFieldName(field));
+ s.append(";\n");
+ }
+ }
+ return s;
+}
+
+String8 Program::getGLSLOutputString() const
+{
+ return String8();
+}
+
+String8 Program::getGLSLConstantString() const
+{
+ return String8();
+}
+
void Program::createShader()
{
@@ -203,7 +242,7 @@
void rsi_ProgramBindConstants(Context *rsc, RsProgram vp, uint32_t slot, RsAllocation constants)
{
Program *p = static_cast<Program *>(vp);
- p->bindAllocation(static_cast<Allocation *>(constants));
+ p->bindAllocation(static_cast<Allocation *>(constants), slot);
}
void rsi_ProgramBindTexture(Context *rsc, RsProgram vpf, uint32_t slot, RsAllocation a)
diff --git a/libs/rs/rsProgram.h b/libs/rs/rsProgram.h
index 25a5434..a34e89f 100644
--- a/libs/rs/rsProgram.h
+++ b/libs/rs/rsProgram.h
@@ -39,9 +39,11 @@
const uint32_t * params, uint32_t paramLength);
virtual ~Program();
- void bindAllocation(Allocation *);
+ void bindAllocation(Allocation *, uint32_t slot);
virtual void createShader();
+ bool isUserProgram() const {return mUserShader.size() > 0;}
+
void bindTexture(uint32_t slot, Allocation *);
void bindSampler(uint32_t slot, Sampler *);
@@ -53,6 +55,10 @@
const String8 & getAttribName(uint32_t i) const {return mAttribNames[i];}
const String8 & getUniformName(uint32_t i) const {return mUniformNames[i];}
+ String8 getGLSLInputString() const;
+ String8 getGLSLOutputString() const;
+ String8 getGLSLConstantString() const;
+
protected:
// Components not listed in "in" will be passed though
// unless overwritten by components in out.
@@ -63,7 +69,7 @@
uint32_t mOutputCount;
uint32_t mConstantCount;
- ObjectBaseRef<Allocation> mConstants;
+ ObjectBaseRef<Allocation> mConstants[MAX_UNIFORMS];
mutable bool mDirty;
String8 mShader;
diff --git a/libs/rs/rsProgramFragment.cpp b/libs/rs/rsProgramFragment.cpp
index f7394a6..00f19ae 100644
--- a/libs/rs/rsProgramFragment.cpp
+++ b/libs/rs/rsProgramFragment.cpp
@@ -136,6 +136,7 @@
}
glActiveTexture(GL_TEXTURE0);
mDirty = false;
+ rsc->checkError("ProgramFragment::setupGL");
}
void ProgramFragment::setupGL2(const Context *rsc, ProgramFragmentState *state, ShaderCache *sc)
@@ -170,8 +171,7 @@
glActiveTexture(GL_TEXTURE0);
mDirty = false;
-
- //LOGE("sgl2 frag2 %x", glGetError());
+ rsc->checkError("ProgramFragment::setupGL2");
}
void ProgramFragment::loadShader(Context *rsc) {
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp
index fe628ca..8849bda 100644
--- a/libs/rs/rsProgramVertex.cpp
+++ b/libs/rs/rsProgramVertex.cpp
@@ -56,10 +56,10 @@
static void logMatrix(const char *txt, const float *f)
{
LOGV("Matrix %s, %p", txt, f);
- LOGV("%6.2f, %6.2f, %6.2f, %6.2f", f[0], f[4], f[8], f[12]);
- LOGV("%6.2f, %6.2f, %6.2f, %6.2f", f[1], f[5], f[9], f[13]);
- LOGV("%6.2f, %6.2f, %6.2f, %6.2f", f[2], f[6], f[10], f[14]);
- LOGV("%6.2f, %6.2f, %6.2f, %6.2f", f[3], f[7], f[11], f[15]);
+ LOGV("%6.4f, %6.4f, %6.4f, %6.4f", f[0], f[4], f[8], f[12]);
+ LOGV("%6.4f, %6.4f, %6.4f, %6.4f", f[1], f[5], f[9], f[13]);
+ LOGV("%6.4f, %6.4f, %6.4f, %6.4f", f[2], f[6], f[10], f[14]);
+ LOGV("%6.4f, %6.4f, %6.4f, %6.4f", f[3], f[7], f[11], f[15]);
}
void ProgramVertex::setupGL(const Context *rsc, ProgramVertexState *state)
@@ -69,7 +69,7 @@
}
state->mLast.set(this);
- const float *f = static_cast<const float *>(mConstants->getPtr());
+ const float *f = static_cast<const float *>(mConstants[0]->getPtr());
glMatrixMode(GL_TEXTURE);
if (mTextureMatrixEnable) {
@@ -116,33 +116,80 @@
{
mShader.setTo("");
- for (uint32_t ct=0; ct < mAttribCount; ct++) {
- mShader.append("attribute vec4 ");
- mShader.append(mAttribNames[ct]);
- mShader.append(";\n");
- }
-
- for (uint32_t ct=0; ct < mUniformCount; ct++) {
- mShader.append("uniform mat4 ");
- mShader.append(mUniformNames[ct]);
- mShader.append(";\n");
- }
-
mShader.append("varying vec4 varColor;\n");
mShader.append("varying vec4 varTex0;\n");
if (mUserShader.length() > 1) {
+ mShader.append("uniform mat4 ");
+ mShader.append(mUniformNames[0]);
+ mShader.append(";\n");
+
+ LOGE("constant %i ", mConstantCount);
+ for (uint32_t ct=0; ct < mConstantCount; ct++) {
+ const Element *e = mConstantTypes[ct]->getElement();
+ for (uint32_t field=0; field < e->getFieldCount(); field++) {
+ const Element *f = e->getField(field);
+
+ // Cannot be complex
+ rsAssert(!f->getFieldCount());
+ switch(f->getComponent().getVectorSize()) {
+ case 1: mShader.append("uniform float UNI_"); break;
+ case 2: mShader.append("uniform vec2 UNI_"); break;
+ case 3: mShader.append("uniform vec3 UNI_"); break;
+ case 4: mShader.append("uniform vec4 UNI_"); break;
+ default:
+ rsAssert(0);
+ }
+
+ mShader.append(e->getFieldName(field));
+ mShader.append(";\n");
+ }
+ }
+
+
+ for (uint32_t ct=0; ct < mInputCount; ct++) {
+ const Element *e = mInputElements[ct].get();
+ for (uint32_t field=0; field < e->getFieldCount(); field++) {
+ const Element *f = e->getField(field);
+
+ // Cannot be complex
+ rsAssert(!f->getFieldCount());
+ switch(f->getComponent().getVectorSize()) {
+ case 1: mShader.append("attribute float ATTRIB_"); break;
+ case 2: mShader.append("attribute vec2 ATTRIB_"); break;
+ case 3: mShader.append("attribute vec3 ATTRIB_"); break;
+ case 4: mShader.append("attribute vec4 ATTRIB_"); break;
+ default:
+ rsAssert(0);
+ }
+
+ mShader.append(e->getFieldName(field));
+ mShader.append(";\n");
+ }
+ }
mShader.append(mUserShader);
} else {
- mShader.append("void main() {\n");
- mShader.append(" gl_Position = uni_MVP * attrib_Position;\n");
- mShader.append(" gl_PointSize = attrib_PointSize.x;\n");
+ for (uint32_t ct=0; ct < mUniformCount; ct++) {
+ mShader.append("uniform mat4 ");
+ mShader.append(mUniformNames[ct]);
+ mShader.append(";\n");
+ }
- mShader.append(" varColor = attrib_Color;\n");
+ for (uint32_t ct=VertexArray::POSITION; ct < mAttribCount; ct++) {
+ mShader.append("attribute vec4 ");
+ mShader.append(mAttribNames[ct]);
+ mShader.append(";\n");
+ }
+
+ mShader.append("void main() {\n");
+ mShader.append(" gl_Position = UNI_MVP * ATTRIB_Position;\n");
+ mShader.append(" gl_PointSize = ATTRIB_PointSize.x;\n");
+
+ mShader.append(" varColor = ATTRIB_Color;\n");
if (mTextureMatrixEnable) {
- mShader.append(" varTex0 = uni_TexMatrix * attrib_T0;\n");
+ mShader.append(" varTex0 = UNI_TexMatrix * ATTRIB_Texture;\n");
} else {
- mShader.append(" varTex0 = attrib_T0;\n");
+ mShader.append(" varTex0 = ATTRIB_Texture;\n");
}
//mShader.append(" pos.x = pos.x / 480.0;\n");
//mShader.append(" pos.y = pos.y / 800.0;\n");
@@ -160,7 +207,7 @@
glVertexAttrib4f(1, state->color[0], state->color[1], state->color[2], state->color[3]);
- const float *f = static_cast<const float *>(mConstants->getPtr());
+ const float *f = static_cast<const float *>(mConstants[0]->getPtr());
Matrix mvp;
mvp.load(&f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET]);
@@ -174,8 +221,56 @@
&f[RS_PROGRAM_VERTEX_TEXTURE_OFFSET]);
}
+ uint32_t uidx = 1;
+ for (uint32_t ct=0; ct < mConstantCount; ct++) {
+ Allocation *alloc = mConstants[ct+1].get();
+ if (!alloc) {
+ continue;
+ }
+
+ const uint8_t *data = static_cast<const uint8_t *>(alloc->getPtr());
+ const Element *e = mConstantTypes[ct]->getElement();
+ for (uint32_t field=0; field < e->getFieldCount(); field++) {
+ const Element *f = e->getField(field);
+ uint32_t offset = e->getFieldOffsetBytes(field);
+ int32_t slot = sc->vtxUniformSlot(uidx);
+
+ const float *fd = reinterpret_cast<const float *>(&data[offset]);
+
+ //LOGE("Uniform slot=%i, offset=%i, constant=%i, field=%i, uidx=%i", slot, offset, ct, field, uidx);
+ if (slot >= 0) {
+ switch(f->getComponent().getVectorSize()) {
+ case 1:
+ //LOGE("Uniform 1 = %f", fd[0]);
+ glUniform1fv(slot, 1, fd);
+ break;
+ case 2:
+ //LOGE("Uniform 2 = %f %f", fd[0], fd[1]);
+ glUniform2fv(slot, 1, fd);
+ break;
+ case 3:
+ //LOGE("Uniform 3 = %f %f %f", fd[0], fd[1], fd[2]);
+ glUniform3fv(slot, 1, fd);
+ break;
+ case 4:
+ //LOGE("Uniform 4 = %f %f %f %f", fd[0], fd[1], fd[2], fd[3]);
+ glUniform4fv(slot, 1, fd);
+ break;
+ default:
+ rsAssert(0);
+ }
+ }
+ uidx ++;
+ }
+ }
+
+ for (uint32_t ct=0; ct < mConstantCount; ct++) {
+ uint32_t glSlot = sc->vtxUniformSlot(ct + 1);
+
+ }
+
state->mLast.set(this);
- //LOGE("sgl2 vtx2 %x", glGetError());
+ rsc->checkError("ProgramVertex::setupGL2");
}
void ProgramVertex::addLight(const Light *l)
@@ -188,47 +283,75 @@
void ProgramVertex::setProjectionMatrix(const rsc_Matrix *m) const
{
- float *f = static_cast<float *>(mConstants->getPtr());
+ float *f = static_cast<float *>(mConstants[0]->getPtr());
memcpy(&f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET], m, sizeof(rsc_Matrix));
mDirty = true;
}
void ProgramVertex::setModelviewMatrix(const rsc_Matrix *m) const
{
- float *f = static_cast<float *>(mConstants->getPtr());
+ float *f = static_cast<float *>(mConstants[0]->getPtr());
memcpy(&f[RS_PROGRAM_VERTEX_MODELVIEW_OFFSET], m, sizeof(rsc_Matrix));
mDirty = true;
}
void ProgramVertex::setTextureMatrix(const rsc_Matrix *m) const
{
- float *f = static_cast<float *>(mConstants->getPtr());
+ float *f = static_cast<float *>(mConstants[0]->getPtr());
memcpy(&f[RS_PROGRAM_VERTEX_TEXTURE_OFFSET], m, sizeof(rsc_Matrix));
mDirty = true;
}
void ProgramVertex::transformToScreen(const Context *rsc, float *v4out, const float *v3in) const
{
- float *f = static_cast<float *>(mConstants->getPtr());
+ float *f = static_cast<float *>(mConstants[0]->getPtr());
Matrix mvp;
mvp.loadMultiply((Matrix *)&f[RS_PROGRAM_VERTEX_MODELVIEW_OFFSET],
(Matrix *)&f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET]);
mvp.vectorMultiply(v4out, v3in);
}
+void ProgramVertex::initAddUserElement(const Element *e, String8 *names, uint32_t *count, const char *prefix)
+{
+ rsAssert(e->getFieldCount());
+ for (uint32_t ct=0; ct < e->getFieldCount(); ct++) {
+ const Element *ce = e->getField(ct);
+ if (ce->getFieldCount()) {
+ initAddUserElement(ce, names, count, prefix);
+ } else {
+ String8 tmp(prefix);
+ tmp.append(e->getFieldName(ct));
+ names[*count].setTo(tmp.string());
+ (*count)++;
+ }
+ }
+}
+
void ProgramVertex::init(Context *rsc)
{
- mAttribCount = 6;
- mAttribNames[VertexArray::POSITION].setTo("attrib_Position");
- mAttribNames[VertexArray::COLOR].setTo("attrib_Color");
- mAttribNames[VertexArray::NORMAL].setTo("attrib_Normal");
- mAttribNames[VertexArray::POINT_SIZE].setTo("attrib_PointSize");
- mAttribNames[VertexArray::TEXTURE_0].setTo("attrib_T0");
- mAttribNames[VertexArray::TEXTURE_1].setTo("attrib_T1");
+ if (mUserShader.size() > 0) {
+ mAttribCount = 0;
+ for (uint32_t ct=0; ct < mInputCount; ct++) {
+ initAddUserElement(mInputElements[ct].get(), mAttribNames, &mAttribCount, "ATTRIB_");
+ }
- mUniformCount = 2;
- mUniformNames[0].setTo("uni_MVP");
- mUniformNames[1].setTo("uni_TexMatrix");
+ mUniformCount = 1;
+ mUniformNames[0].setTo("UNI_MVP");
+ for (uint32_t ct=0; ct < mInputCount; ct++) {
+ initAddUserElement(mConstantTypes[ct]->getElement(), mUniformNames, &mUniformCount, "UNI_");
+ }
+ } else {
+ mAttribCount = 5;
+ mAttribNames[0].setTo("ATTRIB_Position");
+ mAttribNames[1].setTo("ATTRIB_Color");
+ mAttribNames[2].setTo("ATTRIB_Normal");
+ mAttribNames[3].setTo("ATTRIB_PointSize");
+ mAttribNames[4].setTo("ATTRIB_Texture");
+
+ mUniformCount = 2;
+ mUniformNames[0].setTo("UNI_MVP");
+ mUniformNames[1].setTo("UNI_TexMatrix");
+ }
createShader();
}
@@ -257,7 +380,7 @@
mDefaultAlloc.set(alloc);
mDefault.set(pv);
pv->init(rsc);
- pv->bindAllocation(alloc);
+ pv->bindAllocation(alloc, 0);
color[0] = 1.f;
color[1] = 1.f;
diff --git a/libs/rs/rsProgramVertex.h b/libs/rs/rsProgramVertex.h
index 8c63d82..28554cc 100644
--- a/libs/rs/rsProgramVertex.h
+++ b/libs/rs/rsProgramVertex.h
@@ -59,6 +59,9 @@
// Hacks to create a program for now
bool mTextureMatrixEnable;
+
+private:
+ void initAddUserElement(const Element *e, String8 *names, uint32_t *count, const char *prefix);
};
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp
index 9db3127..b7e0b86 100644
--- a/libs/rs/rsScriptC.cpp
+++ b/libs/rs/rsScriptC.cpp
@@ -137,7 +137,6 @@
rsc->appendNameDefines(&tmp);
appendDecls(&tmp);
- rsc->appendVarDefines(&tmp);
appendVarDefines(rsc, &tmp);
appendTypes(rsc, &tmp);
tmp.append("#line 1\n");
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index 917f294..3ba9cee 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -738,9 +738,7 @@
VertexArray va;
va.setPosition(3, GL_FLOAT, 12, (uint32_t)&vtx);
- va.setTexture(2, GL_FLOAT, 8, (uint32_t)&tex, 0);
- //va.setTexture(2, GL_FLOAT, 8, (uint32_t)&tex, 1);
- //
+ va.setTexture(2, GL_FLOAT, 8, (uint32_t)&tex);
if (rsc->checkVersion2_0()) {
va.setupGL2(rsc, &rsc->mStateVertexArray, &rsc->mShaderCache);
} else {
@@ -975,6 +973,13 @@
rsi_AllocationUploadToBufferObject(rsc, va);
}
+static void SC_syncToGL(RsAllocation va)
+{
+ GET_TLS();
+ Allocation *a = static_cast<Allocation *>(va);
+
+}
+
static void SC_ClearColor(float r, float g, float b, float a)
{
//LOGE("c %f %f %f %f", r, g, b, a);
@@ -1323,6 +1328,9 @@
{ "uploadToBufferObject", (void *)&SC_uploadToBufferObject,
"void", "(int)" },
+ { "syncToGL", (void *)&SC_syncToGL,
+ "void", "(int)" },
+
{ "colorFloatRGBAtoUNorm8", (void *)&SC_colorFloatRGBAtoUNorm8,
"int", "(float, float, float, float)" },
{ "colorFloatRGBto565", (void *)&SC_colorFloatRGBAto565,
diff --git a/libs/rs/rsShaderCache.cpp b/libs/rs/rsShaderCache.cpp
index 311e3f5..8ac2487 100644
--- a/libs/rs/rsShaderCache.cpp
+++ b/libs/rs/rsShaderCache.cpp
@@ -59,6 +59,7 @@
glUseProgram(mEntries[ct].program);
mCurrent = &mEntries[ct];
//LOGV("ShaderCache hit, using %i", ct);
+ rsc->checkError("ShaderCache::lookup (hit)");
return true;
}
}
@@ -91,12 +92,15 @@
//LOGE("e1 %x", glGetError());
glAttachShader(pgm, frag->getShaderID());
- glBindAttribLocation(pgm, VertexArray::POSITION, "attrib_Position");
- glBindAttribLocation(pgm, VertexArray::COLOR, "attrib_Color");
- //glBindAttribLocation(pgm, VertexArray::NORMAL, "attrib_Normal");
- //glBindAttribLocation(pgm, VertexArray::POINT_SIZE, "attrib_PointSize");
- //glBindAttribLocation(pgm, VertexArray::TEXTURE_0, "attrib_T0");
- //glBindAttribLocation(pgm, VertexArray::TEXTURE_1, "attrib_T1");
+ if (!vtx->isUserProgram()) {
+ glBindAttribLocation(pgm, VertexArray::POSITION, "ATTRIB_Position");
+ glBindAttribLocation(pgm, VertexArray::COLOR, "ATTRIB_Color");
+ glBindAttribLocation(pgm, VertexArray::NORMAL, "ATTRIB_Normal");
+ glBindAttribLocation(pgm, VertexArray::POINT_SIZE, "ATTRIB_PointSize");
+ glBindAttribLocation(pgm, VertexArray::TEXTURE, "ATTRIB_T0");
+ } else {
+
+ }
//LOGE("e2 %x", glGetError());
glLinkProgram(pgm);
@@ -119,7 +123,7 @@
for (uint32_t ct=0; ct < vtx->getAttribCount(); ct++) {
e->mVtxAttribSlots[ct] = glGetAttribLocation(pgm, vtx->getAttribName(ct));
if (rsc->props.mLogShaders) {
- LOGV("vtx A, %s = %d\n", vtx->getAttribName(ct).string(), e->mVtxAttribSlots[ct]);
+ LOGV("vtx A %i, %s = %d\n", ct, vtx->getAttribName(ct).string(), e->mVtxAttribSlots[ct]);
}
}
for (uint32_t ct=0; ct < vtx->getUniformCount(); ct++) {
@@ -128,7 +132,7 @@
LOGV("vtx U, %s = %d\n", vtx->getUniformName(ct).string(), e->mVtxUniformSlots[ct]);
}
}
- for (uint32_t ct=0; ct < vtx->getUniformCount(); ct++) {
+ for (uint32_t ct=0; ct < frag->getUniformCount(); ct++) {
e->mFragUniformSlots[ct] = glGetUniformLocation(pgm, frag->getUniformName(ct));
if (rsc->props.mLogShaders) {
LOGV("frag U, %s = %d\n", frag->getUniformName(ct).string(), e->mFragUniformSlots[ct]);
@@ -139,6 +143,7 @@
//LOGV("SC made program %i", e->program);
glUseProgram(e->program);
mEntryCount++;
+ rsc->checkError("ShaderCache::lookup (miss)");
return true;
}
diff --git a/libs/rs/rsSimpleMesh.cpp b/libs/rs/rsSimpleMesh.cpp
index 5f5622d..a819c07 100644
--- a/libs/rs/rsSimpleMesh.cpp
+++ b/libs/rs/rsSimpleMesh.cpp
@@ -55,18 +55,25 @@
return;
}
+ rsc->checkError("SimpleMesh::renderRange 1");
VertexArray va;
- for (uint32_t ct=0; ct < mVertexTypeCount; ct++) {
- mVertexBuffers[ct]->uploadCheck(rsc);
- va.setActiveBuffer(mVertexBuffers[ct]->getBufferObjectID());
- mVertexTypes[ct]->enableGLVertexBuffer(&va);
- }
if (rsc->checkVersion2_0()) {
+ for (uint32_t ct=0; ct < mVertexTypeCount; ct++) {
+ mVertexBuffers[ct]->uploadCheck(rsc);
+ va.setActiveBuffer(mVertexBuffers[ct]->getBufferObjectID());
+ mVertexTypes[ct]->enableGLVertexBuffer2(&va);
+ }
va.setupGL2(rsc, 0, &rsc->mShaderCache);
} else {
+ for (uint32_t ct=0; ct < mVertexTypeCount; ct++) {
+ mVertexBuffers[ct]->uploadCheck(rsc);
+ va.setActiveBuffer(mVertexBuffers[ct]->getBufferObjectID());
+ mVertexTypes[ct]->enableGLVertexBuffer(&va);
+ }
va.setupGL(rsc, 0);
}
+ rsc->checkError("SimpleMesh::renderRange 2");
if (mIndexType.get()) {
mIndexBuffer->uploadCheck(rsc);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBuffer->getBufferObjectID());
diff --git a/libs/rs/rsType.cpp b/libs/rs/rsType.cpp
index e7bcb08..ddadd9f 100644
--- a/libs/rs/rsType.cpp
+++ b/libs/rs/rsType.cpp
@@ -26,7 +26,6 @@
mAllocLine = __LINE__;
mLODs = 0;
mLODCount = 0;
- memset(&mGL, 0, sizeof(mGL));
clear();
}
@@ -93,9 +92,9 @@
mLODs[lod].mZ = tz;
mLODs[lod].mOffset = offset;
offset += tx * rsMax(ty, 1u) * rsMax(tz, 1u) * mElement->getSizeBytes();
- tx = (tx + 1) >> 1;
- ty = (ty + 1) >> 1;
- tz = (tz + 1) >> 1;
+ if (tx > 1) tx >>= 1;
+ if (ty > 1) ty >>= 1;
+ if (tz > 1) tz >>= 1;
}
// At this point the offset is the size of a mipmap chain;
@@ -133,18 +132,28 @@
void Type::makeGLComponents()
{
- uint32_t texNum = 0;
- memset(&mGL, 0, sizeof(mGL));
+ uint32_t userNum = 0;
for (uint32_t ct=0; ct < getElement()->getFieldCount(); ct++) {
const Component &c = getElement()->getField(ct)->getComponent();
switch(c.getKind()) {
+ case RS_KIND_USER:
+ mGL.mUser[userNum].size = c.getVectorSize();
+ mGL.mUser[userNum].offset = mElement->getFieldOffsetBytes(ct);
+ mGL.mUser[userNum].type = c.getGLType();
+ mGL.mUser[userNum].normalized = c.getType() != RS_TYPE_FLOAT_32;//c.getIsNormalized();
+ mGL.mUser[userNum].name.setTo(getElement()->getFieldName(ct));
+ userNum ++;
+ break;
+
case RS_KIND_POSITION:
rsAssert(mGL.mVtx.size == 0);
mGL.mVtx.size = c.getVectorSize();
mGL.mVtx.offset = mElement->getFieldOffsetBytes(ct);
mGL.mVtx.type = c.getGLType();
+ mGL.mVtx.normalized = false;
+ mGL.mVtx.name.setTo("Position");
break;
case RS_KIND_COLOR:
@@ -152,6 +161,8 @@
mGL.mColor.size = c.getVectorSize();
mGL.mColor.offset = mElement->getFieldOffsetBytes(ct);
mGL.mColor.type = c.getGLType();
+ mGL.mColor.normalized = c.getType() != RS_TYPE_FLOAT_32;
+ mGL.mColor.name.setTo("Color");
break;
case RS_KIND_NORMAL:
@@ -159,15 +170,17 @@
mGL.mNorm.size = c.getVectorSize();
mGL.mNorm.offset = mElement->getFieldOffsetBytes(ct);
mGL.mNorm.type = c.getGLType();
+ mGL.mNorm.normalized = false;
+ mGL.mNorm.name.setTo("Normal");
break;
case RS_KIND_TEXTURE:
- if (mGL.mTex[texNum].size) {
- texNum++;
- }
- mGL.mTex[texNum].size = c.getVectorSize();
- mGL.mTex[texNum].offset = mElement->getFieldOffsetBytes(ct);
- mGL.mTex[texNum].type = c.getGLType();
+ rsAssert(mGL.mTex.size == 0);
+ mGL.mTex.size = c.getVectorSize();
+ mGL.mTex.offset = mElement->getFieldOffsetBytes(ct);
+ mGL.mTex.type = c.getGLType();
+ mGL.mTex.normalized = false;
+ mGL.mTex.name.setTo("Texture");
break;
case RS_KIND_POINT_SIZE:
@@ -175,6 +188,8 @@
mGL.mPointSize.size = c.getVectorSize();
mGL.mPointSize.offset = mElement->getFieldOffsetBytes(ct);
mGL.mPointSize.type = c.getGLType();
+ mGL.mPointSize.normalized = false;
+ mGL.mPointSize.name.setTo("PointSize");
break;
default:
@@ -186,7 +201,7 @@
void Type::enableGLVertexBuffer(VertexArray *va) const
{
// Note: We are only going to enable buffers and never disable them
- // here. The reasonis more than one Allocation may be used as a vertex
+ // here. The reason is more than one Allocation may be used as a vertex
// source. So we cannot disable arrays that may have been in use by
// another allocation.
@@ -211,14 +226,11 @@
mGL.mColor.offset);
}
- for (uint32_t ct=0; ct < RS_MAX_TEXTURE; ct++) {
- if (mGL.mTex[ct].size) {
- va->setTexture(mGL.mTex[ct].size,
- mGL.mTex[ct].type,
- stride,
- mGL.mTex[ct].offset,
- ct);
- }
+ if (mGL.mTex.size) {
+ va->setTexture(mGL.mTex.size,
+ mGL.mTex.type,
+ stride,
+ mGL.mTex.offset);
}
if (mGL.mPointSize.size) {
@@ -229,6 +241,20 @@
}
+void Type::enableGLVertexBuffer2(VertexArray *va) const
+{
+ // Do legacy buffers
+ enableGLVertexBuffer(va);
+
+ uint32_t stride = mElement->getSizeBytes();
+ for (uint32_t ct=0; ct < RS_MAX_ATTRIBS; ct++) {
+ if (mGL.mUser[ct].size) {
+ va->setUser(mGL.mUser[ct], stride);
+ }
+ }
+}
+
+
void Type::dumpLOGV(const char *prefix) const
{
diff --git a/libs/rs/rsType.h b/libs/rs/rsType.h
index d261d58..4fa4933 100644
--- a/libs/rs/rsType.h
+++ b/libs/rs/rsType.h
@@ -18,6 +18,7 @@
#define ANDROID_STRUCTURED_TYPE_H
#include "rsElement.h"
+#include "rsVertexArray.h"
// ---------------------------------------------------------------------------
namespace android {
@@ -68,6 +69,7 @@
void compute();
void enableGLVertexBuffer(class VertexArray *) const;
+ void enableGLVertexBuffer2(class VertexArray *) const;
void dumpLOGV(const char *prefix) const;
@@ -108,18 +110,13 @@
LOD *mLODs;
uint32_t mLODCount;
- struct VertexComponent_t {
- uint32_t offset;
- uint32_t type;
- uint32_t size;
- uint32_t stride;
- };
struct GLState_t {
- VertexComponent_t mVtx;
- VertexComponent_t mNorm;
- VertexComponent_t mColor;
- VertexComponent_t mTex[RS_MAX_TEXTURE];
- VertexComponent_t mPointSize;
+ VertexArray::Attrib mUser[RS_MAX_ATTRIBS];
+ VertexArray::Attrib mVtx;
+ VertexArray::Attrib mNorm;
+ VertexArray::Attrib mColor;
+ VertexArray::Attrib mTex;
+ VertexArray::Attrib mPointSize;
};
GLState_t mGL;
void makeGLComponents();
diff --git a/libs/rs/rsUtils.h b/libs/rs/rsUtils.h
index 07f8933..3c6da68 100644
--- a/libs/rs/rsUtils.h
+++ b/libs/rs/rsUtils.h
@@ -17,7 +17,6 @@
#ifndef ANDROID_RS_UTILS_H
#define ANDROID_RS_UTILS_H
-#define LOG_NDEBUG 0
#define LOG_TAG "RenderScript"
#include <utils/Log.h>
#include <utils/Vector.h>
diff --git a/libs/rs/rsVertexArray.cpp b/libs/rs/rsVertexArray.cpp
index 2ba0ef9..7124eb5 100644
--- a/libs/rs/rsVertexArray.cpp
+++ b/libs/rs/rsVertexArray.cpp
@@ -25,7 +25,6 @@
VertexArray::VertexArray()
{
- memset(mAttribs, 0, sizeof(mAttribs));
mActiveBuffer = 0;
}
@@ -36,13 +35,42 @@
void VertexArray::clearAll()
{
- memset(mAttribs, 0, sizeof(mAttribs));
+ for (uint32_t ct=0; ct < RS_MAX_ATTRIBS; ct++) {
+ mAttribs[ct].clear();
+ }
mActiveBuffer = 0;
}
+VertexArray::Attrib::Attrib()
+{
+ clear();
+}
+
+void VertexArray::Attrib::set(const Attrib &a)
+{
+ buffer = a.buffer;
+ offset = a.offset;
+ type = a.type;
+ size = a.size;
+ stride = a.stride;
+ normalized = a.normalized;
+ name.setTo(a.name);
+}
+
+void VertexArray::Attrib::clear()
+{
+ buffer = 0;
+ offset = 0;
+ type = 0;
+ size = 0;
+ stride = 0;
+ normalized = false;
+ name.setTo("");
+}
+
void VertexArray::clear(AttribName n)
{
- mAttribs[n].size = 0;
+ mAttribs[n].clear();
}
void VertexArray::setPosition(uint32_t size, uint32_t type, uint32_t stride, uint32_t offset)
@@ -85,18 +113,30 @@
mAttribs[POINT_SIZE].normalized = false;
}
-void VertexArray::setTexture(uint32_t size, uint32_t type, uint32_t stride, uint32_t offset, uint32_t num)
+void VertexArray::setTexture(uint32_t size, uint32_t type, uint32_t stride, uint32_t offset)
{
- mAttribs[TEXTURE_0 + num].buffer = mActiveBuffer;
- mAttribs[TEXTURE_0 + num].type = type;
- mAttribs[TEXTURE_0 + num].size = size;
- mAttribs[TEXTURE_0 + num].offset = offset;
- mAttribs[TEXTURE_0 + num].stride = stride;
- mAttribs[TEXTURE_0 + num].normalized = false;
+ mAttribs[TEXTURE].buffer = mActiveBuffer;
+ mAttribs[TEXTURE].type = type;
+ mAttribs[TEXTURE].size = size;
+ mAttribs[TEXTURE].offset = offset;
+ mAttribs[TEXTURE].stride = stride;
+ mAttribs[TEXTURE].normalized = false;
}
-void VertexArray::logAttrib(uint32_t idx) const {
- LOGE("va %i: buf=%i size=%i type=0x%x stride=0x%x norm=%i offset=0x%x", idx,
+void VertexArray::setUser(const Attrib &a, uint32_t stride)
+{
+ // Find empty slot, some may be taken by legacy 1.1 slots.
+ uint32_t slot = 0;
+ while (mAttribs[slot].size) slot++;
+ rsAssert(slot < RS_MAX_ATTRIBS);
+ mAttribs[slot].set(a);
+ mAttribs[slot].buffer = mActiveBuffer;
+ mAttribs[slot].stride = stride;
+}
+
+void VertexArray::logAttrib(uint32_t idx, uint32_t slot) const {
+ LOGE("va %i: slot=%i name=%s buf=%i size=%i type=0x%x stride=0x%x norm=%i offset=0x%x", idx, slot,
+ mAttribs[idx].name.string(),
mAttribs[idx].buffer,
mAttribs[idx].size,
mAttribs[idx].type,
@@ -143,21 +183,18 @@
glDisableClientState(GL_COLOR_ARRAY);
}
- for (uint32_t ct=0; ct < RS_MAX_TEXTURE; ct++) {
- glClientActiveTexture(GL_TEXTURE0 + ct);
- if (mAttribs[TEXTURE_0 + ct].size) {
- //logAttrib(TEXTURE_0 + ct);
- glEnableClientState(GL_TEXTURE_COORD_ARRAY);
- glBindBuffer(GL_ARRAY_BUFFER, mAttribs[TEXTURE_0 + ct].buffer);
- glTexCoordPointer(mAttribs[TEXTURE_0 + ct].size,
- mAttribs[TEXTURE_0 + ct].type,
- mAttribs[TEXTURE_0 + ct].stride,
- (void *)mAttribs[TEXTURE_0 + ct].offset);
- } else {
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
- }
- }
glClientActiveTexture(GL_TEXTURE0);
+ if (mAttribs[TEXTURE].size) {
+ //logAttrib(TEXTURE);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glBindBuffer(GL_ARRAY_BUFFER, mAttribs[TEXTURE].buffer);
+ glTexCoordPointer(mAttribs[TEXTURE].size,
+ mAttribs[TEXTURE].type,
+ mAttribs[TEXTURE].stride,
+ (void *)mAttribs[TEXTURE].offset);
+ } else {
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ }
if (mAttribs[POINT_SIZE].size) {
//logAttrib(POINT_SIZE);
@@ -178,12 +215,11 @@
glDisableVertexAttribArray(ct);
}
- for (int ct=0; ct < _LAST; ct++) {
- if (mAttribs[ct].size) {
- //logAttrib(ct);
+ for (uint32_t ct=0; ct < RS_MAX_ATTRIBS; ct++) {
+ if (mAttribs[ct].size && (sc->vtxAttribSlot(ct) >= 0)) {
+ //logAttrib(ct, sc->vtxAttribSlot(ct));
glEnableVertexAttribArray(sc->vtxAttribSlot(ct));
glBindBuffer(GL_ARRAY_BUFFER, mAttribs[ct].buffer);
- //LOGV("attp %i %i", ct, sc->vtxAttribSlot(ct));
glVertexAttribPointer(sc->vtxAttribSlot(ct),
mAttribs[ct].size,
@@ -191,9 +227,6 @@
mAttribs[ct].normalized,
mAttribs[ct].stride,
(void *)mAttribs[ct].offset);
- } else {
- //glDisableVertexAttribArray(ct);
- rsAssert(ct);
}
}
rsc->checkError("VertexArray::setupGL2");
@@ -201,6 +234,5 @@
////////////////////////////////////////////
void VertexArrayState::init(Context *) {
- memset(this, 0, sizeof(this));
}
diff --git a/libs/rs/rsVertexArray.h b/libs/rs/rsVertexArray.h
index f97813f..26e6f84 100644
--- a/libs/rs/rsVertexArray.h
+++ b/libs/rs/rsVertexArray.h
@@ -38,19 +38,24 @@
COLOR,
NORMAL,
POINT_SIZE,
- TEXTURE_0,
- TEXTURE_1,
+ TEXTURE,
_LAST
};
- typedef struct {
+ class Attrib {
+ public:
uint32_t buffer;
uint32_t offset;
uint32_t type;
uint32_t size;
uint32_t stride;
bool normalized;
- } Attrib;
+ String8 name;
+
+ Attrib();
+ void set(const Attrib &);
+ void clear();
+ };
void clearAll();
@@ -58,19 +63,20 @@
void setActiveBuffer(uint32_t id) {mActiveBuffer = id;}
+ void setUser(const Attrib &, uint32_t stride);
void setPosition(uint32_t size, uint32_t type, uint32_t stride, uint32_t offset);
void setColor(uint32_t size, uint32_t type, uint32_t stride, uint32_t offset);
void setNormal(uint32_t type, uint32_t stride, uint32_t offset);
void setPointSize(uint32_t type, uint32_t stride, uint32_t offset);
- void setTexture(uint32_t size, uint32_t type, uint32_t stride, uint32_t offset, uint32_t num);
+ void setTexture(uint32_t size, uint32_t type, uint32_t stride, uint32_t offset);
void setupGL(const Context *rsc, class VertexArrayState *) const;
void setupGL2(const Context *rsc, class VertexArrayState *, ShaderCache *) const;
- void logAttrib(uint32_t idx) const;
+ void logAttrib(uint32_t idx, uint32_t slot) const;
protected:
uint32_t mActiveBuffer;
- Attrib mAttribs[_LAST];
+ Attrib mAttribs[RS_MAX_ATTRIBS];
};
@@ -78,7 +84,7 @@
public:
void init(Context *);
- VertexArray::Attrib mAttribs[VertexArray::_LAST];
+ //VertexArray::Attrib mAttribs[VertexArray::_LAST];
};
diff --git a/location/java/android/location/Geocoder.java b/location/java/android/location/Geocoder.java
index 2ce1273..c325b1b 100644
--- a/location/java/android/location/Geocoder.java
+++ b/location/java/android/location/Geocoder.java
@@ -45,10 +45,7 @@
public final class Geocoder {
private static final String TAG = "Geocoder";
- private String mLanguage;
- private String mCountry;
- private String mVariant;
- private String mAppName;
+ private GeocoderParams mParams;
private ILocationManager mService;
/**
@@ -64,11 +61,7 @@
if (locale == null) {
throw new NullPointerException("locale == null");
}
- mLanguage = locale.getLanguage();
- mCountry = locale.getCountry();
- mVariant = locale.getVariant();
- mAppName = context.getPackageName();
-
+ mParams = new GeocoderParams(context, locale);
IBinder b = ServiceManager.getService(Context.LOCATION_SERVICE);
mService = ILocationManager.Stub.asInterface(b);
}
@@ -119,7 +112,7 @@
try {
List<Address> results = new ArrayList<Address>();
String ex = mService.getFromLocation(latitude, longitude, maxResults,
- mLanguage, mCountry, mVariant, mAppName, results);
+ mParams, results);
if (ex != null) {
throw new IOException(ex);
} else {
@@ -161,7 +154,7 @@
try {
List<Address> results = new ArrayList<Address>();
String ex = mService.getFromLocationName(locationName,
- 0, 0, 0, 0, maxResults, mLanguage, mCountry, mVariant, mAppName, results);
+ 0, 0, 0, 0, maxResults, mParams, results);
if (ex != null) {
throw new IOException(ex);
} else {
@@ -234,7 +227,7 @@
ArrayList<Address> result = new ArrayList<Address>();
String ex = mService.getFromLocationName(locationName,
lowerLeftLatitude, lowerLeftLongitude, upperRightLatitude, upperRightLongitude,
- maxResults, mLanguage, mCountry, mVariant, mAppName, result);
+ maxResults, mParams, result);
if (ex != null) {
throw new IOException(ex);
} else {
diff --git a/location/java/android/location/GeocoderParams.aidl b/location/java/android/location/GeocoderParams.aidl
new file mode 100644
index 0000000..2484e20
--- /dev/null
+++ b/location/java/android/location/GeocoderParams.aidl
@@ -0,0 +1,19 @@
+/*
+ * 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.
+ */
+
+package android.location;
+
+parcelable GeocoderParams;
diff --git a/location/java/android/location/GeocoderParams.java b/location/java/android/location/GeocoderParams.java
new file mode 100644
index 0000000..8b8e63b
--- /dev/null
+++ b/location/java/android/location/GeocoderParams.java
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+
+package android.location;
+
+import android.content.Context;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Locale;
+
+/**
+ * This class contains extra parameters to pass to an IGeocodeProvider
+ * implementation from the Geocoder class. Currently this contains the
+ * language, country and variant information from the Geocoder's locale
+ * as well as the Geocoder client's package name for geocoder server
+ * logging. This information is kept in a separate class to allow for
+ * future expansion of the IGeocodeProvider interface.
+ */
+public class GeocoderParams implements Parcelable {
+ private Locale mLocale;
+ private String mPackageName;
+
+ // used only for parcelling
+ private GeocoderParams() {
+ }
+
+ /**
+ * This object is only constructed by the Geocoder class
+ *
+ * @hide
+ */
+ public GeocoderParams(Context context, Locale locale) {
+ mLocale = locale;
+ mPackageName = context.getPackageName();
+ }
+
+ /**
+ * returns the Geocoder's locale
+ */
+ public Locale getLocale() {
+ return mLocale;
+ }
+
+ /**
+ * returns the package name of the Geocoder's client
+ */
+ public String getClientPackage() {
+ return mPackageName;
+ }
+
+ public static final Parcelable.Creator<GeocoderParams> CREATOR =
+ new Parcelable.Creator<GeocoderParams>() {
+ public GeocoderParams createFromParcel(Parcel in) {
+ GeocoderParams gp = new GeocoderParams();
+ String language = in.readString();
+ String country = in.readString();
+ String variant = in.readString();
+ gp.mLocale = new Locale(language, country, variant);
+ gp.mPackageName = in.readString();
+ return gp;
+ }
+
+ public GeocoderParams[] newArray(int size) {
+ return new GeocoderParams[size];
+ }
+ };
+
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel parcel, int flags) {
+ parcel.writeString(mLocale.getLanguage());
+ parcel.writeString(mLocale.getCountry());
+ parcel.writeString(mLocale.getVariant());
+ parcel.writeString(mPackageName);
+ }
+}
diff --git a/location/java/android/location/IGeocodeProvider.aidl b/location/java/android/location/IGeocodeProvider.aidl
index e79e8d2..aaa70c7 100644
--- a/location/java/android/location/IGeocodeProvider.aidl
+++ b/location/java/android/location/IGeocodeProvider.aidl
@@ -17,6 +17,7 @@
package android.location;
import android.location.Address;
+import android.location.GeocoderParams;
/**
* An interface for location providers implementing the Geocoder services.
@@ -26,10 +27,10 @@
interface IGeocodeProvider {
String getFromLocation(double latitude, double longitude, int maxResults,
- String language, String country, String variant, String appName, out List<Address> addrs);
+ in GeocoderParams params, out List<Address> addrs);
String getFromLocationName(String locationName,
double lowerLeftLatitude, double lowerLeftLongitude,
double upperRightLatitude, double upperRightLongitude, int maxResults,
- String language, String country, String variant, String appName, out List<Address> addrs);
+ in GeocoderParams params, out List<Address> addrs);
}
diff --git a/location/java/android/location/ILocationManager.aidl b/location/java/android/location/ILocationManager.aidl
index b6c59d6..1fac07c 100644
--- a/location/java/android/location/ILocationManager.aidl
+++ b/location/java/android/location/ILocationManager.aidl
@@ -18,6 +18,7 @@
import android.app.PendingIntent;
import android.location.Address;
+import android.location.GeocoderParams;
import android.location.IGeocodeProvider;
import android.location.IGpsStatusListener;
import android.location.ILocationListener;
@@ -63,11 +64,11 @@
void reportLocation(in Location location);
String getFromLocation(double latitude, double longitude, int maxResults,
- String language, String country, String variant, String appName, out List<Address> addrs);
+ in GeocoderParams params, out List<Address> addrs);
String getFromLocationName(String locationName,
double lowerLeftLatitude, double lowerLeftLongitude,
double upperRightLatitude, double upperRightLongitude, int maxResults,
- String language, String country, String variant, String appName, out List<Address> addrs);
+ in GeocoderParams params, out List<Address> addrs);
void addTestProvider(String name, boolean requiresNetwork, boolean requiresSatellite,
boolean requiresCell, boolean hasMonetaryCost, boolean supportsAltitude,
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 94ced22..6d7a23d 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -23,7 +23,6 @@
import android.os.RemoteException;
import android.os.Handler;
import android.os.Message;
-import android.util.Config;
import android.util.Log;
import com.android.internal.location.DummyLocationProvider;
@@ -105,6 +104,48 @@
*/
public static final String KEY_LOCATION_CHANGED = "location";
+ public interface GeocodeProvider {
+ String getFromLocation(double latitude, double longitude, int maxResults,
+ GeocoderParams params, List<Address> addrs);
+
+ String getFromLocationName(String locationName,
+ double lowerLeftLatitude, double lowerLeftLongitude,
+ double upperRightLatitude, double upperRightLongitude, int maxResults,
+ GeocoderParams params, List<Address> addrs);
+ }
+
+ private static final class GeocodeProviderProxy extends IGeocodeProvider.Stub {
+ private GeocodeProvider mProvider;
+
+ GeocodeProviderProxy(GeocodeProvider provider) {
+ mProvider = provider;
+ }
+
+ /**
+ * This method is overridden to implement the
+ * {@link Geocoder#getFromLocation(double, double, int)} method.
+ * Classes implementing this method should not hold a reference to the params parameter.
+ */
+ public String getFromLocation(double latitude, double longitude, int maxResults,
+ GeocoderParams params, List<Address> addrs) {
+ return mProvider.getFromLocation(latitude, longitude, maxResults, params, addrs);
+ }
+
+ /**
+ * This method is overridden to implement the
+ * {@link Geocoder#getFromLocationName(String, int, double, double, double, double)} method.
+ * Classes implementing this method should not hold a reference to the params parameter.
+ */
+ public String getFromLocationName(String locationName,
+ double lowerLeftLatitude, double lowerLeftLongitude,
+ double upperRightLatitude, double upperRightLongitude, int maxResults,
+ GeocoderParams params, List<Address> addrs) {
+ return mProvider.getFromLocationName(locationName, lowerLeftLatitude,
+ lowerLeftLongitude, upperRightLatitude, upperRightLongitude,
+ maxResults, params, addrs);
+ }
+ }
+
// Map from LocationListeners to their associated ListenerTransport objects
private HashMap<LocationListener,ListenerTransport> mListeners =
new HashMap<LocationListener,ListenerTransport>();
@@ -206,7 +247,7 @@
* factory Context.getSystemService.
*/
public LocationManager(ILocationManager service) {
- if (Config.LOGD) {
+ if (false) {
Log.d(TAG, "Constructor: service = " + service);
}
mService = service;
@@ -235,7 +276,7 @@
* @return list of Strings containing names of the providers
*/
public List<String> getAllProviders() {
- if (Config.LOGD) {
+ if (false) {
Log.d(TAG, "getAllProviders");
}
try {
@@ -787,7 +828,7 @@
if (listener == null) {
throw new IllegalArgumentException("listener==null");
}
- if (Config.LOGD) {
+ if (false) {
Log.d(TAG, "removeUpdates: listener = " + listener);
}
try {
@@ -812,7 +853,7 @@
if (intent == null) {
throw new IllegalArgumentException("intent==null");
}
- if (Config.LOGD) {
+ if (false) {
Log.d(TAG, "removeUpdates: intent = " + intent);
}
try {
@@ -867,7 +908,7 @@
*/
public void addProximityAlert(double latitude, double longitude,
float radius, long expiration, PendingIntent intent) {
- if (Config.LOGD) {
+ if (false) {
Log.d(TAG, "addProximityAlert: latitude = " + latitude +
", longitude = " + longitude + ", radius = " + radius +
", expiration = " + expiration +
@@ -888,7 +929,7 @@
* proximity alerts
*/
public void removeProximityAlert(PendingIntent intent) {
- if (Config.LOGD) {
+ if (false) {
Log.d(TAG, "removeProximityAlert: intent = " + intent);
}
try {
@@ -1378,6 +1419,19 @@
}
/**
+ * Installs a location provider.
+ *
+ * @param provider implementation of the location provider
+ *
+ * @return true if the command succeeds.
+ *
+ * Requires the android.permission.INSTALL_LOCATION_PROVIDER permission.
+ */
+ public boolean installLocationProvider(LocationProviderImpl provider) {
+ return installLocationProvider(provider.getName(), provider.getInterface());
+ }
+
+ /**
* Installs a geocoder server.
*
* @param provider Binder interface for the geocoder provider
@@ -1385,12 +1439,10 @@
* @return true if the command succeeds.
*
* Requires the android.permission.INSTALL_LOCATION_PROVIDER permission.
- *
- * {@hide}
*/
- public boolean installGeocodeProvider(IGeocodeProvider provider) {
+ public boolean installGeocodeProvider(GeocodeProvider provider) {
try {
- mService.installGeocodeProvider(provider);
+ mService.installGeocodeProvider(new GeocodeProviderProxy(provider));
return true;
} catch (RemoteException e) {
Log.e(TAG, "RemoteException in setGeocodeProvider: ", e);
@@ -1404,8 +1456,6 @@
* @param location new Location to report
*
* Requires the android.permission.INSTALL_LOCATION_PROVIDER permission.
- *
- * {@hide}
*/
public void reportLocation(Location location) {
try {
diff --git a/location/java/android/location/LocationProviderImpl.java b/location/java/android/location/LocationProviderImpl.java
new file mode 100644
index 0000000..9a3624e
--- /dev/null
+++ b/location/java/android/location/LocationProviderImpl.java
@@ -0,0 +1,235 @@
+/*
+ * 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.
+ */
+
+package android.location;
+
+import android.net.NetworkInfo;
+import android.os.Bundle;
+
+/**
+ * An abstract superclass for location providers that are implemented
+ * outside of the core android platform.
+ * A LocationProviderImpl can be installed using the
+ * {@link LocationManager#installLocationProvider(LocationProviderImpl)} method.
+ * Installing a location provider requires the
+ * android.permission.INSTALL_LOCATION_PROVIDER permission.
+ */
+public abstract class LocationProviderImpl extends LocationProvider {
+
+ private ILocationProvider.Stub mProvider = new ILocationProvider.Stub() {
+
+ public boolean requiresNetwork() {
+ return LocationProviderImpl.this.requiresNetwork();
+ }
+
+ public boolean requiresSatellite() {
+ return LocationProviderImpl.this.requiresSatellite();
+ }
+
+ public boolean requiresCell() {
+ return LocationProviderImpl.this.requiresCell();
+ }
+
+ public boolean hasMonetaryCost() {
+ return LocationProviderImpl.this.hasMonetaryCost();
+ }
+
+ public boolean supportsAltitude() {
+ return LocationProviderImpl.this.supportsAltitude();
+ }
+
+ public boolean supportsSpeed() {
+ return LocationProviderImpl.this.supportsSpeed();
+ }
+
+ public boolean supportsBearing() {
+ return LocationProviderImpl.this.supportsBearing();
+ }
+
+ public int getPowerRequirement() {
+ return LocationProviderImpl.this.getPowerRequirement();
+ }
+
+ public int getAccuracy() {
+ return LocationProviderImpl.this.getAccuracy();
+ }
+
+ public void enable() {
+ LocationProviderImpl.this.enable();
+ }
+
+ public void disable() {
+ LocationProviderImpl.this.disable();
+ }
+
+ public boolean isEnabled() {
+ return LocationProviderImpl.this.isEnabled();
+ }
+
+ public int getStatus(Bundle extras) {
+ return LocationProviderImpl.this.getStatus(extras);
+ }
+
+ public long getStatusUpdateTime() {
+ return LocationProviderImpl.this.getStatusUpdateTime();
+ }
+
+ public void enableLocationTracking(boolean enable) {
+ LocationProviderImpl.this.enableLocationTracking(enable);
+ }
+
+ public void setMinTime(long minTime) {
+ LocationProviderImpl.this.setMinTime(minTime);
+ }
+
+ public void updateNetworkState(int state, NetworkInfo info) {
+ LocationProviderImpl.this.updateNetworkState(state, info);
+ }
+
+ public void updateLocation(Location location) {
+ LocationProviderImpl.this.updateLocation(location);
+ }
+
+ public boolean sendExtraCommand(String command, Bundle extras) {
+ return LocationProviderImpl.this.sendExtraCommand(command, extras);
+ }
+
+ public void addListener(int uid) {
+ LocationProviderImpl.this.addListener(uid);
+ }
+
+ public void removeListener(int uid) {
+ LocationProviderImpl.this.removeListener(uid);
+ }
+ };
+
+ public LocationProviderImpl(String name) {
+ super(name);
+ }
+
+ /**
+ * {@hide}
+ */
+ /* package */ ILocationProvider getInterface() {
+ return mProvider;
+ }
+
+ /**
+ * Enables the location provider
+ */
+ public abstract void enable();
+
+ /**
+ * Disables the location provider
+ */
+ public abstract void disable();
+
+ /**
+ * Returns true if the provider is currently enabled
+ */
+ public abstract boolean isEnabled();
+
+ /**
+ * Returns a information on the status of this provider.
+ * {@link #OUT_OF_SERVICE} is returned if the provider is
+ * out of service, and this is not expected to change in the near
+ * future; {@link #TEMPORARILY_UNAVAILABLE} is returned if
+ * the provider is temporarily unavailable but is expected to be
+ * available shortly; and {@link #AVAILABLE} is returned
+ * if the provider is currently available.
+ *
+ * <p> If extras is non-null, additional status information may be
+ * added to it in the form of provider-specific key/value pairs.
+ */
+ public abstract int getStatus(Bundle extras);
+
+ /**
+ * Returns the time at which the status was last updated. It is the
+ * responsibility of the provider to appropriately set this value using
+ * {@link android.os.SystemClock#elapsedRealtime SystemClock.elapsedRealtime()}.
+ * there is a status update that it wishes to broadcast to all its
+ * listeners. The provider should be careful not to broadcast
+ * the same status again.
+ *
+ * @return time of last status update in millis since last reboot
+ */
+ public abstract long getStatusUpdateTime();
+
+ /**
+ * Notifies the location provider that clients are listening for locations.
+ * Called with enable set to true when the first client is added and
+ * called with enable set to false when the last client is removed.
+ * This allows the provider to prepare for receiving locations,
+ * and to shut down when no clients are remaining.
+ *
+ * @param enable true if location tracking should be enabled.
+ */
+ public abstract void enableLocationTracking(boolean enable);
+
+ /**
+ * Notifies the location provider of the smallest minimum time between updates amongst
+ * all clients that are listening for locations. This allows the provider to reduce
+ * the frequency of updates to match the requested frequency.
+ *
+ * @param minTime the smallest minTime value over all listeners for this provider.
+ */
+ public abstract void setMinTime(long minTime);
+
+ /**
+ * Updates the network state for the given provider. This function must
+ * be overwritten if {@link #requiresNetwork} returns true. The state is
+ * {@link #TEMPORARILY_UNAVAILABLE} (disconnected), OR {@link #AVAILABLE}
+ * (connected or connecting).
+ *
+ * @param state data state
+ */
+ public abstract void updateNetworkState(int state, NetworkInfo info);
+
+ /**
+ * Informs the provider when a new location has been computed by a different
+ * location provider. This is intended to be used as aiding data for the
+ * receiving provider.
+ *
+ * @param location new location from other location provider
+ */
+ public abstract void updateLocation(Location location);
+
+ /**
+ * Implements addditional location provider specific additional commands.
+ *
+ * @param command name of the command to send to the provider.
+ * @param extras optional arguments for the command (or null).
+ * The provider may optionally fill the extras Bundle with results from the command.
+ *
+ * @return true if the command succeeds.
+ */
+ public abstract boolean sendExtraCommand(String command, Bundle extras);
+
+ /**
+ * Notifies the location provider when a new client is listening for locations.
+ *
+ * @param uid user ID of the new client.
+ */
+ public abstract void addListener(int uid);
+
+ /**
+ * Notifies the location provider when a client is no longer listening for locations.
+ *
+ * @param uid user ID of the client no longer listening.
+ */
+ public abstract void removeListener(int uid);
+}
+
diff --git a/location/java/com/android/internal/location/GpsLocationProvider.java b/location/java/com/android/internal/location/GpsLocationProvider.java
index 7763549..ee56621 100755
--- a/location/java/com/android/internal/location/GpsLocationProvider.java
+++ b/location/java/com/android/internal/location/GpsLocationProvider.java
@@ -41,7 +41,6 @@
import android.os.ServiceManager;
import android.os.SystemClock;
import android.provider.Settings;
-import android.util.Config;
import android.util.Log;
import android.util.SparseIntArray;
@@ -69,7 +68,7 @@
private static final String TAG = "GpsLocationProvider";
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final boolean VERBOSE = false;
/**
@@ -377,7 +376,7 @@
public void updateNetworkState(int state, NetworkInfo info) {
mNetworkAvailable = (state == LocationProvider.AVAILABLE);
- if (Config.LOGD) {
+ if (DEBUG) {
Log.d(TAG, "updateNetworkState " + (mNetworkAvailable ? "available" : "unavailable")
+ " info: " + info);
}
@@ -498,7 +497,7 @@
* when the provider is enabled.
*/
public synchronized void enable() {
- if (Config.LOGD) Log.d(TAG, "enable");
+ if (DEBUG) Log.d(TAG, "enable");
if (mEnabled) return;
mEnabled = native_init();
@@ -534,7 +533,7 @@
* down while the provider is disabled.
*/
public synchronized void disable() {
- if (Config.LOGD) Log.d(TAG, "disable");
+ if (DEBUG) Log.d(TAG, "disable");
if (!mEnabled) return;
mEnabled = false;
@@ -602,7 +601,7 @@
}
public void setMinTime(long minTime) {
- if (Config.LOGD) Log.d(TAG, "setMinTime " + minTime);
+ if (DEBUG) Log.d(TAG, "setMinTime " + minTime);
if (minTime >= 0) {
int interval = (int)(minTime/1000);
@@ -623,7 +622,7 @@
}
public void binderDied() {
- if (Config.LOGD) Log.d(TAG, "GPS status listener died");
+ if (DEBUG) Log.d(TAG, "GPS status listener died");
synchronized(mListeners) {
mListeners.remove(this);
@@ -721,7 +720,7 @@
}
private boolean forceTimeInjection() {
- if (Config.LOGD) Log.d(TAG, "forceTimeInjection");
+ if (DEBUG) Log.d(TAG, "forceTimeInjection");
if (mNetworkThread != null) {
mNetworkThread.timeInjectRequest();
return true;
@@ -797,7 +796,7 @@
// report time to first fix
if (mTTFF == 0 && (flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) {
mTTFF = (int)(mLastFixTime - mFixRequestTime);
- if (Config.LOGD) Log.d(TAG, "TTFF: " + mTTFF);
+ if (DEBUG) Log.d(TAG, "TTFF: " + mTTFF);
// notify status listeners
synchronized(mListeners) {
@@ -1046,7 +1045,7 @@
}
private void xtraDownloadRequest() {
- if (Config.LOGD) Log.d(TAG, "xtraDownloadRequest");
+ if (DEBUG) Log.d(TAG, "xtraDownloadRequest");
if (mNetworkThread != null) {
mNetworkThread.xtraDownloadRequest();
}
@@ -1063,7 +1062,7 @@
StringBuilder extrasBuf = new StringBuilder();
- if (Config.LOGD) Log.d(TAG, "sendNiResponse, notifId: " + notificationId +
+ if (DEBUG) Log.d(TAG, "sendNiResponse, notifId: " + notificationId +
", response: " + userResponse);
native_send_ni_response(notificationId, userResponse);
@@ -1149,14 +1148,14 @@
}
public void run() {
- if (Config.LOGD) Log.d(TAG, "GpsEventThread starting");
+ if (DEBUG) Log.d(TAG, "GpsEventThread starting");
// Exit as soon as disable() is called instead of waiting for the GPS to stop.
while (mEnabled) {
// this will wait for an event from the GPS,
// which will be reported via reportLocation or reportStatus
native_wait_for_event();
}
- if (Config.LOGD) Log.d(TAG, "GpsEventThread exiting");
+ if (DEBUG) Log.d(TAG, "GpsEventThread exiting");
}
}
@@ -1181,7 +1180,7 @@
}
public void runLocked() {
- if (Config.LOGD) Log.d(TAG, "NetworkThread starting");
+ if (DEBUG) Log.d(TAG, "NetworkThread starting");
SntpClient client = new SntpClient();
GpsXtraDownloader xtraDownloader = null;
@@ -1197,18 +1196,17 @@
synchronized (this) {
try {
if (!mNetworkAvailable) {
- if (Config.LOGD) Log.d(TAG,
- "NetworkThread wait for network");
+ if (DEBUG) Log.d(TAG, "NetworkThread wait for network");
wait();
} else if (waitTime > 0) {
- if (Config.LOGD) {
+ if (DEBUG) {
Log.d(TAG, "NetworkThread wait for " +
waitTime + "ms");
}
wait(waitTime);
}
} catch (InterruptedException e) {
- if (Config.LOGD) {
+ if (DEBUG) {
Log.d(TAG, "InterruptedException in GpsNetworkThread");
}
}
@@ -1217,12 +1215,11 @@
} while (!mDone && ((!mXtraDownloadRequested &&
!mTimeInjectRequested && waitTime > 0)
|| !mNetworkAvailable));
- if (Config.LOGD) Log.d(TAG, "NetworkThread out of wake loop");
-
+ if (DEBUG) Log.d(TAG, "NetworkThread out of wake loop");
if (!mDone) {
if (mNtpServer != null &&
(mTimeInjectRequested || mNextNtpTime <= System.currentTimeMillis())) {
- if (Config.LOGD) {
+ if (DEBUG) {
Log.d(TAG, "Requesting time from NTP server " + mNtpServer);
}
mTimeInjectRequested = false;
@@ -1231,14 +1228,14 @@
long timeReference = client.getNtpTimeReference();
int certainty = (int)(client.getRoundTripTime()/2);
- if (Config.LOGD) Log.d(TAG, "calling native_inject_time: " +
+ if (DEBUG) Log.d(TAG, "calling native_inject_time: " +
time + " reference: " + timeReference
+ " certainty: " + certainty);
native_inject_time(time, timeReference, certainty);
mNextNtpTime = System.currentTimeMillis() + NTP_INTERVAL;
} else {
- if (Config.LOGD) Log.d(TAG, "requestTime failed");
+ if (DEBUG) Log.d(TAG, "requestTime failed");
mNextNtpTime = System.currentTimeMillis() + RETRY_INTERVAL;
}
}
@@ -1249,7 +1246,7 @@
mXtraDownloadRequested = false;
byte[] data = xtraDownloader.downloadXtraData();
if (data != null) {
- if (Config.LOGD) {
+ if (DEBUG) {
Log.d(TAG, "calling native_inject_xtra_data");
}
native_inject_xtra_data(data, data.length);
@@ -1260,7 +1257,7 @@
}
}
}
- if (Config.LOGD) Log.d(TAG, "NetworkThread exiting");
+ if (DEBUG) Log.d(TAG, "NetworkThread exiting");
}
synchronized void xtraDownloadRequest() {
@@ -1278,7 +1275,7 @@
}
synchronized void setDone() {
- if (Config.LOGD) Log.d(TAG, "stopping NetworkThread");
+ if (DEBUG) Log.d(TAG, "stopping NetworkThread");
mDone = true;
notify();
}
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index 9edb05e..482fc4f 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -168,7 +168,7 @@
AudioSystem.STREAM_MUSIC, // STREAM_MUSIC
AudioSystem.STREAM_ALARM, // STREAM_ALARM
AudioSystem.STREAM_NOTIFICATION, // STREAM_NOTIFICATION
- AudioSystem.STREAM_VOICE_CALL, // STREAM_BLUETOOTH_SCO
+ AudioSystem.STREAM_BLUETOOTH_SCO, // STREAM_BLUETOOTH_SCO
AudioSystem.STREAM_SYSTEM, // STREAM_SYSTEM_ENFORCED
AudioSystem.STREAM_VOICE_CALL, // STREAM_DTMF
AudioSystem.STREAM_MUSIC // STREAM_TTS
@@ -1438,6 +1438,8 @@
AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
AudioSystem.DEVICE_STATE_AVAILABLE,
address);
+ // Reset A2DP suspend state each time a new sink is connected
+ AudioSystem.setParameters("A2dpSuspended=false");
mConnectedDevices.put( new Integer(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP),
address);
}
diff --git a/media/java/android/media/MediaFile.java b/media/java/android/media/MediaFile.java
index 8180a7c..2294069 100644
--- a/media/java/android/media/MediaFile.java
+++ b/media/java/android/media/MediaFile.java
@@ -120,6 +120,7 @@
addFileType("RTX", FILE_TYPE_MID, "audio/midi");
addFileType("OTA", FILE_TYPE_MID, "audio/midi");
+ addFileType("MPEG", FILE_TYPE_MP4, "video/mpeg");
addFileType("MP4", FILE_TYPE_MP4, "video/mp4");
addFileType("M4V", FILE_TYPE_M4V, "video/mp4");
addFileType("3GP", FILE_TYPE_3GPP, "video/3gpp");
@@ -155,8 +156,6 @@
sFileExtensions = builder.toString();
}
- public static final String UNKNOWN_STRING = "<unknown>";
-
public static boolean isAudioFileType(int fileType) {
return ((fileType >= FIRST_AUDIO_FILE_TYPE &&
fileType <= LAST_AUDIO_FILE_TYPE) ||
diff --git a/media/java/android/media/MediaScanner.java b/media/java/android/media/MediaScanner.java
index 4296afb..3a2f47a 100644
--- a/media/java/android/media/MediaScanner.java
+++ b/media/java/android/media/MediaScanner.java
@@ -637,8 +637,8 @@
map.put(MediaStore.MediaColumns.MIME_TYPE, mMimeType);
if (MediaFile.isVideoFileType(mFileType)) {
- map.put(Video.Media.ARTIST, (mArtist != null && mArtist.length() > 0 ? mArtist : MediaFile.UNKNOWN_STRING));
- map.put(Video.Media.ALBUM, (mAlbum != null && mAlbum.length() > 0 ? mAlbum : MediaFile.UNKNOWN_STRING));
+ map.put(Video.Media.ARTIST, (mArtist != null && mArtist.length() > 0 ? mArtist : MediaStore.UNKNOWN_STRING));
+ map.put(Video.Media.ALBUM, (mAlbum != null && mAlbum.length() > 0 ? mAlbum : MediaStore.UNKNOWN_STRING));
map.put(Video.Media.DURATION, mDuration);
map.put(Video.Media.DATE_TAKEN, mLastModified * 1000);
// FIXME - add RESOLUTION
@@ -648,8 +648,8 @@
// contains date time information.
map.put(Images.Media.DATE_TAKEN, mLastModified * 1000);
} else if (MediaFile.isAudioFileType(mFileType)) {
- map.put(Audio.Media.ARTIST, (mArtist != null && mArtist.length() > 0 ? mArtist : MediaFile.UNKNOWN_STRING));
- map.put(Audio.Media.ALBUM, (mAlbum != null && mAlbum.length() > 0 ? mAlbum : MediaFile.UNKNOWN_STRING));
+ map.put(Audio.Media.ARTIST, (mArtist != null && mArtist.length() > 0 ? mArtist : MediaStore.UNKNOWN_STRING));
+ map.put(Audio.Media.ALBUM, (mAlbum != null && mAlbum.length() > 0 ? mAlbum : MediaStore.UNKNOWN_STRING));
map.put(Audio.Media.COMPOSER, mComposer);
if (mYear != 0) {
map.put(Audio.Media.YEAR, mYear);
@@ -705,7 +705,7 @@
values.put(MediaStore.MediaColumns.TITLE, title);
}
String album = values.getAsString(Audio.Media.ALBUM);
- if (MediaFile.UNKNOWN_STRING.equals(album)) {
+ if (MediaStore.UNKNOWN_STRING.equals(album)) {
album = values.getAsString(MediaStore.MediaColumns.DATA);
// extract last path segment before file name
int lastSlash = album.lastIndexOf('/');
diff --git a/media/jni/Android.mk b/media/jni/Android.mk
index fdcf3d1..ca6230f 100644
--- a/media/jni/Android.mk
+++ b/media/jni/Android.mk
@@ -15,7 +15,8 @@
libbinder \
libmedia \
libskia \
- libui
+ libui \
+ libcutils
ifneq ($(BUILD_WITHOUT_PV),true)
LOCAL_SRC_FILES += \
@@ -28,6 +29,15 @@
LOCAL_CFLAGS += -DNO_OPENCORE
endif
+ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
+
+LOCAL_CFLAGS += -DBUILD_WITH_FULL_STAGEFRIGHT=1
+
+LOCAL_SHARED_LIBRARIES += \
+ libstagefright
+
+endif
+
LOCAL_STATIC_LIBRARIES :=
LOCAL_C_INCLUDES += \
diff --git a/media/jni/android_media_MediaScanner.cpp b/media/jni/android_media_MediaScanner.cpp
index 144fba2..2ab2445 100644
--- a/media/jni/android_media_MediaScanner.cpp
+++ b/media/jni/android_media_MediaScanner.cpp
@@ -24,6 +24,7 @@
#include <limits.h>
#include <unistd.h>
#include <fcntl.h>
+#include <cutils/properties.h>
#include <utils/threads.h>
#include "jni.h"
@@ -32,8 +33,10 @@
#ifndef NO_OPENCORE
#include "pvmediascanner.h"
-#else
-#include "StagefrightMediaScanner.h"
+#endif
+
+#if BUILD_WITH_FULL_STAGEFRIGHT
+#include <media/stagefright/StagefrightMediaScanner.h>
#endif
// ----------------------------------------------------------------------------
@@ -283,14 +286,25 @@
}
}
+static MediaScanner *createMediaScanner() {
+#if BUILD_WITH_FULL_STAGEFRIGHT
+ char value[PROPERTY_VALUE_MAX];
+ if (property_get("media.stagefright.enable-scan", value, NULL)
+ && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
+ return new StagefrightMediaScanner;
+ }
+#endif
+#ifndef NO_OPENCORE
+ return new PVMediaScanner();
+#endif
+
+ return NULL;
+}
+
static void
android_media_MediaScanner_native_setup(JNIEnv *env, jobject thiz)
{
-#ifndef NO_OPENCORE
- MediaScanner *mp = new PVMediaScanner();
-#else
- MediaScanner *mp = new StagefrightMediaScanner();
-#endif
+ MediaScanner *mp = createMediaScanner();
if (mp == NULL) {
jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
diff --git a/media/jni/soundpool/android_media_SoundPool.cpp b/media/jni/soundpool/android_media_SoundPool.cpp
index f6ea916..f0677a6 100644
--- a/media/jni/soundpool/android_media_SoundPool.cpp
+++ b/media/jni/soundpool/android_media_SoundPool.cpp
@@ -283,9 +283,13 @@
"(Ljava/lang/Object;IIILjava/lang/Object;)V");
if (fields.mPostEvent == NULL) {
LOGE("Can't find android/media/SoundPool.postEventFromNative");
- return -1;
+ goto bail;
}
+ // create a reference to class. Technically, we're leaking this reference
+ // since it's a static object.
+ fields.mSoundPoolClass = (jclass) env->NewGlobalRef(clazz);
+
if (AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods)) < 0)
goto bail;
diff --git a/media/libmedia/Android.mk b/media/libmedia/Android.mk
index 088ad6d..fc234ee 100644
--- a/media/libmedia/Android.mk
+++ b/media/libmedia/Android.mk
@@ -26,11 +26,6 @@
MediaScannerClient.cpp \
autodetect.cpp
-ifneq ($(BUILD_WITHOUT_PV),true)
-else
-LOCAL_SRC_FILES += StagefrightMediaScanner.cpp
-endif
-
LOCAL_SHARED_LIBRARIES := \
libui libcutils libutils libbinder libsonivox libicuuc
diff --git a/media/libmedia/StagefrightMediaScanner.cpp b/media/libmedia/StagefrightMediaScanner.cpp
deleted file mode 100644
index 522ab5a..0000000
--- a/media/libmedia/StagefrightMediaScanner.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-
-#include "StagefrightMediaScanner.h"
-
-namespace android {
-
-StagefrightMediaScanner::StagefrightMediaScanner() {}
-
-StagefrightMediaScanner::~StagefrightMediaScanner() {}
-
-status_t StagefrightMediaScanner::processFile(
- const char *path, const char *mimeType,
- MediaScannerClient &client) {
- client.setLocale(locale());
- client.beginFile();
- client.endFile();
-
- return OK;
-}
-
-char *StagefrightMediaScanner::extractAlbumArt(int fd) {
- return NULL;
-}
-
-} // namespace android
diff --git a/media/libmediaplayerservice/Android.mk b/media/libmediaplayerservice/Android.mk
index 5e59710..d51ab30 100644
--- a/media/libmediaplayerservice/Android.mk
+++ b/media/libmediaplayerservice/Android.mk
@@ -19,7 +19,6 @@
ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
LOCAL_SRC_FILES += \
- StagefrightMetadataRetriever.cpp \
StagefrightPlayer.cpp \
StagefrightRecorder.cpp
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 8e71700..6563caa 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -721,9 +721,13 @@
}
if (!strncasecmp(url, "http://", 7)) {
- // For now, we're going to use PV for http-based playback,
- // until we can clear up a few more issues.
- return PV_PLAYER;
+ char value[PROPERTY_VALUE_MAX];
+ if (!property_get("media.stagefright.enable-http", value, NULL)
+ || (strcmp(value, "1") && strcasecmp(value, "true"))) {
+ // For now, we're going to use PV for http-based playback
+ // by default until we can clear up a few more issues.
+ return PV_PLAYER;
+ }
}
return getDefaultPlayerType();
@@ -1254,22 +1258,24 @@
static const int NUMVIZBUF = 32;
static const int VIZBUFFRAMES = 1024;
-static const int TOTALBUFTIMEMSEC = NUMVIZBUF * VIZBUFFRAMES * 1000 / 44100;
+static const int BUFTIMEMSEC = NUMVIZBUF * VIZBUFFRAMES * 1000 / 44100;
+static const int TOTALBUFTIMEMSEC = NUMVIZBUF * BUFTIMEMSEC;
static bool gotMem = false;
+static sp<MemoryHeapBase> heap;
static sp<MemoryBase> mem[NUMVIZBUF];
-static uint64_t timeStamp[NUMVIZBUF];
+static uint64_t endTime;
static uint64_t lastReadTime;
static uint64_t lastWriteTime;
static int writeIdx = 0;
static void allocVizBufs() {
if (!gotMem) {
+ heap = new MemoryHeapBase(NUMVIZBUF * VIZBUFFRAMES * 2, 0, "snooper");
for (int i=0;i<NUMVIZBUF;i++) {
- sp<MemoryHeapBase> heap = new MemoryHeapBase(VIZBUFFRAMES*2, 0, "snooper");
- mem[i] = new MemoryBase(heap, 0, heap->getSize());
- timeStamp[i] = 0;
+ mem[i] = new MemoryBase(heap, VIZBUFFRAMES * 2 * i, VIZBUFFRAMES * 2);
}
+ endTime = 0;
gotMem = true;
}
}
@@ -1286,68 +1292,48 @@
allocVizBufs();
- lastReadTime = uptimeMillis() + 100; // account for renderer delay (we shouldn't be doing this here)
+ lastReadTime = uptimeMillis();
// if there is no recent buffer (yet), just return empty handed
if (lastWriteTime + TOTALBUFTIMEMSEC < lastReadTime) {
- //LOGI("@@@@ no audio data to look at yet");
+ //LOGI("@@@@ no audio data to look at yet: %d + %d < %d", (int)lastWriteTime, TOTALBUFTIMEMSEC, (int)lastReadTime);
return NULL;
}
- char buf[200];
-
- int closestIdx = -1;
- uint32_t closestTime = 0x7ffffff;
-
- for (int i = 0; i < NUMVIZBUF; i++) {
- uint64_t tsi = timeStamp[i];
- uint64_t diff = tsi > lastReadTime ? tsi - lastReadTime : lastReadTime - tsi;
- if (diff < closestTime) {
- closestIdx = i;
- closestTime = diff;
- }
+ int timedelta = endTime - lastReadTime;
+ if (timedelta < 0) timedelta = 0;
+ int framedelta = timedelta * 44100 / 1000;
+ int headIdx = (writeIdx - framedelta) / VIZBUFFRAMES - 1;
+ while (headIdx < 0) {
+ headIdx += NUMVIZBUF;
}
-
-
- if (closestIdx >= 0) {
- //LOGI("@@@ return buffer %d, %d/%d", closestIdx, uint32_t(lastReadTime), uint32_t(timeStamp[closestIdx]));
- return mem[closestIdx];
- }
-
- // we won't get here, since we either bailed out early, or got a buffer
- LOGD("Didn't expect to be here");
- return NULL;
+ return mem[headIdx];
}
-static void storeVizBuf(const void *data, int len, uint64_t time) {
- // Copy the data in to the visualizer buffer
- // Assume a 16 bit stereo source for now.
- short *viz = (short*)mem[writeIdx]->pointer();
- short *src = (short*)data;
- for (int i = 0; i < VIZBUFFRAMES; i++) {
- // Degrade quality by mixing to mono and clearing the lowest 3 bits.
- // This should still be good enough for a visualization
- *viz++ = ((int(src[0]) + int(src[1])) >> 1) & ~0x7;
- src += 2;
- }
- timeStamp[writeIdx++] = time;
- if (writeIdx >= NUMVIZBUF) {
- writeIdx = 0;
- }
-}
-
+// Append the data to the vizualization buffer
static void makeVizBuffers(const char *data, int len, uint64_t time) {
allocVizBufs();
uint64_t startTime = time;
const int frameSize = 4; // 16 bit stereo sample is 4 bytes
- while (len >= VIZBUFFRAMES * frameSize) {
- storeVizBuf(data, len, time);
- data += VIZBUFFRAMES * frameSize;
- len -= VIZBUFFRAMES * frameSize;
- time += 1000 * VIZBUFFRAMES / 44100;
+ int offset = writeIdx;
+ int maxoff = heap->getSize() / 2; // in shorts
+ short *base = (short*)heap->getBase();
+ short *src = (short*)data;
+ while (len > 0) {
+
+ // Degrade quality by mixing to mono and clearing the lowest 3 bits.
+ // This should still be good enough for a visualization
+ base[offset++] = ((int(src[0]) + int(src[1])) >> 1) & ~0x7;
+ src += 2;
+ len -= frameSize;
+ if (offset >= maxoff) {
+ offset = 0;
+ }
}
+ writeIdx = offset;
+ endTime = time + (len / frameSize) / 44;
//LOGI("@@@ stored buffers from %d to %d", uint32_t(startTime), uint32_t(time));
}
@@ -1505,30 +1491,35 @@
}
}
+void MediaPlayerService::AudioOutput::snoopWrite(const void* buffer, size_t size) {
+ // Only make visualization buffers if anyone recently requested visualization data
+ uint64_t now = uptimeMillis();
+ if (lastReadTime + TOTALBUFTIMEMSEC >= now) {
+ // Based on the current play counter, the number of frames written and
+ // the current real time we can calculate the approximate real start
+ // time of the buffer we're about to write.
+ uint32_t pos;
+ mTrack->getPosition(&pos);
+
+ // we're writing ahead by this many frames:
+ int ahead = mNumFramesWritten - pos;
+ //LOGI("@@@ written: %d, playpos: %d, latency: %d", mNumFramesWritten, pos, mTrack->latency());
+ // which is this many milliseconds, assuming 44100 Hz:
+ ahead /= 44;
+
+ makeVizBuffers((const char*)buffer, size, now + ahead + mTrack->latency());
+ lastWriteTime = now;
+ }
+}
+
+
ssize_t MediaPlayerService::AudioOutput::write(const void* buffer, size_t size)
{
LOG_FATAL_IF(mCallback != NULL, "Don't call write if supplying a callback.");
//LOGV("write(%p, %u)", buffer, size);
if (mTrack) {
- // Only make visualization buffers if anyone recently requested visualization data
- uint64_t now = uptimeMillis();
- if (lastReadTime + TOTALBUFTIMEMSEC >= now) {
- // Based on the current play counter, the number of frames written and
- // the current real time we can calculate the approximate real start
- // time of the buffer we're about to write.
- uint32_t pos;
- mTrack->getPosition(&pos);
-
- // we're writing ahead by this many frames:
- int ahead = mNumFramesWritten - pos;
- //LOGI("@@@ written: %d, playpos: %d, latency: %d", mNumFramesWritten, pos, mTrack->latency());
- // which is this many milliseconds, assuming 44100 Hz:
- ahead /= 44;
-
- makeVizBuffers((const char*)buffer, size, now + ahead + mTrack->latency());
- lastWriteTime = now;
- }
+ snoopWrite(buffer, size);
ssize_t ret = mTrack->write(buffer, size);
mNumFramesWritten += ret / 4; // assume 16 bit stereo
return ret;
@@ -1576,6 +1567,7 @@
// static
void MediaPlayerService::AudioOutput::CallbackWrapper(
int event, void *cookie, void *info) {
+ //LOGV("callbackwrapper");
if (event != AudioTrack::EVENT_MORE_DATA) {
return;
}
@@ -1585,6 +1577,7 @@
(*me->mCallback)(
me, buffer->raw, buffer->size, me->mCallbackCookie);
+ me->snoopWrite(buffer->raw, buffer->size);
}
#undef LOG_TAG
diff --git a/media/libmediaplayerservice/MediaPlayerService.h b/media/libmediaplayerservice/MediaPlayerService.h
index 1c90cf9..d1206b4 100644
--- a/media/libmediaplayerservice/MediaPlayerService.h
+++ b/media/libmediaplayerservice/MediaPlayerService.h
@@ -113,6 +113,7 @@
public: // visualization hack support
uint32_t mNumFramesWritten;
+ void snoopWrite(const void*, size_t);
};
class AudioCache : public MediaPlayerBase::AudioSink
diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
index 3572b52..66de2ee 100644
--- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp
+++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
@@ -27,6 +27,7 @@
#include <string.h>
#include <cutils/atomic.h>
+#include <cutils/properties.h>
#include <binder/MemoryDealer.h>
#include <android_runtime/ActivityManager.h>
#include <binder/IPCThreadState.h>
@@ -107,14 +108,17 @@
switch (playerType) {
#if BUILD_WITH_FULL_STAGEFRIGHT
case STAGEFRIGHT_PLAYER:
- // For now we are going to keep using PV for meta-data support
- // until stagefright is up to par.
+ {
+ char value[PROPERTY_VALUE_MAX];
+ if (property_get("media.stagefright.enable-meta", value, NULL)
+ && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
+ LOGV("create StagefrightMetadataRetriever");
+ p = new StagefrightMetadataRetriever;
+ break;
+ }
- // LOGV("create StagefrightMetadataRetriever");
- // p = new StagefrightMetadataRetriever;
- // break;
-
- // fall through to PV_PLAYER
+ // fall through
+ }
#endif
#ifndef NO_OPENCORE
case PV_PLAYER:
diff --git a/media/libmediaplayerservice/StagefrightMetadataRetriever.cpp b/media/libmediaplayerservice/StagefrightMetadataRetriever.cpp
deleted file mode 100644
index 42c1877..0000000
--- a/media/libmediaplayerservice/StagefrightMetadataRetriever.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
-**
-** Copyright 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.
-*/
-
-//#define LOG_NDEBUG 0
-#define LOG_TAG "StagefrightMetadataRetriever"
-#include <utils/Log.h>
-
-#include "StagefrightMetadataRetriever.h"
-
-#include <media/stagefright/CachingDataSource.h>
-#include <media/stagefright/ColorConverter.h>
-#include <media/stagefright/DataSource.h>
-#include <media/stagefright/FileSource.h>
-#include <media/stagefright/HTTPDataSource.h>
-#include <media/stagefright/MediaDebug.h>
-#include <media/stagefright/MediaExtractor.h>
-#include <media/stagefright/MetaData.h>
-#include <media/stagefright/OMXCodec.h>
-
-namespace android {
-
-StagefrightMetadataRetriever::StagefrightMetadataRetriever() {
- LOGV("StagefrightMetadataRetriever()");
-
- DataSource::RegisterDefaultSniffers();
- CHECK_EQ(mClient.connect(), OK);
-}
-
-StagefrightMetadataRetriever::~StagefrightMetadataRetriever() {
- LOGV("~StagefrightMetadataRetriever()");
- mClient.disconnect();
-}
-
-status_t StagefrightMetadataRetriever::setDataSource(const char *uri) {
- LOGV("setDataSource(%s)", uri);
-
- mExtractor = MediaExtractor::CreateFromURI(uri);
-
- return mExtractor.get() != NULL ? OK : UNKNOWN_ERROR;
-}
-
-status_t StagefrightMetadataRetriever::setDataSource(
- int fd, int64_t offset, int64_t length) {
- LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length);
-
- mExtractor = MediaExtractor::Create(
- new FileSource(fd, offset, length));
-
- return OK;
-}
-
-VideoFrame *StagefrightMetadataRetriever::captureFrame() {
- LOGV("captureFrame");
-
- if (mExtractor.get() == NULL) {
- LOGV("no extractor.");
- return NULL;
- }
-
- size_t n = mExtractor->countTracks();
- size_t i;
- for (i = 0; i < n; ++i) {
- sp<MetaData> meta = mExtractor->getTrackMetaData(i);
-
- const char *mime;
- CHECK(meta->findCString(kKeyMIMEType, &mime));
-
- if (!strncasecmp(mime, "video/", 6)) {
- break;
- }
- }
-
- if (i == n) {
- LOGV("no video track found.");
- return NULL;
- }
-
- sp<MetaData> trackMeta = mExtractor->getTrackMetaData(
- i, MediaExtractor::kIncludeExtensiveMetaData);
-
- sp<MediaSource> source = mExtractor->getTrack(i);
-
- if (source.get() == NULL) {
- LOGV("unable to instantiate video track.");
- return NULL;
- }
-
- sp<MetaData> meta = source->getFormat();
-
- sp<MediaSource> decoder =
- OMXCodec::Create(
- mClient.interface(), meta, false, source,
- NULL, OMXCodec::kPreferSoftwareCodecs);
-
- if (decoder.get() == NULL) {
- LOGV("unable to instantiate video decoder.");
-
- return NULL;
- }
-
- decoder->start();
-
- // Read one output buffer, ignore format change notifications
- // and spurious empty buffers.
-
- MediaSource::ReadOptions options;
- int64_t thumbNailTime;
- if (trackMeta->findInt64(kKeyThumbnailTime, &thumbNailTime)) {
- options.setSeekTo(thumbNailTime);
- }
-
- MediaBuffer *buffer = NULL;
- status_t err;
- do {
- if (buffer != NULL) {
- buffer->release();
- buffer = NULL;
- }
- err = decoder->read(&buffer, &options);
- options.clearSeekTo();
- } while (err == INFO_FORMAT_CHANGED
- || (buffer != NULL && buffer->range_length() == 0));
-
- if (err != OK) {
- CHECK_EQ(buffer, NULL);
-
- LOGV("decoding frame failed.");
- decoder->stop();
-
- return NULL;
- }
-
- LOGV("successfully decoded video frame.");
-
- meta = decoder->getFormat();
-
- int32_t width, height;
- CHECK(meta->findInt32(kKeyWidth, &width));
- CHECK(meta->findInt32(kKeyHeight, &height));
-
- VideoFrame *frame = new VideoFrame;
- frame->mWidth = width;
- frame->mHeight = height;
- frame->mDisplayWidth = width;
- frame->mDisplayHeight = height;
- frame->mSize = width * height * 2;
- frame->mData = new uint8_t[frame->mSize];
-
- int32_t srcFormat;
- CHECK(meta->findInt32(kKeyColorFormat, &srcFormat));
-
- ColorConverter converter(
- (OMX_COLOR_FORMATTYPE)srcFormat, OMX_COLOR_Format16bitRGB565);
- CHECK(converter.isValid());
-
- converter.convert(
- width, height,
- (const uint8_t *)buffer->data() + buffer->range_offset(),
- 0,
- frame->mData, width * 2);
-
- buffer->release();
- buffer = NULL;
-
- decoder->stop();
-
- return frame;
-}
-
-MediaAlbumArt *StagefrightMetadataRetriever::extractAlbumArt() {
- LOGV("extractAlbumArt (extractor: %s)", mExtractor.get() != NULL ? "YES" : "NO");
-
- return NULL;
-}
-
-const char *StagefrightMetadataRetriever::extractMetadata(int keyCode) {
- LOGV("extractMetadata %d (extractor: %s)",
- keyCode, mExtractor.get() != NULL ? "YES" : "NO");
-
- return NULL;
-}
-
-} // namespace android
diff --git a/media/libmediaplayerservice/StagefrightMetadataRetriever.h b/media/libmediaplayerservice/StagefrightMetadataRetriever.h
deleted file mode 100644
index 16127d7..0000000
--- a/media/libmediaplayerservice/StagefrightMetadataRetriever.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-**
-** Copyright 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.
-*/
-
-#ifndef STAGEFRIGHT_METADATA_RETRIEVER_H_
-
-#define STAGEFRIGHT_METADATA_RETRIEVER_H_
-
-#include <media/MediaMetadataRetrieverInterface.h>
-
-#include <media/stagefright/OMXClient.h>
-
-namespace android {
-
-class MediaExtractor;
-
-struct StagefrightMetadataRetriever : public MediaMetadataRetrieverInterface {
- StagefrightMetadataRetriever();
- virtual ~StagefrightMetadataRetriever();
-
- virtual status_t setDataSource(const char *url);
- virtual status_t setDataSource(int fd, int64_t offset, int64_t length);
-
- virtual VideoFrame *captureFrame();
- virtual MediaAlbumArt *extractAlbumArt();
- virtual const char *extractMetadata(int keyCode);
-
-private:
- OMXClient mClient;
- sp<MediaExtractor> mExtractor;
-
- StagefrightMetadataRetriever(const StagefrightMetadataRetriever &);
-
- StagefrightMetadataRetriever &operator=(
- const StagefrightMetadataRetriever &);
-};
-
-} // namespace android
-
-#endif // STAGEFRIGHT_METADATA_RETRIEVER_H_
diff --git a/media/libstagefright/Android.mk b/media/libstagefright/Android.mk
index f7df69c..e36e78c 100644
--- a/media/libstagefright/Android.mk
+++ b/media/libstagefright/Android.mk
@@ -31,6 +31,8 @@
MediaExtractor.cpp \
SampleTable.cpp \
ShoutcastSource.cpp \
+ StagefrightMediaScanner.cpp \
+ StagefrightMetadataRetriever.cpp \
TimeSource.cpp \
TimedEventQueue.cpp \
WAVExtractor.cpp \
@@ -42,14 +44,17 @@
LOCAL_C_INCLUDES:= \
$(JNI_H_INCLUDE) \
$(TOP)/external/opencore/extern_libs_v2/khronos/openmax/include \
- $(TOP)/external/opencore/android
+ $(TOP)/external/opencore/android \
+ $(TOP)/external/tremor/Tremor
LOCAL_SHARED_LIBRARIES := \
libbinder \
libmedia \
libutils \
libcutils \
- libui
+ libui \
+ libsonivox \
+ libvorbisidec
ifeq ($(BUILD_WITH_FULL_STAGEFRIGHT),true)
@@ -60,7 +65,8 @@
libstagefright_amrwbdec \
libstagefright_avcdec \
libstagefright_m4vh263dec \
- libstagefright_mp3dec
+ libstagefright_mp3dec \
+ libstagefright_id3
LOCAL_SHARED_LIBRARIES += \
libstagefright_amrnb_common \
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp
index 4280683..14842c0 100644
--- a/media/libstagefright/AudioPlayer.cpp
+++ b/media/libstagefright/AudioPlayer.cpp
@@ -133,13 +133,14 @@
if (mAudioSink.get() != NULL) {
mAudioSink->stop();
+ mAudioSink->close();
} else {
mAudioTrack->stop();
delete mAudioTrack;
mAudioTrack = NULL;
}
-
+
// Make sure to release any buffer we hold onto so that the
// source is able to stop().
if (mInputBuffer != NULL) {
@@ -150,7 +151,7 @@
}
mSource->stop();
-
+
mNumFramesPlayed = 0;
mPositionTimeMediaUs = -1;
mPositionTimeRealUs = -1;
@@ -259,7 +260,7 @@
mInputBuffer->set_range(mInputBuffer->range_offset() + copy,
mInputBuffer->range_length() - copy);
-
+
size_done += copy;
size_remaining -= copy;
}
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 9e388f9..6bcdfba 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -26,11 +26,13 @@
#include <media/stagefright/DataSource.h>
#include <media/stagefright/FileSource.h>
#include <media/stagefright/MediaBuffer.h>
+#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaExtractor.h>
#include <media/stagefright/MediaDebug.h>
#include <media/stagefright/MediaSource.h>
#include <media/stagefright/MetaData.h>
#include <media/stagefright/OMXCodec.h>
+
namespace android {
struct AwesomeEvent : public TimedEventQueue::Event {
@@ -516,10 +518,19 @@
return UNKNOWN_ERROR;
}
- mAudioSource = OMXCodec::Create(
- mClient.interface(), source->getFormat(),
- false, // createEncoder
- source);
+ sp<MetaData> meta = source->getFormat();
+
+ const char *mime;
+ CHECK(meta->findCString(kKeyMIMEType, &mime));
+
+ if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_RAW)) {
+ mAudioSource = source;
+ } else {
+ mAudioSource = OMXCodec::Create(
+ mClient.interface(), source->getFormat(),
+ false, // createEncoder
+ source);
+ }
if (mAudioSource != NULL) {
int64_t durationUs;
diff --git a/media/libstagefright/DataSource.cpp b/media/libstagefright/DataSource.cpp
index 2a6dbc4..741e5e00 100644
--- a/media/libstagefright/DataSource.cpp
+++ b/media/libstagefright/DataSource.cpp
@@ -19,7 +19,10 @@
#include "include/MPEG4Extractor.h"
#include "include/WAVExtractor.h"
+#include <media/stagefright/CachingDataSource.h>
#include <media/stagefright/DataSource.h>
+#include <media/stagefright/FileSource.h>
+#include <media/stagefright/HTTPDataSource.h>
#include <media/stagefright/MediaErrors.h>
#include <utils/String8.h>
@@ -91,4 +94,24 @@
RegisterSniffer(SniffWAV);
}
+// static
+sp<DataSource> DataSource::CreateFromURI(const char *uri) {
+ sp<DataSource> source;
+ if (!strncasecmp("file://", uri, 7)) {
+ source = new FileSource(uri + 7);
+ } else if (!strncasecmp("http://", uri, 7)) {
+ source = new HTTPDataSource(uri);
+ source = new CachingDataSource(source, 64 * 1024, 10);
+ } else {
+ // Assume it's a filename.
+ source = new FileSource(uri);
+ }
+
+ if (source == NULL || source->initCheck() != OK) {
+ return NULL;
+ }
+
+ return source;
+}
+
} // namespace android
diff --git a/media/libstagefright/FileSource.cpp b/media/libstagefright/FileSource.cpp
index 37c2450..b6f1af2 100644
--- a/media/libstagefright/FileSource.cpp
+++ b/media/libstagefright/FileSource.cpp
@@ -58,7 +58,10 @@
}
int err = fseeko(mFile, offset + mOffset, SEEK_SET);
- CHECK(err != -1);
+ if (err < 0) {
+ LOGE("seek to %lld failed", offset + mOffset);
+ return UNKNOWN_ERROR;
+ }
return fread(data, 1, size, mFile);
}
diff --git a/media/libstagefright/HTTPDataSource.cpp b/media/libstagefright/HTTPDataSource.cpp
index 5536801..7e8bbc6 100644
--- a/media/libstagefright/HTTPDataSource.cpp
+++ b/media/libstagefright/HTTPDataSource.cpp
@@ -24,6 +24,69 @@
namespace android {
+// Given a connected HTTPStream, determine if the given path redirects
+// somewhere else, if so, disconnect the stream, update host path and port
+// accordingly and return true, otherwise return false and leave the stream
+// connected.
+static bool PerformRedirectIfNecessary(
+ HTTPStream *http, string *host, string *path, int *port) {
+ String8 request;
+ request.append("HEAD ");
+ request.append(path->c_str());
+ request.append(" HTTP/1.1\r\n");
+ request.append("Host: ");
+ request.append(host->c_str());
+ request.append("\r\n\r\n");
+
+ status_t err = http->send(request.string());
+
+ int http_status;
+ if (err == OK) {
+ err = http->receive_header(&http_status);
+ }
+
+ if (err != OK) {
+ return false;
+ }
+
+ if (http_status != 301 && http_status != 302) {
+ return false;
+ }
+
+ string location;
+ CHECK(http->find_header_value("Location", &location));
+
+ CHECK(string(location, 0, 7) == "http://");
+ location.erase(0, 7);
+ string::size_type slashPos = location.find('/');
+ if (slashPos == string::npos) {
+ slashPos = location.size();
+ location += '/';
+ }
+
+ http->disconnect();
+
+ LOGI("Redirecting to %s\n", location.c_str());
+
+ *host = string(location, 0, slashPos);
+
+ string::size_type colonPos = host->find(':');
+ if (colonPos != string::npos) {
+ const char *start = host->c_str() + colonPos + 1;
+ char *end;
+ long tmp = strtol(start, &end, 10);
+ CHECK(end > start && (*end == '\0'));
+
+ *port = (tmp >= 0 && tmp < 65536) ? (int)tmp : 80;
+ } else {
+ *port = 80;
+ }
+
+ *path = string(location, slashPos);
+
+ return true;
+}
+
HTTPDataSource::HTTPDataSource(const char *uri)
: mHttp(new HTTPStream),
mHost(NULL),
@@ -63,22 +126,44 @@
LOGI("Connecting to host '%s', port %d, path '%s'",
host.c_str(), port, path.c_str());
+ do {
+ mInitCheck = mHttp->connect(host.c_str(), port);
+
+ if (mInitCheck != OK) {
+ return;
+ }
+ } while (PerformRedirectIfNecessary(mHttp, &host, &path, &port));
+
mHost = strdup(host.c_str());
mPort = port;
mPath = strdup(path.c_str());
-
- mInitCheck = mHttp->connect(mHost, mPort);
}
-HTTPDataSource::HTTPDataSource(const char *host, int port, const char *path)
+HTTPDataSource::HTTPDataSource(const char *_host, int port, const char *_path)
: mHttp(new HTTPStream),
- mHost(strdup(host)),
- mPort(port),
- mPath(strdup(path)),
+ mHost(NULL),
+ mPort(0),
+ mPath(NULL),
mBuffer(malloc(kBufferSize)),
mBufferLength(0),
mBufferOffset(0) {
- mInitCheck = mHttp->connect(mHost, mPort);
+ string host = _host;
+ string path = _path;
+
+ LOGI("Connecting to host '%s', port %d, path '%s'",
+ host.c_str(), port, path.c_str());
+
+ do {
+ mInitCheck = mHttp->connect(host.c_str(), port);
+
+ if (mInitCheck != OK) {
+ return;
+ }
+ } while (PerformRedirectIfNecessary(mHttp, &host, &path, &port));
+
+ mHost = strdup(host.c_str());
+ mPort = port;
+ mPath = strdup(path.c_str());
}
status_t HTTPDataSource::initCheck() const {
@@ -91,8 +176,15 @@
free(mBuffer);
mBuffer = NULL;
- free(mPath);
- mPath = NULL;
+ if (mPath) {
+ free(mPath);
+ mPath = NULL;
+ }
+
+ if (mHost) {
+ free(mHost);
+ mHost = NULL;
+ }
delete mHttp;
mHttp = NULL;
diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp
index 14e6177..48130fc 100644
--- a/media/libstagefright/MP3Extractor.cpp
+++ b/media/libstagefright/MP3Extractor.cpp
@@ -20,6 +20,8 @@
#include "include/MP3Extractor.h"
+#include "include/ID3.h"
+
#include <media/stagefright/DataSource.h>
#include <media/stagefright/MediaBuffer.h>
#include <media/stagefright/MediaBufferGroup.h>
@@ -557,7 +559,7 @@
mStarted(false),
mByteNumber(byte_number),
mGroup(NULL) {
- memcpy (mTableOfContents, table_of_contents, strlen(table_of_contents));
+ memcpy (mTableOfContents, table_of_contents, sizeof(mTableOfContents));
}
MP3Source::~MP3Source() {
@@ -667,7 +669,7 @@
}
// Lost sync.
- LOGW("lost sync!\n");
+ LOGV("lost sync!\n");
off_t pos = mCurrentPos;
if (!Resync(mDataSource, mFixedHeader, &pos, NULL)) {
@@ -706,6 +708,65 @@
return OK;
}
+sp<MetaData> MP3Extractor::getMetaData() {
+ sp<MetaData> meta = new MetaData;
+
+ meta->setCString(kKeyMIMEType, "audio/mpeg");
+
+ ID3 id3(mDataSource);
+
+ if (!id3.isValid()) {
+ return meta;
+ }
+
+ struct Map {
+ int key;
+ const char *tag1;
+ const char *tag2;
+ };
+ static const Map kMap[] = {
+ { kKeyAlbum, "TALB", "TAL" },
+ { kKeyArtist, "TPE1", "TP1" },
+ { kKeyComposer, "TCOM", "TCM" },
+ { kKeyGenre, "TCON", "TCO" },
+ { kKeyTitle, "TIT2", "TT2" },
+ { kKeyYear, "TYE", "TYER" },
+ { kKeyAuthor, "TXT", "TEXT" },
+ { kKeyCDTrackNumber, "TRK", "TRCK" },
+ };
+ static const size_t kNumMapEntries = sizeof(kMap) / sizeof(kMap[0]);
+
+ for (size_t i = 0; i < kNumMapEntries; ++i) {
+ ID3::Iterator *it = new ID3::Iterator(id3, kMap[i].tag1);
+ if (it->done()) {
+ delete it;
+ it = new ID3::Iterator(id3, kMap[i].tag2);
+ }
+
+ if (it->done()) {
+ delete it;
+ continue;
+ }
+
+ String8 s;
+ it->getString(&s);
+ delete it;
+
+ meta->setCString(kMap[i].key, s);
+ }
+
+ size_t dataSize;
+ String8 mime;
+ const void *data = id3.getAlbumArt(&dataSize, &mime);
+
+ if (data) {
+ meta->setData(kKeyAlbumArt, MetaData::TYPE_NONE, data, dataSize);
+ meta->setCString(kKeyAlbumArtMIME, mime.string());
+ }
+
+ return meta;
+}
+
bool SniffMP3(
const sp<DataSource> &source, String8 *mimeType, float *confidence) {
off_t pos = 0;
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 143e8ee..b340b29 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -66,6 +66,8 @@
uint32_t mCurrentSampleIndex;
bool mIsAVC;
+ size_t mNALLengthSize;
+
bool mStarted;
MediaBufferGroup *mGroup;
@@ -76,6 +78,8 @@
uint8_t *mSrcBuffer;
+ size_t parseNALSize(const uint8_t *data) const;
+
MPEG4Source(const MPEG4Source &);
MPEG4Source &operator=(const MPEG4Source &);
};
@@ -770,6 +774,7 @@
mSampleTable(sampleTable),
mCurrentSampleIndex(0),
mIsAVC(false),
+ mNALLengthSize(0),
mStarted(false),
mGroup(NULL),
mBuffer(NULL),
@@ -780,6 +785,21 @@
CHECK(success);
mIsAVC = !strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_AVC);
+
+ if (mIsAVC) {
+ uint32_t type;
+ const void *data;
+ size_t size;
+ CHECK(format->findData(kKeyAVCC, &type, &data, &size));
+
+ const uint8_t *ptr = (const uint8_t *)data;
+
+ CHECK(size >= 7);
+ CHECK_EQ(ptr[0], 1); // configurationVersion == 1
+
+ // The number of bytes used to encode the length of a NAL unit.
+ mNALLengthSize = 1 + (ptr[4] & 3);
+ }
}
MPEG4Source::~MPEG4Source() {
@@ -837,6 +857,25 @@
return mFormat;
}
+size_t MPEG4Source::parseNALSize(const uint8_t *data) const {
+ switch (mNALLengthSize) {
+ case 1:
+ return *data;
+ case 2:
+ return U16_AT(data);
+ case 3:
+ return ((size_t)data[0] << 16) | U16_AT(&data[1]);
+ case 4:
+ return U32_AT(data);
+ }
+
+ // This cannot happen, mNALLengthSize springs to life by adding 1 to
+ // a 2-bit integer.
+ CHECK(!"Should not be here.");
+
+ return 0;
+}
+
status_t MPEG4Source::read(
MediaBuffer **out, const ReadOptions *options) {
CHECK(mStarted);
@@ -919,21 +958,20 @@
// Each NAL unit is split up into its constituent fragments and
// each one of them returned in its own buffer.
- CHECK(mBuffer->range_length() >= 2);
+ CHECK(mBuffer->range_length() >= mNALLengthSize);
const uint8_t *src =
(const uint8_t *)mBuffer->data() + mBuffer->range_offset();
- size_t nal_size = U16_AT(src);
-
- CHECK(mBuffer->range_length() >= 2 + nal_size);
+ size_t nal_size = parseNALSize(src);
+ CHECK(mBuffer->range_length() >= mNALLengthSize + nal_size);
MediaBuffer *clone = mBuffer->clone();
- clone->set_range(mBuffer->range_offset() + 2, nal_size);
+ clone->set_range(mBuffer->range_offset() + mNALLengthSize, nal_size);
mBuffer->set_range(
- mBuffer->range_offset() + 2 + nal_size,
- mBuffer->range_length() - 2 - nal_size);
+ mBuffer->range_offset() + mNALLengthSize + nal_size,
+ mBuffer->range_length() - mNALLengthSize - nal_size);
if (mBuffer->range_length() == 0) {
mBuffer->release();
@@ -960,12 +998,12 @@
uint8_t *dstData = (uint8_t *)mBuffer->data();
size_t srcOffset = 0;
size_t dstOffset = 0;
+
while (srcOffset < size) {
- CHECK(srcOffset + 1 < size);
- size_t nalLength =
- (mSrcBuffer[srcOffset] << 8) | mSrcBuffer[srcOffset + 1];
- CHECK(srcOffset + 1 + nalLength < size);
- srcOffset += 2;
+ CHECK(srcOffset + mNALLengthSize <= size);
+ size_t nalLength = parseNALSize(&mSrcBuffer[srcOffset]);
+ srcOffset += mNALLengthSize;
+ CHECK(srcOffset + nalLength <= size);
if (nalLength == 0) {
continue;
@@ -981,6 +1019,7 @@
srcOffset += nalLength;
dstOffset += nalLength;
}
+ CHECK_EQ(srcOffset, size);
mBuffer->set_range(0, dstOffset);
mBuffer->meta_data()->clear();
diff --git a/media/libstagefright/MediaExtractor.cpp b/media/libstagefright/MediaExtractor.cpp
index 9d3deb7..e46f00e 100644
--- a/media/libstagefright/MediaExtractor.cpp
+++ b/media/libstagefright/MediaExtractor.cpp
@@ -23,16 +23,18 @@
#include "include/MPEG4Extractor.h"
#include "include/WAVExtractor.h"
-#include <media/stagefright/CachingDataSource.h>
#include <media/stagefright/DataSource.h>
-#include <media/stagefright/FileSource.h>
-#include <media/stagefright/HTTPDataSource.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaExtractor.h>
+#include <media/stagefright/MetaData.h>
#include <utils/String8.h>
namespace android {
+sp<MetaData> MediaExtractor::getMetaData() {
+ return new MetaData;
+}
+
// static
sp<MediaExtractor> MediaExtractor::Create(
const sp<DataSource> &source, const char *mime) {
@@ -40,7 +42,7 @@
if (mime == NULL) {
float confidence;
if (!source->sniff(&tmp, &confidence)) {
- LOGE("FAILED to autodetect media content.");
+ LOGV("FAILED to autodetect media content.");
return NULL;
}
@@ -68,16 +70,7 @@
// static
sp<MediaExtractor> MediaExtractor::CreateFromURI(
const char *uri, const char *mime) {
- sp<DataSource> source;
- if (!strncasecmp("file://", uri, 7)) {
- source = new FileSource(uri + 7);
- } else if (!strncasecmp("http://", uri, 7)) {
- source = new HTTPDataSource(uri);
- source = new CachingDataSource(source, 64 * 1024, 10);
- } else {
- // Assume it's a filename.
- source = new FileSource(uri);
- }
+ sp<DataSource> source = DataSource::CreateFromURI(uri);
if (source == NULL || source->initCheck() != OK) {
return NULL;
diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp
new file mode 100644
index 0000000..4815db2
--- /dev/null
+++ b/media/libstagefright/StagefrightMediaScanner.cpp
@@ -0,0 +1,239 @@
+/*
+ * 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.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "StagefrightMediaScanner"
+#include <utils/Log.h>
+
+#include <media/stagefright/StagefrightMediaScanner.h>
+
+#include "include/StagefrightMetadataRetriever.h"
+
+// Sonivox includes
+#include <libsonivox/eas.h>
+
+// Ogg Vorbis includes
+#include "ivorbiscodec.h"
+#include "ivorbisfile.h"
+
+namespace android {
+
+StagefrightMediaScanner::StagefrightMediaScanner()
+ : mRetriever(new StagefrightMetadataRetriever) {
+}
+
+StagefrightMediaScanner::~StagefrightMediaScanner() {}
+
+static bool FileHasAcceptableExtension(const char *extension) {
+ static const char *kValidExtensions[] = {
+ ".mp3", ".mp4", ".m4a", ".3gp", ".3gpp", ".3g2", ".3gpp2",
+ ".mpeg", ".ogg", ".mid", ".smf", ".imy", ".wma", ".aac",
+ ".wav", ".amr", ".midi", ".xmf", ".rtttl", ".rtx", ".ota"
+ };
+ static const size_t kNumValidExtensions =
+ sizeof(kValidExtensions) / sizeof(kValidExtensions[0]);
+
+ for (size_t i = 0; i < kNumValidExtensions; ++i) {
+ if (!strcasecmp(extension, kValidExtensions[i])) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+static status_t HandleMIDI(
+ const char *filename, MediaScannerClient *client) {
+ // get the library configuration and do sanity check
+ const S_EAS_LIB_CONFIG* pLibConfig = EAS_Config();
+ if ((pLibConfig == NULL) || (LIB_VERSION != pLibConfig->libVersion)) {
+ LOGE("EAS library/header mismatch\n");
+ return UNKNOWN_ERROR;
+ }
+ EAS_I32 temp;
+
+ // spin up a new EAS engine
+ EAS_DATA_HANDLE easData = NULL;
+ EAS_HANDLE easHandle = NULL;
+ EAS_RESULT result = EAS_Init(&easData);
+ if (result == EAS_SUCCESS) {
+ EAS_FILE file;
+ file.path = filename;
+ file.fd = 0;
+ file.offset = 0;
+ file.length = 0;
+ result = EAS_OpenFile(easData, &file, &easHandle);
+ }
+ if (result == EAS_SUCCESS) {
+ result = EAS_Prepare(easData, easHandle);
+ }
+ if (result == EAS_SUCCESS) {
+ result = EAS_ParseMetaData(easData, easHandle, &temp);
+ }
+ if (easHandle) {
+ EAS_CloseFile(easData, easHandle);
+ }
+ if (easData) {
+ EAS_Shutdown(easData);
+ }
+
+ if (result != EAS_SUCCESS) {
+ return UNKNOWN_ERROR;
+ }
+
+ char buffer[20];
+ sprintf(buffer, "%ld", temp);
+ if (!client->addStringTag("duration", buffer)) return UNKNOWN_ERROR;
+
+ return OK;
+}
+
+static status_t HandleOGG(
+ const char *filename, MediaScannerClient *client) {
+ int duration;
+
+ FILE *file = fopen(filename,"r");
+ if (!file)
+ return UNKNOWN_ERROR;
+
+ OggVorbis_File vf;
+ if (ov_open(file, &vf, NULL, 0) < 0) {
+ return UNKNOWN_ERROR;
+ }
+
+ char **ptr=ov_comment(&vf,-1)->user_comments;
+ while(*ptr){
+ char *val = strstr(*ptr, "=");
+ if (val) {
+ int keylen = val++ - *ptr;
+ char key[keylen + 1];
+ strncpy(key, *ptr, keylen);
+ key[keylen] = 0;
+ if (!client->addStringTag(key, val)) goto failure;
+ }
+ ++ptr;
+ }
+
+ // Duration
+ duration = ov_time_total(&vf, -1);
+ if (duration > 0) {
+ char buffer[20];
+ sprintf(buffer, "%d", duration);
+ if (!client->addStringTag("duration", buffer)) goto failure;
+ }
+
+ ov_clear(&vf); // this also closes the FILE
+ return OK;
+
+failure:
+ ov_clear(&vf); // this also closes the FILE
+ return UNKNOWN_ERROR;
+}
+
+status_t StagefrightMediaScanner::processFile(
+ const char *path, const char *mimeType,
+ MediaScannerClient &client) {
+ client.setLocale(locale());
+ client.beginFile();
+
+ const char *extension = strrchr(path, '.');
+
+ if (!extension) {
+ return UNKNOWN_ERROR;
+ }
+
+ if (!FileHasAcceptableExtension(extension)) {
+ client.endFile();
+
+ return UNKNOWN_ERROR;
+ }
+
+ if (!strcasecmp(extension, ".mid")
+ || !strcasecmp(extension, ".smf")
+ || !strcasecmp(extension, ".imy")
+ || !strcasecmp(extension, ".midi")
+ || !strcasecmp(extension, ".xmf")
+ || !strcasecmp(extension, ".rtttl")
+ || !strcasecmp(extension, ".rtx")
+ || !strcasecmp(extension, ".ota")) {
+ return HandleMIDI(path, &client);
+ }
+
+ if (!strcasecmp(extension, ".ogg")) {
+ return HandleOGG(path, &client);
+ }
+
+ if (mRetriever->setDataSource(path) == OK
+ && mRetriever->setMode(
+ METADATA_MODE_METADATA_RETRIEVAL_ONLY) == OK) {
+ struct KeyMap {
+ const char *tag;
+ int key;
+ };
+ static const KeyMap kKeyMap[] = {
+ { "tracknumber", METADATA_KEY_CD_TRACK_NUMBER },
+ { "album", METADATA_KEY_ALBUM },
+ { "artist", METADATA_KEY_ARTIST },
+ { "composer", METADATA_KEY_COMPOSER },
+ { "genre", METADATA_KEY_GENRE },
+ { "title", METADATA_KEY_TITLE },
+ { "year", METADATA_KEY_YEAR },
+ { "duration", METADATA_KEY_DURATION },
+ { "writer", METADATA_KEY_WRITER },
+ };
+ static const size_t kNumEntries = sizeof(kKeyMap) / sizeof(kKeyMap[0]);
+
+ for (size_t i = 0; i < kNumEntries; ++i) {
+ const char *value;
+ if ((value = mRetriever->extractMetadata(kKeyMap[i].key)) != NULL) {
+ client.addStringTag(kKeyMap[i].tag, value);
+ }
+ }
+ }
+
+ client.endFile();
+
+ return OK;
+}
+
+char *StagefrightMediaScanner::extractAlbumArt(int fd) {
+ off_t size = lseek(fd, 0, SEEK_END);
+ if (size < 0) {
+ return NULL;
+ }
+ lseek(fd, 0, SEEK_SET);
+
+ if (mRetriever->setDataSource(fd, 0, size) == OK
+ && mRetriever->setMode(
+ METADATA_MODE_FRAME_CAPTURE_ONLY) == OK) {
+ MediaAlbumArt *art = mRetriever->extractAlbumArt();
+
+ if (art != NULL) {
+ char *data = (char *)malloc(art->mSize + 4);
+ *(int32_t *)data = art->mSize;
+ memcpy(&data[4], art->mData, art->mSize);
+
+ delete art;
+ art = NULL;
+
+ return data;
+ }
+ }
+
+ return NULL;
+}
+
+} // namespace android
diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp
new file mode 100644
index 0000000..4cc56e3
--- /dev/null
+++ b/media/libstagefright/StagefrightMetadataRetriever.cpp
@@ -0,0 +1,334 @@
+/*
+ * 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.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "StagefrightMetadataRetriever"
+#include <utils/Log.h>
+
+#include "include/StagefrightMetadataRetriever.h"
+
+#include <media/stagefright/CachingDataSource.h>
+#include <media/stagefright/ColorConverter.h>
+#include <media/stagefright/DataSource.h>
+#include <media/stagefright/FileSource.h>
+#include <media/stagefright/HTTPDataSource.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/MediaExtractor.h>
+#include <media/stagefright/MetaData.h>
+#include <media/stagefright/OMXCodec.h>
+
+namespace android {
+
+StagefrightMetadataRetriever::StagefrightMetadataRetriever()
+ : mParsedMetaData(false),
+ mAlbumArt(NULL) {
+ LOGV("StagefrightMetadataRetriever()");
+
+ DataSource::RegisterDefaultSniffers();
+ CHECK_EQ(mClient.connect(), OK);
+}
+
+StagefrightMetadataRetriever::~StagefrightMetadataRetriever() {
+ LOGV("~StagefrightMetadataRetriever()");
+
+ delete mAlbumArt;
+ mAlbumArt = NULL;
+
+ mClient.disconnect();
+}
+
+status_t StagefrightMetadataRetriever::setDataSource(const char *uri) {
+ LOGV("setDataSource(%s)", uri);
+
+ mParsedMetaData = false;
+ mMetaData.clear();
+ delete mAlbumArt;
+ mAlbumArt = NULL;
+
+ mSource = DataSource::CreateFromURI(uri);
+
+ if (mSource == NULL) {
+ return UNKNOWN_ERROR;
+ }
+
+ mExtractor = MediaExtractor::Create(mSource);
+
+ if (mExtractor == NULL) {
+ mSource.clear();
+
+ return UNKNOWN_ERROR;
+ }
+
+ return OK;
+}
+
+// Warning caller retains ownership of the filedescriptor! Dup it if necessary.
+status_t StagefrightMetadataRetriever::setDataSource(
+ int fd, int64_t offset, int64_t length) {
+ fd = dup(fd);
+
+ LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length);
+
+ mParsedMetaData = false;
+ mMetaData.clear();
+ delete mAlbumArt;
+ mAlbumArt = NULL;
+
+ mSource = new FileSource(fd, offset, length);
+
+ status_t err;
+ if ((err = mSource->initCheck()) != OK) {
+ mSource.clear();
+
+ return err;
+ }
+
+ mExtractor = MediaExtractor::Create(mSource);
+
+ if (mExtractor == NULL) {
+ mSource.clear();
+
+ return UNKNOWN_ERROR;
+ }
+
+ return OK;
+}
+
+VideoFrame *StagefrightMetadataRetriever::captureFrame() {
+ LOGV("captureFrame");
+
+ if (mExtractor.get() == NULL) {
+ LOGV("no extractor.");
+ return NULL;
+ }
+
+ size_t n = mExtractor->countTracks();
+ size_t i;
+ for (i = 0; i < n; ++i) {
+ sp<MetaData> meta = mExtractor->getTrackMetaData(i);
+
+ const char *mime;
+ CHECK(meta->findCString(kKeyMIMEType, &mime));
+
+ if (!strncasecmp(mime, "video/", 6)) {
+ break;
+ }
+ }
+
+ if (i == n) {
+ LOGV("no video track found.");
+ return NULL;
+ }
+
+ sp<MetaData> trackMeta = mExtractor->getTrackMetaData(
+ i, MediaExtractor::kIncludeExtensiveMetaData);
+
+ sp<MediaSource> source = mExtractor->getTrack(i);
+
+ if (source.get() == NULL) {
+ LOGV("unable to instantiate video track.");
+ return NULL;
+ }
+
+ sp<MetaData> meta = source->getFormat();
+
+ sp<MediaSource> decoder =
+ OMXCodec::Create(
+ mClient.interface(), meta, false, source,
+ NULL, OMXCodec::kPreferSoftwareCodecs);
+
+ if (decoder.get() == NULL) {
+ LOGV("unable to instantiate video decoder.");
+
+ return NULL;
+ }
+
+ decoder->start();
+
+ // Read one output buffer, ignore format change notifications
+ // and spurious empty buffers.
+
+ MediaSource::ReadOptions options;
+ int64_t thumbNailTime;
+ if (trackMeta->findInt64(kKeyThumbnailTime, &thumbNailTime)) {
+ options.setSeekTo(thumbNailTime);
+ }
+
+ MediaBuffer *buffer = NULL;
+ status_t err;
+ do {
+ if (buffer != NULL) {
+ buffer->release();
+ buffer = NULL;
+ }
+ err = decoder->read(&buffer, &options);
+ options.clearSeekTo();
+ } while (err == INFO_FORMAT_CHANGED
+ || (buffer != NULL && buffer->range_length() == 0));
+
+ if (err != OK) {
+ CHECK_EQ(buffer, NULL);
+
+ LOGV("decoding frame failed.");
+ decoder->stop();
+
+ return NULL;
+ }
+
+ LOGV("successfully decoded video frame.");
+
+ meta = decoder->getFormat();
+
+ int32_t width, height;
+ CHECK(meta->findInt32(kKeyWidth, &width));
+ CHECK(meta->findInt32(kKeyHeight, &height));
+
+ VideoFrame *frame = new VideoFrame;
+ frame->mWidth = width;
+ frame->mHeight = height;
+ frame->mDisplayWidth = width;
+ frame->mDisplayHeight = height;
+ frame->mSize = width * height * 2;
+ frame->mData = new uint8_t[frame->mSize];
+
+ int32_t srcFormat;
+ CHECK(meta->findInt32(kKeyColorFormat, &srcFormat));
+
+ ColorConverter converter(
+ (OMX_COLOR_FORMATTYPE)srcFormat, OMX_COLOR_Format16bitRGB565);
+ CHECK(converter.isValid());
+
+ converter.convert(
+ width, height,
+ (const uint8_t *)buffer->data() + buffer->range_offset(),
+ 0,
+ frame->mData, width * 2);
+
+ buffer->release();
+ buffer = NULL;
+
+ decoder->stop();
+
+ return frame;
+}
+
+MediaAlbumArt *StagefrightMetadataRetriever::extractAlbumArt() {
+ LOGV("extractAlbumArt (extractor: %s)", mExtractor.get() != NULL ? "YES" : "NO");
+
+ if (mExtractor == NULL) {
+ return NULL;
+ }
+
+ if (!mParsedMetaData) {
+ parseMetaData();
+
+ mParsedMetaData = true;
+ }
+
+ if (mAlbumArt) {
+ return new MediaAlbumArt(*mAlbumArt);
+ }
+
+ return NULL;
+}
+
+const char *StagefrightMetadataRetriever::extractMetadata(int keyCode) {
+ LOGV("extractMetadata %d", keyCode);
+
+ if (mExtractor == NULL) {
+ return NULL;
+ }
+
+ if (!mParsedMetaData) {
+ parseMetaData();
+
+ mParsedMetaData = true;
+ }
+
+ ssize_t index = mMetaData.indexOfKey(keyCode);
+
+ if (index < 0) {
+ return NULL;
+ }
+
+ return strdup(mMetaData.valueAt(index).string());
+}
+
+void StagefrightMetadataRetriever::parseMetaData() {
+ sp<MetaData> meta = mExtractor->getMetaData();
+
+ struct Map {
+ int from;
+ int to;
+ };
+ static const Map kMap[] = {
+ { kKeyCDTrackNumber, METADATA_KEY_CD_TRACK_NUMBER },
+ { kKeyAlbum, METADATA_KEY_ALBUM },
+ { kKeyArtist, METADATA_KEY_ARTIST },
+ { kKeyAuthor, METADATA_KEY_AUTHOR },
+ { kKeyComposer, METADATA_KEY_COMPOSER },
+ { kKeyDate, METADATA_KEY_DATE },
+ { kKeyGenre, METADATA_KEY_GENRE },
+ { kKeyTitle, METADATA_KEY_TITLE },
+ { kKeyYear, METADATA_KEY_YEAR },
+ };
+ static const size_t kNumMapEntries = sizeof(kMap) / sizeof(kMap[0]);
+
+ for (size_t i = 0; i < kNumMapEntries; ++i) {
+ const char *value;
+ if (meta->findCString(kMap[i].from, &value)) {
+ mMetaData.add(kMap[i].to, String8(value));
+ }
+ }
+
+ const void *data;
+ uint32_t type;
+ size_t dataSize;
+ if (meta->findData(kKeyAlbumArt, &type, &data, &dataSize)) {
+ mAlbumArt = new MediaAlbumArt;
+ mAlbumArt->mSize = dataSize;
+ mAlbumArt->mData = new uint8_t[dataSize];
+ memcpy(mAlbumArt->mData, data, dataSize);
+ }
+
+ size_t numTracks = mExtractor->countTracks();
+
+ char tmp[32];
+ sprintf(tmp, "%d", numTracks);
+
+ mMetaData.add(METADATA_KEY_NUM_TRACKS, String8(tmp));
+
+ // The overall duration is the duration of the longest track.
+ int64_t maxDurationUs = 0;
+ for (size_t i = 0; i < numTracks; ++i) {
+ sp<MetaData> trackMeta = mExtractor->getTrackMetaData(i);
+
+ int64_t durationUs;
+ if (trackMeta->findInt64(kKeyDuration, &durationUs)) {
+ if (durationUs > maxDurationUs) {
+ maxDurationUs = durationUs;
+ }
+ }
+ }
+
+ // The duration value is a string representing the duration in ms.
+ sprintf(tmp, "%lld", (maxDurationUs + 500) / 1000);
+
+ mMetaData.add(METADATA_KEY_DURATION, String8(tmp));
+}
+
+
+} // namespace android
diff --git a/media/libstagefright/codecs/aacdec/AACDecoder.cpp b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
index 92059c5..ff51e88 100644
--- a/media/libstagefright/codecs/aacdec/AACDecoder.cpp
+++ b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
@@ -70,7 +70,8 @@
uint32_t type;
const void *data;
size_t size;
- if (mSource->getFormat()->findData(kKeyESDS, &type, &data, &size)) {
+ sp<MetaData> meta = mSource->getFormat();
+ if (meta->findData(kKeyESDS, &type, &data, &size)) {
ESDS esds((const char *)data, size);
CHECK_EQ(esds.InitCheck(), OK);
diff --git a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
index 484c742..d874224 100644
--- a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
+++ b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
@@ -90,7 +90,8 @@
uint32_t type;
const void *data;
size_t size;
- if (mSource->getFormat()->findData(kKeyAVCC, &type, &data, &size)) {
+ sp<MetaData> meta = mSource->getFormat();
+ if (meta->findData(kKeyAVCC, &type, &data, &size)) {
// Parse the AVCDecoderConfigurationRecord
const uint8_t *ptr = (const uint8_t *)data;
@@ -262,6 +263,8 @@
&nalType, &nalRefIdc);
if (res != AVCDEC_SUCCESS) {
+ LOGE("cannot determine nal type");
+
mInputBuffer->release();
mInputBuffer = NULL;
@@ -375,18 +378,19 @@
mInputBuffer->release();
mInputBuffer = NULL;
- if (res == AVCDEC_PICTURE_READY) {
+ if (res == AVCDEC_PICTURE_READY || res == AVCDEC_SUCCESS) {
*out = new MediaBuffer(0);
return OK;
} else {
+ LOGV("failed to decode frame (res = %d)", res);
return UNKNOWN_ERROR;
}
}
case AVC_NALTYPE_SEI:
{
- res = PVAVCDecodeSlice(
+ res = PVAVCDecSEI(
mHandle, const_cast<uint8_t *>(inPtr),
mInputBuffer->range_length());
@@ -404,6 +408,9 @@
case AVC_NALTYPE_AUD:
{
+ mInputBuffer->release();
+ mInputBuffer = NULL;
+
*out = new MediaBuffer(0);
return OK;
diff --git a/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp b/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp
index c3ef0d2..40009f8 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp
@@ -43,8 +43,17 @@
memset(mHandle, 0, sizeof(tagvideoDecControls));
mFormat = new MetaData;
mFormat->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_RAW);
- CHECK(mSource->getFormat()->findInt32(kKeyWidth, &mWidth));
- CHECK(mSource->getFormat()->findInt32(kKeyHeight, &mHeight));
+
+ // CHECK(mSource->getFormat()->findInt32(kKeyWidth, &mWidth));
+ // CHECK(mSource->getFormat()->findInt32(kKeyHeight, &mHeight));
+
+ // We'll ignore the dimension advertised by the source, the decoder
+ // appears to require us to always start with the default dimensions
+ // of 352 x 288 to operate correctly and later react to changes in
+ // the dimensions as needed.
+ mWidth = 352;
+ mHeight = 288;
+
mFormat->setInt32(kKeyWidth, mWidth);
mFormat->setInt32(kKeyHeight, mHeight);
mFormat->setInt32(kKeyColorFormat, OMX_COLOR_FormatYUV420Planar);
@@ -60,11 +69,26 @@
mHandle = NULL;
}
+void M4vH263Decoder::allocateFrames(int32_t width, int32_t height) {
+ size_t frameSize =
+ (((width + 15) & - 16) * ((height + 15) & - 16) * 3) / 2;
+
+ for (uint32_t i = 0; i < 2; ++i) {
+ mFrames[i] = new MediaBuffer(frameSize);
+ mFrames[i]->setObserver(this);
+ }
+
+ PVSetReferenceYUV(
+ mHandle,
+ (uint8_t *)mFrames[1]->data());
+}
+
status_t M4vH263Decoder::start(MetaData *) {
CHECK(!mStarted);
const char *mime = NULL;
- CHECK(mSource->getFormat()->findCString(kKeyMIMEType, &mime));
+ sp<MetaData> meta = mSource->getFormat();
+ CHECK(meta->findCString(kKeyMIMEType, &mime));
MP4DecodingMode mode;
if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_MPEG4, mime)) {
@@ -79,13 +103,14 @@
size_t size = 0;
uint8_t *vol_data[1] = {0};
int32_t vol_size = 0;
- if (mSource->getFormat()->findData(kKeyESDS, &type, &data, &size)) {
+ if (meta->findData(kKeyESDS, &type, &data, &size)) {
ESDS esds((const uint8_t *)data, size);
CHECK_EQ(esds.InitCheck(), OK);
const void *codec_specific_data;
size_t codec_specific_data_size;
- esds.getCodecSpecificInfo(&codec_specific_data, &codec_specific_data_size);
+ esds.getCodecSpecificInfo(
+ &codec_specific_data, &codec_specific_data_size);
vol_data[0] = (uint8_t *) malloc(codec_specific_data_size);
memcpy(vol_data[0], codec_specific_data, codec_specific_data_size);
@@ -102,12 +127,14 @@
CHECK_EQ(mode, actualMode);
PVSetPostProcType((VideoDecControls *) mHandle, 0);
- size_t frameSize = (((mWidth + 15) & - 16) * ((mHeight + 15) & - 16) * 3) / 2;
- for (uint32_t i = 0; i < 2; ++i) {
- mFrames[i] = new MediaBuffer(frameSize);
- mFrames[i]->setObserver(this);
+
+ int32_t width, height;
+ PVGetVideoDimensions(mHandle, &width, &height);
+ if (mode == H263_MODE && (width == 0 || height == 0)) {
+ width = 352;
+ height = 288;
}
- PVSetReferenceYUV(mHandle, (uint8_t *)mFrames[1]->data());
+ allocateFrames(width, height);
mSource->start();
@@ -152,24 +179,41 @@
return err;
}
- uint8_t *bitstream = (uint8_t *) inputBuffer->data() + inputBuffer->range_offset();
+ uint8_t *bitstream =
+ (uint8_t *) inputBuffer->data() + inputBuffer->range_offset();
+
uint32_t timestamp = 0xFFFFFFFF;
int32_t bufferSize = inputBuffer->range_length();
uint32_t useExtTimestamp = 0;
- CHECK_EQ(PV_TRUE, PVDecodeVideoFrame(mHandle, &bitstream, ×tamp, &bufferSize,
- &useExtTimestamp, (uint8_t *)mFrames[mNumSamplesOutput & 0x01]->data()));
+ if (PVDecodeVideoFrame(
+ mHandle, &bitstream, ×tamp, &bufferSize,
+ &useExtTimestamp,
+ (uint8_t *)mFrames[mNumSamplesOutput & 0x01]->data())
+ != PV_TRUE) {
+ LOGE("failed to decode video frame.");
- // Check whether video dimension is changed.
- // If so, notify the client about the change.
+ inputBuffer->release();
+ inputBuffer = NULL;
+
+ return UNKNOWN_ERROR;
+ }
+
int32_t width, height;
PVGetVideoDimensions(mHandle, &width, &height);
- if (mWidth != width || mHeight != height) {
- mFormat->setInt32(kKeyWidth, width);
- mFormat->setInt32(kKeyHeight, height);
+ if (width != mWidth || height != mHeight) {
+ ++mNumSamplesOutput; // The client will never get to see this frame.
+
+ inputBuffer->release();
+ inputBuffer = NULL;
+
+ mWidth = width;
+ mHeight = height;
+ mFormat->setInt32(kKeyWidth, mWidth);
+ mFormat->setInt32(kKeyHeight, mHeight);
+
return INFO_FORMAT_CHANGED;
}
- PVSetReferenceYUV(mHandle, (uint8_t *)mFrames[mNumSamplesOutput & 0x01]->data());
*out = mFrames[mNumSamplesOutput & 0x01];
(*out)->add_ref();
@@ -179,6 +223,7 @@
++mNumSamplesOutput;
inputBuffer->release();
+ inputBuffer = NULL;
return OK;
}
diff --git a/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp b/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
index 2f919c2..f1f7194 100644
--- a/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
+++ b/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
@@ -160,7 +160,15 @@
mConfig->outputFrameSize = buffer->size() / sizeof(int16_t);
mConfig->pOutputBuffer = static_cast<int16_t *>(buffer->data());
- CHECK_EQ(pvmp3_framedecoder(mConfig, mDecoderBuf), NO_DECODING_ERROR);
+ if (pvmp3_framedecoder(mConfig, mDecoderBuf) != NO_DECODING_ERROR) {
+ buffer->release();
+ buffer = NULL;
+
+ mInputBuffer->release();
+ mInputBuffer = NULL;
+
+ return UNKNOWN_ERROR;
+ }
buffer->set_range(
0, mConfig->outputFrameSize * sizeof(int16_t));
diff --git a/media/libstagefright/id3/Android.mk b/media/libstagefright/id3/Android.mk
new file mode 100644
index 0000000..3c47e2e
--- /dev/null
+++ b/media/libstagefright/id3/Android.mk
@@ -0,0 +1,27 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ ID3.cpp
+
+LOCAL_MODULE := libstagefright_id3
+
+include $(BUILD_STATIC_LIBRARY)
+
+################################################################################
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ testid3.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+ libstagefright libutils libbinder
+
+LOCAL_STATIC_LIBRARIES := \
+ libstagefright_id3
+
+LOCAL_MODULE := testid3
+
+include $(BUILD_EXECUTABLE)
+
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
new file mode 100644
index 0000000..2b3ef1a
--- /dev/null
+++ b/media/libstagefright/id3/ID3.cpp
@@ -0,0 +1,465 @@
+/*
+ * 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.
+ */
+
+//#define LOG_NDEBUG 0
+#define LOG_TAG "ID3"
+#include <utils/Log.h>
+
+#include "../include/ID3.h"
+
+#include <media/stagefright/DataSource.h>
+#include <media/stagefright/MediaDebug.h>
+#include <media/stagefright/Utils.h>
+#include <utils/String8.h>
+
+namespace android {
+
+ID3::ID3(const sp<DataSource> &source)
+ : mIsValid(false),
+ mData(NULL),
+ mSize(0),
+ mFirstFrameOffset(0),
+ mVersion(ID3_UNKNOWN) {
+ mIsValid = parse(source);
+}
+
+ID3::~ID3() {
+ if (mData) {
+ free(mData);
+ mData = NULL;
+ }
+}
+
+bool ID3::isValid() const {
+ return mIsValid;
+}
+
+ID3::Version ID3::version() const {
+ return mVersion;
+}
+
+bool ID3::parse(const sp<DataSource> &source) {
+ struct id3_header {
+ char id[3];
+ uint8_t version_major;
+ uint8_t version_minor;
+ uint8_t flags;
+ uint8_t enc_size[4];
+ };
+
+ id3_header header;
+ if (source->readAt(
+ 0, &header, sizeof(header)) != (ssize_t)sizeof(header)) {
+ return false;
+ }
+
+ if (memcmp(header.id, "ID3", 3)) {
+ return false;
+ }
+
+ if (header.version_major == 0xff || header.version_minor == 0xff) {
+ return false;
+ }
+
+ if (header.version_major == 2) {
+ if (header.flags & 0x3f) {
+ // We only support the 2 high bits, if any of the lower bits are
+ // set, we cannot guarantee to understand the tag format.
+ return false;
+ }
+
+ if (header.flags & 0x40) {
+ // No compression scheme has been decided yet, ignore the
+ // tag if compression is indicated.
+
+ return false;
+ }
+ } else if (header.version_major == 3) {
+ if (header.flags & 0x1f) {
+ // We only support the 3 high bits, if any of the lower bits are
+ // set, we cannot guarantee to understand the tag format.
+ return false;
+ }
+ } else {
+ return false;
+ }
+
+ size_t size = 0;
+ for (int32_t i = 0; i < 4; ++i) {
+ if (header.enc_size[i] & 0x80) {
+ return false;
+ }
+
+ size = (size << 7) | header.enc_size[i];
+ }
+
+ mData = (uint8_t *)malloc(size);
+
+ if (mData == NULL) {
+ return false;
+ }
+
+ mSize = size;
+
+ if (source->readAt(sizeof(header), mData, mSize) != (ssize_t)mSize) {
+ return false;
+ }
+
+ if (header.flags & 0x80) {
+ LOGI("removing unsynchronization");
+ removeUnsynchronization();
+ }
+
+ mFirstFrameOffset = 0;
+ if (header.version_major == 3 && (header.flags & 0x40)) {
+ // Version 2.3 has an optional extended header.
+
+ if (mSize < 4) {
+ return false;
+ }
+
+ size_t extendedHeaderSize = U32_AT(&mData[0]) + 4;
+
+ if (extendedHeaderSize > mSize) {
+ return false;
+ }
+
+ mFirstFrameOffset = extendedHeaderSize;
+
+ uint16_t extendedFlags = 0;
+ if (extendedHeaderSize >= 6) {
+ extendedFlags = U16_AT(&mData[4]);
+
+ if (extendedHeaderSize >= 10) {
+ size_t paddingSize = U32_AT(&mData[6]);
+
+ if (mFirstFrameOffset + paddingSize > mSize) {
+ return false;
+ }
+
+ mSize -= paddingSize;
+ }
+
+ if (extendedFlags & 0x8000) {
+ LOGI("have crc");
+ }
+ }
+ }
+
+ if (header.version_major == 2) {
+ mVersion = ID3_V2_2;
+ } else {
+ CHECK_EQ(header.version_major, 3);
+ mVersion = ID3_V2_3;
+ }
+
+ return true;
+}
+
+void ID3::removeUnsynchronization() {
+ for (size_t i = 0; i + 1 < mSize; ++i) {
+ if (mData[i] == 0xff && mData[i + 1] == 0x00) {
+ memmove(&mData[i + 1], &mData[i + 2], mSize - i - 2);
+ --mSize;
+ }
+ }
+}
+
+ID3::Iterator::Iterator(const ID3 &parent, const char *id)
+ : mParent(parent),
+ mID(NULL),
+ mOffset(mParent.mFirstFrameOffset),
+ mFrameData(NULL),
+ mFrameSize(0) {
+ if (id) {
+ mID = strdup(id);
+ }
+
+ findFrame();
+}
+
+ID3::Iterator::~Iterator() {
+ if (mID) {
+ free(mID);
+ mID = NULL;
+ }
+}
+
+bool ID3::Iterator::done() const {
+ return mFrameData == NULL;
+}
+
+void ID3::Iterator::next() {
+ if (mFrameData == NULL) {
+ return;
+ }
+
+ mOffset += mFrameSize;
+
+ findFrame();
+}
+
+void ID3::Iterator::getID(String8 *id) const {
+ id->setTo("");
+
+ if (mFrameData == NULL) {
+ return;
+ }
+
+ if (mParent.mVersion == ID3_V2_2) {
+ id->setTo((const char *)&mParent.mData[mOffset], 3);
+ } else {
+ CHECK_EQ(mParent.mVersion, ID3_V2_3);
+ id->setTo((const char *)&mParent.mData[mOffset], 4);
+ }
+}
+
+static void convertISO8859ToString8(
+ const uint8_t *data, size_t size,
+ String8 *s) {
+ size_t utf8len = 0;
+ for (size_t i = 0; i < size; ++i) {
+ if (data[i] < 0x80) {
+ ++utf8len;
+ } else {
+ utf8len += 2;
+ }
+ }
+
+ if (utf8len == size) {
+ // Only ASCII characters present.
+
+ s->setTo((const char *)data, size);
+ return;
+ }
+
+ char *tmp = new char[utf8len];
+ char *ptr = tmp;
+ for (size_t i = 0; i < size; ++i) {
+ if (data[i] < 0x80) {
+ *ptr++ = data[i];
+ } else if (data[i] < 0xc0) {
+ *ptr++ = 0xc2;
+ *ptr++ = data[i];
+ } else {
+ *ptr++ = 0xc3;
+ *ptr++ = data[i] - 64;
+ }
+ }
+
+ s->setTo(tmp, utf8len);
+
+ delete[] tmp;
+ tmp = NULL;
+}
+
+void ID3::Iterator::getString(String8 *id) const {
+ id->setTo("");
+
+ if (mFrameData == NULL) {
+ return;
+ }
+
+ size_t n = mFrameSize - getHeaderLength() - 1;
+
+ if (*mFrameData == 0x00) {
+ // ISO 8859-1
+ convertISO8859ToString8(mFrameData + 1, n, id);
+ } else {
+ // UCS-2
+ id->setTo((const char16_t *)(mFrameData + 1), n);
+ }
+}
+
+const uint8_t *ID3::Iterator::getData(size_t *length) const {
+ *length = 0;
+
+ if (mFrameData == NULL) {
+ return NULL;
+ }
+
+ *length = mFrameSize - getHeaderLength();
+
+ return mFrameData;
+}
+
+size_t ID3::Iterator::getHeaderLength() const {
+ if (mParent.mVersion == ID3_V2_2) {
+ return 6;
+ } else {
+ CHECK_EQ(mParent.mVersion, ID3_V2_3);
+ return 10;
+ }
+}
+
+void ID3::Iterator::findFrame() {
+ for (;;) {
+ mFrameData = NULL;
+ mFrameSize = 0;
+
+ if (mParent.mVersion == ID3_V2_2) {
+ if (mOffset + 6 > mParent.mSize) {
+ return;
+ }
+
+ if (!memcmp(&mParent.mData[mOffset], "\0\0\0", 3)) {
+ return;
+ }
+
+ mFrameSize =
+ (mParent.mData[mOffset + 3] << 16)
+ | (mParent.mData[mOffset + 4] << 8)
+ | mParent.mData[mOffset + 5];
+
+ mFrameSize += 6;
+
+ if (mOffset + mFrameSize > mParent.mSize) {
+ LOGV("partial frame at offset %d (size = %d, bytes-remaining = %d)",
+ mOffset, mFrameSize, mParent.mSize - mOffset - 6);
+ return;
+ }
+
+ mFrameData = &mParent.mData[mOffset + 6];
+
+ if (!mID) {
+ break;
+ }
+
+ char id[4];
+ memcpy(id, &mParent.mData[mOffset], 3);
+ id[3] = '\0';
+
+ if (!strcmp(id, mID)) {
+ break;
+ }
+ } else {
+ CHECK_EQ(mParent.mVersion, ID3_V2_3);
+
+ if (mOffset + 10 > mParent.mSize) {
+ return;
+ }
+
+ if (!memcmp(&mParent.mData[mOffset], "\0\0\0\0", 4)) {
+ return;
+ }
+
+ mFrameSize = 10 + U32_AT(&mParent.mData[mOffset + 4]);
+
+ if (mOffset + mFrameSize > mParent.mSize) {
+ LOGV("partial frame at offset %d (size = %d, bytes-remaining = %d)",
+ mOffset, mFrameSize, mParent.mSize - mOffset - 10);
+ return;
+ }
+
+ mFrameData = &mParent.mData[mOffset + 10];
+
+ if (!mID) {
+ break;
+ }
+
+ char id[5];
+ memcpy(id, &mParent.mData[mOffset], 4);
+ id[4] = '\0';
+
+ if (!strcmp(id, mID)) {
+ break;
+ }
+ }
+
+ mOffset += mFrameSize;
+ }
+}
+
+static size_t StringSize(const uint8_t *start, uint8_t encoding) {
+ if (encoding== 0x00) {
+ // ISO 8859-1
+ return strlen((const char *)start) + 1;
+ }
+
+ // UCS-2
+ size_t n = 0;
+ while (start[n] != '\0' || start[n + 1] != '\0') {
+ n += 2;
+ }
+
+ return n;
+}
+
+const void *
+ID3::getAlbumArt(size_t *length, String8 *mime) const {
+ *length = 0;
+ mime->setTo("");
+
+ Iterator it(*this, mVersion == ID3_V2_3 ? "APIC" : "PIC");
+
+ while (!it.done()) {
+ size_t size;
+ const uint8_t *data = it.getData(&size);
+
+ if (mVersion == ID3_V2_3) {
+ uint8_t encoding = data[0];
+ mime->setTo((const char *)&data[1]);
+ size_t mimeLen = strlen((const char *)&data[1]) + 1;
+
+ uint8_t picType = data[1 + mimeLen];
+#if 0
+ if (picType != 0x03) {
+ // Front Cover Art
+ it.next();
+ continue;
+ }
+#endif
+
+ size_t descLen = StringSize(&data[2 + mimeLen], encoding);
+
+ *length = size - 2 - mimeLen - descLen;
+
+ return &data[2 + mimeLen + descLen];
+ } else {
+ uint8_t encoding = data[0];
+
+ if (!memcmp(&data[1], "PNG", 3)) {
+ mime->setTo("image/png");
+ } else if (!memcmp(&data[1], "JPG", 3)) {
+ mime->setTo("image/jpeg");
+ } else if (!memcmp(&data[1], "-->", 3)) {
+ mime->setTo("text/plain");
+ } else {
+ return NULL;
+ }
+
+#if 0
+ uint8_t picType = data[4];
+ if (picType != 0x03) {
+ // Front Cover Art
+ it.next();
+ continue;
+ }
+#endif
+
+ size_t descLen = StringSize(&data[5], encoding);
+
+ *length = size - 5 - descLen;
+
+ return &data[5 + descLen];
+ }
+ }
+
+ return NULL;
+}
+
+
+} // namespace android
diff --git a/media/libstagefright/id3/testid3.cpp b/media/libstagefright/id3/testid3.cpp
new file mode 100644
index 0000000..305b065
--- /dev/null
+++ b/media/libstagefright/id3/testid3.cpp
@@ -0,0 +1,156 @@
+/*
+ * 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.
+ */
+
+#include "../include/ID3.h"
+
+#include <ctype.h>
+#include <dirent.h>
+
+#include <binder/ProcessState.h>
+#include <media/stagefright/FileSource.h>
+#include <media/stagefright/MediaDebug.h>
+
+#define MAXPATHLEN 256
+
+using namespace android;
+
+static void hexdump(const void *_data, size_t size) {
+ const uint8_t *data = (const uint8_t *)_data;
+ size_t offset = 0;
+ while (offset < size) {
+ printf("0x%04x ", offset);
+
+ size_t n = size - offset;
+ if (n > 16) {
+ n = 16;
+ }
+
+ for (size_t i = 0; i < 16; ++i) {
+ if (i == 8) {
+ printf(" ");
+ }
+
+ if (offset + i < size) {
+ printf("%02x ", data[offset + i]);
+ } else {
+ printf(" ");
+ }
+ }
+
+ printf(" ");
+
+ for (size_t i = 0; i < n; ++i) {
+ if (isprint(data[offset + i])) {
+ printf("%c", data[offset + i]);
+ } else {
+ printf(".");
+ }
+ }
+
+ printf("\n");
+
+ offset += 16;
+ }
+}
+
+void scanFile(const char *path) {
+ sp<FileSource> file = new FileSource(path);
+ CHECK_EQ(file->initCheck(), OK);
+
+ ID3 tag(file);
+ if (!tag.isValid()) {
+ printf("FAIL %s\n", path);
+ } else {
+ printf("SUCCESS %s\n", path);
+
+ ID3::Iterator it(tag, NULL);
+ while (!it.done()) {
+ String8 id;
+ it.getID(&id);
+
+ CHECK(id.length() > 0);
+ if (id[0] == 'T') {
+ String8 text;
+ it.getString(&text);
+
+ printf(" found text frame '%s': %s\n", id.string(), text.string());
+ } else {
+ printf(" found frame '%s'.\n", id.string());
+ }
+
+ it.next();
+ }
+
+ size_t dataSize;
+ String8 mime;
+ const void *data = tag.getAlbumArt(&dataSize, &mime);
+
+ if (data) {
+ printf("found album art: size=%d mime='%s'\n", dataSize,
+ mime.string());
+
+ hexdump(data, dataSize > 128 ? 128 : dataSize);
+ }
+ }
+}
+
+void scan(const char *path) {
+ DIR *dir = opendir(path);
+
+ if (dir == NULL) {
+ return;
+ }
+
+ rewinddir(dir);
+
+ struct dirent *ent;
+ while ((ent = readdir(dir)) != NULL) {
+ if (!strcmp(".", ent->d_name) || !strcmp("..", ent->d_name)) {
+ continue;
+ }
+
+ char newPath[MAXPATHLEN];
+ strcpy(newPath, path);
+ strcat(newPath, "/");
+ strcat(newPath, ent->d_name);
+
+ if (ent->d_type == DT_DIR) {
+ scan(newPath);
+ } else if (ent->d_type == DT_REG) {
+ size_t len = strlen(ent->d_name);
+
+ if (len >= 4
+ && !strcasecmp(ent->d_name + len - 4, ".mp3")) {
+ scanFile(newPath);
+ }
+ }
+ }
+
+ closedir(dir);
+ dir = NULL;
+}
+
+int main(int argc, char **argv) {
+ android::ProcessState::self()->startThreadPool();
+
+ DataSource::RegisterDefaultSniffers();
+
+ for (int i = 1; i < argc; ++i) {
+ scan(argv[i]);
+ }
+
+ return 0;
+}
diff --git a/media/libstagefright/include/ID3.h b/media/libstagefright/include/ID3.h
new file mode 100644
index 0000000..79931ac
--- /dev/null
+++ b/media/libstagefright/include/ID3.h
@@ -0,0 +1,87 @@
+/*
+ * 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 ID3_H_
+
+#define ID3_H_
+
+#include <utils/RefBase.h>
+
+namespace android {
+
+struct DataSource;
+struct String8;
+
+struct ID3 {
+ enum Version {
+ ID3_UNKNOWN,
+ ID3_V2_2,
+ ID3_V2_3
+ };
+
+ ID3(const sp<DataSource> &source);
+ ~ID3();
+
+ bool isValid() const;
+
+ Version version() const;
+
+ const void *getAlbumArt(size_t *length, String8 *mime) const;
+
+ struct Iterator {
+ Iterator(const ID3 &parent, const char *id);
+ ~Iterator();
+
+ bool done() const;
+ void getID(String8 *id) const;
+ void getString(String8 *s) const;
+ const uint8_t *getData(size_t *length) const;
+ void next();
+
+ private:
+ const ID3 &mParent;
+ char *mID;
+ size_t mOffset;
+
+ const uint8_t *mFrameData;
+ size_t mFrameSize;
+
+ void findFrame();
+
+ size_t getHeaderLength() const;
+
+ Iterator(const Iterator &);
+ Iterator &operator=(const Iterator &);
+ };
+
+private:
+ bool mIsValid;
+ uint8_t *mData;
+ size_t mSize;
+ size_t mFirstFrameOffset;
+ Version mVersion;
+
+ bool parse(const sp<DataSource> &source);
+ void removeUnsynchronization();
+
+ ID3(const ID3 &);
+ ID3 &operator=(const ID3 &);
+};
+
+} // namespace android
+
+#endif // ID3_H_
+
diff --git a/media/libstagefright/include/M4vH263Decoder.h b/media/libstagefright/include/M4vH263Decoder.h
index 880ec7c..ec49e80 100644
--- a/media/libstagefright/include/M4vH263Decoder.h
+++ b/media/libstagefright/include/M4vH263Decoder.h
@@ -55,6 +55,7 @@
int64_t mNumSamplesOutput;
+ void allocateFrames(int32_t width, int32_t height);
void releaseFrames();
M4vH263Decoder(const M4vH263Decoder &);
diff --git a/media/libstagefright/include/MP3Extractor.h b/media/libstagefright/include/MP3Extractor.h
index b5a6b3c..3ce6df3 100644
--- a/media/libstagefright/include/MP3Extractor.h
+++ b/media/libstagefright/include/MP3Extractor.h
@@ -34,6 +34,8 @@
virtual sp<MediaSource> getTrack(size_t index);
virtual sp<MetaData> getTrackMetaData(size_t index, uint32_t flags);
+ virtual sp<MetaData> getMetaData();
+
protected:
virtual ~MP3Extractor();
diff --git a/media/libstagefright/include/StagefrightMetadataRetriever.h b/media/libstagefright/include/StagefrightMetadataRetriever.h
new file mode 100644
index 0000000..b80387f
--- /dev/null
+++ b/media/libstagefright/include/StagefrightMetadataRetriever.h
@@ -0,0 +1,61 @@
+/*
+ * 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 STAGEFRIGHT_METADATA_RETRIEVER_H_
+
+#define STAGEFRIGHT_METADATA_RETRIEVER_H_
+
+#include <media/MediaMetadataRetrieverInterface.h>
+
+#include <media/stagefright/OMXClient.h>
+#include <utils/KeyedVector.h>
+
+namespace android {
+
+struct DataSource;
+class MediaExtractor;
+
+struct StagefrightMetadataRetriever : public MediaMetadataRetrieverInterface {
+ StagefrightMetadataRetriever();
+ virtual ~StagefrightMetadataRetriever();
+
+ virtual status_t setDataSource(const char *url);
+ virtual status_t setDataSource(int fd, int64_t offset, int64_t length);
+
+ virtual VideoFrame *captureFrame();
+ virtual MediaAlbumArt *extractAlbumArt();
+ virtual const char *extractMetadata(int keyCode);
+
+private:
+ OMXClient mClient;
+ sp<DataSource> mSource;
+ sp<MediaExtractor> mExtractor;
+
+ bool mParsedMetaData;
+ KeyedVector<int, String8> mMetaData;
+ MediaAlbumArt *mAlbumArt;
+
+ void parseMetaData();
+
+ StagefrightMetadataRetriever(const StagefrightMetadataRetriever &);
+
+ StagefrightMetadataRetriever &operator=(
+ const StagefrightMetadataRetriever &);
+};
+
+} // namespace android
+
+#endif // STAGEFRIGHT_METADATA_RETRIEVER_H_
diff --git a/media/libstagefright/string.cpp b/media/libstagefright/string.cpp
index bd6204b..8b2c36c 100644
--- a/media/libstagefright/string.cpp
+++ b/media/libstagefright/string.cpp
@@ -16,6 +16,8 @@
#include "include/stagefright_string.h"
+#include <media/stagefright/MediaDebug.h>
+
namespace android {
// static
@@ -28,8 +30,15 @@
: mString(s, length) {
}
-string::string(const string &from, size_type start, size_type length)
- : mString(from.c_str() + start, length) {
+string::string(const string &from, size_type start, size_type length) {
+ CHECK(start <= from.size());
+ if (length == npos) {
+ length = from.size() - start;
+ } else {
+ CHECK(start + length <= from.size());
+ }
+
+ mString.setTo(from.c_str() + start, length);
}
string::string(const char *s)
diff --git a/media/sdutils/sdutil.cpp b/media/sdutils/sdutil.cpp
index fe11878..c77424f 100644
--- a/media/sdutils/sdutil.cpp
+++ b/media/sdutils/sdutil.cpp
@@ -99,6 +99,42 @@
return -1;
}
+static int asec_create(const char *id, int sizeMb, const char *fstype,
+ const char *key, int ownerUid) {
+ String16 sId(id);
+ String16 sFstype(fstype);
+ String16 sKey(key);
+
+ String16 r = gMountService->createSecureContainer(sId, sizeMb, sFstype,
+ sKey, ownerUid);
+ return 0;
+}
+
+static int asec_finalize(const char *id) {
+ String16 sId(id);
+ gMountService->finalizeSecureContainer(sId);
+ return 0;
+}
+
+static int asec_destroy(const char *id) {
+ String16 sId(id);
+ gMountService->destroySecureContainer(sId);
+ return 0;
+}
+
+static int asec_mount(const char *id, const char *key, int ownerUid) {
+ String16 sId(id);
+ String16 sKey(key);
+ gMountService->mountSecureContainer(sId, sKey, ownerUid);
+ return 0;
+}
+
+static int asec_path(const char *id) {
+ String16 sId(id);
+ gMountService->getSecureContainerPath(sId);
+ return 0;
+}
+
static int unmount(const char* path) {
String16 string(path);
gMountService->unmountMedia(string);
@@ -153,14 +189,42 @@
android::init();
return android::umsEnable(false);
}
+ } else if (!strcmp(command, "asec")) {
+ const char* id = (argc > 3 ? argv[3] : NULL);
+
+ if (!id)
+ goto usage;
+
+ android::init();
+ if (!strcmp(argument, "create")) {
+
+ if (argc != 8)
+ goto usage;
+ return android::asec_create(id, atoi(argv[4]), argv[5], argv[6],
+ atoi(argv[7]));
+ } else if (!strcmp(argument, "finalize")) {
+ return android::asec_finalize(id);
+ } else if (!strcmp(argument, "destroy")) {
+ return android::asec_destroy(id);
+ } else if (!strcmp(argument, "mount")) {
+ return android::asec_mount(id, argv[4], atoi(argv[5]));
+ } else if (!strcmp(argument, "path")) {
+ return android::asec_path(id);
+ }
}
+usage:
fprintf(stderr, "usage:\n"
" sdutil mount <mount path> - mounts the SD card at the given mount point\n"
" sdutil unmount <mount path> - unmounts the SD card at the given mount point\n"
" sdutil format <mount path> - formats the SD card at the given mount point\n"
" sdutil ums enable - enables USB mass storage\n"
- " sdutil ums disable - disnables USB mass storage\n"
+ " sdutil ums disable - disables USB mass storage\n"
+ " sdutil asec create <id> <sizeMb> <fstype> <key> <ownerUid>\n"
+ " sdutil asec finalize <id>\n"
+ " sdutil asec destroy <id>\n"
+ " sdutil asec mount <id> <key> <ownerUid>\n"
+ " sdutil asec path <id>\n"
);
return -1;
}
diff --git a/media/tests/MediaFrameworkTest/res/layout/movie_view.xml b/media/tests/MediaFrameworkTest/res/layout/movie_view.xml
index 35fedfa..cfd86bb 100644
--- a/media/tests/MediaFrameworkTest/res/layout/movie_view.xml
+++ b/media/tests/MediaFrameworkTest/res/layout/movie_view.xml
@@ -15,12 +15,12 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1">
@@ -32,12 +32,12 @@
</FrameLayout>
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<EditText android:id="@+id/url"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:singleLine="true"
diff --git a/media/tests/MediaFrameworkTest/res/layout/surface_view.xml b/media/tests/MediaFrameworkTest/res/layout/surface_view.xml
index cbd1ff8..a72c283 100644
--- a/media/tests/MediaFrameworkTest/res/layout/surface_view.xml
+++ b/media/tests/MediaFrameworkTest/res/layout/surface_view.xml
@@ -15,18 +15,18 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<SurfaceView
android:id="@+id/surface_view"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:layout_centerInParent="true"
/>
diff --git a/media/tests/players/Android.mk b/media/tests/players/Android.mk
index eb50a51..10367cf 100644
--- a/media/tests/players/Android.mk
+++ b/media/tests/players/Android.mk
@@ -23,7 +23,7 @@
libutils
LOCAL_MODULE:= invoke_mock_media_player
-LOCAL_MODULE_TAGS := test eng
+LOCAL_MODULE_TAGS := tests eng
LOCAL_PRELINK_MODULE:= false
include $(BUILD_SHARED_LIBRARY)
diff --git a/opengl/include/ETC1/etc1.h b/opengl/include/ETC1/etc1.h
new file mode 100644
index 0000000..0d38905
--- /dev/null
+++ b/opengl/include/ETC1/etc1.h
@@ -0,0 +1,106 @@
+// Copyright 2009 Google Inc.
+//
+// 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 __etc1_h__
+#define __etc1_h__
+
+#define ETC1_ENCODED_BLOCK_SIZE 8
+#define ETC1_DECODED_BLOCK_SIZE 48
+
+#ifndef ETC1_RGB8_OES
+#define ETC1_RGB8_OES 0x8D64
+#endif
+
+typedef unsigned char etc1_byte;
+typedef int etc1_bool;
+typedef unsigned int etc1_uint32;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Encode a block of pixels.
+//
+// pIn is a pointer to a ETC_DECODED_BLOCK_SIZE array of bytes that represent a
+// 4 x 4 square of 3-byte pixels in form R, G, B. Byte (3 * (x + 4 * y) is the R
+// value of pixel (x, y).
+//
+// validPixelMask is a 16-bit mask where bit (1 << (x + y * 4)) indicates whether
+// the corresponding (x,y) pixel is valid. Invalid pixel color values are ignored when compressing.
+//
+// pOut is an ETC1 compressed version of the data.
+
+void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 validPixelMask, etc1_byte* pOut);
+
+// Decode a block of pixels.
+//
+// pIn is an ETC1 compressed version of the data.
+//
+// pOut is a pointer to a ETC_DECODED_BLOCK_SIZE array of bytes that represent a
+// 4 x 4 square of 3-byte pixels in form R, G, B. Byte (3 * (x + 4 * y) is the R
+// value of pixel (x, y).
+
+void etc1_decode_block(const etc1_byte* pIn, etc1_byte* pOut);
+
+// Return the size of the encoded image data (does not include size of PKM header).
+
+etc1_uint32 etc1_get_encoded_data_size(etc1_uint32 width, etc1_uint32 height);
+
+// Encode an entire image.
+// pIn - pointer to the image data. Formatted such that
+// pixel (x,y) is at pIn + pixelSize * x + stride * y;
+// pOut - pointer to encoded data. Must be large enough to store entire encoded image.
+// pixelSize can be 2 or 3. 2 is an GL_UNSIGNED_SHORT_5_6_5 image, 3 is a GL_BYTE RGB image.
+// returns non-zero if there is an error.
+
+int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height,
+ etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut);
+
+// Decode an entire image.
+// pIn - pointer to encoded data.
+// pOut - pointer to the image data. Will be written such that
+// pixel (x,y) is at pIn + pixelSize * x + stride * y. Must be
+// large enough to store entire image.
+// pixelSize can be 2 or 3. 2 is an GL_UNSIGNED_SHORT_5_6_5 image, 3 is a GL_BYTE RGB image.
+// returns non-zero if there is an error.
+
+int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut,
+ etc1_uint32 width, etc1_uint32 height,
+ etc1_uint32 pixelSize, etc1_uint32 stride);
+
+// Size of a PKM header, in bytes.
+
+#define ETC_PKM_HEADER_SIZE 16
+
+// Format a PKM header
+
+void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height);
+
+// Check if a PKM header is correctly formatted.
+
+etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader);
+
+// Read the image width from a PKM header
+
+etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader);
+
+// Read the image height from a PKM header
+
+etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/opengl/java/android/opengl/ETC1.java b/opengl/java/android/opengl/ETC1.java
new file mode 100644
index 0000000..f3dac77
--- /dev/null
+++ b/opengl/java/android/opengl/ETC1.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright 2009 Google Inc.
+ *
+ * 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.
+ */
+
+package android.opengl;
+
+import java.nio.Buffer;
+
+/**
+ * Methods for encoding and decoding ETC1 textures.
+ * <p>
+ * The standard for the ETC1 texture format can be found at
+ * http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt
+ * <p>
+ * The PKM file format is of a 16-byte header that describes the image bounds
+ * followed by the encoded ETC1 texture data.
+ * <p>
+ * @see ETC1Util
+ */
+public class ETC1 {
+
+ /**
+ * Size in bytes of an encoded block.
+ */
+ public static final int ENCODED_BLOCK_SIZE = 8;
+
+ /**
+ * Size in bytes of a decoded block.
+ */
+ public static final int DECODED_BLOCK_SIZE = 48;
+
+ /**
+ * Size of a PKM file header, in bytes.
+ */
+ public static final int ETC_PKM_HEADER_SIZE = 16;
+
+ /**
+ * Accepted by the internalformat parameter of glCompressedTexImage2D.
+ */
+ public static final int ETC1_RGB8_OES = 0x8D64;
+
+ /**
+ * Encode a block of pixels.
+ *
+ * @param in a native order direct buffer of size DECODED_BLOCK_SIZE that represent a
+ * 4 x 4 square of 3-byte pixels in form R, G, B. Byte (3 * (x + 4 * y) is the R
+ * value of pixel (x, y).
+ *
+ * @param validPixelMask is a 16-bit mask where bit (1 << (x + y * 4)) indicates whether
+ * the corresponding (x,y) pixel is valid. Invalid pixel color values are ignored when compressing.
+ *
+ * @param out a native order direct buffer of size ENCODED_BLOCK_SIZE that receives the
+ * ETC1 compressed version of the data.
+ *
+ */
+ public static native void encodeBlock(Buffer in, int validPixelMask, Buffer out);
+
+ /**
+ * Decode a block of pixels.
+ *
+ * @param in a native order direct buffer of size ENCODED_BLOCK_SIZE that contains the
+ * ETC1 compressed version of the data.
+ *
+ * @param out a native order direct buffer of size DECODED_BLOCK_SIZE that will receive
+ * the decoded data. The data represents a
+ * 4 x 4 square of 3-byte pixels in form R, G, B. Byte (3 * (x + 4 * y) is the R
+ * value of pixel (x, y).
+ */
+ public static native void decodeBlock(Buffer in, Buffer out);
+
+ /**
+ * Return the size of the encoded image data (does not include size of PKM header).
+ */
+ public static native int getEncodedDataSize(int width, int height);
+
+ /**
+ * Encode an entire image.
+ * @param in a native order direct buffer of the image data. Formatted such that
+ * pixel (x,y) is at pIn + pixelSize * x + stride * y;
+ * @param out a native order direct buffer of the encoded data.
+ * Must be large enough to store entire encoded image.
+ * @param pixelSize must be 2 or 3. 2 is an GL_UNSIGNED_SHORT_5_6_5 image,
+ * 3 is a GL_BYTE RGB image.
+ */
+ public static native void encodeImage(Buffer in, int width, int height,
+ int pixelSize, int stride, Buffer out);
+
+ /**
+ * Decode an entire image.
+ * @param in native order direct buffer of the encoded data.
+ * @param out native order direct buffer of the image data. Will be written such that
+ * pixel (x,y) is at pIn + pixelSize * x + stride * y. Must be
+ * large enough to store entire image.
+ * @param pixelSize must be 2 or 3. 2 is an GL_UNSIGNED_SHORT_5_6_5 image,
+ * 3 is a GL_BYTE RGB image.
+ */
+ public static native void decodeImage(Buffer in, Buffer out,
+ int width, int height, int pixelSize, int stride);
+
+ /**
+ * Format a PKM header
+ * @param header native order direct buffer of the header.
+ * @param width the width of the image in pixels.
+ * @param height the height of the image in pixels.
+ */
+ public static native void formatHeader(Buffer header, int width, int height);
+
+ /**
+ * Check if a PKM header is correctly formatted.
+ * @param header native order direct buffer of the header.
+ */
+ public static native boolean isValid(Buffer header);
+
+ /**
+ * Read the image width from a PKM header
+ * @param header native order direct buffer of the header.
+ */
+ public static native int getWidth(Buffer header);
+
+ /**
+ * Read the image height from a PKM header
+ * @param header native order direct buffer of the header.
+ */
+ public static native int getHeight(Buffer header);
+}
diff --git a/opengl/java/android/opengl/ETC1Util.java b/opengl/java/android/opengl/ETC1Util.java
new file mode 100644
index 0000000..dd28d1d
--- /dev/null
+++ b/opengl/java/android/opengl/ETC1Util.java
@@ -0,0 +1,228 @@
+/*
+ * Copyright 2009 Google Inc.
+ *
+ * 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.
+ */
+
+package android.opengl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * Utility methods for using ETC1 compressed textures.
+ *
+ */
+public class ETC1Util {
+ /**
+ * Convenience method to load an ETC1 texture whether or not the active OpenGL context
+ * supports the ETC1 texture compression format.
+ * @param target the texture target.
+ * @param level the texture level
+ * @param border the border size. Typically 0.
+ * @param fallbackFormat the format to use if ETC1 texture compression is not supported.
+ * Must be GL_RGB.
+ * @param fallbackType the type to use if ETC1 texture compression is not supported.
+ * Can be either GL_UNSIGNED_SHORT_5_6_5, which implies 16-bits-per-pixel,
+ * or GL_UNSIGNED_BYTE, which implies 24-bits-per-pixel.
+ * @param input the input stream containing an ETC1 texture in PKM format.
+ * @throws IOException
+ */
+ public static void loadTexture(int target, int level, int border,
+ int fallbackFormat, int fallbackType, InputStream input)
+ throws IOException {
+ loadTexture(target, level, border, fallbackFormat, fallbackType, createTexture(input));
+ }
+
+ /**
+ * Convenience method to load an ETC1 texture whether or not the active OpenGL context
+ * supports the ETC1 texture compression format.
+ * @param target the texture target.
+ * @param level the texture level
+ * @param border the border size. Typically 0.
+ * @param fallbackFormat the format to use if ETC1 texture compression is not supported.
+ * Must be GL_RGB.
+ * @param fallbackType the type to use if ETC1 texture compression is not supported.
+ * Can be either GL_UNSIGNED_SHORT_5_6_5, which implies 16-bits-per-pixel,
+ * or GL_UNSIGNED_BYTE, which implies 24-bits-per-pixel.
+ * @param texture the ETC1 to load.
+ */
+ public static void loadTexture(int target, int level, int border,
+ int fallbackFormat, int fallbackType, ETC1Texture texture) {
+ if (fallbackFormat != GLES10.GL_RGB) {
+ throw new IllegalArgumentException("fallbackFormat must be GL_RGB");
+ }
+ if (! (fallbackType == GLES10.GL_UNSIGNED_SHORT_5_6_5
+ || fallbackType == GLES10.GL_UNSIGNED_BYTE)) {
+ throw new IllegalArgumentException("Unsupported fallbackType");
+ }
+
+ int width = texture.getWidth();
+ int height = texture.getHeight();
+ Buffer data = texture.getData();
+ if (isETC1Supported()) {
+ int imageSize = data.remaining();
+ GLES10.glCompressedTexImage2D(target, level, ETC1.ETC1_RGB8_OES, width, height,
+ border, imageSize, data);
+ } else {
+ boolean useShorts = fallbackType != GLES10.GL_UNSIGNED_BYTE;
+ int pixelSize = useShorts ? 2 : 3;
+ int stride = pixelSize * width;
+ ByteBuffer decodedData = ByteBuffer.allocateDirect(stride*height)
+ .order(ByteOrder.nativeOrder());
+ ETC1.decodeImage(data, decodedData, width, height, pixelSize, stride);
+ GLES10.glTexImage2D(target, level, fallbackFormat, width, height, border,
+ fallbackFormat, fallbackType, decodedData);
+ }
+ }
+
+ /**
+ * Check if ETC1 texture compression is supported by the active OpenGL ES context.
+ * @return true if the active OpenGL ES context supports ETC1 texture compression.
+ */
+ public static boolean isETC1Supported() {
+ int[] results = new int[20];
+ GLES10.glGetIntegerv(GLES10.GL_NUM_COMPRESSED_TEXTURE_FORMATS, results, 0);
+ int numFormats = results[0];
+ if (numFormats > results.length) {
+ results = new int[numFormats];
+ }
+ GLES10.glGetIntegerv(GLES10.GL_COMPRESSED_TEXTURE_FORMATS, results, 0);
+ for (int i = 0; i < numFormats; i++) {
+ if (results[i] == ETC1.ETC1_RGB8_OES) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * A utility class encapsulating a compressed ETC1 texture.
+ */
+ public static class ETC1Texture {
+ public ETC1Texture(int width, int height, ByteBuffer data) {
+ mWidth = width;
+ mHeight = height;
+ mData = data;
+ }
+
+ /**
+ * Get the width of the texture in pixels.
+ * @return the width of the texture in pixels.
+ */
+ public int getWidth() { return mWidth; }
+
+ /**
+ * Get the height of the texture in pixels.
+ * @return the width of the texture in pixels.
+ */
+ public int getHeight() { return mHeight; }
+
+ /**
+ * Get the compressed data of the texture.
+ * @return the texture data.
+ */
+ public ByteBuffer getData() { return mData; }
+
+ private int mWidth;
+ private int mHeight;
+ private ByteBuffer mData;
+ }
+
+ /**
+ * Create a new ETC1Texture from an input stream containing a PKM formatted compressed texture.
+ * @param input an input stream containing a PKM formatted compressed texture.
+ * @return an ETC1Texture read from the input stream.
+ * @throws IOException
+ */
+ public static ETC1Texture createTexture(InputStream input) throws IOException {
+ int width = 0;
+ int height = 0;
+ byte[] ioBuffer = new byte[4096];
+ {
+ if (input.read(ioBuffer, 0, ETC1.ETC_PKM_HEADER_SIZE) != ETC1.ETC_PKM_HEADER_SIZE) {
+ throw new IOException("Unable to read PKM file header.");
+ }
+ ByteBuffer headerBuffer = ByteBuffer.allocateDirect(ETC1.ETC_PKM_HEADER_SIZE)
+ .order(ByteOrder.nativeOrder());
+ headerBuffer.put(ioBuffer, 0, ETC1.ETC_PKM_HEADER_SIZE).position(0);
+ if (!ETC1.isValid(headerBuffer)) {
+ throw new IOException("Not a PKM file.");
+ }
+ width = ETC1.getWidth(headerBuffer);
+ height = ETC1.getHeight(headerBuffer);
+ }
+ int encodedSize = ETC1.getEncodedDataSize(width, height);
+ ByteBuffer dataBuffer = ByteBuffer.allocateDirect(encodedSize).order(ByteOrder.nativeOrder());
+ for (int i = 0; i < encodedSize; ) {
+ int chunkSize = Math.min(ioBuffer.length, encodedSize - i);
+ if (input.read(ioBuffer, 0, chunkSize) != chunkSize) {
+ throw new IOException("Unable to read PKM file data.");
+ }
+ dataBuffer.put(ioBuffer, 0, chunkSize);
+ i += chunkSize;
+ }
+ dataBuffer.position(0);
+ return new ETC1Texture(width, height, dataBuffer);
+ }
+
+ /**
+ * Helper function that compresses an image into an ETC1Texture.
+ * @param input a native order direct buffer containing the image data
+ * @param width the width of the image in pixels
+ * @param height the height of the image in pixels
+ * @param pixelSize the size of a pixel in bytes (2 or 3)
+ * @param stride the width of a line of the image in bytes
+ * @return the ETC1 texture.
+ */
+ public static ETC1Texture compressTexture(Buffer input, int width, int height, int pixelSize, int stride){
+ int encodedImageSize = ETC1.getEncodedDataSize(width, height);
+ ByteBuffer compressedImage = ByteBuffer.allocateDirect(encodedImageSize).
+ order(ByteOrder.nativeOrder());
+ ETC1.encodeImage(input, width, height, 3, stride, compressedImage);
+ return new ETC1Texture(width, height, compressedImage);
+ }
+
+ /**
+ * Helper function that writes an ETC1Texture to an output stream formatted as a PKM file.
+ * @param texture the input texture.
+ * @param output the stream to write the formatted texture data to.
+ * @throws IOException
+ */
+ public static void writeTexture(ETC1Texture texture, OutputStream output) throws IOException {
+ ByteBuffer dataBuffer = texture.getData();
+ int originalPosition = dataBuffer.position();
+ try {
+ int width = texture.getWidth();
+ int height = texture.getHeight();
+ ByteBuffer header = ByteBuffer.allocateDirect(ETC1.ETC_PKM_HEADER_SIZE).order(ByteOrder.nativeOrder());
+ ETC1.formatHeader(header, width, height);
+ byte[] ioBuffer = new byte[4096];
+ header.get(ioBuffer, 0, ETC1.ETC_PKM_HEADER_SIZE);
+ output.write(ioBuffer, 0, ETC1.ETC_PKM_HEADER_SIZE);
+ int encodedSize = ETC1.getEncodedDataSize(width, height);
+ for (int i = 0; i < encodedSize; ) {
+ int chunkSize = Math.min(ioBuffer.length, encodedSize - i);
+ dataBuffer.get(ioBuffer, 0, chunkSize);
+ output.write(ioBuffer, 0, chunkSize);
+ i += chunkSize;
+ }
+ } finally {
+ dataBuffer.position(originalPosition);
+ }
+ }
+}
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk
index 6d20e80..7353385 100644
--- a/opengl/libs/Android.mk
+++ b/opengl/libs/Android.mk
@@ -120,3 +120,33 @@
endif
include $(BUILD_SHARED_LIBRARY)
+
+###############################################################################
+# Build the ETC1 host static library
+#
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+ ETC1/etc1.cpp \
+#
+
+LOCAL_LDLIBS := -lpthread -ldl
+LOCAL_MODULE:= libETC1
+
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+###############################################################################
+# Build the ETC1 device library
+#
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+ ETC1/etc1.cpp \
+#
+
+LOCAL_LDLIBS := -lpthread -ldl
+LOCAL_MODULE:= libETC1
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/opengl/libs/ETC1/etc1.cpp b/opengl/libs/ETC1/etc1.cpp
new file mode 100644
index 0000000..5ed2c3c
--- /dev/null
+++ b/opengl/libs/ETC1/etc1.cpp
@@ -0,0 +1,670 @@
+// Copyright 2009 Google Inc.
+//
+// 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.
+
+#include <ETC1/etc1.h>
+
+#include <string.h>
+
+/* From http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt
+
+ The number of bits that represent a 4x4 texel block is 64 bits if
+ <internalformat> is given by ETC1_RGB8_OES.
+
+ The data for a block is a number of bytes,
+
+ {q0, q1, q2, q3, q4, q5, q6, q7}
+
+ where byte q0 is located at the lowest memory address and q7 at
+ the highest. The 64 bits specifying the block is then represented
+ by the following 64 bit integer:
+
+ int64bit = 256*(256*(256*(256*(256*(256*(256*q0+q1)+q2)+q3)+q4)+q5)+q6)+q7;
+
+ ETC1_RGB8_OES:
+
+ a) bit layout in bits 63 through 32 if diffbit = 0
+
+ 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48
+ -----------------------------------------------
+ | base col1 | base col2 | base col1 | base col2 |
+ | R1 (4bits)| R2 (4bits)| G1 (4bits)| G2 (4bits)|
+ -----------------------------------------------
+
+ 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
+ ---------------------------------------------------
+ | base col1 | base col2 | table | table |diff|flip|
+ | B1 (4bits)| B2 (4bits)| cw 1 | cw 2 |bit |bit |
+ ---------------------------------------------------
+
+
+ b) bit layout in bits 63 through 32 if diffbit = 1
+
+ 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48
+ -----------------------------------------------
+ | base col1 | dcol 2 | base col1 | dcol 2 |
+ | R1' (5 bits) | dR2 | G1' (5 bits) | dG2 |
+ -----------------------------------------------
+
+ 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32
+ ---------------------------------------------------
+ | base col 1 | dcol 2 | table | table |diff|flip|
+ | B1' (5 bits) | dB2 | cw 1 | cw 2 |bit |bit |
+ ---------------------------------------------------
+
+
+ c) bit layout in bits 31 through 0 (in both cases)
+
+ 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
+ -----------------------------------------------
+ | most significant pixel index bits |
+ | p| o| n| m| l| k| j| i| h| g| f| e| d| c| b| a|
+ -----------------------------------------------
+
+ 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
+ --------------------------------------------------
+ | least significant pixel index bits |
+ | p| o| n| m| l| k| j| i| h| g| f| e| d| c | b | a |
+ --------------------------------------------------
+
+
+ Add table 3.17.2: Intensity modifier sets for ETC1 compressed textures:
+
+ table codeword modifier table
+ ------------------ ----------------------
+ 0 -8 -2 2 8
+ 1 -17 -5 5 17
+ 2 -29 -9 9 29
+ 3 -42 -13 13 42
+ 4 -60 -18 18 60
+ 5 -80 -24 24 80
+ 6 -106 -33 33 106
+ 7 -183 -47 47 183
+
+
+ Add table 3.17.3 Mapping from pixel index values to modifier values for
+ ETC1 compressed textures:
+
+ pixel index value
+ ---------------
+ msb lsb resulting modifier value
+ ----- ----- -------------------------
+ 1 1 -b (large negative value)
+ 1 0 -a (small negative value)
+ 0 0 a (small positive value)
+ 0 1 b (large positive value)
+
+
+ */
+
+static const int kModifierTable[] = {
+/* 0 */2, 8, -2, -8,
+/* 1 */5, 17, -5, -17,
+/* 2 */9, 29, -9, -29,
+/* 3 */13, 42, -13, -42,
+/* 4 */18, 60, -18, -60,
+/* 5 */24, 80, -24, -80,
+/* 6 */33, 106, -33, -106,
+/* 7 */47, 183, -47, -183 };
+
+static const int kLookup[8] = { 0, 1, 2, 3, -4, -3, -2, -1 };
+
+static inline etc1_byte clamp(int x) {
+ return (etc1_byte) (x >= 0 ? (x < 255 ? x : 255) : 0);
+}
+
+static
+inline int convert4To8(int b) {
+ int c = b & 0xf;
+ return (c << 4) | c;
+}
+
+static
+inline int convert5To8(int b) {
+ int c = b & 0x1f;
+ return (c << 3) | (c >> 2);
+}
+
+static
+inline int convert6To8(int b) {
+ int c = b & 0x3f;
+ return (c << 2) | (c >> 4);
+}
+
+static
+inline int divideBy255(int d) {
+ return (d + 128 + (d >> 8)) >> 8;
+}
+
+static
+inline int convert8To4(int b) {
+ int c = b & 0xff;
+ return divideBy255(b * 15);
+}
+
+static
+inline int convert8To5(int b) {
+ int c = b & 0xff;
+ return divideBy255(b * 31);
+}
+
+static
+inline int convertDiff(int base, int diff) {
+ return convert5To8((0x1f & base) + kLookup[0x7 & diff]);
+}
+
+static
+void decode_subblock(etc1_byte* pOut, int r, int g, int b, const int* table,
+ etc1_uint32 low, bool second, bool flipped) {
+ int baseX = 0;
+ int baseY = 0;
+ if (second) {
+ if (flipped) {
+ baseY = 2;
+ } else {
+ baseX = 2;
+ }
+ }
+ for (int i = 0; i < 8; i++) {
+ int x, y;
+ if (flipped) {
+ x = baseX + (i >> 1);
+ y = baseY + (i & 1);
+ } else {
+ x = baseX + (i >> 2);
+ y = baseY + (i & 3);
+ }
+ int k = y + (x * 4);
+ int offset = ((low >> k) & 1) | ((low >> (k + 15)) & 2);
+ int delta = table[offset];
+ etc1_byte* q = pOut + 3 * (x + 4 * y);
+ *q++ = clamp(r + delta);
+ *q++ = clamp(g + delta);
+ *q++ = clamp(b + delta);
+ }
+}
+
+// Input is an ETC1 compressed version of the data.
+// Output is a 4 x 4 square of 3-byte pixels in form R, G, B
+
+void etc1_decode_block(const etc1_byte* pIn, etc1_byte* pOut) {
+ etc1_uint32 high = (pIn[0] << 24) | (pIn[1] << 16) | (pIn[2] << 8) | pIn[3];
+ etc1_uint32 low = (pIn[4] << 24) | (pIn[5] << 16) | (pIn[6] << 8) | pIn[7];
+ int r1, r2, g1, g2, b1, b2;
+ if (high & 2) {
+ // differential
+ int rBase = high >> 27;
+ int gBase = high >> 19;
+ int bBase = high >> 11;
+ r1 = convert5To8(rBase);
+ r2 = convertDiff(rBase, high >> 24);
+ g1 = convert5To8(gBase);
+ g2 = convertDiff(gBase, high >> 16);
+ b1 = convert5To8(bBase);
+ b2 = convertDiff(bBase, high >> 8);
+ } else {
+ // not differential
+ r1 = convert4To8(high >> 28);
+ r2 = convert4To8(high >> 24);
+ g1 = convert4To8(high >> 20);
+ g2 = convert4To8(high >> 16);
+ b1 = convert4To8(high >> 12);
+ b2 = convert4To8(high >> 8);
+ }
+ int tableIndexA = 7 & (high >> 5);
+ int tableIndexB = 7 & (high >> 2);
+ const int* tableA = kModifierTable + tableIndexA * 4;
+ const int* tableB = kModifierTable + tableIndexB * 4;
+ bool flipped = (high & 1) != 0;
+ decode_subblock(pOut, r1, g1, b1, tableA, low, false, flipped);
+ decode_subblock(pOut, r2, g2, b2, tableB, low, true, flipped);
+}
+
+typedef struct {
+ etc1_uint32 high;
+ etc1_uint32 low;
+ etc1_uint32 score; // Lower is more accurate
+} etc_compressed;
+
+static
+inline void take_best(etc_compressed* a, const etc_compressed* b) {
+ if (a->score > b->score) {
+ *a = *b;
+ }
+}
+
+static
+void etc_average_colors_subblock(const etc1_byte* pIn, etc1_uint32 inMask,
+ etc1_byte* pColors, bool flipped, bool second) {
+ int r = 0;
+ int g = 0;
+ int b = 0;
+
+ if (flipped) {
+ int by = 0;
+ if (second) {
+ by = 2;
+ }
+ for (int y = 0; y < 2; y++) {
+ int yy = by + y;
+ for (int x = 0; x < 4; x++) {
+ int i = x + 4 * yy;
+ if (inMask & (1 << i)) {
+ const etc1_byte* p = pIn + i * 3;
+ r += *(p++);
+ g += *(p++);
+ b += *(p++);
+ }
+ }
+ }
+ } else {
+ int bx = 0;
+ if (second) {
+ bx = 2;
+ }
+ for (int y = 0; y < 4; y++) {
+ for (int x = 0; x < 2; x++) {
+ int xx = bx + x;
+ int i = xx + 4 * y;
+ if (inMask & (1 << i)) {
+ const etc1_byte* p = pIn + i * 3;
+ r += *(p++);
+ g += *(p++);
+ b += *(p++);
+ }
+ }
+ }
+ }
+ pColors[0] = (etc1_byte)((r + 4) >> 3);
+ pColors[1] = (etc1_byte)((g + 4) >> 3);
+ pColors[2] = (etc1_byte)((b + 4) >> 3);
+}
+
+static
+inline int square(int x) {
+ return x * x;
+}
+
+static etc1_uint32 chooseModifier(const etc1_byte* pBaseColors,
+ const etc1_byte* pIn, etc1_uint32 *pLow, int bitIndex,
+ const int* pModifierTable) {
+ etc1_uint32 bestScore = ~0;
+ int bestIndex = 0;
+ int pixelR = pIn[0];
+ int pixelG = pIn[1];
+ int pixelB = pIn[2];
+ int r = pBaseColors[0];
+ int g = pBaseColors[1];
+ int b = pBaseColors[2];
+ for (int i = 0; i < 4; i++) {
+ int modifier = pModifierTable[i];
+ int decodedG = clamp(g + modifier);
+ etc1_uint32 score = (etc1_uint32) (6 * square(decodedG - pixelG));
+ if (score >= bestScore) {
+ continue;
+ }
+ int decodedR = clamp(r + modifier);
+ score += (etc1_uint32) (3 * square(decodedR - pixelR));
+ if (score >= bestScore) {
+ continue;
+ }
+ int decodedB = clamp(b + modifier);
+ score += (etc1_uint32) square(decodedB - pixelB);
+ if (score < bestScore) {
+ bestScore = score;
+ bestIndex = i;
+ }
+ }
+ etc1_uint32 lowMask = (((bestIndex >> 1) << 16) | (bestIndex & 1))
+ << bitIndex;
+ *pLow |= lowMask;
+ return bestScore;
+}
+
+static
+void etc_encode_subblock_helper(const etc1_byte* pIn, etc1_uint32 inMask,
+ etc_compressed* pCompressed, bool flipped, bool second,
+ const etc1_byte* pBaseColors, const int* pModifierTable) {
+ int score = pCompressed->score;
+ if (flipped) {
+ int by = 0;
+ if (second) {
+ by = 2;
+ }
+ for (int y = 0; y < 2; y++) {
+ int yy = by + y;
+ for (int x = 0; x < 4; x++) {
+ int i = x + 4 * yy;
+ if (inMask & (1 << i)) {
+ score += chooseModifier(pBaseColors, pIn + i * 3,
+ &pCompressed->low, yy + x * 4, pModifierTable);
+ }
+ }
+ }
+ } else {
+ int bx = 0;
+ if (second) {
+ bx = 2;
+ }
+ for (int y = 0; y < 4; y++) {
+ for (int x = 0; x < 2; x++) {
+ int xx = bx + x;
+ int i = xx + 4 * y;
+ if (inMask & (1 << i)) {
+ score += chooseModifier(pBaseColors, pIn + i * 3,
+ &pCompressed->low, y + xx * 4, pModifierTable);
+ }
+ }
+ }
+ }
+ pCompressed->score = score;
+}
+
+static bool inRange4bitSigned(int color) {
+ return color >= -4 && color <= 3;
+}
+
+static void etc_encodeBaseColors(etc1_byte* pBaseColors,
+ const etc1_byte* pColors, etc_compressed* pCompressed) {
+ int r1, g1, b1, r2, g2, b2; // 8 bit base colors for sub-blocks
+ bool differential;
+ {
+ int r51 = convert8To5(pColors[0]);
+ int g51 = convert8To5(pColors[1]);
+ int b51 = convert8To5(pColors[2]);
+ int r52 = convert8To5(pColors[3]);
+ int g52 = convert8To5(pColors[4]);
+ int b52 = convert8To5(pColors[5]);
+
+ r1 = convert5To8(r51);
+ g1 = convert5To8(g51);
+ b1 = convert5To8(b51);
+
+ int dr = r52 - r51;
+ int dg = g52 - g51;
+ int db = b52 - b51;
+
+ differential = inRange4bitSigned(dr) && inRange4bitSigned(dg)
+ && inRange4bitSigned(db);
+ if (differential) {
+ r2 = convert5To8(r51 + dr);
+ g2 = convert5To8(g51 + dg);
+ b2 = convert5To8(b51 + db);
+ pCompressed->high |= (r51 << 27) | ((7 & dr) << 24) | (g51 << 19)
+ | ((7 & dg) << 16) | (b51 << 11) | ((7 & db) << 8) | 2;
+ }
+ }
+
+ if (!differential) {
+ int r41 = convert8To4(pColors[0]);
+ int g41 = convert8To4(pColors[1]);
+ int b41 = convert8To4(pColors[2]);
+ int r42 = convert8To4(pColors[3]);
+ int g42 = convert8To4(pColors[4]);
+ int b42 = convert8To4(pColors[5]);
+ r1 = convert4To8(r41);
+ g1 = convert4To8(g41);
+ b1 = convert4To8(b41);
+ r2 = convert4To8(r42);
+ g2 = convert4To8(g42);
+ b2 = convert4To8(b42);
+ pCompressed->high |= (r41 << 28) | (r42 << 24) | (g41 << 20) | (g42
+ << 16) | (b41 << 12) | (b42 << 8);
+ }
+ pBaseColors[0] = r1;
+ pBaseColors[1] = g1;
+ pBaseColors[2] = b1;
+ pBaseColors[3] = r2;
+ pBaseColors[4] = g2;
+ pBaseColors[5] = b2;
+}
+
+static
+void etc_encode_block_helper(const etc1_byte* pIn, etc1_uint32 inMask,
+ const etc1_byte* pColors, etc_compressed* pCompressed, bool flipped) {
+ pCompressed->score = ~0;
+ pCompressed->high = (flipped ? 1 : 0);
+ pCompressed->low = 0;
+
+ etc1_byte pBaseColors[6];
+
+ etc_encodeBaseColors(pBaseColors, pColors, pCompressed);
+
+ int originalHigh = pCompressed->high;
+
+ const int* pModifierTable = kModifierTable;
+ for (int i = 0; i < 8; i++, pModifierTable += 4) {
+ etc_compressed temp;
+ temp.score = 0;
+ temp.high = originalHigh | (i << 5);
+ temp.low = 0;
+ etc_encode_subblock_helper(pIn, inMask, &temp, flipped, false,
+ pBaseColors, pModifierTable);
+ take_best(pCompressed, &temp);
+ }
+ pModifierTable = kModifierTable;
+ etc_compressed firstHalf = *pCompressed;
+ for (int i = 0; i < 8; i++, pModifierTable += 4) {
+ etc_compressed temp;
+ temp.score = firstHalf.score;
+ temp.high = firstHalf.high | (i << 2);
+ temp.low = firstHalf.low;
+ etc_encode_subblock_helper(pIn, inMask, &temp, flipped, true,
+ pBaseColors + 3, pModifierTable);
+ if (i == 0) {
+ *pCompressed = temp;
+ } else {
+ take_best(pCompressed, &temp);
+ }
+ }
+}
+
+static void writeBigEndian(etc1_byte* pOut, etc1_uint32 d) {
+ pOut[0] = (etc1_byte)(d >> 24);
+ pOut[1] = (etc1_byte)(d >> 16);
+ pOut[2] = (etc1_byte)(d >> 8);
+ pOut[3] = (etc1_byte) d;
+}
+
+// Input is a 4 x 4 square of 3-byte pixels in form R, G, B
+// inmask is a 16-bit mask where bit (1 << (x + y * 4)) tells whether the corresponding (x,y)
+// pixel is valid or not. Invalid pixel color values are ignored when compressing.
+// Output is an ETC1 compressed version of the data.
+
+void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 inMask,
+ etc1_byte* pOut) {
+ etc1_byte colors[6];
+ etc1_byte flippedColors[6];
+ etc_average_colors_subblock(pIn, inMask, colors, false, false);
+ etc_average_colors_subblock(pIn, inMask, colors + 3, false, true);
+ etc_average_colors_subblock(pIn, inMask, flippedColors, true, false);
+ etc_average_colors_subblock(pIn, inMask, flippedColors + 3, true, true);
+
+ etc_compressed a, b;
+ etc_encode_block_helper(pIn, inMask, colors, &a, false);
+ etc_encode_block_helper(pIn, inMask, flippedColors, &b, true);
+ take_best(&a, &b);
+ writeBigEndian(pOut, a.high);
+ writeBigEndian(pOut + 4, a.low);
+}
+
+// Return the size of the encoded image data (does not include size of PKM header).
+
+etc1_uint32 etc1_get_encoded_data_size(etc1_uint32 width, etc1_uint32 height) {
+ return (((width + 3) & ~3) * ((height + 3) & ~3)) >> 1;
+}
+
+// Encode an entire image.
+// pIn - pointer to the image data. Formatted such that the Red component of
+// pixel (x,y) is at pIn + pixelSize * x + stride * y + redOffset;
+// pOut - pointer to encoded data. Must be large enough to store entire encoded image.
+
+int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height,
+ etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut) {
+ if (pixelSize < 2 || pixelSize > 3) {
+ return -1;
+ }
+ static const unsigned short kYMask[] = { 0x0, 0xf, 0xff, 0xfff, 0xffff };
+ static const unsigned short kXMask[] = { 0x0, 0x1111, 0x3333, 0x7777,
+ 0xffff };
+ etc1_byte block[ETC1_DECODED_BLOCK_SIZE];
+ etc1_byte encoded[ETC1_ENCODED_BLOCK_SIZE];
+
+ etc1_uint32 encodedWidth = (width + 3) & ~3;
+ etc1_uint32 encodedHeight = (height + 3) & ~3;
+
+ for (etc1_uint32 y = 0; y < encodedHeight; y += 4) {
+ etc1_uint32 yEnd = height - y;
+ if (yEnd > 4) {
+ yEnd = 4;
+ }
+ int ymask = kYMask[yEnd];
+ for (etc1_uint32 x = 0; x < encodedWidth; x += 4) {
+ etc1_uint32 xEnd = width - x;
+ if (xEnd > 4) {
+ xEnd = 4;
+ }
+ int mask = ymask & kXMask[xEnd];
+ for (etc1_uint32 cy = 0; cy < yEnd; cy++) {
+ etc1_byte* q = block + (cy * 4) * 3;
+ const etc1_byte* p = pIn + pixelSize * x + stride * (y + cy);
+ if (pixelSize == 3) {
+ memcpy(q, p, xEnd * 3);
+ } else {
+ for (etc1_uint32 cx = 0; cx < xEnd; cx++) {
+ int pixel = (p[1] << 8) | p[0];
+ *q++ = convert5To8(pixel >> 11);
+ *q++ = convert6To8(pixel >> 5);
+ *q++ = convert5To8(pixel);
+ p += pixelSize;
+ }
+ }
+ }
+ etc1_encode_block(block, mask, encoded);
+ memcpy(pOut, encoded, sizeof(encoded));
+ pOut += sizeof(encoded);
+ }
+ }
+ return 0;
+}
+
+// Decode an entire image.
+// pIn - pointer to encoded data.
+// pOut - pointer to the image data. Will be written such that the Red component of
+// pixel (x,y) is at pIn + pixelSize * x + stride * y + redOffset. Must be
+// large enough to store entire image.
+
+
+int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut,
+ etc1_uint32 width, etc1_uint32 height,
+ etc1_uint32 pixelSize, etc1_uint32 stride) {
+ if (pixelSize < 2 || pixelSize > 3) {
+ return -1;
+ }
+ etc1_byte block[ETC1_DECODED_BLOCK_SIZE];
+
+ etc1_uint32 encodedWidth = (width + 3) & ~3;
+ etc1_uint32 encodedHeight = (height + 3) & ~3;
+
+ for (etc1_uint32 y = 0; y < encodedHeight; y += 4) {
+ etc1_uint32 yEnd = height - y;
+ if (yEnd > 4) {
+ yEnd = 4;
+ }
+ for (etc1_uint32 x = 0; x < encodedWidth; x += 4) {
+ etc1_uint32 xEnd = width - x;
+ if (xEnd > 4) {
+ xEnd = 4;
+ }
+ etc1_decode_block(pIn, block);
+ pIn += ETC1_ENCODED_BLOCK_SIZE;
+ for (etc1_uint32 cy = 0; cy < yEnd; cy++) {
+ const etc1_byte* q = block + (cy * 4) * 3;
+ etc1_byte* p = pOut + pixelSize * x + stride * (y + cy);
+ if (pixelSize == 3) {
+ memcpy(p, q, xEnd * 3);
+ } else {
+ for (etc1_uint32 cx = 0; cx < xEnd; cx++) {
+ etc1_byte r = *q++;
+ etc1_byte g = *q++;
+ etc1_byte b = *q++;
+ etc1_uint32 pixel = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3);
+ *p++ = (etc1_byte) pixel;
+ *p++ = (etc1_byte) (pixel >> 8);
+ }
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+static const char kMagic[] = { 'P', 'K', 'M', ' ', '1', '0' };
+
+static const etc1_uint32 ETC1_PKM_FORMAT_OFFSET = 6;
+static const etc1_uint32 ETC1_PKM_ENCODED_WIDTH_OFFSET = 8;
+static const etc1_uint32 ETC1_PKM_ENCODED_HEIGHT_OFFSET = 10;
+static const etc1_uint32 ETC1_PKM_WIDTH_OFFSET = 12;
+static const etc1_uint32 ETC1_PKM_HEIGHT_OFFSET = 14;
+
+static const etc1_uint32 ETC1_RGB_NO_MIPMAPS = 0;
+
+static void writeBEUint16(etc1_byte* pOut, etc1_uint32 data) {
+ pOut[0] = (etc1_byte) (data >> 8);
+ pOut[1] = (etc1_byte) data;
+}
+
+static etc1_uint32 readBEUint16(const etc1_byte* pIn) {
+ return (pIn[0] << 8) | pIn[1];
+}
+
+// Format a PKM header
+
+void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height) {
+ memcpy(pHeader, kMagic, sizeof(kMagic));
+ etc1_uint32 encodedWidth = (width + 3) & ~3;
+ etc1_uint32 encodedHeight = (height + 3) & ~3;
+ writeBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET, ETC1_RGB_NO_MIPMAPS);
+ writeBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET, encodedWidth);
+ writeBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET, encodedHeight);
+ writeBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET, width);
+ writeBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET, height);
+}
+
+// Check if a PKM header is correctly formatted.
+
+etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader) {
+ if (memcmp(pHeader, kMagic, sizeof(kMagic))) {
+ return false;
+ }
+ etc1_uint32 format = readBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET);
+ etc1_uint32 encodedWidth = readBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET);
+ etc1_uint32 encodedHeight = readBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET);
+ etc1_uint32 width = readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET);
+ etc1_uint32 height = readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET);
+ return format == ETC1_RGB_NO_MIPMAPS &&
+ encodedWidth >= width && encodedWidth - width < 4 &&
+ encodedHeight >= height && encodedHeight - height < 4;
+}
+
+// Read the image width from a PKM header
+
+etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader) {
+ return readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET);
+}
+
+// Read the image height from a PKM header
+
+etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader){
+ return readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET);
+}
diff --git a/opengl/tests/gl2_jni/Android.mk b/opengl/tests/gl2_jni/Android.mk
index 81247df..384966c 100644
--- a/opengl/tests/gl2_jni/Android.mk
+++ b/opengl/tests/gl2_jni/Android.mk
@@ -11,7 +11,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
diff --git a/opengl/tests/gl_basic/gl_basic.cpp b/opengl/tests/gl_basic/gl_basic.cpp
index 7dc2378..feb964a 100644
--- a/opengl/tests/gl_basic/gl_basic.cpp
+++ b/opengl/tests/gl_basic/gl_basic.cpp
@@ -1,32 +1,39 @@
// Simple OpenGL ES 1.x application showing how to initialize and draw something.
-#include <EGL/egl.h>
+#include <EGL/egl.h>
+
#include <GLES/gl.h>
#include <GLES/glext.h>
#include <ui/FramebufferNativeWindow.h>
#include <ui/EGLUtils.h>
-#include <stdio.h>
+#include <stdio.h>
+
#include <stdlib.h>
#include <math.h>
using namespace android;
-
-EGLDisplay eglDisplay;
-EGLSurface eglSurface;
-EGLContext eglContext;
-GLuint texture;
-
+
+EGLDisplay eglDisplay;
+EGLSurface eglSurface;
+EGLContext eglContext;
+GLuint texture;
+
#define FIXED_ONE 0x10000
-#define ITERATIONS 50
-
-int init_gl_surface(void);
-void free_gl_surface(void);
-void init_scene(void);
-void render();
+#define ITERATIONS 50
+
+int init_gl_surface(void);
+void free_gl_surface(void);
+void init_scene(void);
+void render();
void create_texture(void);
-int readTimer(void);
+int readTimer(void);
+
+static void printGLString(const char *name, GLenum s) {
+ const char *v = (const char *) glGetString(s);
+ fprintf(stderr, "GL %s = %s\n", name, v);
+}
static void gluLookAt(float eyeX, float eyeY, float eyeZ,
float centerX, float centerY, float centerZ, float upX, float upY,
@@ -87,7 +94,6 @@
glTranslatef(-eyeX, -eyeY, -eyeZ);
}
-
void printEGLConfiguration(EGLDisplay dpy, EGLConfig config) {
#define X(VAL) {VAL, #VAL}
@@ -183,125 +189,129 @@
free(configs);
return true;
}
-
-int main(int argc, char **argv)
-{
+
+int main(int argc, char **argv)
+{
int q;
- int start, end;
-
+ int start, end;
printf("Initializing EGL...\n");
-
- if(!init_gl_surface())
- {
- printf("GL initialisation failed - exiting\n");
- return 0;
- }
-
- init_scene();
-
- create_texture();
-
+ if(!init_gl_surface())
+ {
+ printf("GL initialisation failed - exiting\n");
+ return 0;
+ }
+ init_scene();
+ create_texture();
printf("Running...\n");
-
while(true) {
render();
- }
-
- free_gl_surface();
-
- return 0;
-}
-
-int init_gl_surface(void)
-{
- EGLint numConfigs = 1;
- EGLConfig myConfig = {0};
- EGLint attrib[] =
- {
- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
- EGL_NONE
- };
-
- if ( (eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY)) == EGL_NO_DISPLAY )
- {
- printf("eglGetDisplay failed\n");
- return 0;
}
-
- if ( eglInitialize(eglDisplay, NULL, NULL) != EGL_TRUE )
- {
- printf("eglInitialize failed\n");
- return 0;
+ free_gl_surface();
+ return 0;
+}
+
+int init_gl_surface(void)
+{
+ EGLint numConfigs = 1;
+ EGLConfig myConfig = {0};
+ EGLint attrib[] =
+ {
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+ EGL_NONE
+ };
+
+ if ( (eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY)) == EGL_NO_DISPLAY )
+ {
+ printf("eglGetDisplay failed\n");
+ return 0;
+ }
+
+ if ( eglInitialize(eglDisplay, NULL, NULL) != EGL_TRUE )
+ {
+ printf("eglInitialize failed\n");
+ return 0;
}
if (! printEGLConfigurations(eglDisplay)) {
printf("printEGLConfigurations failed.\n");
return 0;
- }
- EGLNativeWindowType window = android_createDisplaySurface();
- EGLUtils::selectConfigForNativeWindow(eglDisplay, attrib, window, &myConfig);
-
+ }
+
+ EGLNativeWindowType window = android_createDisplaySurface();
+ EGLUtils::selectConfigForNativeWindow(eglDisplay, attrib, window, &myConfig);
+
if ( (eglSurface = eglCreateWindowSurface(eglDisplay, myConfig,
- window, 0)) == EGL_NO_SURFACE )
- {
- printf("eglCreateWindowSurface failed\n");
- return 0;
- }
-
- if ( (eglContext = eglCreateContext(eglDisplay, myConfig, 0, 0)) == EGL_NO_CONTEXT )
- {
- printf("eglCreateContext failed\n");
- return 0;
- }
-
- if ( eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext) != EGL_TRUE )
- {
- printf("eglMakeCurrent failed\n");
- return 0;
- }
-
- return 1;
-}
-
-void free_gl_surface(void)
-{
- if (eglDisplay != EGL_NO_DISPLAY)
- {
- eglMakeCurrent( EGL_NO_DISPLAY, EGL_NO_SURFACE,
- EGL_NO_SURFACE, EGL_NO_CONTEXT );
- eglDestroyContext( eglDisplay, eglContext );
- eglDestroySurface( eglDisplay, eglSurface );
- eglTerminate( eglDisplay );
- eglDisplay = EGL_NO_DISPLAY;
- }
-}
-
-void init_scene(void)
-{
+ window, 0)) == EGL_NO_SURFACE )
+ {
+ printf("eglCreateWindowSurface failed\n");
+ return 0;
+ }
+
+ if ( (eglContext = eglCreateContext(eglDisplay, myConfig, 0, 0)) == EGL_NO_CONTEXT )
+ {
+ printf("eglCreateContext failed\n");
+ return 0;
+ }
+
+ if ( eglMakeCurrent(eglDisplay, eglSurface, eglSurface, eglContext) != EGL_TRUE )
+ {
+ printf("eglMakeCurrent failed\n");
+ return 0;
+ }
+
+ int w, h;
+
+ eglQuerySurface(eglDisplay, eglSurface, EGL_WIDTH, &w);
+ checkEglError("eglQuerySurface");
+ eglQuerySurface(eglDisplay, eglSurface, EGL_HEIGHT, &h);
+ checkEglError("eglQuerySurface");
+ GLint dim = w < h ? w : h;
+
+ fprintf(stderr, "Window dimensions: %d x %d\n", w, h);
+
+ printGLString("Version", GL_VERSION);
+ printGLString("Vendor", GL_VENDOR);
+ printGLString("Renderer", GL_RENDERER);
+ printGLString("Extensions", GL_EXTENSIONS);
+
+ return 1;
+}
+
+void free_gl_surface(void)
+{
+ if (eglDisplay != EGL_NO_DISPLAY)
+ {
+ eglMakeCurrent( EGL_NO_DISPLAY, EGL_NO_SURFACE,
+ EGL_NO_SURFACE, EGL_NO_CONTEXT );
+ eglDestroyContext( eglDisplay, eglContext );
+ eglDestroySurface( eglDisplay, eglSurface );
+ eglTerminate( eglDisplay );
+ eglDisplay = EGL_NO_DISPLAY;
+ }
+}
+
+void init_scene(void)
+{
glDisable(GL_DITHER);
glEnable(GL_CULL_FACE);
-
float ratio = 320.0f / 480.0f;
glViewport(0, 0, 320, 480);
-
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustumf(-ratio, ratio, -1, 1, 1, 10);
-
- glMatrixMode(GL_MODELVIEW);
+ glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(
0, 0, 3, // eye
0, 0, 0, // center
0, 1, 0); // up
-
- glEnable(GL_TEXTURE_2D);
- glEnableClientState(GL_VERTEX_ARRAY);
+ glEnable(GL_TEXTURE_2D);
+ glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-}
-
-void create_texture(void)
-{
+}
+
+void create_texture(void)
+{
const unsigned int on = 0xff0000ff;
const unsigned int off = 0xffffffff;
const unsigned int pixels[] =
@@ -314,44 +324,42 @@
off, on, off, on, off, on, off, on,
on, off, on, off, on, off, on, off,
off, on, off, on, off, on, off, on,
- };
- glGenTextures(1, &texture);
- glBindTexture(GL_TEXTURE_2D, texture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-}
-
-void render()
-{
+ };
+
+ glGenTextures(1, &texture);
+ glBindTexture(GL_TEXTURE_2D, texture);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
+ glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+}
+
+void render()
+{
int i, j;
- int quads = 1;
-
- const GLfloat vertices[] = {
- -1, -1, 0,
- 1, -1, 0,
- 1, 1, 0,
- -1, 1, 0
- };
-
- const GLfixed texCoords[] = {
- 0, 0,
- FIXED_ONE, 0,
- FIXED_ONE, FIXED_ONE,
- 0, FIXED_ONE
- };
-
+ int quads = 1;
+
+ const GLfloat vertices[] = {
+ -1, -1, 0,
+ 1, -1, 0,
+ 1, 1, 0,
+ -1, 1, 0
+ };
+
+ const GLfixed texCoords[] = {
+ 0, 0,
+ FIXED_ONE, 0,
+ FIXED_ONE, FIXED_ONE,
+ 0, FIXED_ONE
+ };
+
const GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
-
- glVertexPointer(3, GL_FLOAT, 0, vertices);
+
+ glVertexPointer(3, GL_FLOAT, 0, vertices);
glTexCoordPointer(2, GL_FIXED, 0, texCoords);
-
glClearColor(1.0, 1.0, 1.0, 1.0);
-
int nelem = sizeof(indices)/sizeof(indices[0]);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
glDrawElements(GL_TRIANGLES, nelem, GL_UNSIGNED_SHORT, indices);
- eglSwapBuffers(eglDisplay, eglSurface);
-}
-
+ eglSwapBuffers(eglDisplay, eglSurface);
+}
diff --git a/opengl/tests/gl_jni/Android.mk b/opengl/tests/gl_jni/Android.mk
index 4029fa1..f1bd31d 100644
--- a/opengl/tests/gl_jni/Android.mk
+++ b/opengl/tests/gl_jni/Android.mk
@@ -11,7 +11,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
diff --git a/opengl/tests/gldual/Android.mk b/opengl/tests/gldual/Android.mk
index e73c249..995a5d7 100644
--- a/opengl/tests/gldual/Android.mk
+++ b/opengl/tests/gldual/Android.mk
@@ -11,7 +11,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
diff --git a/opengl/tests/gldual/res/layout/gldual_activity.xml b/opengl/tests/gldual/res/layout/gldual_activity.xml
index f2d59c7..d75acbc 100644
--- a/opengl/tests/gldual/res/layout/gldual_activity.xml
+++ b/opengl/tests/gldual/res/layout/gldual_activity.xml
@@ -17,14 +17,14 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<android.opengl.GLSurfaceView android:id="@+id/gl1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1" />
<com.android.gldual.GLDualGL2View android:id="@+id/gl2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1" />
</LinearLayout>
diff --git a/packages/SettingsProvider/Android.mk b/packages/SettingsProvider/Android.mk
index 724e988..bf4ab1b 100644
--- a/packages/SettingsProvider/Android.mk
+++ b/packages/SettingsProvider/Android.mk
@@ -1,7 +1,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
diff --git a/packages/SettingsProvider/res/values-da/strings.xml b/packages/SettingsProvider/res/values-da/strings.xml
index f0afc0b..bc160f3 100644
--- a/packages/SettingsProvider/res/values-da/strings.xml
+++ b/packages/SettingsProvider/res/values-da/strings.xml
@@ -15,5 +15,5 @@
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_label" msgid="4567566098528588863">"Indstillingslagring"</string>
+ <string name="app_label" msgid="4567566098528588863">"Lagring af indstillinger"</string>
</resources>
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index ab93d8c..7686aa0 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -51,4 +51,10 @@
<!-- Default value for whether or not to pulse the notification LED when there is a
pending notification -->
<bool name="def_notification_pulse">true</bool>
+
+ <bool name="def_mount_play_notification_snd">true</bool>
+ <bool name="def_mount_ums_autostart">false</bool>
+ <bool name="def_mount_ums_prompt">true</bool>
+ <bool name="def_mount_ums_notify_enabled">true</bool>
+
</resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index e28e915..a1dca7e 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -71,7 +71,7 @@
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
// is properly propagated through your change. Not doing so will result in a loss of user
// settings.
- private static final int DATABASE_VERSION = 43;
+ private static final int DATABASE_VERSION = 46;
private Context mContext;
@@ -100,13 +100,6 @@
createSecureTable(db);
- db.execSQL("CREATE TABLE gservices (" +
- "_id INTEGER PRIMARY KEY AUTOINCREMENT," +
- "name TEXT UNIQUE ON CONFLICT REPLACE," +
- "value TEXT" +
- ");");
- db.execSQL("CREATE INDEX gservicesIndex1 ON gservices (name);");
-
db.execSQL("CREATE TABLE bluetooth_devices (" +
"_id INTEGER PRIMARY KEY," +
"name TEXT," +
@@ -539,6 +532,55 @@
upgradeVersion = 43;
}
+ if (upgradeVersion == 43) {
+ /*
+ * This upgrade stores bluetooth volume separately from voice volume
+ */
+ db.beginTransaction();
+ try {
+ SQLiteStatement stmt = db.compileStatement("INSERT OR IGNORE INTO system(name,value)"
+ + " VALUES(?,?);");
+ loadSetting(stmt, Settings.System.VOLUME_BLUETOOTH_SCO,
+ AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_BLUETOOTH_SCO]);
+ stmt.close();
+ db.setTransactionSuccessful();
+ } finally {
+ db.endTransaction();
+ }
+ upgradeVersion = 44;
+ }
+
+ if (upgradeVersion == 44) {
+ /*
+ * Gservices was moved into vendor/google.
+ */
+ db.execSQL("DROP TABLE IF EXISTS gservices");
+ db.execSQL("DROP INDEX IF EXISTS gservicesIndex1");
+ upgradeVersion = 45;
+ }
+
+ if (upgradeVersion == 45) {
+ /*
+ * New settings for MountService
+ */
+ db.beginTransaction();
+ try {
+ db.execSQL("INSERT INTO secure(name,value) values('" +
+ Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND + "','1');");
+ db.execSQL("INSERT INTO secure(name,value) values('" +
+ Settings.Secure.MOUNT_UMS_AUTOSTART + "','0');");
+ db.execSQL("INSERT INTO secure(name,value) values('" +
+ Settings.Secure.MOUNT_UMS_PROMPT + "','1');");
+ db.execSQL("INSERT INTO secure(name,value) values('" +
+ Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED + "','1');");
+ db.setTransactionSuccessful();
+ } finally {
+ db.endTransaction();
+ }
+ upgradeVersion = 46;
+ }
+
+
if (upgradeVersion != currentVersion) {
Log.w(TAG, "Got stuck trying to upgrade from version " + upgradeVersion
+ ", must wipe the settings provider");
@@ -691,6 +733,11 @@
stmt,
Settings.System.VOLUME_NOTIFICATION,
AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_NOTIFICATION]);
+ loadSetting(
+ stmt,
+ Settings.System.VOLUME_BLUETOOTH_SCO,
+ AudioManager.DEFAULT_STREAM_VOLUME[AudioManager.STREAM_BLUETOOTH_SCO]);
+
loadSetting(stmt, Settings.System.MODE_RINGER,
AudioManager.RINGER_MODE_NORMAL);
@@ -862,7 +909,19 @@
"1".equals(SystemProperties.get("ro.allow.mock.location")) ? 1 : 0);
loadSecure35Settings(stmt);
-
+
+ loadBooleanSetting(stmt, Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND,
+ R.bool.def_mount_play_notification_snd);
+
+ loadBooleanSetting(stmt, Settings.Secure.MOUNT_UMS_AUTOSTART,
+ R.bool.def_mount_ums_autostart);
+
+ loadBooleanSetting(stmt, Settings.Secure.MOUNT_UMS_PROMPT,
+ R.bool.def_mount_ums_prompt);
+
+ loadBooleanSetting(stmt, Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED,
+ R.bool.def_mount_ums_notify_enabled);
+
stmt.close();
}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index d9f9041..265d138 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -75,8 +75,7 @@
throw new UnsupportedOperationException("WHERE clause not supported: " + url);
} else {
this.table = url.getPathSegments().get(0);
- if ("gservices".equals(this.table) || "system".equals(this.table)
- || "secure".equals(this.table)) {
+ if ("system".equals(this.table) || "secure".equals(this.table)) {
this.where = Settings.NameValueTable.NAME + "=?";
this.args = new String[] { url.getPathSegments().get(1) };
} else {
@@ -110,8 +109,7 @@
throw new IllegalArgumentException("Invalid URI: " + tableUri);
}
String table = tableUri.getPathSegments().get(0);
- if ("gservices".equals(table) || "system".equals(table)
- || "secure".equals(table)) {
+ if ("system".equals(table) || "secure".equals(table)) {
String name = values.getAsString(Settings.NameValueTable.NAME);
return Uri.withAppendedPath(tableUri, name);
} else {
@@ -139,8 +137,6 @@
} else if (table.equals("secure")) {
property = Settings.Secure.SYS_PROP_SETTING_VERSION;
backedUpDataChanged = true;
- } else if (table.equals("gservices")) {
- property = Settings.Gservices.SYS_PROP_SETTING_VERSION;
}
if (property != null) {
@@ -171,21 +167,12 @@
*/
private void checkWritePermissions(SqlArguments args) {
if ("secure".equals(args.table) &&
- getContext().checkCallingOrSelfPermission(
- android.Manifest.permission.WRITE_SECURE_SETTINGS) !=
- PackageManager.PERMISSION_GRANTED) {
- throw new SecurityException(
- String.format("Permission denial: writing to secure settings requires %1$s",
- android.Manifest.permission.WRITE_SECURE_SETTINGS));
-
- // TODO: Move gservices into its own provider so we don't need this nonsense.
- } else if ("gservices".equals(args.table) &&
getContext().checkCallingOrSelfPermission(
- android.Manifest.permission.WRITE_GSERVICES) !=
- PackageManager.PERMISSION_GRANTED) {
+ android.Manifest.permission.WRITE_SECURE_SETTINGS) !=
+ PackageManager.PERMISSION_GRANTED) {
throw new SecurityException(
- String.format("Permission denial: writing to gservices settings requires %1$s",
- android.Manifest.permission.WRITE_GSERVICES));
+ String.format("Permission denial: writing to secure settings requires %1$s",
+ android.Manifest.permission.WRITE_SECURE_SETTINGS));
}
}
diff --git a/packages/TtsService/Android.mk b/packages/TtsService/Android.mk
index 2737fb4..5eb6b9c 100644
--- a/packages/TtsService/Android.mk
+++ b/packages/TtsService/Android.mk
@@ -1,7 +1,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files) \
diff --git a/packages/TtsService/jni/android_tts_SynthProxy.cpp b/packages/TtsService/jni/android_tts_SynthProxy.cpp
index 0ec8dab..35b5675 100644
--- a/packages/TtsService/jni/android_tts_SynthProxy.cpp
+++ b/packages/TtsService/jni/android_tts_SynthProxy.cpp
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#define LOG_NDEBUG 0
#include <stdio.h>
#include <unistd.h>
@@ -42,8 +41,6 @@
#define FILTER_TRANSITION_FREQ 1100.0f // in Hz
#define FILTER_SHELF_SLOPE 1.0f // Q
#define FILTER_GAIN 5.5f // linear gain
-// such a huge gain is justified by how much energy in the low frequencies is "wasted" at the output
-// of the synthesis. The low shelving filter removes it, leaving room for amplification.
#define USAGEMODE_PLAY_IMMEDIATELY 0
#define USAGEMODE_WRITE_TO_FILE 1
@@ -81,13 +78,19 @@
double out1;// y[n-1]
double out2;// y[n-2]
+static float fFilterLowshelfAttenuation = FILTER_LOWSHELF_ATTENUATION;
+static float fFilterTransitionFreq = FILTER_TRANSITION_FREQ;
+static float fFilterShelfSlope = FILTER_SHELF_SLOPE;
+static float fFilterGain = FILTER_GAIN;
+static bool bUseFilter = false;
+
void initializeEQ() {
- amp = float(pow(10.0, FILTER_LOWSHELF_ATTENUATION / 40.0));
- w = 2.0 * M_PI * (FILTER_TRANSITION_FREQ / DEFAULT_TTS_RATE);
+ amp = float(pow(10.0, fFilterLowshelfAttenuation / 40.0));
+ w = 2.0 * M_PI * (fFilterTransitionFreq / DEFAULT_TTS_RATE);
sinw = float(sin(w));
cosw = float(cos(w));
- beta = float(sqrt(amp)/FILTER_SHELF_SLOPE);
+ beta = float(sqrt(amp)/fFilterShelfSlope);
// initialize low-shelf parameters
b0 = amp * ((amp+1.0F) - ((amp-1.0F)*cosw) + (beta*sinw));
@@ -97,9 +100,9 @@
a1 = 2.0F * ((amp-1.0F) + ((amp+1.0F)*cosw));
a2 = -((amp+1.0F) + ((amp-1.0F)*cosw) - (beta*sinw));
- m_fa = FILTER_GAIN * b0/a0;
- m_fb = FILTER_GAIN * b1/a0;
- m_fc = FILTER_GAIN * b2/a0;
+ m_fa = fFilterGain * b0/a0;
+ m_fb = fFilterGain * b1/a0;
+ m_fc = fFilterGain * b2/a0;
m_fd = a1/a0;
m_fe = a2/a0;
}
@@ -231,9 +234,8 @@
mAudioOut = NULL;
} else {
//LOGI("AudioTrack OK");
- mAudioOut->setVolume(2.0f, 2.0f);
- mAudioOut->start();
- LOGV("AudioTrack started");
+ mAudioOut->setVolume(1.0f, 1.0f);
+ LOGV("AudioTrack ready");
}
}
};
@@ -286,7 +288,9 @@
if (bufferSize > 0) {
prepAudioTrack(pJniData, pForAfter->streamType, rate, (AudioSystem::audio_format)format, channel);
if (pJniData->mAudioOut) {
- applyFilter((int16_t*)wav, bufferSize/2);
+ if (bUseFilter) {
+ applyFilter((int16_t*)wav, bufferSize/2);
+ }
pJniData->mAudioOut->write(wav, bufferSize);
memset(wav, 0, bufferSize);
//LOGV("AudioTrack wrote: %d bytes", bufferSize);
@@ -302,7 +306,9 @@
return TTS_CALLBACK_HALT;
}
if (bufferSize > 0){
- applyFilter((int16_t*)wav, bufferSize/2);
+ if (bUseFilter) {
+ applyFilter((int16_t*)wav, bufferSize/2);
+ }
fwrite(wav, 1, bufferSize, pForAfter->outputFile);
memset(wav, 0, bufferSize);
}
@@ -336,23 +342,50 @@
// ----------------------------------------------------------------------------
-static void
+static int
+android_tts_SynthProxy_setLowShelf(JNIEnv *env, jobject thiz, jboolean applyFilter,
+ jfloat filterGain, jfloat attenuationInDb, jfloat freqInHz, jfloat slope)
+{
+ int result = TTS_SUCCESS;
+
+ bUseFilter = applyFilter;
+ if (applyFilter) {
+ fFilterLowshelfAttenuation = attenuationInDb;
+ fFilterTransitionFreq = freqInHz;
+ fFilterShelfSlope = slope;
+ fFilterGain = filterGain;
+
+ if (fFilterShelfSlope != 0.0f) {
+ initializeEQ();
+ } else {
+ LOGE("Invalid slope, can't be null");
+ result = TTS_FAILURE;
+ }
+ }
+
+ return result;
+}
+
+// ----------------------------------------------------------------------------
+static int
android_tts_SynthProxy_native_setup(JNIEnv *env, jobject thiz,
jobject weak_this, jstring nativeSoLib)
{
+ int result = TTS_FAILURE;
+
+ bUseFilter = false;
+
SynthProxyJniStorage* pJniStorage = new SynthProxyJniStorage();
prepAudioTrack(pJniStorage,
DEFAULT_TTS_STREAM_TYPE, DEFAULT_TTS_RATE, DEFAULT_TTS_FORMAT, DEFAULT_TTS_NB_CHANNELS);
- const char *nativeSoLibNativeString =
- env->GetStringUTFChars(nativeSoLib, 0);
+ const char *nativeSoLibNativeString = env->GetStringUTFChars(nativeSoLib, 0);
void *engine_lib_handle = dlopen(nativeSoLibNativeString,
RTLD_NOW | RTLD_LOCAL);
if (engine_lib_handle == NULL) {
LOGE("android_tts_SynthProxy_native_setup(): engine_lib_handle == NULL");
- // TODO report error so the TTS can't be used
} else {
TtsEngine *(*get_TtsEngine)() =
reinterpret_cast<TtsEngine* (*)()>(dlsym(engine_lib_handle, "getTtsEngine"));
@@ -364,18 +397,19 @@
Mutex::Autolock l(engineMutex);
pJniStorage->mNativeSynthInterface->init(ttsSynthDoneCB);
}
+
+ result = TTS_SUCCESS;
}
// we use a weak reference so the SynthProxy object can be garbage collected.
pJniStorage->tts_ref = env->NewGlobalRef(weak_this);
// save the JNI resources so we can use them (and free them) later
- env->SetIntField(thiz, javaTTSFields.synthProxyFieldJniData,
- (int)pJniStorage);
-
- initializeEQ();
+ env->SetIntField(thiz, javaTTSFields.synthProxyFieldJniData, (int)pJniStorage);
env->ReleaseStringUTFChars(nativeSoLib, nativeSoLibNativeString);
+
+ return result;
}
@@ -844,9 +878,13 @@
(void*)android_tts_SynthProxy_shutdown
},
{ "native_setup",
- "(Ljava/lang/Object;Ljava/lang/String;)V",
+ "(Ljava/lang/Object;Ljava/lang/String;)I",
(void*)android_tts_SynthProxy_native_setup
},
+ { "native_setLowShelf",
+ "(ZFFFF)I",
+ (void*)android_tts_SynthProxy_setLowShelf
+ },
{ "native_finalize",
"(I)V",
(void*)android_tts_SynthProxy_native_finalize
diff --git a/packages/TtsService/src/android/tts/SynthProxy.java b/packages/TtsService/src/android/tts/SynthProxy.java
index 1d37ba0..6255275 100755
--- a/packages/TtsService/src/android/tts/SynthProxy.java
+++ b/packages/TtsService/src/android/tts/SynthProxy.java
@@ -32,6 +32,15 @@
@SuppressWarnings("unused")
public class SynthProxy {
+ // Default parameters of a filter to be applied when using the Pico engine.
+ // Such a huge filter gain is justified by how much energy in the low frequencies is "wasted" at
+ // the output of the synthesis. The low shelving filter removes it, leaving room for
+ // amplification.
+ private final static float PICO_FILTER_GAIN = 5.5f; // linear gain
+ private final static float PICO_FILTER_LOWSHELF_ATTENUATION = -18.0f; // in dB
+ private final static float PICO_FILTER_TRANSITION_FREQ = 1100.0f; // in Hz
+ private final static float PICO_FILTER_SHELF_SLOPE = 1.0f; // Q
+
//
// External API
//
@@ -40,8 +49,11 @@
* Constructor; pass the location of the native TTS .so to use.
*/
public SynthProxy(String nativeSoLib) {
- Log.v(TtsService.SERVICE_TAG, "TTS is loading " + nativeSoLib);
+ boolean applyFilter = nativeSoLib.toLowerCase().contains("pico");
+ Log.v(TtsService.SERVICE_TAG, "about to load "+ nativeSoLib + ", applyFilter="+applyFilter);
native_setup(new WeakReference<SynthProxy>(this), nativeSoLib);
+ native_setLowShelf(applyFilter, PICO_FILTER_GAIN, PICO_FILTER_LOWSHELF_ATTENUATION,
+ PICO_FILTER_TRANSITION_FREQ, PICO_FILTER_SHELF_SLOPE);
}
/**
@@ -161,8 +173,10 @@
*/
private int mJniData = 0;
- private native final void native_setup(Object weak_this,
- String nativeSoLib);
+ private native final int native_setup(Object weak_this, String nativeSoLib);
+
+ private native final int native_setLowShelf(boolean applyFilter, float filterGain,
+ float attenuationInDb, float freqInHz, float slope);
private native final void native_finalize(int jniData);
diff --git a/packages/TtsService/src/android/tts/TtsService.java b/packages/TtsService/src/android/tts/TtsService.java
index 8d8ef8e..1efa5a3 100755
--- a/packages/TtsService/src/android/tts/TtsService.java
+++ b/packages/TtsService/src/android/tts/TtsService.java
@@ -661,22 +661,27 @@
}
}
- public void onCompletion(MediaPlayer arg0) {
- String callingApp = mCurrentSpeechItem.mCallingApp;
- ArrayList<String> params = mCurrentSpeechItem.mParams;
- String utteranceId = "";
- if (params != null){
- for (int i = 0; i < params.size() - 1; i = i + 2){
- String param = params.get(i);
- if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)){
- utteranceId = params.get(i+1);
- }
- }
- }
- if (utteranceId.length() > 0){
- dispatchUtteranceCompletedCallback(utteranceId, callingApp);
- }
- processSpeechQueue();
+ public void onCompletion(MediaPlayer arg0) {
+ // mCurrentSpeechItem may become null if it is stopped at the same
+ // time it completes.
+ SpeechItem currentSpeechItemCopy = mCurrentSpeechItem;
+ if (currentSpeechItemCopy != null) {
+ String callingApp = currentSpeechItemCopy.mCallingApp;
+ ArrayList<String> params = currentSpeechItemCopy.mParams;
+ String utteranceId = "";
+ if (params != null) {
+ for (int i = 0; i < params.size() - 1; i = i + 2) {
+ String param = params.get(i);
+ if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)) {
+ utteranceId = params.get(i + 1);
+ }
+ }
+ }
+ if (utteranceId.length() > 0) {
+ dispatchUtteranceCompletedCallback(utteranceId, callingApp);
+ }
+ }
+ processSpeechQueue();
}
private int playSilence(String callingApp, long duration, int queueMode,
@@ -739,6 +744,7 @@
String country = "";
String variant = "";
String speechRate = "";
+ String engine = "";
if (speechItem.mParams != null){
for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2){
String param = speechItem.mParams.get(i);
@@ -760,12 +766,17 @@
} catch (NumberFormatException e) {
streamType = DEFAULT_STREAM_TYPE;
}
+ } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_ENGINE)) {
+ engine = speechItem.mParams.get(i + 1);
}
}
}
}
// Only do the synthesis if it has not been killed by a subsequent utterance.
if (mKillList.get(speechItem) == null) {
+ if (engine.length() > 0) {
+ setEngine(engine);
+ }
if (language.length() > 0){
setLanguage("", language, country, variant);
}
@@ -820,6 +831,7 @@
String country = "";
String variant = "";
String speechRate = "";
+ String engine = "";
if (speechItem.mParams != null){
for (int i = 0; i < speechItem.mParams.size() - 1; i = i + 2){
String param = speechItem.mParams.get(i);
@@ -834,12 +846,17 @@
variant = speechItem.mParams.get(i+1);
} else if (param.equals(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID)){
utteranceId = speechItem.mParams.get(i+1);
+ } else if (param.equals(TextToSpeech.Engine.KEY_PARAM_ENGINE)) {
+ engine = speechItem.mParams.get(i + 1);
}
}
}
}
// Only do the synthesis if it has not been killed by a subsequent utterance.
if (mKillList.get(speechItem) == null){
+ if (engine.length() > 0) {
+ setEngine(engine);
+ }
if (language.length() > 0){
setLanguage("", language, country, variant);
}
diff --git a/packages/VpnServices/Android.mk b/packages/VpnServices/Android.mk
index eb27ed5..6cdf674 100644
--- a/packages/VpnServices/Android.mk
+++ b/packages/VpnServices/Android.mk
@@ -1,7 +1,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
diff --git a/packages/VpnServices/res/values-nb/strings.xml b/packages/VpnServices/res/values-nb/strings.xml
index 506f999..9aac828 100644
--- a/packages/VpnServices/res/values-nb/strings.xml
+++ b/packages/VpnServices/res/values-nb/strings.xml
@@ -16,7 +16,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_label" msgid="4589592829302498102">"VPN-tjenester"</string>
- <string name="vpn_notification_title_connected" msgid="8598654486956133580">"<xliff:g id="PROFILENAME">%s</xliff:g> er VPN-tilkoblet"</string>
- <string name="vpn_notification_title_disconnected" msgid="6216572264382192027">"<xliff:g id="PROFILENAME">%s</xliff:g> er VPN-frakoblet"</string>
+ <string name="vpn_notification_title_connected" msgid="8598654486956133580">"Koblet til VPNet <xliff:g id="PROFILENAME">%s</xliff:g>"</string>
+ <string name="vpn_notification_title_disconnected" msgid="6216572264382192027">"Koblet fra VPNet <xliff:g id="PROFILENAME">%s</xliff:g>"</string>
<string name="vpn_notification_hint_disconnected" msgid="1952209867082269429">"Trykk for å koble til et VPN på nytt"</string>
</resources>
diff --git a/packages/VpnServices/res/values-zh-rCN/strings.xml b/packages/VpnServices/res/values-zh-rCN/strings.xml
index 940e210..ee8878f 100644
--- a/packages/VpnServices/res/values-zh-rCN/strings.xml
+++ b/packages/VpnServices/res/values-zh-rCN/strings.xml
@@ -16,7 +16,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_label" msgid="4589592829302498102">"虚拟专用网服务"</string>
- <string name="vpn_notification_title_connected" msgid="8598654486956133580">"<xliff:g id="PROFILENAME">%s</xliff:g> VPN 已连接"</string>
- <string name="vpn_notification_title_disconnected" msgid="6216572264382192027">"<xliff:g id="PROFILENAME">%s</xliff:g> VPN 连接已断开"</string>
+ <string name="vpn_notification_title_connected" msgid="8598654486956133580">"VPN“<xliff:g id="PROFILENAME">%s</xliff:g>”已连接"</string>
+ <string name="vpn_notification_title_disconnected" msgid="6216572264382192027">"VPN“<xliff:g id="PROFILENAME">%s</xliff:g>”连接已断开"</string>
<string name="vpn_notification_hint_disconnected" msgid="1952209867082269429">"轻触可重新连接到虚拟专用网。"</string>
</resources>
diff --git a/preloaded-classes b/preloaded-classes
index f695f4e..ec4d74c 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -225,7 +225,6 @@
android.net.Uri$PathSegments
android.net.Uri$StringUri
android.net.WebAddress
-android.net.http.DomainNameChecker
android.net.http.CertificateChainValidator
android.net.http.EventHandler
android.net.http.HttpsConnection
@@ -691,8 +690,6 @@
com.google.android.mms.pdu.CharacterSets
com.google.android.mms.pdu.PduPart
com.google.android.mms.pdu.PduPersister
-com.google.android.net.UrlRules
-com.google.android.net.UrlRules$Rule
com.ibm.icu4jni.charset.CharsetDecoderICU
com.ibm.icu4jni.charset.CharsetEncoderICU
com.ibm.icu4jni.charset.CharsetICU
@@ -700,7 +697,6 @@
com.ibm.icu4jni.text.DecimalFormat
com.ibm.icu4jni.text.DecimalFormatSymbols
com.ibm.icu4jni.text.NativeDecimalFormat$UNumberFormatAttribute
-com.ibm.icu4jni.text.NativeDecimalFormat$UNumberFormatSymbol
com.ibm.icu4jni.text.RuleBasedCollator
com.ibm.icu4jni.util.Resources$DefaultTimeZones
dalvik.system.DexFile
diff --git a/services/java/com/android/server/BatteryService.java b/services/java/com/android/server/BatteryService.java
index bdebc8d..f435ebc 100644
--- a/services/java/com/android/server/BatteryService.java
+++ b/services/java/com/android/server/BatteryService.java
@@ -413,10 +413,10 @@
private final void logOutlier(long duration) {
ContentResolver cr = mContext.getContentResolver();
- String dischargeThresholdString = Settings.Gservices.getString(cr,
- Settings.Gservices.BATTERY_DISCHARGE_THRESHOLD);
- String durationThresholdString = Settings.Gservices.getString(cr,
- Settings.Gservices.BATTERY_DISCHARGE_DURATION_THRESHOLD);
+ String dischargeThresholdString = Settings.Secure.getString(cr,
+ Settings.Secure.BATTERY_DISCHARGE_THRESHOLD);
+ String durationThresholdString = Settings.Secure.getString(cr,
+ Settings.Secure.BATTERY_DISCHARGE_DURATION_THRESHOLD);
if (dischargeThresholdString != null && durationThresholdString != null) {
try {
diff --git a/services/java/com/android/server/BootReceiver.java b/services/java/com/android/server/BootReceiver.java
index 84f0068..debbbb4 100644
--- a/services/java/com/android/server/BootReceiver.java
+++ b/services/java/com/android/server/BootReceiver.java
@@ -23,12 +23,11 @@
import android.os.Build;
import android.os.DropBoxManager;
import android.os.FileUtils;
+import android.os.RecoverySystem;
import android.os.SystemProperties;
import android.provider.Settings;
import android.util.Log;
-import com.android.internal.os.RecoverySystem;
-
import java.io.File;
import java.io.IOException;
@@ -39,6 +38,10 @@
public class BootReceiver extends BroadcastReceiver {
private static final String TAG = "BootReceiver";
+ // Negative meaning capture the *last* 64K of the file
+ // (passed to FileUtils.readTextFile)
+ private static final int LOG_SIZE = -65536;
+
@Override
public void onReceive(Context context, Intent intent) {
try {
@@ -68,16 +71,20 @@
private void logBootEvents(Context context) throws IOException {
DropBoxManager db = (DropBoxManager) context.getSystemService(Context.DROPBOX_SERVICE);
- String build =
- "Build: " + Build.FINGERPRINT + "\nKernel: " +
- FileUtils.readTextFile(new File("/proc/version"), 1024, "...\n");
+ StringBuilder props = new StringBuilder();
+ props.append("Build: ").append(Build.FINGERPRINT).append("\n");
+ props.append("Hardware: ").append(Build.BOARD).append("\n");
+ props.append("Bootloader: ").append(Build.BOOTLOADER).append("\n");
+ props.append("Radio: ").append(Build.RADIO).append("\n");
+ props.append("Kernel: ");
+ props.append(FileUtils.readTextFile(new File("/proc/version"), 1024, "...\n"));
if (SystemProperties.getLong("ro.runtime.firstboot", 0) == 0) {
String now = Long.toString(System.currentTimeMillis());
SystemProperties.set("ro.runtime.firstboot", now);
- if (db != null) db.addText("SYSTEM_BOOT", build);
+ if (db != null) db.addText("SYSTEM_BOOT", props.toString());
} else {
- if (db != null) db.addText("SYSTEM_RESTART", build);
+ if (db != null) db.addText("SYSTEM_RESTART", props.toString());
return; // Subsequent boot, don't log kernel boot log
}
@@ -99,6 +106,13 @@
String setting = "logfile:" + filename;
long lastTime = Settings.Secure.getLong(cr, setting, 0);
if (lastTime == fileTime) return; // Already logged this particular file
- db.addFile(tag, file, DropBoxManager.IS_TEXT);
+ Settings.Secure.putLong(cr, setting, fileTime);
+
+ StringBuilder report = new StringBuilder();
+ report.append("Build: ").append(Build.FINGERPRINT).append("\n");
+ report.append("Kernel: ");
+ report.append(FileUtils.readTextFile(new File("/proc/version"), 1024, "...\n"));
+ report.append(FileUtils.readTextFile(new File(filename), LOG_SIZE, "[[TRUNCATED]]\n"));
+ db.addText(tag, report.toString());
}
}
diff --git a/services/java/com/android/server/DeviceStorageMonitorService.java b/services/java/com/android/server/DeviceStorageMonitorService.java
index 8e54c6e..e58d346 100644
--- a/services/java/com/android/server/DeviceStorageMonitorService.java
+++ b/services/java/com/android/server/DeviceStorageMonitorService.java
@@ -34,25 +34,29 @@
import android.os.StatFs;
import android.os.SystemClock;
import android.os.SystemProperties;
-import android.provider.Settings.Gservices;
+import android.provider.Settings;
import android.util.Config;
import android.util.EventLog;
import android.util.Log;
import android.provider.Settings;
/**
- * This class implements a service to monitor the amount of disk storage space
- * on the device. If the free storage on device is less than a tunable threshold value
- * (default is 10%. this value is a gservices parameter) a low memory notification is
- * displayed to alert the user. If the user clicks on the low memory notification the
- * Application Manager application gets launched to let the user free storage space.
- * Event log events:
- * A low memory event with the free storage on device in bytes is logged to the event log
- * when the device goes low on storage space.
- * The amount of free storage on the device is periodically logged to the event log. The log
- * interval is a gservices parameter with a default value of 12 hours
- * When the free storage differential goes below a threshold(again a gservices parameter with
- * a default value of 2MB), the free memory is logged to the event log
+ * This class implements a service to monitor the amount of disk
+ * storage space on the device. If the free storage on device is less
+ * than a tunable threshold value (a secure settings parameter;
+ * default 10%) a low memory notification is displayed to alert the
+ * user. If the user clicks on the low memory notification the
+ * Application Manager application gets launched to let the user free
+ * storage space.
+ *
+ * Event log events: A low memory event with the free storage on
+ * device in bytes is logged to the event log when the device goes low
+ * on storage space. The amount of free storage on the device is
+ * periodically logged to the event log. The log interval is a secure
+ * settings parameter with a default value of 12 hours. When the free
+ * storage differential goes below a threshold (again a secure
+ * settings parameter with a default value of 2MB), the free memory is
+ * logged to the event log.
*/
class DeviceStorageMonitorService extends Binder {
private static final String TAG = "DeviceStorageMonitorService";
@@ -131,9 +135,9 @@
if (!"".equals(debugFreeMem)) {
mFreeMem = Long.parseLong(debugFreeMem);
}
- // Read the log interval from Gservices
- long freeMemLogInterval = Gservices.getLong(mContentResolver,
- Gservices.SYS_FREE_STORAGE_LOG_INTERVAL,
+ // Read the log interval from secure settings
+ long freeMemLogInterval = Settings.Secure.getLong(mContentResolver,
+ Settings.Secure.SYS_FREE_STORAGE_LOG_INTERVAL,
DEFAULT_FREE_STORAGE_LOG_INTERVAL_IN_MINUTES)*60*1000;
//log the amount of free memory in event log
long currTime = SystemClock.elapsedRealtime();
@@ -159,9 +163,9 @@
EventLog.writeEvent(EventLogTags.FREE_STORAGE_LEFT,
mFreeMem, mFreeSystem, mFreeCache);
}
- // Read the reporting threshold from Gservices
- long threshold = Gservices.getLong(mContentResolver,
- Gservices.DISK_FREE_CHANGE_REPORTING_THRESHOLD,
+ // Read the reporting threshold from secure settings
+ long threshold = Settings.Secure.getLong(mContentResolver,
+ Settings.Secure.DISK_FREE_CHANGE_REPORTING_THRESHOLD,
DEFAULT_DISK_FREE_CHANGE_REPORTING_THRESHOLD);
// If mFree changed significantly log the new value
long delta = mFreeMem - mLastReportedFreeMem;
@@ -247,13 +251,13 @@
/*
* just query settings to retrieve the memory threshold.
- * Preferred this over using a ContentObserver since Settings.Gservices caches the value
+ * Preferred this over using a ContentObserver since Settings.Secure caches the value
* any way
*/
private long getMemThreshold() {
- int value = Settings.Gservices.getInt(
+ int value = Settings.Secure.getInt(
mContentResolver,
- Settings.Gservices.SYS_STORAGE_THRESHOLD_PERCENTAGE,
+ Settings.Secure.SYS_STORAGE_THRESHOLD_PERCENTAGE,
DEFAULT_THRESHOLD_PERCENTAGE);
if(localLOGV) Log.v(TAG, "Threshold Percentage="+value);
//evaluate threshold value
diff --git a/services/java/com/android/server/DropBoxManagerService.java b/services/java/com/android/server/DropBoxManagerService.java
index e1db6b6..090e9d3 100644
--- a/services/java/com/android/server/DropBoxManagerService.java
+++ b/services/java/com/android/server/DropBoxManagerService.java
@@ -22,9 +22,11 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
+import android.database.ContentObserver;
import android.net.Uri;
import android.os.Debug;
import android.os.DropBoxManager;
+import android.os.Handler;
import android.os.ParcelFileDescriptor;
import android.os.StatFs;
import android.os.SystemClock;
@@ -113,14 +115,21 @@
* @param context to use for receiving free space & gservices intents
* @param path to store drop box entries in
*/
- public DropBoxManagerService(Context context, File path) {
+ public DropBoxManagerService(final Context context, File path) {
mDropBoxDir = path;
// Set up intent receivers
mContext = context;
mContentResolver = context.getContentResolver();
context.registerReceiver(mReceiver, new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW));
- context.registerReceiver(mReceiver, new IntentFilter(Settings.Gservices.CHANGED_ACTION));
+
+ mContentResolver.registerContentObserver(
+ Settings.Secure.CONTENT_URI, true,
+ new ContentObserver(new Handler()) {
+ public void onChange(boolean selfChange) {
+ mReceiver.onReceive(context, (Intent) null);
+ }
+ });
// The real work gets done lazily in init() -- that way service creation always
// succeeds, and things like disk problems cause individual method failures.
@@ -205,8 +214,8 @@
}
public boolean isTagEnabled(String tag) {
- return !"disabled".equals(Settings.Gservices.getString(
- mContentResolver, Settings.Gservices.DROPBOX_TAG_PREFIX + tag));
+ return !"disabled".equals(Settings.Secure.getString(
+ mContentResolver, Settings.Secure.DROPBOX_TAG_PREFIX + tag));
}
public synchronized DropBoxManager.Entry getNextEntry(String tag, long millis) {
@@ -296,6 +305,7 @@
if (!match) continue;
numFound++;
+ if (doPrint) out.append("========================================\n");
out.append(date).append(" ").append(entry.tag == null ? "(no tag)" : entry.tag);
if (entry.file == null) {
out.append(" (no file)\n");
@@ -330,6 +340,12 @@
if (n <= 0) break;
out.append(buf, 0, n);
newline = (buf[n - 1] == '\n');
+
+ // Flush periodically when printing to avoid out-of-memory.
+ if (out.length() > 65536) {
+ pw.write(out.toString());
+ out.setLength(0);
+ }
}
if (!newline) out.append("\n");
} else {
@@ -611,8 +627,8 @@
private synchronized long trimToFit() {
// Expunge aged items (including tombstones marking deleted data).
- int ageSeconds = Settings.Gservices.getInt(mContentResolver,
- Settings.Gservices.DROPBOX_AGE_SECONDS, DEFAULT_AGE_SECONDS);
+ int ageSeconds = Settings.Secure.getInt(mContentResolver,
+ Settings.Secure.DROPBOX_AGE_SECONDS, DEFAULT_AGE_SECONDS);
long cutoffMillis = System.currentTimeMillis() - ageSeconds * 1000;
while (!mAllFiles.contents.isEmpty()) {
EntryFile entry = mAllFiles.contents.first();
@@ -631,12 +647,12 @@
long uptimeMillis = SystemClock.uptimeMillis();
if (uptimeMillis > mCachedQuotaUptimeMillis + QUOTA_RESCAN_MILLIS) {
- int quotaPercent = Settings.Gservices.getInt(mContentResolver,
- Settings.Gservices.DROPBOX_QUOTA_PERCENT, DEFAULT_QUOTA_PERCENT);
- int reservePercent = Settings.Gservices.getInt(mContentResolver,
- Settings.Gservices.DROPBOX_RESERVE_PERCENT, DEFAULT_RESERVE_PERCENT);
- int quotaKb = Settings.Gservices.getInt(mContentResolver,
- Settings.Gservices.DROPBOX_QUOTA_KB, DEFAULT_QUOTA_KB);
+ int quotaPercent = Settings.Secure.getInt(mContentResolver,
+ Settings.Secure.DROPBOX_QUOTA_PERCENT, DEFAULT_QUOTA_PERCENT);
+ int reservePercent = Settings.Secure.getInt(mContentResolver,
+ Settings.Secure.DROPBOX_RESERVE_PERCENT, DEFAULT_RESERVE_PERCENT);
+ int quotaKb = Settings.Secure.getInt(mContentResolver,
+ Settings.Secure.DROPBOX_QUOTA_KB, DEFAULT_QUOTA_KB);
mStatFs.restat(mDropBoxDir.getPath());
int available = mStatFs.getAvailableBlocks();
diff --git a/services/java/com/android/server/FallbackCheckinService.java b/services/java/com/android/server/FallbackCheckinService.java
index 1e5bc09..fc0ab69 100644
--- a/services/java/com/android/server/FallbackCheckinService.java
+++ b/services/java/com/android/server/FallbackCheckinService.java
@@ -21,11 +21,11 @@
import android.os.Binder;
import android.os.ICheckinService;
import android.os.IParentalControlCallback;
+import android.os.RecoverySystem;
import android.util.Log;
import java.io.IOException;
-import com.android.internal.os.RecoverySystem;
import com.google.android.net.ParentalControlState;
/**
@@ -50,7 +50,7 @@
// Save the android ID so the new system can get it erased.
try {
- RecoverySystem.rebootAndWipe();
+ RecoverySystem.rebootWipeUserData(mContext);
} catch (IOException e) {
Log.e(TAG, "Reboot for masterClear() failed", e);
}
@@ -67,7 +67,7 @@
// Save the android ID so the new system can get it erased.
try {
- RecoverySystem.rebootAndToggleEFS(efsEnabled);
+ RecoverySystem.rebootToggleEFS(mContext, efsEnabled);
} catch (IOException e) {
Log.e(TAG, "Reboot for toggle EFS failed", e);
}
diff --git a/services/java/com/android/server/INativeDaemonConnectorCallbacks.java b/services/java/com/android/server/INativeDaemonConnectorCallbacks.java
new file mode 100644
index 0000000..6fbf713
--- /dev/null
+++ b/services/java/com/android/server/INativeDaemonConnectorCallbacks.java
@@ -0,0 +1,24 @@
+
+/*
+ * Copyright (C) 2007 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.
+ */
+
+package com.android.server;
+
+interface INativeDaemonConnectorCallbacks {
+
+ void onDaemonConnected();
+ boolean onEvent(int code, String raw, String[] cooked);
+}
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index 4c3893c..406897d 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -37,6 +37,7 @@
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.location.Address;
+import android.location.GeocoderParams;
import android.location.IGeocodeProvider;
import android.location.IGpsStatusListener;
import android.location.IGpsStatusProvider;
@@ -552,10 +553,8 @@
}
// Use system settings
ContentResolver resolver = mContext.getContentResolver();
- String allowedProviders = Settings.Secure.getString(resolver,
- Settings.Secure.LOCATION_PROVIDERS_ALLOWED);
- return ((allowedProviders != null) && (allowedProviders.contains(provider)));
+ return Settings.Secure.isLocationProviderEnabled(resolver, provider);
}
private void checkPermissionsSafe(String provider) {
@@ -1657,11 +1656,11 @@
// Geocoder
public String getFromLocation(double latitude, double longitude, int maxResults,
- String language, String country, String variant, String appName, List<Address> addrs) {
+ GeocoderParams params, List<Address> addrs) {
if (mGeocodeProvider != null) {
try {
- return mGeocodeProvider.getFromLocation(latitude, longitude, maxResults, language, country,
- variant, appName, addrs);
+ return mGeocodeProvider.getFromLocation(latitude, longitude, maxResults,
+ params, addrs);
} catch (RemoteException e) {
Log.e(TAG, "getFromLocation failed", e);
mGeocodeProvider = null;
@@ -1674,13 +1673,13 @@
public String getFromLocationName(String locationName,
double lowerLeftLatitude, double lowerLeftLongitude,
double upperRightLatitude, double upperRightLongitude, int maxResults,
- String language, String country, String variant, String appName, List<Address> addrs) {
+ GeocoderParams params, List<Address> addrs) {
if (mGeocodeProvider != null) {
try {
return mGeocodeProvider.getFromLocationName(locationName, lowerLeftLatitude,
lowerLeftLongitude, upperRightLatitude, upperRightLongitude,
- maxResults, language, country, variant, appName, addrs);
+ maxResults, params, addrs);
} catch (RemoteException e) {
Log.e(TAG, "getFromLocationName failed", e);
mGeocodeProvider = null;
diff --git a/services/java/com/android/server/MountListener.java b/services/java/com/android/server/MountListener.java
deleted file mode 100644
index 3e53585..0000000
--- a/services/java/com/android/server/MountListener.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.server;
-
-import android.net.LocalSocketAddress;
-import android.net.LocalSocket;
-import android.os.Environment;
-import android.os.SystemClock;
-import android.os.SystemProperties;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-
-/**
- * Thread for communicating with the vol service daemon via a local socket.
- * Events received from the daemon are passed to the MountService instance,
- * and the MountService instance calls MountListener to send commands to the daemon.
- */
-final class MountListener implements Runnable {
-
- private static final String TAG = "MountListener";
-
- // ** THE FOLLOWING STRING CONSTANTS MUST MATCH VALUES IN system/vold/
-
- // socket name for connecting to vold
- private static final String VOLD_SOCKET = "vold";
-
- // vold commands
- private static final String VOLD_CMD_ENABLE_UMS = "enable_ums";
- private static final String VOLD_CMD_DISABLE_UMS = "disable_ums";
- private static final String VOLD_CMD_SEND_UMS_STATUS = "send_ums_status";
- private static final String VOLD_CMD_MOUNT_VOLUME = "mount_volume:";
- private static final String VOLD_CMD_EJECT_MEDIA = "eject_media:";
- private static final String VOLD_CMD_FORMAT_MEDIA = "format_media:";
-
- // vold events
- private static final String VOLD_EVT_UMS_ENABLED = "ums_enabled";
- private static final String VOLD_EVT_UMS_DISABLED = "ums_disabled";
- private static final String VOLD_EVT_UMS_CONNECTED = "ums_connected";
- private static final String VOLD_EVT_UMS_DISCONNECTED = "ums_disconnected";
-
- private static final String VOLD_EVT_NOMEDIA = "volume_nomedia:";
- private static final String VOLD_EVT_UNMOUNTED = "volume_unmounted:";
- private static final String VOLD_EVT_MOUNTED = "volume_mounted:";
- private static final String VOLD_EVT_MOUNTED_RO = "volume_mounted_ro:";
- private static final String VOLD_EVT_UMS = "volume_ums";
- private static final String VOLD_EVT_BAD_REMOVAL = "volume_badremoval:";
- private static final String VOLD_EVT_DAMAGED = "volume_damaged:";
- private static final String VOLD_EVT_CHECKING = "volume_checking:";
- private static final String VOLD_EVT_NOFS = "volume_nofs:";
- private static final String VOLD_EVT_EJECTING = "volume_ejecting:";
-
- /**
- * MountService that handles events received from the vol service daemon
- */
- private MountService mService;
-
- /**
- * Stream for sending commands to the vol service daemon.
- */
- private OutputStream mOutputStream;
-
- /**
- * Cached value indicating whether or not USB mass storage is enabled.
- */
- private boolean mUmsEnabled;
-
- /**
- * Cached value indicating whether or not USB mass storage is connected.
- */
- private boolean mUmsConnected;
-
- /**
- * Constructor for MountListener
- *
- * @param service The MountListener we are handling communication with USB
- * daemon for.
- */
- MountListener(MountService service) {
- mService = service;
- }
-
- /**
- * Process and dispatches events received from the vol service daemon
- *
- * @param event An event received from the vol service daemon
- */
- private void handleEvent(String event) {
- if (Config.LOGD) Log.d(TAG, "handleEvent " + event);
-
- int colonIndex = event.indexOf(':');
- String path = (colonIndex > 0 ? event.substring(colonIndex + 1) : null);
-
- if (event.equals(VOLD_EVT_UMS_ENABLED)) {
- mUmsEnabled = true;
- } else if (event.equals(VOLD_EVT_UMS_DISABLED)) {
- mUmsEnabled = false;
- } else if (event.equals(VOLD_EVT_UMS_CONNECTED)) {
- mUmsConnected = true;
- mService.notifyUmsConnected();
- } else if (event.equals(VOLD_EVT_UMS_DISCONNECTED)) {
- mUmsConnected = false;
- mService.notifyUmsDisconnected();
- } else if (event.startsWith(VOLD_EVT_NOMEDIA)) {
- mService.notifyMediaRemoved(path);
- } else if (event.startsWith(VOLD_EVT_UNMOUNTED)) {
- mService.notifyMediaUnmounted(path);
- } else if (event.startsWith(VOLD_EVT_CHECKING)) {
- mService.notifyMediaChecking(path);
- } else if (event.startsWith(VOLD_EVT_NOFS)) {
- mService.notifyMediaNoFs(path);
- } else if (event.startsWith(VOLD_EVT_MOUNTED)) {
- mService.notifyMediaMounted(path, false);
- } else if (event.startsWith(VOLD_EVT_MOUNTED_RO)) {
- mService.notifyMediaMounted(path, true);
- } else if (event.startsWith(VOLD_EVT_UMS)) {
- mService.notifyMediaShared(path);
- } else if (event.startsWith(VOLD_EVT_BAD_REMOVAL)) {
- mService.notifyMediaBadRemoval(path);
- // also send media eject intent, to notify apps to close any open
- // files on the media.
- mService.notifyMediaEject(path);
- } else if (event.startsWith(VOLD_EVT_DAMAGED)) {
- mService.notifyMediaUnmountable(path);
- } else if (event.startsWith(VOLD_EVT_EJECTING)) {
- mService.notifyMediaEject(path);
- }
- }
-
- /**
- * Sends a command to the mount service daemon via a local socket
- *
- * @param command The command to send to the mount service daemon
- */
- private void writeCommand(String command) {
- writeCommand2(command, null);
- }
-
- /**
- * Sends a command to the mount service daemon via a local socket
- * with a single argument
- *
- * @param command The command to send to the mount service daemon
- * @param argument The argument to send with the command (or null)
- */
- private void writeCommand2(String command, String argument) {
- synchronized (this) {
- if (mOutputStream == null) {
- Log.e(TAG, "No connection to vold", new IllegalStateException());
- } else {
- StringBuilder builder = new StringBuilder(command);
- if (argument != null) {
- builder.append(argument);
- }
- builder.append('\0');
-
- try {
- mOutputStream.write(builder.toString().getBytes());
- } catch (IOException ex) {
- Log.e(TAG, "IOException in writeCommand", ex);
- }
- }
- }
- }
-
- /**
- * Opens a socket to communicate with the mount service daemon and listens
- * for events from the daemon.
- *
- */
- private void listenToSocket() {
- LocalSocket socket = null;
-
- try {
- socket = new LocalSocket();
- LocalSocketAddress address = new LocalSocketAddress(VOLD_SOCKET,
- LocalSocketAddress.Namespace.RESERVED);
-
- socket.connect(address);
-
- InputStream inputStream = socket.getInputStream();
- mOutputStream = socket.getOutputStream();
-
- byte[] buffer = new byte[100];
-
- writeCommand(VOLD_CMD_SEND_UMS_STATUS);
- mountMedia(Environment.getExternalStorageDirectory().getAbsolutePath());
-
- while (true) {
- int count = inputStream.read(buffer);
- if (count < 0) break;
-
- int start = 0;
- for (int i = 0; i < count; i++) {
- if (buffer[i] == 0) {
- String event = new String(buffer, start, i - start);
- handleEvent(event);
- start = i + 1;
- }
- }
- }
- } catch (IOException ex) {
- // This exception is normal when running in desktop simulator
- // where there is no mount daemon to talk to
-
- // log("IOException in listenToSocket");
- }
-
- synchronized (this) {
- if (mOutputStream != null) {
- try {
- mOutputStream.close();
- } catch (IOException e) {
- Log.w(TAG, "IOException closing output stream");
- }
-
- mOutputStream = null;
- }
- }
-
- try {
- if (socket != null) {
- socket.close();
- }
- } catch (IOException ex) {
- Log.w(TAG, "IOException closing socket");
- }
-
- /*
- * Sleep before trying again.
- * This should not happen except while debugging.
- * Without this sleep, the emulator will spin and
- * create tons of throwaway LocalSockets, making
- * system_server GC constantly.
- */
- Log.e(TAG, "Failed to connect to vold", new IllegalStateException());
- SystemClock.sleep(2000);
- }
-
- /**
- * Main loop for MountListener thread.
- */
- public void run() {
- // ugly hack for the simulator.
- if ("simulator".equals(SystemProperties.get("ro.product.device"))) {
- SystemProperties.set("EXTERNAL_STORAGE_STATE", Environment.MEDIA_MOUNTED);
- // usbd does not run in the simulator, so send a fake device mounted event to trigger the Media Scanner
- mService.notifyMediaMounted(Environment.getExternalStorageDirectory().getPath(), false);
-
- // no usbd in the simulator, so no point in hanging around.
- return;
- }
-
- try {
- while (true) {
- listenToSocket();
- }
- } catch (Throwable t) {
- // catch all Throwables so we don't bring down the system process
- Log.e(TAG, "Fatal error " + t + " in MountListener thread!");
- }
- }
-
- /**
- * @return true if USB mass storage is enabled
- */
- boolean getMassStorageEnabled() {
- return mUmsEnabled;
- }
-
- /**
- * Enables or disables USB mass storage support.
- *
- * @param enable true to enable USB mass storage support
- */
- void setMassStorageEnabled(boolean enable) {
- writeCommand(enable ? VOLD_CMD_ENABLE_UMS : VOLD_CMD_DISABLE_UMS);
- }
-
- /**
- * @return true if USB mass storage is connected
- */
- boolean getMassStorageConnected() {
- return mUmsConnected;
- }
-
- /**
- * Mount media at given mount point.
- */
- public void mountMedia(String mountPoint) {
- writeCommand2(VOLD_CMD_MOUNT_VOLUME, mountPoint);
- }
-
- /**
- * Unmount media at given mount point.
- */
- public void ejectMedia(String mountPoint) {
- writeCommand2(VOLD_CMD_EJECT_MEDIA, mountPoint);
- }
-
- /**
- * Format media at given mount point.
- */
- public void formatMedia(String mountPoint) {
- writeCommand2(VOLD_CMD_FORMAT_MEDIA, mountPoint);
- }
-}
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index 204389e..c8a6915 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -28,32 +28,70 @@
import android.net.Uri;
import android.os.IMountService;
import android.os.Environment;
-import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.UEventObserver;
+import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
+import java.util.ArrayList;
+
+import android.provider.Settings;
+import android.content.ContentResolver;
+import android.database.ContentObserver;
import java.io.File;
import java.io.FileReader;
+import java.lang.IllegalStateException;
/**
* MountService implements an to the mount service daemon
* @hide
*/
-class MountService extends IMountService.Stub {
+class MountService extends IMountService.Stub
+ implements INativeDaemonConnectorCallbacks {
private static final String TAG = "MountService";
+ class VolumeState {
+ public static final int Init = -1;
+ public static final int NoMedia = 0;
+ public static final int Idle = 1;
+ public static final int Pending = 2;
+ public static final int Checking = 3;
+ public static final int Mounted = 4;
+ public static final int Unmounting = 5;
+ public static final int Formatting = 6;
+ public static final int Shared = 7;
+ public static final int SharedMnt = 8;
+ }
+
+ class VoldResponseCode {
+ public static final int VolumeListResult = 110;
+ public static final int AsecListResult = 111;
+
+ public static final int ShareAvailabilityResult = 210;
+ public static final int AsecPathResult = 211;
+
+ public static final int VolumeStateChange = 605;
+ public static final int VolumeMountFailedBlank = 610;
+ public static final int VolumeMountFailedDamaged = 611;
+ public static final int VolumeMountFailedNoMedia = 612;
+ public static final int ShareAvailabilityChange = 620;
+ public static final int VolumeDiskInserted = 630;
+ public static final int VolumeDiskRemoved = 631;
+ public static final int VolumeBadRemoval = 632;
+ }
+
+
/**
* Binder context for this service
*/
private Context mContext;
/**
- * listener object for communicating with the mount service daemon
+ * connectorr object for communicating with vold
*/
- private MountListener mListener;
+ private NativeDaemonConnector mConnector;
/**
* The notification that is shown when a USB mass storage host
@@ -82,7 +120,15 @@
private boolean mMounted;
+ private SettingsWatcher mSettingsWatcher;
private boolean mAutoStartUms;
+ private boolean mPromptUms;
+ private boolean mUmsActiveNotify;
+
+ private boolean mUmsConnected = false;
+ private boolean mUmsEnabled = false;
+
+ private String mLegacyState = Environment.MEDIA_REMOVED;
/**
* Constructs a new MountService instance
@@ -93,33 +139,182 @@
mContext = context;
// Register a BOOT_COMPLETED handler so that we can start
- // MountListener. We defer the startup so that we don't
+ // our NativeDaemonConnector. We defer the startup so that we don't
// start processing events before we ought-to
mContext.registerReceiver(mBroadcastReceiver,
new IntentFilter(Intent.ACTION_BOOT_COMPLETED), null, null);
- mListener = new MountListener(this);
+ mConnector = new NativeDaemonConnector(this, "vold", 10, "VoldConnector");
mShowSafeUnmountNotificationWhenUnmounted = false;
mPlaySounds = SystemProperties.get("persist.service.mount.playsnd", "1").equals("1");
- mAutoStartUms = SystemProperties.get("persist.service.mount.umsauto", "0").equals("1");
+ ContentResolver cr = mContext.getContentResolver();
+ mAutoStartUms = (Settings.Secure.getInt(
+ cr, Settings.Secure.MOUNT_UMS_AUTOSTART, 0) == 1);
+ mPromptUms = (Settings.Secure.getInt(
+ cr, Settings.Secure.MOUNT_UMS_PROMPT, 1) == 1);
+ mUmsActiveNotify = (Settings.Secure.getInt(
+ cr, Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED, 1) == 1);
+
+ mSettingsWatcher = new SettingsWatcher(new Handler());
+ }
+
+ private class SettingsWatcher extends ContentObserver {
+ public SettingsWatcher(Handler handler) {
+ super(handler);
+ ContentResolver cr = mContext.getContentResolver();
+ cr.registerContentObserver(Settings.System.getUriFor(
+ Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND), false, this);
+ cr.registerContentObserver(Settings.Secure.getUriFor(
+ Settings.Secure.MOUNT_UMS_AUTOSTART), false, this);
+ cr.registerContentObserver(Settings.Secure.getUriFor(
+ Settings.Secure.MOUNT_UMS_PROMPT), false, this);
+ cr.registerContentObserver(Settings.Secure.getUriFor(
+ Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED), false, this);
+ }
+
+ public void onChange(boolean selfChange) {
+ super.onChange(selfChange);
+ ContentResolver cr = mContext.getContentResolver();
+
+ boolean newPlayNotificationSounds = (Settings.Secure.getInt(
+ cr, Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND, 1) == 1);
+
+ boolean newUmsAutostart = (Settings.Secure.getInt(
+ cr, Settings.Secure.MOUNT_UMS_AUTOSTART, 0) == 1);
+
+ if (newUmsAutostart != mAutoStartUms) {
+ mAutoStartUms = newUmsAutostart;
+ }
+
+ boolean newUmsPrompt = (Settings.Secure.getInt(
+ cr, Settings.Secure.MOUNT_UMS_PROMPT, 1) == 1);
+
+ if (newUmsPrompt != mPromptUms) {
+ mPromptUms = newUmsAutostart;
+ }
+
+ boolean newUmsNotifyEnabled = (Settings.Secure.getInt(
+ cr, Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED, 1) == 1);
+
+ if (mUmsEnabled) {
+ if (newUmsNotifyEnabled) {
+ Intent intent = new Intent();
+ intent.setClass(mContext, com.android.internal.app.UsbStorageStopActivity.class);
+ PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
+ setUsbStorageNotification(com.android.internal.R.string.usb_storage_stop_notification_title,
+ com.android.internal.R.string.usb_storage_stop_notification_message,
+ com.android.internal.R.drawable.stat_sys_warning,
+ false, true, pi);
+ } else {
+ setUsbStorageNotification(0, 0, 0, false, false, null);
+ }
+ }
+ if (newUmsNotifyEnabled != mUmsActiveNotify) {
+ mUmsActiveNotify = newUmsNotifyEnabled;
+ }
+ }
}
BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
- if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
- Thread thread = new Thread(mListener, MountListener.class.getName());
+ String action = intent.getAction();
+
+ if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
+ /*
+ * Vold does not run in the simulator, so fake out a mounted
+ * event to trigger MediaScanner
+ */
+ if ("simulator".equals(SystemProperties.get("ro.product.device"))) {
+ notifyMediaMounted(
+ Environment.getExternalStorageDirectory().getPath(), false);
+ return;
+ }
+
+ Thread thread = new Thread(
+ mConnector, NativeDaemonConnector.class.getName());
thread.start();
}
}
};
+ public void shutdown() {
+ if (mContext.checkCallingOrSelfPermission(
+ android.Manifest.permission.SHUTDOWN)
+ != PackageManager.PERMISSION_GRANTED) {
+ throw new SecurityException("Requires SHUTDOWN permission");
+ }
+
+ Log.d(TAG, "Shutting down");
+ String state = Environment.getExternalStorageState();
+
+ if (state.equals(Environment.MEDIA_SHARED)) {
+ /*
+ * If the media is currently shared, unshare it.
+ * XXX: This is still dangerous!. We should not
+ * be rebooting at *all* if UMS is enabled, since
+ * the UMS host could have dirty FAT cache entries
+ * yet to flush.
+ */
+ try {
+ setMassStorageEnabled(false);
+ } catch (Exception e) {
+ Log.e(TAG, "ums disable failed", e);
+ }
+ } else if (state.equals(Environment.MEDIA_CHECKING)) {
+ /*
+ * If the media is being checked, then we need to wait for
+ * it to complete before being able to proceed.
+ */
+ // XXX: @hackbod - Should we disable the ANR timer here?
+ int retries = 30;
+ while (state.equals(Environment.MEDIA_CHECKING) && (retries-- >=0)) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException iex) {
+ Log.e(TAG, "Interrupted while waiting for media", iex);
+ break;
+ }
+ state = Environment.getExternalStorageState();
+ }
+ if (retries == 0) {
+ Log.e(TAG, "Timed out waiting for media to check");
+ }
+ }
+
+ if (state.equals(Environment.MEDIA_MOUNTED)) {
+ /*
+ * If the media is mounted, then gracefully unmount it.
+ */
+ try {
+ String m = Environment.getExternalStorageDirectory().toString();
+ unmountVolume(m);
+
+ int retries = 12;
+ while (!state.equals(Environment.MEDIA_UNMOUNTED) && (retries-- >=0)) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException iex) {
+ Log.e(TAG, "Interrupted while waiting for media", iex);
+ break;
+ }
+ state = Environment.getExternalStorageState();
+ }
+ if (retries == 0) {
+ Log.e(TAG, "Timed out waiting for media to unmount");
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "external storage unmount failed", e);
+ }
+ }
+ }
+
/**
* @return true if USB mass storage support is enabled.
*/
- public boolean getMassStorageEnabled() throws RemoteException {
- return mListener.getMassStorageEnabled();
+ public boolean getMassStorageEnabled() {
+ return mUmsEnabled;
}
/**
@@ -127,33 +322,77 @@
*
* @param enable true to enable USB mass storage support
*/
- public void setMassStorageEnabled(boolean enable) throws RemoteException {
- mListener.setMassStorageEnabled(enable);
+ public void setMassStorageEnabled(boolean enable) throws IllegalStateException {
+ if (mContext.checkCallingOrSelfPermission(
+ android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS)
+ != PackageManager.PERMISSION_GRANTED) {
+ throw new SecurityException("Requires MOUNT_UNMOUNT_FILESYSTEMS permission");
+ }
+ try {
+ String vp = Environment.getExternalStorageDirectory().getPath();
+ String vs = getVolumeState(vp);
+
+ if (enable && vs.equals(Environment.MEDIA_MOUNTED)) {
+ unmountVolume(vp);
+ updateUsbMassStorageNotification(true, false);
+ }
+
+ setShareMethodEnabled(vp, "ums", enable);
+ mUmsEnabled = enable;
+ if (!enable) {
+ mountVolume(vp);
+ if (mPromptUms) {
+ updateUsbMassStorageNotification(false, false);
+ } else {
+ updateUsbMassStorageNotification(true, false);
+ }
+ }
+ } catch (IllegalStateException rex) {
+ Log.e(TAG, "Failed to set ums enable {" + enable + "}");
+ return;
+ }
}
/**
* @return true if USB mass storage is connected.
*/
- public boolean getMassStorageConnected() throws RemoteException {
- return mListener.getMassStorageConnected();
+ public boolean getMassStorageConnected() {
+ return mUmsConnected;
}
+
+ /**
+ * @return state of the volume at the specified mount point
+ */
+ public String getVolumeState(String mountPoint) throws IllegalStateException {
+ /*
+ * XXX: Until we have multiple volume discovery, just hardwire
+ * this to /sdcard
+ */
+ if (!mountPoint.equals(Environment.getExternalStorageDirectory().getPath())) {
+ Log.w(TAG, "getVolumeState(" + mountPoint + "): Unknown volume");
+ throw new IllegalArgumentException();
+ }
+
+ return mLegacyState;
+ }
+
/**
* Attempt to mount external media
*/
- public void mountMedia(String mountPath) throws RemoteException {
+ public void mountVolume(String mountPath) throws IllegalStateException {
if (mContext.checkCallingOrSelfPermission(
android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires MOUNT_UNMOUNT_FILESYSTEMS permission");
}
- mListener.mountMedia(mountPath);
+ mConnector.doCommand(String.format("mount %s", mountPath));
}
/**
* Attempt to unmount external media to prepare for eject
*/
- public void unmountMedia(String mountPath) throws RemoteException {
+ public void unmountVolume(String mountPath) throws IllegalStateException {
if (mContext.checkCallingOrSelfPermission(
android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS)
!= PackageManager.PERMISSION_GRANTED) {
@@ -164,23 +403,51 @@
// to display the notification
mShowSafeUnmountNotificationWhenUnmounted = true;
- // tell mountd to unmount the media
- mListener.ejectMedia(mountPath);
+ mConnector.doCommand(String.format("unmount %s", mountPath));
}
/**
* Attempt to format external media
*/
- public void formatMedia(String formatPath) throws RemoteException {
+ public void formatVolume(String formatPath) throws IllegalStateException {
if (mContext.checkCallingOrSelfPermission(
android.Manifest.permission.MOUNT_FORMAT_FILESYSTEMS)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires MOUNT_FORMAT_FILESYSTEMS permission");
}
- mListener.formatMedia(formatPath);
+ mConnector.doCommand(String.format("format %s", formatPath));
}
+ boolean getShareAvailable(String method) throws IllegalStateException {
+ ArrayList<String> rsp = mConnector.doCommand("share_available " + method);
+
+ for (String line : rsp) {
+ String []tok = line.split(" ");
+ int code = Integer.parseInt(tok[0]);
+ if (code == VoldResponseCode.ShareAvailabilityResult) {
+ if (tok[2].equals("available"))
+ return true;
+ return false;
+ } else {
+ throw new IllegalStateException(String.format("Unexpected response code %d", code));
+ }
+ }
+ throw new IllegalStateException("Got an empty response");
+ }
+
+ /**
+ * Enables or disables USB mass storage support.
+ *
+ * @param enable true to enable USB mass storage support
+ */
+ void setShareMethodEnabled(String mountPoint, String method,
+ boolean enable) throws IllegalStateException {
+ mConnector.doCommand(String.format(
+ "%sshare %s %s", (enable ? "" : "un"), mountPoint, method));
+ }
+
+
/**
* Returns true if we're playing media notification sounds.
*/
@@ -201,24 +468,13 @@
SystemProperties.set("persist.service.mount.playsnd", (enabled ? "1" : "0"));
}
- /**
- * Returns true if we auto-start UMS on cable insertion.
- */
- public boolean getAutoStartUms() {
- return mAutoStartUms;
- }
-
- /**
- * Set whether or not we're playing media notification sounds.
- */
- public void setAutoStartUms(boolean enabled) {
- if (mContext.checkCallingOrSelfPermission(
- android.Manifest.permission.WRITE_SETTINGS)
- != PackageManager.PERMISSION_GRANTED) {
- throw new SecurityException("Requires WRITE_SETTINGS permission");
+ void updatePublicVolumeState(String mountPoint, String state) {
+ if (!mountPoint.equals(Environment.getExternalStorageDirectory().getPath())) {
+ Log.w(TAG, "Multiple volumes not currently supported");
+ return;
}
- mAutoStartUms = enabled;
- SystemProperties.set("persist.service.mount.umsauto", (enabled ? "1" : "0"));
+ Log.i(TAG, "State for {" + mountPoint + "} = {" + state + "}");
+ mLegacyState = state;
}
/**
@@ -241,7 +497,7 @@
} else {
setUsbStorageNotification(0, 0, 0, false, false, null);
}
- } catch (RemoteException e) {
+ } catch (IllegalStateException e) {
// Nothing to do
}
}
@@ -256,9 +512,118 @@
}
/**
+ *
+ * Callback from NativeDaemonConnector
+ */
+ public void onDaemonConnected() {
+ new Thread() {
+ public void run() {
+ try {
+ if (!getVolumeState(Environment.getExternalStorageDirectory().getPath())
+ .equals(Environment.MEDIA_MOUNTED)) {
+ try {
+ mountVolume(Environment.getExternalStorageDirectory().getPath());
+ } catch (Exception ex) {
+ Log.w(TAG, "Connection-mount failed");
+ }
+ } else {
+ Log.d(TAG, "Skipping connection-mount; already mounted");
+ }
+ } catch (IllegalStateException rex) {
+ Log.e(TAG, "Exception while handling connection mount ", rex);
+ }
+
+ try {
+ boolean avail = getShareAvailable("ums");
+ notifyShareAvailabilityChange("ums", avail);
+ } catch (Exception ex) {
+ Log.w(TAG, "Failed to get share availability");
+ }
+ }
+ }.start();
+ }
+
+ /**
+ *
+ * Callback from NativeDaemonConnector
+ */
+ public boolean onEvent(int code, String raw, String[] cooked) {
+ // Log.d(TAG, "event {" + raw + "}");
+ if (code == VoldResponseCode.VolumeStateChange) {
+ // FMT: NNN Volume <label> <mountpoint> state changed
+ // from <old_#> (<old_str>) to <new_#> (<new_str>)
+ notifyVolumeStateChange(
+ cooked[2], cooked[3], Integer.parseInt(cooked[7]),
+ Integer.parseInt(cooked[10]));
+ } else if (code == VoldResponseCode.VolumeMountFailedBlank) {
+ // FMT: NNN Volume <label> <mountpoint> mount failed - no supported file-systems
+ notifyMediaNoFs(cooked[3]);
+ // FMT: NNN Volume <label> <mountpoint> mount failed - no media
+ } else if (code == VoldResponseCode.VolumeMountFailedNoMedia) {
+ notifyMediaRemoved(cooked[3]);
+ } else if (code == VoldResponseCode.VolumeMountFailedDamaged) {
+ // FMT: NNN Volume <label> <mountpoint> mount failed - filesystem check failed
+ notifyMediaUnmountable(cooked[3]);
+ } else if (code == VoldResponseCode.ShareAvailabilityChange) {
+ // FMT: NNN Share method <method> now <available|unavailable>
+ boolean avail = false;
+ if (cooked[5].equals("available")) {
+ avail = true;
+ }
+ notifyShareAvailabilityChange(cooked[3], avail);
+ } else if (code == VoldResponseCode.VolumeDiskInserted) {
+ // FMT: NNN Volume <label> <mountpoint> disk inserted (<major>:<minor>)
+ notifyMediaInserted(cooked[3]);
+ } else if (code == VoldResponseCode.VolumeDiskRemoved) {
+ // FMT: NNN Volume <label> <mountpoint> disk removed (<major>:<minor>)
+ notifyMediaRemoved(cooked[3]);
+ } else if (code == VoldResponseCode.VolumeBadRemoval) {
+ // FMT: NNN Volume <label> <mountpoint> bad removal (<major>:<minor>)
+ notifyMediaBadRemoval(cooked[3]);
+ } else {
+ return false;
+ }
+ return true;
+ }
+
+ void notifyVolumeStateChange(String label, String mountPoint, int oldState,
+ int newState) throws IllegalStateException {
+ String vs = getVolumeState(mountPoint);
+
+ if (newState == VolumeState.Init) {
+ } else if (newState == VolumeState.NoMedia) {
+ // NoMedia is handled via Disk Remove events
+ } else if (newState == VolumeState.Idle) {
+ // Don't notify if we're in BAD_REMOVAL, NOFS, or UNMOUNTABLE
+ if (!vs.equals(Environment.MEDIA_BAD_REMOVAL) &&
+ !vs.equals(Environment.MEDIA_NOFS) &&
+ !vs.equals(Environment.MEDIA_UNMOUNTABLE)) {
+ notifyMediaUnmounted(mountPoint);
+ }
+ } else if (newState == VolumeState.Pending) {
+ } else if (newState == VolumeState.Checking) {
+ notifyMediaChecking(mountPoint);
+ } else if (newState == VolumeState.Mounted) {
+ notifyMediaMounted(mountPoint, false);
+ } else if (newState == VolumeState.Unmounting) {
+ notifyMediaUnmounting(mountPoint);
+ } else if (newState == VolumeState.Formatting) {
+ } else if (newState == VolumeState.Shared) {
+ notifyMediaShared(mountPoint, false);
+ } else if (newState == VolumeState.SharedMnt) {
+ notifyMediaShared(mountPoint, true);
+ } else {
+ Log.e(TAG, "Unhandled VolumeState {" + newState + "}");
+ }
+ }
+
+
+ /**
* Broadcasts the USB mass storage connected event to all clients.
*/
void notifyUmsConnected() {
+ mUmsConnected = true;
+
String storageState = Environment.getExternalStorageState();
if (!storageState.equals(Environment.MEDIA_REMOVED) &&
!storageState.equals(Environment.MEDIA_BAD_REMOVAL) &&
@@ -267,9 +632,9 @@
if (mAutoStartUms) {
try {
setMassStorageEnabled(true);
- } catch (RemoteException e) {
+ } catch (IllegalStateException e) {
}
- } else {
+ } else if (mPromptUms) {
updateUsbMassStorageNotification(false, true);
}
}
@@ -278,26 +643,80 @@
mContext.sendBroadcast(intent);
}
+ void notifyShareAvailabilityChange(String method, final boolean avail) {
+ if (!method.equals("ums")) {
+ Log.w(TAG, "Ignoring unsupported share method {" + method + "}");
+ return;
+ }
+
+ /*
+ * Notification needs to run in a different thread as
+ * it may need to call back into vold
+ */
+ new Thread() {
+ public void run() {
+ try {
+ if (avail) {
+ notifyUmsConnected();
+ } else {
+ notifyUmsDisconnected();
+ }
+ } catch (Exception ex) {
+ Log.w(TAG, "Failed to mount media on insertion");
+ }
+ }
+ }.start();
+ }
+
/**
* Broadcasts the USB mass storage disconnected event to all clients.
*/
void notifyUmsDisconnected() {
+ mUmsConnected = false;
+ if (mUmsEnabled) {
+ try {
+ Log.w(TAG, "UMS disconnected while enabled!");
+ setMassStorageEnabled(false);
+ } catch (Exception ex) {
+ Log.e(TAG, "Error disabling UMS on unsafe UMS disconnect", ex);
+ }
+ }
updateUsbMassStorageNotification(false, false);
Intent intent = new Intent(Intent.ACTION_UMS_DISCONNECTED);
mContext.sendBroadcast(intent);
}
+ void notifyMediaInserted(final String path) throws IllegalStateException {
+ new Thread() {
+ public void run() {
+ try {
+ mountVolume(path);
+ } catch (Exception ex) {
+ Log.w(TAG, "Failed to mount media on insertion", ex);
+ }
+ }
+ }.start();
+ }
+
/**
* Broadcasts the media removed event to all clients.
*/
- void notifyMediaRemoved(String path) {
+ void notifyMediaRemoved(String path) throws IllegalStateException {
+
+ // Suppress this on bad removal
+ if (getVolumeState(path).equals(Environment.MEDIA_BAD_REMOVAL)) {
+ return;
+ }
+
+ updatePublicVolumeState(path, Environment.MEDIA_REMOVED);
+
updateUsbMassStorageNotification(true, false);
setMediaStorageNotification(
- com.android.internal.R.string.ext_media_nomedia_notification_title,
- com.android.internal.R.string.ext_media_nomedia_notification_message,
- com.android.internal.R.drawable.stat_notify_sdcard_usb,
- true, false, null);
+ com.android.internal.R.string.ext_media_nomedia_notification_title,
+ com.android.internal.R.string.ext_media_nomedia_notification_message,
+ com.android.internal.R.drawable.stat_notify_sdcard_usb,
+ true, false, null);
handlePossibleExplicitUnmountBroadcast(path);
Intent intent = new Intent(Intent.ACTION_MEDIA_REMOVED,
@@ -309,6 +728,9 @@
* Broadcasts the media unmounted event to all clients.
*/
void notifyMediaUnmounted(String path) {
+
+ updatePublicVolumeState(path, Environment.MEDIA_UNMOUNTED);
+
if (mShowSafeUnmountNotificationWhenUnmounted) {
setMediaStorageNotification(
com.android.internal.R.string.ext_media_safe_unmount_notification_title,
@@ -330,6 +752,8 @@
* Broadcasts the media checking event to all clients.
*/
void notifyMediaChecking(String path) {
+ updatePublicVolumeState(path, Environment.MEDIA_CHECKING);
+
setMediaStorageNotification(
com.android.internal.R.string.ext_media_checking_notification_title,
com.android.internal.R.string.ext_media_checking_notification_message,
@@ -346,6 +770,7 @@
* Broadcasts the media nofs event to all clients.
*/
void notifyMediaNoFs(String path) {
+ updatePublicVolumeState(path, Environment.MEDIA_NOFS);
Intent intent = new Intent();
intent.setClass(mContext, com.android.internal.app.ExternalMediaFormatActivity.class);
@@ -365,6 +790,8 @@
* Broadcasts the media mounted event to all clients.
*/
void notifyMediaMounted(String path, boolean readOnly) {
+ updatePublicVolumeState(path, Environment.MEDIA_MOUNTED);
+
setMediaStorageNotification(0, 0, 0, false, false, null);
updateUsbMassStorageNotification(false, false);
Intent intent = new Intent(Intent.ACTION_MEDIA_MOUNTED,
@@ -377,16 +804,25 @@
/**
* Broadcasts the media shared event to all clients.
*/
- void notifyMediaShared(String path) {
- Intent intent = new Intent();
- intent.setClass(mContext, com.android.internal.app.UsbStorageStopActivity.class);
- PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
- setUsbStorageNotification(com.android.internal.R.string.usb_storage_stop_notification_title,
- com.android.internal.R.string.usb_storage_stop_notification_message,
- com.android.internal.R.drawable.stat_sys_warning,
- false, true, pi);
+ void notifyMediaShared(String path, boolean mounted) {
+ if (mounted) {
+ Log.e(TAG, "Live shared mounts not supported yet!");
+ return;
+ }
+
+ updatePublicVolumeState(path, Environment.MEDIA_SHARED);
+
+ if (mUmsActiveNotify) {
+ Intent intent = new Intent();
+ intent.setClass(mContext, com.android.internal.app.UsbStorageStopActivity.class);
+ PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
+ setUsbStorageNotification(com.android.internal.R.string.usb_storage_stop_notification_title,
+ com.android.internal.R.string.usb_storage_stop_notification_message,
+ com.android.internal.R.drawable.stat_sys_warning,
+ false, true, pi);
+ }
handlePossibleExplicitUnmountBroadcast(path);
- intent = new Intent(Intent.ACTION_MEDIA_SHARED,
+ Intent intent = new Intent(Intent.ACTION_MEDIA_SHARED,
Uri.parse("file://" + path));
mContext.sendBroadcast(intent);
}
@@ -395,6 +831,8 @@
* Broadcasts the media bad removal event to all clients.
*/
void notifyMediaBadRemoval(String path) {
+ updatePublicVolumeState(path, Environment.MEDIA_BAD_REMOVAL);
+
updateUsbMassStorageNotification(true, false);
setMediaStorageNotification(com.android.internal.R.string.ext_media_badremoval_notification_title,
com.android.internal.R.string.ext_media_badremoval_notification_message,
@@ -405,16 +843,14 @@
Intent intent = new Intent(Intent.ACTION_MEDIA_BAD_REMOVAL,
Uri.parse("file://" + path));
mContext.sendBroadcast(intent);
-
- intent = new Intent(Intent.ACTION_MEDIA_REMOVED,
- Uri.parse("file://" + path));
- mContext.sendBroadcast(intent);
}
/**
* Broadcasts the media unmountable event to all clients.
*/
void notifyMediaUnmountable(String path) {
+ updatePublicVolumeState(path, Environment.MEDIA_UNMOUNTABLE);
+
Intent intent = new Intent();
intent.setClass(mContext, com.android.internal.app.ExternalMediaFormatActivity.class);
PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
@@ -435,7 +871,7 @@
/**
* Broadcasts the media eject event to all clients.
*/
- void notifyMediaEject(String path) {
+ void notifyMediaUnmounting(String path) {
Intent intent = new Intent(Intent.ACTION_MEDIA_EJECT,
Uri.parse("file://" + path));
mContext.sendBroadcast(intent);
@@ -568,5 +1004,64 @@
notificationManager.cancel(notificationId);
}
}
+
+ public String[] getSecureContainerList() throws IllegalStateException {
+ ArrayList<String> rsp = mConnector.doCommand("list_asec");
+
+ String[] rdata = new String[rsp.size()];
+ int idx = 0;
+
+ for (String line : rsp) {
+ String []tok = line.split(" ");
+ int code = Integer.parseInt(tok[0]);
+ if (code == VoldResponseCode.AsecListResult) {
+ rdata[idx++] = tok[1];
+ } else if (code == NativeDaemonConnector.ResponseCode.CommandOkay) {
+ return rdata;
+ } else {
+ throw new IllegalStateException(String.format("Unexpected response code %d", code));
+ }
+ }
+ throw new IllegalStateException("Got an empty response");
+ }
+
+ public String createSecureContainer(String id, int sizeMb, String fstype,
+ String key, int ownerUid) throws IllegalStateException {
+ String cmd = String.format("create_asec %s %d %s %s %d",
+ id, sizeMb, fstype, key, ownerUid);
+ mConnector.doCommand(cmd);
+ return getSecureContainerPath(id);
+ }
+
+ public void finalizeSecureContainer(String id) throws IllegalStateException {
+ mConnector.doCommand(String.format("finalize_asec %s", id));
+ }
+
+ public void destroySecureContainer(String id) throws IllegalStateException {
+ mConnector.doCommand(String.format("destroy_asec %s", id));
+ }
+
+ public String mountSecureContainer(String id, String key,
+ int ownerUid) throws IllegalStateException {
+ String cmd = String.format("mount_asec %s %s %d",
+ id, key, ownerUid);
+ mConnector.doCommand(cmd);
+ return getSecureContainerPath(id);
+ }
+
+ public String getSecureContainerPath(String id) throws IllegalStateException {
+ ArrayList<String> rsp = mConnector.doCommand("asec_path " + id);
+
+ for (String line : rsp) {
+ String []tok = line.split(" ");
+ int code = Integer.parseInt(tok[0]);
+ if (code == VoldResponseCode.AsecPathResult) {
+ return tok[1];
+ } else {
+ throw new IllegalStateException(String.format("Unexpected response code %d", code));
+ }
+ }
+ throw new IllegalStateException("Got an empty response");
+ }
}
diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java
new file mode 100644
index 0000000..da3e562
--- /dev/null
+++ b/services/java/com/android/server/NativeDaemonConnector.java
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2007 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.
+ */
+
+package com.android.server;
+
+import android.net.LocalSocketAddress;
+import android.net.LocalSocket;
+import android.os.Environment;
+import android.os.SystemClock;
+import android.os.SystemProperties;
+import android.util.Config;
+import android.util.Log;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Socket;
+import java.lang.IllegalStateException;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.ListIterator;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+/**
+ * Generic connector class for interfacing with a native
+ * daemon which uses the libsysutils FrameworkListener
+ * protocol.
+ */
+final class NativeDaemonConnector implements Runnable {
+
+ private BlockingQueue<String> mResponseQueue;
+ private OutputStream mOutputStream;
+ private String TAG = "NativeDaemonConnector";
+ private String mSocket;
+ private INativeDaemonConnectorCallbacks mCallbacks;
+
+ class ResponseCode {
+ public static final int ActionInitiated = 100;
+
+ public static final int CommandOkay = 200;
+
+ // The range of 400 -> 599 is reserved for cmd failures
+ public static final int OperationFailed = 400;
+ public static final int CommandSyntaxError = 500;
+ public static final int CommandParameterError = 501;
+
+ public static final int UnsolicitedInformational = 600;
+
+ //
+ public static final int FailedRangeStart = 400;
+ public static final int FailedRangeEnd = 599;
+ }
+
+ NativeDaemonConnector(INativeDaemonConnectorCallbacks callbacks,
+ String socket, int responseQueueSize, String logTag) {
+ mCallbacks = callbacks;
+ if (logTag != null)
+ TAG = logTag;
+ mSocket = socket;
+ mResponseQueue = new LinkedBlockingQueue<String>(responseQueueSize);
+ }
+
+ public void run() {
+
+ while (true) {
+ try {
+ listenToSocket();
+ } catch (Exception e) {
+ Log.e(TAG, "Error in NativeDaemonConnector", e);
+ SystemClock.sleep(1000);
+ }
+ }
+ }
+
+ private void listenToSocket() {
+ LocalSocket socket = null;
+
+ try {
+ socket = new LocalSocket();
+ LocalSocketAddress address = new LocalSocketAddress(mSocket,
+ LocalSocketAddress.Namespace.RESERVED);
+
+ socket.connect(address);
+ mCallbacks.onDaemonConnected();
+
+ InputStream inputStream = socket.getInputStream();
+ mOutputStream = socket.getOutputStream();
+
+ byte[] buffer = new byte[4096];
+
+ while (true) {
+ int count = inputStream.read(buffer);
+ if (count < 0) break;
+
+ int start = 0;
+ for (int i = 0; i < count; i++) {
+ if (buffer[i] == 0) {
+ String event = new String(buffer, start, i - start);
+// Log.d(TAG, "Got packet {" + event + "}");
+
+ String[] tokens = event.split(" ");
+ try {
+ int code = Integer.parseInt(tokens[0]);
+
+ if (code >= ResponseCode.UnsolicitedInformational) {
+ try {
+ if (!mCallbacks.onEvent(code, event, tokens)) {
+ Log.w(TAG, String.format(
+ "Unhandled event (%s)", event));
+ }
+ } catch (Exception ex) {
+ Log.e(TAG, String.format(
+ "Error handling '%s'", event), ex);
+ }
+ } else {
+ try {
+ mResponseQueue.put(event);
+ } catch (InterruptedException ex) {
+ Log.e(TAG, "Failed to put response onto queue", ex);
+ }
+ }
+ } catch (NumberFormatException nfe) {
+ Log.w(TAG, String.format("Bad msg (%s)", event));
+ }
+ start = i + 1;
+ }
+ }
+ }
+ } catch (IOException ex) {
+ Log.e(TAG, "Communications error", ex);
+ }
+
+ synchronized (this) {
+ if (mOutputStream != null) {
+ try {
+ mOutputStream.close();
+ } catch (IOException e) {
+ Log.w(TAG, "Failed closing output stream", e);
+ }
+
+ mOutputStream = null;
+ }
+ }
+
+ try {
+ if (socket != null) {
+ socket.close();
+ }
+ } catch (IOException ex) {
+ Log.w(TAG, "Failed closing socket", ex);
+ }
+
+ Log.e(TAG, "Failed to connect to native daemon",
+ new IllegalStateException());
+ SystemClock.sleep(5000);
+ }
+
+ private void sendCommand(String command) {
+ sendCommand(command, null);
+ }
+
+ /**
+ * Sends a command to the daemon with a single argument
+ *
+ * @param command The command to send to the daemon
+ * @param argument The argument to send with the command (or null)
+ */
+ private void sendCommand(String command, String argument) {
+ synchronized (this) {
+ Log.d(TAG, "sendCommand {" + command + "} {" + argument + "}");
+ if (mOutputStream == null) {
+ Log.e(TAG, "No connection to daemon", new IllegalStateException());
+ } else {
+ StringBuilder builder = new StringBuilder(command);
+ if (argument != null) {
+ builder.append(argument);
+ }
+ builder.append('\0');
+
+ try {
+ mOutputStream.write(builder.toString().getBytes());
+ } catch (IOException ex) {
+ Log.e(TAG, "IOException in sendCommand", ex);
+ }
+ }
+ }
+ }
+
+ public synchronized ArrayList<String> doCommand(String cmd) throws IllegalStateException {
+ sendCommand(cmd);
+
+ ArrayList<String> response = new ArrayList<String>();
+ boolean complete = false;
+ int code = -1;
+
+ while (!complete) {
+ try {
+ String line = mResponseQueue.take();
+// Log.d(TAG, "Removed off queue -> " + line);
+ String[] tokens = line.split(" ");
+ try {
+ code = Integer.parseInt(tokens[0]);
+ } catch (NumberFormatException nfe) {
+ throw new IllegalStateException(
+ String.format("Invalid response from daemon (%s)", line));
+ }
+
+ if ((code >= 200) && (code < 600))
+ complete = true;
+ response.add(line);
+ } catch (InterruptedException ex) {
+ Log.e(TAG, "InterruptedException");
+ }
+ }
+
+ if (code >= ResponseCode.FailedRangeStart &&
+ code <= ResponseCode.FailedRangeEnd) {
+ throw new IllegalStateException(String.format(
+ "Command %s failed with code %d",
+ cmd, code));
+ }
+ return response;
+ }
+}
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index d740ce1..bf6996c 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -29,6 +29,7 @@
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.res.Resources;
+import android.database.ContentObserver;
import android.database.Cursor;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
@@ -36,15 +37,18 @@
import android.hardware.SensorManager;
import android.os.BatteryStats;
import android.os.Binder;
+import android.os.Environment;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
+import android.os.IMountService;
import android.os.IPowerManager;
import android.os.LocalPowerManager;
import android.os.Power;
import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
+import android.os.ServiceManager;
import android.os.SystemClock;
import android.provider.Settings.SettingNotFoundException;
import android.provider.Settings;
@@ -85,7 +89,7 @@
| PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK;
// time since last state: time since last event:
- // The short keylight delay comes from Gservices; this is the default.
+ // The short keylight delay comes from secure settings; this is the default.
private static final int SHORT_KEYLIGHT_DELAY_DEFAULT = 6000; // t+6 sec
private static final int MEDIUM_KEYLIGHT_DELAY = 15000; // t+15 sec
private static final int LONG_KEYLIGHT_DELAY = 6000; // t+6 sec
@@ -100,7 +104,7 @@
// trigger proximity if distance is less than 5 cm
private static final float PROXIMITY_THRESHOLD = 5.0f;
- // Cached Gservices settings; see updateGservicesValues()
+ // Cached secure settings; see updateSettingsValues()
private int mShortKeylightDelay = SHORT_KEYLIGHT_DELAY_DEFAULT;
// flags for setPowerState
@@ -513,12 +517,15 @@
filter.addAction(Intent.ACTION_BOOT_COMPLETED);
mContext.registerReceiver(new BootCompletedReceiver(), filter);
- // Listen for Gservices changes
- IntentFilter gservicesChangedFilter =
- new IntentFilter(Settings.Gservices.CHANGED_ACTION);
- mContext.registerReceiver(new GservicesChangedReceiver(), gservicesChangedFilter);
- // And explicitly do the initial update of our cached settings
- updateGservicesValues();
+ // Listen for secure settings changes
+ mContext.getContentResolver().registerContentObserver(
+ Settings.Secure.CONTENT_URI, true,
+ new ContentObserver(new Handler()) {
+ public void onChange(boolean selfChange) {
+ updateSettingsValues();
+ }
+ });
+ updateSettingsValues();
if (mUseSoftwareAutoBrightness) {
// turn the screen on
@@ -2130,6 +2137,24 @@
public void reboot(String reason)
{
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.REBOOT, null);
+
+ /*
+ * Manually shutdown the MountService to ensure media is
+ * put into a safe state.
+ */
+ IMountService mSvc = IMountService.Stub.asInterface(
+ ServiceManager.getService("mount"));
+
+ if (mSvc != null) {
+ try {
+ mSvc.shutdown();
+ } catch (Exception e) {
+ Log.e(TAG, "MountService shutdown failed", e);
+ }
+ } else {
+ Log.w(TAG, "MountService unavailable for shutdown");
+ }
+
try {
Power.reboot(reason);
} catch (IOException e) {
@@ -2252,7 +2277,7 @@
* */
private void setScreenOffTimeoutsLocked() {
if ((mPokey & POKE_LOCK_SHORT_TIMEOUT) != 0) {
- mKeylightDelay = mShortKeylightDelay; // Configurable via Gservices
+ mKeylightDelay = mShortKeylightDelay; // Configurable via secure settings
mDimDelay = -1;
mScreenOffDelay = 0;
} else if ((mPokey & POKE_LOCK_MEDIUM_TIMEOUT) != 0) {
@@ -2287,28 +2312,15 @@
}
/**
- * Refreshes cached Gservices settings. Called once on startup, and
- * on subsequent Settings.Gservices.CHANGED_ACTION broadcasts (see
- * GservicesChangedReceiver).
+ * Refreshes cached secure settings. Called once on startup, and
+ * on subsequent changes to secure settings.
*/
- private void updateGservicesValues() {
- mShortKeylightDelay = Settings.Gservices.getInt(
+ private void updateSettingsValues() {
+ mShortKeylightDelay = Settings.Secure.getInt(
mContext.getContentResolver(),
- Settings.Gservices.SHORT_KEYLIGHT_DELAY_MS,
+ Settings.Secure.SHORT_KEYLIGHT_DELAY_MS,
SHORT_KEYLIGHT_DELAY_DEFAULT);
- // Log.i(TAG, "updateGservicesValues(): mShortKeylightDelay now " + mShortKeylightDelay);
- }
-
- /**
- * Receiver for the Gservices.CHANGED_ACTION broadcast intent,
- * which tells us we need to refresh our cached Gservices settings.
- */
- private class GservicesChangedReceiver extends BroadcastReceiver {
- @Override
- public void onReceive(Context context, Intent intent) {
- // Log.i(TAG, "GservicesChangedReceiver.onReceive(): " + intent);
- updateGservicesValues();
- }
+ // Log.i(TAG, "updateSettingsValues(): mShortKeylightDelay now " + mShortKeylightDelay);
}
private class LockList extends ArrayList<WakeLock>
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 214ecc1..674ade9 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -74,8 +74,6 @@
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_SYSTEM_RUN,
SystemClock.uptimeMillis());
- ActivityManagerService.prepareTraceFile(false); // create dir
-
Looper.prepare();
android.os.Process.setThreadPriority(
diff --git a/services/java/com/android/server/Watchdog.java b/services/java/com/android/server/Watchdog.java
index 2ff9100..a6bfd99 100644
--- a/services/java/com/android/server/Watchdog.java
+++ b/services/java/com/android/server/Watchdog.java
@@ -97,16 +97,16 @@
long mLastMemCheckRealtime = -(MEMCHECK_DEFAULT_LOG_REALTIME_INTERVAL*1000);
boolean mHaveGlobalPss;
final MemMonitor mSystemMemMonitor = new MemMonitor("system",
- Settings.Gservices.MEMCHECK_SYSTEM_ENABLED,
- Settings.Gservices.MEMCHECK_SYSTEM_SOFT_THRESHOLD,
+ Settings.Secure.MEMCHECK_SYSTEM_ENABLED,
+ Settings.Secure.MEMCHECK_SYSTEM_SOFT_THRESHOLD,
MEMCHECK_DEFAULT_SYSTEM_SOFT_THRESHOLD,
- Settings.Gservices.MEMCHECK_SYSTEM_HARD_THRESHOLD,
+ Settings.Secure.MEMCHECK_SYSTEM_HARD_THRESHOLD,
MEMCHECK_DEFAULT_SYSTEM_HARD_THRESHOLD);
final MemMonitor mPhoneMemMonitor = new MemMonitor("com.android.phone",
- Settings.Gservices.MEMCHECK_PHONE_ENABLED,
- Settings.Gservices.MEMCHECK_PHONE_SOFT_THRESHOLD,
+ Settings.Secure.MEMCHECK_PHONE_ENABLED,
+ Settings.Secure.MEMCHECK_PHONE_SOFT_THRESHOLD,
MEMCHECK_DEFAULT_PHONE_SOFT_THRESHOLD,
- Settings.Gservices.MEMCHECK_PHONE_HARD_THRESHOLD,
+ Settings.Secure.MEMCHECK_PHONE_HARD_THRESHOLD,
MEMCHECK_DEFAULT_PHONE_HARD_THRESHOLD);
final Calendar mCalendar = Calendar.getInstance();
@@ -161,11 +161,11 @@
}
void retrieveSettings(ContentResolver resolver) {
- mSoftThreshold = Settings.Gservices.getInt(
+ mSoftThreshold = Settings.Secure.getInt(
resolver, mSoftSetting, mSoftThreshold);
- mHardThreshold = Settings.Gservices.getInt(
+ mHardThreshold = Settings.Secure.getInt(
resolver, mHardSetting, mHardThreshold);
- mEnabled = Settings.Gservices.getInt(
+ mEnabled = Settings.Secure.getInt(
resolver, mEnabledSetting, 0) != 0;
}
@@ -255,8 +255,8 @@
// See if we should force a reboot.
int rebootInterval = mReqRebootInterval >= 0
- ? mReqRebootInterval : Settings.Gservices.getInt(
- mResolver, Settings.Gservices.REBOOT_INTERVAL,
+ ? mReqRebootInterval : Settings.Secure.getInt(
+ mResolver, Settings.Secure.REBOOT_INTERVAL,
REBOOT_DEFAULT_INTERVAL);
if (mRebootInterval != rebootInterval) {
mRebootInterval = rebootInterval;
@@ -266,8 +266,8 @@
}
// See if we should check memory conditions.
- long memCheckInterval = Settings.Gservices.getLong(
- mResolver, Settings.Gservices.MEMCHECK_INTERVAL,
+ long memCheckInterval = Settings.Secure.getLong(
+ mResolver, Settings.Secure.MEMCHECK_INTERVAL,
MEMCHECK_DEFAULT_INTERVAL) * 1000;
if ((mLastMemCheckTime+memCheckInterval) < now) {
// It is now time to collect pss information. This
@@ -279,8 +279,8 @@
collectMemory();
mHavePss = true;
- long memCheckRealtimeInterval = Settings.Gservices.getLong(
- mResolver, Settings.Gservices.MEMCHECK_LOG_REALTIME_INTERVAL,
+ long memCheckRealtimeInterval = Settings.Secure.getLong(
+ mResolver, Settings.Secure.MEMCHECK_LOG_REALTIME_INTERVAL,
MEMCHECK_DEFAULT_LOG_REALTIME_INTERVAL) * 1000;
long realtimeNow = SystemClock.elapsedRealtime();
if ((mLastMemCheckRealtime+memCheckRealtimeInterval) < realtimeNow) {
@@ -468,8 +468,8 @@
long curTime;
long nextTime = 0;
- long recheckInterval = Settings.Gservices.getLong(
- mResolver, Settings.Gservices.MEMCHECK_RECHECK_INTERVAL,
+ long recheckInterval = Settings.Secure.getLong(
+ mResolver, Settings.Secure.MEMCHECK_RECHECK_INTERVAL,
MEMCHECK_DEFAULT_RECHECK_INTERVAL) * 1000;
mSystemMemMonitor.retrieveSettings(mResolver);
@@ -586,8 +586,8 @@
void checkReboot(boolean fromAlarm) {
int rebootInterval = mReqRebootInterval >= 0 ? mReqRebootInterval
- : Settings.Gservices.getInt(
- mResolver, Settings.Gservices.REBOOT_INTERVAL,
+ : Settings.Secure.getInt(
+ mResolver, Settings.Secure.REBOOT_INTERVAL,
REBOOT_DEFAULT_INTERVAL);
mRebootInterval = rebootInterval;
if (rebootInterval <= 0) {
@@ -598,16 +598,16 @@
}
long rebootStartTime = mReqRebootStartTime >= 0 ? mReqRebootStartTime
- : Settings.Gservices.getLong(
- mResolver, Settings.Gservices.REBOOT_START_TIME,
+ : Settings.Secure.getLong(
+ mResolver, Settings.Secure.REBOOT_START_TIME,
REBOOT_DEFAULT_START_TIME);
long rebootWindowMillis = (mReqRebootWindow >= 0 ? mReqRebootWindow
- : Settings.Gservices.getLong(
- mResolver, Settings.Gservices.REBOOT_WINDOW,
+ : Settings.Secure.getLong(
+ mResolver, Settings.Secure.REBOOT_WINDOW,
REBOOT_DEFAULT_WINDOW)) * 1000;
long recheckInterval = (mReqRecheckInterval >= 0 ? mReqRecheckInterval
- : Settings.Gservices.getLong(
- mResolver, Settings.Gservices.MEMCHECK_RECHECK_INTERVAL,
+ : Settings.Secure.getLong(
+ mResolver, Settings.Secure.MEMCHECK_RECHECK_INTERVAL,
MEMCHECK_DEFAULT_RECHECK_INTERVAL)) * 1000;
retrieveBrutalityAmount();
@@ -688,12 +688,12 @@
*/
void retrieveBrutalityAmount() {
mMinScreenOff = (mReqMinScreenOff >= 0 ? mReqMinScreenOff
- : Settings.Gservices.getInt(
- mResolver, Settings.Gservices.MEMCHECK_MIN_SCREEN_OFF,
+ : Settings.Secure.getInt(
+ mResolver, Settings.Secure.MEMCHECK_MIN_SCREEN_OFF,
MEMCHECK_DEFAULT_MIN_SCREEN_OFF)) * 1000;
mMinAlarm = (mReqMinNextAlarm >= 0 ? mReqMinNextAlarm
- : Settings.Gservices.getInt(
- mResolver, Settings.Gservices.MEMCHECK_MIN_ALARM,
+ : Settings.Secure.getInt(
+ mResolver, Settings.Secure.MEMCHECK_MIN_ALARM,
MEMCHECK_DEFAULT_MIN_ALARM)) * 1000;
}
@@ -737,11 +737,11 @@
mMemcheckLastTime = curTime;
- long memcheckExecStartTime = Settings.Gservices.getLong(
- mResolver, Settings.Gservices.MEMCHECK_EXEC_START_TIME,
+ long memcheckExecStartTime = Settings.Secure.getLong(
+ mResolver, Settings.Secure.MEMCHECK_EXEC_START_TIME,
MEMCHECK_DEFAULT_EXEC_START_TIME);
- long memcheckExecEndTime = Settings.Gservices.getLong(
- mResolver, Settings.Gservices.MEMCHECK_EXEC_END_TIME,
+ long memcheckExecEndTime = Settings.Secure.getLong(
+ mResolver, Settings.Secure.MEMCHECK_EXEC_END_TIME,
MEMCHECK_DEFAULT_EXEC_END_TIME);
mMemcheckExecEndTime = computeCalendarTime(mCalendar, curTime,
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index 987a24e..d5de1f0 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -113,8 +113,8 @@
private final IBatteryStats mBatteryStats;
/**
- * See {@link Settings.Gservices#WIFI_IDLE_MS}. This is the default value if a
- * Settings.Gservices value is not present. This timeout value is chosen as
+ * See {@link Settings.Secure#WIFI_IDLE_MS}. This is the default value if a
+ * Settings.Secure value is not present. This timeout value is chosen as
* the approximate point at which the battery drain caused by Wi-Fi
* being enabled but not active exceeds the battery drain caused by
* re-establishing a connection to the mobile data network.
@@ -330,19 +330,32 @@
return false;
}
+ /**
+ * Multiple calls to unregisterReceiver() cause exception and a system crash.
+ * This can happen if a supplicant is lost (or firmware crash occurs) and user indicates
+ * disable wifi at the same time.
+ * Avoid doing a disable when the current Wifi state is UNKNOWN
+ * TODO: Handle driver load fail and supplicant lost as seperate states
+ */
+ if (mWifiState == WIFI_STATE_UNKNOWN && !enable) {
+ return false;
+ }
+
setWifiEnabledState(enable ? WIFI_STATE_ENABLING : WIFI_STATE_DISABLING, uid);
if (enable) {
- if (!WifiNative.loadDriver()) {
- Log.e(TAG, "Failed to load Wi-Fi driver.");
- setWifiEnabledState(WIFI_STATE_UNKNOWN, uid);
- return false;
- }
- if (!WifiNative.startSupplicant()) {
- WifiNative.unloadDriver();
- Log.e(TAG, "Failed to start supplicant daemon.");
- setWifiEnabledState(WIFI_STATE_UNKNOWN, uid);
- return false;
+ synchronized (mWifiStateTracker) {
+ if (!WifiNative.loadDriver()) {
+ Log.e(TAG, "Failed to load Wi-Fi driver.");
+ setWifiEnabledState(WIFI_STATE_UNKNOWN, uid);
+ return false;
+ }
+ if (!WifiNative.startSupplicant()) {
+ WifiNative.unloadDriver();
+ Log.e(TAG, "Failed to start supplicant daemon.");
+ setWifiEnabledState(WIFI_STATE_UNKNOWN, uid);
+ return false;
+ }
}
registerForBroadcasts();
mWifiStateTracker.startEventLoop();
@@ -353,21 +366,23 @@
mWifiStateTracker.setNotificationVisible(false, 0, false, 0);
boolean failedToStopSupplicantOrUnloadDriver = false;
- if (!WifiNative.stopSupplicant()) {
- Log.e(TAG, "Failed to stop supplicant daemon.");
- setWifiEnabledState(WIFI_STATE_UNKNOWN, uid);
- failedToStopSupplicantOrUnloadDriver = true;
- }
-
- // We must reset the interface before we unload the driver
- mWifiStateTracker.resetInterface(false);
-
- if (!WifiNative.unloadDriver()) {
- Log.e(TAG, "Failed to unload Wi-Fi driver.");
- if (!failedToStopSupplicantOrUnloadDriver) {
+ synchronized (mWifiStateTracker) {
+ if (!WifiNative.stopSupplicant()) {
+ Log.e(TAG, "Failed to stop supplicant daemon.");
setWifiEnabledState(WIFI_STATE_UNKNOWN, uid);
failedToStopSupplicantOrUnloadDriver = true;
}
+
+ // We must reset the interface before we unload the driver
+ mWifiStateTracker.resetInterface(false);
+
+ if (!WifiNative.unloadDriver()) {
+ Log.e(TAG, "Failed to unload Wi-Fi driver.");
+ if (!failedToStopSupplicantOrUnloadDriver) {
+ setWifiEnabledState(WIFI_STATE_UNKNOWN, uid);
+ failedToStopSupplicantOrUnloadDriver = true;
+ }
+ }
}
if (failedToStopSupplicantOrUnloadDriver) {
return false;
@@ -380,7 +395,6 @@
persistWifiEnabled(enable);
}
setWifiEnabledState(eventualWifiState, uid);
-
return true;
}
@@ -698,7 +712,7 @@
* @return the supplicant-assigned identifier for the new or updated
* network if the operation succeeds, or {@code -1} if it fails
*/
- public synchronized int addOrUpdateNetwork(WifiConfiguration config) {
+ public int addOrUpdateNetwork(WifiConfiguration config) {
enforceChangePermission();
/*
* If the supplied networkId is -1, we create a new empty
@@ -710,41 +724,41 @@
boolean doReconfig;
int currentPriority;
// networkId of -1 means we want to create a new network
- if (newNetwork) {
- netId = WifiNative.addNetworkCommand();
- if (netId < 0) {
- if (DBG) {
- Log.d(TAG, "Failed to add a network!");
+ synchronized (mWifiStateTracker) {
+ if (newNetwork) {
+ netId = WifiNative.addNetworkCommand();
+ if (netId < 0) {
+ if (DBG) {
+ Log.d(TAG, "Failed to add a network!");
+ }
+ return -1;
}
- return -1;
- }
- doReconfig = true;
- } else {
- String priorityVal = WifiNative.getNetworkVariableCommand(netId, WifiConfiguration.priorityVarName);
- currentPriority = -1;
- if (!TextUtils.isEmpty(priorityVal)) {
- try {
- currentPriority = Integer.parseInt(priorityVal);
- } catch (NumberFormatException ignore) {
+ doReconfig = true;
+ } else {
+ String priorityVal = WifiNative.getNetworkVariableCommand(netId, WifiConfiguration.priorityVarName);
+ currentPriority = -1;
+ if (!TextUtils.isEmpty(priorityVal)) {
+ try {
+ currentPriority = Integer.parseInt(priorityVal);
+ } catch (NumberFormatException ignore) {
+ }
}
+ doReconfig = currentPriority != config.priority;
}
- doReconfig = currentPriority != config.priority;
- }
- mNeedReconfig = mNeedReconfig || doReconfig;
+ mNeedReconfig = mNeedReconfig || doReconfig;
- setVariables: {
+ setVariables: {
/*
* Note that if a networkId for a non-existent network
* was supplied, then the first setNetworkVariableCommand()
* will fail, so we don't bother to make a separate check
* for the validity of the ID up front.
*/
-
if (config.SSID != null &&
- !WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.ssidVarName,
- convertToQuotedString(config.SSID))) {
+ !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.ssidVarName,
+ convertToQuotedString(config.SSID))) {
if (DBG) {
Log.d(TAG, "failed to set SSID: "+config.SSID);
}
@@ -752,10 +766,10 @@
}
if (config.BSSID != null &&
- !WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.bssidVarName,
- config.BSSID)) {
+ !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.bssidVarName,
+ config.BSSID)) {
if (DBG) {
Log.d(TAG, "failed to set BSSID: "+config.BSSID);
}
@@ -765,13 +779,13 @@
String allowedKeyManagementString =
makeString(config.allowedKeyManagement, WifiConfiguration.KeyMgmt.strings);
if (config.allowedKeyManagement.cardinality() != 0 &&
- !WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.KeyMgmt.varName,
- allowedKeyManagementString)) {
+ !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.KeyMgmt.varName,
+ allowedKeyManagementString)) {
if (DBG) {
Log.d(TAG, "failed to set key_mgmt: "+
- allowedKeyManagementString);
+ allowedKeyManagementString);
}
break setVariables;
}
@@ -779,13 +793,13 @@
String allowedProtocolsString =
makeString(config.allowedProtocols, WifiConfiguration.Protocol.strings);
if (config.allowedProtocols.cardinality() != 0 &&
- !WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.Protocol.varName,
- allowedProtocolsString)) {
+ !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.Protocol.varName,
+ allowedProtocolsString)) {
if (DBG) {
Log.d(TAG, "failed to set proto: "+
- allowedProtocolsString);
+ allowedProtocolsString);
}
break setVariables;
}
@@ -793,13 +807,13 @@
String allowedAuthAlgorithmsString =
makeString(config.allowedAuthAlgorithms, WifiConfiguration.AuthAlgorithm.strings);
if (config.allowedAuthAlgorithms.cardinality() != 0 &&
- !WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.AuthAlgorithm.varName,
- allowedAuthAlgorithmsString)) {
+ !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.AuthAlgorithm.varName,
+ allowedAuthAlgorithmsString)) {
if (DBG) {
Log.d(TAG, "failed to set auth_alg: "+
- allowedAuthAlgorithmsString);
+ allowedAuthAlgorithmsString);
}
break setVariables;
}
@@ -807,13 +821,13 @@
String allowedPairwiseCiphersString =
makeString(config.allowedPairwiseCiphers, WifiConfiguration.PairwiseCipher.strings);
if (config.allowedPairwiseCiphers.cardinality() != 0 &&
- !WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.PairwiseCipher.varName,
- allowedPairwiseCiphersString)) {
+ !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.PairwiseCipher.varName,
+ allowedPairwiseCiphersString)) {
if (DBG) {
Log.d(TAG, "failed to set pairwise: "+
- allowedPairwiseCiphersString);
+ allowedPairwiseCiphersString);
}
break setVariables;
}
@@ -821,13 +835,13 @@
String allowedGroupCiphersString =
makeString(config.allowedGroupCiphers, WifiConfiguration.GroupCipher.strings);
if (config.allowedGroupCiphers.cardinality() != 0 &&
- !WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.GroupCipher.varName,
- allowedGroupCiphersString)) {
+ !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.GroupCipher.varName,
+ allowedGroupCiphersString)) {
if (DBG) {
Log.d(TAG, "failed to set group: "+
- allowedGroupCiphersString);
+ allowedGroupCiphersString);
}
break setVariables;
}
@@ -835,10 +849,10 @@
// Prevent client screw-up by passing in a WifiConfiguration we gave it
// by preventing "*" as a key.
if (config.preSharedKey != null && !config.preSharedKey.equals("*") &&
- !WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.pskVarName,
- config.preSharedKey)) {
+ !WifiNative.setNetworkVariableCommand(
+ netId,
+ WifiConfiguration.pskVarName,
+ config.preSharedKey)) {
if (DBG) {
Log.d(TAG, "failed to set psk: "+config.preSharedKey);
}
@@ -852,13 +866,13 @@
// by preventing "*" as a key.
if (config.wepKeys[i] != null && !config.wepKeys[i].equals("*")) {
if (!WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.wepKeyVarNames[i],
- config.wepKeys[i])) {
+ netId,
+ WifiConfiguration.wepKeyVarNames[i],
+ config.wepKeys[i])) {
if (DBG) {
Log.d(TAG,
- "failed to set wep_key"+i+": " +
- config.wepKeys[i]);
+ "failed to set wep_key"+i+": " +
+ config.wepKeys[i]);
}
break setVariables;
}
@@ -869,36 +883,36 @@
if (hasSetKey) {
if (!WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.wepTxKeyIdxVarName,
- Integer.toString(config.wepTxKeyIndex))) {
+ netId,
+ WifiConfiguration.wepTxKeyIdxVarName,
+ Integer.toString(config.wepTxKeyIndex))) {
if (DBG) {
Log.d(TAG,
- "failed to set wep_tx_keyidx: "+
- config.wepTxKeyIndex);
+ "failed to set wep_tx_keyidx: "+
+ config.wepTxKeyIndex);
}
break setVariables;
}
}
if (!WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.priorityVarName,
- Integer.toString(config.priority))) {
+ netId,
+ WifiConfiguration.priorityVarName,
+ Integer.toString(config.priority))) {
if (DBG) {
Log.d(TAG, config.SSID + ": failed to set priority: "
- +config.priority);
+ +config.priority);
}
break setVariables;
}
if (config.hiddenSSID && !WifiNative.setNetworkVariableCommand(
- netId,
- WifiConfiguration.hiddenSSIDVarName,
- Integer.toString(config.hiddenSSID ? 1 : 0))) {
+ netId,
+ WifiConfiguration.hiddenSSIDVarName,
+ Integer.toString(config.hiddenSSID ? 1 : 0))) {
if (DBG) {
Log.d(TAG, config.SSID + ": failed to set hiddenSSID: "+
- config.hiddenSSID);
+ config.hiddenSSID);
}
break setVariables;
}
@@ -912,32 +926,33 @@
value = convertToQuotedString(value);
}
if (!WifiNative.setNetworkVariableCommand(
- netId,
- varName,
- value)) {
+ netId,
+ varName,
+ value)) {
if (DBG) {
Log.d(TAG, config.SSID + ": failed to set " + varName +
- ": " + value);
+ ": " + value);
}
break setVariables;
}
}
}
return netId;
- }
+ }
- /*
- * For an update, if one of the setNetworkVariable operations fails,
- * we might want to roll back all the changes already made. But the
- * chances are that if anything is going to go wrong, it'll happen
- * the first time we try to set one of the variables.
- */
- if (newNetwork) {
- removeNetwork(netId);
- if (DBG) {
- Log.d(TAG,
- "Failed to set a network variable, removed network: "
- + netId);
+ /*
+ * For an update, if one of the setNetworkVariable operations fails,
+ * we might want to roll back all the changes already made. But the
+ * chances are that if anything is going to go wrong, it'll happen
+ * the first time we try to set one of the variables.
+ */
+ if (newNetwork) {
+ removeNetwork(netId);
+ if (DBG) {
+ Log.d(TAG,
+ "Failed to set a network variable, removed network: "
+ + netId);
+ }
}
}
return -1;
@@ -1317,11 +1332,12 @@
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
- long idleMillis = Settings.Gservices.getLong(mContext.getContentResolver(),
- Settings.Gservices.WIFI_IDLE_MS, DEFAULT_IDLE_MILLIS);
+ long idleMillis =
+ Settings.Secure.getLong(mContext.getContentResolver(),
+ Settings.Secure.WIFI_IDLE_MS, DEFAULT_IDLE_MILLIS);
int stayAwakeConditions =
- Settings.System.getInt(mContext.getContentResolver(),
- Settings.System.STAY_ON_WHILE_PLUGGED_IN, 0);
+ Settings.System.getInt(mContext.getContentResolver(),
+ Settings.System.STAY_ON_WHILE_PLUGGED_IN, 0);
if (action.equals(Intent.ACTION_SCREEN_ON)) {
Log.d(TAG, "ACTION_SCREEN_ON");
mAlarmManager.cancel(mIdleIntent);
@@ -1848,13 +1864,14 @@
public void initializeMulticastFiltering() {
enforceMulticastChangePermission();
-
synchronized (mMulticasters) {
// if anybody had requested filters be off, leave off
if (mMulticasters.size() != 0) {
return;
} else {
- WifiNative.startPacketFiltering();
+ synchronized (mWifiStateTracker) {
+ WifiNative.startPacketFiltering();
+ }
}
}
}
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 9270a82..1d14e5e 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -7095,8 +7095,8 @@
w = mAttrs.width < 0 ? pw : mAttrs.width;
h = mAttrs.height< 0 ? ph : mAttrs.height;
} else {
- w = mAttrs.width == mAttrs.FILL_PARENT ? pw : mRequestedWidth;
- h = mAttrs.height== mAttrs.FILL_PARENT ? ph : mRequestedHeight;
+ w = mAttrs.width == mAttrs.MATCH_PARENT ? pw : mRequestedWidth;
+ h = mAttrs.height== mAttrs.MATCH_PARENT ? ph : mRequestedHeight;
}
final Rect content = mContentFrame;
@@ -10136,8 +10136,8 @@
if (displayed) {
if (!covered) {
- if (attrs.width == LayoutParams.FILL_PARENT
- && attrs.height == LayoutParams.FILL_PARENT) {
+ if (attrs.width == LayoutParams.MATCH_PARENT
+ && attrs.height == LayoutParams.MATCH_PARENT) {
covered = true;
}
}
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index bf436b6..40d194c 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -70,11 +70,12 @@
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Binder;
-import android.os.Bundle;
import android.os.Build;
+import android.os.Bundle;
import android.os.Debug;
import android.os.DropBoxManager;
import android.os.Environment;
+import android.os.FileObserver;
import android.os.FileUtils;
import android.os.Handler;
import android.os.IBinder;
@@ -355,7 +356,7 @@
Integer.valueOf(SystemProperties.get("ro.EMPTY_APP_MEM"))*PAGE_SIZE;
}
- final int MY_PID;
+ static final int MY_PID = Process.myPid();
static final String[] EMPTY_STRING_ARRAY = new String[0];
@@ -1194,7 +1195,7 @@
int uid = msg.arg1;
boolean restart = (msg.arg2 == 1);
String pkg = (String) msg.obj;
- uninstallPackageLocked(pkg, uid, restart);
+ forceStopPackageLocked(pkg, uid, restart);
}
} break;
}
@@ -1222,7 +1223,7 @@
mSystemThread.getApplicationThread(), info,
info.processName);
app.persistent = true;
- app.pid = Process.myPid();
+ app.pid = MY_PID;
app.maxAdj = SYSTEM_ADJ;
mSelf.mProcessNames.put(app.processName, app.info.uid, app);
synchronized (mSelf.mPidsSelfLocked) {
@@ -1383,8 +1384,6 @@
Log.i(TAG, "Memory class: " + ActivityManager.staticGetMemoryClass());
- MY_PID = Process.myPid();
-
File dataDir = Environment.getDataDirectory();
File systemDir = new File(dataDir, "system");
systemDir.mkdirs();
@@ -2734,8 +2733,7 @@
// Whoops, need to restart this activity!
next.state = lastState;
mResumedActivity = lastResumedActivity;
- if (Config.LOGD) Log.d(TAG,
- "Restarting because process died: " + next);
+ Log.i(TAG, "Restarting because process died: " + next);
if (!next.hasBeenLaunched) {
next.hasBeenLaunched = true;
} else {
@@ -4293,7 +4291,9 @@
cleanUpActivityLocked(r, false);
- if (r.app != null) {
+ final boolean hadApp = r.app != null;
+
+ if (hadApp) {
if (removeFromApp) {
int idx = r.app.activities.indexOf(r);
if (idx >= 0) {
@@ -4350,16 +4350,14 @@
r.configChangeFlags = 0;
- if (!mLRUActivities.remove(r)) {
+ if (!mLRUActivities.remove(r) && hadApp) {
Log.w(TAG, "Activity " + r + " being finished, but not in LRU list");
}
return removedFromHistory;
}
- private static void removeHistoryRecordsForAppLocked(ArrayList list,
- ProcessRecord app)
- {
+ private static void removeHistoryRecordsForAppLocked(ArrayList list, ProcessRecord app) {
int i = list.size();
if (localLOGV) Log.v(
TAG, "Removing app " + app + " from list " + list
@@ -4550,148 +4548,147 @@
scheduleAppGcsLocked();
}
}
- } else if (Config.LOGD) {
+ } else if (DEBUG_PROCESSES) {
Log.d(TAG, "Received spurious death notification for thread "
+ thread.asBinder());
}
}
- final String readFile(String filename) {
- try {
- FileInputStream fs = new FileInputStream(filename);
- byte[] inp = new byte[8192];
- int size = fs.read(inp);
- fs.close();
- return new String(inp, 0, 0, size);
- } catch (java.io.IOException e) {
+ /**
+ * If a stack trace dump file is configured, dump process stack traces.
+ * @param pids of dalvik VM processes to dump stack traces for
+ * @return file containing stack traces, or null if no dump file is configured
+ */
+ private static File dumpStackTraces(ArrayList<Integer> pids) {
+ String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null);
+ if (tracesPath == null || tracesPath.length() == 0) {
+ return null;
}
- return "";
+
+ File tracesFile = new File(tracesPath);
+ try {
+ File tracesDir = tracesFile.getParentFile();
+ if (!tracesDir.exists()) tracesFile.mkdirs();
+ FileUtils.setPermissions(tracesDir.getPath(), 0775, -1, -1); // drwxrwxr-x
+
+ if (tracesFile.exists()) tracesFile.delete();
+ tracesFile.createNewFile();
+ FileUtils.setPermissions(tracesFile.getPath(), 0666, -1, -1); // -rw-rw-rw-
+ } catch (IOException e) {
+ Log.w(TAG, "Unable to prepare ANR traces file: " + tracesPath, e);
+ return null;
+ }
+
+ // Use a FileObserver to detect when traces finish writing.
+ // The order of traces is considered important to maintain for legibility.
+ FileObserver observer = new FileObserver(tracesPath, FileObserver.CLOSE_WRITE) {
+ public synchronized void onEvent(int event, String path) { notify(); }
+ };
+
+ try {
+ observer.startWatching();
+ int num = pids.size();
+ for (int i = 0; i < num; i++) {
+ synchronized (observer) {
+ Process.sendSignal(pids.get(i), Process.SIGNAL_QUIT);
+ observer.wait(200); // Wait for write-close, give up after 200msec
+ }
+ }
+ } catch (InterruptedException e) {
+ Log.wtf(TAG, e);
+ } finally {
+ observer.stopWatching();
+ }
+
+ return tracesFile;
}
- final void appNotRespondingLocked(ProcessRecord app, HistoryRecord activity,
- HistoryRecord reportedActivity, final String annotation) {
+ final void appNotRespondingLocked(ProcessRecord app, HistoryRecord activity,
+ HistoryRecord parent, final String annotation) {
if (app.notResponding || app.crashing) {
return;
}
-
+
// Log the ANR to the event log.
EventLog.writeEvent(EventLogTags.ANR, app.pid, app.processName, annotation);
-
- // If we are on a secure build and the application is not interesting to the user (it is
- // not visible or in the background), just kill it instead of displaying a dialog.
- boolean isSecure = "1".equals(SystemProperties.get(SYSTEM_SECURE, "0"));
- if (isSecure && !app.isInterestingToUserLocked() && Process.myPid() != app.pid) {
- Process.killProcess(app.pid);
- return;
- }
-
- // DeviceMonitor.start();
- String processInfo = null;
- if (MONITOR_CPU_USAGE) {
- updateCpuStatsNow();
- synchronized (mProcessStatsThread) {
- processInfo = mProcessStats.printCurrentState();
+ // Dump thread traces as quickly as we can, starting with "interesting" processes.
+ ArrayList<Integer> pids = new ArrayList<Integer>(20);
+ pids.add(app.pid);
+
+ int parentPid = app.pid;
+ if (parent != null && parent.app != null && parent.app.pid > 0) parentPid = parent.app.pid;
+ if (parentPid != app.pid) pids.add(parentPid);
+
+ if (MY_PID != app.pid && MY_PID != parentPid) pids.add(MY_PID);
+
+ for (int i = mLruProcesses.size() - 1; i >= 0; i--) {
+ ProcessRecord r = mLruProcesses.get(i);
+ if (r != null && r.thread != null) {
+ int pid = r.pid;
+ if (pid > 0 && pid != app.pid && pid != parentPid && pid != MY_PID) pids.add(pid);
}
}
+ File tracesFile = dumpStackTraces(pids);
+
+ // Log the ANR to the main log.
StringBuilder info = mStringBuilder;
info.setLength(0);
- info.append("ANR in process: ");
- info.append(app.processName);
- if (reportedActivity != null && reportedActivity.app != null) {
- info.append(" (last in ");
- info.append(reportedActivity.app.processName);
- info.append(")");
+ info.append("ANR in ").append(app.processName);
+ if (activity != null && activity.shortComponentName != null) {
+ info.append(" (").append(activity.shortComponentName).append(")");
}
if (annotation != null) {
- info.append("\nAnnotation: ");
- info.append(annotation);
+ info.append("\nReason: ").append(annotation).append("\n");
}
- if (MONITOR_CPU_USAGE) {
- info.append("\nCPU usage:\n");
- info.append(processInfo);
+ if (parent != null && parent != activity) {
+ info.append("\nParent: ").append(parent.shortComponentName);
}
- Log.i(TAG, info.toString());
- // The application is not responding. Dump as many thread traces as we can.
- boolean fileDump = prepareTraceFile(true);
- if (!fileDump) {
- // Dumping traces to the log, just dump the process that isn't responding so
- // we don't overflow the log
- Process.sendSignal(app.pid, Process.SIGNAL_QUIT);
- } else {
- // Dumping traces to a file so dump all active processes we know about
- synchronized (this) {
- // First, these are the most important processes.
- final int[] imppids = new int[3];
- int i=0;
- imppids[0] = app.pid;
- i++;
- if (reportedActivity != null && reportedActivity.app != null
- && reportedActivity.app.thread != null
- && reportedActivity.app.pid != app.pid) {
- imppids[i] = reportedActivity.app.pid;
- i++;
- }
- imppids[i] = Process.myPid();
- for (i=0; i<imppids.length && imppids[i] != 0; i++) {
- Process.sendSignal(imppids[i], Process.SIGNAL_QUIT);
- synchronized (this) {
- try {
- wait(200);
- } catch (InterruptedException e) {
- }
- }
- }
- for (i = mLruProcesses.size() - 1 ; i >= 0 ; i--) {
- ProcessRecord r = mLruProcesses.get(i);
- boolean done = false;
- for (int j=0; j<imppids.length && imppids[j] != 0; j++) {
- if (imppids[j] == r.pid) {
- done = true;
- break;
- }
- }
- if (!done && r.thread != null) {
- Process.sendSignal(r.pid, Process.SIGNAL_QUIT);
- synchronized (this) {
- try {
- wait(200);
- } catch (InterruptedException e) {
- }
- }
- }
- }
- }
+ String cpuInfo = null;
+ if (MONITOR_CPU_USAGE) {
+ updateCpuStatsNow();
+ synchronized (mProcessStatsThread) { cpuInfo = mProcessStats.printCurrentState(); }
+ info.append(cpuInfo);
}
+ Log.e(TAG, info.toString());
+ if (tracesFile == null) {
+ // There is no trace file, so dump (only) the alleged culprit's threads to the log
+ Process.sendSignal(app.pid, Process.SIGNAL_QUIT);
+ }
+
+ addErrorToDropBox("anr", app, activity, parent, annotation, cpuInfo, tracesFile, null);
+
if (mController != null) {
try {
- int res = mController.appNotResponding(app.processName,
- app.pid, info.toString());
+ // 0 == show dialog, 1 = keep waiting, -1 = kill process immediately
+ int res = mController.appNotResponding(app.processName, app.pid, info.toString());
if (res != 0) {
- if (res < 0) {
- // wait until the SIGQUIT has had a chance to process before killing the
- // process.
- try {
- wait(2000);
- } catch (InterruptedException e) {
- }
-
- Process.killProcess(app.pid);
- return;
- }
+ if (res < 0 && app.pid != MY_PID) Process.killProcess(app.pid);
+ return;
}
} catch (RemoteException e) {
mController = null;
}
}
+ // Unless configured otherwise, swallow ANRs in background processes & kill the process.
+ boolean showBackground = Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.ANR_SHOW_BACKGROUND, 0) != 0;
+ if (!showBackground && !app.isInterestingToUserLocked() && app.pid != MY_PID) {
+ Process.killProcess(app.pid);
+ return;
+ }
+
+ // Set the app's notResponding state, and look up the errorReportReceiver
makeAppNotRespondingLocked(app,
activity != null ? activity.shortComponentName : null,
annotation != null ? "ANR " + annotation : "ANR",
info.toString());
+
+ // Bring up the infamous App Not Responding dialog
Message msg = Message.obtain();
HashMap map = new HashMap();
msg.what = SHOW_NOT_RESPONDING_MSG;
@@ -4705,53 +4702,6 @@
return;
}
- /**
- * If a stack trace file has been configured, prepare the filesystem
- * by creating the directory if it doesn't exist and optionally
- * removing the old trace file.
- *
- * @param removeExisting If set, the existing trace file will be removed.
- * @return Returns true if the trace file preparations succeeded
- */
- public static boolean prepareTraceFile(boolean removeExisting) {
- String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null);
- boolean fileReady = false;
- if (!TextUtils.isEmpty(tracesPath)) {
- File f = new File(tracesPath);
- if (!f.exists()) {
- // Ensure the enclosing directory exists
- File dir = f.getParentFile();
- if (!dir.exists()) {
- fileReady = dir.mkdirs();
- FileUtils.setPermissions(dir.getAbsolutePath(),
- FileUtils.S_IRWXU | FileUtils.S_IRWXG | FileUtils.S_IXOTH, -1, -1);
- } else if (dir.isDirectory()) {
- fileReady = true;
- }
- } else if (removeExisting) {
- // Remove the previous traces file, so we don't fill the disk.
- // The VM will recreate it
- Log.i(TAG, "Removing old ANR trace file from " + tracesPath);
- fileReady = f.delete();
- }
-
- if (removeExisting) {
- try {
- f.createNewFile();
- FileUtils.setPermissions(f.getAbsolutePath(),
- FileUtils.S_IRWXU | FileUtils.S_IRWXG
- | FileUtils.S_IWOTH | FileUtils.S_IROTH, -1, -1);
- fileReady = true;
- } catch (IOException e) {
- Log.w(TAG, "Unable to make ANR traces file", e);
- }
- }
- }
-
- return fileReady;
- }
-
-
private final void decPersistentCountLocked(ProcessRecord app)
{
app.persistentActivities--;
@@ -4852,7 +4802,7 @@
android.Manifest.permission.CLEAR_APP_USER_DATA,
pid, uid, -1)
== PackageManager.PERMISSION_GRANTED) {
- restartPackageLocked(packageName, pkgUid);
+ forceStopPackageLocked(packageName, pkgUid);
} else {
throw new SecurityException(pid+" does not have permission:"+
android.Manifest.permission.CLEAR_APP_USER_DATA+" to clear data" +
@@ -4877,13 +4827,15 @@
return true;
}
- public void restartPackage(final String packageName) {
- if (checkCallingPermission(android.Manifest.permission.RESTART_PACKAGES)
- != PackageManager.PERMISSION_GRANTED) {
- String msg = "Permission Denial: restartPackage() from pid="
+ public void killBackgroundProcesses(final String packageName) {
+ if (checkCallingPermission(android.Manifest.permission.KILL_BACKGROUND_PROCESSES)
+ != PackageManager.PERMISSION_GRANTED &&
+ checkCallingPermission(android.Manifest.permission.RESTART_PACKAGES)
+ != PackageManager.PERMISSION_GRANTED) {
+ String msg = "Permission Denial: killBackgroundProcesses() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
- + " requires " + android.Manifest.permission.RESTART_PACKAGES;
+ + " requires " + android.Manifest.permission.KILL_BACKGROUND_PROCESSES;
Log.w(TAG, msg);
throw new SecurityException(msg);
}
@@ -4901,7 +4853,39 @@
Log.w(TAG, "Invalid packageName: " + packageName);
return;
}
- restartPackageLocked(packageName, pkgUid);
+ killPackageProcessesLocked(packageName, pkgUid,
+ SECONDARY_SERVER_ADJ, false);
+ }
+ } finally {
+ Binder.restoreCallingIdentity(callingId);
+ }
+ }
+
+ public void forceStopPackage(final String packageName) {
+ if (checkCallingPermission(android.Manifest.permission.FORCE_STOP_PACKAGES)
+ != PackageManager.PERMISSION_GRANTED) {
+ String msg = "Permission Denial: forceStopPackage() from pid="
+ + Binder.getCallingPid()
+ + ", uid=" + Binder.getCallingUid()
+ + " requires " + android.Manifest.permission.FORCE_STOP_PACKAGES;
+ Log.w(TAG, msg);
+ throw new SecurityException(msg);
+ }
+
+ long callingId = Binder.clearCallingIdentity();
+ try {
+ IPackageManager pm = ActivityThread.getPackageManager();
+ int pkgUid = -1;
+ synchronized(this) {
+ try {
+ pkgUid = pm.getPackageUid(packageName);
+ } catch (RemoteException e) {
+ }
+ if (pkgUid == -1) {
+ Log.w(TAG, "Invalid packageName: " + packageName);
+ return;
+ }
+ forceStopPackageLocked(packageName, pkgUid);
}
} finally {
Binder.restoreCallingIdentity(callingId);
@@ -5011,8 +4995,8 @@
}
}
- private void restartPackageLocked(final String packageName, int uid) {
- uninstallPackageLocked(packageName, uid, false);
+ private void forceStopPackageLocked(final String packageName, int uid) {
+ forceStopPackageLocked(packageName, uid, false);
Intent intent = new Intent(Intent.ACTION_PACKAGE_RESTARTED,
Uri.fromParts("package", packageName, null));
intent.putExtra(Intent.EXTRA_UID, uid);
@@ -5021,13 +5005,41 @@
false, false, MY_PID, Process.SYSTEM_UID);
}
- private final void uninstallPackageLocked(String name, int uid,
- boolean callerWillRestart) {
- if (Config.LOGD) Log.d(TAG, "Uninstalling process " + name);
+ private final void killPackageProcessesLocked(String packageName, int uid,
+ int minOomAdj, boolean callerWillRestart) {
+ ArrayList<ProcessRecord> procs = new ArrayList<ProcessRecord>();
+ // Remove all processes this package may have touched: all with the
+ // same UID (except for the system or root user), and all whose name
+ // matches the package name.
+ final String procNamePrefix = packageName + ":";
+ for (SparseArray<ProcessRecord> apps : mProcessNames.getMap().values()) {
+ final int NA = apps.size();
+ for (int ia=0; ia<NA; ia++) {
+ ProcessRecord app = apps.valueAt(ia);
+ if (app.removed) {
+ procs.add(app);
+ } else if ((uid > 0 && uid != Process.SYSTEM_UID && app.info.uid == uid)
+ || app.processName.equals(packageName)
+ || app.processName.startsWith(procNamePrefix)) {
+ if (app.setAdj >= minOomAdj) {
+ app.removed = true;
+ procs.add(app);
+ }
+ }
+ }
+ }
+
+ int N = procs.size();
+ for (int i=0; i<N; i++) {
+ removeProcessLocked(procs.get(i), callerWillRestart);
+ }
+ }
+
+ private final void forceStopPackageLocked(String name, int uid,
+ boolean callerWillRestart) {
int i, N;
- final String procNamePrefix = name + ":";
if (uid < 0) {
try {
uid = ActivityThread.getPackageManager().getPackageUid(name);
@@ -5035,6 +5047,8 @@
}
}
+ Log.i(TAG, "Force stopping package " + name + " uid=" + uid);
+
Iterator<SparseArray<Long>> badApps = mProcessCrashTimes.getMap().values().iterator();
while (badApps.hasNext()) {
SparseArray<Long> ba = badApps.next();
@@ -5043,37 +5057,12 @@
}
}
- ArrayList<ProcessRecord> procs = new ArrayList<ProcessRecord>();
-
- // Remove all processes this package may have touched: all with the
- // same UID (except for the system or root user), and all whose name
- // matches the package name.
- for (SparseArray<ProcessRecord> apps : mProcessNames.getMap().values()) {
- final int NA = apps.size();
- for (int ia=0; ia<NA; ia++) {
- ProcessRecord app = apps.valueAt(ia);
- if (app.removed) {
- procs.add(app);
- } else if ((uid > 0 && uid != Process.SYSTEM_UID && app.info.uid == uid)
- || app.processName.equals(name)
- || app.processName.startsWith(procNamePrefix)) {
- app.removed = true;
- procs.add(app);
- }
- }
- }
-
- N = procs.size();
- for (i=0; i<N; i++) {
- removeProcessLocked(procs.get(i), callerWillRestart);
- }
+ killPackageProcessesLocked(name, uid, -100, callerWillRestart);
for (i=mHistory.size()-1; i>=0; i--) {
HistoryRecord r = (HistoryRecord)mHistory.get(i);
if (r.packageName.equals(name)) {
- if (Config.LOGD) Log.d(
- TAG, " Force finishing activity "
- + r.intent.getComponent().flattenToShortString());
+ Log.i(TAG, " Force finishing activity " + r);
if (r.app != null) {
r.app.removed = true;
}
@@ -5085,6 +5074,7 @@
ArrayList<ServiceRecord> services = new ArrayList<ServiceRecord>();
for (ServiceRecord service : mServices.values()) {
if (service.packageName.equals(name)) {
+ Log.i(TAG, " Force stopping service " + service);
if (service.app != null) {
service.app.removed = true;
}
@@ -5104,7 +5094,7 @@
private final boolean removeProcessLocked(ProcessRecord app, boolean callerWillRestart) {
final String name = app.processName;
final int uid = app.info.uid;
- if (Config.LOGD) Log.d(
+ if (DEBUG_PROCESSES) Log.d(
TAG, "Force removing process " + app + " (" + name
+ "/" + uid + ")");
@@ -7861,7 +7851,7 @@
synchronized(this) {
int count = mHistory.size();
- if (Config.LOGD) Log.d(
+ if (DEBUG_SWITCH) Log.d(
TAG, "Performing unhandledBack(): stack size = " + count);
if (count > 1) {
final long origId = Binder.clearCallingIdentity();
@@ -8062,7 +8052,7 @@
mDebugTransient = !persistent;
if (packageName != null) {
final long origId = Binder.clearCallingIdentity();
- uninstallPackageLocked(packageName, -1, false);
+ forceStopPackageLocked(packageName, -1, false);
Binder.restoreCallingIdentity(origId);
}
}
@@ -8540,9 +8530,9 @@
}
private ComponentName getErrorReportReceiver(ProcessRecord app) {
- // check if error reporting is enabled in Gservices
- int enabled = Settings.Gservices.getInt(mContext.getContentResolver(),
- Settings.Gservices.SEND_ACTION_APP_ERROR, 0);
+ // check if error reporting is enabled in secure settings
+ int enabled = Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.SEND_ACTION_APP_ERROR, 0);
if (enabled == 0) {
return null;
}
@@ -8645,8 +8635,7 @@
return report;
}
- void killAppAtUsersRequest(ProcessRecord app, Dialog fromDialog,
- boolean crashed) {
+ void killAppAtUsersRequest(ProcessRecord app, Dialog fromDialog) {
synchronized (this) {
app.crashing = false;
app.crashingReport = null;
@@ -8659,18 +8648,15 @@
app.waitDialog = null;
}
if (app.pid > 0 && app.pid != MY_PID) {
- if (crashed) {
- handleAppCrashLocked(app);
- }
+ handleAppCrashLocked(app);
Log.i(ActivityManagerService.TAG, "Killing process "
+ app.processName
+ " (pid=" + app.pid + ") at user's request");
Process.killProcess(app.pid);
}
-
}
}
-
+
private boolean handleAppCrashLocked(ProcessRecord app) {
long now = SystemClock.uptimeMillis();
@@ -8686,8 +8672,7 @@
for (int i=mHistory.size()-1; i>=0; i--) {
HistoryRecord r = (HistoryRecord)mHistory.get(i);
if (r.app == app) {
- if (Config.LOGD) Log.d(
- TAG, " Force finishing activity "
+ Log.w(TAG, " Force finishing activity "
+ r.intent.getComponent().flattenToShortString());
finishActivityLocked(r, i, Activity.RESULT_CANCELED, null, "crashed");
}
@@ -8770,7 +8755,7 @@
crashInfo.throwFileName,
crashInfo.throwLineNumber);
- addExceptionToDropBox("crash", r, null, crashInfo);
+ addErrorToDropBox("crash", r, null, null, null, null, null, crashInfo);
crashApplication(r, crashInfo);
}
@@ -8790,10 +8775,10 @@
app == null ? "system" : (r == null ? "unknown" : r.processName),
tag, crashInfo.exceptionMessage);
- addExceptionToDropBox("wtf", r, tag, crashInfo);
+ addErrorToDropBox("wtf", r, null, null, tag, null, null, crashInfo);
- if (Settings.Gservices.getInt(mContext.getContentResolver(),
- Settings.Gservices.WTF_IS_FATAL, 0) != 0) {
+ if (Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.WTF_IS_FATAL, 0) != 0) {
crashApplication(r, crashInfo);
return true;
} else {
@@ -8827,18 +8812,24 @@
}
/**
- * Write a description of an exception (from a crash or WTF report) to the drop box.
+ * Write a description of an error (crash, WTF, ANR) to the drop box.
* @param eventType to include in the drop box tag ("crash", "wtf", etc.)
- * @param r the process which crashed, null for the system server
- * @param tag supplied by the application (in the case of WTF), or null
- * @param crashInfo describing the exception
+ * @param process which caused the error, null means the system server
+ * @param activity which triggered the error, null if unknown
+ * @param parent activity related to the error, null if unknown
+ * @param subject line related to the error, null if absent
+ * @param report in long form describing the error, null if absent
+ * @param logFile to include in the report, null if none
+ * @param crashInfo giving an application stack trace, null if absent
*/
- private void addExceptionToDropBox(String eventType, ProcessRecord r, String tag,
+ private void addErrorToDropBox(String eventType,
+ ProcessRecord process, HistoryRecord activity, HistoryRecord parent,
+ String subject, String report, File logFile,
ApplicationErrorReport.CrashInfo crashInfo) {
- String dropboxTag, processName;
- if (r == null) {
+ String dropboxTag;
+ if (process == null || process.pid == MY_PID) {
dropboxTag = "system_server_" + eventType;
- } else if ((r.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
+ } else if ((process.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
dropboxTag = "system_app_" + eventType;
} else {
dropboxTag = "data_app_" + eventType;
@@ -8847,20 +8838,37 @@
DropBoxManager dbox = (DropBoxManager) mContext.getSystemService(Context.DROPBOX_SERVICE);
if (dbox != null && dbox.isTagEnabled(dropboxTag)) {
StringBuilder sb = new StringBuilder(1024);
- sb.append("Build: ").append(Build.FINGERPRINT).append("\n");
- if (r == null) {
+ if (process == null || process.pid == MY_PID) {
sb.append("Process: system_server\n");
} else {
- sb.append("Package: ").append(r.info.packageName).append("\n");
- if (!r.processName.equals(r.info.packageName)) {
- sb.append("Process: ").append(r.processName).append("\n");
+ sb.append("Process: ").append(process.processName).append("\n");
+ }
+ if (activity != null) {
+ sb.append("Activity: ").append(activity.shortComponentName).append("\n");
+ }
+ if (parent != null && parent.app != null && parent.app.pid != process.pid) {
+ sb.append("Parent-Process: ").append(parent.app.processName).append("\n");
+ }
+ if (parent != null && parent != activity) {
+ sb.append("Parent-Activity: ").append(parent.shortComponentName).append("\n");
+ }
+ if (subject != null) {
+ sb.append("Subject: ").append(subject).append("\n");
+ }
+ sb.append("Build: ").append(Build.FINGERPRINT).append("\n");
+ sb.append("\n");
+ if (report != null) {
+ sb.append(report);
+ }
+ if (logFile != null) {
+ try {
+ sb.append(FileUtils.readTextFile(logFile, 128 * 1024, "\n\n[[TRUNCATED]]"));
+ } catch (IOException e) {
+ Log.e(TAG, "Error reading " + logFile, e);
}
}
- if (tag != null) {
- sb.append("Tag: ").append(tag).append("\n");
- }
if (crashInfo != null && crashInfo.stackTrace != null) {
- sb.append("\n").append(crashInfo.stackTrace);
+ sb.append(crashInfo.stackTrace);
}
dbox.addText(dropboxTag, sb.toString());
}
@@ -8886,14 +8894,6 @@
AppErrorResult result = new AppErrorResult();
synchronized (this) {
- if (r != null) {
- // The application has crashed. Send the SIGQUIT to the process so
- // that it can dump its state.
- Process.sendSignal(r.pid, Process.SIGNAL_QUIT);
- //Log.i(TAG, "Current system threads:");
- //Process.sendSignal(MY_PID, Process.SIGNAL_QUIT);
- }
-
if (mController != null) {
try {
String name = r != null ? r.processName : null;
@@ -10282,7 +10282,7 @@
if (r.startRequested) {
info.flags |= ActivityManager.RunningServiceInfo.FLAG_STARTED;
}
- if (r.app != null && r.app.pid == Process.myPid()) {
+ if (r.app != null && r.app.pid == MY_PID) {
info.flags |= ActivityManager.RunningServiceInfo.FLAG_SYSTEM_PROCESS;
}
if (r.app != null && r.app.persistent) {
@@ -11585,7 +11585,7 @@
}
if (timeout != null && mLruProcesses.contains(proc)) {
Log.w(TAG, "Timeout executing service: " + timeout);
- appNotRespondingLocked(proc, null, null, "Executing service " + timeout.name);
+ appNotRespondingLocked(proc, null, null, "Executing service " + timeout.shortName);
} else {
Message msg = mHandler.obtainMessage(SERVICE_TIMEOUT_MSG);
msg.obj = proc;
@@ -11922,7 +11922,7 @@
String ssp;
if (data != null && (ssp=data.getSchemeSpecificPart()) != null) {
if (!intent.getBooleanExtra(Intent.EXTRA_DONT_KILL_APP, false)) {
- uninstallPackageLocked(ssp,
+ forceStopPackageLocked(ssp,
intent.getIntExtra(Intent.EXTRA_UID, -1), false);
AttributeCache ac = AttributeCache.instance();
if (ac != null) {
@@ -12890,7 +12890,7 @@
}
final long origId = Binder.clearCallingIdentity();
- uninstallPackageLocked(ii.targetPackage, -1, true);
+ forceStopPackageLocked(ii.targetPackage, -1, true);
ProcessRecord app = addAppLocked(ai);
app.instrumentationClass = className;
app.instrumentationInfo = ai;
@@ -12945,7 +12945,7 @@
app.instrumentationProfileFile = null;
app.instrumentationArguments = null;
- uninstallPackageLocked(app.processName, -1, false);
+ forceStopPackageLocked(app.processName, -1, false);
}
public void finishInstrumentation(IApplicationThread target,
diff --git a/services/java/com/android/server/am/AppNotRespondingDialog.java b/services/java/com/android/server/am/AppNotRespondingDialog.java
index 1851853..17f3467 100644
--- a/services/java/com/android/server/am/AppNotRespondingDialog.java
+++ b/services/java/com/android/server/am/AppNotRespondingDialog.java
@@ -104,8 +104,7 @@
switch (msg.what) {
case FORCE_CLOSE:
// Kill the application.
- mService.killAppAtUsersRequest(mProc,
- AppNotRespondingDialog.this, true);
+ mService.killAppAtUsersRequest(mProc, AppNotRespondingDialog.this);
break;
case WAIT_AND_REPORT:
case WAIT:
diff --git a/services/java/com/android/server/am/AppWaitingForDebuggerDialog.java b/services/java/com/android/server/am/AppWaitingForDebuggerDialog.java
index 0992d4d..8e9818d 100644
--- a/services/java/com/android/server/am/AppWaitingForDebuggerDialog.java
+++ b/services/java/com/android/server/am/AppWaitingForDebuggerDialog.java
@@ -62,8 +62,7 @@
switch (msg.what) {
case 1:
// Kill the application.
- mService.killAppAtUsersRequest(mProc,
- AppWaitingForDebuggerDialog.this, true);
+ mService.killAppAtUsersRequest(mProc, AppWaitingForDebuggerDialog.this);
break;
}
}
diff --git a/services/java/com/android/server/status/StatusBarIcon.java b/services/java/com/android/server/status/StatusBarIcon.java
index 857784b..b20d3f6 100644
--- a/services/java/com/android/server/status/StatusBarIcon.java
+++ b/services/java/com/android/server/status/StatusBarIcon.java
@@ -4,7 +4,6 @@
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Typeface;
-import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.util.Log;
@@ -12,7 +11,6 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -41,7 +39,7 @@
mTextView = t;
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
- LinearLayout.LayoutParams.FILL_PARENT);
+ LinearLayout.LayoutParams.MATCH_PARENT);
t.setTextSize(16);
t.setTextColor(0xff000000);
t.setTypeface(Typeface.DEFAULT_BOLD);
diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java
index a103dcb..2d0f254 100644
--- a/services/java/com/android/server/status/StatusBarService.java
+++ b/services/java/com/android/server/status/StatusBarService.java
@@ -329,7 +329,7 @@
public void systemReady() {
final StatusBarView view = mStatusBarView;
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
view.getContext().getResources().getDimensionPixelSize(
com.android.internal.R.dimen.status_bar_height),
WindowManager.LayoutParams.TYPE_STATUS_BAR,
@@ -1486,8 +1486,8 @@
}
lp = new WindowManager.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL,
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
@@ -1496,6 +1496,7 @@
// lp.token = mStatusBarView.getWindowToken();
lp.gravity = Gravity.TOP | Gravity.FILL_HORIZONTAL;
lp.setTitle("TrackingView");
+ lp.y = mTrackingPosition;
mTrackingParams = lp;
WindowManagerImpl.getDefault().addView(mTrackingView, lp);
@@ -1520,7 +1521,7 @@
final int disph = mDisplay.getHeight();
lp = mExpandedDialog.getWindow().getAttributes();
- lp.width = ViewGroup.LayoutParams.FILL_PARENT;
+ lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
lp.x = 0;
mTrackingPosition = lp.y = -disph; // sufficiently large negative
@@ -1539,7 +1540,7 @@
mExpandedDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
mExpandedDialog.setContentView(mExpandedView,
- new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
+ new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
mExpandedDialog.show();
FrameLayout hack = (FrameLayout)mExpandedView.getParent();
@@ -1575,8 +1576,11 @@
// Maybe the view was resized.
if (!mExpandedVisible) {
if (mTrackingView != null) {
- mTrackingPosition = mTrackingParams.y = -disph;
- WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams);
+ mTrackingPosition = -disph;
+ if (mTrackingParams != null) {
+ mTrackingParams.y = mTrackingPosition;
+ WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams);
+ }
}
if (mExpandedParams != null) {
mExpandedParams.y = -disph;
@@ -1672,7 +1676,10 @@
// act accordingly
if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
- animateCollapse();
+ Log.d(TAG, "DISABLE_EXPAND: yes");
+ mAnimating = false;
+ updateExpandedViewPos(0);
+ performCollapse();
}
}
if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
diff --git a/services/jni/com_android_server_SensorService.cpp b/services/jni/com_android_server_SensorService.cpp
index 3911d1f..77db6da 100644
--- a/services/jni/com_android_server_SensorService.cpp
+++ b/services/jni/com_android_server_SensorService.cpp
@@ -16,7 +16,6 @@
#define LOG_TAG "SensorService"
-#define LOG_NDEBUG 0
#include "utils/Log.h"
#include <hardware/sensors.h>
diff --git a/telephony/java/com/android/internal/telephony/Call.java b/telephony/java/com/android/internal/telephony/Call.java
index b95dd11..4967ab8 100644
--- a/telephony/java/com/android/internal/telephony/Call.java
+++ b/telephony/java/com/android/internal/telephony/Call.java
@@ -18,6 +18,8 @@
import java.util.List;
+import android.util.Log;
+
/**
* {@hide}
*/
@@ -54,6 +56,8 @@
// merged, etc.
protected boolean isGeneric = false;
+ protected final String LOG_TAG = "Call";
+
/* Instance Methods */
/** Do not modify the List result!!! This list is not yours to keep
@@ -235,4 +239,17 @@
public void setGeneric(boolean generic) {
isGeneric = generic;
}
+
+ /**
+ * Hangup call if it is alive
+ */
+ public void hangupIfAlive() {
+ if (getState().isAlive()) {
+ try {
+ hangup();
+ } catch (CallStateException ex) {
+ Log.w(LOG_TAG, " hangupIfActive: caught " + ex);
+ }
+ }
+ }
}
diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java
index 01b1746..cf89848 100644
--- a/telephony/java/com/android/internal/telephony/CallerInfo.java
+++ b/telephony/java/com/android/internal/telephony/CallerInfo.java
@@ -22,6 +22,7 @@
import android.net.Uri;
import android.provider.ContactsContract.PhoneLookup;
import android.provider.ContactsContract.CommonDataKinds.Phone;
+import static android.provider.ContactsContract.RawContacts;
import android.text.TextUtils;
import android.telephony.TelephonyManager;
import android.telephony.PhoneNumberUtils;
@@ -118,7 +119,6 @@
* number. The returned CallerInfo is null if no number is supplied.
*/
public static CallerInfo getCallerInfo(Context context, Uri contactRef, Cursor cursor) {
-
CallerInfo info = new CallerInfo();
info.photoResource = 0;
info.phoneLabel = null;
@@ -132,6 +132,9 @@
if (cursor != null) {
if (cursor.moveToFirst()) {
+ // TODO: photo_id is always available but not taken
+ // care of here. Maybe we should store it in the
+ // CallerInfo object as well.
int columnIndex;
@@ -160,10 +163,34 @@
}
}
- // Look for the person ID
- columnIndex = cursor.getColumnIndex(PhoneLookup._ID);
+ // Look for the person ID.
+
+ // TODO: This is pretty ugly now, see bug 2269240 for
+ // more details. With tel: URI the contact id is in
+ // col "_id" while when we use a
+ // content://contacts/data/phones URI, the contact id
+ // is col "contact_id". As a work around we use the
+ // type of the contact url to figure out which column
+ // we should look at to get the contact_id.
+
+ final String mimeType = context.getContentResolver().getType(contactRef);
+
+ columnIndex = -1;
+ if (Phone.CONTENT_ITEM_TYPE.equals(mimeType)) {
+ // content://com.android.contacts/data/phones URL
+ columnIndex = cursor.getColumnIndex(RawContacts.CONTACT_ID);
+ } else {
+ // content://com.android.contacts/phone_lookup URL
+ // TODO: mime type is null here so we cannot test
+ // if we have the right url type. phone_lookup URL
+ // should resolve to a mime type.
+ columnIndex = cursor.getColumnIndex(PhoneLookup._ID);
+ }
+
if (columnIndex != -1) {
info.person_id = cursor.getLong(columnIndex);
+ } else {
+ Log.e(TAG, "Column missing for " + contactRef);
}
// look for the custom ringtone, create from the string stored
diff --git a/telephony/java/com/android/internal/telephony/DataConnection.java b/telephony/java/com/android/internal/telephony/DataConnection.java
index 99d5520..a01bc09 100644
--- a/telephony/java/com/android/internal/telephony/DataConnection.java
+++ b/telephony/java/com/android/internal/telephony/DataConnection.java
@@ -274,7 +274,7 @@
clearSettings();
- setDbg(true);
+ setDbg(false);
addState(mDefaultState);
addState(mInactiveState, mDefaultState);
addState(mActivatingState, mDefaultState);
@@ -389,31 +389,39 @@
}
result = SetupResult.ERR_Stale;
} else {
- cid = Integer.parseInt(response[0]);
- if (response.length > 2) {
+// log("onSetupConnectionCompleted received " + response.length + " response strings:");
+// for (int i = 0; i < response.length; i++) {
+// log(" response[" + i + "]='" + response[i] + "'");
+// }
+ if (response.length >= 2) {
+ cid = Integer.parseInt(response[0]);
interfaceName = response[1];
- ipAddress = response[2];
- String prefix = "net." + interfaceName + ".";
- gatewayAddress = SystemProperties.get(prefix + "gw");
- dnsServers[0] = SystemProperties.get(prefix + "dns1");
- dnsServers[1] = SystemProperties.get(prefix + "dns2");
- if (DBG) {
- log("interface=" + interfaceName + " ipAddress=" + ipAddress
- + " gateway=" + gatewayAddress + " DNS1=" + dnsServers[0]
- + " DNS2=" + dnsServers[1]);
- }
+ if (response.length > 2) {
+ ipAddress = response[2];
+ String prefix = "net." + interfaceName + ".";
+ gatewayAddress = SystemProperties.get(prefix + "gw");
+ dnsServers[0] = SystemProperties.get(prefix + "dns1");
+ dnsServers[1] = SystemProperties.get(prefix + "dns2");
+ if (DBG) {
+ log("interface=" + interfaceName + " ipAddress=" + ipAddress
+ + " gateway=" + gatewayAddress + " DNS1=" + dnsServers[0]
+ + " DNS2=" + dnsServers[1]);
+ }
- if (isDnsOk(dnsServers)) {
- result = SetupResult.SUCCESS;
+ if (isDnsOk(dnsServers)) {
+ result = SetupResult.SUCCESS;
+ } else {
+ result = SetupResult.ERR_BadDns;
+ }
} else {
- result = SetupResult.ERR_BadDns;
+ result = SetupResult.SUCCESS;
}
} else {
result = SetupResult.ERR_Other;
}
}
- if (DBG) log("DataConnection setup result=" + result + " on cid = " + cid);
+ if (DBG) log("DataConnection setup result='" + result + "' on cid=" + cid);
return result;
}
diff --git a/telephony/java/com/android/internal/telephony/SMSDispatcher.java b/telephony/java/com/android/internal/telephony/SMSDispatcher.java
index 53c0bef..4a4282fc 100644
--- a/telephony/java/com/android/internal/telephony/SMSDispatcher.java
+++ b/telephony/java/com/android/internal/telephony/SMSDispatcher.java
@@ -224,11 +224,11 @@
createWakelock();
- int check_period = Settings.Gservices.getInt(mResolver,
- Settings.Gservices.SMS_OUTGOING_CHECK_INTERVAL_MS,
+ int check_period = Settings.Secure.getInt(mResolver,
+ Settings.Secure.SMS_OUTGOING_CHECK_INTERVAL_MS,
DEFAULT_SMS_CHECK_PERIOD);
- int max_count = Settings.Gservices.getInt(mResolver,
- Settings.Gservices.SMS_OUTGOING_CEHCK_MAX_COUNT,
+ int max_count = Settings.Secure.getInt(mResolver,
+ Settings.Secure.SMS_OUTGOING_CHECK_MAX_COUNT,
DEFAULT_SMS_MAX_COUNT);
mCounter = new SmsCounter(max_count, check_period);
diff --git a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
index 6892998..7383649 100644
--- a/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/ServiceStateTracker.java
@@ -271,6 +271,13 @@
protected abstract void updateSpnDisplay();
protected abstract void setPowerStateToDesired();
+ /**
+ * Clean up existing voice and data connection then turn off radio power.
+ *
+ * Hang up the existing voice calls to decrease call drop rate.
+ */
+ protected abstract void powerOffRadioSafely();
+
/** Cancel a pending (if any) pollState() operation */
protected void cancelPollState() {
// This will effectively cancel the rest of the poll requests.
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index ecd3380..979b8ba 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -822,11 +822,9 @@
mRetryMgr.resetRetryCount();
CdmaCellLocation loc = (CdmaCellLocation)(phone.getCellLocation());
- int bsid = (loc != null) ? loc.getBaseStationId() : -1;
-
- EventLog.List val = new EventLog.List(bsid,
+ EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CDMA_DATA_SETUP_FAILED,
+ loc != null ? loc.getBaseStationId() : -1,
TelephonyManager.getDefault().getNetworkType());
- EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CDMA_DATA_SETUP_FAILED, val);
}
trySetupData(Phone.REASON_CDMA_DATA_DETACHED);
}
@@ -865,10 +863,9 @@
private void writeEventLogCdmaDataDrop() {
CdmaCellLocation loc = (CdmaCellLocation)(phone.getCellLocation());
- int bsid = (loc != null) ? loc.getBaseStationId() : -1;
- EventLog.List val = new EventLog.List(bsid,
+ EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CDMA_DATA_DROP,
+ loc != null ? loc.getBaseStationId() : -1,
TelephonyManager.getDefault().getNetworkType());
- EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CDMA_DATA_DROP, val);
}
protected void onDataStateChanged(AsyncResult ar) {
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
index 8698b38..42feaa9 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
@@ -514,7 +514,7 @@
synchronized(this) {
if (mPendingRadioPowerOffAfterDataOff) {
if (DBG) log("EVENT_SET_RADIO_OFF, turn radio off now.");
- cm.setRadioPower(false, null);
+ hangupAndPowerOff();
mPendingRadioPowerOffAfterDataOff = false;
}
}
@@ -537,38 +537,46 @@
} else if (!mDesiredPowerState && cm.getRadioState().isOn()) {
DataConnectionTracker dcTracker = phone.mDataConnection;
if (! dcTracker.isDataConnectionAsDesired()) {
-
- EventLog.List val = new EventLog.List(
+ EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_DATA_STATE_RADIO_OFF,
dcTracker.getStateInString(),
- (dcTracker.getAnyDataEnabled() ? 1 : 0) );
- EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_DATA_STATE_RADIO_OFF, val);
+ dcTracker.getAnyDataEnabled() ? 1 : 0);
}
- Message msg = dcTracker.obtainMessage(DataConnectionTracker.EVENT_CLEAN_UP_CONNECTION);
- msg.arg1 = 1; // tearDown is true
- msg.obj = CDMAPhone.REASON_RADIO_TURNED_OFF;
- dcTracker.sendMessage(msg);
- synchronized(this) {
- if (!mPendingRadioPowerOffAfterDataOff) {
- DataConnectionTracker.State currentState = dcTracker.getState();
- if (currentState != DataConnectionTracker.State.CONNECTED
- && currentState != DataConnectionTracker.State.DISCONNECTING
- && currentState != DataConnectionTracker.State.INITING) {
- if (DBG) log("Data disconnected, turn off radio right away.");
- cm.setRadioPower(false, null);
+ // If it's on and available and we want it off gracefully
+ powerOffRadioSafely();
+ } // Otherwise, we're in the desired state
+ }
+
+ @Override
+ protected void powerOffRadioSafely(){
+ // clean data connection
+ DataConnectionTracker dcTracker = phone.mDataConnection;
+
+ Message msg = dcTracker.obtainMessage(DataConnectionTracker.EVENT_CLEAN_UP_CONNECTION);
+ msg.arg1 = 1; // tearDown is true
+ msg.obj = CDMAPhone.REASON_RADIO_TURNED_OFF;
+ dcTracker.sendMessage(msg);
+
+ synchronized(this) {
+ if (!mPendingRadioPowerOffAfterDataOff) {
+ DataConnectionTracker.State currentState = dcTracker.getState();
+ if (currentState != DataConnectionTracker.State.CONNECTED
+ && currentState != DataConnectionTracker.State.DISCONNECTING
+ && currentState != DataConnectionTracker.State.INITING) {
+ if (DBG) log("Data disconnected, turn off radio right away.");
+ hangupAndPowerOff();
+ }
+ else if (sendEmptyMessageDelayed(EVENT_SET_RADIO_POWER_OFF, 30000)) {
+ if (DBG) {
+ log("Wait up to 30 sec for data to disconnect, then turn off radio.");
}
- else if (sendEmptyMessageDelayed(EVENT_SET_RADIO_POWER_OFF, 30000)) {
- if (DBG) {
- log("Wait up to 30 sec for data to disconnect, then turn off radio.");
- }
- mPendingRadioPowerOffAfterDataOff = true;
- } else {
- Log.w(LOG_TAG, "Cannot send delayed Msg, turn off radio right away.");
- cm.setRadioPower(false, null);
- }
+ mPendingRadioPowerOffAfterDataOff = true;
+ } else {
+ Log.w(LOG_TAG, "Cannot send delayed Msg, turn off radio right away.");
+ hangupAndPowerOff();
}
}
- } // Otherwise, we're in the desired state
+ }
}
@Override
@@ -1465,10 +1473,10 @@
*/
long gained = c.getTimeInMillis() - System.currentTimeMillis();
long timeSinceLastUpdate = SystemClock.elapsedRealtime() - mSavedAtTime;
- int nitzUpdateSpacing = Settings.Gservices.getInt(cr,
- Settings.Gservices.NITZ_UPDATE_SPACING, mNitzUpdateSpacing);
- int nitzUpdateDiff = Settings.Gservices.getInt(cr,
- Settings.Gservices.NITZ_UPDATE_DIFF, mNitzUpdateDiff);
+ int nitzUpdateSpacing = Settings.Secure.getInt(cr,
+ Settings.Secure.NITZ_UPDATE_SPACING, mNitzUpdateSpacing);
+ int nitzUpdateDiff = Settings.Secure.getInt(cr,
+ Settings.Secure.NITZ_UPDATE_DIFF, mNitzUpdateDiff);
if ((mSavedAtTime == 0) || (timeSinceLastUpdate > nitzUpdateSpacing)
|| (Math.abs(gained) > nitzUpdateDiff)) {
@@ -1646,11 +1654,19 @@
if (mPendingRadioPowerOffAfterDataOff) {
if (DBG) log("Process pending request to turn radio off.");
removeMessages(EVENT_SET_RADIO_POWER_OFF);
- cm.setRadioPower(false, null);
+ hangupAndPowerOff();
mPendingRadioPowerOffAfterDataOff = false;
return true;
}
return false;
}
}
+
+ private void hangupAndPowerOff() {
+ // hang up all active voice calls
+ phone.mCT.ringingCall.hangupIfAlive();
+ phone.mCT.backgroundCall.hangupIfAlive();
+ phone.mCT.foregroundCall.hangupIfAlive();
+ cm.setRadioPower(false, null);
+ }
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
index 91c089e..f4b9931 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmCallTracker.java
@@ -868,13 +868,10 @@
causeCode == CallFailCause.QOS_NOT_AVAIL ||
causeCode == CallFailCause.BEARER_NOT_AVAIL ||
causeCode == CallFailCause.ERROR_UNSPECIFIED) {
- int cid = -1;
GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
- if (loc != null) cid = loc.getCid();
-
- EventLog.List val = new EventLog.List(causeCode, cid,
- TelephonyManager.getDefault().getNetworkType());
- EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CALL_DROP, val);
+ EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CALL_DROP,
+ causeCode, loc != null ? loc.getCid() : -1,
+ TelephonyManager.getDefault().getNetworkType());
}
for (int i = 0, s = droppedDuringPoll.size()
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 5c97925..6695ccb 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -710,12 +710,10 @@
Log.i(LOG_TAG, "PDP connection has dropped. Reconnecting");
// Add an event log when the network drops PDP
- int cid = -1;
GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
- if (loc != null) cid = loc.getCid();
- EventLog.List val = new EventLog.List(cid,
+ EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_PDP_NETWORK_DROP,
+ loc != null ? loc.getCid() : -1,
TelephonyManager.getDefault().getNetworkType());
- EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_PDP_NETWORK_DROP, val);
cleanUpConnection(true, null);
return;
@@ -733,12 +731,10 @@
+ " Reconnecting");
// Log the network drop on the event log.
- int cid = -1;
GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
- if (loc != null) cid = loc.getCid();
- EventLog.List val = new EventLog.List(cid,
+ EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_PDP_NETWORK_DROP,
+ loc != null ? loc.getCid() : -1,
TelephonyManager.getDefault().getNetworkType());
- EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_PDP_NETWORK_DROP, val);
cleanUpConnection(true, null);
}
@@ -777,8 +773,8 @@
private void doRecovery() {
if (state == State.CONNECTED) {
- int maxPdpReset = Settings.Gservices.getInt(mResolver,
- Settings.Gservices.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT,
+ int maxPdpReset = Settings.Secure.getInt(mResolver,
+ Settings.Secure.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT,
DEFAULT_MAX_PDP_RESET_FAIL);
if (mPdpResetCount < maxPdpReset) {
mPdpResetCount++;
@@ -812,7 +808,7 @@
protected void restartRadio() {
Log.d(LOG_TAG, "************TURN OFF RADIO**************");
cleanUpConnection(true, Phone.REASON_RADIO_TURNED_OFF);
- phone.mCM.setRadioPower(false, null);
+ mGsmPhone.mSST.powerOffRadioSafely();
/* Note: no need to call setRadioPower(true). Assuming the desired
* radio power state is still ON (as tracked by ServiceStateTracker),
* ServiceStateTracker will call setRadioPower when it receives the
@@ -879,8 +875,8 @@
}
}
- int watchdogTrigger = Settings.Gservices.getInt(mResolver,
- Settings.Gservices.PDP_WATCHDOG_TRIGGER_PACKET_COUNT,
+ int watchdogTrigger = Settings.Secure.getInt(mResolver,
+ Settings.Secure.PDP_WATCHDOG_TRIGGER_PACKET_COUNT,
NUMBER_SENT_PACKETS_OF_HANG);
if (sentSinceLastRecv >= watchdogTrigger) {
@@ -890,8 +886,8 @@
sentSinceLastRecv);
}
- int noRecvPollLimit = Settings.Gservices.getInt(mResolver,
- Settings.Gservices.PDP_WATCHDOG_ERROR_POLL_COUNT, NO_RECV_POLL_LIMIT);
+ int noRecvPollLimit = Settings.Secure.getInt(mResolver,
+ Settings.Secure.PDP_WATCHDOG_ERROR_POLL_COUNT, NO_RECV_POLL_LIMIT);
if (mNoRecvPollCount < noRecvPollLimit) {
// It's possible the PDP context went down and we weren't notified.
@@ -902,8 +898,8 @@
mNoRecvPollCount++;
// Slow down the poll interval to let things happen
- netStatPollPeriod = Settings.Gservices.getInt(mResolver,
- Settings.Gservices.PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS,
+ netStatPollPeriod = Settings.Secure.getInt(mResolver,
+ Settings.Secure.PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS,
POLL_NETSTAT_SLOW_MILLIS);
} else {
if (DBG) log("Sent " + String.valueOf(sentSinceLastRecv) +
@@ -922,11 +918,11 @@
} else {
mNoRecvPollCount = 0;
if (mIsScreenOn) {
- netStatPollPeriod = Settings.Gservices.getInt(mResolver,
- Settings.Gservices.PDP_WATCHDOG_POLL_INTERVAL_MS, POLL_NETSTAT_MILLIS);
+ netStatPollPeriod = Settings.Secure.getInt(mResolver,
+ Settings.Secure.PDP_WATCHDOG_POLL_INTERVAL_MS, POLL_NETSTAT_MILLIS);
} else {
- netStatPollPeriod = Settings.Gservices.getInt(mResolver,
- Settings.Gservices.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS,
+ netStatPollPeriod = Settings.Secure.getInt(mResolver,
+ Settings.Secure.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS,
POLL_NETSTAT_SCREEN_OFF_MILLIS);
}
}
@@ -940,10 +936,10 @@
private void runPingTest () {
int status = -1;
try {
- String address = Settings.Gservices.getString(mResolver,
- Settings.Gservices.PDP_WATCHDOG_PING_ADDRESS);
- int deadline = Settings.Gservices.getInt(mResolver,
- Settings.Gservices.PDP_WATCHDOG_PING_DEADLINE, DEFAULT_PING_DEADLINE);
+ String address = Settings.Secure.getString(mResolver,
+ Settings.Secure.PDP_WATCHDOG_PING_ADDRESS);
+ int deadline = Settings.Secure.getInt(mResolver,
+ Settings.Secure.PDP_WATCHDOG_PING_DEADLINE, DEFAULT_PING_DEADLINE);
if (DBG) log("pinging " + address + " for " + deadline + "s");
if (address != null && !NULL_IP.equals(address)) {
Process p = Runtime.getRuntime()
@@ -1148,14 +1144,10 @@
if(DBG) log("PDP setup failed " + cause);
// Log this failure to the Event Logs.
if (cause.isEventLoggable()) {
- int cid = -1;
GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
- if (loc != null) cid = loc.getCid();
-
- EventLog.List val = new EventLog.List(
- cause.ordinal(), cid,
+ EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_RADIO_PDP_SETUP_FAIL,
+ cause.ordinal(), loc != null ? loc.getCid() : -1,
TelephonyManager.getDefault().getNetworkType());
- EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_RADIO_PDP_SETUP_FAIL, val);
}
// No try for permanent failure
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index f82474c..48e5c97 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -482,12 +482,9 @@
// Can't register data sevice while voice service is ok
// i.e. CREG is ok while CGREG is not
// possible a network or baseband side error
- int cid = -1;
GsmCellLocation loc = ((GsmCellLocation)phone.getCellLocation());
- if (loc != null) cid = loc.getCid();
-
- EventLog.List val = new EventLog.List(ss.getOperatorNumeric(), cid);
- EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CGREG_FAIL, val);
+ EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_CGREG_FAIL,
+ ss.getOperatorNumeric(), loc != null ? loc.getCid() : -1);
mReportedGprsNoReg = true;
}
mStartedGprsRegCheck = false;
@@ -518,32 +515,44 @@
} else if (!mDesiredPowerState && cm.getRadioState().isOn()) {
DataConnectionTracker dcTracker = phone.mDataConnection;
if (! dcTracker.isDataConnectionAsDesired()) {
-
- EventLog.List val = new EventLog.List(
- dcTracker.getStateInString(),
- (dcTracker.getAnyDataEnabled() ? 1 : 0) );
- EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_DATA_STATE_RADIO_OFF, val);
+ EventLog.writeEvent(TelephonyEventLog.EVENT_LOG_DATA_STATE_RADIO_OFF,
+ dcTracker.getStateInString(), dcTracker.getAnyDataEnabled() ? 1 : 0);
}
- Message msg = dcTracker.obtainMessage(DataConnectionTracker.EVENT_CLEAN_UP_CONNECTION);
- msg.arg1 = 1; // tearDown is true
- msg.obj = GSMPhone.REASON_RADIO_TURNED_OFF;
- dcTracker.sendMessage(msg);
-
- // poll data state up to 15 times, with a 100ms delay
- // totaling 1.5 sec. Normal data disable action will finish in 100ms.
- for (int i = 0; i < MAX_NUM_DATA_STATE_READS; i++) {
- if (dcTracker.getState() != DataConnectionTracker.State.CONNECTED
- && dcTracker.getState() != DataConnectionTracker.State.DISCONNECTING) {
- Log.d(LOG_TAG, "Data shutdown complete.");
- break;
- }
- SystemClock.sleep(DATA_STATE_POLL_SLEEP_MS);
- }
- // If it's on and available and we want it off..
- cm.setRadioPower(false, null);
+ // If it's on and available and we want it off gracefully
+ powerOffRadioSafely();
} // Otherwise, we're in the desired state
}
+ @Override
+ protected void powerOffRadioSafely() {
+ // clean data connection
+ DataConnectionTracker dcTracker = phone.mDataConnection;
+ Message msg = dcTracker.obtainMessage(DataConnectionTracker.EVENT_CLEAN_UP_CONNECTION);
+ msg.arg1 = 1; // tearDown is true
+ msg.obj = GSMPhone.REASON_RADIO_TURNED_OFF;
+ dcTracker.sendMessage(msg);
+
+ // poll data state up to 15 times, with a 100ms delay
+ // totaling 1.5 sec. Normal data disable action will finish in 100ms.
+ for (int i = 0; i < MAX_NUM_DATA_STATE_READS; i++) {
+ if (dcTracker.getState() != DataConnectionTracker.State.CONNECTED
+ && dcTracker.getState() != DataConnectionTracker.State.DISCONNECTING) {
+ Log.d(LOG_TAG, "Data shutdown complete.");
+ break;
+ }
+ SystemClock.sleep(DATA_STATE_POLL_SLEEP_MS);
+ }
+
+ // hang up all active voice calls
+ if (phone.isInCall()) {
+ phone.mCT.ringingCall.hangupIfAlive();
+ phone.mCT.backgroundCall.hangupIfAlive();
+ phone.mCT.foregroundCall.hangupIfAlive();
+ }
+
+ cm.setRadioPower(false, null);
+ }
+
protected void updateSpnDisplay() {
int rule = phone.mSIMRecords.getDisplayRule(ss.getOperatorNumeric());
String spn = phone.mSIMRecords.getServiceProviderName();
@@ -965,9 +974,9 @@
if (!mStartedGprsRegCheck && !mReportedGprsNoReg) {
mStartedGprsRegCheck = true;
- int check_period = Settings.Gservices.getInt(
+ int check_period = Settings.Secure.getInt(
phone.getContext().getContentResolver(),
- Settings.Gservices.GPRS_REGISTER_CHECK_PERIOD_MS,
+ Settings.Secure.GPRS_REGISTER_CHECK_PERIOD_MS,
DEFAULT_GPRS_CHECK_PERIOD_MILLIS);
sendMessageDelayed(obtainMessage(EVENT_CHECK_REPORT_GPRS),
check_period);
diff --git a/tests/AndroidTests/AndroidManifest.xml b/tests/AndroidTests/AndroidManifest.xml
index 786178c..eb422be 100644
--- a/tests/AndroidTests/AndroidManifest.xml
+++ b/tests/AndroidTests/AndroidManifest.xml
@@ -48,8 +48,8 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.WRITE_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
+ <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SMS"/>
<uses-permission android:name="com.android.unit_tests.permission.TEST_GRANTED" />
<uses-permission android:name="com.google.android.googleapps.permission.ACCESS_GOOGLE_PASSWORD" />
diff --git a/tests/AndroidTests/res/layout/layout_five.xml b/tests/AndroidTests/res/layout/layout_five.xml
index fd1e0ef..9923eaf 100644
--- a/tests/AndroidTests/res/layout/layout_five.xml
+++ b/tests/AndroidTests/res/layout/layout_five.xml
@@ -17,6 +17,6 @@
** limitations under the License.
*/
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/content" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
- <TextView android:id="@+id/text" android:text="@string/layout_five_text_text" android:layout_width="fill_parent" android:layout_height="wrap_content" />
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/content" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">
+ <TextView android:id="@+id/text" android:text="@string/layout_five_text_text" android:layout_width="match_parent" android:layout_height="wrap_content" />
</LinearLayout>
diff --git a/tests/AndroidTests/res/layout/layout_one.xml b/tests/AndroidTests/res/layout/layout_one.xml
index f5c78bd..c326b2b 100644
--- a/tests/AndroidTests/res/layout/layout_one.xml
+++ b/tests/AndroidTests/res/layout/layout_one.xml
@@ -17,4 +17,4 @@
** limitations under the License.
*/
-->
-<view xmlns:android="http://schemas.android.com/apk/res/android" class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/viewOne" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
+<view xmlns:android="http://schemas.android.com/apk/res/android" class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/viewOne" android:layout_width="match_parent" android:layout_height="match_parent"/>
diff --git a/tests/AndroidTests/res/layout/layout_six.xml b/tests/AndroidTests/res/layout/layout_six.xml
index 6efcdf3..b78082d 100644
--- a/tests/AndroidTests/res/layout/layout_six.xml
+++ b/tests/AndroidTests/res/layout/layout_six.xml
@@ -17,11 +17,11 @@
** limitations under the License.
*/
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/content" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
- <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="fill_parent" android:layout_height="wrap_content" />
- <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="fill_parent" android:layout_height="wrap_content" />
- <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="fill_parent" android:layout_height="wrap_content" />
- <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="fill_parent" android:layout_height="wrap_content" />
- <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="fill_parent" android:layout_height="wrap_content" />
- <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="fill_parent" android:layout_height="wrap_content" />
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/content" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">
+ <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="match_parent" android:layout_height="wrap_content" />
+ <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="match_parent" android:layout_height="wrap_content" />
+ <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="match_parent" android:layout_height="wrap_content" />
+ <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="match_parent" android:layout_height="wrap_content" />
+ <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="match_parent" android:layout_height="wrap_content" />
+ <TextView android:id="@+id/text" android:text="@string/layout_six_text_text" android:layout_width="match_parent" android:layout_height="wrap_content" />
</LinearLayout>
diff --git a/tests/AndroidTests/res/layout/layout_tag.xml b/tests/AndroidTests/res/layout/layout_tag.xml
index 1f17701..72874a6 100644
--- a/tests/AndroidTests/res/layout/layout_tag.xml
+++ b/tests/AndroidTests/res/layout/layout_tag.xml
@@ -20,4 +20,4 @@
<view xmlns:android="http://schemas.android.com/apk/res/android"
class="com.android.unit_tests.InflateTest$ViewOne"
android:id="@+id/viewOne" android:tag="MyTag"
- android:layout_width="fill_parent" android:layout_height="fill_parent"/>
+ android:layout_width="match_parent" android:layout_height="match_parent"/>
diff --git a/tests/AndroidTests/res/layout/layout_three.xml b/tests/AndroidTests/res/layout/layout_three.xml
index 77b2aa9..7b1ccc5 100644
--- a/tests/AndroidTests/res/layout/layout_three.xml
+++ b/tests/AndroidTests/res/layout/layout_three.xml
@@ -17,11 +17,11 @@
** limitations under the License.
*/
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/content" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
- <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view1" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
- <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view2" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
- <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view3" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
- <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view4" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
- <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view5" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
- <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view6" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/content" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">
+ <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view1" android:layout_width="match_parent" android:layout_height="match_parent"/>
+ <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view2" android:layout_width="match_parent" android:layout_height="match_parent"/>
+ <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view3" android:layout_width="match_parent" android:layout_height="match_parent"/>
+ <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view4" android:layout_width="match_parent" android:layout_height="match_parent"/>
+ <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view5" android:layout_width="match_parent" android:layout_height="match_parent"/>
+ <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/view6" android:layout_width="match_parent" android:layout_height="match_parent"/>
</LinearLayout>
diff --git a/tests/AndroidTests/res/layout/layout_two.xml b/tests/AndroidTests/res/layout/layout_two.xml
index 9c99710..af14228 100644
--- a/tests/AndroidTests/res/layout/layout_two.xml
+++ b/tests/AndroidTests/res/layout/layout_two.xml
@@ -17,7 +17,7 @@
** limitations under the License.
*/
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/content" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
- <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/viewOne" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/content" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">
+ <view class="com.android.unit_tests.InflateTest$ViewOne" android:id="@+id/viewOne" android:layout_width="match_parent" android:layout_height="match_parent"/>
</LinearLayout>
diff --git a/tests/AndroidTests/res/raw/medium.xml b/tests/AndroidTests/res/raw/medium.xml
index 51c952c..5757a24 100644
--- a/tests/AndroidTests/res/raw/medium.xml
+++ b/tests/AndroidTests/res/raw/medium.xml
@@ -17,11 +17,11 @@
** limitations under the License.
*/
-->
-<LinearLayout id="@+id/content" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
- <TextView id="@+id/text" android:text="S" android:layout_width="fill_parent" android:layout_height="wrap_content" />
- <TextView id="@+id/text" android:text="M" android:layout_width="fill_parent" android:layout_height="wrap_content" />
- <TextView id="@+id/text" android:text="T" android:layout_width="fill_parent" android:layout_height="wrap_content" />
- <TextView id="@+id/text" android:text="W" android:layout_width="fill_parent" android:layout_height="wrap_content" />
- <TextView id="@+id/text" android:text="H" android:layout_width="fill_parent" android:layout_height="wrap_content" />
- <TextView id="@+id/text" android:text="F" android:layout_width="fill_parent" android:layout_height="wrap_content" />
+<LinearLayout id="@+id/content" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent">
+ <TextView id="@+id/text" android:text="S" android:layout_width="match_parent" android:layout_height="wrap_content" />
+ <TextView id="@+id/text" android:text="M" android:layout_width="match_parent" android:layout_height="wrap_content" />
+ <TextView id="@+id/text" android:text="T" android:layout_width="match_parent" android:layout_height="wrap_content" />
+ <TextView id="@+id/text" android:text="W" android:layout_width="match_parent" android:layout_height="wrap_content" />
+ <TextView id="@+id/text" android:text="H" android:layout_width="match_parent" android:layout_height="wrap_content" />
+ <TextView id="@+id/text" android:text="F" android:layout_width="match_parent" android:layout_height="wrap_content" />
</LinearLayout>
diff --git a/tests/AndroidTests/res/raw/small.xml b/tests/AndroidTests/res/raw/small.xml
index 2697fb8..ee859b9 100644
--- a/tests/AndroidTests/res/raw/small.xml
+++ b/tests/AndroidTests/res/raw/small.xml
@@ -17,4 +17,4 @@
** limitations under the License.
*/
-->
-<view class="com.android.tests.InflateTest$ViewOne" id="@+id/viewOne" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
+<view class="com.android.tests.InflateTest$ViewOne" id="@+id/viewOne" android:layout_width="match_parent" android:layout_height="match_parent"/>
diff --git a/tests/AndroidTests/src/com/android/unit_tests/ApacheHttpTests.java b/tests/AndroidTests/src/com/android/unit_tests/ApacheHttpTests.java
deleted file mode 100644
index cf759e0..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/ApacheHttpTests.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.android.unit_tests;
-
-import junit.framework.TestSuite;
-
-public class ApacheHttpTests {
- public static TestSuite suite() {
- TestSuite suite = new TestSuite(ApacheHttpTests.class.getName());
-
- suite.addTestSuite(TestHttpService.class);
-
- return suite;
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/CreateViewTest.java b/tests/AndroidTests/src/com/android/unit_tests/CreateViewTest.java
index 342094d..0c57ac4 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/CreateViewTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/CreateViewTest.java
@@ -21,7 +21,7 @@
import android.test.PerformanceTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.view.View;
-import static android.view.ViewGroup.LayoutParams.FILL_PARENT;
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import android.widget.LinearLayout;
import android.widget.TextView;
@@ -45,7 +45,7 @@
public void testLayout2() throws Exception {
LinearLayout vert = new LinearLayout(mContext);
vert.addView(new CreateViewTest.ViewOne(mContext),
- new LinearLayout.LayoutParams(FILL_PARENT, FILL_PARENT, 0));
+ new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
}
@SmallTest
@@ -53,22 +53,22 @@
LinearLayout vert = new LinearLayout(mContext);
ViewOne one = new ViewOne(mContext);
- vert.addView(one, new LinearLayout.LayoutParams(FILL_PARENT, FILL_PARENT, 0));
+ vert.addView(one, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
ViewOne two = new ViewOne(mContext);
- vert.addView(two, new LinearLayout.LayoutParams(FILL_PARENT, FILL_PARENT, 0));
+ vert.addView(two, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
ViewOne three = new ViewOne(mContext);
- vert.addView(three, new LinearLayout.LayoutParams(FILL_PARENT, FILL_PARENT, 0));
+ vert.addView(three, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
ViewOne four = new ViewOne(mContext);
- vert.addView(four, new LinearLayout.LayoutParams(FILL_PARENT, FILL_PARENT, 0));
+ vert.addView(four, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
ViewOne five = new ViewOne(mContext);
- vert.addView(five, new LinearLayout.LayoutParams(FILL_PARENT, FILL_PARENT, 0));
+ vert.addView(five, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
ViewOne six = new ViewOne(mContext);
- vert.addView(six, new LinearLayout.LayoutParams(FILL_PARENT, FILL_PARENT, 0));
+ vert.addView(six, new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT, 0));
}
@SmallTest
@@ -83,7 +83,7 @@
text.setText("S");
LinearLayout vert = new LinearLayout(mContext);
- vert.addView(text, new LinearLayout.LayoutParams(FILL_PARENT, WRAP_CONTENT, 0));
+ vert.addView(text, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT, 0));
}
@SmallTest
@@ -92,27 +92,27 @@
TextView one = new TextView(mContext);
one.setText("S");
- vert.addView(one, new LinearLayout.LayoutParams(FILL_PARENT, WRAP_CONTENT, 0));
+ vert.addView(one, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT, 0));
TextView two = new TextView(mContext);
two.setText("M");
- vert.addView(two, new LinearLayout.LayoutParams(FILL_PARENT, WRAP_CONTENT, 0));
+ vert.addView(two, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT, 0));
TextView three = new TextView(mContext);
three.setText("T");
- vert.addView(three, new LinearLayout.LayoutParams(FILL_PARENT, WRAP_CONTENT, 0));
+ vert.addView(three, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT, 0));
TextView four = new TextView(mContext);
four.setText("W");
- vert.addView(four, new LinearLayout.LayoutParams(FILL_PARENT, WRAP_CONTENT, 0));
+ vert.addView(four, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT, 0));
TextView five = new TextView(mContext);
five.setText("H");
- vert.addView(five, new LinearLayout.LayoutParams(FILL_PARENT, WRAP_CONTENT, 0));
+ vert.addView(five, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT, 0));
TextView six = new TextView(mContext);
six.setText("F");
- vert.addView(six, new LinearLayout.LayoutParams(FILL_PARENT, WRAP_CONTENT, 0));
+ vert.addView(six, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT, 0));
}
public static class ViewOne extends View {
diff --git a/tests/AndroidTests/src/com/android/unit_tests/DatabaseCursorTest.java b/tests/AndroidTests/src/com/android/unit_tests/DatabaseCursorTest.java
deleted file mode 100644
index 5df499d..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/DatabaseCursorTest.java
+++ /dev/null
@@ -1,626 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.unit_tests;
-
-import android.content.ContentValues;
-import android.database.Cursor;
-import android.database.CursorIndexOutOfBoundsException;
-import android.database.DataSetObserver;
-import android.database.DatabaseUtils;
-import android.database.sqlite.SQLiteCursor;
-import android.database.sqlite.SQLiteCursorDriver;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteQuery;
-import android.database.sqlite.SQLiteStatement;
-import android.os.Looper;
-import android.test.PerformanceTestCase;
-import android.test.suitebuilder.annotation.LargeTest;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.test.suitebuilder.annotation.Suppress;
-import android.util.Log;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.Random;
-
-import junit.framework.TestCase;
-
-public class DatabaseCursorTest extends TestCase implements PerformanceTestCase {
-
- private static final String sString1 = "this is a test";
- private static final String sString2 = "and yet another test";
- private static final String sString3 = "this string is a little longer, but still a test";
-
- private static final int CURRENT_DATABASE_VERSION = 42;
- private SQLiteDatabase mDatabase;
- private File mDatabaseFile;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- mDatabaseFile = new File("/sqlite_stmt_journals", "database_test.db");
- if (mDatabaseFile.exists()) {
- mDatabaseFile.delete();
- }
- mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null);
- assertNotNull(mDatabase);
- mDatabase.setVersion(CURRENT_DATABASE_VERSION);
- }
-
- @Override
- protected void tearDown() throws Exception {
- mDatabase.close();
- mDatabaseFile.delete();
- super.tearDown();
- }
-
- public boolean isPerformanceOnly() {
- return false;
- }
-
- // These test can only be run once.
- public int startPerformance(Intermediates intermediates) {
- return 1;
- }
-
- private void populateDefaultTable() {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);");
-
- mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString1 + "');");
- mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString2 + "');");
- mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');");
- }
-
- @MediumTest
- public void testCursorUpdate() {
- mDatabase.execSQL(
- "CREATE TABLE test (_id INTEGER PRIMARY KEY, d INTEGER, s INTEGER);");
- for(int i = 0; i < 20; i++) {
- mDatabase.execSQL("INSERT INTO test (d, s) VALUES (" + i +
- "," + i%2 + ");");
- }
-
- Cursor c = mDatabase.query("test", null, "s = 0", null, null, null, null);
- int dCol = c.getColumnIndexOrThrow("d");
- int sCol = c.getColumnIndexOrThrow("s");
-
- int count = 0;
- while (c.moveToNext()) {
- assertTrue(c.updateInt(dCol, 3));
- count++;
- }
- assertEquals(10, count);
-
- assertTrue(c.commitUpdates());
-
- assertTrue(c.requery());
-
- count = 0;
- while (c.moveToNext()) {
- assertEquals(3, c.getInt(dCol));
- count++;
- }
-
- assertEquals(10, count);
- assertTrue(c.moveToFirst());
- assertTrue(c.deleteRow());
- assertEquals(9, c.getCount());
- c.close();
- }
-
- @MediumTest
- public void testBlob() throws Exception {
- // create table
- mDatabase.execSQL(
- "CREATE TABLE test (_id INTEGER PRIMARY KEY, s TEXT, d REAL, l INTEGER, b BLOB);");
- // insert blob
- Object[] args = new Object[4];
-
- byte[] blob = new byte[1000];
- byte value = 99;
- Arrays.fill(blob, value);
- args[3] = blob;
-
- String s = new String("text");
- args[0] = s;
- Double d = 99.9;
- args[1] = d;
- Long l = (long)1000;
- args[2] = l;
-
- String sql = "INSERT INTO test (s, d, l, b) VALUES (?,?,?,?)";
- mDatabase.execSQL(sql, args);
- // use cursor to access blob
- Cursor c = mDatabase.query("test", null, null, null, null, null, null);
- c.moveToNext();
- ContentValues cv = new ContentValues();
- DatabaseUtils.cursorRowToContentValues(c, cv);
-
- int bCol = c.getColumnIndexOrThrow("b");
- int sCol = c.getColumnIndexOrThrow("s");
- int dCol = c.getColumnIndexOrThrow("d");
- int lCol = c.getColumnIndexOrThrow("l");
- byte[] cBlob = c.getBlob(bCol);
- assertTrue(Arrays.equals(blob, cBlob));
- assertEquals(s, c.getString(sCol));
- assertEquals((double)d, c.getDouble(dCol));
- assertEquals((long)l, c.getLong(lCol));
-
- // new byte[]
- byte[] newblob = new byte[1000];
- value = 98;
- Arrays.fill(blob, value);
-
- c.updateBlob(bCol, newblob);
- cBlob = c.getBlob(bCol);
- assertTrue(Arrays.equals(newblob, cBlob));
-
- // commit
- assertTrue(c.commitUpdates());
- assertTrue(c.requery());
- c.moveToNext();
- cBlob = c.getBlob(bCol);
- assertTrue(Arrays.equals(newblob, cBlob));
- c.close();
- }
-
- @MediumTest
- public void testRealColumns() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data REAL);");
- ContentValues values = new ContentValues();
- values.put("data", 42.11);
- long id = mDatabase.insert("test", "data", values);
- assertTrue(id > 0);
- Cursor c = mDatabase.rawQuery("SELECT data FROM test", null);
- assertNotNull(c);
- assertTrue(c.moveToFirst());
- assertEquals(42.11, c.getDouble(0));
- c.close();
- }
-
- @MediumTest
- public void testCursor1() throws Exception {
- populateDefaultTable();
-
- Cursor c = mDatabase.query("test", null, null, null, null, null, null);
-
- int dataColumn = c.getColumnIndexOrThrow("data");
-
- // The cursor should ignore text before the last period when looking for a column. (This
- // is a temporary hack in all implementations of getColumnIndex.)
- int dataColumn2 = c.getColumnIndexOrThrow("junk.data");
- assertEquals(dataColumn, dataColumn2);
-
- assertSame(3, c.getCount());
-
- assertTrue(c.isBeforeFirst());
-
- try {
- c.getInt(0);
- fail("CursorIndexOutOfBoundsException expected");
- } catch (CursorIndexOutOfBoundsException ex) {
- // expected
- }
-
- c.moveToNext();
- assertEquals(1, c.getInt(0));
-
- String s = c.getString(dataColumn);
- assertEquals(sString1, s);
-
- c.moveToNext();
- s = c.getString(dataColumn);
- assertEquals(sString2, s);
-
- c.moveToNext();
- s = c.getString(dataColumn);
- assertEquals(sString3, s);
-
- c.moveToPosition(-1);
- c.moveToNext();
- s = c.getString(dataColumn);
- assertEquals(sString1, s);
-
- c.moveToPosition(2);
- s = c.getString(dataColumn);
- assertEquals(sString3, s);
-
- int i;
-
- for (c.moveToFirst(), i = 0; !c.isAfterLast(); c.moveToNext(), i++) {
- c.getInt(0);
- }
-
- assertEquals(3, i);
-
- try {
- c.getInt(0);
- fail("CursorIndexOutOfBoundsException expected");
- } catch (CursorIndexOutOfBoundsException ex) {
- // expected
- }
- c.close();
- }
-
- @MediumTest
- public void testCursor2() throws Exception {
- populateDefaultTable();
-
- Cursor c = mDatabase.query("test", null, "_id > 1000", null, null, null, null);
- assertEquals(0, c.getCount());
- assertTrue(c.isBeforeFirst());
-
- try {
- c.getInt(0);
- fail("CursorIndexOutOfBoundsException expected");
- } catch (CursorIndexOutOfBoundsException ex) {
- // expected
- }
-
- int i;
- for (c.moveToFirst(), i = 0; !c.isAfterLast(); c.moveToNext(), i++) {
- c.getInt(0);
- }
- assertEquals(0, i);
- try {
- c.getInt(0);
- fail("CursorIndexOutOfBoundsException expected");
- } catch (CursorIndexOutOfBoundsException ex) {
- // expected
- }
- c.close();
- }
-
- @MediumTest
- public void testLargeField() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);");
-
- StringBuilder sql = new StringBuilder(2100);
- sql.append("INSERT INTO test (data) VALUES ('");
- Random random = new Random(System.currentTimeMillis());
- StringBuilder randomString = new StringBuilder(1979);
- for (int i = 0; i < 1979; i++) {
- randomString.append((random.nextInt() & 0xf) % 10);
- }
- sql.append(randomString);
- sql.append("');");
- mDatabase.execSQL(sql.toString());
-
- Cursor c = mDatabase.query("test", null, null, null, null, null, null);
- assertNotNull(c);
- assertEquals(1, c.getCount());
-
- assertTrue(c.moveToFirst());
- assertEquals(0, c.getPosition());
- String largeString = c.getString(c.getColumnIndexOrThrow("data"));
- assertNotNull(largeString);
- assertEquals(randomString.toString(), largeString);
- c.close();
- }
-
- class TestObserver extends DataSetObserver {
- int total;
- SQLiteCursor c;
- boolean quit = false;
- public TestObserver(int total_, SQLiteCursor cursor) {
- c = cursor;
- total = total_;
- }
-
- @Override
- public void onChanged() {
- int count = c.getCount();
- if (total == count) {
- int i = 0;
- while (c.moveToNext()) {
- assertEquals(i, c.getInt(1));
- i++;
- }
- assertEquals(count, i);
- quit = true;
- Looper.myLooper().quit();
- }
- }
-
- @Override
- public void onInvalidated() {
- }
- }
-
- //@Large
- @Suppress
- public void testLoadingThreadDelayRegisterData() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);");
-
- final int count = 505;
- String sql = "INSERT INTO test (data) VALUES (?);";
- SQLiteStatement s = mDatabase.compileStatement(sql);
- for (int i = 0; i < count; i++) {
- s.bindLong(1, i);
- s.execute();
- }
-
- int maxRead = 500;
- int initialRead = 5;
- SQLiteCursor c = (SQLiteCursor)mDatabase.rawQuery("select * from test;",
- null, initialRead, maxRead);
-
- TestObserver observer = new TestObserver(count, c);
- c.getCount();
- c.registerDataSetObserver(observer);
- if (!observer.quit) {
- Looper.loop();
- }
- c.close();
- }
-
- @LargeTest
- public void testLoadingThread() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);");
-
- final int count = 50000;
- String sql = "INSERT INTO test (data) VALUES (?);";
- SQLiteStatement s = mDatabase.compileStatement(sql);
- for (int i = 0; i < count; i++) {
- s.bindLong(1, i);
- s.execute();
- }
-
- int maxRead = 1000;
- int initialRead = 5;
- SQLiteCursor c = (SQLiteCursor)mDatabase.rawQuery("select * from test;",
- null, initialRead, maxRead);
-
- TestObserver observer = new TestObserver(count, c);
- c.registerDataSetObserver(observer);
- c.getCount();
-
- Looper.loop();
- c.close();
- }
-
- @LargeTest
- public void testLoadingThreadClose() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);");
-
- final int count = 1000;
- String sql = "INSERT INTO test (data) VALUES (?);";
- SQLiteStatement s = mDatabase.compileStatement(sql);
- for (int i = 0; i < count; i++) {
- s.bindLong(1, i);
- s.execute();
- }
-
- int maxRead = 11;
- int initialRead = 5;
- SQLiteCursor c = (SQLiteCursor)mDatabase.rawQuery("select * from test;",
- null, initialRead, maxRead);
-
- TestObserver observer = new TestObserver(count, c);
- c.registerDataSetObserver(observer);
- c.getCount();
- c.close();
- }
-
- @LargeTest
- public void testLoadingThreadDeactivate() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);");
-
- final int count = 1000;
- String sql = "INSERT INTO test (data) VALUES (?);";
- SQLiteStatement s = mDatabase.compileStatement(sql);
- for (int i = 0; i < count; i++) {
- s.bindLong(1, i);
- s.execute();
- }
-
- int maxRead = 11;
- int initialRead = 5;
- SQLiteCursor c = (SQLiteCursor)mDatabase.rawQuery("select * from test;",
- null, initialRead, maxRead);
-
- TestObserver observer = new TestObserver(count, c);
- c.registerDataSetObserver(observer);
- c.getCount();
- c.deactivate();
- c.close();
- }
-
- @LargeTest
- public void testManyRowsLong() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data INT);");
-
- final int count = 36799;
- for (int i = 0; i < count; i++) {
- mDatabase.execSQL("INSERT INTO test (data) VALUES (" + i + ");");
- }
-
- Cursor c = mDatabase.query("test", new String[]{"data"}, null, null, null, null, null);
- assertNotNull(c);
-
- int i = 0;
- while (c.moveToNext()) {
- assertEquals(i, c.getInt(0));
- i++;
- }
- assertEquals(count, i);
- assertEquals(count, c.getCount());
-
- Log.d("testManyRows", "count " + Integer.toString(i));
- c.close();
- }
-
- @LargeTest
- public void testManyRowsTxt() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);");
- StringBuilder sql = new StringBuilder(2100);
- sql.append("INSERT INTO test (data) VALUES ('");
- Random random = new Random(System.currentTimeMillis());
- StringBuilder randomString = new StringBuilder(1979);
- for (int i = 0; i < 1979; i++) {
- randomString.append((random.nextInt() & 0xf) % 10);
- }
- sql.append(randomString);
- sql.append("');");
-
- // if cursor window size changed, adjust this value too
- final int count = 600; // more than two fillWindow needed
- for (int i = 0; i < count; i++) {
- mDatabase.execSQL(sql.toString());
- }
-
- Cursor c = mDatabase.query("test", new String[]{"data"}, null, null, null, null, null);
- assertNotNull(c);
-
- int i = 0;
- while (c.moveToNext()) {
- assertEquals(randomString.toString(), c.getString(0));
- i++;
- }
- assertEquals(count, i);
- assertEquals(count, c.getCount());
- c.close();
- }
-
- @LargeTest
- public void testManyRowsTxtLong() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, txt TEXT, data INT);");
-
- Random random = new Random(System.currentTimeMillis());
- StringBuilder randomString = new StringBuilder(1979);
- for (int i = 0; i < 1979; i++) {
- randomString.append((random.nextInt() & 0xf) % 10);
- }
-
- // if cursor window size changed, adjust this value too
- final int count = 600;
- for (int i = 0; i < count; i++) {
- StringBuilder sql = new StringBuilder(2100);
- sql.append("INSERT INTO test (txt, data) VALUES ('");
- sql.append(randomString);
- sql.append("','");
- sql.append(i);
- sql.append("');");
- mDatabase.execSQL(sql.toString());
- }
-
- Cursor c = mDatabase.query("test", new String[]{"txt", "data"}, null, null, null, null, null);
- assertNotNull(c);
-
- int i = 0;
- while (c.moveToNext()) {
- assertEquals(randomString.toString(), c.getString(0));
- assertEquals(i, c.getInt(1));
- i++;
- }
- assertEquals(count, i);
- assertEquals(count, c.getCount());
- c.close();
- }
-
- @MediumTest
- public void testRequery() throws Exception {
- populateDefaultTable();
-
- Cursor c = mDatabase.rawQuery("SELECT * FROM test", null);
- assertNotNull(c);
- assertEquals(3, c.getCount());
- c.deactivate();
- c.requery();
- assertEquals(3, c.getCount());
- c.close();
- }
-
- @MediumTest
- public void testRequeryWithSelection() throws Exception {
- populateDefaultTable();
-
- Cursor c = mDatabase.rawQuery("SELECT data FROM test WHERE data = '" + sString1 + "'",
- null);
- assertNotNull(c);
- assertEquals(1, c.getCount());
- assertTrue(c.moveToFirst());
- assertEquals(sString1, c.getString(0));
- c.deactivate();
- c.requery();
- assertEquals(1, c.getCount());
- assertTrue(c.moveToFirst());
- assertEquals(sString1, c.getString(0));
- c.close();
- }
-
- @MediumTest
- public void testRequeryWithSelectionArgs() throws Exception {
- populateDefaultTable();
-
- Cursor c = mDatabase.rawQuery("SELECT data FROM test WHERE data = ?",
- new String[]{sString1});
- assertNotNull(c);
- assertEquals(1, c.getCount());
- assertTrue(c.moveToFirst());
- assertEquals(sString1, c.getString(0));
- c.deactivate();
- c.requery();
- assertEquals(1, c.getCount());
- assertTrue(c.moveToFirst());
- assertEquals(sString1, c.getString(0));
- c.close();
- }
-
- @MediumTest
- public void testRequeryWithAlteredSelectionArgs() throws Exception {
- /**
- * Test the ability of a subclass of SQLiteCursor to change its query arguments.
- */
- populateDefaultTable();
-
- SQLiteDatabase.CursorFactory factory = new SQLiteDatabase.CursorFactory() {
- public Cursor newCursor(
- SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable,
- SQLiteQuery query) {
- return new SQLiteCursor(db, masterQuery, editTable, query) {
- @Override
- public boolean requery() {
- setSelectionArguments(new String[]{"2"});
- return super.requery();
- }
- };
- }
- };
- Cursor c = mDatabase.rawQueryWithFactory(
- factory, "SELECT data FROM test WHERE _id <= ?", new String[]{"1"},
- null);
- assertNotNull(c);
- assertEquals(1, c.getCount());
- assertTrue(c.moveToFirst());
- assertEquals(sString1, c.getString(0));
-
- // Our hacked requery() changes the query arguments in the cursor.
- c.requery();
-
- assertEquals(2, c.getCount());
- assertTrue(c.moveToFirst());
- assertEquals(sString1, c.getString(0));
- assertTrue(c.moveToNext());
- assertEquals(sString2, c.getString(0));
-
- // Test that setting query args on a deactivated cursor also works.
- c.deactivate();
- c.requery();
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/DatabaseStatementTest.java b/tests/AndroidTests/src/com/android/unit_tests/DatabaseStatementTest.java
deleted file mode 100644
index 16ca59f..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/DatabaseStatementTest.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.unit_tests;
-
-import android.database.Cursor;
-import android.database.sqlite.SQLiteConstraintException;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteDoneException;
-import android.database.sqlite.SQLiteStatement;
-import android.test.PerformanceTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.test.suitebuilder.annotation.SmallTest;
-import junit.framework.TestCase;
-
-import java.io.File;
-
-public class DatabaseStatementTest extends TestCase implements PerformanceTestCase {
-
- private static final String sString1 = "this is a test";
- private static final String sString2 = "and yet another test";
- private static final String sString3 = "this string is a little longer, but still a test";
-
- private static final int CURRENT_DATABASE_VERSION = 42;
- private SQLiteDatabase mDatabase;
- private File mDatabaseFile;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- mDatabaseFile = new File("/sqlite_stmt_journals", "database_test.db");
- if (mDatabaseFile.exists()) {
- mDatabaseFile.delete();
- }
- mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null);
- assertNotNull(mDatabase);
- mDatabase.setVersion(CURRENT_DATABASE_VERSION);
- }
-
- @Override
- protected void tearDown() throws Exception {
- mDatabase.close();
- mDatabaseFile.delete();
- super.tearDown();
- }
-
- public boolean isPerformanceOnly() {
- return false;
- }
-
- // These test can only be run once.
- public int startPerformance(Intermediates intermediates) {
- return 1;
- }
-
- private void populateDefaultTable() {
- mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);");
-
- mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString1 + "');");
- mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString2 + "');");
- mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');");
- }
-
- @MediumTest
- public void testExecuteStatement() throws Exception {
- populateDefaultTable();
- SQLiteStatement statement = mDatabase.compileStatement("DELETE FROM test");
- statement.execute();
-
- Cursor c = mDatabase.query("test", null, null, null, null, null, null);
- assertEquals(0, c.getCount());
- c.deactivate();
- statement.close();
- }
-
- @MediumTest
- public void testSimpleQuery() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (num INTEGER NOT NULL, str TEXT NOT NULL);");
- mDatabase.execSQL("INSERT INTO test VALUES (1234, 'hello');");
- SQLiteStatement statement1 =
- mDatabase.compileStatement("SELECT num FROM test WHERE str = ?");
- SQLiteStatement statement2 =
- mDatabase.compileStatement("SELECT str FROM test WHERE num = ?");
-
- try {
- statement1.bindString(1, "hello");
- long value = statement1.simpleQueryForLong();
- assertEquals(1234, value);
-
- statement1.bindString(1, "world");
- statement1.simpleQueryForLong();
- fail("shouldn't get here");
- } catch (SQLiteDoneException e) {
- // expected
- }
-
- try {
- statement2.bindLong(1, 1234);
- String value = statement1.simpleQueryForString();
- assertEquals("hello", value);
-
- statement2.bindLong(1, 5678);
- statement1.simpleQueryForString();
- fail("shouldn't get here");
- } catch (SQLiteDoneException e) {
- // expected
- }
-
- statement1.close();
- statement2.close();
- }
-
- @MediumTest
- public void testStatementLongBinding() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (num INTEGER);");
- SQLiteStatement statement = mDatabase.compileStatement("INSERT INTO test (num) VALUES (?)");
-
- for (int i = 0; i < 10; i++) {
- statement.bindLong(1, i);
- statement.execute();
- }
- statement.close();
-
- Cursor c = mDatabase.query("test", null, null, null, null, null, null);
- int numCol = c.getColumnIndexOrThrow("num");
- c.moveToFirst();
- for (long i = 0; i < 10; i++) {
- long num = c.getLong(numCol);
- assertEquals(i, num);
- c.moveToNext();
- }
- c.close();
- }
-
- @MediumTest
- public void testStatementStringBinding() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (num TEXT);");
- SQLiteStatement statement = mDatabase.compileStatement("INSERT INTO test (num) VALUES (?)");
-
- for (long i = 0; i < 10; i++) {
- statement.bindString(1, Long.toHexString(i));
- statement.execute();
- }
- statement.close();
-
- Cursor c = mDatabase.query("test", null, null, null, null, null, null);
- int numCol = c.getColumnIndexOrThrow("num");
- c.moveToFirst();
- for (long i = 0; i < 10; i++) {
- String num = c.getString(numCol);
- assertEquals(Long.toHexString(i), num);
- c.moveToNext();
- }
- c.close();
- }
-
- @MediumTest
- public void testStatementClearBindings() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (num INTEGER);");
- SQLiteStatement statement = mDatabase.compileStatement("INSERT INTO test (num) VALUES (?)");
-
- for (long i = 0; i < 10; i++) {
- statement.bindLong(1, i);
- statement.clearBindings();
- statement.execute();
- }
- statement.close();
-
- Cursor c = mDatabase.query("test", null, null, null, null, null, "ROWID");
- int numCol = c.getColumnIndexOrThrow("num");
- assertTrue(c.moveToFirst());
- for (long i = 0; i < 10; i++) {
- assertTrue(c.isNull(numCol));
- c.moveToNext();
- }
- c.close();
- }
-
- @MediumTest
- public void testSimpleStringBinding() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (num TEXT, value TEXT);");
- String statement = "INSERT INTO test (num, value) VALUES (?,?)";
-
- String[] args = new String[2];
- for (int i = 0; i < 2; i++) {
- args[i] = Integer.toHexString(i);
- }
-
- mDatabase.execSQL(statement, args);
-
- Cursor c = mDatabase.query("test", null, null, null, null, null, null);
- int numCol = c.getColumnIndexOrThrow("num");
- int valCol = c.getColumnIndexOrThrow("value");
- c.moveToFirst();
- String num = c.getString(numCol);
- assertEquals(Integer.toHexString(0), num);
-
- String val = c.getString(valCol);
- assertEquals(Integer.toHexString(1), val);
- c.close();
- }
-
- @MediumTest
- public void testStatementMultipleBindings() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (num INTEGER, str TEXT);");
- SQLiteStatement statement =
- mDatabase.compileStatement("INSERT INTO test (num, str) VALUES (?, ?)");
-
- for (long i = 0; i < 10; i++) {
- statement.bindLong(1, i);
- statement.bindString(2, Long.toHexString(i));
- statement.execute();
- }
- statement.close();
-
- Cursor c = mDatabase.query("test", null, null, null, null, null, "ROWID");
- int numCol = c.getColumnIndexOrThrow("num");
- int strCol = c.getColumnIndexOrThrow("str");
- assertTrue(c.moveToFirst());
- for (long i = 0; i < 10; i++) {
- long num = c.getLong(numCol);
- String str = c.getString(strCol);
- assertEquals(i, num);
- assertEquals(Long.toHexString(i), str);
- c.moveToNext();
- }
- c.close();
- }
-
- private static class StatementTestThread extends Thread {
- private SQLiteDatabase mDatabase;
- private SQLiteStatement mStatement;
-
- public StatementTestThread(SQLiteDatabase db, SQLiteStatement statement) {
- super();
- mDatabase = db;
- mStatement = statement;
- }
-
- @Override
- public void run() {
- mDatabase.beginTransaction();
- for (long i = 0; i < 10; i++) {
- mStatement.bindLong(1, i);
- mStatement.bindString(2, Long.toHexString(i));
- mStatement.execute();
- }
- mDatabase.setTransactionSuccessful();
- mDatabase.endTransaction();
-
- Cursor c = mDatabase.query("test", null, null, null, null, null, "ROWID");
- int numCol = c.getColumnIndexOrThrow("num");
- int strCol = c.getColumnIndexOrThrow("str");
- assertTrue(c.moveToFirst());
- for (long i = 0; i < 10; i++) {
- long num = c.getLong(numCol);
- String str = c.getString(strCol);
- assertEquals(i, num);
- assertEquals(Long.toHexString(i), str);
- c.moveToNext();
- }
- c.close();
- }
- }
-
- @MediumTest
- public void testStatementMultiThreaded() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (num INTEGER, str TEXT);");
- SQLiteStatement statement =
- mDatabase.compileStatement("INSERT INTO test (num, str) VALUES (?, ?)");
-
- StatementTestThread thread = new StatementTestThread(mDatabase, statement);
- thread.start();
- try {
- thread.join();
- } finally {
- statement.close();
- }
- }
-
- @MediumTest
- public void testStatementConstraint() throws Exception {
- mDatabase.execSQL("CREATE TABLE test (num INTEGER NOT NULL);");
- SQLiteStatement statement = mDatabase.compileStatement("INSERT INTO test (num) VALUES (?)");
-
- // Try to insert NULL, which violates the constraint
- try {
- statement.clearBindings();
- statement.execute();
- fail("expected exception not thrown");
- } catch (SQLiteConstraintException e) {
- // expected
- }
-
- // Make sure the statement can still be used
- statement.bindLong(1, 1);
- statement.execute();
- statement.close();
-
- Cursor c = mDatabase.query("test", null, null, null, null, null, null);
- int numCol = c.getColumnIndexOrThrow("num");
- c.moveToFirst();
- long num = c.getLong(numCol);
- assertEquals(1, num);
- c.close();
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/DatabaseTests.java b/tests/AndroidTests/src/com/android/unit_tests/DatabaseTests.java
index a7a1400..a288c73 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/DatabaseTests.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/DatabaseTests.java
@@ -23,8 +23,6 @@
TestSuite suite = new TestSuite(DatabaseTests.class.getName());
suite.addTestSuite(DatabaseGeneralTest.class);
- suite.addTestSuite(DatabaseCursorTest.class);
- suite.addTestSuite(DatabaseStatementTest.class);
suite.addTestSuite(DatabaseLocaleTest.class);
suite.addTestSuite(CursorWindowTest.class);
suite.addTestSuite(DatabaseLockTest.class);
diff --git a/tests/AndroidTests/src/com/android/unit_tests/DropBoxTest.java b/tests/AndroidTests/src/com/android/unit_tests/DropBoxTest.java
index 305788d..d20abd9 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/DropBoxTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/DropBoxTest.java
@@ -16,7 +16,7 @@
package com.android.unit_tests;
-import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.os.DropBoxManager;
@@ -37,11 +37,10 @@
/** Test {@link DropBoxManager} functionality. */
public class DropBoxTest extends AndroidTestCase {
public void tearDown() throws Exception {
- Intent override = new Intent(Settings.Gservices.OVERRIDE_ACTION);
- override.putExtra(Settings.Gservices.DROPBOX_AGE_SECONDS, "");
- override.putExtra(Settings.Gservices.DROPBOX_QUOTA_KB, "");
- override.putExtra(Settings.Gservices.DROPBOX_TAG_PREFIX + "DropBoxTest", "");
- waitForBroadcast(override);
+ ContentResolver cr = getContext().getContentResolver();
+ Settings.Secure.putString(cr, Settings.Secure.DROPBOX_AGE_SECONDS, "");
+ Settings.Secure.putString(cr, Settings.Secure.DROPBOX_QUOTA_KB, "");
+ Settings.Secure.putString(cr, Settings.Secure.DROPBOX_TAG_PREFIX + "DropBoxTest", "");
}
public void testAddText() throws Exception {
@@ -246,16 +245,15 @@
dropbox.addText("DropBoxTest", "TEST-ENABLED");
assertTrue(dropbox.isTagEnabled("DropBoxTest"));
- Intent override = new Intent(Settings.Gservices.OVERRIDE_ACTION);
- override.putExtra(Settings.Gservices.DROPBOX_TAG_PREFIX + "DropBoxTest", "disabled");
- waitForBroadcast(override);
+ ContentResolver cr = getContext().getContentResolver();
+ Settings.Secure.putString(cr, Settings.Secure.DROPBOX_TAG_PREFIX + "DropBoxTest",
+ "disabled");
dropbox.addText("DropBoxTest", "TEST-DISABLED");
assertFalse(dropbox.isTagEnabled("DropBoxTest"));
- override = new Intent(Settings.Gservices.OVERRIDE_ACTION);
- override.putExtra(Settings.Gservices.DROPBOX_TAG_PREFIX + "DropBoxTest", "");
- waitForBroadcast(override);
+ Settings.Secure.putString(cr, Settings.Secure.DROPBOX_TAG_PREFIX + "DropBoxTest",
+ "");
dropbox.addText("DropBoxTest", "TEST-ENABLED-AGAIN");
assertTrue(dropbox.isTagEnabled("DropBoxTest"));
@@ -323,9 +321,8 @@
// Limit storage to 10 blocks
int kb = blockSize * 10 / 1024;
- Intent override = new Intent(Settings.Gservices.OVERRIDE_ACTION);
- override.putExtra(Settings.Gservices.DROPBOX_QUOTA_KB, Integer.toString(kb));
- waitForBroadcast(override);
+ ContentResolver cr = getContext().getContentResolver();
+ Settings.Secure.putString(cr, Settings.Secure.DROPBOX_QUOTA_KB, Integer.toString(kb));
// Three tags using a total of 12 blocks:
// DropBoxTest0 [ ][ ]
@@ -426,10 +423,9 @@
// Limit storage to 10 blocks with an expiration of 1 second
int kb = blockSize * 10 / 1024;
- Intent override = new Intent(Settings.Gservices.OVERRIDE_ACTION);
- override.putExtra(Settings.Gservices.DROPBOX_AGE_SECONDS, "1");
- override.putExtra(Settings.Gservices.DROPBOX_QUOTA_KB, Integer.toString(kb));
- waitForBroadcast(override);
+ ContentResolver cr = getContext().getContentResolver();
+ Settings.Secure.putString(cr, Settings.Secure.DROPBOX_AGE_SECONDS, "1");
+ Settings.Secure.putString(cr, Settings.Secure.DROPBOX_QUOTA_KB, Integer.toString(kb));
// Write one normal entry and another so big that it is instantly tombstoned
long before = System.currentTimeMillis();
@@ -505,15 +501,6 @@
return length;
}
- private void waitForBroadcast(Intent intent) throws InterruptedException {
- BroadcastReceiver receiver = new BroadcastReceiver() {
- public synchronized void onReceive(Context context, Intent intent) { notify(); }
- };
-
- getContext().sendOrderedBroadcast(intent, null, receiver, null, 0, null, null);
- synchronized (receiver) { receiver.wait(); }
- }
-
private void recursiveDelete(File file) {
if (!file.delete() && file.isDirectory()) {
for (File f : file.listFiles()) recursiveDelete(f);
diff --git a/tests/AndroidTests/src/com/android/unit_tests/NeighboringCellInfoTest.java b/tests/AndroidTests/src/com/android/unit_tests/NeighboringCellInfoTest.java
deleted file mode 100644
index 7252aa9..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/NeighboringCellInfoTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.
- */
-package com.android.unit_tests;
-
-import android.os.Parcel;
-import android.test.AndroidTestCase;
-import android.telephony.NeighboringCellInfo;
-import android.test. suitebuilder.annotation.SmallTest;
-
-import static android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN;
-import static android.telephony.TelephonyManager.NETWORK_TYPE_EDGE;
-import static android.telephony.TelephonyManager.NETWORK_TYPE_GPRS;
-import static android.telephony.TelephonyManager.NETWORK_TYPE_UMTS;
-
-public class NeighboringCellInfoTest extends AndroidTestCase {
- @SmallTest
- public void testConstructor() {
- int rssi = 31;
- NeighboringCellInfo nc;
-
- nc = new NeighboringCellInfo(rssi, "FFFFFFF", NETWORK_TYPE_EDGE);
- assertEquals(NETWORK_TYPE_EDGE, nc.getNetworkType());
- assertEquals(rssi, nc.getRssi());
- assertEquals(0xfff, nc.getLac());
- assertEquals(0xffff, nc.getCid());
- assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getPsc());
-
- nc = new NeighboringCellInfo(rssi, "1FF", NETWORK_TYPE_UMTS);
- assertEquals(NETWORK_TYPE_UMTS, nc.getNetworkType());
- assertEquals(rssi, nc.getRssi());
- assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getCid());
- assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getLac());
- assertEquals(0x1ff, nc.getPsc());
-
- nc = new NeighboringCellInfo(rssi, "1FF", NETWORK_TYPE_UNKNOWN);
- assertEquals(NETWORK_TYPE_UNKNOWN, nc.getNetworkType());
- assertEquals(rssi, nc.getRssi());
- assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getCid());
- assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getLac());
- assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getPsc());
- }
-
- @SmallTest
- public void testParcel() {
- int rssi = 20;
-
- NeighboringCellInfo nc = new NeighboringCellInfo(rssi, "12345678", NETWORK_TYPE_GPRS);
- assertEquals(NETWORK_TYPE_GPRS, nc.getNetworkType());
- assertEquals(rssi, nc.getRssi());
- assertEquals(0x1234, nc.getLac());
- assertEquals(0x5678, nc.getCid());
- assertEquals(NeighboringCellInfo.UNKNOWN_CID, nc.getPsc());
-
- Parcel p = Parcel.obtain();
- p.setDataPosition(0);
- nc.writeToParcel(p, 0);
-
- p.setDataPosition(0);
- NeighboringCellInfo nw = new NeighboringCellInfo(p);
- assertEquals(NETWORK_TYPE_GPRS, nw.getNetworkType());
- assertEquals(rssi, nw.getRssi());
- assertEquals(0x1234, nw.getLac());
- assertEquals(0x5678, nw.getCid());
- assertEquals(NeighboringCellInfo.UNKNOWN_CID, nw.getPsc());
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/SSLClientSessionCacheFactoryTest.java b/tests/AndroidTests/src/com/android/unit_tests/SSLClientSessionCacheFactoryTest.java
deleted file mode 100644
index 5d7349f..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/SSLClientSessionCacheFactoryTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package com.android.unit_tests;
-
-import com.google.android.net.SSLClientSessionCacheFactory;
-import com.android.internal.net.DbSSLSessionCache;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.provider.Settings;
-import org.apache.harmony.xnet.provider.jsse.SSLClientSessionCache;
-
-/**
- * Unit test for {@link SSLClientSessionCacheFactory}.
- */
-@MediumTest
-public final class SSLClientSessionCacheFactoryTest extends AndroidTestCase {
-
- protected void tearDown() throws Exception {
- setSslSessionCacheValue(getContext(), "");
- super.tearDown();
- }
-
- private static void setSslSessionCacheValue(Context context, String value) {
- ContentResolver resolver = context.getContentResolver();
- Settings.Gservices.putString(resolver, Settings.Gservices.SSL_SESSION_CACHE, value);
- }
-
- private static SSLClientSessionCache getCache(Context context, String type) {
- setSslSessionCacheValue(context, type);
- return SSLClientSessionCacheFactory.getCache(context);
- }
-
- public void testGetDbCache() throws Exception {
- Context context = getContext();
- SSLClientSessionCache cache = getCache(context, "db");
- assertNotNull(cache);
- assertTrue(cache instanceof DbSSLSessionCache);
- }
-
- public void testGetFileCache() throws Exception {
- Context context = getContext();
- SSLClientSessionCache cache = getCache(context, "file");
- assertNotNull(cache);
- // yuck =)
- assertEquals("org.apache.harmony.xnet.provider.jsse.FileClientSessionCache$Impl",
- cache.getClass().getName());
- }
-
- public void testGetNoCache() throws Exception {
- Context context = getContext();
- SSLClientSessionCache cache = getCache(context, "none");
- assertNull(cache);
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/SettingsProviderTest.java b/tests/AndroidTests/src/com/android/unit_tests/SettingsProviderTest.java
index 8b1db97..7d828ec 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/SettingsProviderTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/SettingsProviderTest.java
@@ -31,16 +31,16 @@
@MediumTest
public void testNameValueCache() {
ContentResolver r = getContext().getContentResolver();
- Settings.Gservices.putString(r, "test_service", "Value");
- assertEquals("Value", Settings.Gservices.getString(r, "test_service"));
+ Settings.Secure.putString(r, "test_service", "Value");
+ assertEquals("Value", Settings.Secure.getString(r, "test_service"));
// Make sure the value can be overwritten.
- Settings.Gservices.putString(r, "test_service", "New");
- assertEquals("New", Settings.Gservices.getString(r, "test_service"));
+ Settings.Secure.putString(r, "test_service", "New");
+ assertEquals("New", Settings.Secure.getString(r, "test_service"));
// Also that delete works.
- assertEquals(1, r.delete(Settings.Gservices.getUriFor("test_service"), null, null));
- assertEquals(null, Settings.Gservices.getString(r, "test_service"));
+ assertEquals(1, r.delete(Settings.Secure.getUriFor("test_service"), null, null));
+ assertEquals(null, Settings.Secure.getString(r, "test_service"));
// Try all the same things in the System table
Settings.System.putString(r, "test_setting", "Value");
@@ -60,10 +60,10 @@
assertEquals("content://settings/system/test_setting",
Settings.System.getUriFor("test_setting").toString());
assertEquals("content://settings/gservices/test_service",
- Settings.Gservices.getUriFor("test_service").toString());
+ Settings.Secure.getUriFor("test_service").toString());
// These tables use the row name (not ID) as their content URI.
- Uri tables[] = { Settings.System.CONTENT_URI, Settings.Gservices.CONTENT_URI };
+ Uri tables[] = { Settings.System.CONTENT_URI, Settings.Secure.CONTENT_URI };
for (Uri table : tables) {
ContentValues v = new ContentValues();
v.put(Settings.System.NAME, "test_key");
@@ -119,7 +119,7 @@
}
assertEquals(null, Settings.System.getString(r, "test_key"));
- assertEquals(null, Settings.Gservices.getString(r, "test_key"));
+ assertEquals(null, Settings.Secure.getString(r, "test_key"));
}
@MediumTest
diff --git a/tests/AndroidTests/src/com/android/unit_tests/TestHttpServer.java b/tests/AndroidTests/src/com/android/unit_tests/TestHttpServer.java
deleted file mode 100644
index aae21b3..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/TestHttpServer.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * $HeadURL: http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/tags/4.0-alpha6/module-main/src/test/java/org/apache/http/mockup/TestHttpServer.java $
- * $Revision: 576077 $
- * $Date: 2007-09-16 04:50:22 -0700 (Sun, 16 Sep 2007) $
- *
- * ====================================================================
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-
-package com.android.unit_tests;
-
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-
-import org.apache.http.ConnectionClosedException;
-import org.apache.http.ConnectionReuseStrategy;
-import org.apache.http.HttpException;
-import org.apache.http.HttpResponseFactory;
-import org.apache.http.HttpServerConnection;
-import org.apache.http.impl.DefaultConnectionReuseStrategy;
-import org.apache.http.impl.DefaultHttpResponseFactory;
-import org.apache.http.impl.DefaultHttpServerConnection;
-import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.CoreConnectionPNames;
-import org.apache.http.params.HttpParams;
-import org.apache.http.params.CoreProtocolPNames;
-import org.apache.http.protocol.BasicHttpProcessor;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.protocol.BasicHttpContext;
-import org.apache.http.protocol.HttpExpectationVerifier;
-import org.apache.http.protocol.HttpRequestHandler;
-import org.apache.http.protocol.HttpRequestHandlerRegistry;
-import org.apache.http.protocol.HttpService;
-import org.apache.http.protocol.ResponseConnControl;
-import org.apache.http.protocol.ResponseContent;
-import org.apache.http.protocol.ResponseDate;
-import org.apache.http.protocol.ResponseServer;
-
-public class TestHttpServer {
-
- private final HttpParams params;
- private final BasicHttpProcessor httpproc;
- private final ConnectionReuseStrategy connStrategy;
- private final HttpResponseFactory responseFactory;
- private final HttpRequestHandlerRegistry reqistry;
- private final ServerSocket serversocket;
-
- private HttpExpectationVerifier expectationVerifier;
-
- private Thread listener;
- private volatile boolean shutdown;
-
- public TestHttpServer() throws IOException {
- super();
- this.params = new BasicHttpParams();
- this.params
- .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 20000)
- .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024)
- .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false)
- .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)
- .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "TEST-SERVER/1.1");
- this.httpproc = new BasicHttpProcessor();
- this.httpproc.addInterceptor(new ResponseDate());
- this.httpproc.addInterceptor(new ResponseServer());
- this.httpproc.addInterceptor(new ResponseContent());
- this.httpproc.addInterceptor(new ResponseConnControl());
- this.connStrategy = new DefaultConnectionReuseStrategy();
- this.responseFactory = new DefaultHttpResponseFactory();
- this.reqistry = new HttpRequestHandlerRegistry();
- this.serversocket = new ServerSocket(0);
- }
-
- public void registerHandler(
- final String pattern,
- final HttpRequestHandler handler) {
- this.reqistry.register(pattern, handler);
- }
-
- public void setExpectationVerifier(final HttpExpectationVerifier expectationVerifier) {
- this.expectationVerifier = expectationVerifier;
- }
-
- private HttpServerConnection acceptConnection() throws IOException {
- Socket socket = this.serversocket.accept();
- DefaultHttpServerConnection conn = new DefaultHttpServerConnection();
- conn.bind(socket, this.params);
- return conn;
- }
-
- public int getPort() {
- return this.serversocket.getLocalPort();
- }
-
- public InetAddress getInetAddress() {
- return this.serversocket.getInetAddress();
- }
-
- public void start() {
- if (this.listener != null) {
- throw new IllegalStateException("Listener already running");
- }
- this.listener = new Thread(new Runnable() {
-
- public void run() {
- while (!shutdown && !Thread.interrupted()) {
- try {
- // Set up HTTP connection
- HttpServerConnection conn = acceptConnection();
- // Set up the HTTP service
- HttpService httpService = new HttpService(
- httpproc,
- connStrategy,
- responseFactory);
- httpService.setParams(params);
- httpService.setExpectationVerifier(expectationVerifier);
- httpService.setHandlerResolver(reqistry);
-
- // Start worker thread
- Thread t = new WorkerThread(httpService, conn);
- t.setDaemon(true);
- t.start();
- } catch (InterruptedIOException ex) {
- break;
- } catch (IOException e) {
- break;
- }
- }
- }
-
- });
- this.listener.start();
- }
-
- public void shutdown() {
- if (this.shutdown) {
- return;
- }
- this.shutdown = true;
- try {
- this.serversocket.close();
- } catch (IOException ignore) {}
- this.listener.interrupt();
- try {
- this.listener.join(1000);
- } catch (InterruptedException ignore) {}
- }
-
- static class WorkerThread extends Thread {
-
- private final HttpService httpservice;
- private final HttpServerConnection conn;
-
- public WorkerThread(
- final HttpService httpservice,
- final HttpServerConnection conn) {
- super();
- this.httpservice = httpservice;
- this.conn = conn;
- }
-
- public void run() {
- HttpContext context = new BasicHttpContext(null);
- try {
- while (!Thread.interrupted() && this.conn.isOpen()) {
- this.httpservice.handleRequest(this.conn, context);
- }
- } catch (ConnectionClosedException ex) {
- } catch (IOException ex) {
- System.err.println("I/O error: " + ex.getMessage());
- } catch (HttpException ex) {
- System.err.println("Unrecoverable HTTP protocol violation: " + ex.getMessage());
- } finally {
- try {
- this.conn.shutdown();
- } catch (IOException ignore) {}
- }
- }
-
- }
-
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/TestHttpService.java b/tests/AndroidTests/src/com/android/unit_tests/TestHttpService.java
deleted file mode 100644
index 6b57d13..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/TestHttpService.java
+++ /dev/null
@@ -1,608 +0,0 @@
-/*
- * $HeadURL: http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpcore/tags/4.0-alpha6/module-main/src/test/java/org/apache/http/protocol/TestHttpServiceAndExecutor.java $
- * $Revision: 576073 $
- * $Date: 2007-09-16 03:53:13 -0700 (Sun, 16 Sep 2007) $
- * ====================================================================
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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 software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-
-package com.android.unit_tests;
-
-import org.apache.http.protocol.HttpExpectationVerifier;
-import org.apache.http.protocol.HttpRequestHandler;
-import android.test.PerformanceTestCase;
-import android.test.suitebuilder.annotation.LargeTest;
-import android.test.suitebuilder.annotation.MediumTest;
-
-import junit.framework.TestCase;
-
-import org.apache.http.Header;
-import org.apache.http.HttpConnectionMetrics;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpEntityEnclosingRequest;
-import org.apache.http.HttpException;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpStatus;
-import org.apache.http.HttpVersion;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.DefaultHttpClientConnection;
-import org.apache.http.message.BasicHttpEntityEnclosingRequest;
-import org.apache.http.message.BasicHttpRequest;
-import org.apache.http.params.CoreProtocolPNames;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.util.EncodingUtils;
-import org.apache.http.util.EntityUtils;
-
-
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-public class TestHttpService extends TestCase implements PerformanceTestCase {
-
- public boolean isPerformanceOnly() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public int startPerformance(Intermediates intermediates) {
- // TODO Auto-generated method stub
- return 0;
- }
-
- private TestHttpServer server;
- private TestHttpClient client;
-
- protected void setUp() throws Exception {
- this.server = new TestHttpServer();
- this.client = new TestHttpClient();
- }
-
- protected void tearDown() throws Exception {
- if (server != null) {
- this.server.shutdown();
- }
- }
-
- /**
- * This test case executes a series of simple GET requests
- */
- @LargeTest
- public void testSimpleBasicHttpRequests() throws Exception {
-
- int reqNo = 20;
-
- Random rnd = new Random();
-
- // Prepare some random data
- final List testData = new ArrayList(reqNo);
- for (int i = 0; i < reqNo; i++) {
- int size = rnd.nextInt(5000);
- byte[] data = new byte[size];
- rnd.nextBytes(data);
- testData.add(data);
- }
-
- // Initialize the server-side request handler
- this.server.registerHandler("*", new HttpRequestHandler() {
-
- public void handle(
- final HttpRequest request,
- final HttpResponse response,
- final HttpContext context) throws HttpException, IOException {
-
- String s = request.getRequestLine().getUri();
- if (s.startsWith("/?")) {
- s = s.substring(2);
- }
- int index = Integer.parseInt(s);
- byte[] data = (byte []) testData.get(index);
- ByteArrayEntity entity = new ByteArrayEntity(data);
- response.setEntity(entity);
- }
-
- });
-
- this.server.start();
-
- DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
- HttpHost host = new HttpHost("localhost", this.server.getPort());
-
- try {
- for (int r = 0; r < reqNo; r++) {
- if (!conn.isOpen()) {
- Socket socket = new Socket(host.getHostName(), host.getPort());
- conn.bind(socket, this.client.getParams());
- }
-
- BasicHttpRequest get = new BasicHttpRequest("GET", "/?" + r);
- HttpResponse response = this.client.execute(get, host, conn);
- byte[] received = EntityUtils.toByteArray(response.getEntity());
- byte[] expected = (byte[]) testData.get(r);
-
- assertEquals(expected.length, received.length);
- for (int i = 0; i < expected.length; i++) {
- assertEquals(expected[i], received[i]);
- }
- if (!this.client.keepAlive(response)) {
- conn.close();
- }
- }
-
- //Verify the connection metrics
- HttpConnectionMetrics cm = conn.getMetrics();
- assertEquals(reqNo, cm.getRequestCount());
- assertEquals(reqNo, cm.getResponseCount());
-
- } finally {
- conn.close();
- this.server.shutdown();
- }
- }
-
- /**
- * This test case executes a series of simple POST requests with content length
- * delimited content.
- */
- @LargeTest
- public void testSimpleHttpPostsWithContentLength() throws Exception {
-
- int reqNo = 20;
-
- Random rnd = new Random();
-
- // Prepare some random data
- List testData = new ArrayList(reqNo);
- for (int i = 0; i < reqNo; i++) {
- int size = rnd.nextInt(5000);
- byte[] data = new byte[size];
- rnd.nextBytes(data);
- testData.add(data);
- }
-
- // Initialize the server-side request handler
- this.server.registerHandler("*", new HttpRequestHandler() {
-
- public void handle(
- final HttpRequest request,
- final HttpResponse response,
- final HttpContext context) throws HttpException, IOException {
-
- if (request instanceof HttpEntityEnclosingRequest) {
- HttpEntity incoming = ((HttpEntityEnclosingRequest) request).getEntity();
- byte[] data = EntityUtils.toByteArray(incoming);
-
- ByteArrayEntity outgoing = new ByteArrayEntity(data);
- outgoing.setChunked(false);
- response.setEntity(outgoing);
- } else {
- StringEntity outgoing = new StringEntity("No content");
- response.setEntity(outgoing);
- }
- }
-
- });
-
- this.server.start();
-
- DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
- HttpHost host = new HttpHost("localhost", this.server.getPort());
-
- try {
- for (int r = 0; r < reqNo; r++) {
- if (!conn.isOpen()) {
- Socket socket = new Socket(host.getHostName(), host.getPort());
- conn.bind(socket, this.client.getParams());
- }
-
- BasicHttpEntityEnclosingRequest post = new BasicHttpEntityEnclosingRequest("POST", "/");
- byte[] data = (byte[]) testData.get(r);
- ByteArrayEntity outgoing = new ByteArrayEntity(data);
- post.setEntity(outgoing);
-
- HttpResponse response = this.client.execute(post, host, conn);
- byte[] received = EntityUtils.toByteArray(response.getEntity());
- byte[] expected = (byte[]) testData.get(r);
-
- assertEquals(expected.length, received.length);
- for (int i = 0; i < expected.length; i++) {
- assertEquals(expected[i], received[i]);
- }
- if (!this.client.keepAlive(response)) {
- conn.close();
- }
- }
- //Verify the connection metrics
- HttpConnectionMetrics cm = conn.getMetrics();
- assertEquals(reqNo, cm.getRequestCount());
- assertEquals(reqNo, cm.getResponseCount());
-
- } finally {
- conn.close();
- this.server.shutdown();
- }
- }
-
- /**
- * This test case executes a series of simple POST requests with chunk
- * coded content content.
- */
- @LargeTest
- public void testSimpleHttpPostsChunked() throws Exception {
-
- int reqNo = 20;
-
- Random rnd = new Random();
-
- // Prepare some random data
- List testData = new ArrayList(reqNo);
- for (int i = 0; i < reqNo; i++) {
- int size = rnd.nextInt(20000);
- byte[] data = new byte[size];
- rnd.nextBytes(data);
- testData.add(data);
- }
-
- // Initialize the server-side request handler
- this.server.registerHandler("*", new HttpRequestHandler() {
-
- public void handle(
- final HttpRequest request,
- final HttpResponse response,
- final HttpContext context) throws HttpException, IOException {
-
- if (request instanceof HttpEntityEnclosingRequest) {
- HttpEntity incoming = ((HttpEntityEnclosingRequest) request).getEntity();
- byte[] data = EntityUtils.toByteArray(incoming);
-
- ByteArrayEntity outgoing = new ByteArrayEntity(data);
- outgoing.setChunked(true);
- response.setEntity(outgoing);
- } else {
- StringEntity outgoing = new StringEntity("No content");
- response.setEntity(outgoing);
- }
- }
-
- });
-
- this.server.start();
-
- DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
- HttpHost host = new HttpHost("localhost", this.server.getPort());
-
- try {
- for (int r = 0; r < reqNo; r++) {
- if (!conn.isOpen()) {
- Socket socket = new Socket(host.getHostName(), host.getPort());
- conn.bind(socket, this.client.getParams());
- }
-
- BasicHttpEntityEnclosingRequest post = new BasicHttpEntityEnclosingRequest("POST", "/");
- byte[] data = (byte[]) testData.get(r);
- ByteArrayEntity outgoing = new ByteArrayEntity(data);
- outgoing.setChunked(true);
- post.setEntity(outgoing);
-
- HttpResponse response = this.client.execute(post, host, conn);
- byte[] received = EntityUtils.toByteArray(response.getEntity());
- byte[] expected = (byte[]) testData.get(r);
-
- assertEquals(expected.length, received.length);
- for (int i = 0; i < expected.length; i++) {
- assertEquals(expected[i], received[i]);
- }
- if (!this.client.keepAlive(response)) {
- conn.close();
- }
- }
- //Verify the connection metrics
- HttpConnectionMetrics cm = conn.getMetrics();
- assertEquals(reqNo, cm.getRequestCount());
- assertEquals(reqNo, cm.getResponseCount());
- } finally {
- conn.close();
- this.server.shutdown();
- }
- }
-
- /**
- * This test case executes a series of simple HTTP/1.0 POST requests.
- */
- @LargeTest
- public void testSimpleHttpPostsHTTP10() throws Exception {
-
- int reqNo = 20;
-
- Random rnd = new Random();
-
- // Prepare some random data
- List testData = new ArrayList(reqNo);
- for (int i = 0; i < reqNo; i++) {
- int size = rnd.nextInt(5000);
- byte[] data = new byte[size];
- rnd.nextBytes(data);
- testData.add(data);
- }
-
- // Initialize the server-side request handler
- this.server.registerHandler("*", new HttpRequestHandler() {
-
- public void handle(
- final HttpRequest request,
- final HttpResponse response,
- final HttpContext context) throws HttpException, IOException {
-
- if (request instanceof HttpEntityEnclosingRequest) {
- HttpEntity incoming = ((HttpEntityEnclosingRequest) request).getEntity();
- byte[] data = EntityUtils.toByteArray(incoming);
-
- ByteArrayEntity outgoing = new ByteArrayEntity(data);
- outgoing.setChunked(false);
- response.setEntity(outgoing);
- } else {
- StringEntity outgoing = new StringEntity("No content");
- response.setEntity(outgoing);
- }
- }
-
- });
-
- this.server.start();
-
- // Set protocol level to HTTP/1.0
- this.client.getParams().setParameter(
- CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_0);
-
- DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
- HttpHost host = new HttpHost("localhost", this.server.getPort());
-
- try {
- for (int r = 0; r < reqNo; r++) {
- if (!conn.isOpen()) {
- Socket socket = new Socket(host.getHostName(), host.getPort());
- conn.bind(socket, this.client.getParams());
- }
-
- BasicHttpEntityEnclosingRequest post = new BasicHttpEntityEnclosingRequest("POST", "/");
- byte[] data = (byte[]) testData.get(r);
- ByteArrayEntity outgoing = new ByteArrayEntity(data);
- post.setEntity(outgoing);
-
- HttpResponse response = this.client.execute(post, host, conn);
- assertEquals(HttpVersion.HTTP_1_0, response.getStatusLine().getProtocolVersion());
- byte[] received = EntityUtils.toByteArray(response.getEntity());
- byte[] expected = (byte[]) testData.get(r);
-
- assertEquals(expected.length, received.length);
- for (int i = 0; i < expected.length; i++) {
- assertEquals(expected[i], received[i]);
- }
- if (!this.client.keepAlive(response)) {
- conn.close();
- }
- }
-
- //Verify the connection metrics
- HttpConnectionMetrics cm = conn.getMetrics();
- assertEquals(reqNo, cm.getRequestCount());
- assertEquals(reqNo, cm.getResponseCount());
- } finally {
- conn.close();
- this.server.shutdown();
- }
- }
-
- /**
- * This test case executes a series of simple POST requests using
- * the 'expect: continue' handshake.
- */
- @LargeTest
- public void testHttpPostsWithExpectContinue() throws Exception {
-
- int reqNo = 20;
-
- Random rnd = new Random();
-
- // Prepare some random data
- List testData = new ArrayList(reqNo);
- for (int i = 0; i < reqNo; i++) {
- int size = rnd.nextInt(5000);
- byte[] data = new byte[size];
- rnd.nextBytes(data);
- testData.add(data);
- }
-
- // Initialize the server-side request handler
- this.server.registerHandler("*", new HttpRequestHandler() {
-
- public void handle(
- final HttpRequest request,
- final HttpResponse response,
- final HttpContext context) throws HttpException, IOException {
-
- if (request instanceof HttpEntityEnclosingRequest) {
- HttpEntity incoming = ((HttpEntityEnclosingRequest) request).getEntity();
- byte[] data = EntityUtils.toByteArray(incoming);
-
- ByteArrayEntity outgoing = new ByteArrayEntity(data);
- outgoing.setChunked(true);
- response.setEntity(outgoing);
- } else {
- StringEntity outgoing = new StringEntity("No content");
- response.setEntity(outgoing);
- }
- }
-
- });
-
- this.server.start();
-
- // Activate 'expect: continue' handshake
- this.client.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, true);
-
- DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
- HttpHost host = new HttpHost("localhost", this.server.getPort());
-
- try {
- for (int r = 0; r < reqNo; r++) {
- if (!conn.isOpen()) {
- Socket socket = new Socket(host.getHostName(), host.getPort());
- conn.bind(socket, this.client.getParams());
- }
-
- BasicHttpEntityEnclosingRequest post = new BasicHttpEntityEnclosingRequest("POST", "/");
- byte[] data = (byte[]) testData.get(r);
- ByteArrayEntity outgoing = new ByteArrayEntity(data);
- outgoing.setChunked(true);
- post.setEntity(outgoing);
-
- HttpResponse response = this.client.execute(post, host, conn);
- byte[] received = EntityUtils.toByteArray(response.getEntity());
- byte[] expected = (byte[]) testData.get(r);
-
- assertEquals(expected.length, received.length);
- for (int i = 0; i < expected.length; i++) {
- assertEquals(expected[i], received[i]);
- }
- if (!this.client.keepAlive(response)) {
- conn.close();
- }
- }
-
- //Verify the connection metrics
- HttpConnectionMetrics cm = conn.getMetrics();
- assertEquals(reqNo, cm.getRequestCount());
- assertEquals(reqNo, cm.getResponseCount());
- } finally {
- conn.close();
- this.server.shutdown();
- }
- }
-
-
- /**
- * This test case executes a series of simple POST requests that do not
- * meet the target server expectations.
- */
- @LargeTest
- public void testHttpPostsWithExpectationVerification() throws Exception {
-
- int reqNo = 3;
-
- // Initialize the server-side request handler
- this.server.registerHandler("*", new HttpRequestHandler() {
-
- public void handle(
- final HttpRequest request,
- final HttpResponse response,
- final HttpContext context) throws HttpException, IOException {
-
- StringEntity outgoing = new StringEntity("No content");
- response.setEntity(outgoing);
- }
-
- });
-
- this.server.setExpectationVerifier(new HttpExpectationVerifier() {
-
- public void verify(
- final HttpRequest request,
- final HttpResponse response,
- final HttpContext context) throws HttpException {
- Header someheader = request.getFirstHeader("Secret");
- if (someheader != null) {
- int secretNumber;
- try {
- secretNumber = Integer.parseInt(someheader.getValue());
- } catch (NumberFormatException ex) {
- response.setStatusCode(HttpStatus.SC_BAD_REQUEST);
- return;
- }
- if (secretNumber < 2) {
- response.setStatusCode(HttpStatus.SC_EXPECTATION_FAILED);
- ByteArrayEntity outgoing = new ByteArrayEntity(
- EncodingUtils.getAsciiBytes("Wrong secret number"));
- response.setEntity(outgoing);
- }
- }
- }
-
- });
-
- this.server.start();
-
- // Activate 'expect: continue' handshake
- this.client.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, true);
-
- DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
- HttpHost host = new HttpHost("localhost", this.server.getPort());
-
- try {
- for (int r = 0; r < reqNo; r++) {
- if (!conn.isOpen()) {
- Socket socket = new Socket(host.getHostName(), host.getPort());
- conn.bind(socket, this.client.getParams());
- }
-
- BasicHttpEntityEnclosingRequest post = new BasicHttpEntityEnclosingRequest("POST", "/");
- post.addHeader("Secret", Integer.toString(r));
- ByteArrayEntity outgoing = new ByteArrayEntity(
- EncodingUtils.getAsciiBytes("No content"));
- post.setEntity(outgoing);
-
- HttpResponse response = this.client.execute(post, host, conn);
-
- HttpEntity entity = response.getEntity();
- assertNotNull(entity);
- entity.consumeContent();
-
- if (r < 2) {
- assertEquals(HttpStatus.SC_EXPECTATION_FAILED, response.getStatusLine().getStatusCode());
- } else {
- assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
- }
-
- if (!this.client.keepAlive(response)) {
- conn.close();
- }
- }
- //Verify the connection metrics
- HttpConnectionMetrics cm = conn.getMetrics();
- assertEquals(reqNo, cm.getRequestCount());
- assertEquals(reqNo, cm.getResponseCount());
- } finally {
- conn.close();
- this.server.shutdown();
- }
- }
-
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/UrlRulesTest.java b/tests/AndroidTests/src/com/android/unit_tests/UrlRulesTest.java
deleted file mode 100644
index a7c19a7..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/UrlRulesTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.unit_tests;
-
-import android.content.ContentResolver;
-import android.provider.Settings;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import com.google.android.net.UrlRules;
-import static com.google.android.net.UrlRules.Rule;
-
-/** Test loading and matching URL rewrite rules for UrlRules. */
-public class UrlRulesTest extends AndroidTestCase {
- @SmallTest
- public void testEmptyRules() {
- UrlRules rules = new UrlRules(new Rule[] { });
- assertTrue(rules.matchRule("http://foo.bar/") == Rule.DEFAULT);
- }
-
- @SmallTest
- public void testInvalidRule() throws Exception {
- try {
- new Rule("rule", "foo bar");
- } catch (Exception e) {
- // Re-throw any exception except the one we're looking for.
- if (!e.toString().contains("Illegal rule: foo bar")) throw e;
- }
- }
-
- @SmallTest
- public void testRewriteRule() throws UrlRules.RuleFormatException {
- Rule rule = new Rule("test_rule",
- "http://foo.bar/ rewrite http://bar.foo/");
- assertEquals("test_rule", rule.mName);
- assertEquals("http://foo.bar/", rule.mPrefix);
- assertEquals("http://bar.foo/", rule.mRewrite);
- assertFalse(rule.mBlock);
- assertEquals("http://bar.foo/bat", rule.apply("http://foo.bar/bat"));
- }
-
- @SmallTest
- public void testBlockRule() throws UrlRules.RuleFormatException {
- Rule rule = new Rule("test_rule",
- "http://foo.bar/ block");
- assertEquals("test_rule", rule.mName);
- assertEquals("http://foo.bar/", rule.mPrefix);
- assertTrue(rule.mRewrite == null);
- assertTrue(rule.mBlock);
- assertTrue(rule.apply("http://foo.bar/bat") == null);
- }
-
- @SmallTest
- public void testMatchRule() throws UrlRules.RuleFormatException {
- UrlRules rules = new UrlRules(new Rule[] {
- new Rule("12", "http://one.two/ rewrite http://buckle.my.shoe/"),
- new Rule("34", "http://three.four/ rewrite http://close.the.door/"),
- new Rule("56", "http://five.six/ rewrite http://pick.up.sticks/"),
- });
-
- assertTrue(rules.matchRule("https://one.two/") == Rule.DEFAULT);
- assertTrue(rules.matchRule("http://one.two") == Rule.DEFAULT);
- assertEquals("12", rules.matchRule("http://one.two/foo").mName);
-
- String u = "http://five.six/bar";
- assertEquals("http://pick.up.sticks/bar", rules.matchRule(u).apply(u));
- }
-
- @SmallTest
- public void testAmbiguousMatch() throws UrlRules.RuleFormatException {
- // Rule is the longest match wins.
- UrlRules rules = new UrlRules(new Rule[] {
- new Rule("1", "http://xyz/one rewrite http://rewrite/"),
- new Rule("123", "http://xyz/onetwothree rewrite http://rewrite/"),
- new Rule("12", "http://xyz/onetwo rewrite http://rewrite/"),
- });
-
- assertEquals("1", rules.matchRule("http://xyz/one").mName);
- assertEquals("1", rules.matchRule("http://xyz/one...").mName);
- assertEquals("12", rules.matchRule("http://xyz/onetwo...").mName);
- assertEquals("123", rules.matchRule("http://xyz/onetwothree...").mName);
-
- }
-
- @MediumTest
- public void testGservicesRules() {
- // TODO: use a MockContentProvider/MockContentResolver instead.
- ContentResolver r = getContext().getContentResolver();
-
- // Update the digest, so the UrlRules cache is reloaded.
- Settings.Gservices.putString(r, "digest", "testGservicesRules");
- Settings.Gservices.putString(r, "url:blank_test", "");
- Settings.Gservices.putString(r, "url:test",
- "http://foo.bar/ rewrite http://bar.foo/");
-
- UrlRules rules = UrlRules.getRules(r); // Don't crash, please. :)
- assertTrue(rules.matchRule("http://bar.foo/") == Rule.DEFAULT);
-
- Rule rule = rules.matchRule("http://foo.bar/bat");
- assertEquals("test", rule.mName);
- assertEquals("http://foo.bar/", rule.mPrefix);
- assertEquals("http://bar.foo/", rule.mRewrite);
- assertFalse(rule.mBlock);
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/content/ArrayTest.java b/tests/AndroidTests/src/com/android/unit_tests/content/ArrayTest.java
deleted file mode 100644
index 4d5b5e7..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/content/ArrayTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.unit_tests.content;
-
-import android.content.res.Resources;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.util.TypedValue;
-import com.android.unit_tests.R;
-
-public class ArrayTest extends AndroidTestCase {
- private Resources mResources;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- mResources = mContext.getResources();
- }
-
- private void checkEntry(int resid, int index, Object res, Object expected) {
- assertEquals("in resource 0x" + Integer.toHexString(resid)
- + " at index " + index, expected, res);
- }
-
- private void checkStringArray(int resid, String[] expected) {
- String[] res = mResources.getStringArray(resid);
- assertEquals(res.length, expected.length);
- for (int i=0; i<expected.length; i++) {
- checkEntry(resid, i, res[i], expected[i]);
- }
- }
-
- private void checkTextArray(int resid, String[] expected) {
- CharSequence[] res = mResources.getTextArray(resid);
- assertEquals(res.length, expected.length);
- for (int i=0; i<expected.length; i++) {
- checkEntry(resid, i, res[i], expected[i]);
- }
- }
-
- private void checkIntArray(int resid, int[] expected) {
- int[] res = mResources.getIntArray(resid);
- assertEquals(res.length, expected.length);
- for (int i=0; i<expected.length; i++) {
- assertEquals("in resource 0x" + Integer.toHexString(resid)
- + " at index " + i, expected[i], res[i]);
- }
- }
-
- @SmallTest
- public void testStrings() throws Exception {
- checkStringArray(R.array.strings, new String[] {"zero", "1", "here"});
- checkTextArray(R.array.strings, new String[] {"zero", "1", "here"});
- checkStringArray(R.array.integers, new String[] {null, null, null});
- checkTextArray(R.array.integers, new String[] {null, null, null});
- }
-
- @SmallTest
- public void testIntegers() throws Exception {
- checkIntArray(R.array.strings, new int[] {0, 0, 0});
- checkIntArray(R.array.integers, new int[] {0, 1, 101});
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/content/ConfigTest.java b/tests/AndroidTests/src/com/android/unit_tests/content/ConfigTest.java
deleted file mode 100644
index a065d70..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/content/ConfigTest.java
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.unit_tests.content;
-
-import android.content.Context;
-import android.content.res.AssetManager;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.content.res.TypedArray;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.util.DisplayMetrics;
-import android.view.Display;
-import android.view.WindowManager;
-import com.android.unit_tests.R;
-
-import java.util.Locale;
-
-public class ConfigTest extends AndroidTestCase {
- enum properties {
- LANGUAGE,
- COUNTRY,
- MCC,
- MNC,
- TOUCHSCREEN,
- KEYBOARD,
- KEYBOARDHIDDEN,
- NAVIGATION,
- ORIENTATION,
- WIDTH,
- HEIGHT,
- DENSITY
- }
-
- private static void checkValue(Resources res, int resId, String expectedValue) {
- try {
- String actual = res.getString(resId);
- assertNotNull("Returned wrong configuration-based simple value: expected <nothing>, got '"
- + actual + "' from resource 0x"
- + Integer.toHexString(resId),
- expectedValue);
- assertEquals("Returned wrong configuration-based simple value: expected '"
- + expectedValue + "', got '" + actual + "' from resource 0x"
- + Integer.toHexString(resId),
- expectedValue, actual);
- } catch (Resources.NotFoundException e) {
- assertNull("Resource not found for configuration-based simple value: expecting \""
- + expectedValue + "\"",
- expectedValue);
- }
- }
-
- private static void checkValue(Resources res, int resId,
- int[] styleable, String[] expectedValues) {
- Resources.Theme theme = res.newTheme();
- TypedArray sa = theme.obtainStyledAttributes(resId, styleable);
- for (int i = 0; i < styleable.length; i++) {
- String actual = sa.getString(i);
- assertEquals("Returned wrong configuration-based style value: expected '"
- + expectedValues[i] + "', got '" + actual + "' from attr "
- + i + " of resource 0x" + Integer.toHexString(resId),
- actual, expectedValues[i]);
- }
- sa.recycle();
- }
-
- class TotalConfig {
- Configuration mConfig;
- DisplayMetrics mMetrics;
-
- TotalConfig() {
- mConfig = new Configuration();
- // don't rely on build settings - they may change
- mConfig.locale = new Locale("en", "US");
- mConfig.mcc = 310;
- mConfig.mnc = 001; // unused
- mConfig.touchscreen = Configuration.TOUCHSCREEN_FINGER;
- mConfig.keyboard = Configuration.KEYBOARD_QWERTY;
- mConfig.keyboardHidden = Configuration.KEYBOARDHIDDEN_YES;
- mConfig.navigation = Configuration.NAVIGATION_TRACKBALL;
- mConfig.orientation = Configuration.ORIENTATION_PORTRAIT;
-
- mMetrics = new DisplayMetrics();
- mMetrics.widthPixels = 200;
- mMetrics.heightPixels = 320;
- mMetrics.density = 1;
- }
-
- void setProperty(properties p, int value) {
- switch(p) {
- case MCC:
- mConfig.mcc = value;
- break;
- case MNC:
- mConfig.mnc = value;
- break;
- case TOUCHSCREEN:
- mConfig.touchscreen = value;
- break;
- case KEYBOARD:
- mConfig.keyboard = value;
- break;
- case KEYBOARDHIDDEN:
- mConfig.keyboardHidden = value;
- break;
- case NAVIGATION:
- mConfig.navigation = value;
- break;
- case ORIENTATION:
- mConfig.orientation = value;
- break;
- case WIDTH:
- mMetrics.widthPixels = value;
- break;
- case HEIGHT:
- mMetrics.heightPixels = value;
- break;
- case DENSITY:
- // this is the ratio from the standard
-
- mMetrics.density = (((float)value)/((float)DisplayMetrics.DENSITY_DEFAULT));
- break;
- default:
- assert(false);
- break;
- }
- }
-
- public void setProperty(properties p, String value) {
- switch(p) {
- case LANGUAGE:
- String oldCountry = mConfig.locale.getCountry();
- mConfig.locale = new Locale(value, oldCountry);
- break;
- case COUNTRY:
- String oldLanguage = mConfig.locale.getLanguage();
- mConfig.locale = new Locale(oldLanguage, value);
- break;
- default:
- assert(false);
- break;
- }
- }
-
- public Resources getResources() {
- AssetManager assmgr = new AssetManager();
- assmgr.addAssetPath(mContext.getPackageResourcePath());
- return new Resources(assmgr, mMetrics, mConfig);
- }
- }
-
- private static void checkPair(Resources res, int[] notResIds,
- int simpleRes, String simpleString,
- int bagRes, String bagString) {
- boolean willHave = true;
- if (notResIds != null) {
- for (int i : notResIds) {
- if (i == simpleRes) {
- willHave = false;
- break;
- }
- }
- }
- checkValue(res, simpleRes, willHave ? simpleString : null);
- checkValue(res, bagRes, R.styleable.TestConfig,
- new String[]{willHave ? bagString : null});
- }
-
- @SmallTest
- public void testAllConfigs() throws Exception {
- /**
- * Test a resource that contains a value for each possible single
- * configuration value.
- */
- TotalConfig config = new TotalConfig();
- Resources res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple default");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag default"});
-
- config = new TotalConfig();
- config.setProperty(properties.LANGUAGE, "xx");
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple xx");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag xx"});
-
- config = new TotalConfig();
- config.setProperty(properties.LANGUAGE, "xx");
- config.setProperty(properties.COUNTRY, "YY");
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple xx-rYY");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag xx-rYY"});
-
- config = new TotalConfig();
- config.setProperty(properties.MCC, 111);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple mcc111");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag mcc111"});
-
- config = new TotalConfig();
- config.setProperty(properties.MNC, 222);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple mnc222");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag mnc222"});
-
- config = new TotalConfig();
- config.setProperty(properties.TOUCHSCREEN, Configuration.TOUCHSCREEN_NOTOUCH);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple notouch");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag notouch"});
-
- config = new TotalConfig();
- config.setProperty(properties.TOUCHSCREEN, Configuration.TOUCHSCREEN_STYLUS);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple stylus");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag stylus"});
-
- config = new TotalConfig();
- config.setProperty(properties.KEYBOARD, Configuration.KEYBOARD_NOKEYS);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple nokeys");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag nokeys"});
-
- config = new TotalConfig();
- config.setProperty(properties.KEYBOARD, Configuration.KEYBOARD_12KEY);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 12key");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 12key"});
-
- config = new TotalConfig();
- config.setProperty(properties.KEYBOARDHIDDEN, Configuration.KEYBOARDHIDDEN_NO);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple keysexposed");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag keysexposed"});
-
- config = new TotalConfig();
- config.setProperty(properties.NAVIGATION, Configuration.NAVIGATION_NONAV);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple nonav");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag nonav"});
-
- config = new TotalConfig();
- config.setProperty(properties.NAVIGATION, Configuration.NAVIGATION_DPAD);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple dpad");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag dpad"});
-
- config = new TotalConfig();
- config.setProperty(properties.NAVIGATION, Configuration.NAVIGATION_WHEEL);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple wheel");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag wheel"});
-
- config = new TotalConfig();
- config.setProperty(properties.HEIGHT, 480);
- config.setProperty(properties.WIDTH, 320);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 480x320");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 480x320"});
-
- config = new TotalConfig();
- config.setProperty(properties.DENSITY, 240);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 240dpi");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 240dpi"});
-
- config = new TotalConfig();
- config.setProperty(properties.ORIENTATION, Configuration.ORIENTATION_LANDSCAPE);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple landscape");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag landscape"});
-
- config = new TotalConfig();
- config.setProperty(properties.ORIENTATION, Configuration.ORIENTATION_SQUARE);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple square");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag square"});
- }
-
- @MediumTest
- public void testDensity() throws Exception {
- // have 32, 240 and the default 160 content.
- // rule is that closest wins, with down scaling (larger content)
- // being twice as nice as upscaling.
- // transition at H/2 * (-1 +/- sqrt(1+8L/H))
- // SO, X < 49 goes to 32
- // 49 >= X < 182 goes to 160
- // X >= 182 goes to 240
- TotalConfig config = new TotalConfig();
- config.setProperty(properties.DENSITY, 2);
- Resources res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 32dpi");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 32dpi"});
-
- config = new TotalConfig();
- config.setProperty(properties.DENSITY, 32);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 32dpi");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 32dpi"});
-
- config = new TotalConfig();
- config.setProperty(properties.DENSITY, 48);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 32dpi");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 32dpi"});
-
- config = new TotalConfig();
- config.setProperty(properties.DENSITY, 49);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple default");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag default"});
-
- config = new TotalConfig();
- config.setProperty(properties.DENSITY, 150);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple default");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag default"});
-
- config = new TotalConfig();
- config.setProperty(properties.DENSITY, 181);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple default");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag default"});
-
- config = new TotalConfig();
- config.setProperty(properties.DENSITY, 182);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 240dpi");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 240dpi"});
-
- config = new TotalConfig();
- config.setProperty(properties.DENSITY, 239);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 240dpi");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 240dpi"});
-
- config = new TotalConfig();
- config.setProperty(properties.DENSITY, 490);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 240dpi");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 240dpi"});
- }
-
-// TODO - add tests for special cases - ie, other key params seem ignored if
-// nokeys is set
-
- @MediumTest
- public void testCombinations() throws Exception {
- /**
- * Verify that proper strings are found for multiple-selectivity case
- * (ie, a string set for locale and mcc is found only when both are
- * true).
- */
- TotalConfig config = new TotalConfig();
- config.setProperty(properties.LANGUAGE, "xx");
- config.setProperty(properties.COUNTRY, "YY");
- config.setProperty(properties.MCC, 111);
- Resources res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple mcc111 xx-rYY");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag mcc111 xx-rYY"});
-
- config = new TotalConfig();
- config.setProperty(properties.LANGUAGE, "xx");
- config.setProperty(properties.COUNTRY, "YY");
- config.setProperty(properties.MCC, 333);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple xx-rYY");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag xx-rYY"});
-
- config = new TotalConfig();
- config.setProperty(properties.MNC, 333);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple default");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag default"});
- }
-
- @MediumTest
- public void testPrecidence() throws Exception {
- /**
- * Verify that in cases of ties, the specific ordering is followed
- */
-
- /**
- * Precidence order: mcc, mnc, locale, orientation, density,
- * touchscreen, hidden, keyboard, navigation, width-height
- */
-
- /**
- * verify mcc trumps mnc. Have 110-xx, 220-xx but no 110-220
- * so with is selected? Should be mcc110-xx.
- */
- TotalConfig config = new TotalConfig();
- config.setProperty(properties.MCC, 110);
- config.setProperty(properties.MNC, 220);
- config.setProperty(properties.LANGUAGE, "xx");
- Resources res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple mcc110 xx");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag mcc110 xx"});
-
- /* full A + B + C doesn't exist. Do we get A + C or B + C?
- */
- config = new TotalConfig();
- config.setProperty(properties.MCC, 111);
- config.setProperty(properties.MNC, 222);
- config.setProperty(properties.LANGUAGE, "xx");
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple mcc111 mnc222");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag mcc111 mnc222"});
-
- config = new TotalConfig();
- config.setProperty(properties.MNC, 222);
- config.setProperty(properties.LANGUAGE, "xx");
- config.setProperty(properties.ORIENTATION,
- Configuration.ORIENTATION_SQUARE);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple mnc222 xx");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag mnc222 xx"});
-
- config = new TotalConfig();
- config.setProperty(properties.LANGUAGE, "xx");
- config.setProperty(properties.ORIENTATION,
- Configuration.ORIENTATION_SQUARE);
- config.setProperty(properties.DENSITY, 32);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple xx square");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag xx square"});
-
- config = new TotalConfig();
- config.setProperty(properties.ORIENTATION,
- Configuration.ORIENTATION_SQUARE);
- config.setProperty(properties.DENSITY, 32);
- config.setProperty(properties.TOUCHSCREEN,
- Configuration.TOUCHSCREEN_STYLUS);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple square 32dpi");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag square 32dpi"});
-
- config = new TotalConfig();
- config.setProperty(properties.DENSITY, 32);
- config.setProperty(properties.TOUCHSCREEN,
- Configuration.TOUCHSCREEN_STYLUS);
- config.setProperty(properties.KEYBOARDHIDDEN,
- Configuration.KEYBOARDHIDDEN_NO);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 32dpi stylus");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 32dpi stylus"});
-
- config = new TotalConfig();
- config.setProperty(properties.TOUCHSCREEN,
- Configuration.TOUCHSCREEN_STYLUS);
- config.setProperty(properties.KEYBOARDHIDDEN,
- Configuration.KEYBOARDHIDDEN_NO);
- config.setProperty(properties.KEYBOARD, Configuration.KEYBOARD_12KEY);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple stylus keysexposed");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag stylus keysexposed"});
-
- config = new TotalConfig();
- config.setProperty(properties.KEYBOARDHIDDEN,
- Configuration.KEYBOARDHIDDEN_NO);
- config.setProperty(properties.KEYBOARD, Configuration.KEYBOARD_12KEY);
- config.setProperty(properties.NAVIGATION,
- Configuration.NAVIGATION_DPAD);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple keysexposed 12key");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag keysexposed 12key"});
-
- config = new TotalConfig();
- config.setProperty(properties.KEYBOARD, Configuration.KEYBOARD_12KEY);
- config.setProperty(properties.NAVIGATION,
- Configuration.NAVIGATION_DPAD);
- config.setProperty(properties.HEIGHT, 63);
- config.setProperty(properties.WIDTH, 57);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple 12key dpad");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag 12key dpad"});
-
- config = new TotalConfig();
- config.setProperty(properties.NAVIGATION,
- Configuration.NAVIGATION_DPAD);
- config.setProperty(properties.HEIGHT, 640);
- config.setProperty(properties.WIDTH, 400);
- res = config.getResources();
- checkValue(res, R.configVarying.simple, "simple dpad");
- checkValue(res, R.configVarying.bag,
- R.styleable.TestConfig, new String[]{"bag dpad"});
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/content/ContentTests.java b/tests/AndroidTests/src/com/android/unit_tests/content/ContentTests.java
index 80318dc..636660f 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/content/ContentTests.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/content/ContentTests.java
@@ -23,10 +23,6 @@
TestSuite suite = new TestSuite(ContentTests.class.getName());
suite.addTestSuite(AssetTest.class);
- suite.addTestSuite(IntentFilterTest.class);
- suite.addTest(ResourceTests.suite());
- suite.addTestSuite(PluralResourcesTest.class);
- suite.addTestSuite(ConfigTest.class);
return suite;
}
}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/content/FractionTest.java b/tests/AndroidTests/src/com/android/unit_tests/content/FractionTest.java
deleted file mode 100644
index 74a6b8d..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/content/FractionTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.unit_tests.content;
-
-import android.content.res.Resources;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.util.TypedValue;
-import com.android.unit_tests.R;
-
-public class FractionTest extends AndroidTestCase {
-
- private Resources mResources;
- private final TypedValue mValue = new TypedValue();
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- mResources = mContext.getResources();
- }
-
- @SmallTest
- public void testFractions() throws Exception {
- tryFraction(R.dimen.frac100perc, 1, 1, 1);
- tryFraction(R.dimen.frac1perc, 1, 1, .01f);
- tryFraction(R.dimen.fracp1perc, 1, 1, .001f);
- tryFraction(R.dimen.fracp01perc, 1, 1, .0001f);
- tryFraction(R.dimen.frac0perc, 1, 1, 0);
- tryFraction(R.dimen.frac1p1perc, 1, 1, .011f);
- tryFraction(R.dimen.frac100p1perc, 1, 1, 1.001f);
- tryFraction(R.dimen.frac25510perc, 1, 1, 255.1f);
- tryFraction(R.dimen.frac25610perc, 1, 1, 256.1f);
- tryFraction(R.dimen.frac6553510perc, 1, 1, 65535.1f);
- tryFraction(R.dimen.frac6553610perc, 1, 1, 65536.1f);
-
- tryFraction(R.dimen.frac100perc, 100, 1, 100);
- tryFraction(R.dimen.frac1perc, 100, 1, .01f * 100);
- tryFraction(R.dimen.fracp1perc, 100, 1, .001f * 100);
- tryFraction(R.dimen.fracp01perc, 100, 1, .0001f * 100);
- tryFraction(R.dimen.frac0perc, 100, 1, 0);
- tryFraction(R.dimen.frac1p1perc, 100, 1, .011f * 100);
- tryFraction(R.dimen.frac100p1perc, 100, 1, 1.001f * 100);
- tryFraction(R.dimen.frac25510perc, 100, 1, 255.1f * 100);
- tryFraction(R.dimen.frac25610perc, 100, 1, 256.1f * 100);
- tryFraction(R.dimen.frac6553510perc, 100, 1, 65535.1f * 100);
- tryFraction(R.dimen.frac6553610perc, 100, 1, 65536.1f * 100);
-
- tryFraction(R.dimen.frac100pperc, 100, 2, 2);
- tryFraction(R.dimen.frac1pperc, 100, 2, .01f * 2);
- tryFraction(R.dimen.fracp1pperc, 100, 2, .001f * 2);
- tryFraction(R.dimen.fracp01pperc, 100, 2, .0001f * 2);
- tryFraction(R.dimen.frac0pperc, 100, 2, 0);
- tryFraction(R.dimen.frac1p1pperc, 100, 2, .011f * 2);
- tryFraction(R.dimen.frac100p1pperc, 100, 2, 1.001f * 2);
- tryFraction(R.dimen.frac25510pperc, 100, 2, 255.1f * 2);
- tryFraction(R.dimen.frac25610pperc, 100, 2, 256.1f * 2);
- tryFraction(R.dimen.frac6553510pperc, 100, 2, 65535.1f * 2);
- tryFraction(R.dimen.frac6553610pperc, 100, 2, 65536.1f * 2);
- }
-
- private void tryFraction(int resid, float base, float pbase, float expected) {
- mResources.getValue(resid, mValue, true);
- float res = mValue.getFraction(base, pbase);
- float diff = Math.abs(expected - res);
- float prec = expected * 1e-4f;
- if (prec < 1e-5f) {
- prec = 1e-5f;
- }
- //System.out.println(
- // "Res 0x" + Integer.toHexString(resid) + ": got=" + res
- // + ", expected=" + expected + ", diff=" + diff);
- assertFalse("Expecting value " + expected + " got " + res
- + ": in resource 0x" + Integer.toHexString(resid)
- + " " + mValue,
- diff > prec);
- }
-}
-
diff --git a/tests/AndroidTests/src/com/android/unit_tests/content/IntentFilterTest.java b/tests/AndroidTests/src/com/android/unit_tests/content/IntentFilterTest.java
deleted file mode 100644
index 0335b9d..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/content/IntentFilterTest.java
+++ /dev/null
@@ -1,570 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.unit_tests.content;
-
-import android.content.IntentFilter;
-import android.test.suitebuilder.annotation.SmallTest;
-import static android.os.PatternMatcher.PATTERN_LITERAL;
-import static android.os.PatternMatcher.PATTERN_PREFIX;
-import static android.os.PatternMatcher.PATTERN_SIMPLE_GLOB;
-import android.net.Uri;
-import android.util.StringBuilderPrinter;
-import junit.framework.TestCase;
-
-import java.util.HashSet;
-
-public class IntentFilterTest extends TestCase {
-
- public static class Match extends IntentFilter {
- Match(String[] actions, String[] categories, String[] mimeTypes,
- String[] schemes, String[] authorities, String[] ports) {
- if (actions != null) {
- for (int i = 0; i < actions.length; i++) {
- addAction(actions[i]);
- }
- }
- if (categories != null) {
- for (int i = 0; i < categories.length; i++) {
- addCategory(categories[i]);
- }
- }
- if (mimeTypes != null) {
- for (int i = 0; i < mimeTypes.length; i++) {
- try {
- addDataType(mimeTypes[i]);
- } catch (IntentFilter.MalformedMimeTypeException e) {
- throw new RuntimeException("Bad mime type", e);
- }
- }
- }
- if (schemes != null) {
- for (int i = 0; i < schemes.length; i++) {
- addDataScheme(schemes[i]);
- }
- }
- if (authorities != null) {
- for (int i = 0; i < authorities.length; i++) {
- addDataAuthority(authorities[i],
- ports != null ? ports[i] : null);
- }
- }
- }
-
- Match(String[] actions, String[] categories, String[] mimeTypes,
- String[] schemes, String[] authorities, String[] ports,
- String[] paths, int[] pathTypes) {
- this(actions, categories, mimeTypes, schemes, authorities, ports);
- if (paths != null) {
- for (int i = 0; i < paths.length; i++) {
- addDataPath(paths[i], pathTypes[i]);
- }
- }
- }
- }
-
- public static class MatchCondition {
- public final int result;
- public final String action;
- public final String mimeType;
- public final Uri data;
- public final String[] categories;
-
- public MatchCondition(int _result, String _action, String[] _categories,
- String _mimeType, String _data) {
- result = _result;
- action = _action;
- mimeType = _mimeType;
- data = _data != null ? Uri.parse(_data) : null;
- categories = _categories;
- }
- }
-
- public static void checkMatches(IntentFilter filter,
- MatchCondition[] results) {
- for (int i = 0; i < results.length; i++) {
- MatchCondition mc = results[i];
- HashSet<String> categories = null;
- if (mc.categories != null) {
- for (int j = 0; j < mc.categories.length; j++) {
- if (categories == null) {
- categories = new HashSet<String>();
- }
- categories.add(mc.categories[j]);
- }
- }
- int result = filter.match(mc.action, mc.mimeType,
- mc.data != null ? mc.data.getScheme() : null, mc.data,
- categories, "test");
- if ( (result & IntentFilter.MATCH_CATEGORY_MASK)
- != (mc.result & IntentFilter.MATCH_CATEGORY_MASK) ) {
- StringBuilder msg = new StringBuilder();
- msg.append("Error matching against IntentFilter:\n");
- filter.dump(new StringBuilderPrinter(msg), " ");
- msg.append("Match action: ");
- msg.append(mc.action);
- msg.append("\nMatch mimeType: ");
- msg.append(mc.mimeType);
- msg.append("\nMatch data: ");
- msg.append(mc.data);
- msg.append("\nMatch categories: ");
- if (mc.categories != null) {
- for (int j = 0; j < mc.categories.length; j++) {
- if (j > 0) msg.append(", ");
- msg.append(mc.categories[j]);
- }
- }
- msg.append("\nExpected result: 0x");
- msg.append(Integer.toHexString(mc.result));
- msg.append(", got result: 0x");
- msg.append(Integer.toHexString(result));
- throw new RuntimeException(msg.toString());
- }
- }
- }
-
- @SmallTest
- public void testActions() throws Exception {
- IntentFilter filter = new Match(
- new String[]{"action1"}, null, null, null, null, null);
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, "action1",
- null, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_ACTION, "action2",
- null, null, null),
- });
-
- filter = new Match(
- new String[]{"action1", "action2"},
- null, null, null, null, null);
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, "action1",
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, "action2",
- null, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_ACTION, "action3",
- null, null, null),
- });
- }
-
- @SmallTest
- public void testCategories() throws Exception {
- IntentFilter filter = new Match(
- null, new String[]{"category1"}, null, null, null, null);
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, null,
- new String[]{"category1"}, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_CATEGORY, null,
- new String[]{"category2"}, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_CATEGORY, null,
- new String[]{"category1", "category2"}, null, null),
- });
-
- filter = new Match(
- null, new String[]{"category1", "category2"}, null, null,
- null, null);
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, null,
- new String[]{"category1"}, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, null,
- new String[]{"category2"}, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_EMPTY, null,
- new String[]{"category1", "category2"}, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_CATEGORY, null,
- new String[]{"category3"}, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_CATEGORY, null,
- new String[]{"category1", "category2", "category3"},
- null, null),
- });
- }
-
- @SmallTest
- public void testMimeTypes() throws Exception {
- IntentFilter filter = new Match(
- null, null, new String[]{"which1/what1"}, null, null, null);
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which1/what1", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which1/*", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "*/*", null),
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null, null,
- "which2/what2", null),
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null, null,
- "which2/*", null),
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null, null,
- "which1/what2", null),
- });
-
- filter = new Match(null, null,
- new String[]{"which1/what1", "which2/what2"}, null, null,
- null);
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which1/what1", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which1/*", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "*/*", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which2/what2", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which2/*", null),
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null, null,
- "which1/what2", null),
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null, null,
- "which3/what3", null),
- });
-
- filter = new Match(null, null,
- new String[]{"which1/*"}, null, null, null);
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which1/what1", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which1/*", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "*/*", null),
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null, null,
- "which2/what2", null),
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null, null,
- "which2/*", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which1/what2", null),
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null, null,
- "which3/what3", null),
- });
-
- filter = new Match(null, null,
- new String[]{"*/*"}, null, null, null);
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_TYPE, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which1/what1", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which1/*", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "*/*", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which2/what2", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which2/*", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which1/what2", null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_TYPE, null, null,
- "which3/what3", null),
- });
- }
-
- @SmallTest
- public void testSchemes() throws Exception {
- IntentFilter filter = new Match(null, null, null,
- new String[]{"scheme1"}, null, null);
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_SCHEME, null,
- null, null, "scheme1:foo"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme2:foo"),
- });
-
- filter = new Match(null, null, null,
- new String[]{"scheme1", "scheme2"}, null, null);
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_SCHEME, null,
- null, null, "scheme1:foo"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_SCHEME, null,
- null, null, "scheme2:foo"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme3:foo"),
- });
- }
-
- @SmallTest
- public void testAuthorities() throws Exception {
- IntentFilter filter = new Match(null, null, null,
- new String[]{"scheme1"},
- new String[]{"authority1"}, new String[]{null});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme1:foo"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_HOST, null,
- null, null, "scheme1://authority1/"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme1://authority2/"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_HOST, null,
- null, null, "scheme1://authority1:100/"),
- });
-
- filter = new Match(null, null, null, new String[]{"scheme1"},
- new String[]{"authority1"}, new String[]{"100"});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme1:foo"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme1://authority1/"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme1://authority2/"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PORT, null,
- null, null, "scheme1://authority1:100/"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme1://authority1:200/"),
- });
-
- filter = new Match(null, null, null, new String[]{"scheme1"},
- new String[]{"authority1", "authority2"},
- new String[]{"100", null});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme1:foo"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme1://authority1/"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_HOST, null,
- null, null, "scheme1://authority2/"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PORT, null,
- null, null, "scheme1://authority1:100/"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme1://authority1:200/"),
- });
- }
-
- @SmallTest
- public void testPaths() throws Exception {
- IntentFilter filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{"/literal1", "/2literal"},
- new int[]{PATTERN_LITERAL, PATTERN_LITERAL});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/literal1"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/2literal"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/literal"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/literal12"),
- });
- filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{"/literal1", "/2literal"},
- new int[]{PATTERN_PREFIX, PATTERN_PREFIX});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/literal1"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/2literal"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/literal"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/literal12"),
- });
- filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{"/.*"},
- new int[]{PATTERN_SIMPLE_GLOB});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/literal1"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority"),
- });
- filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{".*"},
- new int[]{PATTERN_SIMPLE_GLOB});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/literal1"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority"),
- });
- filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{"/a1*b"},
- new int[]{PATTERN_SIMPLE_GLOB});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/ab"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a1b"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a11b"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/a2b"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/a1bc"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/"),
- });
- filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{"/a1*"},
- new int[]{PATTERN_SIMPLE_GLOB});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a1"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/ab"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a11"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/a1b"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a11"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/a2"),
- });
- filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{"/a\\.*b"},
- new int[]{PATTERN_SIMPLE_GLOB});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/ab"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a.b"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a..b"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/a2b"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/a.bc"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/"),
- });
- filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{"/a.*b"},
- new int[]{PATTERN_SIMPLE_GLOB});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/ab"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a.b"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a.1b"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a2b"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/a.bc"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/"),
- });
- filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{"/a.*"},
- new int[]{PATTERN_SIMPLE_GLOB});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/ab"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a.b"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a.1b"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a2b"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a.bc"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/"),
- });
- filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{"/a.\\*b"},
- new int[]{PATTERN_SIMPLE_GLOB});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/ab"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a.*b"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a1*b"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/a2b"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/a.bc"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/"),
- });
- filter = new Match(null, null, null,
- new String[]{"scheme"}, new String[]{"authority"}, null,
- new String[]{"/a.\\*"},
- new int[]{PATTERN_SIMPLE_GLOB});
- checkMatches(filter, new MatchCondition[]{
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, null),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/ab"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a.*"),
- new MatchCondition(IntentFilter.MATCH_CATEGORY_PATH, null,
- null, null, "scheme://authority/a1*"),
- new MatchCondition(IntentFilter.NO_MATCH_DATA, null,
- null, null, "scheme://authority/a1b"),
- });
- }
-
-}
-
diff --git a/tests/AndroidTests/src/com/android/unit_tests/content/PluralResourcesTest.java b/tests/AndroidTests/src/com/android/unit_tests/content/PluralResourcesTest.java
deleted file mode 100644
index c3d1478..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/content/PluralResourcesTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.unit_tests.content;
-
-import android.content.res.AssetManager;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.content.res.TypedArray;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.util.TypedValue;
-import android.util.Log;
-import com.android.unit_tests.R;
-
-import junit.framework.Assert;
-
-import java.util.Locale;
-
-public class PluralResourcesTest extends AndroidTestCase {
- private static final String TAG = "PluralResourcesTest";
-
- private Resources mResources;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- mResources = mContext.getResources();
- }
-
- Resources resourcesForLanguage(String lang) {
- Configuration config = new Configuration();
- config.updateFrom(mResources.getConfiguration());
- config.locale = new Locale(lang);
- return new Resources(mResources.getAssets(), mResources.getDisplayMetrics(), config);
- }
-
- @SmallTest
- public void testPlurals() throws Exception {
- CharSequence cs;
- Resources res = resourcesForLanguage("en");
-
- cs = res.getQuantityText(R.plurals.plurals_test, 0);
- Log.d(TAG, "english 0 cs=" + cs);
- Assert.assertEquals(cs.toString(), "Some dogs");
-
- cs = res.getQuantityText(R.plurals.plurals_test, 1);
- Log.d(TAG, "english 1 cs=" + cs);
- Assert.assertEquals(cs.toString(), "A dog");
-
- cs = res.getQuantityText(R.plurals.plurals_test, 2);
- Assert.assertEquals(cs.toString(), "Some dogs");
-
- cs = res.getQuantityText(R.plurals.plurals_test, 5);
- Assert.assertEquals(cs.toString(), "Some dogs");
-
- cs = res.getQuantityText(R.plurals.plurals_test, 500);
- Assert.assertEquals(cs.toString(), "Some dogs");
- }
-
- @SmallTest
- public void testCzech() throws Exception {
- CharSequence cs;
- Resources res = resourcesForLanguage("cs");
-
- cs = res.getQuantityText(R.plurals.plurals_test, 0);
- Log.d(TAG, "czech 0 cs=" + cs);
- Assert.assertEquals(cs.toString(), "Some Czech dogs");
-
- cs = res.getQuantityText(R.plurals.plurals_test, 1);
- Log.d(TAG, "czech 1 cs=" + cs);
- Assert.assertEquals(cs.toString(), "A Czech dog");
-
- cs = res.getQuantityText(R.plurals.plurals_test, 2);
- Log.d(TAG, "czech 2 cs=" + cs);
- Assert.assertEquals(cs.toString(), "Few Czech dogs");
-
- cs = res.getQuantityText(R.plurals.plurals_test, 5);
- Assert.assertEquals(cs.toString(), "Some Czech dogs");
-
- cs = res.getQuantityText(R.plurals.plurals_test, 500);
- Assert.assertEquals(cs.toString(), "Some Czech dogs");
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/content/PrimitiveTest.java b/tests/AndroidTests/src/com/android/unit_tests/content/PrimitiveTest.java
deleted file mode 100644
index 44098cc..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/content/PrimitiveTest.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.unit_tests.content;
-
-import android.content.res.Resources;
-import android.content.res.TypedArray;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.util.TypedValue;
-import com.android.unit_tests.R;
-
-public class PrimitiveTest extends AndroidTestCase {
- private Resources mResources;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- mResources = mContext.getResources();
- }
-
- private void tryEnum(int resid, int expected) {
- TypedArray sa =
- mContext.obtainStyledAttributes(resid, R.styleable.EnumStyle);
- int value = sa.getInt(R.styleable.EnumStyle_testEnum, -1);
- sa.recycle();
-
- assertEquals("Expecting value " + expected + " got " + value
- + ": in resource 0x" + Integer.toHexString(resid),
- expected, value);
- }
-
- @SmallTest
- public void testEnum() throws Exception {
- tryEnum(R.style.TestEnum1, 1);
- tryEnum(R.style.TestEnum2, 2);
- tryEnum(R.style.TestEnum10, 10);
- tryEnum(R.style.TestEnum1_EmptyInherit, 1);
- }
-
- private void tryFlag(int resid, int expected) {
- TypedArray sa =
- mContext.obtainStyledAttributes(resid, R.styleable.FlagStyle);
- int value = sa.getInt(R.styleable.FlagStyle_testFlags, -1);
- sa.recycle();
-
- assertEquals("Expecting value " + expected + " got " + value
- + ": in resource 0x" + Integer.toHexString(resid),
- expected, value);
- }
-
- @SmallTest
- public void testFlags() throws Exception {
- tryFlag(R.style.TestFlag1, 0x1);
- tryFlag(R.style.TestFlag2, 0x2);
- tryFlag(R.style.TestFlag31, 0x40000000);
- tryFlag(R.style.TestFlag1And2, 0x3);
- tryFlag(R.style.TestFlag1And2And31, 0x40000003);
- }
-
- private void tryBoolean(int resid, boolean expected) {
- TypedValue v = new TypedValue();
- mContext.getResources().getValue(resid, v, true);
- assertEquals(TypedValue.TYPE_INT_BOOLEAN, v.type);
- assertEquals("Expecting boolean value " + expected + " got " + v
- + " from TypedValue: in resource 0x" + Integer.toHexString(resid),
- expected, v.data != 0);
- assertEquals("Expecting boolean value " + expected + " got " + v
- + " from getBoolean(): in resource 0x" + Integer.toHexString(resid),
- expected, mContext.getResources().getBoolean(resid));
- }
-
- @SmallTest
- public void testBoolean() throws Exception {
- tryBoolean(R.bool.trueRes, true);
- tryBoolean(R.bool.falseRes, false);
- }
-
- private void tryString(int resid, String expected) {
- TypedValue v = new TypedValue();
- mContext.getResources().getValue(resid, v, true);
- assertEquals(TypedValue.TYPE_STRING, v.type);
- assertEquals("Expecting string value " + expected + " got " + v
- + ": in resource 0x" + Integer.toHexString(resid),
- expected, v.string);
- }
-
- @SmallTest
- public void testStringCoerce() throws Exception {
- tryString(R.string.coerceIntegerToString, "100");
- tryString(R.string.coerceBooleanToString, "true");
- tryString(R.string.coerceColorToString, "#fff");
- tryString(R.string.coerceFloatToString, "100.0");
- tryString(R.string.coerceDimensionToString, "100px");
- tryString(R.string.coerceFractionToString, "100%");
- }
-
- private static void checkString(int resid, String actual, String expected) {
- assertEquals("Expecting string value \"" + expected + "\" got \""
- + actual + "\" in resources 0x" + Integer.toHexString(resid),
- expected, actual);
- }
-
- @SmallTest
- public void testFormattedString() throws Exception {
- // Make sure the regular one doesn't format anything
- checkString(R.string.formattedStringNone,
- mResources.getString(R.string.formattedStringNone),
- "Format[]");
- checkString(R.string.formattedStringOne,
- mResources.getString(R.string.formattedStringOne),
- "Format[%d]");
- checkString(R.string.formattedStringTwo,
- mResources.getString(R.string.formattedStringTwo),
- "Format[%3$d,%2$s]");
- // Make sure the formatted one works
- checkString(R.string.formattedStringNone,
- mResources.getString(R.string.formattedStringNone),
- "Format[]");
- checkString(R.string.formattedStringOne,
- mResources.getString(R.string.formattedStringOne, 42),
- "Format[42]");
- checkString(R.string.formattedStringTwo,
- mResources.getString(R.string.formattedStringTwo, "unused", "hi", 43),
- "Format[43,hi]");
- }
-}
-
diff --git a/tests/AndroidTests/src/com/android/unit_tests/content/RawResourceTest.java b/tests/AndroidTests/src/com/android/unit_tests/content/RawResourceTest.java
deleted file mode 100644
index 1786dc4..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/content/RawResourceTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.unit_tests.content;
-
-import android.content.res.Resources;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-import com.android.unit_tests.R;
-
-import java.io.InputStream;
-
-public class RawResourceTest extends AndroidTestCase {
- private Resources mResources;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- mResources = mContext.getResources();
- }
-
- @SmallTest
- public void testReadToEnd() throws Exception {
- InputStream is = mResources.openRawResource(R.raw.text);
- AssetTest.verifyTextAsset(is);
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/content/ResourceNameTest.java b/tests/AndroidTests/src/com/android/unit_tests/content/ResourceNameTest.java
deleted file mode 100644
index 2a56243..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/content/ResourceNameTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.unit_tests.content;
-
-import android.content.res.Resources;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import com.android.unit_tests.R;
-
-public class ResourceNameTest extends AndroidTestCase {
-
- @SmallTest
- public void testGetResourceName() {
- Resources res = mContext.getResources();
-
- String fullName = res.getResourceName(R.configVarying.simple);
- assertEquals("com.android.unit_tests:configVarying/simple", fullName);
-
- String packageName = res.getResourcePackageName(R.configVarying.simple);
- assertEquals("com.android.unit_tests", packageName);
-
- String typeName = res.getResourceTypeName(R.configVarying.simple);
- assertEquals("configVarying", typeName);
-
- String entryName = res.getResourceEntryName(R.configVarying.simple);
- assertEquals("simple", entryName);
- }
-
- @SmallTest
- public void testGetResourceIdentifier() {
- Resources res = mContext.getResources();
- int resid = res.getIdentifier(
- "com.android.unit_tests:configVarying/simple",
- null, null);
- assertEquals(R.configVarying.simple, resid);
-
- resid = res.getIdentifier("configVarying/simple", null,
- "com.android.unit_tests");
- assertEquals(R.configVarying.simple, resid);
-
- resid = res.getIdentifier("simple", "configVarying",
- "com.android.unit_tests");
- assertEquals(R.configVarying.simple, resid);
- }
-}
-
diff --git a/tests/AndroidTests/src/com/android/unit_tests/content/ResourceTests.java b/tests/AndroidTests/src/com/android/unit_tests/content/ResourceTests.java
deleted file mode 100644
index 943941e..0000000
--- a/tests/AndroidTests/src/com/android/unit_tests/content/ResourceTests.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 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.
- */
-
-package com.android.unit_tests.content;
-
-import junit.framework.TestSuite;
-
-public class ResourceTests {
- public static TestSuite suite() {
- TestSuite suite = new TestSuite(ResourceTests.class.getName());
-
- suite.addTestSuite(FractionTest.class);
- suite.addTestSuite(PrimitiveTest.class);
- suite.addTestSuite(ArrayTest.class);
- suite.addTestSuite(ConfigTest.class);
- suite.addTestSuite(RawResourceTest.class);
- suite.addTestSuite(ResourceNameTest.class);
- return suite;
- }
-}
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/ExportTestResolver.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/ExportTestResolver.java
index 38aed6f..a76dfd8 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/ExportTestResolver.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/ExportTestResolver.java
@@ -110,8 +110,41 @@
return contactEntry;
}
+ /**
+ * <p>
+ * An old method which had existed but was removed from ContentResolver.
+ * </p>
+ * <p>
+ * We still keep using this method since we don't have a propeer way to know
+ * which value in the ContentValue corresponds to the entry in Contacts database.
+ * </p>
+ * <p>
+ * Detail:
+ * There's an easy way to know which index "family name" corresponds to, via
+ * {@link android.provider.ContactsContract}.
+ * FAMILY_NAME equals DATA3, so the corresponding index
+ * for "family name" should be 2 (note that index is 0-origin).
+ * However, we cannot know what the index 2 corresponds to; it may be "family name",
+ * "label" for now, but may be the other some column in the future. We don't have
+ * convenient way to know the original data structure.
+ * </p>
+ */
+ public EntityIterator queryEntities(Uri uri,
+ String selection, String[] selectionArgs, String sortOrder) {
+ mTestCase.assertTrue(uri != null);
+ mTestCase.assertTrue(ContentResolver.SCHEME_CONTENT.equals(uri.getScheme()));
+ final String authority = uri.getAuthority();
+ mTestCase.assertTrue(RawContacts.CONTENT_URI.getAuthority().equals(authority));
+ mTestCase.assertTrue((Data.CONTACT_ID + "=?").equals(selection));
+ mTestCase.assertEquals(1, selectionArgs.length);
+ final int id = Integer.parseInt(selectionArgs[0]);
+ mTestCase.assertTrue(id >= 0 && id < mContactEntryList.size());
+
+ return new MockEntityIterator(mContactEntryList.get(id).getList());
+ }
+
@Override
- public Cursor query(Uri uri, String[] projection,
+ public Cursor query(Uri uri,String[] projection,
String selection, String[] selectionArgs, String sortOrder) {
mTestCase.assertTrue(VCardComposer.CONTACTS_TEST_CONTENT_URI.equals(uri));
// In this test, following arguments are not supported.
diff --git a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardVerifier.java b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardVerifier.java
index e5cdf63..4b97750 100644
--- a/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardVerifier.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/vcard/VCardVerifier.java
@@ -15,8 +15,11 @@
*/
package com.android.unit_tests.vcard;
+import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.Context;
+import android.content.EntityIterator;
+import android.net.Uri;
import android.pim.vcard.VCardComposer;
import android.pim.vcard.VCardConfig;
import android.pim.vcard.VCardEntryConstructor;
@@ -32,6 +35,7 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.lang.reflect.Method;
import java.util.Arrays;
/* package */ class CustomMockContext extends MockContext {
@@ -259,8 +263,24 @@
}
}
+ public static EntityIterator mockGetEntityIteratorMethod(
+ final ContentResolver resolver,
+ final Uri uri, final String selection,
+ final String[] selectionArgs, final String sortOrder) {
+ final ContentProvider provider =
+ resolver.acquireContentProviderClient(uri).getLocalContentProvider();
+ return ((ExportTestProvider)provider).queryEntities(
+ uri, selection, selectionArgs, sortOrder);
+ }
+
+ private Method getMockGetEntityIteratorMethod()
+ throws SecurityException, NoSuchMethodException {
+ return this.getClass().getMethod("mockGetEntityIteratorMethod",
+ ContentResolver.class, Uri.class, String.class, String[].class, String.class);
+ }
+
private void verifyForExportTest() {
- VCardComposer composer =
+ final VCardComposer composer =
new VCardComposer(new CustomMockContext(mExportTestResolver), mVCardType);
composer.addHandler(mLineVerifier);
composer.addHandler(mVCardVerifierInternal);
@@ -270,7 +290,14 @@
mTestCase.assertFalse(composer.isAfterLast());
try {
while (!composer.isAfterLast()) {
- mTestCase.assertTrue(composer.createOneEntry());
+ try {
+ final Method mockGetEntityIteratorMethod = getMockGetEntityIteratorMethod();
+ mTestCase.assertTrue(
+ composer.createOneEntry(getMockGetEntityIteratorMethod()));
+ } catch (Exception e) {
+ e.printStackTrace();
+ mTestCase.fail();
+ }
}
} finally {
composer.terminate();
diff --git a/tests/BatteryWaster/res/layout/battery_waster.xml b/tests/BatteryWaster/res/layout/battery_waster.xml
index b6eab03..e1cb6bf 100644
--- a/tests/BatteryWaster/res/layout/battery_waster.xml
+++ b/tests/BatteryWaster/res/layout/battery_waster.xml
@@ -15,13 +15,13 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
>
<CheckBox android:id="@+id/checkbox"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginTop="25dp"
@@ -31,12 +31,12 @@
/>
<ScrollView android:id="@+id/scroll"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
>
<TextView android:id="@+id/log"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:textSize="12sp"
diff --git a/tests/BrowserPowerTest/src/com/android/browserpowertest/PowerTestActivity.java b/tests/BrowserPowerTest/src/com/android/browserpowertest/PowerTestActivity.java
index 77e390b..e750ac8 100644
--- a/tests/BrowserPowerTest/src/com/android/browserpowertest/PowerTestActivity.java
+++ b/tests/BrowserPowerTest/src/com/android/browserpowertest/PowerTestActivity.java
@@ -65,8 +65,8 @@
webView.setWebChromeClient(chromeClient);
contentView.addView(webView, new LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT, 0.0f));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT, 0.0f));
handler = new Handler() {
@Override
diff --git a/tests/BrowserTestPlugin/jni/main.cpp b/tests/BrowserTestPlugin/jni/main.cpp
index c896ad5..586d139 100644
--- a/tests/BrowserTestPlugin/jni/main.cpp
+++ b/tests/BrowserTestPlugin/jni/main.cpp
@@ -168,7 +168,10 @@
NPError NPP_Destroy(NPP instance, NPSavedData** save)
{
PluginObject *obj = (PluginObject*) instance->pdata;
- delete obj->subPlugin;
+ if (obj) {
+ delete obj->subPlugin;
+ browser->releaseobject(&obj->header);
+ }
return NPERR_NO_ERROR;
}
diff --git a/tests/CoreTests/android/core/CoreTests.java b/tests/CoreTests/android/core/CoreTests.java
index e4f835c..442fe0f 100644
--- a/tests/CoreTests/android/core/CoreTests.java
+++ b/tests/CoreTests/android/core/CoreTests.java
@@ -59,7 +59,6 @@
suite.addTestSuite(LocationManagerProximityTest.class);
suite.addTestSuite(AndroidTestRunnerTest.class);
suite.addTestSuite(InstrumentationTestRunnerTest.class);
- suite.addTestSuite(CookieTest.class);
return suite;
}
diff --git a/tests/CoreTests/android/core/DatabaseSessionCache.java b/tests/CoreTests/android/core/DatabaseSessionCache.java
index c344d9c..040a13e 100644
--- a/tests/CoreTests/android/core/DatabaseSessionCache.java
+++ b/tests/CoreTests/android/core/DatabaseSessionCache.java
@@ -136,8 +136,8 @@
}
// public static boolean enabled(Context androidContext) {
-// String sslCache = Settings.Gservices.getString(androidContext.getContentResolver(),
-// Settings.Gservices.SSL_SESSION_CACHE);
+// String sslCache = Settings.Secure.getString(androidContext.getContentResolver(),
+// Settings.Secure.SSL_SESSION_CACHE);
//
// if (Log.isLoggable(TAG, Log.DEBUG)) {
// Log.d(TAG, "enabled " + sslCache + " " + androidContext.getPackageName());
@@ -309,4 +309,4 @@
}
-}
\ No newline at end of file
+}
diff --git a/tests/CoreTests/android/webkit/CookieTest.java b/tests/CoreTests/android/webkit/CookieTest.java
deleted file mode 100644
index 5c5a6a8..0000000
--- a/tests/CoreTests/android/webkit/CookieTest.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * 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.
- */
-
-package android.webkit;
-
-import android.content.Context;
-import android.test.AndroidTestCase;
-import android.util.Log;
-import android.webkit.CookieManager;
-import android.webkit.CookieSyncManager;
-
-public class CookieTest extends AndroidTestCase {
-
- /**
- * To run these tests: $ mmm frameworks/base/tests/CoreTests/android && adb
- * remount && adb sync $ adb shell am instrument -w \ -e class
- * android.webkit.CookieTest \
- * android.core/android.test.InstrumentationTestRunner
- */
-
- private CookieManager mCookieManager;
-
- @Override
- public void setContext(Context context) {
- assertTrue(mContext == null);
- super.setContext(context);
- CookieSyncManager.createInstance(context);
- mCookieManager = CookieManager.getInstance();
- mCookieManager.removeAllCookie();
- }
-
- public void testParse() {
- mCookieManager.removeAllCookie();
- String url = "http://www.foo.com";
-
- // basic
- mCookieManager.setCookie(url, "a=b");
- String cookie = mCookieManager.getCookie(url);
- assertTrue(cookie.equals("a=b"));
-
- // quoted
- mCookieManager.setCookie(url, "c=\"d;\"");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie.equals("a=b; c=\"d;\""));
-
- // empty
- mCookieManager.setCookie(url, "; path=/");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie.equals("a=b; c=\"d;\""));
- }
-
- public void testDomain() {
- mCookieManager.removeAllCookie();
- String url = "http://www.foo.com";
-
- // basic
- mCookieManager.setCookie(url, "a=b");
- String cookie = mCookieManager.getCookie(url);
- assertTrue(cookie.equals("a=b"));
-
- // no cross domain cookie
- cookie = mCookieManager.getCookie("http://bar.com");
- assertTrue(cookie == null);
-
- // more than one cookie
- mCookieManager.setCookie(url, "c=d; domain=.foo.com");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie.equals("a=b; c=d"));
-
- // host cookie should not be accessible from a sub-domain.
- cookie = mCookieManager.getCookie("http://bar.www.foo.com");
- assertTrue(cookie.equals("c=d"));
-
- // test setting a domain= that doesn't start w/ a dot, should
- // treat it as a domain cookie, as if there was a pre-pended dot.
- mCookieManager.setCookie(url, "e=f; domain=www.foo.com");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie.equals("a=b; c=d; e=f"));
- cookie = mCookieManager.getCookie("http://sub.www.foo.com");
- assertTrue(cookie.equals("c=d; e=f"));
- cookie = mCookieManager.getCookie("http://foo.com");
- assertTrue(cookie.equals("c=d"));
- }
-
- public void testSubDomain() {
- mCookieManager.removeAllCookie();
- String url_abcd = "http://a.b.c.d.com";
- String url_bcd = "http://b.c.d.com";
- String url_cd = "http://c.d.com";
- String url_d = "http://d.com";
-
- mCookieManager.setCookie(url_abcd, "a=1; domain=.a.b.c.d.com");
- mCookieManager.setCookie(url_abcd, "b=2; domain=.b.c.d.com");
- mCookieManager.setCookie(url_abcd, "c=3; domain=.c.d.com");
- mCookieManager.setCookie(url_abcd, "d=4; domain=.d.com");
-
- String cookie = mCookieManager.getCookie(url_abcd);
- assertTrue(cookie.equals("a=1; b=2; c=3; d=4"));
- cookie = mCookieManager.getCookie(url_bcd);
- assertTrue(cookie.equals("b=2; c=3; d=4"));
- cookie = mCookieManager.getCookie(url_cd);
- assertTrue(cookie.equals("c=3; d=4"));
- cookie = mCookieManager.getCookie(url_d);
- assertTrue(cookie.equals("d=4"));
-
- // check that the same cookie can exist on different sub-domains.
- mCookieManager.setCookie(url_bcd, "x=bcd; domain=.b.c.d.com");
- mCookieManager.setCookie(url_bcd, "x=cd; domain=.c.d.com");
- cookie = mCookieManager.getCookie(url_bcd);
- assertTrue(cookie.equals("b=2; c=3; d=4; x=bcd; x=cd"));
- cookie = mCookieManager.getCookie(url_cd);
- assertTrue(cookie.equals("c=3; d=4; x=cd"));
- }
-
- public void testInvalidDomain() {
- mCookieManager.removeAllCookie();
- String url = "http://foo.bar.com";
-
- mCookieManager.setCookie(url, "a=1; domain=.yo.foo.bar.com");
- String cookie = mCookieManager.getCookie(url);
- assertTrue(cookie == null);
-
- mCookieManager.setCookie(url, "b=2; domain=.foo.com");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie == null);
-
- mCookieManager.setCookie(url, "c=3; domain=.bar.foo.com");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie == null);
-
- mCookieManager.setCookie(url, "d=4; domain=.foo.bar.com.net");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie == null);
-
- mCookieManager.setCookie(url, "e=5; domain=.ar.com");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie == null);
-
- mCookieManager.setCookie(url, "f=6; domain=.com");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie == null);
-
- mCookieManager.setCookie(url, "g=7; domain=.co.uk");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie == null);
-
- mCookieManager.setCookie(url, "h=8; domain=.foo.bar.com.com");
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie == null);
- }
-
- public void testPath() {
- mCookieManager.removeAllCookie();
- String url = "http://www.foo.com";
-
- mCookieManager.setCookie(url, "a=b; path=/wee");
- String cookie = mCookieManager.getCookie(url + "/wee");
- assertTrue(cookie.equals("a=b"));
- cookie = mCookieManager.getCookie(url + "/wee/");
- assertTrue(cookie.equals("a=b"));
- cookie = mCookieManager.getCookie(url + "/wee/hee");
- assertTrue(cookie.equals("a=b"));
- cookie = mCookieManager.getCookie(url + "/wee/hee/more");
- assertTrue(cookie.equals("a=b"));
- cookie = mCookieManager.getCookie(url + "/weehee");
- assertTrue(cookie == null);
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie == null);
-
- mCookieManager.setCookie(url, "a=c; path=");
- cookie = mCookieManager.getCookie(url + "/wee");
- assertTrue(cookie.equals("a=b; a=c"));
- cookie = mCookieManager.getCookie(url);
- assertTrue(cookie.equals("a=c"));
-
- mCookieManager.setCookie(url, "a=d");
- cookie = mCookieManager.getCookie(url + "/wee");
- assertTrue(cookie.equals("a=b; a=d"));
- }
-}
diff --git a/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java b/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
index ae53b76..cde2c71 100644
--- a/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
+++ b/tests/DpiTest/src/com/google/android/test/dpi/DpiTestActivity.java
@@ -141,20 +141,20 @@
private View scrollWrap(View view) {
ScrollView scroller = new ScrollView(this);
- scroller.addView(view, new ScrollView.LayoutParams(ScrollView.LayoutParams.FILL_PARENT,
- ScrollView.LayoutParams.FILL_PARENT));
+ scroller.addView(view, new ScrollView.LayoutParams(ScrollView.LayoutParams.MATCH_PARENT,
+ ScrollView.LayoutParams.MATCH_PARENT));
return scroller;
}
private void addLabelToRoot(LinearLayout root, String text) {
TextView label = new TextView(this);
label.setText(text);
- root.addView(label, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,
+ root.addView(label, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
}
private void addChildToRoot(LinearLayout root, LinearLayout layout) {
- root.addView(layout, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT,
+ root.addView(layout, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT));
}
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTestActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTestActivity.java
index fbce78a..9a4e99e 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTestActivity.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTestActivity.java
@@ -85,8 +85,8 @@
webView.setWebChromeClient(chromeClient);
contentView.addView(webView, new LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT, 0.0f));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT, 0.0f));
handler = new Handler() {
@Override
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
index b6b1661..5763b85 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
@@ -126,7 +126,7 @@
mWebView.addJavascriptInterface(mCallbackProxy, "eventSender");
setupWebViewForLayoutTests(mWebView, mCallbackProxy);
- contentView.addView(mWebView, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, 0.0f));
+ contentView.addView(mWebView, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, 0.0f));
mWebView.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL);
diff --git a/tests/FrameworkTest/res/layout/add_column_in_table.xml b/tests/FrameworkTest/res/layout/add_column_in_table.xml
index 62c27f3..05f55a8 100644
--- a/tests/FrameworkTest/res/layout/add_column_in_table.xml
+++ b/tests/FrameworkTest/res/layout/add_column_in_table.xml
@@ -16,11 +16,11 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<TableLayout android:id="@+id/table"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1.0">
diff --git a/tests/FrameworkTest/res/layout/autocompletetextview_simple.xml b/tests/FrameworkTest/res/layout/autocompletetextview_simple.xml
index d408a86..1a20076 100644
--- a/tests/FrameworkTest/res/layout/autocompletetextview_simple.xml
+++ b/tests/FrameworkTest/res/layout/autocompletetextview_simple.xml
@@ -20,12 +20,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<AutoCompleteTextView
android:id="@+id/autocompletetextview1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text|textAutoComplete"
android:completionThreshold="1" />
diff --git a/tests/FrameworkTest/res/layout/baseline_0width_and_weight.xml b/tests/FrameworkTest/res/layout/baseline_0width_and_weight.xml
index 83f3fcb..aa3132d 100644
--- a/tests/FrameworkTest/res/layout/baseline_0width_and_weight.xml
+++ b/tests/FrameworkTest/res/layout/baseline_0width_and_weight.xml
@@ -19,10 +19,10 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<LinearLayout android:id="@+id/layout"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone">
diff --git a/tests/FrameworkTest/res/layout/baseline_buttons.xml b/tests/FrameworkTest/res/layout/baseline_buttons.xml
index ae942017..3e364bd 100644
--- a/tests/FrameworkTest/res/layout/baseline_buttons.xml
+++ b/tests/FrameworkTest/res/layout/baseline_buttons.xml
@@ -19,7 +19,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
diff --git a/tests/FrameworkTest/res/layout/baseline_center_gravity.xml b/tests/FrameworkTest/res/layout/baseline_center_gravity.xml
index 9793ab4..dd1318d 100644
--- a/tests/FrameworkTest/res/layout/baseline_center_gravity.xml
+++ b/tests/FrameworkTest/res/layout/baseline_center_gravity.xml
@@ -19,7 +19,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/button1"
android:layout_height="wrap_content"
diff --git a/tests/FrameworkTest/res/layout/descendant_focusability.xml b/tests/FrameworkTest/res/layout/descendant_focusability.xml
index 6a30d50d..0cb75fd 100644
--- a/tests/FrameworkTest/res/layout/descendant_focusability.xml
+++ b/tests/FrameworkTest/res/layout/descendant_focusability.xml
@@ -20,19 +20,19 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
>
<LinearLayout
android:id="@+id/beforeDescendants"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="beforeDescendants"
>
<Button
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
@@ -40,12 +40,12 @@
<LinearLayout
android:id="@+id/afterDescendants"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="afterDescendants"
>
<Button
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
@@ -53,12 +53,12 @@
<LinearLayout
android:id="@+id/blocksDescendants"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"
>
<Button
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
diff --git a/tests/FrameworkTest/res/layout/disabled.xml b/tests/FrameworkTest/res/layout/disabled.xml
index ed7ff06..4b41248 100644
--- a/tests/FrameworkTest/res/layout/disabled.xml
+++ b/tests/FrameworkTest/res/layout/disabled.xml
@@ -23,8 +23,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clickableParent"
android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<Button android:id="@+id/disabledButton"
android:layout_width="wrap_content"
diff --git a/tests/FrameworkTest/res/layout/fill_in_wrap.xml b/tests/FrameworkTest/res/layout/fill_in_wrap.xml
index b61fd30..1c3f811 100644
--- a/tests/FrameworkTest/res/layout/fill_in_wrap.xml
+++ b/tests/FrameworkTest/res/layout/fill_in_wrap.xml
@@ -15,7 +15,7 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
android:baselineAligned="false"
@@ -28,7 +28,7 @@
/>
<LinearLayout android:id="@+id/layout"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="0dip"
android:paddingRight="0dip"
@@ -43,7 +43,7 @@
<EditText android:id="@+id/data"
android:layout_width="0dip"
android:layout_weight="1"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_marginLeft="8dip"
android:paddingBottom="4dip"
android:layout_gravity="center_vertical"
diff --git a/tests/FrameworkTest/res/layout/focus_after_removal.xml b/tests/FrameworkTest/res/layout/focus_after_removal.xml
index 7cf6cbe..f4e388d 100644
--- a/tests/FrameworkTest/res/layout/focus_after_removal.xml
+++ b/tests/FrameworkTest/res/layout/focus_after_removal.xml
@@ -20,7 +20,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout android:id="@+id/leftLayout"
diff --git a/tests/FrameworkTest/res/layout/focus_listener.xml b/tests/FrameworkTest/res/layout/focus_listener.xml
index a838205..6faa21c 100644
--- a/tests/FrameworkTest/res/layout/focus_listener.xml
+++ b/tests/FrameworkTest/res/layout/focus_listener.xml
@@ -20,7 +20,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/left"
diff --git a/tests/FrameworkTest/res/layout/framelayout_gravity.xml b/tests/FrameworkTest/res/layout/framelayout_gravity.xml
index ce48825..e89fce5 100644
--- a/tests/FrameworkTest/res/layout/framelayout_gravity.xml
+++ b/tests/FrameworkTest/res/layout/framelayout_gravity.xml
@@ -16,8 +16,8 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/parent"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<Button android:id="@+id/left"
android:layout_gravity="left"
diff --git a/tests/FrameworkTest/res/layout/framelayout_margin.xml b/tests/FrameworkTest/res/layout/framelayout_margin.xml
index 1e14899..9120bcb 100644
--- a/tests/FrameworkTest/res/layout/framelayout_margin.xml
+++ b/tests/FrameworkTest/res/layout/framelayout_margin.xml
@@ -16,8 +16,8 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/parent"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<Button android:id="@+id/left"
android:layout_gravity="left"
diff --git a/tests/FrameworkTest/res/layout/grid_in_horizontal.xml b/tests/FrameworkTest/res/layout/grid_in_horizontal.xml
index 835dce3..62d7bcb 100644
--- a/tests/FrameworkTest/res/layout/grid_in_horizontal.xml
+++ b/tests/FrameworkTest/res/layout/grid_in_horizontal.xml
@@ -16,12 +16,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<GridView android:id="@+id/grid"
android:layout_width="0dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:padding="10dip"
android:verticalSpacing="10dp"
diff --git a/tests/FrameworkTest/res/layout/grid_in_vertical.xml b/tests/FrameworkTest/res/layout/grid_in_vertical.xml
index 731bc54..fea459a 100644
--- a/tests/FrameworkTest/res/layout/grid_in_vertical.xml
+++ b/tests/FrameworkTest/res/layout/grid_in_vertical.xml
@@ -16,8 +16,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<GridView android:id="@+id/grid"
android:layout_width="wrap_content"
diff --git a/tests/FrameworkTest/res/layout/grid_scroll_listener.xml b/tests/FrameworkTest/res/layout/grid_scroll_listener.xml
index c02aed9..82b1058 100644
--- a/tests/FrameworkTest/res/layout/grid_scroll_listener.xml
+++ b/tests/FrameworkTest/res/layout/grid_scroll_listener.xml
@@ -16,11 +16,11 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<GridView android:id="@+id/grid"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:padding="10dip"
@@ -32,7 +32,7 @@
android:gravity="center"/>
<TextView android:id="@+id/text"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"/>
diff --git a/tests/FrameworkTest/res/layout/grid_thrasher.xml b/tests/FrameworkTest/res/layout/grid_thrasher.xml
index 1a260df..346acff 100644
--- a/tests/FrameworkTest/res/layout/grid_thrasher.xml
+++ b/tests/FrameworkTest/res/layout/grid_thrasher.xml
@@ -16,12 +16,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<GridView android:id="@+id/grid"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:padding="10dip"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
@@ -31,7 +31,7 @@
android:gravity="center"/>
<TextView android:id="@+id/text"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"/>
diff --git a/tests/FrameworkTest/res/layout/include_tag.xml b/tests/FrameworkTest/res/layout/include_tag.xml
index d1047f1..b2f6ab1 100644
--- a/tests/FrameworkTest/res/layout/include_tag.xml
+++ b/tests/FrameworkTest/res/layout/include_tag.xml
@@ -16,8 +16,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<TextView
android:text="@string/include_label"
diff --git a/tests/FrameworkTest/res/layout/inflated_expandablelistview.xml b/tests/FrameworkTest/res/layout/inflated_expandablelistview.xml
index d01e7c5..6f683e5 100644
--- a/tests/FrameworkTest/res/layout/inflated_expandablelistview.xml
+++ b/tests/FrameworkTest/res/layout/inflated_expandablelistview.xml
@@ -16,5 +16,5 @@
<ExpandableListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/elv"
- android:layout_height="fill_parent"
- android:layout_width="fill_parent" />
+ android:layout_height="match_parent"
+ android:layout_width="match_parent" />
diff --git a/tests/FrameworkTest/res/layout/linear_layout_buttons.xml b/tests/FrameworkTest/res/layout/linear_layout_buttons.xml
index f60692a..bcb28e7 100644
--- a/tests/FrameworkTest/res/layout/linear_layout_buttons.xml
+++ b/tests/FrameworkTest/res/layout/linear_layout_buttons.xml
@@ -20,26 +20,26 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<Button
android:id="@+id/button1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0sp"
android:layout_weight="1"
android:text="@string/keypad_one"/>
<Button
android:id="@+id/button2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0sp"
android:layout_weight="1"
android:text="@string/keypad_two"/>
<Button
android:id="@+id/button3"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0sp"
android:layout_weight="1"
android:text="@string/keypad_three"/>
diff --git a/tests/FrameworkTest/res/layout/linear_layout_edittext_then_button.xml b/tests/FrameworkTest/res/layout/linear_layout_edittext_then_button.xml
index 21e7399..ab76e29 100644
--- a/tests/FrameworkTest/res/layout/linear_layout_edittext_then_button.xml
+++ b/tests/FrameworkTest/res/layout/linear_layout_edittext_then_button.xml
@@ -20,18 +20,18 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<EditText
android:id="@+id/editText"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0sp"
android:layout_weight="1"/>
<Button
android:id="@+id/button"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0sp"
android:layout_weight="1"
android:text="@string/keypad_one"/>
diff --git a/tests/FrameworkTest/res/layout/linear_layout_grid.xml b/tests/FrameworkTest/res/layout/linear_layout_grid.xml
index 81f7b15..67b6877 100644
--- a/tests/FrameworkTest/res/layout/linear_layout_grid.xml
+++ b/tests/FrameworkTest/res/layout/linear_layout_grid.xml
@@ -20,80 +20,80 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<LinearLayout android:id="@+id/column1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0sp"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:layout_width="0sp"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/keypad_one"/>
<Button
android:layout_width="0sp"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/keypad_two"/>
<Button
android:layout_width="0sp"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/keypad_three"/>
</LinearLayout>
<LinearLayout android:id="@+id/column2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0sp"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:layout_width="0sp"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/keypad_four"/>
<Button
android:layout_width="0sp"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/keypad_five"/>
<Button
android:layout_width="0sp"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/keypad_six"/>
</LinearLayout>
<LinearLayout android:id="@+id/column3"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0sp"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:layout_width="0sp"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/keypad_seven"/>
<Button
android:layout_width="0sp"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/keypad_eight"/>
<Button
android:layout_width="0sp"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/keypad_nine"/>
</LinearLayout>
diff --git a/tests/FrameworkTest/res/layout/linear_layout_listview_height.xml b/tests/FrameworkTest/res/layout/linear_layout_listview_height.xml
index 10ef2ce..873b2d2 100644
--- a/tests/FrameworkTest/res/layout/linear_layout_listview_height.xml
+++ b/tests/FrameworkTest/res/layout/linear_layout_listview_height.xml
@@ -20,19 +20,19 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<!-- Outer linear layout providing vertical layout -->
<LinearLayout
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" >
<!-- The control buttons -->
<LinearLayout
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
@@ -58,7 +58,7 @@
<ListView
android:id="@+id/inner_list"
android:layout_width="200dip"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:background="@android:drawable/spinner_dropdown_background"
android:divider="@android:drawable/divider_horizontal_bright" />
diff --git a/tests/FrameworkTest/res/layout/linear_layout_spinner_then_button.xml b/tests/FrameworkTest/res/layout/linear_layout_spinner_then_button.xml
index 7ed245b..53c0280 100644
--- a/tests/FrameworkTest/res/layout/linear_layout_spinner_then_button.xml
+++ b/tests/FrameworkTest/res/layout/linear_layout_spinner_then_button.xml
@@ -20,7 +20,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<Spinner android:id="@+id/reminder_value"
diff --git a/tests/FrameworkTest/res/layout/linear_layout_textviews.xml b/tests/FrameworkTest/res/layout/linear_layout_textviews.xml
index 84a898c..ccec213 100644
--- a/tests/FrameworkTest/res/layout/linear_layout_textviews.xml
+++ b/tests/FrameworkTest/res/layout/linear_layout_textviews.xml
@@ -21,7 +21,7 @@
android:id="@+id/layout"
android:background="#FFFF0000"
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
diff --git a/tests/FrameworkTest/res/layout/list_dividers.xml b/tests/FrameworkTest/res/layout/list_dividers.xml
index b56511e..93810b4 100644
--- a/tests/FrameworkTest/res/layout/list_dividers.xml
+++ b/tests/FrameworkTest/res/layout/list_dividers.xml
@@ -16,8 +16,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<Button
android:layout_width="wrap_content"
diff --git a/tests/FrameworkTest/res/layout/list_filter.xml b/tests/FrameworkTest/res/layout/list_filter.xml
index cea518c..0ab7101 100644
--- a/tests/FrameworkTest/res/layout/list_filter.xml
+++ b/tests/FrameworkTest/res/layout/list_filter.xml
@@ -16,24 +16,24 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<FrameLayout android:id="@+id/frame"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1">
<ListView android:id="@android:id/list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:drawSelectorOnTop="false" />
</FrameLayout>
<LinearLayout
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/hide"
diff --git a/tests/FrameworkTest/res/layout/list_in_horizontal.xml b/tests/FrameworkTest/res/layout/list_in_horizontal.xml
index 371cb84..b770628 100644
--- a/tests/FrameworkTest/res/layout/list_in_horizontal.xml
+++ b/tests/FrameworkTest/res/layout/list_in_horizontal.xml
@@ -15,8 +15,8 @@
-->
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<TableRow>
diff --git a/tests/FrameworkTest/res/layout/list_in_vertical.xml b/tests/FrameworkTest/res/layout/list_in_vertical.xml
index 0ea2475..f951cb7 100644
--- a/tests/FrameworkTest/res/layout/list_in_vertical.xml
+++ b/tests/FrameworkTest/res/layout/list_in_vertical.xml
@@ -15,16 +15,16 @@
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<ListView android:id="@+id/list"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ImageButton
diff --git a/tests/FrameworkTest/res/layout/list_recycler_profiling.xml b/tests/FrameworkTest/res/layout/list_recycler_profiling.xml
index 9678eb7..3fc6bd6 100644
--- a/tests/FrameworkTest/res/layout/list_recycler_profiling.xml
+++ b/tests/FrameworkTest/res/layout/list_recycler_profiling.xml
@@ -16,11 +16,11 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<ListView android:id="@+id/list"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1.0" />
diff --git a/tests/FrameworkTest/res/layout/list_scroll_listener.xml b/tests/FrameworkTest/res/layout/list_scroll_listener.xml
index 001296a..58ab55f 100644
--- a/tests/FrameworkTest/res/layout/list_scroll_listener.xml
+++ b/tests/FrameworkTest/res/layout/list_scroll_listener.xml
@@ -16,17 +16,17 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<ListView android:id="@android:id/list"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:drawSelectorOnTop="false"/>
<TextView android:id="@+id/text"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"/>
diff --git a/tests/FrameworkTest/res/layout/list_take_focus_from_side.xml b/tests/FrameworkTest/res/layout/list_take_focus_from_side.xml
index cf141cc..ee40019 100644
--- a/tests/FrameworkTest/res/layout/list_take_focus_from_side.xml
+++ b/tests/FrameworkTest/res/layout/list_take_focus_from_side.xml
@@ -16,19 +16,19 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<ListView android:id="@android:id/list"
android:layout_width="0dip"
android:layout_weight="1"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:drawSelectorOnTop="false"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
- android:layout_height="fill_parent">
+ android:layout_height="match_parent">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/tests/FrameworkTest/res/layout/list_thrasher.xml b/tests/FrameworkTest/res/layout/list_thrasher.xml
index 001296a..58ab55f 100644
--- a/tests/FrameworkTest/res/layout/list_thrasher.xml
+++ b/tests/FrameworkTest/res/layout/list_thrasher.xml
@@ -16,17 +16,17 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<ListView android:id="@android:id/list"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:drawSelectorOnTop="false"/>
<TextView android:id="@+id/text"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"/>
diff --git a/tests/FrameworkTest/res/layout/list_with_button_above.xml b/tests/FrameworkTest/res/layout/list_with_button_above.xml
index 25db016..18bcf6b 100644
--- a/tests/FrameworkTest/res/layout/list_with_button_above.xml
+++ b/tests/FrameworkTest/res/layout/list_with_button_above.xml
@@ -19,18 +19,18 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<Button android:id="@+id/button"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/button_above_list_label"/>
<ListView android:id="@android:id/list"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:paddingTop="2dip"
diff --git a/tests/FrameworkTest/res/layout/list_with_disappearing_item_bug_item.xml b/tests/FrameworkTest/res/layout/list_with_disappearing_item_bug_item.xml
index 0163d96..82af6cad 100644
--- a/tests/FrameworkTest/res/layout/list_with_disappearing_item_bug_item.xml
+++ b/tests/FrameworkTest/res/layout/list_with_disappearing_item_bug_item.xml
@@ -16,13 +16,13 @@
<!-- A layout is needed to reprod the bug. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="?android:attr/listPreferredItemHeight">
<TextView
android:id="@+id/text1"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:textAppearance="?android:attr/textAppearanceLarge"
android:gravity="center_vertical"
android:paddingLeft="27dip"
diff --git a/tests/FrameworkTest/res/layout/list_with_empty_view.xml b/tests/FrameworkTest/res/layout/list_with_empty_view.xml
index 00d81a7..23bb658 100644
--- a/tests/FrameworkTest/res/layout/list_with_empty_view.xml
+++ b/tests/FrameworkTest/res/layout/list_with_empty_view.xml
@@ -16,17 +16,17 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
<ListView android:id="@android:id/list"
android:drawSelectorOnTop="false"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"/>
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
<TextView android:id="@+id/empty"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:gravity="center"
android:textSize="36sp"
android:textColor="#999"
diff --git a/tests/FrameworkTest/res/layout/longpress.xml b/tests/FrameworkTest/res/layout/longpress.xml
index ef3672c..3a69fae 100644
--- a/tests/FrameworkTest/res/layout/longpress.xml
+++ b/tests/FrameworkTest/res/layout/longpress.xml
@@ -20,8 +20,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<View android:id="@+id/simple_view"
android:background="@drawable/blue"
diff --git a/tests/FrameworkTest/res/layout/mail_message.xml b/tests/FrameworkTest/res/layout/mail_message.xml
index ed52751..7f15e4f 100644
--- a/tests/FrameworkTest/res/layout/mail_message.xml
+++ b/tests/FrameworkTest/res/layout/mail_message.xml
@@ -18,11 +18,11 @@
a list with a list of messages.-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/subject"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<WebView android:id="@+id/body"
diff --git a/tests/FrameworkTest/res/layout/popup_window_visibility.xml b/tests/FrameworkTest/res/layout/popup_window_visibility.xml
index 21c94bb..3aa714d 100644
--- a/tests/FrameworkTest/res/layout/popup_window_visibility.xml
+++ b/tests/FrameworkTest/res/layout/popup_window_visibility.xml
@@ -16,25 +16,25 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<FrameLayout android:id="@+id/frame"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1">
<LinearLayout
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<Spinner android:id="@+id/spinner"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content" />
<AutoCompleteTextView android:id="@+id/auto"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
@@ -43,7 +43,7 @@
<LinearLayout
android:orientation="horizontal"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/hide"
diff --git a/tests/FrameworkTest/res/layout/pre_draw_listener.xml b/tests/FrameworkTest/res/layout/pre_draw_listener.xml
index d348d9f..7a8f33f 100644
--- a/tests/FrameworkTest/res/layout/pre_draw_listener.xml
+++ b/tests/FrameworkTest/res/layout/pre_draw_listener.xml
@@ -16,20 +16,20 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<ScrollView
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1">
<view class="com.android.frameworktest.view.PreDrawListener$MyLinearLayout" android:id="@+id/frame"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" />
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
</ScrollView>
diff --git a/tests/FrameworkTest/res/layout/radiogroup_checkedchild.xml b/tests/FrameworkTest/res/layout/radiogroup_checkedchild.xml
index 7724729..db88f4d 100644
--- a/tests/FrameworkTest/res/layout/radiogroup_checkedchild.xml
+++ b/tests/FrameworkTest/res/layout/radiogroup_checkedchild.xml
@@ -21,23 +21,23 @@
<RadioButton
android:id="@+id/value_one"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:textColor="#555555"
android:checked="true"
android:text="@string/visibility_1_view_1" />
<RadioButton
android:id="@+id/value_two"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:textColor="#555555"
android:text="@string/visibility_1_view_2" />
<RadioButton
android:id="@+id/value_three"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:textColor="#555555"
android:text="@string/visibility_1_view_3" />
diff --git a/tests/FrameworkTest/res/layout/remote_view_host.xml b/tests/FrameworkTest/res/layout/remote_view_host.xml
index dc52181..19d0a73 100644
--- a/tests/FrameworkTest/res/layout/remote_view_host.xml
+++ b/tests/FrameworkTest/res/layout/remote_view_host.xml
@@ -20,6 +20,6 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
</LinearLayout>
diff --git a/tests/FrameworkTest/res/layout/remote_view_test_bad_1.xml b/tests/FrameworkTest/res/layout/remote_view_test_bad_1.xml
index 6a65976..bdac697 100644
--- a/tests/FrameworkTest/res/layout/remote_view_test_bad_1.xml
+++ b/tests/FrameworkTest/res/layout/remote_view_test_bad_1.xml
@@ -21,8 +21,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linear"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<EditText android:id="@+id/edit"
android:layout_width="wrap_content"
diff --git a/tests/FrameworkTest/res/layout/remote_view_test_bad_2.xml b/tests/FrameworkTest/res/layout/remote_view_test_bad_2.xml
index 70613c3..630e603 100644
--- a/tests/FrameworkTest/res/layout/remote_view_test_bad_2.xml
+++ b/tests/FrameworkTest/res/layout/remote_view_test_bad_2.xml
@@ -21,8 +21,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linear"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<WebView android:id="@+id/web"
android:layout_width="wrap_content"
diff --git a/tests/FrameworkTest/res/layout/remote_view_test_good.xml b/tests/FrameworkTest/res/layout/remote_view_test_good.xml
index 54f4db9..ce9755b 100644
--- a/tests/FrameworkTest/res/layout/remote_view_test_good.xml
+++ b/tests/FrameworkTest/res/layout/remote_view_test_good.xml
@@ -21,8 +21,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linear"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<TextView android:id="@+id/text"
android:layout_width="wrap_content"
diff --git a/tests/FrameworkTest/res/layout/scroll_to_rect_with_internal_scroll.xml b/tests/FrameworkTest/res/layout/scroll_to_rect_with_internal_scroll.xml
index d22122d..b6ec479 100644
--- a/tests/FrameworkTest/res/layout/scroll_to_rect_with_internal_scroll.xml
+++ b/tests/FrameworkTest/res/layout/scroll_to_rect_with_internal_scroll.xml
@@ -22,24 +22,24 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout
android:id="@+id/layout"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/scrollToBlob"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/scroll_top_button"/>
<TextView android:id="@+id/blob"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="80dip"
android:layout_marginTop="500dip"
android:layout_marginBottom="5dip"/>
diff --git a/tests/FrameworkTest/res/layout/scroll_to_rectangle.xml b/tests/FrameworkTest/res/layout/scroll_to_rectangle.xml
index 0839b1a..55d057d 100644
--- a/tests/FrameworkTest/res/layout/scroll_to_rectangle.xml
+++ b/tests/FrameworkTest/res/layout/scroll_to_rectangle.xml
@@ -22,55 +22,55 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout
android:id="@+id/layout"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<Button android:id="@+id/scrollToRectFromTop"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/scroll_top_button"/>
<Button android:id="@+id/scrollToRectFromTop2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="10dip"
android:text="@string/scroll_top_button2"/>
<TextView android:id="@+id/topBlob"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:layout_marginBottom="5dip"/>
<TextView android:id="@+id/childToMakeVisible"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:layout_marginBottom="5dip"
android:text="@string/scroll_to_me"/>
<TextView android:id="@+id/bottomBlob"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dip"
android:layout_marginBottom="5dip"/>
<Button android:id="@+id/scrollToRectFromBottom2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dip"
android:text="@string/scroll_bottom_button2"/>
<Button android:id="@+id/scrollToRectFromBottom"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/scroll_bottom_button"/>
diff --git a/tests/FrameworkTest/res/layout/scrollview_linear_layout.xml b/tests/FrameworkTest/res/layout/scrollview_linear_layout.xml
index 536d2ed..a3c12ce 100644
--- a/tests/FrameworkTest/res/layout/scrollview_linear_layout.xml
+++ b/tests/FrameworkTest/res/layout/scrollview_linear_layout.xml
@@ -16,14 +16,14 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout
android:id="@+id/layout"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
diff --git a/tests/FrameworkTest/res/layout/scrollview_with_webviews.xml b/tests/FrameworkTest/res/layout/scrollview_with_webviews.xml
index 79634752..e0c0c66 100644
--- a/tests/FrameworkTest/res/layout/scrollview_with_webviews.xml
+++ b/tests/FrameworkTest/res/layout/scrollview_with_webviews.xml
@@ -16,27 +16,27 @@
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none">
<LinearLayout
android:id="@+id/layout"
android:orientation="vertical"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<WebView android:id="@+id/wb1"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<Button android:id="@+id/button"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<WebView android:id="@+id/wb2"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
diff --git a/tests/FrameworkTest/res/layout/table_layout_cell_span.xml b/tests/FrameworkTest/res/layout/table_layout_cell_span.xml
index 26831e4..fceef0a 100644
--- a/tests/FrameworkTest/res/layout/table_layout_cell_span.xml
+++ b/tests/FrameworkTest/res/layout/table_layout_cell_span.xml
@@ -18,7 +18,7 @@
-->
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<TableRow>
diff --git a/tests/FrameworkTest/res/layout/table_layout_fixed_width.xml b/tests/FrameworkTest/res/layout/table_layout_fixed_width.xml
index 91d9128..507701e 100644
--- a/tests/FrameworkTest/res/layout/table_layout_fixed_width.xml
+++ b/tests/FrameworkTest/res/layout/table_layout_fixed_width.xml
@@ -19,7 +19,7 @@
-->
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<TableRow>
diff --git a/tests/FrameworkTest/res/layout/table_layout_horizontal_gravity.xml b/tests/FrameworkTest/res/layout/table_layout_horizontal_gravity.xml
index dee81a5..fb72d81 100644
--- a/tests/FrameworkTest/res/layout/table_layout_horizontal_gravity.xml
+++ b/tests/FrameworkTest/res/layout/table_layout_horizontal_gravity.xml
@@ -19,7 +19,7 @@
-->
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchColumns="1">
diff --git a/tests/FrameworkTest/res/layout/table_layout_vertical_gravity.xml b/tests/FrameworkTest/res/layout/table_layout_vertical_gravity.xml
index 6a8b784..ae17ada 100644
--- a/tests/FrameworkTest/res/layout/table_layout_vertical_gravity.xml
+++ b/tests/FrameworkTest/res/layout/table_layout_vertical_gravity.xml
@@ -19,7 +19,7 @@
-->
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<TableRow>
diff --git a/tests/FrameworkTest/res/layout/table_layout_weight.xml b/tests/FrameworkTest/res/layout/table_layout_weight.xml
index 432c04a..ba4fade 100644
--- a/tests/FrameworkTest/res/layout/table_layout_weight.xml
+++ b/tests/FrameworkTest/res/layout/table_layout_weight.xml
@@ -19,7 +19,7 @@
-->
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<TableRow android:id="@+id/row"
diff --git a/tests/FrameworkTest/res/layout/translucent_background.xml b/tests/FrameworkTest/res/layout/translucent_background.xml
index 6b6e1cf..c4a1acf 100644
--- a/tests/FrameworkTest/res/layout/translucent_background.xml
+++ b/tests/FrameworkTest/res/layout/translucent_background.xml
@@ -19,6 +19,6 @@
<!-- This screen consists of a single text field that displays some text. -->
<TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text"
- android:layout_width="fill_parent" android:layout_height="fill_parent"
+ android:layout_width="match_parent" android:layout_height="match_parent"
android:gravity="center_vertical|center_horizontal"
android:text="@string/translucent_background"/>
diff --git a/tests/FrameworkTest/res/layout/viewgroupchildren.xml b/tests/FrameworkTest/res/layout/viewgroupchildren.xml
index a5bb7cb..22595ed 100644
--- a/tests/FrameworkTest/res/layout/viewgroupchildren.xml
+++ b/tests/FrameworkTest/res/layout/viewgroupchildren.xml
@@ -23,7 +23,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/group"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
</LinearLayout>
diff --git a/tests/FrameworkTest/res/layout/viewstub.xml b/tests/FrameworkTest/res/layout/viewstub.xml
index 9a6f376..8b32d8f 100644
--- a/tests/FrameworkTest/res/layout/viewstub.xml
+++ b/tests/FrameworkTest/res/layout/viewstub.xml
@@ -20,8 +20,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<Button android:id="@+id/vis"
android:layout_width="wrap_content"
diff --git a/tests/FrameworkTest/res/layout/visibility.xml b/tests/FrameworkTest/res/layout/visibility.xml
index b4f9d8b..7edfa33 100644
--- a/tests/FrameworkTest/res/layout/visibility.xml
+++ b/tests/FrameworkTest/res/layout/visibility.xml
@@ -22,30 +22,30 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:background="@drawable/box"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/refUp"
android:background="@drawable/red"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/visibility_1_view_1"/>
<TextView android:id="@+id/victim"
android:background="@drawable/green"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/visibility_1_view_2"/>
<TextView android:id="@+id/refDown"
android:background="@drawable/blue"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/visibility_1_view_3"/>
diff --git a/tests/FrameworkTest/res/layout/visibility_callback.xml b/tests/FrameworkTest/res/layout/visibility_callback.xml
index 8fd7c8f..322b640 100644
--- a/tests/FrameworkTest/res/layout/visibility_callback.xml
+++ b/tests/FrameworkTest/res/layout/visibility_callback.xml
@@ -22,35 +22,35 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:background="@drawable/box"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/refUp"
android:background="@drawable/red"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/visibility_1_view_1"/>
<FrameLayout android:id="@+id/parent"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content">
<view class="com.android.frameworktest.view.VisibilityCallback$MonitoredTextView"
android:id="@+id/victim"
android:background="@drawable/green"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/visibility_1_view_2"/>
</FrameLayout>
<TextView android:id="@+id/refDown"
android:background="@drawable/blue"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/visibility_1_view_3"/>
diff --git a/tests/FrameworkTest/res/layout/weight_sum.xml b/tests/FrameworkTest/res/layout/weight_sum.xml
index 249dc68..f8921ec 100644
--- a/tests/FrameworkTest/res/layout/weight_sum.xml
+++ b/tests/FrameworkTest/res/layout/weight_sum.xml
@@ -22,8 +22,8 @@
android:orientation="horizontal"
android:weightSum="1.0"
android:gravity="center_horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<Button android:id="@+id/child"
android:layout_width="0dip"
diff --git a/tests/FrameworkTest/res/layout/with_bitmap_background.xml b/tests/FrameworkTest/res/layout/with_bitmap_background.xml
index b32d99e..01605d5 100644
--- a/tests/FrameworkTest/res/layout/with_bitmap_background.xml
+++ b/tests/FrameworkTest/res/layout/with_bitmap_background.xml
@@ -20,8 +20,8 @@
<LinearLayout android:id="@+id/container" xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:background="@drawable/bitmap_drawable">
</LinearLayout>
diff --git a/tests/FrameworkTest/res/layout/zero_sized.xml b/tests/FrameworkTest/res/layout/zero_sized.xml
index c837bf9..f1c94f8 100644
--- a/tests/FrameworkTest/res/layout/zero_sized.xml
+++ b/tests/FrameworkTest/res/layout/zero_sized.xml
@@ -22,8 +22,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
<View android:id="@+id/dimension"
android:background="#ffff0000"
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/expandablelistview/InflatedExpandableListView.java b/tests/FrameworkTest/src/com/android/frameworktest/expandablelistview/InflatedExpandableListView.java
index f1089a1..aff0507 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/expandablelistview/InflatedExpandableListView.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/expandablelistview/InflatedExpandableListView.java
@@ -65,7 +65,7 @@
public TextView getGenericView() {
// Layout parameters for the ExpandableListView
AbsListView.LayoutParams lp = new AbsListView.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT, 64);
+ ViewGroup.LayoutParams.MATCH_PARENT, 64);
TextView textView = new TextView(InflatedExpandableListView.this);
textView.setLayoutParams(lp);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/focus/AdjacentVerticalRectLists.java b/tests/FrameworkTest/src/com/android/frameworktest/focus/AdjacentVerticalRectLists.java
index c4e2705..09bec2c 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/focus/AdjacentVerticalRectLists.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/focus/AdjacentVerticalRectLists.java
@@ -66,11 +66,11 @@
mLayout = new LinearLayout(this);
mLayout.setOrientation(LinearLayout.HORIZONTAL);
mLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(0,
- ViewGroup.LayoutParams.FILL_PARENT, 1);
+ ViewGroup.LayoutParams.MATCH_PARENT, 1);
mLeftColumn = new InternalSelectionView(this, 5, "left column");
mLeftColumn.setLayoutParams(params);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/focus/GoneParentFocusedChild.java b/tests/FrameworkTest/src/com/android/frameworktest/focus/GoneParentFocusedChild.java
index 91bd7b4..8f2245f 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/focus/GoneParentFocusedChild.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/focus/GoneParentFocusedChild.java
@@ -58,15 +58,15 @@
mLayout = new LinearLayout(this);
mLayout.setOrientation(LinearLayout.HORIZONTAL);
mLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mGoneGroup = new LinearLayout(this);
mGoneGroup.setOrientation(LinearLayout.HORIZONTAL);
mGoneGroup.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mButton = new Button(this);
mButton.setLayoutParams(new LinearLayout.LayoutParams(
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/focus/HorizontalFocusSearch.java b/tests/FrameworkTest/src/com/android/frameworktest/focus/HorizontalFocusSearch.java
index 01a9821..05f05ee 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/focus/HorizontalFocusSearch.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/focus/HorizontalFocusSearch.java
@@ -61,8 +61,8 @@
mLayout = new LinearLayout(this);
mLayout.setOrientation(LinearLayout.HORIZONTAL);
mLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mLeftTall = makeTall("left tall");
mLayout.addView(mLeftTall);
@@ -95,7 +95,7 @@
button.setText(label);
button.setLayoutParams(new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT));
return button;
}
@@ -118,7 +118,7 @@
ll.setOrientation(LinearLayout.VERTICAL);
ll.setLayoutParams(new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT));
if (atBottom) {
ll.addView(filler);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/focus/ListOfEditTexts.java b/tests/FrameworkTest/src/com/android/frameworktest/focus/ListOfEditTexts.java
index f59e2b7..41a276a 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/focus/ListOfEditTexts.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/focus/ListOfEditTexts.java
@@ -45,14 +45,14 @@
mLinearLayout = new LinearLayout(this);
mLinearLayout.setOrientation(LinearLayout.VERTICAL);
mLinearLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
// add a button above
Button buttonAbove = new Button(this);
buttonAbove.setLayoutParams(
new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
buttonAbove.setText("button above list");
mLinearLayout.addView(buttonAbove);
@@ -60,12 +60,12 @@
// add a list view to it
mListView = new ListView(this);
mListView.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mListView.setDrawSelectorOnTop(false);
mListView.setItemsCanFocus(true);
mListView.setLayoutParams((new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
0,
1f)));
@@ -82,7 +82,7 @@
Button buttonBelow = new Button(this);
buttonBelow.setLayoutParams(
new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
buttonBelow.setText("button below list");
mLinearLayout.addView(buttonBelow);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/focus/ListOfInternalSelectionViews.java b/tests/FrameworkTest/src/com/android/frameworktest/focus/ListOfInternalSelectionViews.java
index 4bbca74..6104068 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/focus/ListOfInternalSelectionViews.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/focus/ListOfInternalSelectionViews.java
@@ -119,8 +119,8 @@
mListView = new ListView(this);
mListView.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mListView.setDrawSelectorOnTop(false);
mListView.setAdapter(new MyAdapter());
mListView.setItemsCanFocus(true);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/focus/VerticalFocusSearch.java b/tests/FrameworkTest/src/com/android/frameworktest/focus/VerticalFocusSearch.java
index d1b83a3..a8f12d8 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/focus/VerticalFocusSearch.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/focus/VerticalFocusSearch.java
@@ -68,8 +68,8 @@
mLayout.setOrientation(LinearLayout.VERTICAL);
mLayout.setHorizontalGravity(Gravity.LEFT);
mLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mTopWide = makeWide("top wide");
mLayout.addView(mTopWide);
@@ -102,7 +102,7 @@
Button button = new MyButton(this);
button.setText(label);
button.setLayoutParams(new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
return button;
}
@@ -133,7 +133,7 @@
LinearLayout ll = new LinearLayout(this);
ll.setOrientation(LinearLayout.HORIZONTAL);
ll.setLayoutParams(new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
if (atRight) {
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/listview/ListItemISVAndButton.java b/tests/FrameworkTest/src/com/android/frameworktest/listview/ListItemISVAndButton.java
index d6c11b7..ceb94b7 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/listview/ListItemISVAndButton.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/listview/ListItemISVAndButton.java
@@ -47,13 +47,13 @@
final InternalSelectionView isv = new InternalSelectionView(context, 8, "ISV postion " + position);
isv.setLayoutParams(new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
desiredHeight - 240));
ll.addView(isv);
final LinearLayout.LayoutParams buttonLp =
new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
40);
final Button topButton = new Button(context);
topButton.setLayoutParams(
@@ -63,7 +63,7 @@
final TextView filler = new TextView(context);
filler.setLayoutParams(new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
200));
filler.setText("filler");
ll.addView(filler);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/listview/ListItemsExpandOnSelection.java b/tests/FrameworkTest/src/com/android/frameworktest/listview/ListItemsExpandOnSelection.java
index a137116..b0ad5e9 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/listview/ListItemsExpandOnSelection.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/listview/ListItemsExpandOnSelection.java
@@ -44,7 +44,7 @@
result.setFocusable(mItemsFocusable);
result.setText(getValueAtPosition(position));
final AbsListView.LayoutParams lp = new AbsListView.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
result.setLayoutParams(lp);
return result;
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/listview/ListSetSelection.java b/tests/FrameworkTest/src/com/android/frameworktest/listview/ListSetSelection.java
index 87888ca..45d5892 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/listview/ListSetSelection.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/listview/ListSetSelection.java
@@ -51,7 +51,7 @@
});
getListViewContainer().addView(mButton, new LinearLayout.LayoutParams(
- LinearLayout.LayoutParams.FILL_PARENT,
+ LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT
));
}
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/listview/ListViewHeight.java b/tests/FrameworkTest/src/com/android/frameworktest/listview/ListViewHeight.java
index 17222d9..1d6d598 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/listview/ListViewHeight.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/listview/ListViewHeight.java
@@ -70,14 +70,14 @@
}
});
- // Clicking this button will show the list view and set it fill_parent height
+ // Clicking this button will show the list view and set it match_parent height
// If you then hide the views, there is an NPE when calculating the ListView height.
mButton2.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// set listview to fill screen
ViewGroup.MarginLayoutParams lp;
lp = (ViewGroup.MarginLayoutParams) mInnerList.getLayoutParams();
- lp.height = lp.FILL_PARENT;
+ lp.height = lp.MATCH_PARENT;
mInnerList.setLayoutParams(lp);
// enable list adapter
mInnerList.setAdapter(mAdapter);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/scroll/ScrollViewButtonsAndLabels.java b/tests/FrameworkTest/src/com/android/frameworktest/scroll/ScrollViewButtonsAndLabels.java
index 4763ab1..2d3be2e 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/scroll/ScrollViewButtonsAndLabels.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/scroll/ScrollViewButtonsAndLabels.java
@@ -70,7 +70,7 @@
mLinearLayout = (LinearLayout) findViewById(R.id.layout);
LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(
- LinearLayout.LayoutParams.FILL_PARENT,
+ LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT
);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/util/ExpandableListScenario.java b/tests/FrameworkTest/src/com/android/frameworktest/util/ExpandableListScenario.java
index f72cbe8..5aa9479 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/util/ExpandableListScenario.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/util/ExpandableListScenario.java
@@ -18,7 +18,6 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.Random;
import android.view.Gravity;
import android.view.View;
@@ -256,7 +255,7 @@
result.setHeight(desiredHeight);
result.setText(getValueAtPosition(packedPosition));
final ViewGroup.LayoutParams lp = new AbsListView.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
result.setLayoutParams(lp);
result.setGravity(Gravity.CENTER_VERTICAL);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/util/GridScenario.java b/tests/FrameworkTest/src/com/android/frameworktest/util/GridScenario.java
index 746cf23..76a1101 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/util/GridScenario.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/util/GridScenario.java
@@ -242,8 +242,8 @@
mGridView = new GridView(this);
mGridView.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mGridView.setDrawSelectorOnTop(false);
if (mNumColumns >= GridView.AUTO_FIT) {
mGridView.setNumColumns(mNumColumns);
@@ -330,7 +330,7 @@
result.setHeight(desiredHeight);
result.setText(getValueAtPosition(position));
final ViewGroup.LayoutParams lp = new AbsListView.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
result.setLayoutParams(lp);
result.setId(position);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/util/ListItemFactory.java b/tests/FrameworkTest/src/com/android/frameworktest/util/ListItemFactory.java
index 4327a8a..2c1cf5b 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/util/ListItemFactory.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/util/ListItemFactory.java
@@ -50,7 +50,7 @@
final LinearLayout.LayoutParams buttonLp =
new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
50);
final Button topButton = new Button(context);
@@ -61,7 +61,7 @@
final TextView middleFiller = new TextView(context);
middleFiller.setLayoutParams(new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
desiredHeight - 100));
middleFiller.setText("filler");
ll.addView(middleFiller);
@@ -157,7 +157,7 @@
result.setHeight(desiredHeight);
result.setText(text);
final ViewGroup.LayoutParams lp = new AbsListView.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
result.setLayoutParams(lp);
result.setId(position);
@@ -197,7 +197,7 @@
result.setHeight(desiredHeight);
result.setText(text);
final ViewGroup.LayoutParams lp = new AbsListView.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
result.setLayoutParams(lp);
result.setId(position);
@@ -239,7 +239,7 @@
final AbsListView.LayoutParams lp =
new AbsListView.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
desiredHeight);
ll.setLayoutParams(lp);
ll.setId(position);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/util/ListScenario.java b/tests/FrameworkTest/src/com/android/frameworktest/util/ListScenario.java
index 5889658..a6ae188 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/util/ListScenario.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/util/ListScenario.java
@@ -315,8 +315,8 @@
mListView = createListView();
mListView.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mListView.setDrawSelectorOnTop(false);
for (int i=0; i<mHeaderViewCount; i++) {
@@ -375,16 +375,16 @@
mHeaderTextView = new TextView(this);
mHeaderTextView.setText("hi");
mHeaderTextView.setLayoutParams(new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
mLinearLayout.addView(mHeaderTextView);
mLinearLayout.setOrientation(LinearLayout.VERTICAL);
mLinearLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mListView.setLayoutParams((new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
0,
1f)));
@@ -394,10 +394,10 @@
mLinearLayout = new LinearLayout(this);
mLinearLayout.setOrientation(LinearLayout.VERTICAL);
mLinearLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mListView.setLayoutParams((new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
0,
1f)));
mLinearLayout.addView(mListView);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/util/ScrollViewScenario.java b/tests/FrameworkTest/src/com/android/frameworktest/util/ScrollViewScenario.java
index aa17194..daa168d 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/util/ScrollViewScenario.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/util/ScrollViewScenario.java
@@ -174,7 +174,7 @@
// fill width, equally weighted on height
final LinearLayout.LayoutParams lp =
new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT, 0, 1f);
+ ViewGroup.LayoutParams.MATCH_PARENT, 0, 1f);
for (int i = 0; i < numButtons; i++) {
final Button button = new Button(context);
button.setText(prefix + i);
@@ -240,15 +240,15 @@
// create views specified by params
for (ViewFactory viewFactory : params.mViewFactories) {
final LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT,
(int) (viewFactory.getHeightRatio() * screenHeight));
mLinearLayout.addView(viewFactory.create(this), lp);
}
mScrollView = createScrollView();
mScrollView.addView(mLinearLayout, new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
// no animation to speed up tests
mScrollView.setSmoothScrollingEnabled(false);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/view/BigCache.java b/tests/FrameworkTest/src/com/android/frameworktest/view/BigCache.java
index 6f5eb00..52f7a07 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/view/BigCache.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/view/BigCache.java
@@ -39,7 +39,7 @@
final LinearLayout testBed = new LinearLayout(this);
testBed.setOrientation(LinearLayout.VERTICAL);
testBed.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
+ ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
final int cacheSize = ViewConfiguration.getMaximumDrawingCacheSize();
final Display display = getWindowManager().getDefaultDisplay();
@@ -60,7 +60,7 @@
final ScrollView scroller = new ScrollView(this);
scroller.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
testBed.addView(tiny);
testBed.addView(large);
diff --git a/tests/FrameworkTest/src/com/android/frameworktest/view/PreDrawListener.java b/tests/FrameworkTest/src/com/android/frameworktest/view/PreDrawListener.java
index cb456b2..e907b24 100644
--- a/tests/FrameworkTest/src/com/android/frameworktest/view/PreDrawListener.java
+++ b/tests/FrameworkTest/src/com/android/frameworktest/view/PreDrawListener.java
@@ -60,7 +60,7 @@
if (mCancelNextDraw) {
Button b = new Button(this.getContext());
b.setText("Hello");
- addView(b, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
+ addView(b, new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.WRAP_CONTENT));
mCancelNextDraw = false;
return false;
diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/expandablelistview/ExpandableListWithHeadersTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/expandablelistview/ExpandableListWithHeadersTest.java
deleted file mode 100644
index 49b5106..0000000
--- a/tests/FrameworkTest/tests/src/com/android/frameworktest/expandablelistview/ExpandableListWithHeadersTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package com.android.frameworktest.expandablelistview;
-
-import android.test.ActivityInstrumentationTestCase;
-import android.test.suitebuilder.annotation.LargeTest;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.view.KeyEvent;
-import android.widget.ExpandableListView;
-
-import com.android.frameworktest.expandablelistview.ExpandableListWithHeaders;
-import com.android.frameworktest.util.ListUtil;
-
-public class ExpandableListWithHeadersTest extends ActivityInstrumentationTestCase<ExpandableListWithHeaders> {
- private ExpandableListView mExpandableListView;
- private ListUtil mListUtil;
-
- public ExpandableListWithHeadersTest() {
- super("com.android.frameworktest",
- ExpandableListWithHeaders.class);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- mExpandableListView = getActivity().getExpandableListView();
- mListUtil = new ListUtil(mExpandableListView, getInstrumentation());
- }
-
- @MediumTest
- public void testPreconditions() {
- assertNotNull(mExpandableListView);
- }
-
- @MediumTest
- public void testExpandOnFirstPosition() {
- // Should be a header, and hence the first group should NOT have expanded
- mListUtil.arrowScrollToSelectedPosition(0);
- sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
- getInstrumentation().waitForIdleSync();
- assertFalse(mExpandableListView.isGroupExpanded(0));
- }
-
- @LargeTest
- public void testExpandOnFirstGroup() {
- mListUtil.arrowScrollToSelectedPosition(getActivity().getNumOfHeadersAndFooters());
- sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
- getInstrumentation().waitForIdleSync();
- assertTrue(mExpandableListView.isGroupExpanded(0));
- }
-}
diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/view/RemoteViewsActivityTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/view/RemoteViewsActivityTest.java
deleted file mode 100644
index 3dcb252..0000000
--- a/tests/FrameworkTest/tests/src/com/android/frameworktest/view/RemoteViewsActivityTest.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.frameworktest.view;
-
-import android.os.Parcel;
-import android.test.ActivityInstrumentationTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.view.InflateException;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.RemoteViews;
-
-import com.android.frameworktest.R;
-import com.android.frameworktest.view.RemoteViewsActivity;
-
-public class RemoteViewsActivityTest extends ActivityInstrumentationTestCase<RemoteViewsActivity> {
- public RemoteViewsActivityTest() {
- super("com.android.frameworktest", RemoteViewsActivity.class);
- }
-
- @Override
- public void setUp() throws Exception {
- super.setUp();
- }
-
- @MediumTest
- public void testGood() throws Exception {
- final RemoteViewsActivity activity = getActivity();
-
- RemoteViews orig = new RemoteViews("com.android.frameworktest",
- R.layout.remote_view_test_good);
- Parcel p = Parcel.obtain();
- orig.writeToParcel(p, 0);
- p.setDataPosition(0);
-
- RemoteViews r = RemoteViews.CREATOR.createFromParcel(p);
-
- ViewGroup parent = (ViewGroup) activity.findViewById(R.id.parent);
-
- View result = r.apply(activity, parent);
-
- p.recycle();
-
- assertTrue("LinearLayout not inflated", result.findViewById(R.id.linear) != null);
- assertTrue("TextView not inflated", result.findViewById(R.id.text) != null);
- assertTrue("ImageView not inflated", result.findViewById(R.id.image) != null);
- assertTrue("FrameLayout not inflated", result.findViewById(R.id.frame) != null);
- assertTrue("RelateiveLayout not inflated", result.findViewById(R.id.relative) != null);
- assertTrue("AbsoluteLayout not inflated", result.findViewById(R.id.absolute) != null);
- assertTrue("ProgressBar not inflated", result.findViewById(R.id.progress) != null);
- assertTrue("ImageButton not inflated", result.findViewById(R.id.image_button) != null);
- assertTrue("Button not inflated", result.findViewById(R.id.button) != null);
- }
-
- @MediumTest
- public void testDerivedClass() throws Exception {
- final RemoteViewsActivity activity = getActivity();
-
- RemoteViews orig = new RemoteViews("com.android.frameworktest",
- R.layout.remote_view_test_bad_1);
- Parcel p = Parcel.obtain();
- orig.writeToParcel(p, 0);
- p.setDataPosition(0);
-
- RemoteViews r = RemoteViews.CREATOR.createFromParcel(p);
-
- ViewGroup parent = (ViewGroup) activity.findViewById(R.id.parent);
-
- boolean exceptionThrown = false;
- View result = null;
-
- try {
- result = r.apply(activity, parent);
- } catch (InflateException e) {
- exceptionThrown = true;
- }
-
- p.recycle();
-
- assertTrue("Derived class (EditText) allowed to be inflated", exceptionThrown);
- assertNull("Derived class (EditText) allowed to be inflated", result);
- }
-
- @MediumTest
- public void testWebView() throws Exception {
- final RemoteViewsActivity activity = getActivity();
-
- RemoteViews orig = new RemoteViews("com.android.frameworktest",
- R.layout.remote_view_test_bad_2);
- Parcel p = Parcel.obtain();
- orig.writeToParcel(p, 0);
- p.setDataPosition(0);
-
- RemoteViews r = RemoteViews.CREATOR.createFromParcel(p);
-
- ViewGroup parent = (ViewGroup) activity.findViewById(R.id.parent);
-
- boolean exceptionThrown = false;
- View result = null;
-
- try {
- result = r.apply(activity, parent);
- } catch (InflateException e) {
- exceptionThrown = true;
- }
-
- p.recycle();
-
- assertTrue("WebView allowed to be inflated", exceptionThrown);
- assertNull("WebView allowed to be inflated", result);
- }
-}
diff --git a/tests/FrameworkTest/tests/src/com/android/frameworktest/view/ViewGroupChildrenTest.java b/tests/FrameworkTest/tests/src/com/android/frameworktest/view/ViewGroupChildrenTest.java
index fceec51..a6007e1 100644
--- a/tests/FrameworkTest/tests/src/com/android/frameworktest/view/ViewGroupChildrenTest.java
+++ b/tests/FrameworkTest/tests/src/com/android/frameworktest/view/ViewGroupChildrenTest.java
@@ -260,7 +260,7 @@
TextView view = new TextView(getActivity());
view.setText(text);
view.setLayoutParams(new LinearLayout.LayoutParams(
- LinearLayout.LayoutParams.FILL_PARENT,
+ LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT
));
return view;
diff --git a/tests/ImfTest/res/layout/dialog_edit_text_no_scroll.xml b/tests/ImfTest/res/layout/dialog_edit_text_no_scroll.xml
index e8ffa1c..1a2b7eb 100644
--- a/tests/ImfTest/res/layout/dialog_edit_text_no_scroll.xml
+++ b/tests/ImfTest/res/layout/dialog_edit_text_no_scroll.xml
@@ -15,21 +15,21 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:padding="20dip"
android:orientation="vertical">
<View
android:id="@+id/blank"
android:layout_height="0dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_weight="1"/>
<EditText
android:id="@+id/dialog_edit_text"
android:layout_height="wrap_content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:scrollHorizontally="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
diff --git a/tests/ImfTest/res/layout/full_screen_edit_text.xml b/tests/ImfTest/res/layout/full_screen_edit_text.xml
index f22aa2f..e760ac1 100755
--- a/tests/ImfTest/res/layout/full_screen_edit_text.xml
+++ b/tests/ImfTest/res/layout/full_screen_edit_text.xml
@@ -20,8 +20,8 @@
<EditText xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/data"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:minLines="15"
android:gravity="top"/>
diff --git a/tests/ImfTest/res/layout/one_edit_text_activity.xml b/tests/ImfTest/res/layout/one_edit_text_activity.xml
index 09925e1..0558228 100755
--- a/tests/ImfTest/res/layout/one_edit_text_activity.xml
+++ b/tests/ImfTest/res/layout/one_edit_text_activity.xml
@@ -18,32 +18,32 @@
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
android:baselineAligned="false">
<View android:id="@+id/blank"
android:layout_height="0dip"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_weight="1"
/>
<EditText android:id="@+id/dialog_edit_text"
android:layout_height="wrap_content"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:scrollHorizontally="true"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
</LinearLayout>
<View
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:background="@android:drawable/divider_horizontal_dark"
/>
diff --git a/tests/ImfTest/res/layout/sample_edit_text.xml b/tests/ImfTest/res/layout/sample_edit_text.xml
index 99a5cf8..3ff6767 100755
--- a/tests/ImfTest/res/layout/sample_edit_text.xml
+++ b/tests/ImfTest/res/layout/sample_edit_text.xml
@@ -18,12 +18,12 @@
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<LinearLayout
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
@@ -46,7 +46,7 @@
</LinearLayout>
<View
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="1dip"
android:background="@android:drawable/divider_horizontal_dark"
/>
diff --git a/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollablePanScan.java b/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollablePanScan.java
index 9754381..21734a6 100644
--- a/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollablePanScan.java
+++ b/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollablePanScan.java
@@ -7,9 +7,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
-import android.widget.EditText;
import android.widget.LinearLayout;
-import android.widget.ScrollView;
public class BigEditTextActivityNonScrollablePanScan extends Activity {
@@ -25,8 +23,8 @@
mRootView = new LinearLayout(this);
((LinearLayout) mRootView).setOrientation(LinearLayout.VERTICAL);
mRootView.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
View view = getLayoutInflater().inflate(
R.layout.full_screen_edit_text, ((LinearLayout) mRootView), false);
diff --git a/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollableResize.java b/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollableResize.java
index 701795f..48287fb 100644
--- a/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollableResize.java
+++ b/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityNonScrollableResize.java
@@ -7,9 +7,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
-import android.widget.EditText;
import android.widget.LinearLayout;
-import android.widget.ScrollView;
public class BigEditTextActivityNonScrollableResize extends Activity {
@@ -25,8 +23,8 @@
mRootView = new LinearLayout(this);
((LinearLayout) mRootView).setOrientation(LinearLayout.VERTICAL);
mRootView.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
View view = getLayoutInflater().inflate(
R.layout.full_screen_edit_text, ((LinearLayout) mRootView), false);
diff --git a/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollablePanScan.java b/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollablePanScan.java
index bb3f767..48e1359 100644
--- a/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollablePanScan.java
+++ b/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollablePanScan.java
@@ -7,7 +7,6 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
-import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ScrollView;
@@ -26,14 +25,14 @@
mRootView = new ScrollView(this);
((ScrollView) mRootView).setFillViewport(true);
mRootView.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mLayout = new LinearLayout(this);
mLayout.setOrientation(LinearLayout.VERTICAL);
mLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
View view = getLayoutInflater().inflate(
R.layout.full_screen_edit_text, ((ScrollView) mRootView), false);
diff --git a/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollableResize.java b/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollableResize.java
index f2cae1c..d51e8a7 100644
--- a/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollableResize.java
+++ b/tests/ImfTest/src/com/android/imftest/samples/BigEditTextActivityScrollableResize.java
@@ -7,7 +7,6 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
-import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ScrollView;
@@ -26,14 +25,14 @@
mRootView = new ScrollView(this);
((ScrollView) mRootView).setFillViewport(true);
mRootView.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mLayout = new LinearLayout(this);
mLayout.setOrientation(LinearLayout.VERTICAL);
mLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
View view = getLayoutInflater().inflate(
R.layout.full_screen_edit_text, ((ScrollView) mRootView), false);
diff --git a/tests/ImfTest/src/com/android/imftest/samples/DialogActivity.java b/tests/ImfTest/src/com/android/imftest/samples/DialogActivity.java
index e49301c..f65e1fd 100644
--- a/tests/ImfTest/src/com/android/imftest/samples/DialogActivity.java
+++ b/tests/ImfTest/src/com/android/imftest/samples/DialogActivity.java
@@ -2,18 +2,14 @@
import android.app.Activity;
import android.os.Bundle;
-import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
-import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.EditText;
import android.widget.Button;
import android.view.LayoutInflater;
import android.app.Dialog;
-import com.android.internal.R;
-
public class DialogActivity extends Activity {
private static final int DIALOG_WITHOUT_EDITTEXT = 0;
@@ -34,8 +30,8 @@
mLayout = new LinearLayout(this);
mLayout.setOrientation(LinearLayout.VERTICAL);
mLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mButton1 = new Button(this);
mButton1.setText("Dialog WITHOUT EditText");//(R.string.open_dialog_scrollable);
diff --git a/tests/ImfTest/src/com/android/imftest/samples/EditTextActivityDialog.java b/tests/ImfTest/src/com/android/imftest/samples/EditTextActivityDialog.java
index bd1e934..d4726fc 100644
--- a/tests/ImfTest/src/com/android/imftest/samples/EditTextActivityDialog.java
+++ b/tests/ImfTest/src/com/android/imftest/samples/EditTextActivityDialog.java
@@ -3,7 +3,6 @@
import com.android.imftest.R;
import android.app.Activity;
-import android.app.AlertDialog;
import android.app.Dialog;
import android.os.Bundle;
import android.view.LayoutInflater;
@@ -33,8 +32,8 @@
mLayout = new LinearLayout(this);
mLayout.setOrientation(LinearLayout.VERTICAL);
mLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mButton1 = new Button(this);
mButton1.setText(R.string.open_dialog_scrollable);
diff --git a/tests/ImfTest/src/com/android/imftest/samples/InputTypeActivity.java b/tests/ImfTest/src/com/android/imftest/samples/InputTypeActivity.java
index 17f6bdc..25ac2f0 100755
--- a/tests/ImfTest/src/com/android/imftest/samples/InputTypeActivity.java
+++ b/tests/ImfTest/src/com/android/imftest/samples/InputTypeActivity.java
@@ -21,17 +21,13 @@
import android.app.Activity;
import android.widget.EditText;
import android.widget.LinearLayout;
-import android.widget.Button;
import android.widget.ScrollView;
import android.widget.TextView;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.view.ViewParent;
-import android.view.ViewRoot;
import android.view.inputmethod.EditorInfo;
-import android.content.Context;
public class InputTypeActivity extends Activity {
@@ -49,8 +45,8 @@
mLayout = new LinearLayout(this);
mLayout.setOrientation(LinearLayout.VERTICAL);
mLayout.setLayoutParams(new ViewGroup.LayoutParams(
- ViewGroup.LayoutParams.FILL_PARENT,
- ViewGroup.LayoutParams.FILL_PARENT));
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ ViewGroup.LayoutParams.MATCH_PARENT));
mInflater = getLayoutInflater();
mParent = mLayout;
diff --git a/tests/LowStorageTest/res/layout/main.xml b/tests/LowStorageTest/res/layout/main.xml
index cc99102..f1cc680 100644
--- a/tests/LowStorageTest/res/layout/main.xml
+++ b/tests/LowStorageTest/res/layout/main.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:stretchColumns="1">
<TextView
diff --git a/tests/StatusBar/res/layout/chrono_notification.xml b/tests/StatusBar/res/layout/chrono_notification.xml
index 913a860..98a9fdd 100644
--- a/tests/StatusBar/res/layout/chrono_notification.xml
+++ b/tests/StatusBar/res/layout/chrono_notification.xml
@@ -1,12 +1,12 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="80sp"
android:orientation="horizontal"
>
<LinearLayout
android:layout_width="wrap_content"
- android:layout_height="fill_parent"
+ android:layout_height="match_parent"
android:layout_weight="0"
android:orientation="vertical"
>
diff --git a/tests/TransformTest/Android.mk b/tests/TransformTest/Android.mk
new file mode 100644
index 0000000..2d3637d
--- /dev/null
+++ b/tests/TransformTest/Android.mk
@@ -0,0 +1,10 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_PACKAGE_NAME := TransformTest
+
+LOCAL_MODULE_TAGS := tests
+
+include $(BUILD_PACKAGE)
diff --git a/tests/TransformTest/AndroidManifest.xml b/tests/TransformTest/AndroidManifest.xml
new file mode 100644
index 0000000..5c9995f
--- /dev/null
+++ b/tests/TransformTest/AndroidManifest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.google.android.test.transform">
+ <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="7" />
+ <application android:label="TransformTest">
+ <activity android:name="TransformTestActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/tests/TransformTest/res/drawable/logo.png b/tests/TransformTest/res/drawable/logo.png
new file mode 100644
index 0000000..4d717a8
--- /dev/null
+++ b/tests/TransformTest/res/drawable/logo.png
Binary files differ
diff --git a/core/res/res/drawable/pickerbox.xml b/tests/TransformTest/res/values/strings.xml
similarity index 64%
copy from core/res/res/drawable/pickerbox.xml
copy to tests/TransformTest/res/values/strings.xml
index 9cb2436..a0eb81f 100644
--- a/core/res/res/drawable/pickerbox.xml
+++ b/tests/TransformTest/res/values/strings.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
+<!-- Copyright (C) 2007 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.
@@ -14,8 +14,6 @@
limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/pickerbox_selected" />
- <item android:drawable="@drawable/pickerbox_unselected" />
-</selector>
-
+<resources>
+ <string name="act_title">TransformTest</string>
+</resources>
diff --git a/tests/TransformTest/src/com/google/android/test/transform/TransformTestActivity.java b/tests/TransformTest/src/com/google/android/test/transform/TransformTestActivity.java
new file mode 100644
index 0000000..52286d1
--- /dev/null
+++ b/tests/TransformTest/src/com/google/android/test/transform/TransformTestActivity.java
@@ -0,0 +1,171 @@
+/*
+ * 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.
+ */
+
+package com.google.android.test.transform;
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Matrix;
+import android.graphics.drawable.Drawable;
+import android.os.Bundle;
+import android.util.DisplayMetrics;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.TransformGestureDetector;
+import android.view.View;
+import android.widget.LinearLayout;
+
+public class TransformTestActivity extends Activity {
+ public TransformTestActivity() {
+ super();
+ init(false);
+ }
+
+ public TransformTestActivity(boolean noCompat) {
+ super();
+ init(noCompat);
+ }
+
+ public void init(boolean noCompat) {
+
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ final LayoutInflater li = (LayoutInflater)getSystemService(
+ LAYOUT_INFLATER_SERVICE);
+
+ this.setTitle(R.string.act_title);
+ LinearLayout root = new LinearLayout(this);
+ root.setOrientation(LinearLayout.VERTICAL);
+
+ TransformView view = new TransformView(getApplicationContext());
+ Drawable drawable = getResources().getDrawable(R.drawable.logo);
+ drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicWidth());
+ view.setDrawable(drawable);
+
+ root.addView(view);
+ setContentView(root);
+ }
+
+ private class TransformView extends View {
+ private Drawable mDrawable;
+ private float mPosX;
+ private float mPosY;
+ private float mScale = 1.f;
+ private Matrix mMatrix;
+ private TransformGestureDetector mDetector;
+
+ private class Listener implements TransformGestureDetector.OnTransformGestureListener {
+
+ public boolean onTransform(TransformGestureDetector detector) {
+ Log.d("ttest", "Translation: (" + detector.getTranslateX() +
+ ", " + detector.getTranslateY() + ")");
+ float scale = detector.getScaleFactor();
+ Log.d("ttest", "Scale: " + scale);
+ if (mScale * scale > 0.1f) {
+ if (mScale * scale < 10.f) {
+ mScale *= scale;
+ } else {
+ mScale = 10.f;
+ }
+ } else {
+ mScale = 0.1f;
+ }
+
+ mPosX += detector.getTranslateX();
+ mPosY += detector.getTranslateY();
+
+ Log.d("ttest", "mScale: " + mScale + " mPos: (" + mPosX + ", " + mPosY + ")");
+
+ float sizeX = mDrawable.getIntrinsicWidth()/2;
+ float sizeY = mDrawable.getIntrinsicHeight()/2;
+ float centerX = detector.getCenterX();
+ float centerY = detector.getCenterY();
+ float diffX = centerX - mPosX;
+ float diffY = centerY - mPosY;
+ diffX = diffX*scale - diffX;
+ diffY = diffY*scale - diffY;
+ mPosX -= diffX;
+ mPosY -= diffY;
+ mMatrix.reset();
+ mMatrix.postTranslate(-sizeX, -sizeY);
+ mMatrix.postScale(mScale, mScale);
+ mMatrix.postTranslate(mPosX, mPosY);
+
+ invalidate();
+
+ return true;
+ }
+
+ public boolean onTransformBegin(TransformGestureDetector detector) {
+ return true;
+ }
+
+ public boolean onTransformEnd(TransformGestureDetector detector) {
+ return true;
+ }
+
+ public boolean onTransformFling(TransformGestureDetector detector) {
+ return false;
+ }
+
+ }
+
+ public TransformView(Context context) {
+ super(context);
+ mMatrix = new Matrix();
+ mDetector = new TransformGestureDetector(context, new Listener());
+ DisplayMetrics metrics = context.getResources().getDisplayMetrics();
+ mPosX = metrics.widthPixels/2;
+ mPosY = metrics.heightPixels/2;
+ }
+
+ public void setDrawable(Drawable d) {
+ mDrawable = d;
+
+ float sizeX = mDrawable.getIntrinsicWidth()/2;
+ float sizeY = mDrawable.getIntrinsicHeight()/2;
+ mMatrix.reset();
+ mMatrix.postTranslate(-sizeX, -sizeY);
+ mMatrix.postScale(mScale, mScale);
+ mMatrix.postTranslate(mPosX, mPosY);
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ boolean handled = mDetector.onTouchEvent(event);
+
+ int pointerCount = event.getPointerCount();
+ Log.d("ttest", "pointerCount: " + pointerCount);
+
+ return handled;
+ }
+
+ @Override
+ public void onDraw(Canvas canvas) {
+ int saveCount = canvas.getSaveCount();
+ canvas.save();
+ canvas.concat(mMatrix);
+ mDrawable.draw(canvas);
+ canvas.restoreToCount(saveCount);
+ }
+ }
+}
diff --git a/tests/appwidgets/AppWidgetHostTest/Android.mk b/tests/appwidgets/AppWidgetHostTest/Android.mk
index 1bb1e54..4d0c704 100644
--- a/tests/appwidgets/AppWidgetHostTest/Android.mk
+++ b/tests/appwidgets/AppWidgetHostTest/Android.mk
@@ -1,7 +1,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
diff --git a/tests/appwidgets/AppWidgetHostTest/res/layout/appwidget_host.xml b/tests/appwidgets/AppWidgetHostTest/res/layout/appwidget_host.xml
index e5c3b28..88c6488 100644
--- a/tests/appwidgets/AppWidgetHostTest/res/layout/appwidget_host.xml
+++ b/tests/appwidgets/AppWidgetHostTest/res/layout/appwidget_host.xml
@@ -16,8 +16,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
@@ -26,7 +26,7 @@
/>
<ScrollView
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
>
diff --git a/tests/appwidgets/AppWidgetHostTest/res/layout/test_appwidget_configure.xml b/tests/appwidgets/AppWidgetHostTest/res/layout/test_appwidget_configure.xml
index 0d9b983..a0f9cc2 100644
--- a/tests/appwidgets/AppWidgetHostTest/res/layout/test_appwidget_configure.xml
+++ b/tests/appwidgets/AppWidgetHostTest/res/layout/test_appwidget_configure.xml
@@ -15,21 +15,21 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<TextView
android:id="@+id/oh_hai_text"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/oh_hai"
/>
<EditText
android:id="@+id/edit_text"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
diff --git a/tests/appwidgets/AppWidgetHostTest/src/com/android/tests/appwidgethost/AppWidgetHostActivity.java b/tests/appwidgets/AppWidgetHostTest/src/com/android/tests/appwidgethost/AppWidgetHostActivity.java
index 2fb2d1de..bb0fa60 100644
--- a/tests/appwidgets/AppWidgetHostTest/src/com/android/tests/appwidgethost/AppWidgetHostActivity.java
+++ b/tests/appwidgets/AppWidgetHostTest/src/com/android/tests/appwidgethost/AppWidgetHostActivity.java
@@ -129,7 +129,7 @@
// Add it to the list
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
- LinearLayout.LayoutParams.FILL_PARENT,
+ LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
mAppWidgetContainer.addView(view, layoutParams);
diff --git a/tests/appwidgets/AppWidgetProviderTest/Android.mk b/tests/appwidgets/AppWidgetProviderTest/Android.mk
index c87a0f2..6084fb9 100644
--- a/tests/appwidgets/AppWidgetProviderTest/Android.mk
+++ b/tests/appwidgets/AppWidgetProviderTest/Android.mk
@@ -1,7 +1,7 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-subdir-java-files)
diff --git a/tests/framework-tests/src/android/test/FrameworkTests.java b/tests/framework-tests/src/android/test/FrameworkTests.java
index b5f6292..623e294 100644
--- a/tests/framework-tests/src/android/test/FrameworkTests.java
+++ b/tests/framework-tests/src/android/test/FrameworkTests.java
@@ -1,8 +1,6 @@
package android.test;
import com.android.internal.os.LoggingPrintStreamTest;
-import android.util.EventLogFunctionalTest;
-import android.util.EventLogTest;
import junit.framework.TestSuite;
import com.android.internal.http.multipart.MultipartTest;
import com.android.internal.policy.impl.LockPatternKeyguardViewTest;
@@ -18,8 +16,6 @@
TestSuite suite = new TestSuite(FrameworkTests.class.getName());
suite.addTestSuite(MultipartTest.class);
- suite.addTestSuite(EventLogTest.class);
- suite.addTestSuite(EventLogFunctionalTest.class);
suite.addTestSuite(LoggingPrintStreamTest.class);
suite.addTestSuite(LockPatternKeyguardViewTest.class);
diff --git a/tests/framework-tests/src/android/util/EventLogFunctionalTest.java b/tests/framework-tests/src/android/util/EventLogFunctionalTest.java
deleted file mode 100644
index 8263083..0000000
--- a/tests/framework-tests/src/android/util/EventLogFunctionalTest.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package android.util;
-
-import android.os.Process;
-
-import com.google.android.collect.Lists;
-
-import junit.framework.TestCase;
-import junit.framework.Assert;
-
-import java.util.ArrayList;
-
-/**
- * Functional tests of EventLog.
- */
-
-public class EventLogFunctionalTest extends TestCase {
- private static final String TAG = "EventLogFunctionalTest";
-
- private static final int TAG_SIZE = 4;
- private static final int TYPE_FIELD_SIZE = 1;
- private static final int STARTING_POS_OF_PAYLOAD = TAG_SIZE + TYPE_FIELD_SIZE;
-
- private static final int TEST_TAG = 42;
- private static final int TEST_TAG2 = 314;
-
- //todo: For now all we do is test the returned length. More to come.
- public void testLogOfPosInt() throws Exception {
- final int numBytes = EventLog.writeEvent(TEST_TAG, 0x01020304);
- Assert.assertEquals(STARTING_POS_OF_PAYLOAD + 4, numBytes);
- }
-
- //todo: For now all we do is test the returned length. More to come.
- public void testLogOfPosLong() throws Exception {
- final int numBytes = EventLog.writeEvent(TEST_TAG2, 0x0102030405060708L);
- Assert.assertEquals(STARTING_POS_OF_PAYLOAD + 8, numBytes);
- }
-
- //todo: For now all we do is test the returned length. More to come.
- public void testLogOfString() throws Exception {
- final String valueStr = "foo bar baz";
- final int numBytes = EventLog.writeEvent(TEST_TAG, valueStr);
- Assert.assertEquals(STARTING_POS_OF_PAYLOAD + 4 + valueStr.length() + 1, numBytes);
- }
-
- public void testLogOfListWithOneInt() throws Exception {
- final EventLog.List list = new EventLog.List(1234);
- final int numBytes = EventLog.writeEvent(TEST_TAG, list);
- Assert.assertEquals(STARTING_POS_OF_PAYLOAD + 1 + 1 + 4 + 1, numBytes);
- }
-
- public void testLogOfListWithMultipleInts() throws Exception {
- final EventLog.List list = new EventLog.List(1234, 2345, 3456);
- final int numBytes = EventLog.writeEvent(TEST_TAG, list);
- Assert.assertEquals(STARTING_POS_OF_PAYLOAD + 1 + 1 + 4 + 1 + 4 + 1 + 4 + 1, numBytes);
- }
-
- public void testLogOfListWithEmbeddedList() throws Exception {
- final EventLog.List list = new EventLog.List(
- new EventLog.List(1234, 2345, 3456));
- final int numBytes = EventLog.writeEvent(TEST_TAG, list);
- Assert.assertEquals(STARTING_POS_OF_PAYLOAD + 2 + 1 + 1 + 4 + 1 + 4 + 1 + 4 + 1, numBytes);
- }
-
- public void testEventLargerThanInitialBufferCapacity() throws Exception {
- final Integer[] array = new Integer[127];
- for (int i = 0; i < array.length; i++) {
- array[i] = i;
- }
- final EventLog.List list = new EventLog.List((Object[]) array);
- final int numBytes = EventLog.writeEvent(TEST_TAG, list);
- Assert.assertEquals(STARTING_POS_OF_PAYLOAD + 1 + (5 * array.length) + 1, numBytes);
- }
-
- // This test is obsolete. See http://b/issue?id=1262082
- public void disableTestReadSimpleEvent() throws Exception {
- long when = System.currentTimeMillis();
- EventLog.writeEvent(2718, 12345);
- Log.i(TAG, "Wrote simple event at T=" + when);
-
- ArrayList<EventLog.Event> list = new ArrayList<EventLog.Event>();
- EventLog.readEvents(new int[] { 2718 }, list);
-
- boolean found = false;
- for (EventLog.Event event : list) {
- assertEquals(event.getTag(), 2718);
- long eventTime = event.getTimeNanos() / 1000000;
- Log.i(TAG, " Found event T=" + eventTime);
- if (eventTime > when - 100 && eventTime < when + 1000) {
- assertEquals(event.getProcessId(), Process.myPid());
- assertEquals(event.getThreadId(), Process.myTid());
- assertEquals(event.getData(), 12345);
-
- assertFalse(found);
- found = true;
- }
- }
-
- assertTrue(found);
- }
-
- // This test is obsolete. See http://b/issue?id=1262082
- public void disableTestReadCompoundEntry() throws Exception {
- long when = System.currentTimeMillis();
- EventLog.writeEvent(2719,
- new EventLog.List(1l, new EventLog.List("2", "three", "4"), 5));
- Log.i(TAG, "Wrote compound event at T=" + when);
-
- ArrayList<EventLog.Event> list = new ArrayList<EventLog.Event>();
- EventLog.readEvents(new int[] { 2719 }, list);
-
- boolean found = false;
- for (EventLog.Event event : list) {
- long eventTime = event.getTimeNanos() / 1000000;
- Log.i(TAG, " Found event T=" + eventTime);
- if (eventTime > when - 100 && eventTime < when + 1000) {
- EventLog.List data = (EventLog.List) event.getData();
- assertEquals(data.getNumItems(), 3);
-
- EventLog.List nested = (EventLog.List) data.getItem(1);
- assertEquals(nested.getNumItems(), 3);
-
- assertEquals(data.getItem(0), 1l);
- assertEquals(nested.getItem(0), "2");
- assertEquals(nested.getItem(1), "three");
- assertEquals(nested.getItem(2), "4");
- assertEquals(data.getItem(2), 5);
-
- assertFalse(found);
- found = true;
- }
- }
-
- assertTrue(found);
- }
-
- public void testEventLogTagsFile() throws Exception {
- EventLogTags tags = new EventLogTags();
- assertEquals(tags.get("answer").mTag, 42);
- assertEquals(tags.get("pi").mTag, 314);
- assertEquals(tags.get("e").mTag, 2718);
- assertEquals(tags.get(42).mName, "answer");
- assertEquals(tags.get(314).mName, "pi");
- assertEquals(tags.get(2718).mName, "e");
- }
-}
diff --git a/tests/framework-tests/src/android/util/EventLogTest.java b/tests/framework-tests/src/android/util/EventLogTest.java
deleted file mode 100644
index 4a5d888..0000000
--- a/tests/framework-tests/src/android/util/EventLogTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-package android.util;
-
-import com.google.android.collect.Lists;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * tests for {@link EventLog}
- */
-
-public class EventLogTest extends TestCase {
- private static final int TEST_TAG = 42;
-
- public void testIllegalListTypesThrowException() throws Exception {
- try {
- EventLog.writeEvent(TEST_TAG, new EventLog.List(new Object()));
- fail("Can't create List with any old Object");
- } catch (IllegalArgumentException e) {
- // expected
- }
- try {
- EventLog.writeEvent(TEST_TAG, new EventLog.List((byte) 1));
- fail("Can't create List with any old byte");
- } catch (IllegalArgumentException e) {
- // expected
- }
- }
-
- void assertIntInByteArrayEquals(int expected, byte[] buf, int pos) {
- ByteBuffer computedBuf = ByteBuffer.wrap(buf).order(ByteOrder.nativeOrder());
- int computed = computedBuf.getInt(pos);
- Assert.assertEquals(expected, computed);
- }
-
- void assertLongInByteArrayEquals(long expected, byte[] buf, int pos) {
- ByteBuffer computedBuf = ByteBuffer.wrap(buf).order(ByteOrder.nativeOrder());
- long computed = computedBuf.getLong(pos);
- Assert.assertEquals(expected, computed);
- }
-
- void assertStringInByteArrayEquals(String expected, byte[] buf, int pos) {
- byte[] expectedBytes = expected.getBytes();
- Assert.assertTrue(expectedBytes.length <= buf.length - pos);
- for (byte expectedByte : expectedBytes) {
- Assert.assertEquals(expectedByte, buf[pos++]);
- }
- }
-}
diff --git a/tests/permission/src/com/android/framework/permission/tests/SettingsPermissionsTests.java b/tests/permission/src/com/android/framework/permission/tests/SettingsPermissionsTests.java
deleted file mode 100644
index f55998f..0000000
--- a/tests/permission/src/com/android/framework/permission/tests/SettingsPermissionsTests.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.framework.permission.tests;
-
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.provider.Settings;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
-
-/**
- * Verify that accessing private-API protected Settings require specific permissions.
- */
-public class SettingsPermissionsTests extends AndroidTestCase {
-
- private ContentResolver mContentResolver;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- mContentResolver = getContext().getContentResolver();
- }
-
- /**
- * Verify that writing to the GServices table in Settings provider requires permissions.
- * <p>Tests Permission:
- * {@link android.Manifest.permission#WRITE_GSERVICES}
- */
- @MediumTest
- public void testWriteGServices() {
- try {
- ContentValues values = new ContentValues();
- values.put("url", "android");
- mContentResolver.insert(Settings.Gservices.CONTENT_URI, values);
- fail("Write into Gservices provider did not throw SecurityException as expected.");
- } catch (SecurityException e) {
- // expected
- }
- }
-}
\ No newline at end of file
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 51af965..5d345e6 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -679,7 +679,7 @@
REQ_NAVIGATION_ATTR, NULL, 0);
int32_t reqFiveWayNav = getIntegerAttribute(tree,
REQ_FIVE_WAY_NAV_ATTR, NULL, 0);
- printf("uses-configuation:");
+ printf("uses-configuration:");
if (reqTouchScreen != 0) {
printf(" reqTouchScreen='%d'", reqTouchScreen);
}
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index de6ff14..ae8f242 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -1768,31 +1768,33 @@
fprintf(stderr, "ERROR: %s\n", error.string());
return -1;
}
- // asdf --> package.asdf
- // .asdf .a.b --> package.asdf package.a.b
- // asdf.adsf --> asdf.asdf
- String8 rule("-keep class ");
- const char* p = name.string();
- const char* q = strchr(p, '.');
- if (p == q) {
- rule += pkg;
- rule += name;
- } else if (q == NULL) {
- rule += pkg;
- rule += ".";
- rule += name;
- } else {
- rule += name;
+ if (name.length() > 0) {
+ // asdf --> package.asdf
+ // .asdf .a.b --> package.asdf package.a.b
+ // asdf.adsf --> asdf.asdf
+ String8 rule("-keep class ");
+ const char* p = name.string();
+ const char* q = strchr(p, '.');
+ if (p == q) {
+ rule += pkg;
+ rule += name;
+ } else if (q == NULL) {
+ rule += pkg;
+ rule += ".";
+ rule += name;
+ } else {
+ rule += name;
+ }
+
+ String8 location = tag;
+ location += " ";
+ location += assFile->getSourceFile();
+ char lineno[20];
+ sprintf(lineno, ":%d", tree.getLineNumber());
+ location += lineno;
+
+ keep->add(rule, location);
}
-
- String8 location = tag;
- location += " ";
- location += assFile->getSourceFile();
- char lineno[20];
- sprintf(lineno, ":%d", tree.getLineNumber());
- location += lineno;
-
- keep->add(rule, location);
}
}
}
diff --git a/tools/layoutlib/.gitignore b/tools/layoutlib/.gitignore
index d44a17d..0ec5000 100644
--- a/tools/layoutlib/.gitignore
+++ b/tools/layoutlib/.gitignore
@@ -1,3 +1,2 @@
-api/bin
bridge/bin
create/bin
diff --git a/tools/layoutlib/api/.classpath b/tools/layoutlib/api/.classpath
deleted file mode 100644
index a09ce5f..0000000
--- a/tools/layoutlib/api/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="ANDROID_SRC/prebuilt/common/kxml2/kxml2-2.3.0.jar" sourcepath="/ANDROID_SRC/dalvik/libcore/xml/src/main/java"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tools/layoutlib/api/.project b/tools/layoutlib/api/.project
deleted file mode 100644
index 4e4ca3b..0000000
--- a/tools/layoutlib/api/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>layoutlib_api</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tools/layoutlib/api/Android.mk b/tools/layoutlib/api/Android.mk
deleted file mode 100644
index d60987c..0000000
--- a/tools/layoutlib/api/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# 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.
-#
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-java-files-under,src)
-
-LOCAL_JAVA_LIBRARIES := \
- kxml2-2.3.0
-
-LOCAL_MODULE := layoutlib_api
-
-include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/tools/layoutlib/api/src/com/android/layoutlib/api/IDensityBasedResourceValue.java b/tools/layoutlib/api/src/com/android/layoutlib/api/IDensityBasedResourceValue.java
deleted file mode 100644
index 57a776f..0000000
--- a/tools/layoutlib/api/src/com/android/layoutlib/api/IDensityBasedResourceValue.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.layoutlib.api;
-
-/**
- * Represents an Android Resources that has a density info attached to it.
- */
-public interface IDensityBasedResourceValue extends IResourceValue {
-
- public static enum Density {
- HIGH(240),
- MEDIUM(160),
- LOW(120),
- NODPI(0);
-
- public final static int DEFAULT_DENSITY = 160;
-
- private final int mValue;
-
- Density(int value) {
- mValue = value;
- }
-
- public int getValue() {
- return mValue;
- }
- }
-
- /**
- * Returns the density associated to the resource.
- */
- Density getDensity();
-}
diff --git a/tools/layoutlib/api/src/com/android/layoutlib/api/ILayoutBridge.java b/tools/layoutlib/api/src/com/android/layoutlib/api/ILayoutBridge.java
deleted file mode 100644
index 4dbcfdc..0000000
--- a/tools/layoutlib/api/src/com/android/layoutlib/api/ILayoutBridge.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.layoutlib.api;
-
-import java.util.Map;
-
-/**
- * Entry point of the Layout Lib. Implementations of this interface provide a method to compute
- * and render a layout.
- * <p/>
- * <p/>{@link #getApiLevel()} gives the ability to know which methods are available.
- * <p/>
- * Changes in API level 4:
- * <ul>
- * <li>new render method: {@link #computeLayout(IXmlPullParser, Object, int, int, boolean, int, float, float, String, boolean, Map, Map, IProjectCallback, ILayoutLog)}</li>
- * <li>deprecated {@link #computeLayout(IXmlPullParser, Object, int, int, int, float, float, String, boolean, Map, Map, IProjectCallback, ILayoutLog)}</li>
- * </ul>
- * Changes in API level 3:
- * <ul>
- * <li>new render method: {@link #computeLayout(IXmlPullParser, Object, int, int, int, float, float, String, boolean, Map, Map, IProjectCallback, ILayoutLog)}</li>
- * <li>deprecated {@link #computeLayout(IXmlPullParser, Object, int, int, String, boolean, Map, Map, IProjectCallback, ILayoutLog)}</li>
- * </ul>
- * Changes in API level 2:
- * <ul>
- * <li>new API Level method: {@link #getApiLevel()}</li>
- * <li>new render method: {@link #computeLayout(IXmlPullParser, Object, int, int, String, boolean, Map, Map, IProjectCallback, ILayoutLog)}</li>
- * <li>deprecated {@link #computeLayout(IXmlPullParser, Object, int, int, String, Map, Map, IProjectCallback, ILayoutLog)}</li>
- * </ul>
- */
-public interface ILayoutBridge {
-
- final int API_CURRENT = 4;
-
- /**
- * Returns the API level of the layout library.
- * While no methods will ever be removed, some may become deprecated, and some new ones
- * will appear.
- * <p/>If calling this method throws an {@link AbstractMethodError}, then the API level
- * should be considered to be 1.
- */
- int getApiLevel();
-
- /**
- * Initializes the Bridge object.
- * @param fontOsLocation the location of the fonts.
- * @param enumValueMap map attrName => { map enumFlagName => Integer value }.
- * @return true if success.
- * @since 1
- */
- boolean init(String fontOsLocation, Map<String, Map<String, Integer>> enumValueMap);
-
- /**
- * Computes and renders a layout
- * @param layoutDescription the {@link IXmlPullParser} letting the LayoutLib Bridge visit the
- * layout file.
- * @param projectKey An Object identifying the project. This is used for the cache mechanism.
- * @param screenWidth the screen width
- * @param screenHeight the screen height
- * @param renderFullSize if true, the rendering will render the full size needed by the
- * layout. This size is never smaller than <var>screenWidth</var> x <var>screenHeight</var>.
- * @param density the density factor for the screen.
- * @param xdpi the screen actual dpi in X
- * @param ydpi the screen actual dpi in Y
- * @param themeName The name of the theme to use.
- * @param isProjectTheme true if the theme is a project theme, false if it is a framework theme.
- * @param projectResources the resources of the project. The map contains (String, map) pairs
- * where the string is the type of the resource reference used in the layout file, and the
- * map contains (String, {@link IResourceValue}) pairs where the key is the resource name,
- * and the value is the resource value.
- * @param frameworkResources the framework resources. The map contains (String, map) pairs
- * where the string is the type of the resource reference used in the layout file, and the map
- * contains (String, {@link IResourceValue}) pairs where the key is the resource name, and the
- * value is the resource value.
- * @param projectCallback The {@link IProjectCallback} object to get information from
- * the project.
- * @param logger the object responsible for displaying warning/errors to the user.
- * @return a new {@link ILayoutResult} object that contains the result of the layout.
- * @since 4
- */
- ILayoutResult computeLayout(IXmlPullParser layoutDescription,
- Object projectKey,
- int screenWidth, int screenHeight, boolean renderFullSize,
- int density, float xdpi, float ydpi,
- String themeName, boolean isProjectTheme,
- Map<String, Map<String, IResourceValue>> projectResources,
- Map<String, Map<String, IResourceValue>> frameworkResources,
- IProjectCallback projectCallback, ILayoutLog logger);
-
- /**
- * Computes and renders a layout
- * @param layoutDescription the {@link IXmlPullParser} letting the LayoutLib Bridge visit the
- * layout file.
- * @param projectKey An Object identifying the project. This is used for the cache mechanism.
- * @param screenWidth the screen width
- * @param screenHeight the screen height
- * @param density the density factor for the screen.
- * @param xdpi the screen actual dpi in X
- * @param ydpi the screen actual dpi in Y
- * @param themeName The name of the theme to use.
- * @param isProjectTheme true if the theme is a project theme, false if it is a framework theme.
- * @param projectResources the resources of the project. The map contains (String, map) pairs
- * where the string is the type of the resource reference used in the layout file, and the
- * map contains (String, {@link IResourceValue}) pairs where the key is the resource name,
- * and the value is the resource value.
- * @param frameworkResources the framework resources. The map contains (String, map) pairs
- * where the string is the type of the resource reference used in the layout file, and the map
- * contains (String, {@link IResourceValue}) pairs where the key is the resource name, and the
- * value is the resource value.
- * @param projectCallback The {@link IProjectCallback} object to get information from
- * the project.
- * @param logger the object responsible for displaying warning/errors to the user.
- * @return a new {@link ILayoutResult} object that contains the result of the layout.
- * @since 3
- */
- @Deprecated
- ILayoutResult computeLayout(IXmlPullParser layoutDescription,
- Object projectKey,
- int screenWidth, int screenHeight, int density, float xdpi, float ydpi,
- String themeName, boolean isProjectTheme,
- Map<String, Map<String, IResourceValue>> projectResources,
- Map<String, Map<String, IResourceValue>> frameworkResources,
- IProjectCallback projectCallback, ILayoutLog logger);
-
- /**
- * Computes and renders a layout
- * @param layoutDescription the {@link IXmlPullParser} letting the LayoutLib Bridge visit the
- * layout file.
- * @param projectKey An Object identifying the project. This is used for the cache mechanism.
- * @param screenWidth the screen width
- * @param screenHeight the screen height
- * @param themeName The name of the theme to use.
- * @param isProjectTheme true if the theme is a project theme, false if it is a framework theme.
- * @param projectResources the resources of the project. The map contains (String, map) pairs
- * where the string is the type of the resource reference used in the layout file, and the
- * map contains (String, {@link IResourceValue}) pairs where the key is the resource name,
- * and the value is the resource value.
- * @param frameworkResources the framework resources. The map contains (String, map) pairs
- * where the string is the type of the resource reference used in the layout file, and the map
- * contains (String, {@link IResourceValue}) pairs where the key is the resource name, and the
- * value is the resource value.
- * @param projectCallback The {@link IProjectCallback} object to get information from
- * the project.
- * @param logger the object responsible for displaying warning/errors to the user.
- * @return a new {@link ILayoutResult} object that contains the result of the layout.
- * @deprecated Use {@link #computeLayout(IXmlPullParser, Object, int, int, int, float, float, String, boolean, Map, Map, IProjectCallback, ILayoutLog)}
- * @since 2
- */
- @Deprecated
- ILayoutResult computeLayout(IXmlPullParser layoutDescription,
- Object projectKey,
- int screenWidth, int screenHeight, String themeName, boolean isProjectTheme,
- Map<String, Map<String, IResourceValue>> projectResources,
- Map<String, Map<String, IResourceValue>> frameworkResources,
- IProjectCallback projectCallback, ILayoutLog logger);
-
- /**
- * Computes and renders a layout
- * @param layoutDescription the {@link IXmlPullParser} letting the LayoutLib Bridge visit the
- * layout file.
- * @param projectKey An Object identifying the project. This is used for the cache mechanism.
- * @param screenWidth
- * @param screenHeight
- * @param themeName The name of the theme to use. In order to differentiate project and platform
- * themes sharing the same name, all project themes must be prepended with a '*' character.
- * @param projectResources the resources of the project. The map contains (String, map) pairs
- * where the string is the type of the resource reference used in the layout file, and the
- * map contains (String, {@link IResourceValue}) pairs where the key is the resource name,
- * and the value is the resource value.
- * @param frameworkResources the framework resources. The map contains (String, map) pairs
- * where the string is the type of the resource reference used in the layout file, and the map
- * contains (String, {@link IResourceValue}) pairs where the key is the resource name, and the
- * value is the resource value.
- * @param projectCallback The {@link IProjectCallback} object to get information from
- * the project.
- * @param logger the object responsible for displaying warning/errors to the user.
- * @return a new {@link ILayoutResult} object that contains the result of the layout.
- * @deprecated Use {@link #computeLayout(IXmlPullParser, Object, int, int, int, float, float, String, boolean, Map, Map, IProjectCallback, ILayoutLog)}
- * @since 1
- */
- @Deprecated
- ILayoutResult computeLayout(IXmlPullParser layoutDescription,
- Object projectKey,
- int screenWidth, int screenHeight, String themeName,
- Map<String, Map<String, IResourceValue>> projectResources,
- Map<String, Map<String, IResourceValue>> frameworkResources,
- IProjectCallback projectCallback, ILayoutLog logger);
-
- /**
- * Clears the resource cache for a specific project.
- * <p/>This cache contains bitmaps and nine patches that are loaded from the disk and reused
- * until this method is called.
- * <p/>The cache is not configuration dependent and should only be cleared when a
- * resource changes (at this time only bitmaps and 9 patches go into the cache).
- * @param projectKey the key for the project.
- * @since 1
- */
- void clearCaches(Object projectKey);
-}
diff --git a/tools/layoutlib/api/src/com/android/layoutlib/api/ILayoutLog.java b/tools/layoutlib/api/src/com/android/layoutlib/api/ILayoutLog.java
deleted file mode 100644
index cae15d3..0000000
--- a/tools/layoutlib/api/src/com/android/layoutlib/api/ILayoutLog.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.layoutlib.api;
-
-/**
- * Callback interface to display warnings/errors that happened during the computation and
- * rendering of the layout.
- */
-public interface ILayoutLog {
-
- /**
- * Displays a warning message.
- * @param message the message to display.
- */
- void warning(String message);
-
- /**
- * Displays an error message.
- * @param message the message to display.
- */
- void error(String message);
-
- /**
- * Displays an exception
- * @param t the {@link Throwable} to display.
- */
- void error(Throwable t);
-}
diff --git a/tools/layoutlib/api/src/com/android/layoutlib/api/ILayoutResult.java b/tools/layoutlib/api/src/com/android/layoutlib/api/ILayoutResult.java
deleted file mode 100644
index 2d8a210..0000000
--- a/tools/layoutlib/api/src/com/android/layoutlib/api/ILayoutResult.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.layoutlib.api;
-
-import java.awt.image.BufferedImage;
-
-/**
- * The result of a layout computation through
- * {@link ILayoutLibBridge#computeLayout(IXmlPullParser, int, int, String, java.util.Map, java.util.Map, java.util.Map, IFontLoader, ILayoutLibLog, ICustomViewLoader)}
- */
-public interface ILayoutResult {
- /**
- * Success return code
- */
- final static int SUCCESS = 0;
-
- /**
- * Error return code, in which case an error message is guaranteed to be defined.
- * @See {@link #getErrorMessage()}
- */
- final static int ERROR = 1;
-
- /**
- * Returns the result code.
- * @see #SUCCESS
- * @see #ERROR
- */
- int getSuccess();
-
- /**
- * Returns the {@link ILayoutViewInfo} object for the top level view.
- */
- ILayoutViewInfo getRootView();
-
- /**
- * Returns the rendering of the full layout.
- */
- BufferedImage getImage();
-
- /**
- * Returns the error message.
- * <p/>Only valid when {@link #getSuccess()} returns {@link #ERROR}
- */
- String getErrorMessage();
-
- /**
- * Layout information for a specific view.
- */
- public interface ILayoutViewInfo {
-
- /**
- * Returns the list of children views.
- */
- ILayoutViewInfo[] getChildren();
-
- /**
- * Returns the key associated with the node.
- * @see IXmlPullParser#getViewKey()
- */
- Object getViewKey();
-
- /**
- * Returns the name of the view.
- */
- String getName();
-
- /**
- * Returns the left of the view bounds.
- */
- int getLeft();
-
- /**
- * Returns the top of the view bounds.
- */
- int getTop();
-
- /**
- * Returns the right of the view bounds.
- */
- int getRight();
-
- /**
- * Returns the bottom of the view bounds.
- */
- int getBottom();
- }
-}
diff --git a/tools/layoutlib/api/src/com/android/layoutlib/api/IProjectCallback.java b/tools/layoutlib/api/src/com/android/layoutlib/api/IProjectCallback.java
deleted file mode 100644
index 5ad5082..0000000
--- a/tools/layoutlib/api/src/com/android/layoutlib/api/IProjectCallback.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.layoutlib.api;
-
-/**
- * Callback for project information needed by the Layout Library.
- * Classes implementing this interface provide methods giving access to some project data, like
- * resource resolution, namespace information, and instantiation of custom view.
- */
-public interface IProjectCallback {
-
- /**
- * Loads a custom view with the given constructor signature and arguments.
- * @param name The fully qualified name of the class.
- * @param constructorSignature The signature of the class to use
- * @param constructorArgs The arguments to use on the constructor
- * @return A newly instantiated android.view.View object.
- * @throws ClassNotFoundException.
- * @throws Exception
- */
- @SuppressWarnings("unchecked")
- Object loadView(String name, Class[] constructorSignature, Object[] constructorArgs)
- throws ClassNotFoundException, Exception;
-
- /**
- * Returns the namespace of the application.
- * <p/>This lets the Layout Lib load custom attributes for custom views.
- */
- String getNamespace();
-
- /**
- * Resolves the id of a resource Id.
- * <p/>The resource id is the value of a <code>R.<type>.<name></code>, and
- * this method will return both the type and name of the resource.
- * @param id the Id to resolve.
- * @return an array of 2 strings containing the resource name and type, or null if the id
- * does not match any resource.
- */
- String[] resolveResourceValue(int id);
-
- /**
- * Resolves the id of a resource Id of type int[]
- * <p/>The resource id is the value of a R.styleable.<name>, and this method will
- * return the name of the resource.
- * @param id the Id to resolve.
- * @return the name of the resource or <code>null</code> if not found.
- */
- String resolveResourceValue(int[] id);
-
- /**
- * Returns the id of a resource.
- * <p/>The provided type and name must match an existing constant defined as
- * <code>R.<type>.<name></code>.
- * @param type the type of the resource
- * @param name the name of the resource
- * @return an Integer containing the resource Id, or <code>null</code> if not found.
- */
- Integer getResourceValue(String type, String name);
-
-}
diff --git a/tools/layoutlib/api/src/com/android/layoutlib/api/IResourceValue.java b/tools/layoutlib/api/src/com/android/layoutlib/api/IResourceValue.java
deleted file mode 100644
index 1da9508..0000000
--- a/tools/layoutlib/api/src/com/android/layoutlib/api/IResourceValue.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.layoutlib.api;
-
-/**
- * Represents an android resource with a name and a string value.
- */
-public interface IResourceValue {
-
- /**
- * Returns the type of the resource. For instance "drawable", "color", etc...
- */
- String getType();
-
- /**
- * Returns the name of the resource, as defined in the XML.
- */
- String getName();
-
- /**
- * Returns the value of the resource, as defined in the XML. This can be <code>null</code>
- */
- String getValue();
-
- /**
- * Returns whether the resource is a framework resource (<code>true</code>) or a project
- * resource (<code>false</false>).
- */
- boolean isFramework();
-}
diff --git a/tools/layoutlib/api/src/com/android/layoutlib/api/IStyleResourceValue.java b/tools/layoutlib/api/src/com/android/layoutlib/api/IStyleResourceValue.java
deleted file mode 100644
index 2f17e69..0000000
--- a/tools/layoutlib/api/src/com/android/layoutlib/api/IStyleResourceValue.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.layoutlib.api;
-
-
-/**
- * Represents an android style resources with a name and a list of children {@link IResourceValue}.
- */
-public interface IStyleResourceValue extends IResourceValue {
-
- /**
- * Returns the parent style name or <code>null</code> if unknown.
- */
- String getParentStyle();
-
- /**
- * Find an item in the list by name
- * @param name
- */
- IResourceValue findItem(String name);
-}
diff --git a/tools/layoutlib/api/src/com/android/layoutlib/api/IXmlPullParser.java b/tools/layoutlib/api/src/com/android/layoutlib/api/IXmlPullParser.java
deleted file mode 100644
index cd43c56..0000000
--- a/tools/layoutlib/api/src/com/android/layoutlib/api/IXmlPullParser.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.layoutlib.api;
-
-import com.android.layoutlib.api.ILayoutResult.ILayoutViewInfo;
-
-import org.xmlpull.v1.XmlPullParser;
-
-/**
- * Extended version of {@link XmlPullParser} to use with
- * {@link ILayoutLibBridge#computeLayout(XmlPullParser, int, int, String, java.util.Map, java.util.Map, java.util.Map, com.android.layoutlib.api.ILayoutLibBridge.IFontInfo)}
- */
-public interface IXmlPullParser extends XmlPullParser {
-
- /**
- * Returns a key for the current XML node.
- * <p/>This key will be passed back in the {@link ILayoutViewInfo} objects, allowing association
- * of a particular XML node with its result from the layout computation.
- */
- Object getViewKey();
-}
-
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
index b5b7ceb..791e53b 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
@@ -60,6 +60,7 @@
public final static String REFERENCE_STYLE = RES_STYLE + "/";
public final static String REFERENCE_NULL = "@null";
+ public final static String MATCH_PARENT = "match_parent";
public final static String FILL_PARENT = "fill_parent";
public final static String WRAP_CONTENT = "wrap_content";
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java
index 1e9f573..b670eee 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java
@@ -259,7 +259,18 @@
// resolve the defStyleAttr value into a IStyleResourceValue
IStyleResourceValue defStyleValues = null;
- if (defStyleAttr != 0) {
+
+ // look for a custom style.
+ String customStyle = parser.getAttributeValue(null /* namespace*/, "style");
+ if (customStyle != null) {
+ IResourceValue item = findResValue(customStyle);
+
+ if (item instanceof IStyleResourceValue) {
+ defStyleValues = (IStyleResourceValue)item;
+ }
+ }
+
+ if (defStyleValues == null && defStyleAttr != 0) {
// get the name from the int.
String defStyleName = searchAttr(defStyleAttr);
@@ -1104,7 +1115,7 @@
Bundle initialExtras) {
// TODO Auto-generated method stub
}
-
+
@Override
public void setTheme(int arg0) {
// TODO Auto-generated method stub
@@ -1137,7 +1148,7 @@
throws IntentSender.SendIntentException {
// TODO Auto-generated method stub
}
-
+
@Override
public boolean startInstrumentation(ComponentName arg0, String arg1,
Bundle arg2) {
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeResources.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeResources.java
index 1fafef4..6358abb 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeResources.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeResources.java
@@ -239,8 +239,9 @@
String v = value.getValue();
if (v != null) {
- if (v.equals(BridgeConstants.FILL_PARENT)) {
- return LayoutParams.FILL_PARENT;
+ if (v.equals(BridgeConstants.MATCH_PARENT) ||
+ v.equals(BridgeConstants.FILL_PARENT)) {
+ return LayoutParams.MATCH_PARENT;
} else if (v.equals(BridgeConstants.WRAP_CONTENT)) {
return LayoutParams.WRAP_CONTENT;
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeTypedArray.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeTypedArray.java
index 6f203ba..efd222e 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeTypedArray.java
@@ -392,8 +392,8 @@
if (s == null) {
return defValue;
- } else if (s.equals(BridgeConstants.FILL_PARENT)) {
- return LayoutParams.FILL_PARENT;
+ } else if (s.equals(BridgeConstants.MATCH_PARENT)) {
+ return LayoutParams.MATCH_PARENT;
} else if (s.equals(BridgeConstants.WRAP_CONTENT)) {
return LayoutParams.WRAP_CONTENT;
}
@@ -460,8 +460,8 @@
if (s == null) {
return defValue;
- } else if (s.equals(BridgeConstants.FILL_PARENT)) {
- return LayoutParams.FILL_PARENT;
+ } else if (s.equals(BridgeConstants.MATCH_PARENT)) {
+ return LayoutParams.MATCH_PARENT;
} else if (s.equals(BridgeConstants.WRAP_CONTENT)) {
return LayoutParams.WRAP_CONTENT;
}
diff --git a/tools/layoutlib/bridge/tests/com/android/layoutlib/testdata/layout1.xml b/tools/layoutlib/bridge/tests/com/android/layoutlib/testdata/layout1.xml
index 554f541..b8fc947 100644
--- a/tools/layoutlib/bridge/tests/com/android/layoutlib/testdata/layout1.xml
+++ b/tools/layoutlib/bridge/tests/com/android/layoutlib/testdata/layout1.xml
@@ -17,8 +17,8 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical"
>
<Button
@@ -31,8 +31,8 @@
</Button>
<View
android:id="@+id/surface"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:layout_weight="2"
/>
<TextView
@@ -40,7 +40,7 @@
android:paddingLeft="2dip"
android:layout_weight="0"
android:background="@drawable/black"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:lines="1"
android:gravity="center_vertical|center_horizontal"
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index 9d8f730..2668fe0 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -616,7 +616,7 @@
* @return {@code true} if the operation succeeds, {@code false} otherwise, e.g.,
* the number of channels is invalid.
*/
- public boolean setNumAllowedChannels() {
+ public synchronized boolean setNumAllowedChannels() {
try {
return setNumAllowedChannels(
Settings.Secure.getInt(mContext.getContentResolver(),
@@ -859,7 +859,9 @@
// Only do this if we haven't gotten a new supplicant status since the timer
// started
if (mNumSupplicantStateChanges == msg.arg1) {
- WifiNative.scanCommand(false); // do a passive scan
+ synchronized (this) {
+ WifiNative.scanCommand(false); // do a passive scan
+ }
}
break;
@@ -1154,7 +1156,6 @@
// [31- 1] Reserved for future use
// [ 0- 0] Interface configuration succeeded (1) or failed (0)
EventLog.writeEvent(EVENTLOG_INTERFACE_CONFIGURATION_STATE_CHANGED, 0);
-
mHaveIpAddress = false;
mWifiInfo.setIpAddress(0);
mObtainingIpAddress = false;