Merge "Add support for linking to a skia bitmap rather than always copying the data from the bitmap."
diff --git a/Android.mk b/Android.mk
index 06db5822..12dddd6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -81,7 +81,6 @@
core/java/android/app/IActivityWatcher.aidl \
core/java/android/app/IAlarmManager.aidl \
core/java/android/app/IBackupAgent.aidl \
- core/java/android/app/IDevicePolicyManager.aidl \
core/java/android/app/IInstrumentationWatcher.aidl \
core/java/android/app/INotificationManager.aidl \
core/java/android/app/ISearchManager.aidl \
@@ -93,6 +92,7 @@
core/java/android/app/IUiModeManager.aidl \
core/java/android/app/IWallpaperManager.aidl \
core/java/android/app/IWallpaperManagerCallback.aidl \
+ core/java/android/app/admin/IDevicePolicyManager.aidl \
core/java/android/backup/IBackupManager.aidl \
core/java/android/backup/IRestoreObserver.aidl \
core/java/android/backup/IRestoreSession.aidl \
diff --git a/api/8.xml b/api/8.xml
index a07537c..c5e899d 100644
--- a/api/8.xml
+++ b/api/8.xml
@@ -42346,28 +42346,6 @@
visibility="public"
>
</field>
-<field name="PKG_INSTALL_COMPLETE"
- type="int"
- transient="false"
- volatile="false"
- value="1"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="PKG_INSTALL_INCOMPLETE"
- type="int"
- transient="false"
- volatile="false"
- value="0"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="SIGNATURE_FIRST_NOT_SIGNED"
type="int"
transient="false"
diff --git a/api/current.xml b/api/current.xml
index 2729ff4..189835e 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -6785,6 +6785,17 @@
visibility="public"
>
</field>
+<field name="restoreAnyVersion"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843451"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="restoreNeedsApplication"
type="int"
transient="false"
@@ -7808,6 +7819,39 @@
visibility="public"
>
</field>
+<field name="stripEnabled"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843454"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stripLeft"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843452"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="stripRight"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843453"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="suggestActionMsg"
type="int"
transient="false"
@@ -14630,7 +14674,7 @@
</parameter>
<parameter name="features" type="java.lang.String[]">
</parameter>
-<parameter name="activityForPrompting" type="android.app.Activity">
+<parameter name="activity" type="android.app.Activity">
</parameter>
<parameter name="addAccountOptions" type="android.os.Bundle">
</parameter>
@@ -20078,804 +20122,6 @@
</parameter>
</method>
</interface>
-<class name="DeviceAdminInfo"
- extends="java.lang.Object"
- abstract="false"
- static="false"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-<implements name="android.os.Parcelable">
-</implements>
-<constructor name="DeviceAdminInfo"
- type="android.app.DeviceAdminInfo"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-<parameter name="receiver" type="android.content.pm.ResolveInfo">
-</parameter>
-<exception name="IOException" type="java.io.IOException">
-</exception>
-<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
-</exception>
-</constructor>
-<method name="describeContents"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="dump"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pw" type="android.util.Printer">
-</parameter>
-<parameter name="prefix" type="java.lang.String">
-</parameter>
-</method>
-<method name="getActivityInfo"
- return="android.content.pm.ActivityInfo"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getComponent"
- return="android.content.ComponentName"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getPackageName"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getReceiverName"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getTagForPolicy"
- return="java.lang.String"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="policyIdent" type="int">
-</parameter>
-</method>
-<method name="loadDescription"
- return="java.lang.CharSequence"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
-</exception>
-</method>
-<method name="loadIcon"
- return="android.graphics.drawable.Drawable"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-</method>
-<method name="loadLabel"
- return="java.lang.CharSequence"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="pm" type="android.content.pm.PackageManager">
-</parameter>
-</method>
-<method name="usesPolicy"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="policyIdent" type="int">
-</parameter>
-</method>
-<method name="writeToParcel"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="dest" 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>
-<field name="USES_POLICY_FORCE_LOCK"
- type="int"
- transient="false"
- volatile="false"
- value="3"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="USES_POLICY_LIMIT_PASSWORD"
- type="int"
- transient="false"
- volatile="false"
- value="0"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="USES_POLICY_RESET_PASSWORD"
- type="int"
- transient="false"
- volatile="false"
- value="2"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="USES_POLICY_WATCH_LOGIN"
- type="int"
- transient="false"
- volatile="false"
- value="1"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="USES_POLICY_WIPE_DATA"
- type="int"
- transient="false"
- volatile="false"
- value="4"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
-<class name="DeviceAdminReceiver"
- extends="android.content.BroadcastReceiver"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<constructor name="DeviceAdminReceiver"
- type="android.app.DeviceAdminReceiver"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</constructor>
-<method name="getManager"
- return="android.app.DevicePolicyManager"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-</method>
-<method name="getWho"
- return="android.content.ComponentName"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-</method>
-<method name="onDisableRequested"
- return="java.lang.CharSequence"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-<parameter name="intent" type="android.content.Intent">
-</parameter>
-</method>
-<method name="onDisabled"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-<parameter name="intent" type="android.content.Intent">
-</parameter>
-</method>
-<method name="onEnabled"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-<parameter name="intent" type="android.content.Intent">
-</parameter>
-</method>
-<method name="onPasswordChanged"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-<parameter name="intent" type="android.content.Intent">
-</parameter>
-</method>
-<method name="onPasswordFailed"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-<parameter name="intent" type="android.content.Intent">
-</parameter>
-</method>
-<method name="onPasswordSucceeded"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-<parameter name="intent" type="android.content.Intent">
-</parameter>
-</method>
-<method name="onReceive"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="context" type="android.content.Context">
-</parameter>
-<parameter name="intent" type="android.content.Intent">
-</parameter>
-</method>
-<field name="ACTION_DEVICE_ADMIN_DISABLED"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.action.DEVICE_ADMIN_DISABLED""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="ACTION_DEVICE_ADMIN_DISABLE_REQUESTED"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.action.DEVICE_ADMIN_DISABLE_REQUESTED""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="ACTION_DEVICE_ADMIN_ENABLED"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.action.DEVICE_ADMIN_ENABLED""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="ACTION_PASSWORD_CHANGED"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.action.ACTION_PASSWORD_CHANGED""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="ACTION_PASSWORD_FAILED"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.action.ACTION_PASSWORD_FAILED""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="ACTION_PASSWORD_SUCCEEDED"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.action.ACTION_PASSWORD_SUCCEEDED""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="DEVICE_ADMIN_META_DATA"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.device_admin""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="EXTRA_DISABLE_WARNING"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.extra.DISABLE_WARNING""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
-<class name="DevicePolicyManager"
- extends="java.lang.Object"
- abstract="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<method name="getActiveAdmins"
- return="java.util.List<android.content.ComponentName>"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getCurrentFailedPasswordAttempts"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="getMaximumFailedPasswordsForWipe"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="admin" type="android.content.ComponentName">
-</parameter>
-</method>
-<method name="getMaximumTimeToLock"
- return="long"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="admin" type="android.content.ComponentName">
-</parameter>
-</method>
-<method name="getPasswordMaximumLength"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="quality" type="int">
-</parameter>
-</method>
-<method name="getPasswordMinimumLength"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="admin" type="android.content.ComponentName">
-</parameter>
-</method>
-<method name="getPasswordQuality"
- return="int"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="admin" type="android.content.ComponentName">
-</parameter>
-</method>
-<method name="isActivePasswordSufficient"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="isAdminActive"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="who" type="android.content.ComponentName">
-</parameter>
-</method>
-<method name="lockNow"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
-<method name="removeActiveAdmin"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="who" type="android.content.ComponentName">
-</parameter>
-</method>
-<method name="resetPassword"
- return="boolean"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="password" type="java.lang.String">
-</parameter>
-</method>
-<method name="setMaximumFailedPasswordsForWipe"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="admin" type="android.content.ComponentName">
-</parameter>
-<parameter name="num" type="int">
-</parameter>
-</method>
-<method name="setMaximumTimeToLock"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="admin" type="android.content.ComponentName">
-</parameter>
-<parameter name="timeMs" type="long">
-</parameter>
-</method>
-<method name="setPasswordMinimumLength"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="admin" type="android.content.ComponentName">
-</parameter>
-<parameter name="length" type="int">
-</parameter>
-</method>
-<method name="setPasswordQuality"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="admin" type="android.content.ComponentName">
-</parameter>
-<parameter name="quality" type="int">
-</parameter>
-</method>
-<method name="wipeData"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-<parameter name="flags" type="int">
-</parameter>
-</method>
-<field name="ACTION_ADD_DEVICE_ADMIN"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.action.ADD_DEVICE_ADMIN""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="ACTION_SET_NEW_PASSWORD"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.action.SET_NEW_PASSWORD""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="EXTRA_ADD_EXPLANATION"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.extra.ADD_EXPLANATION""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="EXTRA_DEVICE_ADMIN"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.app.extra.DEVICE_ADMIN""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="PASSWORD_QUALITY_ALPHANUMERIC"
- type="int"
- transient="false"
- volatile="false"
- value="196608"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="PASSWORD_QUALITY_NUMERIC"
- type="int"
- transient="false"
- volatile="false"
- value="131072"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="PASSWORD_QUALITY_SOMETHING"
- type="int"
- transient="false"
- volatile="false"
- value="65536"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="PASSWORD_QUALITY_UNSPECIFIED"
- type="int"
- transient="false"
- volatile="false"
- value="0"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
<class name="Dialog"
extends="java.lang.Object"
abstract="false"
@@ -26830,6 +26076,831 @@
</field>
</class>
</package>
+<package name="android.app.admin"
+>
+<class name="DeviceAdminInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<constructor name="DeviceAdminInfo"
+ type="android.app.admin.DeviceAdminInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="receiver" type="android.content.pm.ResolveInfo">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+<exception name="XmlPullParserException" type="org.xmlpull.v1.XmlPullParserException">
+</exception>
+</constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="dump"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pw" type="android.util.Printer">
+</parameter>
+<parameter name="prefix" type="java.lang.String">
+</parameter>
+</method>
+<method name="getActivityInfo"
+ return="android.content.pm.ActivityInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getComponent"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getPackageName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getReceiverName"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getTagForPolicy"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="policyIdent" type="int">
+</parameter>
+</method>
+<method name="isVisible"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="loadDescription"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+<exception name="Resources.NotFoundException" type="android.content.res.Resources.NotFoundException">
+</exception>
+</method>
+<method name="loadIcon"
+ return="android.graphics.drawable.Drawable"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="loadLabel"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="pm" type="android.content.pm.PackageManager">
+</parameter>
+</method>
+<method name="usesPolicy"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="policyIdent" type="int">
+</parameter>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" 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>
+<field name="USES_POLICY_FORCE_LOCK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USES_POLICY_LIMIT_PASSWORD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USES_POLICY_RESET_PASSWORD"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USES_POLICY_WATCH_LOGIN"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="USES_POLICY_WIPE_DATA"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DeviceAdminReceiver"
+ extends="android.content.BroadcastReceiver"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="DeviceAdminReceiver"
+ type="android.app.admin.DeviceAdminReceiver"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="getManager"
+ return="android.app.admin.DevicePolicyManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="getWho"
+ return="android.content.ComponentName"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="onDisableRequested"
+ return="java.lang.CharSequence"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onDisabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onPasswordChanged"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onPasswordFailed"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onPasswordSucceeded"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<method name="onReceive"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="intent" type="android.content.Intent">
+</parameter>
+</method>
+<field name="ACTION_DEVICE_ADMIN_DISABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.action.DEVICE_ADMIN_DISABLED""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DEVICE_ADMIN_DISABLE_REQUESTED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.action.DEVICE_ADMIN_DISABLE_REQUESTED""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_DEVICE_ADMIN_ENABLED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.action.DEVICE_ADMIN_ENABLED""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PASSWORD_CHANGED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.action.ACTION_PASSWORD_CHANGED""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PASSWORD_FAILED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.action.ACTION_PASSWORD_FAILED""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_PASSWORD_SUCCEEDED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.action.ACTION_PASSWORD_SUCCEEDED""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="DEVICE_ADMIN_META_DATA"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.device_admin""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DISABLE_WARNING"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.extra.DISABLE_WARNING""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="DevicePolicyManager"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getActiveAdmins"
+ return="java.util.List<android.content.ComponentName>"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getCurrentFailedPasswordAttempts"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaximumFailedPasswordsForWipe"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getMaximumTimeToLock"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getPasswordMaximumLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="quality" type="int">
+</parameter>
+</method>
+<method name="getPasswordMinimumLength"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="getPasswordQuality"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="isActivePasswordSufficient"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isAdminActive"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="lockNow"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="removeActiveAdmin"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="who" type="android.content.ComponentName">
+</parameter>
+</method>
+<method name="resetPassword"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="password" type="java.lang.String">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<method name="setMaximumFailedPasswordsForWipe"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+<parameter name="num" type="int">
+</parameter>
+</method>
+<method name="setMaximumTimeToLock"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+<parameter name="timeMs" type="long">
+</parameter>
+</method>
+<method name="setPasswordMinimumLength"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+<parameter name="length" type="int">
+</parameter>
+</method>
+<method name="setPasswordQuality"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="admin" type="android.content.ComponentName">
+</parameter>
+<parameter name="quality" type="int">
+</parameter>
+</method>
+<method name="wipeData"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="ACTION_ADD_DEVICE_ADMIN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.action.ADD_DEVICE_ADMIN""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="ACTION_SET_NEW_PASSWORD"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.action.SET_NEW_PASSWORD""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_ADD_EXPLANATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.extra.ADD_EXPLANATION""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EXTRA_DEVICE_ADMIN"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.app.extra.DEVICE_ADMIN""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASSWORD_QUALITY_ALPHANUMERIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="196608"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASSWORD_QUALITY_NUMERIC"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="131072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASSWORD_QUALITY_SOMETHING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="65536"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PASSWORD_QUALITY_UNSPECIFIED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="RESET_PASSWORD_REQUIRE_ENTRY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+</package>
<package name="android.appwidget"
>
<class name="AppWidgetHost"
@@ -30027,6 +30098,48 @@
>
</field>
</class>
+<class name="ActiveSyncInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="getAccount"
+ return="android.accounts.Account"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getAuthority"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getStartTime"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+</class>
<class name="ActivityNotFoundException"
extends="java.lang.RuntimeException"
abstract="false"
@@ -32062,6 +32175,17 @@
<parameter name="selectionArgs" type="java.lang.String[]">
</parameter>
</method>
+<method name="getActiveSync"
+ return="android.content.ActiveSyncInfo"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="getIsSyncable"
return="int"
abstract="false"
@@ -32668,6 +32792,39 @@
visibility="public"
>
</field>
+<field name="SYNC_OBSERVER_TYPE_ACTIVE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_OBSERVER_TYPE_PENDING"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SYNC_OBSERVER_TYPE_SETTINGS"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
</class>
<class name="ContentUris"
extends="java.lang.Object"
@@ -36434,6 +36591,32 @@
<parameter name="defaultValue" type="char">
</parameter>
</method>
+<method name="getCharSequenceArrayExtra"
+ return="java.lang.CharSequence[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCharSequenceArrayListExtra"
+ return="java.util.ArrayList<java.lang.CharSequence>"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+</method>
<method name="getCharSequenceExtra"
return="java.lang.CharSequence"
abstract="false"
@@ -36895,6 +37078,21 @@
<exception name="URISyntaxException" type="java.net.URISyntaxException">
</exception>
</method>
+<method name="putCharSequenceArrayListExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.util.ArrayList<java.lang.CharSequence>">
+</parameter>
+</method>
<method name="putExtra"
return="android.content.Intent"
abstract="false"
@@ -37237,6 +37435,21 @@
>
<parameter name="name" type="java.lang.String">
</parameter>
+<parameter name="value" type="java.lang.CharSequence[]">
+</parameter>
+</method>
+<method name="putExtra"
+ return="android.content.Intent"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
<parameter name="value" type="android.os.Bundle">
</parameter>
</method>
@@ -45287,28 +45500,6 @@
visibility="public"
>
</field>
-<field name="PKG_INSTALL_COMPLETE"
- type="int"
- transient="false"
- volatile="false"
- value="1"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="PKG_INSTALL_INCOMPLETE"
- type="int"
- transient="false"
- volatile="false"
- value="0"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="SIGNATURE_FIRST_NOT_SIGNED"
type="int"
transient="false"
@@ -71250,6 +71441,19 @@
<exception name="IOException" type="java.io.IOException">
</exception>
</method>
+<method name="setZoomCallback"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cb" type="android.hardware.Camera.ZoomCallback">
+</parameter>
+</method>
<method name="startPreview"
return="void"
abstract="false"
@@ -71261,6 +71465,19 @@
visibility="public"
>
</method>
+<method name="startSmoothZoom"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
<method name="stopPreview"
return="void"
abstract="false"
@@ -71272,6 +71489,17 @@
visibility="public"
>
</method>
+<method name="stopSmoothZoom"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="takePicture"
return="void"
abstract="false"
@@ -71442,6 +71670,28 @@
visibility="public"
>
</method>
+<method name="getExposureCompensation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getExposureCompensationStep"
+ return="float"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="getFlashMode"
return="java.lang.String"
abstract="false"
@@ -71532,6 +71782,39 @@
visibility="public"
>
</method>
+<method name="getMaxExposureCompensation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMaxZoom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinExposureCompensation"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="getPictureFormat"
return="int"
abstract="false"
@@ -71752,6 +72035,50 @@
visibility="public"
>
</method>
+<method name="getZoom"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getZoomRatios"
+ return="java.util.List<java.lang.Integer>"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isSmoothZoomSupported"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="isZoomSupported"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="remove"
return="void"
abstract="false"
@@ -71832,6 +72159,19 @@
<parameter name="value" type="java.lang.String">
</parameter>
</method>
+<method name="setExposureCompensation"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
<method name="setFlashMode"
return="void"
abstract="false"
@@ -72059,6 +72399,19 @@
<parameter name="value" type="java.lang.String">
</parameter>
</method>
+<method name="setZoom"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="value" type="int">
+</parameter>
+</method>
<method name="unflatten"
return="void"
abstract="false"
@@ -72674,6 +73027,31 @@
>
</field>
</class>
+<interface name="Camera.ZoomCallback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="onZoomUpdate"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="zoomValue" type="int">
+</parameter>
+<parameter name="stopped" type="boolean">
+</parameter>
+<parameter name="camera" type="android.hardware.Camera">
+</parameter>
+</method>
+</interface>
<class name="GeomagneticField"
extends="java.lang.Object"
abstract="false"
@@ -72923,7 +73301,7 @@
value="3"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</field>
@@ -89967,6 +90345,356 @@
</package>
<package name="android.net.http"
>
+<class name="AndroidHttpClient"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="org.apache.http.client.HttpClient">
+</implements>
+<method name="close"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="disableCurlLogging"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="enableCurlLogging"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="name" type="java.lang.String">
+</parameter>
+<parameter name="level" type="int">
+</parameter>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="org.apache.http.HttpResponse"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler<? extends T>">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.client.methods.HttpUriRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler<? extends T>">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler<? extends T>">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="execute"
+ return="T"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="target" type="org.apache.http.HttpHost">
+</parameter>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+<parameter name="responseHandler" type="org.apache.http.client.ResponseHandler<? extends T>">
+</parameter>
+<parameter name="context" type="org.apache.http.protocol.HttpContext">
+</parameter>
+<exception name="ClientProtocolException" type="org.apache.http.client.ClientProtocolException">
+</exception>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getCompressedEntity"
+ return="org.apache.http.entity.AbstractHttpEntity"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="data" type="byte[]">
+</parameter>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="getConnectionManager"
+ return="org.apache.http.conn.ClientConnectionManager"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getMinGzipSize"
+ return="long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resolver" type="android.content.ContentResolver">
+</parameter>
+</method>
+<method name="getParams"
+ return="org.apache.http.params.HttpParams"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getUngzippedContent"
+ return="java.io.InputStream"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="entity" type="org.apache.http.HttpEntity">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="modifyRequestToAcceptGzipResponse"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="request" type="org.apache.http.HttpRequest">
+</parameter>
+</method>
+<method name="newInstance"
+ return="android.net.http.AndroidHttpClient"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="userAgent" type="java.lang.String">
+</parameter>
+<parameter name="context" type="android.content.Context">
+</parameter>
+</method>
+<method name="newInstance"
+ return="android.net.http.AndroidHttpClient"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="userAgent" type="java.lang.String">
+</parameter>
+</method>
+<field name="DEFAULT_SYNC_MIN_GZIP_BYTES"
+ type="long"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
+<class name="HttpDateTime"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="HttpDateTime"
+ type="android.net.http.HttpDateTime"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="parse"
+ return="java.lang.Long"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="timeString" type="java.lang.String">
+</parameter>
+<exception name="IllegalArgumentException" type="java.lang.IllegalArgumentException">
+</exception>
+</method>
+</class>
<class name="SslCertificate"
extends="java.lang.Object"
abstract="false"
@@ -112043,6 +112771,32 @@
<parameter name="key" type="java.lang.String">
</parameter>
</method>
+<method name="getCharSequenceArray"
+ return="java.lang.CharSequence[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
+<method name="getCharSequenceArrayList"
+ return="java.util.ArrayList<java.lang.CharSequence>"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+</method>
<method name="getDouble"
return="double"
abstract="false"
@@ -112531,6 +113285,36 @@
<parameter name="value" type="java.lang.CharSequence">
</parameter>
</method>
+<method name="putCharSequenceArray"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.lang.CharSequence[]">
+</parameter>
+</method>
+<method name="putCharSequenceArrayList"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="key" type="java.lang.String">
+</parameter>
+<parameter name="value" type="java.util.ArrayList<java.lang.CharSequence>">
+</parameter>
+</method>
<method name="putDouble"
return="void"
abstract="false"
@@ -113183,6 +113967,28 @@
visibility="public"
>
</method>
+<method name="getGlobalClassInitCount"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="getGlobalClassInitTime"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="getGlobalExternalAllocCount"
return="int"
abstract="false"
@@ -113429,6 +114235,28 @@
visibility="public"
>
</method>
+<method name="resetGlobalClassInitCount"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="resetGlobalClassInitTime"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="resetGlobalExternalAllocCount"
return="void"
abstract="false"
@@ -119536,7 +120364,7 @@
visibility="public"
>
<method name="disableUsbMassStorage"
- return="int"
+ return="void"
abstract="false"
native="false"
synchronized="false"
@@ -119547,7 +120375,7 @@
>
</method>
<method name="enableUsbMassStorage"
- return="int"
+ return="void"
abstract="false"
native="false"
synchronized="false"
@@ -133465,6 +134293,17 @@
visibility="public"
>
</field>
+<field name="ACTION_ADD_ACCOUNT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.settings.ADD_ACCOUNT_SETTINGS""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="ACTION_AIRPLANE_MODE_SETTINGS"
type="java.lang.String"
transient="false"
@@ -133773,6 +134612,17 @@
visibility="public"
>
</field>
+<field name="EXTRA_AUTHORITIES"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""authorities""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
</class>
<class name="Settings.NameValueTable"
extends="java.lang.Object"
@@ -137706,6 +138556,17 @@
visibility="public"
>
</field>
+<field name="EXTRA_CALLING_PACKAGE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""calling_package""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="EXTRA_LANGUAGE"
type="java.lang.String"
transient="false"
@@ -137750,6 +138611,17 @@
visibility="public"
>
</field>
+<field name="EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.speech.extra.ONLY_RETURN_LANGUAGE_PREFERENCE""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="EXTRA_PARTIAL_RESULTS"
type="java.lang.String"
transient="false"
@@ -163444,6 +164316,134 @@
>
</field>
</class>
+<class name="Patterns"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="concatGroups"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matcher" type="java.util.regex.Matcher">
+</parameter>
+</method>
+<method name="digitsAndPlusOnly"
+ return="java.lang.String"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="matcher" type="java.util.regex.Matcher">
+</parameter>
+</method>
+<field name="DOMAIN_NAME"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="EMAIL_ADDRESS"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="GOOD_IRI_CHAR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""a-zA-Z0-9\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="IP_ADDRESS"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="PHONE"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOP_LEVEL_DOMAIN"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOP_LEVEL_DOMAIN_STR"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""((aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(biz|b[abdefghijmnorstvwyz])|(cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(edu|e[cegrstu])|f[ijkmor]|(gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(info|int|i[delmnoqrst])|(jobs|j[emop])|k[eghimnprwyz]|l[abcikrstuvy]|(mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])|(name|net|n[acefgilopruz])|(org|om)|(pro|p[aefghklmnrstwy])|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|(tel|travel|t[cdfghjklmnoprtvwz])|u[agksyz]|v[aceginu]|w[fs]|(xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-80akhbyknj4f|xn\\-\\-9t4b11yi5a|xn\\-\\-deba0ad|xn\\-\\-g6w251d|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-zckzah)|y[etu]|z[amw])""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TOP_LEVEL_DOMAIN_STR_FOR_WEB_URL"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""(?:(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(?:biz|b[abdefghijmnorstvwyz])|(?:cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(?:edu|e[cegrstu])|f[ijkmor]|(?:gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(?:info|int|i[delmnoqrst])|(?:jobs|j[emop])|k[eghimnprwyz]|l[abcikrstuvy]|(?:mil|mobi|museum|m[acdeghklmnopqrstuvwxyz])|(?:name|net|n[acefgilopruz])|(?:org|om)|(?:pro|p[aefghklmnrstwy])|qa|r[eosuw]|s[abcdeghijklmnortuvyz]|(?:tel|travel|t[cdfghjklmnoprtvwz])|u[agksyz]|v[aceginu]|w[fs]|(?:xn\\-\\-0zwm56d|xn\\-\\-11b5bs3a9aj6g|xn\\-\\-80akhbyknj4f|xn\\-\\-9t4b11yi5a|xn\\-\\-deba0ad|xn\\-\\-g6w251d|xn\\-\\-hgbk6aj7f53bba|xn\\-\\-hlcj6aya9esc7a|xn\\-\\-jxalpdlp|xn\\-\\-kgbechtv|xn\\-\\-zckzah)|y[etu]|z[amw]))""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="WEB_URL"
+ type="java.util.regex.Pattern"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
<class name="PrintStreamPrinter"
extends="java.lang.Object"
abstract="false"
@@ -165725,7 +166725,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</method>
@@ -165751,6 +166751,17 @@
visibility="public"
>
</method>
+<method name="getRotation"
+ 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"
@@ -188935,7 +189946,7 @@
synchronized="false"
static="true"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</method>
@@ -188987,7 +189998,7 @@
synchronized="false"
static="true"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</method>
@@ -208486,6 +209497,17 @@
visibility="public"
>
</method>
+<method name="isStripEnabled"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="onFocusChange"
return="void"
abstract="false"
@@ -208540,6 +209562,71 @@
<parameter name="resId" type="int">
</parameter>
</method>
+<method name="setLeftStripDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setLeftStripDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setRightStripDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawable" type="android.graphics.drawable.Drawable">
+</parameter>
+</method>
+<method name="setRightStripDrawable"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="resId" type="int">
+</parameter>
+</method>
+<method name="setStripEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="drawBottomStrips" type="boolean">
+</parameter>
+</method>
</class>
<class name="TableLayout"
extends="android.widget.LinearLayout"
@@ -211739,6 +212826,17 @@
<parameter name="measureSpec" type="int">
</parameter>
</method>
+<method name="resume"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
<method name="seekTo"
return="void"
abstract="false"
@@ -211852,6 +212950,17 @@
visibility="public"
>
</method>
+<method name="suspend"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
</class>
<class name="ViewAnimator"
extends="android.widget.FrameLayout"
@@ -215803,7 +216912,7 @@
synchronized="false"
static="true"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</method>
@@ -215886,7 +216995,7 @@
value=""/sdcard/dmtrace.trace""
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
</field>
@@ -215923,6 +217032,28 @@
visibility="public"
>
</field>
+<field name="KIND_GLOBAL_CLASS_INIT_COUNT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="32"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_GLOBAL_CLASS_INIT_TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="64"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="KIND_GLOBAL_EXT_ALLOCATED_BYTES"
type="int"
transient="false"
@@ -216022,6 +217153,28 @@
visibility="public"
>
</field>
+<field name="KIND_THREAD_CLASS_INIT_COUNT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2097152"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="KIND_THREAD_CLASS_INIT_TIME"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4194304"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="KIND_THREAD_EXT_ALLOCATED_BYTES"
type="int"
transient="false"
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index d640de1..5d6970a 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -35,6 +35,7 @@
import java.io.File;
import java.io.FileNotFoundException;
+import java.io.PrintStream;
import java.net.URISyntaxException;
import java.util.Iterator;
import java.util.Set;
@@ -47,6 +48,7 @@
private String mCurArgData;
private boolean mDebugOption = false;
+ private boolean mWaitOption = false;
// These are magic strings understood by the Eclipse plugin.
private static final String FATAL_ERROR_CODE = "Error type 1";
@@ -88,6 +90,8 @@
if (op.equals("start")) {
runStart();
+ } else if (op.equals("startservice")) {
+ runStartService();
} else if (op.equals("instrument")) {
runInstrument();
} else if (op.equals("broadcast")) {
@@ -104,6 +108,7 @@
boolean hasIntentInfo = false;
mDebugOption = false;
+ mWaitOption = false;
Uri data = null;
String type = null;
@@ -151,6 +156,8 @@
intent.setFlags(Integer.decode(str).intValue());
} else if (opt.equals("-D")) {
mDebugOption = true;
+ } else if (opt.equals("-W")) {
+ mWaitOption = true;
} else {
System.err.println("Error: Unknown option: " + opt);
showUsage();
@@ -183,63 +190,104 @@
return intent;
}
+ private void runStartService() throws Exception {
+ Intent intent = makeIntent();
+ System.out.println("Starting service: " + intent);
+ ComponentName cn = mAm.startService(null, intent, intent.getType());
+ if (cn == null) {
+ System.err.println("Error: Not found; no service started.");
+ }
+ }
+
private void runStart() throws Exception {
Intent intent = makeIntent();
System.out.println("Starting: " + intent);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// XXX should do something to determine the MIME type.
- int res = mAm.startActivity(null, intent, intent.getType(),
- null, 0, null, null, 0, false, mDebugOption);
+ IActivityManager.WaitResult result = null;
+ int res;
+ if (mWaitOption) {
+ result = mAm.startActivityAndWait(null, intent, intent.getType(),
+ null, 0, null, null, 0, false, mDebugOption);
+ res = result.result;
+ } else {
+ res = mAm.startActivity(null, intent, intent.getType(),
+ null, 0, null, null, 0, false, mDebugOption);
+ }
+ PrintStream out = mWaitOption ? System.out : System.err;
+ boolean launched = false;
switch (res) {
case IActivityManager.START_SUCCESS:
+ launched = true;
break;
case IActivityManager.START_SWITCHES_CANCELED:
- System.err.println(
+ launched = true;
+ out.println(
"Warning: Activity not started because the "
+ " current activity is being kept for the user.");
break;
case IActivityManager.START_DELIVERED_TO_TOP:
- System.err.println(
+ launched = true;
+ out.println(
"Warning: Activity not started, intent has "
+ "been delivered to currently running "
+ "top-most instance.");
break;
case IActivityManager.START_RETURN_INTENT_TO_CALLER:
- System.err.println(
+ launched = true;
+ out.println(
"Warning: Activity not started because intent "
+ "should be handled by the caller");
break;
case IActivityManager.START_TASK_TO_FRONT:
- System.err.println(
+ launched = true;
+ out.println(
"Warning: Activity not started, its current "
+ "task has been brought to the front");
break;
case IActivityManager.START_INTENT_NOT_RESOLVED:
- System.err.println(
+ out.println(
"Error: Activity not started, unable to "
+ "resolve " + intent.toString());
break;
case IActivityManager.START_CLASS_NOT_FOUND:
- System.err.println(NO_CLASS_ERROR_CODE);
- System.err.println("Error: Activity class " +
+ out.println(NO_CLASS_ERROR_CODE);
+ out.println("Error: Activity class " +
intent.getComponent().toShortString()
+ " does not exist.");
break;
case IActivityManager.START_FORWARD_AND_REQUEST_CONFLICT:
- System.err.println(
+ out.println(
"Error: Activity not started, you requested to "
+ "both forward and receive its result");
break;
case IActivityManager.START_PERMISSION_DENIED:
- System.err.println(
+ out.println(
"Error: Activity not started, you do not "
+ "have permission to access it.");
break;
default:
- System.err.println(
+ out.println(
"Error: Activity not started, unknown error code " + res);
break;
}
+ if (mWaitOption && launched) {
+ if (result == null) {
+ result = new IActivityManager.WaitResult();
+ result.who = intent.getComponent();
+ }
+ System.out.println("Status: " + (result.timeout ? "timeout" : "ok"));
+ if (result.who != null) {
+ System.out.println("Activity: " + result.who.flattenToShortString());
+ }
+ if (result.thisTime >= 0) {
+ System.out.println("ThisTime: " + result.thisTime);
+ }
+ if (result.totalTime >= 0) {
+ System.out.println("TotalTime: " + result.totalTime);
+ }
+ System.out.println("Complete");
+ }
}
private void sendBroadcast() throws Exception {
@@ -493,8 +541,11 @@
System.err.println(
"usage: am [subcommand] [options]\n" +
"\n" +
- " start an Activity: am start [-D] <INTENT>\n" +
+ " start an Activity: am start [-D] [-W] <INTENT>\n" +
" -D: enable debugging\n" +
+ " -W: wait for launch to complete\n" +
+ "\n" +
+ " start a Service: am startservice <INTENT>\n" +
"\n" +
" send a broadcast Intent: am broadcast <INTENT>\n" +
"\n" +
diff --git a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
index acfbb07..7e9fd61 100644
--- a/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
+++ b/cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java
@@ -289,17 +289,66 @@
this.notify();
}
}
+
+ public void waitForCompletion() {
+ // The restoreFinished() callback will throw the 'done' flag; we
+ // just sit and wait on that notification.
+ synchronized (this) {
+ while (!this.done) {
+ try {
+ this.wait();
+ } catch (InterruptedException ex) {
+ }
+ }
+ }
+ }
}
private void doRestore() {
- long token;
- try {
- token = Long.parseLong(nextArg(), 16);
- } catch (NumberFormatException e) {
- showUsage();
- return;
+ String arg = nextArg();
+ if (arg.indexOf('.') >= 0) {
+ // it's a package name
+ doRestorePackage(arg);
+ } else {
+ try {
+ long token = Long.parseLong(nextArg(), 16);
+ doRestoreAll(token);
+ } catch (NumberFormatException e) {
+ showUsage();
+ return;
+ }
}
+ System.out.println("done");
+ }
+
+ private void doRestorePackage(String pkg) {
+ try {
+ String curTransport = mBmgr.getCurrentTransport();
+ mRestore = mBmgr.beginRestoreSession(curTransport);
+ if (mRestore == null) {
+ System.err.println(BMGR_NOT_RUNNING_ERR);
+ return;
+ }
+
+ RestoreObserver observer = new RestoreObserver();
+ int err = mRestore.restorePackage(pkg, observer);
+ if (err == 0) {
+ // Off and running -- wait for the restore to complete
+ observer.waitForCompletion();
+ } else {
+ System.err.println("Unable to restore package " + pkg);
+ }
+
+ // And finally shut down the session
+ mRestore.endRestoreSession();
+ } catch (RemoteException e) {
+ System.err.println(e.toString());
+ System.err.println(BMGR_NOT_RUNNING_ERR);
+ }
+ }
+
+ private void doRestoreAll(long token) {
RestoreObserver observer = new RestoreObserver();
try {
@@ -332,14 +381,7 @@
// if we kicked off a restore successfully, we have to wait for it
// to complete before we can shut down the restore session safely
if (didRestore) {
- synchronized (observer) {
- while (!observer.done) {
- try {
- observer.wait();
- } catch (InterruptedException ex) {
- }
- }
- }
+ observer.waitForCompletion();
}
// once the restore has finished, close down the session and we're done
@@ -348,8 +390,6 @@
System.err.println(e.toString());
System.err.println(BMGR_NOT_RUNNING_ERR);
}
-
- System.out.println("done");
}
private String nextArg() {
@@ -370,6 +410,7 @@
System.err.println(" bmgr list sets");
System.err.println(" bmgr transport WHICH");
System.err.println(" bmgr restore TOKEN");
+ System.err.println(" bmgr restore PACKAGE");
System.err.println(" bmgr run");
System.err.println(" bmgr wipe PACKAGE");
System.err.println("");
@@ -396,8 +437,14 @@
System.err.println("The 'transport' command designates the named transport as the currently");
System.err.println("active one. This setting is persistent across reboots.");
System.err.println("");
- System.err.println("The 'restore' command initiates a restore operation, using the restore set");
- System.err.println("from the current transport whose token matches the argument.");
+ System.err.println("The 'restore' command when given a restore token initiates a full-system");
+ System.err.println("restore operation from the currently active transport. It will deliver");
+ System.err.println("the restore set designated by the TOKEN argument to each application");
+ System.err.println("that had contributed data to that restore set.");
+ System.err.println("");
+ System.err.println("The 'restore' command when given a package name intiates a restore of");
+ System.err.println("just that one package according to the restore set selection algorithm");
+ System.err.println("used by the RestoreSession.restorePackage() method.");
System.err.println("");
System.err.println("The 'run' command causes any scheduled backup operation to be initiated");
System.err.println("immediately, without the usual waiting period for batching together");
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index 78f90a1..adec5a4 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -96,6 +96,7 @@
run_command("NETWORK INTERFACES", 10, "netcfg", NULL);
dump_file("NETWORK ROUTES", "/proc/net/route");
+ dump_file("ARP CACHE", "/proc/net/arp");
#ifdef FWDUMP_bcm4329
run_command("DUMP WIFI FIRMWARE LOG", 60,
diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h
index 92ae310..8e4adb1 100644
--- a/cmds/installd/installd.h
+++ b/cmds/installd/installd.h
@@ -68,7 +68,7 @@
/* other handy constants */
#define PROTECTED_DIR_PREFIX "/data/app-private/"
-#define SDCARD_DIR_PREFIX "/asec/"
+#define SDCARD_DIR_PREFIX getenv("ASEC_MOUNTPOINT")
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
#define DALVIK_CACHE_POSTFIX "/classes.dex"
diff --git a/cmds/stagefright/Android.mk b/cmds/stagefright/Android.mk
index 68d8bb0..52f767e 100644
--- a/cmds/stagefright/Android.mk
+++ b/cmds/stagefright/Android.mk
@@ -17,6 +17,8 @@
LOCAL_CFLAGS += -Wno-multichar
+LOCAL_MODULE_TAGS := debug
+
LOCAL_MODULE:= stagefright
include $(BUILD_EXECUTABLE)
@@ -39,6 +41,8 @@
LOCAL_CFLAGS += -Wno-multichar
+LOCAL_MODULE_TAGS := debug
+
LOCAL_MODULE:= record
include $(BUILD_EXECUTABLE)
@@ -61,6 +65,8 @@
LOCAL_CFLAGS += -Wno-multichar
+LOCAL_MODULE_TAGS := debug
+
LOCAL_MODULE:= audioloop
include $(BUILD_EXECUTABLE)
diff --git a/common/java/com/android/common/OperationScheduler.java b/common/java/com/android/common/OperationScheduler.java
index 0c7ca83..0a48fe7 100644
--- a/common/java/com/android/common/OperationScheduler.java
+++ b/common/java/com/android/common/OperationScheduler.java
@@ -17,6 +17,7 @@
package com.android.common;
import android.content.SharedPreferences;
+import android.net.http.HttpDateTime;
import android.text.format.Time;
import java.util.Map;
diff --git a/common/java/com/android/common/speech/Recognition.java b/common/java/com/android/common/speech/Recognition.java
index 6f164a9..a79a19b 100644
--- a/common/java/com/android/common/speech/Recognition.java
+++ b/common/java/com/android/common/speech/Recognition.java
@@ -19,18 +19,42 @@
/**
* Utilities for voice recognition implementations.
*
- * @see android.app.RecognitionService
+ * @see android.speech.RecognitionService
+ * @see android.speech.RecognizerIntent
*/
public class Recognition {
-
+
/**
- * The extra key used in an intent to the speech recognizer for voice search. Not
- * generally to be used by developers. The system search dialog uses this, for example,
- * to set a calling package for identification by a voice search API. If this extra
- * is set by anyone but the system process, it should be overridden by the voice search
- * implementation.
+ * The key to the extra in the Bundle returned by
+ * android.speech.RecognizerIntent#ACTION_GET_LANGUAGE_DETAILS
+ * which is an ArrayList of CharSequences which are hints that can be shown to
+ * the user for voice actions currently supported by voice search for the user's current
+ * language preference for voice search (i.e., the one defined in the extra
+ * android.speech.RecognizerIntent#EXTRA_LANGUAGE_PREFERENCE).
+ *
+ * If this is paired with EXTRA_HINT_CONTEXT, should return a set of hints that are
+ * appropriate for the provided context.
+ *
+ * The CharSequences are SpannedStrings and will contain segments wrapped in
+ * <annotation action="true"></annotation>. This is to indicate the section of the text
+ * which represents the voice action, to be highlighted in the UI if so desired.
*/
- public final static String EXTRA_CALLING_PACKAGE = "calling_package";
+ public static final String EXTRA_HINT_STRINGS = "android.speech.extra.HINT_STRINGS";
+
+ /**
+ * The key to an extra to be included in the request intent for
+ * android.speech.RecognizerIntent#ACTION_GET_LANGUAGE_DETAILS.
+ * Should be an int of one of the values defined below. If an
+ * unknown int value is provided, it should be ignored.
+ */
+ public static final String EXTRA_HINT_CONTEXT = "android.speech.extra.HINT_CONTEXT";
+
+ /**
+ * A set of values for EXTRA_HINT_CONTEXT.
+ */
+ public static final int HINT_CONTEXT_UNKNOWN = 0;
+ public static final int HINT_CONTEXT_VOICE_SEARCH_HELP = 1;
+ public static final int HINT_CONTEXT_CAR_HOME = 2;
private Recognition() { } // don't instantiate
}
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 43a0f30..e2263fc 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -43,36 +43,92 @@
import com.google.android.collect.Maps;
/**
- * A class that helps with interactions with the AccountManager Service. It provides
- * methods to allow for account, password, and authtoken management for all accounts on the
- * device. One accesses the {@link AccountManager} by calling:
- * <pre>
- * AccountManager accountManager = AccountManager.get(context);
- * </pre>
+ * This class provides access to a centralized registry of the user's
+ * online accounts. With this service, users only need to enter their
+ * credentials (username and password) once for any account, granting
+ * applications access to online resources with "one-click" approval.
*
- * <p>
- * The AccountManager Service provides storage for the accounts known to the system,
- * provides methods to manage them, and allows the registration of authenticators to
- * which operations such as addAccount and getAuthToken are delegated.
- * <p>
- * Many of the calls take an {@link AccountManagerCallback} and {@link Handler} as parameters.
- * These calls return immediately but run asynchronously. If a callback is provided then
- * {@link AccountManagerCallback#run} will be invoked wen the request completes, successfully
- * or not. An {@link AccountManagerFuture} is returned by these requests and also passed into the
- * callback. The result if retrieved by calling {@link AccountManagerFuture#getResult()} which
- * either returns the result or throws an exception as appropriate.
- * <p>
- * The asynchronous request can be made blocking by not providing a callback and instead
- * calling {@link AccountManagerFuture#getResult()} on the future that is returned. This will
- * cause the running thread to block until the result is returned. Keep in mind that one
- * should not block the main thread in this way. Instead one should either use a callback,
- * thus making the call asynchronous, or make the blocking call on a separate thread.
- * getResult() will throw an {@link IllegalStateException} if you call it from the main thread
- * before the request has completed, i.e. before the callback has been invoked.
- * <p>
- * If one wants to ensure that the callback is invoked from a specific handler then they should
- * pass the handler to the request. This makes it easier to ensure thread-safety by running
- * all of one's logic from a single handler.
+ * <p>Different online services have different ways of handling accounts and
+ * authentication, so the account manager uses pluggable <em>authenticator</em>
+ * modules for different <em>account types</em>. The authenticators (which
+ * may be written by third parties) handle the actual details of validating
+ * account credentials and storing account information. For example, Google,
+ * Facebook, and Microsoft Exchange each have their own authenticator.
+ *
+ * <p>Many servers support some notion of an <em>authentication token</em>,
+ * which can be used to authenticate a request to the server without sending
+ * the user's actual password. (Auth tokens are normally created with a
+ * separate request which does include the user's credentials.) AccountManager
+ * can generate these auth tokens for applications, so the application doesn't
+ * need to handle passwords directly. Auth tokens are normally reusable, and
+ * cached by AccountManager, but must be refreshed periodically. It's the
+ * responsibility of applications to <em>invalidate</em> auth tokens when they
+ * stop working so the AccountManager knows it needs to regenerate them.
+ *
+ * <p>Applications accessing a server normally go through these steps:
+ *
+ * <ul>
+ * <li>Get an instance of AccountManager using {@link #get(Context)}.
+ *
+ * <li>List the available accounts using {@link #getAccountsByType} or
+ * {@link #getAccountsByTypeAndFeatures}. Normally applications will only
+ * be interested in accounts with one particular <em>type</em>, which
+ * identifies the authenticator. Account <em>features</em> are used to
+ * identify particular account subtypes and capabilities. Both the account
+ * type and features are authenticator-specific strings, and must be known by
+ * the application in coordination with its preferred authenticators.
+ *
+ * <li>Select one or more of the available accounts, possibly by asking the
+ * user for their preference. If no suitable accounts are available,
+ * {@link #addAccount} may be called to prompt the user to create an
+ * account of the appropriate type.
+ *
+ * <li>Request an auth token for the selected account(s) using one of the
+ * {@link #getAuthToken} methods or related helpers. Refer to the description
+ * of each method for exact usage and error handling details.
+ *
+ * <li>Make the request using the auth token. The form of the auth token,
+ * the format of the request, and the protocol used are all specific to the
+ * service you are accessing. The application makes the request itself, using
+ * whatever network and protocol libraries are useful.
+ *
+ * <li><b>Important:</b> If the request fails with an authentication error,
+ * it could be that a cached auth token is stale and no longer honored by
+ * the server. The application must call {@link #invalidateAuthToken} to remove
+ * the token from the cache, otherwise requests will continue failing! After
+ * invalidating the auth token, immediately go back to the "Request an auth
+ * token" step above. If the process fails the second time, then it can be
+ * treated as a "genuine" authentication failure and the user notified or other
+ * appropriate actions taken.
+ * </ul>
+ *
+ * <p>Some AccountManager methods may require interaction with the user to
+ * prompt for credentials, present options, or ask the user to add an account.
+ * The caller may choose whether to allow AccountManager to directly launch the
+ * necessary user interface and wait for the user, or to return an Intent which
+ * the caller may use to launch the interface, or (in some cases) to install a
+ * notification which the user can select at any time to launch the interface.
+ * To have AccountManager launch the interface directly, the caller must supply
+ * the current foreground {@link Activity} context.
+ *
+ * <p>Many AccountManager methods take {@link AccountManagerCallback} and
+ * {@link Handler} as parameters. These methods return immediately but
+ * run asynchronously. If a callback is provided then
+ * {@link AccountManagerCallback#run} will be invoked on the Handler's
+ * thread when the request completes, successfully or not.
+ * An {@link AccountManagerFuture} is returned by these requests and also
+ * supplied to the callback (if any). The result is retrieved by calling
+ * {@link AccountManagerFuture#getResult()} which waits for the operation
+ * to complete (if necessary) and either returns the result or throws an
+ * exception if an error occurred during the operation.
+ * To make the request synchronously, call
+ * {@link AccountManagerFuture#getResult()} immediately on receiving the
+ * future from the method. No callback need be supplied.
+ *
+ * <p>Requests which may block, including
+ * {@link AccountManagerFuture#getResult()}, must never be called on
+ * the application's main event thread. These operations throw
+ * {@link IllegalStateException} if they are used on the main thread.
*/
public class AccountManager {
private static final String TAG = "AccountManager";
@@ -85,34 +141,65 @@
public static final int ERROR_CODE_BAD_ARGUMENTS = 7;
public static final int ERROR_CODE_BAD_REQUEST = 8;
- public static final String KEY_ACCOUNTS = "accounts";
- public static final String KEY_AUTHENTICATOR_TYPES = "authenticator_types";
- public static final String KEY_USERDATA = "userdata";
- public static final String KEY_AUTHTOKEN = "authtoken";
- public static final String KEY_PASSWORD = "password";
+ /**
+ * The Bundle key used for the {@link String} account name in results
+ * from methods which return information about a particular account.
+ */
public static final String KEY_ACCOUNT_NAME = "authAccount";
+
+ /**
+ * The Bundle key used for the {@link String} account type in results
+ * from methods which return information about a particular account.
+ */
public static final String KEY_ACCOUNT_TYPE = "accountType";
- public static final String KEY_ERROR_CODE = "errorCode";
- public static final String KEY_ERROR_MESSAGE = "errorMessage";
+
+ /**
+ * The Bundle key used for the auth token value in results
+ * from {@link #getAuthToken} and friends.
+ */
+ public static final String KEY_AUTHTOKEN = "authtoken";
+
+ /**
+ * The Bundle key used for an {@link Intent} in results from methods that
+ * may require the caller to interact with the user. The Intent can
+ * be used to start the corresponding user interface activity.
+ */
public static final String KEY_INTENT = "intent";
- public static final String KEY_BOOLEAN_RESULT = "booleanResult";
+
+ /**
+ * The Bundle key used to supply the password directly in options to
+ * {@link #confirmCredentials}, rather than prompting the user with
+ * the standard password prompt.
+ */
+ public static final String KEY_PASSWORD = "password";
+
+ public static final String KEY_ACCOUNTS = "accounts";
public static final String KEY_ACCOUNT_AUTHENTICATOR_RESPONSE = "accountAuthenticatorResponse";
public static final String KEY_ACCOUNT_MANAGER_RESPONSE = "accountManagerResponse";
+ public static final String KEY_AUTHENTICATOR_TYPES = "authenticator_types";
public static final String KEY_AUTH_FAILED_MESSAGE = "authFailedMessage";
public static final String KEY_AUTH_TOKEN_LABEL = "authTokenLabelKey";
+ public static final String KEY_BOOLEAN_RESULT = "booleanResult";
+ public static final String KEY_ERROR_CODE = "errorCode";
+ public static final String KEY_ERROR_MESSAGE = "errorMessage";
+ public static final String KEY_USERDATA = "userdata";
+
public static final String ACTION_AUTHENTICATOR_INTENT =
"android.accounts.AccountAuthenticator";
public static final String AUTHENTICATOR_META_DATA_NAME =
- "android.accounts.AccountAuthenticator";
+ "android.accounts.AccountAuthenticator";
public static final String AUTHENTICATOR_ATTRIBUTES_NAME = "account-authenticator";
private final Context mContext;
private final IAccountManager mService;
private final Handler mMainHandler;
+
/**
* Action sent as a broadcast Intent by the AccountsService
- * when accounts are added to and/or removed from the device's
- * database.
+ * when accounts are added, accounts are removed, or an
+ * account's credentials (saved password, etc) are changed.
+ *
+ * @see #addOnAccountsUpdatedListener
*/
public static final String LOGIN_ACCOUNTS_CHANGED_ACTION =
"android.accounts.LOGIN_ACCOUNTS_CHANGED";
@@ -136,26 +223,36 @@
}
/**
- * Retrieve an AccountManager instance that is associated with the context that is passed in.
- * Certain calls such as {@link #addOnAccountsUpdatedListener} use this context internally,
- * so the caller must take care to use a {@link Context} whose lifetime is associated with
- * the listener registration.
+ * Gets an AccountManager instance associated with a Context.
+ * The {@link Context} will be used as long as the AccountManager is
+ * active, so make sure to use a {@link Context} whose lifetime is
+ * commensurate with any listeners registered to
+ * {@link #addOnAccountsUpdatedListener} or similar methods.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>No permission is required to call this method.
+ *
* @param context The {@link Context} to use when necessary
- * @return an {@link AccountManager} instance that is associated with context
+ * @return An {@link AccountManager} instance
*/
public static AccountManager get(Context context) {
return (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);
}
/**
- * Get the password that is associated with the account. Returns null if the account does
- * not exist.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission
- * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS} and is running
- * with the same UID as the Authenticator for the account.
+ * Gets the saved password associated with the account.
+ * This is intended for authenticators and related code; applications
+ * should get an auth token instead.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS}
+ * and to have the same UID as the account's authenticator.
+ *
+ * @param account The account to query for a password
+ * @return The account's password, null if none or if the account doesn't exist
*/
public String getPassword(final Account account) {
try {
@@ -167,14 +264,19 @@
}
/**
- * Get the user data named by "key" that is associated with the account.
- * Returns null if the account does not exist or if it does not have a value for key.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission
- * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS} and is running
- * with the same UID as the Authenticator for the account.
+ * Gets the user data named by "key" associated with the account.
+ * This is intended for authenticators and related code to store
+ * arbitrary metadata along with accounts. The meaning of the keys
+ * and values is up to the authenticator for the account.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS}
+ * and to have the same UID as the account's authenticator.
+ *
+ * @param account The account to query for user data
+ * @return The user data, null if the account or key doesn't exist
*/
public String getUserData(final Account account, final String key) {
try {
@@ -186,14 +288,15 @@
}
/**
- * Query the AccountManager Service for an array that contains a
- * {@link AuthenticatorDescription} for each registered authenticator.
- * @return an array that contains all the authenticators known to the AccountManager service.
- * This array will be empty if there are no authenticators and will never return null.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * No permission is required to make this call.
+ * Lists the currently registered authenticators.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>No permission is required to call this method.
+ *
+ * @return An array of {@link AuthenticatorDescription} for every
+ * authenticator known to the AccountManager service. Empty (never
+ * null) if no authenticators are known.
*/
public AuthenticatorDescription[] getAuthenticatorTypes() {
try {
@@ -205,13 +308,16 @@
}
/**
- * Query the AccountManager Service for all accounts.
- * @return an array that contains all the accounts known to the AccountManager service.
- * This array will be empty if there are no accounts and will never return null.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#GET_ACCOUNTS}
+ * Lists all accounts of any type registered on the device.
+ * Equivalent to getAccountsByType(null).
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#GET_ACCOUNTS}.
+ *
+ * @return An array of {@link Account}, one for each account. Empty
+ * (never null) if no accounts have been added.
*/
public Account[] getAccounts() {
try {
@@ -223,15 +329,20 @@
}
/**
- * Query the AccountManager for the set of accounts that have a given type. If null
- * is passed as the type than all accounts are returned.
- * @param type the account type by which to filter, or null to get all accounts
- * @return an array that contains the accounts that match the specified type. This array
- * will be empty if no accounts match. It will never return null.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#GET_ACCOUNTS}
+ * Lists all accounts of a particular type. The account type is a
+ * string token corresponding to the authenticator and useful domain
+ * of the account. For example, there are types corresponding to Google
+ * and Facebook. The exact string token to use will be published somewhere
+ * associated with the authenticator in question.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#GET_ACCOUNTS}.
+ *
+ * @param type The type of accounts to return, null to retrieve all accounts
+ * @return An array of {@link Account}, one per matching account. Empty
+ * (never null) if no accounts of the specified type have been added.
*/
public Account[] getAccountsByType(String type) {
try {
@@ -243,45 +354,27 @@
}
/**
- * Tests that the given account has the specified features. If this account does not exist
- * then this call returns false.
- * <p>
- * This call returns immediately but runs asynchronously and the result is accessed via the
- * {@link AccountManagerFuture} that is returned. This future is also passed as the sole
- * parameter to the {@link AccountManagerCallback}. If the caller wished to use this
- * method asynchronously then they will generally pass in a callback object that will get
- * invoked with the {@link AccountManagerFuture}. If they wish to use it synchronously then
- * they will generally pass null for the callback and instead call
- * {@link android.accounts.AccountManagerFuture#getResult()} on this method's return value,
- * which will then block until the request completes.
- * <p>
- * Do not block the main thread waiting this method's result.
- * <p>
- * Not allowed from main thread (but allowed from other threads):
- * <pre>
- * Boolean result = hasFeatures(account, features, callback, handler).getResult();
- * </pre>
- * Allowed from main thread:
- * <pre>
- * hasFeatures(account, features, new AccountManagerCallback<Boolean>() {
- * public void run(AccountManagerFuture<Boolean> future) {
- * Boolean result = future.getResult();
- * // use result
- * }
- * }, handler);
- * </pre>
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#GET_ACCOUNTS}.
+ * Finds out whether a particular account has all the specified features.
+ * Account features are authenticator-specific string tokens identifying
+ * boolean account properties. For example, features are used to tell
+ * whether Google accounts have a particular service (such as Google
+ * Calendar or Google Talk) enabled. The feature names and their meanings
+ * are published somewhere associated with the authenticator in question.
+ *
+ * <p>This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#GET_ACCOUNTS}.
*
* @param account The {@link Account} to test
- * @param features the features for which to test
- * @param callback A callback to invoke when the request completes. If null then
- * no callback is invoked.
- * @param handler The {@link Handler} to use to invoke the callback. If null then the
- * main thread's {@link Handler} is used.
- * @return an {@link AccountManagerFuture} that represents the future result of the call.
- * The future result is a {@link Boolean} that is true if the account exists and has the
- * specified features.
+ * @param features An array of the account features to check
+ * @param callback Callback to invoke when the request completes,
+ * null for no callback
+ * @param handler {@link Handler} identifying the callback thread,
+ * null for the main thread
+ * @return An {@link AccountManagerFuture} which resolves to a Boolean,
+ * true if the account exists and has all of the specified features.
*/
public AccountManagerFuture<Boolean> hasFeatures(final Account account,
final String[] features,
@@ -300,527 +393,31 @@
}
/**
- * Add an account to the AccountManager's set of known accounts.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission
- * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS} and is running
- * with the same UID as the Authenticator for the account.
- * @param account The account to add
- * @param password The password to associate with the account. May be null.
- * @param userdata A bundle of key/value pairs to set as the account's userdata. May be null.
- * @return true if the account was sucessfully added, false otherwise, for example,
- * if the account already exists or if the account is null
- */
- public boolean addAccountExplicitly(Account account, String password, Bundle userdata) {
- try {
- return mService.addAccount(account, password, userdata);
- } catch (RemoteException e) {
- // won't ever happen
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Removes the given account. If this account does not exist then this call has no effect.
- * <p>
- * This call returns immediately but runs asynchronously and the result is accessed via the
- * {@link AccountManagerFuture} that is returned. This future is also passed as the sole
- * parameter to the {@link AccountManagerCallback}. If the caller wished to use this
- * method asynchronously then they will generally pass in a callback object that will get
- * invoked with the {@link AccountManagerFuture}. If they wish to use it synchronously then
- * they will generally pass null for the callback and instead call
- * {@link android.accounts.AccountManagerFuture#getResult()} on this method's return value,
- * which will then block until the request completes.
- * <p>
- * Do not block the main thread waiting this method's result.
- * <p>
- * Not allowed from main thread (but allowed from other threads):
- * <pre>
- * Boolean result = removeAccount(account, callback, handler).getResult();
- * </pre>
- * Allowed from main thread:
- * <pre>
- * removeAccount(account, new AccountManagerCallback<Boolean>() {
- * public void run(AccountManagerFuture<Boolean> future) {
- * Boolean result = future.getResult();
- * // use result
- * }
- * }, handler);
- * </pre>
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ * Lists all accounts of a type which have certain features. The account
+ * type identifies the authenticator (see {@link #getAccountsByType}).
+ * Account features are authenticator-specific string tokens identifying
+ * boolean account properties (see {@link #hasFeatures}).
*
- * @param account The {@link Account} to remove
- * @param callback A callback to invoke when the request completes. If null then
- * no callback is invoked.
- * @param handler The {@link Handler} to use to invoke the callback. If null then the
- * main thread's {@link Handler} is used.
- * @return an {@link AccountManagerFuture} that represents the future result of the call.
- * The future result is a {@link Boolean} that is true if the account is successfully removed
- * or false if the authenticator refuses to remove the account.
- */
- public AccountManagerFuture<Boolean> removeAccount(final Account account,
- AccountManagerCallback<Boolean> callback, Handler handler) {
- return new Future2Task<Boolean>(handler, callback) {
- public void doWork() throws RemoteException {
- mService.removeAccount(mResponse, account);
- }
- public Boolean bundleToResult(Bundle bundle) throws AuthenticatorException {
- if (!bundle.containsKey(KEY_BOOLEAN_RESULT)) {
- throw new AuthenticatorException("no result in response");
- }
- return bundle.getBoolean(KEY_BOOLEAN_RESULT);
- }
- }.start();
- }
-
- /**
- * Removes the given authtoken. If this authtoken does not exist for the given account type
- * then this call has no effect.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
- * @param accountType the account type of the authtoken to invalidate
- * @param authToken the authtoken to invalidate
- */
- public void invalidateAuthToken(final String accountType, final String authToken) {
- try {
- mService.invalidateAuthToken(accountType, authToken);
- } catch (RemoteException e) {
- // won't ever happen
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Gets the authtoken named by "authTokenType" for the specified account if it is cached
- * by the AccountManager. If no authtoken is cached then null is returned rather than
- * asking the authenticaticor to generate one. If the account or the
- * authtoken do not exist then null is returned.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission
- * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS} and is running
- * with the same UID as the Authenticator for the account.
- * @param account the account whose authtoken is to be retrieved, must not be null
- * @param authTokenType the type of authtoken to retrieve
- * @return an authtoken for the given account and authTokenType, if one is cached by the
- * AccountManager, null otherwise.
- */
- public String peekAuthToken(final Account account, final String authTokenType) {
- if (account == null) {
- Log.e(TAG, "peekAuthToken: the account must not be null");
- return null;
- }
- if (authTokenType == null) {
- return null;
- }
- try {
- return mService.peekAuthToken(account, authTokenType);
- } catch (RemoteException e) {
- // won't ever happen
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Sets the password for the account. The password may be null. If the account does not exist
- * then this call has no affect.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission
- * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS} and is running
- * with the same UID as the Authenticator for the account.
- * @param account the account whose password is to be set. Must not be null.
- * @param password the password to set for the account. May be null.
- */
- public void setPassword(final Account account, final String password) {
- if (account == null) {
- Log.e(TAG, "the account must not be null");
- return;
- }
- try {
- mService.setPassword(account, password);
- } catch (RemoteException e) {
- // won't ever happen
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Sets the password for account to null. If the account does not exist then this call
- * has no effect.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
- * @param account the account whose password is to be cleared. Must not be null.
- */
- public void clearPassword(final Account account) {
- if (account == null) {
- Log.e(TAG, "the account must not be null");
- return;
- }
- try {
- mService.clearPassword(account);
- } catch (RemoteException e) {
- // won't ever happen
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Sets account's userdata named "key" to the specified value. If the account does not
- * exist then this call has no effect.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission
- * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS} and is running
- * with the same UID as the Authenticator for the account.
- * @param account the account whose userdata is to be set. Must not be null.
- * @param key the key of the userdata to set. Must not be null.
- * @param value the value to set. May be null.
- */
- public void setUserData(final Account account, final String key, final String value) {
- if (account == null) {
- Log.e(TAG, "the account must not be null");
- return;
- }
- if (key == null) {
- Log.e(TAG, "the key must not be null");
- return;
- }
- try {
- mService.setUserData(account, key, value);
- } catch (RemoteException e) {
- // won't ever happen
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Sets the authtoken named by "authTokenType" to the value specified by authToken.
- * If the account does not exist then this call has no effect.
- * <p>
- * It is safe to call this method from the main thread.
- * <p>
- * Requires that the caller has permission
- * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS} and is running
- * with the same UID as the Authenticator for the account.
- * @param account the account whose authtoken is to be set. Must not be null.
- * @param authTokenType the type of the authtoken to set. Must not be null.
- * @param authToken the authToken to set. May be null.
- */
- public void setAuthToken(Account account, final String authTokenType, final String authToken) {
- try {
- mService.setAuthToken(account, authTokenType, authToken);
- } catch (RemoteException e) {
- // won't ever happen
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Convenience method that makes a blocking call to
- * {@link #getAuthToken(Account, String, boolean, AccountManagerCallback, Handler)}
- * then extracts and returns the value of {@link #KEY_AUTHTOKEN} from its result.
- * <p>
- * It is not safe to call this method from the main thread. See {@link #getAuthToken}.
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#USE_CREDENTIALS}.
- * @param account the account whose authtoken is to be retrieved, must not be null
- * @param authTokenType the type of authtoken to retrieve
- * @param notifyAuthFailure if true, cause the AccountManager to put up a "sign-on" notification
- * for the account if no authtoken is cached by the AccountManager and the the authenticator
- * does not have valid credentials to get an authtoken.
- * @return an authtoken for the given account and authTokenType, if one is cached by the
- * AccountManager, null otherwise.
- * @throws AuthenticatorException if the authenticator is not present, unreachable or returns
- * an invalid response.
- * @throws OperationCanceledException if the request is canceled for any reason
- * @throws java.io.IOException if the authenticator experiences an IOException while attempting
- * to communicate with its backend server.
- */
- public String blockingGetAuthToken(Account account, String authTokenType,
- boolean notifyAuthFailure)
- throws OperationCanceledException, IOException, AuthenticatorException {
- Bundle bundle = getAuthToken(account, authTokenType, notifyAuthFailure, null /* callback */,
- null /* handler */).getResult();
- return bundle.getString(KEY_AUTHTOKEN);
- }
-
- /**
- * Request that an authtoken of the specified type be returned for an account.
- * If the Account Manager has a cached authtoken of the requested type then it will
- * service the request itself. Otherwise it will pass the request on to the authenticator.
- * The authenticator can try to service this request with information it already has stored
- * in the AccountManager but may need to launch an activity to prompt the
- * user to enter credentials. If it is able to retrieve the authtoken it will be returned
- * in the result.
- * <p>
- * If the authenticator needs to prompt the user for credentials it will return an intent to
- * an activity that will do the prompting. The supplied activity will be used to launch the
- * intent and the result will come from the launched activity.
- * <p>
- * This call returns immediately but runs asynchronously and the result is accessed via the
- * {@link AccountManagerFuture} that is returned. This future is also passed as the sole
- * parameter to the {@link AccountManagerCallback}. If the caller wished to use this
- * method asynchronously then they will generally pass in a callback object that will get
- * invoked with the {@link AccountManagerFuture}. If they wish to use it synchronously then
- * they will generally pass null for the callback and instead call
- * {@link android.accounts.AccountManagerFuture#getResult()} on this method's return value,
- * which will then block until the request completes.
- * <p>
- * Do not block the main thread waiting this method's result.
- * <p>
- * Not allowed from main thread (but allowed from other threads):
- * <pre>
- * Bundle result = getAuthToken(
- * account, authTokenType, options, activity, callback, handler).getResult();
- * </pre>
- * Allowed from main thread:
- * <pre>
- * getAuthToken(account, authTokenType, options, activity, new AccountManagerCallback<Bundle>() {
- * public void run(AccountManagerFuture<Bundle> future) {
- * Bundle result = future.getResult();
- * // use result
- * }
- * }, handler);
- * </pre>
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#USE_CREDENTIALS}.
+ * <p>Unlike {@link #getAccountsByType}, this method calls the authenticator,
+ * which may contact the server or do other work to check account features,
+ * so the method returns an {@link AccountManagerFuture}.
*
- * @param account The account whose credentials are to be updated.
- * @param authTokenType the auth token to retrieve as part of updating the credentials.
- * May be null.
- * @param options authenticator specific options for the request
- * @param activity If the authenticator returns a {@link #KEY_INTENT} in the result then
- * the intent will be started with this activity. If you do not with to have the intent
- * started automatically then use the other form,
- * {@link #getAuthToken(Account, String, boolean, AccountManagerCallback, android.os.Handler)}
- * @param callback A callback to invoke when the request completes. If null then
- * no callback is invoked.
- * @param handler The {@link Handler} to use to invoke the callback. If null then the
- * main thread's {@link Handler} is used.
- * @return an {@link AccountManagerFuture} that represents the future result of the call.
- * The future result is a {@link Bundle} that contains:
- * <ul>
- * <li> {@link #KEY_ACCOUNT_NAME}, {@link #KEY_ACCOUNT_TYPE} and {@link #KEY_AUTHTOKEN}
- * </ul>
- * If the user presses "back" then the request will be canceled.
- */
- public AccountManagerFuture<Bundle> getAuthToken(
- final Account account, final String authTokenType, final Bundle options,
- final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) {
- if (activity == null) throw new IllegalArgumentException("activity is null");
- if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null");
- return new AmsTask(activity, handler, callback) {
- public void doWork() throws RemoteException {
- mService.getAuthToken(mResponse, account, authTokenType,
- false /* notifyOnAuthFailure */, true /* expectActivityLaunch */,
- options);
- }
- }.start();
- }
-
- /**
- * Request that an authtoken of the specified type be returned for an account.
- * If the Account Manager has a cached authtoken of the requested type then it will
- * service the request itself. Otherwise it will pass the request on to the authenticator.
- * The authenticator can try to service this request with information it already has stored
- * in the AccountManager but may need to launch an activity to prompt the
- * user to enter credentials. If it is able to retrieve the authtoken it will be returned
- * in the result.
- * <p>
- * If the authenticator needs to prompt the user for credentials, rather than returning the
- * authtoken it will instead return an intent for
- * an activity that will do the prompting. If an intent is returned and notifyAuthFailure
- * is true then a notification will be created that launches this intent. This intent can be
- * invoked by the caller directly to start the activity that prompts the user for the
- * updated credentials. Otherwise this activity will not be run until the user activates
- * the notification.
- * <p>
- * This call returns immediately but runs asynchronously and the result is accessed via the
- * {@link AccountManagerFuture} that is returned. This future is also passed as the sole
- * parameter to the {@link AccountManagerCallback}. If the caller wished to use this
- * method asynchronously then they will generally pass in a callback object that will get
- * invoked with the {@link AccountManagerFuture}. If they wish to use it synchronously then
- * they will generally pass null for the callback and instead call
- * {@link android.accounts.AccountManagerFuture#getResult()} on this method's return value,
- * which will then block until the request completes.
- * <p>
- * Do not block the main thread waiting this method's result.
- * <p>
- * Not allowed from main thread (but allowed from other threads):
- * <pre>
- * Bundle result = getAuthToken(
- * account, authTokenType, notifyAuthFailure, callback, handler).getResult();
- * </pre>
- * Allowed from main thread:
- * <pre>
- * getAuthToken(account, authTokenType, notifyAuthFailure, new AccountManagerCallback<Bundle>() {
- * public void run(AccountManagerFuture<Bundle> future) {
- * Bundle result = future.getResult();
- * // use result
- * }
- * }, handler);
- * </pre>
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#USE_CREDENTIALS}.
+ * <p>This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
*
- * @param account The account whose credentials are to be updated.
- * @param authTokenType the auth token to retrieve as part of updating the credentials.
- * May be null.
- * @param notifyAuthFailure if true and the authenticator returns a {@link #KEY_INTENT} in the
- * result then a "sign-on needed" notification will be created that will launch this intent.
- * @param callback A callback to invoke when the request completes. If null then
- * no callback is invoked.
- * @param handler The {@link Handler} to use to invoke the callback. If null then the
- * main thread's {@link Handler} is used.
- * @return an {@link AccountManagerFuture} that represents the future result of the call.
- * The future result is a {@link Bundle} that contains either:
- * <ul>
- * <li> {@link #KEY_INTENT}, which is to be used to prompt the user for the credentials
- * <li> {@link #KEY_ACCOUNT_NAME}, {@link #KEY_ACCOUNT_TYPE} and {@link #KEY_AUTHTOKEN}
- * if the authenticator is able to retrieve the auth token
- * </ul>
- * If the user presses "back" then the request will be canceled.
- */
- public AccountManagerFuture<Bundle> getAuthToken(
- final Account account, final String authTokenType, final boolean notifyAuthFailure,
- AccountManagerCallback<Bundle> callback, Handler handler) {
- if (account == null) throw new IllegalArgumentException("account is null");
- if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null");
- return new AmsTask(null, handler, callback) {
- public void doWork() throws RemoteException {
- mService.getAuthToken(mResponse, account, authTokenType,
- notifyAuthFailure, false /* expectActivityLaunch */, null /* options */);
- }
- }.start();
- }
-
- /**
- * Request that an account be added with the given accountType. This request
- * is processed by the authenticator for the account type. If no authenticator is registered
- * in the system then {@link AuthenticatorException} is thrown.
- * <p>
- * This call returns immediately but runs asynchronously and the result is accessed via the
- * {@link AccountManagerFuture} that is returned. This future is also passed as the sole
- * parameter to the {@link AccountManagerCallback}. If the caller wished to use this
- * method asynchronously then they will generally pass in a callback object that will get
- * invoked with the {@link AccountManagerFuture}. If they wish to use it synchronously then
- * they will generally pass null for the callback and instead call
- * {@link android.accounts.AccountManagerFuture#getResult()} on this method's return value,
- * which will then block until the request completes.
- * <p>
- * Do not block the main thread waiting this method's result.
- * <p>
- * Not allowed from main thread (but allowed from other threads):
- * <pre>
- * Bundle result = addAccount(
- * account, authTokenType, features, options, activity, callback, handler).getResult();
- * </pre>
- * Allowed from main thread:
- * <pre>
- * addAccount(account, authTokenType, features, options, activity, new AccountManagerCallback<Bundle>() {
- * public void run(AccountManagerFuture<Bundle> future) {
- * Bundle result = future.getResult();
- * // use result
- * }
- * }, handler);
- * </pre>
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#GET_ACCOUNTS}.
*
- * @param accountType The type of account to add. This must not be null.
- * @param authTokenType The account that is added should be able to service this auth token
- * type. This may be null.
- * @param requiredFeatures The account that is added should support these features.
- * This array may be null or empty.
- * @param addAccountOptions A bundle of authenticator-specific options that is passed on
- * to the authenticator. This may be null.
- * @param activity If the authenticator returns a {@link #KEY_INTENT} in the result then
- * the intent will be started with this activity. If activity is null then the result will
- * be returned as-is.
- * @param callback A callback to invoke when the request completes. If null then
- * no callback is invoked.
- * @param handler The {@link Handler} to use to invoke the callback. If null then the
- * main thread's {@link Handler} is used.
- * @return an {@link AccountManagerFuture} that represents the future result of the call.
- * The future result is a {@link Bundle} that contains either:
- * <ul>
- * <li> {@link #KEY_INTENT}, or
- * <li> {@link #KEY_ACCOUNT_NAME}, {@link #KEY_ACCOUNT_TYPE}
- * </ul>
- */
- public AccountManagerFuture<Bundle> addAccount(final String accountType,
- final String authTokenType, final String[] requiredFeatures,
- final Bundle addAccountOptions,
- final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) {
- return new AmsTask(activity, handler, callback) {
- public void doWork() throws RemoteException {
- if (accountType == null) {
- Log.e(TAG, "the account must not be null");
- // to unblock caller waiting on Future.get()
- set(new Bundle());
- return;
- }
- mService.addAcount(mResponse, accountType, authTokenType,
- requiredFeatures, activity != null, addAccountOptions);
- }
- }.start();
- }
-
- /**
- * Queries for accounts that match the given account type and feature set.
- * <p>
- * This call returns immediately but runs asynchronously and the result is accessed via the
- * {@link AccountManagerFuture} that is returned. This future is also passed as the sole
- * parameter to the {@link AccountManagerCallback}. If the caller wished to use this
- * method asynchronously then they will generally pass in a callback object that will get
- * invoked with the {@link AccountManagerFuture}. If they wish to use it synchronously then
- * they will generally pass null for the callback and instead call
- * {@link android.accounts.AccountManagerFuture#getResult()} on this method's return value,
- * which will then block until the request completes.
- * <p>
- * Do not block the main thread waiting this method's result.
- * <p>
- * Not allowed from main thread (but allowed from other threads):
- * <pre>
- * Account[] result =
- * getAccountsByTypeAndFeatures(accountType, features, callback, handler).getResult();
- * </pre>
- * Allowed from main thread:
- * <pre>
- * getAccountsByTypeAndFeatures(accountType, features, new AccountManagerCallback<Account[]>() {
- * public void run(AccountManagerFuture<Account[]> future) {
- * Account[] result = future.getResult();
- * // use result
- * }
- * }, handler);
- * </pre>
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#GET_ACCOUNTS}.
- *
- * @param type The type of {@link Account} to return. If null is passed in then an empty
- * array will be returned.
- * @param features the features with which to filter the accounts list. Each returned account
- * will have all specified features. This may be null, which will mean the account list will
- * not be filtered by features, making this functionally identical to
- * {@link #getAccountsByType(String)}.
- * @param callback A callback to invoke when the request completes. If null then
- * no callback is invoked.
- * @param handler The {@link Handler} to use to invoke the callback. If null then the
- * main thread's {@link Handler} is used.
- * @return an {@link AccountManagerFuture} that represents the future result of the call.
- * The future result is a an {@link Account} array that contains accounts of the specified
- * type that match all the requested features.
+ * @param type The type of accounts to return, must not be null
+ * @param features An array of the account features to require,
+ * may be null or empty
+ * @param callback Callback to invoke when the request completes,
+ * null for no callback
+ * @param handler {@link Handler} identifying the callback thread,
+ * null for the main thread
+ * @return An {@link AccountManagerFuture} which resolves to an array of
+ * {@link Account}, one per account of the specified type which
+ * matches the requested features.
*/
public AccountManagerFuture<Account[]> getAccountsByTypeAndFeatures(
final String type, final String[] features,
@@ -849,57 +446,535 @@
}
/**
- * Requests that the authenticator checks that the user knows the credentials for the account.
- * This is typically done by returning an intent to an activity that prompts the user to
- * enter the credentials. This request
- * is processed by the authenticator for the account. If no matching authenticator is
- * registered in the system then {@link AuthenticatorException} is thrown.
- * <p>
- * This call returns immediately but runs asynchronously and the result is accessed via the
- * {@link AccountManagerFuture} that is returned. This future is also passed as the sole
- * parameter to the {@link AccountManagerCallback}. If the caller wished to use this
- * method asynchronously then they will generally pass in a callback object that will get
- * invoked with the {@link AccountManagerFuture}. If they wish to use it synchronously then
- * they will generally pass null for the callback and instead call
- * {@link android.accounts.AccountManagerFuture#getResult()} on this method's return value,
- * which will then block until the request completes.
- * <p>
- * Do not block the main thread waiting this method's result.
- * <p>
- * Not allowed from main thread (but allowed from other threads):
- * <pre>
- * Bundle result = confirmCredentials(
- * account, options, activity, callback, handler).getResult();
- * </pre>
- * Allowed from main thread:
- * <pre>
- * confirmCredentials(account, options, activity, new AccountManagerCallback<Bundle>() {
- * public void run(AccountManagerFuture<Bundle> future) {
- * Bundle result = future.getResult();
- * // use result
- * }
- * }, handler);
- * </pre>
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ * Adds an account directly to the AccountManager. Normally used by sign-up
+ * wizards associated with authenticators, not directly by applications.
*
- * @param account The account whose credentials are to be checked
- * @param options authenticator specific options for the request
- * @param activity If the authenticator returns a {@link #KEY_INTENT} in the result then
- * the intent will be started with this activity. If activity is null then the result will
- * be returned as-is.
- * @param callback A callback to invoke when the request completes. If null then
- * no callback is invoked.
- * @param handler The {@link Handler} to use to invoke the callback. If null then the
- * main thread's {@link Handler} is used.
- * @return an {@link AccountManagerFuture} that represents the future result of the call.
- * The future result is a {@link Bundle} that contains either:
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS}
+ * and to have the same UID as the added account's authenticator.
+ *
+ * @param account The {@link Account} to add
+ * @param password The password to associate with the account, null for none
+ * @param userdata String values to use for the account's userdata, null for none
+ * @return Whether the account was successfully added. False if the account
+ * already exists, the account is null, or another error occurs.
+ */
+ public boolean addAccountExplicitly(Account account, String password, Bundle userdata) {
+ try {
+ return mService.addAccount(account, password, userdata);
+ } catch (RemoteException e) {
+ // won't ever happen
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Removes an account from the AccountManager. Does nothing if the account
+ * does not exist. Does not delete the account from the server.
+ * The authenticator may have its own policies preventing account
+ * deletion, in which case the account will not be deleted.
+ *
+ * <p>This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ *
+ * @param account The {@link Account} to remove
+ * @param callback Callback to invoke when the request completes,
+ * null for no callback
+ * @param handler {@link Handler} identifying the callback thread,
+ * null for the main thread
+ * @return An {@link AccountManagerFuture} which resolves to a Boolean,
+ * true if the account has been successfully removed,
+ * false if the authenticator forbids deleting this account.
+ */
+ public AccountManagerFuture<Boolean> removeAccount(final Account account,
+ AccountManagerCallback<Boolean> callback, Handler handler) {
+ return new Future2Task<Boolean>(handler, callback) {
+ public void doWork() throws RemoteException {
+ mService.removeAccount(mResponse, account);
+ }
+ public Boolean bundleToResult(Bundle bundle) throws AuthenticatorException {
+ if (!bundle.containsKey(KEY_BOOLEAN_RESULT)) {
+ throw new AuthenticatorException("no result in response");
+ }
+ return bundle.getBoolean(KEY_BOOLEAN_RESULT);
+ }
+ }.start();
+ }
+
+ /**
+ * Removes an auth token from the AccountManager's cache. Does nothing if
+ * the auth token is not currently in the cache. Applications must call this
+ * method when the auth token is found to have expired or otherwise become
+ * invalid for authenticating requests. The AccountManager does not validate
+ * or expire cached auth tokens otherwise.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#MANAGE_ACCOUNTS} or
+ * {@link android.Manifest.permission#USE_CREDENTIALS}
+ *
+ * @param accountType The account type of the auth token to invalidate
+ * @param authToken The auth token to invalidate
+ */
+ public void invalidateAuthToken(final String accountType, final String authToken) {
+ try {
+ mService.invalidateAuthToken(accountType, authToken);
+ } catch (RemoteException e) {
+ // won't ever happen
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Gets an auth token from the AccountManager's cache. If no auth
+ * token is cached for this account, null will be returned -- a new
+ * auth token will not be generated, and the server will not be contacted.
+ * Intended for use by the authenticator, not directly by applications.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS}
+ * and to have the same UID as the account's authenticator.
+ *
+ * @param account The account to fetch an auth token for
+ * @param authTokenType The type of auth token to fetch, see {#getAuthToken}
+ * @return The cached auth token for this account and type, or null if
+ * no auth token is cached or the account does not exist.
+ */
+ public String peekAuthToken(final Account account, final String authTokenType) {
+ if (account == null) {
+ Log.e(TAG, "peekAuthToken: the account must not be null");
+ return null;
+ }
+ if (authTokenType == null) {
+ return null;
+ }
+ try {
+ return mService.peekAuthToken(account, authTokenType);
+ } catch (RemoteException e) {
+ // won't ever happen
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Sets or forgets a saved password. This modifies the local copy of the
+ * password used to automatically authenticate the user; it does
+ * not change the user's account password on the server. Intended for use
+ * by the authenticator, not directly by applications.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS}
+ * and have the same UID as the account's authenticator.
+ *
+ * @param account The account to set a password for
+ * @param password The password to set, null to clear the password
+ */
+ public void setPassword(final Account account, final String password) {
+ if (account == null) {
+ Log.e(TAG, "the account must not be null");
+ return;
+ }
+ try {
+ mService.setPassword(account, password);
+ } catch (RemoteException e) {
+ // won't ever happen
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Forgets a saved password. This erases the local copy of the password;
+ * it does not change the user's account password on the server.
+ * Has the same effect as setPassword(account, null) but requires fewer
+ * permissions, and may be used by applications or management interfaces
+ * to "sign out" from an account.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#MANAGE_ACCOUNTS}
+ *
+ * @param account The account whose password to clear
+ */
+ public void clearPassword(final Account account) {
+ if (account == null) {
+ Log.e(TAG, "the account must not be null");
+ return;
+ }
+ try {
+ mService.clearPassword(account);
+ } catch (RemoteException e) {
+ // won't ever happen
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Sets one userdata key for an account. Intended by use for the
+ * authenticator to stash state for itself, not directly by applications.
+ * The meaning of the keys and values is up to the authenticator.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS}
+ * and to have the same UID as the account's authenticator.
+ *
+ * @param account The account to set the userdata for
+ * @param key The userdata key to set. Must not be null
+ * @param value The value to set, null to clear this userdata key
+ */
+ public void setUserData(final Account account, final String key, final String value) {
+ if (account == null) {
+ Log.e(TAG, "the account must not be null");
+ return;
+ }
+ if (key == null) {
+ Log.e(TAG, "the key must not be null");
+ return;
+ }
+ try {
+ mService.setUserData(account, key, value);
+ } catch (RemoteException e) {
+ // won't ever happen
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Adds an auth token to the AccountManager cache for an account.
+ * If the account does not exist then this call has no effect.
+ * Replaces any previous auth token for this account and auth token type.
+ * Intended for use by the authenticator, not directly by applications.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#AUTHENTICATE_ACCOUNTS}
+ * and to have the same UID as the account's authenticator.
+ *
+ * @param account The account to set an auth token for
+ * @param authTokenType The type of the auth token, see {#getAuthToken}
+ * @param authToken The auth token to add to the cache
+ */
+ public void setAuthToken(Account account, final String authTokenType, final String authToken) {
+ try {
+ mService.setAuthToken(account, authTokenType, authToken);
+ } catch (RemoteException e) {
+ // won't ever happen
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * This convenience helper synchronously gets an auth token with
+ * {@link #getAuthToken(Account, String, boolean, AccountManagerCallback, Handler)}.
+ *
+ * <p>This method may block while a network request completes, and must
+ * never be made from the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#USE_CREDENTIALS}.
+ *
+ * @param account The account to fetch an auth token for
+ * @param authTokenType The auth token type, see {#link getAuthToken}
+ * @param notifyAuthFailure If true, display a notification and return null
+ * if authentication fails; if false, prompt and wait for the user to
+ * re-enter correct credentials before returning
+ * @return An auth token of the specified type for this account, or null
+ * if authentication fails or none can be fetched.
+ * @throws AuthenticatorException if the authenticator failed to respond
+ * @throws OperationCanceledException if the request was canceled for any
+ * reason, including the user canceling a credential request
+ * @throws java.io.IOException if the authenticator experienced an I/O problem
+ * creating a new auth token, usually because of network trouble
+ */
+ public String blockingGetAuthToken(Account account, String authTokenType,
+ boolean notifyAuthFailure)
+ throws OperationCanceledException, IOException, AuthenticatorException {
+ Bundle bundle = getAuthToken(account, authTokenType, notifyAuthFailure, null /* callback */,
+ null /* handler */).getResult();
+ return bundle.getString(KEY_AUTHTOKEN);
+ }
+
+ /**
+ * Gets an auth token of the specified type for a particular account,
+ * prompting the user for credentials if necessary. This method is
+ * intended for applications running in the foreground where it makes
+ * sense to ask the user directly for a password.
+ *
+ * <p>If a previously generated auth token is cached for this account and
+ * type, then it will be returned. Otherwise, if we have a saved password
+ * the server accepts, it will be used to generate a new auth token.
+ * Otherwise, the user will be asked for a password, which will be sent to
+ * the server to generate a new auth token.
+ *
+ * <p>The value of the auth token type depends on the authenticator.
+ * Some services use different tokens to access different functionality --
+ * for example, Google uses different auth tokens to access Gmail and
+ * Google Calendar for the same account.
+ *
+ * <p>This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#USE_CREDENTIALS}.
+ *
+ * @param account The account to fetch an auth token for
+ * @param authTokenType The auth token type, an authenticator-dependent
+ * string token, must not be null
+ * @param options Authenticator-specific options for the request,
+ * may be null or empty
+ * @param activity The {@link Activity} context to use for launching a new
+ * authenticator-defined sub-Activity to prompt the user for a password
+ * if necessary; used only to call startActivity(); must not be null.
+ * @param callback Callback to invoke when the request completes,
+ * null for no callback
+ * @param handler {@link Handler} identifying the callback thread,
+ * null for the main thread
+ * @return An {@link AccountManagerFuture} which resolves to a Bundle with
+ * at least the following fields:
* <ul>
- * <li> {@link #KEY_INTENT}, which is to be used to prompt the user for the credentials
- * <li> {@link #KEY_ACCOUNT_NAME} and {@link #KEY_ACCOUNT_TYPE} if the user enters the correct
- * credentials
+ * <li> {@link #KEY_ACCOUNT_NAME} - the name of the account you supplied
+ * <li> {@link #KEY_ACCOUNT_TYPE} - the type of the account
+ * <li> {@link #KEY_AUTHTOKEN} - the auth token you wanted
* </ul>
- * If the user presses "back" then the request will be canceled.
+ *
+ * (Other authenticator-specific values may be returned.) If an auth token
+ * could not be fetched, {@link AccountManagerFuture#getResult()} throws:
+ * <ul>
+ * <li> {@link AuthenticatorException} if the authenticator failed to respond
+ * <li> {@link OperationCanceledException} if the operation is canceled for
+ * any reason, incluidng the user canceling a credential request
+ * <li> {@link IOException} if the authenticator experienced an I/O problem
+ * creating a new auth token, usually because of network trouble
+ * </ul>
+ */
+ public AccountManagerFuture<Bundle> getAuthToken(
+ final Account account, final String authTokenType, final Bundle options,
+ final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) {
+ if (activity == null) throw new IllegalArgumentException("activity is null");
+ if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null");
+ return new AmsTask(activity, handler, callback) {
+ public void doWork() throws RemoteException {
+ mService.getAuthToken(mResponse, account, authTokenType,
+ false /* notifyOnAuthFailure */, true /* expectActivityLaunch */,
+ options);
+ }
+ }.start();
+ }
+
+ /**
+ * Gets an auth token of the specified type for a particular account,
+ * optionally raising a notification if the user must enter credentials.
+ * This method is intended for background tasks and services where the
+ * user should not be immediately interrupted with a password prompt.
+ *
+ * <p>If a previously generated auth token is cached for this account and
+ * type, then it will be returned. Otherwise, if we have saved credentials
+ * the server accepts, it will be used to generate a new auth token.
+ * Otherwise, an Intent will be returned which, when started, will prompt
+ * the user for a password. If the notifyAuthFailure parameter is set,
+ * the same Intent will be associated with a status bar notification,
+ * alerting the user that they need to enter a password at some point.
+ *
+ * <p>If the intent is left in a notification, you will need to wait until
+ * the user gets around to entering a password before trying again,
+ * which could be hours or days or never. When it does happen, the
+ * account manager will broadcast the {@link #LOGIN_ACCOUNTS_CHANGED_ACTION}
+ * {@link Intent}, which applications can use to trigger another attempt
+ * to fetch an auth token.
+ *
+ * <p>If notifications are not enabled, it is the application's
+ * responsibility to launch the returned intent at some point to let
+ * the user enter credentials. In either case, the result from this
+ * call will not wait for user action.
+ *
+ * <p>The value of the auth token type depends on the authenticator.
+ * Some services use different tokens to access different functionality --
+ * for example, Google uses different auth tokens to access Gmail and
+ * Google Calendar for the same account.
+ *
+ * <p>This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#USE_CREDENTIALS}.
+ *
+ * @param account The account to fetch an auth token for
+ * @param authTokenType The auth token type, an authenticator-dependent
+ * string token, must not be null
+ * @param notifyAuthFailure True to add a notification to prompt the
+ * user for a password if necessary, false to leave that to the caller
+ * @param callback Callback to invoke when the request completes,
+ * null for no callback
+ * @param handler {@link Handler} identifying the callback thread,
+ * null for the main thread
+ * @return An {@link AccountManagerFuture} which resolves to a Bundle with
+ * at least the following fields on success:
+ * <ul>
+ * <li> {@link #KEY_ACCOUNT_NAME} - the name of the account you supplied
+ * <li> {@link #KEY_ACCOUNT_TYPE} - the type of the account
+ * <li> {@link #KEY_AUTHTOKEN} - the auth token you wanted
+ * </ul>
+ *
+ * (Other authenticator-specific values may be returned.) If the user
+ * must enter credentials, the returned Bundle contains only
+ * {@link #KEY_INTENT} with the {@link Intent} needed to launch a prompt.
+ *
+ * <p>If an error occurred, {@link AccountManagerFuture#getResult()} throws:
+ * <ul>
+ * <li> {@link AuthenticatorException} if the authenticator failed to respond
+ * <li> {@link OperationCanceledException} if the operation is canceled for
+ * any reason, incluidng the user canceling a credential request
+ * <li> {@link IOException} if the authenticator experienced an I/O problem
+ * creating a new auth token, usually because of network trouble
+ * </ul>
+ */
+ public AccountManagerFuture<Bundle> getAuthToken(
+ final Account account, final String authTokenType, final boolean notifyAuthFailure,
+ AccountManagerCallback<Bundle> callback, Handler handler) {
+ if (account == null) throw new IllegalArgumentException("account is null");
+ if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null");
+ return new AmsTask(null, handler, callback) {
+ public void doWork() throws RemoteException {
+ mService.getAuthToken(mResponse, account, authTokenType,
+ notifyAuthFailure, false /* expectActivityLaunch */, null /* options */);
+ }
+ }.start();
+ }
+
+ /**
+ * Asks the user to add an account of a specified type. The authenticator
+ * for this account type processes this request with the appropriate user
+ * interface. If the user does elect to create a new account, the account
+ * name is returned.
+ *
+ * <p>This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ *
+ * @param accountType The type of account to add; must not be null
+ * @param authTokenType The type of auth token (see {@link #getAuthToken})
+ * this account will need to be able to generate, null for none
+ * @param requiredFeatures The features (see {@link #hasFeatures}) this
+ * account must have, null for none
+ * @param addAccountOptions Authenticator-specific options for the request,
+ * may be null or empty
+ * @param activity The {@link Activity} context to use for launching a new
+ * authenticator-defined sub-Activity to prompt the user to create an
+ * account; used only to call startActivity(); if null, the prompt
+ * will not be launched directly, but the necessary {@link Intent}
+ * will be returned to the caller instead
+ * @param callback Callback to invoke when the request completes,
+ * null for no callback
+ * @param handler {@link Handler} identifying the callback thread,
+ * null for the main thread
+ * @return An {@link AccountManagerFuture} which resolves to a Bundle with
+ * these fields if activity was specified and an account was created:
+ * <ul>
+ * <li> {@link #KEY_ACCOUNT_NAME} - the name of the account created
+ * <li> {@link #KEY_ACCOUNT_TYPE} - the type of the account
+ * </ul>
+ *
+ * If no activity was specified, the returned Bundle contains only
+ * {@link #KEY_INTENT} with the {@link Intent} needed to launch the
+ * actual account creation process.
+ *
+ * <p>If an error occurred, {@link AccountManagerFuture#getResult()} throws:
+ * <ul>
+ * <li> {@link AuthenticatorException} if no authenticator was registered for
+ * this account type or the authenticator failed to respond
+ * <li> {@link OperationCanceledException} if the operation was canceled for
+ * any reason, including the user canceling the creation process
+ * <li> {@link IOException} if the authenticator experienced an I/O problem
+ * creating a new account, usually because of network trouble
+ * </ul>
+ */
+ public AccountManagerFuture<Bundle> addAccount(final String accountType,
+ final String authTokenType, final String[] requiredFeatures,
+ final Bundle addAccountOptions,
+ final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) {
+ return new AmsTask(activity, handler, callback) {
+ public void doWork() throws RemoteException {
+ if (accountType == null) {
+ Log.e(TAG, "the account must not be null");
+ // to unblock caller waiting on Future.get()
+ set(new Bundle());
+ return;
+ }
+ mService.addAcount(mResponse, accountType, authTokenType,
+ requiredFeatures, activity != null, addAccountOptions);
+ }
+ }.start();
+ }
+
+ /**
+ * Confirms that the user knows the password for an account to make extra
+ * sure they are the owner of the account. The user-entered password can
+ * be supplied directly, otherwise the authenticator for this account type
+ * prompts the user with the appropriate interface. This method is
+ * intended for applications which want extra assurance; for example, the
+ * phone lock screen uses this to let the user unlock the phone with an
+ * account password if they forget the lock pattern.
+ *
+ * <p>If the user-entered password matches a saved password for this
+ * account, the request is considered valid; otherwise the authenticator
+ * verifies the password (usually by contacting the server).
+ *
+ * <p>This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ *
+ * @param account The account to confirm password knowledge for
+ * @param options Authenticator-specific options for the request;
+ * if the {@link #KEY_PASSWORD} string field is present, the
+ * authenticator may use it directly rather than prompting the user;
+ * may be null or empty
+ * @param activity The {@link Activity} context to use for launching a new
+ * authenticator-defined sub-Activity to prompt the user to enter a
+ * password; used only to call startActivity(); if null, the prompt
+ * will not be launched directly, but the necessary {@link Intent}
+ * will be returned to the caller instead
+ * @param callback Callback to invoke when the request completes,
+ * null for no callback
+ * @param handler {@link Handler} identifying the callback thread,
+ * null for the main thread
+ * @return An {@link AccountManagerFuture} which resolves to a Bundle
+ * with these fields if activity or password was supplied and
+ * the account was successfully verified:
+ * <ul>
+ * <li> {@link #KEY_ACCOUNT_NAME} - the name of the account created
+ * <li> {@link #KEY_ACCOUNT_TYPE} - the type of the account
+ * <li> {@link #KEY_BOOLEAN_RESULT} - true to indicate success
+ * </ul>
+ *
+ * If no activity or password was specified, the returned Bundle contains
+ * only {@link #KEY_INTENT} with the {@link Intent} needed to launch the
+ * password prompt.
+ *
+ * <p>If an error occurred, {@link AccountManagerFuture#getResult()} throws:
+ * <ul>
+ * <li> {@link AuthenticatorException} if the authenticator failed to respond
+ * <li> {@link OperationCanceledException} if the operation was canceled for
+ * any reason, including the user canceling the password prompt
+ * <li> {@link IOException} if the authenticator experienced an I/O problem
+ * verifying the password, usually because of network trouble
+ * </ul>
*/
public AccountManagerFuture<Bundle> confirmCredentials(final Account account,
final Bundle options,
@@ -914,59 +989,52 @@
}
/**
- * Requests that the authenticator update the the credentials for a user. This is typically
- * done by returning an intent to an activity that will prompt the user to update the stored
- * credentials for the account. This request
- * is processed by the authenticator for the account. If no matching authenticator is
- * registered in the system then {@link AuthenticatorException} is thrown.
- * <p>
- * This call returns immediately but runs asynchronously and the result is accessed via the
- * {@link AccountManagerFuture} that is returned. This future is also passed as the sole
- * parameter to the {@link AccountManagerCallback}. If the caller wished to use this
- * method asynchronously then they will generally pass in a callback object that will get
- * invoked with the {@link AccountManagerFuture}. If they wish to use it synchronously then
- * they will generally pass null for the callback and instead call
- * {@link android.accounts.AccountManagerFuture#getResult()} on this method's return value,
- * which will then block until the request completes.
- * <p>
- * Do not block the main thread waiting this method's result.
- * <p>
- * Not allowed from main thread (but allowed from other threads):
- * <pre>
- * Bundle result = updateCredentials(
- * account, authTokenType, options, activity, callback, handler).getResult();
- * </pre>
- * Allowed from main thread:
- * <pre>
- * updateCredentials(account, authTokenType, options, activity, new AccountManagerCallback<Bundle>() {
- * public void run(AccountManagerFuture<Bundle> future) {
- * Bundle result = future.getResult();
- * // use result
- * }
- * }, handler);
- * </pre>
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ * Asks the user to enter a new password for an account, updating the
+ * saved credentials for the account. Normally this happens automatically
+ * when the server rejects credentials during an auth token fetch, but this
+ * can be invoked directly to ensure we have the correct credentials stored.
*
- * @param account The account whose credentials are to be updated.
- * @param authTokenType the auth token to retrieve as part of updating the credentials.
- * May be null.
- * @param options authenticator specific options for the request
- * @param activity If the authenticator returns a {@link #KEY_INTENT} in the result then
- * the intent will be started with this activity. If activity is null then the result will
- * be returned as-is.
- * @param callback A callback to invoke when the request completes. If null then
- * no callback is invoked.
- * @param handler The {@link Handler} to use to invoke the callback. If null then the
- * main thread's {@link Handler} is used.
- * @return an {@link AccountManagerFuture} that represents the future result of the call.
- * The future result is a {@link Bundle} that contains either:
+ * <p>This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ *
+ * @param account The account to update credentials for
+ * @param authTokenType The credentials entered must allow an auth token
+ * of this type to be created (but no actual auth token is returned);
+ * may be null
+ * @param options Authenticator-specific options for the request;
+ * may be null or empty
+ * @param activity The {@link Activity} context to use for launching a new
+ * authenticator-defined sub-Activity to prompt the user to enter a
+ * password; used only to call startActivity(); if null, the prompt
+ * will not be launched directly, but the necessary {@link Intent}
+ * will be returned to the caller instead
+ * @param callback Callback to invoke when the request completes,
+ * null for no callback
+ * @param handler {@link Handler} identifying the callback thread,
+ * null for the main thread
+ * @return An {@link AccountManagerFuture} which resolves to a Bundle
+ * with these fields if an activity was supplied and the account
+ * credentials were successfully updated:
* <ul>
- * <li> {@link #KEY_INTENT}, which is to be used to prompt the user for the credentials
- * <li> {@link #KEY_ACCOUNT_NAME} and {@link #KEY_ACCOUNT_TYPE} if the user enters the correct
- * credentials.
+ * <li> {@link #KEY_ACCOUNT_NAME} - the name of the account created
+ * <li> {@link #KEY_ACCOUNT_TYPE} - the type of the account
* </ul>
- * If the user presses "back" then the request will be canceled.
+ *
+ * If no activity was specified, the returned Bundle contains only
+ * {@link #KEY_INTENT} with the {@link Intent} needed to launch the
+ * password prompt.
+ *
+ * <p>If an error occurred, {@link AccountManagerFuture#getResult()} throws:
+ * <ul>
+ * <li> {@link AuthenticatorException} if the authenticator failed to respond
+ * <li> {@link OperationCanceledException} if the operation was canceled for
+ * any reason, including the user canceling the password prompt
+ * <li> {@link IOException} if the authenticator experienced an I/O problem
+ * verifying the password, usually because of network trouble
+ * </ul>
*/
public AccountManagerFuture<Bundle> updateCredentials(final Account account,
final String authTokenType,
@@ -982,53 +1050,41 @@
}
/**
- * Request that the properties for an authenticator be updated. This is typically done by
- * returning an intent to an activity that will allow the user to make changes. This request
- * is processed by the authenticator for the account. If no matching authenticator is
- * registered in the system then {@link AuthenticatorException} is thrown.
- * <p>
- * This call returns immediately but runs asynchronously and the result is accessed via the
- * {@link AccountManagerFuture} that is returned. This future is also passed as the sole
- * parameter to the {@link AccountManagerCallback}. If the caller wished to use this
- * method asynchronously then they will generally pass in a callback object that will get
- * invoked with the {@link AccountManagerFuture}. If they wish to use it synchronously then
- * they will generally pass null for the callback and instead call
- * {@link android.accounts.AccountManagerFuture#getResult()} on this method's return value,
- * which will then block until the request completes.
- * <p>
- * Do not block the main thread waiting this method's result.
- * <p>
- * Not allowed from main thread (but allowed from other threads):
- * <pre>
- * Bundle result = editProperties(accountType, activity, callback, handler).getResult();
- * </pre>
- * Allowed from main thread:
- * <pre>
- * editProperties(accountType, activity, new AccountManagerCallback<Bundle>() {
- * public void run(AccountManagerFuture<Bundle> future) {
- * Bundle result = future.getResult();
- * // use result
- * }
- * }, handler);
- * </pre>
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ * Offers the user an opportunity to change an authenticator's settings.
+ * These properties are for the authenticator in general, not a particular
+ * account. Not all authenticators support this method.
*
- * @param accountType The account type of the authenticator whose properties are to be edited.
- * @param activity If the authenticator returns a {@link #KEY_INTENT} in the result then
- * the intent will be started with this activity. If activity is null then the result will
- * be returned as-is.
- * @param callback A callback to invoke when the request completes. If null then
- * no callback is invoked.
- * @param handler The {@link Handler} to use to invoke the callback. If null then the
- * main thread's {@link Handler} is used.
- * @return an {@link AccountManagerFuture} that represents the future result of the call.
- * The future result is a {@link Bundle} that contains either:
+ * <p>This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ *
+ * @param accountType The account type associated with the authenticator
+ * to adjust
+ * @param activity The {@link Activity} context to use for launching a new
+ * authenticator-defined sub-Activity to adjust authenticator settings;
+ * used only to call startActivity(); if null, the settings dialog will
+ * not be launched directly, but the necessary {@link Intent} will be
+ * returned to the caller instead
+ * @param callback Callback to invoke when the request completes,
+ * null for no callback
+ * @param handler {@link Handler} identifying the callback thread,
+ * null for the main thread
+ * @return An {@link AccountManagerFuture} which resolves to a Bundle
+ * which is empty if properties were edited successfully, or
+ * if no activity was specified, contains only {@link #KEY_INTENT}
+ * needed to launch the authenticator's settings dialog.
+ *
+ * <p>If an error occurred, {@link AccountManagerFuture#getResult()} throws:
* <ul>
- * <li> {@link #KEY_INTENT}, which is to be used to prompt the user for the credentials
- * <li> nothing, returned if the edit completes successfully
+ * <li> {@link AuthenticatorException} if no authenticator was registered for
+ * this account type or the authenticator failed to respond
+ * <li> {@link OperationCanceledException} if the operation was canceled for
+ * any reason, including the user canceling the settings dialog
+ * <li> {@link IOException} if the authenticator experienced an I/O problem
+ * updating settings, usually because of network trouble
* </ul>
- * If the user presses "back" then the request will be canceled.
*/
public AccountManagerFuture<Bundle> editProperties(final String accountType,
final Activity activity, final AccountManagerCallback<Bundle> callback,
@@ -1475,57 +1531,68 @@
}
/**
- * Convenience method that combines the functionality of {@link #getAccountsByTypeAndFeatures},
- * {@link #getAuthToken(Account, String, Bundle, Activity, AccountManagerCallback, Handler)},
- * and {@link #addAccount}. It first gets the list of accounts that match accountType and the
- * feature set. If there are none then {@link #addAccount} is invoked with the authTokenType
- * feature set, and addAccountOptions. If there is exactly one then
- * {@link #getAuthToken(Account, String, Bundle, Activity, AccountManagerCallback, Handler)} is
- * called with that account. If there are more than one then a chooser activity is launched
- * to prompt the user to select one of them and then the authtoken is retrieved for it,
- * <p>
- * This call returns immediately but runs asynchronously and the result is accessed via the
- * {@link AccountManagerFuture} that is returned. This future is also passed as the sole
- * parameter to the {@link AccountManagerCallback}. If the caller wished to use this
- * method asynchronously then they will generally pass in a callback object that will get
- * invoked with the {@link AccountManagerFuture}. If they wish to use it synchronously then
- * they will generally pass null for the callback and instead call
- * {@link android.accounts.AccountManagerFuture#getResult()} on this method's return value,
- * which will then block until the request completes.
- * <p>
- * Requires that the caller has permission {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ * This convenience helper combines the functionality of
+ * {@link #getAccountsByTypeAndFeatures}, {@link #getAuthToken}, and
+ * {@link #addAccount}.
*
- * @param accountType the accountType to query; this must be non-null
- * @param authTokenType the type of authtoken to retrieve; this must be non-null
- * @param features a filter for the accounts. See {@link #getAccountsByTypeAndFeatures}.
- * @param activityForPrompting The activity used to start any account management
- * activities that are required to fulfill this request. This may be null.
- * @param addAccountOptions authenticator-specific options used if an account needs to be added
- * @param getAuthTokenOptions authenticator-specific options passed to getAuthToken
- * @param callback A callback to invoke when the request completes. If null then
- * no callback is invoked.
- * @param handler The {@link Handler} to use to invoke the callback. If null then the
- * main thread's {@link Handler} is used.
- * @return an {@link AccountManagerFuture} that represents the future result of the call.
- * The future result is a {@link Bundle} that contains either:
+ * <p>This method gets a list of the accounts matching the
+ * specified type and feature set; if there is exactly one, it is
+ * used; if there are more than one, the user is prompted to pick one;
+ * if there are none, the user is prompted to add one. Finally,
+ * an auth token is acquired for the chosen account.
+ *
+ * <p>This method may be called from any thread, but the returned
+ * {@link AccountManagerFuture} must not be used on the main thread.
+ *
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#MANAGE_ACCOUNTS}.
+ *
+ * @param accountType The account type required
+ * (see {@link #getAccountsByType}), must not be null
+ * @param authTokenType The desired auth token type
+ * (see {@link #getAuthToken}), must not be null
+ * @param features Required features for the account
+ * (see {@link #getAccountsByTypeAndFeatures}), may be null or empty
+ * @param activity The {@link Activity} context to use for launching new
+ * sub-Activities to prompt to add an account, select an account,
+ * and/or enter a password, as necessary; used only to call
+ * startActivity(); should not be null
+ * @param addAccountOptions Authenticator-specific options to use for
+ * adding new accounts; may be null or empty
+ * @param getAuthTokenOptions Authenticator-specific options to use for
+ * getting auth tokens; may be null or empty
+ * @param callback Callback to invoke when the request completes,
+ * null for no callback
+ * @param handler {@link Handler} identifying the callback thread,
+ * null for the main thread
+ * @return An {@link AccountManagerFuture} which resolves to a Bundle with
+ * at least the following fields:
* <ul>
- * <li> {@link #KEY_INTENT}, if no activity is supplied yet an activity needs to launched to
- * fulfill the request.
- * <li> {@link #KEY_ACCOUNT_NAME}, {@link #KEY_ACCOUNT_TYPE} and {@link #KEY_AUTHTOKEN} if the
- * request completes successfully.
+ * <li> {@link #KEY_ACCOUNT_NAME} - the name of the account
+ * <li> {@link #KEY_ACCOUNT_TYPE} - the type of the account
+ * <li> {@link #KEY_AUTHTOKEN} - the auth token you wanted
* </ul>
- * If the user presses "back" then the request will be canceled.
+ *
+ * <p>If an error occurred, {@link AccountManagerFuture#getResult()} throws:
+ * <ul>
+ * <li> {@link AuthenticatorException} if no authenticator was registered for
+ * this account type or the authenticator failed to respond
+ * <li> {@link OperationCanceledException} if the operation was canceled for
+ * any reason, including the user canceling any operation
+ * <li> {@link IOException} if the authenticator experienced an I/O problem
+ * updating settings, usually because of network trouble
+ * </ul>
*/
public AccountManagerFuture<Bundle> getAuthTokenByFeatures(
final String accountType, final String authTokenType, final String[] features,
- final Activity activityForPrompting, final Bundle addAccountOptions,
+ final Activity activity, final Bundle addAccountOptions,
final Bundle getAuthTokenOptions,
final AccountManagerCallback<Bundle> callback, final Handler handler) {
if (accountType == null) throw new IllegalArgumentException("account type is null");
if (authTokenType == null) throw new IllegalArgumentException("authTokenType is null");
final GetAuthTokenByTypeAndFeaturesTask task =
new GetAuthTokenByTypeAndFeaturesTask(accountType, authTokenType, features,
- activityForPrompting, addAccountOptions, getAuthTokenOptions, callback, handler);
+ activity, addAccountOptions, getAuthTokenOptions, callback, handler);
task.start();
return task;
}
@@ -1552,18 +1619,26 @@
};
/**
- * Add a {@link OnAccountsUpdateListener} to this instance of the {@link AccountManager}.
- * The listener is guaranteed to be invoked on the thread of the Handler that is passed
- * in or the main thread's Handler if handler is null.
- * <p>
- * You must remove this listener before the context that was used to retrieve this
- * {@link AccountManager} instance goes away. This generally means when the Activity
- * or Service you are running is stopped.
- * @param listener the listener to add
- * @param handler the Handler whose thread will be used to invoke the listener. If null
- * the AccountManager context's main thread will be used.
- * @param updateImmediately if true then the listener will be invoked as a result of this
- * call.
+ * Adds an {@link OnAccountsUpdateListener} to this instance of the
+ * {@link AccountManager}. This listener will be notified whenever the
+ * list of accounts on the device changes.
+ *
+ * <p>As long as this listener is present, the AccountManager instance
+ * will not be garbage-collected, and neither will the {@link Context}
+ * used to retrieve it, which may be a large Activity instance. To avoid
+ * memory leaks, you must remove this listener before then. Normally
+ * listeners are added in an Activity or Service's {@link Activity#onCreate}
+ * and removed in {@link Activity#onDestroy}.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>No permission is required to call this method.
+ *
+ * @param listener The listener to send notifications to
+ * @param handler {@link Handler} identifying the thread to use
+ * for notifications, null for the main thread
+ * @param updateImmediately If true, the listener will be invoked
+ * (on the handler thread) right away with the current account list
* @throws IllegalArgumentException if listener is null
* @throws IllegalStateException if listener was already added
*/
@@ -1596,9 +1671,15 @@
}
/**
- * Remove an {@link OnAccountsUpdateListener} that was previously registered with
- * {@link #addOnAccountsUpdatedListener}.
- * @param listener the listener to remove
+ * Removes an {@link OnAccountsUpdateListener} previously registered with
+ * {@link #addOnAccountsUpdatedListener}. The listener will no longer
+ * receive notifications of account changes.
+ *
+ * <p>It is safe to call this method from the main thread.
+ *
+ * <p>No permission is required to call this method.
+ *
+ * @param listener The previously added listener to remove
* @throws IllegalArgumentException if listener is null
* @throws IllegalStateException if listener was not already added
*/
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java
index 770554e..2aaf5b0 100644
--- a/core/java/android/accounts/AccountManagerService.java
+++ b/core/java/android/accounts/AccountManagerService.java
@@ -565,7 +565,7 @@
}
public void invalidateAuthToken(String accountType, String authToken) {
- checkManageAccountsPermission();
+ checkManageAccountsOrUseCredentialsPermissions();
long identityToken = clearCallingIdentity();
try {
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
@@ -691,11 +691,21 @@
if (account == null) {
return;
}
- ContentValues values = new ContentValues();
- values.put(ACCOUNTS_PASSWORD, password);
- mOpenHelper.getWritableDatabase().update(TABLE_ACCOUNTS, values,
- ACCOUNTS_NAME + "=? AND " + ACCOUNTS_TYPE+ "=?",
- new String[]{account.name, account.type});
+ SQLiteDatabase db = mOpenHelper.getWritableDatabase();
+ db.beginTransaction();
+ try {
+ final ContentValues values = new ContentValues();
+ values.put(ACCOUNTS_PASSWORD, password);
+ final long accountId = getAccountId(db, account);
+ if (accountId >= 0) {
+ final String[] argsAccountId = {String.valueOf(accountId)};
+ db.update(TABLE_ACCOUNTS, values, ACCOUNTS_ID + "=?", argsAccountId);
+ db.delete(TABLE_AUTHTOKENS, AUTHTOKENS_ACCOUNTS_ID + "=?", argsAccountId);
+ db.setTransactionSuccessful();
+ }
+ } finally {
+ db.endTransaction();
+ }
sendAccountsChangedBroadcast();
}
@@ -1134,7 +1144,10 @@
long identityToken = clearCallingIdentity();
try {
if (features == null || features.length == 0) {
- getAccountsByType(type);
+ Account[] accounts = getAccountsByType(type);
+ Bundle result = new Bundle();
+ result.putParcelableArray(AccountManager.KEY_ACCOUNTS, accounts);
+ onResult(response, result);
return;
}
new GetAccountsByTypeAndFeatureSession(response, type, features).bind();
@@ -1734,17 +1747,22 @@
}
}
- private void checkBinderPermission(String permission) {
+ /** Succeeds if any of the specified permissions are granted. */
+ private void checkBinderPermission(String... permissions) {
final int uid = Binder.getCallingUid();
- if (mContext.checkCallingOrSelfPermission(permission) !=
- PackageManager.PERMISSION_GRANTED) {
- String msg = "caller uid " + uid + " lacks " + permission;
- Log.w(TAG, msg);
- throw new SecurityException(msg);
+
+ for (String perm : permissions) {
+ if (mContext.checkCallingOrSelfPermission(perm) == PackageManager.PERMISSION_GRANTED) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "caller uid " + uid + " has " + perm);
+ }
+ return;
+ }
}
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
- Log.v(TAG, "caller uid " + uid + " has " + permission);
- }
+
+ String msg = "caller uid " + uid + " lacks any of " + TextUtils.join(",", permissions);
+ Log.w(TAG, msg);
+ throw new SecurityException(msg);
}
private boolean inSystemImage(int callerUid) {
@@ -1835,6 +1853,11 @@
checkBinderPermission(Manifest.permission.MANAGE_ACCOUNTS);
}
+ private void checkManageAccountsOrUseCredentialsPermissions() {
+ checkBinderPermission(Manifest.permission.MANAGE_ACCOUNTS,
+ Manifest.permission.USE_CREDENTIALS);
+ }
+
/**
* Allow callers with the given uid permission to get credentials for account/authTokenType.
* <p>
diff --git a/core/java/android/accounts/AuthenticatorDescription.java b/core/java/android/accounts/AuthenticatorDescription.java
index 91c94e6..eddf7c1 100644
--- a/core/java/android/accounts/AuthenticatorDescription.java
+++ b/core/java/android/accounts/AuthenticatorDescription.java
@@ -91,7 +91,7 @@
return "AuthenticatorDescription {type=" + type + "}";
}
- /** @inhericDoc */
+ /** @inheritDoc */
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(type);
dest.writeString(packageName);
diff --git a/core/java/android/accounts/ChooseAccountActivity.java b/core/java/android/accounts/ChooseAccountActivity.java
index 4a0018e..0bbb6fc 100644
--- a/core/java/android/accounts/ChooseAccountActivity.java
+++ b/core/java/android/accounts/ChooseAccountActivity.java
@@ -36,14 +36,15 @@
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- if (savedInstanceState == null) {
- mAccounts = getIntent().getParcelableArrayExtra(AccountManager.KEY_ACCOUNTS);
- mAccountManagerResponse =
- getIntent().getParcelableExtra(AccountManager.KEY_ACCOUNT_MANAGER_RESPONSE);
- } else {
- mAccounts = savedInstanceState.getParcelableArray(AccountManager.KEY_ACCOUNTS);
- mAccountManagerResponse =
- savedInstanceState.getParcelable(AccountManager.KEY_ACCOUNT_MANAGER_RESPONSE);
+ mAccounts = getIntent().getParcelableArrayExtra(AccountManager.KEY_ACCOUNTS);
+ mAccountManagerResponse =
+ getIntent().getParcelableExtra(AccountManager.KEY_ACCOUNT_MANAGER_RESPONSE);
+
+ // KEY_ACCOUNTS is a required parameter
+ if (mAccounts == null) {
+ setResult(RESULT_CANCELED);
+ finish();
+ return;
}
String[] mAccountNames = new String[mAccounts.length];
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 05bbf3b..8695598 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -678,17 +678,19 @@
private Thread mUiThread;
private final Handler mHandler = new Handler();
+ // Used for debug only
+ /*
public Activity() {
++sInstanceCount;
}
-
@Override
protected void finalize() throws Throwable {
super.finalize();
--sInstanceCount;
}
-
+ */
+
public static long getInstanceCount() {
return sInstanceCount;
}
@@ -1308,14 +1310,16 @@
}
// close any cursors we are managing.
- int numCursors = mManagedCursors.size();
- for (int i = 0; i < numCursors; i++) {
- ManagedCursor c = mManagedCursors.get(i);
- if (c != null) {
- c.mCursor.close();
+ synchronized (mManagedCursors) {
+ int numCursors = mManagedCursors.size();
+ for (int i = 0; i < numCursors; i++) {
+ ManagedCursor c = mManagedCursors.get(i);
+ if (c != null) {
+ c.mCursor.close();
+ }
}
+ mManagedCursors.clear();
}
- mManagedCursors.clear();
}
/**
@@ -3778,13 +3782,15 @@
}
final void performRestart() {
- final int N = mManagedCursors.size();
- for (int i=0; i<N; i++) {
- ManagedCursor mc = mManagedCursors.get(i);
- if (mc.mReleased || mc.mUpdated) {
- mc.mCursor.requery();
- mc.mReleased = false;
- mc.mUpdated = false;
+ synchronized (mManagedCursors) {
+ final int N = mManagedCursors.size();
+ for (int i=0; i<N; i++) {
+ ManagedCursor mc = mManagedCursors.get(i);
+ if (mc.mReleased || mc.mUpdated) {
+ mc.mCursor.requery();
+ mc.mReleased = false;
+ mc.mUpdated = false;
+ }
}
}
@@ -3850,12 +3856,14 @@
" did not call through to super.onStop()");
}
- final int N = mManagedCursors.size();
- for (int i=0; i<N; i++) {
- ManagedCursor mc = mManagedCursors.get(i);
- if (!mc.mReleased) {
- mc.mCursor.deactivate();
- mc.mReleased = true;
+ synchronized (mManagedCursors) {
+ final int N = mManagedCursors.size();
+ for (int i=0; i<N; i++) {
+ ManagedCursor mc = mManagedCursors.get(i);
+ if (!mc.mReleased) {
+ mc.mCursor.deactivate();
+ mc.mReleased = true;
+ }
}
}
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 2e39c10..6849fd76 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -146,6 +146,28 @@
return true;
}
+ case START_ACTIVITY_AND_WAIT_TRANSACTION:
+ {
+ data.enforceInterface(IActivityManager.descriptor);
+ IBinder b = data.readStrongBinder();
+ IApplicationThread app = ApplicationThreadNative.asInterface(b);
+ Intent intent = Intent.CREATOR.createFromParcel(data);
+ String resolvedType = data.readString();
+ Uri[] grantedUriPermissions = data.createTypedArray(Uri.CREATOR);
+ int grantedMode = data.readInt();
+ IBinder resultTo = data.readStrongBinder();
+ String resultWho = data.readString();
+ int requestCode = data.readInt();
+ boolean onlyIfNeeded = data.readInt() != 0;
+ boolean debug = data.readInt() != 0;
+ WaitResult result = startActivityAndWait(app, intent, resolvedType,
+ grantedUriPermissions, grantedMode, resultTo, resultWho,
+ requestCode, onlyIfNeeded, debug);
+ reply.writeNoException();
+ result.writeToParcel(reply, 0);
+ return true;
+ }
+
case START_ACTIVITY_INTENT_SENDER_TRANSACTION:
{
data.enforceInterface(IActivityManager.descriptor);
@@ -1238,6 +1260,31 @@
data.recycle();
return result;
}
+ public WaitResult startActivityAndWait(IApplicationThread caller, Intent intent,
+ String resolvedType, Uri[] grantedUriPermissions, int grantedMode,
+ IBinder resultTo, String resultWho,
+ int requestCode, boolean onlyIfNeeded,
+ boolean debug) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ data.writeStrongBinder(caller != null ? caller.asBinder() : null);
+ intent.writeToParcel(data, 0);
+ data.writeString(resolvedType);
+ data.writeTypedArray(grantedUriPermissions, 0);
+ data.writeInt(grantedMode);
+ data.writeStrongBinder(resultTo);
+ data.writeString(resultWho);
+ data.writeInt(requestCode);
+ data.writeInt(onlyIfNeeded ? 1 : 0);
+ data.writeInt(debug ? 1 : 0);
+ mRemote.transact(START_ACTIVITY_AND_WAIT_TRANSACTION, data, reply, 0);
+ reply.readException();
+ WaitResult result = WaitResult.CREATOR.createFromParcel(reply);
+ reply.recycle();
+ data.recycle();
+ return result;
+ }
public int startActivityIntentSender(IApplicationThread caller,
IntentSender intent, Intent fillInIntent, String resolvedType,
IBinder resultTo, String resultWho, int requestCode,
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 13cc3ba..0756c71 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -77,9 +77,12 @@
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.PrintWriter;
import java.lang.ref.WeakReference;
+import java.net.URL;
import java.util.ArrayList;
+import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -460,6 +463,7 @@
mClassLoader =
ApplicationLoaders.getDefault().getClassLoader(
zip, mDataDir, mBaseClassLoader);
+ initializeJavaContextClassLoader();
} else {
if (mBaseClassLoader == null) {
mClassLoader = ClassLoader.getSystemClassLoader();
@@ -471,6 +475,120 @@
}
}
+ /**
+ * Setup value for Thread.getContextClassLoader(). If the
+ * package will not run in in a VM with other packages, we set
+ * the Java context ClassLoader to the
+ * PackageInfo.getClassLoader value. However, if this VM can
+ * contain multiple packages, we intead set the Java context
+ * ClassLoader to a proxy that will warn about the use of Java
+ * context ClassLoaders and then fall through to use the
+ * system ClassLoader.
+ *
+ * <p> Note that this is similar to but not the same as the
+ * android.content.Context.getClassLoader(). While both
+ * context class loaders are typically set to the
+ * PathClassLoader used to load the package archive in the
+ * single application per VM case, a single Android process
+ * may contain several Contexts executing on one thread with
+ * their own logical ClassLoaders while the Java context
+ * ClassLoader is a thread local. This is why in the case when
+ * we have multiple packages per VM we do not set the Java
+ * context ClassLoader to an arbitrary but instead warn the
+ * user to set their own if we detect that they are using a
+ * Java library that expects it to be set.
+ */
+ private void initializeJavaContextClassLoader() {
+ IPackageManager pm = getPackageManager();
+ android.content.pm.PackageInfo pi;
+ try {
+ pi = pm.getPackageInfo(mPackageName, 0);
+ } catch (RemoteException e) {
+ throw new AssertionError(e);
+ }
+ /*
+ * Two possible indications that this package could be
+ * sharing its virtual machine with other packages:
+ *
+ * 1.) the sharedUserId attribute is set in the manifest,
+ * indicating a request to share a VM with other
+ * packages with the same sharedUserId.
+ *
+ * 2.) the application element of the manifest has an
+ * attribute specifying a non-default process name,
+ * indicating the desire to run in another packages VM.
+ */
+ boolean sharedUserIdSet = (pi.sharedUserId != null);
+ boolean processNameNotDefault =
+ (pi.applicationInfo != null &&
+ !mPackageName.equals(pi.applicationInfo.processName));
+ boolean sharable = (sharedUserIdSet || processNameNotDefault);
+ ClassLoader contextClassLoader =
+ (sharable)
+ ? new WarningContextClassLoader()
+ : mClassLoader;
+ Thread.currentThread().setContextClassLoader(contextClassLoader);
+ }
+
+ private static class WarningContextClassLoader extends ClassLoader {
+
+ private static boolean warned = false;
+
+ private void warn(String methodName) {
+ if (warned) {
+ return;
+ }
+ warned = true;
+ Thread.currentThread().setContextClassLoader(getParent());
+ Log.w(TAG, "ClassLoader." + methodName + ": " +
+ "The class loader returned by " +
+ "Thread.getContextClassLoader() may fail for processes " +
+ "that host multiple applications. You should explicitly " +
+ "specify a context class loader. For example: " +
+ "Thread.setContextClassLoader(getClass().getClassLoader());");
+ }
+
+ @Override public URL getResource(String resName) {
+ warn("getResource");
+ return getParent().getResource(resName);
+ }
+
+ @Override public Enumeration<URL> getResources(String resName) throws IOException {
+ warn("getResources");
+ return getParent().getResources(resName);
+ }
+
+ @Override public InputStream getResourceAsStream(String resName) {
+ warn("getResourceAsStream");
+ return getParent().getResourceAsStream(resName);
+ }
+
+ @Override public Class<?> loadClass(String className) throws ClassNotFoundException {
+ warn("loadClass");
+ return getParent().loadClass(className);
+ }
+
+ @Override public void setClassAssertionStatus(String cname, boolean enable) {
+ warn("setClassAssertionStatus");
+ getParent().setClassAssertionStatus(cname, enable);
+ }
+
+ @Override public void setPackageAssertionStatus(String pname, boolean enable) {
+ warn("setPackageAssertionStatus");
+ getParent().setPackageAssertionStatus(pname, enable);
+ }
+
+ @Override public void setDefaultAssertionStatus(boolean enable) {
+ warn("setDefaultAssertionStatus");
+ getParent().setDefaultAssertionStatus(enable);
+ }
+
+ @Override public void clearAssertionStatus() {
+ warn("clearAssertionStatus");
+ getParent().clearAssertionStatus();
+ }
+ }
+
public String getAppDir() {
return mAppDir;
}
@@ -2495,7 +2613,6 @@
" did not call through to super.onPostCreate()");
}
}
- r.state = null;
}
r.paused = true;
@@ -2526,6 +2643,7 @@
if (a != null) {
r.createdConfig = new Configuration(mConfiguration);
+ Bundle oldState = r.state;
handleResumeActivity(r.token, false, r.isForward);
if (!r.activity.mFinished && r.startsNotResumed) {
@@ -2541,6 +2659,9 @@
try {
r.activity.mCalled = false;
mInstrumentation.callActivityOnPause(r.activity);
+ // We need to keep around the original state, in case
+ // we need to be created again.
+ r.state = oldState;
if (!r.activity.mCalled) {
throw new SuperNotCalledException(
"Activity " + r.intent.getComponent().toShortString() +
diff --git a/core/java/android/app/AliasActivity.java b/core/java/android/app/AliasActivity.java
index 7527a5b..3756529 100644
--- a/core/java/android/app/AliasActivity.java
+++ b/core/java/android/app/AliasActivity.java
@@ -26,7 +26,8 @@
import android.os.Bundle;
import android.util.AttributeSet;
import android.util.Xml;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import java.io.IOException;
diff --git a/core/java/android/app/ApplicationErrorReport.java b/core/java/android/app/ApplicationErrorReport.java
index fe81056..f0cef98 100644
--- a/core/java/android/app/ApplicationErrorReport.java
+++ b/core/java/android/app/ApplicationErrorReport.java
@@ -119,9 +119,10 @@
public AnrInfo anrInfo;
/**
- * Text containing battery usage data.
+ * If this report is of type {@link #TYPE_BATTERY}, contains an instance
+ * of BatteryInfo; otherwise null.
*/
- public String batteryText;
+ public BatteryInfo batteryInfo;
/**
* Create an uninitialized instance of {@link ApplicationErrorReport}.
@@ -215,7 +216,7 @@
anrInfo.writeToParcel(dest, flags);
break;
case TYPE_BATTERY:
- dest.writeString(batteryText);
+ batteryInfo.writeToParcel(dest, flags);
break;
}
}
@@ -232,15 +233,15 @@
case TYPE_CRASH:
crashInfo = new CrashInfo(in);
anrInfo = null;
- batteryText = null;
+ batteryInfo = null;
break;
case TYPE_ANR:
anrInfo = new AnrInfo(in);
crashInfo = null;
- batteryText = null;
+ batteryInfo = null;
break;
case TYPE_BATTERY:
- batteryText = in.readString();
+ batteryInfo = new BatteryInfo(in);
anrInfo = null;
crashInfo = null;
break;
@@ -411,6 +412,68 @@
}
}
+ /**
+ * Describes a battery usage report.
+ */
+ public static class BatteryInfo {
+ /**
+ * Percentage of the battery that was used up by the process.
+ */
+ public int usagePercent;
+
+ /**
+ * Duration in microseconds over which the process used the above
+ * percentage of battery.
+ */
+ public long durationMicros;
+
+ /**
+ * Dump of various info impacting battery use.
+ */
+ public String usageDetails;
+
+ /**
+ * Checkin details.
+ */
+ public String checkinDetails;
+
+ /**
+ * Create an uninitialized instance of BatteryInfo.
+ */
+ public BatteryInfo() {
+ }
+
+ /**
+ * Create an instance of BatteryInfo initialized from a Parcel.
+ */
+ public BatteryInfo(Parcel in) {
+ usagePercent = in.readInt();
+ durationMicros = in.readLong();
+ usageDetails = in.readString();
+ checkinDetails = in.readString();
+ }
+
+ /**
+ * Save a BatteryInfo instance to a parcel.
+ */
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(usagePercent);
+ dest.writeLong(durationMicros);
+ dest.writeString(usageDetails);
+ dest.writeString(checkinDetails);
+ }
+
+ /**
+ * Dump a BatteryInfo instance to a Printer.
+ */
+ public void dump(Printer pw, String prefix) {
+ pw.println(prefix + "usagePercent: " + usagePercent);
+ pw.println(prefix + "durationMicros: " + durationMicros);
+ pw.println(prefix + "usageDetails: " + usageDetails);
+ pw.println(prefix + "checkinDetails: " + checkinDetails);
+ }
+ }
+
public static final Parcelable.Creator<ApplicationErrorReport> CREATOR
= new Parcelable.Creator<ApplicationErrorReport>() {
public ApplicationErrorReport createFromParcel(Parcel source) {
@@ -445,7 +508,7 @@
anrInfo.dump(pw, prefix);
break;
case TYPE_BATTERY:
- pw.println(batteryText);
+ batteryInfo.dump(pw, prefix);
break;
}
}
diff --git a/core/java/android/app/BackupAgent.java b/core/java/android/app/BackupAgent.java
index a2bfc76..4695c21 100644
--- a/core/java/android/app/BackupAgent.java
+++ b/core/java/android/app/BackupAgent.java
@@ -31,10 +31,18 @@
import java.io.IOException;
/**
- * This is the central interface between an application and Android's
- * settings backup mechanism.
- *
- * <p>STOPSHIP write more documentation about the backup process here.
+ * This is the central interface between an application and Android's settings
+ * backup mechanism. Any implementation of a backup agent should perform backup
+ * and restore actions in
+ * {@link #onBackup(ParcelFileDescriptor, BackupDataOutput, ParcelFileDescriptor)}
+ * and {@link #onRestore(BackupDataInput, int, ParcelFileDescriptor)}
+ * respectively.
+ * <p>
+ * A backup agent based on convenient helper classes is available in
+ * {@link android.backup.BackupHelperAgent} for less complex implementation
+ * requirements.
+ * <p>
+ * STOPSHIP write more documentation about the backup process here.
*/
public abstract class BackupAgent extends ContextWrapper {
private static final String TAG = "BackupAgent";
@@ -51,51 +59,58 @@
}
/**
- * The application is being asked to write any data changed since the
- * last time it performed a backup operation. The state data recorded
- * during the last backup pass is provided in the oldState file descriptor.
- * If oldState is null, no old state is available and the application should perform
- * a full backup. In both cases, a representation of the final backup state after
- * this pass should be written to the file pointed to by the newStateFd file descriptor.
- *
- * @param oldState An open, read-only ParcelFileDescriptor pointing to the last backup
- * state provided by the application. May be null, in which
- * case no prior state is being provided and the application should
- * perform a full backup.
- * @param data A structured wrapper around an open, read/write ParcelFileDescriptor
- * pointing to the backup data destination. Typically the application will use
- * backup helper classes to write to this file.
- * @param newState An open, read/write ParcelFileDescriptor pointing to an empty
- * file. The application should record the final backup state
- * here after writing the requested data to dataFd.
+ * The application is being asked to write any data changed since the last
+ * time it performed a backup operation. The state data recorded during the
+ * last backup pass is provided in the <code>oldState</code> file
+ * descriptor. If <code>oldState</code> is <code>null</code>, no old state
+ * is available and the application should perform a full backup. In both
+ * cases, a representation of the final backup state after this pass should
+ * be written to the file pointed to by the file descriptor wrapped in
+ * <code>newState</code>.
+ *
+ * @param oldState An open, read-only ParcelFileDescriptor pointing to the
+ * last backup state provided by the application. May be
+ * <code>null</code>, in which case no prior state is being
+ * provided and the application should perform a full backup.
+ * @param data A structured wrapper around an open, read/write
+ * ParcelFileDescriptor pointing to the backup data destination.
+ * Typically the application will use backup helper classes to
+ * write to this file.
+ * @param newState An open, read/write ParcelFileDescriptor pointing to an
+ * empty file. The application should record the final backup
+ * state here after writing the requested data to dataFd.
*/
public abstract void onBackup(ParcelFileDescriptor oldState, BackupDataOutput data,
ParcelFileDescriptor newState) throws IOException;
-
+
/**
- * The application is being restored from backup, and should replace any
- * existing data with the contents of the backup. The backup data is
- * provided in the file pointed to by the dataFd file descriptor. Once
- * the restore is finished, the application should write a representation
- * of the final state to the newStateFd file descriptor,
- *
- * <p>The application is responsible for properly erasing its old data and
- * replacing it with the data supplied to this method. No "clear user data"
- * operation will be performed automatically by the operating system. The
- * exception to this is in the case of a failed restore attempt: if onRestore()
- * throws an exception, the OS will assume that the application's data may now
- * be in an incoherent state, and will clear it before proceeding.
- *
- * @param data A structured wrapper around an open, read-only ParcelFileDescriptor
- * pointing to a full snapshot of the application's data. Typically the
- * application will use helper classes to read this data.
- * @param appVersionCode The android:versionCode value of the application that backed
- * up this particular data set. This makes it easier for an application's
- * agent to distinguish among several possible older data versions when
- * asked to perform the restore operation.
- * @param newState An open, read/write ParcelFileDescriptor pointing to an empty
- * file. The application should record the final backup state
- * here after restoring its data from dataFd.
+ * The application is being restored from backup and should replace any
+ * existing data with the contents of the backup. The backup data is
+ * provided in the file descriptor pointed to by the
+ * {@link android.backup.BackupDataInput} instance <code>data</code>. Once
+ * the restore is finished, the application should write a representation of
+ * the final state to the <code>newState</code> file descriptor.
+ * <p>
+ * The application is responsible for properly erasing its old data and
+ * replacing it with the data supplied to this method. No "clear user data"
+ * operation will be performed automatically by the operating system. The
+ * exception to this is in the case of a failed restore attempt: if
+ * onRestore() throws an exception, the OS will assume that the
+ * application's data may now be in an incoherent state, and will clear it
+ * before proceeding.
+ *
+ * @param data A structured wrapper around an open, read-only
+ * ParcelFileDescriptor pointing to a full snapshot of the
+ * application's data. Typically the application will use helper
+ * classes to read this data.
+ * @param appVersionCode The android:versionCode value of the application
+ * that backed up this particular data set. This makes it easier
+ * for an application's agent to distinguish among several
+ * possible older data versions when asked to perform the restore
+ * operation.
+ * @param newState An open, read/write ParcelFileDescriptor pointing to an
+ * empty file. The application should record the final backup
+ * state here after restoring its data from dataFd.
*/
public abstract void onRestore(BackupDataInput data, int appVersionCode,
ParcelFileDescriptor newState)
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 50dcdf9..4464ab9 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -17,7 +17,7 @@
package android.app;
import com.android.internal.policy.PolicyManager;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
import com.google.android.collect.Maps;
import org.xmlpull.v1.XmlPullParserException;
@@ -99,6 +99,7 @@
import android.view.inputmethod.InputMethodManager;
import android.accounts.AccountManager;
import android.accounts.IAccountManager;
+import android.app.admin.DevicePolicyManager;
import com.android.internal.os.IDropBoxManagerService;
@@ -209,11 +210,14 @@
private static final String[] EMPTY_FILE_LIST = {};
+ // For debug only
+ /*
@Override
protected void finalize() throws Throwable {
super.finalize();
--sInstanceCount;
}
+ */
public static long getInstanceCount() {
return sInstanceCount;
@@ -1446,7 +1450,8 @@
}
ContextImpl() {
- ++sInstanceCount;
+ // For debug only
+ //++sInstanceCount;
mOuterContext = this;
}
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index 86f28bf..3913ed5 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -84,6 +84,10 @@
Intent intent, String resolvedType, Uri[] grantedUriPermissions,
int grantedMode, IBinder resultTo, String resultWho, int requestCode,
boolean onlyIfNeeded, boolean debug) throws RemoteException;
+ public WaitResult startActivityAndWait(IApplicationThread caller,
+ Intent intent, String resolvedType, Uri[] grantedUriPermissions,
+ int grantedMode, IBinder resultTo, String resultWho, int requestCode,
+ boolean onlyIfNeeded, boolean debug) throws RemoteException;
public int startActivityIntentSender(IApplicationThread caller,
IntentSender intent, Intent fillInIntent, String resolvedType,
IBinder resultTo, String resultWho, int requestCode,
@@ -348,6 +352,49 @@
}
};
+ /** Information returned after waiting for an activity start. */
+ public static class WaitResult implements Parcelable {
+ public int result;
+ public boolean timeout;
+ public ComponentName who;
+ public long thisTime;
+ public long totalTime;
+
+ public WaitResult() {
+ }
+
+ public int describeContents() {
+ return 0;
+ }
+
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeInt(result);
+ dest.writeInt(timeout ? 1 : 0);
+ ComponentName.writeToParcel(who, dest);
+ dest.writeLong(thisTime);
+ dest.writeLong(totalTime);
+ }
+
+ public static final Parcelable.Creator<WaitResult> CREATOR
+ = new Parcelable.Creator<WaitResult>() {
+ public WaitResult createFromParcel(Parcel source) {
+ return new WaitResult(source);
+ }
+
+ public WaitResult[] newArray(int size) {
+ return new WaitResult[size];
+ }
+ };
+
+ private WaitResult(Parcel source) {
+ result = source.readInt();
+ timeout = source.readInt() != 0;
+ who = ComponentName.readFromParcel(source);
+ thisTime = source.readLong();
+ totalTime = source.readLong();
+ }
+ };
+
String descriptor = "android.app.IActivityManager";
// Please keep these transaction codes the same -- they are also
@@ -453,4 +500,5 @@
int HANDLE_APPLICATION_WTF_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+101;
int KILL_BACKGROUND_PROCESSES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+102;
int IS_USER_A_MONKEY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+103;
+ int START_ACTIVITY_AND_WAIT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+104;
}
diff --git a/core/java/android/app/ISearchManager.aidl b/core/java/android/app/ISearchManager.aidl
index 9ba7863..cb03d2c 100644
--- a/core/java/android/app/ISearchManager.aidl
+++ b/core/java/android/app/ISearchManager.aidl
@@ -24,9 +24,8 @@
/** @hide */
interface ISearchManager {
- SearchableInfo getSearchableInfo(in ComponentName launchActivity, boolean globalSearch);
+ SearchableInfo getSearchableInfo(in ComponentName launchActivity);
List<SearchableInfo> getSearchablesInGlobalSearch();
- List<SearchableInfo> getSearchablesForWebSearch();
- SearchableInfo getDefaultSearchableForWebSearch();
- void setDefaultWebSearch(in ComponentName component);
+ ComponentName getGlobalSearchActivity();
+ ComponentName getWebSearchActivity();
}
diff --git a/core/java/android/app/SearchDialog.java b/core/java/android/app/SearchDialog.java
index 581b436..af68689 100644
--- a/core/java/android/app/SearchDialog.java
+++ b/core/java/android/app/SearchDialog.java
@@ -16,8 +16,6 @@
package android.app;
-import com.android.common.Patterns;
-import com.android.common.speech.Recognition;
import static android.app.SuggestionsAdapter.getColumnString;
@@ -48,6 +46,7 @@
import android.util.AndroidRuntimeException;
import android.util.AttributeSet;
import android.util.Log;
+import android.util.Patterns;
import android.view.ContextThemeWrapper;
import android.view.Gravity;
import android.view.KeyEvent;
@@ -274,7 +273,7 @@
SearchManager searchManager = (SearchManager)
mContext.getSystemService(Context.SEARCH_SERVICE);
// Try to get the searchable info for the provided component.
- mSearchable = searchManager.getSearchableInfo(componentName, false);
+ mSearchable = searchManager.getSearchableInfo(componentName);
if (mSearchable == null) {
return false;
@@ -313,7 +312,6 @@
mLaunchComponent = null;
mAppSearchData = null;
mSearchable = null;
- mActivityContext = null;
mUserQuery = null;
}
@@ -411,7 +409,7 @@
updateSearchAppIcon();
updateSearchBadge();
updateQueryHint();
- updateVoiceButton();
+ updateVoiceButton(TextUtils.isEmpty(mUserQuery));
// In order to properly configure the input method (if one is being used), we
// need to let it know if we'll be providing suggestions. Although it would be
@@ -560,10 +558,13 @@
/**
* Update the visibility of the voice button. There are actually two voice search modes,
* either of which will activate the button.
+ * @param empty whether the search query text field is empty. If it is, then the other
+ * criteria apply to make the voice button visible. Otherwise the voice button will not
+ * be visible - i.e., if the user has typed a query, remove the voice button.
*/
- private void updateVoiceButton() {
+ private void updateVoiceButton(boolean empty) {
int visibility = View.GONE;
- if (mSearchable.getVoiceSearchEnabled()) {
+ if (mSearchable.getVoiceSearchEnabled() && empty) {
Intent testIntent = null;
if (mSearchable.getVoiceSearchLaunchWebSearch()) {
testIntent = mVoiceWebSearchIntent;
@@ -666,6 +667,7 @@
// The user changed the query, remember it.
mUserQuery = s == null ? "" : s.toString();
}
+ updateVoiceButton(TextUtils.isEmpty(s));
}
public void afterTextChanged(Editable s) {
@@ -746,9 +748,6 @@
return;
}
SearchableInfo searchable = mSearchable;
- // First stop the existing search before starting voice search, or else we'll end
- // up showing the search dialog again once we return to the app.
- cancel();
try {
if (searchable.getVoiceSearchLaunchWebSearch()) {
getContext().startActivity(mVoiceWebSearchIntent);
@@ -762,6 +761,7 @@
// voice search before showing the button. But just in case...
Log.w(LOG_TAG, "Could not find voice search activity");
}
+ dismiss();
}
};
@@ -819,7 +819,7 @@
voiceIntent.putExtra(RecognizerIntent.EXTRA_PROMPT, prompt);
voiceIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, language);
voiceIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, maxResults);
- voiceIntent.putExtra(Recognition.EXTRA_CALLING_PACKAGE,
+ voiceIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,
searchActivity == null ? null : searchActivity.toShortString());
// Add the values that configure forwarding the results
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java
index 99edfaca..b54e53d 100644
--- a/core/java/android/app/SearchManager.java
+++ b/core/java/android/app/SearchManager.java
@@ -137,21 +137,11 @@
* setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL); // search within your activity
* setDefaultKeyMode(DEFAULT_KEYS_SEARCH_GLOBAL); // search using platform global search</pre>
*
- * <p><b>How to enable global search with Quick Search Box.</b> In addition to searching within
+ * <p><b>How to start global search.</b> In addition to searching within
* your activity or application, you can also use the Search Manager to invoke a platform-global
- * search, which uses Quick Search Box to search across the device and the web. There are two ways
- * to do this:
- * <ul><li>You can simply define "search" within your application or activity to mean global search.
- * This is described in more detail in the
- * <a href="#SearchabilityMetadata">Searchability Metadata</a> section. Briefly, you will
- * add a single meta-data entry to your manifest, declaring that the default search
- * for your application is "*". This indicates to the system that no application-specific
- * search activity is provided, and that it should launch web-based search instead.</li>
- * <li>Simply do nothing and the default implementation of
- * {@link android.app.Activity#onSearchRequested} will cause global search to be triggered.
- * (You can also always trigger search via a direct call to {@link android.app.Activity#startSearch}.
- * This is most useful if you wish to provide local searchability <i>and</i> access to global
- * search.)</li></ul>
+ * search, which uses Quick Search Box to search across the device and the web.
+ * Override {@link android.app.Activity#onSearchRequested} and call
+ * {@link android.app.Activity#startSearch} with {@code globalSearch} set to {@code true}.
*
* <p><b>How to disable search from your activity.</b> Search is a system-wide feature and users
* will expect it to be available in all contexts. If your UI design absolutely precludes
@@ -871,12 +861,8 @@
*
* <p>The simplest way to specify this is to add a <i>search reference</i> element to the
* application entry in the <a href="{@docRoot}guide/topics/manifest/manifest-intro.html">manifest</a> file.
- * The value of this reference can be either of:
- * <ul><li>The name of your searchable activity.
- * It is typically prefixed by '.' to indicate that it's in the same package.</li>
- * <li>A "*" indicates that the system may select a default searchable activity, in which
- * case it will typically select web-based search.</li>
- * </ul>
+ * The value of this reference should be the name of your searchable activity.
+ * It is typically prefixed by '.' to indicate that it's in the same package.
*
* <p>Here is a snippet showing the necessary addition to the manifest entry for your
* non-searchable activities.
@@ -1662,32 +1648,15 @@
/**
* Gets the name of the global search activity.
*
- * This is currently implemented by returning the first activity that handles
- * the GLOBAL_SEARCH intent and has the GLOBAL_SEARCH permission. If we allow
- * more than one global search acitivity to be installed, this code must be changed.
- *
- * TODO: Doing this every time we start global search is inefficient. Will fix that once
- * we have settled on the right mechanism for finding the global search activity.
- *
* @hide
*/
public ComponentName getGlobalSearchActivity() {
- Intent intent = new Intent(INTENT_ACTION_GLOBAL_SEARCH);
- PackageManager pm = mContext.getPackageManager();
- List<ResolveInfo> activities =
- pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
- int count = activities.size();
- for (int i = 0; i < count; i++) {
- ActivityInfo ai = activities.get(i).activityInfo;
- if (pm.checkPermission(Manifest.permission.GLOBAL_SEARCH,
- ai.packageName) == PackageManager.PERMISSION_GRANTED) {
- return new ComponentName(ai.packageName, ai.name);
- } else {
- Log.w(TAG, "Package " + ai.packageName + " wants to handle GLOBAL_SEARCH, "
- + "but does not have the GLOBAL_SEARCH permission.");
- }
+ try {
+ return mService.getGlobalSearchActivity();
+ } catch (RemoteException ex) {
+ Log.e(TAG, "getGlobalSearchActivity() failed: " + ex);
+ return null;
}
- return null;
}
/**
@@ -1700,13 +1669,12 @@
* @hide
*/
public ComponentName getWebSearchActivity() {
- ComponentName globalSearch = getGlobalSearchActivity();
- if (globalSearch == null) {
+ try {
+ return mService.getWebSearchActivity();
+ } catch (RemoteException ex) {
+ Log.e(TAG, "getWebSearchActivity() failed: " + ex);
return null;
}
- Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
- intent.setPackage(globalSearch.getPackageName());
- return intent.resolveActivity(mContext.getPackageManager());
}
/**
@@ -1840,27 +1808,7 @@
*/
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.
- * If <code>true</code>, return information about the global search activity.
- * @return Searchable information, or <code>null</code> if the activity is not searchable.
- *
- * @hide because SearchableInfo is not part of the API.
- */
- public SearchableInfo getSearchableInfo(ComponentName componentName,
- boolean globalSearch) {
- try {
- return mService.getSearchableInfo(componentName, globalSearch);
+ return mService.getSearchableInfo(componentName);
} catch (RemoteException ex) {
Log.e(TAG, "getSearchableInfo() failed: " + ex);
return null;
diff --git a/core/java/android/app/DeviceAdminInfo.java b/core/java/android/app/admin/DeviceAdminInfo.java
similarity index 96%
rename from core/java/android/app/DeviceAdminInfo.java
rename to core/java/android/app/admin/DeviceAdminInfo.java
index 61e1bb339..c4de812 100644
--- a/core/java/android/app/DeviceAdminInfo.java
+++ b/core/java/android/app/admin/DeviceAdminInfo.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.app;
+package android.app.admin;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -150,6 +150,11 @@
final ResolveInfo mReceiver;
/**
+ * Whether this should be visible to the user.
+ */
+ boolean mVisible;
+
+ /**
* The policies this administrator needs access to.
*/
int mUsesPolicies;
@@ -190,8 +195,11 @@
}
TypedArray sa = context.getResources().obtainAttributes(attrs,
- com.android.internal.R.styleable.Wallpaper);
+ com.android.internal.R.styleable.DeviceAdmin);
+ mVisible = sa.getBoolean(
+ com.android.internal.R.styleable.DeviceAdmin_visible, true);
+
sa.recycle();
int outerDepth = parser.getDepth();
@@ -301,6 +309,14 @@
}
/**
+ * Returns whether this device admin would like to be visible to the
+ * user, even when it is not enabled.
+ */
+ public boolean isVisible() {
+ return mVisible;
+ }
+
+ /**
* Return true if the device admin has requested that it be able to use
* the given policy control. The possible policy identifier inputs are:
* {@link #USES_POLICY_LIMIT_PASSWORD}, {@link #USES_POLICY_WATCH_LOGIN},
diff --git a/core/java/android/app/DeviceAdminReceiver.java b/core/java/android/app/admin/DeviceAdminReceiver.java
similarity index 99%
rename from core/java/android/app/DeviceAdminReceiver.java
rename to core/java/android/app/admin/DeviceAdminReceiver.java
index 453e0bf..b4dd9e7 100644
--- a/core/java/android/app/DeviceAdminReceiver.java
+++ b/core/java/android/app/admin/DeviceAdminReceiver.java
@@ -14,10 +14,11 @@
* limitations under the License.
*/
-package android.app;
+package android.app.admin;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
diff --git a/core/java/android/app/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
similarity index 97%
rename from core/java/android/app/DevicePolicyManager.java
rename to core/java/android/app/admin/DevicePolicyManager.java
index 0e8c1ab..2d9b415 100644
--- a/core/java/android/app/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -14,12 +14,13 @@
* limitations under the License.
*/
-package android.app;
+package android.app.admin;
import org.xmlpull.v1.XmlPullParserException;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
+import android.app.admin.IDevicePolicyManager.Stub;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ActivityInfo;
@@ -56,7 +57,8 @@
ServiceManager.getService(Context.DEVICE_POLICY_SERVICE));
}
- /*package*/ static DevicePolicyManager create(Context context, Handler handler) {
+ /** @hide */
+ public static DevicePolicyManager create(Context context, Handler handler) {
DevicePolicyManager me = new DevicePolicyManager(context, handler);
return me.mService != null ? me : null;
}
@@ -394,6 +396,12 @@
}
/**
+ * Flag for {@link #resetPassword}: don't allow other admins to change
+ * the password again until the user has entered it.
+ */
+ public static final int RESET_PASSWORD_REQUIRE_ENTRY = 0x0001;
+
+ /**
* Force a new device unlock password (the password needed to access the
* entire device, not for individual accounts) on the user. This takes
* effect immediately.
@@ -411,13 +419,14 @@
* this method; if it has not, a security exception will be thrown.
*
* @param password The new password for the user.
+ * @param flags May be 0 or {@link #RESET_PASSWORD_REQUIRE_ENTRY}.
* @return Returns true if the password was applied, or false if it is
* not acceptable for the current constraints.
*/
- public boolean resetPassword(String password) {
+ public boolean resetPassword(String password, int flags) {
if (mService != null) {
try {
- return mService.resetPassword(password);
+ return mService.resetPassword(password, flags);
} catch (RemoteException e) {
Log.w(TAG, "Failed talking with device policy service", e);
}
diff --git a/core/java/android/app/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
similarity index 95%
rename from core/java/android/app/IDevicePolicyManager.aidl
rename to core/java/android/app/admin/IDevicePolicyManager.aidl
index b138720..6fc4dc5 100644
--- a/core/java/android/app/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -15,7 +15,7 @@
** limitations under the License.
*/
-package android.app;
+package android.app.admin;
import android.content.ComponentName;
import android.os.RemoteCallback;
@@ -37,7 +37,7 @@
void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num);
int getMaximumFailedPasswordsForWipe(in ComponentName admin);
- boolean resetPassword(String password);
+ boolean resetPassword(String password, int flags);
void setMaximumTimeToLock(in ComponentName who, long timeMs);
long getMaximumTimeToLock(in ComponentName who);
diff --git a/core/java/android/backup/AbsoluteFileBackupHelper.java b/core/java/android/backup/AbsoluteFileBackupHelper.java
index 6bf848f..5a8034b 100644
--- a/core/java/android/backup/AbsoluteFileBackupHelper.java
+++ b/core/java/android/backup/AbsoluteFileBackupHelper.java
@@ -21,7 +21,6 @@
import android.util.Log;
import java.io.File;
-import java.io.FileDescriptor;
/**
* Like FileBackupHelper, but takes absolute paths for the files instead of
diff --git a/core/java/android/backup/BackupDataInput.java b/core/java/android/backup/BackupDataInput.java
index 295dc66..a08ee75 100644
--- a/core/java/android/backup/BackupDataInput.java
+++ b/core/java/android/backup/BackupDataInput.java
@@ -16,8 +16,6 @@
package android.backup;
-import android.content.Context;
-
import java.io.FileDescriptor;
import java.io.IOException;
diff --git a/core/java/android/backup/BackupDataOutput.java b/core/java/android/backup/BackupDataOutput.java
index 672d01f..34879d8 100644
--- a/core/java/android/backup/BackupDataOutput.java
+++ b/core/java/android/backup/BackupDataOutput.java
@@ -16,8 +16,6 @@
package android.backup;
-import android.content.Context;
-
import java.io.FileDescriptor;
import java.io.IOException;
diff --git a/core/java/android/backup/BackupHelper.java b/core/java/android/backup/BackupHelper.java
index fc48cf2..7eedd01 100644
--- a/core/java/android/backup/BackupHelper.java
+++ b/core/java/android/backup/BackupHelper.java
@@ -18,16 +18,19 @@
import android.os.ParcelFileDescriptor;
-import java.io.InputStream;
-
/**
- * STOPSHIP: document!
+ * A convenient interface to be used with the
+ * {@link android.backup.BackupHelperAgent} to implement backup and restore of
+ * arbitrary data types.
+ * <p>
+ * STOPSHOP: document!
*/
public interface BackupHelper {
/**
- * Based on oldState, determine which of the files from the application's data directory
- * need to be backed up, write them to the data stream, and fill in newState with the
- * state as it exists now.
+ * Based on <code>oldState</code>, determine which of the files from the
+ * application's data directory need to be backed up, write them to
+ * <code>data</code>, and fill in <code>newState</code> with the state as it
+ * exists now.
*/
public void performBackup(ParcelFileDescriptor oldState, BackupDataOutput data,
ParcelFileDescriptor newState);
diff --git a/core/java/android/backup/BackupHelperAgent.java b/core/java/android/backup/BackupHelperAgent.java
index dc17154f..7fb44f4 100644
--- a/core/java/android/backup/BackupHelperAgent.java
+++ b/core/java/android/backup/BackupHelperAgent.java
@@ -17,24 +17,19 @@
package android.backup;
import android.app.BackupAgent;
-import android.backup.BackupHelper;
-import android.backup.BackupHelperDispatcher;
-import android.backup.BackupDataInput;
-import android.backup.BackupDataOutput;
import android.os.ParcelFileDescriptor;
-import android.util.Log;
import java.io.IOException;
/**
- * A convenient BackupAgent wrapper class that automatically manages heterogeneous
- * data sets within the backup data, each identified by a unique key prefix. An
- * application will typically extend this class in their own backup agent. Then,
- * within the agent's onBackup() and onRestore() methods, it will call
- * {@link #addHelper(String, BackupHelper)} one or more times to specify the data
- * sets, then invoke super.onBackup() or super.onRestore() to have the BackupHelperAgent
- * implementation process the data.
- *
+ * A convenient BackupAgent wrapper class that automatically manages
+ * heterogeneous data sets within the backup data, each identified by a unique
+ * key prefix. An application will typically extend this class in their own
+ * backup agent. Then, within the agent's onBackup() and onRestore() methods, it
+ * will call {@link #addHelper(String, BackupHelper)} one or more times to
+ * specify the data sets, then invoke super.onBackup() or super.onRestore() to
+ * have the BackupHelperAgent implementation process the data.
+ * <p>
* STOPSHIP: document!
*/
public class BackupHelperAgent extends BackupAgent {
diff --git a/core/java/android/backup/BackupHelperDispatcher.java b/core/java/android/backup/BackupHelperDispatcher.java
index bf2c44d..68076db 100644
--- a/core/java/android/backup/BackupHelperDispatcher.java
+++ b/core/java/android/backup/BackupHelperDispatcher.java
@@ -19,12 +19,10 @@
import android.os.ParcelFileDescriptor;
import android.util.Log;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
import java.io.FileDescriptor;
-import java.util.TreeMap;
+import java.io.IOException;
import java.util.Map;
+import java.util.TreeMap;
/** @hide */
public class BackupHelperDispatcher {
diff --git a/core/java/android/backup/BackupManager.java b/core/java/android/backup/BackupManager.java
index 4bf59eb..2dff975 100644
--- a/core/java/android/backup/BackupManager.java
+++ b/core/java/android/backup/BackupManager.java
@@ -23,33 +23,40 @@
import android.util.Log;
/**
- * BackupManager is the interface to the system's backup service.
- * Applications simply instantiate one, and then use that instance
- * to communicate with the backup infrastructure.
- *
- * <p>When your application has made changes to data it wishes to have
- * backed up, call {@link #dataChanged()} to notify the backup service.
- * The system will then schedule a backup operation to occur in the near
- * future. Repeated calls to {@link #dataChanged()} have no further effect
- * until the backup operation actually occurs.
- *
- * <p>The backup operation itself begins with the system launching the
- * {@link android.app.BackupAgent} subclass declared in your manifest. See the
+ * BackupManager is the interface to the system's backup service. Applications
+ * simply instantiate one, and then use that instance to communicate with the
+ * backup infrastructure.
+ * <p>
+ * When an application has made changes to data which should be backed up, a
+ * call to {@link #dataChanged()} will notify the backup service. The system
+ * will then schedule a backup operation to occur in the near future. Repeated
+ * calls to {@link #dataChanged()} have no further effect until the backup
+ * operation actually occurs.
+ * <p>
+ * The backup operation itself begins with the system launching the
+ * {@link android.app.BackupAgent} subclass declared in your manifest. See the
* documentation for {@link android.app.BackupAgent} for a detailed description
* of how the backup then proceeds.
- *
- * <p>STOPSHIP more documentation here! Include the attributes:
- * android:backupAgent
- * android:allowBackup
- * android:restoreNeedsApplication
- * android:killAfterRestore
+ * <p>
+ * A simple implementation of a BackupAgent useful for backing up Preferences
+ * and files is available by using {@link android.backup.BackupHelperAgent}.
+ * <p>
+ * STOPSHIP: more documentation!
+ * <p>
+ * <b>XML attributes</b>
+ * <p>
+ * See {@link android.R.styleable#AndroidManifestApplication
+ * AndroidManifest.xml's application attributes}
+ *
+ * @attr ref android.R.styleable#AndroidManifestApplication_allowBackup
+ * @attr ref android.R.styleable#AndroidManifestApplication_backupAgent
+ * @attr ref
+ * android.R.styleable#AndroidManifestApplication_restoreNeedsApplication
+ * @attr ref android.R.styleable#AndroidManifestApplication_killAfterRestore
*/
public class BackupManager {
private static final String TAG = "BackupManager";
- /** @hide TODO: REMOVE THIS */
- public static final boolean EVEN_THINK_ABOUT_DOING_RESTORE = true;
-
private Context mContext;
private static IBackupManager sService;
@@ -78,9 +85,6 @@
* {@link android.app.BackupAgent} subclass will be scheduled when you call this method.
*/
public void dataChanged() {
- if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
- return;
- }
checkServiceBinder();
if (sService != null) {
try {
@@ -100,9 +104,6 @@
* permission if the package named in the argument is not the caller's own.
*/
public static void dataChanged(String packageName) {
- if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
- return;
- }
checkServiceBinder();
if (sService != null) {
try {
@@ -118,9 +119,6 @@
* {@link android.backup.RestoreSession} class for documentation on that process.
*/
public RestoreSession beginRestoreSession() {
- if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
- return null;
- }
RestoreSession session = null;
checkServiceBinder();
if (sService != null) {
diff --git a/core/java/android/backup/FileBackupHelper.java b/core/java/android/backup/FileBackupHelper.java
index 68b4d42..cc859e2 100644
--- a/core/java/android/backup/FileBackupHelper.java
+++ b/core/java/android/backup/FileBackupHelper.java
@@ -21,10 +21,23 @@
import android.util.Log;
import java.io.File;
-import java.io.FileDescriptor;
/**
- * STOPSHIP: document! [manages backup of a set of files; restore is totally opaque]
+ * A helper class which can be used in conjunction with
+ * {@link android.backup.BackupHelperAgent} to manage the backup of a set of
+ * files. Whenever backup is performed, all files changed since the last backup
+ * will be saved in their entirety. During the first time the backup happens,
+ * all the files in the list will be backed up. Note that this should only be
+ * used with small configuration files and not with large binary files.
+ * <p>
+ * Any files not present in the list of files during the restore procedure will
+ * be ignored. If files present in a previous version of an application are
+ * removed in subsequent versions, it is the responsibility of the developer to
+ * design a mechanism to remove those files. Otherwise files no longer needed
+ * will linger and consume space on the device.
+ * <p>
+ * STOPSHIP: document! [manages backup of a set of files; restore is totally
+ * opaque]
*/
public class FileBackupHelper extends FileBackupHelperBase implements BackupHelper {
private static final String TAG = "FileBackupHelper";
@@ -50,9 +63,16 @@
}
/**
- * Based on oldState, determine which of the files from the application's data directory
- * need to be backed up, write them to the data stream, and fill in newState with the
- * state as it exists now.
+ * Based on <code>oldState</code>, determine which of the files from the
+ * application's data directory need to be backed up, write them to the data
+ * stream, and fill in <code>newState</code> with the state as it exists
+ * now. When <code>oldState</code> is <code>null</code>, all the files will
+ * be backed up.
+ * <p>
+ * This should be called from {@link android.backup.BackupHelperAgent}
+ * directly. See
+ * {@link android.app.BackupAgent#onBackup(ParcelFileDescriptor, BackupDataOutput, ParcelFileDescriptor)}
+ * for a description of parameter meanings.
*/
public void performBackup(ParcelFileDescriptor oldState, BackupDataOutput data,
ParcelFileDescriptor newState) {
diff --git a/core/java/android/backup/FileBackupHelperBase.java b/core/java/android/backup/FileBackupHelperBase.java
index a0ff38b..7cb1ccc 100644
--- a/core/java/android/backup/FileBackupHelperBase.java
+++ b/core/java/android/backup/FileBackupHelperBase.java
@@ -22,10 +22,12 @@
import java.io.File;
import java.io.FileDescriptor;
-import java.io.FileOutputStream;
+/**
+ * Base class for the {@link android.backup.FileBackupHelper} implementation.
+ */
class FileBackupHelperBase {
- private static final String TAG = "RestoreHelperBase";
+ private static final String TAG = "FileBackupHelperBase";
int mPtr;
Context mContext;
@@ -45,8 +47,8 @@
}
/**
- * Check the parameters so the native code doens't have to throw all the exceptions
- * since it's easier to do that from java.
+ * Check the parameters so the native code doesn't have to throw all the exceptions
+ * since it's easier to do that from Java.
*/
static void performBackup_checked(ParcelFileDescriptor oldState, BackupDataOutput data,
ParcelFileDescriptor newState, String[] files, String[] keys) {
diff --git a/core/java/android/backup/SharedPreferencesBackupHelper.java b/core/java/android/backup/SharedPreferencesBackupHelper.java
index f9c97a3..7ba80db 100644
--- a/core/java/android/backup/SharedPreferencesBackupHelper.java
+++ b/core/java/android/backup/SharedPreferencesBackupHelper.java
@@ -17,13 +17,19 @@
package android.backup;
import android.content.Context;
+import android.content.SharedPreferences;
import android.os.ParcelFileDescriptor;
import android.util.Log;
import java.io.File;
-import java.io.FileDescriptor;
/**
+ * A helper class which can be used in conjunction with
+ * {@link android.backup.BackupHelperAgent} to manage the backup of
+ * {@link android.content.SharedPreferences}. Whenever backup is performed it
+ * will back up all named shared preferences which have changed since the last
+ * backup.
+ * <p>
* STOPSHIP: document!
*/
public class SharedPreferencesBackupHelper extends FileBackupHelperBase implements BackupHelper {
diff --git a/core/java/android/backup/package.html b/core/java/android/backup/package.html
new file mode 100644
index 0000000..13c0eb8
--- /dev/null
+++ b/core/java/android/backup/package.html
@@ -0,0 +1,22 @@
+<HTML>
+<BODY>
+<p>Package containing the backup and restore functionality available to
+applications. All backup management is controlled through
+{@link android.backup.BackupManager}. Individual backup functionality is
+implemented through a subclass {@link android.app.BackupAgent} and a
+simple and easy-to-use implementation is provided in
+{@link android.backup.BackupHelperAgent}.</p>
+
+<p>STOPSHIP: add more documenation and remove Dev Guide link if not written!</p>
+
+<p>The backup APIs let applications:</p>
+<ul>
+ <li>Perform backup of arbitrary data</li>
+ <li>Easily perform backup of Preferences and files</li>
+ <li>Handle restore of data</li>
+</ul>
+
+<p>For a detailed guide to using the backup APIs, see the <a
+href="{@docRoot}guide/topics/backup.html">Backup Dev Guide topic</a>.</p>
+</BODY>
+</HTML>
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index cf9c58f..e77e76f 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -664,6 +664,10 @@
* determine which channel to connect to.
* <p>The remote device will be authenticated and communication on this
* socket will be encrypted.
+ * <p>Hint: If you are connecting to a Bluetooth serial board then try
+ * using the well-known SPP UUID 00001101-0000-1000-8000-00805F9B34FB.
+ * However if you are connecting to an Android peer then please generate
+ * your own unique UUID.
* <p>Requires {@link android.Manifest.permission#BLUETOOTH}
*
* @param uuid service record uuid to lookup RFCOMM channel
diff --git a/core/java/android/content/ActiveSyncInfo.java b/core/java/android/content/ActiveSyncInfo.java
index 209dffa..b0c90a1 100644
--- a/core/java/android/content/ActiveSyncInfo.java
+++ b/core/java/android/content/ActiveSyncInfo.java
@@ -20,13 +20,46 @@
import android.os.Parcel;
import android.os.Parcelable.Creator;
-/** @hide */
+/**
+ * Information about the sync operation that is currently underway.
+ */
public class ActiveSyncInfo {
- public final int authorityId;
- public final Account account;
- public final String authority;
- public final long startTime;
-
+ private final int authorityId;
+ private final Account account;
+ private final String authority;
+ private final long startTime;
+
+ /**
+ * Get the {@link Account} that is currently being synced.
+ * @return the account
+ */
+ public Account getAccount() {
+ return new Account(account.name, account.type);
+ }
+
+ /** @hide */
+ public int getAuthorityId() {
+ return authorityId;
+ }
+
+ /**
+ * Get the authority of the provider that is currently being synced.
+ * @return the authority
+ */
+ public String getAuthority() {
+ return authority;
+ }
+
+ /**
+ * Get the start time of the current sync operation. This is represented in elapsed real time.
+ * See {@link android.os.SystemClock#elapsedRealtime()}.
+ * @return the start time in milliseconds since boot
+ */
+ public long getStartTime() {
+ return startTime;
+ }
+
+ /** @hide */
ActiveSyncInfo(int authorityId, Account account, String authority,
long startTime) {
this.authorityId = authorityId;
@@ -34,11 +67,13 @@
this.authority = authority;
this.startTime = startTime;
}
-
+
+ /** @hide */
public int describeContents() {
return 0;
}
+ /** @hide */
public void writeToParcel(Parcel parcel, int flags) {
parcel.writeInt(authorityId);
account.writeToParcel(parcel, 0);
@@ -46,13 +81,15 @@
parcel.writeLong(startTime);
}
+ /** @hide */
ActiveSyncInfo(Parcel parcel) {
authorityId = parcel.readInt();
account = new Account(parcel);
authority = parcel.readString();
startTime = parcel.readLong();
}
-
+
+ /** @hide */
public static final Creator<ActiveSyncInfo> CREATOR = new Creator<ActiveSyncInfo>() {
public ActiveSyncInfo createFromParcel(Parcel in) {
return new ActiveSyncInfo(in);
@@ -62,4 +99,4 @@
return new ActiveSyncInfo[size];
}
};
-}
\ No newline at end of file
+}
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 45f361e..1b0ef34 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -156,20 +156,17 @@
/** @hide */
public static final int SYNC_ERROR_INTERNAL = 8;
- /** @hide */
public static final int SYNC_OBSERVER_TYPE_SETTINGS = 1<<0;
- /** @hide */
public static final int SYNC_OBSERVER_TYPE_PENDING = 1<<1;
- /** @hide */
public static final int SYNC_OBSERVER_TYPE_ACTIVE = 1<<2;
/** @hide */
public static final int SYNC_OBSERVER_TYPE_STATUS = 1<<3;
/** @hide */
public static final int SYNC_OBSERVER_TYPE_ALL = 0x7fffffff;
- // Always log queries which take 100ms+; shorter queries are
+ // Always log queries which take 500ms+; shorter queries are
// sampled accordingly.
- private static final int SLOW_THRESHOLD_MILLIS = 100;
+ private static final int SLOW_THRESHOLD_MILLIS = 500;
private final Random mRandom = new Random(); // guarded by itself
public ContentResolver(Context context) {
@@ -1183,7 +1180,6 @@
/**
* If a sync is active returns the information about it, otherwise returns false.
* @return the ActiveSyncInfo for the currently active sync or null if one is not active.
- * @hide
*/
public static ActiveSyncInfo getActiveSync() {
try {
@@ -1222,7 +1218,24 @@
}
}
+ /**
+ * Request notifications when the different aspects of the SyncManager change. The
+ * different items that can be requested are:
+ * <ul>
+ * <li> {@link #SYNC_OBSERVER_TYPE_PENDING}
+ * <li> {@link #SYNC_OBSERVER_TYPE_ACTIVE}
+ * <li> {@link #SYNC_OBSERVER_TYPE_SETTINGS}
+ * </ul>
+ * The caller can set one or more of the status types in the mask for any
+ * given listener registration.
+ * @param mask the status change types that will cause the callback to be invoked
+ * @param callback observer to be invoked when the status changes
+ * @return a handle that can be used to remove the listener at a later time
+ */
public static Object addStatusChangeListener(int mask, final SyncStatusObserver callback) {
+ if (callback == null) {
+ throw new IllegalArgumentException("you passed in a null callback");
+ }
try {
ISyncStatusObserver.Stub observer = new ISyncStatusObserver.Stub() {
public void onStatusChanged(int which) throws RemoteException {
@@ -1236,7 +1249,14 @@
}
}
+ /**
+ * Remove a previously registered status change listener.
+ * @param handle the handle that was returned by {@link #addStatusChangeListener}
+ */
public static void removeStatusChangeListener(Object handle) {
+ if (handle == null) {
+ throw new IllegalArgumentException("you passed in a null handle");
+ }
try {
getContentService().removeStatusChangeListener((ISyncStatusObserver.Stub) handle);
} catch (RemoteException e) {
diff --git a/core/java/android/content/ContentService.java b/core/java/android/content/ContentService.java
index e0dfab5..b5a78fa 100644
--- a/core/java/android/content/ContentService.java
+++ b/core/java/android/content/ContentService.java
@@ -437,7 +437,7 @@
long identityToken = clearCallingIdentity();
try {
SyncManager syncManager = getSyncManager();
- if (syncManager != null) {
+ if (syncManager != null && callback != null) {
syncManager.getSyncStorageEngine().addStatusChangeListener(mask, callback);
}
} finally {
@@ -449,7 +449,7 @@
long identityToken = clearCallingIdentity();
try {
SyncManager syncManager = getSyncManager();
- if (syncManager != null) {
+ if (syncManager != null && callback != null) {
syncManager.getSyncStorageEngine().removeStatusChangeListener(callback);
}
} finally {
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 897d702..8d136f1 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -1507,7 +1507,7 @@
/**
* Use with {@link #getSystemService} to retrieve a
- * {@link android.app.DevicePolicyManager} for working with global
+ * {@link android.app.admin.DevicePolicyManager} for working with global
* device policy management.
*
* @see #getSystemService
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 607605d..90e8c14 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -34,7 +34,8 @@
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.Log;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import java.io.IOException;
import java.io.Serializable;
@@ -3480,6 +3481,20 @@
* @param name The name of the desired item.
*
* @return the value of an item that previously added with putExtra()
+ * or null if no ArrayList<CharSequence> value was found.
+ *
+ * @see #putCharSequenceArrayListExtra(String, ArrayList)
+ */
+ public ArrayList<CharSequence> getCharSequenceArrayListExtra(String name) {
+ return mExtras == null ? null : mExtras.getCharSequenceArrayList(name);
+ }
+
+ /**
+ * Retrieve extended data from the intent.
+ *
+ * @param name The name of the desired item.
+ *
+ * @return the value of an item that previously added with putExtra()
* or null if no boolean array value was found.
*
* @see #putExtra(String, boolean[])
@@ -3606,6 +3621,20 @@
* @param name The name of the desired item.
*
* @return the value of an item that previously added with putExtra()
+ * or null if no CharSequence array value was found.
+ *
+ * @see #putExtra(String, CharSequence[])
+ */
+ public CharSequence[] getCharSequenceArrayExtra(String name) {
+ return mExtras == null ? null : mExtras.getCharSequenceArray(name);
+ }
+
+ /**
+ * Retrieve extended data from the intent.
+ *
+ * @param name The name of the desired item.
+ *
+ * @return the value of an item that previously added with putExtra()
* or null if no Bundle value was found.
*
* @see #putExtra(String, Bundle)
@@ -4308,6 +4337,29 @@
* like "com.android.contacts.ShowAll".
*
* @param name The name of the extra data, with package prefix.
+ * @param value The ArrayList<CharSequence> data value.
+ *
+ * @return Returns the same Intent object, for chaining multiple calls
+ * into a single statement.
+ *
+ * @see #putExtras
+ * @see #removeExtra
+ * @see #getCharSequenceArrayListExtra(String)
+ */
+ public Intent putCharSequenceArrayListExtra(String name, ArrayList<CharSequence> value) {
+ if (mExtras == null) {
+ mExtras = new Bundle();
+ }
+ mExtras.putCharSequenceArrayList(name, value);
+ return this;
+ }
+
+ /**
+ * Add extended data to the intent. The name must include a package
+ * prefix, for example the app com.android.contacts would use names
+ * like "com.android.contacts.ShowAll".
+ *
+ * @param name The name of the extra data, with package prefix.
* @param value The Serializable data value.
*
* @return Returns the same Intent object, for chaining multiple calls
@@ -4538,6 +4590,29 @@
* like "com.android.contacts.ShowAll".
*
* @param name The name of the extra data, with package prefix.
+ * @param value The CharSequence array data value.
+ *
+ * @return Returns the same Intent object, for chaining multiple calls
+ * into a single statement.
+ *
+ * @see #putExtras
+ * @see #removeExtra
+ * @see #getCharSequenceArrayExtra(String)
+ */
+ public Intent putExtra(String name, CharSequence[] value) {
+ if (mExtras == null) {
+ mExtras = new Bundle();
+ }
+ mExtras.putCharSequenceArray(name, value);
+ return this;
+ }
+
+ /**
+ * Add extended data to the intent. The name must include a package
+ * prefix, for example the app com.android.contacts would use names
+ * like "com.android.contacts.ShowAll".
+ *
+ * @param name The name of the extra data, with package prefix.
* @param value The Bundle data value.
*
* @return Returns the same Intent object, for chaining multiple calls
diff --git a/core/java/android/content/IntentFilter.java b/core/java/android/content/IntentFilter.java
index 023c024..452fd8a 100644
--- a/core/java/android/content/IntentFilter.java
+++ b/core/java/android/content/IntentFilter.java
@@ -34,7 +34,8 @@
import android.util.Config;
import android.util.Log;
import android.util.Printer;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
/**
* Structured description of Intent values to be matched. An IntentFilter can
diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java
index 317e5a9..211a2ae 100644
--- a/core/java/android/content/SyncManager.java
+++ b/core/java/android/content/SyncManager.java
@@ -819,7 +819,7 @@
}
scheduleSyncOperation(new SyncOperation(operation.account, operation.syncSource,
operation.authority, operation.extras,
- DELAY_RETRY_SYNC_IN_PROGRESS_IN_SECONDS));
+ DELAY_RETRY_SYNC_IN_PROGRESS_IN_SECONDS * 1000));
} else if (syncResult.hasSoftError()) {
if (isLoggable) {
Log.d(TAG, "retrying sync operation because it encountered a soft error: "
@@ -982,8 +982,8 @@
ActiveSyncInfo active = mSyncStorageEngine.getActiveSync();
if (active != null) {
SyncStorageEngine.AuthorityInfo authority
- = mSyncStorageEngine.getAuthority(active.authorityId);
- final long durationInSeconds = (now - active.startTime) / 1000;
+ = mSyncStorageEngine.getAuthority(active.getAuthorityId());
+ final long durationInSeconds = (now - active.getStartTime()) / 1000;
pw.print("Active sync: ");
pw.print(authority != null ? authority.account : "<no account>");
pw.print(" ");
diff --git a/core/java/android/content/SyncOperation.java b/core/java/android/content/SyncOperation.java
index 4599165..3b3f9c1 100644
--- a/core/java/android/content/SyncOperation.java
+++ b/core/java/android/content/SyncOperation.java
@@ -19,7 +19,7 @@
public SyncStorageEngine.PendingOperation pendingOperation;
public SyncOperation(Account account, int source, String authority, Bundle extras,
- long delay) {
+ long delayInMs) {
this.account = account;
this.syncSource = source;
this.authority = authority;
@@ -33,12 +33,12 @@
removeFalseExtra(ContentResolver.SYNC_EXTRAS_EXPEDITED);
removeFalseExtra(ContentResolver.SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS);
final long now = SystemClock.elapsedRealtime();
- if (delay < 0) {
+ if (delayInMs < 0) {
this.expedited = true;
this.earliestRunTime = now;
} else {
this.expedited = false;
- this.earliestRunTime = now + delay;
+ this.earliestRunTime = now + delayInMs;
}
this.key = toKey();
}
diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java
index fcb910d..240da72 100644
--- a/core/java/android/content/SyncStorageEngine.java
+++ b/core/java/android/content/SyncStorageEngine.java
@@ -18,7 +18,7 @@
import com.android.internal.os.AtomicFile;
import com.android.internal.util.ArrayUtils;
-import com.android.common.FastXmlSerializer;
+import com.android.internal.util.FastXmlSerializer;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -664,7 +664,7 @@
}
if (mActiveSync != null) {
- AuthorityInfo ainfo = getAuthority(mActiveSync.authorityId);
+ AuthorityInfo ainfo = getAuthority(mActiveSync.getAuthorityId());
if (ainfo != null && ainfo.account.equals(account)
&& ainfo.authority.equals(authority)) {
return true;
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 2e405c1..8773f59 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -248,6 +248,19 @@
public static final int FLAG_NATIVE_DEBUGGABLE = 1<<21;
/**
+ * Value for {@link #flags}: Set to true if the application's backup
+ * agent claims to be able to handle restore data even "from the future,"
+ * i.e. from versions of the application with a versionCode greater than
+ * the one currently installed on the device.
+ *
+ * <p>If android:allowBackup is set to false or no android:backupAgent
+ * is specified, this flag will be ignored.
+ *
+ * {@hide}
+ */
+ public static final int FLAG_RESTORE_ANY_VERSION = 1<<22;
+
+ /**
* Flags associated with the application. Any combination of
* {@link #FLAG_SYSTEM}, {@link #FLAG_DEBUGGABLE}, {@link #FLAG_HAS_CODE},
* {@link #FLAG_PERSISTENT}, {@link #FLAG_FACTORY_TEST}, and
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index f793a00..399a87d 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -309,7 +309,7 @@
* MountService uses this to call into the package manager to update
* status of sdcard.
*/
- void updateExternalMediaStatus(boolean mounted);
+ boolean updateExternalMediaStatus(boolean mounted);
String nextPackageToClean(String lastPackage);
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 2edb430..dc8f386 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -530,19 +530,6 @@
public static final int INSTALL_FAILED_INTERNAL_ERROR = -110;
/**
- * Indicates the state of installation. Used by PackageManager to
- * figure out incomplete installations. Say a package is being installed
- * (the state is set to PKG_INSTALL_INCOMPLETE) and remains so till
- * the package installation is successful or unsuccesful lin which case
- * the PackageManager will no longer maintain state information associated
- * with the package. If some exception(like device freeze or battery being
- * pulled out) occurs during installation of a package, the PackageManager
- * needs this information to clean up the previously failed installation.
- */
- public static final int PKG_INSTALL_INCOMPLETE = 0;
- public static final int PKG_INSTALL_COMPLETE = 1;
-
- /**
* Flag parameter for {@link #deletePackage} to indicate that you don't want to delete the
* package's data directory.
*
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 5823560..b07bafcf 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -30,12 +30,14 @@
import android.os.Build;
import android.os.Bundle;
import android.os.PatternMatcher;
+import android.provider.Settings;
import android.util.AttributeSet;
import android.util.Config;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import java.io.File;
import java.io.IOException;
@@ -710,9 +712,10 @@
com.android.internal.R.styleable.AndroidManifest_sharedUserLabel, 0);
}
sa.recycle();
+
pkg.installLocation = sa.getInteger(
com.android.internal.R.styleable.AndroidManifest_installLocation,
- PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY);
+ PackageInfo.INSTALL_LOCATION_AUTO);
// Resource boolean are -1, so 1 means we don't know the value.
int supportsSmallScreens = 1;
@@ -1369,8 +1372,8 @@
if (allowBackup) {
ai.flags |= ApplicationInfo.FLAG_ALLOW_BACKUP;
- // backupAgent, killAfterRestore, and restoreNeedsApplication are only relevant
- // if backup is possible for the given application.
+ // backupAgent, killAfterRestore, restoreNeedsApplication, and restoreAnyVersion
+ // are only relevant if backup is possible for the given application.
String backupAgent = sa.getNonResourceString(
com.android.internal.R.styleable.AndroidManifestApplication_backupAgent);
if (backupAgent != null) {
@@ -1390,6 +1393,11 @@
false)) {
ai.flags |= ApplicationInfo.FLAG_RESTORE_NEEDS_APPLICATION;
}
+ if (sa.getBoolean(
+ com.android.internal.R.styleable.AndroidManifestApplication_restoreAnyVersion,
+ false)) {
+ ai.flags |= ApplicationInfo.FLAG_RESTORE_ANY_VERSION;
+ }
}
}
diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java
index a885820..b74c073 100644
--- a/core/java/android/content/pm/RegisteredServicesCache.java
+++ b/core/java/android/content/pm/RegisteredServicesCache.java
@@ -43,7 +43,7 @@
import java.io.FileInputStream;
import com.android.internal.os.AtomicFile;
-import com.android.common.FastXmlSerializer;
+import com.android.internal.util.FastXmlSerializer;
import com.google.android.collect.Maps;
import com.google.android.collect.Lists;
diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java
index 7f9a5c6..1070f08 100644
--- a/core/java/android/content/res/AssetManager.java
+++ b/core/java/android/content/res/AssetManager.java
@@ -24,6 +24,7 @@
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
+import java.util.HashMap;
/**
* Provides access to an application's raw asset files; see {@link Resources}
@@ -59,6 +60,8 @@
private static final String TAG = "AssetManager";
private static final boolean localLOGV = Config.LOGV || false;
+ private static final boolean DEBUG_REFS = false;
+
private static final Object sSync = new Object();
private static AssetManager sSystem = null;
@@ -72,6 +75,7 @@
private int mNumRefs = 1;
private boolean mOpen = true;
+ private HashMap<Integer, RuntimeException> mRefStacks;
/**
* Create a new AssetManager containing only the basic system assets.
@@ -82,6 +86,10 @@
*/
public AssetManager() {
synchronized (this) {
+ if (DEBUG_REFS) {
+ mNumRefs = 0;
+ incRefsLocked(this.hashCode());
+ }
init();
if (localLOGV) Log.v(TAG, "New asset manager: " + this);
ensureSystemAssets();
@@ -99,6 +107,12 @@
}
private AssetManager(boolean isSystem) {
+ if (DEBUG_REFS) {
+ synchronized (this) {
+ mNumRefs = 0;
+ incRefsLocked(this.hashCode());
+ }
+ }
init();
if (localLOGV) Log.v(TAG, "New asset manager: " + this);
}
@@ -122,7 +136,7 @@
// + ", released=" + mReleased);
if (mOpen) {
mOpen = false;
- decRefsLocked();
+ decRefsLocked(this.hashCode());
}
}
}
@@ -298,8 +312,9 @@
}
int asset = openAsset(fileName, accessMode);
if (asset != 0) {
- mNumRefs++;
- return new AssetInputStream(asset);
+ AssetInputStream res = new AssetInputStream(asset);
+ incRefsLocked(res.hashCode());
+ return res;
}
}
throw new FileNotFoundException("Asset file: " + fileName);
@@ -389,8 +404,9 @@
}
int asset = openNonAssetNative(cookie, fileName, accessMode);
if (asset != 0) {
- mNumRefs++;
- return new AssetInputStream(asset);
+ AssetInputStream res = new AssetInputStream(asset);
+ incRefsLocked(res.hashCode());
+ return res;
}
}
throw new FileNotFoundException("Asset absolute file: " + fileName);
@@ -468,16 +484,17 @@
}
int xmlBlock = openXmlAssetNative(cookie, fileName);
if (xmlBlock != 0) {
- mNumRefs++;
- return new XmlBlock(this, xmlBlock);
+ XmlBlock res = new XmlBlock(this, xmlBlock);
+ incRefsLocked(res.hashCode());
+ return res;
}
}
throw new FileNotFoundException("Asset XML file: " + fileName);
}
- /*package*/ void xmlBlockGone() {
+ /*package*/ void xmlBlockGone(int id) {
synchronized (this) {
- decRefsLocked();
+ decRefsLocked(id);
}
}
@@ -486,20 +503,34 @@
if (!mOpen) {
throw new RuntimeException("Assetmanager has been closed");
}
- mNumRefs++;
- return newTheme();
+ int res = newTheme();
+ incRefsLocked(res);
+ return res;
}
}
/*package*/ final void releaseTheme(int theme) {
synchronized (this) {
deleteTheme(theme);
- decRefsLocked();
+ decRefsLocked(theme);
}
}
protected void finalize() throws Throwable {
- destroy();
+ try {
+ if (DEBUG_REFS && mNumRefs != 0) {
+ Log.w(TAG, "AssetManager " + this
+ + " finalized with non-zero refs: " + mNumRefs);
+ if (mRefStacks != null) {
+ for (RuntimeException e : mRefStacks.values()) {
+ Log.w(TAG, "Reference from here", e);
+ }
+ }
+ }
+ destroy();
+ } finally {
+ super.finalize();
+ }
}
public final class AssetInputStream extends InputStream {
@@ -526,7 +557,7 @@
if (mAsset != 0) {
destroyAsset(mAsset);
mAsset = 0;
- decRefsLocked();
+ decRefsLocked(hashCode());
}
}
}
@@ -710,7 +741,22 @@
private native final void init();
private native final void destroy();
- private final void decRefsLocked() {
+ private final void incRefsLocked(int id) {
+ if (DEBUG_REFS) {
+ if (mRefStacks == null) {
+ mRefStacks = new HashMap<Integer, RuntimeException>();
+ RuntimeException ex = new RuntimeException();
+ ex.fillInStackTrace();
+ mRefStacks.put(this.hashCode(), ex);
+ }
+ }
+ mNumRefs++;
+ }
+
+ private final void decRefsLocked(int id) {
+ if (DEBUG_REFS && mRefStacks != null) {
+ mRefStacks.remove(id);
+ }
mNumRefs--;
//System.out.println("Dec streams: mNumRefs=" + mNumRefs
// + " mReleased=" + mReleased);
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java
index a5e39d4..0608cc0 100644
--- a/core/java/android/content/res/Resources.java
+++ b/core/java/android/content/res/Resources.java
@@ -17,7 +17,7 @@
package android.content.res;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
diff --git a/core/java/android/content/res/StringBlock.java b/core/java/android/content/res/StringBlock.java
index 2411177..5e90b91 100644
--- a/core/java/android/content/res/StringBlock.java
+++ b/core/java/android/content/res/StringBlock.java
@@ -24,7 +24,8 @@
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Typeface;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
/**
* Conveniences for retrieving data out of a compiled string resource.
diff --git a/core/java/android/content/res/TypedArray.java b/core/java/android/content/res/TypedArray.java
index 8f0003b..a7fb31d 100644
--- a/core/java/android/content/res/TypedArray.java
+++ b/core/java/android/content/res/TypedArray.java
@@ -5,7 +5,8 @@
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import java.util.Arrays;
diff --git a/core/java/android/content/res/XmlBlock.java b/core/java/android/content/res/XmlBlock.java
index f800232..ad1bfb2 100644
--- a/core/java/android/content/res/XmlBlock.java
+++ b/core/java/android/content/res/XmlBlock.java
@@ -17,7 +17,8 @@
package android.content.res;
import android.util.TypedValue;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParserException;
@@ -59,7 +60,7 @@
if (mOpenCount == 0) {
nativeDestroy(mNative);
if (mAssets != null) {
- mAssets.xmlBlockGone();
+ mAssets.xmlBlockGone(hashCode());
}
}
}
diff --git a/core/java/android/database/sqlite/SQLiteCursor.java b/core/java/android/database/sqlite/SQLiteCursor.java
index b178d4f..96ed297 100644
--- a/core/java/android/database/sqlite/SQLiteCursor.java
+++ b/core/java/android/database/sqlite/SQLiteCursor.java
@@ -62,9 +62,8 @@
/** A mapping of column names to column indices, to speed up lookups */
private Map<String, Integer> mColumnNameMap;
- /** Used to find out where a cursor was allocated in case it never got
- * released. */
- private StackTraceElement[] mStackTraceElements;
+ /** Used to find out where a cursor was allocated in case it never got released. */
+ private Throwable mStackTrace;
/**
* mMaxRead is the max items that each cursor window reads
@@ -208,11 +207,7 @@
String editTable, SQLiteQuery query) {
// The AbstractCursor constructor needs to do some setup.
super();
-
- if (SQLiteDebug.DEBUG_ACTIVE_CURSOR_FINALIZATION) {
- mStackTraceElements = new Exception().getStackTrace();
- }
-
+ mStackTrace = new Exception().fillInStackTrace();
mDatabase = db;
mDriver = driver;
mEditTable = editTable;
@@ -585,15 +580,9 @@
// if the cursor hasn't been closed yet, close it first
if (mWindow != null) {
close();
- 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, "This cursor was created in:");
- for (StackTraceElement ste : mStackTraceElements) {
- Log.d(TAG, " " + ste);
- }
- }
+ Log.e(TAG, "Finalizing a Cursor that has not been deactivated or closed. " +
+ "database = " + mDatabase.getPath() + ", table = " + mEditTable +
+ ", query = " + mQuery.mSql, mStackTrace);
SQLiteDebug.notifyActiveCursorFinalized();
} else {
if (Config.LOGV) {
diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java
index 8fd8e28..d8ccf85 100644
--- a/core/java/android/database/sqlite/SQLiteDatabase.java
+++ b/core/java/android/database/sqlite/SQLiteDatabase.java
@@ -208,11 +208,11 @@
// Things related to query logging/sampling for debugging
// slow/frequent queries during development. Always log queries
- // which take 100ms+; shorter queries are sampled accordingly.
+ // which take 500ms+; shorter queries are sampled accordingly.
// Commit statements, which are typically slow, are logged
// together with the most recently executed SQL statement, for
// disambiguation.
- private static final int QUERY_LOG_TIME_IN_MILLIS = 100;
+ private static final int QUERY_LOG_TIME_IN_MILLIS = 500;
private static final int QUERY_LOG_SQL_LENGTH = 64;
private static final String COMMIT_SQL = "COMMIT;";
private final Random mRandom = new Random();
@@ -271,7 +271,8 @@
private String mTimeOpened = null;
private String mTimeClosed = null;
- private final RuntimeException mLeakedException;
+ /** Used to find out where this object was created in case it never got closed. */
+ private Throwable mStackTrace = null;
// System property that enables logging of slow queries. Specify the threshold in ms.
private static final String LOG_SLOW_QUERIES_PROPERTY = "db.log.slow_query_threshold";
@@ -1726,13 +1727,8 @@
@Override
protected void finalize() {
if (isOpen()) {
- if (mPrograms.isEmpty()) {
- Log.e(TAG, "Leak found", mLeakedException);
- } else {
- IllegalStateException leakProgram = new IllegalStateException(
- "mPrograms size " + mPrograms.size(), mLeakedException);
- Log.e(TAG, "Leak found", leakProgram);
- }
+ Log.e(TAG, "close() was never explicitly called on database '" +
+ mPath + "' ", mStackTrace);
closeClosable();
onAllReferencesReleased();
}
@@ -1753,9 +1749,7 @@
mFlags = flags;
mPath = path;
mSlowQueryThreshold = SystemProperties.getInt(LOG_SLOW_QUERIES_PROPERTY, -1);
-
- mLeakedException = new IllegalStateException(path +
- " SQLiteDatabase created and never closed");
+ mStackTrace = new Exception().fillInStackTrace();
mFactory = factory;
dbopen(mPath, mFlags);
if (SQLiteDebug.DEBUG_SQL_CACHE) {
@@ -1908,14 +1902,6 @@
return;
}
- /* don't cache PRAGMA sql statements.
- * caching them makes sqlite return incorrect results on pragma sql execution!
- */
- String prefixSql = sql.substring(0, 6);
- if (prefixSql.toLowerCase().startsWith("pragma")) {
- return;
- }
-
SQLiteCompiledSql compiledSql = null;
synchronized(mCompiledQueries) {
// don't insert the new mapping if a mapping already exists
@@ -1981,12 +1967,6 @@
* returns null, if not found in the cache.
*/
/* package */ SQLiteCompiledSql getCompiledStatementForSql(String sql) {
- // don't look for PRAGMA sql statements in compiled-sql cache
- String prefixSql = sql.substring(0, 6);
- if (prefixSql.toLowerCase().startsWith("pragma")) {
- return null;
- }
-
SQLiteCompiledSql compiledStatement = null;
boolean cacheHit;
synchronized(mCompiledQueries) {
diff --git a/core/java/android/database/sqlite/SQLiteDirectCursorDriver.java b/core/java/android/database/sqlite/SQLiteDirectCursorDriver.java
index ca64aca..2144fc3 100644
--- a/core/java/android/database/sqlite/SQLiteDirectCursorDriver.java
+++ b/core/java/android/database/sqlite/SQLiteDirectCursorDriver.java
@@ -18,7 +18,6 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
-import android.util.Log;
/**
* A cursor driver that uses the given query directly.
@@ -26,7 +25,6 @@
* @hide
*/
public class SQLiteDirectCursorDriver implements SQLiteCursorDriver {
- private static String TAG = "SQLiteDirectCursorDriver";
private String mEditTable;
private SQLiteDatabase mDatabase;
private Cursor mCursor;
@@ -36,11 +34,6 @@
public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable) {
mDatabase = db;
mEditTable = editTable;
- //TODO remove all callers that end in ; and remove this check
- if (sql.charAt(sql.length() - 1) == ';') {
- Log.w(TAG, "Found SQL string that ends in ; -- " + sql);
- sql = sql.substring(0, sql.length() - 1);
- }
mSql = sql;
}
diff --git a/core/java/android/database/sqlite/SQLiteProgram.java b/core/java/android/database/sqlite/SQLiteProgram.java
index a3a8486..63acab7 100644
--- a/core/java/android/database/sqlite/SQLiteProgram.java
+++ b/core/java/android/database/sqlite/SQLiteProgram.java
@@ -46,19 +46,33 @@
/* package */ SQLiteProgram(SQLiteDatabase db, String sql) {
mDatabase = db;
- mSql = sql;
+ mSql = sql.trim();
db.acquireReference();
db.addSQLiteClosable(this);
this.nHandle = db.mNativeHandle;
+ // shouldn't reuse compiled-plans of PRAGMA sql statements
+ // because sqlite returns OLD values if compiled-pragma-statements are reused
+ //TODO: remove this code when sqlite fixes it (and add tests too)
+ String prefixSql = mSql.substring(0, 6);
+ if (prefixSql.toLowerCase().startsWith("pragma")) {
+ mCompiledSql = new SQLiteCompiledSql(db, sql);
+ nStatement = mCompiledSql.nStatement;
+ // since it is not in the cache, no need to acquire() it.
+ return;
+ }
+
+ // it is not pragma
mCompiledSql = db.getCompiledStatementForSql(sql);
if (mCompiledSql == null) {
// create a new compiled-sql obj
mCompiledSql = new SQLiteCompiledSql(db, sql);
// add it to the cache of compiled-sqls
- db.addToCompiledQueries(sql, mCompiledSql);
+ // but before adding it and thus making it available for anyone else to use it,
+ // make sure it is acquired by me.
mCompiledSql.acquire();
+ db.addToCompiledQueries(sql, mCompiledSql);
} else {
// it is already in compiled-sql cache.
// try to acquire the object.
@@ -68,6 +82,8 @@
// CompiledSql object. create a new one.
// finalize it when I am done with it in "this" object.
mCompiledSql = new SQLiteCompiledSql(db, sql);
+
+ // since it is not in the cache, no need to acquire() it.
}
}
nStatement = mCompiledSql.nStatement;
@@ -93,9 +109,9 @@
synchronized(mDatabase.mCompiledQueries) {
if (!mDatabase.mCompiledQueries.containsValue(mCompiledSql)) {
// it is NOT in compiled-sql cache. i.e., responsibility of
- // release this statement is on me.
+ // releasing this statement is on me.
mCompiledSql.releaseSqlStatement();
- mCompiledSql = null; // so that GC doesn't call finalize() on it
+ mCompiledSql = null;
nStatement = 0;
} else {
// it is in compiled-sql cache. reset its CompiledSql#mInUse flag
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 6dba94d..cddbec9 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -524,21 +524,24 @@
/**
* Zooms to the requested value smoothly. Driver will generate {@link
- * #ZoomCallback} for the current zoom value and whether zoom is stopped.
- * The applications can call {@link #stopSmoothZoom} to stop the zoom
- * earlier. The applications should not call startSmoothZoom again or {@link
- * android.hardware.Camera.Parameters#setZoom(int)} before the zoom stops.
+ * ZoomCallback} for the zoom value and whether zoom is stopped at the
+ * time. For example, suppose the current zoom is 0 and startSmoothZoom is
+ * called with value 3. Three ZoomCallback will be generated with zoom value
+ * 1, 2, and 3. The applications can call {@link #stopSmoothZoom} to stop
+ * the zoom earlier. The applications should not call startSmoothZoom again
+ * or change the zoom value before zoom stops. This method is supported if
+ * {@link android.hardware.Camera.Parameters#isSmoothZoomSupported} is true.
*
* @param value zoom value. The valid range is 0 to {@link
* android.hardware.Camera.Parameters#getMaxZoom}.
- * @hide
*/
public native final void startSmoothZoom(int value);
/**
* Stops the smooth zoom. The applications should wait for the {@link
- * #ZoomCallback} to know when the zoom is actually stopped.
- * @hide
+ * ZoomCallback} to know when the zoom is actually stopped. This method is
+ * supported if {@link
+ * android.hardware.Camera.Parameters#isSmoothZoomSupported} is true.
*/
public native final void stopSmoothZoom();
@@ -560,7 +563,6 @@
/**
* Handles the zoom callback.
*
- * @hide
*/
public interface ZoomCallback
{
@@ -573,7 +575,7 @@
* this is the last zoom update for the application.
*
* @param camera the Camera service object
- * @see android.hardware.Camera.Parameters#startSmoothZoom
+ * @see #startSmoothZoom(int)
*/
void onZoomUpdate(int zoomValue, boolean stopped, Camera camera);
};
@@ -581,8 +583,9 @@
/**
* Registers a callback to be invoked when the zoom value is updated by the
* camera driver during smooth zoom.
+ *
* @param cb the callback to run
- * @hide
+ * @see #startSmoothZoom(int)
*/
public final void setZoomCallback(ZoomCallback cb)
{
@@ -724,9 +727,19 @@
private static final String KEY_HORIZONTAL_VIEW_ANGLE = "horizontal-view-angle";
private static final String KEY_VERTICAL_VIEW_ANGLE = "vertical-view-angle";
private static final String KEY_EXPOSURE_COMPENSATION = "exposure-compensation";
+ private static final String KEY_MAX_EXPOSURE_COMPENSATION = "max-exposure-compensation";
+ private static final String KEY_MIN_EXPOSURE_COMPENSATION = "min-exposure-compensation";
+ private static final String KEY_EXPOSURE_COMPENSATION_STEP = "exposure-compensation-step";
+ private static final String KEY_ZOOM = "zoom";
+ private static final String KEY_MAX_ZOOM = "max-zoom";
+ private static final String KEY_ZOOM_RATIOS = "zoom-ratios";
+ private static final String KEY_ZOOM_SUPPORTED = "zoom-supported";
+ private static final String KEY_SMOOTH_ZOOM_SUPPORTED = "smooth-zoom-supported";
// Parameter key suffix for supported values.
private static final String SUPPORTED_VALUES_SUFFIX = "-values";
+ private static final String TRUE = "true";
+
// Values for white balance settings.
public static final String WHITE_BALANCE_AUTO = "auto";
public static final String WHITE_BALANCE_INCANDESCENT = "incandescent";
@@ -1543,62 +1556,89 @@
}
/**
- * Gets the current exposure compensation setting.
+ * Gets the current exposure compensation index.
*
- * @return the current exposure compensation value multiplied by 100.
- * null if exposure compensation is not supported. Ex: -100
- * means -1 EV. 130 means +1.3 EV.
- * @hide
+ * @return current exposure compensation index. The range is {@link
+ * #getMinExposureCompensation} to {@link
+ * #getMaxExposureCompensation}. 0 means exposure is not
+ * adjusted.
*/
public int getExposureCompensation() {
- return getInt(KEY_EXPOSURE_COMPENSATION);
+ return getInt(KEY_EXPOSURE_COMPENSATION, 0);
}
/**
- * Sets the exposure compensation.
+ * Sets the exposure compensation index.
*
- * @param value exposure compensation multiplied by 100. Ex: -100 means
- * -1 EV. 130 means +1.3 EV.
- * @hide
+ * @param value exposure compensation index. The valid value range is
+ * from {@link #getMinExposureCompensation} (inclusive) to {@link
+ * #getMaxExposureCompensation} (inclusive). 0 means exposure is
+ * not adjusted. Application should call
+ * getMinExposureCompensation and getMaxExposureCompensation to
+ * know if exposure compensation is supported.
*/
public void setExposureCompensation(int value) {
set(KEY_EXPOSURE_COMPENSATION, value);
}
/**
- * Gets the supported exposure compensation.
+ * Gets the maximum exposure compensation index.
*
- * @return a List of Integer constants. null if exposure compensation is
- * not supported. The list is sorted from small to large. Ex:
- * -100, -66, -33, 0, 33, 66, 100.
- * @hide
+ * @return maximum exposure compensation index (>=0). If both this
+ * method and {@link #getMinExposureCompensation} return 0,
+ * exposure compensation is not supported.
*/
- public List<Integer> getSupportedExposureCompensation() {
- return splitInt(get(KEY_EXPOSURE_COMPENSATION + SUPPORTED_VALUES_SUFFIX));
+ public int getMaxExposureCompensation() {
+ return getInt(KEY_MAX_EXPOSURE_COMPENSATION, 0);
+ }
+
+ /**
+ * Gets the minimum exposure compensation index.
+ *
+ * @return minimum exposure compensation index (<=0). If both this
+ * method and {@link #getMaxExposureCompensation} return 0,
+ * exposure compensation is not supported.
+ */
+ public int getMinExposureCompensation() {
+ return getInt(KEY_MIN_EXPOSURE_COMPENSATION, 0);
+ }
+
+ /**
+ * Gets the exposure compensation step.
+ *
+ * @return exposure compensation step. Applications can get EV by
+ * multiplying the exposure compensation index and step. Ex: if
+ * exposure compensation index is -6 and step is 0.333333333, EV
+ * is -2.
+ */
+ public float getExposureCompensationStep() {
+ return getFloat(KEY_EXPOSURE_COMPENSATION_STEP, 0);
}
/**
* Gets current zoom value. This also works when smooth zoom is in
- * progress.
+ * progress. Applications should check {@link #isZoomSupported} before
+ * using this method.
*
* @return the current zoom value. The range is 0 to {@link
- * #getMaxZoom}.
- * @hide
+ * #getMaxZoom}. 0 means the camera is not zoomed.
*/
public int getZoom() {
- return getInt("zoom");
+ return getInt(KEY_ZOOM, 0);
}
/**
- * Sets current zoom value. If {@link #startSmoothZoom(int)} has been
- * called and zoom is not stopped yet, applications should not call this
- * method.
+ * Sets current zoom value. If the camera is zoomed (value > 0), the
+ * actual picture size may be smaller than picture size setting.
+ * Applications can check the actual picture size after picture is
+ * returned from {@link PictureCallback}. The preview size remains the
+ * same in zoom. Applications should check {@link #isZoomSupported}
+ * before using this method.
*
* @param value zoom value. The valid range is 0 to {@link #getMaxZoom}.
- * @hide
*/
public void setZoom(int value) {
- set("zoom", value);
+ set(KEY_ZOOM, value);
}
/**
@@ -1606,37 +1646,37 @@
* before using other zoom methods.
*
* @return true if zoom is supported.
- * @hide
*/
public boolean isZoomSupported() {
- String str = get("zoom-supported");
- return "true".equals(str);
+ String str = get(KEY_ZOOM_SUPPORTED);
+ return TRUE.equals(str);
}
/**
* Gets the maximum zoom value allowed for snapshot. This is the maximum
* value that applications can set to {@link #setZoom(int)}.
+ * Applications should call {@link #isZoomSupported} before using this
+ * method. This value may change in different preview size. Applications
+ * should call this again after setting preview size.
*
* @return the maximum zoom value supported by the camera.
- * @hide
*/
public int getMaxZoom() {
- return getInt("max-zoom");
+ return getInt(KEY_MAX_ZOOM, 0);
}
/**
- * Gets the zoom factors of all zoom values.
+ * Gets the zoom ratios of all zoom values. Applications should check
+ * {@link #isZoomSupported} before using this method.
*
- * @return the zoom factors in 1/100 increments. Ex: a zoom of 3.2x is
- * returned as 320. Accuracy of the value is dependent on the
- * hardware implementation. The first element of the list is the
- * zoom factor of first zoom value. If the first zoom value is
- * 0, the zoom factor should be 100. The last element is the
- * zoom factor of zoom value {@link #getMaxZoom}.
- * @hide
+ * @return the zoom ratios in 1/100 increments. Ex: a zoom of 3.2x is
+ * returned as 320. The number of elements is {@link
+ * #getMaxZoom} + 1. The list is sorted from small to large. The
+ * first element is always 100. The last element is the zoom
+ * ratio of the maximum zoom value.
*/
- public List<Integer> getZoomFactors() {
- return splitInt(get("zoom-factors"));
+ public List<Integer> getZoomRatios() {
+ return splitInt(get(KEY_ZOOM_RATIOS));
}
/**
@@ -1644,11 +1684,10 @@
* this before using other smooth zoom methods.
*
* @return true if smooth zoom is supported.
- * @hide
*/
public boolean isSmoothZoomSupported() {
- String str = get("smooth-zoom-supported");
- return "true".equals(str);
+ String str = get(KEY_SMOOTH_ZOOM_SUPPORTED);
+ return TRUE.equals(str);
}
// Splits a comma delimited string to an ArrayList of String.
@@ -1680,6 +1719,24 @@
return substrings;
}
+ // Returns the value of a float parameter.
+ private float getFloat(String key, float defaultValue) {
+ try {
+ return Float.parseFloat(mMap.get(key));
+ } catch (NumberFormatException ex) {
+ return defaultValue;
+ }
+ }
+
+ // Returns the value of a integer parameter.
+ private int getInt(String key, int defaultValue) {
+ try {
+ return Integer.parseInt(mMap.get(key));
+ } catch (NumberFormatException ex) {
+ return defaultValue;
+ }
+ }
+
// Splits a comma delimited string to an ArrayList of Size.
// Return null if the passing string is null or the size is 0.
private ArrayList<Size> splitSize(String str) {
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java
index f5fed4f..317e547 100644
--- a/core/java/android/hardware/Sensor.java
+++ b/core/java/android/hardware/Sensor.java
@@ -41,7 +41,10 @@
* A constant describing an orientation sensor type.
* See {@link android.hardware.SensorEvent SensorEvent}
* for more details.
+ * @deprecated use {@link android.hardware.SensorManager#getOrientation
+ * SensorManager.getOrientation()} instead.
*/
+ @Deprecated
public static final int TYPE_ORIENTATION = 3;
/** A constant describing a gyroscope sensor type */
@@ -52,10 +55,13 @@
* for more details.
*/
public static final int TYPE_LIGHT = 5;
+
/** A constant describing a pressure sensor type */
public static final int TYPE_PRESSURE = 6;
+
/** A constant describing a temperature sensor type */
public static final int TYPE_TEMPERATURE = 7;
+
/**
* A constant describing an proximity sensor type.
* See {@link android.hardware.SensorEvent SensorEvent}
diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java
index 32d5691..9a9f0bf 100644
--- a/core/java/android/hardware/SensorEvent.java
+++ b/core/java/android/hardware/SensorEvent.java
@@ -68,27 +68,30 @@
* All values are angles in degrees.
*
* <p>values[0]: Azimuth, angle between the magnetic north direction and
- * the Y axis, around the Z axis (0 to 359).
+ * the Y axis, around the Z axis (0 to 359).
* 0=North, 90=East, 180=South, 270=West
- *
+ *
* <p>values[1]: Pitch, rotation around X axis (-180 to 180),
* with positive values when the z-axis moves <b>toward</b> the y-axis.
*
* <p>values[2]: Roll, rotation around Y axis (-90 to 90), with
- * positive values when the x-axis moves <b>away</b> from the z-axis.
+ * positive values when the x-axis moves <b>toward</b> the z-axis.
*
+ * <p><b>Important note:</b> For historical reasons the roll angle is
+ * positive in the clockwise direction (mathematically speaking, it
+ * should be positive in the counter-clockwise direction).
+ *
* <p><b>Note:</b> This definition is different from <b>yaw, pitch and
* roll</b> used in aviation where the X axis is along the long side of
* the plane (tail to nose).
- *
- * <p><b>Note:</b> It is preferable to use
+ *
+ * <p><b>Note:</b> This sensor type exists for legacy reasons, please use
* {@link android.hardware.SensorManager#getRotationMatrix
* getRotationMatrix()} in conjunction with
* {@link android.hardware.SensorManager#remapCoordinateSystem
* remapCoordinateSystem()} and
* {@link android.hardware.SensorManager#getOrientation getOrientation()}
- * to compute these values; while it may be more expensive, it is usually
- * more accurate.
+ * to compute these values instead.
*
* <p>{@link android.hardware.Sensor#TYPE_ACCELEROMETER Sensor.TYPE_ACCELEROMETER}:<p>
* All values are in SI units (m/s^2) and measure the acceleration applied
diff --git a/core/java/android/hardware/SensorManager.java b/core/java/android/hardware/SensorManager.java
index 8eed9f7..98172e6 100644
--- a/core/java/android/hardware/SensorManager.java
+++ b/core/java/android/hardware/SensorManager.java
@@ -1179,23 +1179,27 @@
*
* <p>When the rotation matrix is used for drawing (for instance with
* OpenGL ES), it usually <b>doesn't need</b> to be transformed by this
- * function, unless the screen is physically rotated, such as when used
- * in landscape mode.
+ * function, unless the screen is physically rotated, in which case you
+ * can use {@link android.view.Display#getRotation() Display.getRotation()}
+ * to retrieve the current rotation of the screen. Note that because the
+ * user is generally free to rotate their screen, you often should
+ * consider the rotation in deciding the parameters to use here.
*
* <p><u>Examples:</u><p>
*
* <li>Using the camera (Y axis along the camera's axis) for an augmented
- * reality application where the rotation angles are needed :</li><p>
+ * reality application where the rotation angles are needed: </li><p>
*
* <code>remapCoordinateSystem(inR, AXIS_X, AXIS_Z, outR);</code><p>
*
- * <li>Using the device as a mechanical compass in landscape mode:</li><p>
+ * <li>Using the device as a mechanical compass when rotation is
+ * {@link android.view.Surface#ROTATION_90 Surface.ROTATION_90}:</li><p>
*
* <code>remapCoordinateSystem(inR, AXIS_Y, AXIS_MINUS_X, outR);</code><p>
*
- * Beware of the above example. This call is needed only if the device is
- * physically used in landscape mode to calculate the rotation angles (see
- * {@link #getOrientation}).
+ * Beware of the above example. This call is needed only to account for
+ * a rotation from its natural orientation when calculating the
+ * rotation angles (see {@link #getOrientation}).
* If the rotation matrix is also used for rendering, it may not need to
* be transformed, for instance if your {@link android.app.Activity
* Activity} is running in landscape mode.
@@ -1302,6 +1306,8 @@
* <li>values[1]: <i>pitch</i>, rotation around the X axis.</li>
* <li>values[2]: <i>roll</i>, rotation around the Y axis.</li>
* <p>
+ * All three angles above are in <b>radians</b> and <b>positive</b> in the
+ * <b>counter-clockwise</b> direction.
*
* @param R rotation matrix see {@link #getRotationMatrix}.
* @param values an array of 3 floats to hold the result.
@@ -1441,8 +1447,9 @@
values[3] = x;
values[4] = y;
values[5] = z;
- // TODO: add support for 180 and 270 orientations
- if (orientation == Surface.ROTATION_90) {
+
+ if ((orientation & Surface.ROTATION_90) != 0) {
+ // handles 90 and 270 rotation
switch (sensor) {
case SENSOR_ACCELEROMETER:
case SENSOR_MAGNETIC_FIELD:
@@ -1458,6 +1465,26 @@
break;
}
}
+ if ((orientation & Surface.ROTATION_180) != 0) {
+ x = values[0];
+ y = values[1];
+ z = values[2];
+ // handles 180 (flip) and 270 (flip + 90) rotation
+ switch (sensor) {
+ case SENSOR_ACCELEROMETER:
+ case SENSOR_MAGNETIC_FIELD:
+ values[0] =-x;
+ values[1] =-y;
+ values[2] = z;
+ break;
+ case SENSOR_ORIENTATION:
+ case SENSOR_ORIENTATION_RAW:
+ values[0] = (x >= 180) ? (x - 180) : (x + 180);
+ values[1] =-y;
+ values[2] =-z;
+ break;
+ }
+ }
}
}
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index badb767..c76aca1 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -332,10 +332,10 @@
/**
* Sets the value of the setting for background data usage.
- *
+ *
* @param allowBackgroundData Whether an application should use data while
* it is in the background.
- *
+ *
* @attr ref android.Manifest.permission#CHANGE_BACKGROUND_DATA_SETTING
* @see #getBackgroundDataSetting()
* @hide
@@ -346,7 +346,35 @@
} catch (RemoteException e) {
}
}
-
+
+ /**
+ * Gets the value of the setting for enabling Mobile data.
+ *
+ * @return Whether mobile data is enabled.
+ * @hide
+ */
+ public boolean getMobileDataEnabled() {
+ try {
+ return mService.getMobileDataEnabled();
+ } catch (RemoteException e) {
+ return true;
+ }
+ }
+
+ /**
+ * Sets the persisted value for enabling/disabling Mobile data.
+ *
+ * @param allowMobileData Whether the mobile data connection should be
+ * used or not.
+ * @hide
+ */
+ public void setMobileDataEnabled(boolean enabled) {
+ try {
+ mService.setMobileDataEnabled(enabled);
+ } catch (RemoteException e) {
+ }
+ }
+
/**
* Don't allow use of default constructor.
*/
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index 508e9c3a..2514693 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -51,6 +51,10 @@
void setBackgroundDataSetting(boolean allowBackgroundData);
+ boolean getMobileDataEnabled();
+
+ void setMobileDataEnabled(boolean enabled);
+
boolean tether(String iface);
boolean untether(String iface);
diff --git a/core/java/android/net/InterfaceConfiguration.java b/core/java/android/net/InterfaceConfiguration.java
index 9aa23fe..915c5d7 100644
--- a/core/java/android/net/InterfaceConfiguration.java
+++ b/core/java/android/net/InterfaceConfiguration.java
@@ -45,10 +45,10 @@
}
private static void putAddress(StringBuffer buf, int addr) {
- buf.append(addr & 0xff).append('.').
- append((addr >>>= 8) & 0xff).append('.').
- append((addr >>>= 8) & 0xff).append('.').
- append((addr >>>= 8) & 0xff);
+ buf.append((addr >> 24) & 0xff).append('.').
+ append((addr >> 16) & 0xff).append('.').
+ append((addr >> 8) & 0xff).append('.').
+ append(addr & 0xff);
}
/** Implement the Parcelable interface {@hide} */
diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java
index b254961..b59e279 100644
--- a/core/java/android/net/MobileDataStateTracker.java
+++ b/core/java/android/net/MobileDataStateTracker.java
@@ -48,6 +48,7 @@
private ITelephony mPhoneService;
private String mApnType;
+ private String mApnTypeToWatchFor;
private String mApnName;
private boolean mEnabled;
private BroadcastReceiver mStateReceiver;
@@ -65,6 +66,12 @@
TelephonyManager.getDefault().getNetworkType(), tag,
TelephonyManager.getDefault().getNetworkTypeName());
mApnType = networkTypeToApnType(netType);
+ if (TextUtils.equals(mApnType, Phone.APN_TYPE_HIPRI)) {
+ mApnTypeToWatchFor = Phone.APN_TYPE_DEFAULT;
+ } else {
+ mApnTypeToWatchFor = mApnType;
+ }
+
mPhoneService = null;
if(netType == ConnectivityManager.TYPE_MOBILE) {
mEnabled = true;
@@ -122,7 +129,7 @@
String[] list = typeList.split(",");
for(int i=0; i< list.length; i++) {
- if (TextUtils.equals(list[i], mApnType) ||
+ if (TextUtils.equals(list[i], mApnTypeToWatchFor) ||
TextUtils.equals(list[i], Phone.APN_TYPE_ALL)) {
return true;
}
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index f959fee..6941e57 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -16,11 +16,12 @@
package android.net;
+import com.android.internal.net.DomainNameValidator;
+
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;
diff --git a/core/java/android/net/WebAddress.java b/core/java/android/net/WebAddress.java
index fa13894..a572f60 100644
--- a/core/java/android/net/WebAddress.java
+++ b/core/java/android/net/WebAddress.java
@@ -16,7 +16,7 @@
package android.net;
-import static com.android.common.Patterns.GOOD_IRI_CHAR;
+import static android.util.Patterns.GOOD_IRI_CHAR;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
diff --git a/common/java/com/android/common/AndroidHttpClient.java b/core/java/android/net/http/AndroidHttpClient.java
similarity index 98%
rename from common/java/com/android/common/AndroidHttpClient.java
rename to core/java/android/net/http/AndroidHttpClient.java
index 4c65eb0..3517737 100644
--- a/common/java/com/android/common/AndroidHttpClient.java
+++ b/core/java/android/net/http/AndroidHttpClient.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.common;
+package android.net.http;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
@@ -36,7 +36,6 @@
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
-import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.RequestWrapper;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
@@ -55,7 +54,6 @@
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import java.net.URI;
-import java.security.KeyManagementException;
import android.content.Context;
import android.content.ContentResolver;
diff --git a/core/java/android/net/http/CertificateChainValidator.java b/core/java/android/net/http/CertificateChainValidator.java
index e1327dd..c527fe4 100644
--- a/core/java/android/net/http/CertificateChainValidator.java
+++ b/core/java/android/net/http/CertificateChainValidator.java
@@ -16,7 +16,8 @@
package android.net.http;
-import com.android.common.DomainNameValidator;
+
+import com.android.internal.net.DomainNameValidator;
import org.apache.harmony.xnet.provider.jsse.SSLParameters;
diff --git a/common/java/com/android/common/HttpDateTime.java b/core/java/android/net/http/HttpDateTime.java
similarity index 98%
rename from common/java/com/android/common/HttpDateTime.java
rename to core/java/android/net/http/HttpDateTime.java
index f4052cc..c7a31ee 100644
--- a/common/java/com/android/common/HttpDateTime.java
+++ b/core/java/android/net/http/HttpDateTime.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.common;
+package android.net.http;
import android.text.format.Time;
@@ -22,8 +22,9 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
-/** {@hide} */
+/**
+ * Helper for parsing an HTTP date.
+ */
public final class HttpDateTime {
/*
diff --git a/core/java/android/os/Bundle.java b/core/java/android/os/Bundle.java
index a91655f..d6fe107 100644
--- a/core/java/android/os/Bundle.java
+++ b/core/java/android/os/Bundle.java
@@ -525,6 +525,18 @@
}
/**
+ * Inserts an ArrayList<CharSequence> value into the mapping of this Bundle, replacing
+ * any existing value for the given key. Either key or value may be null.
+ *
+ * @param key a String, or null
+ * @param value an ArrayList<CharSequence> object, or null
+ */
+ public void putCharSequenceArrayList(String key, ArrayList<CharSequence> value) {
+ unparcel();
+ mMap.put(key, value);
+ }
+
+ /**
* Inserts a Serializable value into the mapping of this Bundle, replacing
* any existing value for the given key. Either key or value may be null.
*
@@ -645,6 +657,18 @@
}
/**
+ * Inserts a CharSequence array value into the mapping of this Bundle, replacing
+ * any existing value for the given key. Either key or value may be null.
+ *
+ * @param key a String, or null
+ * @param value a CharSequence array object, or null
+ */
+ public void putCharSequenceArray(String key, CharSequence[] value) {
+ unparcel();
+ mMap.put(key, value);
+ }
+
+ /**
* Inserts a Bundle value into the mapping of this Bundle, replacing
* any existing value for the given key. Either key or value may be null.
*
@@ -1186,6 +1210,28 @@
* value is explicitly associated with the key.
*
* @param key a String, or null
+ * @return an ArrayList<CharSequence> value, or null
+ */
+ public ArrayList<CharSequence> getCharSequenceArrayList(String key) {
+ unparcel();
+ Object o = mMap.get(key);
+ if (o == null) {
+ return null;
+ }
+ try {
+ return (ArrayList<CharSequence>) o;
+ } catch (ClassCastException e) {
+ typeWarning(key, o, "ArrayList<CharSequence>", e);
+ return null;
+ }
+ }
+
+ /**
+ * Returns the value associated with the given key, or null if
+ * no mapping of the desired type exists for the given key or a null
+ * value is explicitly associated with the key.
+ *
+ * @param key a String, or null
* @return a boolean[] value, or null
*/
public boolean[] getBooleanArray(String key) {
@@ -1384,6 +1430,28 @@
* value is explicitly associated with the key.
*
* @param key a String, or null
+ * @return a CharSequence[] value, or null
+ */
+ public CharSequence[] getCharSequenceArray(String key) {
+ unparcel();
+ Object o = mMap.get(key);
+ if (o == null) {
+ return null;
+ }
+ try {
+ return (CharSequence[]) o;
+ } catch (ClassCastException e) {
+ typeWarning(key, o, "CharSequence[]", e);
+ return null;
+ }
+ }
+
+ /**
+ * Returns the value associated with the given key, or null if
+ * no mapping of the desired type exists for the given key or a null
+ * value is explicitly associated with the key.
+ *
+ * @param key a String, or null
* @return an IBinder value, or null
*
* @deprecated
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java
index 9ee251e..a4c595d 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -541,6 +541,14 @@
public static int getGlobalFreedSize() {
return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_FREED_BYTES);
}
+ public static int getGlobalClassInitCount() {
+ /* number of classes that have been successfully initialized */
+ return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_CLASS_INIT_COUNT);
+ }
+ public static int getGlobalClassInitTime() {
+ /* cumulative elapsed time for class initialization, in usec */
+ return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_CLASS_INIT_TIME);
+ }
public static int getGlobalExternalAllocCount() {
return VMDebug.getAllocCount(VMDebug.KIND_GLOBAL_EXT_ALLOCATED_OBJECTS);
}
@@ -584,6 +592,12 @@
public static void resetGlobalFreedSize() {
VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_FREED_BYTES);
}
+ public static void resetGlobalClassInitCount() {
+ VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_CLASS_INIT_COUNT);
+ }
+ public static void resetGlobalClassInitTime() {
+ VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_CLASS_INIT_TIME);
+ }
public static void resetGlobalExternalAllocCount() {
VMDebug.resetAllocCount(VMDebug.KIND_GLOBAL_EXT_ALLOCATED_OBJECTS);
}
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index 6cfccee..8ad600c 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -212,6 +212,7 @@
private static final int VAL_SERIALIZABLE = 21;
private static final int VAL_SPARSEBOOLEANARRAY = 22;
private static final int VAL_BOOLEANARRAY = 23;
+ private static final int VAL_CHARSEQUENCEARRAY = 24;
private static final int EX_SECURITY = -1;
private static final int EX_BAD_PARCELABLE = -2;
@@ -411,6 +412,15 @@
public final native void writeString(String val);
/**
+ * Write a CharSequence value into the parcel at the current dataPosition(),
+ * growing dataCapacity() if needed.
+ * @hide
+ */
+ public final void writeCharSequence(CharSequence val) {
+ TextUtils.writeToParcel(val, this, 0);
+ }
+
+ /**
* Write an object into the parcel at the current dataPosition(),
* growing dataCapacity() if needed.
*/
@@ -827,6 +837,21 @@
}
}
+ /**
+ * @hide
+ */
+ public final void writeCharSequenceArray(CharSequence[] val) {
+ if (val != null) {
+ int N = val.length;
+ writeInt(N);
+ for (int i=0; i<N; i++) {
+ writeCharSequence(val[i]);
+ }
+ } else {
+ writeInt(-1);
+ }
+ }
+
public final IBinder[] createBinderArray() {
int N = readInt();
if (N >= 0) {
@@ -1045,7 +1070,7 @@
} else if (v instanceof CharSequence) {
// Must be after String
writeInt(VAL_CHARSEQUENCE);
- TextUtils.writeToParcel((CharSequence) v, this, 0);
+ writeCharSequence((CharSequence) v);
} else if (v instanceof List) {
writeInt(VAL_LIST);
writeList((List) v);
@@ -1061,6 +1086,10 @@
} else if (v instanceof String[]) {
writeInt(VAL_STRINGARRAY);
writeStringArray((String[]) v);
+ } else if (v instanceof CharSequence[]) {
+ // Must be after String[] and before Object[]
+ writeInt(VAL_CHARSEQUENCEARRAY);
+ writeCharSequenceArray((CharSequence[]) v);
} else if (v instanceof IBinder) {
writeInt(VAL_IBINDER);
writeStrongBinder((IBinder) v);
@@ -1257,6 +1286,14 @@
public final native String readString();
/**
+ * Read a CharSequence value from the parcel at the current dataPosition().
+ * @hide
+ */
+ public final CharSequence readCharSequence() {
+ return TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(this);
+ }
+
+ /**
* Read an object from the parcel at the current dataPosition().
*/
public final native IBinder readStrongBinder();
@@ -1389,6 +1426,27 @@
}
/**
+ * Read and return a CharSequence[] object from the parcel.
+ * {@hide}
+ */
+ public final CharSequence[] readCharSequenceArray() {
+ CharSequence[] array = null;
+
+ int length = readInt();
+ if (length >= 0)
+ {
+ array = new CharSequence[length];
+
+ for (int i = 0 ; i < length ; i++)
+ {
+ array[i] = readCharSequence();
+ }
+ }
+
+ return array;
+ }
+
+ /**
* Read and return a new ArrayList object from the parcel at the current
* dataPosition(). Returns null if the previously written list object was
* null. The given class loader will be used to load any enclosed
@@ -1728,7 +1786,7 @@
return readInt() == 1;
case VAL_CHARSEQUENCE:
- return TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(this);
+ return readCharSequence();
case VAL_LIST:
return readArrayList(loader);
@@ -1742,6 +1800,9 @@
case VAL_STRINGARRAY:
return readStringArray();
+ case VAL_CHARSEQUENCEARRAY:
+ return readCharSequenceArray();
+
case VAL_IBINDER:
return readStrongBinder();
diff --git a/core/java/android/os/storage/IMountService.aidl b/core/java/android/os/storage/IMountService.aidl
index 79a6cfe..ad4cb10 100644
--- a/core/java/android/os/storage/IMountService.aidl
+++ b/core/java/android/os/storage/IMountService.aidl
@@ -45,8 +45,10 @@
/**
* Enables / disables USB mass storage.
+ * The caller should check actual status of enabling/disabling
+ * USB mass storage via StorageEventListener.
*/
- int setUsbMassStorageEnabled(boolean enable);
+ void setUsbMassStorageEnabled(boolean enable);
/**
* Returns true if a USB mass storage host is enabled (media is shared)
@@ -61,9 +63,12 @@
/**
* Safely unmount external storage at given mount point.
- * Returns an int consistent with MountServiceResultCode
+ * The unmount is an asynchronous operation. Applications
+ * should register StorageEventListener for storage related
+ * status changes.
+ *
*/
- int unmountVolume(String mountPoint, boolean force);
+ void unmountVolume(String mountPoint, boolean force);
/**
* Format external storage given a mount point.
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index e421ea5..b49979c 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -243,30 +243,24 @@
/**
* Enables USB Mass Storage (UMS) on the device.
- * @return an integer value representing the outcome of the operation.
- * @see android.os.storage.StorageResultCode
*/
- public int enableUsbMassStorage() {
+ public void enableUsbMassStorage() {
try {
- return mMountService.setUsbMassStorageEnabled(true);
+ mMountService.setUsbMassStorageEnabled(true);
} catch (Exception ex) {
Log.e(TAG, "Failed to enable UMS", ex);
}
- return StorageResultCode.OperationFailedInternalError;
}
/**
* Disables USB Mass Storage (UMS) on the device.
- * @return an integer value representing the outcome of the operation.
- * @see android.os.storage.StorageResultCode
*/
- public int disableUsbMassStorage() {
+ public void disableUsbMassStorage() {
try {
- return mMountService.setUsbMassStorageEnabled(false);
+ mMountService.setUsbMassStorageEnabled(false);
} catch (Exception ex) {
Log.e(TAG, "Failed to disable UMS", ex);
}
- return StorageResultCode.OperationFailedInternalError;
}
/**
diff --git a/core/java/android/pim/EventRecurrence.java b/core/java/android/pim/EventRecurrence.java
index 3ea9b4a..56c4f7a 100644
--- a/core/java/android/pim/EventRecurrence.java
+++ b/core/java/android/pim/EventRecurrence.java
@@ -16,7 +16,6 @@
package android.pim;
-import android.content.res.Resources;
import android.text.TextUtils;
import android.text.format.Time;
@@ -325,55 +324,6 @@
return s.toString();
}
- public String getRepeatString() {
- Resources r = Resources.getSystem();
-
- // TODO Implement "Until" portion of string, as well as custom settings
- switch (this.freq) {
- case DAILY:
- return r.getString(com.android.internal.R.string.daily);
- case WEEKLY: {
- if (repeatsOnEveryWeekDay()) {
- return r.getString(com.android.internal.R.string.every_weekday);
- } else {
- String format = r.getString(com.android.internal.R.string.weekly);
- StringBuilder days = new StringBuilder();
-
- // Do one less iteration in the loop so the last element is added out of the
- // loop. This is done so the comma is not placed after the last item.
- int count = this.bydayCount - 1;
- if (count >= 0) {
- for (int i = 0 ; i < count ; i++) {
- days.append(dayToString(r, this.byday[i]));
- days.append(",");
- }
- days.append(dayToString(r, this.byday[count]));
-
- return String.format(format, days.toString());
- }
-
- // There is no "BYDAY" specifier, so use the day of the
- // first event. For this to work, the setStartDate()
- // method must have been used by the caller to set the
- // date of the first event in the recurrence.
- if (startDate == null) {
- return null;
- }
-
- int day = timeDay2Day(startDate.weekDay);
- return String.format(format, dayToString(r, day));
- }
- }
- case MONTHLY: {
- return r.getString(com.android.internal.R.string.monthly);
- }
- case YEARLY:
- return r.getString(com.android.internal.R.string.yearly);
- }
-
- return null;
- }
-
public boolean repeatsOnEveryWeekDay() {
if (this.freq != WEEKLY) {
return false;
@@ -405,17 +355,4 @@
return true;
}
-
- private String dayToString(Resources r, int day) {
- switch (day) {
- case SU: return r.getString(com.android.internal.R.string.day_of_week_long_sunday);
- case MO: return r.getString(com.android.internal.R.string.day_of_week_long_monday);
- case TU: return r.getString(com.android.internal.R.string.day_of_week_long_tuesday);
- case WE: return r.getString(com.android.internal.R.string.day_of_week_long_wednesday);
- case TH: return r.getString(com.android.internal.R.string.day_of_week_long_thursday);
- case FR: return r.getString(com.android.internal.R.string.day_of_week_long_friday);
- case SA: return r.getString(com.android.internal.R.string.day_of_week_long_saturday);
- default: throw new IllegalArgumentException("bad day argument: " + day);
- }
- }
}
diff --git a/core/java/android/pim/RecurrenceSet.java b/core/java/android/pim/RecurrenceSet.java
index 5d09fb5..635323e 100644
--- a/core/java/android/pim/RecurrenceSet.java
+++ b/core/java/android/pim/RecurrenceSet.java
@@ -18,7 +18,6 @@
import android.content.ContentValues;
import android.database.Cursor;
-import android.os.Bundle;
import android.provider.Calendar;
import android.text.TextUtils;
import android.text.format.Time;
@@ -26,6 +25,7 @@
import android.util.Log;
import java.util.List;
+import java.util.regex.Pattern;
/**
* Basic information about a recurrence, following RFC 2445 Section 4.8.5.
@@ -36,6 +36,7 @@
private final static String TAG = "CalendarProvider";
private final static String RULE_SEPARATOR = "\n";
+ private final static String FOLDING_SEPARATOR = "\n ";
// TODO: make these final?
public EventRecurrence[] rrules = null;
@@ -309,7 +310,8 @@
String rdateStr = values.getAsString(Calendar.Events.RDATE);
String exruleStr = values.getAsString(Calendar.Events.EXRULE);
String exdateStr = values.getAsString(Calendar.Events.EXDATE);
- boolean allDay = values.getAsInteger(Calendar.Events.ALL_DAY) == 1;
+ Integer allDayInteger = values.getAsInteger(Calendar.Events.ALL_DAY);
+ boolean allDay = (null != allDayInteger) ? (allDayInteger == 1) : false;
if ((dtstart == -1) ||
(TextUtils.isEmpty(duration))||
@@ -361,7 +363,7 @@
if (TextUtils.isEmpty(ruleStr)) {
return;
}
- String[] rrules = ruleStr.split(RULE_SEPARATOR);
+ String[] rrules = getRuleStrings(ruleStr);
for (String rrule : rrules) {
ICalendar.Property prop = new ICalendar.Property(propertyName);
prop.setValue(rrule);
@@ -369,6 +371,52 @@
}
}
+ private static String[] getRuleStrings(String ruleStr) {
+ if (null == ruleStr) {
+ return new String[0];
+ }
+ String unfoldedRuleStr = unfold(ruleStr);
+ String[] split = unfoldedRuleStr.split(RULE_SEPARATOR);
+ int count = split.length;
+ for (int n = 0; n < count; n++) {
+ split[n] = fold(split[n]);
+ }
+ return split;
+ }
+
+
+ private static final Pattern IGNORABLE_ICAL_WHITESPACE_RE =
+ Pattern.compile("(?:\\r\\n?|\\n)[ \t]");
+
+ private static final Pattern FOLD_RE = Pattern.compile(".{75}");
+
+ /**
+ * fold and unfolds ical content lines as per RFC 2445 section 4.1.
+ *
+ * <h3>4.1 Content Lines</h3>
+ *
+ * <p>The iCalendar object is organized into individual lines of text, called
+ * content lines. Content lines are delimited by a line break, which is a CRLF
+ * sequence (US-ASCII decimal 13, followed by US-ASCII decimal 10).
+ *
+ * <p>Lines of text SHOULD NOT be longer than 75 octets, excluding the line
+ * break. Long content lines SHOULD be split into a multiple line
+ * representations using a line "folding" technique. That is, a long line can
+ * be split between any two characters by inserting a CRLF immediately
+ * followed by a single linear white space character (i.e., SPACE, US-ASCII
+ * decimal 32 or HTAB, US-ASCII decimal 9). Any sequence of CRLF followed
+ * immediately by a single linear white space character is ignored (i.e.,
+ * removed) when processing the content type.
+ */
+ public static String fold(String unfoldedIcalContent) {
+ return FOLD_RE.matcher(unfoldedIcalContent).replaceAll("$0\r\n ");
+ }
+
+ public static String unfold(String foldedIcalContent) {
+ return IGNORABLE_ICAL_WHITESPACE_RE.matcher(
+ foldedIcalContent).replaceAll("");
+ }
+
private static void addPropertyForDateStr(ICalendar.Component component,
String propertyName,
String dateStr) {
diff --git a/core/java/android/pim/vcard/VCardComposer.java b/core/java/android/pim/vcard/VCardComposer.java
index 2eb25954..194fe33 100644
--- a/core/java/android/pim/vcard/VCardComposer.java
+++ b/core/java/android/pim/vcard/VCardComposer.java
@@ -26,8 +26,6 @@
import android.net.Uri;
import android.os.RemoteException;
import android.pim.vcard.exception.VCardException;
-import android.provider.CallLog;
-import android.provider.CallLog.Calls;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.RawContacts;
@@ -44,8 +42,6 @@
import android.provider.ContactsContract.CommonDataKinds.StructuredName;
import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
import android.provider.ContactsContract.CommonDataKinds.Website;
-import android.text.TextUtils;
-import android.text.format.Time;
import android.util.CharsetUtils;
import android.util.Log;
@@ -60,7 +56,6 @@
import java.lang.reflect.Method;
import java.nio.charset.UnsupportedCharsetException;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -125,12 +120,6 @@
public static final String VCARD_TYPE_STRING_DOCOMO = "docomo";
- // Property for call log entry
- private static final String VCARD_PROPERTY_X_TIMESTAMP = "X-IRMC-CALL-DATETIME";
- private static final String VCARD_PROPERTY_CALLTYPE_INCOMING = "INCOMING";
- private static final String VCARD_PROPERTY_CALLTYPE_OUTGOING = "OUTGOING";
- private static final String VCARD_PROPERTY_CALLTYPE_MISSED = "MISSED";
-
private static final String SHIFT_JIS = "SHIFT_JIS";
private static final String UTF_8 = "UTF-8";
@@ -275,30 +264,14 @@
private final String mCharsetString;
private boolean mTerminateIsCalled;
- final private List<OneEntryHandler> mHandlerList;
+ private final List<OneEntryHandler> mHandlerList;
private String mErrorReason = NO_ERROR;
- private boolean mIsCallLogComposer;
-
private static final String[] sContactsProjection = new String[] {
Contacts._ID,
};
- /** The projection to use when querying the call log table */
- private static final String[] sCallLogProjection = new String[] {
- Calls.NUMBER, Calls.DATE, Calls.TYPE, Calls.CACHED_NAME, Calls.CACHED_NUMBER_TYPE,
- Calls.CACHED_NUMBER_LABEL
- };
- private static final int NUMBER_COLUMN_INDEX = 0;
- private static final int DATE_COLUMN_INDEX = 1;
- private static final int CALL_TYPE_COLUMN_INDEX = 2;
- private static final int CALLER_NAME_COLUMN_INDEX = 3;
- private static final int CALLER_NUMBERTYPE_COLUMN_INDEX = 4;
- private static final int CALLER_NUMBERLABEL_COLUMN_INDEX = 5;
-
- private static final String FLAG_TIMEZONE_UTC = "Z";
-
public VCardComposer(Context context) {
this(context, VCardConfig.VCARD_TYPE_DEFAULT, true);
}
@@ -377,6 +350,7 @@
if (contentUri == null) {
return false;
}
+
if (mCareHandlerErrors) {
List<OneEntryHandler> finishedList = new ArrayList<OneEntryHandler>(
mHandlerList.size());
@@ -396,10 +370,7 @@
}
final String[] projection;
- if (CallLog.Calls.CONTENT_URI.equals(contentUri)) {
- projection = sCallLogProjection;
- mIsCallLogComposer = true;
- } else if (Contacts.CONTENT_URI.equals(contentUri) ||
+ if (Contacts.CONTENT_URI.equals(contentUri) ||
CONTACTS_TEST_CONTENT_URI.equals(contentUri)) {
projection = sContactsProjection;
} else {
@@ -426,11 +397,7 @@
return false;
}
- if (mIsCallLogComposer) {
- mIdColumn = -1;
- } else {
- mIdColumn = mCursor.getColumnIndex(Contacts._ID);
- }
+ mIdColumn = mCursor.getColumnIndex(Contacts._ID);
return true;
}
@@ -448,19 +415,14 @@
mErrorReason = FAILURE_REASON_NOT_INITIALIZED;
return false;
}
- String name = null;
String vcard;
try {
- if (mIsCallLogComposer) {
- vcard = createOneCallLogEntryInternal();
+ if (mIdColumn >= 0) {
+ vcard = createOneEntryInternal(mCursor.getString(mIdColumn),
+ getEntityIteratorMethod);
} else {
- if (mIdColumn >= 0) {
- vcard = createOneEntryInternal(mCursor.getString(mIdColumn),
- getEntityIteratorMethod);
- } else {
- Log.e(LOG_TAG, "Incorrect mIdColumn: " + mIdColumn);
- return true;
- }
+ Log.e(LOG_TAG, "Incorrect mIdColumn: " + mIdColumn);
+ return true;
}
} catch (VCardException e) {
Log.e(LOG_TAG, "VCardException has been thrown: " + e.getMessage());
@@ -468,7 +430,7 @@
} catch (OutOfMemoryError error) {
// Maybe some data (e.g. photo) is too big to have in memory. But it
// should be rare.
- Log.e(LOG_TAG, "OutOfMemoryError occured. Ignore the entry: " + name);
+ Log.e(LOG_TAG, "OutOfMemoryError occured. Ignore the entry.");
System.gc();
// TODO: should tell users what happened?
return true;
@@ -630,99 +592,4 @@
public String getErrorReason() {
return mErrorReason;
}
-
- /**
- * This static function is to compose vCard for phone own number
- */
- public String composeVCardForPhoneOwnNumber(int phonetype, String phoneName,
- String phoneNumber, boolean vcardVer21) {
- final int vcardType = (vcardVer21 ?
- VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8 :
- VCardConfig.VCARD_TYPE_V30_GENERIC_UTF8);
- final VCardBuilder builder = new VCardBuilder(vcardType);
- boolean needCharset = false;
- if (!(VCardUtils.containsOnlyPrintableAscii(phoneName))) {
- needCharset = true;
- }
- builder.appendLine(VCardConstants.PROPERTY_FN, phoneName, needCharset, false);
- builder.appendLine(VCardConstants.PROPERTY_N, phoneName, needCharset, false);
-
- if (!TextUtils.isEmpty(phoneNumber)) {
- String label = Integer.toString(phonetype);
- builder.appendTelLine(phonetype, label, phoneNumber, false);
- }
-
- return builder.toString();
- }
-
- /**
- * Format according to RFC 2445 DATETIME type.
- * The format is: ("%Y%m%dT%H%M%SZ").
- */
- private final String toRfc2455Format(final long millSecs) {
- Time startDate = new Time();
- startDate.set(millSecs);
- String date = startDate.format2445();
- return date + FLAG_TIMEZONE_UTC;
- }
-
- /**
- * Try to append the property line for a call history time stamp field if possible.
- * Do nothing if the call log type gotton from the database is invalid.
- */
- private void tryAppendCallHistoryTimeStampField(final VCardBuilder builder) {
- // Extension for call history as defined in
- // in the Specification for Ic Mobile Communcation - ver 1.1,
- // Oct 2000. This is used to send the details of the call
- // history - missed, incoming, outgoing along with date and time
- // to the requesting device (For example, transferring phone book
- // when connected over bluetooth)
- //
- // e.g. "X-IRMC-CALL-DATETIME;MISSED:20050320T100000Z"
- final int callLogType = mCursor.getInt(CALL_TYPE_COLUMN_INDEX);
- final String callLogTypeStr;
- switch (callLogType) {
- case Calls.INCOMING_TYPE: {
- callLogTypeStr = VCARD_PROPERTY_CALLTYPE_INCOMING;
- break;
- }
- case Calls.OUTGOING_TYPE: {
- callLogTypeStr = VCARD_PROPERTY_CALLTYPE_OUTGOING;
- break;
- }
- case Calls.MISSED_TYPE: {
- callLogTypeStr = VCARD_PROPERTY_CALLTYPE_MISSED;
- break;
- }
- default: {
- Log.w(LOG_TAG, "Call log type not correct.");
- return;
- }
- }
-
- final long dateAsLong = mCursor.getLong(DATE_COLUMN_INDEX);
- builder.appendLine(VCARD_PROPERTY_X_TIMESTAMP,
- Arrays.asList(callLogTypeStr), toRfc2455Format(dateAsLong));
- }
-
- private String createOneCallLogEntryInternal() {
- final VCardBuilder builder = new VCardBuilder(VCardConfig.VCARD_TYPE_V21_GENERIC_UTF8);
- String name = mCursor.getString(CALLER_NAME_COLUMN_INDEX);
- if (TextUtils.isEmpty(name)) {
- name = mCursor.getString(NUMBER_COLUMN_INDEX);
- }
- final boolean needCharset = !(VCardUtils.containsOnlyPrintableAscii(name));
- builder.appendLine(VCardConstants.PROPERTY_FN, name, needCharset, false);
- builder.appendLine(VCardConstants.PROPERTY_N, name, needCharset, false);
-
- final String number = mCursor.getString(NUMBER_COLUMN_INDEX);
- final int type = mCursor.getInt(CALLER_NUMBERTYPE_COLUMN_INDEX);
- String label = mCursor.getString(CALLER_NUMBERLABEL_COLUMN_INDEX);
- if (TextUtils.isEmpty(label)) {
- label = Integer.toString(type);
- }
- builder.appendTelLine(type, label, number, false);
- tryAppendCallHistoryTimeStampField(builder);
- return builder.toString();
- }
}
diff --git a/core/java/android/provider/Browser.java b/core/java/android/provider/Browser.java
index f7c3148..10b9371 100644
--- a/core/java/android/provider/Browser.java
+++ b/core/java/android/provider/Browser.java
@@ -145,14 +145,6 @@
}
/**
- * Stores a String extra in an {@link Intent} representing the title of a
- * page to share. When receiving an {@link Intent#ACTION_SEND} from the
- * Browser, use this to access the title.
- * @hide
- */
- public final static String EXTRA_SHARE_TITLE = "share_title";
-
- /**
* Stores a Bitmap extra in an {@link Intent} representing the screenshot of
* a page to share. When receiving an {@link Intent#ACTION_SEND} from the
* Browser, use this to access the screenshot.
diff --git a/core/java/android/provider/Calendar.java b/core/java/android/provider/Calendar.java
index cb42d73..fbaf5f6 100644
--- a/core/java/android/provider/Calendar.java
+++ b/core/java/android/provider/Calendar.java
@@ -19,15 +19,15 @@
import android.accounts.Account;
import android.app.AlarmManager;
import android.app.PendingIntent;
+import android.content.ContentProviderClient;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
-import android.content.Intent;
-import android.content.EntityIterator;
import android.content.CursorEntityIterator;
import android.content.Entity;
-import android.content.ContentProviderClient;
+import android.content.EntityIterator;
+import android.content.Intent;
import android.database.Cursor;
import android.database.DatabaseUtils;
import android.net.Uri;
@@ -408,6 +408,12 @@
public static final String SELF_ATTENDEE_STATUS = "selfAttendeeStatus";
/**
+ * This column is available for use by sync adapters
+ * <P>Type: TEXT</P>
+ */
+ public static final String SYNC_ADAPTER_DATA = "syncAdapterData";
+
+ /**
* The comments feed uri.
* <P>Type: TEXT</P>
*/
@@ -644,6 +650,7 @@
mProvider = provider;
}
+ @Override
public Entity getEntityAndIncrementCursor(Cursor cursor) throws RemoteException {
// we expect the cursor is already at the row we need to read from
final long eventId = cursor.getLong(cursor.getColumnIndexOrThrow(Events._ID));
@@ -683,6 +690,7 @@
DatabaseUtils.cursorIntToContentValuesIfPresent(cursor, cv, GUESTS_CAN_SEE_GUESTS);
DatabaseUtils.cursorStringToContentValuesIfPresent(cursor, cv, ORGANIZER);
DatabaseUtils.cursorStringToContentValuesIfPresent(cursor, cv, _SYNC_ID);
+ DatabaseUtils.cursorStringToContentValuesIfPresent(cursor, cv, _SYNC_LOCAL_ID);
DatabaseUtils.cursorLongToContentValuesIfPresent(cursor, cv, _SYNC_DIRTY);
DatabaseUtils.cursorStringToContentValuesIfPresent(cursor, cv, _SYNC_VERSION);
DatabaseUtils.cursorIntToContentValuesIfPresent(cursor, cv, DELETED);
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index acb8473..0b90f91 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -3176,6 +3176,61 @@
}
/**
+ * Additional columns returned by the {@link Contacts#CONTENT_FILTER_URI} providing the
+ * explanation of why the filter matched the contact. Specifically, they contain the
+ * data type and element that was used for matching.
+ * <p>
+ * This is temporary API, it will need to change when we move to FTS.
+ *
+ * @hide
+ */
+ public static class SearchSnippetColumns {
+
+ /**
+ * The ID of the data row that was matched by the filter.
+ *
+ * @hide
+ */
+ public static final String SNIPPET_DATA_ID = "snippet_data_id";
+
+ /**
+ * The type of data that was matched by the filter.
+ *
+ * @hide
+ */
+ public static final String SNIPPET_MIMETYPE = "snippet_mimetype";
+
+ /**
+ * The {@link Data#DATA1} field of the data row that was matched by the filter.
+ *
+ * @hide
+ */
+ public static final String SNIPPET_DATA1 = "snippet_data1";
+
+ /**
+ * The {@link Data#DATA2} field of the data row that was matched by the filter.
+ *
+ * @hide
+ */
+ public static final String SNIPPET_DATA2 = "snippet_data2";
+
+ /**
+ * The {@link Data#DATA3} field of the data row that was matched by the filter.
+ *
+ * @hide
+ */
+ public static final String SNIPPET_DATA3 = "snippet_data3";
+
+ /**
+ * The {@link Data#DATA4} field of the data row that was matched by the filter.
+ *
+ * @hide
+ */
+ public static final String SNIPPET_DATA4 = "snippet_data4";
+
+ }
+
+ /**
* Container for definitions of common data types stored in the {@link ContactsContract.Data}
* table.
*/
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 14e27eb..081cf32 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -374,6 +374,11 @@
* In some cases, a matching Activity may not exist, so ensure you
* safeguard against this.
* <p>
+ * The account types available to add via the add account button may be restricted by adding an
+ * {@link #EXTRA_AUTHORITIES} extra to this Intent with one or more syncable content provider's
+ * authorities. Only account types which can sync with that content provider will be offered to
+ * the user.
+ * <p>
* Input: Nothing.
* <p>
* Output: Nothing.
@@ -383,6 +388,24 @@
"android.settings.SYNC_SETTINGS";
/**
+ * Activity Action: Show add account screen for creating a new account.
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you
+ * safeguard against this.
+ * <p>
+ * The account types available to add may be restricted by adding an {@link #EXTRA_AUTHORITIES}
+ * extra to the Intent with one or more syncable content provider's authorities. Only account
+ * types which can sync with that content provider will be offered to the user.
+ * <p>
+ * Input: Nothing.
+ * <p>
+ * Output: Nothing.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_ADD_ACCOUNT =
+ "android.settings.ADD_ACCOUNT_SETTINGS";
+
+ /**
* Activity Action: Show settings for selecting the network operator.
* <p>
* In some cases, a matching Activity may not exist, so ensure you
@@ -468,6 +491,19 @@
// End of Intent actions for Settings
+ /**
+ * Activity Extra: Limit available options in launched activity based on the given authority.
+ * <p>
+ * This can be passed as an extra field in an Activity Intent with one or more syncable content
+ * provider's authorities as a String[]. This field is used by some intents to alter the
+ * behavior of the called activity.
+ * <p>
+ * Example: The {@link #ACTION_ADD_ACCOUNT} intent restricts the account types available based
+ * on the authority given.
+ */
+ public static final String EXTRA_AUTHORITIES =
+ "authorities";
+
private static final String JID_RESOURCE_PREFIX = "android";
public static final String AUTHORITY = "settings";
@@ -1611,6 +1647,9 @@
TTY_MODE,
SOUND_EFFECTS_ENABLED,
HAPTIC_FEEDBACK_ENABLED,
+ POWER_SOUNDS_ENABLED,
+ DOCK_SOUNDS_ENABLED,
+ LOCKSCREEN_SOUNDS_ENABLED,
SHOW_WEB_SUGGESTIONS,
NOTIFICATION_LIGHT_PULSE
};
@@ -2430,6 +2469,13 @@
public static final String BACKGROUND_DATA = "background_data";
/**
+ * Whether mobile data connections are allowed by the user. See
+ * ConnectivityManager for more info.
+ * @hide
+ */
+ public static final String MOBILE_DATA = "mobile_data";
+
+ /**
* The CDMA roaming mode 0 = Home Networks, CDMA default
* 1 = Roaming on Affiliated networks
* 2 = Roaming on any networks
@@ -3033,11 +3079,11 @@
* @hide
*/
public static final String ANR_SHOW_BACKGROUND = "anr_show_background";
-
+
/**
* The {@link ComponentName} string of the service to be used as the voice recognition
* service.
- *
+ *
* @hide
*/
public static final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";
@@ -3052,6 +3098,7 @@
PARENTAL_CONTROL_REDIRECT_URL,
USB_MASS_STORAGE_ENABLED,
ACCESSIBILITY_ENABLED,
+ BACKUP_AUTO_RESTORE,
ENABLED_ACCESSIBILITY_SERVICES,
TTS_USE_DEFAULTS,
TTS_DEFAULT_RATE,
diff --git a/core/java/android/provider/SyncConstValue.java b/core/java/android/provider/SyncConstValue.java
index 30966eb..2fcf315 100644
--- a/core/java/android/provider/SyncConstValue.java
+++ b/core/java/android/provider/SyncConstValue.java
@@ -18,6 +18,7 @@
/**
* Columns for tables that are synced to a server.
+ * @deprecated
* @hide
*/
public interface SyncConstValue
@@ -69,7 +70,7 @@
* <P>Type: INTEGER (long)</P>
*/
public static final String _SYNC_DIRTY = "_sync_dirty";
-
+
/**
* Used to indicate that this account is not synced
*/
diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java
index adeef54..0de1868 100644
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -29,8 +29,8 @@
import android.text.TextUtils;
import android.util.Config;
import android.util.Log;
+import android.util.Patterns;
-import com.android.common.Patterns;
import java.util.HashSet;
import java.util.Set;
@@ -101,6 +101,12 @@
public static final String READ = "read";
/**
+ * Indicates whether this message has been seen by the user. The "seen" flag will be
+ * used to figure out whether we need to throw up a statusbar notification or not.
+ */
+ public static final String SEEN = "seen";
+
+ /**
* The TP-Status value for the message, or -1 if no status has
* been received
*/
@@ -646,6 +652,12 @@
public static final String READ = "read";
/**
+ * Indicates whether this message has been seen by the user. The "seen" flag will be
+ * used to figure out whether we need to throw up a statusbar notification or not.
+ */
+ public static final String SEEN = "seen";
+
+ /**
* The Message-ID of the message.
* <P>Type: TEXT</P>
*/
@@ -1097,6 +1109,7 @@
* <P>Type: INTEGER</P>
*/
public static final String READ = "read";
+
/**
* The snippet of the latest message in the thread.
* <P>Type: TEXT</P>
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index aa20ac4..e7d9d5b 100644
--- a/core/java/android/server/BluetoothService.java
+++ b/core/java/android/server/BluetoothService.java
@@ -52,12 +52,17 @@
import com.android.internal.app.IBatteryStats;
import java.io.BufferedInputStream;
+import java.io.BufferedReader;
import java.io.BufferedWriter;
+import java.io.DataInputStream;
+import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
+import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
@@ -65,7 +70,6 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.Random;
public class BluetoothService extends IBluetooth.Stub {
private static final String TAG = "BluetoothService";
@@ -528,6 +532,7 @@
persistBluetoothOnSetting(true);
}
mIsDiscovering = false;
+ mBondState.readAutoPairingData();
mBondState.loadBondState();
mHandler.sendMessageDelayed(
mHandler.obtainMessage(MESSAGE_REGISTER_SDP_RECORDS, 1, -1), 3000);
@@ -580,34 +585,17 @@
public class BondState {
private final HashMap<String, Integer> mState = new HashMap<String, Integer>();
private final HashMap<String, Integer> mPinAttempt = new HashMap<String, Integer>();
- private final ArrayList<String> mAutoPairingFailures = new ArrayList<String>();
- // List of all the vendor_id prefix of Bluetooth addresses for
- // which auto pairing is not attempted.
- // The following companies are included in the list below:
- // ALPS (lexus), Murata (Prius 2007, Nokia 616), TEMIC SDS (Porsche, Audi),
- // Parrot, Zhongshan General K-mate Electronics, Great Well
- // Electronics, Flaircomm Electronics, Jatty Electronics, Delphi,
- // Clarion, Novero, Denso (Lexus, Toyota), Johnson Controls (Acura),
- // Continental Automotive, Harman/Becker, Panasonic/Kyushu Ten,
- // BMW (Motorola PCS)
- private final ArrayList<String> mAutoPairingAddressBlacklist =
- new ArrayList<String>(Arrays.asList(
- "00:02:C7", "00:16:FE", "00:19:C1", "00:1B:FB", "00:1E:3D", "00:21:4F",
- "00:23:06", "00:24:33", "00:A0:79", "00:0E:6D", "00:13:E0", "00:21:E8",
- "00:60:57", "00:0E:9F", "00:12:1C", "00:18:91", "00:18:96", "00:13:04",
- "00:16:FD", "00:22:A0", "00:0B:4C", "00:60:6F", "00:23:3D", "00:C0:59",
- "00:0A:30", "00:1E:AE", "00:1C:D7", "00:80:F0", "00:12:8A"
- ));
- // List of names of Bluetooth devices for which auto pairing should be
- // disabled.
- private final ArrayList<String> mAutoPairingExactNameBlacklist =
- new ArrayList<String>(Arrays.asList(
- "Motorola IHF1000", "i.TechBlueBAND", "X5 Stereo v1.3"));
+ private static final String AUTO_PAIRING_BLACKLIST =
+ "/etc/bluetooth/auto_pairing.conf";
+ private static final String DYNAMIC_AUTO_PAIRING_BLACKLIST =
+ "/data/misc/bluetooth/dynamic_auto_pairing.conf";
+ private ArrayList<String> mAutoPairingAddressBlacklist;
+ private ArrayList<String> mAutoPairingExactNameBlacklist;
+ private ArrayList<String> mAutoPairingPartialNameBlacklist;
+ // Addresses added to blacklist dynamically based on usage.
+ private ArrayList<String> mAutoPairingDynamicAddressBlacklist;
- private final ArrayList<String> mAutoPairingPartialNameBlacklist =
- new ArrayList<String>(Arrays.asList(
- "BMW", "Audi"));
// If this is an outgoing connection, store the address.
// There can be only 1 pending outgoing connection at a time,
@@ -682,18 +670,29 @@
}
public boolean isAutoPairingBlacklisted(String address) {
- for (String blacklistAddress : mAutoPairingAddressBlacklist) {
- if (address.startsWith(blacklistAddress)) return true;
+ if (mAutoPairingAddressBlacklist != null) {
+ for (String blacklistAddress : mAutoPairingAddressBlacklist) {
+ if (address.startsWith(blacklistAddress)) return true;
+ }
}
+ if (mAutoPairingDynamicAddressBlacklist != null) {
+ for (String blacklistAddress: mAutoPairingDynamicAddressBlacklist) {
+ if (address.equals(blacklistAddress)) return true;
+ }
+ }
String name = getRemoteName(address);
if (name != null) {
- for (String blacklistName : mAutoPairingExactNameBlacklist) {
- if (name.equals(blacklistName)) return true;
+ if (mAutoPairingExactNameBlacklist != null) {
+ for (String blacklistName : mAutoPairingExactNameBlacklist) {
+ if (name.equals(blacklistName)) return true;
+ }
}
- for (String blacklistName : mAutoPairingPartialNameBlacklist) {
- if (name.startsWith(blacklistName)) return true;
+ if (mAutoPairingPartialNameBlacklist != null) {
+ for (String blacklistName : mAutoPairingPartialNameBlacklist) {
+ if (name.startsWith(blacklistName)) return true;
+ }
}
}
return false;
@@ -718,9 +717,12 @@
}
public synchronized void addAutoPairingFailure(String address) {
- if (!mAutoPairingFailures.contains(address)) {
- mAutoPairingFailures.add(address);
+ if (mAutoPairingDynamicAddressBlacklist == null) {
+ mAutoPairingDynamicAddressBlacklist = new ArrayList<String>();
}
+
+ updateAutoPairingData(address);
+ mAutoPairingDynamicAddressBlacklist.add(address);
}
public synchronized boolean isAutoPairingAttemptsInProgress(String address) {
@@ -732,7 +734,9 @@
}
public synchronized boolean hasAutoPairingFailed(String address) {
- return mAutoPairingFailures.contains(address);
+ if (mAutoPairingDynamicAddressBlacklist == null) return false;
+
+ return mAutoPairingDynamicAddressBlacklist.contains(address);
}
public synchronized int getAttempt(String address) {
@@ -754,6 +758,108 @@
mPinAttempt.put(address, new Integer(newAttempt));
}
+ private void copyAutoPairingData() {
+ File file = null;
+ FileInputStream in = null;
+ FileOutputStream out = null;
+ try {
+ file = new File(DYNAMIC_AUTO_PAIRING_BLACKLIST);
+ if (file.exists()) return;
+
+ in = new FileInputStream(AUTO_PAIRING_BLACKLIST);
+ out= new FileOutputStream(DYNAMIC_AUTO_PAIRING_BLACKLIST);
+
+ byte[] buf = new byte[1024];
+ int len;
+ while ((len = in.read(buf)) > 0) {
+ out.write(buf, 0, len);
+ }
+ } catch (FileNotFoundException e) {
+ log("FileNotFoundException: in copyAutoPairingData");
+ } catch (IOException e) {
+ log("IOException: in copyAutoPairingData");
+ } finally {
+ try {
+ if (in != null) in.close();
+ if (out != null) out.close();
+ } catch (IOException e) {}
+ }
+ }
+
+ public void readAutoPairingData() {
+ if (mAutoPairingAddressBlacklist != null) return;
+ copyAutoPairingData();
+ FileInputStream fstream = null;
+ try {
+ fstream = new FileInputStream(DYNAMIC_AUTO_PAIRING_BLACKLIST);
+ DataInputStream in = new DataInputStream(fstream);
+ BufferedReader file = new BufferedReader(new InputStreamReader(in));
+ String line;
+ while((line = file.readLine()) != null) {
+ line = line.trim();
+ if (line.length() == 0 || line.startsWith("//")) continue;
+ String[] value = line.split("=");
+ if (value != null && value.length == 2) {
+ String[] val = value[1].split(",");
+ if (value[0].equalsIgnoreCase("AddressBlacklist")) {
+ mAutoPairingAddressBlacklist =
+ new ArrayList<String>(Arrays.asList(val));
+ } else if (value[0].equalsIgnoreCase("ExactNameBlacklist")) {
+ mAutoPairingExactNameBlacklist =
+ new ArrayList<String>(Arrays.asList(val));
+ } else if (value[0].equalsIgnoreCase("PartialNameBlacklist")) {
+ mAutoPairingPartialNameBlacklist =
+ new ArrayList<String>(Arrays.asList(val));
+ } else if (value[0].equalsIgnoreCase("DynamicAddressBlacklist")) {
+ mAutoPairingDynamicAddressBlacklist =
+ new ArrayList<String>(Arrays.asList(val));
+ } else {
+ Log.e(TAG, "Error parsing Auto pairing blacklist file");
+ }
+ }
+ }
+ } catch (FileNotFoundException e) {
+ log("FileNotFoundException: readAutoPairingData" + e.toString());
+ } catch (IOException e) {
+ log("IOException: readAutoPairingData" + e.toString());
+ } finally {
+ if (fstream != null) {
+ try {
+ fstream.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+ }
+ }
+
+ // This function adds a bluetooth address to the auto pairing blacklis
+ // file. These addresses are added to DynamicAddressBlacklistSection
+ private void updateAutoPairingData(String address) {
+ BufferedWriter out = null;
+ try {
+ out = new BufferedWriter(new FileWriter(DYNAMIC_AUTO_PAIRING_BLACKLIST, true));
+ StringBuilder str = new StringBuilder();
+ if (mAutoPairingDynamicAddressBlacklist.size() == 0) {
+ str.append("DynamicAddressBlacklist=");
+ }
+ str.append(address);
+ str.append(",");
+ out.write(str.toString());
+ } catch (FileNotFoundException e) {
+ log("FileNotFoundException: updateAutoPairingData" + e.toString());
+ } catch (IOException e) {
+ log("IOException: updateAutoPairingData" + e.toString());
+ } finally {
+ if (out != null) {
+ try {
+ out.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+ }
+ }
}
private static String toBondStateString(int bondState) {
diff --git a/core/java/android/server/search/SearchManagerService.java b/core/java/android/server/search/SearchManagerService.java
index fbc4a81..caa3144 100644
--- a/core/java/android/server/search/SearchManagerService.java
+++ b/core/java/android/server/search/SearchManagerService.java
@@ -16,20 +16,14 @@
package android.server.search;
-import android.app.ActivityManagerNative;
-import android.app.IActivityWatcher;
+import com.android.internal.content.PackageMonitor;
+
import android.app.ISearchManager;
-import android.app.ISearchManagerCallback;
import android.app.SearchManager;
import android.app.SearchableInfo;
-import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
-import android.content.IntentFilter;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.RemoteException;
import android.util.Log;
import java.util.List;
@@ -42,13 +36,11 @@
// general debugging support
private static final String TAG = "SearchManagerService";
- private static final boolean DBG = false;
// Context that the service is running in.
private final Context mContext;
- // This field is initialized in ensureSearchablesCreated(), and then never modified.
- // Only accessed by ensureSearchablesCreated() and getSearchables()
+ // This field is initialized lazily in getSearchables(), and then never modified.
private Searchables mSearchables;
/**
@@ -61,58 +53,28 @@
mContext = context;
}
- private synchronized void ensureSearchablesCreated() {
- if (mSearchables != null) return; // already created
-
- mSearchables = new Searchables(mContext);
- mSearchables.buildSearchableList();
-
- IntentFilter packageFilter = new IntentFilter();
- packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
- packageFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
- packageFilter.addAction(Intent.ACTION_PACKAGE_CHANGED);
- packageFilter.addDataScheme("package");
- mContext.registerReceiver(mPackageChangedReceiver, packageFilter);
- // Register for events related to sdcard installation.
- IntentFilter sdFilter = new IntentFilter();
- sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
- sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
- mContext.registerReceiver(mPackageChangedReceiver, sdFilter);
- }
-
private synchronized Searchables getSearchables() {
- ensureSearchablesCreated();
+ if (mSearchables == null) {
+ mSearchables = new Searchables(mContext);
+ mSearchables.buildSearchableList();
+ new MyPackageMonitor().register(mContext, true);
+ }
return mSearchables;
}
/**
* Refreshes the "searchables" list when packages are added/removed.
*/
- private BroadcastReceiver mPackageChangedReceiver = new BroadcastReceiver() {
+ class MyPackageMonitor extends PackageMonitor {
@Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
-
- if (Intent.ACTION_PACKAGE_ADDED.equals(action) ||
- Intent.ACTION_PACKAGE_REMOVED.equals(action) ||
- Intent.ACTION_PACKAGE_CHANGED.equals(action) ||
- Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(action) ||
- Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(action)) {
- if (DBG) Log.d(TAG, "Got " + action);
- // Update list of searchable activities
- getSearchables().buildSearchableList();
- broadcastSearchablesChanged();
- }
+ public void onSomePackagesChanged() {
+ // Update list of searchable activities
+ getSearchables().buildSearchableList();
+ // Inform all listeners that the list of searchables has been updated.
+ Intent intent = new Intent(SearchManager.INTENT_ACTION_SEARCHABLES_CHANGED);
+ intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
+ mContext.sendBroadcast(intent);
}
- };
-
- /**
- * Informs all listeners that the list of searchables has been updated.
- */
- void broadcastSearchablesChanged() {
- Intent intent = new Intent(SearchManager.INTENT_ACTION_SEARCHABLES_CHANGED);
- intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
- mContext.sendBroadcast(intent);
}
//
@@ -123,24 +85,15 @@
* Returns the SearchableInfo for a given activity.
*
* @param launchActivity The activity from which we're launching this search.
- * @param globalSearch If false, this will only launch the search that has been specifically
- * defined by the application (which is usually defined as a local search). If no default
- * search is defined in the current application or activity, no search will be launched.
- * If true, this will always launch a platform-global (e.g. web-based) search instead.
* @return Returns a SearchableInfo record describing the parameters of the search,
* or null if no searchable metadata was available.
*/
- public SearchableInfo getSearchableInfo(final ComponentName launchActivity,
- final boolean globalSearch) {
- if (globalSearch) {
- return getSearchables().getDefaultSearchable();
- } else {
- if (launchActivity == null) {
- Log.e(TAG, "getSearchableInfo(), activity == null");
- return null;
- }
- return getSearchables().getSearchableInfo(launchActivity);
+ public SearchableInfo getSearchableInfo(final ComponentName launchActivity) {
+ if (launchActivity == null) {
+ Log.e(TAG, "getSearchableInfo(), activity == null");
+ return null;
}
+ return getSearchables().getSearchableInfo(launchActivity);
}
/**
@@ -151,27 +104,17 @@
}
/**
- * Returns a list of the searchable activities that handle web searches.
- * Can be called from any thread.
+ * Gets the name of the global search activity.
*/
- public List<SearchableInfo> getSearchablesForWebSearch() {
- return getSearchables().getSearchablesForWebSearchList();
+ public ComponentName getGlobalSearchActivity() {
+ return getSearchables().getGlobalSearchActivity();
}
/**
- * Returns the default searchable activity for web searches.
- * Can be called from any thread.
+ * Gets the name of the web search activity.
*/
- public SearchableInfo getDefaultSearchableForWebSearch() {
- return getSearchables().getDefaultSearchableForWebSearch();
+ public ComponentName getWebSearchActivity() {
+ return getSearchables().getWebSearchActivity();
}
- /**
- * Sets the default searchable activity for web searches.
- * Can be called from any thread.
- */
- public void setDefaultWebSearch(final ComponentName component) {
- getSearchables().setDefaultWebSearch(component);
- broadcastSearchablesChanged();
- }
}
diff --git a/core/java/android/server/search/Searchables.java b/core/java/android/server/search/Searchables.java
index cbb63a5..279c17d 100644
--- a/core/java/android/server/search/Searchables.java
+++ b/core/java/android/server/search/Searchables.java
@@ -16,14 +16,12 @@
package android.server.search;
-import com.android.internal.app.ResolverActivity;
-
+import android.Manifest;
import android.app.SearchManager;
import android.app.SearchableInfo;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
-import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
@@ -52,9 +50,8 @@
private HashMap<ComponentName, SearchableInfo> mSearchablesMap = null;
private ArrayList<SearchableInfo> mSearchablesList = null;
private ArrayList<SearchableInfo> mSearchablesInGlobalSearchList = null;
- private ArrayList<SearchableInfo> mSearchablesForWebSearchList = null;
- private SearchableInfo mDefaultSearchable = null;
- private SearchableInfo mDefaultSearchableForWebSearch = null;
+ private ComponentName mGlobalSearchActivity = null;
+ private ComponentName mWebSearchActivity = null;
public static String GOOGLE_SEARCH_COMPONENT_NAME =
"com.android.googlesearch/.GoogleSearch";
@@ -131,10 +128,9 @@
// Irrespective of source, if a reference was found, follow it.
if (refActivityName != null)
{
- // An app or activity can declare that we should simply launch
- // "system default search" if search is invoked.
+ // This value is deprecated, return null
if (refActivityName.equals(MD_SEARCHABLE_SYSTEM_SEARCH)) {
- return getDefaultSearchable();
+ return null;
}
String pkg = activity.getPackageName();
ComponentName referredActivity;
@@ -164,20 +160,6 @@
}
/**
- * Provides the system-default search activity, which you can use
- * whenever getSearchableInfo() returns null;
- *
- * @return Returns the system-default search activity, null if never defined
- */
- public synchronized SearchableInfo getDefaultSearchable() {
- return mDefaultSearchable;
- }
-
- public synchronized boolean isDefaultSearchable(SearchableInfo searchable) {
- return searchable == mDefaultSearchable;
- }
-
- /**
* Builds an entire list (suitable for display) of
* activities that are searchable, by iterating the entire set of
* ACTION_SEARCH & ACTION_WEB_SEARCH intents.
@@ -205,8 +187,6 @@
= new ArrayList<SearchableInfo>();
ArrayList<SearchableInfo> newSearchablesInGlobalSearchList
= new ArrayList<SearchableInfo>();
- ArrayList<SearchableInfo> newSearchablesForWebSearchList
- = new ArrayList<SearchableInfo>();
final PackageManager pm = mContext.getPackageManager();
@@ -244,127 +224,71 @@
}
}
- if (webSearchInfoList != null) {
- for (int i = 0; i < webSearchInfoList.size(); ++i) {
- ActivityInfo ai = webSearchInfoList.get(i).activityInfo;
- ComponentName component = new ComponentName(ai.packageName, ai.name);
- SearchableInfo searchable = newSearchablesMap.get(component);
- if (searchable == null) {
- Log.w(LOG_TAG, "did not find component in searchables: " + component);
- } else {
- newSearchablesForWebSearchList.add(searchable);
- }
- }
- }
+ // Find the global search activity
+ ComponentName newGlobalSearchActivity = findGlobalSearchActivity();
- // Find the global search provider
- Intent globalSearchIntent = new Intent(SearchManager.INTENT_ACTION_GLOBAL_SEARCH);
- ComponentName globalSearchActivity = globalSearchIntent.resolveActivity(pm);
- SearchableInfo newDefaultSearchable = newSearchablesMap.get(globalSearchActivity);
-
- if (newDefaultSearchable == null) {
- Log.w(LOG_TAG, "No searchable info found for new default searchable activity "
- + globalSearchActivity);
- }
-
- // Find the default web search provider.
- ComponentName webSearchActivity = getPreferredWebSearchActivity(mContext);
- SearchableInfo newDefaultSearchableForWebSearch = null;
- if (webSearchActivity != null) {
- newDefaultSearchableForWebSearch = newSearchablesMap.get(webSearchActivity);
- }
- if (newDefaultSearchableForWebSearch == null) {
- Log.w(LOG_TAG, "No searchable info found for new default web search activity "
- + webSearchActivity);
- }
+ // Find the web search activity
+ ComponentName newWebSearchActivity = findWebSearchActivity(newGlobalSearchActivity);
// Store a consistent set of new values
synchronized (this) {
mSearchablesMap = newSearchablesMap;
mSearchablesList = newSearchablesList;
mSearchablesInGlobalSearchList = newSearchablesInGlobalSearchList;
- mSearchablesForWebSearchList = newSearchablesForWebSearchList;
- mDefaultSearchable = newDefaultSearchable;
- mDefaultSearchableForWebSearch = newDefaultSearchableForWebSearch;
+ mGlobalSearchActivity = newGlobalSearchActivity;
+ mWebSearchActivity = newWebSearchActivity;
}
}
/**
- * Checks if the given activity component is present in the system and if so makes it the
- * preferred activity for handling ACTION_WEB_SEARCH.
- * @param component Name of the component to check and set as preferred.
- * @param action Intent action for which this activity is to be set as preferred.
- * @return true if component was detected and set as preferred activity, false if not.
+ * Finds the global search activity.
+ *
+ * This is currently implemented by returning the first activity that handles
+ * the GLOBAL_SEARCH intent and has the GLOBAL_SEARCH permission. If we allow
+ * more than one global search activity to be installed, this code must be changed.
*/
- private static boolean setPreferredActivity(Context context,
- ComponentName component, String action) {
- Log.d(LOG_TAG, "Checking component " + component);
- PackageManager pm = context.getPackageManager();
- ActivityInfo ai;
- try {
- ai = pm.getActivityInfo(component, 0);
- } catch (PackageManager.NameNotFoundException e) {
- return false;
+ private ComponentName findGlobalSearchActivity() {
+ Intent intent = new Intent(SearchManager.INTENT_ACTION_GLOBAL_SEARCH);
+ PackageManager pm = mContext.getPackageManager();
+ List<ResolveInfo> activities =
+ pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
+ int count = activities == null ? 0 : activities.size();
+ for (int i = 0; i < count; i++) {
+ ActivityInfo ai = activities.get(i).activityInfo;
+ if (pm.checkPermission(Manifest.permission.GLOBAL_SEARCH,
+ ai.packageName) == PackageManager.PERMISSION_GRANTED) {
+ return new ComponentName(ai.packageName, ai.name);
+ } else {
+ Log.w(LOG_TAG, "Package " + ai.packageName + " wants to handle GLOBAL_SEARCH, "
+ + "but does not have the GLOBAL_SEARCH permission.");
+ }
}
-
- // The code here to find the value for bestMatch is heavily inspired by the code
- // in ResolverActivity where the preferred activity is set.
- Intent intent = new Intent(action);
- intent.addCategory(Intent.CATEGORY_DEFAULT);
- List<ResolveInfo> webSearchActivities = pm.queryIntentActivities(intent, 0);
- ComponentName set[] = new ComponentName[webSearchActivities.size()];
- int bestMatch = 0;
- for (int i = 0; i < webSearchActivities.size(); ++i) {
- ResolveInfo ri = webSearchActivities.get(i);
- set[i] = new ComponentName(ri.activityInfo.packageName,
- ri.activityInfo.name);
- if (ri.match > bestMatch) bestMatch = ri.match;
- }
-
- Log.d(LOG_TAG, "Setting preferred web search activity to " + component);
- IntentFilter filter = new IntentFilter(action);
- filter.addCategory(Intent.CATEGORY_DEFAULT);
- pm.replacePreferredActivity(filter, bestMatch, set, component);
- return true;
+ Log.w(LOG_TAG, "No global search activity found");
+ return null;
}
- private static ComponentName getPreferredWebSearchActivity(Context context) {
- // Check if we have a preferred web search activity.
- Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
- PackageManager pm = context.getPackageManager();
- ResolveInfo ri = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
-
- if (ri == null || ri.activityInfo.name.equals(ResolverActivity.class.getName())) {
- Log.d(LOG_TAG, "No preferred activity set for action web search.");
-
- // The components in the providers array are checked in the order of declaration so the
- // first one has the highest priority. If the component exists in the system it is set
- // as the preferred activity to handle intent action web search.
- String[] preferredActivities = context.getResources().getStringArray(
- com.android.internal.R.array.default_web_search_providers);
- for (String componentName : preferredActivities) {
- ComponentName component = ComponentName.unflattenFromString(componentName);
- if (setPreferredActivity(context, component, Intent.ACTION_WEB_SEARCH)) {
- return component;
- }
- }
- } else {
- // If the current preferred activity is GoogleSearch, and we detect
- // EnhancedGoogleSearch installed as well, set the latter as preferred since that
- // is a superset and provides more functionality.
- ComponentName cn = new ComponentName(ri.activityInfo.packageName, ri.activityInfo.name);
- if (cn.flattenToShortString().equals(GOOGLE_SEARCH_COMPONENT_NAME)) {
- ComponentName enhancedGoogleSearch = ComponentName.unflattenFromString(
- ENHANCED_GOOGLE_SEARCH_COMPONENT_NAME);
- if (setPreferredActivity(context, enhancedGoogleSearch,
- Intent.ACTION_WEB_SEARCH)) {
- return enhancedGoogleSearch;
- }
- }
+ /**
+ * Finds the web search activity.
+ *
+ * Only looks in the package of the global search activity.
+ */
+ private ComponentName findWebSearchActivity(ComponentName globalSearchActivity) {
+ if (globalSearchActivity == null) {
+ return null;
}
-
- if (ri == null) return null;
- return new ComponentName(ri.activityInfo.packageName, ri.activityInfo.name);
+ Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
+ intent.setPackage(globalSearchActivity.getPackageName());
+ PackageManager pm = mContext.getPackageManager();
+ List<ResolveInfo> activities =
+ pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
+ int count = activities == null ? 0 : activities.size();
+ for (int i = 0; i < count; i++) {
+ ActivityInfo ai = activities.get(i).activityInfo;
+ // TODO: do some sanity checks here?
+ return new ComponentName(ai.packageName, ai.name);
+ }
+ Log.w(LOG_TAG, "No web search activity found");
+ return null;
}
/**
@@ -383,24 +307,16 @@
}
/**
- * Returns a list of the searchable activities that handle web searches.
+ * Gets the name of the global search activity.
*/
- public synchronized ArrayList<SearchableInfo> getSearchablesForWebSearchList() {
- return new ArrayList<SearchableInfo>(mSearchablesForWebSearchList);
+ public synchronized ComponentName getGlobalSearchActivity() {
+ return mGlobalSearchActivity;
}
/**
- * Returns the default searchable activity for web searches.
+ * Gets the name of the web search activity.
*/
- public synchronized SearchableInfo getDefaultSearchableForWebSearch() {
- return mDefaultSearchableForWebSearch;
- }
-
- /**
- * Sets the default searchable activity for web searches.
- */
- public synchronized void setDefaultWebSearch(ComponentName component) {
- setPreferredActivity(mContext, component, Intent.ACTION_WEB_SEARCH);
- buildSearchableList();
+ public synchronized ComponentName getWebSearchActivity() {
+ return mWebSearchActivity;
}
}
diff --git a/core/java/android/speech/RecognizerIntent.java b/core/java/android/speech/RecognizerIntent.java
index 7c15cec..d55a943 100644
--- a/core/java/android/speech/RecognizerIntent.java
+++ b/core/java/android/speech/RecognizerIntent.java
@@ -32,6 +32,15 @@
* Constants for supporting speech recognition through starting an {@link Intent}
*/
public class RecognizerIntent {
+ /**
+ * The extra key used in an intent to the speech recognizer for voice search. Not
+ * generally to be used by developers. The system search dialog uses this, for example,
+ * to set a calling package for identification by a voice search API. If this extra
+ * is set by anyone but the system process, it should be overridden by the voice search
+ * implementation.
+ */
+ public final static String EXTRA_CALLING_PACKAGE = "calling_package";
+
private RecognizerIntent() {
// Not for instantiating.
}
@@ -289,6 +298,15 @@
"android.speech.action.GET_LANGUAGE_DETAILS";
/**
+ * Specify this boolean extra in a broadcast of {@link #ACTION_GET_LANGUAGE_DETAILS} to
+ * indicate that only the current language preference is needed in the response. This
+ * avoids any additional computation if all you need is {@link #EXTRA_LANGUAGE_PREFERENCE}
+ * in the response.
+ */
+ public static final String EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE =
+ "android.speech.extra.ONLY_RETURN_LANGUAGE_PREFERENCE";
+
+ /**
* The key to the extra in the {@link Bundle} returned by {@link #ACTION_GET_LANGUAGE_DETAILS}
* which is a {@link String} that represents the current language preference this user has
* specified - a locale string like "en-US".
diff --git a/core/java/android/test/InstrumentationTestCase.java b/core/java/android/test/InstrumentationTestCase.java
index 22d95d1..cd33d8a 100644
--- a/core/java/android/test/InstrumentationTestCase.java
+++ b/core/java/android/test/InstrumentationTestCase.java
@@ -16,8 +16,6 @@
package android.test;
-import junit.framework.TestCase;
-
import android.app.Activity;
import android.app.Instrumentation;
import android.content.Intent;
@@ -26,9 +24,11 @@
import android.view.KeyEvent;
import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import java.lang.reflect.InvocationTargetException;
+
+import junit.framework.TestCase;
/**
* A test case that has access to {@link Instrumentation}.
@@ -86,7 +86,6 @@
* @param extras Optional extra stuff to pass to the activity.
* @return The activity, or null if non launched.
*/
- @SuppressWarnings("unchecked")
public final <T extends Activity> T launchActivity(
String pkg,
Class<T> activityCls,
@@ -338,6 +337,7 @@
*
* @throws Exception
*/
+ @Override
protected void tearDown() throws Exception {
Runtime.getRuntime().gc();
Runtime.getRuntime().runFinalization();
diff --git a/core/java/android/text/AndroidBidi.java b/core/java/android/text/AndroidBidi.java
new file mode 100644
index 0000000..e4f934e
--- /dev/null
+++ b/core/java/android/text/AndroidBidi.java
@@ -0,0 +1,48 @@
+/*
+ * 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.text;
+
+/**
+ * Access the ICU bidi implementation.
+ * @hide
+ */
+/* package */ class AndroidBidi {
+
+ public static int bidi(int dir, char[] chs, byte[] chInfo, int n, boolean haveInfo) {
+ if (chs == null || chInfo == null) {
+ throw new NullPointerException();
+ }
+
+ if (n < 0 || chs.length < n || chInfo.length < n) {
+ throw new IndexOutOfBoundsException();
+ }
+
+ switch(dir) {
+ case Layout.DIR_REQUEST_LTR: dir = 0; break;
+ case Layout.DIR_REQUEST_RTL: dir = 1; break;
+ case Layout.DIR_REQUEST_DEFAULT_LTR: dir = -2; break;
+ case Layout.DIR_REQUEST_DEFAULT_RTL: dir = -1; break;
+ default: dir = 0; break;
+ }
+
+ int result = runBidi(dir, chs, chInfo, n, haveInfo);
+ result = (result & 0x1) == 0 ? Layout.DIR_LEFT_TO_RIGHT : Layout.DIR_RIGHT_TO_LEFT;
+ return result;
+ }
+
+ private native static int runBidi(int dir, char[] chs, byte[] chInfo, int n, boolean haveInfo);
+}
\ No newline at end of file
diff --git a/core/java/android/text/AutoText.java b/core/java/android/text/AutoText.java
index 862305b..04730ec 100644
--- a/core/java/android/text/AutoText.java
+++ b/core/java/android/text/AutoText.java
@@ -18,7 +18,9 @@
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
+
import android.view.View;
import org.xmlpull.v1.XmlPullParser;
diff --git a/core/java/android/text/Html.java b/core/java/android/text/Html.java
index 33ecc01..07e71f9 100644
--- a/core/java/android/text/Html.java
+++ b/core/java/android/text/Html.java
@@ -46,7 +46,8 @@
import android.text.style.URLSpan;
import android.text.style.UnderlineSpan;
import android.util.Log;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
import java.io.IOException;
import java.io.StringReader;
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index 1023036..38ac9b7 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -1936,6 +1936,11 @@
public static final int DIR_LEFT_TO_RIGHT = 1;
public static final int DIR_RIGHT_TO_LEFT = -1;
+
+ /* package */ static final int DIR_REQUEST_LTR = 1;
+ /* package */ static final int DIR_REQUEST_RTL = -1;
+ /* package */ static final int DIR_REQUEST_DEFAULT_LTR = 2;
+ /* package */ static final int DIR_REQUEST_DEFAULT_RTL = -2;
public enum Alignment {
ALIGN_NORMAL,
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 6c89f92..600ec7e 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -234,215 +234,9 @@
}
if (!easy) {
- AndroidCharacter.getDirectionalities(chs, chdirs, end - start);
-
- /*
- * Determine primary paragraph direction
- */
-
- for (int j = start; j < end; j++) {
- int d = chdirs[j - start];
-
- if (d == Character.DIRECTIONALITY_LEFT_TO_RIGHT) {
- dir = DIR_LEFT_TO_RIGHT;
- break;
- }
- if (d == Character.DIRECTIONALITY_RIGHT_TO_LEFT) {
- dir = DIR_RIGHT_TO_LEFT;
- break;
- }
- }
-
- /*
- * XXX Explicit overrides should go here
- */
-
- /*
- * Weak type resolution
- */
-
- final byte SOR = dir == DIR_LEFT_TO_RIGHT ?
- Character.DIRECTIONALITY_LEFT_TO_RIGHT :
- Character.DIRECTIONALITY_RIGHT_TO_LEFT;
-
- // dump(chdirs, n, "initial");
-
- // W1 non spacing marks
- for (int j = 0; j < n; j++) {
- if (chdirs[j] == Character.NON_SPACING_MARK) {
- if (j == 0)
- chdirs[j] = SOR;
- else
- chdirs[j] = chdirs[j - 1];
- }
- }
-
- // dump(chdirs, n, "W1");
-
- // W2 european numbers
- byte cur = SOR;
- for (int j = 0; j < n; j++) {
- byte d = chdirs[j];
-
- if (d == Character.DIRECTIONALITY_LEFT_TO_RIGHT ||
- d == Character.DIRECTIONALITY_RIGHT_TO_LEFT ||
- d == Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC)
- cur = d;
- else if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER) {
- if (cur ==
- Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC)
- chdirs[j] = Character.DIRECTIONALITY_ARABIC_NUMBER;
- }
- }
-
- // dump(chdirs, n, "W2");
-
- // W3 arabic letters
- for (int j = 0; j < n; j++) {
- if (chdirs[j] == Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC)
- chdirs[j] = Character.DIRECTIONALITY_RIGHT_TO_LEFT;
- }
-
- // dump(chdirs, n, "W3");
-
- // W4 single separator between numbers
- for (int j = 1; j < n - 1; j++) {
- byte d = chdirs[j];
- byte prev = chdirs[j - 1];
- byte next = chdirs[j + 1];
-
- if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR) {
- if (prev == Character.DIRECTIONALITY_EUROPEAN_NUMBER &&
- next == Character.DIRECTIONALITY_EUROPEAN_NUMBER)
- chdirs[j] = Character.DIRECTIONALITY_EUROPEAN_NUMBER;
- } else if (d == Character.DIRECTIONALITY_COMMON_NUMBER_SEPARATOR) {
- if (prev == Character.DIRECTIONALITY_EUROPEAN_NUMBER &&
- next == Character.DIRECTIONALITY_EUROPEAN_NUMBER)
- chdirs[j] = Character.DIRECTIONALITY_EUROPEAN_NUMBER;
- if (prev == Character.DIRECTIONALITY_ARABIC_NUMBER &&
- next == Character.DIRECTIONALITY_ARABIC_NUMBER)
- chdirs[j] = Character.DIRECTIONALITY_ARABIC_NUMBER;
- }
- }
-
- // dump(chdirs, n, "W4");
-
- // W5 european number terminators
- boolean adjacent = false;
- for (int j = 0; j < n; j++) {
- byte d = chdirs[j];
-
- if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER)
- adjacent = true;
- else if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR && adjacent)
- chdirs[j] = Character.DIRECTIONALITY_EUROPEAN_NUMBER;
- else
- adjacent = false;
- }
-
- //dump(chdirs, n, "W5");
-
- // W5 european number terminators part 2,
- // W6 separators and terminators
- adjacent = false;
- for (int j = n - 1; j >= 0; j--) {
- byte d = chdirs[j];
-
- if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER)
- adjacent = true;
- else if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR) {
- if (adjacent)
- chdirs[j] = Character.DIRECTIONALITY_EUROPEAN_NUMBER;
- else
- chdirs[j] = Character.DIRECTIONALITY_OTHER_NEUTRALS;
- }
- else {
- adjacent = false;
-
- if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR ||
- d == Character.DIRECTIONALITY_COMMON_NUMBER_SEPARATOR ||
- d == Character.DIRECTIONALITY_PARAGRAPH_SEPARATOR ||
- d == Character.DIRECTIONALITY_SEGMENT_SEPARATOR)
- chdirs[j] = Character.DIRECTIONALITY_OTHER_NEUTRALS;
- }
- }
-
- // dump(chdirs, n, "W6");
-
- // W7 strong direction of european numbers
- cur = SOR;
- for (int j = 0; j < n; j++) {
- byte d = chdirs[j];
-
- if (d == SOR ||
- d == Character.DIRECTIONALITY_LEFT_TO_RIGHT ||
- d == Character.DIRECTIONALITY_RIGHT_TO_LEFT)
- cur = d;
-
- if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER)
- chdirs[j] = cur;
- }
-
- // dump(chdirs, n, "W7");
-
- // N1, N2 neutrals
- cur = SOR;
- for (int j = 0; j < n; j++) {
- byte d = chdirs[j];
-
- if (d == Character.DIRECTIONALITY_LEFT_TO_RIGHT ||
- d == Character.DIRECTIONALITY_RIGHT_TO_LEFT) {
- cur = d;
- } else if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER ||
- d == Character.DIRECTIONALITY_ARABIC_NUMBER) {
- cur = Character.DIRECTIONALITY_RIGHT_TO_LEFT;
- } else {
- byte dd = SOR;
- int k;
-
- for (k = j + 1; k < n; k++) {
- dd = chdirs[k];
-
- if (dd == Character.DIRECTIONALITY_LEFT_TO_RIGHT ||
- dd == Character.DIRECTIONALITY_RIGHT_TO_LEFT) {
- break;
- }
- if (dd == Character.DIRECTIONALITY_EUROPEAN_NUMBER ||
- dd == Character.DIRECTIONALITY_ARABIC_NUMBER) {
- dd = Character.DIRECTIONALITY_RIGHT_TO_LEFT;
- break;
- }
- }
-
- for (int y = j; y < k; y++) {
- if (dd == cur)
- chdirs[y] = cur;
- else
- chdirs[y] = SOR;
- }
-
- j = k - 1;
- }
- }
-
- // dump(chdirs, n, "final");
-
- // extra: enforce that all tabs and surrogate characters go the
- // primary direction
- // TODO: actually do directions right for surrogates
-
- for (int j = 0; j < n; j++) {
- char c = chs[j];
-
- if (c == '\t' || (c >= 0xD800 && c <= 0xDFFF)) {
- chdirs[j] = SOR;
- }
- }
-
- // extra: enforce that object replacements go to the
- // primary direction
- // and that none of the underlying characters are treated
- // as viable breakpoints
+ // Ensure that none of the underlying characters are treated
+ // as viable breakpoints, and that the entire run gets the
+ // same bidi direction.
if (source instanceof Spanned) {
Spanned sp = (Spanned) source;
@@ -453,12 +247,14 @@
int b = sp.getSpanEnd(spans[y]);
for (int x = a; x < b; x++) {
- chdirs[x - start] = SOR;
chs[x - start] = '\uFFFC';
}
}
}
+ // XXX put override flags, etc. into chdirs
+ dir = bidi(dir, chs, chdirs, n, false);
+
// Do mirroring for right-to-left segments
for (int i = 0; i < n; i++) {
@@ -810,6 +606,239 @@
}
}
+ /**
+ * Runs the unicode bidi algorithm on the first n chars in chs, returning
+ * the char dirs in chInfo and the base line direction of the first
+ * paragraph.
+ *
+ * XXX change result from dirs to levels
+ *
+ * @param dir the direction flag, either DIR_REQUEST_LTR,
+ * DIR_REQUEST_RTL, DIR_REQUEST_DEFAULT_LTR, or DIR_REQUEST_DEFAULT_RTL.
+ * @param chs the text to examine
+ * @param chInfo on input, if hasInfo is true, override and other flags
+ * representing out-of-band embedding information. On output, the generated
+ * dirs of the text.
+ * @param n the length of the text/information in chs and chInfo
+ * @param hasInfo true if chInfo has input information, otherwise the
+ * input data in chInfo is ignored.
+ * @return the resolved direction level of the first paragraph, either
+ * DIR_LEFT_TO_RIGHT or DIR_RIGHT_TO_LEFT.
+ */
+ /* package */ static int bidi(int dir, char[] chs, byte[] chInfo, int n,
+ boolean hasInfo) {
+
+ AndroidCharacter.getDirectionalities(chs, chInfo, n);
+
+ /*
+ * Determine primary paragraph direction if not specified
+ */
+ if (dir != DIR_REQUEST_LTR && dir != DIR_REQUEST_RTL) {
+ // set up default
+ dir = dir >= 0 ? DIR_LEFT_TO_RIGHT : DIR_RIGHT_TO_LEFT;
+ for (int j = 0; j < n; j++) {
+ int d = chInfo[j];
+
+ if (d == Character.DIRECTIONALITY_LEFT_TO_RIGHT) {
+ dir = DIR_LEFT_TO_RIGHT;
+ break;
+ }
+ if (d == Character.DIRECTIONALITY_RIGHT_TO_LEFT) {
+ dir = DIR_RIGHT_TO_LEFT;
+ break;
+ }
+ }
+ }
+
+ final byte SOR = dir == DIR_LEFT_TO_RIGHT ?
+ Character.DIRECTIONALITY_LEFT_TO_RIGHT :
+ Character.DIRECTIONALITY_RIGHT_TO_LEFT;
+
+ /*
+ * XXX Explicit overrides should go here
+ */
+
+ /*
+ * Weak type resolution
+ */
+
+ // dump(chdirs, n, "initial");
+
+ // W1 non spacing marks
+ for (int j = 0; j < n; j++) {
+ if (chInfo[j] == Character.NON_SPACING_MARK) {
+ if (j == 0)
+ chInfo[j] = SOR;
+ else
+ chInfo[j] = chInfo[j - 1];
+ }
+ }
+
+ // dump(chdirs, n, "W1");
+
+ // W2 european numbers
+ byte cur = SOR;
+ for (int j = 0; j < n; j++) {
+ byte d = chInfo[j];
+
+ if (d == Character.DIRECTIONALITY_LEFT_TO_RIGHT ||
+ d == Character.DIRECTIONALITY_RIGHT_TO_LEFT ||
+ d == Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC)
+ cur = d;
+ else if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER) {
+ if (cur ==
+ Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC)
+ chInfo[j] = Character.DIRECTIONALITY_ARABIC_NUMBER;
+ }
+ }
+
+ // dump(chdirs, n, "W2");
+
+ // W3 arabic letters
+ for (int j = 0; j < n; j++) {
+ if (chInfo[j] == Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC)
+ chInfo[j] = Character.DIRECTIONALITY_RIGHT_TO_LEFT;
+ }
+
+ // dump(chdirs, n, "W3");
+
+ // W4 single separator between numbers
+ for (int j = 1; j < n - 1; j++) {
+ byte d = chInfo[j];
+ byte prev = chInfo[j - 1];
+ byte next = chInfo[j + 1];
+
+ if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR) {
+ if (prev == Character.DIRECTIONALITY_EUROPEAN_NUMBER &&
+ next == Character.DIRECTIONALITY_EUROPEAN_NUMBER)
+ chInfo[j] = Character.DIRECTIONALITY_EUROPEAN_NUMBER;
+ } else if (d == Character.DIRECTIONALITY_COMMON_NUMBER_SEPARATOR) {
+ if (prev == Character.DIRECTIONALITY_EUROPEAN_NUMBER &&
+ next == Character.DIRECTIONALITY_EUROPEAN_NUMBER)
+ chInfo[j] = Character.DIRECTIONALITY_EUROPEAN_NUMBER;
+ if (prev == Character.DIRECTIONALITY_ARABIC_NUMBER &&
+ next == Character.DIRECTIONALITY_ARABIC_NUMBER)
+ chInfo[j] = Character.DIRECTIONALITY_ARABIC_NUMBER;
+ }
+ }
+
+ // dump(chdirs, n, "W4");
+
+ // W5 european number terminators
+ boolean adjacent = false;
+ for (int j = 0; j < n; j++) {
+ byte d = chInfo[j];
+
+ if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER)
+ adjacent = true;
+ else if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR && adjacent)
+ chInfo[j] = Character.DIRECTIONALITY_EUROPEAN_NUMBER;
+ else
+ adjacent = false;
+ }
+
+ //dump(chdirs, n, "W5");
+
+ // W5 european number terminators part 2,
+ // W6 separators and terminators
+ adjacent = false;
+ for (int j = n - 1; j >= 0; j--) {
+ byte d = chInfo[j];
+
+ if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER)
+ adjacent = true;
+ else if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR) {
+ if (adjacent)
+ chInfo[j] = Character.DIRECTIONALITY_EUROPEAN_NUMBER;
+ else
+ chInfo[j] = Character.DIRECTIONALITY_OTHER_NEUTRALS;
+ }
+ else {
+ adjacent = false;
+
+ if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR ||
+ d == Character.DIRECTIONALITY_COMMON_NUMBER_SEPARATOR ||
+ d == Character.DIRECTIONALITY_PARAGRAPH_SEPARATOR ||
+ d == Character.DIRECTIONALITY_SEGMENT_SEPARATOR)
+ chInfo[j] = Character.DIRECTIONALITY_OTHER_NEUTRALS;
+ }
+ }
+
+ // dump(chdirs, n, "W6");
+
+ // W7 strong direction of european numbers
+ cur = SOR;
+ for (int j = 0; j < n; j++) {
+ byte d = chInfo[j];
+
+ if (d == SOR ||
+ d == Character.DIRECTIONALITY_LEFT_TO_RIGHT ||
+ d == Character.DIRECTIONALITY_RIGHT_TO_LEFT)
+ cur = d;
+
+ if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER)
+ chInfo[j] = cur;
+ }
+
+ // dump(chdirs, n, "W7");
+
+ // N1, N2 neutrals
+ cur = SOR;
+ for (int j = 0; j < n; j++) {
+ byte d = chInfo[j];
+
+ if (d == Character.DIRECTIONALITY_LEFT_TO_RIGHT ||
+ d == Character.DIRECTIONALITY_RIGHT_TO_LEFT) {
+ cur = d;
+ } else if (d == Character.DIRECTIONALITY_EUROPEAN_NUMBER ||
+ d == Character.DIRECTIONALITY_ARABIC_NUMBER) {
+ cur = Character.DIRECTIONALITY_RIGHT_TO_LEFT;
+ } else {
+ byte dd = SOR;
+ int k;
+
+ for (k = j + 1; k < n; k++) {
+ dd = chInfo[k];
+
+ if (dd == Character.DIRECTIONALITY_LEFT_TO_RIGHT ||
+ dd == Character.DIRECTIONALITY_RIGHT_TO_LEFT) {
+ break;
+ }
+ if (dd == Character.DIRECTIONALITY_EUROPEAN_NUMBER ||
+ dd == Character.DIRECTIONALITY_ARABIC_NUMBER) {
+ dd = Character.DIRECTIONALITY_RIGHT_TO_LEFT;
+ break;
+ }
+ }
+
+ for (int y = j; y < k; y++) {
+ if (dd == cur)
+ chInfo[y] = cur;
+ else
+ chInfo[y] = SOR;
+ }
+
+ j = k - 1;
+ }
+ }
+
+ // dump(chdirs, n, "final");
+
+ // extra: enforce that all tabs and surrogate characters go the
+ // primary direction
+ // TODO: actually do directions right for surrogates
+
+ for (int j = 0; j < n; j++) {
+ char c = chs[j];
+
+ if (c == '\t' || (c >= 0xD800 && c <= 0xDFFF)) {
+ chInfo[j] = SOR;
+ }
+ }
+
+ return dir;
+ }
+
private static final char FIRST_CJK = '\u2E80';
/**
* Returns true if the specified character is one of those specified
@@ -1012,12 +1041,12 @@
int extra;
if (needMultiply) {
- // XXX: this looks like it is using the +0.5 and the cast to int
- // to do rounding, but this I expect this isn't doing the intended
- // thing when spacingmult < 1. An intended extra of, say, -1.2
- // will get 'rounded' to -.7 and then truncated to 0.
- extra = (int) ((below - above) * (spacingmult - 1)
- + spacingadd + 0.5);
+ double ex = (below - above) * (spacingmult - 1) + spacingadd;
+ if (ex >= 0) {
+ extra = (int)(ex + 0.5);
+ } else {
+ extra = -(int)(-ex + 0.5);
+ }
} else {
extra = 0;
}
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java
index afb22ac..9589bf3 100644
--- a/core/java/android/text/TextUtils.java
+++ b/core/java/android/text/TextUtils.java
@@ -1557,13 +1557,17 @@
* @param reqModes The modes to be checked: may be any combination of
* {@link #CAP_MODE_CHARACTERS}, {@link #CAP_MODE_WORDS}, and
* {@link #CAP_MODE_SENTENCES}.
- *
+ *
* @return Returns the actual capitalization modes that can be in effect
* at the current position, which is any combination of
* {@link #CAP_MODE_CHARACTERS}, {@link #CAP_MODE_WORDS}, and
* {@link #CAP_MODE_SENTENCES}.
*/
public static int getCapsMode(CharSequence cs, int off, int reqModes) {
+ if (off < 0) {
+ return 0;
+ }
+
int i;
char c;
int mode = 0;
diff --git a/core/java/android/text/util/Linkify.java b/core/java/android/text/util/Linkify.java
index 7f87365..98605888c 100644
--- a/core/java/android/text/util/Linkify.java
+++ b/core/java/android/text/util/Linkify.java
@@ -22,10 +22,10 @@
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
+import android.util.Patterns;
import android.webkit.WebView;
import android.widget.TextView;
-import com.android.common.Patterns;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
diff --git a/core/java/android/util/Log.java b/core/java/android/util/Log.java
index 75b1b90..e111669 100644
--- a/core/java/android/util/Log.java
+++ b/core/java/android/util/Log.java
@@ -98,7 +98,7 @@
* @param msg The message you would like logged.
*/
public static int v(String tag, String msg) {
- return println(VERBOSE, tag, msg);
+ return println_native(LOG_ID_MAIN, VERBOSE, tag, msg);
}
/**
@@ -109,7 +109,7 @@
* @param tr An exception to log
*/
public static int v(String tag, String msg, Throwable tr) {
- return println(VERBOSE, tag, msg + '\n' + getStackTraceString(tr));
+ return println_native(LOG_ID_MAIN, VERBOSE, tag, msg + '\n' + getStackTraceString(tr));
}
/**
@@ -119,7 +119,7 @@
* @param msg The message you would like logged.
*/
public static int d(String tag, String msg) {
- return println(DEBUG, tag, msg);
+ return println_native(LOG_ID_MAIN, DEBUG, tag, msg);
}
/**
@@ -130,7 +130,7 @@
* @param tr An exception to log
*/
public static int d(String tag, String msg, Throwable tr) {
- return println(DEBUG, tag, msg + '\n' + getStackTraceString(tr));
+ return println_native(LOG_ID_MAIN, DEBUG, tag, msg + '\n' + getStackTraceString(tr));
}
/**
@@ -140,7 +140,7 @@
* @param msg The message you would like logged.
*/
public static int i(String tag, String msg) {
- return println(INFO, tag, msg);
+ return println_native(LOG_ID_MAIN, INFO, tag, msg);
}
/**
@@ -151,7 +151,7 @@
* @param tr An exception to log
*/
public static int i(String tag, String msg, Throwable tr) {
- return println(INFO, tag, msg + '\n' + getStackTraceString(tr));
+ return println_native(LOG_ID_MAIN, INFO, tag, msg + '\n' + getStackTraceString(tr));
}
/**
@@ -161,7 +161,7 @@
* @param msg The message you would like logged.
*/
public static int w(String tag, String msg) {
- return println(WARN, tag, msg);
+ return println_native(LOG_ID_MAIN, WARN, tag, msg);
}
/**
@@ -172,7 +172,7 @@
* @param tr An exception to log
*/
public static int w(String tag, String msg, Throwable tr) {
- return println(WARN, tag, msg + '\n' + getStackTraceString(tr));
+ return println_native(LOG_ID_MAIN, WARN, tag, msg + '\n' + getStackTraceString(tr));
}
/**
@@ -202,7 +202,7 @@
* @param tr An exception to log
*/
public static int w(String tag, Throwable tr) {
- return println(WARN, tag, getStackTraceString(tr));
+ return println_native(LOG_ID_MAIN, WARN, tag, getStackTraceString(tr));
}
/**
@@ -212,7 +212,7 @@
* @param msg The message you would like logged.
*/
public static int e(String tag, String msg) {
- return println(ERROR, tag, msg);
+ return println_native(LOG_ID_MAIN, ERROR, tag, msg);
}
/**
@@ -223,7 +223,7 @@
* @param tr An exception to log
*/
public static int e(String tag, String msg, Throwable tr) {
- return println(ERROR, tag, msg + '\n' + getStackTraceString(tr));
+ return println_native(LOG_ID_MAIN, ERROR, tag, msg + '\n' + getStackTraceString(tr));
}
/**
@@ -258,7 +258,7 @@
*/
public static int wtf(String tag, String msg, Throwable tr) {
tr = new TerribleFailure(msg, tr);
- int bytes = println(ASSERT, tag, getStackTraceString(tr));
+ int bytes = println_native(LOG_ID_MAIN, ASSERT, tag, getStackTraceString(tr));
RuntimeInit.wtf(tag, tr);
return bytes;
}
@@ -285,5 +285,15 @@
* @param msg The message you would like logged.
* @return The number of bytes written.
*/
- public static native int println(int priority, String tag, String msg);
+ public static int println(int priority, String tag, String msg) {
+ return println_native(LOG_ID_MAIN, priority, tag, msg);
+ }
+
+ /** @hide */ public static final int LOG_ID_MAIN = 0;
+ /** @hide */ public static final int LOG_ID_RADIO = 1;
+ /** @hide */ public static final int LOG_ID_EVENTS = 2;
+ /** @hide */ public static final int LOG_ID_SYSTEM = 3;
+
+ /** @hide */ public static native int println_native(int bufID,
+ int priority, String tag, String msg);
}
diff --git a/core/java/android/util/LogPrinter.java b/core/java/android/util/LogPrinter.java
index 643b8d3..68f64d0 100644
--- a/core/java/android/util/LogPrinter.java
+++ b/core/java/android/util/LogPrinter.java
@@ -23,6 +23,7 @@
public class LogPrinter implements Printer {
private final int mPriority;
private final String mTag;
+ private final int mBuffer;
/**
* Create a new Printer that sends to the log with the given priority
@@ -39,9 +40,20 @@
public LogPrinter(int priority, String tag) {
mPriority = priority;
mTag = tag;
+ mBuffer = Log.LOG_ID_MAIN;
+ }
+
+ /**
+ * @hide
+ * Same as above, but buffer is one of the LOG_ID_ constants from android.util.Log.
+ */
+ public LogPrinter(int priority, String tag, int buffer) {
+ mPriority = priority;
+ mTag = tag;
+ mBuffer = buffer;
}
public void println(String x) {
- Log.println(mPriority, mTag, x);
+ Log.println_native(mBuffer, mPriority, mTag, x);
}
}
diff --git a/common/java/com/android/common/Patterns.java b/core/java/android/util/Patterns.java
similarity index 99%
rename from common/java/com/android/common/Patterns.java
rename to core/java/android/util/Patterns.java
index 3b3b038..2ee6e8a 100644
--- a/common/java/com/android/common/Patterns.java
+++ b/core/java/android/util/Patterns.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.common;
+package android.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
diff --git a/core/java/android/util/Slog.java b/core/java/android/util/Slog.java
new file mode 100644
index 0000000..ecf5ea1
--- /dev/null
+++ b/core/java/android/util/Slog.java
@@ -0,0 +1,85 @@
+/*
+ * 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 android.util;
+
+import com.android.internal.os.RuntimeInit;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+/**
+ * @hide
+ */
+public final class Slog {
+
+ private Slog() {
+ }
+
+ public static int v(String tag, String msg) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.VERBOSE, tag, msg);
+ }
+
+ public static int v(String tag, String msg, Throwable tr) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.VERBOSE, tag,
+ msg + '\n' + Log.getStackTraceString(tr));
+ }
+
+ public static int d(String tag, String msg) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.DEBUG, tag, msg);
+ }
+
+ public static int d(String tag, String msg, Throwable tr) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.DEBUG, tag,
+ msg + '\n' + Log.getStackTraceString(tr));
+ }
+
+ public static int i(String tag, String msg) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.INFO, tag, msg);
+ }
+
+ public static int i(String tag, String msg, Throwable tr) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.INFO, tag,
+ msg + '\n' + Log.getStackTraceString(tr));
+ }
+
+ public static int w(String tag, String msg) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.WARN, tag, msg);
+ }
+
+ public static int w(String tag, String msg, Throwable tr) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.WARN, tag,
+ msg + '\n' + Log.getStackTraceString(tr));
+ }
+
+ public static int w(String tag, Throwable tr) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.WARN, tag, Log.getStackTraceString(tr));
+ }
+
+ public static int e(String tag, String msg) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.ERROR, tag, msg);
+ }
+
+ public static int e(String tag, String msg, Throwable tr) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, Log.ERROR, tag,
+ msg + '\n' + Log.getStackTraceString(tr));
+ }
+
+ public static int println(int priority, String tag, String msg) {
+ return Log.println_native(Log.LOG_ID_SYSTEM, priority, tag, msg);
+ }
+}
+
diff --git a/core/java/android/util/TimeUtils.java b/core/java/android/util/TimeUtils.java
index 4f496d7..0fc70d5 100644
--- a/core/java/android/util/TimeUtils.java
+++ b/core/java/android/util/TimeUtils.java
@@ -27,7 +27,7 @@
import java.util.TimeZone;
import java.util.Date;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
/**
* A class containing utility methods related to time zones.
diff --git a/core/java/android/util/XmlPullAttributes.java b/core/java/android/util/XmlPullAttributes.java
index 8f855cd..ecedbe1 100644
--- a/core/java/android/util/XmlPullAttributes.java
+++ b/core/java/android/util/XmlPullAttributes.java
@@ -19,7 +19,8 @@
import org.xmlpull.v1.XmlPullParser;
import android.util.AttributeSet;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
/**
* Provides an implementation of AttributeSet on top of an XmlPullParser.
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index b055d51..fabe5c8 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -45,41 +45,76 @@
}
/**
- * @return index of this display.
+ * Returns the index of this display. This is currently undefined; do
+ * not use.
*/
public int getDisplayId() {
return mDisplay;
}
/**
- * @return the number of displays connected to the device.
+ * Returns the number of displays connected to the device. This is
+ * currently undefined; do not use.
*/
native static int getDisplayCount();
/**
- * @return width of this display in pixels.
+ * Returns the raw width of the display, in pixels. Note that this
+ * should <em>not</em> generally be used for computing layouts, since
+ * a device will typically have screen decoration (such as a status bar)
+ * along the edges of the display that reduce the amount of application
+ * space available from the raw size returned here. This value is
+ * adjusted for you based on the current rotation of the display.
*/
native public int getWidth();
/**
- * @return height of this display in pixels.
+ * Returns the raw height of the display, in pixels. Note that this
+ * should <em>not</em> generally be used for computing layouts, since
+ * a device will typically have screen decoration (such as a status bar)
+ * along the edges of the display that reduce the amount of application
+ * space available from the raw size returned here. This value is
+ * adjusted for you based on the current rotation of the display.
*/
native public int getHeight();
/**
+ * Returns the rotation of the screen from its "natural" orientation.
+ * The returned value may be {@link Surface#ROTATION_0 Surface.ROTATION_0}
+ * (no rotation), {@link Surface#ROTATION_90 Surface.ROTATION_90},
+ * {@link Surface#ROTATION_180 Surface.ROTATION_180}, or
+ * {@link Surface#ROTATION_270 Surface.ROTATION_270}. For
+ * example, if a device has a naturally tall screen, and the user has
+ * turned it on its side to go into a landscape orientation, the value
+ * returned here may be either {@link Surface#ROTATION_90 Surface.ROTATION_90}
+ * or {@link Surface#ROTATION_270 Surface.ROTATION_270} depending on
+ * the direction it was turned. The angle is the rotation of the drawn
+ * graphics on the screen, which is the opposite direction of the physical
+ * rotation of the device. For example, if the device is rotated 90
+ * degrees counter-clockwise, to compensate rendering will be rotated by
+ * 90 degrees clockwise and thus the returned value here will be
+ * {@link Surface#ROTATION_90 Surface.ROTATION_90}.
+ */
+ public int getRotation() {
+ return getOrientation();
+ }
+
+ /**
+ * @deprecated use {@link #getRotation}
* @return orientation of this display.
*/
- native public int getOrientation();
+ @Deprecated native public int getOrientation();
/**
- * @return pixel format of this display.
+ * Return the native pixel format of the display. The returned value
+ * may be one of the constants int {@link android.graphics.PixelFormat}.
*/
public int getPixelFormat() {
return mPixelFormat;
}
/**
- * @return refresh rate of this display in frames per second.
+ * Return the refresh rate of this display in frames per second.
*/
public float getRefreshRate() {
return mRefreshRate;
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index d7f2539..0722699 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -320,8 +320,14 @@
* <p>Calling this overrides any previous call to {@link #setZOrderMediaOverlay}.
*/
public void setZOrderOnTop(boolean onTop) {
- mWindowType = onTop ? WindowManager.LayoutParams.TYPE_APPLICATION_PANEL
- : WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
+ if (onTop) {
+ mWindowType = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
+ // ensures the surface is placed below the IME
+ mLayout.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
+ } else {
+ mWindowType = WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA;
+ mLayout.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
+ }
}
/**
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 2eb633f..11b0b14 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -1507,6 +1507,13 @@
private static final int PREPRESSED = 0x02000000;
/**
+ * Indicates whether the view is temporarily detached.
+ *
+ * @hide
+ */
+ static final int CANCEL_NEXT_UP_EVENT = 0x04000000;
+
+ /**
* Always allow a user to overscroll this view, provided it is a
* view that can scroll.
*/
@@ -1819,7 +1826,8 @@
mContext = context;
mResources = context != null ? context.getResources() : null;
mViewFlags = SOUND_EFFECTS_ENABLED | HAPTIC_FEEDBACK_ENABLED;
- ++sInstanceCount;
+ // Used for debug only
+ //++sInstanceCount;
mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
}
@@ -2133,11 +2141,14 @@
View() {
}
+ // Used for debug only
+ /*
@Override
protected void finalize() throws Throwable {
super.finalize();
--sInstanceCount;
}
+ */
/**
* <p>
@@ -3650,14 +3661,28 @@
}
/**
- * This is called when a container is going to temporarily detach a child
- * that currently has focus, with
+ * @hide
+ */
+ public void dispatchStartTemporaryDetach() {
+ onStartTemporaryDetach();
+ }
+
+ /**
+ * This is called when a container is going to temporarily detach a child, with
* {@link ViewGroup#detachViewFromParent(View) ViewGroup.detachViewFromParent}.
* It will either be followed by {@link #onFinishTemporaryDetach()} or
- * {@link #onDetachedFromWindow()} when the container is done. Generally
- * this is currently only done ListView for a view with focus.
+ * {@link #onDetachedFromWindow()} when the container is done.
*/
public void onStartTemporaryDetach() {
+ removeUnsetPressCallback();
+ mPrivateFlags |= CANCEL_NEXT_UP_EVENT;
+ }
+
+ /**
+ * @hide
+ */
+ public void dispatchFinishTemporaryDetach() {
+ onFinishTemporaryDetach();
}
/**
@@ -4362,6 +4387,16 @@
}
/**
+ * Remove the prepress detection timer.
+ */
+ private void removeUnsetPressCallback() {
+ if ((mPrivateFlags & PRESSED) != 0 && mUnsetPressedState != null) {
+ setPressed(false);
+ removeCallbacks(mUnsetPressedState);
+ }
+ }
+
+ /**
* Remove the tap detection timer.
*/
private void removeTapCallback() {
@@ -5886,6 +5921,8 @@
* @see #onAttachedToWindow()
*/
protected void onDetachedFromWindow() {
+ mPrivateFlags &= ~CANCEL_NEXT_UP_EVENT;
+ removeUnsetPressCallback();
removeLongPressCallback();
destroyDrawingCache();
}
@@ -7312,6 +7349,7 @@
* Sets the background color for this view.
* @param color the color of the background
*/
+ @RemotableViewMethod
public void setBackgroundColor(int color) {
setBackgroundDrawable(new ColorDrawable(color));
}
@@ -7322,6 +7360,7 @@
* @param resid The identifier of the resource.
* @attr ref android.R.styleable#View_background
*/
+ @RemotableViewMethod
public void setBackgroundResource(int resid) {
if (resid != 0 && resid == mBackgroundResource) {
return;
@@ -8731,7 +8770,7 @@
boolean clampedX, boolean clampedY) {
// Intentionally empty.
}
-
+
/**
* A MeasureSpec encapsulates the layout requirements passed from parent to child.
* Each MeasureSpec represents a requirement for either the width or the height.
@@ -9182,12 +9221,6 @@
boolean mRecomputeGlobalAttributes;
/**
- * Set to true when attributes (like mKeepScreenOn) need to be
- * recomputed.
- */
- boolean mAttributesChanged;
-
- /**
* Set during a traveral if any views want to keep the screen on.
*/
boolean mKeepScreenOn;
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 0663215..9bf36bb 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -859,6 +859,7 @@
final float xc = scrolledXFloat - child.mLeft;
final float yc = scrolledYFloat - child.mTop;
ev.setLocation(xc, yc);
+ child.mPrivateFlags &= ~CANCEL_NEXT_UP_EVENT;
if (child.dispatchTouchEvent(ev)) {
// Event handled, we have a target now.
mMotionTarget = child;
@@ -889,6 +890,10 @@
// We don't have a target, this means we're handling the
// event as a regular view.
ev.setLocation(xf, yf);
+ if ((mPrivateFlags & CANCEL_NEXT_UP_EVENT) != 0) {
+ ev.setAction(MotionEvent.ACTION_CANCEL);
+ mPrivateFlags &= ~CANCEL_NEXT_UP_EVENT;
+ }
return super.dispatchTouchEvent(ev);
}
@@ -897,6 +902,7 @@
if (!disallowIntercept && onInterceptTouchEvent(ev)) {
final float xc = scrolledXFloat - (float) target.mLeft;
final float yc = scrolledYFloat - (float) target.mTop;
+ mPrivateFlags &= ~CANCEL_NEXT_UP_EVENT;
ev.setAction(MotionEvent.ACTION_CANCEL);
ev.setLocation(xc, yc);
if (!target.dispatchTouchEvent(ev)) {
@@ -921,6 +927,12 @@
final float yc = scrolledYFloat - (float) target.mTop;
ev.setLocation(xc, yc);
+ if ((target.mPrivateFlags & CANCEL_NEXT_UP_EVENT) != 0) {
+ ev.setAction(MotionEvent.ACTION_CANCEL);
+ target.mPrivateFlags &= ~CANCEL_NEXT_UP_EVENT;
+ mMotionTarget = null;
+ }
+
return target.dispatchTouchEvent(ev);
}
@@ -1065,6 +1077,36 @@
}
return false;
}
+
+ /**
+ * {@inheritDoc}
+ *
+ * @hide
+ */
+ @Override
+ public void dispatchStartTemporaryDetach() {
+ super.dispatchStartTemporaryDetach();
+ final int count = mChildrenCount;
+ final View[] children = mChildren;
+ for (int i = 0; i < count; i++) {
+ children[i].dispatchStartTemporaryDetach();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @hide
+ */
+ @Override
+ public void dispatchFinishTemporaryDetach() {
+ super.dispatchFinishTemporaryDetach();
+ final int count = mChildrenCount;
+ final View[] children = mChildren;
+ for (int i = 0; i < count; i++) {
+ children[i].dispatchFinishTemporaryDetach();
+ }
+ }
/**
* {@inheritDoc}
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index 264b8c9..582ef3f 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -230,7 +230,8 @@
lt = new LatencyTimer(100, 1000);
}
- ++sInstanceCount;
+ // For debug only
+ //++sInstanceCount;
// Initialize the statics when this class is first instantiated. This is
// done here instead of in the static block because Zygote does not
@@ -258,11 +259,14 @@
mDensity = context.getResources().getDisplayMetrics().densityDpi;
}
+ // For debug only
+ /*
@Override
protected void finalize() throws Throwable {
super.finalize();
--sInstanceCount;
}
+ */
public static long getInstanceCount() {
return sInstanceCount;
diff --git a/core/java/android/view/WindowOrientationListener.java b/core/java/android/view/WindowOrientationListener.java
index 2aba60b..6c58461 100755
--- a/core/java/android/view/WindowOrientationListener.java
+++ b/core/java/android/view/WindowOrientationListener.java
@@ -57,8 +57,12 @@
* {@link android.hardware.SensorManager SensorManager}). Use the default
* value of {@link android.hardware.SensorManager#SENSOR_DELAY_NORMAL
* SENSOR_DELAY_NORMAL} for simple screen orientation change detection.
+ *
+ * This constructor is private since no one uses it and making it public would complicate
+ * things, since the lowpass filtering code depends on the actual sampling period, and there's
+ * no way to get the period from SensorManager based on the rate constant.
*/
- public WindowOrientationListener(Context context, int rate) {
+ private WindowOrientationListener(Context context, int rate) {
mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
mRate = rate;
mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
@@ -107,94 +111,179 @@
}
class SensorEventListenerImpl implements SensorEventListener {
+ // We work with all angles in degrees in this class.
+ private static final float RADIANS_TO_DEGREES = (float) (180 / Math.PI);
+
+ // Indices into SensorEvent.values
private static final int _DATA_X = 0;
private static final int _DATA_Y = 1;
private static final int _DATA_Z = 2;
- // 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.
- private static final int PIVOT_UPPER = 65;
- // Angle about x-axis that's considered negative vertical. Beyond this
- // angle will not result in any orientation changes. If phone faces uses,
- // the device is leaning forward.
- private static final int PIVOT_LOWER = -10;
- 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}}
+ // Internal aliases for the four orientation states. ROTATION_0 = default portrait mode,
+ // ROTATION_90 = left side of device facing the sky, etc.
+ private static final int ROTATION_0 = 0;
+ private static final int ROTATION_90 = 1;
+ private static final int ROTATION_180 = 2;
+ private static final int ROTATION_270 = 3;
+
+ // Current orientation state
+ private int mRotation = ROTATION_0;
+
+ // Mapping our internal aliases into actual Surface rotation values
+ private final int[] SURFACE_ROTATIONS = new int[] {Surface.ROTATION_0, Surface.ROTATION_90,
+ Surface.ROTATION_180, Surface.ROTATION_270};
+
+ // Threshold ranges of orientation angle to transition into other orientation states.
+ // The first list is for transitions from ROTATION_0, the next for ROTATION_90, etc.
+ // ROTATE_TO defines the orientation each threshold range transitions to, and must be kept
+ // in sync with this.
+ // The thresholds are nearly regular -- we generally transition about the halfway point
+ // between two states with a swing of 30 degreees for hysteresis. For ROTATION_180,
+ // however, we enforce stricter thresholds, pushing the thresholds 15 degrees closer to 180.
+ private final int[][][] THRESHOLDS = new int[][][] {
+ {{60, 165}, {165, 195}, {195, 300}},
+ {{0, 45}, {45, 165}, {165, 195}, {330, 360}},
+ {{0, 45}, {45, 135}, {225, 315}, {315, 360}},
+ {{0, 30}, {165, 195}, {195, 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}
+ // See THRESHOLDS
+ private 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};
+ // Maximum absolute tilt angle at which to consider orientation changes. Beyond this (i.e.
+ // when screen is facing the sky or ground), we refuse to make any orientation changes.
+ private static final int MAX_TILT = 65;
+
+ // Additional limits on tilt angle to transition to each new orientation. We ignore all
+ // vectors with tilt beyond MAX_TILT, but we can set stricter limits on transition to a
+ // particular orientation here.
+ private final int[] MAX_TRANSITION_TILT = new int[] {MAX_TILT, MAX_TILT, 40, MAX_TILT};
+
+ // Between this tilt angle and MAX_TILT, we'll allow orientation changes, but we'll filter
+ // with a higher time constant, making us less sensitive to change. This primarily helps
+ // prevent momentary orientation changes when placing a device on a table from the side (or
+ // picking one up).
+ private static final int PARTIAL_TILT = 45;
+
+ // Maximum allowable deviation of the magnitude of the sensor vector from that of gravity,
+ // in m/s^2. Beyond this, we assume the phone is under external forces and we can't trust
+ // the sensor data. However, under constantly vibrating conditions (think car mount), we
+ // still want to pick up changes, so rather than ignore the data, we filter it with a very
+ // high time constant.
+ private static final int MAX_DEVIATION_FROM_GRAVITY = 1;
+
+ // Actual sampling period corresponding to SensorManager.SENSOR_DELAY_NORMAL. There's no
+ // way to get this information from SensorManager.
+ // Note the actual period is generally 3-30ms larger than this depending on the device, but
+ // that's not enough to significantly skew our results.
+ private static final int SAMPLING_PERIOD_MS = 200;
+
+ // The following time constants are all used in low-pass filtering the accelerometer output.
+ // See http://en.wikipedia.org/wiki/Low-pass_filter#Discrete-time_realization for
+ // background.
+
+ // When device is near-vertical (screen approximately facing the horizon)
+ private static final int DEFAULT_TIME_CONSTANT_MS = 200;
+ // When device is partially tilted towards the sky or ground
+ private static final int TILTED_TIME_CONSTANT_MS = 600;
+ // When device is under external acceleration, i.e. not just gravity. We heavily distrust
+ // such readings.
+ private static final int ACCELERATING_TIME_CONSTANT_MS = 5000;
+
+ private static final float DEFAULT_LOWPASS_ALPHA =
+ (float) SAMPLING_PERIOD_MS / (DEFAULT_TIME_CONSTANT_MS + SAMPLING_PERIOD_MS);
+ private static final float TILTED_LOWPASS_ALPHA =
+ (float) SAMPLING_PERIOD_MS / (TILTED_TIME_CONSTANT_MS + SAMPLING_PERIOD_MS);
+ private static final float ACCELERATING_LOWPASS_ALPHA =
+ (float) SAMPLING_PERIOD_MS / (ACCELERATING_TIME_CONSTANT_MS + SAMPLING_PERIOD_MS);
+
+ // The low-pass filtered accelerometer data
+ private float[] mFilteredVector = new float[] {0, 0, 0};
int getCurrentRotation() {
- return TRANSFORM_ROTATIONS[mRotation];
+ return SURFACE_ROTATIONS[mRotation];
}
-
- private void calculateNewRotation(int orientation, int zyangle) {
- if (localLOGV) Log.i(TAG, orientation + ", " + zyangle + ", " + mRotation);
- int rangeArr[][] = THRESHOLDS[mRotation];
+
+ private void calculateNewRotation(int orientation, int tiltAngle) {
+ if (localLOGV) Log.i(TAG, orientation + ", " + tiltAngle + ", " + mRotation);
+ int thresholdRanges[][] = THRESHOLDS[mRotation];
int row = -1;
- for (int i = 0; i < rangeArr.length; i++) {
- if ((orientation >= rangeArr[i][0]) && (orientation < rangeArr[i][1])) {
+ for (int i = 0; i < thresholdRanges.length; i++) {
+ if (orientation >= thresholdRanges[i][0] && orientation < thresholdRanges[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]);
- }
+ if (row == -1) return; // no matching transition
+
+ int rotation = ROTATE_TO[mRotation][row];
+ if (tiltAngle > MAX_TRANSITION_TILT[rotation]) {
+ // tilted too far flat to go to this rotation
+ return;
}
+
+ if (localLOGV) Log.i(TAG, " new rotation = " + rotation);
+ mRotation = rotation;
+ onOrientationChanged(SURFACE_ROTATIONS[rotation]);
+ }
+
+ private float lowpassFilter(float newValue, float oldValue, float alpha) {
+ return alpha * newValue + (1 - alpha) * oldValue;
+ }
+
+ private float vectorMagnitude(float x, float y, float z) {
+ return (float) Math.sqrt(x*x + y*y + z*z);
+ }
+
+ /**
+ * Absolute angle between upVector and the x-y plane (the plane of the screen), in [0, 90].
+ * 90 degrees = screen facing the sky or ground.
+ */
+ private float tiltAngle(float z, float magnitude) {
+ return Math.abs((float) Math.asin(z / magnitude) * RADIANS_TO_DEGREES);
}
public void onSensorChanged(SensorEvent event) {
- float[] values = event.values;
- float X = values[_DATA_X];
- float Y = values[_DATA_Y];
- float Z = values[_DATA_Z];
- float OneEightyOverPi = 57.29577957855f;
- float gravity = (float) Math.sqrt(X*X+Y*Y+Z*Z);
- float zyangle = (float)Math.asin(Z/gravity)*OneEightyOverPi;
- 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 - Math.round(angle);
- // normalize to 0 - 359 range
- while (orientation >= 360) {
- orientation -= 360;
- }
- while (orientation < 0) {
- orientation += 360;
- }
- calculateNewRotation(orientation, Math.round(zyangle));
+ // the vector given in the SensorEvent points straight up (towards the sky) under ideal
+ // conditions (the phone is not accelerating). i'll call this upVector elsewhere.
+ float x = event.values[_DATA_X];
+ float y = event.values[_DATA_Y];
+ float z = event.values[_DATA_Z];
+ float magnitude = vectorMagnitude(x, y, z);
+ float deviation = Math.abs(magnitude - SensorManager.STANDARD_GRAVITY);
+ float tiltAngle = tiltAngle(z, magnitude);
+
+ float alpha = DEFAULT_LOWPASS_ALPHA;
+ if (tiltAngle > MAX_TILT) {
+ return;
+ } else if (deviation > MAX_DEVIATION_FROM_GRAVITY) {
+ alpha = ACCELERATING_LOWPASS_ALPHA;
+ } else if (tiltAngle > PARTIAL_TILT) {
+ alpha = TILTED_LOWPASS_ALPHA;
}
+
+ x = mFilteredVector[0] = lowpassFilter(x, mFilteredVector[0], alpha);
+ y = mFilteredVector[1] = lowpassFilter(y, mFilteredVector[1], alpha);
+ z = mFilteredVector[2] = lowpassFilter(z, mFilteredVector[2], alpha);
+ magnitude = vectorMagnitude(x, y, z);
+ tiltAngle = tiltAngle(z, magnitude);
+
+ // Angle between the x-y projection of upVector and the +y-axis, increasing
+ // counter-clockwise.
+ // 0 degrees = speaker end towards the sky
+ // 90 degrees = left edge of device towards the sky
+ float orientationAngle = (float) Math.atan2(-x, y) * RADIANS_TO_DEGREES;
+ int orientation = Math.round(orientationAngle);
+ // atan2 returns (-180, 180]; normalize to [0, 360)
+ if (orientation < 0) {
+ orientation += 360;
+ }
+ calculateNewRotation(orientation, Math.round(tiltAngle));
}
public void onAccuracyChanged(Sensor sensor, int accuracy) {
@@ -208,13 +297,12 @@
public boolean canDetectOrientation() {
return mSensor != null;
}
-
+
/**
* Called when the rotation view of the device has changed.
- * Can be either Surface.ROTATION_90 or Surface.ROTATION_0.
- * @param rotation The new orientation of the device.
*
- * @see #ORIENTATION_UNKNOWN
+ * @param rotation The new orientation of the device, one of the Surface.ROTATION_* constants.
+ * @see Surface
*/
abstract public void onOrientationChanged(int rotation);
}
diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java
index 3f1672a..1c0d55f 100644
--- a/core/java/android/webkit/BrowserFrame.java
+++ b/core/java/android/webkit/BrowserFrame.java
@@ -407,7 +407,8 @@
}
}
}
- CacheManager.trimCacheIfNeeded();
+ WebViewWorker.getHandler().sendEmptyMessage(
+ WebViewWorker.MSG_TRIM_CACHE);
break;
}
diff --git a/core/java/android/webkit/CacheManager.java b/core/java/android/webkit/CacheManager.java
index 87cab3c..1c59c10 100644
--- a/core/java/android/webkit/CacheManager.java
+++ b/core/java/android/webkit/CacheManager.java
@@ -18,19 +18,20 @@
import android.content.Context;
import android.net.http.Headers;
+import android.net.http.HttpDateTime;
import android.os.FileUtils;
import android.util.Log;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
+import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.util.ArrayList;
+import java.util.List;
import java.util.Map;
-import com.android.common.HttpDateTime;
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.SHA1Digest;
@@ -200,9 +201,9 @@
// the cache database. The directory could be recreated
// because the system flushed all the data/cache directories
// to free up disk space.
- WebViewCore.endCacheTransaction();
- mDataBase.clearCache();
- WebViewCore.startCacheTransaction();
+ // delete rows in the cache database
+ WebViewWorker.getHandler().sendEmptyMessage(
+ WebViewWorker.MSG_CLEAR_CACHE);
return true;
}
return false;
@@ -223,7 +224,6 @@
*
* @param disabled true to disable the cache
*/
- // only called from WebCore thread
static void setCacheDisabled(boolean disabled) {
if (disabled == mDisabled) {
return;
@@ -243,7 +243,7 @@
return mDisabled;
}
- // only called from WebCore thread
+ // only called from WebViewWorkerThread
// make sure to call enableTransaction/disableTransaction in pair
static boolean enableTransaction() {
if (++mRefCount == 1) {
@@ -253,12 +253,9 @@
return false;
}
- // only called from WebCore thread
+ // only called from WebViewWorkerThread
// make sure to call enableTransaction/disableTransaction in pair
static boolean disableTransaction() {
- if (mRefCount == 0) {
- Log.e(LOGTAG, "disableTransaction is out of sync");
- }
if (--mRefCount == 0) {
mDataBase.endCacheTransaction();
return true;
@@ -266,15 +263,15 @@
return false;
}
- // only called from WebCore thread
- // make sure to call startCacheTransaction/endCacheTransaction in pair
- public static boolean startCacheTransaction() {
+ // only called from WebViewWorkerThread
+ // make sure to call startTransaction/endTransaction in pair
+ static boolean startTransaction() {
return mDataBase.startCacheTransaction();
}
- // only called from WebCore thread
- // make sure to call startCacheTransaction/endCacheTransaction in pair
- public static boolean endCacheTransaction() {
+ // only called from WebViewWorkerThread
+ // make sure to call startTransaction/endTransaction in pair
+ static boolean endTransaction() {
boolean ret = mDataBase.endCacheTransaction();
if (++mTrimCacheCount >= TRIM_CACHE_INTERVAL) {
mTrimCacheCount = 0;
@@ -283,6 +280,26 @@
return ret;
}
+ // only called from WebCore Thread
+ // make sure to call startCacheTransaction/endCacheTransaction in pair
+ /**
+ * @deprecated
+ */
+ @Deprecated
+ public static boolean startCacheTransaction() {
+ return false;
+ }
+
+ // only called from WebCore Thread
+ // make sure to call startCacheTransaction/endCacheTransaction in pair
+ /**
+ * @deprecated
+ */
+ @Deprecated
+ public static boolean endCacheTransaction() {
+ return false;
+ }
+
/**
* Given a url, returns the CacheResult if exists. Otherwise returns null.
* If headers are provided and a cache needs validation,
@@ -291,13 +308,11 @@
*
* @return the CacheResult for a given url
*/
- // only called from WebCore thread
public static CacheResult getCacheFile(String url,
Map<String, String> headers) {
return getCacheFile(url, 0, headers);
}
- // only called from WebCore thread
static CacheResult getCacheFile(String url, long postIdentifier,
Map<String, String> headers) {
if (mDisabled) {
@@ -368,14 +383,12 @@
* @hide - hide createCacheFile since it has a parameter of type headers, which is
* in a hidden package.
*/
- // only called from WebCore thread
public static CacheResult createCacheFile(String url, int statusCode,
Headers headers, String mimeType, boolean forceCache) {
return createCacheFile(url, statusCode, headers, mimeType, 0,
forceCache);
}
- // only called from WebCore thread
static CacheResult createCacheFile(String url, int statusCode,
Headers headers, String mimeType, long postIdentifier,
boolean forceCache) {
@@ -435,12 +448,10 @@
* Save the info of a cache file for a given url to the CacheMap so that it
* can be reused later
*/
- // only called from WebCore thread
public static void saveCacheFile(String url, CacheResult cacheRet) {
saveCacheFile(url, 0, cacheRet);
}
- // only called from WebCore thread
static void saveCacheFile(String url, long postIdentifier,
CacheResult cacheRet) {
try {
@@ -489,7 +500,6 @@
*
* @return true if it succeeds
*/
- // only called from WebCore thread
static boolean removeAllCacheFiles() {
// Note, this is called before init() when the database is
// created or upgraded.
@@ -499,7 +509,10 @@
mClearCacheOnInit = true;
return true;
}
- // delete cache in a separate thread to not block UI.
+ // delete rows in the cache database
+ WebViewWorker.getHandler().sendEmptyMessage(
+ WebViewWorker.MSG_CLEAR_CACHE);
+ // delete cache files in a separate thread to not block UI.
final Runnable clearCache = new Runnable() {
public void run() {
// delete all cache files
@@ -517,8 +530,6 @@
} catch (SecurityException e) {
// Ignore SecurityExceptions.
}
- // delete database
- mDataBase.clearCache();
}
};
new Thread(clearCache).start();
@@ -528,15 +539,13 @@
/**
* Return true if the cache is empty.
*/
- // only called from WebCore thread
static boolean cacheEmpty() {
return mDataBase.hasCache();
}
- // only called from WebCore thread
static void trimCacheIfNeeded() {
if (mDataBase.getCacheTotalSize() > CACHE_THRESHOLD) {
- ArrayList<String> pathList = mDataBase.trimCache(CACHE_TRIM_AMOUNT);
+ List<String> pathList = mDataBase.trimCache(CACHE_TRIM_AMOUNT);
int size = pathList.size();
for (int i = 0; i < size; i++) {
File f = new File(mBaseDir, pathList.get(i));
@@ -544,9 +553,34 @@
Log.e(LOGTAG, f.getPath() + " delete failed.");
}
}
+ // remove the unreferenced files in the cache directory
+ final List<String> fileList = mDataBase.getAllCacheFileNames();
+ if (fileList == null) return;
+ String[] toDelete = mBaseDir.list(new FilenameFilter() {
+ public boolean accept(File dir, String filename) {
+ if (fileList.contains(filename)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ });
+ if (toDelete == null) return;
+ size = toDelete.length;
+ for (int i = 0; i < size; i++) {
+ File f = new File(mBaseDir, toDelete[i]);
+ if (!f.delete()) {
+ Log.e(LOGTAG, f.getPath() + " delete failed.");
+ }
+ }
}
}
+ static void clearCache() {
+ // delete database
+ mDataBase.clearCache();
+ }
+
private static boolean checkCacheRedirect(int statusCode) {
if (statusCode == 301 || statusCode == 302 || statusCode == 307) {
// as 303 can't be cached, we do not return true
diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java
index 94bedde..1d28731 100644
--- a/core/java/android/webkit/CookieManager.java
+++ b/core/java/android/webkit/CookieManager.java
@@ -18,9 +18,9 @@
import android.net.ParseException;
import android.net.WebAddress;
+import android.net.http.HttpDateTime;
import android.util.Log;
-import com.android.common.HttpDateTime;
import java.util.ArrayList;
import java.util.Arrays;
@@ -150,8 +150,13 @@
}
boolean exactMatch(Cookie in) {
+ // An exact match means that domain, path, and name are equal. If
+ // both values are null, the cookies match. If both values are
+ // non-null, the cookies match. If one value is null and the other
+ // is non-null, the cookies do not match (i.e. "foo=;" and "foo;")
+ boolean valuesMatch = !((value == null) ^ (in.value == null));
return domain.equals(in.domain) && path.equals(in.path) &&
- name.equals(in.name);
+ name.equals(in.name) && valuesMatch;
}
boolean domainMatch(String urlHost) {
@@ -206,17 +211,29 @@
// As Set is not modified if the two objects are same, we do want to
// assign different value for each cookie.
int diff = cookie2.path.length() - cookie1.path.length();
- if (diff == 0) {
- diff = cookie2.domain.length() - cookie1.domain.length();
- if (diff == 0) {
- diff = cookie2.name.hashCode() - cookie1.name.hashCode();
- if (diff == 0) {
- Log.w(LOGTAG, "Found two cookies with the same value." +
- "cookie1=" + cookie1 + " , cookie2=" + cookie2);
- }
- }
+ if (diff != 0) return diff;
+
+ diff = cookie2.domain.length() - cookie1.domain.length();
+ if (diff != 0) return diff;
+
+ diff = cookie2.name.hashCode() - cookie1.name.hashCode();
+ if (diff != 0) return diff;
+
+ // If cookie2 has a null value, it should come later in
+ // the list.
+ if (cookie2.value == null) {
+ return -1;
+ } else if (cookie1.value == null) {
+ // Now we know that cookie2 does not have a null value, if
+ // cookie1 has a null value, place it later in the list.
+ return 1;
}
- return diff;
+
+ // cookie1 and cookie2 both have non-null values so we emit a
+ // warning and treat them as the same.
+ Log.w(LOGTAG, "Found two cookies with the same value."
+ + "cookie1=" + cookie1 + " , cookie2=" + cookie2);
+ return 0;
}
}
@@ -459,8 +476,10 @@
}
ret.append(cookie.name);
- ret.append(EQUAL);
- ret.append(cookie.value);
+ if (cookie.value != null) {
+ ret.append(EQUAL);
+ ret.append(cookie.value);
+ }
}
if (ret.length() > 0) {
@@ -634,7 +653,10 @@
byteCount += cookie.domain.length()
+ cookie.path.length()
+ cookie.name.length()
- + cookie.value.length() + 14;
+ + (cookie.value != null
+ ? cookie.value.length()
+ : 0)
+ + 14;
count++;
}
} else {
@@ -779,38 +801,45 @@
*/
int semicolonIndex = cookieString.indexOf(SEMICOLON, index);
int equalIndex = cookieString.indexOf(EQUAL, index);
- if (equalIndex == -1) {
- // bad format, force return
- break;
- }
- if (semicolonIndex > -1 && semicolonIndex < equalIndex) {
- // empty cookie, like "; path=/", return
- break;
- }
cookie = new Cookie(host, path);
- cookie.name = cookieString.substring(index, equalIndex);
- if (cookieString.charAt(equalIndex + 1) == QUOTATION) {
- index = cookieString.indexOf(QUOTATION, equalIndex + 2);
- if (index == -1) {
- // bad format, force return
- break;
+
+ // Cookies like "testcookie; path=/;" are valid and used
+ // (lovefilm.se). Check for equal as in the string "testcookie"
+ // Check for equalIndex == -1 as in the string "testcookie;"
+ if (semicolonIndex <= equalIndex || equalIndex == -1) {
+ // Fix up the index in case we have a string like "testcookie"
+ if (semicolonIndex == -1) {
+ semicolonIndex = length;
}
- }
- semicolonIndex = cookieString.indexOf(SEMICOLON, index);
- if (semicolonIndex == -1) {
- semicolonIndex = length;
- }
- if (semicolonIndex - equalIndex > MAX_COOKIE_LENGTH) {
- // cookie is too big, trim it
- cookie.value = cookieString.substring(equalIndex + 1,
- equalIndex + MAX_COOKIE_LENGTH);
- } else if (equalIndex + 1 == semicolonIndex
- || semicolonIndex < equalIndex) {
- // these are unusual case like foo=; and foo; path=/
- cookie.value = "";
+ cookie.name = cookieString.substring(index, semicolonIndex);
+ cookie.value = null;
} else {
- cookie.value = cookieString.substring(equalIndex + 1,
- semicolonIndex);
+ cookie.name = cookieString.substring(index, equalIndex);
+ if (cookieString.charAt(equalIndex + 1) == QUOTATION) {
+ index = cookieString.indexOf(QUOTATION, equalIndex + 2);
+ if (index == -1) {
+ // bad format, force return
+ break;
+ }
+ }
+ // Get the semicolon index again in case it was contained within
+ // the quotations.
+ semicolonIndex = cookieString.indexOf(SEMICOLON, index);
+ if (semicolonIndex == -1) {
+ semicolonIndex = length;
+ }
+ if (semicolonIndex - equalIndex > MAX_COOKIE_LENGTH) {
+ // cookie is too big, trim it
+ cookie.value = cookieString.substring(equalIndex + 1,
+ equalIndex + 1 + MAX_COOKIE_LENGTH);
+ } else if (equalIndex + 1 == semicolonIndex
+ || semicolonIndex < equalIndex) {
+ // this is an unusual case like foo=;
+ cookie.value = "";
+ } else {
+ cookie.value = cookieString.substring(equalIndex + 1,
+ semicolonIndex);
+ }
}
// get attributes
index = semicolonIndex;
diff --git a/core/java/android/webkit/FrameLoader.java b/core/java/android/webkit/FrameLoader.java
index b13c405..7903632 100644
--- a/core/java/android/webkit/FrameLoader.java
+++ b/core/java/android/webkit/FrameLoader.java
@@ -110,7 +110,9 @@
return false;
}
mNetwork = Network.getInstance(mListener.getContext());
- return handleHTTPLoad();
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_ADD_HTTPLOADER, this).sendToTarget();
+ return true;
} else if (handleLocalFile(url, mListener, mSettings)) {
return true;
}
@@ -142,24 +144,33 @@
}
if (URLUtil.isAssetUrl(url)) {
// load asset in a separate thread as it involves IO
- new FileLoader(url, loadListener, FileLoader.TYPE_ASSET, true)
- .enqueue();
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_ADD_STREAMLOADER,
+ new FileLoader(url, loadListener, FileLoader.TYPE_ASSET,
+ true)).sendToTarget();
return true;
} else if (URLUtil.isResourceUrl(url)) {
// load resource in a separate thread as it involves IO
- new FileLoader(url, loadListener, FileLoader.TYPE_RES, true)
- .enqueue();
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_ADD_STREAMLOADER,
+ new FileLoader(url, loadListener, FileLoader.TYPE_RES,
+ true)).sendToTarget();
return true;
} else if (URLUtil.isFileUrl(url)) {
// load file in a separate thread as it involves IO
- new FileLoader(url, loadListener, FileLoader.TYPE_FILE, settings
- .getAllowFileAccess()).enqueue();
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_ADD_STREAMLOADER,
+ new FileLoader(url, loadListener, FileLoader.TYPE_FILE,
+ settings.getAllowFileAccess())).sendToTarget();
return true;
} else if (URLUtil.isContentUrl(url)) {
// Send the raw url to the ContentLoader because it will do a
// permission check and the url has to match.
// load content in a separate thread as it involves IO
- new ContentLoader(loadListener.url(), loadListener).enqueue();
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_ADD_STREAMLOADER,
+ new ContentLoader(loadListener.url(), loadListener))
+ .sendToTarget();
return true;
} else if (URLUtil.isDataUrl(url)) {
// load data in the current thread to reduce the latency
@@ -172,8 +183,8 @@
}
return false;
}
-
- private boolean handleHTTPLoad() {
+
+ boolean handleHTTPLoad() {
if (mHeaders == null) {
mHeaders = new HashMap<String, String>();
}
@@ -229,7 +240,9 @@
CacheLoader cacheLoader =
new CacheLoader(mListener, result);
mListener.setCacheLoader(cacheLoader);
- cacheLoader.load();
+ // Load the cached file in a separate thread
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_ADD_STREAMLOADER, cacheLoader).sendToTarget();
}
/*
diff --git a/core/java/android/webkit/HTML5VideoViewProxy.java b/core/java/android/webkit/HTML5VideoViewProxy.java
index 85f1d5c..42e1539 100644
--- a/core/java/android/webkit/HTML5VideoViewProxy.java
+++ b/core/java/android/webkit/HTML5VideoViewProxy.java
@@ -131,6 +131,7 @@
mTimer = null;
mCurrentProxy.playbackEnded();
mCurrentProxy = null;
+ mVideoView.stopPlayback();
mLayout.removeView(mVideoView);
mVideoView = null;
if (mProgressView != null) {
@@ -218,11 +219,10 @@
}
public static void onPrepared() {
- mTimer.schedule(new TimeupdateTask(mCurrentProxy), TIMEUPDATE_PERIOD, TIMEUPDATE_PERIOD);
-
if (mProgressView == null || mLayout == null) {
return;
}
+ mTimer.schedule(new TimeupdateTask(mCurrentProxy), TIMEUPDATE_PERIOD, TIMEUPDATE_PERIOD);
mProgressView.setVisibility(View.GONE);
mLayout.removeView(mProgressView);
mProgressView = null;
diff --git a/core/java/android/webkit/LoadListener.java b/core/java/android/webkit/LoadListener.java
index cdc6608..8bacee4 100644
--- a/core/java/android/webkit/LoadListener.java
+++ b/core/java/android/webkit/LoadListener.java
@@ -101,7 +101,6 @@
private boolean mCancelled; // The request has been cancelled.
private boolean mAuthFailed; // indicates that the prev. auth failed
private CacheLoader mCacheLoader;
- private CacheManager.CacheResult mCacheResult;
private boolean mFromCache = false;
private HttpAuthHeader mAuthHeader;
private int mErrorID = OK;
@@ -301,6 +300,12 @@
*/
public void headers(Headers headers) {
if (DebugFlags.LOAD_LISTENER) Log.v(LOGTAG, "LoadListener.headers");
+ // call db (setCookie) in the non-WebCore thread
+ if (mCancelled) return;
+ ArrayList<String> cookies = headers.getSetCookie();
+ for (int i = 0; i < cookies.size(); ++i) {
+ CookieManager.getInstance().setCookie(mUri, cookies.get(i));
+ }
sendMessageInternal(obtainMessage(MSG_CONTENT_HEADERS, headers));
}
@@ -316,11 +321,6 @@
if (mCancelled) return;
mHeaders = headers;
- ArrayList<String> cookies = headers.getSetCookie();
- for (int i = 0; i < cookies.size(); ++i) {
- CookieManager.getInstance().setCookie(mUri, cookies.get(i));
- }
-
long contentLength = headers.getContentLength();
if (contentLength != Headers.NO_CONTENT_LENGTH) {
mContentLength = contentLength;
@@ -454,12 +454,19 @@
if (!mFromCache && mRequestHandle != null
&& (!mRequestHandle.getMethod().equals("POST")
|| mPostIdentifier != 0)) {
- mCacheResult = CacheManager.createCacheFile(mUrl, mStatusCode,
- headers, mMimeType, mPostIdentifier, false);
+ WebViewWorker.CacheCreateData data = new WebViewWorker.CacheCreateData();
+ data.mListener = this;
+ data.mUrl = mUrl;
+ data.mMimeType = mMimeType;
+ data.mStatusCode = mStatusCode;
+ data.mPostId = mPostIdentifier;
+ data.mHeaders = headers;
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_CREATE_CACHE, data).sendToTarget();
}
- if (mCacheResult != null) {
- mCacheResult.encoding = mEncoding;
- }
+ WebViewWorker.CacheEncoding ce = new WebViewWorker.CacheEncoding();
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_UPDATE_CACHE_ENCODING, ce).sendToTarget();
}
commitHeadersCheckRedirect();
}
@@ -649,7 +656,10 @@
// ask for it, so make sure we have a valid CacheLoader
// before calling it.
if (mCacheLoader != null) {
- mCacheLoader.load();
+ // Load the cached file in a separate thread
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_ADD_STREAMLOADER, mCacheLoader)
+ .sendToTarget();
mFromCache = true;
if (DebugFlags.LOAD_LISTENER) {
Log.v(LOGTAG, "LoadListener cache load url=" + url());
@@ -708,8 +718,10 @@
Log.v(LOGTAG, "FrameLoader: HTTP URL in cache " +
"and usable: " + url());
}
- // Load the cached file
- mCacheLoader.load();
+ // Load the cached file in a separate thread
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_ADD_STREAMLOADER, mCacheLoader)
+ .sendToTarget();
mFromCache = true;
return true;
}
@@ -934,12 +946,9 @@
* WebCore.
*/
void downloadFile() {
- // Setting the Cache Result to null ensures that this
- // content is not added to the cache
- if (mCacheResult != null) {
- CacheManager.cleanupCacheFile(mCacheResult);
- mCacheResult = null;
- }
+ // remove the cache
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_REMOVE_CACHE, this).sendToTarget();
// Inform the client that they should download a file
mBrowserFrame.getCallbackProxy().onDownloadStart(url(),
@@ -1098,24 +1107,15 @@
if (c == null) break;
if (c.mLength != 0) {
- if (mCacheResult != null) {
- 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);
+ WebViewWorker.CacheData data = new WebViewWorker.CacheData();
+ data.mListener = this;
+ data.mChunk = c;
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_APPEND_CACHE, data).sendToTarget();
+ } else {
+ c.release();
}
- c.release();
checker.responseAlert("res nativeAddData");
}
}
@@ -1125,18 +1125,16 @@
* cancellation or errors during the load.
*/
void tearDown() {
- if (mCacheResult != null) {
- if (getErrorID() == OK) {
- CacheManager.saveCacheFile(mUrl, mPostIdentifier, mCacheResult);
- } else {
- CacheManager.cleanupCacheFile(mCacheResult);
- }
-
- // we need to reset mCacheResult to be null
- // resource loader's tearDown will call into WebCore's
- // nativeFinish, which in turn calls loader.cancel().
- // If we don't reset mCacheFile, the file will be deleted.
- mCacheResult = null;
+ if (getErrorID() == OK) {
+ WebViewWorker.CacheSaveData data = new WebViewWorker.CacheSaveData();
+ data.mListener = this;
+ data.mUrl = mUrl;
+ data.mPostId = mPostIdentifier;
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_SAVE_CACHE, data).sendToTarget();
+ } else {
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_REMOVE_CACHE, this).sendToTarget();
}
if (mNativeLoader != 0) {
PerfChecker checker = new PerfChecker();
@@ -1194,10 +1192,8 @@
mRequestHandle = null;
}
- if (mCacheResult != null) {
- CacheManager.cleanupCacheFile(mCacheResult);
- mCacheResult = null;
- }
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_REMOVE_CACHE, this).sendToTarget();
mCancelled = true;
clearNativeLoader();
@@ -1258,14 +1254,16 @@
}
// Cache the redirect response
- if (mCacheResult != null) {
- if (getErrorID() == OK) {
- CacheManager.saveCacheFile(mUrl, mPostIdentifier,
- mCacheResult);
- } else {
- CacheManager.cleanupCacheFile(mCacheResult);
- }
- mCacheResult = null;
+ if (getErrorID() == OK) {
+ WebViewWorker.CacheSaveData data = new WebViewWorker.CacheSaveData();
+ data.mListener = this;
+ data.mUrl = mUrl;
+ data.mPostId = mPostIdentifier;
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_SAVE_CACHE, data).sendToTarget();
+ } else {
+ WebViewWorker.getHandler().obtainMessage(
+ WebViewWorker.MSG_REMOVE_CACHE, this).sendToTarget();
}
// This will strip the anchor
diff --git a/core/java/android/webkit/PluginManager.java b/core/java/android/webkit/PluginManager.java
index cdcb662..df7d0c4 100644
--- a/core/java/android/webkit/PluginManager.java
+++ b/core/java/android/webkit/PluginManager.java
@@ -165,6 +165,7 @@
continue;
}
+/* temporarily disable signatures checking
// check to ensure the plugin is properly signed
Signature signatures[] = pkgInfo.signatures;
if (signatures == null) {
@@ -184,7 +185,7 @@
continue;
}
}
-
+*/
// determine the type of plugin from the manifest
if (serviceInfo.metaData == null) {
Log.e(LOGTAG, "The plugin '" + serviceInfo.name + "' has no type defined");
diff --git a/core/java/android/webkit/StreamLoader.java b/core/java/android/webkit/StreamLoader.java
index 4c32997..7bcd50d 100644
--- a/core/java/android/webkit/StreamLoader.java
+++ b/core/java/android/webkit/StreamLoader.java
@@ -20,8 +20,6 @@
import android.net.http.EventHandler;
import android.net.http.Headers;
import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.Looper;
import android.os.Message;
import java.io.IOException;
@@ -61,11 +59,6 @@
// Handler which will be initialized in the thread where load() is called.
private Handler mHandler;
- // Handler which will be used to load StreamLoader in a separate thread
- private static StreamQueueHandler sStreamQueueHandler;
-
- private static final Object sStreamQueueLock = new Object();
-
/**
* Constructor. Although this class calls the LoadListener, it only calls
* the EventHandler Interface methods. LoadListener concrete class is used
@@ -97,26 +90,6 @@
abstract protected void buildHeaders(Headers headers);
/**
- * Calling this method to load this StreamLoader in a separate
- * "StreamLoadingThread".
- */
- final void enqueue() {
- synchronized (sStreamQueueLock) {
- if (sStreamQueueHandler == null) {
- HandlerThread thread = new HandlerThread(
- StreamQueueHandler.THREAD_NAME,
- android.os.Process.THREAD_PRIORITY_DEFAULT +
- android.os.Process.THREAD_PRIORITY_LESS_FAVORABLE);
- thread.start();
- sStreamQueueHandler = new StreamQueueHandler(thread.getLooper());
- }
- }
-
- sStreamQueueHandler.obtainMessage(StreamQueueHandler.MSG_ADD_LOADER,
- this).sendToTarget();
- }
-
- /**
* Calling this method starts the load of the content for this StreamLoader.
* This method simply creates a Handler in the current thread and posts a
* message to send the status and returns immediately.
@@ -228,22 +201,4 @@
}
mLoadListener.endData();
}
-
- private static class StreamQueueHandler extends Handler {
- private static final String THREAD_NAME = "StreamLoadingThread";
-
- private static final int MSG_ADD_LOADER = 101;
-
- StreamQueueHandler(Looper looper) {
- super(looper);
- }
-
- @Override
- public void handleMessage(Message msg) {
- if (msg.what == MSG_ADD_LOADER) {
- StreamLoader loader = (StreamLoader) msg.obj;
- loader.load();
- }
- }
- }
}
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 662be95..8981419 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -173,6 +173,9 @@
private long mAppCacheMaxSize = Long.MAX_VALUE;
private String mAppCachePath = "";
private String mDatabasePath = "";
+ // The WebCore DatabaseTracker only allows the database path to be set
+ // once. Keep track of when the path has been set.
+ private boolean mDatabasePathHasBeenSet = false;
private String mGeolocationDatabasePath = "";
// Don't need to synchronize the get/set methods as they
// are basic types, also none of these values are used in
@@ -1006,13 +1009,15 @@
/**
* Set the path to where database storage API databases should be saved.
+ * Nota that the WebCore Database Tracker only allows the path to be set once.
* This will update WebCore when the Sync runs in the C++ side.
* @param databasePath String path to the directory where databases should
* be saved. May be the empty string but should never be null.
*/
public synchronized void setDatabasePath(String databasePath) {
- if (databasePath != null && !databasePath.equals(mDatabasePath)) {
+ if (databasePath != null && !mDatabasePathHasBeenSet) {
mDatabasePath = databasePath;
+ mDatabasePathHasBeenSet = true;
postSync();
}
}
diff --git a/core/java/android/webkit/WebTextView.java b/core/java/android/webkit/WebTextView.java
index d1ad61f..db19bca 100644
--- a/core/java/android/webkit/WebTextView.java
+++ b/core/java/android/webkit/WebTextView.java
@@ -304,15 +304,16 @@
public void onEditorAction(int actionCode) {
switch (actionCode) {
case EditorInfo.IME_ACTION_NEXT:
- // Since the cursor will no longer be in the same place as the
- // focus, set the focus controller back to inactive
- mWebView.setFocusControllerInactive();
- mWebView.nativeMoveCursorToNextTextInput();
- // Preemptively rebuild the WebTextView, so that the action will
- // be set properly.
- mWebView.rebuildWebTextView();
- setDefaultSelection();
- mWebView.invalidate();
+ if (mWebView.nativeMoveCursorToNextTextInput()) {
+ // Since the cursor will no longer be in the same place as the
+ // focus, set the focus controller back to inactive
+ mWebView.setFocusControllerInactive();
+ // Preemptively rebuild the WebTextView, so that the action will
+ // be set properly.
+ mWebView.rebuildWebTextView();
+ setDefaultSelection();
+ mWebView.invalidate();
+ }
break;
case EditorInfo.IME_ACTION_DONE:
super.onEditorAction(actionCode);
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index adae0cb..ca7224e 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -213,7 +213,6 @@
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
static final String LOGTAG = "webview";
@@ -375,6 +374,7 @@
private static final int PREVENT_DRAG_NO = 0;
private static final int PREVENT_DRAG_MAYBE_YES = 1;
private static final int PREVENT_DRAG_YES = 2;
+ private static final int PREVENT_DRAG_CANCEL = 3;
private int mPreventDrag = PREVENT_DRAG_NO;
// by default mPreventLongPress is false. If it is true, long press event
@@ -617,6 +617,12 @@
private static final int SNAP_Y = 4; // may be combined with SNAP_LOCK
private boolean mSnapPositive;
+ // keep these in sync with their counterparts in WebView.cpp
+ private static final int DRAW_EXTRAS_NONE = 0;
+ private static final int DRAW_EXTRAS_FIND = 1;
+ private static final int DRAW_EXTRAS_SELECTION = 2;
+ private static final int DRAW_EXTRAS_CURSOR_RING = 3;
+
// Used to match key downs and key ups
private boolean mGotKeyDown;
@@ -1305,6 +1311,7 @@
// onSizeChanged() is called, the rest will be set
// correctly
mActualScale = scale;
+ mInvActualScale = 1 / scale;
mTextWrapScale = b.getFloat("textwrapScale", scale);
mInZoomOverview = b.getBoolean("overview");
invalidate();
@@ -2062,6 +2069,8 @@
boolean force) {
if (scale < mMinZoomScale) {
scale = mMinZoomScale;
+ // set mInZoomOverview for non mobile sites
+ if (scale < mDefaultScale) mInZoomOverview = true;
} else if (scale > mMaxZoomScale) {
scale = mMaxZoomScale;
}
@@ -3115,7 +3124,7 @@
int mScrollY;
int mWidth;
int mHeight;
- float mScale;
+ float mInvScale;
}
private Metrics getViewMetrics() {
@@ -3124,23 +3133,22 @@
metrics.mScrollY = computeVerticalScrollOffset();
metrics.mWidth = getWidth();
metrics.mHeight = getHeight() - getVisibleTitleHeight();
- metrics.mScale = mActualScale;
+ metrics.mInvScale = mInvActualScale;
return metrics;
}
- private void drawLayers(Canvas canvas) {
- if (mRootLayer != 0) {
- // Currently for each draw we compute the animation values;
- // We may in the future decide to do that independently.
- if (nativeEvaluateLayersAnimations(mRootLayer)) {
- // If we have unfinished (or unstarted) animations,
- // we ask for a repaint.
- invalidate();
- }
-
- // We can now draw the layers.
- nativeDrawLayers(mRootLayer, canvas);
+ private void drawExtras(Canvas canvas, int extras) {
+ // If mNativeClass is 0, we should not reach here, so we do not
+ // need to check it again.
+ // Currently for each draw we compute the animation values;
+ // We may in the future decide to do that independently.
+ if (nativeEvaluateLayersAnimations()) {
+ // If we have unfinished (or unstarted) animations,
+ // we ask for a repaint.
+ invalidate();
}
+
+ nativeDrawExtras(canvas, extras);
}
private void drawCoreAndCursorRing(Canvas canvas, int color,
@@ -3148,7 +3156,6 @@
if (mDrawHistory) {
canvas.scale(mActualScale, mActualScale);
canvas.drawPicture(mHistoryPicture);
- drawLayers(canvas);
return;
}
@@ -3227,27 +3234,29 @@
mWebViewCore.drawContentPicture(canvas, color,
(animateZoom || mPreviewZoomOnly), animateScroll);
- boolean cursorIsInLayer = nativeCursorIsInLayer();
- if (drawCursorRing && !cursorIsInLayer) {
- nativeDrawCursorRing(canvas);
- }
- // When the FindDialog is up, only draw the matches if we are not in
- // the process of scrolling them into view.
- if (mFindIsUp && !animateScroll) {
- nativeDrawMatches(canvas);
- }
- drawLayers(canvas);
-
if (mNativeClass == 0) return;
- if (mShiftIsPressed && !(animateZoom || mPreviewZoomOnly)) {
- if (mTouchSelection || mExtendSelection) {
- nativeDrawSelectionRegion(canvas);
+ // decide which adornments to draw
+ int extras = DRAW_EXTRAS_NONE;
+ if (mFindIsUp) {
+ // When the FindDialog is up, only draw the matches if we are not in
+ // the process of scrolling them into view.
+ if (!animateScroll) {
+ extras = DRAW_EXTRAS_FIND;
}
- if (!mTouchSelection) {
- nativeDrawSelectionPointer(canvas, mInvActualScale, mSelectX,
- mSelectY - getTitleHeight(), mExtendSelection);
+ } else if (mShiftIsPressed) {
+ if (!animateZoom && !mPreviewZoomOnly) {
+ extras = DRAW_EXTRAS_SELECTION;
+ nativeSetSelectionRegion(mTouchSelection || mExtendSelection);
+ nativeSetSelectionPointer(!mTouchSelection, mInvActualScale,
+ mSelectX, mSelectY - getTitleHeight(),
+ mExtendSelection);
}
} else if (drawCursorRing) {
+ extras = DRAW_EXTRAS_CURSOR_RING;
+ }
+ drawExtras(canvas, extras);
+
+ if (extras == DRAW_EXTRAS_CURSOR_RING) {
if (mTouchMode == TOUCH_SHORTPRESS_START_MODE) {
mTouchMode = TOUCH_SHORTPRESS_MODE;
HitTestResult hitTest = getHitTestResult();
@@ -3258,7 +3267,6 @@
LONG_PRESS_TIMEOUT);
}
}
- if (cursorIsInLayer) nativeDrawCursorRing(canvas);
}
if (mFocusSizeChanged) {
mFocusSizeChanged = false;
@@ -3351,23 +3359,32 @@
InputMethodManager imm = (InputMethodManager)
getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+ // bring it back to the default scale so that user can enter text
+ boolean zoom = mActualScale < mDefaultScale;
+ if (zoom) {
+ mInZoomOverview = false;
+ mZoomCenterX = mLastTouchX;
+ mZoomCenterY = mLastTouchY;
+ // do not change text wrap scale so that there is no reflow
+ setNewZoomScale(mDefaultScale, false, false);
+ }
if (isTextView) {
rebuildWebTextView();
- if (!inEditingMode()) return;
- imm.showSoftInput(mWebTextView, 0);
- // bring it back to the default scale so that user can enter text
- if (mActualScale < mDefaultScale) {
- mInZoomOverview = false;
- mZoomCenterX = mLastTouchX;
- mZoomCenterY = mLastTouchY;
- // do not change text wrap scale so that there is no reflow
- setNewZoomScale(mDefaultScale, false, false);
- didUpdateTextViewBounds(true);
+ if (inEditingMode()) {
+ mWebTextView.setDefaultSelection();
+ imm.showSoftInput(mWebTextView, 0);
+ if (zoom) {
+ didUpdateTextViewBounds(true);
+ }
+ return;
}
}
- else { // used by plugins
- imm.showSoftInput(this, 0);
- }
+ // Used by plugins.
+ // Also used if the navigation cache is out of date, and
+ // does not recognize that a textfield is in focus. In that
+ // case, use WebView as the targeted view.
+ // see http://b/issue?id=2457459
+ imm.showSoftInput(this, 0);
}
// Called by WebKit to instruct the UI to hide the keyboard
@@ -3672,6 +3689,7 @@
// might be. Check it, and if so, hand over to the WebTextView.
rebuildWebTextView();
if (inEditingMode()) {
+ mWebTextView.setDefaultSelection();
return mWebTextView.dispatchKeyEvent(event);
}
}
@@ -4001,6 +4019,10 @@
// still want to send the notification over to webkit.
mWebView.setNewZoomScale(mWebView.mActualScale,
mUpdateTextWrap, true);
+ // update the zoom buttons as the scale can be changed
+ if (mWebView.getSettings().getBuiltInZoomControls()) {
+ mWebView.updateZoomButtonsEnabled();
+ }
}
}
}
@@ -4429,8 +4451,11 @@
}
// pass the touch events from UI thread to WebCore thread
- if (mForwardTouchEvents && (action != MotionEvent.ACTION_MOVE
- || eventTime - mLastSentTouchTime > mCurrentTouchInterval)) {
+ if (mForwardTouchEvents
+ && (action != MotionEvent.ACTION_MOVE || eventTime
+ - mLastSentTouchTime > mCurrentTouchInterval)
+ && (action == MotionEvent.ACTION_DOWN
+ || mPreventDrag != PREVENT_DRAG_CANCEL)) {
WebViewCore.TouchEventData ted = new WebViewCore.TouchEventData();
ted.mAction = action;
ted.mX = viewToContentX((int) x + mScrollX);
@@ -4721,6 +4746,14 @@
if (mFullScreenHolder == null
&& (computeHorizontalScrollExtent() < computeHorizontalScrollRange()
|| computeVerticalScrollExtent() < computeVerticalScrollRange())) {
+ // remove the pending TOUCH_EVENT and send a
+ // cancel
+ mWebViewCore
+ .removeMessages(EventHub.TOUCH_EVENT);
+ WebViewCore.TouchEventData ted = new WebViewCore.TouchEventData();
+ ted.mAction = MotionEvent.ACTION_CANCEL;
+ mWebViewCore.sendMessage(EventHub.TOUCH_EVENT,
+ ted);
// we will not rewrite drag code here, but we
// will try fling if it applies.
WebViewCore.reducePriority();
@@ -5711,12 +5744,17 @@
break;
}
case SWITCH_TO_SHORTPRESS: {
- // if mPreventDrag is not confirmed, treat it as no so that
- // it won't block panning the page.
+ // if mPreventDrag is not confirmed, cancel it so that it
+ // won't block panning the page.
if (mPreventDrag == PREVENT_DRAG_MAYBE_YES) {
- mPreventDrag = PREVENT_DRAG_NO;
+ mPreventDrag = PREVENT_DRAG_CANCEL;
mPreventLongPress = false;
mPreventDoubleTap = false;
+ // remove the pending TOUCH_EVENT and send a cancel
+ mWebViewCore.removeMessages(EventHub.TOUCH_EVENT);
+ WebViewCore.TouchEventData ted = new WebViewCore.TouchEventData();
+ ted.mAction = MotionEvent.ACTION_CANCEL;
+ mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
}
if (mTouchMode == TOUCH_INIT_MODE) {
mTouchMode = mFullScreenHolder == null
@@ -5743,7 +5781,7 @@
// don't set it.
ted.mMetaState = 0;
mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
- } else if (mPreventDrag == PREVENT_DRAG_NO) {
+ } else if (mPreventDrag != PREVENT_DRAG_YES) {
mTouchMode = TOUCH_DONE_MODE;
if (mFullScreenHolder == null) {
performLongClick();
@@ -5754,13 +5792,18 @@
}
case RELEASE_SINGLE_TAP: {
if (mPreventDrag == PREVENT_DRAG_MAYBE_YES) {
- // if mPreventDrag is not confirmed, treat it as
- // no so that it won't block tap.
- mPreventDrag = PREVENT_DRAG_NO;
+ // if mPreventDrag is not confirmed, cancel it so that
+ // it won't block panning the page.
+ mPreventDrag = PREVENT_DRAG_CANCEL;
mPreventLongPress = false;
mPreventDoubleTap = false;
+ // remove the pending TOUCH_EVENT and send a cancel
+ mWebViewCore.removeMessages(EventHub.TOUCH_EVENT);
+ WebViewCore.TouchEventData ted = new WebViewCore.TouchEventData();
+ ted.mAction = MotionEvent.ACTION_CANCEL;
+ mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, ted);
}
- if (mPreventDrag == PREVENT_DRAG_NO) {
+ if (mPreventDrag != PREVENT_DRAG_YES) {
mTouchMode = TOUCH_DONE_MODE;
doShortPress();
}
@@ -5979,12 +6022,7 @@
break;
}
case SET_ROOT_LAYER_MSG_ID: {
- int oldLayer = mRootLayer;
- mRootLayer = msg.arg1;
- nativeSetRootLayer(mRootLayer);
- if (oldLayer > 0) {
- nativeDestroyLayer(oldLayer);
- }
+ nativeSetRootLayer(msg.arg1);
invalidate();
break;
}
@@ -6744,7 +6782,6 @@
/* package */ native boolean nativeCursorMatchesFocus();
private native boolean nativeCursorIntersects(Rect visibleRect);
private native boolean nativeCursorIsAnchor();
- private native boolean nativeCursorIsInLayer();
private native boolean nativeCursorIsTextInput();
private native Point nativeCursorPosition();
private native String nativeCursorText();
@@ -6755,14 +6792,8 @@
private native boolean nativeCursorWantsKeyEvents();
private native void nativeDebugDump();
private native void nativeDestroy();
- private native void nativeDrawCursorRing(Canvas content);
- private native void nativeDestroyLayer(int layer);
- private native boolean nativeEvaluateLayersAnimations(int layer);
- private native void nativeDrawLayers(int layer, Canvas canvas);
- private native void nativeDrawMatches(Canvas canvas);
- private native void nativeDrawSelectionPointer(Canvas content,
- float scale, int x, int y, boolean extendSelection);
- private native void nativeDrawSelectionRegion(Canvas content);
+ private native boolean nativeEvaluateLayersAnimations();
+ private native void nativeDrawExtras(Canvas canvas, int extra);
private native void nativeDumpDisplayTree(String urlOrNull);
private native int nativeFindAll(String findLower, String findUpper);
private native void nativeFindNext(boolean forward);
@@ -6790,7 +6821,7 @@
private native void nativeHideCursor();
private native String nativeImageURI(int x, int y);
private native void nativeInstrumentReport();
- /* package */ native void nativeMoveCursorToNextTextInput();
+ /* package */ native boolean nativeMoveCursorToNextTextInput();
// return true if the page has been scrolled
private native boolean nativeMotionUp(int x, int y, int slop);
// returns false if it handled the key
@@ -6809,6 +6840,9 @@
private native void nativeSetFollowedLink(boolean followed);
private native void nativeSetHeightCanMeasure(boolean measure);
private native void nativeSetRootLayer(int layer);
+ private native void nativeSetSelectionPointer(boolean set,
+ float scale, int x, int y, boolean extendSelection);
+ private native void nativeSetSelectionRegion(boolean set);
private native int nativeTextGeneration();
// Never call this version except by updateCachedTextfield(String) -
// we always want to pass in our generation number.
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 361ec56..71f69fe 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -587,13 +587,6 @@
private static final int INITIALIZE = 0;
private static final int REDUCE_PRIORITY = 1;
private static final int RESUME_PRIORITY = 2;
- private static final int CACHE_TICKER = 3;
- private static final int BLOCK_CACHE_TICKER = 4;
- private static final int RESUME_CACHE_TICKER = 5;
-
- private static final int CACHE_TICKER_INTERVAL = 60 * 1000; // 1 minute
-
- private static boolean mCacheTickersBlocked = true;
public void run() {
Looper.prepare();
@@ -619,28 +612,6 @@
Process.setThreadPriority(
Process.THREAD_PRIORITY_DEFAULT);
break;
-
- case CACHE_TICKER:
- if (!mCacheTickersBlocked) {
- CacheManager.endCacheTransaction();
- CacheManager.startCacheTransaction();
- sendMessageDelayed(
- obtainMessage(CACHE_TICKER),
- CACHE_TICKER_INTERVAL);
- }
- break;
-
- case BLOCK_CACHE_TICKER:
- if (CacheManager.endCacheTransaction()) {
- mCacheTickersBlocked = true;
- }
- break;
-
- case RESUME_CACHE_TICKER:
- if (CacheManager.startCacheTransaction()) {
- mCacheTickersBlocked = false;
- }
- break;
}
}
};
@@ -1092,23 +1063,15 @@
Process.setThreadPriority(mTid,
Process.THREAD_PRIORITY_BACKGROUND);
pauseTimers();
- if (CacheManager.disableTransaction()) {
- WebCoreThread.mCacheTickersBlocked = true;
- sWebCoreHandler.removeMessages(
- WebCoreThread.CACHE_TICKER);
- }
+ WebViewWorker.getHandler().sendEmptyMessage(
+ WebViewWorker.MSG_PAUSE_CACHE_TRANSACTION);
break;
case RESUME_TIMERS:
Process.setThreadPriority(mTid, mSavedPriority);
resumeTimers();
- if (CacheManager.enableTransaction()) {
- WebCoreThread.mCacheTickersBlocked = false;
- sWebCoreHandler.sendMessageDelayed(
- sWebCoreHandler.obtainMessage(
- WebCoreThread.CACHE_TICKER),
- WebCoreThread.CACHE_TICKER_INTERVAL);
- }
+ WebViewWorker.getHandler().sendEmptyMessage(
+ WebViewWorker.MSG_RESUME_CACHE_TRANSACTION);
break;
case ON_PAUSE:
@@ -1851,16 +1814,6 @@
.obtainMessage(WebCoreThread.RESUME_PRIORITY));
}
- static void startCacheTransaction() {
- sWebCoreHandler.sendMessage(sWebCoreHandler
- .obtainMessage(WebCoreThread.RESUME_CACHE_TICKER));
- }
-
- static void endCacheTransaction() {
- sWebCoreHandler.sendMessage(sWebCoreHandler
- .obtainMessage(WebCoreThread.BLOCK_CACHE_TICKER));
- }
-
static void pauseUpdatePicture(WebViewCore core) {
// Note: there is one possible failure mode. If pauseUpdatePicture() is
// called from UI thread while WEBKIT_DRAW is just pulled out of the
@@ -1992,9 +1945,10 @@
sendUpdateTextEntry();
// as CacheManager can behave based on database transaction, we need to
// call tick() to trigger endTransaction
- sWebCoreHandler.removeMessages(WebCoreThread.CACHE_TICKER);
- sWebCoreHandler.sendMessage(sWebCoreHandler
- .obtainMessage(WebCoreThread.CACHE_TICKER));
+ WebViewWorker.getHandler().removeMessages(
+ WebViewWorker.MSG_CACHE_TRANSACTION_TICKER);
+ WebViewWorker.getHandler().sendEmptyMessage(
+ WebViewWorker.MSG_CACHE_TRANSACTION_TICKER);
contentDraw();
}
@@ -2446,6 +2400,9 @@
// ensures the view system knows the view can redraw itself
pluginView.setWillNotDraw(false);
+ if(pluginView instanceof SurfaceView)
+ ((SurfaceView)pluginView).setZOrderOnTop(true);
+
ViewManager.ChildView view = mWebView.mViewManager.createView();
view.mView = pluginView;
view.attachView(x, y, width, height);
diff --git a/core/java/android/webkit/WebViewDatabase.java b/core/java/android/webkit/WebViewDatabase.java
index 110e4f8..a870931 100644
--- a/core/java/android/webkit/WebViewDatabase.java
+++ b/core/java/android/webkit/WebViewDatabase.java
@@ -19,6 +19,7 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Set;
import java.util.Map.Entry;
@@ -234,6 +235,13 @@
}
if (mCacheDatabase != null) {
+ // use read_uncommitted to speed up READ
+ mCacheDatabase.execSQL("PRAGMA read_uncommitted = true;");
+ // as only READ can be called in the non-WebViewWorkerThread,
+ // and read_uncommitted is used, we can turn off database lock
+ // to use transaction.
+ mCacheDatabase.setLockingEnabled(false);
+
// use InsertHelper for faster insertion
mCacheInserter = new DatabaseUtils.InsertHelper(mCacheDatabase,
"cache");
@@ -548,19 +556,33 @@
}
//
- // cache functions, can only be called from WebCoreThread
+ // cache functions
//
+ // only called from WebViewWorkerThread
boolean startCacheTransaction() {
if (++mCacheTransactionRefcount == 1) {
+ if (!Thread.currentThread().equals(
+ WebViewWorker.getHandler().getLooper().getThread())) {
+ Log.w(LOGTAG, "startCacheTransaction should be called from "
+ + "WebViewWorkerThread instead of from "
+ + Thread.currentThread().getName());
+ }
mCacheDatabase.beginTransaction();
return true;
}
return false;
}
+ // only called from WebViewWorkerThread
boolean endCacheTransaction() {
if (--mCacheTransactionRefcount == 0) {
+ if (!Thread.currentThread().equals(
+ WebViewWorker.getHandler().getLooper().getThread())) {
+ Log.w(LOGTAG, "endCacheTransaction should be called from "
+ + "WebViewWorkerThread instead of from "
+ + Thread.currentThread().getName());
+ }
try {
mCacheDatabase.setTransactionSuccessful();
} finally {
@@ -684,7 +706,7 @@
return size;
}
- ArrayList<String> trimCache(long amount) {
+ List<String> trimCache(long amount) {
ArrayList<String> pathList = new ArrayList<String>(100);
Cursor cursor = mCacheDatabase.rawQuery(
"SELECT contentlength, filepath FROM cache ORDER BY expires ASC",
@@ -727,6 +749,20 @@
return pathList;
}
+ List<String> getAllCacheFileNames() {
+ ArrayList<String> pathList = null;
+ Cursor cursor = mCacheDatabase.rawQuery("SELECT filepath FROM cache",
+ null);
+ if (cursor != null && cursor.moveToFirst()) {
+ pathList = new ArrayList<String>(cursor.getCount());
+ do {
+ pathList.add(cursor.getString(0));
+ } while (cursor.moveToNext());
+ }
+ cursor.close();
+ return pathList;
+ }
+
//
// password functions
//
diff --git a/core/java/android/webkit/WebViewWorker.java b/core/java/android/webkit/WebViewWorker.java
new file mode 100644
index 0000000..c488150
--- /dev/null
+++ b/core/java/android/webkit/WebViewWorker.java
@@ -0,0 +1,223 @@
+/*
+ * 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.webkit;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import android.net.http.Headers;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.Looper;
+import android.os.Message;
+
+/**
+ * WebViewWorker executes in a separate thread other than UI and WebViewCore. To
+ * avoid blocking UI or WebKit's execution, the caller can send a message to
+ * WebViewWorker.getHandler() and it will be handled in the WebViewWorkerThread.
+ */
+final class WebViewWorker extends Handler {
+
+ private static final String THREAD_NAME = "WebViewWorkerThread";
+
+ private static WebViewWorker sWorkerHandler;
+
+ private static Map<LoadListener, CacheManager.CacheResult> mCacheResultMap
+ = new HashMap<LoadListener, CacheManager.CacheResult>();
+
+ /**
+ * Package level class to be used while creating a cache entry.
+ */
+ static class CacheCreateData {
+ LoadListener mListener;
+ String mUrl;
+ String mMimeType;
+ int mStatusCode;
+ long mPostId;
+ Headers mHeaders;
+ }
+
+ /**
+ * Package level class to be used while saving a cache entry.
+ */
+ static class CacheSaveData {
+ LoadListener mListener;
+ String mUrl;
+ long mPostId;
+ }
+
+ /**
+ * Package level class to be used while updating a cache entry's encoding.
+ */
+ static class CacheEncoding {
+ LoadListener mListener;
+ String mEncoding;
+ }
+
+ /**
+ * Package level class to be used while appending data to a cache entry.
+ */
+ static class CacheData {
+ LoadListener mListener;
+ ByteArrayBuilder.Chunk mChunk;
+ }
+
+ static synchronized WebViewWorker getHandler() {
+ if (sWorkerHandler == null) {
+ HandlerThread thread = new HandlerThread(THREAD_NAME,
+ android.os.Process.THREAD_PRIORITY_DEFAULT
+ + android.os.Process.THREAD_PRIORITY_LESS_FAVORABLE);
+ thread.start();
+ sWorkerHandler = new WebViewWorker(thread.getLooper());
+ }
+ return sWorkerHandler;
+ }
+
+ private WebViewWorker(Looper looper) {
+ super(looper);
+ }
+
+ // trigger transaction once a minute
+ private static final int CACHE_TRANSACTION_TICKER_INTERVAL = 60 * 1000;
+
+ private static boolean mCacheTickersBlocked = true;
+
+ // message ids
+ static final int MSG_ADD_STREAMLOADER = 101;
+ static final int MSG_ADD_HTTPLOADER = 102;
+ static final int MSG_CREATE_CACHE = 103;
+ static final int MSG_UPDATE_CACHE_ENCODING = 104;
+ static final int MSG_APPEND_CACHE = 105;
+ static final int MSG_SAVE_CACHE = 106;
+ static final int MSG_REMOVE_CACHE = 107;
+ static final int MSG_TRIM_CACHE = 108;
+ static final int MSG_CLEAR_CACHE = 109;
+ static final int MSG_CACHE_TRANSACTION_TICKER = 110;
+ static final int MSG_PAUSE_CACHE_TRANSACTION = 111;
+ static final int MSG_RESUME_CACHE_TRANSACTION = 112;
+
+ @Override
+ public void handleMessage(Message msg) {
+ switch(msg.what) {
+ case MSG_ADD_STREAMLOADER: {
+ StreamLoader loader = (StreamLoader) msg.obj;
+ loader.load();
+ break;
+ }
+ case MSG_ADD_HTTPLOADER: {
+ FrameLoader loader = (FrameLoader) msg.obj;
+ loader.handleHTTPLoad();
+ break;
+ }
+ case MSG_CREATE_CACHE: {
+ CacheCreateData data = (CacheCreateData) msg.obj;
+ CacheManager.CacheResult cache = CacheManager.createCacheFile(
+ data.mUrl, data.mStatusCode, data.mHeaders,
+ data.mMimeType, data.mPostId, false);
+ if (cache != null) {
+ mCacheResultMap.put(data.mListener, cache);
+ } else {
+ mCacheResultMap.remove(data.mListener);
+ }
+ break;
+ }
+ case MSG_UPDATE_CACHE_ENCODING: {
+ CacheEncoding data = (CacheEncoding) msg.obj;
+ CacheManager.CacheResult cache = mCacheResultMap
+ .get(data.mListener);
+ if (cache != null) {
+ cache.encoding = data.mEncoding;
+ }
+ break;
+ }
+ case MSG_APPEND_CACHE: {
+ CacheData data = (CacheData) msg.obj;
+ CacheManager.CacheResult cache = mCacheResultMap
+ .get(data.mListener);
+ if (cache != null) {
+ cache.contentLength += data.mChunk.mLength;
+ if (cache.contentLength > CacheManager.CACHE_MAX_SIZE) {
+ CacheManager.cleanupCacheFile(cache);
+ mCacheResultMap.remove(data.mListener);
+ } else {
+ try {
+ cache.outStream.write(data.mChunk.mArray, 0,
+ data.mChunk.mLength);
+ } catch (IOException e) {
+ CacheManager.cleanupCacheFile(cache);
+ mCacheResultMap.remove(data.mListener);
+ }
+ }
+ }
+ data.mChunk.release();
+ break;
+ }
+ case MSG_SAVE_CACHE: {
+ CacheSaveData data = (CacheSaveData) msg.obj;
+ CacheManager.CacheResult cache = mCacheResultMap
+ .get(data.mListener);
+ if (cache != null) {
+ CacheManager.saveCacheFile(data.mUrl, data.mPostId, cache);
+ mCacheResultMap.remove(data.mListener);
+ }
+ break;
+ }
+ case MSG_REMOVE_CACHE: {
+ LoadListener listener = (LoadListener) msg.obj;
+ CacheManager.CacheResult cache = mCacheResultMap.get(listener);
+ if (cache != null) {
+ CacheManager.cleanupCacheFile(cache);
+ mCacheResultMap.remove(listener);
+ }
+ break;
+ }
+ case MSG_TRIM_CACHE: {
+ CacheManager.trimCacheIfNeeded();
+ break;
+ }
+ case MSG_CLEAR_CACHE: {
+ CacheManager.clearCache();
+ break;
+ }
+ case MSG_CACHE_TRANSACTION_TICKER: {
+ if (!mCacheTickersBlocked) {
+ CacheManager.endTransaction();
+ CacheManager.startTransaction();
+ sendEmptyMessageDelayed(MSG_CACHE_TRANSACTION_TICKER,
+ CACHE_TRANSACTION_TICKER_INTERVAL);
+ }
+ break;
+ }
+ case MSG_PAUSE_CACHE_TRANSACTION: {
+ if (CacheManager.disableTransaction()) {
+ mCacheTickersBlocked = true;
+ removeMessages(MSG_CACHE_TRANSACTION_TICKER);
+ }
+ break;
+ }
+ case MSG_RESUME_CACHE_TRANSACTION: {
+ if (CacheManager.enableTransaction()) {
+ mCacheTickersBlocked = false;
+ sendEmptyMessageDelayed(MSG_CACHE_TRANSACTION_TICKER,
+ CACHE_TRANSACTION_TICKER_INTERVAL);
+ }
+ break;
+ }
+ }
+ }
+}
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 17d5bb7..2ea6abc 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -467,6 +467,18 @@
// True when the popup should be hidden because of a call to
// dispatchDisplayHint()
private boolean mPopupHidden;
+
+ /**
+ * ID of the active pointer. This is used to retain consistency during
+ * drags/flings if multiple pointers are used.
+ */
+ private int mActivePointerId = INVALID_POINTER;
+
+ /**
+ * Sentinel value for no current active pointer.
+ * Used by {@link #mActivePointerId}.
+ */
+ private static final int INVALID_POINTER = -1;
/**
* Interface definition for a callback to be invoked when the list or grid
@@ -1314,7 +1326,8 @@
position, -1);
}
} else {
- isScrap[0] = true;
+ isScrap[0] = true;
+ child.dispatchFinishTemporaryDetach();
}
} else {
child = mAdapter.getView(position, null, this);
@@ -1994,8 +2007,6 @@
}
final int action = ev.getAction();
- final int x = (int) ev.getX();
- final int y = (int) ev.getY();
View v;
int deltaY;
@@ -2005,18 +2016,22 @@
}
mVelocityTracker.addMovement(ev);
- switch (action) {
+ switch (action & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN: {
switch (mTouchMode) {
case TOUCH_MODE_OVERFLING: {
mFlingRunnable.endFling();
mTouchMode = TOUCH_MODE_OVERSCROLL;
- mLastY = y;
+ mLastY = (int) ev.getY();
mMotionCorrection = 0;
+ mActivePointerId = ev.getPointerId(0);
break;
}
default: {
+ mActivePointerId = ev.getPointerId(0);
+ final int x = (int) ev.getX();
+ final int y = (int) ev.getY();
int motionPosition = pointToPosition(x, y);
if (!mDataChanged) {
if ((mTouchMode != TOUCH_MODE_FLING) && (motionPosition >= 0)
@@ -2036,12 +2051,15 @@
// code in ViewRoot to try to find a nearby view to select
return false;
}
- // User clicked on whitespace, or stopped a fling. It is a scroll.
- createScrollingCache();
- mTouchMode = TOUCH_MODE_SCROLL;
- mMotionCorrection = 0;
- motionPosition = findMotionRow(y);
- reportScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
+
+ if (mTouchMode == TOUCH_MODE_FLING) {
+ // Stopped a fling. It is a scroll.
+ createScrollingCache();
+ mTouchMode = TOUCH_MODE_SCROLL;
+ mMotionCorrection = 0;
+ motionPosition = findMotionRow(y);
+ reportScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
+ }
}
}
@@ -2061,6 +2079,8 @@
}
case MotionEvent.ACTION_MOVE: {
+ final int pointerIndex = ev.findPointerIndex(mActivePointerId);
+ final int y = (int) ev.getY(pointerIndex);
deltaY = y - mMotionY;
switch (mTouchMode) {
case TOUCH_MODE_DOWN:
@@ -2141,7 +2161,7 @@
// We did not scroll the full amount. Treat this essentially like the
// start of a new touch scroll
- final int motionPosition = findMotionRow(y);
+ final int motionPosition = findClosestMotionRow(y);
mMotionCorrection = 0;
motionView = getChildAt(motionPosition - mFirstPosition);
@@ -2237,7 +2257,7 @@
} else {
final VelocityTracker velocityTracker = mVelocityTracker;
velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
- final int initialVelocity = (int) velocityTracker.getYVelocity();
+ final int initialVelocity = (int) velocityTracker.getYVelocity(mActivePointerId);
if (Math.abs(initialVelocity) > mMinimumVelocity) {
if (mFlingRunnable == null) {
@@ -2263,7 +2283,7 @@
}
final VelocityTracker velocityTracker = mVelocityTracker;
velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
- final int initialVelocity = (int) velocityTracker.getYVelocity();
+ final int initialVelocity = (int) velocityTracker.getYVelocity(mActivePointerId);
reportScrollStateChange(OnScrollListener.SCROLL_STATE_FLING);
if (Math.abs(initialVelocity) > mMinimumVelocity) {
@@ -2289,6 +2309,8 @@
mVelocityTracker.recycle();
mVelocityTracker = null;
}
+
+ mActivePointerId = INVALID_POINTER;
if (PROFILE_SCROLLING) {
if (mScrollProfilingStarted) {
@@ -2331,6 +2353,24 @@
mVelocityTracker = null;
}
}
+
+ mActivePointerId = INVALID_POINTER;
+ break;
+ }
+
+ case MotionEvent.ACTION_POINTER_UP: {
+ onSecondaryPointerUp(ev);
+ final int x = mMotionX;
+ final int y = mMotionY;
+ final int motionPosition = pointToPosition(x, y);
+ if (motionPosition >= 0) {
+ // Remember where the motion event started
+ v = getChildAt(motionPosition - mFirstPosition);
+ mMotionViewOriginalTop = v.getTop();
+ mMotionPosition = motionPosition;
+ }
+ mLastY = y;
+ break;
}
}
@@ -2379,8 +2419,6 @@
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
int action = ev.getAction();
- int x = (int) ev.getX();
- int y = (int) ev.getY();
View v;
if (mFastScroller != null) {
@@ -2390,13 +2428,17 @@
}
}
- switch (action) {
+ switch (action & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN: {
int touchMode = mTouchMode;
if (touchMode == TOUCH_MODE_OVERFLING || touchMode == TOUCH_MODE_OVERSCROLL) {
return true;
}
+ final int x = (int) ev.getX();
+ final int y = (int) ev.getY();
+ mActivePointerId = ev.getPointerId(0);
+
int motionPosition = findMotionRow(y);
if (touchMode != TOUCH_MODE_FLING && motionPosition >= 0) {
// User clicked on an actual view (and was not stopping a fling).
@@ -2419,6 +2461,8 @@
case MotionEvent.ACTION_MOVE: {
switch (mTouchMode) {
case TOUCH_MODE_DOWN:
+ final int pointerIndex = ev.findPointerIndex(mActivePointerId);
+ final int y = (int) ev.getY(pointerIndex);
if (startScrollIfNeeded(y - mMotionY)) {
return true;
}
@@ -2429,13 +2473,37 @@
case MotionEvent.ACTION_UP: {
mTouchMode = TOUCH_MODE_REST;
+ mActivePointerId = INVALID_POINTER;
reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
break;
}
+
+ case MotionEvent.ACTION_POINTER_UP: {
+ onSecondaryPointerUp(ev);
+ break;
+ }
}
return false;
}
+
+ private void onSecondaryPointerUp(MotionEvent ev) {
+ final int pointerIndex = (ev.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >>
+ MotionEvent.ACTION_POINTER_INDEX_SHIFT;
+ final int pointerId = ev.getPointerId(pointerIndex);
+ if (pointerId == mActivePointerId) {
+ // This was our active pointer going up. Choose a new
+ // active pointer and adjust accordingly.
+ // TODO: Make this decision more intelligent.
+ final int newPointerIndex = pointerIndex == 0 ? 1 : 0;
+ mMotionX = (int) ev.getX(newPointerIndex);
+ mMotionY = (int) ev.getY(newPointerIndex);
+ mActivePointerId = ev.getPointerId(newPointerIndex);
+ if (mVelocityTracker != null) {
+ mVelocityTracker.clear();
+ }
+ }
+ }
/**
* {@inheritDoc}
@@ -3149,9 +3217,25 @@
* Find the row closest to y. This row will be used as the motion row when scrolling
*
* @param y Where the user touched
- * @return The position of the first (or only) item in the row closest to y
+ * @return The position of the first (or only) item in the row containing y
*/
abstract int findMotionRow(int y);
+
+ /**
+ * Find the row closest to y. This row will be used as the motion row when scrolling.
+ *
+ * @param y Where the user touched
+ * @return The position of the first (or only) item in the row closest to y
+ */
+ int findClosestMotionRow(int y) {
+ final int childCount = getChildCount();
+ if (childCount == 0) {
+ return INVALID_POSITION;
+ }
+
+ final int motionRow = findMotionRow(y);
+ return motionRow != INVALID_POSITION ? motionRow : mFirstPosition + childCount - 1;
+ }
/**
* Causes all the views to be rebuilt and redrawn.
@@ -3933,6 +4017,10 @@
* View type for this view, as returned by
* {@link android.widget.Adapter#getItemViewType(int) }
*/
+ @ViewDebug.ExportedProperty(mapping = {
+ @ViewDebug.IntToString(from = ITEM_VIEW_TYPE_IGNORE, to = "ITEM_VIEW_TYPE_IGNORE"),
+ @ViewDebug.IntToString(from = ITEM_VIEW_TYPE_HEADER_OR_FOOTER, to = "ITEM_VIEW_TYPE_HEADER_OR_FOOTER")
+ })
int viewType;
/**
@@ -3941,6 +4029,7 @@
* been added to the list view and whether they should be treated as
* recycled views or not.
*/
+ @ViewDebug.ExportedProperty
boolean recycledHeaderFooter;
public LayoutParams(Context c, AttributeSet attrs) {
@@ -4071,9 +4160,9 @@
final View[] activeViews = mActiveViews;
for (int i = 0; i < childCount; i++) {
View child = getChildAt(i);
- AbsListView.LayoutParams lp = (AbsListView.LayoutParams)child.getLayoutParams();
+ AbsListView.LayoutParams lp = (AbsListView.LayoutParams) child.getLayoutParams();
// Don't put header or footer views into the scrap heap
- if (lp != null && lp.viewType != AdapterView.ITEM_VIEW_TYPE_HEADER_OR_FOOTER) {
+ if (lp != null && lp.viewType != ITEM_VIEW_TYPE_HEADER_OR_FOOTER) {
// Note: We do place AdapterView.ITEM_VIEW_TYPE_IGNORE in active views.
// However, we will NOT place them into scrap views.
activeViews[i] = child;
@@ -4140,13 +4229,17 @@
// into the scrap heap
int viewType = lp.viewType;
if (!shouldRecycleViewType(viewType)) {
- removeDetachedView(scrap, false);
+ if (viewType != ITEM_VIEW_TYPE_HEADER_OR_FOOTER) {
+ removeDetachedView(scrap, false);
+ }
return;
}
if (mViewTypeCount == 1) {
+ scrap.dispatchStartTemporaryDetach();
mCurrentScrap.add(scrap);
} else {
+ scrap.dispatchStartTemporaryDetach();
mScrapViews[viewType].add(scrap);
}
@@ -4165,22 +4258,25 @@
ArrayList<View> scrapViews = mCurrentScrap;
final int count = activeViews.length;
- for (int i = 0; i < count; ++i) {
+ for (int i = count - 1; i >= 0; i--) {
final View victim = activeViews[i];
if (victim != null) {
int whichScrap = ((AbsListView.LayoutParams) victim.getLayoutParams()).viewType;
activeViews[i] = null;
- if (whichScrap == AdapterView.ITEM_VIEW_TYPE_IGNORE) {
- removeDetachedView(victim, false);
+ if (!shouldRecycleViewType(whichScrap)) {
// Do not move views that should be ignored
+ if (whichScrap != ITEM_VIEW_TYPE_HEADER_OR_FOOTER) {
+ removeDetachedView(victim, false);
+ }
continue;
}
if (multipleScraps) {
scrapViews = mScrapViews[whichScrap];
}
+ victim.dispatchStartTemporaryDetach();
scrapViews.add(victim);
if (hasListener) {
diff --git a/core/java/android/widget/AbsSpinner.java b/core/java/android/widget/AbsSpinner.java
index c939e3f..2b3b98d 100644
--- a/core/java/android/widget/AbsSpinner.java
+++ b/core/java/android/widget/AbsSpinner.java
@@ -28,8 +28,6 @@
import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
-import android.view.animation.Interpolator;
-
/**
* An abstract base class for spinner widgets. SDK users will probably not
@@ -38,24 +36,21 @@
* @attr ref android.R.styleable#AbsSpinner_entries
*/
public abstract class AbsSpinner extends AdapterView<SpinnerAdapter> {
-
SpinnerAdapter mAdapter;
int mHeightMeasureSpec;
int mWidthMeasureSpec;
boolean mBlockLayoutRequests;
+
int mSelectionLeftPadding = 0;
int mSelectionTopPadding = 0;
int mSelectionRightPadding = 0;
int mSelectionBottomPadding = 0;
- Rect mSpinnerPadding = new Rect();
- View mSelectedView = null;
- Interpolator mInterpolator;
+ final Rect mSpinnerPadding = new Rect();
- RecycleBin mRecycler = new RecycleBin();
+ final RecycleBin mRecycler = new RecycleBin();
private DataSetObserver mDataSetObserver;
-
/** Temporary frame to hold a child View's frame rectangle */
private Rect mTouchFrame;
@@ -95,7 +90,6 @@
setWillNotDraw(false);
}
-
/**
* The Adapter is used to provide the data which backs this Spinner.
* It also provides methods to transform spinner items based on their position
@@ -190,7 +184,7 @@
boolean needsMeasuring = true;
int selectedPosition = getSelectedItemPosition();
- if (selectedPosition >= 0 && mAdapter != null) {
+ if (selectedPosition >= 0 && mAdapter != null && selectedPosition < mAdapter.getCount()) {
// Try looking in the recycler. (Maybe we were measured once already)
View view = mRecycler.get(selectedPosition);
if (view == null) {
@@ -237,7 +231,6 @@
mWidthMeasureSpec = widthMeasureSpec;
}
-
int getChildHeight(View child) {
return child.getMeasuredHeight();
}
@@ -254,26 +247,17 @@
}
void recycleAllViews() {
- int childCount = getChildCount();
+ final int childCount = getChildCount();
final AbsSpinner.RecycleBin recycleBin = mRecycler;
+ final int position = mFirstPosition;
// All views go in recycler
- for (int i=0; i<childCount; i++) {
+ for (int i = 0; i < childCount; i++) {
View v = getChildAt(i);
- int index = mFirstPosition + i;
+ int index = position + i;
recycleBin.put(index, v);
}
}
-
- @Override
- void handleDataChanged() {
- // FIXME -- this is called from both measure and layout.
- // This is harmless right now, but we don't want to do redundant work if
- // this gets more complicated
- super.handleDataChanged();
- }
-
-
/**
* Jump directly to a specific item in the adapter data.
@@ -284,7 +268,6 @@
position <= mFirstPosition + getChildCount() - 1;
setSelectionInt(position, shouldAnimate);
}
-
@Override
public void setSelection(int position) {
@@ -335,8 +318,6 @@
}
}
-
-
@Override
public SpinnerAdapter getAdapter() {
return mAdapter;
@@ -452,7 +433,7 @@
}
class RecycleBin {
- private SparseArray<View> mScrapHeap = new SparseArray<View>();
+ private final SparseArray<View> mScrapHeap = new SparseArray<View>();
public void put(int position, View v) {
mScrapHeap.put(position, v);
@@ -469,12 +450,7 @@
}
return result;
}
-
- View peek(int position) {
- // System.out.print("Looking for " + position);
- return mScrapHeap.get(position);
- }
-
+
void clear() {
final SparseArray<View> scrapHeap = mScrapHeap;
final int count = scrapHeap.size();
diff --git a/core/java/android/widget/CheckedTextView.java b/core/java/android/widget/CheckedTextView.java
index aa9062b..bf63607 100644
--- a/core/java/android/widget/CheckedTextView.java
+++ b/core/java/android/widget/CheckedTextView.java
@@ -24,6 +24,7 @@
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.Gravity;
+import android.view.ViewDebug;
import android.view.accessibility.AccessibilityEvent;
@@ -73,7 +74,8 @@
public void toggle() {
setChecked(!mChecked);
}
-
+
+ @ViewDebug.ExportedProperty
public boolean isChecked() {
return mChecked;
}
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java
index 98b0976..bf02ad3 100644
--- a/core/java/android/widget/CompoundButton.java
+++ b/core/java/android/widget/CompoundButton.java
@@ -26,6 +26,7 @@
import android.os.Parcelable;
import android.util.AttributeSet;
import android.view.Gravity;
+import android.view.ViewDebug;
import android.view.accessibility.AccessibilityEvent;
/**
@@ -98,6 +99,7 @@
return super.performClick();
}
+ @ViewDebug.ExportedProperty
public boolean isChecked() {
return mChecked;
}
diff --git a/core/java/android/widget/ExpandableListConnector.java b/core/java/android/widget/ExpandableListConnector.java
index ccce7c1..9c43e9b 100644
--- a/core/java/android/widget/ExpandableListConnector.java
+++ b/core/java/android/widget/ExpandableListConnector.java
@@ -25,7 +25,6 @@
import java.util.ArrayList;
import java.util.Collections;
-import java.util.List;
/*
* Implementation notes:
@@ -637,7 +636,7 @@
// Check to see if it's already expanded
if (posMetadata.groupMetadata != null) return false;
- /* Restrict number of exp groups to mMaxExpGroupCount */
+ /* Restrict number of expanded groups to mMaxExpGroupCount */
if (mExpGroupMetadataList.size() >= mMaxExpGroupCount) {
/* Collapse a group */
// TODO: Collapse something not on the screen instead of the first one?
diff --git a/core/java/android/widget/ExpandableListView.java b/core/java/android/widget/ExpandableListView.java
index a4b20da..9cc8bd5 100644
--- a/core/java/android/widget/ExpandableListView.java
+++ b/core/java/android/widget/ExpandableListView.java
@@ -482,18 +482,21 @@
return mAdapter;
}
+ private boolean isHeaderOrFooterPosition(int position) {
+ final int footerViewsStart = mItemCount - getFooterViewsCount();
+ return (position < getHeaderViewsCount() || position >= footerViewsStart);
+ }
+
@Override
public boolean performItemClick(View v, int position, long id) {
// Ignore clicks in header/footers
- final int headerViewsCount = getHeaderViewsCount();
- final int footerViewsStart = mItemCount - getFooterViewsCount();
-
- if (position < headerViewsCount || position >= footerViewsStart) {
+ if (isHeaderOrFooterPosition(position)) {
// Clicked on a header/footer, so ignore pass it on to super
return super.performItemClick(v, position, id);
}
// Internally handle the item click
+ final int headerViewsCount = getHeaderViewsCount();
return handleItemClick(v, position - headerViewsCount, id);
}
@@ -544,9 +547,10 @@
final int groupPos = posMetadata.position.groupPos;
final int groupFlatPos = posMetadata.position.flatListPos;
-
- smoothScrollToPosition(groupFlatPos + mAdapter.getChildrenCount(groupPos),
- groupFlatPos);
+
+ final int shiftedGroupPosition = groupFlatPos + getHeaderViewsCount();
+ smoothScrollToPosition(shiftedGroupPosition + mAdapter.getChildrenCount(groupPos),
+ shiftedGroupPosition);
}
returnValue = true;
@@ -689,8 +693,8 @@
}
/**
- * Converts a flat list position (the raw position of an item (child or
- * group) in the list) to an group and/or child position (represented in a
+ * Converts a flat list position (the raw position of an item (child or group)
+ * in the list) to an group and/or child position (represented in a
* packed position). This is useful in situations where the caller needs to
* use the underlying {@link ListView}'s methods. Use
* {@link ExpandableListView#getPackedPositionType} ,
@@ -699,10 +703,16 @@
*
* @param flatListPosition The flat list position to be converted.
* @return The group and/or child position for the given flat list position
- * in packed position representation.
+ * in packed position representation. #PACKED_POSITION_VALUE_NULL if
+ * the position corresponds to a header or a footer item.
*/
public long getExpandableListPosition(int flatListPosition) {
- PositionMetadata pm = mConnector.getUnflattenedPos(flatListPosition);
+ if (isHeaderOrFooterPosition(flatListPosition)) {
+ return PACKED_POSITION_VALUE_NULL;
+ }
+
+ final int shiftedPosition = flatListPosition - getHeaderViewsCount();
+ PositionMetadata pm = mConnector.getUnflattenedPos(shiftedPosition);
long packedPos = pm.position.getPackedPosition();
pm.recycle();
return packedPos;
@@ -724,7 +734,7 @@
.obtainPosition(packedPosition));
int retValue = pm.position.flatListPos;
pm.recycle();
- return retValue;
+ return retValue + getHeaderViewsCount();
}
/**
@@ -732,12 +742,13 @@
* its type). Can return {@link #PACKED_POSITION_VALUE_NULL} if no selection.
*
* @return A packed position containing the currently selected group or
- * child's position and type. #PACKED_POSITION_VALUE_NULL if no selection.
+ * child's position and type. #PACKED_POSITION_VALUE_NULL if no selection
+ * or if selection is on a header or a footer item.
*/
public long getSelectedPosition() {
final int selectedPos = getSelectedItemPosition();
- if (selectedPos == -1) return PACKED_POSITION_VALUE_NULL;
-
+
+ // The case where there is no selection (selectedPos == -1) is also handled here.
return getExpandableListPosition(selectedPos);
}
@@ -921,13 +932,12 @@
@Override
ContextMenuInfo createContextMenuInfo(View view, int flatListPosition, long id) {
- // Adjust for and handle for header views
- final int adjustedPosition = flatListPosition - getHeaderViewsCount();
- if (adjustedPosition < 0) {
- // Return normal info for header view context menus
+ if (isHeaderOrFooterPosition(flatListPosition)) {
+ // Return normal info for header/footer view context menus
return new AdapterContextMenuInfo(view, flatListPosition, id);
}
+ final int adjustedPosition = flatListPosition - getHeaderViewsCount();
PositionMetadata pm = mConnector.getUnflattenedPos(adjustedPosition);
ExpandableListPosition pos = pm.position;
pm.recycle();
diff --git a/core/java/android/widget/FastScroller.java b/core/java/android/widget/FastScroller.java
index 6b669d8..54c4b36 100644
--- a/core/java/android/widget/FastScroller.java
+++ b/core/java/android/widget/FastScroller.java
@@ -28,6 +28,7 @@
import android.os.SystemClock;
import android.util.TypedValue;
import android.view.MotionEvent;
+import android.widget.AbsListView.OnScrollListener;
/**
* Helper class for AbsListView to draw and control the Fast Scroll thumb
@@ -430,6 +431,7 @@
}
if (mList != null) {
mList.requestDisallowInterceptTouchEvent(true);
+ mList.reportScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
}
cancelFling();
@@ -442,6 +444,7 @@
// be other classes that don't properly reset on touch-up,
// so do this explicitly just in case.
mList.requestDisallowInterceptTouchEvent(false);
+ mList.reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
}
setState(STATE_VISIBLE);
final Handler handler = mHandler;
diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java
index b9acf5e..9e930a5 100644
--- a/core/java/android/widget/GridView.java
+++ b/core/java/android/widget/GridView.java
@@ -431,8 +431,6 @@
}
}
}
-
- return mFirstPosition + childCount - 1;
}
return INVALID_POSITION;
}
diff --git a/core/java/android/widget/HorizontalScrollView.java b/core/java/android/widget/HorizontalScrollView.java
index a7b819a..acb7e02 100644
--- a/core/java/android/widget/HorizontalScrollView.java
+++ b/core/java/android/widget/HorizontalScrollView.java
@@ -116,7 +116,19 @@
private int mTouchSlop;
private int mMinimumVelocity;
private int mMaximumVelocity;
-
+
+ /**
+ * ID of the active pointer. This is used to retain consistency during
+ * drags/flings if multiple pointers are used.
+ */
+ private int mActivePointerId = INVALID_POINTER;
+
+ /**
+ * Sentinel value for no current active pointer.
+ * Used by {@link #mActivePointerId}.
+ */
+ private static final int INVALID_POINTER = -1;
+
public HorizontalScrollView(Context context) {
this(context, null);
}
@@ -362,6 +374,17 @@
return handled;
}
+ private boolean inChild(int x, int y) {
+ if (getChildCount() > 0) {
+ final View child = getChildAt(0);
+ return !(y < child.getTop()
+ || y >= child.getBottom()
+ || x < child.getLeft()
+ || x >= child.getRight());
+ }
+ return false;
+ }
+
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
/*
@@ -380,10 +403,8 @@
return true;
}
- final float x = ev.getX();
-
- switch (action) {
- case MotionEvent.ACTION_MOVE:
+ switch (action & MotionEvent.ACTION_MASK) {
+ case MotionEvent.ACTION_MOVE: {
/*
* mIsBeingDragged == false, otherwise the shortcut would have caught it. Check
* whether the user has moved far enough from his original down touch.
@@ -393,16 +414,30 @@
* Locally do absolute value. mLastMotionX is set to the x value
* of the down event.
*/
+ final int pointerIndex = ev.findPointerIndex(mActivePointerId);
+ final float x = ev.getX(pointerIndex);
final int xDiff = (int) Math.abs(x - mLastMotionX);
if (xDiff > mTouchSlop) {
mIsBeingDragged = true;
+ mLastMotionX = x;
if (mParent != null) mParent.requestDisallowInterceptTouchEvent(true);
}
break;
+ }
- case MotionEvent.ACTION_DOWN:
- /* Remember location of down touch */
+ case MotionEvent.ACTION_DOWN: {
+ final float x = ev.getX();
+ if (!inChild((int) x, (int) ev.getY())) {
+ mIsBeingDragged = false;
+ break;
+ }
+
+ /*
+ * Remember location of down touch.
+ * ACTION_DOWN always refers to pointer index 0.
+ */
mLastMotionX = x;
+ mActivePointerId = ev.getPointerId(0);
/*
* If being flinged and user touches the screen, initiate drag;
@@ -411,11 +446,16 @@
*/
mIsBeingDragged = !mScroller.isFinished();
break;
+ }
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
/* Release the drag */
mIsBeingDragged = false;
+ mActivePointerId = INVALID_POINTER;
+ break;
+ case MotionEvent.ACTION_POINTER_UP:
+ onSecondaryPointerUp(ev);
break;
}
@@ -441,10 +481,9 @@
mVelocityTracker.addMovement(ev);
final int action = ev.getAction();
- final float x = ev.getX();
- switch (action) {
- case MotionEvent.ACTION_DOWN:
+ switch (action & MotionEvent.ACTION_MASK) {
+ case MotionEvent.ACTION_DOWN: {
/*
* If being flinged and user touches, stop the fling. isFinished
* will be false if being flinged.
@@ -452,42 +491,78 @@
if (!mScroller.isFinished()) {
mScroller.abortAnimation();
}
+
+ final float x = ev.getX();
+ if (!(mIsBeingDragged = inChild((int) x, (int) ev.getY()))) {
+ return false;
+ }
// Remember where the motion event started
mLastMotionX = x;
break;
+ }
case MotionEvent.ACTION_MOVE:
- // Scroll to follow the motion event
- final int deltaX = (int) (mLastMotionX - x);
- mLastMotionX = x;
+ if (mIsBeingDragged) {
+ // Scroll to follow the motion event
+ final int activePointerIndex = ev.findPointerIndex(mActivePointerId);
+ final float x = ev.getX(activePointerIndex);
+ final int deltaX = (int) (mLastMotionX - x);
+ mLastMotionX = x;
- overscrollBy(deltaX, 0, mScrollX, 0, getScrollRange(), 0,
- getOverscrollMax(), 0);
+ overscrollBy(deltaX, 0, mScrollX, 0, getScrollRange(), 0,
+ getOverscrollMax(), 0);
+ }
break;
case MotionEvent.ACTION_UP:
- final VelocityTracker velocityTracker = mVelocityTracker;
- velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
- int initialVelocity = (int) velocityTracker.getXVelocity();
+ if (mIsBeingDragged) {
+ final VelocityTracker velocityTracker = mVelocityTracker;
+ velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
+ int initialVelocity = (int) velocityTracker.getXVelocity(mActivePointerId);
- if (getChildCount() > 0) {
- if ((Math.abs(initialVelocity) > mMinimumVelocity)) {
- fling(-initialVelocity);
- } else {
- final int right = getScrollRange();
- if (mScroller.springback(mScrollX, mScrollY, 0, 0, right, 0)) {
- invalidate();
+ if (getChildCount() > 0) {
+ if ((Math.abs(initialVelocity) > mMinimumVelocity)) {
+ fling(-initialVelocity);
+ } else {
+ final int right = getScrollRange();
+ if (mScroller.springback(mScrollX, mScrollY, 0, 0, right, 0)) {
+ invalidate();
+ }
}
}
- }
+
+ mActivePointerId = INVALID_POINTER;
+ mIsBeingDragged = false;
- if (mVelocityTracker != null) {
- mVelocityTracker.recycle();
- mVelocityTracker = null;
+ if (mVelocityTracker != null) {
+ mVelocityTracker.recycle();
+ mVelocityTracker = null;
+ }
}
+ break;
+ case MotionEvent.ACTION_POINTER_UP:
+ onSecondaryPointerUp(ev);
+ break;
}
return true;
}
+ private void onSecondaryPointerUp(MotionEvent ev) {
+ final int pointerIndex = (ev.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >>
+ MotionEvent.ACTION_POINTER_INDEX_SHIFT;
+ final int pointerId = ev.getPointerId(pointerIndex);
+ if (pointerId == mActivePointerId) {
+ // This was our active pointer going up. Choose a new
+ // active pointer and adjust accordingly.
+ // TODO: Make this decision more intelligent.
+ final int newPointerIndex = pointerIndex == 0 ? 1 : 0;
+ mLastMotionX = ev.getX(newPointerIndex);
+ mActivePointerId = ev.getPointerId(newPointerIndex);
+ if (mVelocityTracker != null) {
+ mVelocityTracker.clear();
+ }
+ }
+ }
+
@Override
protected void onOverscrolled(int scrollX, int scrollY,
boolean clampedX, boolean clampedY) {
diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java
index 9fcb829..bd07e1f 100644
--- a/core/java/android/widget/LinearLayout.java
+++ b/core/java/android/widget/LinearLayout.java
@@ -632,6 +632,8 @@
final boolean baselineAligned = mBaselineAligned;
final boolean useLargestChild = mUseLargestChild;
+
+ final boolean isExactly = widthMode == MeasureSpec.EXACTLY;
int largestChildWidth = Integer.MIN_VALUE;
@@ -658,14 +660,19 @@
// Optimization: don't bother measuring children who are going to use
// leftover space. These views will get measured again down below if
// there is any leftover space.
- final int totalLength = mTotalLength;
- mTotalLength = Math.max(totalLength, totalLength + lp.leftMargin + lp.rightMargin);
+ if (isExactly) {
+ mTotalLength += lp.leftMargin + lp.rightMargin;
+ } else {
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength +
+ lp.leftMargin + lp.rightMargin);
+ }
// Baseline alignment requires to measure widgets to obtain the
- // baseline offset (in particular for TextViews).
- // The following defeats the optimization mentioned above.
- // Allow the child to use as much space as it wants because we
- // can shrink things later (and re-measure).
+ // baseline offset (in particular for TextViews). The following
+ // defeats the optimization mentioned above. Allow the child to
+ // use as much space as it wants because we can shrink things
+ // later (and re-measure).
if (baselineAligned) {
final int freeSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
child.measure(freeSpec, freeSpec);
@@ -695,9 +702,14 @@
}
final int childWidth = child.getMeasuredWidth();
- final int totalLength = mTotalLength;
- mTotalLength = Math.max(totalLength, totalLength + childWidth + lp.leftMargin +
- lp.rightMargin + getNextLocationOffset(child));
+ if (isExactly) {
+ mTotalLength += childWidth + lp.leftMargin + lp.rightMargin +
+ getNextLocationOffset(child);
+ } else {
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength + childWidth + lp.leftMargin +
+ lp.rightMargin + getNextLocationOffset(child));
+ }
if (useLargestChild) {
largestChildWidth = Math.max(childWidth, largestChildWidth);
@@ -782,9 +794,14 @@
final LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)
child.getLayoutParams();
- final int totalLength = mTotalLength;
- mTotalLength = Math.max(totalLength, totalLength + largestChildWidth +
- lp.leftMargin + lp.rightMargin + getNextLocationOffset(child));
+ if (isExactly) {
+ mTotalLength += largestChildWidth + lp.leftMargin + lp.rightMargin +
+ getNextLocationOffset(child);
+ } else {
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength + largestChildWidth +
+ lp.leftMargin + lp.rightMargin + getNextLocationOffset(child));
+ }
}
}
@@ -854,9 +871,14 @@
}
}
- final int totalLength = mTotalLength;
- mTotalLength = Math.max(totalLength, totalLength + child.getMeasuredWidth() +
- lp.leftMargin + lp.rightMargin + getNextLocationOffset(child));
+ if (isExactly) {
+ mTotalLength += child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin +
+ getNextLocationOffset(child);
+ } else {
+ final int totalLength = mTotalLength;
+ mTotalLength = Math.max(totalLength, totalLength + child.getMeasuredWidth() +
+ lp.leftMargin + lp.rightMargin + getNextLocationOffset(child));
+ }
boolean matchHeightLocally = heightMode != MeasureSpec.EXACTLY &&
lp.height == LayoutParams.MATCH_PARENT;
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index 2feed03..7f77fa9 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -138,8 +138,11 @@
// the single allocated result per list view; kinda cheesey but avoids
// allocating these thingies too often.
- private ArrowScrollFocusResult mArrowScrollFocusResult = new ArrowScrollFocusResult();
+ private final ArrowScrollFocusResult mArrowScrollFocusResult = new ArrowScrollFocusResult();
+ // Keeps focused children visible through resizes
+ private FocusSelector mFocusSelector;
+
public ListView(Context context) {
this(context, null);
}
@@ -1017,6 +1020,39 @@
return sel;
}
+ private class FocusSelector implements Runnable {
+ private int mPosition;
+ private int mPositionTop;
+
+ public FocusSelector setup(int position, int top) {
+ mPosition = position;
+ mPositionTop = top;
+ return this;
+ }
+
+ public void run() {
+ setSelectionFromTop(mPosition, mPositionTop);
+ }
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ if (getChildCount() > 0) {
+ View focusedChild = getFocusedChild();
+ if (focusedChild != null) {
+ final int childPosition = mFirstPosition + indexOfChild(focusedChild);
+ final int childBottom = focusedChild.getBottom();
+ final int offset = Math.max(0, childBottom - (h - mPaddingTop));
+ final int top = focusedChild.getTop() - offset;
+ if (mFocusSelector == null) {
+ mFocusSelector = new FocusSelector();
+ }
+ post(mFocusSelector.setup(childPosition, top));
+ }
+ }
+ super.onSizeChanged(w, h, oldw, oldh);
+ }
+
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
// Sets up mListPadding
@@ -1040,7 +1076,8 @@
childWidth = child.getMeasuredWidth();
childHeight = child.getMeasuredHeight();
- if (recycleOnMeasure()) {
+ if (recycleOnMeasure() && mRecycler.shouldRecycleViewType(
+ ((LayoutParams) child.getLayoutParams()).viewType)) {
mRecycler.addScrapView(child);
}
}
@@ -1155,7 +1192,8 @@
}
// Recycle the view before we possibly return from the method
- if (recyle) {
+ if (recyle && recycleBin.shouldRecycleViewType(
+ ((LayoutParams) child.getLayoutParams()).viewType)) {
recycleBin.addScrapView(child);
}
@@ -1192,7 +1230,6 @@
return mFirstPosition + i;
}
}
- return mFirstPosition + childCount - 1;
}
return INVALID_POSITION;
}
@@ -1485,7 +1522,6 @@
}
// Clear out old views
- //removeAllViewsInLayout();
detachAllViewsFromParent();
switch (mLayoutMode) {
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index 1dcb203..202e658 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -36,6 +36,7 @@
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
+import android.view.ViewDebug;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
@@ -335,6 +336,7 @@
*
* @return true if the progress bar is in indeterminate mode
*/
+ @ViewDebug.ExportedProperty
public synchronized boolean isIndeterminate() {
return mIndeterminate;
}
@@ -607,6 +609,7 @@
* @see #setMax(int)
* @see #getMax()
*/
+ @ViewDebug.ExportedProperty
public synchronized int getProgress() {
return mIndeterminate ? 0 : mProgress;
}
@@ -623,6 +626,7 @@
* @see #setMax(int)
* @see #getMax()
*/
+ @ViewDebug.ExportedProperty
public synchronized int getSecondaryProgress() {
return mIndeterminate ? 0 : mSecondaryProgress;
}
@@ -636,6 +640,7 @@
* @see #getProgress()
* @see #getSecondaryProgress()
*/
+ @ViewDebug.ExportedProperty
public synchronized int getMax() {
return mMax;
}
@@ -691,8 +696,7 @@
* <p>Start the indeterminate progress animation.</p>
*/
void startAnimation() {
- int visibility = getVisibility();
- if (visibility != VISIBLE) {
+ if (getVisibility() != VISIBLE) {
return;
}
@@ -766,7 +770,7 @@
// let's be nice with the UI thread
if (v == GONE || v == INVISIBLE) {
stopAnimation();
- } else if (v == VISIBLE) {
+ } else {
startAnimation();
}
}
@@ -774,6 +778,20 @@
}
@Override
+ protected void onVisibilityChanged(View changedView, int visibility) {
+ super.onVisibilityChanged(changedView, visibility);
+
+ if (mIndeterminate) {
+ // let's be nice with the UI thread
+ if (visibility == GONE || visibility == INVISIBLE) {
+ stopAnimation();
+ } else {
+ startAnimation();
+ }
+ }
+ }
+
+ @Override
public void invalidateDrawable(Drawable dr) {
if (!mInDrawing) {
if (verifyDrawable(dr)) {
diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java
index 52ed11d..489c44d 100644
--- a/core/java/android/widget/ScrollView.java
+++ b/core/java/android/widget/ScrollView.java
@@ -22,6 +22,7 @@
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.util.AttributeSet;
+import android.util.Log;
import android.view.FocusFinder;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -51,6 +52,8 @@
* <p>ScrollView only supports vertical scrolling.
*/
public class ScrollView extends FrameLayout {
+ private static final String TAG = "ScrollView";
+
static final int ANIMATED_SCROLL_GAP = 250;
static final float MAX_SCROLL_FACTOR = 0.5f;
@@ -112,6 +115,18 @@
private int mTouchSlop;
private int mMinimumVelocity;
private int mMaximumVelocity;
+
+ /**
+ * ID of the active pointer. This is used to retain consistency during
+ * drags/flings if multiple pointers are used.
+ */
+ private int mActivePointerId = INVALID_POINTER;
+
+ /**
+ * Sentinel value for no current active pointer.
+ * Used by {@link #mActivePointerId}.
+ */
+ private static final int INVALID_POINTER = -1;
public ScrollView(Context context) {
this(context, null);
@@ -360,6 +375,17 @@
return handled;
}
+ private boolean inChild(int x, int y) {
+ if (getChildCount() > 0) {
+ final View child = getChildAt(0);
+ return !(y < child.getTop()
+ || y >= child.getBottom()
+ || x < child.getLeft()
+ || x >= child.getRight());
+ }
+ return false;
+ }
+
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
/*
@@ -378,10 +404,8 @@
return true;
}
- final float y = ev.getY();
-
- switch (action) {
- case MotionEvent.ACTION_MOVE:
+ switch (action & MotionEvent.ACTION_MASK) {
+ case MotionEvent.ACTION_MOVE: {
/*
* mIsBeingDragged == false, otherwise the shortcut would have caught it. Check
* whether the user has moved far enough from his original down touch.
@@ -391,16 +415,29 @@
* Locally do absolute value. mLastMotionY is set to the y value
* of the down event.
*/
+ final int pointerIndex = ev.findPointerIndex(mActivePointerId);
+ final float y = ev.getY(pointerIndex);
final int yDiff = (int) Math.abs(y - mLastMotionY);
if (yDiff > mTouchSlop) {
mIsBeingDragged = true;
mLastMotionY = y;
}
break;
+ }
- case MotionEvent.ACTION_DOWN:
- /* Remember location of down touch */
+ case MotionEvent.ACTION_DOWN: {
+ final float y = ev.getY();
+ if (!inChild((int) ev.getX(), (int) y)) {
+ mIsBeingDragged = false;
+ break;
+ }
+
+ /*
+ * Remember location of down touch.
+ * ACTION_DOWN always refers to pointer index 0.
+ */
mLastMotionY = y;
+ mActivePointerId = ev.getPointerId(0);
/*
* If being flinged and user touches the screen, initiate drag;
@@ -409,11 +446,16 @@
*/
mIsBeingDragged = !mScroller.isFinished();
break;
+ }
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
/* Release the drag */
mIsBeingDragged = false;
+ mActivePointerId = INVALID_POINTER;
+ break;
+ case MotionEvent.ACTION_POINTER_UP:
+ onSecondaryPointerUp(ev);
break;
}
@@ -439,10 +481,9 @@
mVelocityTracker.addMovement(ev);
final int action = ev.getAction();
- final float y = ev.getY();
- switch (action) {
- case MotionEvent.ACTION_DOWN:
+ switch (action & MotionEvent.ACTION_MASK) {
+ case MotionEvent.ACTION_DOWN: {
/*
* If being flinged and user touches, stop the fling. isFinished
* will be false if being flinged.
@@ -451,41 +492,78 @@
mScroller.abortAnimation();
}
+ final float y = ev.getY();
+ if (!(mIsBeingDragged = inChild((int) ev.getX(), (int) y))) {
+ return false;
+ }
+
// Remember where the motion event started
mLastMotionY = y;
+ mActivePointerId = ev.getPointerId(0);
break;
+ }
case MotionEvent.ACTION_MOVE:
- // Scroll to follow the motion event
- final int deltaY = (int) (mLastMotionY - y);
- mLastMotionY = y;
+ if (mIsBeingDragged) {
+ // Scroll to follow the motion event
+ final int activePointerIndex = ev.findPointerIndex(mActivePointerId);
+ final float y = ev.getY(activePointerIndex);
+ final int deltaY = (int) (mLastMotionY - y);
+ mLastMotionY = y;
- overscrollBy(0, deltaY, 0, mScrollY, 0, getScrollRange(),
- 0, getOverscrollMax());
+ overscrollBy(0, deltaY, 0, mScrollY, 0, getScrollRange(),
+ 0, getOverscrollMax());
+ }
break;
- case MotionEvent.ACTION_UP:
- final VelocityTracker velocityTracker = mVelocityTracker;
- velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
- int initialVelocity = (int) velocityTracker.getYVelocity();
+ case MotionEvent.ACTION_UP:
+ if (mIsBeingDragged) {
+ final VelocityTracker velocityTracker = mVelocityTracker;
+ velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
+ int initialVelocity = (int) velocityTracker.getYVelocity(mActivePointerId);
- if (getChildCount() > 0) {
- if ((Math.abs(initialVelocity) > mMinimumVelocity)) {
- fling(-initialVelocity);
- } else {
- final int bottom = getScrollRange();
- if (mScroller.springback(mScrollX, mScrollY, 0, 0, 0, bottom)) {
- invalidate();
+ if (getChildCount() > 0) {
+ if ((Math.abs(initialVelocity) > mMinimumVelocity)) {
+ fling(-initialVelocity);
+ } else {
+ final int bottom = getScrollRange();
+ if (mScroller.springback(mScrollX, mScrollY, 0, 0, 0, bottom)) {
+ invalidate();
+ }
}
}
- }
- if (mVelocityTracker != null) {
- mVelocityTracker.recycle();
- mVelocityTracker = null;
+ mActivePointerId = INVALID_POINTER;
+ mIsBeingDragged = false;
+
+ if (mVelocityTracker != null) {
+ mVelocityTracker.recycle();
+ mVelocityTracker = null;
+ }
}
+ break;
+ case MotionEvent.ACTION_POINTER_UP:
+ onSecondaryPointerUp(ev);
+ break;
}
return true;
}
+ private void onSecondaryPointerUp(MotionEvent ev) {
+ final int pointerIndex = (ev.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >>
+ MotionEvent.ACTION_POINTER_INDEX_SHIFT;
+ final int pointerId = ev.getPointerId(pointerIndex);
+ if (pointerId == mActivePointerId) {
+ // This was our active pointer going up. Choose a new
+ // active pointer and adjust accordingly.
+ // TODO: Make this decision more intelligent.
+ final int newPointerIndex = pointerIndex == 0 ? 1 : 0;
+ mLastMotionY = ev.getY(newPointerIndex);
+ mActivePointerId = ev.getPointerId(newPointerIndex);
+ if (mVelocityTracker != null) {
+ mVelocityTracker.clear();
+ }
+ }
+ }
+
@Override
protected void onOverscrolled(int scrollX, int scrollY,
boolean clampedX, boolean clampedY) {
diff --git a/core/java/android/widget/TabHost.java b/core/java/android/widget/TabHost.java
index d4d9063..02cd6a8 100644
--- a/core/java/android/widget/TabHost.java
+++ b/core/java/android/widget/TabHost.java
@@ -204,7 +204,7 @@
// If this is a custom view, then do not draw the bottom strips for
// the tab indicators.
if (tabSpec.mIndicatorStrategy instanceof ViewIndicatorStrategy) {
- mTabWidget.setDrawBottomStrips(false);
+ mTabWidget.setStripEnabled(false);
}
mTabWidget.addView(tabIndicator);
mTabSpecs.add(tabSpec);
diff --git a/core/java/android/widget/TabWidget.java b/core/java/android/widget/TabWidget.java
index aa47e6d..658b07b 100644
--- a/core/java/android/widget/TabWidget.java
+++ b/core/java/android/widget/TabWidget.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.R;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -28,8 +29,6 @@
import android.view.ViewGroup;
import android.view.View.OnFocusChangeListener;
-
-
/**
*
* Displays a list of tab labels representing each page in the parent's tab
@@ -43,15 +42,19 @@
* called on the containing TabHost object.
*/
public class TabWidget extends LinearLayout implements OnFocusChangeListener {
-
-
private OnTabSelectionChanged mSelectionChangedListener;
+
private int mSelectedTab = 0;
+
private Drawable mBottomLeftStrip;
private Drawable mBottomRightStrip;
- private boolean mStripMoved;
- private Drawable mDividerDrawable;
+
private boolean mDrawBottomStrips = true;
+ private boolean mStripMoved;
+
+ private Drawable mDividerDrawable;
+
+ private final Rect mBounds = new Rect();
public TabWidget(Context context) {
this(context, null);
@@ -63,13 +66,19 @@
public TabWidget(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs);
- initTabWidget();
TypedArray a =
context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.TabWidget,
defStyle, 0);
+ mDrawBottomStrips = a.getBoolean(R.styleable.TabWidget_stripEnabled, true);
+ mDividerDrawable = a.getDrawable(R.styleable.TabWidget_divider);
+ mBottomLeftStrip = a.getDrawable(R.styleable.TabWidget_stripLeft);
+ mBottomRightStrip = a.getDrawable(R.styleable.TabWidget_stripRight);
+
a.recycle();
+
+ initTabWidget();
}
@Override
@@ -100,19 +109,26 @@
if (context.getApplicationInfo().targetSdkVersion <= Build.VERSION_CODES.DONUT) {
// Donut apps get old color scheme
- mBottomLeftStrip = resources.getDrawable(
- com.android.internal.R.drawable.tab_bottom_left_v4);
- mBottomRightStrip = resources.getDrawable(
- com.android.internal.R.drawable.tab_bottom_right_v4);
+ if (mBottomLeftStrip == null) {
+ mBottomLeftStrip = resources.getDrawable(
+ com.android.internal.R.drawable.tab_bottom_left_v4);
+ }
+ if (mBottomRightStrip == null) {
+ mBottomRightStrip = resources.getDrawable(
+ com.android.internal.R.drawable.tab_bottom_right_v4);
+ }
} else {
// Use modern color scheme for Eclair and beyond
- mBottomLeftStrip = resources.getDrawable(
- com.android.internal.R.drawable.tab_bottom_left);
- mBottomRightStrip = resources.getDrawable(
- com.android.internal.R.drawable.tab_bottom_right);
+ if (mBottomLeftStrip == null) {
+ mBottomLeftStrip = resources.getDrawable(
+ com.android.internal.R.drawable.tab_bottom_left);
+ }
+ if (mBottomRightStrip == null) {
+ mBottomRightStrip = resources.getDrawable(
+ com.android.internal.R.drawable.tab_bottom_right);
+ }
}
-
// Deal with focus, as we don't want the focus to go by default
// to a tab other than the current tab
setFocusable(true);
@@ -166,16 +182,62 @@
public void setDividerDrawable(int resId) {
mDividerDrawable = mContext.getResources().getDrawable(resId);
}
+
+ /**
+ * Sets the drawable to use as the left part of the strip below the
+ * tab indicators.
+ * @param drawable the left strip drawable
+ */
+ public void setLeftStripDrawable(Drawable drawable) {
+ mBottomLeftStrip = drawable;
+ }
/**
+ * Sets the drawable to use as the left part of the strip below the
+ * tab indicators.
+ * @param resId the resource identifier of the drawable to use as the
+ * left strip drawable
+ */
+ public void setLeftStripDrawable(int resId) {
+ mBottomLeftStrip = mContext.getResources().getDrawable(resId);
+ }
+
+ /**
+ * Sets the drawable to use as the left part of the strip below the
+ * tab indicators.
+ * @param drawable the left strip drawable
+ */
+ public void setRightStripDrawable(Drawable drawable) {
+ mBottomLeftStrip = drawable;
+ }
+
+ /**
+ * Sets the drawable to use as the left part of the strip below the
+ * tab indicators.
+ * @param resId the resource identifier of the drawable to use as the
+ * left strip drawable
+ */
+ public void setRightStripDrawable(int resId) {
+ mBottomLeftStrip = mContext.getResources().getDrawable(resId);
+ }
+
+ /**
* Controls whether the bottom strips on the tab indicators are drawn or
* not. The default is to draw them. If the user specifies a custom
* view for the tab indicators, then the TabHost class calls this method
* to disable drawing of the bottom strips.
- * @param drawBottomStrips true if the bottom strips should be drawn.
+ * @param stripEnabled true if the bottom strips should be drawn.
*/
- void setDrawBottomStrips(boolean drawBottomStrips) {
- mDrawBottomStrips = drawBottomStrips;
+ public void setStripEnabled(boolean stripEnabled) {
+ mDrawBottomStrips = stripEnabled;
+ }
+
+ /**
+ * Indicates whether the bottom strips on the tab indicators are drawn
+ * or not.
+ */
+ public boolean isStripEnabled() {
+ return mDrawBottomStrips;
}
@Override
@@ -201,33 +263,28 @@
return;
}
- View selectedChild = getChildTabViewAt(mSelectedTab);
+ final View selectedChild = getChildTabViewAt(mSelectedTab);
- mBottomLeftStrip.setState(selectedChild.getDrawableState());
- mBottomRightStrip.setState(selectedChild.getDrawableState());
+ final Drawable leftStrip = mBottomLeftStrip;
+ final Drawable rightStrip = mBottomRightStrip;
+
+ leftStrip.setState(selectedChild.getDrawableState());
+ rightStrip.setState(selectedChild.getDrawableState());
if (mStripMoved) {
- Rect selBounds = new Rect(); // Bounds of the selected tab indicator
- selBounds.left = selectedChild.getLeft();
- selBounds.right = selectedChild.getRight();
+ final Rect bounds = mBounds;
+ bounds.left = selectedChild.getLeft();
+ bounds.right = selectedChild.getRight();
final int myHeight = getHeight();
- mBottomLeftStrip.setBounds(
- Math.min(0, selBounds.left
- - mBottomLeftStrip.getIntrinsicWidth()),
- myHeight - mBottomLeftStrip.getIntrinsicHeight(),
- selBounds.left,
- getHeight());
- mBottomRightStrip.setBounds(
- selBounds.right,
- myHeight - mBottomRightStrip.getIntrinsicHeight(),
- Math.max(getWidth(),
- selBounds.right + mBottomRightStrip.getIntrinsicWidth()),
- myHeight);
+ leftStrip.setBounds(Math.min(0, bounds.left - leftStrip.getIntrinsicWidth()),
+ myHeight - leftStrip.getIntrinsicHeight(), bounds.left, myHeight);
+ rightStrip.setBounds(bounds.right, myHeight - rightStrip.getIntrinsicHeight(),
+ Math.max(getWidth(), bounds.right + rightStrip.getIntrinsicWidth()), myHeight);
mStripMoved = false;
}
- mBottomLeftStrip.draw(canvas);
- mBottomRightStrip.draw(canvas);
+ leftStrip.draw(canvas);
+ rightStrip.draw(canvas);
}
/**
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 7ba0fa1..51e1c57 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -198,6 +198,7 @@
private boolean mFreezesText;
private boolean mFrozenWithFocus;
private boolean mTemporaryDetach;
+ private boolean mDispatchTemporaryDetach;
private boolean mEatTouchRelease = false;
private boolean mScrolled = false;
@@ -2822,9 +2823,6 @@
* Null means to use the normal empty text. The hint does not currently
* participate in determining the size of the view.
*
- * This method is deprecated. Use {link #setHint(int, String)} or
- * {link #setHint(CharSequence, String)} instead.
- *
* @attr ref android.R.styleable#TextView_hint
*/
@android.view.RemotableViewMethod
@@ -2844,9 +2842,6 @@
* Sets the text to be displayed when the text of the TextView is empty,
* from a resource.
*
- * This method is deprecated. Use {link #setHint(int, String)} or
- * {link #setHint(CharSequence, String)} instead.
- *
* @attr ref android.R.styleable#TextView_hint
*/
@android.view.RemotableViewMethod
@@ -5731,6 +5726,7 @@
/**
* Convenience for {@link Selection#getSelectionStart}.
*/
+ @ViewDebug.ExportedProperty
public int getSelectionStart() {
return Selection.getSelectionStart(getText());
}
@@ -5738,6 +5734,7 @@
/**
* Convenience for {@link Selection#getSelectionEnd}.
*/
+ @ViewDebug.ExportedProperty
public int getSelectionEnd() {
return Selection.getSelectionEnd(getText());
}
@@ -6369,14 +6366,30 @@
mBlink.postAtTime(mBlink, mShowCursor + BLINK);
}
+ /**
+ * @hide
+ */
+ @Override
+ public void dispatchFinishTemporaryDetach() {
+ mDispatchTemporaryDetach = true;
+ super.dispatchFinishTemporaryDetach();
+ mDispatchTemporaryDetach = false;
+ }
+
@Override
public void onStartTemporaryDetach() {
- mTemporaryDetach = true;
+ super.onStartTemporaryDetach();
+ // Only track when onStartTemporaryDetach() is called directly,
+ // usually because this instance is an editable field in a list
+ if (!mDispatchTemporaryDetach) mTemporaryDetach = true;
}
@Override
public void onFinishTemporaryDetach() {
- mTemporaryDetach = false;
+ super.onFinishTemporaryDetach();
+ // Only track when onStartTemporaryDetach() is called directly,
+ // usually because this instance is an editable field in a list
+ if (!mDispatchTemporaryDetach) mTemporaryDetach = false;
}
@Override
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java
index 906bca1..c2517a8 100644
--- a/core/java/android/widget/VideoView.java
+++ b/core/java/android/widget/VideoView.java
@@ -62,6 +62,8 @@
private static final int STATE_PLAYING = 3;
private static final int STATE_PAUSED = 4;
private static final int STATE_PLAYBACK_COMPLETED = 5;
+ private static final int STATE_SUSPEND = 6;
+ private static final int STATE_RESUME = 7;
// mCurrentState is a VideoView object's current state.
// mTargetState is the state that a method caller intends to reach.
@@ -87,6 +89,7 @@
private boolean mCanPause;
private boolean mCanSeekBack;
private boolean mCanSeekForward;
+ private int mStateWhenSuspended; //state before calling suspend()
public VideoView(Context context) {
super(context);
@@ -466,7 +469,14 @@
public void surfaceCreated(SurfaceHolder holder)
{
mSurfaceHolder = holder;
- openVideo();
+ //resume() was called before surfaceCreated()
+ if (mMediaPlayer != null && mCurrentState == STATE_SUSPEND
+ && mTargetState == STATE_RESUME) {
+ mMediaPlayer.setDisplay(mSurfaceHolder);
+ resume();
+ } else {
+ openVideo();
+ }
}
public void surfaceDestroyed(SurfaceHolder holder)
@@ -474,7 +484,6 @@
// after we return from this we can't use the surface any more
mSurfaceHolder = null;
if (mMediaController != null) mMediaController.hide();
- release(true);
}
};
@@ -567,7 +576,36 @@
mTargetState = STATE_PAUSED;
}
- // cache duration as mDuration for faster access
+ public void suspend() {
+ if (isInPlaybackState()) {
+ if (mMediaPlayer.suspend()) {
+ mStateWhenSuspended = mCurrentState;
+ mCurrentState = STATE_SUSPEND;
+ mTargetState = STATE_SUSPEND;
+ } else {
+ Log.w(TAG, "Unable to suspend video");
+ mErrorListener.onError(mMediaPlayer, MediaPlayer.MEDIA_ERROR_UNKNOWN, 0);
+ }
+ }
+ }
+
+ public void resume() {
+ if (mSurfaceHolder == null && mCurrentState == STATE_SUSPEND){
+ mTargetState = STATE_RESUME;
+ return;
+ }
+ if (mMediaPlayer != null && mCurrentState == STATE_SUSPEND) {
+ if (mMediaPlayer.resume()) {
+ mCurrentState = mStateWhenSuspended;
+ mTargetState = mStateWhenSuspended;
+ } else {
+ Log.w(TAG, "Unable to resume video");
+ mErrorListener.onError(mMediaPlayer, MediaPlayer.MEDIA_ERROR_UNKNOWN, 0);
+ }
+ }
+ }
+
+ // cache duration as mDuration for faster access
public int getDuration() {
if (isInPlaybackState()) {
if (mDuration > 0) {
diff --git a/core/java/com/android/internal/app/RingtonePickerActivity.java b/core/java/com/android/internal/app/RingtonePickerActivity.java
index 5a0fea3..ddddabe 100644
--- a/core/java/com/android/internal/app/RingtonePickerActivity.java
+++ b/core/java/com/android/internal/app/RingtonePickerActivity.java
@@ -276,6 +276,7 @@
public void run() {
if (mSampleRingtonePos == mSilentPos) {
+ mRingtoneManager.stopPreviousRingtone();
return;
}
diff --git a/core/java/com/android/internal/app/TetherActivity.java b/core/java/com/android/internal/app/TetherActivity.java
index a48ccf9..5d71231 100644
--- a/core/java/com/android/internal/app/TetherActivity.java
+++ b/core/java/com/android/internal/app/TetherActivity.java
@@ -141,7 +141,7 @@
}
} else {
for (String t : tethered) {
- if (!cm.untether("ppp0")) {
+ if (!cm.untether(t)) {
error = true;
}
}
diff --git a/core/java/com/android/internal/content/PackageHelper.java b/core/java/com/android/internal/content/PackageHelper.java
index bc7dbf4..c5db83f 100644
--- a/core/java/com/android/internal/content/PackageHelper.java
+++ b/core/java/com/android/internal/content/PackageHelper.java
@@ -36,7 +36,7 @@
public static final int RECOMMEND_INSTALL_EXTERNAL = 2;
public static final int RECOMMEND_FAILED_INSUFFICIENT_STORAGE = -1;
public static final int RECOMMEND_FAILED_INVALID_APK = -2;
- private static final boolean DEBUG_SD_INSTALL = true;
+ private static final boolean localLOGV = true;
private static final String TAG = "PackageHelper";
public static IMountService getMountService() {
@@ -58,7 +58,7 @@
if ((len - (mbLen * 1024 * 1024)) > 0) {
mbLen++;
}
- if (DEBUG_SD_INSTALL) Log.i(TAG, "Size of resource " + mbLen);
+ if (localLOGV) Log.i(TAG, "Size of resource " + mbLen);
try {
int rc = mountService.createSecureContainer(
@@ -68,7 +68,7 @@
return null;
}
String cachePath = mountService.getSecureContainerPath(cid);
- if (DEBUG_SD_INSTALL) Log.i(TAG, "Created secure container " + cid +
+ if (localLOGV) Log.i(TAG, "Created secure container " + cid +
" at " + cachePath);
return cachePath;
} catch (RemoteException e) {
@@ -93,7 +93,7 @@
public static boolean unMountSdDir(String cid) {
try {
- int rc = getMountService().unmountSecureContainer(cid, false);
+ int rc = getMountService().unmountSecureContainer(cid, true);
if (rc != StorageResultCode.OperationSucceeded) {
Log.e(TAG, "Failed to unmount " + cid + " with rc " + rc);
return false;
@@ -148,7 +148,8 @@
public static boolean destroySdDir(String cid) {
try {
- int rc = getMountService().destroySecureContainer(cid, false);
+ if (localLOGV) Log.i(TAG, "Forcibly destroying container " + cid);
+ int rc = getMountService().destroySecureContainer(cid, true);
if (rc != StorageResultCode.OperationSucceeded) {
Log.i(TAG, "Failed to destroy container " + cid);
return false;
diff --git a/core/java/com/android/internal/content/SyncStateContentProviderHelper.java b/core/java/com/android/internal/content/SyncStateContentProviderHelper.java
index cd6a9a1..274082c 100644
--- a/core/java/com/android/internal/content/SyncStateContentProviderHelper.java
+++ b/core/java/com/android/internal/content/SyncStateContentProviderHelper.java
@@ -50,6 +50,11 @@
public static final String PATH = "syncstate";
+ private static final String QUERY_COUNT_SYNC_STATE_ROWS =
+ "SELECT count(*)"
+ + " FROM " + SYNC_STATE_TABLE
+ + " WHERE " + SyncStateContract.Columns._ID + "=?";
+
public void createDatabase(SQLiteDatabase db) {
db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_TABLE);
db.execSQL("CREATE TABLE " + SYNC_STATE_TABLE + " ("
@@ -96,11 +101,17 @@
return db.update(SYNC_STATE_TABLE, values, selection, selectionArgs);
}
- public void update(SQLiteDatabase db, long rowId, Object data) {
+ public int update(SQLiteDatabase db, long rowId, Object data) {
+ if (DatabaseUtils.longForQuery(db, QUERY_COUNT_SYNC_STATE_ROWS,
+ new String[]{Long.toString(rowId)}) < 1) {
+ return 0;
+ }
db.execSQL("UPDATE " + SYNC_STATE_TABLE
+ " SET " + SyncStateContract.Columns.DATA + "=?"
+ " WHERE " + SyncStateContract.Columns._ID + "=" + rowId,
new Object[]{data});
+ // assume a row was modified since we know it exists
+ return 1;
}
public void onAccountsChanged(SQLiteDatabase db, Account[] accounts) {
diff --git a/common/java/com/android/common/DNParser.java b/core/java/com/android/internal/net/DNParser.java
similarity index 99%
rename from common/java/com/android/common/DNParser.java
rename to core/java/com/android/internal/net/DNParser.java
index 32d57c0..5254207 100644
--- a/common/java/com/android/common/DNParser.java
+++ b/core/java/com/android/internal/net/DNParser.java
@@ -15,7 +15,8 @@
* limitations under the License.
*/
-package com.android.common;
+package com.android.internal.net;
+
import android.util.Log;
@@ -34,6 +35,8 @@
*
* <p>This class is used by {@link DomainNameValidator} only. However, in order to make this
* class visible from unit tests, it's made public.
+ *
+ * @hide
*/
public final class DNParser {
private static final String TAG = "DNParser";
diff --git a/common/java/com/android/common/DomainNameValidator.java b/core/java/com/android/internal/net/DomainNameValidator.java
similarity index 99%
rename from common/java/com/android/common/DomainNameValidator.java
rename to core/java/com/android/internal/net/DomainNameValidator.java
index 25dc007..dbd5019 100644
--- a/common/java/com/android/common/DomainNameValidator.java
+++ b/core/java/com/android/internal/net/DomainNameValidator.java
@@ -13,7 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.common;
+package com.android.internal.net;
+
import android.util.Config;
import android.util.Log;
@@ -30,6 +31,7 @@
import javax.security.auth.x500.X500Principal;
+/** @hide */
public class DomainNameValidator {
private final static String TAG = "DomainNameValidator";
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index dfcc8f7..71ccb3b 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -59,6 +59,13 @@
// Current on-disk Parcel version
private static final int VERSION = 42;
+ // The maximum number of names wakelocks we will keep track of
+ // per uid; once the limit is reached, we batch the remaining wakelocks
+ // in to one common name.
+ private static final int MAX_WAKELOCKS_PER_UID = 20;
+
+ private static final String BATCHED_WAKELOCK_NAME = "*overflow*";
+
private static int sNumSpeedSteps;
private final File mFile;
@@ -1757,7 +1764,12 @@
String wakelockName = in.readString();
Uid.Wakelock wakelock = new Wakelock();
wakelock.readFromParcelLocked(unpluggables, in);
- mWakelockStats.put(wakelockName, wakelock);
+ if (mWakelockStats.size() < MAX_WAKELOCKS_PER_UID) {
+ // We will just drop some random set of wakelocks if
+ // the previous run of the system was an older version
+ // that didn't impose a limit.
+ mWakelockStats.put(wakelockName, wakelock);
+ }
}
int numSensors = in.readInt();
@@ -2583,8 +2595,14 @@
public StopwatchTimer getWakeTimerLocked(String name, int type) {
Wakelock wl = mWakelockStats.get(name);
if (wl == null) {
- wl = new Wakelock();
- mWakelockStats.put(name, wl);
+ if (mWakelockStats.size() > MAX_WAKELOCKS_PER_UID) {
+ name = BATCHED_WAKELOCK_NAME;
+ wl = mWakelockStats.get(name);
+ }
+ if (wl == null) {
+ wl = new Wakelock();
+ mWakelockStats.put(name, wl);
+ }
}
StopwatchTimer t = null;
switch (type) {
diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java
index 9e5bdff..2369d25 100644
--- a/core/java/com/android/internal/os/PowerProfile.java
+++ b/core/java/com/android/internal/os/PowerProfile.java
@@ -20,7 +20,7 @@
import android.content.Context;
import android.content.res.XmlResourceParser;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
diff --git a/common/java/com/android/common/FastXmlSerializer.java b/core/java/com/android/internal/util/FastXmlSerializer.java
similarity index 99%
rename from common/java/com/android/common/FastXmlSerializer.java
rename to core/java/com/android/internal/util/FastXmlSerializer.java
index 0d33941..592a8fa 100644
--- a/common/java/com/android/common/FastXmlSerializer.java
+++ b/core/java/com/android/internal/util/FastXmlSerializer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.common;
+package com.android.internal.util;
import org.xmlpull.v1.XmlSerializer;
diff --git a/common/java/com/android/common/XmlUtils.java b/core/java/com/android/internal/util/XmlUtils.java
similarity index 99%
rename from common/java/com/android/common/XmlUtils.java
rename to core/java/com/android/internal/util/XmlUtils.java
index dd57e49..8d8df16 100644
--- a/common/java/com/android/common/XmlUtils.java
+++ b/core/java/com/android/internal/util/XmlUtils.java
@@ -14,7 +14,8 @@
* limitations under the License.
*/
-package com.android.common;
+package com.android.internal.util;
+
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index f074b80..d6b0808 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -16,16 +16,21 @@
package com.android.internal.widget;
-import android.app.DevicePolicyManager;
-import android.content.ComponentName;
+import android.app.admin.DevicePolicyManager;
import android.content.ContentResolver;
import android.content.Context;
+import android.os.RemoteException;
+import android.os.ServiceManager;
import android.os.SystemClock;
import android.provider.Settings;
import android.security.MessageDigest;
+import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
+import android.widget.Button;
+import com.android.internal.R;
+import com.android.internal.telephony.ITelephony;
import com.google.android.collect.Lists;
import java.io.FileNotFoundException;
@@ -104,14 +109,24 @@
private static String sLockPatternFilename;
private static String sLockPasswordFilename;
+ DevicePolicyManager getDevicePolicyManager() {
+ if (mDevicePolicyManager == null) {
+ mDevicePolicyManager =
+ (DevicePolicyManager)mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
+ if (mDevicePolicyManager == null) {
+ Log.e(TAG, "Can't get DevicePolicyManagerService: is it running?",
+ new IllegalStateException("Stack trace:"));
+ }
+ }
+ return mDevicePolicyManager;
+ }
/**
* @param contentResolver Used to look up and save settings.
*/
public LockPatternUtils(Context context) {
mContext = context;
mContentResolver = context.getContentResolver();
- mDevicePolicyManager =
- (DevicePolicyManager)context.getSystemService(Context.DEVICE_POLICY_SERVICE);
+ mDevicePolicyManager = getDevicePolicyManager();
// Initialize the location of gesture lock file
if (sLockPatternFilename == null) {
sLockPatternFilename = android.os.Environment.getDataDirectory()
@@ -123,7 +138,7 @@
}
public int getRequestedMinimumPasswordLength() {
- return mDevicePolicyManager.getPasswordMinimumLength(null);
+ return getDevicePolicyManager().getPasswordMinimumLength(null);
}
/**
@@ -133,7 +148,7 @@
* @return
*/
public int getRequestedPasswordMode() {
- int policyMode = mDevicePolicyManager.getPasswordQuality(null);
+ int policyMode = getDevicePolicyManager().getPasswordQuality(null);
switch (policyMode) {
case DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC:
return MODE_PASSWORD;
@@ -151,11 +166,11 @@
* @return
*/
public void reportFailedPasswordAttempt() {
- mDevicePolicyManager.reportFailedPasswordAttempt();
+ getDevicePolicyManager().reportFailedPasswordAttempt();
}
public void reportSuccessfulPasswordAttempt() {
- mDevicePolicyManager.reportSuccessfulPasswordAttempt();
+ getDevicePolicyManager().reportSuccessfulPasswordAttempt();
}
public void setActivePasswordState(int mode, int length) {
@@ -171,7 +186,7 @@
policyMode = DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC;
break;
}
- mDevicePolicyManager.setActivePasswordState(policyMode, length);
+ getDevicePolicyManager().setActivePasswordState(policyMode, length);
}
/**
@@ -279,7 +294,7 @@
saveLockPattern(null);
setLong(PASSWORD_TYPE_KEY, MODE_PATTERN);
}
-
+
/**
* Save a lock pattern.
* @param pattern The new pattern to save.
@@ -334,7 +349,7 @@
hasNonDigit = true;
}
}
-
+
// First check if it is sufficient.
switch (reqMode) {
case MODE_PASSWORD: {
@@ -342,19 +357,19 @@
return MODE_UNSPECIFIED;
}
} break;
-
+
case MODE_PIN:
case MODE_PATTERN: {
// Whatever we have is acceptable; we may need to promote the
// mode later.
} break;
-
+
default:
// If it isn't a mode we specifically know, then fail fast.
Log.w(TAG, "adjustPasswordMode: unknown mode " + reqMode);
return MODE_UNSPECIFIED;
}
-
+
// Do we need to promote?
if (hasNonDigit) {
if (reqMode < MODE_PASSWORD) {
@@ -366,10 +381,10 @@
reqMode = MODE_PIN;
}
}
-
+
return reqMode;
}
-
+
/**
* Save a lock password. Does not ensure that the pattern is as good
* as the requested mode, but will adjust the mode to be as good as the
@@ -665,4 +680,43 @@
|| (mode == MODE_PIN || mode == MODE_PASSWORD) && savedPasswordExists();
return secure;
}
+
+ /**
+ * Sets the text on the emergency button to indicate what action will be taken.
+ * If there's currently a call in progress, the button will take them to the call
+ * @param button the button to update
+ */
+ public void updateEmergencyCallButtonState(Button button) {
+ int newState = TelephonyManager.getDefault().getCallState();
+ int textId;
+ if (newState == TelephonyManager.CALL_STATE_OFFHOOK) {
+ // show "return to call" text and show phone icon
+ textId = R.string.lockscreen_return_to_call;
+ int phoneCallIcon = R.drawable.stat_sys_phone_call;
+ button.setCompoundDrawablesWithIntrinsicBounds(phoneCallIcon, 0, 0, 0);
+ } else {
+ textId = R.string.lockscreen_emergency_call;
+ int emergencyIcon = R.drawable.ic_emergency;
+ button.setCompoundDrawablesWithIntrinsicBounds(emergencyIcon, 0, 0, 0);
+ }
+ button.setText(textId);
+ }
+
+ /**
+ * Resumes a call in progress. Typically launched from the EmergencyCall button
+ * on various lockscreens.
+ *
+ * @return true if we were able to tell InCallScreen to show.
+ */
+ public boolean resumeCall() {
+ ITelephony phone = ITelephony.Stub.asInterface(ServiceManager.checkService("phone"));
+ try {
+ if (phone != null && phone.showCallScreen()) {
+ return true;
+ }
+ } catch (RemoteException e) {
+ // What can we do?
+ }
+ return false;
+ }
}
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index e8749ed..85d1a6f 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -45,6 +45,7 @@
android_view_Surface.cpp \
android_view_ViewRoot.cpp \
android_text_AndroidCharacter.cpp \
+ android_text_AndroidBidi.cpp \
android_text_KeyCharacterMap.cpp \
android_os_Debug.cpp \
android_os_FileUtils.cpp \
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 7c8df03..8586aca 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -142,6 +142,7 @@
extern int register_android_net_wifi_WifiManager(JNIEnv* env);
extern int register_android_security_Md5MessageDigest(JNIEnv *env);
extern int register_android_text_AndroidCharacter(JNIEnv *env);
+extern int register_android_text_AndroidBidi(JNIEnv *env);
extern int register_android_text_KeyCharacterMap(JNIEnv *env);
extern int register_android_opengl_classes(JNIEnv *env);
extern int register_android_bluetooth_HeadsetBase(JNIEnv* env);
@@ -1184,6 +1185,7 @@
REG_JNI(register_android_emoji_EmojiFactory),
REG_JNI(register_android_security_Md5MessageDigest),
REG_JNI(register_android_text_AndroidCharacter),
+ REG_JNI(register_android_text_AndroidBidi),
REG_JNI(register_android_text_KeyCharacterMap),
REG_JNI(register_android_os_Process),
REG_JNI(register_android_os_Binder),
diff --git a/core/jni/android_database_SQLiteDatabase.cpp b/core/jni/android_database_SQLiteDatabase.cpp
index 26d0e86..b93311b 100644
--- a/core/jni/android_database_SQLiteDatabase.cpp
+++ b/core/jni/android_database_SQLiteDatabase.cpp
@@ -63,6 +63,26 @@
static jfieldID offset_db_handle;
+static void sqlLogger(void *databaseName, int iErrCode, const char *zMsg) {
+ LOGI("sqlite returned: error code = %d, msg = %s\n", iErrCode, zMsg);
+}
+
+// register the logging func on sqlite. needs to be done BEFORE any sqlite3 func is called.
+static void registerLoggingFunc() {
+ static bool loggingFuncSet = false;
+ if (loggingFuncSet) {
+ return;
+ }
+
+ LOGV("Registering sqlite logging func \n");
+ int err = sqlite3_config(SQLITE_CONFIG_LOG, &sqlLogger, 0);
+ if (err != SQLITE_OK) {
+ LOGE("sqlite_config failed error_code = %d. THIS SHOULD NEVER occur.\n", err);
+ return;
+ }
+ loggingFuncSet = true;
+}
+
/* public native void dbopen(String path, int flags, String locale); */
static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags)
{
@@ -72,6 +92,9 @@
char const * path8 = env->GetStringUTFChars(pathString, NULL);
int sqliteFlags;
+ // register the logging func on sqlite. needs to be done BEFORE any sqlite3 func is called.
+ registerLoggingFunc();
+
// convert our flags into the sqlite flags
if (flags & CREATE_IF_NECESSARY) {
sqliteFlags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
@@ -143,7 +166,21 @@
if (handle != NULL) sqlite3_close(handle);
}
-void sqlTrace(void *databaseName, const char *sql) {
+static char *getDatabaseName(JNIEnv* env, sqlite3 * handle, jstring databaseName) {
+ char const *path = env->GetStringUTFChars(databaseName, NULL);
+ if (path == NULL) {
+ LOGE("Failure in getDatabaseName(). VM ran out of memory?\n");
+ return NULL; // VM would have thrown OutOfMemoryError
+ }
+ int len = strlen(path);
+ char *dbNameStr = (char *)malloc(len + 1);
+ strncpy(dbNameStr, path, len);
+ dbNameStr[len-1] = NULL;
+ env->ReleaseStringUTFChars(databaseName, path);
+ return dbNameStr;
+}
+
+static void sqlTrace(void *databaseName, const char *sql) {
LOGI("sql_statement|%s|%s\n", (char *)databaseName, sql);
}
@@ -151,21 +188,10 @@
static void enableSqlTracing(JNIEnv* env, jobject object, jstring databaseName)
{
sqlite3 * handle = (sqlite3 *)env->GetIntField(object, offset_db_handle);
- char const *path = env->GetStringUTFChars(databaseName, NULL);
- if (path == NULL) {
- LOGE("Failure in enableSqlTracing(). VM ran out of memory?\n");
- return; // VM would have thrown OutOfMemoryError
- }
- int len = strlen(path);
- char *traceFuncArg = (char *)malloc(len + 1);
- strncpy(traceFuncArg, path, len);
- traceFuncArg[len-1] = NULL;
- env->ReleaseStringUTFChars(databaseName, path);
- sqlite3_trace(handle, &sqlTrace, (void *)traceFuncArg);
- LOGI("will be printing all sql statements executed on database = %s\n", traceFuncArg);
+ sqlite3_trace(handle, &sqlTrace, (void *)getDatabaseName(env, handle, databaseName));
}
-void sqlProfile(void *databaseName, const char *sql, sqlite3_uint64 tm) {
+static void sqlProfile(void *databaseName, const char *sql, sqlite3_uint64 tm) {
double d = tm/1000000.0;
LOGI("elapsedTime4Sql|%s|%.3f ms|%s\n", (char *)databaseName, d, sql);
}
@@ -174,21 +200,10 @@
static void enableSqlProfiling(JNIEnv* env, jobject object, jstring databaseName)
{
sqlite3 * handle = (sqlite3 *)env->GetIntField(object, offset_db_handle);
- char const *path = env->GetStringUTFChars(databaseName, NULL);
- if (path == NULL) {
- LOGE("Failure in enableSqlProfiling(). VM ran out of memory?\n");
- return; // VM would have thrown OutOfMemoryError
- }
- int len = strlen(path);
- char *traceFuncArg = (char *)malloc(len + 1);
- strncpy(traceFuncArg, path, len);
- traceFuncArg[len-1] = NULL;
- env->ReleaseStringUTFChars(databaseName, path);
- sqlite3_profile(handle, &sqlProfile, (void *)traceFuncArg);
- LOGI("will be printing execution time of all sql statements executed on database = %s\n",
- traceFuncArg);
+ sqlite3_profile(handle, &sqlProfile, (void *)getDatabaseName(env, handle, databaseName));
}
+
/* public native void close(); */
static void dbclose(JNIEnv* env, jobject object)
{
diff --git a/core/jni/android_text_AndroidBidi.cpp b/core/jni/android_text_AndroidBidi.cpp
new file mode 100644
index 0000000..7696bb3
--- /dev/null
+++ b/core/jni/android_text_AndroidBidi.cpp
@@ -0,0 +1,81 @@
+/* //device/libs/android_runtime/android_text_AndroidBidi.cpp
+**
+** Copyright 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_TAG "AndroidUnicode"
+
+#include <jni.h>
+#include <android_runtime/AndroidRuntime.h>
+#include "utils/misc.h"
+#include "utils/Log.h"
+#include "unicode/ubidi.h"
+
+namespace android {
+
+static void jniThrowException(JNIEnv* env, const char* exc, const char* msg = NULL)
+{
+ jclass excClazz = env->FindClass(exc);
+ LOG_ASSERT(excClazz, "Unable to find class %s", exc);
+
+ env->ThrowNew(excClazz, msg);
+}
+
+static jint runBidi(JNIEnv* env, jobject obj, jint dir, jcharArray chsArray,
+ jbyteArray infoArray, int n, jboolean haveInfo)
+{
+ // Parameters are checked on java side
+ // Failures from GetXXXArrayElements indicate a serious out-of-memory condition
+ // that we don't bother to report, we're probably dead anyway.
+ jint result = 0;
+ jchar* chs = env->GetCharArrayElements(chsArray, NULL);
+ if (chs != NULL) {
+ jbyte* info = env->GetByteArrayElements(infoArray, NULL);
+ if (info != NULL) {
+ UErrorCode status = U_ZERO_ERROR;
+ UBiDi* bidi = ubidi_openSized(n, 0, &status);
+ ubidi_setPara(bidi, chs, n, dir, NULL, &status);
+ if (U_SUCCESS(status)) {
+ for (int i = 0; i < n; ++i) {
+ info[i] = ubidi_getLevelAt(bidi, i);
+ }
+ result = ubidi_getParaLevel(bidi);
+ } else {
+ jniThrowException(env, "java/lang/RuntimeException", NULL);
+ }
+ ubidi_close(bidi);
+
+ env->ReleaseByteArrayElements(infoArray, info, 0);
+ }
+ env->ReleaseCharArrayElements(chsArray, chs, JNI_ABORT);
+ }
+ return result;
+}
+
+static JNINativeMethod gMethods[] = {
+ { "runBidi", "(I[C[BIZ)I",
+ (void*) runBidi }
+};
+
+int register_android_text_AndroidBidi(JNIEnv* env)
+{
+ jclass clazz = env->FindClass("android/text/AndroidBidi");
+ LOG_ASSERT(clazz, "Cannot find android/text/AndroidBidi");
+
+ return AndroidRuntime::registerNativeMethods(env, "android/text/AndroidBidi",
+ gMethods, NELEM(gMethods));
+}
+
+}
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index a82a21e..5afa0342 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -1466,19 +1466,25 @@
for (size_t i=0; ((ssize_t)i)<N; i++, bag++) {
value = bag->map.value;
jstring str = NULL;
-
+
// Take care of resolving the found resource to its final value.
ssize_t block = res.resolveReference(&value, bag->stringBlock, NULL);
if (value.dataType == Res_value::TYPE_STRING) {
- const char16_t* str16 = res.getTableStringBlock(block)->stringAt(value.data, &strLen);
- str = env->NewString(str16, strLen);
- if (str == NULL) {
- doThrow(env, "java/lang/OutOfMemoryError");
- res.unlockBag(startOfBag);
- return NULL;
+ const ResStringPool* pool = res.getTableStringBlock(block);
+ const char* str8 = pool->string8At(value.data, &strLen);
+ if (str8 != NULL) {
+ str = env->NewStringUTF(str8);
+ } else {
+ const char16_t* str16 = pool->stringAt(value.data, &strLen);
+ str = env->NewString(str16, strLen);
+ if (str == NULL) {
+ doThrow(env, "java/lang/OutOfMemoryError");
+ res.unlockBag(startOfBag);
+ return NULL;
+ }
}
}
-
+
env->SetObjectArrayElement(array, i, str);
}
res.unlockBag(startOfBag);
diff --git a/core/jni/android_util_Log.cpp b/core/jni/android_util_Log.cpp
index 8316b03..6b97951 100644
--- a/core/jni/android_util_Log.cpp
+++ b/core/jni/android_util_Log.cpp
@@ -98,10 +98,10 @@
/*
* In class android.util.Log:
- * public static native int println(int priority, String tag, String msg)
+ * public static native int println_native(int buffer, int priority, String tag, String msg)
*/
-static jint android_util_Log_println(JNIEnv* env, jobject clazz,
- jint priority, jstring tagObj, jstring msgObj)
+static jint android_util_Log_println_native(JNIEnv* env, jobject clazz,
+ jint bufID, jint priority, jstring tagObj, jstring msgObj)
{
const char* tag = NULL;
const char* msg = NULL;
@@ -116,11 +116,21 @@
return -1;
}
+ if (bufID < 0 || bufID >= LOG_ID_MAX) {
+ jclass npeClazz;
+
+ npeClazz = env->FindClass("java/lang/NullPointerException");
+ assert(npeClazz != NULL);
+
+ env->ThrowNew(npeClazz, "bad bufID");
+ return -1;
+ }
+
if (tagObj != NULL)
tag = env->GetStringUTFChars(tagObj, NULL);
msg = env->GetStringUTFChars(msgObj, NULL);
- int res = android_writeLog((android_LogPriority) priority, tag, msg);
+ int res = __android_log_buf_write(bufID, (android_LogPriority)priority, tag, msg);
if (tag != NULL)
env->ReleaseStringUTFChars(tagObj, tag);
@@ -135,7 +145,7 @@
static JNINativeMethod gMethods[] = {
/* name, signature, funcPtr */
{ "isLoggable", "(Ljava/lang/String;I)Z", (void*) android_util_Log_isLoggable },
- { "println", "(ILjava/lang/String;Ljava/lang/String;)I", (void*) android_util_Log_println },
+ { "println_native", "(IILjava/lang/String;Ljava/lang/String;)I", (void*) android_util_Log_println_native },
};
int register_android_util_Log(JNIEnv* env)
diff --git a/core/jni/android_util_StringBlock.cpp b/core/jni/android_util_StringBlock.cpp
index ffb271c..641fbce 100644
--- a/core/jni/android_util_StringBlock.cpp
+++ b/core/jni/android_util_StringBlock.cpp
@@ -89,6 +89,11 @@
}
size_t len;
+ const char* str8 = osb->string8At(idx, &len);
+ if (str8 != NULL) {
+ return env->NewStringUTF(str8);
+ }
+
const char16_t* str = osb->stringAt(idx, &len);
if (str == NULL) {
doThrow(env, "java/lang/IndexOutOfBoundsException");
diff --git a/core/res/res/drawable-hdpi/btn_dropdown_disabled.9.png b/core/res/res/drawable-hdpi/btn_dropdown_disabled.9.png
new file mode 100644
index 0000000..c6503c7
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_dropdown_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_dropdown_disabled_focused.9.png b/core/res/res/drawable-hdpi/btn_dropdown_disabled_focused.9.png
new file mode 100644
index 0000000..152de8b
--- /dev/null
+++ b/core/res/res/drawable-hdpi/btn_dropdown_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_search_dialog_default.9.png b/core/res/res/drawable-hdpi/btn_search_dialog_default.9.png
index 7acd0df..72faccf 100644
--- a/core/res/res/drawable-hdpi/btn_search_dialog_default.9.png
+++ b/core/res/res/drawable-hdpi/btn_search_dialog_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_search_dialog_pressed.9.png b/core/res/res/drawable-hdpi/btn_search_dialog_pressed.9.png
index a8b843a..369be10 100644
--- a/core/res/res/drawable-hdpi/btn_search_dialog_pressed.9.png
+++ b/core/res/res/drawable-hdpi/btn_search_dialog_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_search_dialog_selected.9.png b/core/res/res/drawable-hdpi/btn_search_dialog_selected.9.png
index cfbc092..7e996ec 100644
--- a/core/res/res/drawable-hdpi/btn_search_dialog_selected.9.png
+++ b/core/res/res/drawable-hdpi/btn_search_dialog_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_search_dialog_voice_default.9.png b/core/res/res/drawable-hdpi/btn_search_dialog_voice_default.9.png
index 3d0d16e..44668b3 100644
--- a/core/res/res/drawable-hdpi/btn_search_dialog_voice_default.9.png
+++ b/core/res/res/drawable-hdpi/btn_search_dialog_voice_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_search_dialog_voice_pressed.9.png b/core/res/res/drawable-hdpi/btn_search_dialog_voice_pressed.9.png
index 2ccd3da..3a4571e 100644
--- a/core/res/res/drawable-hdpi/btn_search_dialog_voice_pressed.9.png
+++ b/core/res/res/drawable-hdpi/btn_search_dialog_voice_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/btn_search_dialog_voice_selected.9.png b/core/res/res/drawable-hdpi/btn_search_dialog_voice_selected.9.png
index 966ea44..60dc632 100644
--- a/core/res/res/drawable-hdpi/btn_search_dialog_voice_selected.9.png
+++ b/core/res/res/drawable-hdpi/btn_search_dialog_voice_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinnerbox_arrow_first.9.png b/core/res/res/drawable-hdpi/spinnerbox_arrow_first.9.png
deleted file mode 100644
index af80855..0000000
--- a/core/res/res/drawable-hdpi/spinnerbox_arrow_first.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinnerbox_arrow_last.9.png b/core/res/res/drawable-hdpi/spinnerbox_arrow_last.9.png
deleted file mode 100644
index dc47275..0000000
--- a/core/res/res/drawable-hdpi/spinnerbox_arrow_last.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinnerbox_arrow_middle.9.png b/core/res/res/drawable-hdpi/spinnerbox_arrow_middle.9.png
deleted file mode 100644
index 007f279..0000000
--- a/core/res/res/drawable-hdpi/spinnerbox_arrow_middle.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-hdpi/spinnerbox_arrow_single.9.png b/core/res/res/drawable-hdpi/spinnerbox_arrow_single.9.png
deleted file mode 100644
index 24592a3..0000000
--- a/core/res/res/drawable-hdpi/spinnerbox_arrow_single.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_dropdown_disabled.9.png b/core/res/res/drawable-mdpi/btn_dropdown_disabled.9.png
new file mode 100644
index 0000000..f7464c7
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_dropdown_disabled.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_dropdown_disabled_focused.9.png b/core/res/res/drawable-mdpi/btn_dropdown_disabled_focused.9.png
new file mode 100644
index 0000000..ffe219f
--- /dev/null
+++ b/core/res/res/drawable-mdpi/btn_dropdown_disabled_focused.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_search_dialog_voice_default.9.png b/core/res/res/drawable-mdpi/btn_search_dialog_voice_default.9.png
index febf222..437fbc7 100644
--- a/core/res/res/drawable-mdpi/btn_search_dialog_voice_default.9.png
+++ b/core/res/res/drawable-mdpi/btn_search_dialog_voice_default.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_search_dialog_voice_pressed.9.png b/core/res/res/drawable-mdpi/btn_search_dialog_voice_pressed.9.png
index 70a200b..a679426 100644
--- a/core/res/res/drawable-mdpi/btn_search_dialog_voice_pressed.9.png
+++ b/core/res/res/drawable-mdpi/btn_search_dialog_voice_pressed.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/btn_search_dialog_voice_selected.9.png b/core/res/res/drawable-mdpi/btn_search_dialog_voice_selected.9.png
index 6f2989f..eb95f22 100644
--- a/core/res/res/drawable-mdpi/btn_search_dialog_voice_selected.9.png
+++ b/core/res/res/drawable-mdpi/btn_search_dialog_voice_selected.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinnerbox_arrow_first.9.png b/core/res/res/drawable-mdpi/spinnerbox_arrow_first.9.png
deleted file mode 100644
index d8e268d..0000000
--- a/core/res/res/drawable-mdpi/spinnerbox_arrow_first.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinnerbox_arrow_last.9.png b/core/res/res/drawable-mdpi/spinnerbox_arrow_last.9.png
deleted file mode 100644
index 087e650..0000000
--- a/core/res/res/drawable-mdpi/spinnerbox_arrow_last.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinnerbox_arrow_middle.9.png b/core/res/res/drawable-mdpi/spinnerbox_arrow_middle.9.png
deleted file mode 100644
index f1f2ff5..0000000
--- a/core/res/res/drawable-mdpi/spinnerbox_arrow_middle.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable-mdpi/spinnerbox_arrow_single.9.png b/core/res/res/drawable-mdpi/spinnerbox_arrow_single.9.png
deleted file mode 100644
index f537b3b..0000000
--- a/core/res/res/drawable-mdpi/spinnerbox_arrow_single.9.png
+++ /dev/null
Binary files differ
diff --git a/core/res/res/drawable/btn_circle.xml b/core/res/res/drawable/btn_circle.xml
index 9208010..243f506 100644
--- a/core/res/res/drawable/btn_circle.xml
+++ b/core/res/res/drawable/btn_circle.xml
@@ -19,6 +19,8 @@
android:drawable="@drawable/btn_circle_normal" />
<item android:state_window_focused="false" android:state_enabled="false"
android:drawable="@drawable/btn_circle_disable" />
+ <item android:state_pressed="true" android:state_enabled="false"
+ android:drawable="@drawable/btn_circle_disable" />
<item android:state_pressed="true"
android:drawable="@drawable/btn_circle_pressed" />
<item android:state_focused="true" android:state_enabled="true"
diff --git a/core/res/res/drawable/btn_dropdown.xml b/core/res/res/drawable/btn_dropdown.xml
index 8ec8ece..34a0504 100644
--- a/core/res/res/drawable/btn_dropdown.xml
+++ b/core/res/res/drawable/btn_dropdown.xml
@@ -15,10 +15,24 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_window_focused="false" android:drawable="@drawable/btn_dropdown_normal" />
- <item android:state_pressed="true" android:drawable="@drawable/btn_dropdown_pressed" />
- <item android:state_focused="true" android:state_pressed="false"
+ <item
+ android:state_window_focused="false" android:state_enabled="true"
+ android:drawable="@drawable/btn_dropdown_normal" />
+ <item
+ android:state_window_focused="false" android:state_enabled="false"
+ android:drawable="@drawable/btn_dropdown_disabled" />
+ <item
+ android:state_pressed="true"
+ android:drawable="@drawable/btn_dropdown_pressed" />
+ <item
+ android:state_focused="true" android:state_enabled="true"
android:drawable="@drawable/btn_dropdown_selected" />
- <item android:drawable="@drawable/btn_dropdown_normal" />
+ <item
+ android:state_enabled="true"
+ android:drawable="@drawable/btn_dropdown_normal" />
+ <item
+ android:state_focused="true"
+ android:drawable="@drawable/btn_dropdown_disabled_focused" />
+ <item
+ android:drawable="@drawable/btn_dropdown_disabled" />
</selector>
-
diff --git a/core/res/res/drawable/spinnerbox_arrows.xml b/core/res/res/drawable/spinnerbox_arrows.xml
deleted file mode 100644
index 276a0f0..0000000
--- a/core/res/res/drawable/spinnerbox_arrows.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/res/drawable/spinnerbox_arrows.xml
-**
-** Copyright 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.
-*/
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_single="true" android:drawable="@drawable/spinnerbox_arrow_single" />
- <item android:state_first="true" android:drawable="@drawable/spinnerbox_arrow_first" />
- <item android:state_last="true" android:drawable="@drawable/spinnerbox_arrow_last" />
- <item android:state_middle="true" android:drawable="@drawable/spinnerbox_arrow_middle" />
- <item android:state_pressed="true" android:drawable="@drawable/spinnerbox_arrow_single" />
-</selector>
diff --git a/core/res/res/layout/alert_dialog.xml b/core/res/res/layout/alert_dialog.xml
index 7ae68f9..25a41f8 100644
--- a/core/res/res/layout/alert_dialog.xml
+++ b/core/res/res/layout/alert_dialog.xml
@@ -80,7 +80,8 @@
android:paddingTop="2dip"
android:paddingBottom="12dip"
android:paddingLeft="14dip"
- android:paddingRight="10dip">
+ android:paddingRight="10dip"
+ android:overscrollMode="ifContentScrolls">
<TextView android:id="@+id/message"
style="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
diff --git a/core/res/res/layout/google_web_content_helper_layout.xml b/core/res/res/layout/google_web_content_helper_layout.xml
deleted file mode 100644
index f16ffc9..0000000
--- a/core/res/res/layout/google_web_content_helper_layout.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?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.
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:foregroundGravity="center"
- android:measureAllChildren="false">
-
- <LinearLayout android:id="@+id/progressContainer"
- android:orientation="horizontal"
- android:layout_gravity="center"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:baselineAligned="false"
- android:paddingLeft="8dip"
- android:paddingTop="10dip"
- android:paddingRight="8dip"
- android:paddingBottom="10dip">
-
- <ProgressBar android:id="@android:id/progress"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:max="10000"
- android:layout_marginRight="12dip" />
-
- <TextView android:id="@+id/message"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical" />
- </LinearLayout>
-
- <WebView
- android:id="@+id/web"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="invisible"
- />
-
- <TextView
- android:id="@+id/text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:visibility="gone"
- android:padding="10dip"
- />
-
-</FrameLayout>
diff --git a/core/res/res/layout/search_bar.xml b/core/res/res/layout/search_bar.xml
index cf246ba..7935e2a 100644
--- a/core/res/res/layout/search_bar.xml
+++ b/core/res/res/layout/search_bar.xml
@@ -34,7 +34,7 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="12dip"
- android:paddingRight="12dip"
+ android:paddingRight="6dip"
android:paddingTop="7dip"
android:paddingBottom="16dip"
android:background="@drawable/search_plate_global" >
@@ -95,7 +95,10 @@
android:id="@+id/search_voice_btn"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:layout_marginLeft="8dip"
+ android:layout_marginLeft="0dip"
+ android:layout_marginTop="-6.5dip"
+ android:layout_marginBottom="-7dip"
+ android:layout_marginRight="-5dip"
android:background="@drawable/btn_search_dialog_voice"
android:src="@android:drawable/ic_btn_speak_now"
/>
diff --git a/core/res/res/layout/status_bar_expanded.xml b/core/res/res/layout/status_bar_expanded.xml
index a0cd11d..30138a7 100644
--- a/core/res/res/layout/status_bar_expanded.xml
+++ b/core/res/res/layout/status_bar_expanded.xml
@@ -20,9 +20,9 @@
<com.android.server.status.ExpandedView xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
- android:background="@drawable/status_bar_background"
android:focusable="true"
- android:descendantFocusability="afterDescendants">
+ android:descendantFocusability="afterDescendants"
+ >
<LinearLayout
android:layout_width="match_parent"
@@ -79,19 +79,18 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_weight="1"
>
<ScrollView
android:id="@+id/scroll"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
+ android:layout_height="match_parent"
android:fadingEdge="none"
>
<com.android.server.status.NotificationLinearLayout
android:id="@+id/notificationLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
android:orientation="vertical"
>
@@ -136,7 +135,7 @@
<ImageView
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:src="@drawable/title_bar_shadow"
android:scaleType="fitXY"
/>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 22cdd2c..16facee 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"aktivovat režim V autě"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Umožňuje aplikaci aktivovat režim V autě."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"ukončit procesy na pozadí"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Umožňuje aplikaci ukončit procesy jiných aplikací běžící na pozadí i v případě, kdy je dostatek paměti."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"vynutit zastavení jiných aplikací"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Umožňuje aplikaci vynutit zastavení jiných aplikací."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Umožňuje změnu shromážděných statistických údajů o baterii. Není určeno pro běžné aplikace."</string>
<string name="permlab_backup" msgid="470013022865453920">"ovládání zálohování a obnovy systému"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Umožňuje aplikaci ovládat systémový mechanizmus pro zálohování a obnovu dat. Není určeno pro běžné aplikace."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"zálohování a obnovení dat aplikace"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Umožňuje aplikaci podílet se na systémovém mechanizmu zálohování a obnovení."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"zobrazení nepovolených oken"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Umožňuje vytvoření oken, která mají být použita interním systémem uživatelského rozhraní. Běžné aplikace toto nastavení nepoužívají."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"zobrazení upozornění systémové úrovně"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Umožňuje držiteli vázat se na nejvyšší úroveň rozhraní pro zadávání dat. Běžné aplikace by toto nastavení nikdy neměly využívat."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"vazba na tapetu"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Umožňuje držiteli navázat se na nejvyšší úroveň rozhraní tapety. Běžné aplikace by toto oprávnění nikdy neměly potřebovat."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"komunikovat se správcem zařízení"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Umožňuje držiteli oprávnění odesílat informace správci zařízení. Běžné aplikace by toto oprávnění nikdy neměly požadovat."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"změna orientace obrazovky"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Umožňuje aplikaci kdykoli změnit orientaci obrazovky. Běžné aplikace by toto nastavení nikdy neměly využívat."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"odeslání signálů Linux aplikacím"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Umožňuje aplikaci nainstalovat nové či aktualizované balíčky systému Android. Škodlivé aplikace mohou pomocí tohoto nastavení přidat nové aplikace s libovolnými oprávněními."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"smazání všech dat v mezipaměti aplikace"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Umožňuje aplikaci uvolnit paměť telefonu smazáním souborů v adresáři mezipaměti aplikace. Přístup je velmi omezený, většinou pouze pro systémové procesy."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"čtení systémových souborů protokolu"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Umožňuje aplikaci číst různé systémové soubory protokolů. Toto nastavení aplikaci umožní získat obecné informace o činnostech s telefonem, ale neměly by obsahovat žádné osobní či soukromé informace."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"čtení nebo zápis do prostředků funkce diag"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Umožňuje aplikaci změnit informace o vlastníkovi telefonu uložené v telefonu. Škodlivé aplikace mohou pomocí tohoto nastavení vymazat či pozměnit informace o vlastníkovi."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"čtení informací o vlastníkovi"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Umožňuje aplikaci číst informace o vlastníkovi telefonu uložená v telefonu. Škodlivé aplikace mohou pomocí tohoto nastavení načíst informace o vlastníkovi."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"čtení dat kalendáře"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Umožňuje aplikaci načíst všechny události kalendáře uložené ve vašem telefonu. Škodlivé aplikace poté mohou dalším lidem odeslat události z vašeho kalendáře."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"zápis dat kalendáře"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Umožňuje aplikaci změnit události kalendáře uložené v telefonu. Škodlivé aplikace mohou pomocí tohoto nastavení vymazat či pozměnit vaše data v kalendáři."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"simulace zdrojů polohy pro účely testování"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Vytváří simulované zdroje polohy pro účely testování. Škodlivé aplikace mohou pomocí tohoto nastavení změnit polohu či stav vrácený zdroji skutečné polohy, jako je např. jednotka GPS či poskytovatelé sítě."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"přístup k dalším příkazům poskytovatele polohy"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Umožňuje aplikaci připojit či odpojit souborové systémy ve vyměnitelných úložištích."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"formátovat externí úložiště"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Umožňuje aplikaci formátovat vyměnitelná úložiště."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"získat informace o zabezpečeném úložišti"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Umožňuje aplikaci získat informace o zabezpečeném úložišti."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"vytvořit zabezpečené úložiště"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Umožňuje aplikaci vytvořit zabezpečené úložiště."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"zničit zabezpečené úložiště"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Umožňuje aplikaci zničit zabezpečené úložiště."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"připojit nebo odpojit zabezpečené úložiště"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Umožňuje aplikaci připojit nebo odpojit zabezpečené úložiště."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"přejmenovat zabezpečené úložiště"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Umožňuje aplikaci přejmenovat zabezpečeného úložiště."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"ovládání vibrací"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Umožňuje aplikaci ovládat vibrace."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"ovládání kontrolky"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Umožňuje aplikaci nastavit nápovědu pro velikost tapety systému."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"obnovení továrního nastavení systému"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Umožňuje aplikaci kompletně obnovit systém do továrního nastavení a vymazat všechna data, konfiguraci a nainstalované aplikace."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"nastavit čas"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Umožňuje aplikaci změnit čas hodin v telefonu."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"nastavení časového pásma"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Umožňuje aplikaci změnit časové pásmo telefonu."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"role služby AccountManagerService"</string>
@@ -364,7 +381,9 @@
<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>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"změna připojení k síti"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Umožňuje aplikaci změnit stav připojení k síti."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Umožňuje aplikaci změnit stav připojení k síti."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"změnit sdílené datové připojení"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Umožňuje aplikaci změnit stav sdíleného datového připojení k síti."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"změnit nastavení použití dat na pozadí"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Umožňuje aplikaci změnit nastavení použití dat na pozadí."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"zobrazení stavu WiFi"</string>
@@ -395,10 +414,18 @@
<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í 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 name="permlab_cache_filesystem" msgid="5656487264819669824">"přistupovat do souborového systému mezipaměti"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Umožňuje aplikaci číst a zapisovat do souborového systému mezipaměti."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Omezení hesla"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Omezuje typ hesel, která lze použít."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Sledování pokusů o přihlášení"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Sleduje nezdařené pokusy o přihlášení do zařízení a umožňuje provedení určité akce."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Obnovení hesla"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Vynutí nastavení hesla na novou hodnotu, kterou vám před přihlášením musí sdělit správce."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Vynucení uzamčení"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Určuje, kdy dojde k uzamčení zařízení a bude požadováno opětovné zadání hesla."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Vymazání všech dat"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Bez dalšího potvrzení obnoví výchozí nastavení z výroby a smaže všechna data."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Domů"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Zadejte heslo pro odblokování"</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Číslo tísňové linky"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Telefon odemknete stisknutím tlačítka Menu."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Odblokujte pomocí gesta"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Tísňové volání"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Správně!"</string>
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"Alt"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Umožní aplikaci změnit historii či záložky prohlížeče uložené v telefonu. Škodlivé aplikace mohou pomocí tohoto nastavení vymazat či pozměnit data Prohlížeče."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Změnit oprávnění prohlížeče poskytovat informace o zeměpisné poloze"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Umožňuje aplikaci změnit oprávnění prohlížeče poskytovat informace o zeměpisné poloze. Škodlivé aplikace mohou toto nastavení použít k odesílání informací o umístění na libovolné webové stránky."</string>
<string name="save_password_message" msgid="767344687139195790">"Chcete, aby si prohlížeč zapamatoval toto heslo?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Nyní ne"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Zapamatovat"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"před 1 hodinou"</item>
<item quantity="other" msgid="2467273239587587569">"před <xliff:g id="COUNT">%d</xliff:g> hod."</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"včera"</item>
<item quantity="other" msgid="2479586466153314633">"před <xliff:g id="COUNT">%d</xliff:g> dny"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"Nejsou vyžadována žádná oprávnění"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Skrýt"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Zobrazit vše"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Načítání..."</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"Úložiště USB"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB připojeno"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Připojili jste svůj telefon k počítači pomocí USB. Vyberte možnost Připojit, chcete-li zkopírovat soubory mezi vaším počítačem a kartou SD v telefonu."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Připojit"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Nepřipojovat"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Připojili jste svůj telefon k počítači pomocí USB. Chcete-li kopírovat soubory z počítače na kartu SD v zařízení Android či obráceně, vyberte následující tlačítko."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Zapnout úložiště USB"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Při používání vaší karty SD jako úložiště USB došlo k problému."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB připojeno"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Vyberte, chcete-li kopírovat soubory do nebo z počítače."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Vypnout úložiště USB"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Vyberte, chcete-li vypnout úložiště USB."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"Vypnout úložiště USB"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Před vypnutím úložiště USB se přesvědčte, zda byl hostitel USB odpojen. Úložiště USB vypnete volbou Vypnout."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Vypnout"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Zrušit"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Při vypínání úložiště USB došlo k problémům. Zkontrolujte, zda byl hostitel USB odpojen, a zkuste to znovu."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"Úložiště USB je používáno"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Před vypnutím úložiště USB zkontrolujte, zda jste odpojili (vyjmuli) kartu SD zařízení Android z počítače."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Vypnout úložiště USB"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Při vypínání úložiště USB došlo k problémům. Zkontrolujte, zda byl hostitel USB odpojen, a zkuste to znovu."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"Formátovat kartu SD"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Nebyly nalezeny žádné odpovídající aktivity."</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"aktualizovat statistiku použití součástí"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Umožňuje změnu shromážděných statistických údajů o použití součástí. Není určeno pro běžné aplikace."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Umožňuje volat výchozí službu kontejneru ke zkopírování obsahu. Běžné aplikace by toto oprávnění neměly používat."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Umožňuje volat výchozí službu kontejneru ke zkopírování obsahu. Běžné aplikace by toto oprávnění neměly používat."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Poklepáním můžete ovládat přiblížení"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Chyba při spouštění widgetu"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Přejít"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Následující aplikace požadují oprávnění k přístupu do vašeho účtu (nyní i v budoucnu)."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Chcete tento požadavek povolit?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Požadavek na přístup"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Zvolit soubor"</string>
+ <string name="reset" msgid="2448168080964209908">"Resetovat"</string>
+ <string name="submit" msgid="1602335572089911941">"Odeslat"</string>
+ <string name="description_star" msgid="2654319874908576133">"oblíbené"</string>
+ <string name="tether_title" msgid="6970447107301643248">"Sdílené datové připojení prostřednictvím portu USB je k dispozici"</string>
+ <string name="tether_message" msgid="554549994538298101">"Chcete-li sdílet datové připojení telefonu s počítačem, vyberte možnost Sdílet datové připojení."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Sdílet datové připojení"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Zrušit"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Při sdílení datového připojení došlo k chybě."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"Sdílené datové připojení prostřednictvím portu USB je k dispozici"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Tuto možnost vyberte, chcete-li sdílet datové připojení telefonu s počítačem."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Zrušit sdílení datového připojení"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Výběrem této možnost zrušíte sdílení datového připojení s počítačem."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Odpojit sdílené datové připojení"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Mobilní datové připojení telefonu je sdíleno s počítačem. Chcete-li sdílení prostřednictvím portu USB zrušit, vyberte možnost Odpojit."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Odpojit"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Zrušit"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Při ukončování sdíleného datového připojení došlo k chybě. Zkuste to prosím znovu."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 4e49363..35ab012 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -185,14 +185,12 @@
<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_enableCarMode" msgid="5684504058192921098">"aktivere biltilstand"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Tillader et program at aktivere biltilstand."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"standse baggrundsprocesser"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Tillader et program at standse andre programmers baggrundsprocesser, selvom der ikke er mangel på hukommelse."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"tvangsstandse andre programmer"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Tillader, at et program tvangsstopper andre programmer."</string>
<string name="permlab_forceBack" msgid="1804196839880393631">"tving programmet til at lukke"</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>
@@ -217,8 +215,6 @@
<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, 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>
@@ -235,6 +231,8 @@
<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, 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_bindDeviceAdmin" msgid="8704986163711455010">"kommunikere med en enhedsadministrator"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Tillader brugeren at sende hensigter til en enhedsadministrator. Bør aldrig være nødvendigt for almindelige programmer."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"skift skærmretning"</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>
@@ -253,6 +251,10 @@
<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, at et program frigør plads på telefonen ved at slette filer i programmets cachemappe. Adgang er normalt meget begrænset til systemprocesser."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"læs systemlogfiler"</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>
@@ -279,10 +281,13 @@
<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, 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>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<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, at et program ændrer de kalenderbegivenheder, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre kalenderdata."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<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>
@@ -311,6 +316,16 @@
<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, at et program formaterer flytbart lager."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"hente oplysninger om sikkert lager"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Tillader programmet at få oplysninger om sikkert lager."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"opret sikkert lager"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Tillader programmet at oprette sikkert lager."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"ødelægge sikkert lager"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Tillader programmet at ødelægge sikkert lager."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"montere/demontere sikkert lager"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Tillader programmet at montere/demontere sikkert lager."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"omdøbe sikkert lager"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Tillader programmet at omdøbe sikkert 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>
@@ -345,6 +360,8 @@
<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, at et program nulstiller systemet fuldstændig til fabriksindstillingerne, sletter alle data, konfigurationer og installerede programmer."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"angive tid"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Tillader, at et program ændrer telefonens klokkeslæt."</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>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"skriv indstillinger for adgangspunktnavn"</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, at et program ændrer netværksforbindelsens tilstand."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Tillader, at et program ændrer netværksforbindelsens tilstand."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"skifte tethering-forbindelse"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Tillader, at et program ændrer tilstand for et bundet netværk."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"skift brugerindstilling 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>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"få adgang til cache-filsystemet"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Tillader, at et program læser og skriver til cache-filsystemet."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Begræns adgangskode"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Begræns de adgangskodetyper, du har tilladelse til at bruge."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Vis forsøg på at logge ind"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Overvåg mislykkede forsøg på at logge ind på enheden for at foretage en handling."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Nulstil adgangskode"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Tving din adgangskode til en ny værdi. Dette kræver, at administratoren giver den til dig, før du kan kogge ind."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Tvangslås"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Kontrol når enheden låses, så du skal indtaste adgangskoden igen."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Slet alle data"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Foretag en fabriksnulstilling, der sletter alle dine data uden bekræftelse."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Hjem"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Indtast adgangskode for at låse op"</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Nødnummer"</string>
@@ -504,6 +532,8 @@
<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 oplåsningsmønster"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Nødopkald"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<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, 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="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Skift browsertilladelser for geografisk placering"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Giver et program tilladelse til at ændre browserens tilladelser for geografisk placering. Skadelige programmer kan bruge dette til at tillade, at placeringsoplysninger sendes til vilkårlige websteder."</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>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"For 1 time siden"</item>
<item quantity="other" msgid="2467273239587587569">"For <xliff:g id="COUNT">%d</xliff:g> timer siden"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"i går"</item>
<item quantity="other" msgid="2479586466153314633">"For <xliff:g id="COUNT">%d</xliff:g> dage siden"</item>
@@ -739,21 +779,27 @@
<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_activity_title" msgid="2399289999608900443">"USB-masselagring"</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_message" msgid="4796759646167247178">"Du har forbundet din telefon til din computer via USB. Vælg knappen nedenfor, hvis du ønsker at kopiere filer mellem din computer og din Androids SD-kort."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Slå USB-lagringen til"</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 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 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="usb_storage_stop_title" msgid="660129851708775853">"USB-lager i brug"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Sørg for, at du har demonteret (\"udskubbet\") din Androids SD-kort fra computeren, før du slår USB-lagring fra."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Slå USB-lagring fra"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"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>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Der blev ikke fundet nogen matchende aktiviteter"</string>
<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="permlab_copyProtectedData" msgid="1660908117394854464">"Tillader kald af standardcontainertjeneste for at kopiere indhold. Ikke til brug for almindelige programmer."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Tillader kald af standardcontainertjeneste for at kopiere indhold. Ikke til brug for almindelige 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 widgetten"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Gå"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Følgende programmer anmoder om tilladelse til at få adgang til din konto nu og i fremtiden."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Vil du tillade denne anmodning?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Adgangsanmodning"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Vælg fil"</string>
+ <string name="reset" msgid="2448168080964209908">"Nulstil"</string>
+ <string name="submit" msgid="1602335572089911941">"Send"</string>
+ <string name="description_star" msgid="2654319874908576133">"favorit"</string>
+ <string name="tether_title" msgid="6970447107301643248">"USB-binding tilgængelig"</string>
+ <string name="tether_message" msgid="554549994538298101">"Vælg \"Tether\" hvis du vil dele telefonens dataforbindelse med computeren."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Bind"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Annuller"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Der er opstået et problem med tethering."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"USB-binding tilgængelig"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Vælg tehtering af computeren og telefonen."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Fjern tethering"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Vælg at fjerne tethering fra computeren."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Afbryd binding"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Du har delt telefonens mobildataforbindelse med computeren. Vælg \"Afbryd\" for at afbryde USB-tethering."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Afbryd"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Annuller"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Der opstod et problem med at slå bindingen fra. Prøv igen."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index a52e8bf..f332937 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -130,8 +130,8 @@
<string name="global_action_lock" msgid="2844945191792119712">"Bildschirmsperre"</string>
<string name="global_action_power_off" msgid="4471879440839879722">"Ausschalten"</string>
<string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"Lautlos"</string>
- <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Ton ist bereits AUS"</string>
- <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Ton ist momentan AN"</string>
+ <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Ton ist AUS"</string>
+ <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Ton ist AN"</string>
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Flugmodus"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Flugmodus ist AN"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Flugmodus ist AUS"</string>
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"Automodus aktivieren"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Ermöglicht einer Anwendung, den Automodus zu aktivieren."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"Hintergrundprozesse beenden"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Ermöglicht einer Anwendung, Hintergrundprozesse anderer Anwendungen auch bei ausreichendem Speicher zu beenden."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"Beenden anderer Anwendungen erzwingen"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Ermöglicht einer Anwendung, das Beenden anderer Anwendungen zu erzwingen."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Ermöglicht die Änderung von gesammelten Akku-Daten. Nicht für normale Anwendungen vorgesehen."</string>
<string name="permlab_backup" msgid="470013022865453920">"Systemsicherung und -wiederherstellung kontrollieren"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Der Anwendung wird die Steuerung des Sicherungs- und Wiederherstellungsmechanismus des Systems ermöglicht. Nicht für normale Anwendungen vorgesehen."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"Anwendungsdaten sichern und wiederherstellen"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Der Anwendung wird die Teilnahme am Sicherungs- und Wiederherstellungsmechanismus des Systems ermöglicht."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"nicht autorisierte Fenster anzeigen"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Ermöglicht die Erstellung von Fenstern, die von der Benutzeroberfläche des internen Systems verwendet werden. Nicht für normale Anwendungen geeignet."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"Warnungen auf Systemebene anzeigen"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Ermöglicht dem Halter, sich an die Oberfläche einer Eingabemethode auf oberster Ebene zu binden. Sollte nie für normale Anwendungen benötigt werden."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"An ein Hintergrundbild binden"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Ermöglicht dem Halter, sich an die Oberfläche einer Eingabemethode auf oberster Ebene zu binden. Sollte nie für normale Anwendungen benötigt werden."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"Interaktion mit einem Geräteadministrator"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Ermöglicht dem Halter, Intents an einen Geräteadministrator zu senden. Sollte nie für normale Anwendungen benötigt werden."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"Bildschirmausrichtung ändern"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Ermöglicht der Anwendung, die Bildschirmdrehung jederzeit zu ändern. Sollte nicht für normale Anwendungen benötigt werden."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"Linux-Signale an Anwendungen senden"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Ermöglicht einer Anwendung, neue oder aktualisierte Android-Pakete zu installieren. Schädliche Anwendungen können so neue Anwendungen mit beliebig umfangreichen Berechtigungen hinzufügen."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"Alle Cache-Daten der Anwendung löschen"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Ermöglicht einer Anwendung, Telefonspeicher durch das Löschen von Dateien im Cache-Verzeichnis der Anwendung freizugeben. Der Zugriff beschränkt sich in der Regel auf Systemprozesse."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"System-Protokolldateien lesen"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Ermöglicht einer Anwendung, die verschiedenen Protokolldateien des Systems zu lesen. So können allgemeine Informationen zu den auf Ihrem Telefon durchgeführten Aktionen eingesehen werden, diese sollten jedoch keine persönlichen oder geheimen Daten enthalten."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"Lese-/Schreibberechtigung für zu Diagnosegruppe gehörige Elemente"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Ermöglicht einer Anwendung, die auf Ihrem Telefon gespeicherten Eigentümerdaten zu ändern. Schädliche Anwendungen können so Eigentümerdaten löschen oder verändern."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"Eigentümerdaten lesen"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Ermöglicht einer Anwendung, die auf Ihrem Telefon gespeicherten Eigentümerdaten zu lesen. Schädliche Anwendungen können so Eigentümerdaten lesen."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"Kalenderdaten lesen"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Ermöglicht einer Anwendung, alle auf Ihrem Telefon gespeicherten Kalenderereignisse zu lesen. Schädliche Anwendungen können so Ihre Kalenderereignisse an andere Personen senden."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"Kalenderdaten schreiben"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Ermöglicht einer Anwendung, die auf Ihrem Telefon gespeicherten Kalenderereignisse zu ändern. Schädliche Anwendungen können so Ihre Kalenderdaten löschen oder verändern."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"Falsche Standortquellen für Testzwecke"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Erstellt falsche Standortquellen für Testzwecke. Schädliche Anwendungen können so den von den echten Standortquellen wie GPS oder Netzwerkanbieter zurückgegebenen Standort und/oder Status überschreiben."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"Auf zusätzliche Dienstanbieterbefehle für Standort zugreifen"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Ermöglicht der Anwendung, Dateisysteme für austauschbare Speicherplätze bereitzustellen oder die Bereitstellung aufzuheben."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"Externen Speicher formatieren"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Erlaubt der Anwendung, austauschbaren Speicher zu formatieren."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"Informationen zum sicheren Speicher abrufen"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Ermöglicht der Anwendung, Informationen zum sicheren Speicher abzurufen."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"Sicheren Speicher erstellen"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Ermöglicht der Anwendung, einen sicheren Speicher zu erstellen."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"Sicheren Speicher entfernen"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Ermöglicht der Anwendung, den sicheren Speicher zu entfernen."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"Sicheren Speicher bereitstellen/trennen"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Ermöglicht der Anwendung, sicheren Speicher bereitzustellen bzw. zu trennen."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"Sicheren Speicher umbenennen"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Ermöglicht der Anwendung, den sicheren Speicher umzubenennen."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"Vibrationsalarm steuern"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Ermöglicht der Anwendung, den Vibrationsalarm zu steuern."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"Lichtanzeige steuern"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Ermöglicht der Anwendung, die Größenhinweise für das Hintergrundbild festzulegen."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"System auf Werkseinstellung zurücksetzen"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Ermöglicht einer Anwendung, das System komplett auf Werkseinstellung zurückzusetzen. Hierbei werden alle Daten, Konfigurationen und installierten Anwendungen gelöscht."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"Zeit einstellen"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Ermöglicht einer Anwendung, die Uhrzeit des Telefons zu ändern."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"Zeitzone festlegen"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Ermöglicht einer Anwendung, die Zeitzone des Telefons zu ändern."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"Als Konto-Manager fungieren"</string>
@@ -364,7 +381,9 @@
<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>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"Netzwerkkonnektivität ändern"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Ermöglicht einer Anwendung, den Status der Netzwerkkonnektivität zu ändern."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Ermöglicht einer Anwendung, den Status der Netzwerkkonnektivität zu ändern."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"Tethering-Konnektivität ändern"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Ermöglicht einer Anwendung, den Status der Tethering-Konnektivität zu ändern."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"Einstellung zur Verwendung von Hintergrunddaten ändern"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Ermöglicht einer Anwendung, die Einstellung der Verwendung von Hintergrunddaten zu ändern."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"WLAN-Status anzeigen"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"Zugriff auf das Cache-Dateisystem"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Gewährt einer Anwendung Lese- und Schreibzugriff auf das Cache-Dateisystem."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Passwort beschränken"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Beschränken der erlaubten Passworttypen"</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Anmeldeversuche überwachen"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Fehlgeschlagene Versuche·zum Anmelden/Durchführen einer Aktion überwachen"</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Passwort zurücksetzen"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Festlegen eines neuen Werts für Ihr Passwort, sodass der Administrator es Ihnen vor dem Anmelden übermitteln muss."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Sperren erzwingen"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Steuerung der Gerätesperre; erfordert die erneute Passworteingabe"</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Alle Daten löschen"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Zurücksetzen auf die Werkseinstellungen. Dabei werden alle Ihre Daten ohne Nachfrage gelöscht."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Privat"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Passwort zum Entsperren 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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Notrufnummer"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Zum Entsperren die Menütaste drücken"</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Schema für Entsperrung zeichnen"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Notruf"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Korrekt!"</string>
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Ermöglicht einer Anwendung, den auf Ihrem Telefon gespeicherten Browserverlauf und die Lesezeichen zu ändern. Schädliche Anwendungen können so Ihre Browserdaten löschen oder ändern."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Geolokalisierungsberechtigungen des Browsers ändern"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Ermöglicht einer Anwendung, die Geolokalisierungsberechtigungen des Browsers zu ändern. Schädliche Anwendungen können dies nutzen, um das Senden von Standortinformationen an willkürliche Websites zuzulassen."</string>
<string name="save_password_message" msgid="767344687139195790">"Möchten Sie, dass der Browser dieses Passwort speichert?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Nicht jetzt"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Speichern"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"Vor 1 Stunde"</item>
<item quantity="other" msgid="2467273239587587569">"Vor <xliff:g id="COUNT">%d</xliff:g> Stunden"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"Gestern"</item>
<item quantity="other" msgid="2479586466153314633">"Vor <xliff:g id="COUNT">%d</xliff:g> Tagen"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"Keine Berechtigungen erforderlich"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ausblenden"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Alle anzeigen"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Ladevorgang läuft..."</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"USB-Massenspeicher"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB-Verbindung"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Sie haben Ihr Telefon über einen USB-Anschluss mit Ihrem Computer verbunden. Wählen Sie \"Bereitstellen\", wenn Sie Dateien auf Ihren Computer oder die SD-Karte Ihres Telefons kopieren möchten."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Bereitstellen"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Nicht bereitstellen"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Sie haben Ihr Telefon über USB mit Ihrem Computer verbunden. Wählen Sie die Schaltfläche unten aus, wenn Sie Dateien auf Ihren Computer oder die SD-Karte Ihres Android-Geräts kopieren möchten."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"USB-Speicher aktivieren"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Bei der Verwendung Ihrer SD-Karte als USB-Speicher ist ein Problem aufgetreten."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB-Verbindung"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Wählen Sie die Dateien aus, die von Ihrem oder auf Ihren Computer kopiert werden sollen."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"USB-Speicher deaktivieren"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Auswählen, um USB-Speicher zu deaktivieren."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"USB-Speicher deaktivieren"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Bevor Sie den USB-Speicher deaktivieren, stellen Sie sicher, dass Sie Ihn vom USB-Host getrennt haben. Wählen Sie \"Deaktivieren\", um den USB-Speicher zu deaktivieren."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Ausschalten"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Abbrechen"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Beim Deaktivieren des USB-Speichers wurde ein Problem festgestellt. Überprüfen Sie, ob Sie den USB-Host getrennt haben, und versuchen Sie es erneut."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"USB-Speicher in Verwendung"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Stellen Sie vor dem Deaktivieren des USB-Speichers sicher, dass Sie Ihre Android-SD-Karte von Ihrem Computer getrennt (\"ausgeworfen\") haben."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"USB-Speicher deaktivieren"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Beim Deaktivieren des USB-Speichers ist ein Problem aufgetreten. Überprüfen Sie, ob Sie den USB-Host getrennt haben, und versuchen Sie es erneut."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"SD-Karte formatieren"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Keine passenden Aktivitäten gefunden"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"Nutzungsstatistik der Komponente aktualisieren"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Ermöglicht die Änderung von gesammelten Nutzungsstatistiken der Komponente. Nicht für normale Anwendungen vorgesehen."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Ermöglicht das Aufrufen des Standard-Containerdienstes zum Kopieren von Inhalt. Keine Verwendung bei normalen Anwendungen."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Ermöglicht das Aufrufen des Standard-Containerdienstes zum Kopieren von Inhalt. Keine Verwendung bei normalen Anwendungen."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Für Zoomeinstellung zweimal berühren"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Fehler beim Vergrößern des Widgets"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Los"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Die folgenden Anwendungen benötigen die Berechtigung zum aktuellen und zukünftigen Zugriff auf Ihr Konto."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Möchten Sie diese Anfrage zulassen?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Zugriffsanfrage"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Datei auswählen"</string>
+ <string name="reset" msgid="2448168080964209908">"Zurücksetzen"</string>
+ <string name="submit" msgid="1602335572089911941">"Senden"</string>
+ <string name="description_star" msgid="2654319874908576133">"Favorit"</string>
+ <string name="tether_title" msgid="6970447107301643248">"USB-Tethering verfügbar"</string>
+ <string name="tether_message" msgid="554549994538298101">"Wählen Sie \"Tethering\" aus, wenn Sie die Datenverbindung Ihres Telefons für Ihren Computer freigeben möchten."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Tethering"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Abbrechen"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Beim Tethering ist ein Problem aufgetreten."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"USB-Tethering verfügbar"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Auswählen, um Ihren Computer per Tethering an Ihr Telefon anzubinden"</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Tethering beenden"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Auswählen, um das Tethering mit Ihrem Computer zu beenden"</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Tethering-Verbindung trennen"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Sie haben die mobile Datenverbindung Ihres Telefons für Ihren Computer freigegeben. Wählen Sie \"Verbindung trennen\", um das USB-Tethering zu beenden."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Verbindung trennen"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Abbrechen"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Beim Beenden des Tetherings ist ein Problem aufgetreten. Bitte versuchen Sie es erneut."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index a55dded..8413224 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -185,14 +185,12 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Επιτρέπει σε μια εφαρμογή να ενεργοποιήσει τον εντοπισμό σφαλμάτων για μια άλλη εφαρμογή. Κακόβουλες εφαρμογές μπορούν να το χρησιμοποιήσουν για να τερματίσουν άλλες εφαρμογές."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"αλλαγή των ρυθμίσεων του UI"</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_enableCarMode" msgid="5684504058192921098">"ενεργοποίηση λειτουργίας αυτοκινήτου"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Επιτρέπει σε μια εφαρμογή την ενεργοποίηση της λειτουργίας αυτοκινήτου."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"τερματισμός διεργασιών παρασκηνίου"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Επιτρέπει σε μια εφαρμογή τον τερματισμό των διεργασιών παρασκηνίου άλλων εφαρμογών, ακόμα και αν η μνήμη είναι επαρκής."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"επιβολή διακοπής άλλων εφαρμογών"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Επιτρέπει σε μια εφαρμογή να πραγματοποιεί αναγκαστική διακοπή άλλων εφαρμογών."</string>
<string name="permlab_forceBack" msgid="1804196839880393631">"αναγκαστικός τερματισμός εφαρμογής"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Επιτρέπει σε μια εφαρμογή να εξαναγκάσει οποιαδήποτε δραστηριότητα που βρίσκεται στο προσκήνιο να κλείσει και να μεταβεί στο φόντο. Δεν είναι απαραίτητο για κανονικές εφαρμογές."</string>
<string name="permlab_dump" msgid="1681799862438954752">"ανάκτηση εσωτερικής κατάστασης συστήματος"</string>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Επιτρέπει την τροποποίηση στατιστικών μπαταρίας που έχουν συλλεχθεί. Δεν πρέπει να χρησιμοποιείται από συνήθεις εφαρμογές."</string>
<string name="permlab_backup" msgid="470013022865453920">"αντίγραφο ασφαλείας και επαναφορά συστήματος"</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="permlab_systemAlertWindow" msgid="3372321942941168324">"εμφάνιση ειδοποιήσεων επιπέδου συστήματος"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Επιτρέπει στον κάτοχο τη δέσμευση στη διεπαφή ανωτάτου επιπέδου μιας μεθόδου εισόδου. Δεν είναι απαραίτητο για συνήθεις εφαρμογές."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"δέσμευση σε ταπετσαρία"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Επιτρέπει στον κάτοχο τη δέσμευση στη διεπαφή ανωτάτου επιπέδου μιας ταπετσαρίας. Δεν είναι απαραίτητο για συνήθεις εφαρμογές."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"επικοινωνία με έναν διαχειριστή συσκευής"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Επιτρέπει στον κάτοχο την αποστολή στόχων σε έναν διαχειριστή συσκευής. Δεν θα χρειαστεί ποτέ για κανονικές εφαρμογές."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"αλλαγή προσανατολισμού οθόνης"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Επιτρέπει σε μια εφαρμογή την αλλαγή της περιστροφής της οθόνης οποιαδήποτε στιγμή. Δεν είναι απαραίτητο για κανονικές εφαρμογές."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"αποστολή σημάτων Linux σε εφαρμογές"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Επιτρέπει σε μια εφαρμογή την εγκατάσταση νέων ή ενημερωμένων πακέτων Android. Κακόβουλες εφαρμογές μπορούν να το χρησιμοποιήσουν για να προσθέσουν νέες εφαρμογές με πολλές αυθαίρετες άδειες."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"διαγραφή όλων των δεδομένων προσωρινής μνήμης εφαρμογής"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Επιτρέπει σε μια εφαρμογή να αυξήσει τον ελεύθερο χώρο αποθήκευσης του τηλεφώνου διαγράφοντας αρχεία από τον κατάλογο προσωρινής μνήμης της εφαρμογής. Η πρόσβαση είναι συνήθως πολύ περιορισμένη στη διαδικασία συστήματος."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"ανάγνωση αρχείων καταγραφής συστήματος"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Επιτρέπει σε μια εφαρμογή να αναγνώσει τα αρχεία καταγραφής του συστήματος. Έτσι μπορεί να ανακαλύψει γενικές πληροφορίες σχετικά με τις δραστηριότητές σας στο τηλέφωνο, όμως δεν θα πρέπει να περιέχουν προσωπικές ή ιδιωτικές πληροφορίες."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"ανάγνωση/εγγραφή σε πόρους που ανήκουν στο διαγνωστικό"</string>
@@ -279,10 +281,13 @@
<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>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Επιτρέπει σε μια εφαρμογή να αναγνώσει όλα τα συμβάντα ημερολογίου που είναι αποθηκευμένα στο τηλέφωνό σας. Κακόβουλες εφαρμογές μπορούν να το χρησιμοποιήσουν για να αποστείλουν συμβάντα ημερολογίου σε άλλους χρήστες."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"εγγραφή δεδομένων ημερολογίου"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Επιτρέπει σε μια εφαρμογή την τροποποίηση των συμβάντων ημερολογίου που είναι αποθηκευμένα στο τηλέφωνό σας. Κακόβουλες εφαρμογές μπορούν να το χρησιμοποιήσουν για να διαγράψουν ή για να τροποποιήσουν τα δεδομένα ημερολογίου σας."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"δημιουργία ψευδών πηγών τοποθεσίας για δοκιμή"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Δημιουργία εικονικών πηγών τοποθεσίας για δοκιμή. Κακόβουλες εφαρμογές μπορούν να το χρησιμοποιήσουν για να παρακάμψουν την τοποθεσία και/ή την κατάσταση που βρίσκουν πραγματικές πηγές τοποθεσίας, όπως πάροχοι GPS ή πάροχοι δικτύου."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"πρόσβαση σε επιπλέον εντολές παρόχου τοποθεσίας"</string>
@@ -311,6 +316,16 @@
<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_asec_access" msgid="1070364079249834666">"λήψη πληροφοριών στον ασφαλή χώρο αποθήκευσης"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Επιτρέπει στην εφαρμογή τη λήψη πληροφοριών στον ασφαλή χώρο αποθήκευσης."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"δημιουργία ασφαλούς χώρου αποθήκευσης"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Επιτρέπει στην εφαρμογή τη δημιουργία ασφαλούς χώρου αποθήκευσης."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"καταστροφή ασφαλούς χώρου αποθήκευσης"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Επιτρέπει στην εφαρμογή την καταστροφή του ασφαλούς χώρου αποθήκευσης."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"σύνδεση / αποσύνδεση ασφαλούς χώρου αποθήκευσης"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Επιτρέπει στην εφαρμογή τη σύνδεση / αποσύνδεση του ασφαλούς χώρου αποθήκευσης."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"μετονομασία ασφαλούς χώρου αποθήκευσης"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Επιτρέπει στην εφαρμογή τη μετονομασία του ασφαλούς χώρου αποθήκευσης."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"έλεγχος δόνησης"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Επιτρέπει στην εφαρμογή τον έλεγχο του δονητή."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"έλεγχος φακού"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Επιτρέπει στην εφαρμογή τον ορισμό συμβουλών μεγέθους ταπετσαρίας συστήματος."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"επαναφορά συστήματος στις εργοστασιακές προεπιλογές"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Επιτρέπει σε μια εφαρμογή να επαναφέρει πλήρως το σύστημα στις εργοστασιακές ρυθμίσεις, διαγράφοντας όλα τα δεδομένα, τις διαμορφώσεις και τις εγκατεστημένες εφαρμογές."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"ρύθμιση ώρας"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Επιτρέπει σε μια εφαρμογή την αλλαγή ώρας ρολογιού του τηλεφώνου."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"ορισμός ζώνης ώρας"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Επιτρέπει σε μια εφαρμογή την αλλαγή της ζώνης ώρας του τηλεφώνου."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"ενεργεί ως AccountManagerService"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"εγγραφή ρυθμίσεων Ονόματος σημείου πρόσβασης (APN)"</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="permdesc_changeNetworkState" msgid="4199958910396387075">"Επιτρέπει σε μια εφαρμογή την αλλαγή της κατάστασης συνδεσιμότητας δικτύου."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"αλλαγή συνδεσιμότητας μέσω σύνδεσης με κινητή συσκευή"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Επιτρέπει σε μια εφαρμογή την αλλαγή της κατάστασης συνδεσιμότητας δικτύου μέσω σύνδεσης με κινητή συσκευή."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"αλλαγή ρύθμισης της χρήσης δεδομένων στο παρασκήνιο"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Επιτρέπει σε μια εφαρμογή την αλλαγή της ρύθμισης χρήσης δεδομένων φόντου."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"προβολή κατάστασης Wi-Fi"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"πρόσβαση στο σύστημα αρχείων προσωρινής μνήμης"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Επιτρέπει σε μια εφαρμογή την ανάγνωση και την εγγραφή του συστήματος αρχείων προσωρινής μνήμης."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Περιορισμός επιλογών κωδικού πρόσβασης"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Περιορισμός των τύπων κωδικού πρόσβασης που επιτρέπεται να χρησιμοποιείτε."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Παρακολούθηση προσπαθειών σύνδεσης"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Παρακολούθηση αποτυχημένων προσπαθειών σύνδεσης με τη συσκευή, για την εκτέλεσης κάποιας ενέργειας."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Επαναφορά κωδικού πρόσβασης"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Εφαρμογή του κωδικού πρόσβασής σας σε μια νέα τιμή, με την προϋπόθεση ότι σας παρέχεται από τον διαχειριστή για να μπορείτε να συνδεθείτε."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Εφαρμογή κλειδώματος"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Ελέγχει πότε κλειδώνει η συσκευή, απαιτώντας κωδικό πρόσβασης για επανείσοδο."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Διαγραφή όλων των δεδομένων"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Πραγματοποιείται επαναφορά εργοστασιακών ρυθμίσεων, με τη διαγραφή όλων των δεδομένων σας χωρίς επιβεβαίωση."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Οικία"</item>
<item msgid="869923650527136615">"Κινητό"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Εισαγάγετε τον κωδικό πρόσβασης για ξεκλείδωμα"</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>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Πατήστε \"Μενού\" για ξεκλείδωμα."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Σχεδιασμός μοτίβου για ξεκλείδωμα"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Κλήση έκτακτης ανάγκης"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ΑΒΓ"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Επιτρέπει στην εφαρμογή την ανάγνωση όλων των διευθύνσεων URL που το πρόγραμμα περιήγησης έχει επισκεφθεί και όλων των σελιδοδεικτών του προγράμματος περιήγησης."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"εγγραφή ιστορικού και σελιδοδεικτών προγράμματος περιήγησης"</string>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Επιτρέπει σε μια εφαρμογή να τροποποιήσει το ιστορικό ή τους σελιδοδείκτες του προγράμματος περιήγησης που βρίσκονται αποθηκευμένα στο τηλέφωνό σας. Κακόβουλες εφαρμογές μπορούν να το χρησιμοποιήσουν για να διαγράψουν ή να τροποποιήσουν τα δεδομένα του προγράμματος περιήγησης."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Τροποποίηση δικαιωμάτων γεωγραφικής θέσης προγράμματος περιήγησης"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Επιτρέπει σε μια εφαρμογή την τροποποίηση των δικαιωμάτων γεωγραφικής θέσης του προγράμματος περιήγησης. Οι κακόβουλες εφαρμογές μπορούν να το χρησιμοποιήσουν για να επιτρέψουν την αποστολή στοιχείων τοποθεσίας σε αυθαίρετους ιστότοπους."</string>
<string name="save_password_message" msgid="767344687139195790">"Θέλετε το πρόγραμμα περιήγησης να διατηρήσει αυτόν τον κωδικό πρόσβασης;"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Να μην γίνει τώρα"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Διατήρηση"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"πριν από 1 ώρα"</item>
<item quantity="other" msgid="2467273239587587569">"πριν από <xliff:g id="COUNT">%d</xliff:g> ώρες"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"χθες"</item>
<item quantity="other" msgid="2479586466153314633">"πριν από <xliff:g id="COUNT">%d</xliff:g> ημέρες"</item>
@@ -739,21 +779,27 @@
<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>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"Μαζική αποθήκευση USB"</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="4796759646167247178">"Συνδέσατε το τηλέφωνό σας στον υπολογιστή μέσω USB. Επιλέξτε το παρακάτω κουμπί αν θέλετε να αντιγράψετε αρχεία μεταξύ του υπολογιστή και της κάρτας SD του Android."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Ενεργοποίηση αποθηκευτικού χώρου USB"</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_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>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Πριν από την απενεργοποίηση του αποθηκευτικού χώρου USB, βεβαιωθείτε ότι έχετε αποπροσαρτήσει την υποδοχή USB. Επιλέξτε \"Απενεργοποίηση\" για να απενεργοποιήσετε τον αποθηκευτικό χώρο USB."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Απενεργοποίηση"</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_title" msgid="660129851708775853">"Χώρος αποθήκευσης USB σε χρήση"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Προτού απενεργοποιήσετε το χώρο αποθήκευσης USB, βεβαιωθείτε ότι έχετε αποσυνδέσει (“αφαιρέσει”) την κάρτα SD του Android από τον υπολογιστή σας."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Απενεργοποίηση χώρου αποθήκευσης USB"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Παρουσιάστηκε πρόβλημα κατά την απενεργοποίηση του αποθηκευτικού χώρου USB. Βεβαιωθείτε ότι έχετε αφαιρέσει την υποδοχή USB και προσπαθήστε ξανά."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Δεν βρέθηκαν δραστηριότητες που να αντιστοιχούν"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"ενημέρωση στατιστικών χρήσης στοιχείου"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Επιτρέπει την τροποποίηση στατιστικών χρήσης στοιχείων που έχουν συλλεχθεί. Δεν πρέπει να χρησιμοποιείται από κανονικές εφαρμογές."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Επιτρέπει την κλήση της προεπιλεγμένης υπηρεσίας κοντέινερ για την αντιγραφή περιεχομένου. Δεν χρησιμοποιείται από κανονικές εφαρμογές."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Επιτρέπει την κλήση της προεπιλεγμένης υπηρεσίας κοντέινερ για την αντιγραφή περιεχομένου. Δεν χρησιμοποιείται από κανονικές εφαρμογές."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Πατήστε δύο φορές για έλεγχο εστίασης"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Σφάλμα αύξησης μεγέθους γραφικού στοιχείου"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Μετάβαση"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Από την εφαρμογή ή τις εφαρμογές που ακολουθούν ζητούνται δικαιώματα πρόσβασης στο λογαριασμό σας, τώρα και στο μέλλον."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Θέλετε να επιτρέψετε αυτή την αίτηση;"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Αίτημα πρόσβασης"</string>
<string name="allow" msgid="7225948811296386551">"Να επιτρέπεται"</string>
<string name="deny" msgid="2081879885755434506">"Άρνηση"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Απαιτείται άδεια"</string>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Επιλογή αρχείου"</string>
+ <string name="reset" msgid="2448168080964209908">"Επαναφορά"</string>
+ <string name="submit" msgid="1602335572089911941">"Υποβολή"</string>
+ <string name="description_star" msgid="2654319874908576133">"αγαπημένο"</string>
+ <string name="tether_title" msgid="6970447107301643248">"Διαθέσιμη σύνδεση μέσω κινητής συσκευής με USB"</string>
+ <string name="tether_message" msgid="554549994538298101">"Επιλέξτε \"Σύνδεση μέσω κινητής συσκευής\" αν θέλετε να κάνετε κοινή χρήση της σύνδεσης δεδομένων του τηλεφώνου σας με τον υπολογιστή σας."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Σύνδεση μέσω κινητής συσκευής"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Ακύρωση"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Υπάρχει πρόβλημα σύνδεσης μέσω κινητής συσκευής."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"Διαθέσιμη σύνδεση μέσω κινητής συσκευής με USB"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Συνδέστε τον υπολογιστή με το τηλέφωνό σας."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Κατάργηση σύνδεσης μέσω κινητής συσκευής"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Καταργήστε τη σύνδεση μέσω κινητής συσκευής του υπολογιστή σας."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Κατάργηση σύνδεσης μέσω κινητής συσκευής"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Κάνετε κοινή χρήση της σύνδεσης των δεδομένων του κινητού σας τηλεφώνου με τον υπολογιστή σας. Επιλέξτε \"Αποσύνδεση\" για να καταργήσετε τη σύνδεση μέσω κινητής συσκευής με USB."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Αποσύνδεση"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Ακύρωση"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Παρουσιάστηκε ένα πρόβλημα κατά την απενεργοποίηση της σύνδεσης μέσω κινητής συσκευής. Προσπαθήστε ξανά."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index b2aaa7d3..8a87fa1 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"habilitar el modo de auto"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Permite que una aplicación habilite el modo auto."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"eliminar los procesos de fondo"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Permite que una aplicación elimine los procesos de fondo de otras aplicaciones, aun si la memoria no es baja."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"provocar la detención de otras aplicaciones"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Permite que una aplicación provoque la detención de otras aplicaciones."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Admite la modificación de estadísticas recopiladas sobre la batería. Las aplicaciones normales no deben utilizarlo."</string>
<string name="permlab_backup" msgid="470013022865453920">"copia de seguridad y restauración del sistema de control"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Permite a la aplicación controlar el mecanismo de restauración y copia de seguridad de los sistemas. No es para uso de las aplicaciones normales."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"hacer una copia de seguridad y restaurar los datos de aplicación"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Permite a la aplicación participar en la copia de seguridad del sistema y restaurar el mecanismo."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"mostrar ventanas no autorizadas"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Permite la creación de ventanas que la interfaz interna del usuario del sistema pretenda utilizar. Las aplicaciones normales no deben utilizarlo."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"mostrar alertas a nivel del sistema"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permite al propietario vincularse a la interfaz de nivel superior de un método de entrada. Se debe evitar utilizarlo en aplicaciones normales."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"vincular a un fondo de pantalla"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permite al propietario vincularse a la interfaz de nivel superior de un fondo de pantalla. Se debe evitar utilizarlo en aplicaciones normales."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interactuar con un administrador de dispositivo"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite que el propietario envíe sus intentos a un administrador de dispositivos. No se necesita para las aplicaciones normales."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"cambiar la orientación de la pantalla"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Admite una aplicación que cambia la rotación de la pantalla en cualquier momento. Se debe evitar utilizarlo en aplicaciones normales."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"enviar señales de Linux a las aplicaciones"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Admite una aplicación que instala paquetes de Android nuevos o actualizados. Las aplicaciones maliciosas pueden utilizarlo para agregar aplicaciones nuevas con permisos arbitrariamente potentes."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"eliminar todos los datos de memoria caché de la aplicación"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Admite una aplicación que libera espacio de almacenamiento en el teléfono al eliminar archivos del directorio de memoria caché de la aplicación. En general, el acceso es muy restringido para el proceso del sistema."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"leer archivos de registro del sistema"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Admite una aplicación que lee diversos archivos de registro del sistema. Esto le permite descubrir información general sobre lo que haces con el teléfono, pero no debe contener información personal ni privada."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"leer y escribir a recursos dentro del grupo de diagnóstico"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Admite una aplicación que modifica los datos del propietario del teléfono guardados en tu teléfono. Las aplicaciones maliciosas pueden utilizarlo para borrar o modificar los datos del propietario."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"leer datos del propietario"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Admite una aplicación que lee los datos del propietario del teléfono guardados en tu teléfono. Las aplicaciones maliciosas pueden utilizarlo para leer los datos del propietario del teléfono."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"leer datos de calendario"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Admite que una aplicación lea todos los eventos de calendario almacenados en tu teléfono. Las aplicaciones maliciosas pueden utilizarlo para enviar tus eventos de calendario a otras personas."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"escribir datos de calendario"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Admite una aplicación que modifica los eventos de calendario guardados en tu teléfono. Las aplicaciones maliciosas pueden utilizarlo para borrar o modificar tus datos de calendario."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"crear fuentes de ubicación de prueba"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Crea fuentes de ubicación de prueba. Las aplicaciones maliciosas pueden utilizarlo para invalidar la ubicación o el estado que arrojen las fuentes de ubicación real, como GPS o proveedores de red."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"acceder a comandos adicionales del proveedor del lugar"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Admite que la aplicación monte y desmonte filesystems para obtener almacenamiento extraíble."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"espacio de almacenamiento externo del formato"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Admite que la aplicación formatee el espacio de almacenamiento extraíble."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"obtener información sobre el almacenamiento seguro"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Permite que una aplicación obtenga información en el almacenamiento seguro."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"crear almacenamiento seguro"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Permite que la aplicación cree un almacenamiento seguro."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"destruir el almacenamiento seguro"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Permite que una aplicación destruya el almacenamiento seguro."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"montar o desmontar almacenamiento seguro"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Permite que una aplicación monte o desmonte el almacenamiento seguro."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"cambie el nombre del almacenamiento seguro"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Permite que una aplicación cambie el nombre de un almacenamiento seguro."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"vibrador de control"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Admite que la aplicación controle el vibrador."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"controlar linterna"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Admite que la aplicación establezca las sugerencias de tamaño del papel tapiz del sistema."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"restablecer el sistema a las configuraciones predeterminadas de fábrica"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Admite una aplicación que restablece el sistema completamente con su configuración de fábrica, y borra todos los datos, las configuraciones y las aplicaciones instaladas."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"establecer la hora"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Permite a una aplicación cambiar la hora del teléfono."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"establecer zona horaria"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Admite una aplicación que cambia la zona horaria del teléfono."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"actuar como cuenta, administrador o servicio"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"escribir configuración del Nombre del punto de acceso"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Admite una aplicación que modifica la configuración de APN, como el proxy y el puerto de cualquier APN."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"cambiar la conectividad de la red"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Admite una aplicación que cambia la conectividad de red del estado."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Permite que una aplicación cambie el estado de la conectividad de red."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"cambiar la conectividad de anclaje a red"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Permite que una aplicación cambie el estado de la conectividad de red del anclaje."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"cambiar la configuración del uso de datos del fondo"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Admite una aplicación que cambia la configuración del uso de datos del fondo."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"ver el estado de Wi-Fi"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"Acceder al sistema de archivos caché"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Permite que una aplicación lea y escriba el sistema de archivos caché."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Limitar la contraseña"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Restringe los tipos de contraseñas que puedes utilizar."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Observar los intentos de acceso"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Intentos fallidos del control para acceder al dispositivo para realizar alguna acción."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Restablecer contraseña"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Forzar un nuevo valor para tu contraseña, el administrador deberá enviártelo antes de poder acceder."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Provocar el bloqueo"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Controlar cuando se bloquee el dispositivo, requiere que vuelvas a ingresar tu contraseña."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Borrar todos los datos"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Realizar un reestablecimiento de fábrica y borrar todos tus datos sin ninguna confirmación."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Página principal"</item>
<item msgid="869923650527136615">"Celular"</item>
@@ -495,6 +522,7 @@
<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">"Ingresar el código de PIN"</string>
+ <string name="keyguard_password_enter_password_code" msgid="9138158344813213754">"Ingresar la contraseña para desbloquear"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"¡Código de PIN incorrecto!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Para desbloquear, presiona el menú y luego 0."</string>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Número de emergencia"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Presionar Menú para desbloquear."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Extraer el patrón para desbloquear"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Llamada de emergencia"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Correcto"</string>
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Lo sentimos, vuelve a intentarlo"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Cargando (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Permite a la aplicación leer todas las URL que ha visitado el navegador y todos los marcadores del navegador."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"escribir historial y marcadores del navegador"</string>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Permite a una aplicación modificar el historial y los marcadores del navegador almacenados en tu teléfono. Las aplicaciones maliciosas pueden utilizarlo para borrar o modificar tus datos."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Modificar los permisos de ubicación geográfica del navegador"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Permite que una aplicación modifique los permisos de ubicación geográfica del navegador. Las aplicaciones maliciosas pueden utilizarlos para permitir el envío de información sobre la ubicación a sitos web de forma arbitraria."</string>
<string name="save_password_message" msgid="767344687139195790">"¿Quieres recordar esta contraseña en el navegador?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Ahora no."</string>
<string name="save_password_remember" msgid="6491879678996749466">"Recuerda"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"hace 1 hora"</item>
<item quantity="other" msgid="2467273239587587569">"hace <xliff:g id="COUNT">%d</xliff:g> horas"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"ayer"</item>
<item quantity="other" msgid="2479586466153314633">"hace <xliff:g id="COUNT">%d</xliff:g> días"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"No se requieren permisos"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ocultar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostrar todos"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Cargando…"</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"Almacenamiento masivo USB"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"conectado al USB"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Has conectado tu teléfono a tu computadora a través de USB. Selecciona \"Montar\" si deseas copiar archivos entre tu computadora y la tarjeta SD de tu teléfono."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Montar"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"No montar"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Has conectado tu teléfono a tu computadora mediante USB. Selecciona el botón a continuación si deseas copiar los archivos entre tu computadora y la tarjeta SD de Android."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Activar el almacenamiento USB"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Hay un problema para utilizar tu tarjeta SD en el almacenamiento USB."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"conectado al USB"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Seleccionar para copiar archivos desde o hacia tu computadora."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Apagar el almacenamiento USB"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Seleccionar para desactivar el almacenamiento USB."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"Apagar el almacenamiento USB"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Antes de desactivar el almacenamiento USB, asegúrate de haberlo desmontado en el servidor USB al seleccionar \"Desactivar\"."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Apagar"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Cancelar"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Se ha producido un problema al desactivar el almacenamiento USB. Verifica para asegurarte de haber desmontado el servidor USB, luego vuelve a intentarlo."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"Almacenamiento USB en uso"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Antes de desactivar el almacenamiento USB, asegúrate de haber desmontado (\"expulsado\") la tarjeta SD de Android de tu computadora."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Desactivar el almacenamiento USB"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Se ha producido un problema al desactivar el almacenamiento USB. Asegúrate de haber desmontado el host USB, luego vuelve a intentarlo."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"Formatear tarjeta SD"</string>
<string name="extmedia_format_message" msgid="3621369962433523619">"¿Estás seguro de que quieres formatear la tarjeta SD? Se perderán todos los datos de tu tarjeta."</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"Formato"</string>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"No se encontraron actividades coincidentes"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"actualizar la estadística de uso de los componentes"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Permite la modificación de estadísticas recopiladas sobre el uso de componentes. Las aplicaciones normales no deben utilizarlo."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Permite invocar el servicio de contenedor predeterminado para copiar el contenido. No se utiliza con las aplicaciones normales."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Permite invocar el servicio de contenedor predeterminado para copiar el contenido. No se utiliza con las aplicaciones normales."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Presiona dos veces para obtener el control del zoom"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Error al aumentar el control"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Ir"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Las siguientes aplicaciones requieren autorización para acceder a tu cuenta ahora y en el futuro."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"¿Deseas permitir esta solicitud?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Solicitud de acceso"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Elegir archivo"</string>
+ <string name="reset" msgid="2448168080964209908">"Restablecer"</string>
+ <string name="submit" msgid="1602335572089911941">"Enviar"</string>
+ <string name="description_star" msgid="2654319874908576133">"favorito"</string>
+ <string name="tether_title" msgid="6970447107301643248">"Anclaje a red USB disponible"</string>
+ <string name="tether_message" msgid="554549994538298101">"Selecciona \"Anclar a red\" si deseas compartir la conexión de datos de tu teléfono con tu computadora."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Anclaje de red"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Cancelar"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Existe un problema en el anclaje a red."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"Anclaje a red USB disponible"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Seleccionar el anclaje a red de tu computadora a tu teléfono"</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Desconectar el anclaje a red"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Seleccionar para desconectar de tu computadora del anclaje a red"</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Desconectar el anclaje a red"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Has estado compartiendo con tu computadora la conexión de datos del celular. Selecciona \"Desconectar\" para desconectar el anclaje a red USB."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Desconectar"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Cancelar"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Hemos encontrado un problema al desactivar el anclaje a red. Vuelve a intentarlo."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 032fbdc..441fd38 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"habilitar modo coche"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Permite que una aplicación habilite el modo coche."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"interrumpir procesos en segundo plano"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Permite interrumpir los procesos en segundo plano de otras aplicaciones, aunque no exista poco espacio en la memoria."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"forzar la detención de otras aplicaciones"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Permite que una aplicación detenga de forma forzosa otras aplicaciones."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Permite la modificación de estadísticas recopiladas sobre la batería. No está destinado al uso por parte de aplicaciones normales."</string>
<string name="permlab_backup" msgid="470013022865453920">"controlar las copias de seguridad y las restauraciones del sistema"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Permite que la aplicación controle el mecanismo de copia de seguridad y restauración del sistema. Este permiso no está destinado a aplicaciones normales."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"crear una copia de seguridad de los datos de la aplicación y restaurarlos"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Permite que la aplicación participe en el mecanismo de copia de seguridad y restauración del sistema."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"mostrar ventanas no autorizadas"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Permite la creación de ventanas destinadas al uso por parte de la interfaz de usuario interna del sistema. No está destinado al uso por parte de aplicaciones normales."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"mostrar alertas de nivel del sistema"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permite enlazar con la interfaz de nivel superior de un método de introducción de texto. No debe ser necesario para las aplicaciones normales."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"enlazar con un fondo de pantalla"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permite enlazar con la interfaz de nivel superior de un fondo de pantalla. No debe ser necesario para las aplicaciones normales."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interactuar con el administrador de un dispositivo"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite enviar intentos a un administrador de dispositivos. Este permiso nunca debería ser necesario para las aplicaciones normales."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"cambiar orientación de la pantalla"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Permite que una aplicación cambie la rotación de la pantalla en cualquier momento. No debería ser necesario nunca para las aplicaciones normales."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"enviar señales Linux a aplicaciones"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Permite que una aplicación instale paquetes Android nuevos o actualizados. Las aplicaciones malintencionadas pueden utilizar este permiso para añadir aplicaciones nuevas con permisos arbitrariamente potentes."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"eliminar todos los datos de caché de la aplicación"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Permite que una aplicación libere espacio de almacenamiento en el teléfono mediante la eliminación de archivos en el directorio de caché de la aplicación. El acceso al proceso del sistema suele estar muy restringido."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"leer archivos de registro del sistema"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Permite que una aplicación lea los distintos archivos de registro del sistema. Con este permiso, la aplicación puede ver información general sobre las acciones que realiza el usuario con el teléfono, pero los registros no deberían contener información personal o privada."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"leer/escribir en los recursos propiedad del grupo de diagnóstico"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Permite que una aplicación modifique los datos del propietario del teléfono almacenados en el teléfono. Las aplicaciones malintencionadas pueden utilizar este permiso para borrar o modificar los datos del propietario."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"leer datos del propietario"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Permite que una aplicación lea los datos del propietario del teléfono almacenados en el teléfono. Las aplicaciones malintencionadas pueden utilizar este permiso para leer los datos del propietario del teléfono."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"leer datos de calendario"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Permite que una aplicación lea todos los eventos de calendario almacenados en el teléfono. Las aplicaciones malintencionadas pueden utilizar este permiso para enviar tus eventos de calendario a otras personas."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"escribir datos de calendario"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Permite que una aplicación modifique los eventos de calendario almacenados en el teléfono. Las aplicaciones malintencionadas pueden utilizar este permiso para borrar o modificar tus datos de calendario."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"simular fuentes de ubicación para prueba"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"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."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"acceder a comandos de proveedor de ubicación adicional"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Permite que las aplicaciones activen y desactiven sistemas de archivos para un almacenamiento extraíble."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"formatear almacenamiento externo"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Permite a la aplicación formatear un almacenamiento extraíble."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"obtener información sobre el almacenamiento seguro"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Permite que la aplicación obtenga información sobre el almacenamiento seguro."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"crear almacenamiento seguro"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Permite que la aplicación cree un almacenamiento seguro."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"destruir almacenamiento seguro"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Permite que la aplicación destruya el almacenamiento seguro."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"montar/desmontar almacenamiento seguro"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Permite que la aplicación monte o desmonte el almacenamiento seguro."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"cambiar nombre de almacenamiento seguro"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Permite que la aplicación cambie el nombre del almacenamiento seguro."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"controlar vibración"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Permite que la aplicación controle la función de vibración."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"controlar linterna"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Permite que la aplicación establezca el tamaño del fondo de pantalla del sistema."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"restablecer el sistema a los valores predeterminados de fábrica"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Permite que una aplicación restablezca por completo el sistema a su configuración de fábrica, borrando todos los datos, la configuración y las aplicaciones instaladas."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"establecer hora"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Permite que una aplicación cambie la hora del reloj del teléfono."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"establecer zona horaria"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Permite que una aplicación cambie la zona horaria del teléfono."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"actuar como servicio de administrador de cuentas"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"escribir la configuración de nombre de punto de acceso"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Permite que una aplicación modifique los valores de configuración de un APN como, por ejemplo, el proxy y el puerto de cualquier APN."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"cambiar la conectividad de red"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Permite que una aplicación cambie la conectividad de red de estado."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Permite que una aplicación cambie el estado de la conectividad de red."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"cambiar conectividad de anclaje a red"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Permite que una aplicación cambie el estado de la conectividad de red de anclaje."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"cambiar configuración de uso de datos de referencia"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Permite a una aplicación cambiar la configuración de uso de los datos de referencia."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"ver estado de la conectividad Wi-Fi"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"acceder al sistema de archivos almacenado en caché"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Permite que una aplicación lea y escriba el sistema de archivos almacenado en caché."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Limitar opciones de contraseña"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Permite restringir los tipos de contraseñas que puede utilizar el usuario."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Controlar intentos de acceso"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Se ha producido un error al intentar controlar el acceso al dispositivo para realizar una acción."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Restablecer contraseña"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Permite forzar la contraseña para establecer un valor nuevo que el administrador deberá proporcionar al usuario para poder acceder."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Forzar bloqueo"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Permite controlar el momento de bloqueo del dispositivo solicitando al usuario que vuelva a introducir la contraseña."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Borrar todos los datos"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Permite realizar un restablecimiento de fábrica eliminando todos los datos sin confirmación."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Casa"</item>
<item msgid="869923650527136615">"Móvil"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Introducir contraseña para desbloquear"</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Número de emergencia"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Pulsa la tecla de menú para desbloquear la pantalla."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Dibujar patrón de desbloqueo"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Llamada de emergencia"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Correcto"</string>
<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>
@@ -513,7 +543,7 @@
<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>
<string name="lockscreen_missing_sim_instructions" msgid="8874620818937719067">"Inserta una tarjeta SIM."</string>
- <string name="emergency_calls_only" msgid="6733978304386365407">"Sólo llamadas de emergencia"</string>
+ <string name="emergency_calls_only" msgid="6733978304386365407">"Solo llamadas de emergencia"</string>
<string name="lockscreen_network_locked_message" msgid="143389224986028501">"Bloqueada para la red"</string>
<string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"La tarjeta SIM está bloqueada con el código PUK."</string>
<string name="lockscreen_sim_puk_locked_instructions" msgid="635967534992394321">"Consulta la guía del usuario o ponte en contacto con el servicio de atención al cliente."</string>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Permite que una aplicación modifique la información de los marcadores o del historial del navegador almacenada en el teléfono. Las aplicaciones malintencionadas pueden utilizar este permiso para borrar o modificar los datos del navegador."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Modificar los permisos de ubicación geográfica del navegador"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Permite que una aplicación modifique los permisos de ubicación geográfica del navegador. Las aplicaciones malintencionadas pueden utilizar este permiso para permitir el envío de información sobre la ubicación a sitios web arbitrarios."</string>
<string name="save_password_message" msgid="767344687139195790">"¿Deseas que el navegador recuerde esta contraseña?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Ahora no"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Recordar"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"Hace 1 hora"</item>
<item quantity="other" msgid="2467273239587587569">"Hace <xliff:g id="COUNT">%d</xliff:g> horas"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"ayer"</item>
<item quantity="other" msgid="2479586466153314633">"Hace <xliff:g id="COUNT">%d</xliff:g> días"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"No es necesario ningún permiso"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ocultar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostrar todos"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Cargando..."</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"Almacenamiento USB masivo"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"Conectado por USB"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Has conectado el teléfono al equipo mediante USB. Selecciona \"Activar\" si deseas copiar archivos entre el equipo y la tarjeta SD del teléfono."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Activar"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"No activar"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Has conectado el teléfono al equipo mediante USB. Selecciona el botón situado debajo si deseas copiar archivos entre el equipo y la tarjeta SD del teléfono con Android."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Activar almacenamiento USB"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Se ha producido un problema al intentar utilizar la tarjeta SD para el almacenamiento USB."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"Conectado por USB"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Para copiar archivos al/desde el equipo"</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Desactivar almacenamiento USB"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Seleccionar para desactivar USB."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"Desactivar almacenamiento USB"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Antes de desactivar el almacenamiento USB, asegúrate de haber desactivado el host USB. Selecciona \"Desactivar\" para desactivar el almacenamiento USB."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Desactivar"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Cancelar"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Se ha producido un problema al desactivar el almacenamiento USB. Asegúrate de que has desactivado el host USB e inténtalo de nuevo."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"El almacenamiento USB está en uso."</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Antes de desactivar el almacenamiento USB, asegúrate de haber desmontado (\"retirado\") la tarjeta SD del teléfono con Android del equipo."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Desactivar almacenamiento USB"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Se ha producido un problema al desactivar el almacenamiento USB. Asegúrate de haber desactivado el host USB y, a continuación, vuelve a intentarlo."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"Formatear tarjeta SD"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"No se ha encontrado ninguna actividad coincidente."</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"actualizar estadísticas de uso de componentes"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Permite la modificación de estadísticas recopiladas sobre el uso de componentes. No está destinado al uso por parte de aplicaciones normales."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Permite invocar el servicio de contenedor predeterminado para copiar contenido. Este permiso no está destinado al uso por parte de aplicaciones normales."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Permite invocar el servicio de contenedor predeterminado para copiar contenido. Este permiso no está destinado al uso por parte de aplicaciones normales."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Da dos toques para acceder al control de zoom."</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Error al aumentar el widget"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Ir"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Las siguientes aplicaciones solicitan permiso para acceder a tu cuenta ahora y en el futuro."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"¿Quieres permitir esta solicitud?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Solicitud de acceso"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Seleccionar archivo"</string>
+ <string name="reset" msgid="2448168080964209908">"Restablecer"</string>
+ <string name="submit" msgid="1602335572089911941">"Enviar"</string>
+ <string name="description_star" msgid="2654319874908576133">"favoritos"</string>
+ <string name="tether_title" msgid="6970447107301643248">"El anclaje de USB está disponible."</string>
+ <string name="tether_message" msgid="554549994538298101">"Selecciona \"Activar anclaje a red\" si quieres compartir la conexión de datos del teléfono con el equipo."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Activar anclaje a red"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Cancelar"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Se ha producido un problema al activar el anclaje a red."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"El anclaje de USB está disponible."</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Selecciona esta opción para activar el anclaje del equipo al teléfono."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Desactivar anclaje a red"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Selecciona esta opción para desactivar el anclaje del equipo."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Desactivar anclaje a red"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Has compartido la conexión de datos móviles con el equipo. Selecciona \"Desconectar\" para desactivar el anclaje de USB."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Desconectar"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Cancelar"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Se ha producido un problema al desactivar el anclaje a red. Vuelve a intentarlo."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 3679fd2..99c7ad8 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"activer le mode voiture"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Permet à une application d\'activer le mode voiture."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"arrêter les processus en arrière-plan"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Permet à une application d\'arrêter les processus en arrière-plan d\'autres d\'applications, même lorsqu\'il n\'y a pas de problème de mémoire."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"forcer l\'arrêt d\'autres applications"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Permet à une application de forcer l\'arrêt d\'autres applications."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Autoriser la modification des statistiques de la batterie. Les applications normales n\'utilisent pas cette fonctionnalité."</string>
<string name="permlab_backup" msgid="470013022865453920">"contrôler la sauvegarde et la restauration du système"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Autorise l\'application à contrôler le mécanisme de sauvegarde et de restauration du système. Ne pas utiliser pour les applications standard."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"sauvegarder et rétablir les données de l\'application"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Autorise l\'application à participer au mécanisme de sauvegarde et de restauration du système."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"Affichage de fenêtres non autorisées"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Permet de créer des fenêtres conçues pour l\'interface utilisateur du système interne. Les applications normales n\'utilisent pas cette fonctionnalité."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"Affichage d\'alertes système"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permet au support de se connecter à l\'interface de plus haut niveau d\'un mode de saisie. Les applications normales ne devraient jamais avoir recours à cette fonctionnalité."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"Se fixer sur un fond d\'écran"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permet au support de se fixer sur l\'interface de plus haut niveau d\'un fond d\'écran. Les applications normales ne devraient jamais avoir recours à cette fonctionnalité."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interagir avec l\'administrateur du périphérique"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permet à l\'application d\'envoyer des intentions à l\'administrateur du périphérique. Les applications standard ne devraient jamais avoir recours à cette fonctionnalité."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"Changement d\'orientation de l\'écran"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Permet à une application de modifier la rotation de l\'écran à tout moment. Les applications normales ne devraient jamais avoir recours à cette fonctionnalité."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"Envoi de signaux Linux aux applications"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Permet à une application d\'installer des nouveaux paquets de données ou des mises à jour Android. Des applications malveillantes peuvent utiliser cette fonctionnalité pour ajouter de nouvelles applications disposant d\'autorisations anormalement élevées."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"Suppression des données du cache de toutes les applications"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Permet à une application de libérer de l\'espace dans la mémoire du téléphone en supprimant des fichiers du répertoire du cache des applications. Cet accès est en général limité aux processus système."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"Lecture des fichiers journaux du système"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Permet à une application de lire les différents fichiers journaux du système afin d\'obtenir des informations générales sur la façon dont vous utilisez votre téléphone, sans pour autant récupérer des informations d\'ordre personnel ou privé."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"Lecture/écriture dans les ressources appartenant aux diagnostics"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Permet à une application de modifier les données du propriétaire du téléphone enregistrées sur votre appareil. Des applications malveillantes peuvent utiliser cette fonctionnalité pour effacer ou modifier ces données."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"Lecture des données du propriétaire"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Permet à une application de lire les données du propriétaire du téléphone enregistrées sur votre appareil. Des applications malveillantes peuvent utiliser cette fonctionnalité pour lire ces données."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"Lecture des données de l\'agenda"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<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>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<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>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Permet à l\'application de monter et démonter des systèmes de fichiers pour des périphériques de stockage amovibles."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"Formatage du périphérique de stockage externe"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Permet à l\'application de formater le périphérique de stockage amovible."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"obtenir des informations sur le stockage sécurisé"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Permet à l\'application d\'obtenir des informations sur le stockage sécurisé."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"créer un stockage sécurisé"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Permet à l\'application de créer un stockage sécurisé."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"détruire le stockage sécurisé"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Permet à l\'application de détruire le stockage sécurisé."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"monter/démonter le stockage sécurisé"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Permet à l\'application de monter/démonter le stockage sécurisé."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"renommer le stockage sécurisé"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Permet à l\'application de renommer le stockage sécurisé."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"Contrôle du vibreur"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Permet à l\'application de contrôler le vibreur."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"Contrôle de la lampe de poche"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Permet à une application de définir la taille du fond d\'écran."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"Réinitialisation du système à ses paramètres d\'usine"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Permet à une application de réinitialiser entièrement le système afin de rétablir ses valeurs d\'usine et d\'effacer toutes les données, configurations et applications installées."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"définir l\'heure"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Permet à une application de modifier l\'heure du téléphone."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"Sélection du fuseau horaire"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Permet à l\'application de modifier le fuseau horaire du téléphone."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"Agir en tant que service AccountManagerService"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"Écriture des paramètres \"Nom des points d\'accès\""</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Permet à une application de modifier les paramètres APN (Nom des points d\'accès), comme le proxy ou le port de tout APN."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"Modification de la connectivité du réseau"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Permet à une application de modifier la connectivité du réseau."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Permet à une application de modifier l\'état de la connectivité réseau."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"changer la connectivité du partage de connexion"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Permet à une application de modifier l\'état de la connectivité du partage de connexion."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"modifier le paramètre d\'utilisation des données en arrière-plan"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Permet à une application de modifier le paramètre d\'utilisation des données en arrière-plan."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"Affichage de l\'état du Wi-Fi"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"accéder au système de fichiers en cache"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Permet à une application de lire et d\'écrire dans le système de fichiers en cache."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Limiter le mot de passe"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Restreint les types de mots de passe que vous êtes autorisé à utiliser."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Surveiller les tentatives de connexion"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Surveille les échecs de connexion au périphérique pour effectuer une action."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Réinitialiser le mot de passe"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Force l\'utilisation d\'un nouveau mot de passe, qui doit vous être communiqué par l\'administrateur pour que vous puissiez vous connecter."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Forcer le verrouillage"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Contrôle le verrouillage du périphérique, avec obligation de saisir à nouveau le mot de passe."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Effacer toutes les données"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Rétablit les paramètres d\'usine, supprimant toutes vos données sans demande de confirmation."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Domicile"</item>
<item msgid="869923650527136615">"Portable"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Saisissez le mot de passe pour procéder au déverrouillage."</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Numéro d\'urgence"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Appuyez sur \"Menu\" pour déverrouiller le téléphone."</string>
<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>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Combinaison correcte !"</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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,9 +592,11 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Autorise une application à modifier l\'historique du navigateur ou les favoris enregistrés sur votre téléphone. Des applications malveillantes peuvent utiliser cette fonction pour effacer ou modifier les données de votre navigateur."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Modifier les autorisations de géolocalisation du navigateur"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Permet à une application de modifier les autorisations de géolocalisation du navigateur. Les applications malveillantes peuvent se servir de cette fonctionnalité pour envoyer des informations de lieu à des sites Web arbitraires."</string>
<string name="save_password_message" msgid="767344687139195790">"Voulez-vous que le navigateur se souvienne de ce mot de passe ?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Pas maintenant"</string>
- <string name="save_password_remember" msgid="6491879678996749466">"Se souvenir du mot de passe"</string>
+ <string name="save_password_remember" msgid="6491879678996749466">"Mémoriser"</string>
<string name="save_password_never" msgid="8274330296785855105">"Jamais"</string>
<string name="open_permission_deny" msgid="5661861460947222274">"Vous n\'êtes pas autorisé à ouvrir cette page."</string>
<string name="text_copied" msgid="4985729524670131385">"Le texte a été copié dans le presse-papier."</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"il y a 1 heure"</item>
<item quantity="other" msgid="2467273239587587569">"Il y a <xliff:g id="COUNT">%d</xliff:g> heures"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"hier"</item>
<item quantity="other" msgid="2479586466153314633">"Il y a <xliff:g id="COUNT">%d</xliff:g> jours"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"Aucune autorisation requise"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Masquer"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Tout afficher"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Chargement..."</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"Stockage de masse USB"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"Connecté à l\'aide d\'un câble USB"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Vous avez connecté votre téléphone à votre ordinateur à l\'aide d\'un câble USB. Sélectionnez Monter pour copier des fichiers de votre ordinateur vers votre carte SD, ou inversement."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Monter"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Ne pas monter"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Vous avez connecté votre téléphone à votre ordinateur à l\'aide d\'un câble USB. Sélectionnez le bouton ci-dessous pour copier des fichiers de votre ordinateur vers la carte SD de votre Android, ou inversement."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Activer le périphérique de stockage USB"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Un problème est survenu lors de l\'utilisation de votre carte SD en tant que périphérique de stockage USB."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"Connecté avec un câble USB"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Activez pour copier des fichiers vers/de votre ordinateur."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Éteindre le périphérique de stockage USB"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Sélectionner pour éteindre le périphérique de stockage USB"</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"Éteindre le périphérique de stockage USB"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Avant d\'éteindre le périphérique de stockage USB, assurez-vous d\'avoir désactivé l\'hôte USB. Sélectionnez \"Éteindre\" pour éteindre le périphérique de stockage USB."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Éteindre"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Annuler"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Un problème est survenu lors de la mise hors tension du périphérique de stockage USB. Assurez-vous que l\'hôte USB a bien été désactivé, puis essayez à nouveau."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"Stockage USB en cours d\'utilisation"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Avant de mettre hors tension le stockage USB, assurez-vous d\'avoir désactivé (\"éjecté\") la carte SD de votre téléphone Android à partir de votre ordinateur."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Désactiver le périphérique de stockage USB"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Un problème est survenu lors de la mise hors tension du périphérique de stockage USB. Assurez-vous que l\'hôte USB a bien été désactivé, puis essayez à nouveau."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"Formater la carte SD"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Aucune activité correspondante trouvée"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"mettre à jour les données statistiques du composant"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Permet de modifier les données statistiques collectées du composant. Cette option n\'est pas utilisée par les applications standard."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Permet d\'appeler le service de conteneur par défaut pour copier le contenu. Ne pas utiliser pour les applications standard."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Permet d\'appeler le service de conteneur par défaut pour copier le contenu. Ne pas utiliser pour les applications standard."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Appuyer deux fois pour régler le zoom"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Erreur lors de l\'agrandissement du widget"</string>
<string name="ime_action_go" msgid="8320845651737369027">"OK"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Les applications suivantes demandent l\'autorisation d\'accéder à votre compte à partir de maintenant."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Voulez-vous autoriser cette demande ?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Demande d\'accès"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Sélectionner un fichier"</string>
+ <string name="reset" msgid="2448168080964209908">"Réinitialiser"</string>
+ <string name="submit" msgid="1602335572089911941">"Envoyer"</string>
+ <string name="description_star" msgid="2654319874908576133">"favori"</string>
+ <string name="tether_title" msgid="6970447107301643248">"Partage de connexion par USB disponible"</string>
+ <string name="tether_message" msgid="554549994538298101">"Pour que votre ordinateur puisse profiter de la connexion de données cellulaires de votre téléphone, sélectionnez \"Partager la connexion\"."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Partager la connexion"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Annuler"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Un problème est survenu lors du partage de connexion."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"Partage de connexion par USB disponible"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Sélectionnez cette option pour que votre ordinateur partage la connexion de données cellulaires de votre téléphone."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Désactiver le partage de connexion"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Sélectionnez cette option pour désactiver le partage de connexion avec votre ordinateur."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Déconnecter le partage de connexion"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Vous partagez la connexion de données cellulaires de votre téléphone avec votre ordinateur. Sélectionnez \"Déconnecter\" pour mettre fin au partage de connexion par USB."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Déconnecter"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Annuler"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Un problème est survenu lors de la désactivation du partage de connexion. Veuillez réessayer."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 58229dd..b77e8fd 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -133,7 +133,7 @@
<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">"Disattiva 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">"Disattiva modalità aeereo"</string>
<string name="safeMode" msgid="2788228061547930246">"Modalità provvisoria"</string>
<string name="android_system_label" msgid="6577375335728551336">"Sistema Android"</string>
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"abilitazione modalità auto"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Consente a un\'applicazione di abilitare la modalità auto."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"interruzione processi in background"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Consente a un\'applicazione di terminare i processi in background di altre applicazioni, anche se la memoria non è insufficiente."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"interruzione forzata di altre applicazioni"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Consente a un\'applicazione di interrompere forzatamente altre applicazioni."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Consente la modifica delle statistiche sulla batteria raccolte. Da non usare per normali applicazioni."</string>
<string name="permlab_backup" msgid="470013022865453920">"controllo del backup di sistema e ripristino"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Consente all\'applicazione di controllare il meccanismo di backup e ripristino del sistema. Da non usare per normali applicazioni."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"effettuare il backup e il ripristino dei dati dell\'applicazione"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Consente all\'applicazione di partecipare al meccanismo di backup e ripristino del sistema."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"visualizzazione finestre non autorizzate"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Consente la creazione di finestre destinate all\'uso nell\'interfaccia utente di sistema interna. Da non usare per normali applicazioni."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"visualizzazione avvisi di sistema"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Consente l\'associazione all\'interfaccia principale di un metodo di inserimento. Non dovrebbe essere mai necessario per le normali applicazioni."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"associazione a sfondo"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Consente l\'associazione di uno sfondo all\'interfaccia principale. Non dovrebbe mai essere necessario per le normali applicazioni."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interazione con un amministratore dispositivo"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Consente l\'invio di intent a un amministratore del dispositivo. L\'autorizzazione non deve mai essere necessaria per le normali applicazioni."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"modifica orientamento dello schermo"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Consente a un\'applicazione di cambiare la rotazione dello schermo in qualsiasi momento. Non dovrebbe essere mai necessario per le normali applicazioni."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"invio segnali Linuz alle applicazioni"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Consente a un\'applicazione di installare nuovi pacchetti Android o aggiornamenti. Le applicazioni dannose possono sfruttare questa possibilità per aggiungere nuove applicazioni con potenti autorizzazioni arbitrarie."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"eliminazione dati della cache applicazioni"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Consente a un\'applicazione di liberare spazio sul telefono eliminando file nella directory della cache dell\'applicazione. L\'accesso è generalmente limitato a processi di sistema."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"lettura file di registro sistema"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Consente a un\'applicazione di leggere vari file di registro del sistema per trovare informazioni generali sulle operazioni effettuate con il telefono. Tali file non dovrebbero contenere informazioni personali o riservate."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"lettura/scrittura risorse di proprietà di diag"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Consente a un\'applicazione di modificare i dati del proprietario del telefono memorizzati sul telefono. Le applicazioni dannose possono sfruttare questa possibilità per cancellare o modificare tali dati."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"lettura dati proprietario"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Consente a un\'applicazione di leggere i dati del proprietario del telefono memorizzati sul telefono. Le applicazioni dannose possono sfruttare questa possibilità per leggere tali dati."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"lettura dati di calendario"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Consente la lettura da parte di un\'applicazione di tutti gli eventi di calendario memorizzati sul telefono. Le applicazioni dannose possono sfruttare questa possibilità per inviare i tuoi eventi di calendario ad altre persone."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"scrittura dati di calendario"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Consente a un\'applicazione di modificare gli eventi di calendario memorizzati sul telefono. Le applicazioni dannose possono sfruttare questa possibilità per cancellare o modificare i dati del calendario."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"fonti di localizzazione fittizie per test"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Creare fonti di localizzazione fittizie per test. Le applicazioni dannose possono sfruttare questa possibilità per sostituire la posizione e/o lo stato restituito da reali fonti di localizzazione come GPS o provider di rete."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"accesso a comandi aggiuntivi del provider di localizz."</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Consente montaggio e smontaggio da parte dell\'applicazione dei filesystem degli archivi rimovibili."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"formattazione archivio esterno"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Consente all\'applicazione di formattare l\'archivio rimovibile."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"recupero di informazioni sull\'archiviazione protetta"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Consente all\'applicazione di ottenere informazioni sull\'archiviazione protetta."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"creazione archiviazione protetta"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Consente all\'applicazione di creare un\'archiviazione protetta."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"eliminazione archiviazione protetta"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Consente all\'applicazione di eliminare l\'archiviazione protetta."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"montaggio/smontaggio archiviazione protetta"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Consente all\'applicazione di montare/smontare l\'archiviazione protetta."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"rinominazione archiviazione protetta"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Consente all\'applicazione di rinominare l\'archiviazione protetta."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"controllo vibrazione"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Consente all\'applicazione di controllare la vibrazione."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"controllo flash"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Consente all\'applicazione di impostare i suggerimenti per le dimensioni dello sfondo del sistema."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"ripristino impostazioni predef. di fabbrica"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Consente a un\'applicazione di ripristinare le impostazioni di fabbrica del sistema, eliminando tutti i dati, le configurazioni e le applicazioni installate."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"impostazione ora"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Consente a un\'applicazione di modificare l\'ora dell\'orologio del telefono."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"impostazione fuso orario"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Consente a un\'applicazione di modificare il fuso orario del telefono."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"agire da AccountManagerService"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"scrittura impostazioni APN"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Consente a un\'applicazione di modificare le impostazioni APN, come proxy e porta di qualsiasi APN."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"modifica connettività di rete"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Consente a un\'applicazione di modificare lo stato di connettività di rete."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Consente a un\'applicazione di modificare lo stato di connettività di rete."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"modifica della connettività tethering"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Consente a un\'applicazione di modificare lo stato di connettività di rete tethering."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"cambiare l\'impostazione di utilizzo dei dati in background"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Consente a un\'applicazione di cambiare l\'impostazione di utilizzo dei dati in background."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"visualizzazione stato Wi-Fi"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"accesso al filesystem nella cache"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Consente a un\'applicazione di leggere e scrivere il filesystem nella cache."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Limita password"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Limita i tipi di password che sei autorizzato a utilizzare."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Controlla i tentativi di accesso"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Monitora i tentativi non riusciti di accedere al dispositivo per eseguire un\'azione."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Reimposta password"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Forza un nuovo valore per la password, chiedendo all\'amministratore di concedertelo prima di poter eseguire l\'accesso."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Forza blocco"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Controlla quando il dispositivo si blocca, chiedendoti di reinserire la password."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Cancella tutti i dati"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Esegui un ripristino di fabbrica, eliminando tutti i tuoi dati senza conferma."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Casa"</item>
<item msgid="869923650527136615">"Cellulare"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Inserisci password per sbloccare"</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Numero di emergenza"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Premi Menu per sbloccare."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Traccia la sequenza di sblocco"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Chiamata di emergenza"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Corretta."</string>
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Consente a un\'applicazione di modificare la cronologia o i segnalibri del browser memorizzati sul telefono. Le applicazioni dannose possono sfruttare questa possibilità per cancellare o modificare i dati del browser."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Modifica le autorizzazioni di localizzazione geografica del browser"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Consente a un\'applicazione di modificare le autorizzazioni di localizzazione geografica del browser. Le applicazioni dannose possono utilizzare questa autorizzazione per consentire l\'invio di informazioni sulla posizione a siti web arbitrari."</string>
<string name="save_password_message" msgid="767344687139195790">"Memorizzare la password nel browser?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Non ora"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Memorizza"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"1 ora fa"</item>
<item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ore fa"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"ieri"</item>
<item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> giorni fa"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"Nessuna autorizzazione richiesta"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Nascondi"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostra tutto"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Caricamento..."</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"Archiviazione di massa USB"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB collegata"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Il telefono è stato collegato al computer tramite USB. Seleziona \"Collega\" se desideri copiare file tra il computer e la scheda SD del telefono."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Collega"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Non collegare"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Il telefono è stato collegato al computer tramite USB. Seleziona il pulsante sottostante se desideri copiare file tra il computer e la scheda SD di Android."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Attiva archivio USB"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Problema di utilizzo della scheda SD per l\'archiviazione USB."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB collegata"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Seleziona per copiare file sul/dal tuo computer."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Disattiva archivio USB"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Seleziona per disattivare archivio USB."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"Disattiva archivio USB"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Prima di disattivare l\'archivio USB, verifica di aver smontato l\'host USB. A tale scopo, seleziona \"Disattiva\"."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Disattiva"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Annulla"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Abbiamo riscontrato un problema durante la disattivazione dell\'archivio USB. Verifica di aver smontato l\'host USB e riprova."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"Archiviazione USB in uso"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Prima di disattivare l\'archiviazione USB, assicurati di avere smontato (\"espulso\") la scheda SD di Android dal computer."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Disattiva archiviazione USB"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Si è verificato un problema durante la disattivazione dell\'archiviazione USB. Verifica di avere smontato l\'host USB e riprova."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"Formatta scheda SD"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Nessuna attività corrispondente trovata"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"aggiornare le statistiche di utilizzo dei componenti"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Consente la modifica delle statistiche di utilizzo dei componenti raccolte. Da non usare per normali applicazioni."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Consente di invocare il servizio contenitore predefinito per la copia di contenuti. Da non usare per normali applicazioni."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Consente di invocare il servizio contenitore predefinito per la copia di contenuti. Da non usare per normali applicazioni."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Tocca due volte per il comando dello zoom"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Errore durante l\'ampliamento del widget"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Vai"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Le seguenti applicazioni richiedono l\'autorizzazione per accedere al tuo account, adesso e in futuro."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Accettare la richiesta?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Richiesta di accesso"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Scegli file"</string>
+ <string name="reset" msgid="2448168080964209908">"Reimposta"</string>
+ <string name="submit" msgid="1602335572089911941">"Invia"</string>
+ <string name="description_star" msgid="2654319874908576133">"preferiti"</string>
+ <string name="tether_title" msgid="6970447107301643248">"Tethering USB disponibile"</string>
+ <string name="tether_message" msgid="554549994538298101">"Seleziona \"Tethering\" per condividere la connessione dati del telefono con il computer."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Tethering"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Annulla"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Si è verificato un problema con il tethering."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"Tethering USB disponibile"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Seleziona per impostare il tethering del computer con il telefono."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Interrompi tethering"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Seleziona per interrompere il tethering del computer."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Disconnetti tethering"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Stai condividendo la connessione dati del telefono con il computer. Seleziona \"Disconnetti\" per disconnettere il tethering USB."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Disconnetti"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Annulla"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Si è verificato un problema durante la disattivazione del tethering. Riprova."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index b6ac84e..3e53107 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -185,14 +185,12 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"別のアプリケーションをデバッグモードにすることをアプリケーションに許可します。悪意のあるアプリケーションが別のアプリケーションを終了させる恐れがあります。"</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"UI設定の変更"</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_enableCarMode" msgid="5684504058192921098">"運転モードの有効化"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"運転モードを有効にすることをアプリケーションに許可します。"</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"バックグラウンドプロセスの終了"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"メモリが不足していなくても、別のアプリケーションのバックグラウンドプロセスを終了することをアプリケーションに許可します。"</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"別のアプリケーションの強制停止"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"別のアプリケーションの強制停止をアプリケーションに許可します。"</string>
<string name="permlab_forceBack" msgid="1804196839880393631">"アプリケーションの強制終了"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"フォアグラウンドで実行されている操作を強制終了して戻ることをアプリケーションに許可します。通常のアプリケーションではまったく必要ありません。"</string>
<string name="permlab_dump" msgid="1681799862438954752">"システムの内部状態の取得"</string>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"収集した電池統計情報の変更を許可します。通常のアプリケーションでは使用しません。"</string>
<string name="permlab_backup" msgid="470013022865453920">"システムのバックアップと復元を制御する"</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="permlab_systemAlertWindow" msgid="3372321942941168324">"システムレベルの警告の表示"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"入力方法のトップレベルインターフェースに関連付けることを所有者に許可します。通常のアプリケーションにはまったく必要ありません。"</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"壁紙にバインド"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"壁紙のトップレベルインターフェースへのバインドを所有者に許可します。通常のアプリケーションでは不要です。"</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"デバイス管理者との通信"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"デバイス管理者へのintentの送信を所有者に許可します。通常のアプリケーションでは不要です。"</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"画面の向きの変更"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"いつでも画面の回転を変更することをアプリケーションに許可します。通常のアプリケーションにはまったく必要ありません。"</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"Linuxのシグナルをアプリケーションに送信"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Androidパッケージのインストール/更新をアプリケーションに許可します。悪意のあるアプリケーションが、勝手に強力な権限を持つ新しいアプリケーションを追加する恐れがあります。"</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"アプリケーションキャッシュデータの削除"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"アプリケーションのキャッシュディレクトリからファイルを削除して携帯電話のメモリを解放することをアプリケーションに許可します。通常、アクセスはシステムプロセスのみに制限されます。"</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"システムログファイルの読み取り"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"システムのさまざまなログファイルの読み取りをアプリケーションに許可します。これにより携帯電話の使用状況に関する全般情報が取得されますが、個人情報や非公開情報が含まれることはありません。"</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"diagが所有するリソースの読み書き"</string>
@@ -279,10 +281,13 @@
<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>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"端末に保存したカレンダーの予定の読み取りをアプリケーションに許可します。悪意のあるアプリケーションがカレンダーの予定を他人に送信する恐れがあります。"</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"カレンダーデータの書き込み"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"端末に保存したカレンダーの予定の変更をアプリケーションに許可します。悪意のあるアプリケーションが、カレンダーデータを消去/変更する恐れがあります。"</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"仮の位置情報でテスト"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"テスト用に仮の位置情報源を作成します。これにより悪意のあるアプリケーションが、GPS、ネットワークプロバイダなどから返される本当の位置情報や状況を改ざんする恐れがあります。"</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"位置情報提供者の追加コマンドアクセス"</string>
@@ -311,6 +316,16 @@
<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_asec_access" msgid="1070364079249834666">"セキュアストレージ上の情報の取得"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"セキュアストレージ上の情報の取得をアプリケーションに許可します。"</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"セキュアストレージの作成"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"セキュアストレージの作成をアプリケーションに許可します。"</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"セキュアストレージの破棄"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"セキュアストレージの破棄をアプリケーションに許可します。"</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"セキュアストレージのマウント/マウント解除"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"セキュアストレージのマウント/マウント解除をアプリケーションに許可します。"</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"セキュアストレージ名の変更"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"セキュアストレージ名の変更をアプリケーションに許可します。"</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"バイブレーション制御"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"バイブレーションの制御をアプリケーションに許可します。"</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"ライトのコントロール"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"システムの壁紙サイズのヒントの設定をアプリケーションに許可します。"</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"システムを出荷時設定にリセット"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"データ、設定、インストールしたアプリケーションをすべて消去して、完全に出荷時の設定にシステムをリセットすることをアプリケーションに許可します。"</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"時刻の設定"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"携帯電話の時刻の変更をアプリケーションに許可します。"</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"タイムゾーンの設定"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"端末のタイムゾーンの変更をアプリケーションに許可します。"</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"AccountManagerServiceとして機能"</string>
@@ -364,7 +381,9 @@
<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="permdesc_changeNetworkState" msgid="4199958910396387075">"ネットワークの接続状態の変更をアプリケーションに許可します。"</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"テザリング接続の変更"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"ネットワークのテザリング接続状態の変更をアプリケーションに許可します。"</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"バックグラウンドデータ使用設定の変更"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"バックグラウンドデータ使用の設定の変更をアプリケーションに許可します。"</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"Wi-Fi状態の表示"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"キャッシュファイルシステムにアクセス"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"キャッシュファイルシステムへの読み書きをアプリケーションに許可します。"</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"パスワードの制限"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"使用できるパスワードの種類を制限します。"</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"ログインの監視"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"携帯電話へのログインの失敗を監視し、何らかの処置をとります。"</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"パスワードのリセット"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"パスワードを強制的に新しい値に変更します。ログインするには管理者からその値を通知してもらう必要があります。"</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"強制ロック"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"携帯電話のロック時を管理します。パスワードの再入力が必要となります。"</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"すべてのデータを消去"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"出荷時設定にリセットします。確認なしでデータがすべて削除されます。"</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"自宅"</item>
<item msgid="869923650527136615">"携帯"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"ロックを解除するにはパスワードを入力"</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>
@@ -504,6 +532,8 @@
<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>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"ブラウザでアクセスしたすべてのURLおよびブラウザのすべてのブックマークの読み取りをアプリケーションに許可します。"</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"ブラウザの履歴とブックマークを書き込む"</string>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"携帯電話に保存されているブラウザの履歴やブックマークの修正をアプリケーショに許可します。これにより悪意のあるアプリケーションが、ブラウザのデータを消去または変更する恐れがあります。"</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"ブラウザの位置情報へのアクセス権を変更"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"ブラウザの位置情報に対するアクセス権の変更をアプリケーションに許可します。この設定では、悪意のあるアプリケーションが任意のウェブサイトに位置情報を送信する可能性があります。"</string>
<string name="save_password_message" msgid="767344687139195790">"このパスワードをブラウザで保存しますか?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"今は保存しない"</string>
<string name="save_password_remember" msgid="6491879678996749466">"保存"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"1時間前"</item>
<item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g>時間前"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"昨日"</item>
<item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g>日前"</item>
@@ -739,21 +779,27 @@
<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>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"USBマスストレージ"</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="4796759646167247178">"携帯電話をUSBでパソコンに接続しています。パソコンとAndroidのSDカード間でファイルをコピーするには、下のボタンを選択します。"</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"USBストレージをONにする"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"USBメモリにSDカードを使用する際に問題が発生しました。"</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB接続"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"パソコンとの間でファイルをコピーします。"</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"USBストレージをOFFにする"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"USBストレージをOFFにする場合に選択します。"</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"USBストレージをOFFにする"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"USBストレージをOFFにする前にUSBホストのマウントを解除したことを確認してください。USBストレージをOFFにするには[OFF]を選択します。"</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"OFF"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"キャンセル"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"USBストレージをOFFにする際に問題が発生しました。USBホストのマウントが解除されていることを確認してからもう一度お試しください。"</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"USBストレージを使用中"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"USBストレージをOFFにする前に、パソコンで必ずAndroidのSDカードのマウントを解除して(カードを取り出して)ください。"</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"USBストレージをOFFにする"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"USBストレージをOFFにする際に問題が発生しました。USBホストのマウントが解除されていることを確認してからもう一度お試しください。"</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"一致するアクティビティが見つかりません"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"コンポーネント使用状況に関する統計情報の更新"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"収集されたコンポーネント使用状況に関する統計情報の変更を許可します。通常のアプリケーションでは使用しません。"</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"既定のコンテナサービスを呼び出してコンテンツをコピーすることをアプリケーションに許可します。通常のアプリケーションでは使用しません。"</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"既定のコンテナサービスを呼び出してコンテンツをコピーすることをアプリケーションに許可します。通常のアプリケーションでは使用しません。"</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"ダブルタップでズームします"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"ウィジェットの展開エラー"</string>
<string name="ime_action_go" msgid="8320845651737369027">"移動"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"下記のアプリケーションが、アカウントへのアクセスを今後も許可するようにリクエストしています。"</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"このリクエストを許可してもよろしいですか?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"アクセスリクエスト"</string>
<string name="allow" msgid="7225948811296386551">"許可"</string>
<string name="deny" msgid="2081879885755434506">"拒否"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"リクエスト済み権限"</string>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"ファイルを選択"</string>
+ <string name="reset" msgid="2448168080964209908">"リセット"</string>
+ <string name="submit" msgid="1602335572089911941">"送信"</string>
+ <string name="description_star" msgid="2654319874908576133">"お気に入り"</string>
+ <string name="tether_title" msgid="6970447107301643248">"USBテザリングが可能"</string>
+ <string name="tether_message" msgid="554549994538298101">"携帯電話のデータ接続をパソコンと共有するには[テザリング]を選択します。"</string>
+ <string name="tether_button" msgid="7409514810151603641">"テザリング"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"キャンセル"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"テザリング中に問題が発生しました。"</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"USBテザリングが可能"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"パソコンを携帯電話にテザリングする場合に選択します。"</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"テザリングの解除"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"パソコンのテザリングを解除する場合に選択します。"</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"テザリングの切断"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"携帯電話のデータ接続をパソコンと共有しています。USBテザリングを切断するには[接続を解除]を選択します。"</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"接続を解除"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"キャンセル"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"テザリングをOFFにする際に問題が発生しました。もう一度お試しください。"</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 222139b..c17bf4f 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -185,14 +185,12 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"응용프로그램이 다른 응용프로그램에 대해 디버깅을 사용할 수 있도록 합니다. 이 경우 악성 응용프로그램이 다른 응용프로그램을 중지시킬 수 있습니다."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"UI 설정 변경"</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_enableCarMode" msgid="5684504058192921098">"차량 모드 사용"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"응용프로그램이 차량 모드를 사용할 수 있도록 합니다."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"백그라운드 프로세스 종료"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"메모리가 부족하지 않은 경우에도 응용프로그램이 다른 응용프로그램의 백그라운드 프로세스를 중단할 수 있도록 합니다."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"다른 응용프로그램 강제 종료"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"응용프로그램이 다른 응용프로그램을 강제로 종료할 수 있도록 합니다."</string>
<string name="permlab_forceBack" msgid="1804196839880393631">"강제로 응용프로그램 닫기"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"응용프로그램이 포그라운드에 있는 활동을 강제로 닫고 되돌아갈 수 있도록 합니다. 일반 응용프로그램에는 필요하지 않습니다."</string>
<string name="permlab_dump" msgid="1681799862438954752">"시스템 내부 상태 검색"</string>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"수집된 배터리 통계를 수정할 수 있도록 합니다. 일반 응용프로그램에서는 사용할 수 없습니다."</string>
<string name="permlab_backup" msgid="470013022865453920">"시스템 백업 및 복원 관리"</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="permlab_systemAlertWindow" msgid="3372321942941168324">"시스템 수준 경고 표시"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"보유자가 입력 방법의 최상위 인터페이스만 사용하도록 합니다. 일반 응용프로그램에는 필요하지 않습니다."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"배경화면만 사용"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"보유자가 배경화면의 최상위 인터페이스만 사용하도록 합니다. 일반 응용프로그램에는 필요하지 않습니다."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"기기 관리자와 상호 작용"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"보유자가 기기 관리자에게 인텐트를 보낼 수 있도록 합니다. 일반 응용프로그램에는 필요하지 않습니다."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"화면 방향 변경"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"응용프로그램이 언제든지 화면 회전을 변경할 수 있도록 합니다. 일반 응용프로그램에는 필요하지 않습니다."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"응용프로그램에 Linux 신호 보내기"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"응용프로그램이 새로운 또는 업데이트된 Android 패키지를 설치할 수 있도록 합니다. 이 경우 악성 응용프로그램이 임의의 강력한 권한으로 새 응용프로그램을 추가할 수 있습니다."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"모든 응용프로그램 캐시 데이터 삭제"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"응용프로그램이 응용프로그램 캐시 디렉토리에 있는 파일을 삭제하여 휴대전화의 저장공간을 늘릴 수 있도록 합니다. 액세스는 일반적으로 시스템 프로세스로 제한됩니다."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"시스템 로그 파일 읽기"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"응용프로그램이 시스템의 다양한 로그 파일을 읽을 수 있도록 합니다. 이 경우 응용프로그램은 사용자가 휴대전화로 수행하는 작업에 대한 일반적인 정보를 검색할 수 있지만 여기에 개인정보는 포함되어서는 안 됩니다."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"진단 그룹 소유의 리소스 읽기/작성"</string>
@@ -279,10 +281,13 @@
<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>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"응용프로그램이 휴대전화에 저장된 모든 캘린더 일정을 읽을 수 있도록 합니다. 이 경우 악성 응용프로그램이 캘린더 일정을 다른 사람에게 보낼 수 있습니다."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"캘린더 데이터 작성"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"응용프로그램이 휴대전화에 저장된 캘린더 일정을 수정할 수 있도록 합니다. 이 경우 악성 응용프로그램이 캘린더 데이터를 지우거나 수정할 수 있습니다."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"테스트를 위해 위치 소스로 가장"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"테스트용 가짜 위치 소스를 만듭니다. 단, 악성 응용프로그램이 이 기능을 이용하여 GPS, 네트워크 제공업체 같은 실제 위치 소스에서 반환한 위치 및/또는 상태를 덮어쓸 수 있습니다."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"추가 위치 제공업체 명령 액세스"</string>
@@ -311,6 +316,16 @@
<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_asec_access" msgid="1070364079249834666">"보안 저장소에 대한 정보 가져오기"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"응용프로그램이 보안 저장소의 정보를 가져올 수 있도록 합니다."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"보안 저장소 만들기"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"응용프로그램이 보안 저장소를 만들 수 있도록 합니다."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"보안 저장소 제거"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"응용프로그램이 보안 저장소를 제거할 수 있도록 합니다."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"보안 저장소 마운트/마운트 해제"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"응용프로그램이 보안 저장소를 마운트/마운트 해제할 수 있도록 합니다."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"보안 저장소 이름 바꾸기"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"응용프로그램이 보안 저장소의 이름을 바꿀 수 있도록 합니다."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"진동 제어"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"응용프로그램이 진동을 제어할 수 있도록 합니다."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"손전등 제어"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"응용프로그램이 시스템 배경화면 크기 힌트를 설정할 수 있도록 합니다."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"시스템을 기본값으로 재설정"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"응용프로그램이 모든 데이터, 구성 및 설치된 응용프로그램을 지워서 시스템을 완전히 초기화할 수 있도록 합니다."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"시간 설정"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"응용프로그램이 휴대전화 시계의 시간을 변경할 수 있도록 합니다."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"표준시간대 설정"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"응용프로그램이 휴대전화의 표준시간대를 변경할 수 있도록 합니다."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"AccountManagerService로 활동"</string>
@@ -364,7 +381,9 @@
<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="permdesc_changeNetworkState" msgid="4199958910396387075">"응용프로그램이 네트워크 연결 상태를 변경할 수 있도록 합니다."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"연결 변경"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"응용프로그램이 연결된 네트워크의 연결 상태를 변경할 수 있도록 합니다."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"백그라운드 데이터 사용 설정 변경"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"응용프로그램이 백그라운드 데이터 사용 설정을 변경할 수 있도록 합니다."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"Wi-Fi 상태 보기"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"캐시 파일시스템 액세스"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"응용프로그램이 캐시 파일시스템을 읽고 쓸 수 있도록 합니다."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"비밀번호 제한"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"사용할 수 있는 비밀번호 유형을 제한합니다."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"로그인 시도 보기"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"몇 가지 작업을 수행하기 위해 기기에 대해 실패한 로그인 시도를 모니터링합니다."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"비밀번호 재설정"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"비밀번호를 새 값으로 강제 설정합니다. 이를 수행하려면 로그인하기 전에 관리자에게 새로 지정할 비밀번호 값을 요청해야 합니다."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"강제 잠금"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"기기가 잠겨 있을 때 작동하려면 비밀번호를 다시 입력해야 합니다."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"모든 데이터 삭제"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"초기화를 수행하여 모든 데이터를 확인하지 않고 삭제합니다."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"집"</item>
<item msgid="869923650527136615">"모바일"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"잠금을 해제하려면 비밀번호 입력"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"PIN 코드가 잘못되었습니다."</string>
<string name="keyguard_label_text" msgid="861796461028298424">"잠금해제하려면 메뉴를 누른 다음 0을 누릅니다."</string>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"비상 전화번호"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"잠금해제하려면 메뉴를 누르세요."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"잠금해제를 위해 패턴 그리기"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"비상 전화"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<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>
@@ -513,7 +543,7 @@
<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="emergency_calls_only" msgid="6733978304386365407">"비상 전화만"</string>
+ <string name="emergency_calls_only" msgid="6733978304386365407">"긴급 통화만"</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_instructions" msgid="635967534992394321">"사용자 가이드를 참조하거나 고객지원팀에 문의하세요."</string>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"응용프로그램이 브라우저로 방문한 모든 URL과 브라우저의 모든 북마크를 읽도록 허용합니다."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"브라우저의 기록 및 북마크 쓰기"</string>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"응용프로그램이 휴대전화에 저장된 브라우저 기록 또는 북마크를 수정할 수 있도록 허용합니다. 이 경우 악성 응용프로그램이 브라우저의 데이터를 지우거나 수정할 수 있습니다."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"브라우저 위치 정보 수정 권한"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"응용프로그램이 브라우저의 위치 정보 권한을 수정할 수 있도록 합니다. 악성 응용프로그램이 이를 사용하여 임의의 웹사이트에 위치 정보를 보낼 수도 있습니다."</string>
<string name="save_password_message" msgid="767344687139195790">"브라우저에 이 비밀번호를 저장하시겠습니까?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"나중에"</string>
<string name="save_password_remember" msgid="6491879678996749466">"저장"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"1시간 전"</item>
<item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g>시간 전"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"어제"</item>
<item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g>일 전"</item>
@@ -739,21 +779,27 @@
<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>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"USB 대용량 저장소"</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="4796759646167247178">"USB를 통해 휴대전화를 컴퓨터에 연결했습니다. 컴퓨터와 Android의 SD 카드 간에 파일을 복사하려면 아래의 버튼을 선택하세요."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"USB 저장소 사용"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"USB 저장소로 SD 카드를 사용하는 동안 문제가 발생했습니다."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB 연결됨"</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>
- <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_title" msgid="660129851708775853">"USB 저장소 사용 중"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"USB 저장소를 사용하지 않도록 설정하기 전에 컴퓨터에서 Android의 SD 카드를 마운트 해제(\'방출\')했는지 확인하시기 바랍니다."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"USB 저장소 사용 안함"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"USB 저장소를 사용하지 않도록 설정하는 동안 문제가 발생했습니다. USB 호스트와 연결을 해제했는지 확인한 다음 다시 시도하세요."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"일치하는 활동이 없습니다."</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"구성 요소 사용 통계 업데이트"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"수집된 구성요소 사용 통계를 수정할 수 있는 권한을 부여합니다. 일반 응용프로그램은 이 권한을 사용할 수 없습니다."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"기본 컨테이너 서비스를 호출하여 콘텐츠를 복사할 수 있도록 합니다. 일반 응용프로그램에서는 사용하지 않습니다."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"기본 컨테이너 서비스를 호출하여 콘텐츠를 복사할 수 있도록 합니다. 일반 응용프로그램에서는 사용하지 않습니다."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"확대/축소하려면 두 번 탭하세요."</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"위젯을 확장하는 동안 오류가 발생했습니다."</string>
<string name="ime_action_go" msgid="8320845651737369027">"이동"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"현재 이후로 하나 이상의 다음 응용프로그램이 계정에 대한 액세스 권한을 요청합니다."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"요청을 허용하시겠습니까?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"액세스 요청"</string>
<string name="allow" msgid="7225948811296386551">"허용"</string>
<string name="deny" msgid="2081879885755434506">"거부"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"권한 요청"</string>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"파일 선택"</string>
+ <string name="reset" msgid="2448168080964209908">"재설정"</string>
+ <string name="submit" msgid="1602335572089911941">"제출"</string>
+ <string name="description_star" msgid="2654319874908576133">"즐겨찾기"</string>
+ <string name="tether_title" msgid="6970447107301643248">"USB 연결 사용 가능"</string>
+ <string name="tether_message" msgid="554549994538298101">"휴대전화의 데이터 연결을 컴퓨터와 공유하려면 \'연결\'을 선택합니다."</string>
+ <string name="tether_button" msgid="7409514810151603641">"연결"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"취소"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"연결하는 중 문제가 발생했습니다."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"USB 연결 사용 가능"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"컴퓨터를 휴대전화에 연결하려면 선택합니다."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"연결 해제"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"컴퓨터 연결을 해제하려면 선택하세요."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"연결 끊기"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"휴대전화의 휴대전화 데이터 연결이 컴퓨터와 공유되고 있습니다. USB 연결을 해제하려면 \'연결 끊기\'를 선택하세요."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"연결 끊기"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"취소"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"연결을 사용하지 않도록 설정하는 동안 문제가 발생했습니다. 다시 시도해 주세요."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 8eb3463..359e954 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"aktiver bilmodus"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Tillater et program å aktivere bilmodus."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"avslutt bakgrunnsprosesser"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Tillater et program å avslutte bakgrunnsprosesser for andre programmer, selv om det er nok minne."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"fremtving stopp av andre programmer"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Tillater et program å framtvinge stopp av andre programmer."</string>
<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>
@@ -217,8 +215,6 @@
<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">"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>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Lar applikasjonen binde til toppnivågrensesnittet for en inndatametode. Vanlige applikasjoner bør aldri trenge dette."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"bind til bakgrunnsbilde"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Lar innehaveren binde det øverste nivået av grensesnittet til en bakgrunnsbilder. Skal ikke være nødvendig for vanlige programmer."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"kommuniser med enhetsadministrator"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Tillater innehaveren å sende hensikter til enhetsadministrator. Bør aldri være nødvendig for normale programmer."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"snu skjermen"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Lar applikasjonen rotere skjermen når som helst. Vanlige applikasjoner bør aldri trenge dette."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"sende Linux-signaler til applikasjoner"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Lar applikasjonen installere nye eller oppdaterte Android-pakker. Ondsinnede applikasjoner kan bruke dette til å legge til nye applikasjoner med vilkårlig kraftige rettigheter."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"slette hurtigbufferdata for alle applikasjoner"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Lar applikasjonen frigjøre lagringsplass ved å slette filer i applikasjoners hurtigbufferkatalog. Tilgangen er vanligvis sterkt begrenset, til systemprosesser."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"lese systemets loggfiler"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Lar applikasjonen lese fra diverse loggfiler på systemet. Disse inneholder generell informasjon om hva som gjøres med telefonen, men skal ikke inneholde personlig eller privat informasjon."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"lese/skrive ressurser eid av diag"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Lar applikasjonen endre dataene om telefoneieren. Ondsinnede applikasjoner kan bruke dette til å slette eller redigere telefonens eierdata."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"lese eierinformasjon"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Lar applikasjonen lese dataene om telefoneieren. Ondsinnede applikasjoner kan bruke dette til å lese telefonens eierdata."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"lese kalenderinformasjon"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Lar applikasjonen lese alle kalenderhendelser lagret på telefonen. Ondsinnede applikasjoner kan bruke dette til å sende kalenderhendelser til andre."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"skrive kalenderinformasjon"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Lar applikasjonen endre kalenderhendelser lagret på telefonen. Ondsinnede applikasjoner kan bruke dette til å slette eller endre kalenderinformasjon."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"lage simulerte plasseringskilder for testing"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Lage simulerte plassingskilder for testing. Ondsinnede applikasjoner kan bruke dette til å overstyre plasseringen og/eller statusen rapportert av ekte plasseringskilder slik som GPS eller nettverksoperatører."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"få tilgang til ekstra plasseringskommandoer"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Lar applikasjonen montere og avmontere filsystemer for uttagbar lagring."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"formatere ekstern lagringsplass"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Lar applikasjonen formatere ekstern lagringsplass."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"få informasjon om sikker lagring"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Tillater programmet å innhente informasjon om sikker lagring."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"opprette sikker lagring"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Tillater programmet å opprette sikker lagring."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"stenge sikker lagring"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Tillater programmet å stenge sikker lagring."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"koble til eller fra sikker lagring"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Tillater programmet å koble sikker lagring til eller fra."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"gi nytt navn til sikker lagring"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Tillater programmet å gi nytt navn til sikker lagring."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"kontrollere vibratoren"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Lar applikasjonen kontrollere vibratoren."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"kontrollere lommelykten"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Lar applikasjonen sette størrelseshint for systemets bakgrunnsbilde."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"tilbakestille systemet til fabrikkinnstillinger"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Lar applikasjonen tilbakestille systemet til fabrikkinnstillinger, noe som vil fjerne alle data, alt oppsett, og alle installerte applikasjoner."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"stille klokken"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Tillater et program å stille klokken på telefonen."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"endre tidssone"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Lar applikasjonen endre telefonens tidssone."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"fungere som kontoadministrasjonstjenesten"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"skrive APN-innstillinger"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Lar applikasjonen to endre APN-innstillinger slik som mellomtjener eller port for hvilket som helst aksesspunkt."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"endre nettverkskonnektivitet"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Lar applikasjonen endre tilstanden til nettverkskonnektivitet."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Tillater et program å endre innstillingene for nettverkstilkoblingen."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"endre tilknytningsoppsett"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Tillater et program å endre innstillingene for nettverkstilknytningen."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"endre innstilling for bakgrunnsdata"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Lar applikasjonen endre innstillingen for bakgrunnsdata."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"se tilstand for trådløse nettverk"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"tilgang til bufrede filer"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Tillater et program å lese og skrive til bufrede filer."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Begrens passord"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Begrense typene passord du kan bruke."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Overvåk påloggingsforsøk"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Overvåk mislykkede påloggingsforsøk eller forsøk på handlinger på enheten."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Tilbakestill passordet"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Fremtving tilbakestilling av passord, slik at administratoren må gi deg et nytt passord når du skal logge deg på."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Obligatorisk låsing"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Kontrollerer når enheten låses. Du må skrive inn passordet på nytt for å låse den opp."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Slett alle data"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Utfører tilbakestilling til fabrikkstandard. Alle data slettes uten varsel."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Hjemmenummer"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Skriv inn passord for å låse opp"</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Nødnummer"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Trykk på menyknappen for å låse opp."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Tegn mønster for å låse opp"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Nødanrop"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Riktig!"</string>
<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>
@@ -513,7 +543,7 @@
<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>
<string name="lockscreen_missing_sim_instructions" msgid="8874620818937719067">"Sett inn et SIM-kort."</string>
- <string name="emergency_calls_only" msgid="6733978304386365407">"Kun nødsamtaler"</string>
+ <string name="emergency_calls_only" msgid="6733978304386365407">"Kun nødanrop"</string>
<string name="lockscreen_network_locked_message" msgid="143389224986028501">"Nettverk ikke tillatt"</string>
<string name="lockscreen_sim_puk_locked_message" msgid="7441797339976230">"SIM-kortet er PUK-låst."</string>
<string name="lockscreen_sim_puk_locked_instructions" msgid="635967534992394321">"Se manualen eller kontakt kundeservice."</string>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Lar applikasjonen endre nettleserens logg og bokmerker lagret på telefonen. Ondsinnede applikasjoner kan bruke dette til å fjerne eller redigere nettleserens data."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Endre nettleserens tillatelser for geografisk posisjonering"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Tillater programmet å endre nettleserens tillatelser for geografisk posisjonering. Skadelige programmer kan bruke denne funksjonen til å sende posisjonsopplysninger til vilkårlige nettsteder."</string>
<string name="save_password_message" msgid="767344687139195790">"Ønsker du at nettleseren skal huske dette passordet?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Ikke nå"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Husk"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"for en time siden"</item>
<item quantity="other" msgid="2467273239587587569">"for <xliff:g id="COUNT">%d</xliff:g> timer siden"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"i går"</item>
<item quantity="other" msgid="2479586466153314633">"for <xliff:g id="COUNT">%d</xliff:g> dager siden"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"Trenger ingen rettigheter"</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">"Laster inn…"</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"USB-masselagring"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB koblet til"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Du har koblet telefonen til en datamaskin via USB. Velg «Montér» dersom du ønsker å kopiere filer mellom datmaskinen og minnekortet i telefonen."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Montér"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Ikke montér"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Du har koblet telefonen til datamaskinen via USB. Velg knappen nedenfor hvis du vil kopiere filer mellom datamaskinen og SD-kortet i Android-telefonen."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Slå på USB-lagring"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Det oppsto et problem med å bruke minnekortet ditt for USB-lagring."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB tilkoblet"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Velg om du ønsker å kopiere filer til/fra en datamaskin."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Slå av USB-lagring"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Velg for å slå av USB-lagring."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"Slå av USB-lagring"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Før du slår av USB-lagring, sjekk at du har avmontert enheten i USB-verten. Velg «slå av» for å slå av USB-lagring."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Slå av"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Avbryt"</string>
- <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="usb_storage_stop_title" msgid="660129851708775853">"USB-lagring er i bruk"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Før du slår av USB-lagring, må du kontrollere at du har løst ut SD-kortet fra Android-telefonen fra datamaskinen."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Slå av USB-lagring"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Det oppstod et problem ved deaktivering av USB-lagring. Kontroller at du har demontert USB-verten, og prøv på nytt."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<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ér"</string>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Fant ingen tilsvarende aktiviteter"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"oppdater statistikk over komponentbruk"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Tillater endring av innsamlet data om bruk av komponenter. Ikke ment for vanlige applikasjoner."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Tillater bruk av standard meldingsbeholdertjeneste for kopiering av innhold. Brukes ikke for normale programmer."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Tillater bruk av standard meldingsbeholdertjeneste for kopiering av innhold. Brukes ikke for normale programmer."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Trykk to ganger for zoomkontroll"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Feil under oppakking av gadget"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Gå"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Ett eller flere av de følgende programmene ber om tillatelse til å få tilgang til kontoen din fra nå av."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Vil du tillate dette?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Få tilgang til forespørsler"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Velg fil"</string>
+ <string name="reset" msgid="2448168080964209908">"Tilbakestill"</string>
+ <string name="submit" msgid="1602335572089911941">"Send inn"</string>
+ <string name="description_star" msgid="2654319874908576133">"favoritt"</string>
+ <string name="tether_title" msgid="6970447107301643248">"USB-tilknytning er tilgjengelig"</string>
+ <string name="tether_message" msgid="554549994538298101">"Velg Knytt til hvis du vil dele telefonens datatilkobling med datamaskinen."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Knytt til"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Avbryt"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Det oppstod et problem under tilknytning."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"USB-tilknytning er tilgjengelig"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Velg å knytte datamaskinen til telefonen."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Fjern tilknytning"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Velg å fjerne tilknytningen til datamaskinen."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Deaktiver tilknytning"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Du deler for øyeblikket telefonens mobildatatilkobling med datamaskinen. Velg Koble fra for å oppheve USB-tilknytningen."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Koble fra"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Avbryt"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Det oppstod et problem under deaktivering av tilknytningen. Prøv på nytt."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index aad7744..23d90cb 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"automodus inschakelen"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Staat een toepassing toe de automodus in te schakelen."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"processen op de achtergrond beëindigen"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Staat een toepassing toe processen op de achtergrond te beëindigen, zelfs als er voldoende geheugen beschikbaar is."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"andere toepassingen gedwongen stoppen"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Staat een toepassing toe andere toepassingen te stoppen."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Hiermee kunnen verzamelde accustatistieken worden gewijzigd. Niet voor gebruik door normale toepassingen."</string>
<string name="permlab_backup" msgid="470013022865453920">"systeemback-up en -herstel beheren"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Hiermee kan de toepassing het mechanisme voor systeemback-up en -herstel beheren. Niet voor gebruik door normale toepassingen."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"back-up maken en de gegevens van de toepassing herstellen"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Hiermee kan de toepassing deelnemen aan het beheer van het mechanisme voor systeemback-up en -herstel."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"niet-geautoriseerde vensters weergeven"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Hiermee kunnen vensters worden gemaakt die door de interne systeemgebruikersinterface worden gebruikt. Niet voor gebruik door normale toepassingen."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"waarschuwingen op systeemniveau weergeven"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Hiermee staat u de houder toe zich te verbinden met de hoofdinterface van een invoermethode. Nooit vereist voor normale toepassingen."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"verbinden met een achtergrond"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Hiermee staat u de houder toe zich te verbinden met de hoofdinterface van een achtergrond. Nooit vereist voor normale toepassingen."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interactie met apparaatbeheer"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Staat de houder toe intenties te verzenden naar een apparaatbeheerder. Nooit vereist voor normale toepassingen."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"schermstand wijzigen"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Hiermee kan een toepassing op elk gewenst moment de oriëntatie van het scherm wijzigen. Nooit vereist voor normale toepassingen."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"Linux-signalen verzenden naar toepassingen"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Hiermee kan een toepassing nieuwe of bijgewerkte Android-pakketten installeren. Schadelijke toepassingen kunnen hiervan gebruik maken om nieuwe toepassingen met willekeurig krachtige machtigingen toe te voegen."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"alle cachegegevens van toepassing verwijderen"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Hiermee kan een toepassing opslagruimte op de telefoon vrij maken door bestanden te verwijderen uit de cachemap van de toepassing. De toegang is doorgaans beperkt tot het systeemproces."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"systeemlogbestanden lezen"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Hiermee kan een toepassing de verschillende logbestanden van het systeem lezen. De toepassing kan op deze manier algemene informatie achterhalen over uw telefoongebruik. Hierin is geen persoonlijke of privé-informatie opgenomen."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"lezen/schrijven naar bronnen van diag"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Hiermee kan een toepassing de op uw telefoon opgeslagen gegevens van de eigenaar wijzigen. Schadelijke toepassingen kunnen hiermee gegevens van de eigenaar verwijderen of wijzigen."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"gegevens eigenaar lezen"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Hiermee kan een toepassing de op uw telefoon opgeslagen gegevens van de eigenaar lezen. Schadelijke toepassingen kunnen hiermee gegevens van de eigenaar lezen."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"agendagegevens lezen"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Hiermee kan een toepassing alle agendagebeurtenissen lezen die zijn opgeslagen op uw telefoon. Schadelijke toepassingen kunnen hiervan gebruik maken om uw agendagebeurtenissen te verzenden naar andere personen."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"agendagegevens schrijven"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Hiermee kan een toepassing de op uw telefoon opgeslagen agendagebeurtenissen wijzigen. Schadelijke toepassingen kunnen hiermee uw agendagegevens verwijderen of wijzigen."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"neplocatiebronnen voor test"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Neplocatiebronnen voor testdoeleinden maken. Schadelijke toepassingen kunnen dit gebruiken om de locatie en/of status te overschrijven die door de echte locatiebronnen wordt aangegeven, zoals GPS of netwerkaanbieders."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"toegang opdrachten aanbieder extra locaties"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Hiermee kan de toepassing bestandssystemen koppelen en ontkoppelen voor verwisselbare opslagruimte."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"externe opslag formatteren"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Hiermee kan de toepassing de externe opslag formatteren."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"informatie over de beveiligde opslag verkrijgen"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Staat de toepassing toe informatie over de beveiligde opslag te verkrijgen."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"beveiligde opslag maken"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Staat de toepassing toe beveiligde opslag te maken."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"beveiligde opslag vernietigen"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Staat de toepassing toe de beveiligde opslag te vernietigen."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"beveiligde opslag koppelen/ontkoppelen"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Staat de toepassing toe de beveiligde opslag te koppelen/ontkoppelen."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"naam van beveiligde opslag wijzigen"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Staat de toepassing toe de naam van de beveiligde opslag te wijzigen."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"trilstand beheren"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Hiermee kan de toepassing de trilstand beheren."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"zaklamp bedienen"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Hiermee kan de toepassing de grootte van de achtergrond instellen."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"systeem terugzetten op fabrieksinstellingen"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Hiermee kan een toepassing het systeem terugzetten op de fabrieksinstellingen, waarbij alle gegevens, configuraties en geïnstalleerde toepassingen worden verwijderd."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"tijd instellen"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Staat een toepassing toe de kloktijd van de telefoon te wijzigen."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"tijdzone instellen"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Hiermee kan een toepassing de tijdzone van de telefoon wijzigen."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"fungeren als de AccountManagerService"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"instellingen voor toegangspuntnaam schrijven"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Hiermee kan een toepassing de APN-instellingen, zoals proxy en poort, van elke APN wijzigen."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"netwerkverbinding wijzigen"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Hiermee kan een toepassing de verbindingsstatus van het netwerk wijzigen."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Staat een toepassing toe de status van de netwerkverbinding te wijzigen."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"getetherde verbinding wijzigen"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Staat een toepassing toe de status van de getetherde netwerkverbinding te wijzigen."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"instelling voor gebruik van achtergrondgegevens van gegevens wijzigen"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Hiermee kan een toepassing de instelling voor gebruik van achtergrondgegevens wijzigen."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"Wi-Fi-status bekijken"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"het cachebestandssysteem openen"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Staat een toepassing toe het cachebestandssysteem te lezen en te schrijven."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Wachtwoord beperken"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"De typen wachtwoorden beperken die u mag gebruiken."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Aanmeldingspogingen controleren"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Mislukte pogingen controleren voor aanmelding bij het apparaat om een bepaalde actie uit te voeren."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Wachtwoord opnieuw instellen"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Uw wachtwoord gedwongen wijzigen in een nieuwe waarde, wat vereist dat de beheerder u het wachtwoord geeft voordat u zich kunt aanmelden."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Gedwongen vergrendelen"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Beheren wanneer het apparaat wordt vergrendeld, wat vereist dat u het wachtwoord opnieuw invoert."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Alle gegevens wissen"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"De fabrieksinstellingen herstellen, waarbij alle gegevens worden verwijderd zonder bevestiging."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Thuis"</item>
<item msgid="869923650527136615">"Mobiel"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Voer het wachtwoord in om te ontgrendelen"</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Alarmnummer"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Druk op \'Menu\' om te ontgrendelen."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Patroon tekenen om te ontgrendelen"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Noodoproep"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Juist!"</string>
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"Alt"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Hiermee kan een toepassing de op uw telefoon opgeslagen browsergeschiedenis of bladwijzers wijzigen. Schadelijke toepassingen kunnen hiermee uw browsergegevens verwijderen of wijzigen."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Geolocatierechten voor browser aanpassen"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Staat een toepassing toe de geolocatierechten van de browser aan te passen. Schadelijke toepassingen kunnen dit gebruiken om locatiegegevens te verzenden naar willekeurige websites."</string>
<string name="save_password_message" msgid="767344687139195790">"Wilt u dat de browser dit wachtwoord onthoudt?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Niet nu"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Onthouden"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"1 uur geleden"</item>
<item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> uur geleden"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"gisteren"</item>
<item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dagen geleden"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"Geen machtigingen vereist"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Verbergen"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Alles weergeven"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Laden..."</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"USB-massaopslag"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB-verbinding"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"U heeft uw telefoon via USB op uw computer aangesloten. Selecteer \'Koppelen\' als u bestanden tussen uw computer en de SD-kaart van uw telefoon wilt kopiëren."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Koppelen"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Niet koppelen"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"U heeft uw telefoon via USB op uw computer aangesloten. Selecteer de onderstaande knop als u bestanden tussen uw computer en de SD-kaart van uw Android wilt kopiëren."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"USB-opslag inschakelen"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Er is een probleem bij het gebruik van uw SD-kaart voor USB-opslag."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB-verbinding"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Selecteer dit om bestanden naar/van uw computer te kopiëren."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"USB-opslag uitschakelen"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Selecteer dit om USB-opslag uit te schakelen."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"USB-opslag uitschakelen"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Voordat u de USB-opslag uitschakelt, moet u de koppeling met de USB-host verbreken. Selecteer \'Uitschakelen\' om USB-opslag uit te schakelen."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Uitschakelen"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Annuleren"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Er is een probleem opgetreden tijdens het uitschakelen van de USB-opslag. Controleer of u de USB-host heeft losgekoppeld en probeer het opnieuw."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"USB-opslag in gebruik"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Voordat u USB-opslag uitschakelt, moet u de SD-kaart van uw Android hebben ontkoppeld (\'uitgeworpen\') van uw computer."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"USB-opslag uitschakelen"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Er is een probleem opgetreden tijdens het uitschakelen van de USB-opslag. Controleer of u de USB-host heeft losgekoppeld en probeer het opnieuw."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"SD-kaart formatteren"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Geen overeenkomende activiteiten gevonden"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"gebruiksstatistieken van component bijwerken"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Hiermee kunnen verzamelde gebruiksstatistieken van een component worden gewijzigd. Niet voor gebruik door normale toepassingen."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Staat het aanroepen van de standaardcontainerservice toe om inhoud te kopiëren. Niet voor gebruik door normale toepassingen."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Staat het aanroepen van de standaardcontainerservice toe om inhoud te kopiëren. Niet voor gebruik door normale toepassingen."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Tik twee keer voor zoomregeling"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Fout bij uitbreiden van widget"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Ga"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"De volgende toepassingen vragen toegang tot uw account, nu en in de toekomst."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Wilt u dit verzoek toestaan?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Toegangsverzoek"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Bestand kiezen"</string>
+ <string name="reset" msgid="2448168080964209908">"Opnieuw instellen"</string>
+ <string name="submit" msgid="1602335572089911941">"Verzenden"</string>
+ <string name="description_star" msgid="2654319874908576133">"favoriet"</string>
+ <string name="tether_title" msgid="6970447107301643248">"USB-tethering beschikbaar"</string>
+ <string name="tether_message" msgid="554549994538298101">"Selecteer \'Tetheren\' als u de gegevensverbinding van uw telefoon wilt delen met uw computer."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Tetheren"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Annuleren"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Er is een probleem opgetreden bij het tetheren."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"USB-tethering beschikbaar"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Selecteer dit om uw computer aan uw telefoon te tetheren."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Tethering opheffen"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Selecteer dit om de tethering van uw computer op te heffen."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Getetherde verbinding verbreken"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"U deelt de gegevensverbinding van uw telefoon met uw computer. Selecteer \'Verbinding verbreken\' om USB-tethering op te heffen."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Verbinding verbreken"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Annuleren"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Er is een probleem opgetreden bij het uitschakelen van tethering. Probeer het opnieuw."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index ce7ade5..e9b11fc 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"włączanie trybu samochodowego"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Zezwala aplikacji na włączanie trybu samochodowego."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"kończenie procesów w tle"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Zezwala aplikacji na kończenie procesów innych aplikacji w tle, nawet jeśli jest dużo pamięci."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"wymuszanie zatrzymywania innych aplikacji"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Zezwala aplikacji na wymuszanie zatrzymania innych aplikacji."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Pozwala na zmianę zebranych statystyk dotyczących baterii. Nie do wykorzystania przez normalne aplikacje."</string>
<string name="permlab_backup" msgid="470013022865453920">"kontrolowanie tworzenia i przywracania kopii zapasowych systemu"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Zezwala aplikacji na kontrolowanie mechanizmu tworzenia i przywracania kopii zapasowych systemu. Opcja nie jest przeznaczona dla zwykłych aplikacji."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"Tworzenie i przywracanie kopii zapasowej danych aplikacji"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Zezwala aplikacji na działanie w ramach mechanizmu tworzenia i przywracania kopii zapasowych systemu."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"wyświetlanie nieuwierzytelnionych okien"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Pozwala na tworzenie okien, które przeznaczone są do wykorzystania przez wewnętrzny interfejs użytkownika systemu. Nie do wykorzystania przez normalne aplikacje."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"wyświetlanie ostrzeżeń systemowych"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Pozwala na tworzenie powiązania z interfejsem najwyższego poziomu metody wejściowej. To uprawnienie nie powinno być nigdy wymagane przez zwykłe aplikacje."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"powiązanie z tapetą"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Umożliwia posiadaczowi powiązać interfejs najwyższego poziomu dla tapety. Nie powinno być nigdy potrzebne w przypadku zwykłych aplikacji."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interakcja z administratorem urządzenia"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Zezwala posiadaczowi na wysyłanie informacji o zamiarach do administratora urządzenia. Opcja nie powinna być nigdy potrzebna w przypadku zwykłych aplikacji."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"zmienianie orientacji ekranu"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Pozwala aplikacji na zmianę orientacji ekranu w dowolnym momencie. Nigdy nie powinno być potrzeby stosowania w normalnych aplikacjach."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"wysyłanie sygnałów systemu Linux do aplikacji"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Pozwala aplikacji na instalowanie nowych lub zaktualizowanych pakietów systemu Android. Szkodliwe aplikacje mogą to wykorzystać, aby dodać nowe aplikacje z arbitralnie nadanymi rozległymi uprawnieniami."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"usuwanie wszystkich danych aplikacji z pamięci podręcznej"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Pozwala aplikacji na zwalnianie pamięci telefonu przez usuwanie plików z katalogu pamięci podręcznej aplikacji. Dostęp jest bardzo ograniczony, z reguły do procesów systemu."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"czytanie plików dziennika systemu"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Umożliwia aplikacji czytanie różnych plików dziennika systemowego. Pozwala to na uzyskanie ogólnych informacji o czynnościach wykonywanych w telefonie, ale bez ujawniania danych osobowych lub osobistych informacji."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"czytanie/zapisywanie w zasobach należących do diagnostyki"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Pozwala aplikacji na zmianę danych właściciela zapisanych w telefonie. Szkodliwe aplikacje mogą to wykorzystać, aby wymazać lub zmienić dane właściciela."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"czytanie danych właściciela"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Pozwala aplikacji na czytanie danych właściciela zapisanych w telefonie. Szkodliwe aplikacje mogą to wykorzystać do odczytania danych właściciela."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"czytanie danych kalendarza"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Pozwala aplikacji na odczytywanie wszystkich wydarzeń z kalendarza, zapisanych w telefonie. Szkodliwe aplikacje mogą to wykorzystać do rozsyłania wydarzeń z kalendarza do innych ludzi."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"zapisywanie danych kalendarza"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Pozwala aplikacji na zmianę wydarzeń z kalendarza zapisanych w telefonie. Szkodliwe aplikacje mogą to wykorzystać, aby usunąć lub zmienić dane w kalendarzu."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"udawanie źródeł położenia dla testów"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Tworzenie pozorowanych źródeł ustalania położenia dla testów. Szkodliwe aplikacje mogą to wykorzystać, aby zastąpić prawdziwe położenie i/lub stan zwracany przez prawdziwe źródła, takie jak GPS lub dostawcy usługi sieciowej."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"dostęp do dodatkowych poleceń dostawcy informacji o lokalizacji"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Pozwala aplikacjom na podłączanie i odłączanie systemów plików w pamięciach przenośnych."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"formatowanie pamięci zewnętrznej"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Zezwala aplikacji na formatowanie wymiennych nośników."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"uzyskiwanie informacji o bezpiecznym magazynie"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Zezwala aplikacji na uzyskiwanie informacji o bezpiecznym magazynie."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"tworzenie bezpiecznego magazynu"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Zezwala aplikacji na tworzenie bezpiecznego magazynu."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"usuwanie bezpiecznego magazynu"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Zezwala aplikacji na usuwanie bezpiecznego magazynu."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"podłączanie/odłączanie bezpiecznego magazynu"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Zezwala aplikacji na podłączanie/odłączanie bezpiecznego magazynu."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"zmiana nazwy bezpiecznego magazynu"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Zezwala aplikacji na zmianę nazwy bezpiecznego magazynu."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"kontrolowanie wibracji"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Pozwala aplikacjom na kontrolowanie wibracji."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"kontrolowanie latarki"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Pozwala aplikacji na ustawianie wskazówek dotyczących rozmiaru tapety."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"resetowanie systemu do ustawień fabrycznych"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Pozwala aplikacji na całkowite zresetowanie systemu do ustawień fabrycznych, z wymazaniem wszystkich danych, konfiguracji oraz zainstalowanych aplikacji."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"ustawianie godziny"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Zezwala aplikacji na zmianę ustawienia zegara w telefonie."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"ustawianie strefy czasowej"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Pozwala aplikacji na zmianę strefy czasowej w telefonie."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"działanie jako usługa AccountManagerService"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"zapisywanie ustawień nazwy punktu dostępowego (APN, Access Point Name)"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Pozwala aplikacji na zmianę ustawień APN, takich jak serwer proxy oraz port dowolnego APN."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"zmienianie połączeń sieci"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Pozwala aplikacji na zmianę stanu połączeń sieciowych."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Zezwala aplikacji na zmianę stanu łączności sieciowej."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"zmiana łączności powiązanej"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Zezwala aplikacji na zmianę stanu powiązanej łączności sieciowej."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"zmienianie ustawienia używania danych w tle"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Zezwala aplikacji na zmianę ustawień użycia danych w tle."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"wyświetlanie stanu Wi-Fi"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"dostęp do systemu plików pamięci podręcznej"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Zezwala aplikacji na odczyt i zapis w systemie plików pamięci podręcznej."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Ogranicz liczbę prób wprowadzenia hasła"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Ogranicza dozwolone typy haseł użytkownika."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Monitoruj próby logowania"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Monitoruje nieudane próby zalogowania do urządzenia w celu wykonania określonego działania."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Resetuj hasło"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Wymusza podanie nowej wartości hasła, wymagając przekazania go użytkownikowi przez administratora przed zalogowaniem."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Wymuś zablokowanie"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Kontroluje, kiedy urządzenie jest blokowane, wymagając ponownego wprowadzenia hasła."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Usuń wszystkie dane"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Wykonuje reset fabryczny, usuwając wszystkie dane użytkownika bez żadnego potwierdzenia."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Dom"</item>
<item msgid="869923650527136615">"Komórka"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Wprowadź hasło, aby odblokować"</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Numer alarmowy"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Naciśnij Menu, aby odblokować."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Narysuj wzór, aby odblokować"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Połączenie alarmowe"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Poprawnie!"</string>
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Umożliwia aplikacji modyfikowanie historii lub zakładek przeglądarki zapisanych w telefonie. Złośliwe aplikacje mogą używać tej opcji do usuwania lub modyfikowania danych przeglądarki."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Modyfikowanie uprawnień przeglądarki dotyczących lokalizacji geograficznej"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Zezwala aplikacji na modyfikowanie uprawnień przeglądarki dotyczących lokalizacji geograficznej. Złośliwe aplikacje mogą używać tej opcji do wysyłania informacji o lokalizacji do dowolnych witryn internetowych."</string>
<string name="save_password_message" msgid="767344687139195790">"Czy chcesz, aby zapamiętać to hasło w przeglądarce?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Nie teraz"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Zapamiętaj"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"godzinę temu"</item>
<item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> godzin temu"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"wczoraj"</item>
<item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dni temu"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"Nie są wymagane żadne uprawnienia"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ukryj"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Pokaż wszystko"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Ładowanie..."</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"Pamięć masowa USB"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"Połączenie przez USB"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Telefon został podłączony do komputera przez port USB. Wybierz polecenie „Podłącz”, jeśli chcesz skopiować pliki między komputerem a kartą SD w telefonie."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Podłącz"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Nie podłączaj"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Telefon został połączony z komputerem za pośrednictwem USB. Wybierz poniższy przycisk, aby skopiować pliki między komputerem a kartą SD systemu Android."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Włącz nośnik USB"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Wystąpił problem z wykorzystaniem karty SD dla pamięci USB."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"Połączenie przez USB"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Wybierz, aby skopiować pliki do/z komputera"</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Wyłącz nośnik USB"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Wybierz, aby wyłączyć nośnik USB."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"Wyłącz nośnik USB"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Przed wyłączeniem nośnika USB upewnij się, że odłączono go od hosta USB. Wybierz „Wyłącz”, aby wyłączyć nośnik USB."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Wyłącz"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Anuluj"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Napotkano problem podczas wyłączania nośnika USB. Sprawdź, czy host USB został odłączony, a następnie spróbuj ponownie."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"Nośnik USB w użyciu"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Przed wyłączeniem nośnika USB upewnij się, że karta SD systemu Android została odłączona („wyjęta”) od komputera."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Wyłącz nośnik USB"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Wystąpił problem podczas wyłączania nośnika USB. Upewnij się, że host USB został odłączony, a następnie spróbuj ponownie."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"Formatuj kartę SD"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Nie znaleziono pasujących działań"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"aktualizowanie statystyk użycia komponentu"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Zezwala na modyfikacje zebranych statystyk użycia komponentu. Nieprzeznaczone dla zwykłych aplikacji."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Zezwala na wywoływanie domyślnej usługi kontenera w celu skopiowania zawartości. Opcja nie jest przeznaczona dla zwykłych aplikacji."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Zezwala na wywoływanie domyślnej usługi kontenera w celu skopiowania zawartości. Opcja nie jest przeznaczona dla zwykłych aplikacji."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Dotknij dwukrotnie, aby sterować powiększeniem"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Błąd podczas wyodrębniania widżetu"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Przejdź"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Co najmniej jedna z następujących aplikacji żąda uprawnień dostępu do Twojego konta – teraz i w przyszłości."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Chcesz zezwolić na to żądanie?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Żądanie dostępu"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Wybierz plik"</string>
+ <string name="reset" msgid="2448168080964209908">"Resetuj"</string>
+ <string name="submit" msgid="1602335572089911941">"Prześlij"</string>
+ <string name="description_star" msgid="2654319874908576133">"ulubione"</string>
+ <string name="tether_title" msgid="6970447107301643248">"Dostępne powiązanie USB"</string>
+ <string name="tether_message" msgid="554549994538298101">"Wybierz opcję „Powiąż”, aby udostępnić na komputerze połączenie transmisji danych telefonu."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Powiąż"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Anuluj"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Wystąpił problem podczas tworzenia powiązania."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"Dostępne powiązanie USB"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Wybierz, aby powiązać komputer z telefonem."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Anuluj powiązanie"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Wybierz, aby anulować powiązanie z komputerem."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Rozłącz powiązanie"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Komórkowe połączenie transmisji danych telefonu zostało udostępnione na komputerze. Wybierz opcję „Rozłącz”, aby rozłączyć powiązanie USB."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Rozłącz"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Anuluj"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Wystąpił problem podczas wyłączania powiązania. Spróbuj ponownie."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index e4e0d64..2a3dde3 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"activar modo de carro"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Permite a uma aplicação activar o modo de carro."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"eliminar processos em segundo plano"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Permite a uma aplicação eliminar processos em segundo plano de outras aplicações, mesmo que não existam problemas de falta de memória."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"forçar paragem de outras aplicações"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Permite a uma aplicação efectuar uma paragem forçada de outras aplicações."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Permite a modificação das estatísticas recolhidas sobre a bateria. Não se destina a utilização por aplicações normais."</string>
<string name="permlab_backup" msgid="470013022865453920">"controlar a cópia de segurança e restauro do sistema"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Permite que a aplicação controle o mecanismo de cópia de segurança e restauro do sistema. Não deve ser utilizado por aplicações normais."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"fazer uma cópia de segurança e restaurar os dados da aplicação"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Permite que a aplicação participe no mecanismo de cópia de segurança e restauro do sistema."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"apresentar janelas não autorizadas"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Permite a criação de janelas destinadas a utilização pela interface de utilizador interna do sistema. Não se destina a utilização por aplicações normais."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"apresentar alertas ao nível do sistema"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permite ao titular vincular a interface de nível superior a um método de entrada de som. Nunca deve ser necessário para aplicações normais."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"vincular a uma imagem de fundo"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permite ao titular vincular a interface de nível superior de uma imagem de fundo. Nunca deverá ser necessário para aplicações normais."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interagir com um administrador do dispositivo"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite ao titular enviar intenções para um administrador do dispositivo. Nunca deverá ser necessário para aplicações normais."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"mudar orientação do ecrã"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Permite a uma aplicação mudar a rotação do ecrã em qualquer momento. Nunca deve ser necessário para aplicações normais."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"enviar sinais Linux para aplicações"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Permite a uma aplicação instalar pacotes novos ou actualizados do Android. Algumas aplicações maliciosas podem utilizar este item para adicionar novas aplicações com autorizações arbitrariamente fortes."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"eliminar todos os dados da aplicações"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Permite a uma aplicação libertar espaço de armazenamento no telefone eliminando ficheiros no directório da cache da aplicação. Geralmente, o acesso é muito limitado para processamento do sistema."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"ler ficheiros de registo do sistema"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Permite a uma aplicação ler a partir dos diversos ficheiros de registo do sistema. Isto permite descobrir informações gerais sobre a forma como o utilizador usa o telefone, mas estas não devem conter quaisquer dados pessoais ou privados."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"ler/escrever em recursos propriedade de diag"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Permite a uma aplicação modificar os dados do proprietário do telefone armazenados no seu telefone. Algumas aplicações maliciosas podem utilizar este item para apagar ou modificar dados do proprietário."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"ler dados do proprietário"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Permite a uma aplicação modificar os dados do proprietário do telefone armazenados no seu telefone. Algumas aplicações maliciosas podem utilizar este item para ler dados do proprietário do telefone."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"ler dados do calendário"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Permite a uma aplicação ler todos os eventos do calendário armazenados no seu telefone. Algumas aplicações maliciosas podem utilizar este item para enviar os eventos do seu calendário a outras pessoas."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"escrever dados do calendário"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Permite a uma aplicação modificar os eventos do calendário armazenados no seu telefone. Algumas aplicações maliciosas podem utilizar este item para apagar ou modificar os dados do seu calendário."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"fontes de localização fictícias para teste"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Crie fontes de localização fictícias para fins de teste. Algumas aplicações maliciosas podem utilizar este item para substituir a localização e/ou o estado devolvido por fontes de localização reais, tais como fornecedores de GPS ou de Rede."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"aceder a comandos adicionais do fornecedor de localização"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Permite à aplicação montar e desmontar sistemas de ficheiros para armazenamento removível."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"formatar armazenamento externo"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Permite a uma aplicação formatar o armazenamento removível."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"obter informações sobre o armazenamento seguro"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Permite à aplicação obter informações sobre o armazenamento seguro."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"criar armazenamento seguro"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Permite à aplicação criar armazenamento seguro."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"destruir armazenamento seguro"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Permite à aplicação destruir o armazenamento seguro."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"instalar/desinstalar armazenamento seguro"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Permite à aplicação instalar/desinstalar o armazenamento seguro."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"mudar o nome do armazenamento seguro"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Permite à aplicação mudar o nome do armazenamento seguro."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"controlar vibrador"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Permite à aplicação controlar o vibrador."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"controlar lanterna"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Permitir que a aplicação defina as sugestões de tamanho da imagem de fundo do sistema."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"repor definições de fábrica do sistemas"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Permite a uma aplicação repor totalmente as definições de fábrica do sistema, apagando todos os dados, configurações e aplicações instaladas."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"definir hora"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Permite a uma aplicação alterar a hora do telefone."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"definir fuso horário"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Permite a uma aplicação mudar o fuso horário do telefone."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"funciona como Serviço de Gestor de Conta"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"escrever definições de Nome do ponto de acesso"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Permite a uma aplicaçaõ modificar as definições de APN, tais como Proxy e Porta de qualquer APN."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"mudar conectividade de rede"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Permite a uma aplicação mudar o estado da conectividade de rede."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Permite a uma aplicação alterar o estado da conectividade de rede."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"alterar conectividade associada"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Permite a uma aplicação alterar o estado da conectividade de rede associada."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"mudar definição de utilização de dados de segundo plano"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Permite a uma aplicação mudar a definição de utilização de dados de segundo plano."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"ver estado de Wi-Fi"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"aceder ao sistema de ficheiros da cache"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Permite a uma aplicação ler e escrever no sistema de ficheiros da cache."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Limitar palavra-passe"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Restrinja os tipos de palavras-passe que está autorizado a utilizar."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Ver tentativas de início de sessão"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"O monitor falhou as tentativas de iniciar sessão no dispositivo para efectuar algumas acções."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Repor palavra-passe"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Force a palavra-passe para um novo valor, sendo necessário que o administrador lho forneça antes de poder iniciar sessão."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Forçar bloqueio"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Controle quando o dispositivo é bloqueado, sendo necessário reintroduzir a respectiva palavra-passe."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Apagar todos os dados"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Efectue uma reposição de fábrica, eliminando todos os dados sem qualquer confirmação."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Residência"</item>
<item msgid="869923650527136615">"Móvel"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Introduza a palavra-passe para desbloquear"</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Número de emergência"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Prima Menu para desbloquear."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Desenhar padrão para desbloquear"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Chamada de emergência"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Correcto!"</string>
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Permite que uma aplicação modifique o histórico e os marcadores do browser armazenados no telefone. As aplicações maliciosas podem utilizar esta permissão para apagar ou modificar os dados do browser."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Modificar permissões de localização geográfica do Navegador"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Permite a uma aplicação modificar as permissões de localização geográfica do Navegador. As aplicações mal intencionadas podem utilizar isto para enviar informações de localização para Web sites arbitrários."</string>
<string name="save_password_message" msgid="767344687139195790">"Quer que o browser memorize esta palavra-passe?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Agora não"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Lembrar"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"Há 1 hora"</item>
<item quantity="other" msgid="2467273239587587569">"Há <xliff:g id="COUNT">%d</xliff:g> horas"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"ontem"</item>
<item quantity="other" msgid="2479586466153314633">"Há <xliff:g id="COUNT">%d</xliff:g> dias"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"Não são necessárias permissões"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ocultar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostrar tudo"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"A carregar..."</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"Armazenamento em massa USB "</string>
<string name="usb_storage_title" msgid="5901459041398751495">"Ligado através de USB"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Ligou o telefone ao computador através de USB. Seleccione \"Montar\" se pretender copiar ficheiros entre o computador e o cartão SD do telefone."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Montar"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Não montar"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Ligou o telefone ao computador através de USB. Seleccione o botão abaixo se pretender copiar ficheiros entre o computador e o cartão SD do Android."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Activar armazenamento USB"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Existe um problema ao utilizar o cartão SD para armazenamento USB."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"Ligado através de USB"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Seleccione para copiar ficheiro para/do seu computador."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Desactivar armazenamento USB"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Opte por desactivar o armazenamento USB."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"Desactivar armazenamento USB"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Antes de desactivar o armazenamento USB, certifique-se de que o desmontou no anfitrião USB. Seleccione \"Desactivar\" para desactivar o armazenamento USB."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Desactivar"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Cancelar"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Detectámos um problema ao desactivar o armazenamento USB. Verifique para se certificar de que desmontou o anfitrião USB e, em seguida, tente novamente."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"O armazenamento USB está a ser utilizado"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Antes de desactivar o armazenamento USB, certifique-se de que desinstalou (\"ejectou\") o cartão SD do Android do computador."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Desactivar armazenamento USB"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Ocorreu um problema ao desactivar o armazenamento USB. Confirme se desinstalou o anfitrião USB e, em seguida, tente novamente."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"Formatar cartão SD"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Nenhuma actividade correspondente encontrada"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"actualizar estatísticas de utilização de componentes"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Permite a modificação de estatísticas de utilização de componentes recolhidas. Não se destina a utilização por aplicações normais."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Permite invocar o serviço de contentor predefinido para copiar conteúdo. Não se destina a ser utilizado por aplicações normais."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Permite invocar o serviço de contentor predefinido para copiar conteúdo. Não se destina a ser utilizado por aplicações normais."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Tocar duas vezes para controlar o zoom"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Erro ao inchar miniaplicação"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Ir"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Uma ou várias das aplicações seguintes solicitam permissão para aceder à sua conta, agora e no futuro."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Pretende autorizar este pedido?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Pedido de acesso"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Escolher ficheiro"</string>
+ <string name="reset" msgid="2448168080964209908">"Repor"</string>
+ <string name="submit" msgid="1602335572089911941">"Enviar"</string>
+ <string name="description_star" msgid="2654319874908576133">"favorito"</string>
+ <string name="tether_title" msgid="6970447107301643248">"Associação USB disponível"</string>
+ <string name="tether_message" msgid="554549994538298101">"Seleccione \"Associar\" se pretender partilhar a ligação de dados do telefone com o computador."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Associar"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Cancelar"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Existe um problema na associação."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"Associação USB disponível"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Seleccione para associar o computador ao telefone."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Desassociar"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Seleccione para desassociar o computador."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Desligar associação"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Tem estado a partilhar a ligação de dados móvel do telefone com o computador. Seleccione \"Desligar\" para desligar a associação USB."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Desligar"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Cancelar"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Foi detectado um problema ao desactivar a Associação. Tente novamente."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index f81f332..b71df63 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"ativar o modo de carro"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Permite que um aplicativo ative o modo de carro."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"interromper processos em segundo plano"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Permite que um aplicativo interrompa processos em segundo plano de outros aplicativos, mesmo se a memória não estiver baixa."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"forçar a interrupção de outros aplicativos"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Permite que um aplicativo pare forçosamente outros aplicativos."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Permite a modificação das estatísticas de bateria coletadas. Não deve ser usado por aplicativos normais."</string>
<string name="permlab_backup" msgid="470013022865453920">"controlar backup e restauração do sistema"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Permite que o aplicativo controle o mecanismo de backup e restauração do sistema. Não deve ser usado por aplicativos normais."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"fazer backup e restaurar os dados do aplicativo"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Permite que o aplicativo participe no mecanismo de backup e restauração do sistema."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"exibir janelas não autorizadas"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Permite a criação de janelas destinadas ao uso pela interface de usuário do sistema interno. Não deve ser usado por aplicativos normais."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"exibir alertas de nível do sistema"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Permite que o detentor se sujeite à interface de nível superior de um método de entrada. Aplicativos normais não devem precisar disso em momento algum."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"sujeitar-se a um plano de fundo"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Permite que o detentor se sujeite à interface de nível superior de um plano de fundo. Aplicativos normais não devem precisar disso em momento algum."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"interagir com o administrador de um dispositivo"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite que o detentor envie tentativas ao administrador de um dispositivo. Não é necessário para aplicativos normais."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"alterar orientação da tela"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Permite que um aplicativo altere a rotação da tela a qualquer momento. Aplicativos normais não devem precisar disso em momento algum."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"enviar sinais de Linux para os aplicativos"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Permite que um aplicativo instale pacotes novos ou atualizados do Android. Aplicativos maliciosos podem usar isso para adicionar novos aplicativos com permissões arbitrariamente avançadas."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"excluir todos os dados de cache do aplicativo"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Permite que um aplicativo libere o espaço de armazenamento do telefone excluindo arquivos no diretório de cache do aplicativo. O acesso é normalmente muito restrito para o processo do sistema."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"ler arquivos de registro do sistema"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Permite que um aplicativo leia os diversos arquivos de registro do sistema. Isso permite que ele descubra informações gerais sobre o que você está fazendo com o telefone, porém esses arquivos não devem conter informações pessoais ou privadas."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"ler/gravar em recursos pertencentes ao diag"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Permite que um aplicativo modifique os dados de proprietário do telefone armazenados no seu telefone. Aplicativos maliciosos podem usar isso para apagar ou modificar dados do proprietário."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"ler dados do proprietário"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Permite que um aplicativo leia os dados de proprietário do telefone armazenados no seu telefone. Aplicativos maliciosos podem usar isso para ler os dados de proprietário do telefone."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"ler dados da agenda"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Permite que um aplicativo leia todos os eventos da agenda armazenados no seu telefone. Aplicativos maliciosos podem usar isso para enviar eventos da sua agenda para outras pessoas."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"gravar dados da agenda"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Permite que um aplicativo modifique os eventos da agenda armazenados no seu telefone. Aplicativos maliciosos podem usar isso para apagar ou modificar os seus dados da agenda."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"fontes de locais fictícios para teste"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Cria fontes de locais fictícios para teste. Aplicativos maliciosos podem usar isso para substituir o local e/ou o status retornado pelas fontes de locais reais como GPS ou provedores de rede."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"acessar comandos extras do provedor de localização"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Permite que o aplicativo monte e desmonte arquivos de sistema para armazenamento removível."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"formatar armazenamento externo"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Permite que o aplicativo formate o armazenamento removível."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"obter informações sobre o armazenamento seguro"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Permite que o aplicativo obtenha informações sobre armazenamento seguro."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"criar armazenamento seguro"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Permite que o aplicativo crie um armazenamento seguro."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"destrói o armazenamento seguro"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Permite que o aplicativo destrua o armazenamento seguro."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"conectar/desconectar armazenamento seguro"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Permite que o aplicativo conecte/desconecte o armazenamento seguro."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"renomear o armazenamento seguro"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Permite que o aplicativo renomeie o armazenamento seguro."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"controlar o vibrador"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Permite que o aplicativo controle o vibrador."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"controlar lanterna"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Permite que o aplicativo defina as dicas de tamanho do papel de parede do sistema."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"redefinir o sistema para os padrões de fábrica"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Permite que um aplicativo redefina completamente o sistema para as configurações de fábrica, apagando todos os dados, configuração e aplicativos instalados."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"definir hora"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Permite que um aplicativo altere o horário do telefone."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"definir fuso horário"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Permite que um aplicativo altere o fuso horário do telefone."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"agir como AccountManagerService"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"gravar as configurações do Nome do ponto de acesso"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Permite que um aplicativo modifique as configurações de APN, como Proxy e Porta de qualquer APN."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"alterar conectividade da rede"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Permite que um aplicativo altere o estado da conectividade de rede."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Permite que um aplicativo altere o estado da conectividade de rede."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"alterar conectividade vinculada"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Permite que um aplicativo altere o estado da conectividade de rede vinculada."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"alterar configuração de uso dos dados de segundo plano"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Permite que um aplicativo altere a configuração de uso dos dados de segundo plano."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"visualizar estado da rede Wi-Fi"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"acessar o sistema de arquivos de cache"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Permite que um aplicativo leia e grave no sistema de arquivos de cache."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Limitar senha"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Restringe os tipos de senha que você tem permissão de usar."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Exibir tentativas de login"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Monitora as tentativas malsucedidas de login no aparelho para executar alguma ação."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Redefinir senha"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Força a sua senha para um novo valor, exigindo que o administrador a forneça antes que você possa fazer login."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Forçar bloqueio"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Controla o bloqueio do aparelho, exigindo que a senha seja digitada novamente."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Apagar todos os dados"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Execute uma redefinição de fábrica, excluindo todos os seus dados sem qualquer confirmação."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Residencial"</item>
<item msgid="869923650527136615">"Celular"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Digite a senha para desbloquear"</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Número de emergência"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Pressione Menu para desbloquear."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Desenhe o padrão para desbloquear"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Chamada de emergência"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Correto!"</string>
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Permite que um aplicativo modifique o histórico ou os favoritos do Navegador armazenados no seu telefone. Aplicativos maliciosos podem usar isso para apagar ou modificar os dados do seu Navegador."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Modifique as permissões de geolocalização do seu navegador"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Permite que um aplicativo modifique as permissões de geolocalização do navegador. Aplicativos maliciosos podem usar isso para permitir o envio de informações de localização a sites arbitrários."</string>
<string name="save_password_message" msgid="767344687139195790">"Deseja que o navegador lembre desta senha?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Agora não"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Lembrar"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"1 hora atrás"</item>
<item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> horas atrás"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"ontem"</item>
<item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dias atrás"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"Nenhuma permissão necessária"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Ocultar"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Mostrar todas"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Carregando..."</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"Armazenamento USB em massa"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"Conectado por USB"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Você conectou o telefone ao computador via USB. Selecione \"Montar\" se quiser copiar arquivos entre o computador e o cartão SD do seu telefone."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Montar"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Não montar"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Você conectou o telefone ao computador via USB. Selecione o botão abaixo se quiser copiar arquivos entre o computador e o cartão SD do seu Android."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Ativar o armazenamento USB"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Há um problema com o uso do seu cartão SD para armazenamento USB."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"Conectado por USB"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Selecione para copiar arquivos para/do seu computador."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Desativar o armazenamento USB"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Selecione para desativar o armazenamento USB."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"Desativar o armazenamento USB"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Antes de desativar o armazenamento USB, desmonte o host USB. Selecione \"Desativar\" para desativar o armazenamento USB."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Desativar"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Cancelar"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Encontramos um problema ao desativar o armazenamento USB. Verifique se desmontou o host USB e tente novamente."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"Armazenamento USB em uso"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Antes de desativar o armazenamento USB, verifique se desconectou (“ejetou”) o cartão SD do Android do computador."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Desativar o armazenamento USB"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Houve um problema ao desativar o armazenamento USB. Verifique se desconectou o host USB e tente novamente."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"Formatar cartão SD"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Nenhum atividade correspondente foi encontrada"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"atualizar estatísticas de uso do componente"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Permite a modificação das estatísticas de uso do componente coletadas. Não deve ser usado por aplicativos normais."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Permite a invocação do serviço de recipiente padrão para copiar o conteúdo. Não deve ser usado por aplicativos normais."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Permite a invocação do serviço de recipiente padrão para copiar o conteúdo. Não deve ser usado por aplicativos normais."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Toque duas vezes para ter controle do zoom"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Erro ao aumentar o widget"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Ir"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"O aplicativo a seguir ou outros aplicativos solicitam permissão para acessar a sua conta, agora e no futuro."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Deseja permitir essa solicitação?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Solicitação de acesso"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Escolher arquivo"</string>
+ <string name="reset" msgid="2448168080964209908">"Redefinir"</string>
+ <string name="submit" msgid="1602335572089911941">"Enviar"</string>
+ <string name="description_star" msgid="2654319874908576133">"favorito"</string>
+ <string name="tether_title" msgid="6970447107301643248">"Vínculo USB disponível"</string>
+ <string name="tether_message" msgid="554549994538298101">"Selecione \"Vincular\" se quiser compartilhar a conexão de dados do seu telefone com o seu computador."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Vincular"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Cancelar"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Há um problema com o vínculo."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"Vínculo USB disponível"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Selecione para vincular o seu computador ao seu telefone."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Desvincular"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Selecione para desvincular o seu computador."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Desconectar vínculo"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Você está compartilhando a conexão de dados de celular do seu telefone com o seu computador. Selecione \"Desconectar\" para desconectar o vínculo USB."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Desconectar"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Cancelar"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Encontramos um problema ao desativar o Vínculo. Tente novamente."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 3864283..93fff41 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -185,14 +185,12 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"Позволяет приложению запускать процесс отладки другого приложения. Вредоносные приложения могут использовать эту возможность для остановки других приложений."</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"изменять настройки пользовательского интерфейса"</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_enableCarMode" msgid="5684504058192921098">"включить режим громкой связи"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Позволяет программе включить режим громкой связи."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"завершать фоновые процессы"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Позволяет программе завершать фоновые процессы других программ, даже если память не заполнена."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"принудительно закрывать другие программы"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Позволяет программе принудительно останавливать другие программы."</string>
<string name="permlab_forceBack" msgid="1804196839880393631">"принудительно закрывать приложения"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"Позволяет приложению принудительно закрыть или вернуть в исходное состояние процессы, выполняемые в активном режиме. Не требуется для обычных приложений."</string>
<string name="permlab_dump" msgid="1681799862438954752">"извлекать данные о внутреннем состоянии системы"</string>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Позволяет изменять собранную статистику батареи. Не предназначено для использования обычными приложениями."</string>
<string name="permlab_backup" msgid="470013022865453920">"управление резервным копированием и восстановлением системы"</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="permlab_systemAlertWindow" msgid="3372321942941168324">"показывать оповещения системного уровня"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Позволяет выполнять привязку к интерфейсу ввода верхнего уровня. Не требуется для обычных приложений."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"связать с фоновым рисунком"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Разрешает выполнять привязку к интерфейсу фонового рисунка верхнего уровня. Не требуется для обычных приложений."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"взаимодействовать с администратором устройства"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Позволяет владельцу отправлять целевые значения администратору устройства. Никогда не используется обычными приложениями."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"изменять ориентацию экрана"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Позволяет приложению изменять ориентацию экрана в любое время. Не требуется для обычных приложений."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"отправлять приложениям сигналы Linux"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Позволяет приложению устанавливать новые или обновленные пакеты Android. Вредоносные приложения могут использовать эту возможность для добавления новых приложений со сколь угодно высоким уровнем разрешения."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"удалять все данные из кэша приложений"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Позволяет приложению освобождать память телефона с помощью удаления файлов из каталога кэша приложений. Обычно это разрешается только системным процессам."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"считывать системные файлы журналов"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Позволяет приложению считывать информацию из различных журналов системы. Приложение может получить сведения о работе пользователя с телефоном, но они не должны содержать какой-либо личной или конфиденциальной информации."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"считывать/записывать данные в ресурсы, принадлежащие группе диагностики"</string>
@@ -279,10 +281,13 @@
<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>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Позволяет приложению считывать все события календаря, сохраненные на телефоне. Вредоносные приложения могут использовать эту возможность для передачи ваших событий календаря посторонним лицам."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"записывать данные календаря"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Позволяет приложению изменять события календаря, сохраненные на телефоне. Вредоносные приложения могут использовать эту возможность для удаления или изменения событий календаря."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"копировать источники мест для проверки"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Создавать копии источников данных о местоположении для проверки. Вредоносные приложения могут использовать эту возможность для перезаписи места и/или состояния, возвращаемого действительными источниками данных о местоположении, такими как GPS или операторы связи."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"получать доступ к дополнительным командам источника данных о местоположении"</string>
@@ -311,6 +316,16 @@
<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_asec_access" msgid="1070364079249834666">"получать сведения о защищенном хранилище"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Позволяет программе получать сведения о защищенном хранилище."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"создать защищенное хранилище"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Позволяет программам создавать защищенные хранилища."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"удалять защищенное хранилище"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Позволяет программе удалять защищенные хранилища."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"подключать / отключать защищенное хранилище"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Позволяет программе подключать и отключать защищенные хранилища."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"переименовать защищенное хранилище"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Позволяет программам переименовывать защищенные хранилища."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"управлять вибровызовом"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Позволяет приложению управлять виброзвонком."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"управлять вспышкой"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Позволяет данному приложению устанавливать советы по размеру фоновых рисунков."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"восстанавливать параметры системы по умолчанию, установленные на заводе-изготовителе"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Позволяет приложению восстановить стандартные настройки системы, удалив все данные, конфигурацию и установленные приложения."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"установить время"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Позволяет программе изменять время на телефоне."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"настраивать часовой пояс"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Позволяет приложению изменять часовой пояс телефона."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"выступать в качестве службы управления аккаунтом"</string>
@@ -364,7 +381,9 @@
<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="permdesc_changeNetworkState" msgid="4199958910396387075">"Позволяет программе изменять состояние сетевого канала."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"изменить подключение к компьютеру"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Позволяет программе изменять состояние подключенного сетевого канала."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"изменять настройки использования данных в фоновом режиме"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Позволяет приложению изменять настройку использования данных в фоновом режиме."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"просматривать состояние Wi-Fi"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"получать доступ к кэшу файловой системы"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Разрешает программам доступ для записи и чтения к кэшу файловой системы."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Ограничить пароль"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Ограничить типы паролей, доступных для использования."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Просмотр попыток входа"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Мониторинг неудачных попыток подключения к устройству для выполнения определенных действий."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Сбросить пароль"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Принудительно изменить пароль, который администратор должен будет сообщить вам, чтобы вы смогли выполнить вход."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Принудительная блокировка"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Управление блокировкой устройства, требующей ввода пароля."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Удалить все данные"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Выполнить сброс к начальным настройкам с удалением всех данных без запроса подтверждения."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Домашний"</item>
<item msgid="869923650527136615">"Мобильный"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Введите пароль для разблокировки"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Неверный PIN-код!"</string>
<string name="keyguard_label_text" msgid="861796461028298424">"Для разблокировки нажмите \"Меню\", а затем 0."</string>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Экстренная служба"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Для разблокировки нажмите \"Меню\"."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Для разблокировки введите графический ключ"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Вызов службы экстренной помощи"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<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>
@@ -513,7 +543,7 @@
<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="emergency_calls_only" msgid="6733978304386365407">"Только вызовы службы экстренной помощи"</string>
+ <string name="emergency_calls_only" msgid="6733978304386365407">"Только вызовы экстренных служб"</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_instructions" msgid="635967534992394321">"См. руководство пользователя или свяжитесь со службой поддержки."</string>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"АБВ"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Разрешает приложению считывать все URL, посещенные браузером, и все его закладки."</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"записывать историю и закладки браузера"</string>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Разрешает приложению изменять историю и закладки браузера, сохраненные в вашем телефоне. Вредоносное ПО может пользоваться этим, чтобы стирать или изменять данные вашего браузера."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Изменить разрешения браузера для доступа к географическому местоположению"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Позволяет программе изменять разрешения браузера для доступа к географическому положению. Вредоносные программы могут пользоваться этим для отправки информации о местоположении на некоторые сайты."</string>
<string name="save_password_message" msgid="767344687139195790">"Вы хотите, чтобы браузер запомнил этот пароль?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Не сейчас"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Запомнить"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"1 час назад"</item>
<item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ч. назад"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"вчера"</item>
<item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> дн. назад"</item>
@@ -739,21 +779,27 @@
<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>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"Запоминающее устройство USB"</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="4796759646167247178">"Телефон подключен к компьютеру через порт USB. Нажмите кнопку ниже, если необходимо копировать файлы с компьютера на SD-карту устройства Android (или наоборот)."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Включить USB-накопитель"</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_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>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Перед выключением USB-накопителя обязательно отключите USB-хост. Выберите \"Выключить\", чтобы выключить USB-накопитель."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Выключить"</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_title" msgid="660129851708775853">"USB-накопитель используется"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Перед отключением USB-накопителя убедитесь, что SD-карта устройства Android была отключена от компьютера."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Выключить USB-накопитель"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"При выключении USB-накопителя произошла неполадка. Убедитесь, что USB-хост отключен, и повторите попытку."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Подходящих действий не найдено"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"обновлять статистику использования компонентов"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Позволяет изменять собранную статистику использования компонентов. Не предназначено для использования обычными приложениями."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Позволяет вызывать службу контейнера для копирования содержания. Не предназначена для обычных программ."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Позволяет вызывать службу контейнера для копирования содержания. Не предназначена для обычных программ."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Нажмите дважды для изменения масштаба"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Ошибка при наполнении виджета"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Выбрать"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Одна или несколько программ требуют разрешения для доступа к вашему аккаунту сейчас и в дальнейшем."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Разрешить этот запрос?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Запрос доступа"</string>
<string name="allow" msgid="7225948811296386551">"Разрешить"</string>
<string name="deny" msgid="2081879885755434506">"Отклонить"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"Разрешение запрошено"</string>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Выбрать файл"</string>
+ <string name="reset" msgid="2448168080964209908">"Сбросить"</string>
+ <string name="submit" msgid="1602335572089911941">"Отправить"</string>
+ <string name="description_star" msgid="2654319874908576133">"избранное"</string>
+ <string name="tether_title" msgid="6970447107301643248">"USB-подключение доступно"</string>
+ <string name="tether_message" msgid="554549994538298101">"Выберите \"Подключить\", если вы хотите разрешить использовать на компьютере подключение для передачи данных, установленное на телефоне."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Подключение"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Отмена"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Возникла ошибка при подключении."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"USB-подключение доступно"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Выберите, чтобы подключить телефон к компьютеру."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Отключить"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Выберите, чтобы разорвать подключение к компьютеру."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Разорвать подключение"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Подключение для передачи данных на телефоне используется на компьютере. Выберите \"Отключить\", чтобы разорвать USB-подключение."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Отключить"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Отмена"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"При разрыве подключения возникла неполадка. Пожалуйста, повторите попытку."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 1737414..aa4bcb4 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"aktivera trafikläge"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Tillåter att ett program aktiverar trafikläge."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"avbryt bakgrundsprocesser"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Tillåter att ett program avslutar bakgrundsprocesser för andra program även om det inte finns för lite ledigt minne."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"framtvinga avslutning av andra program"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Tillåter att ett program framtvingar avslutning av andra program."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Tillåter att samlad batteristatistik ändras. Används inte av vanliga program."</string>
<string name="permlab_backup" msgid="470013022865453920">"kontrollera säkerhetskopiering och återställning av systemet"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Tillåter att programmet styr över systemets mekanism för säkerhetskopiering och återställning. Används inte av vanliga program."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"Säkerhetskopiera och återställ programmets data"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Tillåter att programmet deltar i systemets mekanism för säkerhetskopiering och återställning."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"visa otillåtna fönster"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Tillåter att fönster skapas och används av det interna systemgränssnittet. Används inte av vanliga program."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"visa varningar på systemnivå"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Innehavaren tillåts att binda till den översta nivåns gränssnitt för en inmatningsmetod. Ska inte behövas för vanliga program."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"binda till en bakgrund"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Innehavaren tillåts att binda till den översta nivåns gränssnitt för en bakgrund. Ska inte behövas för vanliga program."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"arbeta med en enhetsadministratör"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Tillåter att innehavaren skickar avsikter till en enhetsadministratör. Vanliga program behöver aldrig göra detta."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"ändra bildskärmens rikting"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Tillåter att ett program när som helst ändrar skärmens rotering. Behövs inte för vanliga program."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"skicka Linux-signaler till program"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Tillåter att ett program installerar nya eller uppdaterade Android-paket. Skadliga program kan använda detta för att lägga till nya program med godtyckliga och starka behörigheter."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"ta bort cacheinformation för alla program"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Tillåter att ett program frigör lagringsutrymme i telefonen genom att ta bort filer i programmets katalog för cachelagring. Åtkomst är mycket begränsad, vanligtvis till systemprocesser."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"läsa systemets loggfiler"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Tillåter att ett program läser från systemets olika loggfiler. Det innebär att programmet kan upptäcka allmän information om vad du gör med telefonen, men den bör inte innehålla personlig eller privat information."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"läsa/skriva till resurser som ägs av diag"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Tillåter att ett program ändrar information om telefonens ägare som har lagrats på din telefon. Skadliga program kan använda detta för att radera eller ändra ägaruppgifter."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"läsa information om ägare"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Tillåter att ett program läser information om telefonens ägare som har lagrats på telefonen. Skadliga program kan använda detta för att läsa telefonens ägaruppgifter."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"läsa kalenderinformation"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Tillåter att ett program läser alla händelser i kalendern som har lagrats på din telefon. Skadliga program kan använda detta för att skicka din kalender till andra personer."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"skriva kalenderdata"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Tillåter att ett program ändrar kalenderuppgifterna som har lagrats på din telefon. Skadliga program kan använda detta för att radera eller ändra kalenderuppgifter."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"skenplatser för att testa"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Skapa skenplatser för att testa. Skadliga program kan använda detta för att åsidosätta platsen och/eller statusen som returneras av riktiga platser, till exempel GPS- eller nätverksleverantörer."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"få åtkomst till extra kommandon för platsleverantör"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Tillåter att programmet monterar och demonterar filsystem för flyttbara lagringsmedia."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"formatera extern lagring"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Tillåter att programmet formaterar flyttbara lagringsmedia."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"få information om säker lagring"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Tillåter att programmet får information om säker lagring."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"skapa säker lagring"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Tillåter att programmet skapar säker lagring."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"förstör säker lagring"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Tillåter att programmet förstör säker lagring."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"montera/avmontera säker lagring"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Tillåter att programmet monterar/avmonterar säker lagring."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"byt namn på säker lagring"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Tillåter att programmet byter namn på säker lagring."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"kontrollera vibration"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Tillåter att programmet styr vibratorn."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"styra lampa"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Tillåter att programmet ger tips om systemets bakgrundsstorlek."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"återställa systemets fabriksinställningar"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Tillåter att ett program helt återställer systemets fabriksinställningar. Alla data, inställningar och installerade program raderas."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"ange tid"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Tillåter att ett program ändrar telefonens tid."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"ange tidszon"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Tillåter att ett program ändrar telefonens tidszon."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"fungera som AccountManagerService"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"skriva inställningar för åtkomstpunktens namn"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Tillåter att ett program ändrar APN-inställningarna, till exempel Proxy och Port för alla APN."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"ändra nätverksanslutning"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Tillåter att ett program ändrar statusens nätverksanslutning."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Tillåter att ett program ändrar statusens för en kopplad nätverksanslutning."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"ändra sammanlänkad anslutning"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Tillåter att ett program ändrar statusens för en sammanlänkad nätverksanslutning."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"ändra inställningar för användning av bakgrundsdata"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Tillåter att ett program ändrar inställningen för användning av bakgrundsdata."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"visa Wi-Fi-status"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"åtkomst till cachefilsystemet"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Tillåter att ett program läser och skriver till cachefilsystemet."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Begränsa lösenord"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Begränsar vilka typer av lösenord som får användas."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Visa inloggningsförsök"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Övervaka misslyckade inloggningsförsök på enheten för att utföra åtgärder."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Återställ lösenord"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Framtvinga ett nytt värde för ditt lösenord. Kräver att administratören tillhandahåller det innan du kan logga in."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Framtvinga låsning"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Kontrollera när enheten låses, vilket kräver att du anger lösenordet igen."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Radera alla data"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Återställ fabriksinställningarna och ta bort alla data utan någon bekräftelse."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Hem"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Ange lösenord för att låsa upp"</string>
<string name="keyguard_password_wrong_pin_code" msgid="1295984114338107718">"Fel PIN-kod!"</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>
@@ -504,6 +532,8 @@
<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>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Tillåter att ett program ändrar webbläsarhistoriken och bokmärkena i din telefon. Skadliga program kan använda detta för att ta bort eller ändra data i webbläsaren."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Ändra geografisk plats för webbläsaren"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Tillåter att ett program ändrar webbläsarens behörigheter för geografisk plats. Skadliga program kan använda detta för att tillåta att platsinformation skickas till godtyckliga webbplatser."</string>
<string name="save_password_message" msgid="767344687139195790">"Vill du att webbläsaren ska komma ihåg lösenordet?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Inte nu"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Kom ihåg"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"för 1 timme sedan"</item>
<item quantity="other" msgid="2467273239587587569">"för <xliff:g id="COUNT">%d</xliff:g> timmar sedan"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"igår"</item>
<item quantity="other" msgid="2479586466153314633">"för <xliff:g id="COUNT">%d</xliff:g> dagar sedan"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"Inga behörigheter krävs"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Dölj"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Visa alla"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Läser in…"</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"USB-masslagring"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB-ansluten"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Du har anslutit telefonen till datorn via USB. Välj Montera om du vill kopiera filer mellan datorn och telefonens SD-kort."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Montera"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Montera inte"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Du har anslutit telefonen till datorn via USB. Välj knappen nedan om du vill kopiera filer mellan datorn och SD-kortet i din Android."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"Aktivera USB-lagring"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"Det gick inte att använda ditt SD-kort för USB-lagring."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB-ansluten"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Välj om du vill kopiera filer till/från din dator."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"Inaktivera USB-lagring"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"Välj om USB-lagring ska inaktiveras."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"Inaktivera USB-lagring"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"Innan du inaktiverar USB-lagring måste du kontrollera att du har demonterat USB-värden. Välj Inaktivera om du vill inaktivera USB-lagring."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Inaktivera"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"Avbryt"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"Ett problem uppstod när USB-lagringsplatsen skulle inaktiveras. Kontrollera att USB-värden har demonterats och försök igen."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"USB-lagret används"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"Kontrollera att du har demonterat (\"matat ut\") Android-telefonens SD-kort från datorn, innan du inaktiverar USB-lagring."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Inaktivera USB-lagring"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Ett problem uppstod när USB-lagringsplatsen skulle inaktiveras. Kontrollera att USB-värden har demonterats och försök igen."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"Formatera SD-kort"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Inga matchande aktiviteter hittades"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"uppdatera statistik över användning av komponenter"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Tillåter att samlad komponentstatistik ändras. Används inte av vanliga program."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Tillåter att innehåll kopieras genom att standardbehållartjänsten startas. Vanliga program behöver aldrig göra detta."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Tillåter att innehåll kopieras genom att standardbehållartjänsten startas. Vanliga program behöver aldrig göra detta."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Peka två gånger för zoomkontroll"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Fel när widgeten expanderades"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Kör"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Följande program begär behörighet till konto, både nu och i framtiden."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Vill du tillåta den här begäran?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Begäran om åtkomst"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Välj fil"</string>
+ <string name="reset" msgid="2448168080964209908">"Återställ"</string>
+ <string name="submit" msgid="1602335572089911941">"Skicka"</string>
+ <string name="description_star" msgid="2654319874908576133">"favorit"</string>
+ <string name="tether_title" msgid="6970447107301643248">"USB-sammanlänkning tillgänglig"</string>
+ <string name="tether_message" msgid="554549994538298101">"Välj \"Sammanlänka\" om du vill dela telefonens dataanslutning med en dator."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Sammanlänka"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"Avbryt"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Ett problem uppstod vid sammanlänkning."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"USB-sammanlänkning tillgänglig"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Sammanlänka datorn med din telefon."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Ta bort sammanlänkning"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Ta bort sammanlänkning med datorn."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Koppla ifrån sammanlänkad anslutning"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Du har delat telefonens dataanslutning med din dator. Välj \"Koppla ifrån\" om du vill koppla från USB-sammanlänkningen."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Koppla ifrån"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"Avbryt"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Ett problem uppstod när sammanlänkningen inaktiverades. Försök igen."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 26ac5b0..927edd1 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -185,14 +185,12 @@
<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>
- <!-- 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_enableCarMode" msgid="5684504058192921098">"araç modunu etkinleştir"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Bir uygulamanın araç modunu etkinleştirmesine izin verir."</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"arka plan işlemleri son erdir"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Bellek düşük olmasa dahi, bir uygulamanın diğer uygulamaların arka plan işlemlerini sona erdirmesine izin verir."</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"diğer uygulamaları durmaya zorla"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Bir uygulamanın başka uygulamaları zorla durdurmasına izin verir."</string>
<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>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"Toplanan pil istatistiklerinin değiştirilmesine izin verir. Normal uygulamalarda kullanılmamalıdır."</string>
<string name="permlab_backup" msgid="470013022865453920">"sistem yedeğini kontrol et ve geri yükle"</string>
<string name="permdesc_backup" msgid="4837493065154256525">"Uygulamaya sistem yedekleme ve geri yükleme mekanizmasını denetleme izni verir. Normal uygulamalar tarafından kullanım için değildir."</string>
- <string name="permlab_backup_data" msgid="4057625941707926463">"uygulamanın verilerini yedekle ve geri yükle"</string>
- <string name="permdesc_backup_data" msgid="8274426305151227766">"Uygulamaya, sistem yedekleme ve geri yükleme mekanizmasına katılma izni verir."</string>
<string name="permlab_internalSystemWindow" msgid="2148563628140193231">"yetkisiz pencereleri görüntüle"</string>
<string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Dahili sistem kullanıcı arayüzü tarafından kullanılmak üzere tasarlanmış pencerelerin oluşturulmasına izin verir. Normal uygulamalarda kullanılmaz."</string>
<string name="permlab_systemAlertWindow" msgid="3372321942941168324">"sistem düzeyi uyarıları görüntüle"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Tutucunun bir giriş yönteminin en üst düzey arayüzüne bağlanmasına izin verir. Normal uygulamalarda hiçbir zaman gerek duyulmamalıdır."</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"bir duvar kağıdına tabi kıl"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Hesap sahibine bir duvar kağıdının en üst düzey arayüzüne bağlanma izni verir. Normal uygulamalarda hiçbir zaman gerek duyulmamalıdır."</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"bir cihaz yöneticisi ile etkileşimde bulun"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Cihazın sahibinin cihaz yöneticisine amaç göndermesine izin verir. Normal uygulamalarda hiçbir zaman gerek duyulmamalıdır."</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"ekran yönünü değiştir"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"Uygulamaların ekran yönünü istedikleri zaman değiştirmesine izin verir. Normal uygulamalarda hiçbir zaman gerekmemelidir."</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"uygulamalara Linux sinyalleri gönder"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"Uygulamaların yeni veya güncellenmiş Android paketleri yüklemesine izin verir. Kötü amaçlı uygulamalar bunu, kendilerine verilen izin derecesi keyfi olarak değişen yeni uygulamalar eklemek için kullanabilir."</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"tüm uygulama önbelleği verilerini sil"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"Uygulamaların uygulama önbelleği dizinindeki dosyaları silerek telefonda yer açmasına izin verir. Erişim genellikle sistem işlemlerine ve yüksek düzeyde kısıtlı olarak verilir."</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"sistem günlük dosyalarını oku"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"Uygulamaların sistemin çeşitli günlük dosyalarından okumalarına izin verir. Bu, uygulamaların telefon ile neler yaptığınız ile ilgili genel bilgi bulmasına izin verir, ancak bunlar kişisel veya özel bir bilgi içermemelidir."</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"sahibi tanılama olan kaynakları oku/bunlara yaz"</string>
@@ -279,10 +281,13 @@
<string name="permdesc_writeOwnerData" msgid="2344055317969787124">"Uygulamaların telefonunuzda depolanan telefon sahibi verilerini değiştirmesine izin verir. Kötü amaçlı uygulamalar bu işlevi kullanıcı verilerini silmek veya değiştirmek için kullanabilir."</string>
<string name="permlab_readOwnerData" msgid="6668525984731523563">"sahip verilerini oku"</string>
<string name="permdesc_readOwnerData" msgid="3088486383128434507">"Uygulamaların telefonunuzda depolanan telefon sahibi verilerini okumasına izin verir. Kötü amaçlı uygulamalar bunu telefon sahibi verilerini okumak için kullanabilir."</string>
- <string name="permlab_readCalendar" msgid="3728905909383989370">"takvim verilerini oku"</string>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"Uygulamaların telefonunuzda depolanan takvim etkinliklerinin tümünü okumasına izin verir. Kötü amaçlı uygulamalar bunu, takvim etkinliklerinizi başkalarına göndermek için kullanabilir."</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"takvim verilerini yaz"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"Uygulamaların telefonunuzda depolanan takvim etkinliklerini değiştirmesine izin verir. Kötü amaçlı uygulamaları bunu takvim verilerinizi silmek veya değiştirmek için kullanabilir."</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"test için sahte konum kaynakları"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Test amacıyla sahte konum kaynakları oluşturur. Kötü amaçlı uygulamalar bu işlevi GPS veya Ağ Hizmeti sağlayıcılar gibi gerçek kaynaklardan gelen konum ve/veya durum bilgilerini geçersiz kılmak için kullanabilir."</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"ek konum sağlayıcı komutlarına eriş"</string>
@@ -311,6 +316,16 @@
<string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Uygulamaların çıkarılabilir depolama birimleri için dosya sistemleri ile bağlantı kurmasına ve bağlantıyı kesmesine izin verir."</string>
<string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"harici depolama birimini biçimlendir"</string>
<string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Uygulamanın çıkarılabilir depolama birimini biçimlendirmesine izin verir."</string>
+ <string name="permlab_asec_access" msgid="1070364079249834666">"güvenli depolama birimi hakkında bilgi al"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"Uygulamanın güvenli depolama birimi hakkında bilgi almasına izin verir."</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"güvenli depolama birimi oluştur"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"Uygulamanın güvenli depolama birimi oluşturmasına izin verir."</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"güvenli depolama birimini yok et"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"Uygulamanın güvenli depolama birimini yok etmesine izin verir."</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"güvenli depolama birimini ekle / kaldır"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"Uygulamanın güvenli depolama birimini yeniden eklemesine / kaldırmasına izin verir."</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"güvenli depolama birimini yeniden adlandır"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"Uygulamanın güvenli depolama birimini yeniden adlandırmasına izin verir."</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"titreşimi denetle"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"Uygulamanın titreşimi denetlemesine izin verir."</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"flaşı denetle"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Uygulamanın sistem duvar kağıdı boyutu ipuçlarını ayarlamasına izin verir."</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"sistemi fabrika değerlerine sıfırla"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"Uygulamanın, sistemi tamamen fabrika ayarlarına sıfırlamasına; verileri, yapılandırmayı ve yüklü uygulamaları silmesine izin verir."</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"saati ayarla"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"Bu uygulamanın telefonun saatini değiştirmesine izin verir."</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"saat dilimini ayarla"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"Uygulamaların telefonun saat dilimini değiştirmesine izin verir."</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"Hesap Yönetici Hizmeti gibi davran"</string>
@@ -364,7 +381,9 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"Erişim Noktası Adı ayarlarını yaz"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Uygulamaların herhangi bir APN\'nin Proxy ve Bağlantı Noktası gibi APN ayarlarını değiştirmesine izin verir."</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"ağ bağlantısını değiştir"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"Uygulamaların ağ bağlantı durumunu değiştirmesine izin verir."</string>
+ <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Bir uygulamanın ağ bağlantı durumunu değiştirmesine izin verir."</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"kullanılan bağlantıyı değiştir"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Bir uygulamanın bağlanılan ağ bağlantısı durumunu değiştirmesine izin verir."</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"arka plan veri kullanımı ayarını değiştir"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Uygulamaların arka plan veri kullanımı ayarını değiştirmesine izin verir."</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"Kablosuz durumunu görüntüle"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"önbellek dosya sistemine eriş"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Bir uygulamanın önbellek dosya sisteminde okuma yazma yapmasına izin verir."</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"Şifreyi sınırla"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"Kullanmanıza izin verilen şifre türlerini sınırlayın."</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"Oturum açma denemelerini izle"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"Bir işlem gerçekleştirmek için cihazdaki başarısız oturum açma girişimlerini izleyin."</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"Şifre sıfırlama"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"Şifrenizi yeni bir değer alması için zorlayın. Giriş yapabilmeniz için yöneticinin size yeni bir değer sağlamasını gerekecektir."</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"Kilitlemeye zorlama"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"Cihaz kilitlendiğinde, şifresini yeniden girmenizi gerektiren denetim."</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"Tüm verileri sil"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"Tüm verilerinizi onay olmadan silmek için fabrika ayarlarına sıfırlayın."</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"Ev"</item>
<item msgid="869923650527136615">"Mobil"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"Kilidi açmak için şifreyi girin"</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>
<string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Acil durum numarası"</string>
@@ -504,6 +532,8 @@
<string name="lockscreen_instructions_when_pattern_disabled" msgid="686260028797158364">"Kilidi açmak için Menü\'ye basın."</string>
<string name="lockscreen_pattern_instructions" msgid="7478703254964810302">"Kilit açmak için deseni çizin"</string>
<string name="lockscreen_emergency_call" msgid="5347633784401285225">"Acil durum çağrısı"</string>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Doğru!"</string>
<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>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<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>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"Uygulamaya telefonunuzda depolanan Tarayıcı geçmişini veya favorileri değiştirme izni verir. Kötü amaçlı uygulamalar bunu Tarayıcı verilerinizi silmek veya değiştirmek için kullanabilir."</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Tarayıcı\'nın coğrafi konum izinlerini değiştir"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Bir uygulamanın, Tarayıcı\'nın coğrafi konum izinlerini değiştirmesine izin verir. Kötü amaçlı uygulamalar, bu özelliği konum bilgilerini rastgele web sitelerine göndermek için kullanabilir."</string>
<string name="save_password_message" msgid="767344687139195790">"Tarayıcının bu şifreyi anımsamasını istiyor musunuz?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"Şimdi değil"</string>
<string name="save_password_remember" msgid="6491879678996749466">"Anımsa"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"1 saat önce"</item>
<item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> saat önce"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"dün"</item>
<item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> gün önce"</item>
@@ -739,21 +779,27 @@
<string name="no_permissions" msgid="7283357728219338112">"İzin gerektirmez"</string>
<string name="perms_hide" msgid="7283915391320676226"><b>"Gizle"</b></string>
<string name="perms_show_all" msgid="2671791163933091180"><b>"Tümünü göster"</b></string>
- <string name="googlewebcontenthelper_loading" msgid="4722128368651947186">"Yükleniyor…"</string>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"USB Yığın Depolama"</string>
<string name="usb_storage_title" msgid="5901459041398751495">"USB bağlandı"</string>
- <string name="usb_storage_message" msgid="2759542180575016871">"Telefonunuzu bilgisayarınıza USB ile bağladınız. Bilgisayarınız ve telefonunuzun SD kartı arasında dosya kopyalamak istiyorsanız, \"Bağla\"\'yı seçin."</string>
- <string name="usb_storage_button_mount" msgid="8063426289195405456">"Bağla"</string>
- <string name="usb_storage_button_unmount" msgid="6092146330053864766">"Bağlama"</string>
+ <string name="usb_storage_message" msgid="4796759646167247178">"Telefonunuzu USB ile bilgisayarınıza bağladınız. Bilgisayarınız ile Android\'inizin SD kartı arasında dosya kopyalamak istiyorsanız aşağıdaki düğmeyi seçin."</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"USB depolama birimini aç"</string>
<string name="usb_storage_error_message" msgid="2534784751603345363">"SD kartınızı USB depolama birimi için kullanmada bir sorun var."</string>
<string name="usb_storage_notification_title" msgid="8175892554757216525">"USB bağlandı"</string>
<string name="usb_storage_notification_message" msgid="7380082404288219341">"Bilgisayarınıza/bilgisayarınızdan dosya kopyalamak için seçin."</string>
<string name="usb_storage_stop_notification_title" msgid="2336058396663516017">"USB depolama birimini kapat"</string>
<string name="usb_storage_stop_notification_message" msgid="2591813490269841539">"USB depolama birimini kapatmak için seçin."</string>
- <string name="usb_storage_stop_title" msgid="6014127947456185321">"USB depolama birimini kapat"</string>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"USB depolama birimini kapatmadan önce USB ana makinesinde bağlantıyı kestiğinizden emin olun. USB depolama birimini kapatmak için \"Kapat\"ı seçin."</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"Kapat"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"İptal"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"USB depolama birimini kapatırken bir sorunla karşılaştık. USB ana makinesinin bağlantısını kestiğinizden emin olduktan sonra tekrar deneyin."</string>
+ <string name="usb_storage_stop_title" msgid="660129851708775853">"USB depolama birimi kullanılıyor"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"USB depolama birimini kapatmadan önce Android SD kartını bilgisayarınızdan kaldırdığınızdan (\"çıkardığınızdan\") emin olun."</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"USB depolama birimini kapat"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"USB depolama birimini kapatırken bir sorun oluştu. USB ana makinesini kaldırdığınızdan emin olun ve daha sonra tekrar deneyin."</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"SD kartı biçimlendir"</string>
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"Eşleşen hiçbir etkinlik bulunamadı"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"bileşen kullanım istatistiklerini güncelle"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Toplanmış bileşen istatistiklerinin değiştirilmesine izin verir. Normal uygulamalarda kullanılmamalıdır."</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Varsayılan kapsayıcı hizmetin içeriği kopyalamak için çağrılmasına izin verir. Normal uygulamalar tarafından kullanılmaz."</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Varsayılan kapsayıcı hizmetin içeriği kopyalamak için çağrılmasına izin verir. Normal uygulamalar tarafından kullanılmaz."</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Zum denetimi için iki kez dokun"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"Widget\'ı genişletirken hata oluştu"</string>
<string name="ime_action_go" msgid="8320845651737369027">"Git"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"Aşağıdaki bir veya daha fazla uygulama, şimdi ve ileride hesabınıza erişmek için izin istiyor."</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Bu isteğe izin vermek istiyor musunuz?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"Erişim İsteği"</string>
<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>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"Dosya seç"</string>
+ <string name="reset" msgid="2448168080964209908">"Sıfırla"</string>
+ <string name="submit" msgid="1602335572089911941">"Gönder"</string>
+ <string name="description_star" msgid="2654319874908576133">"favori"</string>
+ <string name="tether_title" msgid="6970447107301643248">"USB bağlantısı kullanılabilir"</string>
+ <string name="tether_message" msgid="554549994538298101">"Telefonunuzun veri bağlantısını bilgisayarınızla paylaşmak istiyorsanız, \"Bağlan\" seçeneğini belirleyin."</string>
+ <string name="tether_button" msgid="7409514810151603641">"Bağlan"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"İptal"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"Bağlantıyla ilgili bir sorun var."</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"USB bağlantısı kullanılabilir"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"Bilgisayarınızı telefonunuza bağlamak için seçin."</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"Bağlantıyı kaldır"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"Bilgisayarınızın bağlantısını kesmek için seçin."</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"Bağlantıyı kes"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"Telefonunuzun cep telefonu veri bağlantısını bilgisayarınızla paylaşıyordunuz. USB bağlantısını kesmek için \"Bağlantıyı Kes\" seçeneğini belirleyin."</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"Bağlantıyı kes"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"İptal"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"Bağlantı kapatılırken bir sorunla karşılaşıldı. Lütfen tekrar deneyin."</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 5be8676..ad081d6 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -185,14 +185,12 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"允许应用程序启动对其他应用程序的调试。恶意应用程序可借此终止其他应用程序。"</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"更改用户界面设置"</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_enableCarMode" msgid="5684504058192921098">"启用车载模式"</string>
+ <string name="permdesc_enableCarMode" msgid="5673461159384850628">"允许应用程序启用车载模式。"</string>
+ <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"结束后台进程"</string>
+ <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"无论内存资源是否紧张,都允许应用程序结束其他应用程序的后台进程。"</string>
+ <string name="permlab_forceStopPackages" msgid="1447830113260156236">"强行停止其他应用程序"</string>
+ <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"允许应用程序强行停止其他应用程序。"</string>
<string name="permlab_forceBack" msgid="1804196839880393631">"强制应用程序关闭"</string>
<string name="permdesc_forceBack" msgid="6534109744159919013">"允许应用程序强制前端的任何活动关闭并重新开始。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_dump" msgid="1681799862438954752">"检索系统内部状态"</string>
@@ -217,8 +215,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"允许修改收集的电池使用情况统计信息。普通应用程序不能使用此权限。"</string>
<string name="permlab_backup" msgid="470013022865453920">"控制系统备份和还原"</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="permlab_systemAlertWindow" msgid="3372321942941168324">"显示系统级警报"</string>
@@ -235,6 +231,8 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"允许手机用户绑定至输入法的顶级界面。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"绑定到壁纸"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"允许手机用户绑定到壁纸的顶级界面。应该从不需要将此权限授予普通应用程序。"</string>
+ <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"与设备管理器交互"</string>
+ <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"允许持有对象将意向发送到设备管理器。普通的应用程序一律无需此权限。"</string>
<string name="permlab_setOrientation" msgid="3365947717163866844">"更改屏幕显示方向"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"允许应用程序随时更改屏幕的旋转方向。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"向应用程序发送 Linux 信号"</string>
@@ -253,6 +251,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"允许应用程序安装全新的或更新的 Android 包。恶意应用程序可能会借此添加其具有任意权限的新应用程序。"</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"删除所有应用程序缓存数据"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"允许应用程序通过删除应用程序缓存目录中的文件释放手机存储空间。通常此权限只适用于系统进程。"</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"读取系统日志文件"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"允许应用程序从系统的各日志文件中读取信息。这样应用程序可以发现您的手机使用情况,但这些信息不应包含任何个人信息或保密信息。"</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"读取/写入诊断所拥有的资源"</string>
@@ -279,10 +281,13 @@
<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>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"允许应用程序读取您手机上存储的所有日历活动。恶意应用程序可借此将您的日历活动发送给其他人。"</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"写入日历数据"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"允许应用程序修改您手机上存储的日历活动。恶意应用程序可借此清除或修改您的日历数据。"</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"使用模拟地点来源进行测试"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"创建模拟地点来源进行测试。恶意应用程序可能利用此选项覆盖由真实地点来源(如 GPS 或网络提供商)传回的地点和/或状态。"</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"访问额外的位置信息提供程序命令"</string>
@@ -311,6 +316,16 @@
<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_asec_access" msgid="1070364079249834666">"获取有关安全存储的信息"</string>
+ <string name="permdesc_asec_access" msgid="7691616292170590244">"允许应用程序获取有关安全存储的信息。"</string>
+ <string name="permlab_asec_create" msgid="7312078032326928899">"创建安全存储"</string>
+ <string name="permdesc_asec_create" msgid="7041802322759014035">"允许应用程序创建安全存储。"</string>
+ <string name="permlab_asec_destroy" msgid="7787322878955261006">"清除安全存储"</string>
+ <string name="permdesc_asec_destroy" msgid="5740754114967893169">"允许应用程序清除安全存储。"</string>
+ <string name="permlab_asec_mount_unmount" msgid="7517449694667828592">"安装/卸载安全存储"</string>
+ <string name="permdesc_asec_mount_unmount" msgid="5438078121718738625">"允许应用程序安装/卸载安全存储。"</string>
+ <string name="permlab_asec_rename" msgid="5685344390439934495">"重命名安全存储"</string>
+ <string name="permdesc_asec_rename" msgid="1387881770708872470">"允许应用程序重命名安全存储。"</string>
<string name="permlab_vibrate" msgid="7768356019980849603">"控制振动器"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"允许应用程序控制振动器。"</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"控制闪光灯"</string>
@@ -345,6 +360,8 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"允许应用程序设置有关壁纸大小的提示。"</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"将系统恢复为出厂设置"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"允许应用程序将系统恢复为出厂设置,即清除所有数据、配置以及所安装的应用程序。"</string>
+ <string name="permlab_setTime" msgid="2021614829591775646">"设置时间"</string>
+ <string name="permdesc_setTime" msgid="667294309287080045">"允许应用程序更改手机的时间。"</string>
<string name="permlab_setTimeZone" msgid="2945079801013077340">"设置时区"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"允许应用程序更改手机的时区。"</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"作为 AccountManagerService"</string>
@@ -364,7 +381,9 @@
<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="permdesc_changeNetworkState" msgid="4199958910396387075">"允许应用程序更改网络连接的状态。"</string>
+ <string name="permlab_changeTetherState" msgid="5952584964373017960">"更改绑定的连接"</string>
+ <string name="permdesc_changeTetherState" msgid="8905815579146349568">"允许应用程序更改绑定网络连接的状态。"</string>
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"更改背景数据使用设置"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"允许应用程序更改背景数据使用设置。"</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"查看 Wi-Fi 状态"</string>
@@ -395,10 +414,18 @@
<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 name="permlab_cache_filesystem" msgid="5656487264819669824">"访问缓存文件系统"</string>
+ <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"允许应用程序读取和写入缓存文件系统。"</string>
+ <string name="policylab_limitPassword" msgid="4307861496302850201">"限制密码选择"</string>
+ <string name="policydesc_limitPassword" msgid="1719877245692318299">"限制您能够使用的密码类型。"</string>
+ <string name="policylab_watchLogin" msgid="7374780712664285321">"监控登录尝试"</string>
+ <string name="policydesc_watchLogin" msgid="1961251179624843483">"监控对于登录设备和执行某项操作的失败尝试。"</string>
+ <string name="policylab_resetPassword" msgid="9084772090797485420">"重置密码"</string>
+ <string name="policydesc_resetPassword" msgid="3332167600331799991">"强行更新密码,您需要获得管理员提供的新密码才能登录。"</string>
+ <string name="policylab_forceLock" msgid="5760466025247634488">"强行锁定"</string>
+ <string name="policydesc_forceLock" msgid="2819868664946089740">"控制何时锁定设备,这需要您重新输入密码。"</string>
+ <string name="policylab_wipeData" msgid="3910545446758639713">"清除所有数据"</string>
+ <string name="policydesc_wipeData" msgid="2314060933796396205">"恢复出厂设置,这会在不提示确认的情况下删除您的所有数据。"</string>
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"住宅"</item>
<item msgid="869923650527136615">"手机"</item>
@@ -495,6 +522,7 @@
<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_enter_password_code" msgid="9138158344813213754">"输入密码进行解锁"</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>
@@ -504,6 +532,8 @@
<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>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<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>
@@ -513,7 +543,7 @@
<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="emergency_calls_only" msgid="6733978304386365407">"仅限于急救或报警电话"</string>
+ <string name="emergency_calls_only" msgid="6733978304386365407">"只能使用紧急呼叫"</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_instructions" msgid="635967534992394321">"请参阅《用户指南》或联系客服人员。"</string>
@@ -534,6 +564,9 @@
<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="password_keyboard_label_symbol_key" msgid="992280756256536042">"?123"</string>
+ <string name="password_keyboard_label_alpha_key" msgid="8001096175167485649">"ABC"</string>
+ <string name="password_keyboard_label_alt_key" msgid="1284820942620288678">"ALT"</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>
@@ -559,6 +592,8 @@
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"允许应用程序读取用浏览器访问过的所有网址,以及浏览器的所有书签。"</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"写入浏览器的历史记录和书签"</string>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"允许应用程序修改存储在手机中的浏览器历史记录或书签。恶意应用程序可借此清除或修改浏览器数据。"</string>
+ <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"修改浏览器的地理位置权限"</string>
+ <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"允许应用程序修改浏览器的地理位置权限。恶意应用程序会利用这一点将位置信息发送到任意网站。"</string>
<string name="save_password_message" msgid="767344687139195790">"是否希望浏览器记住此密码?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"暂不保存"</string>
<string name="save_password_remember" msgid="6491879678996749466">"记住"</string>
@@ -585,6 +620,11 @@
<item quantity="one" msgid="9150797944610821849">"1 小时前"</item>
<item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> 小时前"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"昨天"</item>
<item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> 天前"</item>
@@ -739,21 +779,27 @@
<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>
+ <string name="usb_storage_activity_title" msgid="2399289999608900443">"USB 大容量存储"</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="4796759646167247178">"您已通过 USB 将手机连接至计算机。如果您要在计算机和 Android 手机的 SD 卡之间复制文件,请点击下面的按钮。"</string>
+ <string name="usb_storage_button_mount" msgid="1052259930369508235">"打开 USB 存储设备"</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_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>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"在关闭 USB 存储设备前,请确保您已卸载了 USB 主设备。选择“关闭”关闭 USB 存储设备。"</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"关闭"</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_title" msgid="660129851708775853">"使用中的 USB 存储设备"</string>
+ <string name="usb_storage_stop_message" msgid="3613713396426604104">"在关闭 USB 存储设备前,请确保您已从计算机中卸载(“弹出”)Android 手机的 SD 卡。"</string>
+ <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"关闭 USB 存储设备"</string>
+ <string name="usb_storage_stop_error_message" msgid="143881914840412108">"关闭 USB 存储设备时遇到问题。请检查并确保已卸载了 USB 主设备,然后重试。"</string>
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<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>
@@ -778,6 +824,8 @@
<string name="activity_list_empty" msgid="4168820609403385789">"找不到匹配的活动"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"更新组件使用情况统计"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"允许修改收集的组件使用情况统计。普通应用程序不能使用此权限。"</string>
+ <string name="permlab_copyProtectedData" msgid="1660908117394854464">"允许调用默认容器服务复制内容。普通的应用程序无需此权限。"</string>
+ <string name="permdesc_copyProtectedData" msgid="537780957633976401">"允许调用默认容器服务复制内容。普通的应用程序无需此权限。"</string>
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"双击可以进行缩放控制"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"放大窗口小部件时出错"</string>
<string name="ime_action_go" msgid="8320845651737369027">"开始"</string>
@@ -790,12 +838,9 @@
<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="grant_credentials_permission_message_header" msgid="6824538733852821001">"以下一个或多个应用程序请求获得在目前和将来访问您帐户的权限。"</string>
+ <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"您是否同意此请求?"</string>
+ <string name="grant_permissions_header_text" msgid="2722567482180797717">"访问请求"</string>
<string name="allow" msgid="7225948811296386551">"允许"</string>
<string name="deny" msgid="2081879885755434506">"拒绝"</string>
<string name="permission_request_notification_title" msgid="5390555465778213840">"已请求权限"</string>
@@ -809,10 +854,26 @@
<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) -->
+ <string name="upload_file" msgid="2897957172366730416">"选择文件"</string>
+ <string name="reset" msgid="2448168080964209908">"重置"</string>
+ <string name="submit" msgid="1602335572089911941">"提交"</string>
+ <string name="description_star" msgid="2654319874908576133">"收藏"</string>
+ <string name="tether_title" msgid="6970447107301643248">"可进行 USB 绑定"</string>
+ <string name="tether_message" msgid="554549994538298101">"如果您希望自己的手机与计算机共享数据连接,请选择“绑定”。"</string>
+ <string name="tether_button" msgid="7409514810151603641">"绑定"</string>
+ <string name="tether_button_cancel" msgid="6744369928952219677">"取消"</string>
+ <string name="tether_error_message" msgid="6672110337349077628">"绑定时出现问题。"</string>
+ <string name="tether_available_notification_title" msgid="367754042700082080">"可进行 USB 绑定"</string>
+ <string name="tether_available_notification_message" msgid="8439443306503453793">"选择将您的计算机与手机进行绑定。"</string>
+ <string name="tether_stop_notification_title" msgid="1902246071807668101">"解除绑定"</string>
+ <string name="tether_stop_notification_message" msgid="6920086906891516128">"选择解除计算机的绑定。"</string>
+ <string name="tether_stop_title" msgid="3118332507220912235">"解除绑定"</string>
+ <string name="tether_stop_message" msgid="7741840433788363174">"您的手机与计算机已共享蜂窝数据连接。选择“断开绑定”可解除 USB 绑定。"</string>
+ <string name="tether_stop_button" msgid="8061941592702063029">"断开绑定"</string>
+ <string name="tether_stop_button_cancel" msgid="3694669546501300230">"取消"</string>
+ <string name="tether_stop_error_message" msgid="4244697367270211648">"在解除绑定时遇到了问题。请重试。"</string>
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
<skip />
- <!-- no translation found for reset (2448168080964209908) -->
- <skip />
- <!-- no translation found for submit (1602335572089911941) -->
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
<skip />
</resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index d500b51..0c8bafc 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -151,7 +151,7 @@
<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="permgrouplab_phoneCalls" msgid="9067173988325865923">"通話次數"</string>
<string name="permgroupdesc_phoneCalls" msgid="7489701620446183770">"監控、記錄與進行通話。"</string>
<string name="permgrouplab_systemTools" msgid="4652191644082714048">"系統工具"</string>
<string name="permgroupdesc_systemTools" msgid="8162102602190734305">"系統低階存取與控制。"</string>
@@ -185,6 +185,10 @@
<string name="permdesc_setDebugApp" msgid="5584310661711990702">"允許應用程式為其他程式開啟偵錯功能。請注意:惡意程式可利用此功能終止其他應用程式。"</string>
<string name="permlab_changeConfiguration" msgid="8214475779521218295">"變更介面設定"</string>
<string name="permdesc_changeConfiguration" msgid="3465121501528064399">"允許應用程式變更目前設定,例如:地區設定或字型大小。"</string>
+ <!-- no translation found for permlab_enableCarMode (5684504058192921098) -->
+ <skip />
+ <!-- no translation found for permdesc_enableCarMode (5673461159384850628) -->
+ <skip />
<!-- no translation found for permlab_killBackgroundProcesses (8373714752793061963) -->
<skip />
<!-- no translation found for permdesc_killBackgroundProcesses (2908829602869383753) -->
@@ -217,8 +221,6 @@
<string name="permdesc_batteryStats" msgid="5847319823772230560">"允許修改電池狀態。一般應用程式不會使用此功能。"</string>
<string name="permlab_backup" msgid="470013022865453920">"控制系統備份與還原"</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="permlab_systemAlertWindow" msgid="3372321942941168324">"顯示系統警示"</string>
@@ -235,6 +237,10 @@
<string name="permdesc_bindInputMethod" msgid="3734838321027317228">"允許擁有人連結至輸入法的最頂層介面。一般應用程式不需使用此選項。"</string>
<string name="permlab_bindWallpaper" msgid="8716400279937856462">"連結至桌布"</string>
<string name="permdesc_bindWallpaper" msgid="5287754520361915347">"允許擁有人連結至桌布的最頂層介面,一般應用程式不需使用此選項。"</string>
+ <!-- no translation found for permlab_bindDeviceAdmin (8704986163711455010) -->
+ <skip />
+ <!-- no translation found for permdesc_bindDeviceAdmin (8714424333082216979) -->
+ <skip />
<string name="permlab_setOrientation" msgid="3365947717163866844">"變更螢幕顯示方向"</string>
<string name="permdesc_setOrientation" msgid="6335814461615851863">"允許應用程式隨時變更螢幕顯示方向。一般應用程式不需要此功能。"</string>
<string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"傳送 Linux 訊號到應用程式"</string>
@@ -253,6 +259,10 @@
<string name="permdesc_installPackages" msgid="526669220850066132">"允許應用程式安裝新的 Android 程式或更新。請注意:惡意程式可能利用此功能新增具有極高權限的程式。"</string>
<string name="permlab_clearAppCache" msgid="4747698311163766540">"刪除所有應用程式快取資料。"</string>
<string name="permdesc_clearAppCache" msgid="7740465694193671402">"允許應用程式刪除快取目錄裡的檔案,釋放儲存空間。此操作通常受到系統程序嚴格限制。"</string>
+ <!-- no translation found for permlab_movePackage (728454979946503926) -->
+ <skip />
+ <!-- no translation found for permdesc_movePackage (6323049291923925277) -->
+ <skip />
<string name="permlab_readLogs" msgid="4811921703882532070">"讀取系統記錄檔"</string>
<string name="permdesc_readLogs" msgid="2257937955580475902">"允許應用程式讀取系統記錄檔。此項操作可讓應用程式了解目前手機操作狀態,但內容應不含任何個人或隱私資訊。"</string>
<string name="permlab_diagnostic" msgid="8076743953908000342">"讀寫 diag 擁有的資源"</string>
@@ -279,10 +289,13 @@
<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>
+ <!-- no translation found for permlab_readCalendar (6898987798303840534) -->
+ <skip />
<string name="permdesc_readCalendar" msgid="5533029139652095734">"允許應用程式讀取手機上所有日曆資料。請注意:惡意程式可能利用此功能將您的日曆資料傳送給其他人。"</string>
- <string name="permlab_writeCalendar" msgid="377926474603567214">"寫入日曆資料"</string>
- <string name="permdesc_writeCalendar" msgid="8674240662630003173">"允許應用程式編輯日曆資料。請注意:惡意程式可能利用此功能,清除或修改您的日曆資料。"</string>
+ <!-- no translation found for permlab_writeCalendar (3894879352594904361) -->
+ <skip />
+ <!-- no translation found for permdesc_writeCalendar (2988871373544154221) -->
+ <skip />
<string name="permlab_accessMockLocation" msgid="8688334974036823330">"模擬位置來源以供測試"</string>
<string name="permdesc_accessMockLocation" msgid="7648286063459727252">"建立模擬位置來源以供測試。請注意:惡意程式可能利用此功能覆寫 GPS 或電信業者傳回的位置及/或狀態。"</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"接收額外的位置提供者指令"</string>
@@ -311,6 +324,26 @@
<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>
+ <!-- no translation found for permlab_asec_access (1070364079249834666) -->
+ <skip />
+ <!-- no translation found for permdesc_asec_access (7691616292170590244) -->
+ <skip />
+ <!-- no translation found for permlab_asec_create (7312078032326928899) -->
+ <skip />
+ <!-- no translation found for permdesc_asec_create (7041802322759014035) -->
+ <skip />
+ <!-- no translation found for permlab_asec_destroy (7787322878955261006) -->
+ <skip />
+ <!-- no translation found for permdesc_asec_destroy (5740754114967893169) -->
+ <skip />
+ <!-- no translation found for permlab_asec_mount_unmount (7517449694667828592) -->
+ <skip />
+ <!-- no translation found for permdesc_asec_mount_unmount (5438078121718738625) -->
+ <skip />
+ <!-- no translation found for permlab_asec_rename (5685344390439934495) -->
+ <skip />
+ <!-- no translation found for permdesc_asec_rename (1387881770708872470) -->
+ <skip />
<string name="permlab_vibrate" msgid="7768356019980849603">"控制震動"</string>
<string name="permdesc_vibrate" msgid="2886677177257789187">"允許應用程式控制震動。"</string>
<string name="permlab_flashlight" msgid="2155920810121984215">"控制閃光燈"</string>
@@ -345,6 +378,10 @@
<string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"允許應用程式設定系統桌布大小提示。"</string>
<string name="permlab_masterClear" msgid="2315750423139697397">"將系統還原至出廠預設值"</string>
<string name="permdesc_masterClear" msgid="5033465107545174514">"允許應用程式將手機完全重設至出廠設定,清除所有資料、設定與已安裝程式。"</string>
+ <!-- no translation found for permlab_setTime (2021614829591775646) -->
+ <skip />
+ <!-- no translation found for permdesc_setTime (667294309287080045) -->
+ <skip />
<string name="permlab_setTimeZone" msgid="2945079801013077340">"設定時區"</string>
<string name="permdesc_setTimeZone" msgid="1902540227418179364">"允許應用程式變更時區。"</string>
<string name="permlab_accountManagerService" msgid="4829262349691386986">"作為 AccountManagerService"</string>
@@ -364,7 +401,12 @@
<string name="permlab_writeApnSettings" msgid="7823599210086622545">"輸入存取點名稱設定"</string>
<string name="permdesc_writeApnSettings" msgid="7443433457842966680">"允許應用程式修改 APN 設定,例如:Proxy 及 APN 的連接埠。"</string>
<string name="permlab_changeNetworkState" msgid="958884291454327309">"變更網路連線"</string>
- <string name="permdesc_changeNetworkState" msgid="6278115726355634395">"允許應用程式變更網路連線狀態。"</string>
+ <!-- no translation found for permdesc_changeNetworkState (4199958910396387075) -->
+ <skip />
+ <!-- no translation found for permlab_changeTetherState (5952584964373017960) -->
+ <skip />
+ <!-- no translation found for permdesc_changeTetherState (8905815579146349568) -->
+ <skip />
<string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"變更背景資料使用設定"</string>
<string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"允許應用程式變更背景資料使用設定。"</string>
<string name="permlab_accessWifiState" msgid="8100926650211034400">"檢視 Wi-Fi 狀態"</string>
@@ -399,6 +441,26 @@
<skip />
<!-- no translation found for permdesc_cache_filesystem (1624734528435659906) -->
<skip />
+ <!-- no translation found for policylab_limitPassword (4307861496302850201) -->
+ <skip />
+ <!-- no translation found for policydesc_limitPassword (1719877245692318299) -->
+ <skip />
+ <!-- no translation found for policylab_watchLogin (7374780712664285321) -->
+ <skip />
+ <!-- no translation found for policydesc_watchLogin (1961251179624843483) -->
+ <skip />
+ <!-- no translation found for policylab_resetPassword (9084772090797485420) -->
+ <skip />
+ <!-- no translation found for policydesc_resetPassword (3332167600331799991) -->
+ <skip />
+ <!-- no translation found for policylab_forceLock (5760466025247634488) -->
+ <skip />
+ <!-- no translation found for policydesc_forceLock (2819868664946089740) -->
+ <skip />
+ <!-- no translation found for policylab_wipeData (3910545446758639713) -->
+ <skip />
+ <!-- no translation found for policydesc_wipeData (2314060933796396205) -->
+ <skip />
<string-array name="phoneTypes">
<item msgid="8901098336658710359">"住家電話"</item>
<item msgid="869923650527136615">"行動電話"</item>
@@ -495,6 +557,8 @@
<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>
+ <!-- no translation found for keyguard_password_enter_password_code (9138158344813213754) -->
+ <skip />
<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>
@@ -504,6 +568,8 @@
<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>
+ <!-- no translation found for lockscreen_return_to_call (5244259785500040021) -->
+ <skip />
<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>
@@ -534,6 +600,12 @@
<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>
+ <!-- no translation found for password_keyboard_label_symbol_key (992280756256536042) -->
+ <skip />
+ <!-- no translation found for password_keyboard_label_alpha_key (8001096175167485649) -->
+ <skip />
+ <!-- no translation found for password_keyboard_label_alt_key (1284820942620288678) -->
+ <skip />
<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>
@@ -559,6 +631,10 @@
<string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"允許應用程式讀取瀏覽器曾經造訪過的所有網址,以及瀏覽器的所有書籤。"</string>
<string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"寫入瀏覽器的記錄與書籤"</string>
<string name="permdesc_writeHistoryBookmarks" msgid="945571990357114950">"允許應用程式修改儲存在電話上的瀏覽記錄或書籤。請注意:惡意應用程式可能會使用此選項來清除或修改您瀏覽器的資料。"</string>
+ <!-- no translation found for permlab_writeGeolocationPermissions (4715212655598275532) -->
+ <skip />
+ <!-- no translation found for permdesc_writeGeolocationPermissions (4011908282980861679) -->
+ <skip />
<string name="save_password_message" msgid="767344687139195790">"是否記憶此密碼?"</string>
<string name="save_password_notnow" msgid="6389675316706699758">"現在不要"</string>
<string name="save_password_remember" msgid="6491879678996749466">"記住"</string>
@@ -585,6 +661,11 @@
<item quantity="one" msgid="9150797944610821849">"1 小時以前"</item>
<item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> 小時以前"</item>
</plurals>
+ <!-- no translation found for last_num_days:other (3069992808164318268) -->
+ <!-- no translation found for last_month (3959346739979055432) -->
+ <skip />
+ <!-- no translation found for older (5211975022815554840) -->
+ <skip />
<plurals name="num_days_ago">
<item quantity="one" msgid="861358534398115820">"昨天"</item>
<item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> 天以前"</item>
@@ -739,21 +820,34 @@
<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>
+ <!-- no translation found for usb_storage_activity_title (2399289999608900443) -->
+ <skip />
<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>
+ <!-- no translation found for usb_storage_message (4796759646167247178) -->
+ <skip />
+ <!-- no translation found for usb_storage_button_mount (1052259930369508235) -->
+ <skip />
<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_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>
- <string name="usb_storage_stop_message" msgid="2390958966725232848">"關閉 USB 儲存裝置之前,請確定先從 USB Host 卸載。選取 [關閉] 即可關閉 USB 儲存裝置。"</string>
- <string name="usb_storage_stop_button_mount" msgid="1181858854166273345">"關閉"</string>
- <string name="usb_storage_stop_button_unmount" msgid="3774611918660582898">"取消"</string>
- <string name="usb_storage_stop_error_message" msgid="3746037090369246731">"關閉 USB 儲存裝置時發生問題。請檢查您是否已卸載 USB Host,然後再試一次。"</string>
+ <!-- no translation found for usb_storage_stop_title (660129851708775853) -->
+ <skip />
+ <!-- no translation found for usb_storage_stop_message (3613713396426604104) -->
+ <skip />
+ <!-- no translation found for usb_storage_stop_button_mount (7060218034900696029) -->
+ <skip />
+ <!-- no translation found for usb_storage_stop_error_message (143881914840412108) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_title (203356557714612214) -->
+ <skip />
+ <!-- no translation found for dlg_confirm_kill_storage_users_text (3902998926994232358) -->
+ <skip />
+ <!-- no translation found for dlg_error_title (9179426738781357928) -->
+ <skip />
+ <!-- no translation found for dlg_ok (7376953167039865701) -->
+ <skip />
<string name="extmedia_format_title" msgid="8663247929551095854">"將 SD 卡格式化"</string>
<string name="extmedia_format_message" msgid="3621369962433523619">"確定要將 SD 卡格式化嗎?該 SD 卡中的所有資料將會遺失。"</string>
<string name="extmedia_format_button_format" msgid="4131064560127478695">"格式化"</string>
@@ -778,6 +872,10 @@
<string name="activity_list_empty" msgid="4168820609403385789">"找不到符合的活動"</string>
<string name="permlab_pkgUsageStats" msgid="8787352074326748892">"更新元件使用統計資料"</string>
<string name="permdesc_pkgUsageStats" msgid="891553695716752835">"允許修改收集到的元件使用統計資料。一般應用程式不會使用此功能。"</string>
+ <!-- no translation found for permlab_copyProtectedData (1660908117394854464) -->
+ <skip />
+ <!-- no translation found for permdesc_copyProtectedData (537780957633976401) -->
+ <skip />
<string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"點兩下以進行縮放控制"</string>
<string name="gadget_host_error_inflating" msgid="2613287218853846830">"擴大小工具時發生錯誤"</string>
<string name="ime_action_go" msgid="8320845651737369027">"開始"</string>
@@ -815,4 +913,38 @@
<skip />
<!-- no translation found for submit (1602335572089911941) -->
<skip />
+ <!-- no translation found for description_star (2654319874908576133) -->
+ <skip />
+ <!-- no translation found for tether_title (6970447107301643248) -->
+ <skip />
+ <!-- no translation found for tether_message (554549994538298101) -->
+ <skip />
+ <!-- no translation found for tether_button (7409514810151603641) -->
+ <skip />
+ <!-- no translation found for tether_button_cancel (6744369928952219677) -->
+ <skip />
+ <!-- no translation found for tether_error_message (6672110337349077628) -->
+ <skip />
+ <!-- no translation found for tether_available_notification_title (367754042700082080) -->
+ <skip />
+ <!-- no translation found for tether_available_notification_message (8439443306503453793) -->
+ <skip />
+ <!-- no translation found for tether_stop_notification_title (1902246071807668101) -->
+ <skip />
+ <!-- no translation found for tether_stop_notification_message (6920086906891516128) -->
+ <skip />
+ <!-- no translation found for tether_stop_title (3118332507220912235) -->
+ <skip />
+ <!-- no translation found for tether_stop_message (7741840433788363174) -->
+ <skip />
+ <!-- no translation found for tether_stop_button (8061941592702063029) -->
+ <skip />
+ <!-- no translation found for tether_stop_button_cancel (3694669546501300230) -->
+ <skip />
+ <!-- no translation found for tether_stop_error_message (4244697367270211648) -->
+ <skip />
+ <!-- no translation found for car_mode_disable_notification_title (3164768212003864316) -->
+ <skip />
+ <!-- no translation found for car_mode_disable_notification_message (3262812780382240778) -->
+ <skip />
</resources>
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index cdc15c2..0c065ef 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -127,15 +127,4 @@
<item><xliff:g id="id">ime</xliff:g></item>
</string-array>
- <!-- Do not translate. Each string points to the component name of an ACTION_WEB_SEARCH
- handling activity. On startup if there were no preferred ACTION_WEB_SEARCH handlers,
- the first component from this list which is found to be installed is set as the
- preferred activity. -->
- <string-array name="default_web_search_providers">
- <item>com.google.android.googlequicksearchbox/.google.GoogleSearch</item>
- <item>com.android.quicksearchbox/.google.GoogleSearch</item>
- <item>com.google.android.providers.enhancedgooglesearch/.Launcher</item>
- <item>com.android.googlesearch/.GoogleSearch</item>
- <item>com.android.websearch/.Search.1</item>
- </string-array>
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index ff93984..1ced121 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1867,6 +1867,14 @@
<attr name="layout_span" format="integer" />
</declare-styleable>
<declare-styleable name="TabWidget">
+ <!-- Drawable used to draw the divider between tabs. -->
+ <attr name="divider" />
+ <!-- Determines whether the strip under the tab indicators is drawn or not. -->
+ <attr name="stripEnabled" format="boolean" />
+ <!-- Drawable used to draw the left part of the strip underneath the tabs. -->
+ <attr name="stripLeft" format="reference" />
+ <!-- Drawable used to draw the right part of the strip underneath the tabs. -->
+ <attr name="stripRight" format="reference" />
</declare-styleable>
<declare-styleable name="TextAppearance">
<!-- Text color. -->
@@ -3501,6 +3509,21 @@
<!-- =============================== -->
<eat-comment />
+ <!-- Use <code>device-admin</code> as the root tag of the XML resource that
+ describes a
+ {@link android.app.admin.DeviceAdminReceiver}, which is
+ referenced from its
+ {@link android.app.admin.DeviceAdminReceiver#DEVICE_ADMIN_META_DATA}
+ meta-data entry. Described here are the attributes that can be
+ included in that tag. -->
+ <declare-styleable name="DeviceAdmin">
+ <!-- Control whether the admin is visible to the user, even when it
+ is not enabled. This is true by default. You may want to make
+ it false if your admin does not make sense to be turned on
+ unless some explicit action happens in your app. -->
+ <attr name="visible" />
+ </declare-styleable>
+
<!-- Use <code>wallpaper</code> as the root tag of the XML resource that
describes an
{@link android.service.wallpaper.WallpaperService}, which is
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 33b509b..d66f513 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -302,7 +302,7 @@
<!-- Specify whether an activity should be finished when a "close system
windows" request has been made. This happens, for example, when
the home key is pressed, when the device is locked, when a system
- dialog like recent apps is displayed, etc. -->
+ dialog showing recent applications is displayed, etc. -->
<attr name="finishOnCloseSystemDialogs" format="boolean" />
<!-- Specify whether an activity's task should be cleared when it
@@ -487,7 +487,7 @@
the display will rotate based on how the user moves the device. -->
<enum name="sensor" value="4" />
<!-- Always ignore orientation determined by orientation sensor:
- tthe display will not rotate when the user moves the device. -->
+ the display will not rotate when the user moves the device. -->
<enum name="nosensor" value="5" />
</attr>
@@ -523,7 +523,7 @@
<flag name="keyboard" value="0x0010" />
<!-- The keyboard or navigation accessibility has changed, for example
the user has slid the keyboard out to expose it. Note that
- inspite of its name, this applied to any accessibility: keyboard
+ despite its name, this applied to any accessibility: keyboard
or navigation. -->
<flag name="keyboardHidden" value="0x0020" />
<!-- The navigation type has changed. Should never normally happen. -->
@@ -592,11 +592,16 @@
backup and restore of the application's settings to external storage. -->
<attr name="backupAgent" format="string" />
- <!-- This is not the attribute you are looking for. -->
+ <!-- Whether to allow the application to participate in backup
+ infrastructure. If this attribute is set to <code>false</code>, no backup
+ of the application will ever be performed, even by a full-system backup that
+ would otherwise cause all application data to be saved via adb. The
+ default value of this attribute is <code>true</code>. -->
<attr name="allowBackup" format="boolean" />
<!-- Whether the application in question should be terminated after its
- settings have been restored. The default is to do so. -->
+ settings have been restored. The default is <code>true</code>,
+ which means to do so. -->
<attr name="killAfterRestore" format="boolean" />
<!-- Whether the application needs to have its own Application subclass
@@ -604,15 +609,25 @@
Application class to avoid interference with application logic. -->
<attr name="restoreNeedsApplication" format="boolean" />
+ <!-- Indicate that the application is prepared to attempt a restore of any
+ backed-up dataset, even if the backup is apparently from a newer version
+ of the application than is currently installed on the device. Setting
+ this attribute to <code>true</code> will permit the Backup Manager to
+ attempt restore even when a version mismatch suggests that the data are
+ incompatible. <em>Use with caution!</em>
+
+ <p>The default value of this attribute is <code>false</code>. -->
+ <attr name="restoreAnyVersion" format="boolean" />
+
<!-- The default install location defined by an application. -->
<attr name="installLocation">
<!-- Let the system decide ideal install location -->
<enum name="auto" value="0" />
- <!-- Explicitly request to be installed on internal phone storate
+ <!-- Explicitly request to be installed on internal phone storage
only. -->
<enum name="internalOnly" value="1" />
- <!-- Prefer to be installed on sdcard. There is no guarantee that
- the system will honour this request. The application might end
+ <!-- Prefer to be installed on SD card. There is no guarantee that
+ the system will honor this request. The application might end
up being installed on internal storage if external media
is unavailable or too full. -->
<enum name="preferExternal" value="2" />
@@ -698,6 +713,7 @@
<attr name="allowBackup" />
<attr name="killAfterRestore" />
<attr name="restoreNeedsApplication" />
+ <attr name="restoreAnyVersion" />
<attr name="neverEncrypt" />
</declare-styleable>
@@ -813,7 +829,7 @@
<!-- The <code>uses-feature</code> tag specifies
a specific feature used by the application.
For example an application might specify that it requires
- specific version of open gl. Multiple such attribute
+ specific version of OpenGL. Multiple such attribute
values can be specified by the application.
<p>This appears as a child tag of the root
@@ -1359,7 +1375,7 @@
{@link android.content.Intent#setData Intent.setData()}.
<p><em>Note: scheme and host name matching in the Android framework is
case-sensitive, unlike the formal RFC. As a result,
- Uris here should always be normalized to use lower case letters
+ URIs here should always be normalized to use lower case letters
for these elements (as well as other proper Uri normalization).</em></p> -->
<attr name="data" format="string" />
<!-- The MIME type name to assign to the Intent, as per
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 5d561b8..1b5b3e4 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -83,9 +83,17 @@
</string-array>
<!-- Dhcp range (min, max) to use for tethering purposes -->
- <string-array name="config_tether_dhcp_range">
+ <string-array translatable="false" name="config_tether_dhcp_range">
</string-array>
+ <!-- Regex array of allowable upstream ifaces for tethering - for example if you want
+ tethering on your a new interface called "foo2" add "foo\\d" here -->
+ <string-array translatable="false" name="config_tether_upstream_regexs">
+ </string-array>
+
+ <!-- Boolean indicating if we require the use of DUN on mobile for tethering -->
+ <bool translatable="false" name="config_tether_dun_required">true</bool>
+
<!-- Flag indicating whether the keyguard should be bypassed when
the slider is open. This can be set or unset depending how easily
the slider can be opened (for example, in a pocket or purse). -->
@@ -138,6 +146,9 @@
closed. The default is 0. -->
<integer name="config_lidNavigationAccessibility">0</integer>
+ <!-- Indicate whether the SD card is accessible without removing the battery. -->
+ <bool name="config_batterySdCardAccessibility">false</bool>
+
<!-- Vibrator pattern for feedback about a long screen/key press -->
<integer-array name="config_longPressVibePattern">
<item>0</item>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index b334337..36a8f5b 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1231,6 +1231,10 @@
<public type="attr" name="safeMode" id="0x010102b8" />
<public type="attr" name="webTextViewStyle" id="0x010102b9" />
<public type="attr" name="overscrollMode" id="0x010102ba" />
+ <public type="attr" name="restoreAnyVersion" id="0x010102bb" />
+ <public type="attr" name="stripLeft" id="0x010102bc" />
+ <public type="attr" name="stripRight" id="0x010102bd" />
+ <public type="attr" name="stripEnabled" id="0x010102be" />
<public type="anim" name="cycle_interpolator" id="0x010a000c" />
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index f1501ae..35ea0cc 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -779,18 +779,18 @@
applications can use this to read phone owner data.</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_readCalendar">read calendar data</string>
+ <string name="permlab_readCalendar">read calendar events</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_readCalendar">Allows an application to read all
of the calendar events stored on your phone. Malicious applications
can use this to send your calendar events to other people.</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_writeCalendar">write calendar data</string>
+ <string name="permlab_writeCalendar">add or modify calendar events and send email to guests</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_writeCalendar">Allows an application to modify the
- calendar events stored on your phone. Malicious
- applications can use this to erase or modify your calendar data.</string>
+ <string name="permdesc_writeCalendar">Allows an application to add or change the
+ events on your calendar, which may send email to guests. Malicious applications can use this
+ to erase or modify your calendar events or to send email to guests.</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_accessMockLocation">mock location sources for testing</string>
@@ -1441,6 +1441,8 @@
<string name="lockscreen_pattern_instructions">Draw pattern to unlock</string>
<!-- Button at the bottom of the unlock screen to make an emergency call. -->
<string name="lockscreen_emergency_call">Emergency call</string>
+ <!-- Button at the bottom of the unlock screen that lets the user return to a call -->
+ <string name="lockscreen_return_to_call">Return to call</string>
<!-- Shown to confirm that the user entered their lock pattern correctly. -->
<string name="lockscreen_pattern_correct">Correct!</string>
<!-- On the unlock pattern screen, shown when the user enters the wrong lock pattern and must try again. -->
@@ -1820,17 +1822,6 @@
<!-- Appened to express the value is this unit of time. -->
<string name="years">years</string>
- <!-- Calendar spinner item, to select that an event recurs every weekday. -->
- <string name="every_weekday">"Every weekday (Mon\u2013Fri)"</string>
- <!-- Calendar spinner item, to select that an event recurs every day. -->
- <string name="daily">Daily</string>
- <!-- Calendar spinner item, to select that an event recurs every week on a particular day of the week. -->
- <string name="weekly">"Weekly on <xliff:g id="day">%s</xliff:g>"</string>
- <!-- Calendar spinner item, to select that an event recurs every month. -->
- <string name="monthly">Monthly</string>
- <!-- Calendar spinner item, to select that an event recurs every year. -->
- <string name="yearly">Yearly</string>
-
<!-- Title for error alert when a video cannot be played. it can be used by any app. -->
<string name="VideoView_error_title">Cannot play video</string>
@@ -2045,9 +2036,6 @@
<!-- When installing an application, the less-dangerous permissions are hidden. This is the text to show those. -->
<string name="perms_show_all"><b>Show all</b></string>
- <!-- Shown when there is content loading from the internet into a dialog. -->
- <string name="googlewebcontenthelper_loading">Loading\u2026</string>
-
<!-- USB storage dialog strings -->
<!-- This is the title for the activity's window. -->
<string name="usb_storage_activity_title">USB Mass Storage</string>
@@ -2065,7 +2053,6 @@
<!-- See USB_STORAGE. This is the message. -->
<string name="usb_storage_notification_message">Select to copy files to/from your computer.</string>
-
<!-- USB_STORAGE_STOP: While USB storage is enabled, we show a notification dialog asking if he wants to stop. This is the title -->
<string name="usb_storage_stop_notification_title">Turn off USB storage</string>
<!-- See USB_STORAGE. This is the message. -->
@@ -2082,6 +2069,15 @@
<!-- See USB_STORAGE_STOP_DIALOG. If there was an error stopping, this is the text. -->
<string name="usb_storage_stop_error_message">There was a problem turning off USB storage. Check to make sure you have unmounted the USB host, then try again.</string>
+ <!-- USB_STORAGE_KILL_STORAGE_USERS dialog -->
+ <string name="dlg_confirm_kill_storage_users_title">Enable Mass Storage</string>
+ <!-- USB_STORAGE_KILL_STORAGE_USERS dialog message text -->
+ <string name="dlg_confirm_kill_storage_users_text">Some processes accessing data on sdcard will be killed. Do you want to continue?</string>
+ <!-- USB_STORAGE_ERROR dialog dialog-->
+ <string name="dlg_error_title">UMS operation failed</string>
+ <!-- USB_STORAGE_ERROR dialog ok button-->
+ <string name="dlg_ok">OK</string>
+
<!-- External media format dialog strings -->
<!-- This is the label for the activity, and should never be visible to the user. -->
<!-- See EXTMEDIA_FORMAT. EXTMEDIA_FORMAT_DIALOG: After the user selects the notification, a dialog is shown asking if he wants to format the SD card. This is the title. -->
@@ -2280,6 +2276,6 @@
<!-- Strings for car mode notification -->
<!-- Shown when car mode is enabled -->
<string name="car_mode_disable_notification_title">Car mode enabled</string>
- <string name="car_mode_disable_notification_message">Select to disable car mode.</string>
+ <string name="car_mode_disable_notification_message">Select to exit car mode.</string>
</resources>
diff --git a/core/tests/coretests/Android.mk b/core/tests/coretests/Android.mk
index 1fb9852..b0e2843 100644
--- a/core/tests/coretests/Android.mk
+++ b/core/tests/coretests/Android.mk
@@ -9,6 +9,8 @@
$(call all-java-files-under, src) \
src/android/os/IAidlTest.aidl
+LOCAL_STATIC_JAVA_LIBRARIES += android-common
+
LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_PACKAGE_NAME := FrameworksCoreTests
diff --git a/core/tests/coretests/src/android/app/SearchablesTest.java b/core/tests/coretests/src/android/app/SearchablesTest.java
index 9b4520e..6cb31d4 100644
--- a/core/tests/coretests/src/android/app/SearchablesTest.java
+++ b/core/tests/coretests/src/android/app/SearchablesTest.java
@@ -64,39 +64,7 @@
* findActionKey works
* getIcon works
*/
-
- /**
- * The goal of this test is to confirm proper operation of the
- * SearchableInfo helper class.
- *
- * TODO: The metadata source needs to be mocked out because adding
- * searchability metadata via this test is causing it to leak into the
- * real system. So for now I'm just going to test for existence of the
- * GlobalSearch app (which is searchable).
- */
- public void testSearchableGlobalSearch() {
- // test basic array & hashmap
- Searchables searchables = new Searchables(mContext);
- searchables.buildSearchableList();
- // test linkage from another activity
- // TODO inject this via mocking into the package manager.
- // TODO for now, just check for searchable GlobalSearch app (this isn't really a unit test)
- ComponentName thisActivity = new ComponentName(
- "com.android.globalsearch",
- "com.android.globalsearch.GlobalSearch");
-
- SearchableInfo si = searchables.getSearchableInfo(thisActivity);
- assertNotNull(si);
- assertEquals(thisActivity, si.getSearchActivity());
-
- Context appContext = si.getActivityContext(mContext);
- assertNotNull(appContext);
- MoreAsserts.assertNotEqual(appContext, mContext);
- assertEquals("Quick Search Box", appContext.getString(si.getHintId()));
- assertEquals("Quick Search Box", appContext.getString(si.getLabelId()));
- }
-
/**
* Test that non-searchable activities return no searchable info (this would typically
* trigger the use of the default searchable e.g. contacts)
@@ -113,18 +81,7 @@
SearchableInfo si = searchables.getSearchableInfo(nonActivity);
assertNull(si);
}
-
- /**
- * Test that there is a default searchable (aka global search provider).
- */
- public void testDefaultSearchable() {
- Searchables searchables = new Searchables(mContext);
- searchables.buildSearchableList();
- SearchableInfo si = searchables.getDefaultSearchable();
- checkSearchable(si);
- assertTrue(searchables.isDefaultSearchable(si));
- }
-
+
/**
* This is an attempt to run the searchable info list with a mocked context. Here are some
* things I'd like to test.
@@ -371,7 +328,8 @@
public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) {
assertNotNull(intent);
assertTrue(intent.getAction().equals(Intent.ACTION_SEARCH)
- || intent.getAction().equals(Intent.ACTION_WEB_SEARCH));
+ || intent.getAction().equals(Intent.ACTION_WEB_SEARCH)
+ || intent.getAction().equals(SearchManager.INTENT_ACTION_GLOBAL_SEARCH));
switch (mSearchablesMode) {
case SEARCHABLES_PASSTHROUGH:
return mRealPackageManager.queryIntentActivities(intent, flags);
@@ -472,6 +430,20 @@
throw new UnsupportedOperationException();
}
}
+
+ @Override
+ public int checkPermission(String permName, String pkgName) {
+ assertNotNull(permName);
+ assertNotNull(pkgName);
+ switch (mSearchablesMode) {
+ case SEARCHABLES_PASSTHROUGH:
+ return mRealPackageManager.checkPermission(permName, pkgName);
+ case SEARCHABLES_MOCK_ZERO:
+ return PackageManager.PERMISSION_DENIED;
+ default:
+ throw new UnsupportedOperationException();
+ }
+ }
}
}
diff --git a/core/tests/coretests/src/android/database/DatabaseGeneralTest.java b/core/tests/coretests/src/android/database/DatabaseGeneralTest.java
index e43031c..ab142c9 100644
--- a/core/tests/coretests/src/android/database/DatabaseGeneralTest.java
+++ b/core/tests/coretests/src/android/database/DatabaseGeneralTest.java
@@ -1009,4 +1009,24 @@
* mDatabase.close() in tearDown() should release it.
*/
}
+
+ @MediumTest
+ public void testSemicolonsInStatements() throws Exception {
+ mDatabase.execSQL("CREATE TABLE pragma_test (" +
+ "i INTEGER DEFAULT 1234, " +
+ "j INTEGER, " +
+ "s TEXT DEFAULT 'hello', " +
+ "t TEXT, " +
+ "'select' TEXT DEFAULT \"hello\")");
+ try {
+ // ending the sql statement with semicolons shouldn't be a problem.
+ Cursor cur = mDatabase.rawQuery("PRAGMA database_list;", null);
+ cur.close();
+ // two semicolons in the statement shouldn't be a problem.
+ cur = mDatabase.rawQuery("PRAGMA database_list;;", null);
+ cur.close();
+ } catch (Throwable t) {
+ fail("unexpected, of course");
+ }
+ }
}
diff --git a/core/tests/coretests/src/android/text/StaticLayoutBidiTest.java b/core/tests/coretests/src/android/text/StaticLayoutBidiTest.java
new file mode 100644
index 0000000..da6036a
--- /dev/null
+++ b/core/tests/coretests/src/android/text/StaticLayoutBidiTest.java
@@ -0,0 +1,137 @@
+/*
+ * 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.text;
+
+import android.test.suitebuilder.annotation.SmallTest;
+import android.util.Log;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests StaticLayout bidi implementation.
+ */
+public class StaticLayoutBidiTest extends TestCase {
+
+ public static final int REQ_DL = 2; // Layout.DIR_REQUEST_DEFAULT_LTR;
+ public static final int REQ_DR = -2; // Layout.DIR_REQUEST_DEFAULT_RTL;
+ public static final int REQ_L = 1; // Layout.DIR_REQUEST_LTR;
+ public static final int REQ_R = -1; // Layout.DIR_REQUEST_RTL;
+ public static final int L = Layout.DIR_LEFT_TO_RIGHT;
+ public static final int R = Layout.DIR_RIGHT_TO_LEFT;
+
+ public static final String SP = " ";
+ public static final String ALEF = "\u05d0";
+ public static final String BET = "\u05d1";
+ public static final String GIMEL = "\u05d2";
+ public static final String DALET = "\u05d3";
+
+ @SmallTest
+ public void testAllLtr() {
+ expectBidi(REQ_DL, "a test", "000000", L);
+ }
+
+ @SmallTest
+ public void testLtrRtl() {
+ expectBidi(REQ_DL, "abc " + ALEF + BET + GIMEL, "0000111", L);
+ }
+
+ @SmallTest
+ public void testAllRtl() {
+ expectBidi(REQ_DL, ALEF + SP + ALEF + BET + GIMEL + DALET, "111111", R);
+ }
+
+ @SmallTest
+ public void testRtlLtr() {
+ expectBidi(REQ_DL, ALEF + BET + GIMEL + " abc", "1111000", R);
+ }
+
+ @SmallTest
+ public void testRAllLtr() {
+ expectBidi(REQ_R, "a test", "000000", R);
+ }
+
+ @SmallTest
+ public void testRLtrRtl() {
+ expectBidi(REQ_R, "abc " + ALEF + BET + GIMEL, "0001111", R);
+ }
+
+ @SmallTest
+ public void testLAllRtl() {
+ expectBidi(REQ_L, ALEF + SP + ALEF + BET + GIMEL + DALET, "111111", L);
+ }
+
+ @SmallTest
+ public void testLRtlLtr() {
+ expectBidi(REQ_L, ALEF + BET + GIMEL + " abc", "1110000", L);
+ }
+
+ private void expectBidi(int dir, String text,
+ String expectedLevels, int expectedDir) {
+ char[] chs = text.toCharArray();
+ int n = chs.length;
+ byte[] chInfo = new byte[n];
+
+ int resultDir = StaticLayout.bidi(dir, chs, chInfo, n, false);
+
+ {
+ StringBuilder sb = new StringBuilder("info:");
+ for (int i = 0; i < n; ++i) {
+ sb.append(" ").append(String.valueOf(chInfo[i]));
+ }
+ Log.i("BIDI", sb.toString());
+ }
+
+ char[] resultLevelChars = new char[n];
+ for (int i = 0; i < n; ++i) {
+ resultLevelChars[i] = (char)('0' + chInfo[i]);
+ }
+ String resultLevels = new String(resultLevelChars);
+ assertEquals("direction", expectedDir, resultDir);
+ assertEquals("levels", expectedLevels, resultLevels);
+ }
+
+ @SmallTest
+ public void testNativeBidi() {
+ // native bidi returns levels, not simply directions
+ expectNativeBidi(REQ_DL, ALEF + BET + GIMEL + " abc", "1111222", R);
+ }
+
+ private void expectNativeBidi(int dir, String text,
+ String expectedLevels, int expectedDir) {
+ char[] chs = text.toCharArray();
+ int n = chs.length;
+ byte[] chInfo = new byte[n];
+
+ int resultDir = AndroidBidi.bidi(dir, chs, chInfo, n, false);
+
+ {
+ StringBuilder sb = new StringBuilder("info:");
+ for (int i = 0; i < n; ++i) {
+ sb.append(" ").append(String.valueOf(chInfo[i]));
+ }
+ Log.i("BIDI", sb.toString());
+ }
+
+ char[] resultLevelChars = new char[n];
+ for (int i = 0; i < n; ++i) {
+ resultLevelChars[i] = (char)('0' + chInfo[i]);
+ }
+ String resultLevels = new String(resultLevelChars);
+ assertEquals("direction", expectedDir, resultDir);
+ assertEquals("levels", expectedLevels, resultLevels);
+ }
+}
diff --git a/core/tests/coretests/src/android/text/StaticLayoutTest.java b/core/tests/coretests/src/android/text/StaticLayoutTest.java
index 1e4db3d..7511ec1 100644
--- a/core/tests/coretests/src/android/text/StaticLayoutTest.java
+++ b/core/tests/coretests/src/android/text/StaticLayoutTest.java
@@ -213,13 +213,13 @@
}
public int scale(float height) {
- int altVal = (int)(height * sMult + sAdd + 0.5); // existing impl
+ int altVal = (int)(height * sMult + sAdd + 0.5);
int rndVal = Math.round(height * sMult + sAdd);
if (altVal != rndVal) {
Log.i("Scale", "expected scale: " + rndVal +
" != returned scale: " + altVal);
}
- return altVal; // existing implementation
+ return rndVal;
}
}
diff --git a/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListBasicTest.java b/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListBasicTest.java
index 23a4cde..e23b516 100644
--- a/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListBasicTest.java
+++ b/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListBasicTest.java
@@ -16,29 +16,26 @@
package android.widget.expandablelistview;
-import android.widget.expandablelistview.ExpandableListSimple;
+import android.test.ActivityInstrumentationTestCase2;
+import android.test.suitebuilder.annotation.MediumTest;
import android.util.ExpandableListScenario;
import android.util.ListUtil;
import android.util.ExpandableListScenario.MyGroup;
-
-import java.util.List;
-
-import android.test.ActivityInstrumentationTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
import android.view.KeyEvent;
import android.widget.BaseExpandableListAdapter;
import android.widget.ExpandableListAdapter;
import android.widget.ExpandableListView;
-public class ExpandableListBasicTest extends ActivityInstrumentationTestCase<ExpandableListSimple> {
+import java.util.List;
+
+public class ExpandableListBasicTest extends ActivityInstrumentationTestCase2<ExpandableListSimple> {
private ExpandableListScenario mActivity;
- private ExpandableListView mListView;
+ private ExpandableListView mExpandableListView;
private ExpandableListAdapter mAdapter;
private ListUtil mListUtil;
public ExpandableListBasicTest() {
- super("com.android.frameworks.coretests",
- ExpandableListSimple.class);
+ super(ExpandableListSimple.class);
}
@Override
@@ -46,28 +43,28 @@
super.setUp();
mActivity = getActivity();
- mListView = mActivity.getExpandableListView();
- mAdapter = mListView.getExpandableListAdapter();
- mListUtil = new ListUtil(mListView, getInstrumentation());
+ mExpandableListView = mActivity.getExpandableListView();
+ mAdapter = mExpandableListView.getExpandableListAdapter();
+ mListUtil = new ListUtil(mExpandableListView, getInstrumentation());
}
@MediumTest
public void testPreconditions() {
assertNotNull(mActivity);
- assertNotNull(mListView);
+ assertNotNull(mExpandableListView);
}
private int expandGroup(int numChildren, boolean atLeastOneChild) {
final int groupPos = mActivity.findGroupWithNumChildren(numChildren, atLeastOneChild);
-
assertTrue("Could not find group to expand", groupPos >= 0);
- assertFalse("Group is already expanded", mListView.isGroupExpanded(groupPos));
+
+ assertFalse("Group is already expanded", mExpandableListView.isGroupExpanded(groupPos));
mListUtil.arrowScrollToSelectedPosition(groupPos);
getInstrumentation().waitForIdleSync();
sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
getInstrumentation().waitForIdleSync();
- assertTrue("Group did not expand", mListView.isGroupExpanded(groupPos));
-
+ assertTrue("Group did not expand", mExpandableListView.isGroupExpanded(groupPos));
+
return groupPos;
}
@@ -82,25 +79,24 @@
sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
getInstrumentation().waitForIdleSync();
- assertFalse("Group did not collapse", mListView.isGroupExpanded(groupPos));
+ assertFalse("Group did not collapse", mExpandableListView.isGroupExpanded(groupPos));
}
@MediumTest
public void testExpandedGroupMovement() {
-
// Expand the first group
mListUtil.arrowScrollToSelectedPosition(0);
sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
getInstrumentation().waitForIdleSync();
// Ensure it expanded
- assertTrue("Group did not expand", mListView.isGroupExpanded(0));
+ assertTrue("Group did not expand", mExpandableListView.isGroupExpanded(0));
// Wait until that's all good
getInstrumentation().waitForIdleSync();
// Make sure it expanded
- assertTrue("Group did not expand", mListView.isGroupExpanded(0));
+ assertTrue("Group did not expand", mExpandableListView.isGroupExpanded(0));
// Insert a collapsed group in front of the one just expanded
List<MyGroup> groups = mActivity.getGroups();
@@ -121,9 +117,28 @@
// Make sure the right group is expanded
assertTrue("The expanded state didn't stay with the proper group",
- mListView.isGroupExpanded(1));
+ mExpandableListView.isGroupExpanded(1));
assertFalse("The expanded state was given to the inserted group",
- mListView.isGroupExpanded(0));
+ mExpandableListView.isGroupExpanded(0));
}
-
+
+ @MediumTest
+ public void testContextMenus() {
+ ExpandableListTester tester = new ExpandableListTester(mExpandableListView, this);
+ tester.testContextMenus();
+ }
+
+ @MediumTest
+ public void testConvertionBetweenFlatAndPacked() {
+ ExpandableListTester tester = new ExpandableListTester(mExpandableListView, this);
+ tester.testConvertionBetweenFlatAndPackedOnGroups();
+ tester.testConvertionBetweenFlatAndPackedOnChildren();
+ }
+
+ @MediumTest
+ public void testSelectedPosition() {
+ ExpandableListTester tester = new ExpandableListTester(mExpandableListView, this);
+ tester.testSelectedPositionOnGroups();
+ tester.testSelectedPositionOnChildren();
+ }
}
diff --git a/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListTester.java b/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListTester.java
new file mode 100644
index 0000000..ad99ee8
--- /dev/null
+++ b/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListTester.java
@@ -0,0 +1,233 @@
+/*
+ * 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.widget.expandablelistview;
+
+import android.app.Instrumentation;
+import android.test.ActivityInstrumentationTestCase2;
+import android.util.ExpandableListScenario;
+import android.util.ListUtil;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.ExpandableListAdapter;
+import android.widget.ExpandableListView;
+
+import junit.framework.Assert;
+
+public class ExpandableListTester {
+ private ExpandableListView mExpandableListView;
+ private ExpandableListAdapter mAdapter;
+ private ListUtil mListUtil;
+
+ private ActivityInstrumentationTestCase2<? extends ExpandableListScenario>
+ mActivityInstrumentation;
+
+ Instrumentation mInstrumentation;
+
+ public ExpandableListTester(
+ ExpandableListView expandableListView,
+ ActivityInstrumentationTestCase2<? extends ExpandableListScenario>
+ activityInstrumentation) {
+ mExpandableListView = expandableListView;
+ Instrumentation instrumentation = activityInstrumentation.getInstrumentation();
+ mListUtil = new ListUtil(mExpandableListView, instrumentation);
+ mAdapter = mExpandableListView.getExpandableListAdapter();
+ mActivityInstrumentation = activityInstrumentation;
+ mInstrumentation = mActivityInstrumentation.getInstrumentation();
+ }
+
+ private void expandGroup(final int groupIndex, int flatPosition) {
+ Assert.assertFalse("Group is already expanded", mExpandableListView
+ .isGroupExpanded(groupIndex));
+ mListUtil.arrowScrollToSelectedPosition(flatPosition);
+ mInstrumentation.waitForIdleSync();
+ mActivityInstrumentation.sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
+ mActivityInstrumentation.getInstrumentation().waitForIdleSync();
+ Assert.assertTrue("Group did not expand " + groupIndex,
+ mExpandableListView.isGroupExpanded(groupIndex));
+ }
+
+ void testContextMenus() {
+ // Add a position tester ContextMenu listener to the ExpandableListView
+ PositionTesterContextMenuListener menuListener = new PositionTesterContextMenuListener();
+ mExpandableListView.setOnCreateContextMenuListener(menuListener);
+
+ int index = 0;
+
+ // Scrolling on header elements should trigger an AdapterContextMenu
+ for (int i=0; i<mExpandableListView.getHeaderViewsCount(); i++) {
+ // Check group index in context menu
+ menuListener.expectAdapterContextMenu(i);
+ // Make sure the group is visible so that getChild finds it
+ mListUtil.arrowScrollToSelectedPosition(index);
+ View headerChild = mExpandableListView.getChildAt(index
+ - mExpandableListView.getFirstVisiblePosition());
+ mExpandableListView.showContextMenuForChild(headerChild);
+ index++;
+ }
+
+ int groupCount = mAdapter.getGroupCount();
+ for (int groupIndex = 0; groupIndex < groupCount; groupIndex++) {
+
+ // Expand group
+ expandGroup(groupIndex, index);
+
+ // Check group index in context menu
+ menuListener.expectGroupContextMenu(groupIndex);
+ // Make sure the group is visible so that getChild finds it
+ mListUtil.arrowScrollToSelectedPosition(index);
+ View groupChild = mExpandableListView.getChildAt(index
+ - mExpandableListView.getFirstVisiblePosition());
+ mExpandableListView.showContextMenuForChild(groupChild);
+ index++;
+
+ final int childrenCount = mAdapter.getChildrenCount(groupIndex);
+ for (int childIndex = 0; childIndex < childrenCount; childIndex++) {
+ // Check child index in context menu
+ mListUtil.arrowScrollToSelectedPosition(index);
+ menuListener.expectChildContextMenu(groupIndex, childIndex);
+ View child = mExpandableListView.getChildAt(index
+ - mExpandableListView.getFirstVisiblePosition());
+ mExpandableListView.showContextMenuForChild(child);
+ index++;
+ }
+ }
+
+ // Scrolling on footer elements should trigger an AdapterContextMenu
+ for (int i=0; i<mExpandableListView.getFooterViewsCount(); i++) {
+ // Check group index in context menu
+ menuListener.expectAdapterContextMenu(index);
+ // Make sure the group is visible so that getChild finds it
+ mListUtil.arrowScrollToSelectedPosition(index);
+ View footerChild = mExpandableListView.getChildAt(index
+ - mExpandableListView.getFirstVisiblePosition());
+ mExpandableListView.showContextMenuForChild(footerChild);
+ index++;
+ }
+
+ // Cleanup: remove the listener we added.
+ mExpandableListView.setOnCreateContextMenuListener(null);
+ }
+
+ private int expandAGroup() {
+ final int groupIndex = 2;
+ final int headerCount = mExpandableListView.getHeaderViewsCount();
+ Assert.assertTrue("Not enough groups", groupIndex < mAdapter.getGroupCount());
+ expandGroup(groupIndex, groupIndex + headerCount);
+ return groupIndex;
+ }
+
+ // This method assumes that NO group is expanded when called
+ void testConvertionBetweenFlatAndPackedOnGroups() {
+ final int headerCount = mExpandableListView.getHeaderViewsCount();
+
+ for (int i=0; i<headerCount; i++) {
+ Assert.assertEquals("Non NULL position for header item",
+ ExpandableListView.PACKED_POSITION_VALUE_NULL,
+ mExpandableListView.getExpandableListPosition(i));
+ }
+
+ // Test all (non expanded) groups
+ final int groupCount = mAdapter.getGroupCount();
+ for (int groupIndex = 0; groupIndex < groupCount; groupIndex++) {
+ int expectedFlatPosition = headerCount + groupIndex;
+ long packedPositionForGroup = ExpandableListView.getPackedPositionForGroup(groupIndex);
+ Assert.assertEquals("Group not found at flat position " + expectedFlatPosition,
+ packedPositionForGroup,
+ mExpandableListView.getExpandableListPosition(expectedFlatPosition));
+
+ Assert.assertEquals("Wrong flat position for group " + groupIndex,
+ expectedFlatPosition,
+ mExpandableListView.getFlatListPosition(packedPositionForGroup));
+ }
+
+ for (int i=0; i<mExpandableListView.getFooterViewsCount(); i++) {
+ Assert.assertEquals("Non NULL position for header item",
+ ExpandableListView.PACKED_POSITION_VALUE_NULL,
+ mExpandableListView.getExpandableListPosition(headerCount + groupCount + i));
+ }
+ }
+
+ // This method assumes that NO group is expanded when called
+ void testConvertionBetweenFlatAndPackedOnChildren() {
+ // Test with an expanded group
+ final int headerCount = mExpandableListView.getHeaderViewsCount();
+ final int groupIndex = expandAGroup();
+
+ final int childrenCount = mAdapter.getChildrenCount(groupIndex);
+ for (int childIndex = 0; childIndex < childrenCount; childIndex++) {
+ int expectedFlatPosition = headerCount + groupIndex + 1 + childIndex;
+ long childPos = ExpandableListView.getPackedPositionForChild(groupIndex, childIndex);
+
+ Assert.assertEquals("Wrong flat position for child ",
+ childPos,
+ mExpandableListView.getExpandableListPosition(expectedFlatPosition));
+
+ Assert.assertEquals("Wrong flat position for child ",
+ expectedFlatPosition,
+ mExpandableListView.getFlatListPosition(childPos));
+ }
+ }
+
+ // This method assumes that NO group is expanded when called
+ void testSelectedPositionOnGroups() {
+ int index = 0;
+
+ // Scrolling on header elements should not give a valid selected position.
+ for (int i=0; i<mExpandableListView.getHeaderViewsCount(); i++) {
+ mListUtil.arrowScrollToSelectedPosition(index);
+ Assert.assertEquals("Header item is selected",
+ ExpandableListView.PACKED_POSITION_VALUE_NULL,
+ mExpandableListView.getSelectedPosition());
+ index++;
+ }
+
+ // Check selection on group items
+ final int groupCount = mAdapter.getGroupCount();
+ for (int groupIndex = 0; groupIndex < groupCount; groupIndex++) {
+ mListUtil.arrowScrollToSelectedPosition(index);
+ Assert.assertEquals("Group item is not selected",
+ ExpandableListView.getPackedPositionForGroup(groupIndex),
+ mExpandableListView.getSelectedPosition());
+ index++;
+ }
+
+ // Scrolling on footer elements should not give a valid selected position.
+ for (int i=0; i<mExpandableListView.getFooterViewsCount(); i++) {
+ mListUtil.arrowScrollToSelectedPosition(index);
+ Assert.assertEquals("Footer item is selected",
+ ExpandableListView.PACKED_POSITION_VALUE_NULL,
+ mExpandableListView.getSelectedPosition());
+ index++;
+ }
+ }
+
+ // This method assumes that NO group is expanded when called
+ void testSelectedPositionOnChildren() {
+ // Test with an expanded group
+ final int headerCount = mExpandableListView.getHeaderViewsCount();
+ final int groupIndex = expandAGroup();
+
+ final int childrenCount = mAdapter.getChildrenCount(groupIndex);
+ for (int childIndex = 0; childIndex < childrenCount; childIndex++) {
+ int childFlatPosition = headerCount + groupIndex + 1 + childIndex;
+ mListUtil.arrowScrollToSelectedPosition(childFlatPosition);
+ Assert.assertEquals("Group item is not selected",
+ ExpandableListView.getPackedPositionForChild(groupIndex, childIndex),
+ mExpandableListView.getSelectedPosition());
+ }
+ }
+}
diff --git a/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListWithHeaders.java b/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListWithHeaders.java
index 7965f9f..2251c1d 100644
--- a/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListWithHeaders.java
+++ b/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListWithHeaders.java
@@ -16,13 +16,10 @@
package android.widget.expandablelistview;
-import android.util.ExpandableListScenario;
-
import android.os.Bundle;
+import android.util.ExpandableListScenario;
import android.widget.Button;
import android.widget.ExpandableListView;
-import android.widget.ListAdapter;
-import android.widget.ListView;
public class ExpandableListWithHeaders extends ExpandableListScenario {
private static final int[] sNumChildren = {1, 4, 3, 2, 6};
@@ -46,13 +43,13 @@
for (int i = 0; i < sNumOfHeadersAndFooters; i++) {
Button header = new Button(this);
- header.setText("Header View");
+ header.setText("Header View " + i);
expandableListView.addHeaderView(header);
}
for (int i = 0; i < sNumOfHeadersAndFooters; i++) {
Button footer = new Button(this);
- footer.setText("Footer View");
+ footer.setText("Footer View " + i);
expandableListView.addFooterView(footer);
}
diff --git a/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListWithHeadersTest.java b/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListWithHeadersTest.java
index 50d0929..64a0fff 100644
--- a/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListWithHeadersTest.java
+++ b/core/tests/coretests/src/android/widget/expandablelistview/ExpandableListWithHeadersTest.java
@@ -16,22 +16,20 @@
package android.widget.expandablelistview;
-import android.test.ActivityInstrumentationTestCase;
+import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.MediumTest;
+import android.util.ListUtil;
import android.view.KeyEvent;
import android.widget.ExpandableListView;
-import android.widget.expandablelistview.ExpandableListWithHeaders;
-import android.util.ListUtil;
-
-public class ExpandableListWithHeadersTest extends ActivityInstrumentationTestCase<ExpandableListWithHeaders> {
+public class ExpandableListWithHeadersTest extends
+ ActivityInstrumentationTestCase2<ExpandableListWithHeaders> {
private ExpandableListView mExpandableListView;
private ListUtil mListUtil;
public ExpandableListWithHeadersTest() {
- super("com.android.frameworks.coretests",
- ExpandableListWithHeaders.class);
+ super(ExpandableListWithHeaders.class);
}
@Override
@@ -63,4 +61,24 @@
getInstrumentation().waitForIdleSync();
assertTrue(mExpandableListView.isGroupExpanded(0));
}
+
+ @MediumTest
+ public void testContextMenus() {
+ ExpandableListTester tester = new ExpandableListTester(mExpandableListView, this);
+ tester.testContextMenus();
+ }
+
+ @MediumTest
+ public void testConvertionBetweenFlatAndPacked() {
+ ExpandableListTester tester = new ExpandableListTester(mExpandableListView, this);
+ tester.testConvertionBetweenFlatAndPackedOnGroups();
+ tester.testConvertionBetweenFlatAndPackedOnChildren();
+ }
+
+ @MediumTest
+ public void testSelectedPosition() {
+ ExpandableListTester tester = new ExpandableListTester(mExpandableListView, this);
+ tester.testSelectedPositionOnGroups();
+ tester.testSelectedPositionOnChildren();
+ }
}
diff --git a/core/tests/coretests/src/android/widget/expandablelistview/InflatedExpandableListView.java b/core/tests/coretests/src/android/widget/expandablelistview/InflatedExpandableListView.java
index 08b0d31..f4c9d56 100644
--- a/core/tests/coretests/src/android/widget/expandablelistview/InflatedExpandableListView.java
+++ b/core/tests/coretests/src/android/widget/expandablelistview/InflatedExpandableListView.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.view.widget.expandablelistview;
+package android.widget.expandablelistview;
import com.android.frameworks.coretests.R;
diff --git a/core/tests/coretests/src/android/widget/expandablelistview/PositionTesterContextMenuListener.java b/core/tests/coretests/src/android/widget/expandablelistview/PositionTesterContextMenuListener.java
new file mode 100644
index 0000000..7036c30
--- /dev/null
+++ b/core/tests/coretests/src/android/widget/expandablelistview/PositionTesterContextMenuListener.java
@@ -0,0 +1,63 @@
+package android.widget.expandablelistview;
+
+import android.view.ContextMenu;
+import android.view.View;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.View.OnCreateContextMenuListener;
+import android.widget.ExpandableListView;
+import android.widget.AdapterView.AdapterContextMenuInfo;
+
+import junit.framework.Assert;
+
+public class PositionTesterContextMenuListener implements OnCreateContextMenuListener {
+
+ private int groupPosition, childPosition;
+
+ // Fake constant to store in testType a test type specific to headers and footers
+ private static final int ADAPTER_TYPE = -1;
+ private int testType; // as returned by getPackedPositionType
+
+ public void expectGroupContextMenu(int groupPosition) {
+ this.groupPosition = groupPosition;
+ testType = ExpandableListView.PACKED_POSITION_TYPE_GROUP;
+ }
+
+ public void expectChildContextMenu(int groupPosition, int childPosition) {
+ this.groupPosition = groupPosition;
+ this.childPosition = childPosition;
+ testType = ExpandableListView.PACKED_POSITION_TYPE_CHILD;
+ }
+
+ public void expectAdapterContextMenu(int flatPosition) {
+ this.groupPosition = flatPosition;
+ testType = ADAPTER_TYPE;
+ }
+
+ public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
+ if (testType == ADAPTER_TYPE) {
+ Assert.assertTrue("MenuInfo is not an AdapterContextMenuInfo",
+ menuInfo instanceof AdapterContextMenuInfo);
+ AdapterContextMenuInfo adapterContextMenuInfo = (AdapterContextMenuInfo) menuInfo;
+ Assert.assertEquals("Wrong flat position",
+ groupPosition,
+ adapterContextMenuInfo.position);
+ } else {
+ Assert.assertTrue("MenuInfo is not an ExpandableListContextMenuInfo",
+ menuInfo instanceof ExpandableListView.ExpandableListContextMenuInfo);
+ ExpandableListView.ExpandableListContextMenuInfo elvMenuInfo =
+ (ExpandableListView.ExpandableListContextMenuInfo) menuInfo;
+ long packedPosition = elvMenuInfo.packedPosition;
+
+ int packedPositionType = ExpandableListView.getPackedPositionType(packedPosition);
+ Assert.assertEquals("Wrong packed position type", testType, packedPositionType);
+
+ int packedPositionGroup = ExpandableListView.getPackedPositionGroup(packedPosition);
+ Assert.assertEquals("Wrong group position", groupPosition, packedPositionGroup);
+
+ if (testType == ExpandableListView.PACKED_POSITION_TYPE_CHILD) {
+ int packedPosChild = ExpandableListView.getPackedPositionChild(packedPosition);
+ Assert.assertEquals("Wrong child position", childPosition, packedPosChild);
+ }
+ }
+ }
+}
diff --git a/docs/html/guide/practices/design/performance.jd b/docs/html/guide/practices/design/performance.jd
index ab3b3d3..baed020 100644
--- a/docs/html/guide/practices/design/performance.jd
+++ b/docs/html/guide/practices/design/performance.jd
@@ -356,25 +356,19 @@
<p>There are several alternatives for iterating through an array:</p>
-<pre>public class Foo {
- int mSplat;
-}
-public class ArrayBenchmark {
- Foo[] mArray = new Foo[27];
- {
- for (int i = 0; i < mArray.length; ++i) {
- mArray[i] = new Foo();
- }
+<pre> static class Foo {
+ int mSplat;
}
+ Foo[] mArray = ...
- public static void zero() {
+ public void zero() {
int sum = 0;
for (int i = 0; i < mArray.length; ++i) {
sum += mArray[i].mSplat;
}
}
- public static void one() {
+ public void one() {
int sum = 0;
Foo[] localArray = mArray;
int len = localArray.length;
@@ -384,13 +378,13 @@
}
}
- public static void two() {
+ public void two() {
int sum = 0;
for (Foo a : mArray) {
sum += a.mSplat;
}
}
-}</pre>
+</pre>
<p><strong>zero()</strong> is slowest, because the JIT can't yet optimize away
the cost of getting the array length once for every iteration through the
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
index e328f33..752afc2 100644
--- a/include/camera/CameraParameters.h
+++ b/include/camera/CameraParameters.h
@@ -187,16 +187,45 @@
// Vertical angle of view in degrees.
// Example value: "42.5". Read only.
static const char KEY_VERTICAL_VIEW_ANGLE[];
- // Exposure compensation. The value is multiplied by 100. -100 means -1 EV.
- // 130 means +1.3 EV.
- // Example value: "0" or "133". Read/write.
+ // Exposure compensation index. 0 means exposure is not adjusted.
+ // Example value: "0" or "5". Read/write.
static const char KEY_EXPOSURE_COMPENSATION[];
- // Supported exposure compensation.
- // Example value: "-100,-66,-33,0,33,66,100". Read only.
- static const char KEY_SUPPORTED_EXPOSURE_COMPENSATION[];
+ // The maximum exposure compensation index (>=0).
+ // Example value: "6". Read only.
+ static const char KEY_MAX_EXPOSURE_COMPENSATION[];
+ // The minimum exposure compensation index (<=0).
+ // Example value: "-6". Read only.
+ static const char KEY_MIN_EXPOSURE_COMPENSATION[];
+ // The exposure compensation step. Exposure compensation index multiply by
+ // step eqals to EV. Ex: if exposure compensation index is 6 and step is
+ // 0.3333, EV is -2.
+ // Example value: "0.333333333" or "0.5". Read only.
+ static const char KEY_EXPOSURE_COMPENSATION_STEP[];
+ // Current zoom value.
+ // Example value: "0" or "6". Read/write.
+ static const char KEY_ZOOM[];
+ // Maximum zoom value.
+ // Example value: "6". Read only.
+ static const char KEY_MAX_ZOOM[];
+ // The zoom ratios of all zoom values. The zoom ratio is in 1/100
+ // increments. Ex: a zoom of 3.2x is returned as 320. The number of list
+ // elements is KEY_MAX_ZOOM + 1. The first element is always 100. The last
+ // element is the zoom ratio of zoom value KEY_MAX_ZOOM.
+ // Example value: "100,150,200,250,300,350,400". Read only.
+ static const char KEY_ZOOM_RATIOS[];
+ // Whether zoom is supported. Zoom is supported if the value is "true". Zoom
+ // is not supported if the value is not "true" or the key does not exist.
+ // Example value: "true". Read only.
+ static const char KEY_ZOOM_SUPPORTED[];
+ // Whether if smooth zoom is supported. Smooth zoom is supported if the
+ // value is "true". It is not supported if the value is not "true" or the
+ // key does not exist.
+ // See CAMERA_CMD_START_SMOOTH_ZOOM, CAMERA_CMD_STOP_SMOOTH_ZOOM, and
+ // CAMERA_MSG_ZOOM in frameworks/base/include/camera/Camera.h.
+ // Example value: "true". Read only.
+ static const char KEY_SMOOTH_ZOOM_SUPPORTED[];
-
- // Values for white balance settings.
+ // Values for white balance settings.
static const char WHITE_BALANCE_AUTO[];
static const char WHITE_BALANCE_INCANDESCENT[];
static const char WHITE_BALANCE_FLUORESCENT[];
diff --git a/include/media/MediaProfiles.h b/include/media/MediaProfiles.h
index 3f253f9..eb96d20 100644
--- a/include/media/MediaProfiles.h
+++ b/include/media/MediaProfiles.h
@@ -52,6 +52,7 @@
* or -1 if error.
*
* Supported param name are:
+ * duration - the recording duration.
* file.format - output file format. see mediarecorder.h for details
* vid.codec - video encoder. see mediarecorder.h for details.
* aud.codec - audio encoder. see mediarecorder.h for details.
@@ -120,6 +121,16 @@
*/
Vector<audio_decoder> getAudioDecoders() const;
+ /**
+ * Returns the number of image encoding quality levels supported.
+ */
+ Vector<int> getImageEncodingQualityLevels() const;
+
+ /**
+ * Returns the maximum amount of memory in bytes we can use for decoding a JPEG file.
+ */
+ int getImageDecodingMaxMemory() const;
+
private:
MediaProfiles& operator=(const MediaProfiles&); // Don't call me
MediaProfiles(const MediaProfiles&); // Don't call me
@@ -257,6 +268,8 @@
static VideoEncoderCap* createVideoEncoderCap(const char **atts);
static AudioEncoderCap* createAudioEncoderCap(const char **atts);
static CamcorderProfile* createCamcorderProfile(const char **atts);
+ static int getImageEncodingQualityLevel(const char **atts);
+ static int getImageDecodingMaxMemory(const char **atts);
// Customized element tag handler for parsing the xml configuration file.
static void startElementHandler(void *userData, const char *name, const char **atts);
@@ -271,6 +284,8 @@
static void createDefaultVideoDecoders(MediaProfiles *profiles);
static void createDefaultAudioDecoders(MediaProfiles *profiles);
static void createDefaultEncoderOutputFileFormats(MediaProfiles *profiles);
+ static void createDefaultImageEncodingQualityLevels(MediaProfiles *profiles);
+ static void createDefaultImageDecodingMaxMemory(MediaProfiles *profiles);
static VideoEncoderCap* createDefaultH263VideoEncoderCap();
static VideoEncoderCap* createDefaultM4vVideoEncoderCap();
static AudioEncoderCap* createDefaultAmrNBEncoderCap();
@@ -295,6 +310,8 @@
Vector<AudioDecoderCap*> mAudioDecoders;
Vector<VideoDecoderCap*> mVideoDecoders;
Vector<output_format> mEncoderOutputFileFormats;
+ Vector<int> mImageEncodingQualityLevels;
+ int mImageDecodingMaxMemory;
};
}; // namespace android
diff --git a/include/media/stagefright/AudioPlayer.h b/include/media/stagefright/AudioPlayer.h
index 8e5f05f..ea15a5c 100644
--- a/include/media/stagefright/AudioPlayer.h
+++ b/include/media/stagefright/AudioPlayer.h
@@ -61,7 +61,7 @@
status_t seekTo(int64_t time_us);
bool isSeeking();
- bool reachedEOS();
+ bool reachedEOS(status_t *finalStatus);
private:
sp<MediaSource> mSource;
@@ -81,6 +81,7 @@
bool mSeeking;
bool mReachedEOS;
+ status_t mFinalStatus;
int64_t mSeekTimeUs;
bool mStarted;
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index f8bc7ab..24c2f46 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -96,6 +96,7 @@
kRequiresFlushBeforeShutdown = 64,
kDefersOutputBufferAllocation = 128,
kDecoderLiesAboutNumberOfChannels = 256,
+ kInputBufferSizesAreBogus = 512,
};
struct BufferInfo {
@@ -131,6 +132,7 @@
PortStatus mPortStatus[2];
bool mInitialBufferSubmit;
bool mSignalledEOS;
+ status_t mFinalStatus;
bool mNoMoreOutputData;
bool mOutputPortSettingsHaveChanged;
int64_t mSeekTimeUs;
diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h
index 13ea27e..cd657e8 100644
--- a/include/utils/ResourceTypes.h
+++ b/include/utils/ResourceTypes.h
@@ -447,6 +447,8 @@
}
const char16_t* stringAt(size_t idx, size_t* outLen) const;
+ const char* string8At(size_t idx, size_t* outLen) const;
+
const ResStringPool_span* styleAt(const ResStringPool_ref& ref) const;
const ResStringPool_span* styleAt(size_t idx) const;
diff --git a/libs/audioflinger/AudioPolicyManagerBase.cpp b/libs/audioflinger/AudioPolicyManagerBase.cpp
index 096aa73..7b866c7 100644
--- a/libs/audioflinger/AudioPolicyManagerBase.cpp
+++ b/libs/audioflinger/AudioPolicyManagerBase.cpp
@@ -82,8 +82,8 @@
// keep track of SCO device address
mScoDeviceAddress = String8(device_address, MAX_DEVICE_ADDRESS_LEN);
#ifdef WITH_A2DP
- if ((mA2dpDeviceAddress == mScoDeviceAddress) &&
- (mPhoneState != AudioSystem::MODE_NORMAL)) {
+ if (mA2dpOutput != 0 &&
+ mPhoneState != AudioSystem::MODE_NORMAL) {
mpClientInterface->suspendOutput(mA2dpOutput);
}
#endif
@@ -116,8 +116,8 @@
if (AudioSystem::isBluetoothScoDevice(device)) {
mScoDeviceAddress = "";
#ifdef WITH_A2DP
- if ((mA2dpDeviceAddress == mScoDeviceAddress) &&
- (mPhoneState != AudioSystem::MODE_NORMAL)) {
+ if (mA2dpOutput != 0 &&
+ mPhoneState != AudioSystem::MODE_NORMAL) {
mpClientInterface->restoreOutput(mA2dpOutput);
}
#endif
@@ -275,10 +275,8 @@
newDevice = getNewDevice(mHardwareOutput, false);
#ifdef WITH_A2DP
checkOutputForAllStrategies(newDevice);
- // suspend A2DP output if SCO device address is the same as A2DP device address.
- // no need to check that a SCO device is actually connected as mScoDeviceAddress == ""
- // if none is connected and the test below will fail.
- if (mA2dpDeviceAddress == mScoDeviceAddress) {
+ // suspend A2DP output if a SCO device is present.
+ if (mA2dpOutput != 0 && mScoDeviceAddress != "") {
if (oldState == AudioSystem::MODE_NORMAL) {
mpClientInterface->suspendOutput(mA2dpOutput);
} else if (state == AudioSystem::MODE_NORMAL) {
@@ -295,13 +293,31 @@
if (oldState == AudioSystem::MODE_IN_CALL && newDevice == 0) {
newDevice = hwOutputDesc->device();
}
+
+ // when changing from ring tone to in call mode, mute the ringing tone
+ // immediately and delay the route change to avoid sending the ring tone
+ // tail into the earpiece or headset.
+ int delayMs = 0;
+ if (state == AudioSystem::MODE_IN_CALL && oldState == AudioSystem::MODE_RINGTONE) {
+ // delay the device change command by twice the output latency to have some margin
+ // and be sure that audio buffers not yet affected by the mute are out when
+ // we actually apply the route change
+ delayMs = hwOutputDesc->mLatency*2;
+ setStreamMute(AudioSystem::RING, true, mHardwareOutput);
+ }
+
// change routing is necessary
- setOutputDevice(mHardwareOutput, newDevice, force);
+ setOutputDevice(mHardwareOutput, newDevice, force, delayMs);
// if entering in call state, handle special case of active streams
// pertaining to sonification strategy see handleIncallSonification()
if (state == AudioSystem::MODE_IN_CALL) {
LOGV("setPhoneState() in call state management: new state is %d", state);
+ // unmute the ringing tone after a sufficient delay if it was muted before
+ // setting output device above
+ if (oldState == AudioSystem::MODE_RINGTONE) {
+ setStreamMute(AudioSystem::RING, false, mHardwareOutput, MUTE_TIME_MS);
+ }
for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) {
handleIncallSonification(stream, true, true);
}
@@ -1173,7 +1189,7 @@
}
AudioOutputDescriptor *hwOutputDesc = mOutputs.valueFor(mHardwareOutput);
- if (mA2dpDeviceAddress == mScoDeviceAddress) {
+ if (mScoDeviceAddress != "") {
// It is normal to suspend twice if we are both in call,
// and have the hardware audio output routed to BT SCO
if (mPhoneState != AudioSystem::MODE_NORMAL) {
@@ -1207,10 +1223,10 @@
return INVALID_OPERATION;
}
- // mute media during 2 seconds to avoid outputing sound on hardware output while music stream
+ // mute media strategy to avoid outputting sound on hardware output while music stream
// is switched from A2DP output and before music is paused by music application
setStrategyMute(STRATEGY_MEDIA, true, mHardwareOutput);
- setStrategyMute(STRATEGY_MEDIA, false, mHardwareOutput, 2000);
+ setStrategyMute(STRATEGY_MEDIA, false, mHardwareOutput, MUTE_TIME_MS);
if (!a2dpUsedForSonification()) {
// unmute music on A2DP output if a notification or ringtone is playing
@@ -1538,9 +1554,9 @@
usleep(outputDesc->mLatency*2*1000);
}
#ifdef WITH_A2DP
- // suspend A2D output if SCO device is selected
+ // suspend A2DP output if SCO device is selected
if (AudioSystem::isBluetoothScoDevice((AudioSystem::audio_devices)device)) {
- if (mA2dpOutput && mScoDeviceAddress == mA2dpDeviceAddress) {
+ if (mA2dpOutput != 0) {
mpClientInterface->suspendOutput(mA2dpOutput);
}
}
@@ -1555,7 +1571,7 @@
#ifdef WITH_A2DP
// if disconnecting SCO device, restore A2DP output
if (AudioSystem::isBluetoothScoDevice((AudioSystem::audio_devices)prevDevice)) {
- if (mA2dpOutput && mScoDeviceAddress == mA2dpDeviceAddress) {
+ if (mA2dpOutput != 0) {
LOGV("restore A2DP output");
mpClientInterface->restoreOutput(mA2dpOutput);
}
diff --git a/libs/camera/CameraParameters.cpp b/libs/camera/CameraParameters.cpp
index 1bf1759..cf4cbfa 100644
--- a/libs/camera/CameraParameters.cpp
+++ b/libs/camera/CameraParameters.cpp
@@ -60,7 +60,14 @@
const char CameraParameters::KEY_HORIZONTAL_VIEW_ANGLE[] = "horizontal-view-angle";
const char CameraParameters::KEY_VERTICAL_VIEW_ANGLE[] = "vertical-view-angle";
const char CameraParameters::KEY_EXPOSURE_COMPENSATION[] = "exposure-compensation";
-const char CameraParameters::KEY_SUPPORTED_EXPOSURE_COMPENSATION[] = "exposure-compensation-values";
+const char CameraParameters::KEY_MAX_EXPOSURE_COMPENSATION[] = "max-exposure-compensation";
+const char CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION[] = "min-exposure-compensation";
+const char CameraParameters::KEY_EXPOSURE_COMPENSATION_STEP[] = "exposure-compensation-step";
+const char CameraParameters::KEY_ZOOM[] = "zoom";
+const char CameraParameters::KEY_MAX_ZOOM[] = "max-zoom";
+const char CameraParameters::KEY_ZOOM_RATIOS[] = "zoom-ratios";
+const char CameraParameters::KEY_ZOOM_SUPPORTED[] = "zoom-supported";
+const char CameraParameters::KEY_SMOOTH_ZOOM_SUPPORTED[] = "smooth-zoom-supported";
// Values for white balance settings.
const char CameraParameters::WHITE_BALANCE_AUTO[] = "auto";
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index dec993a..cc3a74fb 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -546,6 +546,8 @@
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &mGL.mMaxFragmentTextureImageUnits);
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_VECTORS, &mGL.mMaxFragmentUniformVectors);
+
+ mGL.OES_texture_npot = NULL != strstr((const char *)mGL.mExtensions, "GL_OES_texture_npot");
}
}
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index 03e65f1..04bd748 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -163,6 +163,8 @@
mutable const ObjectBase * mObjHead;
+ bool ext_OES_texture_npot() const {return mGL.OES_texture_npot;}
+
protected:
Device *mDev;
@@ -196,6 +198,8 @@
int32_t mMaxVertexAttribs;
int32_t mMaxVertexUniformVectors;
int32_t mMaxVertexTextureUnits;
+
+ bool OES_texture_npot;
} mGL;
uint32_t mWidth;
diff --git a/libs/rs/rsProgramFragment.cpp b/libs/rs/rsProgramFragment.cpp
index 15f3269..c17b94c 100644
--- a/libs/rs/rsProgramFragment.cpp
+++ b/libs/rs/rsProgramFragment.cpp
@@ -109,7 +109,7 @@
}
if (mSamplers[ct].get()) {
- mSamplers[ct]->setupGL(rsc);
+ mSamplers[ct]->setupGL(rsc, mTextures[ct]->getType()->getIsNp2());
} else {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
@@ -159,7 +159,7 @@
glBindTexture(GL_TEXTURE_2D, mTextures[ct]->getTextureID());
rsc->checkError("ProgramFragment::setupGL2 tex bind");
if (mSamplers[ct].get()) {
- mSamplers[ct]->setupGL(rsc);
+ mSamplers[ct]->setupGL(rsc, mTextures[ct]->getType()->getIsNp2());
} else {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
diff --git a/libs/rs/rsSampler.cpp b/libs/rs/rsSampler.cpp
index 7552d54..71f508f 100644
--- a/libs/rs/rsSampler.cpp
+++ b/libs/rs/rsSampler.cpp
@@ -53,7 +53,7 @@
{
}
-void Sampler::setupGL(const Context *rsc)
+void Sampler::setupGL(const Context *rsc, bool npot)
{
GLenum trans[] = {
GL_NEAREST, //RS_SAMPLER_NEAREST,
@@ -64,11 +64,21 @@
};
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, trans[mMinFilter]);
+ bool forceNonMip = false;
+ if (!rsc->ext_OES_texture_npot() && npot) {
+ forceNonMip = true;
+ }
+
+ if ((mMinFilter == RS_SAMPLER_LINEAR_MIP_LINEAR) && forceNonMip) {
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ } else {
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, trans[mMinFilter]);
+ }
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, trans[mMagFilter]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, trans[mWrapS]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, trans[mWrapT]);
+
rsc->checkError("ProgramFragment::setupGL2 tex env");
}
diff --git a/libs/rs/rsSampler.h b/libs/rs/rsSampler.h
index 9e20a2f..0506081 100644
--- a/libs/rs/rsSampler.h
+++ b/libs/rs/rsSampler.h
@@ -41,7 +41,7 @@
virtual ~Sampler();
void bind(Allocation *);
- void setupGL(const Context *);
+ void setupGL(const Context *, bool npot);
void bindToContext(SamplerState *, uint32_t slot);
void unbindFromContext(SamplerState *);
diff --git a/libs/rs/rsType.cpp b/libs/rs/rsType.cpp
index 9d24c6c..c09e979 100644
--- a/libs/rs/rsType.cpp
+++ b/libs/rs/rsType.cpp
@@ -283,6 +283,24 @@
mElement->dumpLOGV(buf);
}
+bool Type::getIsNp2() const
+{
+ uint32_t x = getDimX();
+ uint32_t y = getDimY();
+ uint32_t z = getDimZ();
+
+ if (x && (x & (x-1))) {
+ return true;
+ }
+ if (y && (y & (y-1))) {
+ return true;
+ }
+ if (z && (z & (z-1))) {
+ return true;
+ }
+ return false;
+}
+
//////////////////////////////////////////////////
//
diff --git a/libs/rs/rsType.h b/libs/rs/rsType.h
index 28e6274..c25577c 100644
--- a/libs/rs/rsType.h
+++ b/libs/rs/rsType.h
@@ -56,6 +56,7 @@
uint32_t getLODOffset(uint32_t lod, uint32_t x, uint32_t y, uint32_t z) const;
uint32_t getLODCount() const {return mLODCount;}
+ bool getIsNp2() const;
void setElement(const Element *e) {mElement.set(e);}
@@ -65,6 +66,7 @@
void setDimFaces(bool v) {mFaces = v;}
void setDimLOD(bool v) {mDimLOD = v;}
+
void clear();
void compute();
diff --git a/libs/surfaceflinger/Android.mk b/libs/surfaceflinger/Android.mk
index 395a937..86eb78d 100644
--- a/libs/surfaceflinger/Android.mk
+++ b/libs/surfaceflinger/Android.mk
@@ -35,7 +35,6 @@
libpixelflinger \
libhardware \
libutils \
- libskia \
libEGL \
libGLESv1_CM \
libbinder \
diff --git a/libs/surfaceflinger/Layer.h b/libs/surfaceflinger/Layer.h
index 1310ecc..743afb4 100644
--- a/libs/surfaceflinger/Layer.h
+++ b/libs/surfaceflinger/Layer.h
@@ -78,6 +78,8 @@
inline const sp<FreezeLock>& getFreezeLock() const { return mFreezeLock; }
// only for debugging
inline PixelFormat pixelFormat() const { return mFormat; }
+ // only for debugging
+ inline int getFrontBufferIndex() const { return mFrontBufferIndex; }
private:
inline sp<GraphicBuffer> getFrontBufferLocked() {
diff --git a/libs/surfaceflinger/LayerBase.h b/libs/surfaceflinger/LayerBase.h
index d1bbd04..6aacd82 100644
--- a/libs/surfaceflinger/LayerBase.h
+++ b/libs/surfaceflinger/LayerBase.h
@@ -22,6 +22,7 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#include <GLES/gl.h>
#include <utils/RefBase.h>
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index 2d6152e..4555b3c 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -1496,8 +1496,8 @@
layer->needsBlending(), layer->needsDithering(),
layer->contentDirty,
s.alpha, s.flags,
- s.transform[0], s.transform[1],
- s.transform[2], s.transform[3]);
+ s.transform[0][0], s.transform[0][1],
+ s.transform[1][0], s.transform[1][1]);
result.append(buffer);
buffer[0] = 0;
/*** LayerBaseClient ***/
@@ -1519,6 +1519,10 @@
if (l != 0) {
SharedBufferStack::Statistics stats = l->lcblk->getStats();
result.append( l->lcblk->dump(" ") );
+ snprintf(buffer, SIZE,
+ " front-index=%u\n", l->getFrontBufferIndex());
+ result.append(buffer);
+
sp<const GraphicBuffer> buf0(l->getBuffer(0));
sp<const GraphicBuffer> buf1(l->getBuffer(1));
uint32_t w0=0, h0=0, s0=0;
@@ -1833,27 +1837,25 @@
status_t GraphicPlane::orientationToTransfrom(
int orientation, int w, int h, Transform* tr)
-{
- float a, b, c, d, x, y;
+{
+ uint32_t flags = 0;
switch (orientation) {
case ISurfaceComposer::eOrientationDefault:
- // make sure the default orientation is optimal
- tr->reset();
- return NO_ERROR;
+ flags = Transform::ROT_0;
+ break;
case ISurfaceComposer::eOrientation90:
- a=0; b=-1; c=1; d=0; x=w; y=0;
+ flags = Transform::ROT_90;
break;
case ISurfaceComposer::eOrientation180:
- a=-1; b=0; c=0; d=-1; x=w; y=h;
+ flags = Transform::ROT_180;
break;
case ISurfaceComposer::eOrientation270:
- a=0; b=1; c=-1; d=0; x=0; y=h;
+ flags = Transform::ROT_270;
break;
default:
return BAD_VALUE;
}
- tr->set(a, b, c, d);
- tr->set(x, y);
+ tr->set(flags, w, h);
return NO_ERROR;
}
@@ -1869,24 +1871,13 @@
mHeight = int(h);
Transform orientationTransform;
- if (UNLIKELY(orientation == 42)) {
- float a, b, c, d, x, y;
- const float r = (3.14159265f / 180.0f) * 42.0f;
- const float si = sinf(r);
- const float co = cosf(r);
- a=co; b=-si; c=si; d=co;
- x = si*(h*0.5f) + (1-co)*(w*0.5f);
- y =-si*(w*0.5f) + (1-co)*(h*0.5f);
- orientationTransform.set(a, b, c, d);
- orientationTransform.set(x, y);
- } else {
- GraphicPlane::orientationToTransfrom(orientation, w, h,
- &orientationTransform);
- if (orientation & ISurfaceComposer::eOrientationSwapMask) {
- mWidth = int(h);
- mHeight = int(w);
- }
+ GraphicPlane::orientationToTransfrom(orientation, w, h,
+ &orientationTransform);
+ if (orientation & ISurfaceComposer::eOrientationSwapMask) {
+ mWidth = int(h);
+ mHeight = int(w);
}
+
mOrientation = orientation;
mGlobalTransform = mDisplayTransform * orientationTransform;
return NO_ERROR;
diff --git a/libs/surfaceflinger/Transform.cpp b/libs/surfaceflinger/Transform.cpp
index ab6f7ba..b2d5856 100644
--- a/libs/surfaceflinger/Transform.cpp
+++ b/libs/surfaceflinger/Transform.cpp
@@ -14,180 +14,257 @@
* limitations under the License.
*/
+#include <math.h>
+
+#include <cutils/compiler.h>
+#include <utils/String8.h>
#include <ui/Region.h>
-#include <private/pixelflinger/ggl_fixed.h>
-
#include "Transform.h"
// ---------------------------------------------------------------------------
-#define LIKELY( exp ) (__builtin_expect( (exp) != 0, true ))
-#define UNLIKELY( exp ) (__builtin_expect( (exp) != 0, false ))
-
-// ---------------------------------------------------------------------------
-
namespace android {
// ---------------------------------------------------------------------------
-Transform::Transform()
- : mType(0)
-{
- mTransform.reset();
+template <typename T> inline T min(T a, T b) {
+ return a<b ? a : b;
+}
+template <typename T> inline T min(T a, T b, T c) {
+ return min(a, min(b, c));
+}
+template <typename T> inline T min(T a, T b, T c, T d) {
+ return min(a, b, min(c, d));
+}
+
+template <typename T> inline T max(T a, T b) {
+ return a>b ? a : b;
+}
+template <typename T> inline T max(T a, T b, T c) {
+ return max(a, max(b, c));
+}
+template <typename T> inline T max(T a, T b, T c, T d) {
+ return max(a, b, max(c, d));
+}
+
+// ---------------------------------------------------------------------------
+
+Transform::Transform() {
+ reset();
}
Transform::Transform(const Transform& other)
- : mTransform(other.mTransform), mType(other.mType)
-{
+ : mMatrix(other.mMatrix), mType(other.mType) {
}
-Transform::Transform(int32_t flags) {
- mTransform.reset();
- int sx = (flags & FLIP_H) ? -1 : 1;
- int sy = (flags & FLIP_V) ? -1 : 1;
- if (flags & ROT_90) {
- this->set(0, -sy, sx, 0);
- } else {
- this->set(sx, 0, 0, sy);
- }
+Transform::Transform(uint32_t orientation) {
+ set(orientation, 0, 0);
}
Transform::~Transform() {
}
+
+bool Transform::absIsOne(float f) {
+ return fabs(f) == 1.0f;
+}
+
+bool Transform::isZero(float f) {
+ return fabs(f) == 0.0f;
+}
+
+bool Transform::absEqual(float a, float b) {
+ return fabs(a) == fabs(b);
+}
+
Transform Transform::operator * (const Transform& rhs) const
{
- if (LIKELY(mType == 0))
+ if (CC_LIKELY(mType == IDENTITY))
return rhs;
Transform r(*this);
- r.mTransform.preConcat(rhs.mTransform);
+ if (rhs.mType == IDENTITY)
+ return r;
+
+ // TODO: we could use mType to optimize the matrix multiply
+ const mat33& A(mMatrix);
+ const mat33& B(rhs.mMatrix);
+ mat33& D(r.mMatrix);
+ for (int i=0 ; i<3 ; i++) {
+ const float v0 = A[0][i];
+ const float v1 = A[1][i];
+ const float v2 = A[2][i];
+ D[0][i] = v0*B[0][0] + v1*B[0][1] + v2*B[0][2];
+ D[1][i] = v0*B[1][0] + v1*B[1][1] + v2*B[1][2];
+ D[2][i] = v0*B[2][0] + v1*B[2][1] + v2*B[2][2];
+ }
r.mType |= rhs.mType;
+
+ // TODO: we could recompute this value from r and rhs
+ r.mType &= 0xFF;
+ r.mType |= UNKNOWN_TYPE;
return r;
}
-float Transform::operator [] (int i) const
-{
- float r = 0;
- switch(i) {
- case 0: r = SkScalarToFloat( mTransform[SkMatrix::kMScaleX] ); break;
- case 1: r = SkScalarToFloat( mTransform[SkMatrix::kMSkewX] ); break;
- case 2: r = SkScalarToFloat( mTransform[SkMatrix::kMSkewY] ); break;
- case 3: r = SkScalarToFloat( mTransform[SkMatrix::kMScaleY] ); break;
- }
- return r;
-}
-
-uint8_t Transform::type() const
-{
- if (UNLIKELY(mType & 0x80000000)) {
- mType = mTransform.getType();
- }
- return uint8_t(mType & 0xFF);
+float const* Transform::operator [] (int i) const {
+ return mMatrix[i].v;
}
bool Transform::transformed() const {
- return type() > SkMatrix::kTranslate_Mask;
+ return type() > TRANSLATE;
}
int Transform::tx() const {
- return SkScalarRound( mTransform[SkMatrix::kMTransX] );
+ return floorf(mMatrix[2][0] + 0.5f);
}
int Transform::ty() const {
- return SkScalarRound( mTransform[SkMatrix::kMTransY] );
+ return floorf(mMatrix[2][1] + 0.5f);
}
void Transform::reset() {
- mTransform.reset();
- mType = 0;
-}
-
-void Transform::set( float xx, float xy,
- float yx, float yy)
-{
- mTransform.set(SkMatrix::kMScaleX, SkFloatToScalar(xx));
- mTransform.set(SkMatrix::kMSkewX, SkFloatToScalar(xy));
- mTransform.set(SkMatrix::kMSkewY, SkFloatToScalar(yx));
- mTransform.set(SkMatrix::kMScaleY, SkFloatToScalar(yy));
- mType |= 0x80000000;
-}
-
-void Transform::set(float radian, float x, float y)
-{
- float r00 = cosf(radian); float r01 = -sinf(radian);
- float r10 = sinf(radian); float r11 = cosf(radian);
- mTransform.set(SkMatrix::kMScaleX, SkFloatToScalar(r00));
- mTransform.set(SkMatrix::kMSkewX, SkFloatToScalar(r01));
- mTransform.set(SkMatrix::kMSkewY, SkFloatToScalar(r10));
- mTransform.set(SkMatrix::kMScaleY, SkFloatToScalar(r11));
- mTransform.set(SkMatrix::kMTransX, SkIntToScalar(x - r00*x - r01*y));
- mTransform.set(SkMatrix::kMTransY, SkIntToScalar(y - r10*x - r11*y));
- mType |= 0x80000000 | SkMatrix::kTranslate_Mask;
-}
-
-void Transform::scale(float s, float x, float y)
-{
- mTransform.postScale(s, s, x, y);
- mType |= 0x80000000;
-}
-
-void Transform::set(int tx, int ty)
-{
- if (tx | ty) {
- mTransform.set(SkMatrix::kMTransX, SkIntToScalar(tx));
- mTransform.set(SkMatrix::kMTransY, SkIntToScalar(ty));
- mType |= SkMatrix::kTranslate_Mask;
- } else {
- mTransform.set(SkMatrix::kMTransX, 0);
- mTransform.set(SkMatrix::kMTransY, 0);
- mType &= ~SkMatrix::kTranslate_Mask;
+ mType = IDENTITY;
+ for(int i=0 ; i<3 ; i++) {
+ vec3& v(mMatrix[i]);
+ for (int j=0 ; j<3 ; j++)
+ v[j] = ((i==j) ? 1.0f : 0.0f);
}
}
-void Transform::transform(GLfixed* point, int x, int y) const
+void Transform::set(float tx, float ty)
{
- SkPoint s;
- mTransform.mapXY(SkIntToScalar(x), SkIntToScalar(y), &s);
- point[0] = SkScalarToFixed(s.fX);
- point[1] = SkScalarToFixed(s.fY);
+ mMatrix[2][0] = tx;
+ mMatrix[2][1] = ty;
+ mMatrix[2][2] = 1.0f;
+
+ if (isZero(tx) && isZero(ty)) {
+ mType &= ~TRANSLATE;
+ } else {
+ mType |= TRANSLATE;
+ }
+}
+
+void Transform::set(float a, float b, float c, float d)
+{
+ mat33& M(mMatrix);
+ M[0][0] = a; M[1][0] = b;
+ M[0][1] = c; M[1][1] = d;
+ M[0][2] = 0; M[1][2] = 0;
+ mType = UNKNOWN_TYPE;
+}
+
+void Transform::set(uint32_t flags, float w, float h)
+{
+ mType = flags << 8;
+ float sx = (flags & FLIP_H) ? -1 : 1;
+ float sy = (flags & FLIP_V) ? -1 : 1;
+ float a=0, b=0, c=0, d=0, x=0, y=0;
+ int xmask = 0;
+
+ // computation of x,y
+ // x y
+ // 0 0 0
+ // w 0 ROT90
+ // w h FLIPH|FLIPV
+ // 0 h FLIPH|FLIPV|ROT90
+
+ if (flags & ROT_90) {
+ mType |= ROTATE;
+ b = -sy;
+ c = sx;
+ xmask = 1;
+ } else {
+ a = sx;
+ d = sy;
+ }
+
+ if (flags & FLIP_H) {
+ mType ^= SCALE;
+ xmask ^= 1;
+ }
+
+ if (flags & FLIP_V) {
+ mType ^= SCALE;
+ y = h;
+ }
+
+ if ((flags & ROT_180) == ROT_180) {
+ mType |= ROTATE;
+ }
+
+ if (xmask) {
+ x = w;
+ }
+
+ if (!isZero(x) || !isZero(y)) {
+ mType |= TRANSLATE;
+ }
+
+ mat33& M(mMatrix);
+ M[0][0] = a; M[1][0] = b; M[2][0] = x;
+ M[0][1] = c; M[1][1] = d; M[2][1] = y;
+ M[0][2] = 0; M[1][2] = 0; M[2][2] = 1;
+}
+
+Transform::vec2 Transform::transform(const vec2& v) const {
+ vec2 r;
+ const mat33& M(mMatrix);
+ r[0] = M[0][0]*v[0] + M[1][0]*v[1] + M[2][0];
+ r[1] = M[0][1]*v[0] + M[1][1]*v[1] + M[2][1];
+ return r;
+}
+
+Transform::vec3 Transform::transform(const vec3& v) const {
+ vec3 r;
+ const mat33& M(mMatrix);
+ r[0] = M[0][0]*v[0] + M[1][0]*v[1] + M[2][0]*v[2];
+ r[1] = M[0][1]*v[0] + M[1][1]*v[1] + M[2][1]*v[2];
+ r[2] = M[0][2]*v[0] + M[1][2]*v[1] + M[2][2]*v[2];
+ return r;
+}
+
+void Transform::transform(fixed1616* point, int x, int y) const
+{
+ const float toFixed = 65536.0f;
+ const mat33& M(mMatrix);
+ vec2 v(x, y);
+ v = transform(v);
+ point[0] = v[0] * toFixed;
+ point[1] = v[1] * toFixed;
}
Rect Transform::makeBounds(int w, int h) const
{
- Rect r;
- SkRect d, s;
- s.set(0, 0, SkIntToScalar(w), SkIntToScalar(h));
- mTransform.mapRect(&d, s);
- r.left = SkScalarRound( d.fLeft );
- r.top = SkScalarRound( d.fTop );
- r.right = SkScalarRound( d.fRight );
- r.bottom = SkScalarRound( d.fBottom );
- return r;
+ return transform( Rect(w, h) );
}
Rect Transform::transform(const Rect& bounds) const
{
Rect r;
- SkRect d, s;
- s.set( SkIntToScalar( bounds.left ),
- SkIntToScalar( bounds.top ),
- SkIntToScalar( bounds.right ),
- SkIntToScalar( bounds.bottom ));
- mTransform.mapRect(&d, s);
- r.left = SkScalarRound( d.fLeft );
- r.top = SkScalarRound( d.fTop );
- r.right = SkScalarRound( d.fRight );
- r.bottom = SkScalarRound( d.fBottom );
+ vec2 lt( bounds.left, bounds.top );
+ vec2 rt( bounds.right, bounds.top );
+ vec2 lb( bounds.left, bounds.bottom );
+ vec2 rb( bounds.right, bounds.bottom );
+
+ lt = transform(lt);
+ rt = transform(rt);
+ lb = transform(lb);
+ rb = transform(rb);
+
+ r.left = floorf(min(lt[0], rt[0], lb[0], rb[0]) + 0.5f);
+ r.top = floorf(min(lt[1], rt[1], lb[1], rb[1]) + 0.5f);
+ r.right = floorf(max(lt[0], rt[0], lb[0], rb[0]) + 0.5f);
+ r.bottom = floorf(max(lt[1], rt[1], lb[1], rb[1]) + 0.5f);
+
return r;
}
Region Transform::transform(const Region& reg) const
{
Region out;
- if (UNLIKELY(transformed())) {
- if (LIKELY(preserveRects())) {
+ if (CC_UNLIKELY(transformed())) {
+ if (CC_LIKELY(preserveRects())) {
Region::const_iterator it = reg.begin();
Region::const_iterator const end = reg.end();
while (it != end) {
@@ -202,31 +279,108 @@
return out;
}
-int32_t Transform::getOrientation() const
+uint32_t Transform::type() const
{
- uint32_t flags = 0;
- if (UNLIKELY(transformed())) {
- SkScalar a = mTransform[SkMatrix::kMScaleX];
- SkScalar b = mTransform[SkMatrix::kMSkewX];
- SkScalar c = mTransform[SkMatrix::kMSkewY];
- SkScalar d = mTransform[SkMatrix::kMScaleY];
- if (b==0 && c==0 && a && d) {
- if (a<0) flags |= FLIP_H;
- if (d<0) flags |= FLIP_V;
- } else if (b && c && a==0 && d==0) {
- flags |= ROT_90;
- if (b>0) flags |= FLIP_H;
- if (c<0) flags |= FLIP_V;
+ if (mType & UNKNOWN_TYPE) {
+ // recompute what this transform is
+
+ const mat33& M(mMatrix);
+ const float a = M[0][0];
+ const float b = M[1][0];
+ const float c = M[0][1];
+ const float d = M[1][1];
+ const float x = M[2][0];
+ const float y = M[2][1];
+
+ bool scale = false;
+ uint32_t flags = ROT_0;
+ if (isZero(b) && isZero(c)) {
+ if (absEqual(a, d)) {
+ if (a<0) flags |= FLIP_H;
+ if (d<0) flags |= FLIP_V;
+ if (!absIsOne(a) || !absIsOne(d)) {
+ scale = true;
+ }
+ } else {
+ flags = ROT_INVALID;
+ }
+ } else if (isZero(a) && isZero(d)) {
+ if (absEqual(b, c)) {
+ flags |= ROT_90;
+ if (b>0) flags |= FLIP_H;
+ if (c<0) flags |= FLIP_V;
+ if (!absIsOne(b) || !absIsOne(c)) {
+ scale = true;
+ }
+ } else {
+ flags = ROT_INVALID;
+ }
} else {
- flags = 0x80000000;
+ flags = ROT_INVALID;
}
+
+ mType = flags << 8;
+ if (flags & ROT_INVALID) {
+ mType |= UNKNOWN;
+ } else {
+ if ((flags & ROT_90) || ((flags & ROT_180) == ROT_180))
+ mType |= ROTATE;
+ if (flags & FLIP_H)
+ mType ^= SCALE;
+ if (flags & FLIP_V)
+ mType ^= SCALE;
+ if (scale)
+ mType |= SCALE;
+ }
+
+ if (!isZero(x) || !isZero(y))
+ mType |= TRANSLATE;
}
- return flags;
+ return mType;
+}
+
+uint32_t Transform::getType() const {
+ return type() & 0xFF;
+}
+
+uint32_t Transform::getOrientation() const
+{
+ return (type() >> 8) & 0xFF;
}
bool Transform::preserveRects() const
{
- return mTransform.rectStaysRect();
+ return (type() & ROT_INVALID) ? false : true;
+}
+
+void Transform::dump(const char* name) const
+{
+ type(); // updates the type
+
+ String8 flags, type;
+ const mat33& m(mMatrix);
+ uint32_t orient = mType >> 8;
+
+ if (orient&ROT_INVALID)
+ flags.append("ROT_INVALID ");
+ if (orient&ROT_90)
+ flags.append("ROT_90 ");
+ if (orient&FLIP_V)
+ flags.append("FLIP_V ");
+ if (orient&FLIP_H)
+ flags.append("FLIP_H ");
+
+ if (mType&SCALE)
+ type.append("SCALE ");
+ if (mType&ROTATE)
+ type.append("ROTATE ");
+ if (mType&TRANSLATE)
+ type.append("TRANSLATE ");
+
+ LOGD("%s (%s, %s)", name, flags.string(), type.string());
+ LOGD("%.2f %.2f %.2f", m[0][0], m[1][0], m[2][0]);
+ LOGD("%.2f %.2f %.2f", m[0][1], m[1][1], m[2][1]);
+ LOGD("%.2f %.2f %.2f", m[0][2], m[1][2], m[2][2]);
}
// ---------------------------------------------------------------------------
diff --git a/libs/surfaceflinger/Transform.h b/libs/surfaceflinger/Transform.h
index ddab404..51d3e3f 100644
--- a/libs/surfaceflinger/Transform.h
+++ b/libs/surfaceflinger/Transform.h
@@ -23,10 +23,6 @@
#include <ui/Point.h>
#include <ui/Rect.h>
-#include <GLES/gl.h>
-
-#include <core/SkMatrix.h>
-
namespace android {
class Region;
@@ -38,9 +34,12 @@
public:
Transform();
Transform(const Transform& other);
- Transform(int32_t flags);
+ explicit Transform(uint32_t orientation);
~Transform();
+ typedef int32_t fixed1616;
+
+ // FIXME: must match OVERLAY_TRANSFORM_*, pull from hardware.h
enum orientation_flags {
ROT_0 = 0x00000000,
FLIP_H = 0x00000001,
@@ -48,48 +47,79 @@
ROT_90 = 0x00000004,
ROT_180 = FLIP_H|FLIP_V,
ROT_270 = ROT_180|ROT_90,
- ROT_INVALID = 0x80000000
+ ROT_INVALID = 0x80
};
enum type_mask {
IDENTITY = 0,
TRANSLATE = 0x1,
- SCALE = 0x2,
- AFFINE = 0x4,
- PERSPECTIVE = 0x8
+ ROTATE = 0x2,
+ SCALE = 0x4,
+ UNKNOWN = 0x8
};
- bool transformed() const;
- int32_t getOrientation() const;
- bool preserveRects() const;
-
+ // query the transform
+ bool transformed() const;
+ bool preserveRects() const;
+ uint32_t getType() const;
+ uint32_t getOrientation() const;
+
+ float const* operator [] (int i) const; // returns column i
int tx() const;
int ty() const;
-
+
+ // modify the transform
void reset();
- void set(float xx, float xy, float yx, float yy);
- void set(int tx, int ty);
- void set(float radian, float x, float y);
- void scale(float s, float x, float y);
-
+ void set(float tx, float ty);
+ void set(float a, float b, float c, float d);
+ void set(uint32_t flags, float w, float h);
+
+ // transform data
Rect makeBounds(int w, int h) const;
- void transform(GLfixed* point, int x, int y) const;
+ void transform(fixed1616* point, int x, int y) const;
Region transform(const Region& reg) const;
- Rect transform(const Rect& bounds) const;
-
Transform operator * (const Transform& rhs) const;
- float operator [] (int i) const;
-
- inline uint32_t getType() const { return type(); }
-
- inline Transform(bool) : mType(0xFF) { };
private:
- uint8_t type() const;
+ struct vec3 {
+ float v[3];
+ inline vec3() { }
+ inline vec3(float a, float b, float c) {
+ v[0] = a; v[1] = b; v[2] = c;
+ }
+ inline float operator [] (int i) const { return v[i]; }
+ inline float& operator [] (int i) { return v[i]; }
+ };
+ struct vec2 {
+ float v[2];
+ inline vec2() { }
+ inline vec2(float a, float b) {
+ v[0] = a; v[1] = b;
+ }
+ inline float operator [] (int i) const { return v[i]; }
+ inline float& operator [] (int i) { return v[i]; }
+ };
+ struct mat33 {
+ vec3 v[3];
+ inline const vec3& operator [] (int i) const { return v[i]; }
+ inline vec3& operator [] (int i) { return v[i]; }
+ };
-private:
- SkMatrix mTransform;
- mutable uint32_t mType;
+ enum { UNKNOWN_TYPE = 0x80000000 };
+
+ // assumes the last row is < 0 , 0 , 1 >
+ vec2 transform(const vec2& v) const;
+ vec3 transform(const vec3& v) const;
+ Rect transform(const Rect& bounds) const;
+ uint32_t type() const;
+ static bool absIsOne(float f);
+ static bool absEqual(float a, float b);
+ static bool isZero(float f);
+
+ void dump(const char* name) const;
+
+ mat33 mMatrix;
+ mutable uint32_t mType;
};
// ---------------------------------------------------------------------------
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp
index e8bd5cf..38600b9 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -497,6 +497,34 @@
return NULL;
}
+const char* ResStringPool::string8At(size_t idx, size_t* outLen) const
+{
+ if (mError == NO_ERROR && idx < mHeader->stringCount) {
+ const bool isUTF8 = (mHeader->flags&ResStringPool_header::UTF8_FLAG) != 0;
+ const uint32_t off = mEntries[idx]/(isUTF8?sizeof(char):sizeof(char16_t));
+ if (off < (mStringPoolSize-1)) {
+ if (isUTF8) {
+ const uint8_t* strings = (uint8_t*)mStrings;
+ const uint8_t* str = strings+off;
+ DECODE_LENGTH(str, sizeof(uint8_t), *outLen)
+ size_t encLen;
+ DECODE_LENGTH(str, sizeof(uint8_t), encLen)
+ if ((uint32_t)(str+encLen-strings) < mStringPoolSize) {
+ return (const char*)str;
+ } else {
+ LOGW("Bad string block: string #%d extends to %d, past end at %d\n",
+ (int)idx, (int)(str+encLen-strings), (int)mStringPoolSize);
+ }
+ }
+ } else {
+ LOGW("Bad string block: string #%d entry is at %d, past end at %d\n",
+ (int)idx, (int)(off*sizeof(uint16_t)),
+ (int)(mStringPoolSize*sizeof(uint16_t)));
+ }
+ }
+ return NULL;
+}
+
const ResStringPool_span* ResStringPool::styleAt(const ResStringPool_ref& ref) const
{
return styleAt(ref.index);
@@ -4018,14 +4046,19 @@
printf("(attribute) 0x%08x\n", value.data);
} else if (value.dataType == Res_value::TYPE_STRING) {
size_t len;
- const char16_t* str = pkg->header->values.stringAt(
+ const char* str8 = pkg->header->values.string8At(
value.data, &len);
- if (str == NULL) {
- printf("(string) null\n");
+ if (str8 != NULL) {
+ printf("(string8) \"%s\"\n", str8);
} else {
- printf("(string%d) \"%s\"\n",
- pkg->header->values.isUTF8()?8:16,
- String8(str, len).string());
+ const char16_t* str16 = pkg->header->values.stringAt(
+ value.data, &len);
+ if (str16 != NULL) {
+ printf("(string16) \"%s\"\n",
+ String8(str16, len).string());
+ } else {
+ printf("(string) null\n");
+ }
}
} else if (value.dataType == Res_value::TYPE_FLOAT) {
printf("(float) %g\n", *(const float*)&value.data);
diff --git a/location/java/com/android/internal/location/GpsLocationProvider.java b/location/java/com/android/internal/location/GpsLocationProvider.java
index 8e84106..90b50cc 100755
--- a/location/java/com/android/internal/location/GpsLocationProvider.java
+++ b/location/java/com/android/internal/location/GpsLocationProvider.java
@@ -321,7 +321,9 @@
public GpsLocationProvider(Context context, ILocationManager locationManager) {
mContext = context;
mLocationManager = locationManager;
- mNIHandler= new GpsNetInitiatedHandler(context, this);
+ mNIHandler = new GpsNetInitiatedHandler(context, this);
+
+ mLocation.setExtras(mLocationExtras);
// Create a wake lock
PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
@@ -759,7 +761,7 @@
positionMode = GPS_POSITION_MODE_STANDALONE;
}
- if (!native_start(positionMode, false, mFixInterval)) {
+ if (!native_start(positionMode, false, 1)) {
mStarted = false;
Log.e(TAG, "native_start failed in startNavigating()");
return;
@@ -870,7 +872,12 @@
}
if (mStarted && mStatus != LocationProvider.AVAILABLE) {
- mAlarmManager.cancel(mTimeoutIntent);
+ // we still want to time out if we do not receive MIN_FIX_COUNT
+ // within the time out and we are requesting infrequent fixes
+ if (mFixInterval < NO_FIX_TIMEOUT) {
+ mAlarmManager.cancel(mTimeoutIntent);
+ }
+
// send an intent to notify that the GPS is receiving fixes.
Intent intent = new Intent(GPS_FIX_CHANGE_ACTION);
intent.putExtra(EXTRA_ENABLED, true);
diff --git a/location/java/com/android/internal/location/GpsXtraDownloader.java b/location/java/com/android/internal/location/GpsXtraDownloader.java
index 02a9f48..978bda2 100644
--- a/location/java/com/android/internal/location/GpsXtraDownloader.java
+++ b/location/java/com/android/internal/location/GpsXtraDownloader.java
@@ -32,10 +32,10 @@
import android.content.Context;
import android.net.Proxy;
+import android.net.http.AndroidHttpClient;
import android.util.Config;
import android.util.Log;
-import com.android.common.AndroidHttpClient;
/**
diff --git a/media/java/android/media/AsyncPlayer.java b/media/java/android/media/AsyncPlayer.java
index e1e09b9..09aec2e 100644
--- a/media/java/android/media/AsyncPlayer.java
+++ b/media/java/android/media/AsyncPlayer.java
@@ -72,10 +72,8 @@
Log.w(mTag, "Notification sound delayed by " + delay + "msecs");
}
}
- catch (IOException e) {
+ catch (Exception e) {
Log.w(mTag, "error loading sound for " + cmd.uri, e);
- } catch (IllegalStateException e) {
- Log.w(mTag, "IllegalStateException (content provider died?) " + cmd.uri, e);
}
}
diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java
index ce56443..eade680 100644
--- a/media/java/android/media/CamcorderProfile.java
+++ b/media/java/android/media/CamcorderProfile.java
@@ -38,6 +38,7 @@
*/
public class CamcorderProfile
{
+ private final int mDuration; // Recording duration in seconds
/**
* The Quality class represents the quality level of each CamcorderProfile.
@@ -56,6 +57,14 @@
};
/**
+ * Returns the recording duration in seconds for LOW quality CamcorderProfile
+ * used by the MMS application.
+ */
+ public static final int getMmsRecordingDurationInSeconds() {
+ return get(Quality.LOW).mDuration;
+ }
+
+ /**
* The quality level of the camcorder profile
* @see android.media.CamcorderProfile.Quality
*/
@@ -129,7 +138,8 @@
}
// Private constructor called by JNI
- private CamcorderProfile(int quality,
+ private CamcorderProfile(int duration,
+ int quality,
int fileFormat,
int videoCodec,
int videoBitRate,
@@ -141,6 +151,7 @@
int audioSampleRate,
int audioChannels) {
+ mDuration = duration;
mQuality = Quality.values()[quality];
mFileFormat = fileFormat;
mVideoCodec = videoCodec;
diff --git a/media/java/android/media/CameraProfile.java b/media/java/android/media/CameraProfile.java
new file mode 100644
index 0000000..9685e7e
--- /dev/null
+++ b/media/java/android/media/CameraProfile.java
@@ -0,0 +1,52 @@
+/*
+ * 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.media;
+
+/**
+ * The CameraProfile class is used to retrieve the pre-defined still image
+ * capture (jpeg) quality levels (0-100) used for low, medium, and high
+ * quality settings in the Camera application.
+ *
+ * {@hide}
+ */
+public class CameraProfile
+{
+ /**
+ * Returns a list of the pre-defined still image capture (jpeg) quality levels
+ * used for low, medium and high quality settings in the Camera application.
+ */
+ public static int[] getImageEncodingQualityLevels() {
+ int nLevels = native_get_num_image_encoding_quality_levels();
+ if (nLevels == 0) return null;
+
+ int[] levels = new int[nLevels];
+ for (int i = 0; i < nLevels; ++i) {
+ levels[i] = native_get_image_encoding_quality_level(i);
+ }
+ return levels;
+ }
+
+ static {
+ System.loadLibrary("media_jni");
+ native_init();
+ }
+
+ // Methods implemented by JNI
+ private static native final void native_init();
+ private static native final int native_get_num_image_encoding_quality_levels();
+ private static native final int native_get_image_encoding_quality_level(int index);
+}
diff --git a/media/java/android/media/MediaFile.java b/media/java/android/media/MediaFile.java
index 2294069..9d1d420 100644
--- a/media/java/android/media/MediaFile.java
+++ b/media/java/android/media/MediaFile.java
@@ -17,13 +17,16 @@
package android.media;
import android.content.ContentValues;
-import android.os.SystemProperties;
import android.provider.MediaStore.Audio;
import android.provider.MediaStore.Images;
import android.provider.MediaStore.Video;
+import android.media.DecoderCapabilities;
+import android.media.DecoderCapabilities.VideoDecoder;
+import android.media.DecoderCapabilities.AudioDecoder;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
/**
* MediaScanner helper class.
@@ -98,13 +101,34 @@
sFileTypeMap.put(extension, new MediaFileType(fileType, mimeType));
sMimeTypeMap.put(mimeType, Integer.valueOf(fileType));
}
+
+ private static boolean isWMAEnabled() {
+ List<AudioDecoder> decoders = DecoderCapabilities.getAudioDecoders();
+ for (AudioDecoder decoder: decoders) {
+ if (decoder == AudioDecoder.AUDIO_DECODER_WMA) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static boolean isWMVEnabled() {
+ List<VideoDecoder> decoders = DecoderCapabilities.getVideoDecoders();
+ for (VideoDecoder decoder: decoders) {
+ if (decoder == VideoDecoder.VIDEO_DECODER_WMV) {
+ return true;
+ }
+ }
+ return false;
+ }
+
static {
addFileType("MP3", FILE_TYPE_MP3, "audio/mpeg");
addFileType("M4A", FILE_TYPE_M4A, "audio/mp4");
addFileType("WAV", FILE_TYPE_WAV, "audio/x-wav");
addFileType("AMR", FILE_TYPE_AMR, "audio/amr");
addFileType("AWB", FILE_TYPE_AWB, "audio/amr-wb");
- if (SystemProperties.getInt("ro.media.dec.aud.wma.enabled", 0) != 0) {
+ if (isWMAEnabled()) {
addFileType("WMA", FILE_TYPE_WMA, "audio/x-ms-wma");
}
addFileType("OGG", FILE_TYPE_OGG, "application/ogg");
@@ -127,7 +151,7 @@
addFileType("3GPP", FILE_TYPE_3GPP, "video/3gpp");
addFileType("3G2", FILE_TYPE_3GPP2, "video/3gpp2");
addFileType("3GPP2", FILE_TYPE_3GPP2, "video/3gpp2");
- if (SystemProperties.getInt("ro.media.dec.vid.wmv.enabled", 0) != 0) {
+ if (isWMVEnabled()) {
addFileType("WMV", FILE_TYPE_WMV, "video/x-ms-wmv");
addFileType("ASF", FILE_TYPE_ASF, "video/x-ms-asf");
}
diff --git a/media/jni/android_media_MediaProfiles.cpp b/media/jni/android_media_MediaProfiles.cpp
index 19132c5..7d7533a 100644
--- a/media/jni/android_media_MediaProfiles.cpp
+++ b/media/jni/android_media_MediaProfiles.cpp
@@ -171,6 +171,7 @@
}
camcorder_quality q = static_cast<camcorder_quality>(quality);
+ int duration = sProfiles->getCamcorderProfileParamByName("duration", q);
int fileFormat = sProfiles->getCamcorderProfileParamByName("file.format", q);
int videoCodec = sProfiles->getCamcorderProfileParamByName("vid.codec", q);
int videoBitRate = sProfiles->getCamcorderProfileParamByName("vid.bps", q);
@@ -183,7 +184,7 @@
int audioChannels = sProfiles->getCamcorderProfileParamByName("aud.ch", q);
// Check on the values retrieved
- if (fileFormat == -1 || videoCodec == -1 || audioCodec == -1 ||
+ if (duration == -1 || fileFormat == -1 || videoCodec == -1 || audioCodec == -1 ||
videoBitRate == -1 || videoFrameRate == -1 || videoFrameWidth == -1 || videoFrameHeight == -1 ||
audioBitRate == -1 || audioSampleRate == -1 || audioChannels == -1) {
@@ -192,9 +193,10 @@
}
jclass camcorderProfileClazz = env->FindClass("android/media/CamcorderProfile");
- jmethodID camcorderProfileConstructorMethodID = env->GetMethodID(camcorderProfileClazz, "<init>", "(IIIIIIIIIII)V");
+ jmethodID camcorderProfileConstructorMethodID = env->GetMethodID(camcorderProfileClazz, "<init>", "(IIIIIIIIIIII)V");
return env->NewObject(camcorderProfileClazz,
camcorderProfileConstructorMethodID,
+ duration,
quality,
fileFormat,
videoCodec,
@@ -250,6 +252,25 @@
return static_cast<jint>(decoders[index]);
}
+static jint
+android_media_MediaProfiles_native_get_num_image_encoding_quality_levels(JNIEnv *env, jobject thiz)
+{
+ LOGV("native_get_num_image_encoding_quality_levels");
+ return sProfiles->getImageEncodingQualityLevels().size();
+}
+
+static jint
+android_media_MediaProfiles_native_get_image_encoding_quality_level(JNIEnv *env, jobject thiz, jint index)
+{
+ LOGV("native_get_image_encoding_quality_level");
+ Vector<int> levels = sProfiles->getImageEncodingQualityLevels();
+ if (index < 0 || index >= levels.size()) {
+ jniThrowException(env, "java/lang/IllegalArgumentException", "out of array boundary");
+ return -1;
+ }
+ return static_cast<jint>(levels[index]);
+}
+
static JNINativeMethod gMethodsForEncoderCapabilitiesClass[] = {
{"native_init", "()V", (void *)android_media_MediaProfiles_native_init},
{"native_get_num_file_formats", "()I", (void *)android_media_MediaProfiles_native_get_num_file_formats},
@@ -278,9 +299,17 @@
{"native_get_audio_decoder_type", "(I)I", (void *)android_media_MediaProfiles_native_get_audio_decoder_type},
};
+static JNINativeMethod gMethodsForCameraProfileClass[] = {
+ {"native_init", "()V", (void *)android_media_MediaProfiles_native_init},
+ {"native_get_num_image_encoding_quality_levels",
+ "()I", (void *)android_media_MediaProfiles_native_get_num_image_encoding_quality_levels},
+ {"native_get_image_encoding_quality_level","(I)I", (void *)android_media_MediaProfiles_native_get_image_encoding_quality_level},
+};
+
static const char* const kEncoderCapabilitiesClassPathName = "android/media/EncoderCapabilities";
static const char* const kDecoderCapabilitiesClassPathName = "android/media/DecoderCapabilities";
static const char* const kCamcorderProfileClassPathName = "android/media/CamcorderProfile";
+static const char* const kCameraProfileClassPathName = "android/media/CameraProfile";
// This function only registers the native methods, and is called from
// JNI_OnLoad in android_media_MediaPlayer.cpp
@@ -301,6 +330,11 @@
gMethodsForDecoderCapabilitiesClass,
NELEM(gMethodsForDecoderCapabilitiesClass));
- // Success if ret1 == 0 && ret2 == 0 && ret3 == 0
- return (ret1 || ret2 || ret3);
+ int ret4 = AndroidRuntime::registerNativeMethods(env,
+ kCameraProfileClassPathName,
+ gMethodsForCameraProfileClass,
+ NELEM(gMethodsForCameraProfileClass));
+
+ // Success if all return values from above are 0
+ return (ret1 || ret2 || ret3 || ret4);
}
diff --git a/media/jni/android_media_ResampleInputStream.cpp b/media/jni/android_media_ResampleInputStream.cpp
index f248557..d965d9a 100644
--- a/media/jni/android_media_ResampleInputStream.cpp
+++ b/media/jni/android_media_ResampleInputStream.cpp
@@ -92,7 +92,7 @@
jint jNpoints) {
// safety first!
- if (nFir21 + jNpoints > BUF_SIZE) {
+ if (nFir21 + jNpoints * 2 > BUF_SIZE) {
throwException(env, "java/lang/IllegalArgumentException",
"FIR+data too long %d", nFir21 + jNpoints);
return;
diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp
index 0efade1..1263373 100644
--- a/media/libmedia/MediaProfiles.cpp
+++ b/media/libmedia/MediaProfiles.cpp
@@ -293,6 +293,13 @@
return profile;
}
+/*static*/ int
+MediaProfiles::getImageEncodingQualityLevel(const char** atts)
+{
+ CHECK(!strcmp("quality", atts[0]));
+ return atoi(atts[1]);
+}
+
/*static*/ void
MediaProfiles::startElementHandler(void *userData, const char *name, const char **atts)
{
@@ -317,6 +324,8 @@
profiles->mEncoderOutputFileFormats.add(createEncoderOutputFileFormat(atts));
} else if (strcmp("EncoderProfile", name) == 0) {
profiles->mCamcorderProfiles.add(createCamcorderProfile(atts));
+ } else if (strcmp("ImageEncoding", name) == 0) {
+ profiles->mImageEncodingQualityLevels.add(getImageEncodingQualityLevel(atts));
}
}
@@ -446,6 +455,14 @@
AUDIO_ENCODER_AMR_NB, 5525, 12200, 8000, 8000, 1, 1);
}
+/*static*/ void
+MediaProfiles::createDefaultImageEncodingQualityLevels(MediaProfiles *profiles)
+{
+ profiles->mImageEncodingQualityLevels.add(70);
+ profiles->mImageEncodingQualityLevels.add(80);
+ profiles->mImageEncodingQualityLevels.add(90);
+}
+
/*static*/ MediaProfiles*
MediaProfiles::createDefaultInstance()
{
@@ -456,6 +473,7 @@
createDefaultVideoDecoders(profiles);
createDefaultAudioDecoders(profiles);
createDefaultEncoderOutputFileFormats(profiles);
+ createDefaultImageEncodingQualityLevels(profiles);
sIsInitialized = true;
return profiles;
}
@@ -627,6 +645,7 @@
return -1;
}
+ if (!strcmp("duration", name)) return mCamcorderProfiles[index]->mDuration;
if (!strcmp("file.format", name)) return mCamcorderProfiles[index]->mFileFormat;
if (!strcmp("vid.codec", name)) return mCamcorderProfiles[index]->mVideoCodec->mCodec;
if (!strcmp("vid.width", name)) return mCamcorderProfiles[index]->mVideoCodec->mFrameWidth;
@@ -642,6 +661,11 @@
return -1;
}
+Vector<int> MediaProfiles::getImageEncodingQualityLevels() const
+{
+ return mImageEncodingQualityLevels; // copy out
+}
+
MediaProfiles::~MediaProfiles()
{
CHECK("destructor should never be called" == 0);
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 2157814..d2cec0c 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -304,7 +304,7 @@
{
LOGV("pause");
Mutex::Autolock _l(mLock);
- if (mCurrentState & MEDIA_PLAYER_PAUSED)
+ if (mCurrentState & (MEDIA_PLAYER_PAUSED|MEDIA_PLAYER_PLAYBACK_COMPLETE))
return NO_ERROR;
if ((mPlayer != 0) && (mCurrentState & MEDIA_PLAYER_STARTED)) {
status_t ret = mPlayer->pause();
diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp
index 23024e9..5adc116 100644
--- a/media/libmedia/mediarecorder.cpp
+++ b/media/libmedia/mediarecorder.cpp
@@ -365,6 +365,15 @@
return INVALID_OPERATION;
}
+ bool isInvalidState = (mCurrentState &
+ (MEDIA_RECORDER_PREPARED |
+ MEDIA_RECORDER_RECORDING |
+ MEDIA_RECORDER_ERROR));
+ if (isInvalidState) {
+ LOGE("setParameters is called in an invalid state: %d", mCurrentState);
+ return INVALID_OPERATION;
+ }
+
status_t ret = mMediaRecorder->setParameters(params);
if (OK != ret) {
LOGE("setParameters(%s) failed: %d", params.string(), ret);
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 50dad33..c26d682 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -430,6 +430,8 @@
snprintf(buffer, SIZE, " Allocation count %i\n", count);
result.append(buffer);
+ snprintf(buffer, SIZE, " Total memory %i\n", totalMemory);
+ result.append(buffer);
AllocEntry * entries = new AllocEntry[count];
@@ -478,7 +480,7 @@
for (size_t i = 0; i < count; i++) {
AllocEntry *e = &entries[i];
- snprintf(buffer, SIZE, "size %8i, dup %4i", e->size, e->dups);
+ snprintf(buffer, SIZE, "size %8i, dup %4i, ", e->size, e->dups);
result.append(buffer);
for (size_t ct = 0; (ct < backtraceSize) && e->backtrace[ct]; ct++) {
if (ct) {
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp
index 7997cd6..5e6e0da 100644
--- a/media/libstagefright/AudioPlayer.cpp
+++ b/media/libstagefright/AudioPlayer.cpp
@@ -18,6 +18,7 @@
#define LOG_TAG "AudioPlayer"
#include <utils/Log.h>
+#include <binder/IPCThreadState.h>
#include <media/AudioTrack.h>
#include <media/stagefright/AudioPlayer.h>
#include <media/stagefright/MediaDebug.h>
@@ -38,6 +39,7 @@
mPositionTimeRealUs(-1),
mSeeking(false),
mReachedEOS(false),
+ mFinalStatus(OK),
mStarted(false),
mAudioSink(audioSink) {
}
@@ -163,11 +165,22 @@
mSource->stop();
+ // The following hack is necessary to ensure that the OMX
+ // component is completely released by the time we may try
+ // to instantiate it again.
+ wp<MediaSource> tmp = mSource;
+ mSource.clear();
+ while (tmp.promote() != NULL) {
+ usleep(1000);
+ }
+ IPCThreadState::self()->flushCommands();
+
mNumFramesPlayed = 0;
mPositionTimeMediaUs = -1;
mPositionTimeRealUs = -1;
mSeeking = false;
mReachedEOS = false;
+ mFinalStatus = OK;
mStarted = false;
}
@@ -181,8 +194,11 @@
return mSeeking;
}
-bool AudioPlayer::reachedEOS() {
+bool AudioPlayer::reachedEOS(status_t *finalStatus) {
+ *finalStatus = OK;
+
Mutex::Autolock autoLock(mLock);
+ *finalStatus = mFinalStatus;
return mReachedEOS;
}
@@ -245,6 +261,7 @@
if (err != OK) {
mReachedEOS = true;
+ mFinalStatus = err;
break;
}
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index b3a73b0..ab65b44 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -434,14 +434,22 @@
}
mStreamDoneEventPending = false;
- if (mFlags & LOOPING) {
+ if (mStreamDoneStatus == ERROR_END_OF_STREAM && (mFlags & LOOPING)) {
seekTo_l(0);
if (mVideoSource != NULL) {
postVideoEvent_l();
}
} else {
- notifyListener_l(MEDIA_PLAYBACK_COMPLETE);
+ if (mStreamDoneStatus == ERROR_END_OF_STREAM) {
+ LOGV("MEDIA_PLAYBACK_COMPLETE");
+ notifyListener_l(MEDIA_PLAYBACK_COMPLETE);
+ } else {
+ LOGV("MEDIA_ERROR %d", mStreamDoneStatus);
+
+ notifyListener_l(
+ MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, mStreamDoneStatus);
+ }
pause_l();
@@ -802,7 +810,7 @@
continue;
}
- postStreamDoneEvent_l();
+ postStreamDoneEvent_l(err);
return;
}
@@ -904,11 +912,13 @@
mQueue.postEventWithDelay(mVideoEvent, delayUs < 0 ? 10000 : delayUs);
}
-void AwesomePlayer::postStreamDoneEvent_l() {
+void AwesomePlayer::postStreamDoneEvent_l(status_t status) {
if (mStreamDoneEventPending) {
return;
}
mStreamDoneEventPending = true;
+
+ mStreamDoneStatus = status;
mQueue.postEvent(mStreamDoneEvent);
}
@@ -947,9 +957,10 @@
notifyListener_l(MEDIA_SEEK_COMPLETE);
}
- if (mWatchForAudioEOS && mAudioPlayer->reachedEOS()) {
+ status_t finalStatus;
+ if (mWatchForAudioEOS && mAudioPlayer->reachedEOS(&finalStatus)) {
mWatchForAudioEOS = false;
- postStreamDoneEvent_l();
+ postStreamDoneEvent_l(finalStatus);
}
postCheckAudioStatusEvent_l();
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 16635d3..f1c3f0f 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -439,14 +439,16 @@
printf("%sfound chunk '%s' of size %lld\n", indent, chunk, chunk_size);
char buffer[256];
- if (chunk_size <= sizeof(buffer)) {
- if (mDataSource->readAt(*offset, buffer, chunk_size)
- < (ssize_t)chunk_size) {
- return ERROR_IO;
- }
-
- hexdump(buffer, chunk_size);
+ size_t n = chunk_size;
+ if (n > sizeof(buffer)) {
+ n = sizeof(buffer);
}
+ if (mDataSource->readAt(*offset, buffer, n)
+ < (ssize_t)n) {
+ return ERROR_IO;
+ }
+
+ hexdump(buffer, n);
#endif
PathAdder autoAdder(&mPath, chunk_type);
@@ -463,7 +465,10 @@
return err;
}
}
- CHECK_EQ(*offset, stop_offset);
+
+ if (*offset != stop_offset) {
+ return ERROR_MALFORMED;
+ }
return OK;
}
@@ -496,6 +501,23 @@
}
}
+ if (chunk_type == FOURCC('t', 'r', 'a', 'k')) {
+ Track *track = new Track;
+ track->next = NULL;
+ if (mLastTrack) {
+ mLastTrack->next = track;
+ } else {
+ mFirstTrack = track;
+ }
+ mLastTrack = track;
+
+ track->meta = new MetaData;
+ track->includes_expensive_metadata = false;
+ track->timescale = 0;
+ track->sampleTable = new SampleTable(mDataSource);
+ track->meta->setCString(kKeyMIMEType, "application/octet-stream");
+ }
+
off_t stop_offset = *offset + chunk_size;
*offset = data_offset;
while (*offset < stop_offset) {
@@ -504,9 +526,18 @@
return err;
}
}
- CHECK_EQ(*offset, stop_offset);
- if (chunk_type == FOURCC('m', 'o', 'o', 'v')) {
+ if (*offset != stop_offset) {
+ return ERROR_MALFORMED;
+ }
+
+ if (chunk_type == FOURCC('t', 'r', 'a', 'k')) {
+ status_t err = verifyTrack(mLastTrack);
+
+ if (err != OK) {
+ return err;
+ }
+ } else if (chunk_type == FOURCC('m', 'o', 'o', 'v')) {
mHaveMetadata = true;
return UNKNOWN_ERROR; // Return a dummy error.
@@ -516,7 +547,9 @@
case FOURCC('t', 'k', 'h', 'd'):
{
- CHECK(chunk_data_size >= 4);
+ if (chunk_data_size < 4) {
+ return ERROR_MALFORMED;
+ }
uint8_t version;
if (mDataSource->readAt(data_offset, &version, 1) < 1) {
@@ -562,21 +595,6 @@
height = U32_AT(&buffer[80]);
}
- Track *track = new Track;
- track->next = NULL;
- if (mLastTrack) {
- mLastTrack->next = track;
- } else {
- mFirstTrack = track;
- }
- mLastTrack = track;
-
- track->meta = new MetaData;
- track->includes_expensive_metadata = false;
- track->timescale = 0;
- track->sampleTable = new SampleTable(mDataSource);
- track->meta->setCString(kKeyMIMEType, "application/octet-stream");
-
*offset += chunk_size;
break;
}
@@ -670,7 +688,10 @@
}
uint8_t buffer[8];
- CHECK(chunk_data_size >= (off_t)sizeof(buffer));
+ if (chunk_data_size < (off_t)sizeof(buffer)) {
+ return ERROR_MALFORMED;
+ }
+
if (mDataSource->readAt(
data_offset, buffer, 8) < 8) {
return ERROR_IO;
@@ -696,7 +717,10 @@
return err;
}
}
- CHECK_EQ(*offset, stop_offset);
+
+ if (*offset != stop_offset) {
+ return ERROR_MALFORMED;
+ }
break;
}
@@ -748,7 +772,10 @@
return err;
}
}
- CHECK_EQ(*offset, stop_offset);
+
+ if (*offset != stop_offset) {
+ return ERROR_MALFORMED;
+ }
break;
}
@@ -792,7 +819,10 @@
return err;
}
}
- CHECK_EQ(*offset, stop_offset);
+
+ if (*offset != stop_offset) {
+ return ERROR_MALFORMED;
+ }
break;
}
@@ -942,7 +972,10 @@
case FOURCC('m', 'e', 't', 'a'):
{
uint8_t buffer[4];
- CHECK(chunk_data_size >= (off_t)sizeof(buffer));
+ if (chunk_data_size < (off_t)sizeof(buffer)) {
+ return ERROR_MALFORMED;
+ }
+
if (mDataSource->readAt(
data_offset, buffer, 4) < 4) {
return ERROR_IO;
@@ -950,7 +983,13 @@
if (U32_AT(buffer) != 0) {
// Should be version 0, flags 0.
- return ERROR_MALFORMED;
+
+ // If it's not, let's assume this is one of those
+ // apparently malformed chunks that don't have flags
+ // and completely different semantics than what's
+ // in the MPEG4 specs and skip it.
+ *offset += chunk_size;
+ return OK;
}
off_t stop_offset = *offset + chunk_size;
@@ -961,7 +1000,10 @@
return err;
}
}
- CHECK_EQ(*offset, stop_offset);
+
+ if (*offset != stop_offset) {
+ return ERROR_MALFORMED;
+ }
break;
}
@@ -995,8 +1037,9 @@
int64_t creationTime;
if (header[0] == 1) {
creationTime = U64_AT(&header[4]);
+ } else if (header[0] != 0) {
+ return ERROR_MALFORMED;
} else {
- CHECK_EQ(header[0], 0);
creationTime = U32_AT(&header[4]);
}
@@ -1174,6 +1217,30 @@
track->meta, mDataSource, track->timescale, track->sampleTable);
}
+// static
+status_t MPEG4Extractor::verifyTrack(Track *track) {
+ const char *mime;
+ CHECK(track->meta->findCString(kKeyMIMEType, &mime));
+
+ uint32_t type;
+ const void *data;
+ size_t size;
+ if (!strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_AVC)) {
+ if (!track->meta->findData(kKeyAVCC, &type, &data, &size)
+ || type != kTypeAVCC) {
+ return ERROR_MALFORMED;
+ }
+ } else if (!strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_MPEG4)
+ || !strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC)) {
+ if (!track->meta->findData(kKeyESDS, &type, &data, &size)
+ || type != kTypeESDS) {
+ return ERROR_MALFORMED;
+ }
+ }
+
+ return OK;
+}
+
status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
const void *esds_data, size_t esds_size) {
ESDS esds(esds_data, esds_size);
@@ -1391,6 +1458,14 @@
&sampleIndex, SampleTable::kSyncSample_Flag);
if (err != OK) {
+ if (err == ERROR_OUT_OF_RANGE) {
+ // An attempt to seek past the end of the stream would
+ // normally cause this ERROR_OUT_OF_RANGE error. Propagating
+ // this all the way to the MediaPlayer would cause abnormal
+ // termination. Legacy behaviour appears to be to behave as if
+ // we had seeked to the end of stream, ending normally.
+ err = ERROR_END_OF_STREAM;
+ }
return err;
}
@@ -1559,7 +1634,8 @@
if (!memcmp(header, "ftyp3gp", 7) || !memcmp(header, "ftypmp42", 8)
|| !memcmp(header, "ftypisom", 8) || !memcmp(header, "ftypM4V ", 8)
- || !memcmp(header, "ftypM4A ", 8) || !memcmp(header, "ftypf4v ", 8)) {
+ || !memcmp(header, "ftypM4A ", 8) || !memcmp(header, "ftypf4v ", 8)
+ || !memcmp(header, "ftypkddi", 8)) {
*mimeType = MEDIA_MIMETYPE_CONTAINER_MPEG4;
*confidence = 0.1;
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 6cf7cff..974413d2 100644
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -298,6 +298,10 @@
quirks |= kRequiresAllocateBufferOnOutputPorts;
}
+ if (!strcmp(componentName, "OMX.TI.Video.Decoder")) {
+ quirks |= kInputBufferSizesAreBogus;
+ }
+
return quirks;
}
@@ -561,7 +565,8 @@
mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
CHECK_EQ(err, OK);
- if (def.nBufferSize < size) {
+ if ((portIndex == kPortIndexInput && (mQuirks & kInputBufferSizesAreBogus))
+ || (def.nBufferSize < size)) {
def.nBufferSize = size;
}
@@ -574,7 +579,12 @@
CHECK_EQ(err, OK);
// Make sure the setting actually stuck.
- CHECK(def.nBufferSize >= size);
+ if (portIndex == kPortIndexInput
+ && (mQuirks & kInputBufferSizesAreBogus)) {
+ CHECK_EQ(def.nBufferSize, size);
+ } else {
+ CHECK(def.nBufferSize >= size);
+ }
}
status_t OMXCodec::setVideoPortFormatType(
@@ -1923,6 +1933,7 @@
CODEC_LOGV("signalling end of input stream.");
flags |= OMX_BUFFERFLAG_EOS;
+ mFinalStatus = err;
mSignalledEOS = true;
} else {
mNoMoreOutputData = false;
@@ -2401,7 +2412,7 @@
}
if (mFilledBuffers.empty()) {
- return ERROR_END_OF_STREAM;
+ return mSignalledEOS ? mFinalStatus : ERROR_END_OF_STREAM;
}
if (mOutputPortSettingsHaveChanged) {
diff --git a/media/libstagefright/Prefetcher.cpp b/media/libstagefright/Prefetcher.cpp
index 363e121..9c73f4a 100644
--- a/media/libstagefright/Prefetcher.cpp
+++ b/media/libstagefright/Prefetcher.cpp
@@ -55,6 +55,7 @@
size_t mIndex;
bool mStarted;
bool mReachedEOS;
+ status_t mFinalStatus;
int64_t mSeekTimeUs;
int64_t mCacheDurationUs;
bool mPrefetcherStopped;
@@ -306,7 +307,7 @@
}
if (mCachedBuffers.empty()) {
- return ERROR_END_OF_STREAM;
+ return mReachedEOS ? mFinalStatus : ERROR_END_OF_STREAM;
}
*out = *mCachedBuffers.begin();
@@ -353,6 +354,7 @@
if (err != OK) {
mReachedEOS = true;
+ mFinalStatus = err;
mCondition.signal();
return;
diff --git a/media/libstagefright/codecs/aacdec/AACDecoder.cpp b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
index ff51e88..f0b66c9 100644
--- a/media/libstagefright/codecs/aacdec/AACDecoder.cpp
+++ b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
@@ -57,9 +57,9 @@
mConfig->aacPlusUpsamplingFactor = 0;
mConfig->aacPlusEnabled = false;
- int32_t numChannels;
- CHECK(mSource->getFormat()->findInt32(kKeyChannelCount, &numChannels));
- mConfig->desiredChannels = numChannels;
+ // The software decoder doesn't properly support mono output on
+ // AACplus files. Always output stereo.
+ mConfig->desiredChannels = 2;
UInt32 memRequirements = PVMP4AudioDecoderGetMemRequirements();
mDecoderBuf = malloc(memRequirements);
@@ -127,14 +127,16 @@
sp<MetaData> AACDecoder::getFormat() {
sp<MetaData> srcFormat = mSource->getFormat();
- int32_t numChannels;
int32_t sampleRate;
- CHECK(srcFormat->findInt32(kKeyChannelCount, &numChannels));
CHECK(srcFormat->findInt32(kKeySampleRate, &sampleRate));
sp<MetaData> meta = new MetaData;
meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_RAW);
- meta->setInt32(kKeyChannelCount, numChannels);
+
+ // We'll always output stereo, regardless of how many channels are
+ // present in the input due to decoder limitations.
+ meta->setInt32(kKeyChannelCount, 2);
+
meta->setInt32(kKeySampleRate, sampleRate);
int64_t durationUs;
diff --git a/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp b/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
index f1f7194..6d6e408 100644
--- a/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
+++ b/media/libstagefright/codecs/mp3dec/MP3Decoder.cpp
@@ -160,14 +160,25 @@
mConfig->outputFrameSize = buffer->size() / sizeof(int16_t);
mConfig->pOutputBuffer = static_cast<int16_t *>(buffer->data());
- if (pvmp3_framedecoder(mConfig, mDecoderBuf) != NO_DECODING_ERROR) {
- buffer->release();
- buffer = NULL;
+ ERROR_CODE decoderErr;
+ if ((decoderErr = pvmp3_framedecoder(mConfig, mDecoderBuf))
+ != NO_DECODING_ERROR) {
+ LOGV("mp3 decoder returned error %d", decoderErr);
- mInputBuffer->release();
- mInputBuffer = NULL;
+ if (decoderErr != NO_ENOUGH_MAIN_DATA_ERROR) {
+ buffer->release();
+ buffer = NULL;
- return UNKNOWN_ERROR;
+ mInputBuffer->release();
+ mInputBuffer = NULL;
+
+ return UNKNOWN_ERROR;
+ }
+
+ // This is recoverable, just ignore the current frame and
+ // play silence instead.
+ memset(buffer->data(), 0, mConfig->outputFrameSize);
+ mConfig->inputBufferUsedLength = mInputBuffer->range_length();
}
buffer->set_range(
diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h
index ce8eeae..3590987 100644
--- a/media/libstagefright/include/AwesomePlayer.h
+++ b/media/libstagefright/include/AwesomePlayer.h
@@ -145,10 +145,11 @@
Condition mPreparedCondition;
bool mIsAsyncPrepare;
status_t mPrepareResult;
+ status_t mStreamDoneStatus;
void postVideoEvent_l(int64_t delayUs = -1);
void postBufferingEvent_l();
- void postStreamDoneEvent_l();
+ void postStreamDoneEvent_l(status_t status);
void postCheckAudioStatusEvent_l();
status_t getPosition_l(int64_t *positionUs);
status_t play_l();
diff --git a/media/libstagefright/include/MPEG4Extractor.h b/media/libstagefright/include/MPEG4Extractor.h
index 3a63e88..9d35e0c 100644
--- a/media/libstagefright/include/MPEG4Extractor.h
+++ b/media/libstagefright/include/MPEG4Extractor.h
@@ -68,6 +68,8 @@
status_t updateAudioTrackInfoFromESDS_MPEG4Audio(
const void *esds_data, size_t esds_size);
+ static status_t verifyTrack(Track *track);
+
MPEG4Extractor(const MPEG4Extractor &);
MPEG4Extractor &operator=(const MPEG4Extractor &);
};
diff --git a/media/libstagefright/omx/OMX.cpp b/media/libstagefright/omx/OMX.cpp
index 9ca060d..ff8757d 100644
--- a/media/libstagefright/omx/OMX.cpp
+++ b/media/libstagefright/omx/OMX.cpp
@@ -401,6 +401,33 @@
////////////////////////////////////////////////////////////////////////////////
+struct SharedVideoRenderer : public VideoRenderer {
+ SharedVideoRenderer(void *libHandle, VideoRenderer *obj)
+ : mLibHandle(libHandle),
+ mObj(obj) {
+ }
+
+ virtual ~SharedVideoRenderer() {
+ delete mObj;
+ mObj = NULL;
+
+ dlclose(mLibHandle);
+ mLibHandle = NULL;
+ }
+
+ virtual void render(
+ const void *data, size_t size, void *platformPrivate) {
+ return mObj->render(data, size, platformPrivate);
+ }
+
+private:
+ void *mLibHandle;
+ VideoRenderer *mObj;
+
+ SharedVideoRenderer(const SharedVideoRenderer &);
+ SharedVideoRenderer &operator=(const SharedVideoRenderer &);
+};
+
sp<IOMXRenderer> OMX::createRenderer(
const sp<ISurface> &surface,
const char *componentName,
@@ -411,11 +438,7 @@
VideoRenderer *impl = NULL;
- static void *libHandle = NULL;
-
- if (!libHandle) {
- libHandle = dlopen("libstagefrighthw.so", RTLD_NOW);
- }
+ void *libHandle = dlopen("libstagefrighthw.so", RTLD_NOW);
if (libHandle) {
typedef VideoRenderer *(*CreateRendererFunc)(
@@ -434,6 +457,16 @@
if (func) {
impl = (*func)(surface, componentName, colorFormat,
displayWidth, displayHeight, encodedWidth, encodedHeight);
+
+ if (impl) {
+ impl = new SharedVideoRenderer(libHandle, impl);
+ libHandle = NULL;
+ }
+ }
+
+ if (libHandle) {
+ dlclose(libHandle);
+ libHandle = NULL;
}
}
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java
index 717f7ba..d7cf069 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java
@@ -1,28 +1,35 @@
package com.android.mediaframeworktest;
import android.media.MediaRecorder;
+import android.media.EncoderCapabilities;
+import android.media.EncoderCapabilities.VideoEncoderCap;
+import android.media.EncoderCapabilities.AudioEncoderCap;
+import android.media.DecoderCapabilities;
+import android.media.DecoderCapabilities.VideoDecoder;
+import android.media.DecoderCapabilities.AudioDecoder;
+
import android.os.SystemProperties;
+import java.util.List;
import java.util.HashMap;
-public class MediaProfileReader {
+public class MediaProfileReader
+{
+ private static final List<VideoDecoder> videoDecoders = DecoderCapabilities.getVideoDecoders();
+ private static final List<AudioDecoder> audioDecoders = DecoderCapabilities.getAudioDecoders();
+ private static final List<VideoEncoderCap> videoEncoders = EncoderCapabilities.getVideoEncoders();
+ private static final List<AudioEncoderCap> audioEncoders = EncoderCapabilities.getAudioEncoders();
+ private static final HashMap<Integer, String> encoderMap = new HashMap<Integer, String>();
- public static final HashMap<String, Integer>
- OUTPUT_FORMAT_TABLE = new HashMap<String, Integer>();
- public static String MEDIA_ENC_VID = "ro.media.enc.vid.";
- public static String MEDIA_AUD_VID = "ro.media.enc.aud.";
- public static String[] VIDEO_ENCODER_PROPERTY = {".width", ".height", ".bps", ".fps",};
- public static String[] AUDIO_ENCODER_PROPERTY = {".bps", ".hz", ".ch",};
+ static {
+ initEncoderMap();
+ };
- public static String getVideoCodecProperty() {
- String s;
- s = SystemProperties.get("ro.media.enc.vid.codec");
- return s;
+ public static List<VideoEncoderCap> getVideoEncoders() {
+ return videoEncoders;
}
- public static String getAudioCodecProperty() {
- String s;
- s = SystemProperties.get("ro.media.enc.aud.codec");
- return s;
+ public static List<AudioEncoderCap> getAudioEncoders() {
+ return audioEncoders;
}
public static String getDeviceType() {
@@ -33,78 +40,56 @@
}
public static boolean getWMAEnable() {
- // push all the property into one big table
- int wmaEnable = 1;
- wmaEnable = SystemProperties.getInt("ro.media.dec.aud.wma.enabled",
- wmaEnable);
- if (wmaEnable == 1) {
- return true;
- } else {
- return false;
+ for (AudioDecoder decoder: audioDecoders) {
+ if (decoder == AudioDecoder.AUDIO_DECODER_WMA) {
+ return true;
+ }
}
+ return false;
}
public static boolean getWMVEnable(){
- int wmvEnable = 1;
- wmvEnable = SystemProperties.getInt("ro.media.dec.vid.wmv.enabled",
- wmvEnable);
- if (wmvEnable == 1) {
- return true;
- } else {
- return false;
- }
- }
-
- public static void createVideoProfileTable() {
- // push all the property into one big table
- String encoderType = getVideoCodecProperty();
- if (encoderType.length() != 0) {
- String encoder[] = encoderType.split(",");
- for (int i = 0; i < encoder.length; i++) {
- for (int j = 0; j < VIDEO_ENCODER_PROPERTY.length; j++) {
- String propertyName = MEDIA_ENC_VID + encoder[i] + VIDEO_ENCODER_PROPERTY[j];
- String prop = SystemProperties.get(propertyName);
- // push to the table
- String propRange[] = prop.split(",");
- OUTPUT_FORMAT_TABLE.put((encoder[i] + VIDEO_ENCODER_PROPERTY[j] + "_low"),
- Integer.parseInt(propRange[0]));
- OUTPUT_FORMAT_TABLE.put((encoder[i] + VIDEO_ENCODER_PROPERTY[j] + "_high"),
- Integer.parseInt(propRange[1]));
- }
-
+ for (VideoDecoder decoder: videoDecoders) {
+ if (decoder == VideoDecoder.VIDEO_DECODER_WMV) {
+ return true;
}
}
+ return false;
}
- public static void createAudioProfileTable() {
- // push all the property into one big table
- String audioType = getAudioCodecProperty();
- String encoder[] = audioType.split(",");
- if (audioType.length() != 0) {
- for (int i = 0; i < encoder.length; i++) {
- for (int j = 0; j < AUDIO_ENCODER_PROPERTY.length; j++) {
- String propertyName = MEDIA_AUD_VID + encoder[i] + AUDIO_ENCODER_PROPERTY[j];
- String prop = SystemProperties.get(propertyName);
- // push to the table
- String propRange[] = prop.split(",");
- OUTPUT_FORMAT_TABLE.put((encoder[i] + AUDIO_ENCODER_PROPERTY[j] + "_low"),
- Integer.parseInt(propRange[0]));
- OUTPUT_FORMAT_TABLE.put((encoder[i] + AUDIO_ENCODER_PROPERTY[j] + "_high"),
- Integer.parseInt(propRange[1]));
- }
- }
+ public static String getVideoCodecName(int videoEncoder) {
+ if (videoEncoder != MediaRecorder.VideoEncoder.H263 &&
+ videoEncoder != MediaRecorder.VideoEncoder.H264 &&
+ videoEncoder != MediaRecorder.VideoEncoder.MPEG_4_SP) {
+ throw new IllegalArgumentException("Unsupported video encoder " + videoEncoder);
}
+ return encoderMap.get(videoEncoder);
}
- public static void createEncoderTable(){
- OUTPUT_FORMAT_TABLE.put("h263", MediaRecorder.VideoEncoder.H263);
- OUTPUT_FORMAT_TABLE.put("h264", MediaRecorder.VideoEncoder.H264);
- OUTPUT_FORMAT_TABLE.put("m4v", MediaRecorder.VideoEncoder.MPEG_4_SP);
- OUTPUT_FORMAT_TABLE.put("amrnb", MediaRecorder.AudioEncoder.AMR_NB);
- OUTPUT_FORMAT_TABLE.put("amrwb", MediaRecorder.AudioEncoder.AMR_WB);
- OUTPUT_FORMAT_TABLE.put("aac", MediaRecorder.AudioEncoder.AAC);
- OUTPUT_FORMAT_TABLE.put("aacplus", MediaRecorder.AudioEncoder.AAC_PLUS);
- OUTPUT_FORMAT_TABLE.put("eaacplus",
- MediaRecorder.AudioEncoder.EAAC_PLUS);
+ public static String getAudioCodecName(int audioEncoder) {
+ if (audioEncoder != MediaRecorder.AudioEncoder.AMR_NB &&
+ audioEncoder != MediaRecorder.AudioEncoder.AMR_WB &&
+ audioEncoder != MediaRecorder.AudioEncoder.AAC &&
+ audioEncoder != MediaRecorder.AudioEncoder.AAC_PLUS &&
+ audioEncoder != MediaRecorder.AudioEncoder.EAAC_PLUS) {
+ throw new IllegalArgumentException("Unsupported audio encodeer " + audioEncoder);
+ }
+ return encoderMap.get(audioEncoder);
+ }
+
+ private MediaProfileReader() {} // Don't call me
+
+ private static void initEncoderMap() {
+ // video encoders
+ encoderMap.put(MediaRecorder.VideoEncoder.H263, "h263");
+ encoderMap.put(MediaRecorder.VideoEncoder.H264, "h264");
+ encoderMap.put(MediaRecorder.VideoEncoder.MPEG_4_SP, "m4v");
+
+ // audio encoders
+ encoderMap.put(MediaRecorder.AudioEncoder.AMR_NB, "amrnb");
+ encoderMap.put(MediaRecorder.AudioEncoder.AMR_WB, "amrwb");
+ encoderMap.put(MediaRecorder.AudioEncoder.AAC, "aac");
+ encoderMap.put(MediaRecorder.AudioEncoder.AAC_PLUS, "aacplus");
+ encoderMap.put(MediaRecorder.AudioEncoder.EAAC_PLUS, "eaacplus");
}
}
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaRecorderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaRecorderTest.java
index fdc5970..39caccd 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaRecorderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/MediaRecorderTest.java
@@ -25,6 +25,9 @@
import android.hardware.Camera;
import android.media.MediaPlayer;
import android.media.MediaRecorder;
+import android.media.EncoderCapabilities;
+import android.media.EncoderCapabilities.VideoEncoderCap;
+import android.media.EncoderCapabilities.AudioEncoderCap;
import android.test.ActivityInstrumentationTestCase;
import android.util.Log;
import android.view.SurfaceHolder;
@@ -33,6 +36,7 @@
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.Suppress;
+import java.util.List;
/**
@@ -99,31 +103,29 @@
}
}
- private boolean recordVideoWithPara(String encoder, String audio, String quality){
+ private boolean recordVideoWithPara(VideoEncoderCap videoCap, AudioEncoderCap audioCap, boolean highQuality){
boolean recordSuccess = false;
- int videoEncoder = MediaProfileReader.OUTPUT_FORMAT_TABLE.get(encoder);
- int audioEncoder = MediaProfileReader.OUTPUT_FORMAT_TABLE.get(audio);
- int videoWidth = MediaProfileReader.OUTPUT_FORMAT_TABLE.get(encoder + ".width_" + quality);
- int videoHeight =
- MediaProfileReader.OUTPUT_FORMAT_TABLE.get(encoder + ".height_" + quality);
- int videoFps = MediaProfileReader.OUTPUT_FORMAT_TABLE.get(encoder + ".fps_" + quality);
- int videoBitrate = MediaProfileReader.OUTPUT_FORMAT_TABLE.get(encoder + ".bps_" + quality);
- int audioBitrate = MediaProfileReader.OUTPUT_FORMAT_TABLE.get(audio + ".bps_" + quality);
- int audioChannels = MediaProfileReader.OUTPUT_FORMAT_TABLE.get(audio + ".ch_" + quality);
- int audioSamplingRate =
- MediaProfileReader.OUTPUT_FORMAT_TABLE.get(audio + ".hz_" + quality);
+ int videoEncoder = videoCap.mCodec;
+ int audioEncoder = audioCap.mCodec;
+ int videoWidth = highQuality? videoCap.mMaxFrameWidth: videoCap.mMinFrameWidth;
+ int videoHeight = highQuality? videoCap.mMaxFrameHeight: videoCap.mMinFrameHeight;
+ int videoFps = highQuality? videoCap.mMaxFrameRate: videoCap.mMinFrameRate;
+ int videoBitrate = highQuality? videoCap.mMaxBitRate: videoCap.mMinBitRate;
+ int audioBitrate = highQuality? audioCap.mMaxBitRate: audioCap.mMinBitRate;
+ int audioChannels = highQuality? audioCap.mMaxChannels: audioCap.mMinChannels ;
+ int audioSamplingRate = highQuality? audioCap.mMaxSampleRate: audioCap.mMinSampleRate;
if (videoFps < MIN_VIDEO_FPS) {
videoFps = MIN_VIDEO_FPS;
}
mSurfaceHolder = MediaFrameworkTest.mSurfaceView.getHolder();
- String filename = ("/sdcard/" + encoder + "_" + audio + "_" + quality + ".3gp");
+ String filename = ("/sdcard/" + videoEncoder + "_" + audioEncoder + "_" + highQuality + ".3gp");
try {
Log.v(TAG, "video encoder :" + videoEncoder);
Log.v(TAG, "audio encoder :" + audioEncoder);
- Log.v(TAG, "quality : " + quality);
- Log.v(TAG, "encoder : " + encoder);
- Log.v(TAG, "audio : " + audio);
+ Log.v(TAG, "quality : " + (highQuality?"high": "low"));
+ Log.v(TAG, "encoder : " + MediaProfileReader.getVideoCodecName(videoEncoder));
+ Log.v(TAG, "audio : " + MediaProfileReader.getAudioCodecName(audioEncoder));
Log.v(TAG, "videoWidth : " + videoWidth);
Log.v(TAG, "videoHeight : " + videoHeight);
Log.v(TAG, "videoFPS : " + videoFps);
@@ -434,35 +436,26 @@
boolean recordSuccess = false;
String deviceType = MediaProfileReader.getDeviceType();
Log.v(TAG, "deviceType = " + deviceType);
- // Test cases are device specified
- MediaProfileReader.createVideoProfileTable();
- MediaProfileReader.createAudioProfileTable();
- MediaProfileReader.createEncoderTable();
- String encoderType = MediaProfileReader.getVideoCodecProperty();
- String audioType = MediaProfileReader.getAudioCodecProperty();
- if ((encoderType.length() != 0) || (audioType.length() != 0)) {
- String audio[] = audioType.split(",");
- String encoder[] = encoderType.split(",");
- for (int k = 0; k < 2; k++) {
- for (int i = 0; i < encoder.length; i++) {
- for (int j = 0; j < audio.length; j++) {
- if (k == 0) {
- recordSuccess = recordVideoWithPara(encoder[i], audio[j], "high");
- } else {
- recordSuccess = recordVideoWithPara(encoder[i], audio[j], "low");
- }
- if (!recordSuccess) {
- Log.v(TAG, "testDeviceSpecificCodec failed");
- Log.v(TAG, "Encoder = " + encoder[i] + "Audio Encoder = " + audio[j]);
- noOfFailure++;
- }
- // assertTrue((encoder[i] + audio[j]), recordSuccess);
+ List<VideoEncoderCap> videoEncoders = MediaProfileReader.getVideoEncoders();
+ List<AudioEncoderCap> audioEncoders = MediaProfileReader.getAudioEncoders();
+ for (int k = 0; k < 2; k++) {
+ for (VideoEncoderCap videoEncoder: videoEncoders) {
+ for (AudioEncoderCap audioEncoder: audioEncoders) {
+ if (k == 0) {
+ recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, true);
+ } else {
+ recordSuccess = recordVideoWithPara(videoEncoder, audioEncoder, false);
+ }
+ if (!recordSuccess) {
+ Log.v(TAG, "testDeviceSpecificCodec failed");
+ Log.v(TAG, "Encoder = " + videoEncoder.mCodec + "Audio Encoder = " + audioEncoder.mCodec);
+ noOfFailure++;
}
}
}
- if (noOfFailure != 0) {
- assertTrue("testDeviceSpecificCodec", false);
- }
+ }
+ if (noOfFailure != 0) {
+ assertTrue("testDeviceSpecificCodec", false);
}
}
}
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java
index 8750098..4c259f1 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/MediaMetadataRetrieverTest.java
@@ -39,9 +39,8 @@
public static void testAlbumArt() throws Exception {
Log.v(TAG, "testAlbumArt starts.");
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
- MediaProfileReader reader = new MediaProfileReader();
- boolean supportWMA = reader.getWMAEnable();
- boolean supportWMV = reader.getWMVEnable();
+ boolean supportWMA = MediaProfileReader.getWMAEnable();
+ boolean supportWMV = MediaProfileReader.getWMVEnable();
retriever.setMode(MediaMetadataRetriever.MODE_GET_METADATA_ONLY);
for (int i = 0, n = MediaNames.ALBUMART_TEST_FILES.length; i < n; ++i) {
try {
@@ -74,9 +73,8 @@
@LargeTest
public static void testThumbnailCapture() throws Exception {
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
- MediaProfileReader reader = new MediaProfileReader();
- boolean supportWMA = reader.getWMAEnable();
- boolean supportWMV = reader.getWMVEnable();
+ boolean supportWMA = MediaProfileReader.getWMAEnable();
+ boolean supportWMV = MediaProfileReader.getWMVEnable();
Log.v(TAG, "Thumbnail processing starts");
long startedAt = System.currentTimeMillis();
for(int i = 0, n = MediaNames.THUMBNAIL_CAPTURE_TEST_FILES.length; i < n; ++i) {
@@ -110,9 +108,8 @@
@LargeTest
public static void testMetadataRetrieval() throws Exception {
- MediaProfileReader reader = new MediaProfileReader();
- boolean supportWMA = reader.getWMAEnable();
- boolean supportWMV = reader.getWMVEnable();
+ boolean supportWMA = MediaProfileReader.getWMAEnable();
+ boolean supportWMV = MediaProfileReader.getWMVEnable();
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
retriever.setMode(MediaMetadataRetriever.MODE_GET_METADATA_ONLY);
for(int i = 0, n = MediaNames.METADATA_RETRIEVAL_TEST_FILES.length; i < n; ++i) {
diff --git a/mms-common/Android.mk b/mms-common/Android.mk
index de994c0..57f1ccc 100644
--- a/mms-common/Android.mk
+++ b/mms-common/Android.mk
@@ -20,6 +20,7 @@
include $(CLEAR_VARS)
LOCAL_MODULE := mms-common
LOCAL_SRC_FILES := $(call all-java-files-under, java)
+LOCAL_STATIC_JAVA_LIBRARIES += android-common
include $(BUILD_STATIC_JAVA_LIBRARY)
# Include this library in the build server's output directory
diff --git a/mms-common/java/com/android/mmscommon/mms/pdu/PduPersister.java b/mms-common/java/com/android/mmscommon/mms/pdu/PduPersister.java
index 46f28c7..d92f0e1 100644
--- a/mms-common/java/com/android/mmscommon/mms/pdu/PduPersister.java
+++ b/mms-common/java/com/android/mmscommon/mms/pdu/PduPersister.java
@@ -1145,6 +1145,10 @@
}
}
+ // mark "read" and "seen"
+ values.put(Mms.READ, 0);
+ values.put(Mms.SEEN, 0);
+
Uri res = SqliteWrapper.insert(mContext, mContentResolver, uri, values);
if (res == null) {
throw new MmsException("persist() failed: return null.");
diff --git a/mms-common/java/com/android/mmscommon/telephony/TelephonyProvider.java b/mms-common/java/com/android/mmscommon/telephony/TelephonyProvider.java
index 0237bc2..cfc9231 100644
--- a/mms-common/java/com/android/mmscommon/telephony/TelephonyProvider.java
+++ b/mms-common/java/com/android/mmscommon/telephony/TelephonyProvider.java
@@ -32,8 +32,8 @@
import android.text.TextUtils;
import android.util.Config;
import android.util.Log;
+import android.util.Patterns;
-import com.android.common.Patterns;
import android.database.sqlite.SqliteWrapper;
/**
@@ -51,37 +51,6 @@
private static final boolean DEBUG = true;
private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-// public static final Pattern EMAIL_ADDRESS
-// = Pattern.compile(
-// "[a-zA-Z0-9\\+\\.\\_\\%\\-]{1,256}" +
-// "\\@" +
-// "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}" +
-// "(" +
-// "\\." +
-// "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25}" +
-// ")+"
-// );
-//
-// /**
-// * This pattern is intended for searching for things that look like they
-// * might be phone numbers in arbitrary text, not for validating whether
-// * something is in fact a phone number. It will miss many things that
-// * are legitimate phone numbers.
-// *
-// * <p> The pattern matches the following:
-// * <ul>
-// * <li>Optionally, a + sign followed immediately by one or more digits. Spaces, dots, or dashes
-// * may follow.
-// * <li>Optionally, sets of digits in parentheses, separated by spaces, dots, or dashes.
-// * <li>A string starting and ending with a digit, containing digits, spaces, dots, and/or dashes.
-// * </ul>
-// */
-// public static final Pattern PHONE
-// = Pattern.compile( // sdd = space, dot, or dash
-// "(\\+[0-9]+[\\- \\.]*)?" // +<digits><sdd>*
-// + "(\\([0-9]+\\)[\\- \\.]*)?" // (<digits>)<sdd>*
-// + "([0-9][0-9\\- \\.][0-9\\- \\.]+[0-9])"); // <digit><digit|sdd>+<digit>
-
// Constructor
public TelephonyProvider() {
}
@@ -136,6 +105,12 @@
public static final String READ = "read";
/**
+ * Indicates whether this message has been seen by the user. The "seen" flag will be
+ * used to figure out whether we need to throw up a statusbar notification or not.
+ */
+ public static final String SEEN = "seen";
+
+ /**
* The TP-Status value for the message, or -1 if no status has
* been received
*/
@@ -706,6 +681,12 @@
public static final String READ = "read";
/**
+ * Indicates whether this message has been seen by the user. The "seen" flag will be
+ * used to figure out whether we need to throw up a statusbar notification or not.
+ */
+ public static final String SEEN = "seen";
+
+ /**
* The Message-ID of the message.
* <P>Type: TEXT</P>
*/
@@ -1157,6 +1138,7 @@
* <P>Type: INTEGER</P>
*/
public static final String READ = "read";
+
/**
* The snippet of the latest message in the thread.
* <P>Type: TEXT</P>
@@ -1697,6 +1679,13 @@
*/
public static final String LAST_TRY = "last_try";
}
+
+ public static final class WordsTable {
+ public static final String ID = "_id";
+ public static final String SOURCE_ROW_ID = "source_id";
+ public static final String TABLE_ID = "table_to_use";
+ public static final String INDEXED_TEXT = "index_text";
+ }
}
public static final class Carriers implements BaseColumns {
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
index 95ab684..a79f0cd 100644
--- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
+++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
@@ -39,7 +39,7 @@
*/
public class DefaultContainerService extends IntentService {
private static final String TAG = "DefContainer";
- private static final boolean localLOGV = false;
+ private static final boolean localLOGV = true;
private IMediaContainerService.Stub mBinder = new IMediaContainerService.Stub() {
/*
@@ -211,6 +211,8 @@
if (PackageHelper.isContainerMounted(newCid)) {
if (localLOGV) Log.i(TAG, "Unmounting " + newCid +
" at path " + newCachePath + " after " + errMsg);
+ // Force a gc to avoid being killed.
+ Runtime.getRuntime().gc();
PackageHelper.unMountSdDir(newCid);
} else {
if (localLOGV) Log.i(TAG, "Container " + newCid + " not mounted");
@@ -328,8 +330,8 @@
boolean auto = true;
// To make final copy
long reqInstallSize = pkgLen;
- // For dex files
- long reqInternalSize = 1 * pkgLen;
+ // For dex files. Just ignore and fail when extracting. Max limit of 2Gig for now.
+ long reqInternalSize = 0;
boolean intThresholdOk = (pctNandFree >= LOW_NAND_FLASH_TRESHOLD);
boolean intAvailOk = ((reqInstallSize + reqInternalSize) < availInternalFlashSize);
boolean fitsOnSd = (reqInstallSize < availSDSize) && intThresholdOk &&
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 654ca32..1e9c312 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -60,14 +60,14 @@
<!-- user interface sound effects -->
<integer name="def_power_sounds_enabled">1</integer>
- <string name="def_low_battery_sound">/system/media/ui/LowBattery.ogg</string>
- <integer name="def_dock_sounds_enabled">1</integer>
- <string name="def_desk_dock_sound">/system/media/audio/ui/dock.ogg</string>
- <string name="def_desk_undock_sound">/system/media/audio/ui/undock.ogg</string>
- <string name="def_car_dock_sound">/system/media/audio/ui/Dock.ogg</string>
- <string name="def_car_undock_sound">/system/media/audio/ui/Undock.ogg</string>
- <integer name="def_lockscreen_sounds_enabled">1</integer>
- <string name="def_lock_sound">/system/media/audio/ui/Lock.ogg</string>
- <string name="def_unlock_sound">/system/media/audio/ui/Unlock.ogg</string>
+ <string name="def_low_battery_sound" translatable="false">/system/media/ui/LowBattery.ogg</string>
+ <integer name="def_dock_sounds_enabled">0</integer>
+ <string name="def_desk_dock_sound" translatable="false">/system/media/audio/ui/Dock.ogg</string>
+ <string name="def_desk_undock_sound" translatable="false">/system/media/audio/ui/Undock.ogg</string>
+ <string name="def_car_dock_sound" translatable="false">/system/media/audio/ui/Dock.ogg</string>
+ <string name="def_car_undock_sound" translatable="false">/system/media/audio/ui/Undock.ogg</string>
+ <integer name="def_lockscreen_sounds_enabled">0</integer>
+ <string name="def_lock_sound" translatable="false">/system/media/audio/ui/Lock.ogg</string>
+ <string name="def_unlock_sound" translatable="false">/system/media/audio/ui/Unlock.ogg</string>
</resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 5b616b3..18e247e 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -44,8 +44,8 @@
import android.util.Config;
import android.util.Log;
import android.util.Xml;
-import com.android.common.XmlUtils;
import com.android.internal.telephony.RILConstants;
+import com.android.internal.util.XmlUtils;
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.LockPatternView;
@@ -76,7 +76,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 = 50;
+ private static final int DATABASE_VERSION = 51;
private Context mContext;
@@ -642,6 +642,25 @@
upgradeVersion = 50;
}
+ if (upgradeVersion == 50) {
+ /*
+ * New settings for set install location UI.
+ */
+ db.beginTransaction();
+ try {
+ SQLiteStatement stmt = db.compileStatement("INSERT INTO system(name,value)"
+ + " VALUES(?,?);");
+ loadBooleanSetting(stmt, Settings.System.SET_INSTALL_LOCATION,
+ R.bool.set_install_location);
+ stmt.close();
+ db.setTransactionSuccessful();
+ } finally {
+ db.endTransaction();
+ }
+
+ upgradeVersion = 51;
+ }
+
if (upgradeVersion != currentVersion) {
Log.w(TAG, "Got stuck trying to upgrade from version " + upgradeVersion
+ ", must wipe the settings provider");
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
index bc95b21..d24814d 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
@@ -21,6 +21,7 @@
import android.app.ActivityManagerNative;
import android.app.IActivityManager;
import android.backup.BackupDataInput;
+import android.backup.IBackupManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.IContentService;
@@ -71,10 +72,22 @@
} else if (Settings.Secure.LOCATION_PROVIDERS_ALLOWED.equals(name)) {
setGpsLocation(value);
return false;
+ } else if (Settings.Secure.BACKUP_AUTO_RESTORE.equals(name)) {
+ setAutoRestore(Integer.parseInt(value) == 1);
}
return true;
}
+ private void setAutoRestore(boolean enabled) {
+ try {
+ IBackupManager bm = IBackupManager.Stub.asInterface(
+ ServiceManager.getService(Context.BACKUP_SERVICE));
+ if (bm != null) {
+ bm.setAutoRestore(enabled);
+ }
+ } catch (RemoteException e) {}
+ }
+
private void setGpsLocation(String value) {
final String GPS = LocationManager.GPS_PROVIDER;
boolean enabled =
diff --git a/packages/TtsService/jni/android_tts_SynthProxy.cpp b/packages/TtsService/jni/android_tts_SynthProxy.cpp
index 35b5675..2f5cfa3 100644
--- a/packages/TtsService/jni/android_tts_SynthProxy.cpp
+++ b/packages/TtsService/jni/android_tts_SynthProxy.cpp
@@ -45,6 +45,9 @@
#define USAGEMODE_PLAY_IMMEDIATELY 0
#define USAGEMODE_WRITE_TO_FILE 1
+#define SYNTHPLAYSTATE_IS_STOPPED 0
+#define SYNTHPLAYSTATE_IS_PLAYING 1
+
using namespace android;
// ----------------------------------------------------------------------------
@@ -154,6 +157,8 @@
TtsEngine* mNativeSynthInterface;
void* mEngineLibHandle;
AudioTrack* mAudioOut;
+ int8_t mPlayState;
+ Mutex mPlayLock;
AudioSystem::stream_type mStreamType;
uint32_t mSampleRate;
uint32_t mAudFormat;
@@ -166,6 +171,7 @@
mNativeSynthInterface = NULL;
mEngineLibHandle = NULL;
mAudioOut = NULL;
+ mPlayState = SYNTHPLAYSTATE_IS_STOPPED;
mStreamType = DEFAULT_TTS_STREAM_TYPE;
mSampleRate = DEFAULT_TTS_RATE;
mAudFormat = DEFAULT_TTS_FORMAT;
@@ -223,6 +229,7 @@
if (minBufCount < 2) minBufCount = 2;
int minFrameCount = (afFrameCount * rate * minBufCount)/afSampleRate;
+ mPlayLock.lock();
mAudioOut = new AudioTrack(mStreamType, rate, format,
(channel == 2) ? AudioSystem::CHANNEL_OUT_STEREO : AudioSystem::CHANNEL_OUT_MONO,
minFrameCount > 4096 ? minFrameCount : 4096,
@@ -237,6 +244,7 @@
mAudioOut->setVolume(1.0f, 1.0f);
LOGV("AudioTrack ready");
}
+ mPlayLock.unlock();
}
};
@@ -288,6 +296,12 @@
if (bufferSize > 0) {
prepAudioTrack(pJniData, pForAfter->streamType, rate, (AudioSystem::audio_format)format, channel);
if (pJniData->mAudioOut) {
+ pJniData->mPlayLock.lock();
+ if(pJniData->mAudioOut->stopped()
+ && (pJniData->mPlayState == SYNTHPLAYSTATE_IS_PLAYING)) {
+ pJniData->mAudioOut->start();
+ }
+ pJniData->mPlayLock.unlock();
if (bUseFilter) {
applyFilter((int16_t*)wav, bufferSize/2);
}
@@ -711,9 +725,9 @@
SynthProxyJniStorage* pSynthData = (SynthProxyJniStorage*)jniData;
- if (pSynthData->mAudioOut) {
- pSynthData->mAudioOut->start();
- }
+ pSynthData->mPlayLock.lock();
+ pSynthData->mPlayState = SYNTHPLAYSTATE_IS_PLAYING;
+ pSynthData->mPlayLock.unlock();
afterSynthData_t* pForAfter = new (afterSynthData_t);
pForAfter->jniStorage = jniData;
@@ -744,9 +758,13 @@
SynthProxyJniStorage* pSynthData = (SynthProxyJniStorage*)jniData;
+ pSynthData->mPlayLock.lock();
+ pSynthData->mPlayState = SYNTHPLAYSTATE_IS_STOPPED;
if (pSynthData->mAudioOut) {
pSynthData->mAudioOut->stop();
}
+ pSynthData->mPlayLock.unlock();
+
if (pSynthData->mNativeSynthInterface) {
result = pSynthData->mNativeSynthInterface->stop();
}
diff --git a/preloaded-classes b/preloaded-classes
index 092b539..28cbba3 100644
--- a/preloaded-classes
+++ b/preloaded-classes
@@ -1,850 +1,1039 @@
# Classes which are preloaded by com.android.internal.os.ZygoteInit.
+# Automatically generated by frameworks/base/tools/preload/WritePreloadedClassFile.java.
+# MIN_LOAD_TIME_MICROS=1250
android.R$styleable
+android.accounts.AccountManager
+android.accounts.AccountManager$4
+android.accounts.AccountManager$6
+android.accounts.AccountManager$AmsTask
+android.accounts.AccountManager$BaseFutureTask
+android.accounts.AccountManager$Future2Task
+android.accounts.AuthenticatorDescription
+android.accounts.IAccountAuthenticatorResponse$Stub
+android.accounts.IAccountManager$Stub
+android.accounts.IAccountManagerResponse$Stub
android.app.Activity
android.app.ActivityGroup
-android.app.ActivityManager$MemoryInfo$1
+android.app.ActivityManager$RunningAppProcessInfo
+android.app.ActivityManager$RunningServiceInfo
android.app.ActivityManagerNative
android.app.ActivityManagerProxy
android.app.ActivityThread
-android.app.ActivityThread$ActivityRecord
-android.app.ActivityThread$AppBindData
android.app.ActivityThread$ApplicationThread
-android.app.ActivityThread$ContextCleanupInfo
-android.app.ActivityThread$GcIdler
android.app.ActivityThread$H
-android.app.ActivityThread$Idler
-android.app.ActivityThread$PackageInfo
-android.app.ActivityThread$PackageInfo$ReceiverDispatcher
-android.app.ActivityThread$PackageInfo$ReceiverDispatcher$InnerReceiver
-android.app.ActivityThread$PackageInfo$ServiceDispatcher
-android.app.ActivityThread$PackageInfo$ServiceDispatcher$InnerConnection
-android.app.ActivityThread$ProviderRecord
-android.app.ActivityThread$ProviderRefCount
android.app.AlertDialog
-android.app.Application
-android.app.ApplicationLoaders
android.app.ApplicationThreadNative
android.app.ContextImpl
-android.app.ContextImpl$ApplicationContentResolver
android.app.ContextImpl$ApplicationPackageManager
-android.app.ContextImpl$ApplicationPackageManager$PackageRemovedReceiver
-android.app.ContextImpl$ApplicationPackageManager$ResourceName
-android.app.ContextImpl$SharedPreferencesImpl
+android.app.DatePickerDialog
android.app.Dialog
android.app.ExpandableListActivity
android.app.IActivityManager
-android.app.IActivityManager$ContentProviderHolder$1
+android.app.IActivityManager$ContentProviderHolder
android.app.IAlarmManager$Stub
-android.app.IAlarmManager$Stub$Proxy
-android.app.IApplicationThread
-android.app.INotificationManager$Stub
-android.app.INotificationManager$Stub$Proxy
-android.app.ISearchManager
-android.app.ISearchManager$Stub
-android.app.ISearchManager$Stub$Proxy
+android.app.IStatusBar$Stub
+android.app.ITransientNotification$Stub
android.app.Instrumentation
-android.app.IntentReceiverLeaked
+android.app.IntentService
android.app.ListActivity
-android.app.ListActivity$1
-android.app.ListActivity$2
android.app.LocalActivityManager
android.app.Notification
-android.app.NotificationManager
android.app.PendingIntent
-android.app.PendingIntent$1
android.app.ProgressDialog
-android.app.ReceiverRestrictedContext
android.app.ResultInfo
-android.app.ResultInfo$1
android.app.SearchDialog
android.app.SearchDialog$SearchAutoComplete
+android.app.SearchDialog$SearchBar
+android.app.SearchableInfo
android.app.Service
-android.app.ServiceConnectionLeaked
+android.app.SuggestionsAdapter
+android.app.SuperNotCalledException
android.app.TabActivity
-android.content.BroadcastReceiver
-android.content.ComponentCallbacks
+android.app.TimePickerDialog
+android.app.admin.IDevicePolicyManager$Stub
+android.appwidget.AppWidgetHost
+android.appwidget.AppWidgetHostView
+android.appwidget.AppWidgetHostView$ParcelableSparseArray
+android.appwidget.AppWidgetManager
+android.appwidget.AppWidgetProvider
+android.appwidget.AppWidgetProviderInfo
+android.backup.BackupDataInput
+android.backup.BackupDataInput$EntityHeader
+android.backup.BackupDataOutput
+android.backup.BackupHelperAgent
+android.backup.BackupHelperDispatcher
+android.backup.BackupHelperDispatcher$Header
+android.backup.FileBackupHelperBase
+android.backup.IBackupManager$Stub
+android.backup.RestoreSet
+android.bluetooth.BluetoothAdapter
+android.bluetooth.BluetoothAudioGateway
+android.bluetooth.BluetoothSocket
+android.bluetooth.BluetoothUuid
+android.bluetooth.HeadsetBase
+android.bluetooth.IBluetooth
+android.bluetooth.IBluetooth$Stub
+android.bluetooth.IBluetoothA2dp
+android.bluetooth.IBluetoothA2dp$Stub
+android.bluetooth.IBluetoothHeadset$Stub
+android.bluetooth.ScoSocket
android.content.ComponentName
-android.content.ComponentName$1
android.content.ContentProvider$Transport
-android.content.ContentProviderProxy
-android.content.ContentQueryMap
-android.content.ContentQueryMap$1
+android.content.ContentProviderOperation
+android.content.ContentProviderResult
android.content.ContentResolver
-android.content.ContentResolver$CursorWrapperInner
android.content.ContentValues
android.content.Context
android.content.ContextWrapper
-android.content.DialogInterface
-android.content.DialogInterface$OnCancelListener
-android.content.DialogInterface$OnDismissListener
-android.content.IContentProvider
-android.content.IContentService
android.content.IContentService$Stub
+android.content.ISyncContext$Stub
android.content.Intent
-android.content.Intent$1
android.content.IntentFilter
+android.content.IntentSender
android.content.SearchRecentSuggestionsProvider
android.content.SyncResult
android.content.SyncStats
android.content.UriMatcher
android.content.pm.ActivityInfo
-android.content.pm.ActivityInfo$1
android.content.pm.ApplicationInfo
-android.content.pm.ApplicationInfo$1
-android.content.pm.ComponentInfo
-android.content.pm.IPackageManager
+android.content.pm.ConfigurationInfo
+android.content.pm.IPackageDataObserver$Stub
android.content.pm.IPackageManager$Stub
android.content.pm.IPackageManager$Stub$Proxy
+android.content.pm.IPackageStatsObserver$Stub
android.content.pm.InstrumentationInfo
-android.content.pm.InstrumentationInfo$1
-android.content.pm.PackageItemInfo
+android.content.pm.PackageInfo
android.content.pm.PackageManager
android.content.pm.PackageManager$NameNotFoundException
+android.content.pm.PackageStats
android.content.pm.PermissionInfo
android.content.pm.ProviderInfo
-android.content.pm.ProviderInfo$1
-android.content.pm.ResolveInfo$1
-android.content.pm.ServiceInfo$1
+android.content.pm.ResolveInfo
+android.content.pm.ResolveInfo$DisplayNameComparator
+android.content.pm.Signature
+android.content.res.AssetFileDescriptor
+android.content.res.AssetFileDescriptor$1
android.content.res.AssetManager
android.content.res.AssetManager$AssetInputStream
android.content.res.ColorStateList
android.content.res.ColorStateList$1
+android.content.res.CompatibilityInfo
+android.content.res.CompatibilityInfo$1
android.content.res.Configuration
+android.content.res.Configuration$1
android.content.res.Resources
-android.content.res.Resources$Theme
+android.content.res.Resources$1
android.content.res.StringBlock
android.content.res.TypedArray
android.content.res.XmlBlock
android.content.res.XmlBlock$Parser
+android.content.res.XmlResourceParser
android.database.AbstractCursor
-android.database.AbstractCursor$SelfContentObserver
android.database.AbstractWindowedCursor
-android.database.BulkCursorNative
-android.database.BulkCursorProxy
android.database.BulkCursorToCursorAdaptor
-android.database.ContentObservable
-android.database.ContentObserver$Transport
-android.database.Cursor
+android.database.CharArrayBuffer
android.database.CursorToBulkCursorAdaptor
-android.database.CursorToBulkCursorAdaptor$ContentObserverProxy
android.database.CursorWindow
+android.database.CursorWindow$1
android.database.CursorWrapper
-android.database.DataSetObservable
-android.database.IContentObserver$Stub$Proxy
-android.database.MergeCursor
+android.database.MatrixCursor
+android.database.sqlite.SQLiteClosable
+android.database.sqlite.SQLiteCompiledSql
+android.database.sqlite.SQLiteContentHelper
android.database.sqlite.SQLiteCursor
android.database.sqlite.SQLiteDatabase
-android.database.sqlite.SQLiteDatabase$CursorFactory
-android.database.sqlite.SQLiteDirectCursorDriver
+android.database.sqlite.SQLiteDebug
+android.database.sqlite.SQLiteDebug$PagerStats
+android.database.sqlite.SQLiteProgram
android.database.sqlite.SQLiteQuery
+android.database.sqlite.SQLiteQueryBuilder
android.database.sqlite.SQLiteStatement
-android.ddm.DdmHandleAppName
+android.database.sqlite.SqliteWrapper
android.ddm.DdmHandleExit
android.ddm.DdmHandleHeap
android.ddm.DdmHandleHello
android.ddm.DdmHandleNativeHeap
+android.ddm.DdmHandleProfiling
android.ddm.DdmHandleThread
android.ddm.DdmRegister
+android.debug.JNITest
+android.emoji.EmojiFactory
+android.graphics.AvoidXfermode
android.graphics.Bitmap
+android.graphics.Bitmap$1
+android.graphics.Bitmap$CompressFormat
+android.graphics.Bitmap$Config
+android.graphics.BitmapFactory
+android.graphics.BitmapFactory$Options
android.graphics.BitmapShader
+android.graphics.BlurMaskFilter
+android.graphics.Camera
android.graphics.Canvas
-android.graphics.Canvas$EdgeType
+android.graphics.Canvas$VertexMode
android.graphics.Color
+android.graphics.ColorFilter
+android.graphics.ColorMatrixColorFilter
+android.graphics.ComposePathEffect
+android.graphics.ComposeShader
+android.graphics.CornerPathEffect
+android.graphics.DashPathEffect
+android.graphics.DiscretePathEffect
+android.graphics.DrawFilter
+android.graphics.EmbossMaskFilter
android.graphics.Interpolator
+android.graphics.LayerRasterizer
+android.graphics.LightingColorFilter
android.graphics.LinearGradient
+android.graphics.MaskFilter
android.graphics.Matrix
-android.graphics.Matrix$ScaleToFit
+android.graphics.Movie
android.graphics.NinePatch
android.graphics.Paint
+android.graphics.Paint$Align
+android.graphics.Paint$Cap
+android.graphics.Paint$FontMetrics
+android.graphics.Paint$FontMetricsInt
+android.graphics.Paint$Join
+android.graphics.Paint$Style
android.graphics.PaintFlagsDrawFilter
android.graphics.Path
-android.graphics.Path$Direction
+android.graphics.Path$FillType
+android.graphics.PathDashPathEffect
+android.graphics.PathEffect
+android.graphics.PathMeasure
android.graphics.Picture
-android.graphics.PorterDuff
+android.graphics.PixelFormat
+android.graphics.PixelXorXfermode
+android.graphics.Point
+android.graphics.PointF
android.graphics.PorterDuff$Mode
+android.graphics.PorterDuffColorFilter
android.graphics.PorterDuffXfermode
+android.graphics.RadialGradient
+android.graphics.Rasterizer
android.graphics.Rect
+android.graphics.Rect$1
android.graphics.RectF
+android.graphics.RectF$1
android.graphics.Region
+android.graphics.Region$1
android.graphics.Region$Op
+android.graphics.RegionIterator
android.graphics.Shader
android.graphics.Shader$TileMode
+android.graphics.SumPathEffect
+android.graphics.SweepGradient
+android.graphics.TableMaskFilter
android.graphics.Typeface
android.graphics.Xfermode
+android.graphics.YuvImage
+android.graphics.drawable.Animatable
+android.graphics.drawable.AnimatedRotateDrawable
+android.graphics.drawable.AnimatedRotateDrawable$AnimatedRotateState
android.graphics.drawable.AnimationDrawable
+android.graphics.drawable.AnimationDrawable$AnimationState
android.graphics.drawable.BitmapDrawable
android.graphics.drawable.BitmapDrawable$BitmapState
+android.graphics.drawable.ClipDrawable
+android.graphics.drawable.ClipDrawable$ClipState
android.graphics.drawable.ColorDrawable
android.graphics.drawable.ColorDrawable$ColorState
android.graphics.drawable.Drawable
+android.graphics.drawable.Drawable$Callback
+android.graphics.drawable.Drawable$ConstantState
android.graphics.drawable.DrawableContainer
+android.graphics.drawable.DrawableContainer$DrawableContainerState
android.graphics.drawable.GradientDrawable
+android.graphics.drawable.GradientDrawable$GradientState
+android.graphics.drawable.GradientDrawable$Orientation
android.graphics.drawable.LayerDrawable
android.graphics.drawable.LayerDrawable$ChildDrawable
android.graphics.drawable.LayerDrawable$LayerState
android.graphics.drawable.NinePatchDrawable
android.graphics.drawable.NinePatchDrawable$NinePatchState
-android.graphics.drawable.PaintDrawable
-android.graphics.drawable.RotateDrawable
-android.graphics.drawable.RotateDrawable$RotateState
-android.graphics.drawable.ScaleDrawable
-android.graphics.drawable.ScaleDrawable$ScaleState
android.graphics.drawable.ShapeDrawable
-android.graphics.drawable.ShapeDrawable$ShapeState
android.graphics.drawable.StateListDrawable
android.graphics.drawable.StateListDrawable$StateListState
android.graphics.drawable.TransitionDrawable
android.graphics.drawable.TransitionDrawable$TransitionState
-android.graphics.drawable.shapes.RoundRectShape
+android.graphics.utils.BoundaryPatch
+android.hardware.Camera
+android.hardware.Camera$Parameters
+android.hardware.GeomagneticField
android.hardware.SensorManager
-android.inputmethodservice.KeyboardView
+android.location.Address
+android.location.Criteria
+android.location.GeocoderParams
+android.location.IGpsStatusListener$Stub
android.location.ILocationManager$Stub
+android.location.ILocationManager$Stub$Proxy
android.location.Location
+android.location.LocationManager
+android.location.LocationProviderInterface
+android.media.AudioFormat
android.media.AudioManager
+android.media.AudioRecord
+android.media.AudioSystem
+android.media.AudioTrack
+android.media.ExifInterface
android.media.IAudioService$Stub
-android.media.IAudioService$Stub$Proxy
+android.media.JetPlayer
+android.media.MediaFile
+android.media.MediaMetadataRetriever
+android.media.MediaPlayer
+android.media.MediaScanner
+android.media.Metadata
+android.media.MiniThumbFile
+android.media.ThumbnailUtils
+android.media.ToneGenerator
+android.net.ConnectivityManager
+android.net.Credentials
+android.net.DhcpInfo
+android.net.DhcpInfo$1
+android.net.Downloads
+android.net.Downloads$ByUri
+android.net.IConnectivityManager$Stub
+android.net.LocalServerSocket
android.net.LocalSocket
-android.net.LocalSocketAddress
-android.net.LocalSocketAddress$Namespace
android.net.LocalSocketImpl
android.net.LocalSocketImpl$SocketInputStream
android.net.LocalSocketImpl$SocketOutputStream
android.net.NetworkInfo
android.net.NetworkInfo$DetailedState
+android.net.NetworkUtils
android.net.SSLCertificateSocketFactory
android.net.TrafficStats
android.net.Uri
-android.net.Uri$1
-android.net.Uri$AbstractHierarchicalUri
-android.net.Uri$AbstractPart
android.net.Uri$HierarchicalUri
android.net.Uri$OpaqueUri
android.net.Uri$Part
-android.net.Uri$Part$EmptyPart
-android.net.Uri$PathPart
-android.net.Uri$PathSegments
-android.net.Uri$StringUri
android.net.WebAddress
-android.net.http.CertificateChainValidator
+android.net.http.AndroidHttpClient
+android.net.http.AndroidHttpClientConnection
android.net.http.EventHandler
+android.net.http.Headers
android.net.http.HttpsConnection
+android.net.http.HttpDateTime
+android.net.http.Request
android.net.http.RequestQueue
+android.net.http.SslCertificate
android.net.http.SslError
android.net.wifi.IWifiManager$Stub
+android.net.wifi.ScanResult
android.net.wifi.SupplicantState
android.net.wifi.WifiConfiguration
android.net.wifi.WifiInfo
-android.opengl.Material
+android.net.wifi.WifiManager
+android.net.wifi.WifiNative
+android.opengl.ETC1
+android.opengl.GLES10
+android.opengl.GLES10Ext
+android.opengl.GLES11
+android.opengl.GLES11Ext
+android.opengl.GLES20
+android.opengl.GLSurfaceView
+android.opengl.GLSurfaceView$ComponentSizeChooser
+android.opengl.GLUtils
+android.opengl.Matrix
+android.opengl.Visibility
android.os.Binder
android.os.BinderProxy
android.os.Build
+android.os.Build$VERSION
android.os.Bundle
-android.os.Bundle$1
+android.os.Debug
+android.os.Debug$MemoryInfo
+android.os.Debug$MemoryInfo$1
+android.os.DropBoxManager$Entry
android.os.Environment
+android.os.FileObserver$ObserverThread
android.os.FileUtils
+android.os.FileUtils$FileStatus
android.os.Handler
-android.os.HandlerThread
android.os.IBinder
+android.os.IInterface
android.os.IPowerManager$Stub
-android.os.IPowerManager$Stub$Proxy
-android.os.IServiceManager
-android.os.IVibratorService$Stub
-android.os.IVibratorService$Stub$Proxy
android.os.Looper
+android.os.MemoryFile
android.os.Message
-android.os.Message$1
-android.os.MessageQueue
-android.os.MessageQueue$IdleHandler
android.os.Parcel
-android.os.PatternMatcher
-android.os.PatternMatcher$1
-android.os.PowerManager
-android.os.PowerManager$WakeLock
-android.os.PowerManager$WakeLock$1
+android.os.Parcel$1
+android.os.ParcelFileDescriptor
+android.os.ParcelFileDescriptor$1
+android.os.ParcelUuid
+android.os.Parcelable
+android.os.Parcelable$Creator
+android.os.Power
android.os.Process
-android.os.ServiceManager
-android.os.ServiceManagerNative
-android.os.ServiceManagerProxy
-android.os.Vibrator
-android.preference.CheckBoxPreference
+android.os.RecoverySystem
+android.os.ResultReceiver
+android.os.StatFs
+android.os.SystemClock
+android.os.SystemProperties
+android.os.UEventObserver
+android.os.storage.IMountService$Stub
+android.os.storage.IMountService$Stub$Proxy
+android.pim.EventRecurrence
+android.pim.RecurrenceSet
+android.preference.CheckBoxPreference$SavedState
android.preference.DialogPreference
-android.preference.EditTextPreference
android.preference.ListPreference
android.preference.Preference
android.preference.PreferenceActivity
android.preference.PreferenceGroup
android.preference.PreferenceGroupAdapter
+android.preference.PreferenceInflater
android.preference.PreferenceManager
android.preference.PreferenceScreen
android.preference.RingtonePreference
-android.sax.RootElement
+android.preference.VolumePreference
+android.preference.VolumePreference$SeekBarVolumizer
+android.provider.Browser
+android.provider.Calendar
+android.provider.Calendar$Attendees
+android.provider.Calendar$CalendarAlerts
+android.provider.Calendar$Calendars
+android.provider.Calendar$EventDays
+android.provider.Calendar$Events
+android.provider.Calendar$Reminders
+android.provider.Contacts
+android.provider.Contacts$ContactMethods
+android.provider.ContactsContract
+android.provider.ContactsContract$CommonDataKinds$Email
+android.provider.ContactsContract$CommonDataKinds$Phone
+android.provider.ContactsContract$CommonDataKinds$StructuredPostal
+android.provider.ContactsContract$Contacts
+android.provider.ContactsContract$Data
+android.provider.ContactsContract$DataColumnsWithJoins
+android.provider.ContactsContract$PhoneLookup
+android.provider.ContactsContract$RawContacts
+android.provider.ContactsContract$RawContacts$EntityIteratorImpl
+android.provider.ContactsContract$RawContactsEntity
+android.provider.Downloads
+android.provider.Downloads$Impl
+android.provider.MediaStore
+android.provider.MediaStore$Audio$Artists
+android.provider.MediaStore$Audio$Media
+android.provider.MediaStore$Images$Media
+android.provider.MediaStore$Images$Thumbnails
+android.provider.MediaStore$Video$Media
+android.provider.SearchRecentSuggestions
+android.provider.Settings$Secure
+android.provider.Settings$System
+android.provider.UserDictionary$Words
+android.security.KeyStore
+android.security.Md5MessageDigest
+android.security.MessageDigest
+android.security.Sha1MessageDigest
+android.server.BluetoothA2dpService
+android.server.BluetoothEventLoop
+android.server.BluetoothService
+android.speech.tts.ITts$Stub
+android.speech.tts.ITts$Stub$Proxy
+android.speech.tts.ITtsCallback$Stub
+android.speech.tts.TextToSpeech
android.telephony.PhoneNumberUtils
-android.telephony.PhoneStateListener
android.telephony.ServiceState
-android.telephony.TelephonyManager
-android.telephony.SmsManager
+android.telephony.SignalStrength
android.telephony.SmsMessage
-android.text.AutoText
+android.telephony.SmsMessage$MessageClass
+android.telephony.TelephonyManager
+android.text.AndroidCharacter
android.text.BoringLayout
-android.text.BoringLayout$Metrics
android.text.DynamicLayout
-android.text.DynamicLayout$ChangeWatcher
-android.text.Editable
-android.text.Editable$Factory
-android.text.GetChars
-android.text.GraphicsOperations
android.text.Html$HtmlParser
-android.text.InputFilter
+android.text.HtmlToSpannedConverter
android.text.Layout
-android.text.Layout$Alignment
-android.text.Layout$Directions
-android.text.Layout$Ellipsizer
-android.text.NoCopySpan
-android.text.NoCopySpan$Concrete
-android.text.PackedIntVector
-android.text.PackedObjectVector
-android.text.ParcelableSpan
android.text.Selection
-android.text.Selection$END
-android.text.Selection$START
-android.text.SpanWatcher
-android.text.Spannable
-android.text.Spannable$Factory
-android.text.SpannableString
android.text.SpannableStringBuilder
-android.text.SpannableStringInternal
-android.text.Spanned
android.text.SpannedString
-android.text.StaticLayout
-android.text.Styled
-android.text.TextPaint
android.text.TextUtils
-android.text.TextUtils$1
-android.text.TextUtils$EllipsizeCallback
-android.text.TextUtils$SimpleStringSplitter
-android.text.TextUtils$TruncateAt
-android.text.TextWatcher
android.text.format.DateUtils
+android.text.format.Formatter
android.text.format.Time
android.text.method.ArrowKeyMovementMethod
android.text.method.BaseKeyListener
-android.text.method.KeyListener
+android.text.method.DigitsKeyListener
+android.text.method.LinkMovementMethod
android.text.method.MetaKeyKeyListener
-android.text.method.MovementMethod
android.text.method.QwertyKeyListener
-android.text.method.ReplacementTransformationMethod
android.text.method.ReplacementTransformationMethod$SpannedReplacementCharSequence
android.text.method.SingleLineTransformationMethod
android.text.method.TextKeyListener
android.text.method.TextKeyListener$Capitalize
-android.text.method.TextKeyListener$SettingsObserver
-android.text.method.TransformationMethod
-android.text.style.AlignmentSpan
-android.text.style.CharacterStyle
-android.text.style.ForegroundColorSpan
-android.text.style.LeadingMarginSpan
-android.text.style.LineBackgroundSpan
-android.text.style.LineHeightSpan
-android.text.style.MetricAffectingSpan
-android.text.style.ParagraphStyle
-android.text.style.ReplacementSpan
+android.text.style.ImageSpan
+android.text.style.RelativeSizeSpan
+android.text.style.ScaleXSpan
android.text.style.StyleSpan
-android.text.style.URLSpan
-android.text.style.UpdateAppearance
-android.text.style.UpdateLayout
-android.text.style.WrapTogetherSpan
+android.text.style.TextAppearanceSpan
android.text.util.Linkify
android.util.AttributeSet
android.util.DisplayMetrics
+android.util.EventLog
+android.util.EventLog$Event
android.util.FloatMath
+android.util.Log
+android.util.LongSparseArray
+android.util.MonthDisplayHelper
+android.util.Patterns
android.util.SparseArray
+android.util.StateSet
android.util.TypedValue
-android.util.Xml$XmlSerializerFactory
+android.util.Xml
+android.util.Xml$Encoding
+android.util.base64.Base64$Encoder
android.view.AbsSavedState
-android.view.ContextMenu
-android.view.ContextMenu$ContextMenuInfo
android.view.ContextThemeWrapper
android.view.Display
android.view.FocusFinder
-android.view.FocusFinder$1
-android.view.GestureDetector$SimpleOnGestureListener
-android.view.Gravity
-android.view.IWindow
+android.view.GestureDetector
android.view.IWindow$Stub
-android.view.IWindowManager
android.view.IWindowManager$Stub
android.view.IWindowManager$Stub$Proxy
-android.view.IWindowSession
android.view.IWindowSession$Stub
-android.view.IWindowSession$Stub$Proxy
android.view.KeyCharacterMap
+android.view.KeyCharacterMap$KeyData
android.view.KeyEvent
-android.view.KeyEvent$1
-android.view.KeyEvent$Callback
-android.view.LayoutInflater
-android.view.LayoutInflater$Factory
-android.view.Menu
-android.view.MenuInflater
-android.view.MenuItem
android.view.MotionEvent
-android.view.MotionEvent$1
+android.view.ScaleGestureDetector
android.view.Surface
-android.view.SurfaceHolder
+android.view.Surface$1
+android.view.SurfaceSession
android.view.SurfaceView
-android.view.TouchDelegate
+android.view.SurfaceView$MyWindow
android.view.VelocityTracker
android.view.View
-android.view.View$AttachInfo
android.view.View$AttachInfo$Callbacks
+android.view.View$AttachInfo$InvalidateInfo
android.view.View$BaseSavedState
-android.view.View$BaseSavedState$1
-android.view.View$MeasureSpec
-android.view.View$OnCreateContextMenuListener
-android.view.View$ScrollabilityCache
android.view.ViewConfiguration
android.view.ViewGroup
-android.view.ViewGroup$LayoutParams
-android.view.ViewGroup$MarginLayoutParams
-android.view.ViewManager
+android.view.ViewParent
android.view.ViewRoot
-android.view.ViewRoot$1
-android.view.ViewRoot$InputMethodCallback
-android.view.ViewRoot$RunQueue
-android.view.ViewRoot$TrackballAxis
android.view.ViewRoot$W
android.view.ViewStub
-android.view.ViewTreeObserver
-android.view.ViewTreeObserver$InternalInsetsInfo
-android.view.ViewTreeObserver$OnPreDrawListener
android.view.Window
-android.view.Window$Callback
-android.view.Window$LocalWindowManager
-android.view.WindowLeaked
-android.view.WindowManager
android.view.WindowManager$LayoutParams
-android.view.WindowManager$LayoutParams$1
android.view.WindowManagerImpl
-android.view.animation.AccelerateDecelerateInterpolator
-android.view.animation.AlphaAnimation
+android.view.accessibility.AccessibilityEvent
android.view.animation.Animation
android.view.animation.AnimationSet
-android.view.animation.LinearInterpolator
-android.view.animation.Transformation
android.view.inputmethod.BaseInputConnection
android.view.inputmethod.CompletionInfo
-android.view.inputmethod.CompletionInfo$1
-
android.view.inputmethod.EditorInfo
-android.view.inputmethod.EditorInfo$1
-
android.view.inputmethod.ExtractedText
-android.view.inputmethod.ExtractedText$1
-
-android.view.inputmethod.ExtractedTextRequest
-android.view.inputmethod.ExtractedTextRequest$1
-
-android.view.inputmethod.InputBinding
-android.view.inputmethod.InputBinding$1
-android.view.inputmethod.InputConnection
-android.view.inputmethod.InputMethod
-android.view.inputmethod.InputMethod$SessionCallback
-
-android.view.inputmethod.InputMethodInfo
-android.view.inputmethod.InputMethodInfo$1
android.view.inputmethod.InputMethodManager
-android.view.inputmethod.InputMethodManager$1
-android.view.inputmethod.InputMethodManager$2
-android.view.inputmethod.InputMethodManager$ControlledInputConnectionWrapper
-android.view.inputmethod.InputMethodManager$H
-
-android.view.inputmethod.InputMethodSession
-android.view.inputmethod.InputMethodSession$EventCallback
android.webkit.BrowserFrame
android.webkit.CacheManager
android.webkit.CallbackProxy
+android.webkit.ConsoleMessage$MessageLevel
android.webkit.CookieManager
android.webkit.CookieSyncManager
+android.webkit.DownloadListener
+android.webkit.FileLoader
+android.webkit.GeolocationPermissions
+android.webkit.GeolocationService
+android.webkit.HTML5VideoViewProxy
android.webkit.JWebCoreJavaBridge
android.webkit.LoadListener
-android.webkit.MimeTypeMap
+android.webkit.PluginManager
android.webkit.URLUtil
-android.webkit.WebBackForwardList
-android.webkit.WebHistoryItem
-android.webkit.WebIconDatabase
-android.webkit.WebIconDatabase$EventHandler
-android.webkit.WebIconDatabase$EventHandler$1
android.webkit.WebIconDatabase$EventHandler$IconResult
+android.webkit.WebIconDatabase$IconListener
android.webkit.WebSettings
-android.webkit.WebSettings$EventHandler
-android.webkit.WebSettings$EventHandler$1
-android.webkit.WebSettings$LayoutAlgorithm
-android.webkit.WebSettings$RenderPriority
android.webkit.WebSettings$TextSize
-android.webkit.WebSyncManager
-android.webkit.WebSyncManager$SyncHandler
+android.webkit.WebStorage
android.webkit.WebTextView
android.webkit.WebView
-android.webkit.WebView$ExtendedZoomControls
-android.webkit.WebView$PrivateHandler
+android.webkit.WebView$DragTrackerHandler
+android.webkit.WebView$ScaleDetectorListener
android.webkit.WebViewCore
-android.webkit.WebViewCore$CursorData
-android.webkit.WebViewCore$EventHub
-android.webkit.WebViewCore$EventHub$1
-android.webkit.WebViewCore$WebCoreThread
-android.webkit.WebViewCore$WebCoreThread$1
+android.webkit.WebViewCore$4
+android.webkit.WebViewCore$TextSelectionData
+android.webkit.WebViewCore$TouchEventData
+android.webkit.WebViewCore$TouchUpData
android.webkit.WebViewDatabase
android.widget.AbsListView
-android.widget.AbsListView$CheckForLongPress
-android.widget.AbsListView$CheckForTap
-android.widget.AbsListView$LayoutParams
+android.widget.AbsListView$3
+android.widget.AbsListView$CheckForKeyLongPress
android.widget.AbsListView$PerformClick
-android.widget.AbsListView$RecycleBin
android.widget.AbsListView$SavedState
-android.widget.AbsListView$SavedState$1
android.widget.AbsSeekBar
android.widget.AbsSpinner
+android.widget.AbsSpinner$SavedState
android.widget.AbsoluteLayout
-android.widget.AbsoluteLayout$LayoutParams
android.widget.AdapterView
-android.widget.AdapterView$AdapterDataSetObserver
android.widget.ArrayAdapter
android.widget.AutoCompleteTextView
android.widget.AutoCompleteTextView$DropDownItemClickListener
android.widget.AutoCompleteTextView$DropDownListView
android.widget.BaseAdapter
-android.widget.Button
+android.widget.BaseExpandableListAdapter
android.widget.CheckBox
-android.widget.Checkable
-android.widget.CheckedTextView
android.widget.CompoundButton
+android.widget.CompoundButton$SavedState
android.widget.CursorAdapter
-android.widget.CursorAdapter$ChangeObserver
-android.widget.CursorAdapter$MyDataSetObserver
android.widget.CursorTreeAdapter
+android.widget.DatePicker
android.widget.EditText
+android.widget.ExpandableListConnector
android.widget.ExpandableListView
android.widget.FrameLayout
-android.widget.FrameLayout$LayoutParams
-android.widget.Gallery
+android.widget.GridView
android.widget.HeaderViewListAdapter
android.widget.ImageView
android.widget.ImageView$ScaleType
android.widget.LinearLayout
-android.widget.LinearLayout$LayoutParams
android.widget.ListView
-android.widget.ListView$ArrowScrollFocusResult
android.widget.ListView$SavedState
-android.widget.ListView$SavedState$1
+android.widget.MediaController
+android.widget.MediaController$4
+android.widget.MultiAutoCompleteTextView
+android.widget.NumberPicker
android.widget.PopupWindow
+android.widget.PopupWindow$PopupViewContainer
android.widget.ProgressBar
-android.widget.RadioGroup
+android.widget.ProgressBar$SavedState
+android.widget.QuickContactBadge
android.widget.RatingBar
android.widget.RelativeLayout
-android.widget.RelativeLayout$LayoutParams
+android.widget.RelativeLayout$DependencyGraph$Node
android.widget.RemoteViews
+android.widget.ResourceCursorAdapter
android.widget.ScrollBarDrawable
android.widget.ScrollView
-android.widget.Scroller
android.widget.SeekBar
android.widget.SimpleCursorAdapter
android.widget.SlidingDrawer
android.widget.Spinner
-android.widget.Spinner$DropDownAdapter
android.widget.TabHost
android.widget.TabWidget
android.widget.TableLayout
android.widget.TableRow
android.widget.TextView
-android.widget.TextView$1
-android.widget.TextView$Blink
-android.widget.TextView$BufferType
-android.widget.TextView$ChangeWatcher
-android.widget.TextView$CharWrapper
-android.widget.TextView$Drawables
-android.widget.TextView$InputContentType
-android.widget.TextView$InputMethodState
+android.widget.TextView$CommitSelectionReceiver
android.widget.TextView$Marquee
-android.widget.TextView$MenuHandler
-android.widget.TextView$SavedState
-android.widget.TextView$SavedState$1
-android.widget.ToggleButton
+android.widget.TimePicker
android.widget.TwoLineListItem
+android.widget.VideoView
android.widget.ViewAnimator
android.widget.ViewSwitcher
android.widget.ZoomButton
+android.widget.ZoomButtonsController
android.widget.ZoomControls
-com.android.common.ArrayListCursor
-com.android.common.FastXmlSerializer
-com.android.common.NetworkConnectivityListener
-com.android.common.NetworkConnectivityListener$State
-com.android.common.XmlUtils
-com.android.internal.database.SortCursor
+com.android.internal.R$styleable
+com.android.internal.app.AlertActivity
+com.android.internal.app.AlertController
+com.android.internal.app.AlertController$AlertParams
+com.android.internal.app.AlertController$RecycleListView
+com.android.internal.app.ChooserActivity
+com.android.internal.app.ResolverActivity
+com.android.internal.app.ResolverActivity$ResolveListAdapter
com.android.internal.appwidget.IAppWidgetService$Stub
-com.android.internal.http.multipart.FilePart
-com.android.internal.http.multipart.MultipartEntity
-com.android.internal.http.multipart.Part
-com.android.internal.http.multipart.PartSource
-com.android.internal.http.multipart.StringPart
-com.android.internal.logging.AndroidConfig
+com.android.internal.content.SyncStateContentProviderHelper
+com.android.internal.graphics.NativeUtils
+com.android.internal.location.DummyLocationProvider
+com.android.internal.location.GpsLocationProvider
com.android.internal.logging.AndroidHandler
com.android.internal.os.AndroidPrintStream
+com.android.internal.os.BinderInternal
com.android.internal.os.BinderInternal$GcWatcher
+com.android.internal.os.IResultReceiver$Stub
com.android.internal.os.LoggingPrintStream
com.android.internal.os.LoggingPrintStream$1
com.android.internal.os.RuntimeInit
com.android.internal.os.RuntimeInit$1
com.android.internal.os.RuntimeInit$UncaughtHandler
-com.android.internal.os.ZygoteInit$MethodAndArgsCaller
-com.android.internal.policy.IPolicy
+com.android.internal.os.SamplingProfilerIntegration
+com.android.internal.os.ZygoteConnection
+com.android.internal.os.ZygoteConnection$Arguments
+com.android.internal.os.ZygoteInit
+com.android.internal.net.DomainNameValidator
com.android.internal.policy.PolicyManager
com.android.internal.policy.impl.PhoneLayoutInflater
com.android.internal.policy.impl.PhoneWindow
-com.android.internal.policy.impl.PhoneWindow$1
-com.android.internal.policy.impl.PhoneWindow$ContextMenuCallback
com.android.internal.policy.impl.PhoneWindow$DecorView
-com.android.internal.policy.impl.PhoneWindow$PanelFeatureState
com.android.internal.policy.impl.PhoneWindow$PanelFeatureState$SavedState
-com.android.internal.policy.impl.PhoneWindow$PanelFeatureState$SavedState$1
+com.android.internal.policy.impl.PhoneWindowManager
com.android.internal.policy.impl.Policy
-com.android.internal.telephony.Connection$DisconnectCause
-com.android.internal.telephony.Connection$PostDialState
-com.android.internal.telephony.IPhoneStateListener$Stub
-com.android.internal.telephony.ITelephony$Stub
-com.android.internal.telephony.Phone
-com.android.internal.telephony.Phone$DataActivityState
-com.android.internal.telephony.Phone$DataState
-com.android.internal.telephony.Phone$State
-com.android.internal.telephony.Phone$SuppService
-com.android.internal.telephony.PhoneBase
-com.android.internal.telephony.PhoneStateIntentReceiver
-com.android.internal.telephony.IccCard$State
-com.android.internal.telephony.BaseCommands
-com.android.internal.telephony.CallForwardInfo
-com.android.internal.telephony.CommandsInterface
-com.android.internal.telephony.DriverCall
-com.android.internal.telephony.DriverCall$State
-com.android.internal.telephony.gsm.GsmConnection
-com.android.internal.telephony.gsm.GSMPhone
com.android.internal.telephony.GsmAlphabet
-com.android.internal.telephony.gsm.GsmMmiCode
-com.android.internal.telephony.gsm.SimCard
-com.android.internal.telephony.ISms$Stub
-com.android.internal.telephony.RIL
-com.android.internal.telephony.ServiceStateTracker
-
-com.android.internal.telephony.gsm.stk.ComprehensionTlvTag
-com.android.internal.telephony.gsm.stk.ResultCode
+com.android.internal.telephony.ITelephony$Stub
+com.android.internal.telephony.ITelephony$Stub$Proxy
+com.android.internal.telephony.ITelephonyRegistry$Stub
+com.android.internal.telephony.IccCard$State
+com.android.internal.telephony.Phone$State
+com.android.internal.telephony.SmsAddress
+com.android.internal.telephony.SmsMessageBase
+com.android.internal.telephony.gsm.GsmSmsAddress
+com.android.internal.telephony.gsm.SmsMessage
+com.android.internal.telephony.gsm.SmsMessage$PduParser
+com.android.internal.util.ArrayUtils
+com.android.internal.util.FastMath
+com.android.internal.util.FastXmlSerializer
+com.android.internal.util.HanziToPinyin
+com.android.internal.util.XmlUtils
com.android.internal.view.IInputConnectionWrapper
-com.android.internal.view.IInputConnectionWrapper$MyHandler
-com.android.internal.view.IInputConnectionWrapper$SomeArgs
-
-com.android.internal.view.IInputContext
com.android.internal.view.IInputContext$Stub
-com.android.internal.view.IInputContext$Stub$Proxy
-
-com.android.internal.view.IInputContextCallback
-com.android.internal.view.IInputContextCallback$Stub
-com.android.internal.view.IInputContextCallback$Stub$Proxy
-
-com.android.internal.view.IInputMethod
-com.android.internal.view.IInputMethod$Stub
-com.android.internal.view.IInputMethod$Stub$Proxy
-
-com.android.internal.view.IInputMethodCallback
-com.android.internal.view.IInputMethodCallback$Stub
-com.android.internal.view.IInputMethodCallback$Stub$Proxy
-
-com.android.internal.view.IInputMethodClient
-com.android.internal.view.IInputMethodClient$Stub
-com.android.internal.view.IInputMethodClient$Stub$Proxy
-
-com.android.internal.view.IInputMethodManager
com.android.internal.view.IInputMethodManager$Stub
-com.android.internal.view.IInputMethodManager$Stub$Proxy
-
-com.android.internal.view.IInputMethodSession
-com.android.internal.view.IInputMethodSession$Stub
-com.android.internal.view.IInputMethodSession$Stub$Proxy
-
-com.android.internal.view.InputBindResult
-com.android.internal.view.InputBindResult$1
-
-com.android.internal.view.InputConnectionWrapper
-com.android.internal.view.InputConnectionWrapper$InputContextCallback
-com.android.internal.view.menu.ExpandedMenuView
+com.android.internal.view.menu.ContextMenuBuilder
com.android.internal.view.menu.IconMenuItemView
com.android.internal.view.menu.IconMenuView
+com.android.internal.view.menu.IconMenuView$SavedState
com.android.internal.view.menu.ListMenuItemView
com.android.internal.view.menu.MenuBuilder
-com.android.internal.view.menu.MenuBuilder$Callback
-com.android.internal.view.menu.MenuDialogHelper
com.android.internal.view.menu.MenuItemImpl
com.android.internal.view.menu.SubMenuBuilder
-com.android.internal.widget.RotarySelector
-com.android.internal.widget.Smileys
-com.google.android.gles_jni.EGLDisplayImpl
+com.android.internal.widget.ContactHeaderWidget
+com.android.internal.widget.DialogTitle
+com.android.internal.widget.EditableInputConnection
+com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient
+com.android.internal.widget.LockPatternUtils
+com.android.internal.widget.LockPatternView
+com.android.internal.widget.LockPatternView$Cell
com.google.android.gles_jni.EGLImpl
com.google.android.gles_jni.GLImpl
com.ibm.icu4jni.charset.CharsetDecoderICU
com.ibm.icu4jni.charset.CharsetEncoderICU
com.ibm.icu4jni.charset.CharsetICU
-com.ibm.icu4jni.text.CollationAttribute
+com.ibm.icu4jni.charset.CharsetProviderICU
+com.ibm.icu4jni.charset.NativeConverter
+com.ibm.icu4jni.common.ErrorCode
+com.ibm.icu4jni.lang.UCharacter
+com.ibm.icu4jni.regex.NativeRegEx
+com.ibm.icu4jni.text.Collator
+com.ibm.icu4jni.text.NativeBreakIterator
+com.ibm.icu4jni.text.NativeCollation
com.ibm.icu4jni.text.NativeDecimalFormat
com.ibm.icu4jni.text.RuleBasedCollator
+com.ibm.icu4jni.text.RuleBasedNumberFormat
+com.ibm.icu4jni.util.Resources
com.ibm.icu4jni.util.Resources$DefaultTimeZones
-dalvik.system.DexFile
+dalvik.system.DalvikLogHandler
+dalvik.system.DalvikLogging
+dalvik.system.NativeStart
dalvik.system.PathClassLoader
+dalvik.system.SamplingProfiler
+dalvik.system.TouchDex
+dalvik.system.VMDebug
+dalvik.system.VMRuntime
+dalvik.system.VMStack
+dalvik.system.Zygote
java.beans.PropertyChangeEvent
java.beans.PropertyChangeListener
java.beans.PropertyChangeSupport
java.io.BufferedInputStream
+java.io.BufferedReader
java.io.ByteArrayInputStream
-java.io.ByteArrayOutputStream
+java.io.Closeable
+java.io.DataInput
+java.io.DataOutput
+java.io.DataOutputStream
java.io.File
java.io.FileDescriptor
java.io.FileInputStream
java.io.FileInputStream$RepositioningLock
java.io.FileNotFoundException
+java.io.FileOutputStream
java.io.FilterInputStream
+java.io.FilterOutputStream
+java.io.Flushable
java.io.IOException
+java.io.InputStream
+java.io.InputStreamReader
+java.io.InterruptedIOException
+java.io.ObjectInput
+java.io.ObjectInputStream
+java.io.ObjectOutput
+java.io.ObjectOutputStream
java.io.ObjectStreamClass
+java.io.ObjectStreamClass$OSCThreadLocalCache
+java.io.ObjectStreamConstants
+java.io.ObjectStreamException
+java.io.ObjectStreamField
+java.io.OutputStream
+java.io.OutputStreamWriter
+java.io.PrintStream
java.io.PrintWriter
+java.io.PushbackReader
java.io.RandomAccessFile
java.io.RandomAccessFile$RepositionLock
-java.io.StringWriter
-java.io.Writer
+java.io.Reader
+java.io.Serializable
+java.io.StreamCorruptedException
+java.lang.AbstractStringBuilder
+java.lang.Appendable
+java.lang.ArrayIndexOutOfBoundsException
+java.lang.Boolean
+java.lang.BootClassLoader
+java.lang.Byte
+java.lang.CharSequence
+java.lang.Character
+java.lang.Character$UnicodeBlock
java.lang.Class
java.lang.ClassCache
-java.lang.ClassNotFoundException
+java.lang.ClassCache$EnumComparator
+java.lang.ClassLoader
+java.lang.ClassLoader$SystemClassLoader
+java.lang.Cloneable
+java.lang.Comparable
+java.lang.Double
+java.lang.Enum
+java.lang.Error
+java.lang.Exception
+java.lang.Float
java.lang.IllegalArgumentException
-java.lang.IllegalStateException
+java.lang.IndexOutOfBoundsException
java.lang.Integer
+java.lang.InternalError
+java.lang.InterruptedException
+java.lang.Iterable
+java.lang.LangAccessImpl
java.lang.LinkageError
java.lang.Long
+java.lang.Math
java.lang.NoClassDefFoundError
+java.lang.NoSuchMethodError
+java.lang.Number
java.lang.NumberFormatException
java.lang.Object
+java.lang.OutOfMemoryError
+java.lang.Readable
+java.lang.Runnable
java.lang.Runtime
java.lang.RuntimeException
+java.lang.RuntimePermission
+java.lang.SecurityException
+java.lang.Short
+java.lang.StackOverflowError
+java.lang.StackTraceElement
+java.lang.StrictMath
java.lang.String
+java.lang.String$CaseInsensitiveComparator
java.lang.StringBuffer
java.lang.StringBuilder
+java.lang.System
+java.lang.SystemProperties
java.lang.Thread
+java.lang.Thread$State
+java.lang.Thread$UncaughtExceptionHandler
+java.lang.ThreadGroup
+java.lang.ThreadGroup$ChildrenGroupsLock
+java.lang.ThreadGroup$ChildrenThreadsLock
java.lang.ThreadLocal
java.lang.ThreadLocal$Values
java.lang.Throwable
+java.lang.UnsatisfiedLinkError
+java.lang.UnsupportedOperationException
+java.lang.VMClassLoader
java.lang.VMThread
+java.lang.VirtualMachineError
+java.lang.Void
+java.lang.annotation.Annotation
+java.lang.ref.PhantomReference
+java.lang.ref.Reference
java.lang.ref.ReferenceQueue
java.lang.ref.SoftReference
java.lang.ref.WeakReference
+java.lang.reflect.AccessibleObject
+java.lang.reflect.AnnotatedElement
+java.lang.reflect.Array
java.lang.reflect.Constructor
+java.lang.reflect.Field
+java.lang.reflect.GenericDeclaration
+java.lang.reflect.InvocationHandler
+java.lang.reflect.Member
java.lang.reflect.Method
java.lang.reflect.Modifier
+java.lang.reflect.Proxy
+java.lang.reflect.ReflectionAccessImpl
+java.lang.reflect.Type
java.math.BigDecimal
java.math.BigInt
java.math.BigInteger
java.math.Multiplication
+java.net.AddressCache
+java.net.AddressCache$1
+java.net.ConnectException
java.net.ContentHandler
+java.net.DatagramPacket
+java.net.Inet4Address
java.net.InetAddress
+java.net.InetAddress$1
+java.net.InetAddress$2
java.net.InetAddress$WaitReachable
+java.net.InetSocketAddress
java.net.JarURLConnection
java.net.NetPermission
-java.net.ProxySelectorImpl
-java.net.Socket$ConnectLock
+java.net.NetworkInterface
+java.net.ServerSocket
+java.net.Socket
+java.net.SocketException
+java.net.SocketImpl
+java.net.SocketOptions
java.net.URI
java.net.URL
java.net.URLConnection
java.net.URLConnection$DefaultContentHandler
java.net.URLStreamHandler
+java.nio.BaseByteBuffer
+java.nio.Buffer
+java.nio.BufferFactory
+java.nio.ByteBuffer
java.nio.ByteOrder
+java.nio.CharArrayBuffer
+java.nio.CharBuffer
java.nio.CharSequenceAdapter
+java.nio.CharToByteBufferAdapter
java.nio.DirectByteBuffer
+java.nio.FloatToByteBufferAdapter
+java.nio.HeapByteBuffer
+java.nio.IntToByteBufferAdapter
+java.nio.LongBuffer
+java.nio.LongToByteBufferAdapter
+java.nio.NIOAccess
+java.nio.ReadWriteCharArrayBuffer
java.nio.ReadWriteDirectByteBuffer
-java.nio.ReadWriteIntArrayBuffer
-java.nio.ReadWriteShortArrayBuffer
-java.nio.ShortBuffer
+java.nio.ReadWriteHeapByteBuffer
java.nio.ShortToByteBufferAdapter
+java.nio.channels.ByteChannel
+java.nio.channels.Channel
+java.nio.channels.FileChannel
+java.nio.channels.GatheringByteChannel
+java.nio.channels.InterruptibleChannel
+java.nio.channels.ReadableByteChannel
+java.nio.channels.ScatteringByteChannel
+java.nio.channels.WritableByteChannel
+java.nio.channels.spi.AbstractInterruptibleChannel
+java.nio.channels.spi.AbstractInterruptibleChannel$1
+java.nio.channels.spi.AbstractInterruptibleChannel$2
+java.nio.charset.Charset
+java.nio.charset.Charset$1
+java.nio.charset.CharsetDecoder
java.nio.charset.CharsetEncoder
+java.nio.charset.CoderResult
+java.nio.charset.CodingErrorAction
+java.nio.charset.spi.CharsetProvider
java.security.AccessControlContext
-java.security.GeneralSecurityException
+java.security.AccessController
+java.security.BasicPermission
+java.security.Guard
java.security.KeyStore
java.security.MessageDigest
+java.security.Permission
+java.security.PrivilegedAction
+java.security.PrivilegedExceptionAction
java.security.ProtectionDomain
java.security.Provider
-java.security.SecureRandom
java.security.Security
-java.security.cert.CertPathValidator
-java.security.cert.CertificateFactory
-java.security.cert.PKIXParameters
-java.security.cert.TrustAnchor
-java.security.cert.X509CertSelector
java.security.cert.X509Certificate
+java.text.AttributedCharacterIterator$Attribute
java.text.Collator
+java.text.Collator$1
java.text.DateFormat
java.text.DateFormat$Field
java.text.DecimalFormat
java.text.DecimalFormatSymbols
-java.text.MessageFormat
+java.text.Format
java.text.NumberFormat
-java.text.RuleBasedCollator
java.text.SimpleDateFormat
-java.util.AbstractList$FullListIterator
-java.util.AbstractList$SimpleListIterator
+java.util.AbstractCollection
+java.util.AbstractList
+java.util.AbstractMap
+java.util.AbstractSet
java.util.ArrayList
+java.util.ArrayList$ArrayListIterator
java.util.Arrays
java.util.Arrays$ArrayList
+java.util.BitSet
java.util.Calendar
-java.util.Collections$SynchronizedCollection
-java.util.Collections$UnmodifiableList
-java.util.Collections$UnmodifiableMap
-java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1
+java.util.Collection
+java.util.Collections
+java.util.Collections$EmptyList
+java.util.Collections$EmptyMap
+java.util.Collections$EmptySet
+java.util.Collections$SingletonSet
+java.util.Collections$UnmodifiableCollection
+java.util.Collections$UnmodifiableCollection$1
+java.util.Collections$UnmodifiableRandomAccessList
+java.util.Collections$UnmodifiableSet
+java.util.Comparator
java.util.Date
+java.util.Dictionary
java.util.EnumMap
+java.util.EnumSet
+java.util.Enumeration
java.util.EventListener
java.util.EventObject
java.util.Formatter
java.util.GregorianCalendar
java.util.HashMap
+java.util.HashMap$HashIterator
+java.util.HashMap$HashMapEntry
+java.util.HashMap$KeyIterator
+java.util.HashMap$KeySet
+java.util.HashMap$Values
java.util.HashSet
java.util.Hashtable
+java.util.Hashtable$HashIterator
+java.util.Hashtable$HashtableEntry
+java.util.Hashtable$KeyEnumeration
+java.util.Hashtable$ValueIterator
+java.util.Hashtable$Values
java.util.IdentityHashMap
+java.util.Iterator
java.util.LinkedHashMap
+java.util.LinkedHashMap$LinkedEntry
+java.util.LinkedHashMap$LinkedHashIterator
+java.util.LinkedHashMap$ValueIterator
java.util.LinkedList
-java.util.LinkedList$Link
java.util.List
+java.util.ListIterator
java.util.Locale
+java.util.Map
+java.util.Map$Entry
+java.util.MiniEnumSet
java.util.Properties
-java.util.Random
+java.util.PropertyPermission
+java.util.RandomAccess
java.util.ResourceBundle
+java.util.Set
java.util.SimpleTimeZone
+java.util.SortedMap
+java.util.SortedSet
+java.util.SpecialAccess
+java.util.Stack
+java.util.StringTokenizer
java.util.TimeZone
java.util.TreeMap
-java.util.TreeMap$MapEntry
java.util.TreeSet
+java.util.UUID
java.util.Vector
java.util.WeakHashMap
java.util.WeakHashMap$Entry
java.util.concurrent.ConcurrentHashMap
java.util.concurrent.ConcurrentLinkedQueue
-java.util.concurrent.DelayQueue
+java.util.concurrent.ConcurrentLinkedQueue$Node
+java.util.concurrent.CopyOnWriteArrayList
+java.util.concurrent.CopyOnWriteArrayList$COWIterator
+java.util.concurrent.Executors$DelegatedExecutorService
+java.util.concurrent.FutureTask
java.util.concurrent.LinkedBlockingQueue
-java.util.concurrent.ScheduledThreadPoolExecutor
-java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue
+java.util.concurrent.Semaphore
+java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.TimeUnit
java.util.concurrent.atomic.AtomicBoolean
java.util.concurrent.atomic.AtomicInteger
+java.util.concurrent.atomic.AtomicLong
+java.util.concurrent.atomic.AtomicReference
java.util.concurrent.atomic.UnsafeAccess
+java.util.concurrent.locks.AbstractOwnableSynchronizer
java.util.concurrent.locks.AbstractQueuedSynchronizer
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
java.util.concurrent.locks.AbstractQueuedSynchronizer$Node
java.util.concurrent.locks.Lock
-java.util.concurrent.locks.LockSupport
java.util.concurrent.locks.ReentrantLock
-java.util.concurrent.locks.ReentrantLock$FairSync
java.util.concurrent.locks.ReentrantLock$NonfairSync
java.util.concurrent.locks.ReentrantLock$Sync
-java.util.concurrent.locks.ReentrantReadWriteLock
-java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync
java.util.concurrent.locks.UnsafeAccess
java.util.jar.Attributes
java.util.jar.Attributes$Name
@@ -852,25 +1041,25 @@
java.util.jar.JarEntry
java.util.jar.JarFile
java.util.jar.JarFile$1JarFileEnumerator
-java.util.jar.JarFile$JarFileInputStream
java.util.jar.JarVerifier
java.util.jar.Manifest
-java.util.logging.ErrorManager
-java.util.logging.Formatter
java.util.logging.Handler
java.util.logging.Level
java.util.logging.LogManager
java.util.logging.LogManager$1
java.util.logging.LogManager$2
java.util.logging.LogManager$2$1
-java.util.logging.LogManager$3
-java.util.logging.LogRecord
+java.util.logging.LogManager$4
java.util.logging.Logger
+java.util.logging.Logger$1
java.util.logging.LoggingPermission
-java.util.logging.SimpleFormatter
+java.util.regex.MatchResult
java.util.regex.Matcher
java.util.regex.Pattern
-java.util.zip.DeflaterOutputStream
+java.util.zip.Adler32
+java.util.zip.CRC32
+java.util.zip.Checksum
+java.util.zip.Deflater
java.util.zip.Inflater
java.util.zip.InflaterInputStream
java.util.zip.ZipConstants
@@ -879,63 +1068,90 @@
java.util.zip.ZipFile
java.util.zip.ZipFile$2
java.util.zip.ZipFile$RAFStream
-javax.microedition.khronos.egl.EGLContext
+java.util.zip.ZipFile$ZipInflaterInputStream
+javax.crypto.Cipher
+javax.crypto.Mac
+javax.crypto.spec.IvParameterSpec
+javax.microedition.khronos.egl.EGL
+javax.microedition.khronos.egl.EGL10
+javax.microedition.khronos.opengles.GL
+javax.microedition.khronos.opengles.GL10
+javax.microedition.khronos.opengles.GL10Ext
+javax.microedition.khronos.opengles.GL11
+javax.microedition.khronos.opengles.GL11Ext
+javax.microedition.khronos.opengles.GL11ExtensionPack
+javax.net.ssl.DefaultHostnameVerifier
javax.net.ssl.HttpsURLConnection
-javax.net.ssl.SSLHandshakeException
+javax.net.ssl.SSLServerSocket
+javax.net.ssl.SSLSession
+javax.net.ssl.SSLSocket
+javax.net.ssl.SSLSocketFactory
javax.security.auth.x500.X500Principal
javax.security.cert.X509Certificate
-javax.security.cert.X509Certificate$2
junit.framework.Assert
-org.apache.commons.codec.binary.Base64
-org.apache.commons.codec.binary.Hex
org.apache.commons.logging.LogFactory
-org.apache.commons.logging.impl.Jdk14Logger
org.apache.harmony.archive.util.Util
-org.apache.harmony.dalvik.ddmc.Chunk
+org.apache.harmony.dalvik.NativeTestTarget
org.apache.harmony.dalvik.ddmc.ChunkHandler
org.apache.harmony.dalvik.ddmc.DdmServer
-org.apache.harmony.dalvik.ddmc.DdmVmInternal
+org.apache.harmony.kernel.vm.LangAccess
+org.apache.harmony.kernel.vm.ReflectionAccess
+org.apache.harmony.lang.annotation.AnnotationFactory
+org.apache.harmony.lang.annotation.AnnotationMember
org.apache.harmony.luni.internal.net.www.protocol.file.FileURLConnection
org.apache.harmony.luni.internal.net.www.protocol.file.Handler
org.apache.harmony.luni.internal.net.www.protocol.http.Handler
-org.apache.harmony.luni.internal.net.www.protocol.https.Handler
org.apache.harmony.luni.internal.net.www.protocol.jar.Handler
org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnectionImpl
-org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnectionImpl$1
org.apache.harmony.luni.internal.net.www.protocol.jar.JarURLConnectionImpl$JarURLConnectionInputStream
org.apache.harmony.luni.internal.util.TimezoneGetter
-org.apache.harmony.luni.internal.util.ZoneInfo
org.apache.harmony.luni.internal.util.ZoneInfoDB
+org.apache.harmony.luni.net.GenericIPMreq
org.apache.harmony.luni.net.PlainSocketImpl
+org.apache.harmony.luni.platform.Endianness
+org.apache.harmony.luni.platform.ICommonDataTypes
+org.apache.harmony.luni.platform.IFileSystem
+org.apache.harmony.luni.platform.IMemorySystem
+org.apache.harmony.luni.platform.INetworkSystem
+org.apache.harmony.luni.platform.OSFileSystem
+org.apache.harmony.luni.platform.OSMemory
+org.apache.harmony.luni.platform.OSNetworkSystem
+org.apache.harmony.luni.platform.Platform
org.apache.harmony.luni.platform.PlatformAddress
-org.apache.harmony.luni.util.TwoKeyHashMap
+org.apache.harmony.luni.platform.PlatformAddressFactory
+org.apache.harmony.luni.util.FloatingPointParser
+org.apache.harmony.luni.util.InputStreamHelper
+org.apache.harmony.luni.util.InputStreamHelper$1
+org.apache.harmony.luni.util.InputStreamHelper$ExposedByteArrayInputStream
+org.apache.harmony.luni.util.LocaleCache
+org.apache.harmony.luni.util.Msg
+org.apache.harmony.luni.util.NumberConverter
+org.apache.harmony.luni.util.PriviAction
+org.apache.harmony.luni.util.ThreadLocalCache
+org.apache.harmony.luni.util.ThreadLocalCache$1
+org.apache.harmony.luni.util.ThreadLocalCache$2
+org.apache.harmony.luni.util.ThreadLocalCache$3
+org.apache.harmony.luni.util.ThreadLocalCache$4
+org.apache.harmony.luni.util.ThreadLocalCache$5
+org.apache.harmony.luni.util.Util
+org.apache.harmony.nio.FileChannelFactory
+org.apache.harmony.nio.internal.DirectBuffer
+org.apache.harmony.nio.internal.FileChannelImpl
org.apache.harmony.nio.internal.FileChannelImpl$RepositioningLock
+org.apache.harmony.nio.internal.FileLockImpl
org.apache.harmony.nio.internal.LockManager
org.apache.harmony.nio.internal.LockManager$1
-org.apache.harmony.nio.internal.ReadOnlyFileChannel
-org.apache.harmony.security.asn1.ASN1BitString
-org.apache.harmony.security.asn1.ASN1BitString$ASN1NamedBitList
-org.apache.harmony.security.asn1.ASN1Boolean
-org.apache.harmony.security.asn1.ASN1Explicit
+org.apache.harmony.nio.internal.WriteOnlyFileChannel
org.apache.harmony.security.asn1.ASN1GeneralizedTime
-org.apache.harmony.security.asn1.ASN1Implicit
-org.apache.harmony.security.asn1.ASN1Integer
-org.apache.harmony.security.asn1.ASN1OctetString
-org.apache.harmony.security.asn1.ASN1SetOf
+org.apache.harmony.security.asn1.ASN1Oid
org.apache.harmony.security.asn1.ASN1StringType
-org.apache.harmony.security.asn1.ASN1StringType$1
-org.apache.harmony.security.asn1.ASN1StringType$2
-org.apache.harmony.security.asn1.ASN1StringType$3
-org.apache.harmony.security.asn1.ASN1StringType$4
-org.apache.harmony.security.asn1.ASN1StringType$5
-org.apache.harmony.security.asn1.ASN1StringType$6
-org.apache.harmony.security.asn1.ASN1StringType$7
-org.apache.harmony.security.asn1.ASN1UTCTime
-org.apache.harmony.security.asn1.BitString
+org.apache.harmony.security.asn1.DerInputStream
+org.apache.harmony.security.asn1.DerOutputStream
org.apache.harmony.security.fortress.Engine
org.apache.harmony.security.fortress.SecurityUtils
org.apache.harmony.security.fortress.Services
org.apache.harmony.security.pkcs7.ContentInfo
+org.apache.harmony.security.provider.cert.DRLCertFactory
org.apache.harmony.security.provider.cert.X509CertFactoryImpl
org.apache.harmony.security.provider.cert.X509CertImpl
org.apache.harmony.security.provider.cert.X509CertPathImpl
@@ -943,183 +1159,111 @@
org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl
org.apache.harmony.security.utils.AlgNameMapper
org.apache.harmony.security.x501.AttributeTypeAndValue
-org.apache.harmony.security.x501.AttributeValue
org.apache.harmony.security.x501.DirectoryString
-org.apache.harmony.security.x501.DirectoryString$1
org.apache.harmony.security.x501.Name
-org.apache.harmony.security.x501.Name$1
org.apache.harmony.security.x509.AlgorithmIdentifier
-org.apache.harmony.security.x509.AlgorithmIdentifier$1
org.apache.harmony.security.x509.BasicConstraints
-org.apache.harmony.security.x509.BasicConstraints$1
org.apache.harmony.security.x509.Certificate
-org.apache.harmony.security.x509.Certificate$1
+org.apache.harmony.security.x509.EDIPartyName
org.apache.harmony.security.x509.Extension
-org.apache.harmony.security.x509.Extension$1
-org.apache.harmony.security.x509.Extension$2
org.apache.harmony.security.x509.Extensions
-org.apache.harmony.security.x509.Extensions$1
org.apache.harmony.security.x509.GeneralName
org.apache.harmony.security.x509.GeneralNames
org.apache.harmony.security.x509.KeyUsage
org.apache.harmony.security.x509.ORAddress
+org.apache.harmony.security.x509.OtherName
org.apache.harmony.security.x509.SubjectPublicKeyInfo
-org.apache.harmony.security.x509.SubjectPublicKeyInfo$1
org.apache.harmony.security.x509.TBSCertificate
-org.apache.harmony.security.x509.TBSCertificate$1
org.apache.harmony.security.x509.Time
-org.apache.harmony.security.x509.Time$1
org.apache.harmony.security.x509.Validity
-org.apache.harmony.security.x509.Validity$1
+org.apache.harmony.text.BidiWrapper
+org.apache.harmony.xml.ExpatAttributes
org.apache.harmony.xml.ExpatParser
org.apache.harmony.xml.ExpatPullParser
-org.apache.harmony.xml.ExpatReader
-org.apache.harmony.xnet.provider.jsse.ClientSessionContext
+org.apache.harmony.xml.parsers.SAXParserFactoryImpl
+org.apache.harmony.xnet.provider.jsse.FileClientSessionCache
+org.apache.harmony.xnet.provider.jsse.NativeCrypto
+org.apache.harmony.xnet.provider.jsse.OpenSSLServerSocketImpl
org.apache.harmony.xnet.provider.jsse.OpenSSLSessionImpl
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$Finalizer
-org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream
-org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLOutputStream
+org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$LoggerHolder
+org.apache.harmony.xnet.provider.jsse.ProtocolVersion
org.apache.harmony.xnet.provider.jsse.SSLContextImpl
org.apache.harmony.xnet.provider.jsse.SSLParameters
-org.apache.harmony.xnet.provider.jsse.TrustManagerFactoryImpl
-org.apache.harmony.xnet.provider.jsse.TrustManagerImpl
-org.apache.http.HttpHost
-org.apache.http.HttpRequestInterceptor
+org.apache.harmony.xnet.provider.jsse.ServerSessionContext
org.apache.http.HttpVersion
-org.apache.http.auth.AuthSchemeRegistry
-org.apache.http.client.HttpClient
-org.apache.http.client.RequestDirector
+org.apache.http.client.methods.HttpEntityEnclosingRequestBase
+org.apache.http.client.methods.HttpGet
+org.apache.http.client.methods.HttpPost
org.apache.http.client.methods.HttpRequestBase
-org.apache.http.client.protocol.RequestAddCookies
-org.apache.http.client.protocol.RequestDefaultHeaders
-org.apache.http.client.protocol.RequestProxyAuthentication
-org.apache.http.client.protocol.RequestTargetAuthentication
-org.apache.http.client.protocol.ResponseProcessCookies
-org.apache.http.conn.params.ConnManagerParams$1
+org.apache.http.conn.BasicManagedEntity
+org.apache.http.conn.params.ConnManagerParams
org.apache.http.conn.params.ConnRouteParams
org.apache.http.conn.routing.HttpRoute
-org.apache.http.conn.routing.RouteInfo$LayerType
-org.apache.http.conn.routing.RouteInfo$TunnelType
-org.apache.http.conn.routing.RouteTracker
-org.apache.http.conn.scheme.PlainSocketFactory
-org.apache.http.conn.scheme.Scheme
-org.apache.http.conn.scheme.SchemeRegistry
-org.apache.http.conn.ssl.AllowAllHostnameVerifier
-org.apache.http.conn.ssl.BrowserCompatHostnameVerifier
+org.apache.http.conn.ssl.AbstractVerifier
org.apache.http.conn.ssl.SSLSocketFactory
-org.apache.http.conn.ssl.StrictHostnameVerifier
org.apache.http.conn.util.InetAddressUtils
-org.apache.http.cookie.CookieSpecRegistry
-org.apache.http.impl.DefaultConnectionReuseStrategy
-org.apache.http.impl.DefaultHttpResponseFactory
+org.apache.http.impl.AbstractHttpClientConnection
org.apache.http.impl.EnglishReasonPhraseCatalog
-org.apache.http.impl.HttpConnectionMetricsImpl
org.apache.http.impl.SocketHttpClientConnection
-org.apache.http.impl.auth.BasicSchemeFactory
-org.apache.http.impl.auth.DigestSchemeFactory
org.apache.http.impl.client.AbstractAuthenticationHandler
org.apache.http.impl.client.AbstractHttpClient
-org.apache.http.impl.client.BasicCredentialsProvider
+org.apache.http.impl.client.BasicCookieStore
org.apache.http.impl.client.DefaultHttpClient
-org.apache.http.impl.client.DefaultHttpRequestRetryHandler
-org.apache.http.impl.client.DefaultProxyAuthenticationHandler
-org.apache.http.impl.client.DefaultRedirectHandler
-org.apache.http.impl.client.DefaultTargetAuthenticationHandler
-org.apache.http.impl.client.DefaultUserTokenHandler
org.apache.http.impl.client.EntityEnclosingRequestWrapper
org.apache.http.impl.conn.AbstractClientConnAdapter
+org.apache.http.impl.conn.AbstractPooledConnAdapter
org.apache.http.impl.conn.DefaultClientConnection
-org.apache.http.impl.conn.DefaultClientConnectionOperator
-org.apache.http.impl.conn.DefaultHttpRoutePlanner
-org.apache.http.impl.conn.DefaultResponseParser
-org.apache.http.impl.conn.IdleConnectionHandler
-org.apache.http.impl.conn.tsccm.BasicPoolEntry
-org.apache.http.impl.conn.tsccm.BasicPoolEntryRef
+org.apache.http.impl.conn.SingleClientConnManager
org.apache.http.impl.conn.tsccm.ConnPoolByRoute
-org.apache.http.impl.conn.tsccm.RefQueueWorker
-org.apache.http.impl.conn.tsccm.RouteSpecificPool
org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager
org.apache.http.impl.cookie.BasicClientCookie
-org.apache.http.impl.cookie.BestMatchSpecFactory
-org.apache.http.impl.cookie.BrowserCompatSpecFactory
+org.apache.http.impl.cookie.BrowserCompatSpec
org.apache.http.impl.cookie.DateUtils
-org.apache.http.impl.cookie.NetscapeDraftSpecFactory
-org.apache.http.impl.cookie.RFC2109SpecFactory
-org.apache.http.impl.cookie.RFC2965SpecFactory
-org.apache.http.impl.entity.EntityDeserializer
-org.apache.http.impl.entity.EntitySerializer
-org.apache.http.impl.entity.LaxContentLengthStrategy
-org.apache.http.impl.entity.StrictContentLengthStrategy
-org.apache.http.impl.io.HttpRequestWriter
-org.apache.http.impl.io.HttpTransportMetricsImpl
+org.apache.http.impl.cookie.DateUtils$DateFormatHolder
+org.apache.http.impl.cookie.RFC2109Spec
org.apache.http.impl.io.SocketInputBuffer
-org.apache.http.impl.io.SocketOutputBuffer
-org.apache.http.message.BasicHeaderValueParser
org.apache.http.message.BasicHttpEntityEnclosingRequest
+org.apache.http.message.BasicHttpRequest
org.apache.http.message.BasicHttpResponse
-org.apache.http.message.BasicLineFormatter
org.apache.http.message.BasicLineParser
+org.apache.http.message.BasicNameValuePair
+org.apache.http.message.BasicTokenIterator
org.apache.http.params.BasicHttpParams
org.apache.http.protocol.BasicHttpProcessor
org.apache.http.protocol.HTTP
-org.apache.http.protocol.HttpRequestExecutor
-org.apache.http.protocol.HttpRequestInterceptorList
-org.apache.http.protocol.HttpResponseInterceptorList
-org.apache.http.protocol.RequestConnControl
-org.apache.http.protocol.RequestContent
-org.apache.http.protocol.RequestExpectContinue
-org.apache.http.protocol.RequestTargetHost
-org.apache.http.protocol.RequestUserAgent
-org.apache.http.util.ByteArrayBuffer
-org.apache.http.util.CharArrayBuffer
-org.apache.http.util.EntityUtils
-org.apache.http.util.VersionInfo
-org.bouncycastle.asn1.DERBitString
-org.bouncycastle.asn1.DERIA5String
-org.bouncycastle.asn1.DERInteger
+org.bouncycastle.asn1.DERNull
org.bouncycastle.asn1.DERObject
org.bouncycastle.asn1.DERObjectIdentifier
-org.bouncycastle.asn1.DEROctetString
-org.bouncycastle.asn1.DERPrintableString
-org.bouncycastle.asn1.DERSequence
-org.bouncycastle.asn1.DERSet
-org.bouncycastle.asn1.DERTaggedObject
-org.bouncycastle.asn1.DERUTCTime
-org.bouncycastle.asn1.DERUTF8String
-org.bouncycastle.asn1.OrderedTable
+org.bouncycastle.asn1.iana.IANAObjectIdentifiers
org.bouncycastle.asn1.nist.NISTObjectIdentifiers
+org.bouncycastle.asn1.oiw.OIWObjectIdentifiers
org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers
-org.bouncycastle.asn1.x509.AlgorithmIdentifier
-org.bouncycastle.asn1.x509.RSAPublicKeyStructure
-org.bouncycastle.asn1.x509.SubjectPublicKeyInfo
-org.bouncycastle.asn1.x509.TBSCertificateStructure
-org.bouncycastle.asn1.x509.Time
-org.bouncycastle.asn1.x509.X509CertificateStructure
-org.bouncycastle.asn1.x509.X509Extension
org.bouncycastle.asn1.x509.X509Extensions
org.bouncycastle.asn1.x509.X509Name
-org.bouncycastle.asn1.x509.X509NameElementList
-org.bouncycastle.asn1.x9.X9ObjectIdentifiers
+org.bouncycastle.crypto.digests.SHA1Digest
org.bouncycastle.crypto.engines.AESFastEngine
+org.bouncycastle.crypto.macs.HMac
+org.bouncycastle.jce.provider.BouncyCastleProvider
org.bouncycastle.jce.provider.CertPathValidatorUtilities
-org.bouncycastle.jce.provider.JCEBlockCipher$AES
-org.bouncycastle.jce.provider.JCERSAPublicKey
-org.bouncycastle.jce.provider.JDKKeyFactory$RSA
+org.bouncycastle.jce.provider.JCEBlockCipher
org.bouncycastle.jce.provider.JDKKeyStore
-org.bouncycastle.jce.provider.JDKKeyStore$StoreEntry
+org.bouncycastle.jce.provider.JDKX509CertificateFactory
org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi
-org.bouncycastle.jce.provider.RSAUtil
+org.bouncycastle.jce.provider.WrapCipherSpi
org.bouncycastle.jce.provider.X509CertificateObject
org.ccil.cowan.tagsoup.HTMLScanner
+org.ccil.cowan.tagsoup.HTMLSchema
org.ccil.cowan.tagsoup.Parser
-org.json.JSONArray
org.json.JSONObject
-org.json.JSONStringer
org.kxml2.io.KXmlParser
org.kxml2.io.KXmlSerializer
+org.openssl.NativeBN
+org.xml.sax.Attributes
+org.xml.sax.InputSource
+org.xml.sax.helpers.AttributesImpl
org.xml.sax.helpers.DefaultHandler
-org.xml.sax.helpers.NewInstance
+org.xmlpull.v1.XmlPullParser
org.xmlpull.v1.XmlPullParserFactory
-org.xmlpull.v1.sax2.Driver
sun.misc.Unsafe
diff --git a/sax/tests/saxtests/src/android/sax/SafeSaxTest.java b/sax/tests/saxtests/src/android/sax/SafeSaxTest.java
index bee3938..e8cf2f7 100644
--- a/sax/tests/saxtests/src/android/sax/SafeSaxTest.java
+++ b/sax/tests/saxtests/src/android/sax/SafeSaxTest.java
@@ -29,7 +29,7 @@
import android.text.format.Time;
import android.util.Log;
import android.util.Xml;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
diff --git a/services/java/com/android/server/AccessibilityManagerService.java b/services/java/com/android/server/AccessibilityManagerService.java
index c55dcb3..87de79a 100644
--- a/services/java/com/android/server/AccessibilityManagerService.java
+++ b/services/java/com/android/server/AccessibilityManagerService.java
@@ -47,7 +47,7 @@
import android.text.TextUtils;
import android.text.TextUtils.SimpleStringSplitter;
import android.util.Config;
-import android.util.Log;
+import android.util.Slog;
import android.util.SparseArray;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.IAccessibilityManager;
@@ -275,7 +275,7 @@
client.setEnabled(mIsEnabled);
mClients.add(client);
} catch (RemoteException re) {
- Log.w(LOG_TAG, "Dead AccessibilityManagerClient: " + client, re);
+ Slog.w(LOG_TAG, "Dead AccessibilityManagerClient: " + client, re);
}
}
}
@@ -309,13 +309,13 @@
service.mServiceInterface.onInterrupt();
} catch (RemoteException re) {
if (re instanceof DeadObjectException) {
- Log.w(LOG_TAG, "Dead " + service.mService + ". Cleaning up.");
+ Slog.w(LOG_TAG, "Dead " + service.mService + ". Cleaning up.");
if (removeDeadServiceLocked(service)) {
count--;
i--;
}
} else {
- Log.e(LOG_TAG, "Error during sending interrupt request to "
+ Slog.e(LOG_TAG, "Error during sending interrupt request to "
+ service.mService, re);
}
}
@@ -343,7 +343,7 @@
}
return;
default:
- Log.w(LOG_TAG, "Unknown message type: " + message.what);
+ Slog.w(LOG_TAG, "Unknown message type: " + message.what);
}
}
@@ -451,16 +451,16 @@
try {
listener.onAccessibilityEvent(event);
if (Config.DEBUG) {
- Log.i(LOG_TAG, "Event " + event + " sent to " + listener);
+ Slog.i(LOG_TAG, "Event " + event + " sent to " + listener);
}
} catch (RemoteException re) {
if (re instanceof DeadObjectException) {
- Log.w(LOG_TAG, "Dead " + service.mService + ". Cleaning up.");
+ Slog.w(LOG_TAG, "Dead " + service.mService + ". Cleaning up.");
synchronized (mLock) {
removeDeadServiceLocked(service);
}
} else {
- Log.e(LOG_TAG, "Error during sending " + event + " to " + service.mService, re);
+ Slog.e(LOG_TAG, "Error during sending " + event + " to " + service.mService, re);
}
}
}
@@ -476,7 +476,7 @@
mHandler.removeMessages(service.mId);
if (Config.DEBUG) {
- Log.i(LOG_TAG, "Dead service " + service.mService + " removed");
+ Slog.i(LOG_TAG, "Dead service " + service.mService + " removed");
}
if (mServices.isEmpty()) {
@@ -722,7 +722,7 @@
}
}
} catch (RemoteException re) {
- Log.w(LOG_TAG, "Error while setting Controller for service: " + service, re);
+ Slog.w(LOG_TAG, "Error while setting Controller for service: " + service, re);
}
}
diff --git a/services/java/com/android/server/AlarmManagerService.java b/services/java/com/android/server/AlarmManagerService.java
index f480209..43fe6ab 100644
--- a/services/java/com/android/server/AlarmManagerService.java
+++ b/services/java/com/android/server/AlarmManagerService.java
@@ -37,7 +37,7 @@
import android.text.TextUtils;
import android.text.format.Time;
import android.util.EventLog;
-import android.util.Log;
+import android.util.Slog;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -141,7 +141,7 @@
if (mDescriptor != -1) {
mWaitThread.start();
} else {
- Log.w(TAG, "Failed to open alarm driver. Falling back to a handler.");
+ Slog.w(TAG, "Failed to open alarm driver. Falling back to a handler.");
}
}
@@ -160,7 +160,7 @@
public void setRepeating(int type, long triggerAtTime, long interval,
PendingIntent operation) {
if (operation == null) {
- Log.w(TAG, "set/setRepeating ignored because there is no intent");
+ Slog.w(TAG, "set/setRepeating ignored because there is no intent");
return;
}
synchronized (mLock) {
@@ -173,7 +173,7 @@
// Remove this alarm if already scheduled.
removeLocked(operation);
- if (localLOGV) Log.v(TAG, "set: " + alarm);
+ if (localLOGV) Slog.v(TAG, "set: " + alarm);
int index = addAlarmLocked(alarm);
if (index == 0) {
@@ -185,7 +185,7 @@
public void setInexactRepeating(int type, long triggerAtTime, long interval,
PendingIntent operation) {
if (operation == null) {
- Log.w(TAG, "setInexactRepeating ignored because there is no intent");
+ Slog.w(TAG, "setInexactRepeating ignored because there is no intent");
return;
}
@@ -237,7 +237,7 @@
// Remember where this bucket started (reducing the amount of later
// fixup required) and set the alarm with the new, bucketed start time.
- if (localLOGV) Log.v(TAG, "setInexactRepeating: interval=" + interval
+ if (localLOGV) Slog.v(TAG, "setInexactRepeating: interval=" + interval
+ " bucketTime=" + bucketTime);
mInexactDeliveryTimes[intervalSlot] = bucketTime;
setRepeating(type, bucketTime, interval, operation);
@@ -264,7 +264,7 @@
synchronized (this) {
String current = SystemProperties.get(TIMEZONE_PROPERTY);
if (current == null || !current.equals(zone.getID())) {
- if (localLOGV) Log.v(TAG, "timezone changed: " + current + ", new=" + zone.getID());
+ if (localLOGV) Slog.v(TAG, "timezone changed: " + current + ", new=" + zone.getID());
timeZoneWasChanged = true;
SystemProperties.set(TIMEZONE_PROPERTY, zone.getID());
}
@@ -379,18 +379,18 @@
if (index < 0) {
index = 0 - index - 1;
}
- if (localLOGV) Log.v(TAG, "Adding alarm " + alarm + " at " + index);
+ if (localLOGV) Slog.v(TAG, "Adding alarm " + alarm + " at " + index);
alarmList.add(index, alarm);
if (localLOGV) {
// Display the list of alarms for this alarm type
- Log.v(TAG, "alarms: " + alarmList.size() + " type: " + alarm.type);
+ Slog.v(TAG, "alarms: " + alarmList.size() + " type: " + alarm.type);
int position = 0;
for (Alarm a : alarmList) {
Time time = new Time();
time.set(a.when);
String timeStr = time.format("%b %d %I:%M:%S %p");
- Log.v(TAG, position + ": " + timeStr
+ Slog.v(TAG, position + ": " + timeStr
+ " " + a.operation.getTargetPackage());
position += 1;
}
@@ -514,7 +514,7 @@
{
Alarm alarm = it.next();
- if (localLOGV) Log.v(TAG, "Checking active alarm when=" + alarm.when + " " + alarm);
+ if (localLOGV) Slog.v(TAG, "Checking active alarm when=" + alarm.when + " " + alarm);
if (alarm.when > now) {
// don't fire alarms in the future
@@ -526,14 +526,14 @@
// the Calendar app with a reminder that is in the past. In that
// case, the reminder alarm will fire immediately.
if (localLOGV && now - alarm.when > LATE_ALARM_THRESHOLD) {
- Log.v(TAG, "alarm is late! alarm time: " + alarm.when
+ Slog.v(TAG, "alarm is late! alarm time: " + alarm.when
+ " now: " + now + " delay (in seconds): "
+ (now - alarm.when) / 1000);
}
// Recurring alarms may have passed several alarm intervals while the
// phone was asleep or off, so pass a trigger count when sending them.
- if (localLOGV) Log.v(TAG, "Alarm triggering: " + alarm);
+ if (localLOGV) Slog.v(TAG, "Alarm triggering: " + alarm);
alarm.count = 1;
if (alarm.repeatInterval > 0) {
// this adjustment will be zero if we're late by
@@ -644,7 +644,7 @@
synchronized (mLock) {
final long nowRTC = System.currentTimeMillis();
final long nowELAPSED = SystemClock.elapsedRealtime();
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Checking for alarms... rtc=" + nowRTC
+ ", elapsed=" + nowELAPSED);
@@ -665,7 +665,7 @@
while (it.hasNext()) {
Alarm alarm = it.next();
try {
- if (localLOGV) Log.v(TAG, "sending alarm " + alarm);
+ if (localLOGV) Slog.v(TAG, "sending alarm " + alarm);
alarm.operation.send(mContext, 0,
mBackgroundIntent.putExtra(
Intent.EXTRA_ALARM_COUNT, alarm.count),
@@ -696,7 +696,7 @@
remove(alarm.operation);
}
} catch (RuntimeException e) {
- Log.w(TAG, "Failure sending alarm.", e);
+ Slog.w(TAG, "Failure sending alarm.", e);
}
}
}
diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java
index 0b466f1..e5a5e03 100644
--- a/services/java/com/android/server/AppWidgetService.java
+++ b/services/java/com/android/server/AppWidgetService.java
@@ -38,7 +38,7 @@
import android.os.RemoteException;
import android.os.SystemClock;
import android.util.AttributeSet;
-import android.util.Log;
+import android.util.Slog;
import android.util.TypedValue;
import android.util.Xml;
import android.widget.RemoteViews;
@@ -57,7 +57,7 @@
import com.android.internal.appwidget.IAppWidgetService;
import com.android.internal.appwidget.IAppWidgetHost;
-import com.android.common.FastXmlSerializer;
+import com.android.internal.util.FastXmlSerializer;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -428,7 +428,7 @@
synchronized (mAppWidgetIds) {
Provider p = lookupProviderLocked(provider);
if (p == null) {
- Log.w(TAG, "updateAppWidgetProvider: provider doesn't exist: " + provider);
+ Slog.w(TAG, "updateAppWidgetProvider: provider doesn't exist: " + provider);
return;
}
ArrayList<AppWidgetId> instances = p.instances;
@@ -683,7 +683,7 @@
parser = activityInfo.loadXmlMetaData(mPackageManager,
AppWidgetManager.META_DATA_APPWIDGET_PROVIDER);
if (parser == null) {
- Log.w(TAG, "No " + AppWidgetManager.META_DATA_APPWIDGET_PROVIDER + " meta-data for "
+ Slog.w(TAG, "No " + AppWidgetManager.META_DATA_APPWIDGET_PROVIDER + " meta-data for "
+ "AppWidget provider '" + component + '\'');
return null;
}
@@ -698,7 +698,7 @@
String nodeName = parser.getName();
if (!"appwidget-provider".equals(nodeName)) {
- Log.w(TAG, "Meta-data does not start with appwidget-provider tag for"
+ Slog.w(TAG, "Meta-data does not start with appwidget-provider tag for"
+ " AppWidget provider '" + component + '\'');
return null;
}
@@ -737,7 +737,7 @@
// Ok to catch Exception here, because anything going wrong because
// of what a client process passes to us should not be fatal for the
// system process.
- Log.w(TAG, "XML parsing failed for AppWidget provider '" + component + '\'', e);
+ Slog.w(TAG, "XML parsing failed for AppWidget provider '" + component + '\'', e);
return null;
} finally {
if (parser != null) parser.close();
@@ -829,7 +829,7 @@
}
if (!writeStateToFileLocked(temp)) {
- Log.w(TAG, "Failed to persist new settings");
+ Slog.w(TAG, "Failed to persist new settings");
return;
}
@@ -980,7 +980,7 @@
int pIndex = Integer.parseInt(providerString, 16);
id.provider = loadedProviders.get(pIndex);
if (false) {
- Log.d(TAG, "bound appWidgetId=" + id.appWidgetId + " to provider "
+ Slog.d(TAG, "bound appWidgetId=" + id.appWidgetId + " to provider "
+ pIndex + " which is " + id.provider);
}
if (id.provider == null) {
@@ -1007,15 +1007,15 @@
} while (type != XmlPullParser.END_DOCUMENT);
success = true;
} catch (NullPointerException e) {
- Log.w(TAG, "failed parsing " + file, e);
+ Slog.w(TAG, "failed parsing " + file, e);
} catch (NumberFormatException e) {
- Log.w(TAG, "failed parsing " + file, e);
+ Slog.w(TAG, "failed parsing " + file, e);
} catch (XmlPullParserException e) {
- Log.w(TAG, "failed parsing " + file, e);
+ Slog.w(TAG, "failed parsing " + file, e);
} catch (IOException e) {
- Log.w(TAG, "failed parsing " + file, e);
+ Slog.w(TAG, "failed parsing " + file, e);
} catch (IndexOutOfBoundsException e) {
- Log.w(TAG, "failed parsing " + file, e);
+ Slog.w(TAG, "failed parsing " + file, e);
}
try {
if (stream != null) {
@@ -1055,7 +1055,7 @@
BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
- //Log.d(TAG, "received " + action);
+ //Slog.d(TAG, "received " + action);
if (Intent.ACTION_BOOT_COMPLETED.equals(action)) {
sendInitialBroadcasts();
} else if (Intent.ACTION_CONFIGURATION_CHANGED.equals(action)) {
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index f79a02a..8b0c264 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -56,7 +56,7 @@
import android.os.SystemClock;
import android.provider.Settings;
import android.util.EventLog;
-import android.util.Log;
+import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseIntArray;
@@ -261,7 +261,7 @@
IBackupTransport transport = getTransport(mCurrentTransport);
if (transport == null) {
- Log.v(TAG, "Backup requested but no transport available");
+ Slog.v(TAG, "Backup requested but no transport available");
mWakelock.release();
break;
}
@@ -277,7 +277,7 @@
for (BackupRequest b: mPendingBackups.values()) {
queue.add(b);
}
- if (DEBUG) Log.v(TAG, "clearing pending backups");
+ if (DEBUG) Slog.v(TAG, "clearing pending backups");
mPendingBackups.clear();
// Start a new backup-queue journal file too
@@ -294,7 +294,7 @@
// at next boot and the journaled requests fulfilled.
(new PerformBackupTask(transport, queue, oldJournal)).run();
} else {
- Log.v(TAG, "Backup requested but nothing pending");
+ Slog.v(TAG, "Backup requested but nothing pending");
mWakelock.release();
}
break;
@@ -306,7 +306,7 @@
case MSG_RUN_RESTORE:
{
RestoreParams params = (RestoreParams)msg.obj;
- Log.d(TAG, "MSG_RUN_RESTORE observer=" + params.observer);
+ Slog.d(TAG, "MSG_RUN_RESTORE observer=" + params.observer);
(new PerformRestoreTask(params.transport, params.observer,
params.token, params.pkgInfo, params.pmToken)).run();
break;
@@ -339,7 +339,7 @@
final int token = msg.arg1;
int state = mCurrentOperations.get(token, OP_TIMEOUT);
if (state == OP_PENDING) {
- if (DEBUG) Log.v(TAG, "TIMEOUT: token=" + token);
+ if (DEBUG) Slog.v(TAG, "TIMEOUT: token=" + token);
mCurrentOperations.put(token, OP_TIMEOUT);
}
mCurrentOpLock.notifyAll();
@@ -374,7 +374,7 @@
mProvisioned = Settings.Secure.getInt(context.getContentResolver(),
Settings.Secure.BACKUP_PROVISIONED, 0) != 0;
mAutoRestore = Settings.Secure.getInt(context.getContentResolver(),
- Settings.Secure.BACKUP_AUTO_RESTORE, 0) != 0;
+ Settings.Secure.BACKUP_AUTO_RESTORE, 1) != 0;
// If Encrypted file systems is enabled or disabled, this call will return the
// correct directory.
mBaseStateDir = new File(Environment.getSecureDataDirectory(), "backup");
@@ -430,7 +430,7 @@
if ("".equals(mCurrentTransport)) {
mCurrentTransport = null;
}
- if (DEBUG) Log.v(TAG, "Starting with transport " + mCurrentTransport);
+ if (DEBUG) Slog.v(TAG, "Starting with transport " + mCurrentTransport);
// Attach to the Google backup transport. When this comes up, it will set
// itself as the current transport because we explicitly reset mCurrentTransport
@@ -458,19 +458,19 @@
if (mPendingInits.size() > 0) {
// If there are pending init operations, we process those
// and then settle into the usual periodic backup schedule.
- if (DEBUG) Log.v(TAG, "Init pending at scheduled backup");
+ if (DEBUG) Slog.v(TAG, "Init pending at scheduled backup");
try {
mAlarmManager.cancel(mRunInitIntent);
mRunInitIntent.send();
} catch (PendingIntent.CanceledException ce) {
- Log.e(TAG, "Run init intent cancelled");
+ Slog.e(TAG, "Run init intent cancelled");
// can't really do more than bail here
}
} else {
// Don't run backups now if we're disabled or not yet
// fully set up.
if (mEnabled && mProvisioned) {
- if (DEBUG) Log.v(TAG, "Running a backup pass");
+ if (DEBUG) Slog.v(TAG, "Running a backup pass");
// Acquire the wakelock and pass it to the backup thread. it will
// be released once backup concludes.
@@ -479,7 +479,7 @@
Message msg = mBackupHandler.obtainMessage(MSG_RUN_BACKUP);
mBackupHandler.sendMessage(msg);
} else {
- Log.w(TAG, "Backup pass but e=" + mEnabled + " p=" + mProvisioned);
+ Slog.w(TAG, "Backup pass but e=" + mEnabled + " p=" + mProvisioned);
}
}
}
@@ -491,7 +491,7 @@
public void onReceive(Context context, Intent intent) {
if (RUN_INITIALIZE_ACTION.equals(intent.getAction())) {
synchronized (mQueueLock) {
- if (DEBUG) Log.v(TAG, "Running a device init");
+ if (DEBUG) Slog.v(TAG, "Running a device init");
// Acquire the wakelock and pass it to the init thread. it will
// be released once init concludes.
@@ -505,7 +505,7 @@
}
private void initPackageTracking() {
- if (DEBUG) Log.v(TAG, "Initializing package tracking");
+ if (DEBUG) Slog.v(TAG, "Initializing package tracking");
// Remember our ancestral dataset
mTokenFile = new File(mBaseStateDir, "ancestral");
@@ -527,9 +527,9 @@
}
} catch (FileNotFoundException fnf) {
// Probably innocuous
- Log.v(TAG, "No ancestral data");
+ Slog.v(TAG, "No ancestral data");
} catch (IOException e) {
- Log.w(TAG, "Unable to read token file", e);
+ Slog.w(TAG, "Unable to read token file", e);
}
// Keep a log of what apps we've ever backed up. Because we might have
@@ -562,20 +562,20 @@
info = mPackageManager.getPackageInfo(pkg, 0);
mEverStoredApps.add(pkg);
temp.writeUTF(pkg);
- if (DEBUG) Log.v(TAG, " + " + pkg);
+ if (DEBUG) Slog.v(TAG, " + " + pkg);
} catch (NameNotFoundException e) {
// nope, this package was uninstalled; don't include it
- if (DEBUG) Log.v(TAG, " - " + pkg);
+ if (DEBUG) Slog.v(TAG, " - " + pkg);
}
}
} catch (EOFException e) {
// Once we've rewritten the backup history log, atomically replace the
// old one with the new one then reopen the file for continuing use.
if (!tempProcessedFile.renameTo(mEverStored)) {
- Log.e(TAG, "Error renaming " + tempProcessedFile + " to " + mEverStored);
+ Slog.e(TAG, "Error renaming " + tempProcessedFile + " to " + mEverStored);
}
} catch (IOException e) {
- Log.e(TAG, "Error in processed file", e);
+ Slog.e(TAG, "Error in processed file", e);
} finally {
try { if (temp != null) temp.close(); } catch (IOException e) {}
try { if (in != null) in.close(); } catch (IOException e) {}
@@ -604,17 +604,17 @@
// backup.
RandomAccessFile in = null;
try {
- Log.i(TAG, "Found stale backup journal, scheduling:");
+ Slog.i(TAG, "Found stale backup journal, scheduling:");
in = new RandomAccessFile(f, "r");
while (true) {
String packageName = in.readUTF();
- Log.i(TAG, " + " + packageName);
+ Slog.i(TAG, " + " + packageName);
dataChanged(packageName);
}
} catch (EOFException e) {
// no more data; we're done
} catch (Exception e) {
- Log.e(TAG, "Can't read " + f, e);
+ Slog.e(TAG, "Can't read " + f, e);
} finally {
// close/delete the file
try { if (in != null) in.close(); } catch (IOException e) {}
@@ -627,7 +627,7 @@
// Maintain persistent state around whether need to do an initialize operation.
// Must be called with the queue lock held.
void recordInitPendingLocked(boolean isPending, String transportName) {
- if (DEBUG) Log.i(TAG, "recordInitPendingLocked: " + isPending
+ if (DEBUG) Slog.i(TAG, "recordInitPendingLocked: " + isPending
+ " on transport " + transportName);
try {
IBackupTransport transport = getTransport(transportName);
@@ -691,7 +691,7 @@
// is an unregistration, and the transport's entry is removed from our bookkeeping.
private void registerTransport(String name, IBackupTransport transport) {
synchronized (mTransports) {
- if (DEBUG) Log.v(TAG, "Registering transport " + name + " = " + transport);
+ if (DEBUG) Slog.v(TAG, "Registering transport " + name + " = " + transport);
if (transport != null) {
mTransports.put(name, transport);
} else {
@@ -731,7 +731,7 @@
// ----- Track installation/removal of packages -----
BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
- if (DEBUG) Log.d(TAG, "Received broadcast " + intent);
+ if (DEBUG) Slog.d(TAG, "Received broadcast " + intent);
String action = intent.getAction();
boolean replacing = false;
@@ -789,13 +789,13 @@
// ----- Track connection to GoogleBackupTransport service -----
ServiceConnection mGoogleConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName name, IBinder service) {
- if (DEBUG) Log.v(TAG, "Connected to Google transport");
+ if (DEBUG) Slog.v(TAG, "Connected to Google transport");
mGoogleTransport = IBackupTransport.Stub.asInterface(service);
registerTransport(name.flattenToShortString(), mGoogleTransport);
}
public void onServiceDisconnected(ComponentName name) {
- if (DEBUG) Log.v(TAG, "Disconnected from Google transport");
+ if (DEBUG) Slog.v(TAG, "Disconnected from Google transport");
mGoogleTransport = null;
registerTransport(name.flattenToShortString(), null);
}
@@ -805,7 +805,7 @@
// If 'packageName' is null, adds all backup agents in the whole system.
void addPackageParticipantsLocked(String packageName) {
// Look for apps that define the android:backupAgent attribute
- if (DEBUG) Log.v(TAG, "addPackageParticipantsLocked: " + packageName);
+ if (DEBUG) Slog.v(TAG, "addPackageParticipantsLocked: " + packageName);
List<PackageInfo> targetApps = allAgentPackages();
addPackageParticipantsLockedInner(packageName, targetApps);
}
@@ -813,9 +813,9 @@
private void addPackageParticipantsLockedInner(String packageName,
List<PackageInfo> targetPkgs) {
if (DEBUG) {
- Log.v(TAG, "Adding " + targetPkgs.size() + " backup participants:");
+ Slog.v(TAG, "Adding " + targetPkgs.size() + " backup participants:");
for (PackageInfo p : targetPkgs) {
- Log.v(TAG, " " + p + " agent=" + p.applicationInfo.backupAgentName
+ Slog.v(TAG, " " + p + " agent=" + p.applicationInfo.backupAgentName
+ " uid=" + p.applicationInfo.uid
+ " killAfterRestore="
+ (((p.applicationInfo.flags & ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0) ? "true" : "false")
@@ -837,7 +837,7 @@
// If we've never seen this app before, schedule a backup for it
if (!mEverStoredApps.contains(pkg.packageName)) {
- if (DEBUG) Log.i(TAG, "New app " + pkg.packageName
+ if (DEBUG) Slog.i(TAG, "New app " + pkg.packageName
+ " never backed up; scheduling");
dataChanged(pkg.packageName);
}
@@ -848,7 +848,7 @@
// Remove the given package's entry from our known active set. If
// 'packageName' is null, *all* participating apps will be removed.
void removePackageParticipantsLocked(String packageName) {
- if (DEBUG) Log.v(TAG, "removePackageParticipantsLocked: " + packageName);
+ if (DEBUG) Slog.v(TAG, "removePackageParticipantsLocked: " + packageName);
List<PackageInfo> allApps = null;
if (packageName != null) {
allApps = new ArrayList<PackageInfo>();
@@ -868,10 +868,10 @@
private void removePackageParticipantsLockedInner(String packageName,
List<PackageInfo> agents) {
if (DEBUG) {
- Log.v(TAG, "removePackageParticipantsLockedInner (" + packageName
+ Slog.v(TAG, "removePackageParticipantsLockedInner (" + packageName
+ ") removing " + agents.size() + " entries");
for (PackageInfo p : agents) {
- Log.v(TAG, " - " + p);
+ Slog.v(TAG, " - " + p);
}
}
for (PackageInfo pkg : agents) {
@@ -927,10 +927,10 @@
// action cannot be passed a null package name.
void updatePackageParticipantsLocked(String packageName) {
if (packageName == null) {
- Log.e(TAG, "updatePackageParticipants called with null package name");
+ Slog.e(TAG, "updatePackageParticipants called with null package name");
return;
}
- if (DEBUG) Log.v(TAG, "updatePackageParticipantsLocked: " + packageName);
+ if (DEBUG) Slog.v(TAG, "updatePackageParticipantsLocked: " + packageName);
// brute force but small code size
List<PackageInfo> allApps = allAgentPackages();
@@ -952,7 +952,7 @@
out.seek(out.length());
out.writeUTF(packageName);
} catch (IOException e) {
- Log.e(TAG, "Can't log backup of " + packageName + " to " + mEverStored);
+ Slog.e(TAG, "Can't log backup of " + packageName + " to " + mEverStored);
} finally {
try { if (out != null) out.close(); } catch (IOException e) {}
}
@@ -961,7 +961,7 @@
// Remove our awareness of having ever backed up the given package
void removeEverBackedUp(String packageName) {
- if (DEBUG) Log.v(TAG, "Removing backed-up knowledge of " + packageName + ", new set:");
+ if (DEBUG) Slog.v(TAG, "Removing backed-up knowledge of " + packageName + ", new set:");
synchronized (mEverStoredApps) {
// Rewrite the file and rename to overwrite. If we reboot in the middle,
@@ -974,7 +974,7 @@
mEverStoredApps.remove(packageName);
for (String s : mEverStoredApps) {
known.writeUTF(s);
- if (DEBUG) Log.v(TAG, " " + s);
+ if (DEBUG) Slog.v(TAG, " " + s);
}
known.close();
known = null;
@@ -986,7 +986,7 @@
// abandon the whole process and remove all what's-backed-up
// state entirely, meaning we'll force a backup pass for every
// participant on the next boot or [re]install.
- Log.w(TAG, "Error rewriting " + mEverStored, e);
+ Slog.w(TAG, "Error rewriting " + mEverStored, e);
mEverStoredApps.clear();
tempKnownFile.delete();
mEverStored.delete();
@@ -1015,15 +1015,15 @@
af.writeInt(-1);
} else {
af.writeInt(mAncestralPackages.size());
- if (DEBUG) Log.v(TAG, "Ancestral packages: " + mAncestralPackages.size());
+ if (DEBUG) Slog.v(TAG, "Ancestral packages: " + mAncestralPackages.size());
for (String pkgName : mAncestralPackages) {
af.writeUTF(pkgName);
- if (DEBUG) Log.v(TAG, " " + pkgName);
+ if (DEBUG) Slog.v(TAG, " " + pkgName);
}
}
af.close();
} catch (IOException e) {
- Log.w(TAG, "Unable to write token file:", e);
+ Slog.w(TAG, "Unable to write token file:", e);
}
}
@@ -1032,7 +1032,7 @@
synchronized (mTransports) {
IBackupTransport transport = mTransports.get(transportName);
if (transport == null) {
- Log.w(TAG, "Requested unavailable transport: " + transportName);
+ Slog.w(TAG, "Requested unavailable transport: " + transportName);
}
return transport;
}
@@ -1046,7 +1046,7 @@
mConnectedAgent = null;
try {
if (mActivityManager.bindBackupAgent(app, mode)) {
- Log.d(TAG, "awaiting agent for " + app);
+ Slog.d(TAG, "awaiting agent for " + app);
// success; wait for the agent to arrive
// only wait 10 seconds for the clear data to happen
@@ -1063,7 +1063,7 @@
// if we timed out with no connect, abort and move on
if (mConnecting == true) {
- Log.w(TAG, "Timeout waiting for agent " + app);
+ Slog.w(TAG, "Timeout waiting for agent " + app);
return null;
}
agent = mConnectedAgent;
@@ -1081,12 +1081,12 @@
try {
PackageInfo info = mPackageManager.getPackageInfo(packageName, 0);
if ((info.applicationInfo.flags & ApplicationInfo.FLAG_ALLOW_CLEAR_USER_DATA) == 0) {
- if (DEBUG) Log.i(TAG, "allowClearUserData=false so not wiping "
+ if (DEBUG) Slog.i(TAG, "allowClearUserData=false so not wiping "
+ packageName);
return;
}
} catch (NameNotFoundException e) {
- Log.w(TAG, "Tried to clear data for " + packageName + " but not found");
+ Slog.w(TAG, "Tried to clear data for " + packageName + " but not found");
return;
}
@@ -1151,13 +1151,13 @@
}
}
mBackupHandler.removeMessages(MSG_TIMEOUT);
- if (DEBUG) Log.v(TAG, "operation " + Integer.toHexString(token)
+ if (DEBUG) Slog.v(TAG, "operation " + Integer.toHexString(token)
+ " complete: finalState=" + finalState);
return finalState == OP_ACKNOWLEDGED;
}
void prepareOperationTimeout(int token, long interval) {
- if (DEBUG) Log.v(TAG, "starting timeout: token=" + Integer.toHexString(token)
+ if (DEBUG) Slog.v(TAG, "starting timeout: token=" + Integer.toHexString(token)
+ " interval=" + interval);
mCurrentOperations.put(token, OP_PENDING);
Message msg = mBackupHandler.obtainMessage(MSG_TIMEOUT, token, 0);
@@ -1189,7 +1189,7 @@
public void run() {
int status = BackupConstants.TRANSPORT_OK;
long startRealtime = SystemClock.elapsedRealtime();
- if (DEBUG) Log.v(TAG, "Beginning backup of " + mQueue.size() + " targets");
+ if (DEBUG) Slog.v(TAG, "Beginning backup of " + mQueue.size() + " targets");
// Backups run at background priority
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
@@ -1200,14 +1200,14 @@
// If we haven't stored package manager metadata yet, we must init the transport.
File pmState = new File(mStateDir, PACKAGE_MANAGER_SENTINEL);
if (status == BackupConstants.TRANSPORT_OK && pmState.length() <= 0) {
- Log.i(TAG, "Initializing (wiping) backup state and transport storage");
+ Slog.i(TAG, "Initializing (wiping) backup state and transport storage");
resetBackupState(mStateDir); // Just to make sure.
status = mTransport.initializeDevice();
if (status == BackupConstants.TRANSPORT_OK) {
EventLog.writeEvent(EventLogTags.BACKUP_INITIALIZE);
} else {
EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, "(initialize)");
- Log.e(TAG, "Transport error in initializeDevice()");
+ Slog.e(TAG, "Transport error in initializeDevice()");
}
}
@@ -1238,7 +1238,7 @@
EventLog.writeEvent(EventLogTags.BACKUP_SUCCESS, mQueue.size(), millis);
} else {
EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, "(finish)");
- Log.e(TAG, "Transport error in finishBackup()");
+ Slog.e(TAG, "Transport error in finishBackup()");
}
}
@@ -1250,7 +1250,7 @@
resetBackupState(mStateDir);
}
} catch (Exception e) {
- Log.e(TAG, "Error in backup thread", e);
+ Slog.e(TAG, "Error in backup thread", e);
status = BackupConstants.TRANSPORT_ERROR;
} finally {
// If everything actually went through and this is the first time we've
@@ -1268,7 +1268,7 @@
// the current active pending-backup file, not in the we are holding
// here in mJournal.
if (status != BackupConstants.TRANSPORT_OK) {
- Log.w(TAG, "Backup pass unsuccessful, restaging");
+ Slog.w(TAG, "Backup pass unsuccessful, restaging");
for (BackupRequest req : mQueue) {
dataChanged(req.appInfo.packageName);
}
@@ -1285,7 +1285,7 @@
// re-enqueued all of these packages in the current active journal.
// Either way, we no longer need this pass's journal.
if (mJournal != null && !mJournal.delete()) {
- Log.e(TAG, "Unable to remove backup journal file " + mJournal);
+ Slog.e(TAG, "Unable to remove backup journal file " + mJournal);
}
// Only once we're entirely finished do we release the wakelock
@@ -1299,7 +1299,7 @@
private int doQueuedBackups(IBackupTransport transport) {
for (BackupRequest request : mQueue) {
- Log.d(TAG, "starting agent for backup of " + request);
+ Slog.d(TAG, "starting agent for backup of " + request);
IBackupAgent agent = null;
int mode = (request.fullBackup)
@@ -1313,7 +1313,7 @@
}
} catch (SecurityException ex) {
// Try for the next one.
- Log.d(TAG, "error in bind/backup", ex);
+ Slog.d(TAG, "error in bind/backup", ex);
} finally {
try { // unbind even on timeout, just in case
mActivityManager.unbindBackupAgent(request.appInfo);
@@ -1327,7 +1327,7 @@
private int processOneBackup(BackupRequest request, IBackupAgent agent,
IBackupTransport transport) {
final String packageName = request.appInfo.packageName;
- if (DEBUG) Log.d(TAG, "processOneBackup doBackup() on " + packageName);
+ if (DEBUG) Slog.d(TAG, "processOneBackup doBackup() on " + packageName);
File savedStateName = new File(mStateDir, packageName);
File backupDataName = new File(mDataDir, packageName + ".data");
@@ -1381,9 +1381,9 @@
}
logBackupComplete(packageName);
- if (DEBUG) Log.v(TAG, "doBackup() success");
+ if (DEBUG) Slog.v(TAG, "doBackup() success");
} catch (Exception e) {
- Log.e(TAG, "Error backing up " + packageName, e);
+ Slog.e(TAG, "Error backing up " + packageName, e);
EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName, e.toString());
backupDataName.delete();
newStateName.delete();
@@ -1418,7 +1418,7 @@
result = transport.finishBackup();
}
} else {
- if (DEBUG) Log.i(TAG, "no backup data written; not calling transport");
+ if (DEBUG) Slog.i(TAG, "no backup data written; not calling transport");
}
// After successful transport, delete the now-stale data
@@ -1432,7 +1432,7 @@
EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, packageName);
}
} catch (Exception e) {
- Log.e(TAG, "Transport error backing up " + packageName, e);
+ Slog.e(TAG, "Transport error backing up " + packageName, e);
EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, packageName);
result = BackupConstants.TRANSPORT_ERROR;
} finally {
@@ -1453,14 +1453,14 @@
// partition will be signed with the device's platform certificate, so on
// different phones the same system app will have different signatures.)
if ((target.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
- if (DEBUG) Log.v(TAG, "System app " + target.packageName + " - skipping sig check");
+ if (DEBUG) Slog.v(TAG, "System app " + target.packageName + " - skipping sig check");
return true;
}
// Allow unsigned apps, but not signed on one device and unsigned on the other
// !!! TODO: is this the right policy?
Signature[] deviceSigs = target.signatures;
- if (DEBUG) Log.v(TAG, "signaturesMatch(): stored=" + storedSigs
+ if (DEBUG) Slog.v(TAG, "signaturesMatch(): stored=" + storedSigs
+ " device=" + deviceSigs);
if ((storedSigs == null || storedSigs.length == 0)
&& (deviceSigs == null || deviceSigs.length == 0)) {
@@ -1526,7 +1526,7 @@
public void run() {
long startRealtime = SystemClock.elapsedRealtime();
- if (DEBUG) Log.v(TAG, "Beginning restore process mTransport=" + mTransport
+ if (DEBUG) Slog.v(TAG, "Beginning restore process mTransport=" + mTransport
+ " mObserver=" + mObserver + " mToken=" + Long.toHexString(mToken)
+ " mTargetPackage=" + mTargetPackage + " mPmToken=" + mPmToken);
@@ -1560,30 +1560,30 @@
// its startRestore() runs?
mObserver.restoreStarting(restorePackages.size());
} catch (RemoteException e) {
- Log.d(TAG, "Restore observer died at restoreStarting");
+ Slog.d(TAG, "Restore observer died at restoreStarting");
mObserver = null;
}
}
if (mTransport.startRestore(mToken, restorePackages.toArray(new PackageInfo[0])) !=
BackupConstants.TRANSPORT_OK) {
- Log.e(TAG, "Error starting restore operation");
+ Slog.e(TAG, "Error starting restore operation");
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
return;
}
String packageName = mTransport.nextRestorePackage();
if (packageName == null) {
- Log.e(TAG, "Error getting first restore package");
+ Slog.e(TAG, "Error getting first restore package");
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
return;
} else if (packageName.equals("")) {
- Log.i(TAG, "No restore data available");
+ Slog.i(TAG, "No restore data available");
int millis = (int) (SystemClock.elapsedRealtime() - startRealtime);
EventLog.writeEvent(EventLogTags.RESTORE_SUCCESS, 0, millis);
return;
} else if (!packageName.equals(PACKAGE_MANAGER_SENTINEL)) {
- Log.e(TAG, "Expected restore data for \"" + PACKAGE_MANAGER_SENTINEL
+ Slog.e(TAG, "Expected restore data for \"" + PACKAGE_MANAGER_SENTINEL
+ "\", found only \"" + packageName + "\"");
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, PACKAGE_MANAGER_SENTINEL,
"Package manager data missing");
@@ -1599,7 +1599,7 @@
// signature/version verification etc, so we simply do not proceed with
// the restore operation.
if (!pmAgent.hasMetadata()) {
- Log.e(TAG, "No restore metadata available, so not restoring settings");
+ Slog.e(TAG, "No restore metadata available, so not restoring settings");
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, PACKAGE_MANAGER_SENTINEL,
"Package manager restore metadata missing");
return;
@@ -1610,11 +1610,11 @@
packageName = mTransport.nextRestorePackage();
if (packageName == null) {
- Log.e(TAG, "Error getting next restore package");
+ Slog.e(TAG, "Error getting next restore package");
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
return;
} else if (packageName.equals("")) {
- if (DEBUG) Log.v(TAG, "No next package, finishing restore");
+ if (DEBUG) Slog.v(TAG, "No next package, finishing restore");
break;
}
@@ -1622,14 +1622,14 @@
try {
mObserver.onUpdate(count);
} catch (RemoteException e) {
- Log.d(TAG, "Restore observer died in onUpdate");
+ Slog.d(TAG, "Restore observer died in onUpdate");
mObserver = null;
}
}
Metadata metaInfo = pmAgent.getRestoredMetadata(packageName);
if (metaInfo == null) {
- Log.e(TAG, "Missing metadata for " + packageName);
+ Slog.e(TAG, "Missing metadata for " + packageName);
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName,
"Package metadata missing");
continue;
@@ -1640,28 +1640,39 @@
int flags = PackageManager.GET_SIGNATURES;
packageInfo = mPackageManager.getPackageInfo(packageName, flags);
} catch (NameNotFoundException e) {
- Log.e(TAG, "Invalid package restoring data", e);
+ Slog.e(TAG, "Invalid package restoring data", e);
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName,
"Package missing on device");
continue;
}
if (metaInfo.versionCode > packageInfo.versionCode) {
- String message = "Version " + metaInfo.versionCode
- + " > installed version " + packageInfo.versionCode;
- Log.w(TAG, "Package " + packageName + ": " + message);
- EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName, message);
- continue;
+ // Data is from a "newer" version of the app than we have currently
+ // installed. If the app has not declared that it is prepared to
+ // handle this case, we do not attempt the restore.
+ if ((packageInfo.applicationInfo.flags
+ & ApplicationInfo.FLAG_RESTORE_ANY_VERSION) == 0) {
+ String message = "Version " + metaInfo.versionCode
+ + " > installed version " + packageInfo.versionCode;
+ Slog.w(TAG, "Package " + packageName + ": " + message);
+ EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE,
+ packageName, message);
+ continue;
+ } else {
+ if (DEBUG) Slog.v(TAG, "Version " + metaInfo.versionCode
+ + " > installed " + packageInfo.versionCode
+ + " but restoreAnyVersion");
+ }
}
if (!signaturesMatch(metaInfo.signatures, packageInfo)) {
- Log.w(TAG, "Signature mismatch restoring " + packageName);
+ Slog.w(TAG, "Signature mismatch restoring " + packageName);
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName,
"Signature mismatch");
continue;
}
- if (DEBUG) Log.v(TAG, "Package " + packageName
+ if (DEBUG) Slog.v(TAG, "Package " + packageName
+ " restore version [" + metaInfo.versionCode
+ "] is compatible with installed version ["
+ packageInfo.versionCode + "]");
@@ -1671,14 +1682,14 @@
boolean useRealApp = (packageInfo.applicationInfo.flags
& ApplicationInfo.FLAG_RESTORE_NEEDS_APPLICATION) != 0;
if (DEBUG && useRealApp) {
- Log.v(TAG, "agent requires real Application subclass for restore");
+ Slog.v(TAG, "agent requires real Application subclass for restore");
}
IBackupAgent agent = bindToAgentSynchronous(
packageInfo.applicationInfo,
(useRealApp ? IApplicationThread.BACKUP_MODE_INCREMENTAL
: IApplicationThread.BACKUP_MODE_RESTORE));
if (agent == null) {
- Log.w(TAG, "Can't find backup agent for " + packageName);
+ Slog.w(TAG, "Can't find backup agent for " + packageName);
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName,
"Restore agent missing");
continue;
@@ -1695,10 +1706,12 @@
// The agent was probably running with a stub Application object,
// which isn't a valid run mode for the main app logic. Shut
// down the app so that next time it's launched, it gets the
- // usual full initialization.
- if ((packageInfo.applicationInfo.flags
+ // usual full initialization. Note that this is only done for
+ // full-system restores: when a single app has requested a restore,
+ // it is explicitly not killed following that operation.
+ if (mTargetPackage == null && (packageInfo.applicationInfo.flags
& ApplicationInfo.FLAG_KILL_AFTER_RESTORE) != 0) {
- if (DEBUG) Log.d(TAG, "Restore complete, killing host process of "
+ if (DEBUG) Slog.d(TAG, "Restore complete, killing host process of "
+ packageInfo.applicationInfo.processName);
mActivityManager.killApplicationProcess(
packageInfo.applicationInfo.processName,
@@ -1712,21 +1725,21 @@
int millis = (int) (SystemClock.elapsedRealtime() - startRealtime);
EventLog.writeEvent(EventLogTags.RESTORE_SUCCESS, count, millis);
} catch (Exception e) {
- Log.e(TAG, "Error in restore thread", e);
+ Slog.e(TAG, "Error in restore thread", e);
} finally {
- if (DEBUG) Log.d(TAG, "finishing restore mObserver=" + mObserver);
+ if (DEBUG) Slog.d(TAG, "finishing restore mObserver=" + mObserver);
try {
mTransport.finishRestore();
} catch (RemoteException e) {
- Log.e(TAG, "Error finishing restore", e);
+ Slog.e(TAG, "Error finishing restore", e);
}
if (mObserver != null) {
try {
mObserver.restoreFinished(error);
} catch (RemoteException e) {
- Log.d(TAG, "Restore observer died at restoreFinished");
+ Slog.d(TAG, "Restore observer died at restoreFinished");
}
}
@@ -1742,7 +1755,7 @@
// We must under all circumstances tell the Package Manager to
// proceed with install notifications if it's waiting for us.
if (mPmToken > 0) {
- if (DEBUG) Log.v(TAG, "finishing PM token " + mPmToken);
+ if (DEBUG) Slog.v(TAG, "finishing PM token " + mPmToken);
try {
mPackageManagerBinder.finishPackageInstall(mPmToken);
} catch (RemoteException e) { /* can't happen */ }
@@ -1758,7 +1771,7 @@
// !!! TODO: actually run the restore through mTransport
final String packageName = app.packageName;
- if (DEBUG) Log.d(TAG, "processOneRestore packageName=" + packageName);
+ if (DEBUG) Slog.d(TAG, "processOneRestore packageName=" + packageName);
// !!! TODO: get the dirs from the transport
File backupDataName = new File(mDataDir, packageName + ".restore");
@@ -1777,7 +1790,7 @@
ParcelFileDescriptor.MODE_TRUNCATE);
if (mTransport.getRestoreData(backupData) != BackupConstants.TRANSPORT_OK) {
- Log.e(TAG, "Error getting restore data for " + packageName);
+ Slog.e(TAG, "Error getting restore data for " + packageName);
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
return;
}
@@ -1820,7 +1833,7 @@
int size = (int) backupDataName.length();
EventLog.writeEvent(EventLogTags.RESTORE_PACKAGE, packageName, size);
} catch (Exception e) {
- Log.e(TAG, "Error restoring data for " + packageName, e);
+ Slog.e(TAG, "Error restoring data for " + packageName, e);
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName, e.toString());
// If the agent fails restore, it might have put the app's data
@@ -1884,11 +1897,11 @@
for (String transportName : mQueue) {
IBackupTransport transport = getTransport(transportName);
if (transport == null) {
- Log.e(TAG, "Requested init for " + transportName + " but not found");
+ Slog.e(TAG, "Requested init for " + transportName + " but not found");
continue;
}
- Log.i(TAG, "Initializing (wiping) backup transport storage: " + transportName);
+ Slog.i(TAG, "Initializing (wiping) backup transport storage: " + transportName);
EventLog.writeEvent(EventLogTags.BACKUP_START, transport.transportDirName());
long startRealtime = SystemClock.elapsedRealtime();
int status = transport.initializeDevice();
@@ -1899,7 +1912,7 @@
// Okay, the wipe really happened. Clean up our local bookkeeping.
if (status == BackupConstants.TRANSPORT_OK) {
- Log.i(TAG, "Device init successful");
+ Slog.i(TAG, "Device init successful");
int millis = (int) (SystemClock.elapsedRealtime() - startRealtime);
EventLog.writeEvent(EventLogTags.BACKUP_INITIALIZE);
resetBackupState(new File(mBaseStateDir, transport.transportDirName()));
@@ -1910,14 +1923,14 @@
} else {
// If this didn't work, requeue this one and try again
// after a suitable interval
- Log.e(TAG, "Transport error in initializeDevice()");
+ Slog.e(TAG, "Transport error in initializeDevice()");
EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, "(initialize)");
synchronized (mQueueLock) {
recordInitPendingLocked(true, transportName);
}
// do this via another alarm to make sure of the wakelock states
long delay = transport.requestBackupTime();
- if (DEBUG) Log.w(TAG, "init failed on "
+ if (DEBUG) Slog.w(TAG, "init failed on "
+ transportName + " resched in " + delay);
mAlarmManager.set(AlarmManager.RTC_WAKEUP,
System.currentTimeMillis() + delay, mRunInitIntent);
@@ -1926,7 +1939,7 @@
} catch (RemoteException e) {
// can't happen; the transports are local
} catch (Exception e) {
- Log.e(TAG, "Unexpected error performing init", e);
+ Slog.e(TAG, "Unexpected error performing init", e);
} finally {
// Done; release the wakelock
mWakelock.release();
@@ -1979,9 +1992,9 @@
if (DEBUG) {
int numKeys = mPendingBackups.size();
- Log.d(TAG, "Now awaiting backup for " + numKeys + " participants:");
+ Slog.d(TAG, "Now awaiting backup for " + numKeys + " participants:");
for (BackupRequest b : mPendingBackups.values()) {
- Log.d(TAG, " + " + b + " agent=" + b.appInfo.backupAgentName);
+ Slog.d(TAG, " + " + b + " agent=" + b.appInfo.backupAgentName);
}
}
}
@@ -1989,7 +2002,7 @@
}
}
} else {
- Log.w(TAG, "dataChanged but no participant pkg='" + packageName + "'"
+ Slog.w(TAG, "dataChanged but no participant pkg='" + packageName + "'"
+ " uid=" + Binder.getCallingUid());
}
}
@@ -2002,7 +2015,7 @@
out.seek(out.length());
out.writeUTF(str);
} catch (IOException e) {
- Log.e(TAG, "Can't write " + str + " to backup journal", e);
+ Slog.e(TAG, "Can't write " + str + " to backup journal", e);
mJournal = null;
} finally {
try { if (out != null) out.close(); } catch (IOException e) {}
@@ -2011,12 +2024,12 @@
// Clear the given package's backup data from the current transport
public void clearBackupData(String packageName) {
- if (DEBUG) Log.v(TAG, "clearBackupData() of " + packageName);
+ if (DEBUG) Slog.v(TAG, "clearBackupData() of " + packageName);
PackageInfo info;
try {
info = mPackageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES);
} catch (NameNotFoundException e) {
- Log.d(TAG, "No such package '" + packageName + "' - not clearing backup data");
+ Slog.d(TAG, "No such package '" + packageName + "' - not clearing backup data");
return;
}
@@ -2029,7 +2042,7 @@
} else {
// a caller with full permission can ask to back up any participating app
// !!! TODO: allow data-clear of ANY app?
- if (DEBUG) Log.v(TAG, "Privileged caller, allowing clear of other apps");
+ if (DEBUG) Slog.v(TAG, "Privileged caller, allowing clear of other apps");
apps = new HashSet<ApplicationInfo>();
int N = mBackupParticipants.size();
for (int i = 0; i < N; i++) {
@@ -2043,7 +2056,7 @@
// now find the given package in the set of candidate apps
for (ApplicationInfo app : apps) {
if (app.packageName.equals(packageName)) {
- if (DEBUG) Log.v(TAG, "Found the app - running clear process");
+ if (DEBUG) Slog.v(TAG, "Found the app - running clear process");
// found it; fire off the clear request
synchronized (mQueueLock) {
long oldId = Binder.clearCallingIdentity();
@@ -2063,7 +2076,7 @@
public void backupNow() {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, "backupNow");
- if (DEBUG) Log.v(TAG, "Scheduling immediate backup pass");
+ if (DEBUG) Slog.v(TAG, "Scheduling immediate backup pass");
synchronized (mQueueLock) {
// Because the alarms we are using can jitter, and we want an *immediate*
// backup pass to happen, we restart the timer beginning with "next time,"
@@ -2073,7 +2086,7 @@
mRunBackupIntent.send();
} catch (PendingIntent.CanceledException e) {
// should never happen
- Log.e(TAG, "run-backup intent cancelled!");
+ Slog.e(TAG, "run-backup intent cancelled!");
}
}
}
@@ -2083,7 +2096,7 @@
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"setBackupEnabled");
- Log.i(TAG, "Backup enabled => " + enable);
+ Slog.i(TAG, "Backup enabled => " + enable);
boolean wasEnabled = mEnabled;
synchronized (this) {
@@ -2098,7 +2111,7 @@
startBackupAlarmsLocked(BACKUP_INTERVAL);
} else if (!enable) {
// No longer enabled, so stop running backups
- if (DEBUG) Log.i(TAG, "Opting out of backup");
+ if (DEBUG) Slog.i(TAG, "Opting out of backup");
mAlarmManager.cancel(mRunBackupIntent);
@@ -2128,7 +2141,7 @@
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"setBackupEnabled");
- Log.i(TAG, "Auto restore => " + doAutoRestore);
+ Slog.i(TAG, "Auto restore => " + doAutoRestore);
synchronized (this) {
Settings.Secure.putInt(mContext.getContentResolver(),
@@ -2155,7 +2168,7 @@
startBackupAlarmsLocked(FIRST_BACKUP_INTERVAL);
} else if (!available) {
// No longer enabled, so stop running backups
- Log.w(TAG, "Backup service no longer provisioned");
+ Slog.w(TAG, "Backup service no longer provisioned");
mAlarmManager.cancel(mRunBackupIntent);
}
}
@@ -2184,7 +2197,7 @@
public String getCurrentTransport() {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"getCurrentTransport");
- if (DEBUG) Log.v(TAG, "... getCurrentTransport() returning " + mCurrentTransport);
+ if (DEBUG) Slog.v(TAG, "... getCurrentTransport() returning " + mCurrentTransport);
return mCurrentTransport;
}
@@ -2220,10 +2233,10 @@
mCurrentTransport = transport;
Settings.Secure.putString(mContext.getContentResolver(),
Settings.Secure.BACKUP_TRANSPORT, transport);
- Log.v(TAG, "selectBackupTransport() set " + mCurrentTransport
+ Slog.v(TAG, "selectBackupTransport() set " + mCurrentTransport
+ " returning " + prevTransport);
} else {
- Log.w(TAG, "Attempt to select unavailable transport " + transport);
+ Slog.w(TAG, "Attempt to select unavailable transport " + transport);
}
return prevTransport;
}
@@ -2234,12 +2247,12 @@
public void agentConnected(String packageName, IBinder agentBinder) {
synchronized(mAgentConnectLock) {
if (Binder.getCallingUid() == Process.SYSTEM_UID) {
- Log.d(TAG, "agentConnected pkg=" + packageName + " agent=" + agentBinder);
+ Slog.d(TAG, "agentConnected pkg=" + packageName + " agent=" + agentBinder);
IBackupAgent agent = IBackupAgent.Stub.asInterface(agentBinder);
mConnectedAgent = agent;
mConnecting = false;
} else {
- Log.w(TAG, "Non-system process uid=" + Binder.getCallingUid()
+ Slog.w(TAG, "Non-system process uid=" + Binder.getCallingUid()
+ " claiming agent connected");
}
mAgentConnectLock.notifyAll();
@@ -2256,7 +2269,7 @@
mConnectedAgent = null;
mConnecting = false;
} else {
- Log.w(TAG, "Non-system process uid=" + Binder.getCallingUid()
+ Slog.w(TAG, "Non-system process uid=" + Binder.getCallingUid()
+ " claiming agent disconnected");
}
mAgentConnectLock.notifyAll();
@@ -2267,16 +2280,16 @@
// will need to be told when the restore is finished.
public void restoreAtInstall(String packageName, int token) {
if (Binder.getCallingUid() != Process.SYSTEM_UID) {
- Log.w(TAG, "Non-system process uid=" + Binder.getCallingUid()
+ Slog.w(TAG, "Non-system process uid=" + Binder.getCallingUid()
+ " attemping install-time restore");
return;
}
long restoreSet = getAvailableRestoreToken(packageName);
- if (DEBUG) Log.v(TAG, "restoreAtInstall pkg=" + packageName
+ if (DEBUG) Slog.v(TAG, "restoreAtInstall pkg=" + packageName
+ " token=" + Integer.toHexString(token));
- if (restoreSet != 0) {
+ if (mAutoRestore && mProvisioned && restoreSet != 0) {
// okay, we're going to attempt a restore of this package from this restore set.
// The eventual message back into the Package Manager to run the post-install
// steps for 'token' will be issued from the restore handling code.
@@ -2293,9 +2306,9 @@
restoreSet, pkg, token);
mBackupHandler.sendMessage(msg);
} else {
- // No way to attempt a restore; just tell the Package Manager to proceed
- // with the post-install handling for this package.
- if (DEBUG) Log.v(TAG, "No restore set -- skipping restore");
+ // Auto-restore disabled or no way to attempt a restore; just tell the Package
+ // Manager to proceed with the post-install handling for this package.
+ if (DEBUG) Slog.v(TAG, "No restore set -- skipping restore");
try {
mPackageManagerBinder.finishPackageInstall(token);
} catch (RemoteException e) { /* can't happen */ }
@@ -2308,7 +2321,7 @@
synchronized(this) {
if (mActiveRestoreSession != null) {
- Log.d(TAG, "Restore session requested but one already active");
+ Slog.d(TAG, "Restore session requested but one already active");
return null;
}
mActiveRestoreSession = new ActiveRestoreSession(transport);
@@ -2320,7 +2333,7 @@
// completed the given outstanding asynchronous backup/restore operation.
public void opComplete(int token) {
synchronized (mCurrentOpLock) {
- if (DEBUG) Log.v(TAG, "opComplete: " + Integer.toHexString(token));
+ if (DEBUG) Slog.v(TAG, "opComplete: " + Integer.toHexString(token));
mCurrentOperations.put(token, OP_ACKNOWLEDGED);
mCurrentOpLock.notifyAll();
}
@@ -2346,7 +2359,7 @@
long oldId = Binder.clearCallingIdentity();
try {
if (mRestoreTransport == null) {
- Log.w(TAG, "Null transport getting restore sets");
+ Slog.w(TAG, "Null transport getting restore sets");
return null;
}
if (mRestoreSets == null) { // valid transport; do the one-time fetch
@@ -2355,7 +2368,7 @@
}
return mRestoreSets;
} catch (Exception e) {
- Log.e(TAG, "Error in getAvailableRestoreSets", e);
+ Slog.e(TAG, "Error in getAvailableRestoreSets", e);
return null;
} finally {
Binder.restoreCallingIdentity(oldId);
@@ -2366,11 +2379,11 @@
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"performRestore");
- if (DEBUG) Log.d(TAG, "performRestore token=" + Long.toHexString(token)
+ if (DEBUG) Slog.d(TAG, "performRestore token=" + Long.toHexString(token)
+ " observer=" + observer);
if (mRestoreTransport == null || mRestoreSets == null) {
- Log.e(TAG, "Ignoring performRestore() with no restore set");
+ Slog.e(TAG, "Ignoring performRestore() with no restore set");
return -1;
}
@@ -2388,18 +2401,18 @@
}
}
- Log.w(TAG, "Restore token " + Long.toHexString(token) + " not found");
+ Slog.w(TAG, "Restore token " + Long.toHexString(token) + " not found");
return -1;
}
public synchronized int restorePackage(String packageName, IRestoreObserver observer) {
- if (DEBUG) Log.v(TAG, "restorePackage pkg=" + packageName + " obs=" + observer);
+ if (DEBUG) Slog.v(TAG, "restorePackage pkg=" + packageName + " obs=" + observer);
PackageInfo app = null;
try {
app = mPackageManager.getPackageInfo(packageName, 0);
} catch (NameNotFoundException nnf) {
- Log.w(TAG, "Asked to restore nonexistent pkg " + packageName);
+ Slog.w(TAG, "Asked to restore nonexistent pkg " + packageName);
return -1;
}
@@ -2409,11 +2422,17 @@
Binder.getCallingPid(), Binder.getCallingUid());
if ((perm == PackageManager.PERMISSION_DENIED) &&
(app.applicationInfo.uid != Binder.getCallingUid())) {
- Log.w(TAG, "restorePackage: bad packageName=" + packageName
+ Slog.w(TAG, "restorePackage: bad packageName=" + packageName
+ " or calling uid=" + Binder.getCallingUid());
throw new SecurityException("No permission to restore other packages");
}
+ // If the package has no backup agent, we obviously cannot proceed
+ if (app.applicationInfo.backupAgentName == null) {
+ Slog.w(TAG, "Asked to restore package " + packageName + " with no agent");
+ return -1;
+ }
+
// So far so good; we're allowed to try to restore this package. Now
// check whether there is data for it in the current dataset, falling back
// to the ancestral dataset if not.
@@ -2440,14 +2459,14 @@
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"endRestoreSession");
- if (DEBUG) Log.d(TAG, "endRestoreSession");
+ if (DEBUG) Slog.d(TAG, "endRestoreSession");
synchronized (this) {
long oldId = Binder.clearCallingIdentity();
try {
if (mRestoreTransport != null) mRestoreTransport.finishRestore();
} catch (Exception e) {
- Log.e(TAG, "Error in finishRestore", e);
+ Slog.e(TAG, "Error in finishRestore", e);
} finally {
mRestoreTransport = null;
Binder.restoreCallingIdentity(oldId);
@@ -2458,7 +2477,7 @@
if (BackupManagerService.this.mActiveRestoreSession == this) {
BackupManagerService.this.mActiveRestoreSession = null;
} else {
- Log.e(TAG, "ending non-current restore session");
+ Slog.e(TAG, "ending non-current restore session");
}
}
}
@@ -2471,6 +2490,7 @@
pw.println("Backup Manager is " + (mEnabled ? "enabled" : "disabled")
+ " / " + (!mProvisioned ? "not " : "") + "provisioned / "
+ (this.mPendingInits.size() == 0 ? "not " : "") + "pending init");
+ pw.println("Auto-restore is " + (mAutoRestore ? "enabled" : "disabled"));
pw.println("Last backup pass: " + mLastBackupPass
+ " (now = " + System.currentTimeMillis() + ')');
pw.println(" next scheduled: " + mNextBackupPass);
@@ -2484,7 +2504,7 @@
pw.println(" " + f.getName() + " - " + f.length() + " state bytes");
}
} catch (RemoteException e) {
- Log.e(TAG, "Error in transportDirName()", e);
+ Slog.e(TAG, "Error in transportDirName()", e);
pw.println(" Error: " + e);
}
}
diff --git a/services/java/com/android/server/BatteryService.java b/services/java/com/android/server/BatteryService.java
index dc41ff9..57944fb 100644
--- a/services/java/com/android/server/BatteryService.java
+++ b/services/java/com/android/server/BatteryService.java
@@ -34,7 +34,7 @@
import android.os.UEventObserver;
import android.provider.Settings;
import android.util.EventLog;
-import android.util.Log;
+import android.util.Slog;
import java.io.File;
import java.io.FileDescriptor;
@@ -349,7 +349,7 @@
intent.putExtra(BatteryManager.EXTRA_TECHNOLOGY, mBatteryTechnology);
if (false) {
- Log.d(TAG, "updateBattery level:" + mBatteryLevel +
+ Slog.d(TAG, "updateBattery level:" + mBatteryLevel +
" scale:" + BATTERY_SCALE + " status:" + mBatteryStatus +
" health:" + mBatteryHealth + " present:" + mBatteryPresent +
" voltage: " + mBatteryVoltage +
@@ -381,20 +381,20 @@
// add dump file to drop box
db.addFile("BATTERY_DISCHARGE_INFO", dumpFile, DropBoxManager.IS_TEXT);
} catch (RemoteException e) {
- Log.e(TAG, "failed to dump battery service", e);
+ Slog.e(TAG, "failed to dump battery service", e);
} catch (IOException e) {
- Log.e(TAG, "failed to write dumpsys file", e);
+ Slog.e(TAG, "failed to write dumpsys file", e);
} finally {
// make sure we clean up
if (dumpStream != null) {
try {
dumpStream.close();
} catch (IOException e) {
- Log.e(TAG, "failed to close dumpsys output stream");
+ Slog.e(TAG, "failed to close dumpsys output stream");
}
}
if (dumpFile != null && !dumpFile.delete()) {
- Log.e(TAG, "failed to delete temporary dumpsys file: "
+ Slog.e(TAG, "failed to delete temporary dumpsys file: "
+ dumpFile.getAbsolutePath());
}
}
@@ -416,12 +416,12 @@
// If the discharge cycle is bad enough we want to know about it.
logBatteryStats();
}
- if (LOCAL_LOGV) Log.v(TAG, "duration threshold: " + durationThreshold +
+ if (LOCAL_LOGV) Slog.v(TAG, "duration threshold: " + durationThreshold +
" discharge threshold: " + dischargeThreshold);
- if (LOCAL_LOGV) Log.v(TAG, "duration: " + duration + " discharge: " +
+ if (LOCAL_LOGV) Slog.v(TAG, "duration: " + duration + " discharge: " +
(mDischargeStartLevel - mBatteryLevel));
} catch (NumberFormatException e) {
- Log.e(TAG, "Invalid DischargeThresholds GService string: " +
+ Slog.e(TAG, "Invalid DischargeThresholds GService string: " +
durationThresholdString + " or " + dischargeThresholdString);
return;
}
diff --git a/services/java/com/android/server/BootReceiver.java b/services/java/com/android/server/BootReceiver.java
index 5c1af7e..eeb91fa 100644
--- a/services/java/com/android/server/BootReceiver.java
+++ b/services/java/com/android/server/BootReceiver.java
@@ -28,7 +28,7 @@
import android.os.RecoverySystem;
import android.os.SystemProperties;
import android.provider.Settings;
-import android.util.Log;
+import android.util.Slog;
import java.io.File;
import java.io.IOException;
@@ -53,13 +53,13 @@
try {
logBootEvents(context);
} catch (Exception e) {
- Log.e(TAG, "Can't log boot events", e);
+ Slog.e(TAG, "Can't log boot events", e);
}
try {
RecoverySystem.handleAftermath();
} catch (Exception e) {
- Log.e(TAG, "Can't handle recovery aftermath", e);
+ Slog.e(TAG, "Can't handle recovery aftermath", e);
}
try {
@@ -70,7 +70,7 @@
context.startService(loadavg);
}
} catch (Exception e) {
- Log.e(TAG, "Can't start load average service", e);
+ Slog.e(TAG, "Can't start load average service", e);
}
}
@@ -122,7 +122,7 @@
String filename = new File(TOMBSTONE_DIR, path).getPath();
addFileToDropBox(db, prefs, props, filename, LOG_SIZE, "SYSTEM_TOMBSTONE");
} catch (IOException e) {
- Log.e(TAG, "Can't log tombstone", e);
+ Slog.e(TAG, "Can't log tombstone", e);
}
}
};
@@ -133,7 +133,7 @@
private static void addFileToDropBox(
DropBoxManager db, SharedPreferences prefs,
String headers, String filename, int maxSize, String tag) throws IOException {
- if (!db.isTagEnabled(tag)) return; // Logging disabled
+ if (!db.isTagEnabled(tag)) return; // Slog.ing disabled
File file = new File(filename);
long fileTime = file.lastModified();
@@ -146,6 +146,6 @@
StringBuilder report = new StringBuilder(headers).append("\n");
report.append(FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"));
db.addText(tag, report.toString());
- Log.i(TAG, "Logging " + filename + " to DropBox (" + tag + ")");
+ Slog.i(TAG, "Slog.ing " + filename + " to DropBox (" + tag + ")");
}
}
diff --git a/services/java/com/android/server/BrickReceiver.java b/services/java/com/android/server/BrickReceiver.java
index 6c4db0d..cff3805 100644
--- a/services/java/com/android/server/BrickReceiver.java
+++ b/services/java/com/android/server/BrickReceiver.java
@@ -20,12 +20,12 @@
import android.content.Intent;
import android.content.BroadcastReceiver;
import android.os.SystemService;
-import android.util.Log;
+import android.util.Slog;
public class BrickReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
- Log.w("BrickReceiver", "!!! BRICKING DEVICE !!!");
+ Slog.w("BrickReceiver", "!!! BRICKING DEVICE !!!");
SystemService.start("brick");
}
}
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 108246d..67b6200 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -39,7 +39,7 @@
import android.provider.Settings;
import android.text.TextUtils;
import android.util.EventLog;
-import android.util.Log;
+import android.util.Slog;
import com.android.internal.telephony.Phone;
@@ -66,6 +66,7 @@
private Tethering mTethering;
+ private boolean mTetheringConfigValid = false;
/**
* Sometimes we want to refer to the individual network state
@@ -168,7 +169,7 @@
// Wait until sServiceInstance has been initialized.
thread.wait();
} catch (InterruptedException ignore) {
- Log.e(TAG,
+ Slog.e(TAG,
"Unexpected InterruptedException while waiting"+
" for ConnectivityService thread");
}
@@ -184,7 +185,7 @@
}
private ConnectivityService(Context context) {
- if (DBG) Log.v(TAG, "ConnectivityService starting up");
+ if (DBG) Slog.v(TAG, "ConnectivityService starting up");
// setup our unique device name
String id = Settings.Secure.getString(context.getContentResolver(),
@@ -210,11 +211,11 @@
for (String raString : raStrings) {
RadioAttributes r = new RadioAttributes(raString);
if (r.mType > ConnectivityManager.MAX_RADIO_TYPE) {
- Log.e(TAG, "Error in radioAttributes - ignoring attempt to define type " + r.mType);
+ Slog.e(TAG, "Error in radioAttributes - ignoring attempt to define type " + r.mType);
continue;
}
if (mRadioAttributes[r.mType] != null) {
- Log.e(TAG, "Error in radioAttributes - ignoring attempt to redefine type " +
+ Slog.e(TAG, "Error in radioAttributes - ignoring attempt to redefine type " +
r.mType);
continue;
}
@@ -227,17 +228,17 @@
try {
NetworkAttributes n = new NetworkAttributes(naString);
if (n.mType > ConnectivityManager.MAX_NETWORK_TYPE) {
- Log.e(TAG, "Error in networkAttributes - ignoring attempt to define type " +
+ Slog.e(TAG, "Error in networkAttributes - ignoring attempt to define type " +
n.mType);
continue;
}
if (mNetAttributes[n.mType] != null) {
- Log.e(TAG, "Error in networkAttributes - ignoring attempt to redefine type " +
+ Slog.e(TAG, "Error in networkAttributes - ignoring attempt to redefine type " +
n.mType);
continue;
}
if (mRadioAttributes[n.mRadio] == null) {
- Log.e(TAG, "Error in networkAttributes - ignoring attempt to use undefined " +
+ Slog.e(TAG, "Error in networkAttributes - ignoring attempt to use undefined " +
"radio " + n.mRadio + " in network type " + n.mType);
continue;
}
@@ -289,10 +290,11 @@
* the number of different network types is not going
* to change very often.
*/
+ boolean noMobileData = !getMobileDataEnabled();
for (int netType : mPriorityList) {
switch (mNetAttributes[netType].mRadio) {
case ConnectivityManager.TYPE_WIFI:
- if (DBG) Log.v(TAG, "Starting Wifi Service.");
+ if (DBG) Slog.v(TAG, "Starting Wifi Service.");
WifiStateTracker wst = new WifiStateTracker(context, mHandler);
WifiService wifiService = new WifiService(context, wst);
ServiceManager.addService(Context.WIFI_SERVICE, wifiService);
@@ -306,15 +308,25 @@
mNetTrackers[netType] = new MobileDataStateTracker(context, mHandler,
netType, mNetAttributes[netType].mName);
mNetTrackers[netType].startMonitoring();
+ if (noMobileData) {
+ if (DBG) Slog.d(TAG, "tearing down Mobile networks due to setting");
+ mNetTrackers[netType].teardown();
+ }
break;
default:
- Log.e(TAG, "Trying to create a DataStateTracker for an unknown radio type " +
+ Slog.e(TAG, "Trying to create a DataStateTracker for an unknown radio type " +
mNetAttributes[netType].mRadio);
continue;
}
}
mTethering = new Tethering(mContext);
+ mTetheringConfigValid = (((mNetTrackers[ConnectivityManager.TYPE_MOBILE_DUN] != null) ||
+ !mTethering.isDunRequired()) &&
+ (mTethering.getTetherableUsbRegexs().length != 0 ||
+ mTethering.getTetherableWifiRegexs().length != 0) &&
+ mTethering.getUpstreamIfaceRegexs().length != 0);
+
}
@@ -376,7 +388,7 @@
if (t != mNetworkPreference && mNetTrackers[t] != null &&
mNetTrackers[t].getNetworkInfo().isConnected()) {
if (DBG) {
- Log.d(TAG, "tearing down " +
+ Slog.d(TAG, "tearing down " +
mNetTrackers[t].getNetworkInfo() +
" in enforcePreference");
}
@@ -410,7 +422,7 @@
NetworkStateTracker t = mNetTrackers[type];
NetworkInfo info = t.getNetworkInfo();
if (info.isConnected()) {
- if (DBG && type != mActiveDefaultNetwork) Log.e(TAG,
+ if (DBG && type != mActiveDefaultNetwork) Slog.e(TAG,
"connected default network is not " +
"mActiveDefaultNetwork!");
return info;
@@ -493,14 +505,14 @@
}
public void binderDied() {
- Log.d(TAG, "ConnectivityService FeatureUser binderDied(" +
+ Slog.d(TAG, "ConnectivityService FeatureUser binderDied(" +
mNetworkType + ", " + mFeature + ", " + mBinder + "), created " +
(System.currentTimeMillis() - mCreateTime) + " mSec ago");
stopUsingNetworkFeature(this, false);
}
public void expire() {
- Log.d(TAG, "ConnectivityService FeatureUser expire(" +
+ Slog.d(TAG, "ConnectivityService FeatureUser expire(" +
mNetworkType + ", " + mFeature + ", " + mBinder +"), created " +
(System.currentTimeMillis() - mCreateTime) + " mSec ago");
stopUsingNetworkFeature(this, false);
@@ -516,7 +528,7 @@
public int startUsingNetworkFeature(int networkType, String feature,
IBinder binder) {
if (DBG) {
- Log.d(TAG, "startUsingNetworkFeature for net " + networkType +
+ Slog.d(TAG, "startUsingNetworkFeature for net " + networkType +
": " + feature);
}
enforceChangePermission();
@@ -530,6 +542,10 @@
// TODO - move this into the MobileDataStateTracker
int usedNetworkType = networkType;
if(networkType == ConnectivityManager.TYPE_MOBILE) {
+ if (!getMobileDataEnabled()) {
+ if (DBG) Slog.d(TAG, "requested special network with data disabled - rejected");
+ return Phone.APN_TYPE_NOT_AVAILABLE;
+ }
if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS;
} else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
@@ -549,7 +565,7 @@
NetworkInfo ni = network.getNetworkInfo();
if (ni.isAvailable() == false) {
- if (DBG) Log.d(TAG, "special network not available");
+ if (DBG) Slog.d(TAG, "special network not available");
return Phone.APN_TYPE_NOT_AVAILABLE;
}
@@ -570,17 +586,17 @@
if (ni.isConnected() == true) {
// add the pid-specific dns
handleDnsConfigurationChange();
- if (DBG) Log.d(TAG, "special network already active");
+ if (DBG) Slog.d(TAG, "special network already active");
return Phone.APN_ALREADY_ACTIVE;
}
- if (DBG) Log.d(TAG, "special network already connecting");
+ if (DBG) Slog.d(TAG, "special network already connecting");
return Phone.APN_REQUEST_STARTED;
}
// check if the radio in play can make another contact
// assume if cannot for now
- if (DBG) Log.d(TAG, "reconnecting to special network");
+ if (DBG) Slog.d(TAG, "reconnecting to special network");
network.reconnect();
return Phone.APN_REQUEST_STARTED;
} else {
@@ -624,7 +640,7 @@
return stopUsingNetworkFeature(u, true);
} else {
// none found!
- if (DBG) Log.d(TAG, "ignoring stopUsingNetworkFeature - not a live request");
+ if (DBG) Slog.d(TAG, "ignoring stopUsingNetworkFeature - not a live request");
return 1;
}
}
@@ -639,7 +655,7 @@
boolean callTeardown = false; // used to carry our decision outside of sync block
if (DBG) {
- Log.d(TAG, "stopUsingNetworkFeature for net " + networkType +
+ Slog.d(TAG, "stopUsingNetworkFeature for net " + networkType +
": " + feature);
}
@@ -669,7 +685,7 @@
if (x.mUid == u.mUid && x.mPid == u.mPid &&
x.mNetworkType == u.mNetworkType &&
TextUtils.equals(x.mFeature, u.mFeature)) {
- if (DBG) Log.d(TAG, "ignoring stopUsingNetworkFeature as dup is found");
+ if (DBG) Slog.d(TAG, "ignoring stopUsingNetworkFeature as dup is found");
return 1;
}
}
@@ -697,7 +713,7 @@
mNetRequestersPids[usedNetworkType].remove(currentPid);
reassessPidDns(pid, true);
if (mNetRequestersPids[usedNetworkType].size() != 0) {
- if (DBG) Log.d(TAG, "not tearing down special network - " +
+ if (DBG) Slog.d(TAG, "not tearing down special network - " +
"others still using it");
return 1;
}
@@ -733,7 +749,7 @@
if (tracker == null || !tracker.getNetworkInfo().isConnected() ||
tracker.isTeardownRequested()) {
if (DBG) {
- Log.d(TAG, "requestRouteToHost on down network (" + networkType + ") - dropped");
+ Slog.d(TAG, "requestRouteToHost on down network (" + networkType + ") - dropped");
}
return false;
}
@@ -767,6 +783,46 @@
mContext.sendBroadcast(broadcast);
}
+ /**
+ * @see ConnectivityManager#getMobileDataEnabled()
+ */
+ public boolean getMobileDataEnabled() {
+ enforceAccessPermission();
+ boolean retVal = Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.MOBILE_DATA, 1) == 1;
+ if (DBG) Slog.d(TAG, "getMobileDataEnabled returning " + retVal);
+ return retVal;
+ }
+
+ /**
+ * @see ConnectivityManager#setMobileDataEnabled(boolean)
+ */
+ public synchronized void setMobileDataEnabled(boolean enabled) {
+ enforceChangePermission();
+ if (DBG) Slog.d(TAG, "setMobileDataEnabled(" + enabled + ")");
+
+ if (getMobileDataEnabled() == enabled) return;
+
+ Settings.Secure.putInt(mContext.getContentResolver(),
+ Settings.Secure.MOBILE_DATA, enabled ? 1 : 0);
+
+ if (enabled) {
+ if (mNetTrackers[ConnectivityManager.TYPE_MOBILE] != null) {
+ if (DBG) Slog.d(TAG, "starting up " + mNetTrackers[ConnectivityManager.TYPE_MOBILE]);
+ mNetTrackers[ConnectivityManager.TYPE_MOBILE].reconnect();
+ }
+ } else {
+ for (NetworkStateTracker nt : mNetTrackers) {
+ if (nt == null) continue;
+ int netType = nt.getNetworkInfo().getType();
+ if (mNetAttributes[netType].mRadio == ConnectivityManager.TYPE_MOBILE) {
+ if (DBG) Slog.d(TAG, "tearing down " + nt);
+ nt.teardown();
+ }
+ }
+ }
+ }
+
private int getNumConnectedNetworks() {
int numConnectedNets = 0;
@@ -885,9 +941,18 @@
int newType = -1;
int newPriority = -1;
+ boolean noMobileData = !getMobileDataEnabled();
for (int checkType=0; checkType <= ConnectivityManager.MAX_NETWORK_TYPE; checkType++) {
if (checkType == prevNetType) continue;
if (mNetAttributes[checkType] == null) continue;
+ if (mNetAttributes[checkType].mRadio == ConnectivityManager.TYPE_MOBILE &&
+ noMobileData) {
+ if (DBG) {
+ Slog.d(TAG, "not failing over to mobile type " + checkType +
+ " because Mobile Data Disabled");
+ }
+ continue;
+ }
if (mNetAttributes[checkType].isDefault()) {
/* TODO - if we have multiple nets we could use
* we may want to put more thought into which we choose
@@ -921,10 +986,10 @@
}
if (DBG) {
if (switchTo.isConnected()) {
- Log.v(TAG, "Switching to already connected " +
+ Slog.v(TAG, "Switching to already connected " +
switchTo.getTypeName());
} else {
- Log.v(TAG, "Attempting to switch to " +
+ Slog.v(TAG, "Attempting to switch to " +
switchTo.getTypeName());
}
}
@@ -972,7 +1037,7 @@
} else {
reasonText = " (" + reason + ").";
}
- Log.v(TAG, "Attempt to connect to " + info.getTypeName() +
+ Slog.v(TAG, "Attempt to connect to " + info.getTypeName() +
" failed" + reasonText);
}
@@ -1053,7 +1118,7 @@
mNetAttributes[type].mPriority) ||
mNetworkPreference == mActiveDefaultNetwork) {
// don't accept this one
- if (DBG) Log.v(TAG, "Not broadcasting CONNECT_ACTION " +
+ if (DBG) Slog.v(TAG, "Not broadcasting CONNECT_ACTION " +
"to torn down network " + info.getTypeName());
teardown(thisNet);
return;
@@ -1061,11 +1126,11 @@
// tear down the other
NetworkStateTracker otherNet =
mNetTrackers[mActiveDefaultNetwork];
- if (DBG) Log.v(TAG, "Policy requires " +
+ if (DBG) Slog.v(TAG, "Policy requires " +
otherNet.getNetworkInfo().getTypeName() +
" teardown");
if (!teardown(otherNet)) {
- Log.e(TAG, "Network declined teardown request");
+ Slog.e(TAG, "Network declined teardown request");
return;
}
if (isFailover) {
@@ -1084,7 +1149,7 @@
private void handleScanResultsAvailable(NetworkInfo info) {
int networkType = info.getType();
if (networkType != ConnectivityManager.TYPE_WIFI) {
- if (DBG) Log.v(TAG, "Got ScanResultsAvailable for " +
+ if (DBG) Slog.v(TAG, "Got ScanResultsAvailable for " +
info.getTypeName() + " network. Don't know how to handle.");
}
@@ -1147,7 +1212,7 @@
*/
private void reassessPidDns(int myPid, boolean doBump)
{
- if (DBG) Log.d(TAG, "reassessPidDns for pid " + myPid);
+ if (DBG) Slog.d(TAG, "reassessPidDns for pid " + myPid);
for(int i : mPriorityList) {
if (mNetAttributes[i].isDefault()) {
continue;
@@ -1219,14 +1284,14 @@
for (String dns : dnsList) {
if (dns != null && !TextUtils.equals(dns, "0.0.0.0")) {
if (DBG) {
- Log.d(TAG, "adding dns " + dns + " for " +
+ Slog.d(TAG, "adding dns " + dns + " for " +
nt.getNetworkInfo().getTypeName());
}
SystemProperties.set("net.dns" + j++, dns);
}
}
for (int k=j ; k<mNumDnsEntries; k++) {
- if (DBG) Log.d(TAG, "erasing net.dns" + k);
+ if (DBG) Slog.d(TAG, "erasing net.dns" + k);
SystemProperties.set("net.dns" + k, "");
}
mNumDnsEntries = j;
@@ -1319,7 +1384,7 @@
if (DBG) {
// TODO - remove this after we validate the dropping doesn't break
// anything
- Log.d(TAG, "Dropping ConnectivityChange for " +
+ Slog.d(TAG, "Dropping ConnectivityChange for " +
info.getTypeName() + ": " +
state + "/" + info.getDetailedState());
}
@@ -1327,7 +1392,7 @@
}
mNetAttributes[type].mLastState = state;
- if (DBG) Log.d(TAG, "ConnectivityChange for " +
+ if (DBG) Slog.d(TAG, "ConnectivityChange for " +
info.getTypeName() + ": " +
state + "/" + info.getDetailedState());
@@ -1440,8 +1505,8 @@
public boolean isTetheringSupported() {
enforceTetherAccessPermission();
int defaultVal = (SystemProperties.get("ro.tether.denied").equals("true") ? 0 : 1);
- return ((Settings.Secure.getInt(mContext.getContentResolver(),
- Settings.Secure.TETHER_SUPPORTED, defaultVal) != 0) &&
- (mNetTrackers[ConnectivityManager.TYPE_MOBILE_DUN] != null));
+ boolean tetherEnabledInSettings = (Settings.Secure.getInt(mContext.getContentResolver(),
+ Settings.Secure.TETHER_SUPPORTED, defaultVal) != 0);
+ return tetherEnabledInSettings && mTetheringConfigValid;
}
}
diff --git a/services/java/com/android/server/DemoDataSet.java b/services/java/com/android/server/DemoDataSet.java
index 0de7c1e..277985f 100644
--- a/services/java/com/android/server/DemoDataSet.java
+++ b/services/java/com/android/server/DemoDataSet.java
@@ -27,7 +27,7 @@
import android.provider.Settings;
import android.provider.MediaStore.Images;
import android.util.Config;
-import android.util.Log;
+import android.util.Slog;
import java.io.File;
import java.io.FileNotFoundException;
@@ -62,7 +62,7 @@
int count = files.length;
if (count == 0) {
- Log.i(LOG_TAG, "addDefaultImages: no images found!");
+ Slog.i(LOG_TAG, "addDefaultImages: no images found!");
return;
}
@@ -74,14 +74,14 @@
try {
Images.Media.insertImage(mContentResolver, path, name, null);
} catch (FileNotFoundException e) {
- Log.e(LOG_TAG, "Failed to import image " + path, e);
+ Slog.e(LOG_TAG, "Failed to import image " + path, e);
}
}
}
private final void addDefaultData()
{
- Log.i(LOG_TAG, "Adding default data...");
+ Slog.i(LOG_TAG, "Adding default data...");
// addImage("Violet", "images/violet.png");
// addImage("Corky", "images/corky.png");
@@ -124,7 +124,7 @@
}
catch (Exception e)
{
- Log.e(LOG_TAG, "Failed to insert image '" + file + "'", e);
+ Slog.e(LOG_TAG, "Failed to insert image '" + file + "'", e);
url = null;
}
@@ -133,7 +133,7 @@
private final Uri addShortcut(String shortcut, Intent intent)
{
- if (Config.LOGV) Log.v(LOG_TAG, "addShortcut: shortcut=" + shortcut + ", intent=" + intent);
+ if (Config.LOGV) Slog.v(LOG_TAG, "addShortcut: shortcut=" + shortcut + ", intent=" + intent);
return Settings.Bookmarks.add(mContentResolver, intent, null, null,
shortcut != null ? shortcut.charAt(0) : 0, 0);
}
diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java
index ac65aa9..a555244 100644
--- a/services/java/com/android/server/DevicePolicyManagerService.java
+++ b/services/java/com/android/server/DevicePolicyManagerService.java
@@ -16,9 +16,9 @@
package com.android.server;
-import com.android.common.FastXmlSerializer;
-import com.android.common.XmlUtils;
import com.android.internal.content.PackageMonitor;
+import com.android.internal.util.FastXmlSerializer;
+import com.android.internal.util.XmlUtils;
import com.android.internal.widget.LockPatternUtils;
import org.xmlpull.v1.XmlPullParser;
@@ -26,10 +26,10 @@
import org.xmlpull.v1.XmlSerializer;
import android.app.Activity;
-import android.app.DeviceAdminReceiver;
-import android.app.DeviceAdminInfo;
-import android.app.DevicePolicyManager;
-import android.app.IDevicePolicyManager;
+import android.app.admin.DeviceAdminInfo;
+import android.app.admin.DeviceAdminReceiver;
+import android.app.admin.DevicePolicyManager;
+import android.app.admin.IDevicePolicyManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -46,13 +46,17 @@
import android.os.ServiceManager;
import android.os.SystemClock;
import android.util.Log;
+import android.util.PrintWriterPrinter;
+import android.util.Printer;
import android.util.Xml;
import android.view.WindowManagerPolicy;
import java.io.File;
+import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -72,6 +76,8 @@
int mActivePasswordLength = 0;
int mFailedPasswordAttempts = 0;
+ int mPasswordOwner = -1;
+
final HashMap<ComponentName, ActiveAdmin> mAdminMap
= new HashMap<ComponentName, ActiveAdmin>();
final ArrayList<ActiveAdmin> mAdminList
@@ -148,11 +154,31 @@
XmlUtils.skipCurrentTag(parser);
}
}
+
+ void dump(String prefix, PrintWriter pw) {
+ pw.print(prefix); pw.print("uid="); pw.println(getUid());
+ pw.print(prefix); pw.println("policies:");
+ ArrayList<DeviceAdminInfo.PolicyInfo> pols = info.getUsedPolicies();
+ if (pols != null) {
+ for (int i=0; i<pols.size(); i++) {
+ pw.print(prefix); pw.print(" "); pw.println(pols.get(i).tag);
+ }
+ }
+ pw.print(prefix); pw.print("passwordQuality=");
+ pw.print(passwordQuality);
+ pw.print(" minimumPasswordLength=");
+ pw.println(minimumPasswordLength);
+ pw.print(prefix); pw.print("maximumTimeToUnlock=");
+ pw.println(maximumTimeToUnlock);
+ pw.print(prefix); pw.print("maximumFailedPasswordsForWipe=");
+ pw.println(maximumFailedPasswordsForWipe);
+ }
}
class MyPackageMonitor extends PackageMonitor {
public void onSomePackagesChanged() {
synchronized (DevicePolicyManagerService.this) {
+ boolean removed = false;
for (int i=mAdminList.size()-1; i>=0; i--) {
ActiveAdmin aa = mAdminList.get(i);
int change = isPackageDisappearing(aa.info.getPackageName());
@@ -160,6 +186,7 @@
|| change == PACKAGE_TEMPORARY_CHANGE) {
Log.w(TAG, "Admin unexpectedly uninstalled: "
+ aa.info.getComponent());
+ removed = true;
mAdminList.remove(i);
} else if (isPackageModified(aa.info.getPackageName())) {
try {
@@ -168,10 +195,14 @@
} catch (NameNotFoundException e) {
Log.w(TAG, "Admin package change removed component: "
+ aa.info.getComponent());
+ removed = true;
mAdminList.remove(i);
}
}
}
+ if (removed) {
+ validatePasswordOwnerLocked();
+ }
}
}
}
@@ -260,6 +291,7 @@
// XXX need to wait for it to complete.
mAdminList.remove(admin);
mAdminMap.remove(adminReceiver);
+ validatePasswordOwnerLocked();
}
}
@@ -312,6 +344,12 @@
out.endTag(null, "policies");
+ if (mPasswordOwner >= 0) {
+ out.startTag(null, "password-owner");
+ out.attribute(null, "value", Integer.toString(mPasswordOwner));
+ out.endTag(null, "password-owner");
+ }
+
if (mFailedPasswordAttempts != 0) {
out.startTag(null, "failed-password-attempts");
out.attribute(null, "value", Integer.toString(mFailedPasswordAttempts));
@@ -377,6 +415,10 @@
mFailedPasswordAttempts = Integer.parseInt(
parser.getAttributeValue(null, "value"));
XmlUtils.skipCurrentTag(parser);
+ } else if ("password-owner".equals(tag)) {
+ mPasswordOwner = Integer.parseInt(
+ parser.getAttributeValue(null, "value"));
+ XmlUtils.skipCurrentTag(parser);
} else {
Log.w(TAG, "Unknown tag: " + tag);
XmlUtils.skipCurrentTag(parser);
@@ -401,6 +443,8 @@
// Ignore
}
+ validatePasswordOwnerLocked();
+
long timeMs = getMaximumTimeToLock(null);
if (timeMs <= 0) {
timeMs = Integer.MAX_VALUE;
@@ -412,6 +456,23 @@
}
}
+ void validatePasswordOwnerLocked() {
+ if (mPasswordOwner >= 0) {
+ boolean haveOwner = false;
+ for (int i=mAdminList.size()-1; i>=0; i--) {
+ if (mAdminList.get(i).getUid() == mPasswordOwner) {
+ haveOwner = true;
+ break;
+ }
+ }
+ if (!haveOwner) {
+ Log.w(TAG, "Previous password owner " + mPasswordOwner
+ + " no longer active; disabling");
+ mPasswordOwner = -1;
+ }
+ }
+ }
+
public void systemReady() {
synchronized (this) {
loadSettingsLocked();
@@ -622,7 +683,7 @@
}
}
- public boolean resetPassword(String password) {
+ public boolean resetPassword(String password, int flags) {
int quality;
synchronized (this) {
// This API can only be called by an active device admin,
@@ -645,12 +706,24 @@
}
}
+ int callingUid = Binder.getCallingUid();
+ if (mPasswordOwner >= 0 && mPasswordOwner != callingUid) {
+ Log.w(TAG, "resetPassword: already set by another uid and not entered by user");
+ return false;
+ }
+
// Don't do this with the lock held, because it is going to call
// back in to the service.
long ident = Binder.clearCallingIdentity();
try {
LockPatternUtils utils = new LockPatternUtils(mContext);
utils.saveLockPassword(password, quality);
+ int newOwner = (flags&DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY)
+ != 0 ? callingUid : -1;
+ if (mPasswordOwner != newOwner) {
+ mPasswordOwner = newOwner;
+ saveSettingsLocked();
+ }
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -829,10 +902,11 @@
android.Manifest.permission.BIND_DEVICE_ADMIN, null);
synchronized (this) {
- if (mFailedPasswordAttempts != 0) {
+ if (mFailedPasswordAttempts != 0 || mPasswordOwner >= 0) {
long ident = Binder.clearCallingIdentity();
try {
mFailedPasswordAttempts = 0;
+ mPasswordOwner = -1;
saveSettingsLocked();
sendAdminCommandLocked(DeviceAdminReceiver.ACTION_PASSWORD_SUCCEEDED,
DeviceAdminInfo.USES_POLICY_WATCH_LOGIN);
@@ -842,4 +916,39 @@
}
}
}
+
+ @Override
+ protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+ if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
+ != PackageManager.PERMISSION_GRANTED) {
+
+ pw.println("Permission Denial: can't dump DevicePolicyManagerService from from pid="
+ + Binder.getCallingPid()
+ + ", uid=" + Binder.getCallingUid());
+ return;
+ }
+
+ final Printer p = new PrintWriterPrinter(pw);
+
+ synchronized (this) {
+ p.println("Current Device Policy Manager state:");
+
+ p.println(" Enabled Device Admins:");
+ final int N = mAdminList.size();
+ for (int i=0; i<N; i++) {
+ ActiveAdmin ap = mAdminList.get(i);
+ if (ap != null) {
+ pw.print(" "); pw.print(ap.info.getComponent().flattenToShortString());
+ pw.println(":");
+ ap.dump(" ", pw);
+ }
+ }
+
+ pw.println(" ");
+ pw.print(" mActivePasswordQuality="); pw.println(mActivePasswordQuality);
+ pw.print(" mActivePasswordLength="); pw.println(mActivePasswordLength);
+ pw.print(" mFailedPasswordAttempts="); pw.println(mFailedPasswordAttempts);
+ pw.print(" mPasswordOwner="); pw.println(mPasswordOwner);
+ }
+ }
}
diff --git a/services/java/com/android/server/DeviceStorageMonitorService.java b/services/java/com/android/server/DeviceStorageMonitorService.java
index e58d346..62cf7076 100644
--- a/services/java/com/android/server/DeviceStorageMonitorService.java
+++ b/services/java/com/android/server/DeviceStorageMonitorService.java
@@ -37,7 +37,7 @@
import android.provider.Settings;
import android.util.Config;
import android.util.EventLog;
-import android.util.Log;
+import android.util.Slog;
import android.provider.Settings;
/**
@@ -105,7 +105,7 @@
public void handleMessage(Message msg) {
//dont handle an invalid message
if (msg.what != DEVICE_MEMORY_WHAT) {
- Log.e(TAG, "Will not process invalid message");
+ Slog.e(TAG, "Will not process invalid message");
return;
}
checkMemory(msg.arg1 == _TRUE);
@@ -116,7 +116,7 @@
public void onRemoveCompleted(String packageName, boolean succeeded) {
mClearSucceeded = succeeded;
mClearingCache = false;
- if(localLOGV) Log.i(TAG, " Clear succeeded:"+mClearSucceeded
+ if(localLOGV) Slog.i(TAG, " Clear succeeded:"+mClearSucceeded
+", mClearingCache:"+mClearingCache+" Forcing memory check");
postCheckMemoryMsg(false, 0);
}
@@ -182,11 +182,11 @@
}
mClearingCache = true;
try {
- if (localLOGV) Log.i(TAG, "Clearing cache");
+ if (localLOGV) Slog.i(TAG, "Clearing cache");
IPackageManager.Stub.asInterface(ServiceManager.getService("package")).
freeStorageAndNotify(getMemThreshold(), mClearCacheObserver);
} catch (RemoteException e) {
- Log.w(TAG, "Failed to get handle for PackageManger Exception: "+e);
+ Slog.w(TAG, "Failed to get handle for PackageManger Exception: "+e);
mClearingCache = false;
mClearSucceeded = false;
}
@@ -198,15 +198,15 @@
// and should be accessed via a lock but even if it does this test will fail now and
//hopefully the next time this flag will be set to the correct value.
if(mClearingCache) {
- if(localLOGV) Log.i(TAG, "Thread already running just skip");
+ if(localLOGV) Slog.i(TAG, "Thread already running just skip");
//make sure the thread is not hung for too long
long diffTime = System.currentTimeMillis() - mThreadStartTime;
if(diffTime > (10*60*1000)) {
- Log.w(TAG, "Thread that clears cache file seems to run for ever");
+ Slog.w(TAG, "Thread that clears cache file seems to run for ever");
}
} else {
restatDataDir();
- if (localLOGV) Log.v(TAG, "freeMemory="+mFreeMem);
+ if (localLOGV) Slog.v(TAG, "freeMemory="+mFreeMem);
//post intent to NotificationManager to display icon if necessary
long memThreshold = getMemThreshold();
@@ -220,23 +220,23 @@
mClearSucceeded = false;
clearCache();
} else {
- Log.i(TAG, "Running low on memory. Sending notification");
+ Slog.i(TAG, "Running low on memory. Sending notification");
sendNotification();
mLowMemFlag = true;
}
} else {
- if (localLOGV) Log.v(TAG, "Running low on memory " +
+ if (localLOGV) Slog.v(TAG, "Running low on memory " +
"notification already sent. do nothing");
}
} else {
if (mLowMemFlag) {
- Log.i(TAG, "Memory available. Cancelling notification");
+ Slog.i(TAG, "Memory available. Cancelling notification");
cancelNotification();
mLowMemFlag = false;
}
}
}
- if(localLOGV) Log.i(TAG, "Posting Message again");
+ if(localLOGV) Slog.i(TAG, "Posting Message again");
//keep posting messages to itself periodically
postCheckMemoryMsg(true, DEFAULT_CHECK_INTERVAL);
}
@@ -259,7 +259,7 @@
mContentResolver,
Settings.Secure.SYS_STORAGE_THRESHOLD_PERCENTAGE,
DEFAULT_THRESHOLD_PERCENTAGE);
- if(localLOGV) Log.v(TAG, "Threshold Percentage="+value);
+ if(localLOGV) Slog.v(TAG, "Threshold Percentage="+value);
//evaluate threshold value
return mTotalMemory*value;
}
@@ -291,7 +291,7 @@
* application
*/
private final void sendNotification() {
- if(localLOGV) Log.i(TAG, "Sending low memory notification");
+ if(localLOGV) Slog.i(TAG, "Sending low memory notification");
//log the event to event log with the amount of free storage(in bytes) left on the device
EventLog.writeEvent(EventLogTags.LOW_STORAGE, mFreeMem);
// Pack up the values and broadcast them to everyone
@@ -319,7 +319,7 @@
* Cancels low storage notification and sends OK intent.
*/
private final void cancelNotification() {
- if(localLOGV) Log.i(TAG, "Canceling low memory notification");
+ if(localLOGV) Slog.i(TAG, "Canceling low memory notification");
NotificationManager mNotificationMgr =
(NotificationManager)mContext.getSystemService(
Context.NOTIFICATION_SERVICE);
diff --git a/services/java/com/android/server/DockObserver.java b/services/java/com/android/server/DockObserver.java
index 606b589..25ebee4 100644
--- a/services/java/com/android/server/DockObserver.java
+++ b/services/java/com/android/server/DockObserver.java
@@ -57,6 +57,7 @@
import android.text.format.DateUtils;
import android.text.format.Time;
import android.util.Log;
+import android.util.Slog;
import com.android.internal.R;
import com.android.internal.app.DisableCarModeActivity;
@@ -147,7 +148,7 @@
try {
mContext.startActivity(intent);
} catch (ActivityNotFoundException e) {
- Log.w(TAG, e.getCause());
+ Slog.w(TAG, e.getCause());
}
}
}
@@ -249,7 +250,7 @@
@Override
public void onUEvent(UEventObserver.UEvent event) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
- Log.v(TAG, "Dock UEVENT: " + event.toString());
+ Slog.v(TAG, "Dock UEVENT: " + event.toString());
}
synchronized (this) {
@@ -263,7 +264,7 @@
try {
setCarMode(carModeEnabled);
} catch (RemoteException e1) {
- Log.w(TAG, "Unable to change car mode.", e1);
+ Slog.w(TAG, "Unable to change car mode.", e1);
}
}
if (mSystemReady) {
@@ -279,7 +280,7 @@
}
}
} catch (NumberFormatException e) {
- Log.e(TAG, "Could not parse switch state from event " + event);
+ Slog.e(TAG, "Could not parse switch state from event " + event);
}
}
}
@@ -293,9 +294,9 @@
mPreviousDockState = mDockState = Integer.valueOf((new String(buffer, 0, len)).trim());
} catch (FileNotFoundException e) {
- Log.w(TAG, "This kernel does not have dock station support");
+ Slog.w(TAG, "This kernel does not have dock station support");
} catch (Exception e) {
- Log.e(TAG, "" , e);
+ Slog.e(TAG, "" , e);
}
}
@@ -305,6 +306,14 @@
(KeyguardManager)mContext.getSystemService(Context.KEYGUARD_SERVICE);
mKeyguardLock = keyguardManager.newKeyguardLock(TAG);
+ final boolean enableCarMode = mDockState == Intent.EXTRA_DOCK_STATE_CAR;
+ if (enableCarMode) {
+ try {
+ setCarMode(enableCarMode);
+ } catch (RemoteException e) {
+ Slog.w(TAG, "Unable to change car mode.", e);
+ }
+ }
// don't bother broadcasting undocked here
if (mDockState != Intent.EXTRA_DOCK_STATE_UNDOCKED) {
update();
@@ -324,13 +333,13 @@
switch (msg.what) {
case MSG_DOCK_STATE:
synchronized (this) {
- Log.i(TAG, "Dock state changed: " + mDockState);
+ Slog.i(TAG, "Dock state changed: " + mDockState);
final ContentResolver cr = mContext.getContentResolver();
if (Settings.Secure.getInt(cr,
Settings.Secure.DEVICE_PROVISIONED, 0) == 0) {
- Log.i(TAG, "Device not provisioned, skipping dock broadcast");
+ Slog.i(TAG, "Device not provisioned, skipping dock broadcast");
return;
}
// Pack up the values and broadcast them to everyone
@@ -406,7 +415,7 @@
try {
DockObserver.this.updateTwilight();
} catch (RemoteException e) {
- Log.w(TAG, "Unable to change night mode.", e);
+ Slog.w(TAG, "Unable to change night mode.", e);
}
}
}
@@ -416,11 +425,11 @@
mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
LOCATION_UPDATE_MS, LOCATION_UPDATE_DISTANCE_METER, mLocationListener);
retrieveLocation();
- if (mLocation != null) {
+ if (mCarModeEnabled && mLocation != null && mNightMode == MODE_NIGHT_AUTO) {
try {
DockObserver.this.updateTwilight();
} catch (RemoteException e) {
- Log.w(TAG, "Unable to change night mode.", e);
+ Slog.w(TAG, "Unable to change night mode.", e);
}
}
} else {
@@ -462,8 +471,8 @@
if (location == null) {
Time currentTime = new Time();
currentTime.set(System.currentTimeMillis());
- double lngOffset = FACTOR_GMT_OFFSET_LONGITUDE * currentTime.gmtoff
- - (currentTime.isDst > 0 ? 3600 : 0);
+ double lngOffset = FACTOR_GMT_OFFSET_LONGITUDE *
+ (currentTime.gmtoff - (currentTime.isDst > 0 ? 3600 : 0));
location = new Location("fake");
location.setLongitude(lngOffset);
location.setLatitude(59.95);
@@ -587,20 +596,26 @@
}
// schedule next update
- final int mLastTwilightState = tw.mState;
- // add some extra time to be on the save side.
- long nextUpdate = DateUtils.MINUTE_IN_MILLIS;
- if (currentTime > tw.mSunset) {
- // next update should be on the following day
- tw.calculateTwilight(currentTime
- + DateUtils.DAY_IN_MILLIS, mLocation.getLatitude(),
- mLocation.getLongitude());
- }
-
- if (mLastTwilightState == TwilightCalculator.NIGHT) {
- nextUpdate += tw.mSunrise;
+ long nextUpdate = 0;
+ if (tw.mSunrise == -1 || tw.mSunset == -1) {
+ // In the case the day or night never ends the update is scheduled 12 hours later.
+ nextUpdate = currentTime + 12 * DateUtils.HOUR_IN_MILLIS;
} else {
- nextUpdate += tw.mSunset;
+ final int mLastTwilightState = tw.mState;
+ // add some extra time to be on the save side.
+ nextUpdate += DateUtils.MINUTE_IN_MILLIS;
+ if (currentTime > tw.mSunset) {
+ // next update should be on the following day
+ tw.calculateTwilight(currentTime
+ + DateUtils.DAY_IN_MILLIS, mLocation.getLatitude(),
+ mLocation.getLongitude());
+ }
+
+ if (mLastTwilightState == TwilightCalculator.NIGHT) {
+ nextUpdate += tw.mSunrise;
+ } else {
+ nextUpdate += tw.mSunset;
+ }
}
Intent updateIntent = new Intent(ACTION_UPDATE_NIGHT_MODE);
@@ -609,8 +624,11 @@
mAlarmManager.cancel(pendingIntent);
mAlarmManager.set(AlarmManager.RTC_WAKEUP, nextUpdate, pendingIntent);
- // set current mode
- setMode(Configuration.UI_MODE_TYPE_CAR, nightMode << 4);
+ // Make sure that we really set the new mode only if we're in car mode and
+ // automatic switching is enables.
+ if (mCarModeEnabled && mNightMode == MODE_NIGHT_AUTO) {
+ setMode(Configuration.UI_MODE_TYPE_CAR, nightMode << 4);
+ }
}
}
diff --git a/services/java/com/android/server/DropBoxManagerService.java b/services/java/com/android/server/DropBoxManagerService.java
index 090e9d3..667953c 100644
--- a/services/java/com/android/server/DropBoxManagerService.java
+++ b/services/java/com/android/server/DropBoxManagerService.java
@@ -32,7 +32,7 @@
import android.os.SystemClock;
import android.provider.Settings;
import android.text.format.Time;
-import android.util.Log;
+import android.util.Slog;
import com.android.internal.os.IDropBoxManagerService;
@@ -103,7 +103,7 @@
init();
trimToFit();
} catch (IOException e) {
- Log.e(TAG, "Can't init", e);
+ Slog.e(TAG, "Can't init", e);
}
}
};
@@ -195,7 +195,7 @@
long len = temp.length();
if (len > max) {
- Log.w(TAG, "Dropping: " + tag + " (" + temp.length() + " > " + max + " bytes)");
+ Slog.w(TAG, "Dropping: " + tag + " (" + temp.length() + " > " + max + " bytes)");
temp.delete();
temp = null; // Pass temp = null to createEntry() to leave a tombstone
break;
@@ -205,7 +205,7 @@
createEntry(temp, tag, flags);
temp = null;
} catch (IOException e) {
- Log.e(TAG, "Can't write: " + tag, e);
+ Slog.e(TAG, "Can't write: " + tag, e);
} finally {
try { if (output != null) output.close(); } catch (IOException e) {}
entry.close();
@@ -227,7 +227,7 @@
try {
init();
} catch (IOException e) {
- Log.e(TAG, "Can't init", e);
+ Slog.e(TAG, "Can't init", e);
return null;
}
@@ -243,7 +243,7 @@
return new DropBoxManager.Entry(
entry.tag, entry.timestampMillis, entry.file, entry.flags);
} catch (IOException e) {
- Log.e(TAG, "Can't read: " + entry.file, e);
+ Slog.e(TAG, "Can't read: " + entry.file, e);
// Continue to next file
}
}
@@ -262,7 +262,7 @@
init();
} catch (IOException e) {
pw.println("Can't initialize: " + e);
- Log.e(TAG, "Can't init", e);
+ Slog.e(TAG, "Can't init", e);
return;
}
@@ -357,7 +357,7 @@
}
} catch (IOException e) {
out.append("*** ").append(e.toString()).append("\n");
- Log.e(TAG, "Can't read: " + entry.file, e);
+ Slog.e(TAG, "Can't read: " + entry.file, e);
} finally {
if (dbe != null) dbe.close();
}
@@ -541,17 +541,17 @@
// Scan pre-existing files.
for (File file : files) {
if (file.getName().endsWith(".tmp")) {
- Log.i(TAG, "Cleaning temp file: " + file);
+ Slog.i(TAG, "Cleaning temp file: " + file);
file.delete();
continue;
}
EntryFile entry = new EntryFile(file, mBlockSize);
if (entry.tag == null) {
- Log.w(TAG, "Unrecognized file: " + file);
+ Slog.w(TAG, "Unrecognized file: " + file);
continue;
} else if (entry.timestampMillis == 0) {
- Log.w(TAG, "Invalid filename: " + file);
+ Slog.w(TAG, "Invalid filename: " + file);
file.delete();
continue;
}
@@ -677,7 +677,7 @@
// was lost. Tombstones are expunged by age (see above).
if (mAllFiles.blocks > mCachedQuotaBlocks) {
- Log.i(TAG, "Usage (" + mAllFiles.blocks + ") > Quota (" + mCachedQuotaBlocks + ")");
+ Slog.i(TAG, "Usage (" + mAllFiles.blocks + ") > Quota (" + mCachedQuotaBlocks + ")");
// Find a fair share amount of space to limit each tag
int unsqueezed = mAllFiles.blocks, squeezed = 0;
@@ -703,7 +703,7 @@
if (entry.file != null) entry.file.delete();
enrollEntry(new EntryFile(mDropBoxDir, entry.tag, entry.timestampMillis));
} catch (IOException e) {
- Log.e(TAG, "Can't write tombstone file", e);
+ Slog.e(TAG, "Can't write tombstone file", e);
}
}
}
diff --git a/services/java/com/android/server/EntropyService.java b/services/java/com/android/server/EntropyService.java
index 28f09f5..0a53e9c 100644
--- a/services/java/com/android/server/EntropyService.java
+++ b/services/java/com/android/server/EntropyService.java
@@ -27,7 +27,7 @@
import android.os.Handler;
import android.os.Message;
import android.os.SystemProperties;
-import android.util.Log;
+import android.util.Slog;
/**
* A service designed to load and periodically save "randomness"
@@ -63,7 +63,7 @@
@Override
public void handleMessage(Message msg) {
if (msg.what != ENTROPY_WHAT) {
- Log.e(TAG, "Will not process invalid message");
+ Slog.e(TAG, "Will not process invalid message");
return;
}
writeEntropy();
@@ -87,7 +87,7 @@
try {
RandomBlock.fromFile(ENTROPY_FILENAME).toFile(RANDOM_DEV);
} catch (IOException e) {
- Log.w(TAG, "unable to load initial entropy (first boot?)", e);
+ Slog.w(TAG, "unable to load initial entropy (first boot?)", e);
}
}
@@ -95,7 +95,7 @@
try {
RandomBlock.fromFile(RANDOM_DEV).toFile(ENTROPY_FILENAME);
} catch (IOException e) {
- Log.w(TAG, "unable to write entropy", e);
+ Slog.w(TAG, "unable to write entropy", e);
}
}
@@ -131,7 +131,7 @@
out.println(System.currentTimeMillis());
out.println(System.nanoTime());
} catch (IOException e) {
- Log.w(TAG, "Unable to add device specific data to the entropy pool", e);
+ Slog.w(TAG, "Unable to add device specific data to the entropy pool", e);
} finally {
if (out != null) {
out.close();
diff --git a/services/java/com/android/server/HeadsetObserver.java b/services/java/com/android/server/HeadsetObserver.java
index 9d69564..6f0a91d 100644
--- a/services/java/com/android/server/HeadsetObserver.java
+++ b/services/java/com/android/server/HeadsetObserver.java
@@ -24,7 +24,7 @@
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.os.UEventObserver;
-import android.util.Log;
+import android.util.Slog;
import android.media.AudioManager;
import java.io.FileReader;
@@ -66,12 +66,12 @@
@Override
public void onUEvent(UEventObserver.UEvent event) {
- if (LOG) Log.v(TAG, "Headset UEVENT: " + event.toString());
+ if (LOG) Slog.v(TAG, "Headset UEVENT: " + event.toString());
try {
update(event.get("SWITCH_NAME"), Integer.parseInt(event.get("SWITCH_STATE")));
} catch (NumberFormatException e) {
- Log.e(TAG, "Could not parse switch state from event " + event);
+ Slog.e(TAG, "Could not parse switch state from event " + event);
}
}
@@ -91,9 +91,9 @@
newName = new String(buffer, 0, len).trim();
} catch (FileNotFoundException e) {
- Log.w(TAG, "This kernel does not have wired headset support");
+ Slog.w(TAG, "This kernel does not have wired headset support");
} catch (Exception e) {
- Log.e(TAG, "" , e);
+ Slog.e(TAG, "" , e);
}
update(newName, newState);
@@ -167,7 +167,7 @@
intent.putExtra("name", headsetName);
intent.putExtra("microphone", microphone);
- if (LOG) Log.v(TAG, "Intent.ACTION_HEADSET_PLUG: state: "+state+" name: "+headsetName+" mic: "+microphone);
+ if (LOG) Slog.v(TAG, "Intent.ACTION_HEADSET_PLUG: state: "+state+" name: "+headsetName+" mic: "+microphone);
// TODO: Should we require a permission?
ActivityManagerNative.broadcastStickyIntent(intent, null);
}
diff --git a/services/java/com/android/server/InputDevice.java b/services/java/com/android/server/InputDevice.java
index d3bb6dc..1c18d6f 100644
--- a/services/java/com/android/server/InputDevice.java
+++ b/services/java/com/android/server/InputDevice.java
@@ -16,7 +16,7 @@
package com.android.server;
-import android.util.Log;
+import android.util.Slog;
import android.view.Display;
import android.view.MotionEvent;
import android.view.Surface;
@@ -142,7 +142,7 @@
final int ioff = i * MotionEvent.NUM_SAMPLE_DATA;
//final int x = mNextData[ioff + MotionEvent.SAMPLE_X];
final int y = mNextData[ioff + MotionEvent.SAMPLE_Y];
- if (DEBUG_HACKS) Log.v("InputDevice", "Looking at next point #" + i + ": y=" + y);
+ if (DEBUG_HACKS) Slog.v("InputDevice", "Looking at next point #" + i + ": y=" + y);
boolean dropped = false;
if (!mDroppedBadPoint[i] && mLastNumPointers > 0) {
dropped = true;
@@ -156,7 +156,7 @@
int dy = y - mLastData[joff + MotionEvent.SAMPLE_Y];
//if (dx < 0) dx = -dx;
if (dy < 0) dy = -dy;
- if (DEBUG_HACKS) Log.v("InputDevice", "Comparing with last point #" + j
+ if (DEBUG_HACKS) Slog.v("InputDevice", "Comparing with last point #" + j
+ ": y=" + mLastData[joff] + " dy=" + dy);
if (dy < maxDy) {
dropped = false;
@@ -168,7 +168,7 @@
}
if (dropped) {
dropped = true;
- Log.i("InputDevice", "Dropping bad point #" + i
+ Slog.i("InputDevice", "Dropping bad point #" + i
+ ": newY=" + y + " closestDy=" + closestDy
+ " maxDy=" + maxDy);
mNextData[ioff + MotionEvent.SAMPLE_Y] = closestY;
@@ -188,7 +188,7 @@
int nextNumPointers) {
final int numPointers = mLastNumPointers;
final int[] rawData = mLastData;
- if (DEBUG_HACKS) Log.v("InputDevice", "lastNumPointers=" + lastNumPointers
+ if (DEBUG_HACKS) Slog.v("InputDevice", "lastNumPointers=" + lastNumPointers
+ " nextNumPointers=" + nextNumPointers
+ " numPointers=" + numPointers);
for (int i=0; i<numPointers; i++) {
@@ -202,7 +202,7 @@
if (lastNumPointers < nextNumPointers) {
// This pointer is going down. Clear its history
// and start fresh.
- if (DEBUG_HACKS) Log.v("InputDevice", "Pointer down @ index "
+ if (DEBUG_HACKS) Slog.v("InputDevice", "Pointer down @ index "
+ upOrDownPointer + " id " + mPointerIds[i]);
mHistoryDataStart[i] = 0;
mHistoryDataEnd[i] = 0;
@@ -215,7 +215,7 @@
// The pointer is going up. Just fall through to
// recompute the last averaged point (and don't add
// it as a new point to include in the average).
- if (DEBUG_HACKS) Log.v("InputDevice", "Pointer up @ index "
+ if (DEBUG_HACKS) Slog.v("InputDevice", "Pointer up @ index "
+ upOrDownPointer + " id " + mPointerIds[i]);
}
} else {
@@ -228,7 +228,7 @@
int dx = newX-oldX;
int dy = newY-oldY;
int delta = dx*dx + dy*dy;
- if (DEBUG_HACKS) Log.v("InputDevice", "Delta from last: " + delta);
+ if (DEBUG_HACKS) Slog.v("InputDevice", "Delta from last: " + delta);
if (delta >= (75*75)) {
// Magic number, if moving farther than this, turn
// off filtering to avoid lag in response.
@@ -284,7 +284,7 @@
totalPressure += pressure;
x /= totalPressure;
y /= totalPressure;
- if (DEBUG_HACKS) Log.v("InputDevice", "Averaging " + totalPressure
+ if (DEBUG_HACKS) Slog.v("InputDevice", "Averaging " + totalPressure
+ " weight: (" + x + "," + y + ")");
mAveragedData[ioff + MotionEvent.SAMPLE_X] = x;
mAveragedData[ioff + MotionEvent.SAMPLE_Y] = y;
@@ -305,7 +305,7 @@
final int[] nextData = mNextData;
final int id = nextIndex * MotionEvent.NUM_SAMPLE_DATA;
- if (DEBUG_POINTERS) Log.v("InputDevice", "assignPointer: nextIndex="
+ if (DEBUG_POINTERS) Slog.v("InputDevice", "assignPointer: nextIndex="
+ nextIndex + " dataOff=" + id);
final int x1 = nextData[id + MotionEvent.SAMPLE_X];
final int y1 = nextData[id + MotionEvent.SAMPLE_Y];
@@ -329,7 +329,7 @@
}
}
- if (DEBUG_POINTERS) Log.v("InputDevice", "New index " + nextIndex
+ if (DEBUG_POINTERS) Slog.v("InputDevice", "New index " + nextIndex
+ " best old index=" + bestIndex + " (distance="
+ bestDistance + ")");
next2Last[nextIndex] = bestIndex;
@@ -344,7 +344,7 @@
return false;
}
- if (DEBUG_POINTERS) Log.v("InputDevice", "Old index " + bestIndex
+ if (DEBUG_POINTERS) Slog.v("InputDevice", "Old index " + bestIndex
+ " has multiple best new pointers!");
last2Next[bestIndex] = -2;
@@ -369,7 +369,7 @@
last2Next[i] = -1;
}
- if (DEBUG_POINTERS) Log.v("InputDevice",
+ if (DEBUG_POINTERS) Slog.v("InputDevice",
"Update pointers: lastNumPointers=" + lastNumPointers
+ " nextNumPointers=" + nextNumPointers);
@@ -385,7 +385,7 @@
// new pointer locations find their best previous location is
// the same.
if (conflicts) {
- if (DEBUG_POINTERS) Log.v("InputDevice", "Resolving conflicts");
+ if (DEBUG_POINTERS) Slog.v("InputDevice", "Resolving conflicts");
for (int i=0; i<lastNumPointers; i++) {
if (last2Next[i] != -2) {
@@ -396,7 +396,7 @@
// we should do something like the one described at
// http://portal.acm.org/citation.cfm?id=997856
- if (DEBUG_POINTERS) Log.v("InputDevice",
+ if (DEBUG_POINTERS) Slog.v("InputDevice",
"Resolving last index #" + i);
int numFound;
@@ -416,7 +416,7 @@
}
if (worstJ >= 0) {
- if (DEBUG_POINTERS) Log.v("InputDevice",
+ if (DEBUG_POINTERS) Slog.v("InputDevice",
"Worst new pointer: " + worstJ
+ " (distance=" + worstDistance + ")");
if (assignPointer(worstJ, false)) {
@@ -434,13 +434,13 @@
if (lastNumPointers < nextNumPointers) {
// We have one or more new pointers that are down. Create a
// new pointer identifier for one of them.
- if (DEBUG_POINTERS) Log.v("InputDevice", "Adding new pointer");
+ if (DEBUG_POINTERS) Slog.v("InputDevice", "Adding new pointer");
int nextId = 0;
int i=0;
while (i < lastNumPointers) {
if (mPointerIds[i] > nextId) {
// Found a hole, insert the pointer here.
- if (DEBUG_POINTERS) Log.v("InputDevice",
+ if (DEBUG_POINTERS) Slog.v("InputDevice",
"Inserting new pointer at hole " + i);
System.arraycopy(mPointerIds, i, mPointerIds,
i+1, lastNumPointers-i);
@@ -453,7 +453,7 @@
nextId++;
}
- if (DEBUG_POINTERS) Log.v("InputDevice",
+ if (DEBUG_POINTERS) Slog.v("InputDevice",
"New pointer id " + nextId + " at index " + i);
mLastNumPointers++;
@@ -463,7 +463,7 @@
// And assign this identifier to the first new pointer.
for (int j=0; j<nextNumPointers; j++) {
if (next2Last[j] < 0) {
- if (DEBUG_POINTERS) Log.v("InputDevice",
+ if (DEBUG_POINTERS) Slog.v("InputDevice",
"Assigning new id to new pointer index " + j);
next2Last[j] = i;
break;
@@ -477,7 +477,7 @@
for (int i=0; i<nextNumPointers; i++) {
int lastIndex = next2Last[i];
if (lastIndex >= 0) {
- if (DEBUG_POINTERS) Log.v("InputDevice",
+ if (DEBUG_POINTERS) Slog.v("InputDevice",
"Copying next pointer index " + i
+ " to last index " + lastIndex);
System.arraycopy(nextData, i*MotionEvent.NUM_SAMPLE_DATA,
@@ -489,10 +489,10 @@
if (lastNumPointers > nextNumPointers) {
// One or more pointers has gone up. Find the first one,
// and adjust accordingly.
- if (DEBUG_POINTERS) Log.v("InputDevice", "Removing old pointer");
+ if (DEBUG_POINTERS) Slog.v("InputDevice", "Removing old pointer");
for (int i=0; i<lastNumPointers; i++) {
if (last2Next[i] == -1) {
- if (DEBUG_POINTERS) Log.v("InputDevice",
+ if (DEBUG_POINTERS) Slog.v("InputDevice",
"Removing old pointer at index " + i);
retIndex = i;
break;
@@ -531,7 +531,7 @@
final int lastNumPointers = mLastNumPointers;
final int nextNumPointers = mNextNumPointers;
if (mNextNumPointers > MAX_POINTERS) {
- Log.w("InputDevice", "Number of pointers " + mNextNumPointers
+ Slog.w("InputDevice", "Number of pointers " + mNextNumPointers
+ " exceeded maximum of " + MAX_POINTERS);
mNextNumPointers = MAX_POINTERS;
}
@@ -549,7 +549,7 @@
final int numPointers = mLastNumPointers;
- if (DEBUG_POINTERS) Log.v("InputDevice", "Processing "
+ if (DEBUG_POINTERS) Slog.v("InputDevice", "Processing "
+ numPointers + " pointers (going from " + lastNumPointers
+ " to " + nextNumPointers + ")");
@@ -661,13 +661,13 @@
}
if (currentMove != null) {
- if (false) Log.i("InputDevice", "Adding batch x="
+ if (false) Slog.i("InputDevice", "Adding batch x="
+ reportData[MotionEvent.SAMPLE_X]
+ " y=" + reportData[MotionEvent.SAMPLE_Y]
+ " to " + currentMove);
currentMove.addBatch(curTime, reportData, metaState);
if (WindowManagerPolicy.WATCH_POINTER) {
- Log.i("KeyInputQueue", "Updating: " + currentMove);
+ Slog.i("KeyInputQueue", "Updating: " + currentMove);
}
return null;
}
@@ -748,13 +748,13 @@
}
if (currentMove != null) {
- if (false) Log.i("InputDevice", "Adding batch x="
+ if (false) Slog.i("InputDevice", "Adding batch x="
+ scaled[MotionEvent.SAMPLE_X]
+ " y=" + scaled[MotionEvent.SAMPLE_Y]
+ " to " + currentMove);
currentMove.addBatch(curTime, scaled, metaState);
if (WindowManagerPolicy.WATCH_POINTER) {
- Log.i("KeyInputQueue", "Updating: " + currentMove);
+ Slog.i("KeyInputQueue", "Updating: " + currentMove);
}
return null;
}
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 59d4c9b..a6a3e27 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -62,7 +62,7 @@
import android.provider.Settings;
import android.text.TextUtils;
import android.util.EventLog;
-import android.util.Log;
+import android.util.Slog;
import android.util.PrintWriterPrinter;
import android.util.Printer;
import android.view.IWindowManager;
@@ -317,7 +317,7 @@
hideInputMethodMenu();
return;
} else {
- Log.w(TAG, "Unexpected intent " + intent);
+ Slog.w(TAG, "Unexpected intent " + intent);
}
// Inform the current client of the change in active status
@@ -326,7 +326,7 @@
mCurClient.client.setActive(mScreenOn);
}
} catch (RemoteException e) {
- Log.w(TAG, "Got RemoteException sending 'screen on/off' notification to pid "
+ Slog.w(TAG, "Got RemoteException sending 'screen on/off' notification to pid "
+ mCurClient.pid + " uid " + mCurClient.uid);
}
}
@@ -379,7 +379,7 @@
int change = isPackageDisappearing(imi.getPackageName());
if (change == PACKAGE_TEMPORARY_CHANGE
|| change == PACKAGE_PERMANENT_CHANGE) {
- Log.i(TAG, "Input method uninstalled, disabling: "
+ Slog.i(TAG, "Input method uninstalled, disabling: "
+ imi.getComponent());
setInputMethodEnabledLocked(imi.getId(), false);
}
@@ -403,12 +403,12 @@
if (si == null) {
// Uh oh, current input method is no longer around!
// Pick another one...
- Log.i(TAG, "Current input method removed: " + curInputMethodId);
+ Slog.i(TAG, "Current input method removed: " + curInputMethodId);
if (!chooseNewDefaultIMELocked()) {
changed = true;
curIm = null;
curInputMethodId = "";
- Log.i(TAG, "Unsetting current input method");
+ Slog.i(TAG, "Unsetting current input method");
Settings.Secure.putString(mContext.getContentResolver(),
Settings.Secure.DEFAULT_INPUT_METHOD,
curInputMethodId);
@@ -469,15 +469,15 @@
final String enabledStr = Settings.Secure.getString(
mContext.getContentResolver(),
Settings.Secure.ENABLED_INPUT_METHODS);
- Log.i(TAG, "Enabled input methods: " + enabledStr);
+ Slog.i(TAG, "Enabled input methods: " + enabledStr);
if (enabledStr == null) {
- Log.i(TAG, "Enabled input methods has not been set, enabling all");
+ Slog.i(TAG, "Enabled input methods has not been set, enabling all");
InputMethodInfo defIm = null;
StringBuilder sb = new StringBuilder(256);
final int N = mMethodList.size();
for (int i=0; i<N; i++) {
InputMethodInfo imi = mMethodList.get(i);
- Log.i(TAG, "Adding: " + imi.getId());
+ Slog.i(TAG, "Adding: " + imi.getId());
if (i > 0) sb.append(':');
sb.append(imi.getId());
if (defIm == null && imi.getIsDefaultResourceId() != 0) {
@@ -486,7 +486,7 @@
imi.getPackageName(), 0).getResources();
if (res.getBoolean(imi.getIsDefaultResourceId())) {
defIm = imi;
- Log.i(TAG, "Selected default: " + imi.getId());
+ Slog.i(TAG, "Selected default: " + imi.getId());
}
} catch (PackageManager.NameNotFoundException ex) {
} catch (Resources.NotFoundException ex) {
@@ -495,7 +495,7 @@
}
if (defIm == null && N > 0) {
defIm = mMethodList.get(0);
- Log.i(TAG, "No default found, using " + defIm.getId());
+ Slog.i(TAG, "No default found, using " + defIm.getId());
}
Settings.Secure.putString(mContext.getContentResolver(),
Settings.Secure.ENABLED_INPUT_METHODS, sb.toString());
@@ -523,7 +523,7 @@
// The input method manager only throws security exceptions, so let's
// log all others.
if (!(e instanceof SecurityException)) {
- Log.e(TAG, "Input Method Manager Crash", e);
+ Slog.e(TAG, "Input Method Manager Crash", e);
}
throw e;
}
@@ -536,7 +536,7 @@
try {
startInputInnerLocked();
} catch (RuntimeException e) {
- Log.w(TAG, "Unexpected exception", e);
+ Slog.w(TAG, "Unexpected exception", e);
}
}
}
@@ -600,7 +600,7 @@
void unbindCurrentClientLocked() {
if (mCurClient != null) {
- if (DEBUG) Log.v(TAG, "unbindCurrentInputLocked: client = "
+ if (DEBUG) Slog.v(TAG, "unbindCurrentInputLocked: client = "
+ mCurClient.client.asBinder());
if (mBoundToMethod) {
mBoundToMethod = false;
@@ -617,7 +617,7 @@
try {
mCurClient.client.setActive(false);
} catch (RemoteException e) {
- Log.w(TAG, "Got RemoteException sending setActive(false) notification to pid "
+ Slog.w(TAG, "Got RemoteException sending setActive(false) notification to pid "
+ mCurClient.pid + " uid " + mCurClient.uid);
}
mCurClient = null;
@@ -662,7 +662,7 @@
MSG_RESTART_INPUT, session, mCurInputContext, mCurAttribute));
}
if (mShowRequested) {
- if (DEBUG) Log.v(TAG, "Attach new input asks to show input");
+ if (DEBUG) Slog.v(TAG, "Attach new input asks to show input");
showCurrentInputLocked(getAppShowFlags(), null);
}
return needResult
@@ -691,7 +691,7 @@
// because if the focus changes some time before or after, the
// next client receiving focus that has any interest in input will
// be calling through here after that change happens.
- Log.w(TAG, "Starting input on non-focused client " + cs.client
+ Slog.w(TAG, "Starting input on non-focused client " + cs.client
+ " (uid=" + cs.uid + " pid=" + cs.pid + ")");
return null;
}
@@ -702,7 +702,7 @@
// If the client is changing, we need to switch over to the new
// one.
unbindCurrentClientLocked();
- if (DEBUG) Log.v(TAG, "switching to client: client = "
+ if (DEBUG) Slog.v(TAG, "switching to client: client = "
+ cs.client.asBinder());
// If the screen is on, inform the new client it is active
@@ -710,7 +710,7 @@
try {
cs.client.setActive(mScreenOn);
} catch (RemoteException e) {
- Log.w(TAG, "Got RemoteException sending setActive notification to pid "
+ Slog.w(TAG, "Got RemoteException sending setActive notification to pid "
+ cs.pid + " uid " + cs.uid);
}
}
@@ -734,7 +734,7 @@
if (mCurMethod != null) {
if (!cs.sessionRequested) {
cs.sessionRequested = true;
- if (DEBUG) Log.v(TAG, "Creating new session for client " + cs);
+ if (DEBUG) Slog.v(TAG, "Creating new session for client " + cs);
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
MSG_CREATE_SESSION, mCurMethod,
new MethodCallback(mCurMethod)));
@@ -792,7 +792,7 @@
mCurId = info.getId();
mCurToken = new Binder();
try {
- if (DEBUG) Log.v(TAG, "Adding window token: " + mCurToken);
+ if (DEBUG) Slog.v(TAG, "Adding window token: " + mCurToken);
mIWindowManager.addWindowToken(mCurToken,
WindowManager.LayoutParams.TYPE_INPUT_METHOD);
} catch (RemoteException e) {
@@ -800,7 +800,7 @@
return new InputBindResult(null, mCurId, mCurSeq);
} else {
mCurIntent = null;
- Log.w(TAG, "Failure connecting to input method service: "
+ Slog.w(TAG, "Failure connecting to input method service: "
+ mCurIntent);
}
return null;
@@ -828,15 +828,15 @@
if (mCurIntent != null && name.equals(mCurIntent.getComponent())) {
mCurMethod = IInputMethod.Stub.asInterface(service);
if (mCurToken == null) {
- Log.w(TAG, "Service connected without a token!");
+ Slog.w(TAG, "Service connected without a token!");
unbindCurrentMethodLocked(false);
return;
}
- if (DEBUG) Log.v(TAG, "Initiating attach with token: " + mCurToken);
+ if (DEBUG) Slog.v(TAG, "Initiating attach with token: " + mCurToken);
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
MSG_ATTACH_TOKEN, mCurMethod, mCurToken));
if (mCurClient != null) {
- if (DEBUG) Log.v(TAG, "Creating first session while with client "
+ if (DEBUG) Slog.v(TAG, "Creating first session while with client "
+ mCurClient);
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
MSG_CREATE_SESSION, mCurMethod,
@@ -872,7 +872,7 @@
if (mCurToken != null) {
try {
- if (DEBUG) Log.v(TAG, "Removing window token: " + mCurToken);
+ if (DEBUG) Slog.v(TAG, "Removing window token: " + mCurToken);
mIWindowManager.removeWindowToken(mCurToken);
} catch (RemoteException e) {
}
@@ -901,7 +901,7 @@
public void onServiceDisconnected(ComponentName name) {
synchronized (mMethodMap) {
- if (DEBUG) Log.v(TAG, "Service disconnected: " + name
+ if (DEBUG) Slog.v(TAG, "Service disconnected: " + name
+ " mCurIntent=" + mCurIntent);
if (mCurMethod != null && mCurIntent != null
&& name.equals(mCurIntent.getComponent())) {
@@ -923,16 +923,16 @@
long ident = Binder.clearCallingIdentity();
try {
if (token == null || mCurToken != token) {
- Log.w(TAG, "Ignoring setInputMethod of token: " + token);
+ Slog.w(TAG, "Ignoring setInputMethod of token: " + token);
return;
}
synchronized (mMethodMap) {
if (iconId == 0) {
- if (DEBUG) Log.d(TAG, "hide the small icon for the input method");
+ if (DEBUG) Slog.d(TAG, "hide the small icon for the input method");
mStatusBar.setIconVisibility(mInputMethodIcon, false);
} else if (packageName != null) {
- if (DEBUG) Log.d(TAG, "show a small icon for the input method");
+ if (DEBUG) Slog.d(TAG, "show a small icon for the input method");
mInputMethodData.iconId = iconId;
mInputMethodData.iconPackage = packageName;
mStatusBar.updateIcon(mInputMethodIcon, mInputMethodData, null);
@@ -955,7 +955,7 @@
try {
setInputMethodLocked(id);
} catch (IllegalArgumentException e) {
- Log.w(TAG, "Unknown input method from prefs: " + id, e);
+ Slog.w(TAG, "Unknown input method from prefs: " + id, e);
mCurMethodId = null;
unbindCurrentMethodLocked(true);
}
@@ -1006,7 +1006,7 @@
// focus in the window manager, to allow this call to
// be made before input is started in it.
if (!mIWindowManager.inputMethodClientHasFocus(client)) {
- Log.w(TAG, "Ignoring showSoftInput of: " + client);
+ Slog.w(TAG, "Ignoring showSoftInput of: " + client);
return false;
}
} catch (RemoteException e) {
@@ -1014,7 +1014,7 @@
}
}
- if (DEBUG) Log.v(TAG, "Client requesting input be shown");
+ if (DEBUG) Slog.v(TAG, "Client requesting input be shown");
return showCurrentInputLocked(flags, resultReceiver);
}
} finally {
@@ -1070,7 +1070,7 @@
// focus in the window manager, to allow this call to
// be made before input is started in it.
if (!mIWindowManager.inputMethodClientHasFocus(client)) {
- Log.w(TAG, "Ignoring hideSoftInput of: " + client);
+ Slog.w(TAG, "Ignoring hideSoftInput of: " + client);
return false;
}
} catch (RemoteException e) {
@@ -1078,7 +1078,7 @@
}
}
- if (DEBUG) Log.v(TAG, "Client requesting input be hidden");
+ if (DEBUG) Slog.v(TAG, "Client requesting input be hidden");
return hideCurrentInputLocked(flags, resultReceiver);
}
} finally {
@@ -1089,12 +1089,12 @@
boolean hideCurrentInputLocked(int flags, ResultReceiver resultReceiver) {
if ((flags&InputMethodManager.HIDE_IMPLICIT_ONLY) != 0
&& (mShowExplicitlyRequested || mShowForced)) {
- if (DEBUG) Log.v(TAG,
+ if (DEBUG) Slog.v(TAG,
"Not hiding: explicit show not cancelled by non-explicit hide");
return false;
}
if (mShowForced && (flags&InputMethodManager.HIDE_NOT_ALWAYS) != 0) {
- if (DEBUG) Log.v(TAG,
+ if (DEBUG) Slog.v(TAG,
"Not hiding: forced show not cancelled by not-always hide");
return false;
}
@@ -1119,7 +1119,7 @@
long ident = Binder.clearCallingIdentity();
try {
synchronized (mMethodMap) {
- if (DEBUG) Log.v(TAG, "windowGainedFocus: " + client.asBinder()
+ if (DEBUG) Slog.v(TAG, "windowGainedFocus: " + client.asBinder()
+ " viewHasFocus=" + viewHasFocus
+ " isTextEditor=" + isTextEditor
+ " softInputMode=#" + Integer.toHexString(softInputMode)
@@ -1133,7 +1133,7 @@
// focus in the window manager, to allow this call to
// be made before input is started in it.
if (!mIWindowManager.inputMethodClientHasFocus(client)) {
- Log.w(TAG, "Client not active, ignoring focus gain of: " + client);
+ Slog.w(TAG, "Client not active, ignoring focus gain of: " + client);
return;
}
} catch (RemoteException e) {
@@ -1141,7 +1141,7 @@
}
if (mCurFocusedWindow == windowToken) {
- Log.w(TAG, "Window already focused, ignoring focus gain of: " + client);
+ Slog.w(TAG, "Window already focused, ignoring focus gain of: " + client);
return;
}
mCurFocusedWindow = windowToken;
@@ -1155,7 +1155,7 @@
// There is no focus view, and this window will
// be behind any soft input window, so hide the
// soft input window if it is shown.
- if (DEBUG) Log.v(TAG, "Unspecified window will hide input");
+ if (DEBUG) Slog.v(TAG, "Unspecified window will hide input");
hideCurrentInputLocked(InputMethodManager.HIDE_NOT_ALWAYS, null);
}
} else if (isTextEditor && (softInputMode &
@@ -1165,7 +1165,7 @@
WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION) != 0) {
// There is a focus view, and we are navigating forward
// into the window, so show the input window for the user.
- if (DEBUG) Log.v(TAG, "Unspecified window will show input");
+ if (DEBUG) Slog.v(TAG, "Unspecified window will show input");
showCurrentInputLocked(InputMethodManager.SHOW_IMPLICIT, null);
}
break;
@@ -1175,23 +1175,23 @@
case WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN:
if ((softInputMode &
WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION) != 0) {
- if (DEBUG) Log.v(TAG, "Window asks to hide input going forward");
+ if (DEBUG) Slog.v(TAG, "Window asks to hide input going forward");
hideCurrentInputLocked(0, null);
}
break;
case WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN:
- if (DEBUG) Log.v(TAG, "Window asks to hide input");
+ if (DEBUG) Slog.v(TAG, "Window asks to hide input");
hideCurrentInputLocked(0, null);
break;
case WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE:
if ((softInputMode &
WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION) != 0) {
- if (DEBUG) Log.v(TAG, "Window asks to show input going forward");
+ if (DEBUG) Slog.v(TAG, "Window asks to show input going forward");
showCurrentInputLocked(InputMethodManager.SHOW_IMPLICIT, null);
}
break;
case WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE:
- if (DEBUG) Log.v(TAG, "Window asks to always show input");
+ if (DEBUG) Slog.v(TAG, "Window asks to always show input");
showCurrentInputLocked(InputMethodManager.SHOW_IMPLICIT, null);
break;
}
@@ -1205,7 +1205,7 @@
synchronized (mMethodMap) {
if (mCurClient == null || client == null
|| mCurClient.client.asBinder() != client.asBinder()) {
- Log.w(TAG, "Ignoring showInputMethodDialogFromClient of: " + client);
+ Slog.w(TAG, "Ignoring showInputMethodDialogFromClient of: " + client);
}
mHandler.sendEmptyMessage(MSG_SHOW_IM_PICKER);
@@ -1223,7 +1223,7 @@
+ android.Manifest.permission.WRITE_SECURE_SETTINGS);
}
} else if (mCurToken != token) {
- Log.w(TAG, "Ignoring setInputMethod of token: " + token);
+ Slog.w(TAG, "Ignoring setInputMethod of token: " + token);
return;
}
@@ -1239,7 +1239,7 @@
public void hideMySoftInput(IBinder token, int flags) {
synchronized (mMethodMap) {
if (token == null || mCurToken != token) {
- Log.w(TAG, "Ignoring hideInputMethod of token: " + token);
+ Slog.w(TAG, "Ignoring hideInputMethod of token: " + token);
return;
}
long ident = Binder.clearCallingIdentity();
@@ -1254,7 +1254,7 @@
public void showMySoftInput(IBinder token, int flags) {
synchronized (mMethodMap) {
if (token == null || mCurToken != token) {
- Log.w(TAG, "Ignoring hideInputMethod of token: " + token);
+ Slog.w(TAG, "Ignoring hideInputMethod of token: " + token);
return;
}
long ident = Binder.clearCallingIdentity();
@@ -1270,7 +1270,7 @@
if (mEnabledSession != session) {
if (mEnabledSession != null) {
try {
- if (DEBUG) Log.v(TAG, "Disabling: " + mEnabledSession);
+ if (DEBUG) Slog.v(TAG, "Disabling: " + mEnabledSession);
mEnabledSession.method.setSessionEnabled(
mEnabledSession.session, false);
} catch (RemoteException e) {
@@ -1278,7 +1278,7 @@
}
mEnabledSession = session;
try {
- if (DEBUG) Log.v(TAG, "Enabling: " + mEnabledSession);
+ if (DEBUG) Slog.v(TAG, "Enabling: " + mEnabledSession);
session.method.setSessionEnabled(
session.session, true);
} catch (RemoteException e) {
@@ -1328,7 +1328,7 @@
case MSG_ATTACH_TOKEN:
args = (HandlerCaller.SomeArgs)msg.obj;
try {
- if (DEBUG) Log.v(TAG, "Sending attach of token: " + args.arg2);
+ if (DEBUG) Slog.v(TAG, "Sending attach of token: " + args.arg2);
((IInputMethod)args.arg1).attachToken((IBinder)args.arg2);
} catch (RemoteException e) {
}
@@ -1379,7 +1379,7 @@
((IInputMethodClient)args.arg1).onBindMethod(
(InputBindResult)args.arg2);
} catch (RemoteException e) {
- Log.w(TAG, "Client died receiving input method " + args.arg2);
+ Slog.w(TAG, "Client died receiving input method " + args.arg2);
}
return true;
}
@@ -1420,13 +1420,13 @@
ComponentName compName = new ComponentName(si.packageName, si.name);
if (!android.Manifest.permission.BIND_INPUT_METHOD.equals(
si.permission)) {
- Log.w(TAG, "Skipping input method " + compName
+ Slog.w(TAG, "Skipping input method " + compName
+ ": it does not require the permission "
+ android.Manifest.permission.BIND_INPUT_METHOD);
continue;
}
- if (DEBUG) Log.d(TAG, "Checking " + compName);
+ if (DEBUG) Slog.d(TAG, "Checking " + compName);
try {
InputMethodInfo p = new InputMethodInfo(mContext, ri);
@@ -1439,13 +1439,13 @@
}
if (DEBUG) {
- Log.d(TAG, "Found a third-party input method " + p);
+ Slog.d(TAG, "Found a third-party input method " + p);
}
} catch (XmlPullParserException e) {
- Log.w(TAG, "Unable to load input method " + compName, e);
+ Slog.w(TAG, "Unable to load input method " + compName, e);
} catch (IOException e) {
- Log.w(TAG, "Unable to load input method " + compName, e);
+ Slog.w(TAG, "Unable to load input method " + compName, e);
}
}
@@ -1461,7 +1461,7 @@
// ----------------------------------------------------------------------
void showInputMethodMenu() {
- if (DEBUG) Log.v(TAG, "Show switching menu");
+ if (DEBUG) Slog.v(TAG, "Show switching menu");
hideInputMethodMenu();
@@ -1471,7 +1471,7 @@
String lastInputMethodId = Settings.Secure.getString(context
.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
- if (DEBUG) Log.v(TAG, "Current IME: " + lastInputMethodId);
+ if (DEBUG) Slog.v(TAG, "Current IME: " + lastInputMethodId);
final List<InputMethodInfo> immis = getEnabledInputMethodList();
@@ -1540,7 +1540,7 @@
}
void hideInputMethodMenuLocked() {
- if (DEBUG) Log.v(TAG, "Hide switching menu");
+ if (DEBUG) Slog.v(TAG, "Hide switching menu");
if (mSwitchingDialog != null) {
mSwitchingDialog.dismiss();
diff --git a/services/java/com/android/server/Installer.java b/services/java/com/android/server/Installer.java
index 11297d5..1f34eba 100644
--- a/services/java/com/android/server/Installer.java
+++ b/services/java/com/android/server/Installer.java
@@ -20,7 +20,7 @@
import android.net.LocalSocketAddress;
import android.net.LocalSocket;
import android.util.Config;
-import android.util.Log;
+import android.util.Slog;
import java.io.IOException;
import java.io.InputStream;
@@ -41,7 +41,7 @@
if (mSocket != null) {
return true;
}
- Log.i(TAG, "connecting...");
+ Slog.i(TAG, "connecting...");
try {
mSocket = new LocalSocket();
@@ -60,7 +60,7 @@
}
private void disconnect() {
- Log.i(TAG,"disconnecting...");
+ Slog.i(TAG,"disconnecting...");
try {
if (mSocket != null) mSocket.close();
} catch (IOException ex) { }
@@ -82,16 +82,16 @@
try {
count = mIn.read(buffer, off, len - off);
if (count <= 0) {
- Log.e(TAG, "read error " + count);
+ Slog.e(TAG, "read error " + count);
break;
}
off += count;
} catch (IOException ex) {
- Log.e(TAG,"read exception");
+ Slog.e(TAG,"read exception");
break;
}
}
-// Log.i(TAG, "read "+len+" bytes");
+// Slog.i(TAG, "read "+len+" bytes");
if (off == len) return true;
disconnect();
return false;
@@ -103,7 +103,7 @@
if (!readBytes(buf, 2)) return false;
len = (((int) buf[0]) & 0xff) | ((((int) buf[1]) & 0xff) << 8);
if ((len < 1) || (len > 1024)) {
- Log.e(TAG,"invalid reply length ("+len+")");
+ Slog.e(TAG,"invalid reply length ("+len+")");
disconnect();
return false;
}
@@ -122,7 +122,7 @@
mOut.write(buf, 0, 2);
mOut.write(cmd, 0, len);
} catch (IOException ex) {
- Log.e(TAG,"write error");
+ Slog.e(TAG,"write error");
disconnect();
return false;
}
@@ -131,7 +131,7 @@
private synchronized String transaction(String cmd) {
if (!connect()) {
- Log.e(TAG, "connection failed");
+ Slog.e(TAG, "connection failed");
return "-1";
}
@@ -141,18 +141,18 @@
* write (this one). Try to reconnect and write
* the command one more time before giving up.
*/
- Log.e(TAG, "write command failed? reconnect!");
+ Slog.e(TAG, "write command failed? reconnect!");
if (!connect() || !writeCommand(cmd)) {
return "-1";
}
}
-// Log.i(TAG,"send: '"+cmd+"'");
+// Slog.i(TAG,"send: '"+cmd+"'");
if (readReply()) {
String s = new String(buf, 0, buflen);
-// Log.i(TAG,"recv: '"+s+"'");
+// Slog.i(TAG,"recv: '"+s+"'");
return s;
} else {
-// Log.i(TAG,"fail");
+// Slog.i(TAG,"fail");
return "-1";
}
}
diff --git a/services/java/com/android/server/IntentResolver.java b/services/java/com/android/server/IntentResolver.java
index d8c8c90..19b0a76 100644
--- a/services/java/com/android/server/IntentResolver.java
+++ b/services/java/com/android/server/IntentResolver.java
@@ -28,6 +28,7 @@
import java.util.Set;
import android.util.Log;
+import android.util.Slog;
import android.util.LogPrinter;
import android.util.Printer;
@@ -46,9 +47,9 @@
public void addFilter(F f) {
if (localLOGV) {
- Log.v(TAG, "Adding filter: " + f);
- f.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
- Log.v(TAG, " Building Lookup Maps:");
+ Slog.v(TAG, "Adding filter: " + f);
+ f.dump(new LogPrinter(Log.VERBOSE, TAG, Log.LOG_ID_SYSTEM), " ");
+ Slog.v(TAG, " Building Lookup Maps:");
}
mFilters.add(f);
@@ -72,9 +73,9 @@
void removeFilterInternal(F f) {
if (localLOGV) {
- Log.v(TAG, "Removing filter: " + f);
- f.dump(new LogPrinter(Log.VERBOSE, TAG), " ");
- Log.v(TAG, " Cleaning Lookup Maps:");
+ Slog.v(TAG, "Removing filter: " + f);
+ f.dump(new LogPrinter(Log.VERBOSE, TAG, Log.LOG_ID_SYSTEM), " ");
+ Slog.v(TAG, " Cleaning Lookup Maps:");
}
int numS = unregister_intent_filter(f, f.schemesIterator(),
@@ -188,7 +189,7 @@
final boolean debug = localLOGV ||
((intent.getFlags() & Intent.FLAG_DEBUG_LOG_RESOLUTION) != 0);
- if (debug) Log.v(
+ if (debug) Slog.v(
TAG, "Resolving type " + resolvedType + " scheme " + scheme
+ " of intent " + intent);
@@ -209,26 +210,26 @@
// Not a wild card, so we can just look for all filters that
// completely match or wildcards whose base type matches.
firstTypeCut = mTypeToFilter.get(resolvedType);
- if (debug) Log.v(TAG, "First type cut: " + firstTypeCut);
+ if (debug) Slog.v(TAG, "First type cut: " + firstTypeCut);
secondTypeCut = mWildTypeToFilter.get(baseType);
- if (debug) Log.v(TAG, "Second type cut: " + secondTypeCut);
+ if (debug) Slog.v(TAG, "Second type cut: " + secondTypeCut);
} else {
// We can match anything with our base type.
firstTypeCut = mBaseTypeToFilter.get(baseType);
- if (debug) Log.v(TAG, "First type cut: " + firstTypeCut);
+ if (debug) Slog.v(TAG, "First type cut: " + firstTypeCut);
secondTypeCut = mWildTypeToFilter.get(baseType);
- if (debug) Log.v(TAG, "Second type cut: " + secondTypeCut);
+ if (debug) Slog.v(TAG, "Second type cut: " + secondTypeCut);
}
// Any */* types always apply, but we only need to do this
// if the intent type was not already */*.
thirdTypeCut = mWildTypeToFilter.get("*");
- if (debug) Log.v(TAG, "Third type cut: " + thirdTypeCut);
+ if (debug) Slog.v(TAG, "Third type cut: " + thirdTypeCut);
} else if (intent.getAction() != null) {
// The intent specified any type ({@literal *}/*). This
// can be a whole heck of a lot of things, so as a first
// cut let's use the action instead.
firstTypeCut = mTypedActionToFilter.get(intent.getAction());
- if (debug) Log.v(TAG, "Typed Action list: " + firstTypeCut);
+ if (debug) Slog.v(TAG, "Typed Action list: " + firstTypeCut);
}
}
}
@@ -238,7 +239,7 @@
// on the authority and path by directly matching each resulting filter).
if (scheme != null) {
schemeCut = mSchemeToFilter.get(scheme);
- if (debug) Log.v(TAG, "Scheme list: " + schemeCut);
+ if (debug) Slog.v(TAG, "Scheme list: " + schemeCut);
}
// If the intent does not specify any data -- either a MIME type or
@@ -246,7 +247,7 @@
// data.
if (resolvedType == null && scheme == null && intent.getAction() != null) {
firstTypeCut = mActionToFilter.get(intent.getAction());
- if (debug) Log.v(TAG, "Action list: " + firstTypeCut);
+ if (debug) Slog.v(TAG, "Action list: " + firstTypeCut);
}
if (firstTypeCut != null) {
@@ -268,9 +269,9 @@
sortResults(finalList);
if (debug) {
- Log.v(TAG, "Final result list:");
+ Slog.v(TAG, "Final result list:");
for (R r : finalList) {
- Log.v(TAG, " " + r);
+ Slog.v(TAG, " " + r);
}
}
return finalList;
@@ -307,7 +308,7 @@
while (i.hasNext()) {
String name = (String)i.next();
num++;
- if (localLOGV) Log.v(TAG, prefix + name);
+ if (localLOGV) Slog.v(TAG, prefix + name);
String baseName = name;
final int slashpos = name.indexOf('/');
if (slashpos > 0) {
@@ -318,7 +319,7 @@
ArrayList<F> array = mTypeToFilter.get(name);
if (array == null) {
- //Log.v(TAG, "Creating new array for " + name);
+ //Slog.v(TAG, "Creating new array for " + name);
array = new ArrayList<F>();
mTypeToFilter.put(name, array);
}
@@ -327,7 +328,7 @@
if (slashpos > 0) {
array = mBaseTypeToFilter.get(baseName);
if (array == null) {
- //Log.v(TAG, "Creating new array for " + name);
+ //Slog.v(TAG, "Creating new array for " + name);
array = new ArrayList<F>();
mBaseTypeToFilter.put(baseName, array);
}
@@ -335,7 +336,7 @@
} else {
array = mWildTypeToFilter.get(baseName);
if (array == null) {
- //Log.v(TAG, "Creating new array for " + name);
+ //Slog.v(TAG, "Creating new array for " + name);
array = new ArrayList<F>();
mWildTypeToFilter.put(baseName, array);
}
@@ -356,7 +357,7 @@
while (i.hasNext()) {
String name = (String)i.next();
num++;
- if (localLOGV) Log.v(TAG, prefix + name);
+ if (localLOGV) Slog.v(TAG, prefix + name);
String baseName = name;
final int slashpos = name.indexOf('/');
if (slashpos > 0) {
@@ -392,10 +393,10 @@
while (i.hasNext()) {
String name = i.next();
num++;
- if (localLOGV) Log.v(TAG, prefix + name);
+ if (localLOGV) Slog.v(TAG, prefix + name);
ArrayList<F> array = dest.get(name);
if (array == null) {
- //Log.v(TAG, "Creating new array for " + name);
+ //Slog.v(TAG, "Creating new array for " + name);
array = new ArrayList<F>();
dest.put(name, array);
}
@@ -414,7 +415,7 @@
while (i.hasNext()) {
String name = i.next();
num++;
- if (localLOGV) Log.v(TAG, prefix + name);
+ if (localLOGV) Slog.v(TAG, prefix + name);
if (!remove_all_objects(dest.get(name), filter)) {
dest.remove(name);
}
@@ -447,12 +448,12 @@
for (i=0; i<N; i++) {
F filter = src.get(i);
int match;
- if (debug) Log.v(TAG, "Matching against filter " + filter);
+ if (debug) Slog.v(TAG, "Matching against filter " + filter);
// Do we already have this one?
if (!allowFilterResult(filter, dest)) {
if (debug) {
- Log.v(TAG, " Filter's target already added");
+ Slog.v(TAG, " Filter's target already added");
}
continue;
}
@@ -460,7 +461,7 @@
match = filter.match(
intent.getAction(), resolvedType, scheme, intent.getData(), categories, TAG);
if (match >= 0) {
- if (debug) Log.v(TAG, " Filter matched! match=0x" +
+ if (debug) Slog.v(TAG, " Filter matched! match=0x" +
Integer.toHexString(match));
if (!defaultOnly || filter.hasCategory(Intent.CATEGORY_DEFAULT)) {
final R oneResult = newResult(filter, match);
@@ -480,13 +481,13 @@
case IntentFilter.NO_MATCH_TYPE: reason = "type"; break;
default: reason = "unknown reason"; break;
}
- Log.v(TAG, " Filter did not match: " + reason);
+ Slog.v(TAG, " Filter did not match: " + reason);
}
}
}
if (dest.size() == 0 && hasNonDefaults) {
- Log.w(TAG, "resolveIntent failed: found match, but none with Intent.CATEGORY_DEFAULT");
+ Slog.w(TAG, "resolveIntent failed: found match, but none with Intent.CATEGORY_DEFAULT");
}
}
diff --git a/services/java/com/android/server/KeyInputQueue.java b/services/java/com/android/server/KeyInputQueue.java
index 2640cfb..0535d4c 100644
--- a/services/java/com/android/server/KeyInputQueue.java
+++ b/services/java/com/android/server/KeyInputQueue.java
@@ -22,7 +22,7 @@
import android.os.LatencyTimer;
import android.os.PowerManager;
import android.os.SystemClock;
-import android.util.Log;
+import android.util.Slog;
import android.util.SparseArray;
import android.util.Xml;
import android.view.Display;
@@ -32,7 +32,7 @@
import android.view.Surface;
import android.view.WindowManagerPolicy;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParser;
@@ -177,7 +177,7 @@
return;
}
- if (DEBUG_VIRTUAL_KEYS) Log.v(TAG, "computeHitRect for " + scancode
+ if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "computeHitRect for " + scancode
+ ": dev=" + dev + " absX=" + dev.absX + " absY=" + dev.absY);
lastDevice = dev;
@@ -211,11 +211,11 @@
String str = br.readLine();
if (str != null) {
String[] it = str.split(":");
- if (DEBUG_VIRTUAL_KEYS) Log.v(TAG, "***** VIRTUAL KEYS: " + it);
+ if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "***** VIRTUAL KEYS: " + it);
final int N = it.length-6;
for (int i=0; i<=N; i+=6) {
if (!"0x01".equals(it[i])) {
- Log.w(TAG, "Unknown virtual key type at elem #" + i
+ Slog.w(TAG, "Unknown virtual key type at elem #" + i
+ ": " + it[i]);
continue;
}
@@ -226,22 +226,22 @@
sb.centery = Integer.parseInt(it[i+3]);
sb.width = Integer.parseInt(it[i+4]);
sb.height = Integer.parseInt(it[i+5]);
- if (DEBUG_VIRTUAL_KEYS) Log.v(TAG, "Virtual key "
+ if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Virtual key "
+ sb.scancode + ": center=" + sb.centerx + ","
+ sb.centery + " size=" + sb.width + "x"
+ sb.height);
mVirtualKeys.add(sb);
} catch (NumberFormatException e) {
- Log.w(TAG, "Bad number at region " + i + " in: "
+ Slog.w(TAG, "Bad number at region " + i + " in: "
+ str, e);
}
}
}
br.close();
} catch (FileNotFoundException e) {
- Log.i(TAG, "No virtual keys found");
+ Slog.i(TAG, "No virtual keys found");
} catch (IOException e) {
- Log.w(TAG, "Error reading virtual keys", e);
+ Slog.w(TAG, "Error reading virtual keys", e);
}
}
@@ -264,14 +264,14 @@
}
String name = parser.getAttributeValue(null, "name");
if (name != null) {
- if (DEBUG) Log.v(TAG, "addExcludedDevice " + name);
+ if (DEBUG) Slog.v(TAG, "addExcludedDevice " + name);
addExcludedDevice(name);
}
}
} catch (FileNotFoundException e) {
// It's ok if the file does not exist.
} catch (Exception e) {
- Log.e(TAG, "Exception while parsing '" + confFile.getAbsolutePath() + "'", e);
+ Slog.e(TAG, "Exception while parsing '" + confFile.getAbsolutePath() + "'", e);
} finally {
try { if (confreader != null) confreader.close(); } catch (IOException e) { }
}
@@ -326,21 +326,21 @@
if ((d.classes&RawInputEvent.CLASS_TOUCHSCREEN) != 0) {
config.touchscreen
= Configuration.TOUCHSCREEN_FINGER;
- //Log.i("foo", "***** HAVE TOUCHSCREEN!");
+ //Slog.i("foo", "***** HAVE TOUCHSCREEN!");
}
if ((d.classes&RawInputEvent.CLASS_ALPHAKEY) != 0) {
config.keyboard
= Configuration.KEYBOARD_QWERTY;
- //Log.i("foo", "***** HAVE QWERTY!");
+ //Slog.i("foo", "***** HAVE QWERTY!");
}
if ((d.classes&RawInputEvent.CLASS_TRACKBALL) != 0) {
config.navigation
= Configuration.NAVIGATION_TRACKBALL;
- //Log.i("foo", "***** HAVE TRACKBALL!");
+ //Slog.i("foo", "***** HAVE TRACKBALL!");
} else if ((d.classes&RawInputEvent.CLASS_DPAD) != 0) {
config.navigation
= Configuration.NAVIGATION_DPAD;
- //Log.i("foo", "***** HAVE DPAD!");
+ //Slog.i("foo", "***** HAVE DPAD!");
}
}
}
@@ -491,7 +491,7 @@
Thread mThread = new Thread("InputDeviceReader") {
public void run() {
- if (DEBUG) Log.v(TAG, "InputDeviceReader.run()");
+ if (DEBUG) Slog.v(TAG, "InputDeviceReader.run()");
android.os.Process.setThreadPriority(
android.os.Process.THREAD_PRIORITY_URGENT_DISPLAY);
@@ -507,7 +507,7 @@
boolean configChanged = false;
if (false) {
- Log.i(TAG, "Input event: dev=0x"
+ Slog.i(TAG, "Input event: dev=0x"
+ Integer.toHexString(ev.deviceId)
+ " type=0x" + Integer.toHexString(ev.type)
+ " scancode=" + ev.scancode
@@ -531,7 +531,7 @@
} else {
// We won't do anything with this device.
mIgnoredDevices.put(ev.deviceId, di);
- Log.i(TAG, "Ignoring non-input device: id=0x"
+ Slog.i(TAG, "Ignoring non-input device: id=0x"
+ Integer.toHexString(di.id)
+ ", name=" + di.name);
}
@@ -539,7 +539,7 @@
} else if (ev.type == RawInputEvent.EV_DEVICE_REMOVED) {
synchronized (mFirst) {
if (false) {
- Log.i(TAG, "Device removed: id=0x"
+ Slog.i(TAG, "Device removed: id=0x"
+ Integer.toHexString(ev.deviceId));
}
di = mDevices.get(ev.deviceId);
@@ -551,7 +551,7 @@
} else if ((di=mIgnoredDevices.get(ev.deviceId)) != null) {
mIgnoredDevices.remove(ev.deviceId);
} else {
- Log.w(TAG, "Removing bad device id: "
+ Slog.w(TAG, "Removing bad device id: "
+ Integer.toHexString(ev.deviceId));
continue;
}
@@ -591,7 +591,7 @@
//curTime = gotOne ? ev.when : SystemClock.uptimeMillis();
final long curTime = SystemClock.uptimeMillis();
final long curTimeNano = System.nanoTime();
- //Log.i(TAG, "curTime=" + curTime + ", systemClock=" + SystemClock.uptimeMillis());
+ //Slog.i(TAG, "curTime=" + curTime + ", systemClock=" + SystemClock.uptimeMillis());
final int classes = di.classes;
final int type = ev.type;
@@ -646,14 +646,14 @@
di.mAbs.changed = true;
di.mAbs.mNextData[di.mAbs.mAddingPointerOffset
+ MotionEvent.SAMPLE_X] = ev.value;
- if (DEBUG_POINTERS) Log.v(TAG, "MT @"
+ if (DEBUG_POINTERS) Slog.v(TAG, "MT @"
+ di.mAbs.mAddingPointerOffset
+ " X:" + ev.value);
} else if (ev.scancode == RawInputEvent.ABS_MT_POSITION_Y) {
di.mAbs.changed = true;
di.mAbs.mNextData[di.mAbs.mAddingPointerOffset
+ MotionEvent.SAMPLE_Y] = ev.value;
- if (DEBUG_POINTERS) Log.v(TAG, "MT @"
+ if (DEBUG_POINTERS) Slog.v(TAG, "MT @"
+ di.mAbs.mAddingPointerOffset
+ " Y:" + ev.value);
} else if (ev.scancode == RawInputEvent.ABS_MT_WIDTH_MAJOR) {
@@ -711,7 +711,7 @@
+ MotionEvent.SAMPLE_PRESSURE] != 0) {
final int num = di.mAbs.mNextNumPointers+1;
di.mAbs.mNextNumPointers = num;
- if (DEBUG_POINTERS) Log.v(TAG,
+ if (DEBUG_POINTERS) Slog.v(TAG,
"MT_REPORT: now have " + num + " pointers");
final int newOffset = (num <= InputDevice.MAX_POINTERS)
? (num * MotionEvent.NUM_SAMPLE_DATA)
@@ -721,7 +721,7 @@
di.mAbs.mNextData[newOffset
+ MotionEvent.SAMPLE_PRESSURE] = 0;
} else {
- if (DEBUG_POINTERS) Log.v(TAG, "MT_REPORT: no pointer");
+ if (DEBUG_POINTERS) Slog.v(TAG, "MT_REPORT: no pointer");
}
}
@@ -775,14 +775,14 @@
me = ms.generateAbsMotion(di, curTime,
curTimeNano, mDisplay,
mOrientation, mGlobalMetaState);
- if (DEBUG_POINTERS) Log.v(TAG, "Absolute: x="
+ if (DEBUG_POINTERS) Slog.v(TAG, "Absolute: x="
+ di.mAbs.mNextData[MotionEvent.SAMPLE_X]
+ " y="
+ di.mAbs.mNextData[MotionEvent.SAMPLE_Y]
+ " ev=" + me);
if (me != null) {
if (WindowManagerPolicy.WATCH_POINTER) {
- Log.i(TAG, "Enqueueing: " + me);
+ Slog.i(TAG, "Enqueueing: " + me);
}
addLocked(di, curTimeNano, ev.flags,
RawInputEvent.CLASS_TOUCHSCREEN, me);
@@ -814,7 +814,7 @@
me = ms.generateRelMotion(di, curTime,
curTimeNano,
mOrientation, mGlobalMetaState);
- if (false) Log.v(TAG, "Relative: x="
+ if (false) Slog.v(TAG, "Relative: x="
+ di.mRel.mNextData[MotionEvent.SAMPLE_X]
+ " y="
+ di.mRel.mNextData[MotionEvent.SAMPLE_Y]
@@ -831,7 +831,7 @@
}
} catch (RuntimeException exc) {
- Log.e(TAG, "InputReaderThread uncaught exception", exc);
+ Slog.e(TAG, "InputReaderThread uncaught exception", exc);
}
}
}
@@ -849,7 +849,7 @@
&& absm.mNextData[MotionEvent.SAMPLE_X] <= absx.maxValue
&& absm.mNextData[MotionEvent.SAMPLE_Y] >= absy.minValue
&& absm.mNextData[MotionEvent.SAMPLE_Y] <= absy.maxValue) {
- if (DEBUG_VIRTUAL_KEYS) Log.v(TAG, "Input ("
+ if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Input ("
+ absm.mNextData[MotionEvent.SAMPLE_X]
+ "," + absm.mNextData[MotionEvent.SAMPLE_Y]
+ ") inside of display");
@@ -869,7 +869,7 @@
for (int i=0; i<N; i++) {
VirtualKey sb = mVirtualKeys.get(i);
sb.computeHitRect(dev, mDisplayWidth, mDisplayHeight);
- if (DEBUG_VIRTUAL_KEYS) Log.v(TAG, "Hit test ("
+ if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Hit test ("
+ absm.mNextData[MotionEvent.SAMPLE_X] + ","
+ absm.mNextData[MotionEvent.SAMPLE_Y] + ") in code "
+ sb.scancode + " - (" + sb.hitLeft
@@ -877,7 +877,7 @@
+ sb.hitBottom + ")");
if (sb.checkHit(absm.mNextData[MotionEvent.SAMPLE_X],
absm.mNextData[MotionEvent.SAMPLE_Y])) {
- if (DEBUG_VIRTUAL_KEYS) Log.v(TAG, "Hit!");
+ if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Hit!");
return sb;
}
}
@@ -900,7 +900,7 @@
vk.lastKeycode = scancodeToKeycode(di.id, vk.scancode);
ms.mLastNumPointers = ms.mNextNumPointers;
di.mKeyDownTime = curTime;
- if (DEBUG_VIRTUAL_KEYS) Log.v(TAG,
+ if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG,
"Generate key down for: " + vk.scancode
+ " (keycode=" + vk.lastKeycode + ")");
KeyEvent event = newKeyEvent(di, di.mKeyDownTime, curTime, true,
@@ -926,7 +926,7 @@
final InputDevice.AbsoluteInfo absx = di.absX;
final InputDevice.AbsoluteInfo absy = di.absY;
final InputDevice.MotionState absm = di.mAbs;
- Log.v(TAG, "Rejecting ("
+ Slog.v(TAG, "Rejecting ("
+ absm.mNextData[MotionEvent.SAMPLE_X] + ","
+ absm.mNextData[MotionEvent.SAMPLE_Y] + "): outside of ("
+ absx.minValue + "," + absy.minValue
@@ -947,7 +947,7 @@
if (ms.mNextNumPointers <= 0) {
mPressedVirtualKey = null;
ms.mLastNumPointers = 0;
- if (DEBUG_VIRTUAL_KEYS) Log.v(TAG, "Generate key up for: " + vk.scancode);
+ if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Generate key up for: " + vk.scancode);
KeyEvent event = newKeyEvent(di, di.mKeyDownTime, curTime, false,
vk.lastKeycode, 0, vk.scancode,
KeyEvent.FLAG_VIRTUAL_HARD_KEY);
@@ -962,7 +962,7 @@
// virtual key and start a pointer
// motion.
mPressedVirtualKey = null;
- if (DEBUG_VIRTUAL_KEYS) Log.v(TAG, "Cancel key up for: " + vk.scancode);
+ if (DEBUG_VIRTUAL_KEYS) Slog.v(TAG, "Cancel key up for: " + vk.scancode);
KeyEvent event = newKeyEvent(di, di.mKeyDownTime, curTime, false,
vk.lastKeycode, 0, vk.scancode,
KeyEvent.FLAG_CANCELED | KeyEvent.FLAG_VIRTUAL_HARD_KEY);
@@ -1138,12 +1138,12 @@
void recycleEvent(QueuedEvent ev) {
synchronized (mFirst) {
- //Log.i(TAG, "Recycle event: " + ev);
+ //Slog.i(TAG, "Recycle event: " + ev);
if (ev.event == ev.inputDevice.mAbs.currentMove) {
ev.inputDevice.mAbs.currentMove = null;
}
if (ev.event == ev.inputDevice.mRel.currentMove) {
- if (false) Log.i(TAG, "Detach rel " + ev.event);
+ if (false) Slog.i(TAG, "Detach rel " + ev.event);
ev.inputDevice.mRel.currentMove = null;
ev.inputDevice.mRel.mNextData[MotionEvent.SAMPLE_X] = 0;
ev.inputDevice.mRel.mNextData[MotionEvent.SAMPLE_Y] = 0;
@@ -1237,7 +1237,7 @@
InputDevice.AbsoluteInfo absPressure = null;
InputDevice.AbsoluteInfo absSize = null;
if (classes != 0) {
- Log.i(TAG, "Device added: id=0x" + Integer.toHexString(deviceId)
+ Slog.i(TAG, "Device added: id=0x" + Integer.toHexString(deviceId)
+ ", name=" + name
+ ", classes=" + Integer.toHexString(classes));
if ((classes&RawInputEvent.CLASS_TOUCHSCREEN_MT) != 0) {
@@ -1269,14 +1269,14 @@
InputDevice.AbsoluteInfo info = new InputDevice.AbsoluteInfo();
if (getAbsoluteInfo(id, channel, info)
&& info.minValue != info.maxValue) {
- Log.i(TAG, " " + name + ": min=" + info.minValue
+ Slog.i(TAG, " " + name + ": min=" + info.minValue
+ " max=" + info.maxValue
+ " flat=" + info.flat
+ " fuzz=" + info.fuzz);
info.range = info.maxValue-info.minValue;
return info;
}
- Log.i(TAG, " " + name + ": unknown values");
+ Slog.i(TAG, " " + name + ": unknown values");
return null;
}
private static native boolean readEvent(RawInputEvent outEvent);
diff --git a/services/java/com/android/server/LightsService.java b/services/java/com/android/server/LightsService.java
index 9cc74e8..c056eef 100644
--- a/services/java/com/android/server/LightsService.java
+++ b/services/java/com/android/server/LightsService.java
@@ -19,7 +19,7 @@
import android.content.Context;
import android.os.Handler;
import android.os.Message;
-import android.util.Log;
+import android.util.Slog;
public class LightsService {
private static final String TAG = "LightsService";
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index dd351be..cf2220c 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -65,6 +65,7 @@
import android.os.RemoteException;
import android.provider.Settings;
import android.util.Log;
+import android.util.Slog;
import android.util.PrintWriterPrinter;
import com.android.internal.location.GeocoderProxy;
@@ -353,7 +354,7 @@
public void binderDied() {
if (LOCAL_LOGV) {
- Log.v(TAG, "Location listener died");
+ Slog.v(TAG, "Location listener died");
}
synchronized (mLock) {
removeUpdatesLocked(this);
@@ -439,7 +440,7 @@
try {
_loadProvidersLocked();
} catch (Exception e) {
- Log.e(TAG, "Exception loading providers:", e);
+ Slog.e(TAG, "Exception loading providers:", e);
}
}
@@ -485,12 +486,15 @@
super();
mContext = context;
+ if (LOCAL_LOGV) {
+ Slog.v(TAG, "Constructed LocationManager Service");
+ }
+ }
+
+ void systemReady() {
+ // we defer starting up the service until the system is ready
Thread thread = new Thread(null, this, "LocationManagerService");
thread.start();
-
- if (LOCAL_LOGV) {
- Log.v(TAG, "Constructed LocationManager Service");
- }
}
private void initialize() {
@@ -588,14 +592,14 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "getAllProviders got exception:", e);
+ Slog.e(TAG, "getAllProviders got exception:", e);
return null;
}
}
private List<String> _getAllProvidersLocked() {
if (LOCAL_LOGV) {
- Log.v(TAG, "getAllProviders");
+ Slog.v(TAG, "getAllProviders");
}
ArrayList<String> out = new ArrayList<String>(mProviders.size());
for (int i = mProviders.size() - 1; i >= 0; i--) {
@@ -613,14 +617,14 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "getProviders got exception:", e);
+ Slog.e(TAG, "getProviders got exception:", e);
return null;
}
}
private List<String> _getProvidersLocked(boolean enabledOnly) {
if (LOCAL_LOGV) {
- Log.v(TAG, "getProviders");
+ Slog.v(TAG, "getProviders");
}
ArrayList<String> out = new ArrayList<String>(mProviders.size());
for (int i = mProviders.size() - 1; i >= 0; i--) {
@@ -778,7 +782,7 @@
receiver.getListener().asBinder().linkToDeath(receiver, 0);
}
} catch (RemoteException e) {
- Log.e(TAG, "linkToDeath failed:", e);
+ Slog.e(TAG, "linkToDeath failed:", e);
return null;
}
}
@@ -822,7 +826,7 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "requestUpdates got exception:", e);
+ Slog.e(TAG, "requestUpdates got exception:", e);
}
}
@@ -835,14 +839,14 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "requestUpdates got exception:", e);
+ Slog.e(TAG, "requestUpdates got exception:", e);
}
}
private void requestLocationUpdatesLocked(String provider,
long minTime, float minDistance, Receiver receiver) {
if (LOCAL_LOGV) {
- Log.v(TAG, "_requestLocationUpdates: listener = " + receiver);
+ Slog.v(TAG, "_requestLocationUpdates: listener = " + receiver);
}
LocationProviderInterface p = mProvidersByName.get(provider);
@@ -889,7 +893,7 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "removeUpdates got exception:", e);
+ Slog.e(TAG, "removeUpdates got exception:", e);
}
}
@@ -901,13 +905,13 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "removeUpdates got exception:", e);
+ Slog.e(TAG, "removeUpdates got exception:", e);
}
}
private void removeUpdatesLocked(Receiver receiver) {
if (LOCAL_LOGV) {
- Log.v(TAG, "_removeUpdates: listener = " + receiver);
+ Slog.v(TAG, "_removeUpdates: listener = " + receiver);
}
// so wakelock calls will succeed
@@ -983,7 +987,7 @@
try {
mGpsStatusProvider.addGpsStatusListener(listener);
} catch (RemoteException e) {
- Log.e(TAG, "mGpsStatusProvider.addGpsStatusListener failed", e);
+ Slog.e(TAG, "mGpsStatusProvider.addGpsStatusListener failed", e);
return false;
}
return true;
@@ -994,7 +998,7 @@
try {
mGpsStatusProvider.removeGpsStatusListener(listener);
} catch (Exception e) {
- Log.e(TAG, "mGpsStatusProvider.removeGpsStatusListener failed", e);
+ Slog.e(TAG, "mGpsStatusProvider.removeGpsStatusListener failed", e);
}
}
}
@@ -1034,7 +1038,7 @@
}
catch (RemoteException e)
{
- Log.e(TAG, "RemoteException in LocationManagerService.sendNiResponse");
+ Slog.e(TAG, "RemoteException in LocationManagerService.sendNiResponse");
return false;
}
}
@@ -1129,7 +1133,7 @@
alert.isInProximity(latitude, longitude, accuracy);
if (!entered && inProximity) {
if (LOCAL_LOGV) {
- Log.v(TAG, "Entered alert");
+ Slog.v(TAG, "Entered alert");
}
mProximitiesEntered.add(alert);
Intent enteredIntent = new Intent();
@@ -1145,7 +1149,7 @@
}
} catch (PendingIntent.CanceledException e) {
if (LOCAL_LOGV) {
- Log.v(TAG, "Canceled proximity alert: " + alert, e);
+ Slog.v(TAG, "Canceled proximity alert: " + alert, e);
}
if (intentsToRemove == null) {
intentsToRemove = new ArrayList<PendingIntent>();
@@ -1154,7 +1158,7 @@
}
} else if (entered && !inProximity) {
if (LOCAL_LOGV) {
- Log.v(TAG, "Exited alert");
+ Slog.v(TAG, "Exited alert");
}
mProximitiesEntered.remove(alert);
Intent exitedIntent = new Intent();
@@ -1170,7 +1174,7 @@
}
} catch (PendingIntent.CanceledException e) {
if (LOCAL_LOGV) {
- Log.v(TAG, "Canceled proximity alert: " + alert, e);
+ Slog.v(TAG, "Canceled proximity alert: " + alert, e);
}
if (intentsToRemove == null) {
intentsToRemove = new ArrayList<PendingIntent>();
@@ -1181,7 +1185,7 @@
} else {
// Mark alert for expiration
if (LOCAL_LOGV) {
- Log.v(TAG, "Expiring proximity alert: " + alert);
+ Slog.v(TAG, "Expiring proximity alert: " + alert);
}
if (intentsToRemove == null) {
intentsToRemove = new ArrayList<PendingIntent>();
@@ -1238,14 +1242,14 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "addProximityAlert got exception:", e);
+ Slog.e(TAG, "addProximityAlert got exception:", e);
}
}
private void addProximityAlertLocked(double latitude, double longitude,
float radius, long expiration, PendingIntent intent) {
if (LOCAL_LOGV) {
- Log.v(TAG, "addProximityAlert: latitude = " + latitude +
+ Slog.v(TAG, "addProximityAlert: latitude = " + latitude +
", longitude = " + longitude +
", expiration = " + expiration +
", intent = " + intent);
@@ -1283,13 +1287,13 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "removeProximityAlert got exception:", e);
+ Slog.e(TAG, "removeProximityAlert got exception:", e);
}
}
private void removeProximityAlertLocked(PendingIntent intent) {
if (LOCAL_LOGV) {
- Log.v(TAG, "removeProximityAlert: intent = " + intent);
+ Slog.v(TAG, "removeProximityAlert: intent = " + intent);
}
mProximityAlerts.remove(intent);
@@ -1313,7 +1317,7 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "_getProviderInfo got exception:", e);
+ Slog.e(TAG, "_getProviderInfo got exception:", e);
return null;
}
}
@@ -1348,7 +1352,7 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "isProviderEnabled got exception:", e);
+ Slog.e(TAG, "isProviderEnabled got exception:", e);
return false;
}
}
@@ -1383,7 +1387,7 @@
} catch (SecurityException se) {
throw se;
} catch (Exception e) {
- Log.e(TAG, "getLastKnownLocation got exception:", e);
+ Slog.e(TAG, "getLastKnownLocation got exception:", e);
return null;
}
}
@@ -1470,7 +1474,7 @@
lastLoc.set(location);
}
if (!receiver.callLocationChangedLocked(location)) {
- Log.w(TAG, "RemoteException calling onLocationChanged on " + receiver);
+ Slog.w(TAG, "RemoteException calling onLocationChanged on " + receiver);
if (deadReceivers == null) {
deadReceivers = new ArrayList<Receiver>();
}
@@ -1484,7 +1488,7 @@
r.mLastStatusBroadcast = newStatusUpdateTime;
if (!receiver.callStatusChangedLocked(provider, status, extras)) {
- Log.w(TAG, "RemoteException calling onStatusChanged on " + receiver);
+ Slog.w(TAG, "RemoteException calling onStatusChanged on " + receiver);
if (deadReceivers == null) {
deadReceivers = new ArrayList<Receiver>();
}
@@ -1532,7 +1536,7 @@
}
} catch (Exception e) {
// Log, don't crash!
- Log.e(TAG, "Exception in LocationWorkerHandler.handleMessage:", e);
+ Slog.e(TAG, "Exception in LocationWorkerHandler.handleMessage:", e);
}
}
}
@@ -1639,7 +1643,7 @@
} catch (Exception e) {
// This is to catch a runtime exception thrown when we try to release an
// already released lock.
- Log.e(TAG, "exception in acquireWakeLock()", e);
+ Slog.e(TAG, "exception in acquireWakeLock()", e);
}
}
}
@@ -1659,7 +1663,7 @@
} catch (Exception e) {
// This is to catch a runtime exception thrown when we try to release an
// already released lock.
- Log.e(TAG, "exception in releaseWakeLock()", e);
+ Slog.e(TAG, "exception in releaseWakeLock()", e);
}
}
}
@@ -1850,7 +1854,7 @@
private void log(String log) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
- Log.d(TAG, log);
+ Slog.d(TAG, log);
}
}
diff --git a/services/java/com/android/server/MasterClearReceiver.java b/services/java/com/android/server/MasterClearReceiver.java
index 0417e71..4d04cee 100644
--- a/services/java/com/android/server/MasterClearReceiver.java
+++ b/services/java/com/android/server/MasterClearReceiver.java
@@ -21,6 +21,7 @@
import android.content.Intent;
import android.os.RecoverySystem;
import android.util.Log;
+import android.util.Slog;
import java.io.IOException;
@@ -31,13 +32,13 @@
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_REMOTE_INTENT)) {
if (!"google.com".equals(intent.getStringExtra("from"))) {
- Log.w(TAG, "Ignoring master clear request -- not from trusted server.");
+ Slog.w(TAG, "Ignoring master clear request -- not from trusted server.");
return;
}
}
try {
- Log.w(TAG, "!!! FACTORY RESET !!!");
+ Slog.w(TAG, "!!! FACTORY RESET !!!");
if (intent.hasExtra("enableEFS")) {
RecoverySystem.rebootToggleEFS(context, intent.getBooleanExtra("enableEFS", false));
} else {
@@ -45,7 +46,7 @@
}
Log.wtf(TAG, "Still running after master clear?!");
} catch (IOException e) {
- Log.e(TAG, "Can't perform master clear/factory reset", e);
+ Slog.e(TAG, "Can't perform master clear/factory reset", e);
}
}
}
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index 39ee314..41f3850 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -16,32 +16,29 @@
package com.android.server;
+import com.android.server.am.ActivityManagerService;
+
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
-import android.content.res.Resources;
import android.net.Uri;
import android.os.storage.IMountService;
import android.os.storage.IMountServiceListener;
import android.os.storage.StorageResultCode;
+import android.os.Handler;
+import android.os.Message;
import android.os.RemoteException;
import android.os.IBinder;
import android.os.Environment;
import android.os.ServiceManager;
import android.os.SystemClock;
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 java.util.HashSet;
-import java.io.File;
-import java.io.FileReader;
-
/**
* MountService implements back-end services for platform storage
* management.
@@ -114,14 +111,140 @@
private String mLegacyState = Environment.MEDIA_REMOVED;
private PackageManagerService mPms;
private boolean mUmsEnabling;
- private ArrayList<MountServiceBinderListener> mListeners;
- private boolean mBooted;
- private boolean mReady;
+ // Used as a lock for methods that register/unregister listeners.
+ final private ArrayList<MountServiceBinderListener> mListeners =
+ new ArrayList<MountServiceBinderListener>();
+ private boolean mBooted = false;
+ private boolean mReady = false;
+ private boolean mSendUmsConnectedOnBoot = false;
/**
* Private hash of currently mounted secure containers.
+ * Used as a lock in methods to manipulate secure containers.
*/
- private HashSet<String> mAsecMountSet = new HashSet<String>();
+ final private HashSet<String> mAsecMountSet = new HashSet<String>();
+
+ private static final int H_UNMOUNT_PM_UPDATE = 1;
+ private static final int H_UNMOUNT_PM_DONE = 2;
+ private static final int H_UNMOUNT_MS = 3;
+ private static final int RETRY_UNMOUNT_DELAY = 30; // in ms
+ private static final int MAX_UNMOUNT_RETRIES = 4;
+
+ private IntentFilter mPmFilter = new IntentFilter(
+ Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
+ private BroadcastReceiver mPmReceiver = new BroadcastReceiver() {
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+ if (Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(action)) {
+ mHandler.sendEmptyMessage(H_UNMOUNT_PM_DONE);
+ }
+ }
+ };
+
+ class UnmountCallBack {
+ String path;
+ int retries;
+ boolean force;
+
+ UnmountCallBack(String path, boolean force) {
+ retries = 0;
+ this.path = path;
+ this.force = force;
+ }
+
+ void handleFinished() {
+ doUnmountVolume(path, true);
+ }
+ }
+
+ class UmsEnableCallBack extends UnmountCallBack {
+ String method;
+
+ UmsEnableCallBack(String path, String method, boolean force) {
+ super(path, force);
+ this.method = method;
+ }
+
+ @Override
+ void handleFinished() {
+ super.handleFinished();
+ doShareUnshareVolume(path, method, true);
+ }
+ }
+
+ final private Handler mHandler = new Handler() {
+ ArrayList<UnmountCallBack> mForceUnmounts = new ArrayList<UnmountCallBack>();
+
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case H_UNMOUNT_PM_UPDATE: {
+ UnmountCallBack ucb = (UnmountCallBack) msg.obj;
+ mForceUnmounts.add(ucb);
+ mContext.registerReceiver(mPmReceiver, mPmFilter);
+ boolean hasExtPkgs = mPms.updateExternalMediaStatus(false);
+ if (!hasExtPkgs) {
+ // Unregister right away
+ mHandler.sendEmptyMessage(H_UNMOUNT_PM_DONE);
+ }
+ break;
+ }
+ case H_UNMOUNT_PM_DONE: {
+ // Unregister receiver
+ mContext.unregisterReceiver(mPmReceiver);
+ UnmountCallBack ucb = mForceUnmounts.get(0);
+ if (ucb == null || ucb.path == null) {
+ // Just ignore
+ return;
+ }
+ String path = ucb.path;
+ boolean done = false;
+ if (!ucb.force) {
+ done = true;
+ } else {
+ int pids[] = getStorageUsers(path);
+ if (pids == null || pids.length == 0) {
+ done = true;
+ } else {
+ // Kill processes holding references first
+ ActivityManagerService ams = (ActivityManagerService)
+ ServiceManager.getService("activity");
+ // Eliminate system process here?
+ boolean ret = ams.killPidsForMemory(pids);
+ if (ret) {
+ // Confirm if file references have been freed.
+ pids = getStorageUsers(path);
+ if (pids == null || pids.length == 0) {
+ done = true;
+ }
+ }
+ }
+ }
+ if (done) {
+ mForceUnmounts.remove(0);
+ mHandler.sendMessage(mHandler.obtainMessage(H_UNMOUNT_MS,
+ ucb));
+ } else {
+ if (ucb.retries >= MAX_UNMOUNT_RETRIES) {
+ Log.i(TAG, "Cannot unmount inspite of " +
+ MAX_UNMOUNT_RETRIES + " to unmount media");
+ // Send final broadcast indicating failure to unmount.
+ } else {
+ mHandler.sendMessageDelayed(
+ mHandler.obtainMessage(H_UNMOUNT_PM_DONE,
+ ucb.retries++),
+ RETRY_UNMOUNT_DELAY);
+ }
+ }
+ break;
+ }
+ case H_UNMOUNT_MS : {
+ UnmountCallBack ucb = (UnmountCallBack) msg.obj;
+ ucb.handleFinished();
+ break;
+ }
+ }
+ }
+ };
private void waitForReady() {
while (mReady == false) {
@@ -162,6 +285,14 @@
Log.e(TAG, String.format("Boot-time mount failed (%d)", rc));
}
}
+ /*
+ * If UMS is connected in boot, send the connected event
+ * now that we're up.
+ */
+ if (mSendUmsConnectedOnBoot) {
+ sendUmsIntent(true);
+ mSendUmsConnectedOnBoot = false;
+ }
} catch (Exception ex) {
Log.e(TAG, "Boot-time mount exception", ex);
}
@@ -188,52 +319,18 @@
}
}
- private int doShareUnshareVolume(String path, String method, boolean enable) {
- validatePermission(android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS);
-
+ private void doShareUnshareVolume(String path, String method, boolean enable) {
// TODO: Add support for multiple share methods
if (!method.equals("ums")) {
throw new IllegalArgumentException(String.format("Method %s not supported", method));
}
- /*
- * If the volume is mounted and we're enabling then unmount it
- */
- String vs = getVolumeState(path);
- if (enable && vs.equals(Environment.MEDIA_MOUNTED)) {
- mUmsEnabling = enable; // Override for isUsbMassStorageEnabled()
- int rc = doUnmountVolume(path, true);
- mUmsEnabling = false; // Clear override
- if (rc != StorageResultCode.OperationSucceeded) {
- Log.e(TAG, String.format("Failed to unmount before enabling UMS (%d)", rc));
- return rc;
- }
- }
-
try {
mConnector.doCommand(String.format(
"volume %sshare %s %s", (enable ? "" : "un"), path, method));
} catch (NativeDaemonConnectorException e) {
Log.e(TAG, "Failed to share/unshare", e);
- return StorageResultCode.OperationFailedInternalError;
}
-
- /*
- * If we disabled UMS then mount the volume
- */
- if (!enable) {
- if (doMountVolume(path) != StorageResultCode.OperationSucceeded) {
- Log.e(TAG, String.format(
- "Failed to remount %s after disabling share method %s", path, method));
- /*
- * Even though the mount failed, the unshare didn't so don't indicate an error.
- * The mountVolume() call will have set the storage state and sent the necessary
- * broadcasts.
- */
- }
- }
-
- return StorageResultCode.OperationSucceeded;
}
private void updatePublicVolumeState(String path, String state) {
@@ -437,7 +534,7 @@
if (!vs.equals(
Environment.MEDIA_BAD_REMOVAL) && !vs.equals(
Environment.MEDIA_NOFS) && !vs.equals(
- Environment.MEDIA_UNMOUNTABLE) && !mUmsEnabling) {
+ Environment.MEDIA_UNMOUNTABLE) && !getUmsEnabling()) {
updatePublicVolumeState(path, Environment.MEDIA_UNMOUNTED);
in = new Intent(Intent.ACTION_MEDIA_UNMOUNTED, Uri.parse("file://" + path));
}
@@ -545,14 +642,28 @@
return rc;
}
+ /*
+ * If force is not set, we do not unmount if there are
+ * processes holding references to the volume about to be unmounted.
+ * If force is set, all the processes holding references need to be
+ * killed via the ActivityManager before actually unmounting the volume.
+ * This might even take a while and might be retried after timed delays
+ * to make sure we dont end up in an instable state and kill some core
+ * processes.
+ */
private int doUnmountVolume(String path, boolean force) {
if (!getVolumeState(path).equals(Environment.MEDIA_MOUNTED)) {
return VoldResponseCode.OpFailedVolNotMounted;
}
+ // We unmounted the volume. No of the asec containers are available now.
+ synchronized (mAsecMountSet) {
+ mAsecMountSet.clear();
+ }
// Notify PackageManager of potential media removal and deal with
// return code later on. The caller of this api should be aware or have been
// notified that the applications installed on the media will be killed.
+ // Redundant probably. But no harm in updating state again.
mPms.updateExternalMediaStatus(false);
try {
mConnector.doCommand(String.format(
@@ -636,16 +747,17 @@
}
if (mBooted == true) {
- Intent intent;
- if (avail) {
- intent = new Intent(Intent.ACTION_UMS_CONNECTED);
- } else {
- intent = new Intent(Intent.ACTION_UMS_DISCONNECTED);
- }
- mContext.sendBroadcast(intent);
+ sendUmsIntent(avail);
+ } else {
+ mSendUmsConnectedOnBoot = avail;
}
}
+ private void sendUmsIntent(boolean c) {
+ mContext.sendBroadcast(
+ new Intent((c ? Intent.ACTION_UMS_CONNECTED : Intent.ACTION_UMS_DISCONNECTED)));
+ }
+
private void validatePermission(String perm) {
if (mContext.checkCallingOrSelfPermission(perm) != PackageManager.PERMISSION_GRANTED) {
throw new SecurityException(String.format("Requires %s permission", perm));
@@ -666,8 +778,6 @@
mContext.registerReceiver(mBroadcastReceiver,
new IntentFilter(Intent.ACTION_BOOT_COMPLETED), null, null);
- mListeners = new ArrayList<MountServiceBinderListener>();
-
/*
* Vold does not run in the simulator, so pretend the connector thread
* ran and did its thing.
@@ -727,9 +837,7 @@
* the UMS host could have dirty FAT cache entries
* yet to flush.
*/
- if (setUsbMassStorageEnabled(false) != StorageResultCode.OperationSucceeded) {
- Log.e(TAG, "UMS disable on shutdown failed");
- }
+ setUsbMassStorageEnabled(false);
} else if (state.equals(Environment.MEDIA_CHECKING)) {
/*
* If the media is being checked, then we need to wait for
@@ -761,19 +869,62 @@
}
}
+ private boolean getUmsEnabling() {
+ synchronized (mListeners) {
+ return mUmsEnabling;
+ }
+ }
+
+ private void setUmsEnabling(boolean enable) {
+ synchronized (mListeners) {
+ mUmsEnabling = true;
+ }
+ }
+
public boolean isUsbMassStorageConnected() {
waitForReady();
- if (mUmsEnabling) {
+ if (getUmsEnabling()) {
return true;
}
return doGetShareMethodAvailable("ums");
}
- public int setUsbMassStorageEnabled(boolean enable) {
+ public void setUsbMassStorageEnabled(boolean enable) {
waitForReady();
+ validatePermission(android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS);
- return doShareUnshareVolume(Environment.getExternalStorageDirectory().getPath(), "ums", enable);
+ // TODO: Add support for multiple share methods
+
+ /*
+ * If the volume is mounted and we're enabling then unmount it
+ */
+ String path = Environment.getExternalStorageDirectory().getPath();
+ String vs = getVolumeState(path);
+ String method = "ums";
+ if (enable && vs.equals(Environment.MEDIA_MOUNTED)) {
+ // Override for isUsbMassStorageEnabled()
+ setUmsEnabling(enable);
+ UmsEnableCallBack umscb = new UmsEnableCallBack(path, method, true);
+ mHandler.sendMessage(mHandler.obtainMessage(H_UNMOUNT_PM_UPDATE, umscb));
+ // Clear override
+ setUmsEnabling(false);
+ }
+ /*
+ * If we disabled UMS then mount the volume
+ */
+ if (!enable) {
+ doShareUnshareVolume(path, method, enable);
+ if (doMountVolume(path) != StorageResultCode.OperationSucceeded) {
+ Log.e(TAG, "Failed to remount " + path +
+ " after disabling share method " + method);
+ /*
+ * Even though the mount failed, the unshare didn't so don't indicate an error.
+ * The mountVolume() call will have set the storage state and sent the necessary
+ * broadcasts.
+ */
+ }
+ }
}
public boolean isUsbMassStorageEnabled() {
@@ -804,11 +955,12 @@
return doMountVolume(path);
}
- public int unmountVolume(String path, boolean force) {
+ public void unmountVolume(String path, boolean force) {
validatePermission(android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS);
waitForReady();
- return doUnmountVolume(path, force);
+ UnmountCallBack ucb = new UnmountCallBack(path, force);
+ mHandler.sendMessage(mHandler.obtainMessage(H_UNMOUNT_PM_UPDATE, ucb));
}
public int formatVolume(String path) {
@@ -1003,7 +1155,11 @@
warnOnNotMounted();
synchronized (mAsecMountSet) {
- if (mAsecMountSet.contains(oldId)) {
+ /*
+ * Because a mounted container has active internal state which cannot be
+ * changed while active, we must ensure both ids are not currently mounted.
+ */
+ if (mAsecMountSet.contains(oldId) || mAsecMountSet.contains(newId)) {
return StorageResultCode.OperationFailedStorageMounted;
}
}
@@ -1015,6 +1171,13 @@
} catch (NativeDaemonConnectorException e) {
rc = StorageResultCode.OperationFailedInternalError;
}
+ if (rc == StorageResultCode.OperationSucceeded) {
+ synchronized (mAsecMountSet) {
+ if (!mAsecMountSet.contains(newId)) {
+ mAsecMountSet.add(newId);
+ }
+ }
+ }
return rc;
}
diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java
index ceae973..39c847a 100644
--- a/services/java/com/android/server/NativeDaemonConnector.java
+++ b/services/java/com/android/server/NativeDaemonConnector.java
@@ -21,7 +21,7 @@
import android.os.Environment;
import android.os.SystemClock;
import android.os.SystemProperties;
-import android.util.Log;
+import android.util.Slog;
import java.io.IOException;
import java.io.InputStream;
@@ -80,7 +80,7 @@
try {
listenToSocket();
} catch (Exception e) {
- Log.e(TAG, "Error in NativeDaemonConnector", e);
+ Slog.e(TAG, "Error in NativeDaemonConnector", e);
SystemClock.sleep(5000);
}
}
@@ -110,7 +110,7 @@
for (int i = 0; i < count; i++) {
if (buffer[i] == 0) {
String event = new String(buffer, start, i - start);
- if (LOCAL_LOGD) Log.d(TAG, String.format("RCV <- {%s}", event));
+ if (LOCAL_LOGD) Slog.d(TAG, String.format("RCV <- {%s}", event));
String[] tokens = event.split(" ");
try {
@@ -119,29 +119,29 @@
if (code >= ResponseCode.UnsolicitedInformational) {
try {
if (!mCallbacks.onEvent(code, event, tokens)) {
- Log.w(TAG, String.format(
+ Slog.w(TAG, String.format(
"Unhandled event (%s)", event));
}
} catch (Exception ex) {
- Log.e(TAG, String.format(
+ Slog.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);
+ Slog.e(TAG, "Failed to put response onto queue", ex);
}
}
} catch (NumberFormatException nfe) {
- Log.w(TAG, String.format("Bad msg (%s)", event));
+ Slog.w(TAG, String.format("Bad msg (%s)", event));
}
start = i + 1;
}
}
}
} catch (IOException ex) {
- Log.e(TAG, "Communications error", ex);
+ Slog.e(TAG, "Communications error", ex);
throw ex;
} finally {
synchronized (this) {
@@ -149,7 +149,7 @@
try {
mOutputStream.close();
} catch (IOException e) {
- Log.w(TAG, "Failed closing output stream", e);
+ Slog.w(TAG, "Failed closing output stream", e);
}
mOutputStream = null;
}
@@ -160,7 +160,7 @@
socket.close();
}
} catch (IOException ex) {
- Log.w(TAG, "Failed closing socket", ex);
+ Slog.w(TAG, "Failed closing socket", ex);
}
}
}
@@ -177,9 +177,9 @@
*/
private void sendCommand(String command, String argument) {
synchronized (this) {
- if (LOCAL_LOGD) Log.d(TAG, String.format("SND -> {%s} {%s}", command, argument));
+ if (LOCAL_LOGD) Slog.d(TAG, String.format("SND -> {%s} {%s}", command, argument));
if (mOutputStream == null) {
- Log.e(TAG, "No connection to daemon", new IllegalStateException());
+ Slog.e(TAG, "No connection to daemon", new IllegalStateException());
} else {
StringBuilder builder = new StringBuilder(command);
if (argument != null) {
@@ -190,7 +190,7 @@
try {
mOutputStream.write(builder.toString().getBytes());
} catch (IOException ex) {
- Log.e(TAG, "IOException in sendCommand", ex);
+ Slog.e(TAG, "IOException in sendCommand", ex);
}
}
}
@@ -210,7 +210,7 @@
while (!complete) {
try {
String line = mResponseQueue.take();
- if (LOCAL_LOGD) Log.d(TAG, String.format("RSP <- {%s}", line));
+ if (LOCAL_LOGD) Slog.d(TAG, String.format("RSP <- {%s}", line));
String[] tokens = line.split(" ");
try {
code = Integer.parseInt(tokens[0]);
@@ -224,7 +224,7 @@
}
response.add(line);
} catch (InterruptedException ex) {
- Log.e(TAG, "Failed to process response", ex);
+ Slog.e(TAG, "Failed to process response", ex);
}
}
@@ -258,12 +258,12 @@
if (code == expectedResponseCode) {
rdata[idx++] = line.substring(tok[0].length() + 1);
} else if (code == NativeDaemonConnector.ResponseCode.CommandOkay) {
- if (LOCAL_LOGD) Log.d(TAG, String.format("List terminated with {%s}", line));
+ if (LOCAL_LOGD) Slog.d(TAG, String.format("List terminated with {%s}", line));
int last = rsp.size() -1;
if (i != last) {
- Log.w(TAG, String.format("Recv'd %d lines after end of list {%s}", (last-i), cmd));
+ Slog.w(TAG, String.format("Recv'd %d lines after end of list {%s}", (last-i), cmd));
for (int j = i; j <= last ; j++) {
- Log.w(TAG, String.format("ExtraData <%s>", rsp.get(i)));
+ Slog.w(TAG, String.format("ExtraData <%s>", rsp.get(i)));
}
}
return rdata;
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java
index 958d089..6d121c3 100644
--- a/services/java/com/android/server/NetworkManagementService.java
+++ b/services/java/com/android/server/NetworkManagementService.java
@@ -30,7 +30,7 @@
import android.os.Handler;
import android.os.SystemProperties;
import android.text.TextUtils;
-import android.util.Log;
+import android.util.Slog;
import java.util.ArrayList;
import java.util.StringTokenizer;
import android.provider.Settings;
@@ -99,12 +99,12 @@
}
public void registerObserver(INetworkManagementEventObserver obs) {
- Log.d(TAG, "Registering observer");
+ Slog.d(TAG, "Registering observer");
mObservers.add(obs);
}
public void unregisterObserver(INetworkManagementEventObserver obs) {
- Log.d(TAG, "Unregistering observer");
+ Slog.d(TAG, "Unregistering observer");
mObservers.remove(mObservers.indexOf(obs));
}
@@ -116,7 +116,7 @@
try {
obs.interfaceLinkStatusChanged(iface, link);
} catch (Exception ex) {
- Log.w(TAG, "Observer notifier failed", ex);
+ Slog.w(TAG, "Observer notifier failed", ex);
}
}
}
@@ -129,7 +129,7 @@
try {
obs.interfaceAdded(iface);
} catch (Exception ex) {
- Log.w(TAG, "Observer notifier failed", ex);
+ Slog.w(TAG, "Observer notifier failed", ex);
}
}
}
@@ -142,7 +142,7 @@
try {
obs.interfaceRemoved(iface);
} catch (Exception ex) {
- Log.w(TAG, "Observer notifier failed", ex);
+ Slog.w(TAG, "Observer notifier failed", ex);
}
}
}
@@ -224,7 +224,7 @@
public InterfaceConfiguration getInterfaceConfig(String iface) throws IllegalStateException {
String rsp = mConnector.doCommand("interface getcfg " + iface).get(0);
- Log.d(TAG, String.format("rsp <%s>", rsp));
+ Slog.d(TAG, String.format("rsp <%s>", rsp));
// Rsp: 213 xx:xx:xx:xx:xx:xx yyy.yyy.yyy.yyy zzz.zzz.zzz.zzz [flag1 flag2 flag3]
StringTokenizer st = new StringTokenizer(rsp);
@@ -246,24 +246,24 @@
try {
cfg.ipAddr = stringToIpAddr(st.nextToken(" "));
} catch (UnknownHostException uhe) {
- Log.e(TAG, "Failed to parse ipaddr", uhe);
+ Slog.e(TAG, "Failed to parse ipaddr", uhe);
cfg.ipAddr = 0;
}
try {
cfg.netmask = stringToIpAddr(st.nextToken(" "));
} catch (UnknownHostException uhe) {
- Log.e(TAG, "Failed to parse netmask", uhe);
+ Slog.e(TAG, "Failed to parse netmask", uhe);
cfg.netmask = 0;
}
- cfg.interfaceFlags = st.nextToken("]");
- Log.d(TAG, String.format("flags <%s>", cfg.interfaceFlags));
+ cfg.interfaceFlags = st.nextToken("]").trim() +"]";
+ Slog.d(TAG, String.format("flags <%s>", cfg.interfaceFlags));
return cfg;
}
public void setInterfaceConfig(
String iface, InterfaceConfiguration cfg) throws IllegalStateException {
- String cmd = String.format("interface setcfg %s %s %s", iface,
+ String cmd = String.format("interface setcfg %s %s %s %s", iface,
intToIpString(cfg.ipAddr), intToIpString(cfg.netmask), cfg.interfaceFlags);
mConnector.doCommand(cmd);
}
@@ -275,7 +275,7 @@
throw new SecurityException("Requires SHUTDOWN permission");
}
- Log.d(TAG, "Shutting down");
+ Slog.d(TAG, "Shutting down");
}
public boolean getIpForwardingEnabled() throws IllegalStateException{
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 3c43352..78d8c49 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -55,6 +55,7 @@
import android.provider.Settings;
import android.text.TextUtils;
import android.util.EventLog;
+import android.util.Slog;
import android.util.Log;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
@@ -466,10 +467,10 @@
// ============================================================================
public void enqueueToast(String pkg, ITransientNotification callback, int duration)
{
- Log.i(TAG, "enqueueToast pkg=" + pkg + " callback=" + callback + " duration=" + duration);
+ Slog.i(TAG, "enqueueToast pkg=" + pkg + " callback=" + callback + " duration=" + duration);
if (pkg == null || callback == null) {
- Log.e(TAG, "Not doing toast. pkg=" + pkg + " callback=" + callback);
+ Slog.e(TAG, "Not doing toast. pkg=" + pkg + " callback=" + callback);
return ;
}
@@ -504,10 +505,10 @@
}
public void cancelToast(String pkg, ITransientNotification callback) {
- Log.i(TAG, "cancelToast pkg=" + pkg + " callback=" + callback);
+ Slog.i(TAG, "cancelToast pkg=" + pkg + " callback=" + callback);
if (pkg == null || callback == null) {
- Log.e(TAG, "Not cancelling notification. pkg=" + pkg + " callback=" + callback);
+ Slog.e(TAG, "Not cancelling notification. pkg=" + pkg + " callback=" + callback);
return ;
}
@@ -518,7 +519,7 @@
if (index >= 0) {
cancelToastLocked(index);
} else {
- Log.w(TAG, "Toast already cancelled. pkg=" + pkg + " callback=" + callback);
+ Slog.w(TAG, "Toast already cancelled. pkg=" + pkg + " callback=" + callback);
}
} finally {
Binder.restoreCallingIdentity(callingId);
@@ -529,13 +530,13 @@
private void showNextToastLocked() {
ToastRecord record = mToastQueue.get(0);
while (record != null) {
- if (DBG) Log.d(TAG, "Show pkg=" + record.pkg + " callback=" + record.callback);
+ if (DBG) Slog.d(TAG, "Show pkg=" + record.pkg + " callback=" + record.callback);
try {
record.callback.show();
scheduleTimeoutLocked(record, false);
return;
} catch (RemoteException e) {
- Log.w(TAG, "Object died trying to show notification " + record.callback
+ Slog.w(TAG, "Object died trying to show notification " + record.callback
+ " in package " + record.pkg);
// remove it from the list and let the process die
int index = mToastQueue.indexOf(record);
@@ -557,7 +558,7 @@
try {
record.callback.hide();
} catch (RemoteException e) {
- Log.w(TAG, "Object died trying to hide notification " + record.callback
+ Slog.w(TAG, "Object died trying to hide notification " + record.callback
+ " in package " + record.pkg);
// don't worry about this, we're about to remove it from
// the list anyway
@@ -582,7 +583,7 @@
private void handleTimeout(ToastRecord record)
{
- if (DBG) Log.d(TAG, "Timeout pkg=" + record.pkg + " callback=" + record.callback);
+ if (DBG) Slog.d(TAG, "Timeout pkg=" + record.pkg + " callback=" + record.callback);
synchronized (mToastQueue) {
int index = indexOfToastLocked(record.pkg, record.callback);
if (index >= 0) {
@@ -818,7 +819,7 @@
if (mLedNotification == old) {
mLedNotification = null;
}
- //Log.i(TAG, "notification.lights="
+ //Slog.i(TAG, "notification.lights="
// + ((old.notification.lights.flags & Notification.FLAG_SHOW_LIGHTS) != 0));
if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) {
mLights.add(r);
@@ -1013,7 +1014,7 @@
} catch (PendingIntent.CanceledException ex) {
// do nothing - there's no relevant way to recover, and
// no reason to let this propagate
- Log.w(TAG, "canceled PendingIntent for " + r.pkg, ex);
+ Slog.w(TAG, "canceled PendingIntent for " + r.pkg, ex);
}
}
mNotificationList.remove(i);
diff --git a/services/java/com/android/server/PackageManagerBackupAgent.java b/services/java/com/android/server/PackageManagerBackupAgent.java
index 9551db5..e45edfb 100644
--- a/services/java/com/android/server/PackageManagerBackupAgent.java
+++ b/services/java/com/android/server/PackageManagerBackupAgent.java
@@ -26,7 +26,7 @@
import android.content.pm.Signature;
import android.os.Build;
import android.os.ParcelFileDescriptor;
-import android.util.Log;
+import android.util.Slog;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -95,7 +95,7 @@
public Metadata getRestoredMetadata(String packageName) {
if (mRestoredSignatures == null) {
- Log.w(TAG, "getRestoredMetadata() before metadata read!");
+ Slog.w(TAG, "getRestoredMetadata() before metadata read!");
return null;
}
@@ -104,7 +104,7 @@
public Set<String> getRestoredPackages() {
if (mRestoredSignatures == null) {
- Log.w(TAG, "getRestoredPackages() before metadata read!");
+ Slog.w(TAG, "getRestoredPackages() before metadata read!");
return null;
}
@@ -120,7 +120,7 @@
// the package name.
public void onBackup(ParcelFileDescriptor oldState, BackupDataOutput data,
ParcelFileDescriptor newState) {
- if (DEBUG) Log.v(TAG, "onBackup()");
+ if (DEBUG) Slog.v(TAG, "onBackup()");
ByteArrayOutputStream bufStream = new ByteArrayOutputStream(); // we'll reuse these
DataOutputStream outWriter = new DataOutputStream(bufStream);
@@ -131,7 +131,7 @@
// "already backed up" map built by parseStateFile().
if (mStoredIncrementalVersion == null
|| !mStoredIncrementalVersion.equals(Build.VERSION.INCREMENTAL)) {
- Log.i(TAG, "Previous metadata " + mStoredIncrementalVersion + " mismatch vs "
+ Slog.i(TAG, "Previous metadata " + mStoredIncrementalVersion + " mismatch vs "
+ Build.VERSION.INCREMENTAL + " - rewriting");
mExisting.clear();
}
@@ -147,14 +147,14 @@
* the backup set.
*/
if (!mExisting.contains(GLOBAL_METADATA_KEY)) {
- if (DEBUG) Log.v(TAG, "Storing global metadata key");
+ if (DEBUG) Slog.v(TAG, "Storing global metadata key");
outWriter.writeInt(Build.VERSION.SDK_INT);
outWriter.writeUTF(Build.VERSION.INCREMENTAL);
byte[] metadata = bufStream.toByteArray();
data.writeEntityHeader(GLOBAL_METADATA_KEY, metadata.length);
data.writeEntityData(metadata, metadata.length);
} else {
- if (DEBUG) Log.v(TAG, "Global metadata key already stored");
+ if (DEBUG) Slog.v(TAG, "Global metadata key already stored");
// don't consider it to have been skipped/deleted
mExisting.remove(GLOBAL_METADATA_KEY);
}
@@ -211,7 +211,7 @@
byte[] sigs = flattenSignatureArray(info.signatures);
if (DEBUG) {
- Log.v(TAG, "+ metadata for " + packName
+ Slog.v(TAG, "+ metadata for " + packName
+ " version=" + info.versionCode
+ " versionLen=" + versionBuf.length
+ " sigsLen=" + sigs.length);
@@ -228,17 +228,17 @@
// mentioned in the saved state file, but appear to no longer be present
// on the device. Write a deletion entity for them.
for (String app : mExisting) {
- if (DEBUG) Log.v(TAG, "- removing metadata for deleted pkg " + app);
+ if (DEBUG) Slog.v(TAG, "- removing metadata for deleted pkg " + app);
try {
data.writeEntityHeader(app, -1);
} catch (IOException e) {
- Log.e(TAG, "Unable to write package deletions!");
+ Slog.e(TAG, "Unable to write package deletions!");
return;
}
}
} catch (IOException e) {
// Real error writing data
- Log.e(TAG, "Unable to write package backup data file!");
+ Slog.e(TAG, "Unable to write package backup data file!");
return;
}
@@ -253,14 +253,14 @@
throws IOException {
List<ApplicationInfo> restoredApps = new ArrayList<ApplicationInfo>();
HashMap<String, Metadata> sigMap = new HashMap<String, Metadata>();
- if (DEBUG) Log.v(TAG, "onRestore()");
+ if (DEBUG) Slog.v(TAG, "onRestore()");
int storedSystemVersion = -1;
while (data.readNextHeader()) {
String key = data.getKey();
int dataSize = data.getDataSize();
- if (DEBUG) Log.v(TAG, " got key=" + key + " dataSize=" + dataSize);
+ if (DEBUG) Slog.v(TAG, " got key=" + key + " dataSize=" + dataSize);
// generic setup to parse any entity data
byte[] dataBuf = new byte[dataSize];
@@ -270,17 +270,17 @@
if (key.equals(GLOBAL_METADATA_KEY)) {
int storedSdkVersion = in.readInt();
- if (DEBUG) Log.v(TAG, " storedSystemVersion = " + storedSystemVersion);
+ if (DEBUG) Slog.v(TAG, " storedSystemVersion = " + storedSystemVersion);
if (storedSystemVersion > Build.VERSION.SDK_INT) {
// returning before setting the sig map means we rejected the restore set
- Log.w(TAG, "Restore set was from a later version of Android; not restoring");
+ Slog.w(TAG, "Restore set was from a later version of Android; not restoring");
return;
}
mStoredSdkVersion = storedSdkVersion;
mStoredIncrementalVersion = in.readUTF();
mHasMetadata = true;
if (DEBUG) {
- Log.i(TAG, "Restore set version " + storedSystemVersion
+ Slog.i(TAG, "Restore set version " + storedSystemVersion
+ " is compatible with OS version " + Build.VERSION.SDK_INT
+ " (" + mStoredIncrementalVersion + " vs "
+ Build.VERSION.INCREMENTAL + ")");
@@ -290,7 +290,7 @@
int versionCode = in.readInt();
Signature[] sigs = unflattenSignatureArray(in);
if (DEBUG) {
- Log.i(TAG, " restored metadata for " + key
+ Slog.i(TAG, " restored metadata for " + key
+ " dataSize=" + dataSize
+ " versionCode=" + versionCode + " sigs=" + sigs);
}
@@ -337,11 +337,11 @@
try {
int num = in.readInt();
- if (DEBUG) Log.v(TAG, " ... unflatten read " + num);
+ if (DEBUG) Slog.v(TAG, " ... unflatten read " + num);
// Sensical?
if (num > 20) {
- Log.e(TAG, "Suspiciously large sig count in restore data; aborting");
+ Slog.e(TAG, "Suspiciously large sig count in restore data; aborting");
throw new IllegalStateException("Bad restore state");
}
@@ -355,10 +355,10 @@
} catch (EOFException e) {
// clean termination
if (sigs == null) {
- Log.w(TAG, "Empty signature block found");
+ Slog.w(TAG, "Empty signature block found");
}
} catch (IOException e) {
- Log.e(TAG, "Unable to unflatten sigs");
+ Slog.e(TAG, "Unable to unflatten sigs");
return null;
}
@@ -388,7 +388,7 @@
mStoredIncrementalVersion = in.readUTF();
mExisting.add(GLOBAL_METADATA_KEY);
} else {
- Log.e(TAG, "No global metadata in state file!");
+ Slog.e(TAG, "No global metadata in state file!");
return;
}
@@ -403,7 +403,7 @@
// safe; we're done
} catch (IOException e) {
// whoops, bad state file. abort.
- Log.e(TAG, "Unable to read Package Manager state file: " + e);
+ Slog.e(TAG, "Unable to read Package Manager state file: " + e);
}
}
@@ -424,7 +424,7 @@
out.writeInt(pkg.versionCode);
}
} catch (IOException e) {
- Log.e(TAG, "Unable to write package manager state file!");
+ Slog.e(TAG, "Unable to write package manager state file!");
return;
}
}
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index 4fdcd59..bf2b1c7 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -18,9 +18,9 @@
import com.android.internal.app.IMediaContainerService;
import com.android.internal.app.ResolverActivity;
-import com.android.common.FastXmlSerializer;
-import com.android.common.XmlUtils;
import com.android.internal.content.PackageHelper;
+import com.android.internal.util.FastXmlSerializer;
+import com.android.internal.util.XmlUtils;
import com.android.server.JournaledFile;
import org.xmlpull.v1.XmlPullParser;
@@ -28,9 +28,9 @@
import org.xmlpull.v1.XmlSerializer;
import android.app.ActivityManagerNative;
-import android.app.DevicePolicyManager;
import android.app.IActivityManager;
-import android.app.IDevicePolicyManager;
+import android.app.admin.DevicePolicyManager;
+import android.app.admin.IDevicePolicyManager;
import android.backup.IBackupManager;
import android.content.ComponentName;
import android.content.Context;
@@ -56,8 +56,6 @@
import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
-import static android.content.pm.PackageManager.PKG_INSTALL_COMPLETE;
-import static android.content.pm.PackageManager.PKG_INSTALL_INCOMPLETE;
import android.content.pm.PackageParser;
import android.content.pm.PermissionInfo;
import android.content.pm.PermissionGroupInfo;
@@ -151,6 +149,19 @@
// package apks to install directory.
private static final String INSTALL_PACKAGE_SUFFIX = "-";
+ /**
+ * Indicates the state of installation. Used by PackageManager to
+ * figure out incomplete installations. Say a package is being installed
+ * (the state is set to PKG_INSTALL_INCOMPLETE) and remains so till
+ * the package installation is successful or unsuccesful lin which case
+ * the PackageManager will no longer maintain state information associated
+ * with the package. If some exception(like device freeze or battery being
+ * pulled out) occurs during installation of a package, the PackageManager
+ * needs this information to clean up the previously failed installation.
+ */
+ private static final int PKG_INSTALL_INCOMPLETE = 0;
+ private static final int PKG_INSTALL_COMPLETE = 1;
+
static final int SCAN_MONITOR = 1<<0;
static final int SCAN_NO_DEX = 1<<1;
static final int SCAN_FORCE_DEX = 1<<2;
@@ -4426,8 +4437,11 @@
}
public void handleStartCopy(IMediaContainerService imcs) {
- int ret = PackageManager.INSTALL_FAILED_INTERNAL_ERROR;
- if (imcs != null) {
+ int ret = PackageManager.INSTALL_SUCCEEDED;
+ // Dont need to invoke getInstallLocation for forward locked apps.
+ if ((flags & PackageManager.INSTALL_FORWARD_LOCK) != 0) {
+ flags &= ~PackageManager.INSTALL_EXTERNAL;
+ } else if (imcs != null) {
// Remote call to find out default install location
int loc = getInstallLocation(imcs);
// Use install location to create InstallArgs and temporary
@@ -4447,16 +4461,6 @@
flags &= ~PackageManager.INSTALL_EXTERNAL;
}
}
- // Disable forward locked apps on sdcard.
- if ((flags & PackageManager.INSTALL_FORWARD_LOCK) != 0 &&
- (flags & PackageManager.INSTALL_EXTERNAL) != 0) {
- // Make sure forward locked apps can only be installed
- // on internal storage
- Log.w(TAG, "Cannot install protected apps on sdcard");
- ret = PackageManager.INSTALL_FAILED_INVALID_INSTALL_LOCATION;
- } else {
- ret = PackageManager.INSTALL_SUCCEEDED;
- }
}
}
// Create the file args now.
@@ -4858,42 +4862,67 @@
String oldCodePath) {
String newCacheId = getNextCodePath(oldCodePath, pkgName, "/" + RES_FILE_NAME);
String newCachePath = null;
- final int RENAME_FAILED = 1;
- final int MOUNT_FAILED = 2;
- final int PASS = 4;
- int errCode = RENAME_FAILED;
- String errMsg = "RENAME_FAILED";
- boolean mounted = PackageHelper.isContainerMounted(cid);
- if (mounted) {
- // Unmount the container
- if (!PackageHelper.unMountSdDir(cid)) {
- Log.i(TAG, "Failed to unmount " + cid + " before renaming");
+ boolean enableRename = false;
+ if (enableRename) {
+ if (PackageHelper.isContainerMounted(cid)) {
+ // Unmount the container
+ if (!PackageHelper.unMountSdDir(cid)) {
+ Log.i(TAG, "Failed to unmount " + cid + " before renaming");
+ return false;
+ }
+ }
+ if (!PackageHelper.renameSdDir(cid, newCacheId)) {
+ Log.e(TAG, "Failed to rename " + cid + " to " + newCacheId);
return false;
}
- mounted = false;
- }
- if (PackageHelper.renameSdDir(cid, newCacheId)) {
- errCode = MOUNT_FAILED;
- errMsg = "MOUNT_FAILED";
- if ((newCachePath = PackageHelper.mountSdDir(newCacheId,
- getEncryptKey(), Process.SYSTEM_UID)) != null) {
- errCode = PASS;
- errMsg = "PASS";
+ if (!PackageHelper.isContainerMounted(newCacheId)) {
+ Log.w(TAG, "Mounting container " + newCacheId);
+ newCachePath = PackageHelper.mountSdDir(newCacheId,
+ getEncryptKey(), Process.SYSTEM_UID);
+ } else {
+ newCachePath = PackageHelper.getSdDir(newCacheId);
}
- }
- if (errCode != PASS) {
- Log.i(TAG, "Failed to rename " + cid + " to " + newCacheId +
- " at path: " + cachePath + " to new path: " + newCachePath +
- "err = " + errMsg);
+ if (newCachePath == null) {
+ Log.w(TAG, "Failed to get cache path for " + newCacheId);
+ return false;
+ }
// Mount old container?
- return false;
+ Log.i(TAG, "Succesfully renamed " + cid +
+ " at path: " + cachePath + " to " + newCacheId +
+ " at new path: " + newCachePath);
+ cid = newCacheId;
+ cachePath = newCachePath;
+ return true;
} else {
- Log.i(TAG, "Succesfully renamed " + cid + " to " + newCacheId +
- " at path: " + cachePath + " to new path: " + newCachePath);
+ // STOPSHIP work around for rename
+ Log.i(TAG, "Copying instead of renaming");
+ File srcFile = new File(getCodePath());
+ // Create new container
+ newCachePath = PackageHelper.createSdDir(srcFile, newCacheId,
+ getEncryptKey(), Process.SYSTEM_UID);
+ Log.i(TAG, "Created rename container " + newCacheId);
+ File destFile = new File(newCachePath + "/" + RES_FILE_NAME);
+ if (!FileUtils.copyFile(srcFile, destFile)) {
+ Log.e(TAG, "Failed to copy " + srcFile + " to " + destFile);
+ return false;
+ }
+ Log.i(TAG, "Successfully copied resource to " + newCachePath);
+ if (!PackageHelper.finalizeSdDir(newCacheId)) {
+ Log.e(TAG, "Failed to finalize " + newCacheId);
+ PackageHelper.destroySdDir(newCacheId);
+ return false;
+ }
+ Log.i(TAG, "Finalized " + newCacheId);
+ Runtime.getRuntime().gc();
+ // Unmount first
+ PackageHelper.unMountSdDir(cid);
+ // Delete old container
+ PackageHelper.destroySdDir(cid);
+ // Dont have to mount. Already mounted.
+ cid = newCacheId;
+ cachePath = newCachePath;
+ return true;
}
- cid = newCacheId;
- cachePath = newCachePath;
- return true;
}
int doPostInstall(int status) {
@@ -5403,6 +5432,7 @@
res.returnCode = PackageManager.INSTALL_FAILED_INVALID_INSTALL_LOCATION;
return;
}
+
if (!args.doRename(res.returnCode, pkgName, oldCodePath)) {
res.returnCode = PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE;
return;
@@ -5704,6 +5734,18 @@
// remove permissions associated with package
mSettings.updateSharedUserPermsLP(deletedPs, mGlobalGids);
}
+ if (deletedPs != null) {
+ // remove from preferred activities.
+ ArrayList<PreferredActivity> removed = new ArrayList<PreferredActivity>();
+ for (PreferredActivity pa : mSettings.mPreferredActivities.filterSet()) {
+ if (pa.mActivity.getPackageName().equals(deletedPs.name)) {
+ removed.add(pa);
+ }
+ }
+ for (PreferredActivity pa : removed) {
+ mSettings.mPreferredActivities.removeFilter(pa);
+ }
+ }
// Save settings now
mSettings.writeLP();
}
@@ -7461,9 +7503,9 @@
Log.w(TAG, "Trying to update system app code path from " +
p.codePathString + " to " + codePath.toString());
} else {
- // Let the app continue with previous uid if code path changes.
- reportSettingsProblem(Log.WARN,
- "Package " + name + " codePath changed from " + p.codePath
+ // Just a change in the code path is not an issue, but
+ // let's log a message about it.
+ Log.i(TAG, "Package " + name + " codePath changed from " + p.codePath
+ " to " + codePath + "; Retaining data and using new");
}
}
@@ -8797,7 +8839,7 @@
}
static String getTempContainerId() {
- String prefix = "smdl1tmp";
+ String prefix = "smdl2tmp";
int tmpIdx = 1;
String list[] = PackageHelper.getSecureContainerList();
if (list != null) {
@@ -8839,30 +8881,56 @@
return prefix + tmpIdx;
}
- public void updateExternalMediaStatus(final boolean mediaStatus) {
+ /*
+ * Return true if PackageManager does have packages to be updated.
+ */
+ public boolean updateExternalMediaStatus(final boolean mediaStatus) {
synchronized (mPackages) {
if (DEBUG_SD_INSTALL) Log.i(TAG, "updateExternalMediaStatus:: mediaStatus=" +
mediaStatus+", mMediaMounted=" + mMediaMounted);
if (mediaStatus == mMediaMounted) {
- return;
+ return false;
}
mMediaMounted = mediaStatus;
+ boolean ret = false;
+ synchronized (mPackages) {
+ Set<String> appList = mSettings.findPackagesWithFlag(ApplicationInfo.FLAG_ON_SDCARD);
+ ret = appList != null && appList.size() > 0;
+ }
+ if (!ret) {
+ // No packages will be effected by the sdcard update. Just return.
+ return false;
+ }
// Queue up an async operation since the package installation may take a little while.
mHandler.post(new Runnable() {
public void run() {
mHandler.removeCallbacks(this);
- updateExternalMediaStatusInner(mediaStatus);
+ // If we are up here that means there are packages to be
+ // enabled or disabled.
+ final HashMap<SdInstallArgs, String> processCids =
+ new HashMap<SdInstallArgs, String>();
+ final int[] uidArr = getExternalMediaPackages(mediaStatus, processCids);
+ if (mediaStatus) {
+ if (DEBUG_SD_INSTALL) Log.i(TAG, "Loading packages");
+ loadMediaPackages(processCids, uidArr);
+ startCleaningPackages();
+ } else {
+ if (DEBUG_SD_INSTALL) Log.i(TAG, "Unloading packages");
+ unloadMediaPackages(processCids, uidArr);
+ }
}
});
+ return true;
}
}
- void updateExternalMediaStatusInner(boolean mediaStatus) {
+ private int[] getExternalMediaPackages(boolean mediaStatus,
+ Map<SdInstallArgs, String> processCids) {
final String list[] = PackageHelper.getSecureContainerList();
if (list == null || list.length == 0) {
- return;
+ return null;
}
- HashMap<SdInstallArgs, String> processCids = new HashMap<SdInstallArgs, String>();
+
int uidList[] = new int[list.length];
int num = 0;
synchronized (mPackages) {
@@ -8904,14 +8972,7 @@
}
}
}
- if (mediaStatus) {
- if (DEBUG_SD_INSTALL) Log.i(TAG, "Loading packages");
- loadMediaPackages(processCids, uidArr);
- startCleaningPackages();
- } else {
- if (DEBUG_SD_INSTALL) Log.i(TAG, "Unloading packages");
- unloadMediaPackages(processCids, uidArr);
- }
+ return uidArr;
}
private void sendResourcesChangedBroadcast(boolean mediaStatus,
@@ -8931,7 +8992,7 @@
}
}
- void loadMediaPackages(HashMap<SdInstallArgs, String> processCids, int uidArr[]) {
+ private void loadMediaPackages(HashMap<SdInstallArgs, String> processCids, int uidArr[]) {
ArrayList<String> pkgList = new ArrayList<String>();
Set<SdInstallArgs> keys = processCids.keySet();
for (SdInstallArgs args : keys) {
@@ -8973,15 +9034,15 @@
}
args.doPostInstall(retCode);
}
- // Send broadcasts first
+ // Send a broadcast to let everyone know we are done processing
+ sendResourcesChangedBroadcast(true, pkgList, uidArr);
if (pkgList.size() > 0) {
- sendResourcesChangedBroadcast(true, pkgList, uidArr);
Runtime.getRuntime().gc();
// If something failed do we clean up here or next install?
}
}
- void unloadMediaPackages(HashMap<SdInstallArgs, String> processCids, int uidArr[]) {
+ private void unloadMediaPackages(HashMap<SdInstallArgs, String> processCids, int uidArr[]) {
if (DEBUG_SD_INSTALL) Log.i(TAG, "unloading media packages");
ArrayList<String> pkgList = new ArrayList<String>();
ArrayList<SdInstallArgs> failedList = new ArrayList<SdInstallArgs>();
@@ -9003,9 +9064,9 @@
}
}
}
+ sendResourcesChangedBroadcast(false, pkgList, uidArr);
// Send broadcasts
if (pkgList.size() > 0) {
- sendResourcesChangedBroadcast(false, pkgList, uidArr);
Runtime.getRuntime().gc();
}
// Do clean up. Just unmount
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index 1ccae86..d3efa12 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -54,6 +54,7 @@
import android.provider.Settings;
import android.util.EventLog;
import android.util.Log;
+import android.util.Slog;
import android.view.WindowManagerPolicy;
import static android.provider.Settings.System.DIM_SCREEN;
import static android.provider.Settings.System.SCREEN_BRIGHTNESS;
@@ -154,8 +155,8 @@
private boolean mDoneBooting = false;
private boolean mBootCompleted = false;
private int mStayOnConditions = 0;
- private int[] mBroadcastQueue = new int[] { -1, -1, -1 };
- private int[] mBroadcastWhy = new int[3];
+ private final int[] mBroadcastQueue = new int[] { -1, -1, -1 };
+ private final int[] mBroadcastWhy = new int[3];
private int mPartialCount = 0;
private int mPowerState;
// mScreenOffReason can be WindowManagerPolicy.OFF_BECAUSE_OF_USER,
@@ -194,8 +195,8 @@
private UnsynchronizedWakeLock mProximityPartialLock;
private HandlerThread mHandlerThread;
private Handler mHandler;
- private TimeoutTask mTimeoutTask = new TimeoutTask();
- private LightAnimator mLightAnimator = new LightAnimator();
+ private final TimeoutTask mTimeoutTask = new TimeoutTask();
+ private final LightAnimator mLightAnimator = new LightAnimator();
private final BrightnessState mScreenBrightness
= new BrightnessState(SCREEN_BRIGHT_BIT);
private final BrightnessState mKeyboardBrightness
@@ -223,7 +224,7 @@
private volatile int mPokey = 0;
private volatile boolean mPokeAwakeOnSet = false;
private volatile boolean mInitComplete = false;
- private HashMap<IBinder,PokeLock> mPokeLocks = new HashMap<IBinder,PokeLock>();
+ private final HashMap<IBinder,PokeLock> mPokeLocks = new HashMap<IBinder,PokeLock>();
// mLastScreenOnTime is the time the screen was last turned on
private long mLastScreenOnTime;
private boolean mPreventScreenOn;
@@ -254,25 +255,25 @@
mLog = new PrintStream("/data/power.log");
}
catch (FileNotFoundException e) {
- android.util.Log.e(TAG, "Life is hard", e);
+ android.util.Slog.e(TAG, "Life is hard", e);
}
}
static class Log {
static void d(String tag, String s) {
mLog.println(s);
- android.util.Log.d(tag, s);
+ android.util.Slog.d(tag, s);
}
static void i(String tag, String s) {
mLog.println(s);
- android.util.Log.i(tag, s);
+ android.util.Slog.i(tag, s);
}
static void w(String tag, String s) {
mLog.println(s);
- android.util.Log.w(tag, s);
+ android.util.Slog.w(tag, s);
}
static void e(String tag, String s) {
mLog.println(s);
- android.util.Log.e(tag, s);
+ android.util.Slog.e(tag, s);
}
}
*/
@@ -643,7 +644,7 @@
int acquireType = -1;
if (mSpew) {
- Log.d(TAG, "acquireWakeLock flags=0x" + Integer.toHexString(flags) + " tag=" + tag);
+ Slog.d(TAG, "acquireWakeLock flags=0x" + Integer.toHexString(flags) + " tag=" + tag);
}
int index = mLocks.getIndex(lock);
@@ -672,7 +673,7 @@
default:
// just log and bail. we're in the server, so don't
// throw an exception.
- Log.e(TAG, "bad wakelock type for lock '" + tag + "' "
+ Slog.e(TAG, "bad wakelock type for lock '" + tag + "' "
+ " flags=" + flags);
return;
}
@@ -691,14 +692,14 @@
int oldWakeLockState = mWakeLockState;
mWakeLockState = mLocks.reactivateScreenLocksLocked();
if (mSpew) {
- Log.d(TAG, "wakeup here mUserState=0x" + Integer.toHexString(mUserState)
+ Slog.d(TAG, "wakeup here mUserState=0x" + Integer.toHexString(mUserState)
+ " mWakeLockState=0x"
+ Integer.toHexString(mWakeLockState)
+ " previous wakeLockState=0x" + Integer.toHexString(oldWakeLockState));
}
} else {
if (mSpew) {
- Log.d(TAG, "here mUserState=0x" + Integer.toHexString(mUserState)
+ Slog.d(TAG, "here mUserState=0x" + Integer.toHexString(mUserState)
+ " mLocks.gatherState()=0x"
+ Integer.toHexString(mLocks.gatherState())
+ " mWakeLockState=0x" + Integer.toHexString(mWakeLockState));
@@ -758,7 +759,7 @@
}
if (mSpew) {
- Log.d(TAG, "releaseWakeLock flags=0x"
+ Slog.d(TAG, "releaseWakeLock flags=0x"
+ Integer.toHexString(wl.flags) + " tag=" + wl.tag);
}
@@ -783,7 +784,7 @@
((flags & PowerManager.WAIT_FOR_PROXIMITY_NEGATIVE) != 0)) {
// wait for proximity sensor to go negative before disabling sensor
if (mDebugProximitySensor) {
- Log.d(TAG, "waiting for proximity sensor to go negative");
+ Slog.d(TAG, "waiting for proximity sensor to go negative");
}
} else {
disableProximityLockLocked();
@@ -833,7 +834,7 @@
public void setPokeLock(int pokey, IBinder token, String tag) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER, null);
if (token == null) {
- Log.e(TAG, "setPokeLock got null token for tag='" + tag + "'");
+ Slog.e(TAG, "setPokeLock got null token for tag='" + tag + "'");
return;
}
@@ -932,92 +933,94 @@
long now = SystemClock.uptimeMillis();
- pw.println("Power Manager State:");
- pw.println(" mIsPowered=" + mIsPowered
- + " mPowerState=" + mPowerState
- + " mScreenOffTime=" + (SystemClock.elapsedRealtime()-mScreenOffTime)
- + " ms");
- pw.println(" mPartialCount=" + mPartialCount);
- pw.println(" mWakeLockState=" + dumpPowerState(mWakeLockState));
- pw.println(" mUserState=" + dumpPowerState(mUserState));
- pw.println(" mPowerState=" + dumpPowerState(mPowerState));
- pw.println(" mLocks.gather=" + dumpPowerState(mLocks.gatherState()));
- pw.println(" mNextTimeout=" + mNextTimeout + " now=" + now
- + " " + ((mNextTimeout-now)/1000) + "s from now");
- pw.println(" mDimScreen=" + mDimScreen
- + " mStayOnConditions=" + mStayOnConditions);
- pw.println(" mScreenOffReason=" + mScreenOffReason
- + " mUserState=" + mUserState);
- pw.println(" mBroadcastQueue={" + mBroadcastQueue[0] + ',' + mBroadcastQueue[1]
- + ',' + mBroadcastQueue[2] + "}");
- pw.println(" mBroadcastWhy={" + mBroadcastWhy[0] + ',' + mBroadcastWhy[1]
- + ',' + mBroadcastWhy[2] + "}");
- pw.println(" mPokey=" + mPokey + " mPokeAwakeonSet=" + mPokeAwakeOnSet);
- pw.println(" mKeyboardVisible=" + mKeyboardVisible
- + " mUserActivityAllowed=" + mUserActivityAllowed);
- pw.println(" mKeylightDelay=" + mKeylightDelay + " mDimDelay=" + mDimDelay
- + " mScreenOffDelay=" + mScreenOffDelay);
- pw.println(" mPreventScreenOn=" + mPreventScreenOn
- + " mScreenBrightnessOverride=" + mScreenBrightnessOverride
- + " mButtonBrightnessOverride=" + mButtonBrightnessOverride);
- pw.println(" mScreenOffTimeoutSetting=" + mScreenOffTimeoutSetting
- + " mMaximumScreenOffTimeout=" + mMaximumScreenOffTimeout);
- pw.println(" mLastScreenOnTime=" + mLastScreenOnTime);
- pw.println(" mBroadcastWakeLock=" + mBroadcastWakeLock);
- pw.println(" mStayOnWhilePluggedInScreenDimLock=" + mStayOnWhilePluggedInScreenDimLock);
- pw.println(" mStayOnWhilePluggedInPartialLock=" + mStayOnWhilePluggedInPartialLock);
- pw.println(" mPreventScreenOnPartialLock=" + mPreventScreenOnPartialLock);
- pw.println(" mProximityPartialLock=" + mProximityPartialLock);
- pw.println(" mProximityWakeLockCount=" + mProximityWakeLockCount);
- pw.println(" mProximitySensorEnabled=" + mProximitySensorEnabled);
- pw.println(" mProximitySensorActive=" + mProximitySensorActive);
- pw.println(" mProximityPendingValue=" + mProximityPendingValue);
- pw.println(" mLastProximityEventTime=" + mLastProximityEventTime);
- pw.println(" mLightSensorEnabled=" + mLightSensorEnabled);
- pw.println(" mLightSensorValue=" + mLightSensorValue
- + " mLightSensorPendingValue=" + mLightSensorPendingValue);
- pw.println(" mLightSensorScreenBrightness=" + mLightSensorScreenBrightness
- + " mLightSensorButtonBrightness=" + mLightSensorButtonBrightness
- + " mLightSensorKeyboardBrightness=" + mLightSensorKeyboardBrightness);
- pw.println(" mUseSoftwareAutoBrightness=" + mUseSoftwareAutoBrightness);
- pw.println(" mAutoBrightessEnabled=" + mAutoBrightessEnabled);
- mScreenBrightness.dump(pw, " mScreenBrightness: ");
- mKeyboardBrightness.dump(pw, " mKeyboardBrightness: ");
- mButtonBrightness.dump(pw, " mButtonBrightness: ");
+ synchronized (mLocks) {
+ pw.println("Power Manager State:");
+ pw.println(" mIsPowered=" + mIsPowered
+ + " mPowerState=" + mPowerState
+ + " mScreenOffTime=" + (SystemClock.elapsedRealtime()-mScreenOffTime)
+ + " ms");
+ pw.println(" mPartialCount=" + mPartialCount);
+ pw.println(" mWakeLockState=" + dumpPowerState(mWakeLockState));
+ pw.println(" mUserState=" + dumpPowerState(mUserState));
+ pw.println(" mPowerState=" + dumpPowerState(mPowerState));
+ pw.println(" mLocks.gather=" + dumpPowerState(mLocks.gatherState()));
+ pw.println(" mNextTimeout=" + mNextTimeout + " now=" + now
+ + " " + ((mNextTimeout-now)/1000) + "s from now");
+ pw.println(" mDimScreen=" + mDimScreen
+ + " mStayOnConditions=" + mStayOnConditions);
+ pw.println(" mScreenOffReason=" + mScreenOffReason
+ + " mUserState=" + mUserState);
+ pw.println(" mBroadcastQueue={" + mBroadcastQueue[0] + ',' + mBroadcastQueue[1]
+ + ',' + mBroadcastQueue[2] + "}");
+ pw.println(" mBroadcastWhy={" + mBroadcastWhy[0] + ',' + mBroadcastWhy[1]
+ + ',' + mBroadcastWhy[2] + "}");
+ pw.println(" mPokey=" + mPokey + " mPokeAwakeonSet=" + mPokeAwakeOnSet);
+ pw.println(" mKeyboardVisible=" + mKeyboardVisible
+ + " mUserActivityAllowed=" + mUserActivityAllowed);
+ pw.println(" mKeylightDelay=" + mKeylightDelay + " mDimDelay=" + mDimDelay
+ + " mScreenOffDelay=" + mScreenOffDelay);
+ pw.println(" mPreventScreenOn=" + mPreventScreenOn
+ + " mScreenBrightnessOverride=" + mScreenBrightnessOverride
+ + " mButtonBrightnessOverride=" + mButtonBrightnessOverride);
+ pw.println(" mScreenOffTimeoutSetting=" + mScreenOffTimeoutSetting
+ + " mMaximumScreenOffTimeout=" + mMaximumScreenOffTimeout);
+ pw.println(" mLastScreenOnTime=" + mLastScreenOnTime);
+ pw.println(" mBroadcastWakeLock=" + mBroadcastWakeLock);
+ pw.println(" mStayOnWhilePluggedInScreenDimLock=" + mStayOnWhilePluggedInScreenDimLock);
+ pw.println(" mStayOnWhilePluggedInPartialLock=" + mStayOnWhilePluggedInPartialLock);
+ pw.println(" mPreventScreenOnPartialLock=" + mPreventScreenOnPartialLock);
+ pw.println(" mProximityPartialLock=" + mProximityPartialLock);
+ pw.println(" mProximityWakeLockCount=" + mProximityWakeLockCount);
+ pw.println(" mProximitySensorEnabled=" + mProximitySensorEnabled);
+ pw.println(" mProximitySensorActive=" + mProximitySensorActive);
+ pw.println(" mProximityPendingValue=" + mProximityPendingValue);
+ pw.println(" mLastProximityEventTime=" + mLastProximityEventTime);
+ pw.println(" mLightSensorEnabled=" + mLightSensorEnabled);
+ pw.println(" mLightSensorValue=" + mLightSensorValue
+ + " mLightSensorPendingValue=" + mLightSensorPendingValue);
+ pw.println(" mLightSensorScreenBrightness=" + mLightSensorScreenBrightness
+ + " mLightSensorButtonBrightness=" + mLightSensorButtonBrightness
+ + " mLightSensorKeyboardBrightness=" + mLightSensorKeyboardBrightness);
+ pw.println(" mUseSoftwareAutoBrightness=" + mUseSoftwareAutoBrightness);
+ pw.println(" mAutoBrightessEnabled=" + mAutoBrightessEnabled);
+ mScreenBrightness.dump(pw, " mScreenBrightness: ");
+ mKeyboardBrightness.dump(pw, " mKeyboardBrightness: ");
+ mButtonBrightness.dump(pw, " mButtonBrightness: ");
- int N = mLocks.size();
- pw.println();
- pw.println("mLocks.size=" + N + ":");
- for (int i=0; i<N; i++) {
- WakeLock wl = mLocks.get(i);
- String type = lockType(wl.flags & LOCK_MASK);
- String acquireCausesWakeup = "";
- if ((wl.flags & PowerManager.ACQUIRE_CAUSES_WAKEUP) != 0) {
- acquireCausesWakeup = "ACQUIRE_CAUSES_WAKEUP ";
+ int N = mLocks.size();
+ pw.println();
+ pw.println("mLocks.size=" + N + ":");
+ for (int i=0; i<N; i++) {
+ WakeLock wl = mLocks.get(i);
+ String type = lockType(wl.flags & LOCK_MASK);
+ String acquireCausesWakeup = "";
+ if ((wl.flags & PowerManager.ACQUIRE_CAUSES_WAKEUP) != 0) {
+ acquireCausesWakeup = "ACQUIRE_CAUSES_WAKEUP ";
+ }
+ String activated = "";
+ if (wl.activated) {
+ activated = " activated";
+ }
+ pw.println(" " + type + " '" + wl.tag + "'" + acquireCausesWakeup
+ + activated + " (minState=" + wl.minState + ")");
}
- String activated = "";
- if (wl.activated) {
- activated = " activated";
+
+ pw.println();
+ pw.println("mPokeLocks.size=" + mPokeLocks.size() + ":");
+ for (PokeLock p: mPokeLocks.values()) {
+ pw.println(" poke lock '" + p.tag + "':"
+ + ((p.pokey & POKE_LOCK_IGNORE_CHEEK_EVENTS) != 0
+ ? " POKE_LOCK_IGNORE_CHEEK_EVENTS" : "")
+ + ((p.pokey & POKE_LOCK_IGNORE_TOUCH_AND_CHEEK_EVENTS) != 0
+ ? " POKE_LOCK_IGNORE_TOUCH_AND_CHEEK_EVENTS" : "")
+ + ((p.pokey & POKE_LOCK_SHORT_TIMEOUT) != 0
+ ? " POKE_LOCK_SHORT_TIMEOUT" : "")
+ + ((p.pokey & POKE_LOCK_MEDIUM_TIMEOUT) != 0
+ ? " POKE_LOCK_MEDIUM_TIMEOUT" : ""));
}
- pw.println(" " + type + " '" + wl.tag + "'" + acquireCausesWakeup
- + activated + " (minState=" + wl.minState + ")");
- }
- pw.println();
- pw.println("mPokeLocks.size=" + mPokeLocks.size() + ":");
- for (PokeLock p: mPokeLocks.values()) {
- pw.println(" poke lock '" + p.tag + "':"
- + ((p.pokey & POKE_LOCK_IGNORE_CHEEK_EVENTS) != 0
- ? " POKE_LOCK_IGNORE_CHEEK_EVENTS" : "")
- + ((p.pokey & POKE_LOCK_IGNORE_TOUCH_AND_CHEEK_EVENTS) != 0
- ? " POKE_LOCK_IGNORE_TOUCH_AND_CHEEK_EVENTS" : "")
- + ((p.pokey & POKE_LOCK_SHORT_TIMEOUT) != 0
- ? " POKE_LOCK_SHORT_TIMEOUT" : "")
- + ((p.pokey & POKE_LOCK_MEDIUM_TIMEOUT) != 0
- ? " POKE_LOCK_MEDIUM_TIMEOUT" : ""));
+ pw.println();
}
-
- pw.println();
}
private void setTimeoutLocked(long now, int nextState)
@@ -1036,7 +1039,7 @@
when += mDimDelay;
break;
} else {
- Log.w(TAG, "mDimDelay=" + mDimDelay + " while trying to dim");
+ Slog.w(TAG, "mDimDelay=" + mDimDelay + " while trying to dim");
}
case SCREEN_OFF:
synchronized (mLocks) {
@@ -1045,7 +1048,7 @@
break;
}
if (mSpew) {
- Log.d(TAG, "setTimeoutLocked now=" + now + " nextState=" + nextState
+ Slog.d(TAG, "setTimeoutLocked now=" + now + " nextState=" + nextState
+ " when=" + when);
}
mHandler.postAtTime(mTimeoutTask, when);
@@ -1066,7 +1069,7 @@
{
synchronized (mLocks) {
if (mSpew) {
- Log.d(TAG, "user activity timeout timed out nextState=" + this.nextState);
+ Slog.d(TAG, "user activity timeout timed out nextState=" + this.nextState);
}
if (nextState == -1) {
@@ -1175,7 +1178,7 @@
}
if (mSpew) {
- Log.d(TAG, "mBroadcastWakeLock=" + mBroadcastWakeLock);
+ Slog.d(TAG, "mBroadcastWakeLock=" + mBroadcastWakeLock);
}
if (mContext != null && ActivityManagerNative.isSystemReady()) {
mContext.sendOrderedBroadcast(mScreenOnIntent, null,
@@ -1319,12 +1322,12 @@
// a prior preventScreenOn(true) call.)
if (!mProximitySensorActive && (mPowerState & SCREEN_ON_BIT) != 0) {
if (mSpew) {
- Log.d(TAG,
+ Slog.d(TAG,
"preventScreenOn: turning on after a prior preventScreenOn(true)!");
}
int err = setScreenStateLocked(true);
if (err != 0) {
- Log.w(TAG, "preventScreenOn: error from setScreenStateLocked(): " + err);
+ Slog.w(TAG, "preventScreenOn: error from setScreenStateLocked(): " + err);
}
}
@@ -1367,7 +1370,7 @@
// we should have already removed any existing
// mForceReenableScreenTask messages...
if (!mPreventScreenOn) {
- Log.w(TAG, "forceReenableScreen: mPreventScreenOn is false, nothing to do");
+ Slog.w(TAG, "forceReenableScreen: mPreventScreenOn is false, nothing to do");
return;
}
@@ -1379,7 +1382,7 @@
// crashed before doing so.)
// Log a warning, and forcibly turn the screen back on.
- Log.w(TAG, "App called preventScreenOn(true) but didn't promptly reenable the screen! "
+ Slog.w(TAG, "App called preventScreenOn(true) but didn't promptly reenable the screen! "
+ "Forcing the screen back on...");
preventScreenOn(false);
}
@@ -1422,7 +1425,7 @@
int err;
if (mSpew) {
- Log.d(TAG, "setPowerState: mPowerState=0x" + Integer.toHexString(mPowerState)
+ Slog.d(TAG, "setPowerState: mPowerState=0x" + Integer.toHexString(mPowerState)
+ " newState=0x" + Integer.toHexString(newState)
+ " noChangeLights=" + noChangeLights
+ " reason=" + reason);
@@ -1453,17 +1456,17 @@
boolean newScreenOn = (newState & SCREEN_ON_BIT) != 0;
if (mSpew) {
- Log.d(TAG, "setPowerState: mPowerState=" + mPowerState
+ Slog.d(TAG, "setPowerState: mPowerState=" + mPowerState
+ " newState=" + newState + " noChangeLights=" + noChangeLights);
- Log.d(TAG, " oldKeyboardBright=" + ((mPowerState & KEYBOARD_BRIGHT_BIT) != 0)
+ Slog.d(TAG, " oldKeyboardBright=" + ((mPowerState & KEYBOARD_BRIGHT_BIT) != 0)
+ " newKeyboardBright=" + ((newState & KEYBOARD_BRIGHT_BIT) != 0));
- Log.d(TAG, " oldScreenBright=" + ((mPowerState & SCREEN_BRIGHT_BIT) != 0)
+ Slog.d(TAG, " oldScreenBright=" + ((mPowerState & SCREEN_BRIGHT_BIT) != 0)
+ " newScreenBright=" + ((newState & SCREEN_BRIGHT_BIT) != 0));
- Log.d(TAG, " oldButtonBright=" + ((mPowerState & BUTTON_BRIGHT_BIT) != 0)
+ Slog.d(TAG, " oldButtonBright=" + ((mPowerState & BUTTON_BRIGHT_BIT) != 0)
+ " newButtonBright=" + ((newState & BUTTON_BRIGHT_BIT) != 0));
- Log.d(TAG, " oldScreenOn=" + oldScreenOn
+ Slog.d(TAG, " oldScreenOn=" + oldScreenOn
+ " newScreenOn=" + newScreenOn);
- Log.d(TAG, " oldBatteryLow=" + ((mPowerState & BATTERY_LOW_BIT) != 0)
+ Slog.d(TAG, " oldBatteryLow=" + ((mPowerState & BATTERY_LOW_BIT) != 0)
+ " newBatteryLow=" + ((newState & BATTERY_LOW_BIT) != 0));
}
@@ -1489,13 +1492,13 @@
// screen forever; see forceReenableScreen().)
boolean reallyTurnScreenOn = true;
if (mSpew) {
- Log.d(TAG, "- turning screen on... mPreventScreenOn = "
+ Slog.d(TAG, "- turning screen on... mPreventScreenOn = "
+ mPreventScreenOn);
}
if (mPreventScreenOn) {
if (mSpew) {
- Log.d(TAG, "- PREVENTING screen from really turning on!");
+ Slog.d(TAG, "- PREVENTING screen from really turning on!");
}
reallyTurnScreenOn = false;
}
@@ -1506,7 +1509,7 @@
mBatteryStats.noteScreenBrightness(getPreferredBrightness());
mBatteryStats.noteScreenOn();
} catch (RemoteException e) {
- Log.w(TAG, "RemoteException calling noteScreenOn on BatteryStatsService", e);
+ Slog.w(TAG, "RemoteException calling noteScreenOn on BatteryStatsService", e);
} finally {
Binder.restoreCallingIdentity(identity);
}
@@ -1533,7 +1536,7 @@
try {
mBatteryStats.noteScreenOff();
} catch (RemoteException e) {
- Log.w(TAG, "RemoteException calling noteScreenOff on BatteryStatsService", e);
+ Slog.w(TAG, "RemoteException calling noteScreenOff on BatteryStatsService", e);
} finally {
Binder.restoreCallingIdentity(identity);
}
@@ -1719,14 +1722,14 @@
if (startAnimation) {
if (mSpew) {
- Log.i(TAG, "Scheduling light animator!");
+ Slog.i(TAG, "Scheduling light animator!");
}
mHandler.removeCallbacks(mLightAnimator);
mHandler.post(mLightAnimator);
}
if (offMask != 0) {
- //Log.i(TAG, "Setting brightess off: " + offMask);
+ //Slog.i(TAG, "Setting brightess off: " + offMask);
setLightBrightness(offMask, Power.BRIGHTNESS_OFF);
}
if (dimMask != 0) {
@@ -1735,7 +1738,7 @@
brightness > Power.BRIGHTNESS_LOW_BATTERY) {
brightness = Power.BRIGHTNESS_LOW_BATTERY;
}
- //Log.i(TAG, "Setting brightess dim " + brightness + ": " + offMask);
+ //Slog.i(TAG, "Setting brightess dim " + brightness + ": " + offMask);
setLightBrightness(dimMask, brightness);
}
if (onMask != 0) {
@@ -1744,7 +1747,7 @@
brightness > Power.BRIGHTNESS_LOW_BATTERY) {
brightness = Power.BRIGHTNESS_LOW_BATTERY;
}
- //Log.i(TAG, "Setting brightess on " + brightness + ": " + onMask);
+ //Slog.i(TAG, "Setting brightess on " + brightness + ": " + onMask);
setLightBrightness(onMask, brightness);
}
}
@@ -1798,7 +1801,7 @@
/ stepsToTarget;
if (mSpew) {
String noticeMe = nominalCurrentValue == curValue ? "" : " ******************";
- Log.i(TAG, "Setting target " + mask + ": cur=" + curValue
+ Slog.i(TAG, "Setting target " + mask + ": cur=" + curValue
+ " target=" + targetValue + " delta=" + delta
+ " nominalCurrentValue=" + nominalCurrentValue
+ noticeMe);
@@ -1810,7 +1813,7 @@
boolean stepLocked() {
if (!animating) return false;
if (false && mSpew) {
- Log.i(TAG, "Step target " + mask + ": cur=" + curValue
+ Slog.i(TAG, "Step target " + mask + ": cur=" + curValue
+ " target=" + targetValue + " delta=" + delta);
}
curValue += delta;
@@ -1830,7 +1833,7 @@
more = false;
}
}
- //Log.i(TAG, "Animating brightess " + curIntValue + ": " + mask);
+ //Slog.i(TAG, "Animating brightess " + curIntValue + ": " + mask);
setLightBrightness(mask, curIntValue);
animating = more;
if (!more) {
@@ -1957,7 +1960,7 @@
if (((mPokey & POKE_LOCK_IGNORE_CHEEK_EVENTS) != 0)
&& (eventType == CHEEK_EVENT || eventType == TOUCH_EVENT)) {
if (false) {
- Log.d(TAG, "dropping cheek or short event mPokey=0x" + Integer.toHexString(mPokey));
+ Slog.d(TAG, "dropping cheek or short event mPokey=0x" + Integer.toHexString(mPokey));
}
return;
}
@@ -1966,22 +1969,22 @@
&& (eventType == TOUCH_EVENT || eventType == TOUCH_UP_EVENT
|| eventType == LONG_TOUCH_EVENT || eventType == CHEEK_EVENT)) {
if (false) {
- Log.d(TAG, "dropping touch mPokey=0x" + Integer.toHexString(mPokey));
+ Slog.d(TAG, "dropping touch mPokey=0x" + Integer.toHexString(mPokey));
}
return;
}
if (false) {
if (((mPokey & POKE_LOCK_IGNORE_CHEEK_EVENTS) != 0)) {
- Log.d(TAG, "userActivity !!!");//, new RuntimeException());
+ Slog.d(TAG, "userActivity !!!");//, new RuntimeException());
} else {
- Log.d(TAG, "mPokey=0x" + Integer.toHexString(mPokey));
+ Slog.d(TAG, "mPokey=0x" + Integer.toHexString(mPokey));
}
}
synchronized (mLocks) {
if (mSpew) {
- Log.d(TAG, "userActivity mLastEventTime=" + mLastEventTime + " time=" + time
+ Slog.d(TAG, "userActivity mLastEventTime=" + mLastEventTime + " time=" + time
+ " mUserActivityAllowed=" + mUserActivityAllowed
+ " mUserState=0x" + Integer.toHexString(mUserState)
+ " mWakeLockState=0x" + Integer.toHexString(mWakeLockState)
@@ -1990,7 +1993,7 @@
}
// ignore user activity if we are in the process of turning off the screen
if (isScreenTurningOffLocked()) {
- Log.d(TAG, "ignoring user activity while turning off screen");
+ Slog.d(TAG, "ignoring user activity while turning off screen");
return;
}
// Disable proximity sensor if if user presses power key while we are in the
@@ -2044,7 +2047,7 @@
return values[i];
} catch (Exception e) {
// guard against null pointer or index out of bounds errors
- Log.e(TAG, "getAutoBrightnessValue", e);
+ Slog.e(TAG, "getAutoBrightnessValue", e);
return 255;
}
}
@@ -2092,7 +2095,7 @@
private void lightSensorChangedLocked(int value) {
if (mDebugLightSensor) {
- Log.d(TAG, "lightSensorChangedLocked " + value);
+ Slog.d(TAG, "lightSensorChangedLocked " + value);
}
// do not allow light sensor value to decrease
@@ -2121,9 +2124,9 @@
mLightSensorKeyboardBrightness = keyboardValue;
if (mDebugLightSensor) {
- Log.d(TAG, "lcdValue " + lcdValue);
- Log.d(TAG, "buttonValue " + buttonValue);
- Log.d(TAG, "keyboardValue " + keyboardValue);
+ Slog.d(TAG, "lcdValue " + lcdValue);
+ Slog.d(TAG, "buttonValue " + buttonValue);
+ Slog.d(TAG, "keyboardValue " + keyboardValue);
}
boolean startAnimation = false;
@@ -2165,7 +2168,7 @@
}
if (startAnimation) {
if (mDebugLightSensor) {
- Log.i(TAG, "lightSensorChangedLocked scheduling light animator");
+ Slog.i(TAG, "lightSensorChangedLocked scheduling light animator");
}
mHandler.removeCallbacks(mLightAnimator);
mHandler.post(mLightAnimator);
@@ -2214,16 +2217,16 @@
try {
mSvc.shutdown();
} catch (Exception e) {
- Log.e(TAG, "MountService shutdown failed", e);
+ Slog.e(TAG, "MountService shutdown failed", e);
}
} else {
- Log.w(TAG, "MountService unavailable for shutdown");
+ Slog.w(TAG, "MountService unavailable for shutdown");
}
try {
Power.reboot(reason);
} catch (IOException e) {
- Log.e(TAG, "reboot failed", e);
+ Slog.e(TAG, "reboot failed", e);
}
}
@@ -2280,7 +2283,7 @@
public void setKeyboardVisibility(boolean visible) {
synchronized (mLocks) {
if (mSpew) {
- Log.d(TAG, "setKeyboardVisibility: " + visible);
+ Slog.d(TAG, "setKeyboardVisibility: " + visible);
}
if (mKeyboardVisible != visible) {
mKeyboardVisible = visible;
@@ -2309,7 +2312,7 @@
*/
public void enableUserActivity(boolean enabled) {
if (mSpew) {
- Log.d(TAG, "enableUserActivity " + enabled);
+ Slog.d(TAG, "enableUserActivity " + enabled);
}
synchronized (mLocks) {
mUserActivityAllowed = enabled;
@@ -2373,7 +2376,7 @@
}
}
if (mSpew) {
- Log.d(TAG, "setScreenOffTimeouts mKeylightDelay=" + mKeylightDelay
+ Slog.d(TAG, "setScreenOffTimeouts mKeylightDelay=" + mKeylightDelay
+ " mDimDelay=" + mDimDelay + " mScreenOffDelay=" + mScreenOffDelay
+ " mDimScreen=" + mDimScreen);
}
@@ -2388,7 +2391,7 @@
mContext.getContentResolver(),
Settings.Secure.SHORT_KEYLIGHT_DELAY_MS,
SHORT_KEYLIGHT_DELAY_DEFAULT);
- // Log.i(TAG, "updateSettingsValues(): mShortKeylightDelay now " + mShortKeylightDelay);
+ // Slog.i(TAG, "updateSettingsValues(): mShortKeylightDelay now " + mShortKeylightDelay);
}
private class LockList extends ArrayList<WakeLock>
@@ -2480,7 +2483,7 @@
}
synchronized (mLocks) {
- Log.d(TAG, "system ready!");
+ Slog.d(TAG, "system ready!");
mDoneBooting = true;
long identity = Binder.clearCallingIdentity();
try {
@@ -2495,7 +2498,7 @@
}
void bootCompleted() {
- Log.d(TAG, "bootCompleted");
+ Slog.d(TAG, "bootCompleted");
synchronized (mLocks) {
mBootCompleted = true;
userActivity(SystemClock.uptimeMillis(), false, BUTTON_EVENT, true);
@@ -2531,7 +2534,7 @@
try {
mBatteryStats.noteScreenBrightness(brightness);
} catch (RemoteException e) {
- Log.w(TAG, "RemoteException calling noteScreenBrightness on BatteryStatsService", e);
+ Slog.w(TAG, "RemoteException calling noteScreenBrightness on BatteryStatsService", e);
} finally {
Binder.restoreCallingIdentity(identity);
}
@@ -2561,7 +2564,7 @@
private void enableProximityLockLocked() {
if (mDebugProximitySensor) {
- Log.d(TAG, "enableProximityLockLocked");
+ Slog.d(TAG, "enableProximityLockLocked");
}
if (!mProximitySensorEnabled) {
// clear calling identity so sensor manager battery stats are accurate
@@ -2578,7 +2581,7 @@
private void disableProximityLockLocked() {
if (mDebugProximitySensor) {
- Log.d(TAG, "disableProximityLockLocked");
+ Slog.d(TAG, "disableProximityLockLocked");
}
if (mProximitySensorEnabled) {
// clear calling identity so sensor manager battery stats are accurate
@@ -2602,10 +2605,10 @@
private void proximityChangedLocked(boolean active) {
if (mDebugProximitySensor) {
- Log.d(TAG, "proximityChangedLocked, active: " + active);
+ Slog.d(TAG, "proximityChangedLocked, active: " + active);
}
if (!mProximitySensorEnabled) {
- Log.d(TAG, "Ignoring proximity change after sensor is disabled");
+ Slog.d(TAG, "Ignoring proximity change after sensor is disabled");
return;
}
if (active) {
@@ -2628,7 +2631,7 @@
private void enableLightSensor(boolean enable) {
if (mDebugLightSensor) {
- Log.d(TAG, "enableLightSensor " + enable);
+ Slog.d(TAG, "enableLightSensor " + enable);
}
if (mSensorManager != null && mLightSensorEnabled != enable) {
mLightSensorEnabled = enable;
@@ -2663,7 +2666,7 @@
distance < mProximitySensor.getMaximumRange());
if (mDebugProximitySensor) {
- Log.d(TAG, "mProximityListener.onSensorChanged active: " + active);
+ Slog.d(TAG, "mProximityListener.onSensorChanged active: " + active);
}
if (timeSinceLastEvent < PROXIMITY_SENSOR_DELAY) {
// enforce delaying atleast PROXIMITY_SENSOR_DELAY before processing
@@ -2703,7 +2706,7 @@
int value = (int)event.values[0];
long milliseconds = SystemClock.elapsedRealtime();
if (mDebugLightSensor) {
- Log.d(TAG, "onSensorChanged: light value: " + value);
+ Slog.d(TAG, "onSensorChanged: light value: " + value);
}
mHandler.removeCallbacks(mAutoBrightnessTask);
if (mLightSensorValue != value) {
diff --git a/services/java/com/android/server/ProcessStats.java b/services/java/com/android/server/ProcessStats.java
index ac3b723..a02c4e7 100644
--- a/services/java/com/android/server/ProcessStats.java
+++ b/services/java/com/android/server/ProcessStats.java
@@ -21,7 +21,7 @@
import android.os.Process;
import android.os.SystemClock;
import android.util.Config;
-import android.util.Log;
+import android.util.Slog;
import java.io.File;
import java.io.FileInputStream;
@@ -289,11 +289,11 @@
mRelIdleTime = (int)(idletime - mBaseIdleTime);
if (false) {
- Log.i("Load", "Total U:" + sysCpu[0] + " N:" + sysCpu[1]
+ Slog.i("Load", "Total U:" + sysCpu[0] + " N:" + sysCpu[1]
+ " S:" + sysCpu[2] + " I:" + sysCpu[3]
+ " W:" + sysCpu[4] + " Q:" + sysCpu[5]
+ " O:" + sysCpu[6]);
- Log.i("Load", "Rel U:" + mRelUserTime + " S:" + mRelSystemTime
+ Slog.i("Load", "Rel U:" + mRelUserTime + " S:" + mRelSystemTime
+ " I:" + mRelIdleTime + " Q:" + mRelIrqTime);
}
@@ -331,7 +331,7 @@
// Update an existing process...
st.added = false;
curStatsIndex++;
- if (localLOGV) Log.v(TAG, "Existing pid " + pid + ": " + st);
+ if (localLOGV) Slog.v(TAG, "Existing pid " + pid + ": " + st);
final long[] procStats = mProcessStatsData;
if (!Process.readProcFile(st.statFile.toString(),
@@ -376,7 +376,7 @@
st.rel_majfaults = (int)(majfaults - st.base_majfaults);
st.base_minfaults = minfaults;
st.base_majfaults = majfaults;
- //Log.i("Load", "Stats changed " + name + " pid=" + st.pid
+ //Slog.i("Load", "Stats changed " + name + " pid=" + st.pid
// + " name=" + st.name + " utime=" + utime
// + " stime=" + stime);
workingProcs.add(st);
@@ -389,7 +389,7 @@
allProcs.add(curStatsIndex, st);
curStatsIndex++;
NS++;
- if (localLOGV) Log.v(TAG, "New pid " + pid + ": " + st);
+ if (localLOGV) Slog.v(TAG, "New pid " + pid + ": " + st);
final String[] procStatsString = mProcessFullStatsStringData;
final long[] procStats = mProcessFullStatsData;
@@ -419,7 +419,7 @@
}
}
- //Log.i("Load", "New process: " + st.pid + " " + st.name);
+ //Slog.i("Load", "New process: " + st.pid + " " + st.name);
st.rel_utime = 0;
st.rel_stime = 0;
st.rel_minfaults = 0;
@@ -440,7 +440,7 @@
workingProcs.add(st);
allProcs.remove(curStatsIndex);
NS--;
- if (localLOGV) Log.v(TAG, "Removed pid " + st.pid + ": " + st);
+ if (localLOGV) Slog.v(TAG, "Removed pid " + st.pid + ": " + st);
// Decrement the loop counter so that we process the current pid
// again the next time through the loop.
i--;
@@ -458,7 +458,7 @@
workingProcs.add(st);
allProcs.remove(curStatsIndex);
NS--;
- if (localLOGV) Log.v(TAG, "Removed pid " + st.pid + ": " + st);
+ if (localLOGV) Slog.v(TAG, "Removed pid " + st.pid + ": " + st);
}
return pids;
@@ -523,11 +523,11 @@
speed++;
if (speed == MAX_SPEEDS) break; // No more
if (localLOGV && out == null) {
- Log.v(TAG, "First time : Speed/Time = " + tempSpeeds[speed - 1]
+ Slog.v(TAG, "First time : Speed/Time = " + tempSpeeds[speed - 1]
+ "\t" + tempTimes[speed - 1]);
}
} catch (NumberFormatException nfe) {
- Log.i(TAG, "Unable to parse time_in_state");
+ Slog.i(TAG, "Unable to parse time_in_state");
}
}
}
diff --git a/services/java/com/android/server/RandomBlock.java b/services/java/com/android/server/RandomBlock.java
index f7847ec..cc22bd9 100644
--- a/services/java/com/android/server/RandomBlock.java
+++ b/services/java/com/android/server/RandomBlock.java
@@ -16,7 +16,7 @@
package com.android.server;
-import android.util.Log;
+import android.util.Slog;
import java.io.Closeable;
import java.io.DataOutput;
@@ -39,7 +39,7 @@
private RandomBlock() { }
static RandomBlock fromFile(String filename) throws IOException {
- if (DEBUG) Log.v(TAG, "reading from file " + filename);
+ if (DEBUG) Slog.v(TAG, "reading from file " + filename);
InputStream stream = null;
try {
stream = new FileInputStream(filename);
@@ -63,7 +63,7 @@
}
void toFile(String filename) throws IOException {
- if (DEBUG) Log.v(TAG, "writing to file " + filename);
+ if (DEBUG) Slog.v(TAG, "writing to file " + filename);
RandomAccessFile out = null;
try {
out = new RandomAccessFile(filename, "rws");
@@ -95,7 +95,7 @@
}
c.close();
} catch (IOException e) {
- Log.w(TAG, "IOException thrown while closing Closeable", e);
+ Slog.w(TAG, "IOException thrown while closing Closeable", e);
}
}
}
diff --git a/services/java/com/android/server/RecognitionManagerService.java b/services/java/com/android/server/RecognitionManagerService.java
index 7305b07..8e55512 100644
--- a/services/java/com/android/server/RecognitionManagerService.java
+++ b/services/java/com/android/server/RecognitionManagerService.java
@@ -28,7 +28,7 @@
import android.provider.Settings;
import android.speech.RecognitionService;
import android.text.TextUtils;
-import android.util.Log;
+import android.util.Slog;
import java.util.List;
@@ -92,7 +92,7 @@
int numAvailable = available.size();
if (numAvailable == 0) {
- Log.w(TAG, "no available voice recognition services found");
+ Slog.w(TAG, "no available voice recognition services found");
return null;
} else {
if (prefPackage != null) {
@@ -104,7 +104,7 @@
}
}
if (numAvailable > 1) {
- Log.w(TAG, "more than one voice recognition service found, picking first");
+ Slog.w(TAG, "more than one voice recognition service found, picking first");
}
ServiceInfo serviceInfo = available.get(0).serviceInfo;
diff --git a/services/java/com/android/server/SensorService.java b/services/java/com/android/server/SensorService.java
index 4dfeb9d..01d64a7 100644
--- a/services/java/com/android/server/SensorService.java
+++ b/services/java/com/android/server/SensorService.java
@@ -23,7 +23,7 @@
import android.os.RemoteException;
import android.os.IBinder;
import android.util.Config;
-import android.util.Log;
+import android.util.Slog;
import java.util.ArrayList;
@@ -74,7 +74,7 @@
}
public void binderDied() {
- if (localLOGV) Log.d(TAG, "sensor listener died");
+ if (localLOGV) Slog.d(TAG, "sensor listener died");
synchronized(mListeners) {
mListeners.remove(this);
mToken.unlinkToDeath(this, 0);
@@ -86,7 +86,7 @@
try {
deactivateIfUnusedLocked(sensor);
} catch (RemoteException e) {
- Log.w(TAG, "RemoteException in binderDied");
+ Slog.w(TAG, "RemoteException in binderDied");
}
}
}
@@ -101,7 +101,7 @@
@SuppressWarnings("unused")
public SensorService(Context context) {
- if (localLOGV) Log.d(TAG, "SensorService startup");
+ if (localLOGV) Slog.d(TAG, "SensorService startup");
_sensors_control_init();
}
@@ -114,7 +114,7 @@
public boolean enableSensor(IBinder binder, String name, int sensor, int enable)
throws RemoteException {
- if (localLOGV) Log.d(TAG, "enableSensor " + name + "(#" + sensor + ") " + enable);
+ if (localLOGV) Slog.d(TAG, "enableSensor " + name + "(#" + sensor + ") " + enable);
// Inform battery statistics service of status change
int uid = Binder.getCallingUid();
@@ -127,13 +127,13 @@
Binder.restoreCallingIdentity(identity);
if (binder == null) {
- Log.w(TAG, "listener is null (sensor=" + name + ", id=" + sensor + ")");
+ Slog.w(TAG, "listener is null (sensor=" + name + ", id=" + sensor + ")");
return false;
}
synchronized(mListeners) {
if (enable!=SENSOR_DISABLE && !_sensors_control_activate(sensor, true)) {
- Log.w(TAG, "could not enable sensor " + sensor);
+ Slog.w(TAG, "could not enable sensor " + sensor);
return false;
}
@@ -157,7 +157,7 @@
if (l == null) {
// by construction, this means we're disabling a listener we
// don't know about...
- Log.w(TAG, "listener with binder " + binder +
+ Slog.w(TAG, "listener with binder " + binder +
", doesn't exist (sensor=" + name + ", id=" + sensor + ")");
return false;
}
diff --git a/services/java/com/android/server/ShutdownActivity.java b/services/java/com/android/server/ShutdownActivity.java
index 7f0e90d..64b9c5d 100644
--- a/services/java/com/android/server/ShutdownActivity.java
+++ b/services/java/com/android/server/ShutdownActivity.java
@@ -21,7 +21,7 @@
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
-import android.util.Log;
+import android.util.Slog;
import com.android.internal.app.ShutdownThread;
public class ShutdownActivity extends Activity {
@@ -34,7 +34,7 @@
super.onCreate(savedInstanceState);
mConfirm = getIntent().getBooleanExtra(Intent.EXTRA_KEY_CONFIRM, false);
- Log.i(TAG, "onCreate(): confirm=" + mConfirm);
+ Slog.i(TAG, "onCreate(): confirm=" + mConfirm);
Handler h = new Handler();
h.post(new Runnable() {
diff --git a/services/java/com/android/server/SystemBackupAgent.java b/services/java/com/android/server/SystemBackupAgent.java
index 67abe55..186aebe 100644
--- a/services/java/com/android/server/SystemBackupAgent.java
+++ b/services/java/com/android/server/SystemBackupAgent.java
@@ -26,7 +26,7 @@
import android.os.ParcelFileDescriptor;
import android.os.ServiceManager;
import android.os.SystemService;
-import android.util.Log;
+import android.util.Slog;
import java.io.File;
import java.io.IOException;
@@ -77,7 +77,7 @@
} catch (IOException ex) {
// If there was a failure, delete everything for the wallpaper, this is too aggresive,
// but this is hopefully a rare failure.
- Log.d(TAG, "restore failed", ex);
+ Slog.d(TAG, "restore failed", ex);
(new File(WALLPAPER_IMAGE)).delete();
(new File(WALLPAPER_INFO)).delete();
}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 38df02f..deee7f3 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -42,7 +42,7 @@
import android.server.BluetoothService;
import android.server.search.SearchManagerService;
import android.util.EventLog;
-import android.util.Log;
+import android.util.Slog;
import android.accounts.AccountManagerService;
import java.io.File;
@@ -101,22 +101,22 @@
// Critical services...
try {
- Log.i(TAG, "Entropy Service");
+ Slog.i(TAG, "Entropy Service");
ServiceManager.addService("entropy", new EntropyService());
- Log.i(TAG, "Power Manager");
+ Slog.i(TAG, "Power Manager");
power = new PowerManagerService();
ServiceManager.addService(Context.POWER_SERVICE, power);
- Log.i(TAG, "Activity Manager");
+ Slog.i(TAG, "Activity Manager");
context = ActivityManagerService.main(factoryTest);
- Log.i(TAG, "Telephony Registry");
+ Slog.i(TAG, "Telephony Registry");
ServiceManager.addService("telephony.registry", new TelephonyRegistry(context));
AttributeCache.init(context);
- Log.i(TAG, "Package Manager");
+ Slog.i(TAG, "Package Manager");
pm = PackageManagerService.main(context,
factoryTest != SystemServer.FACTORY_TEST_OFF);
@@ -126,47 +126,47 @@
// The AccountManager must come before the ContentService
try {
- Log.i(TAG, "Account Manager");
+ Slog.i(TAG, "Account Manager");
ServiceManager.addService(Context.ACCOUNT_SERVICE,
new AccountManagerService(context));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Account Manager", e);
+ Slog.e(TAG, "Failure starting Account Manager", e);
}
- Log.i(TAG, "Content Manager");
+ Slog.i(TAG, "Content Manager");
ContentService.main(context,
factoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL);
- Log.i(TAG, "System Content Providers");
+ Slog.i(TAG, "System Content Providers");
ActivityManagerService.installSystemProviders();
- Log.i(TAG, "Battery Service");
+ Slog.i(TAG, "Battery Service");
battery = new BatteryService(context);
ServiceManager.addService("battery", battery);
- Log.i(TAG, "Lights Service");
+ Slog.i(TAG, "Lights Service");
lights = new LightsService(context);
- Log.i(TAG, "Vibrator Service");
+ Slog.i(TAG, "Vibrator Service");
ServiceManager.addService("vibrator", new VibratorService(context));
// only initialize the power service after we have started the
// lights service, content providers and the battery service.
power.init(context, lights, ActivityManagerService.getDefault(), battery);
- Log.i(TAG, "Alarm Manager");
+ Slog.i(TAG, "Alarm Manager");
AlarmManagerService alarm = new AlarmManagerService(context);
ServiceManager.addService(Context.ALARM_SERVICE, alarm);
- Log.i(TAG, "Init Watchdog");
+ Slog.i(TAG, "Init Watchdog");
Watchdog.getInstance().init(context, battery, power, alarm,
ActivityManagerService.self());
// Sensor Service is needed by Window Manager, so this goes first
- Log.i(TAG, "Sensor Service");
+ Slog.i(TAG, "Sensor Service");
ServiceManager.addService(Context.SENSOR_SERVICE, new SensorService(context));
- Log.i(TAG, "Window Manager");
+ Slog.i(TAG, "Window Manager");
wm = WindowManagerService.main(context, power,
factoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL);
ServiceManager.addService(Context.WINDOW_SERVICE, wm);
@@ -178,13 +178,13 @@
// TODO: Use a more reliable check to see if this product should
// support Bluetooth - see bug 988521
if (SystemProperties.get("ro.kernel.qemu").equals("1")) {
- Log.i(TAG, "Registering null Bluetooth Service (emulator)");
+ Slog.i(TAG, "Registering null Bluetooth Service (emulator)");
ServiceManager.addService(BluetoothAdapter.BLUETOOTH_SERVICE, null);
} else if (factoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL) {
- Log.i(TAG, "Registering null Bluetooth Service (factory test)");
+ Slog.i(TAG, "Registering null Bluetooth Service (factory test)");
ServiceManager.addService(BluetoothAdapter.BLUETOOTH_SERVICE, null);
} else {
- Log.i(TAG, "Bluetooth Service");
+ Slog.i(TAG, "Bluetooth Service");
bluetooth = new BluetoothService(context);
ServiceManager.addService(BluetoothAdapter.BLUETOOTH_SERVICE, bluetooth);
bluetooth.initAfterRegistration();
@@ -200,7 +200,7 @@
}
} catch (RuntimeException e) {
- Log.e("System", "Failure starting core service", e);
+ Slog.e("System", "Failure starting core service", e);
}
DevicePolicyManagerService devicePolicy = null;
@@ -209,69 +209,70 @@
AppWidgetService appWidget = null;
NotificationManagerService notification = null;
WallpaperManagerService wallpaper = null;
+ LocationManagerService location = null;
if (factoryTest != SystemServer.FACTORY_TEST_LOW_LEVEL) {
try {
- Log.i(TAG, "Device Policy");
+ Slog.i(TAG, "Device Policy");
devicePolicy = new DevicePolicyManagerService(context);
ServiceManager.addService(Context.DEVICE_POLICY_SERVICE, devicePolicy);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting DevicePolicyService", e);
+ Slog.e(TAG, "Failure starting DevicePolicyService", e);
}
try {
- Log.i(TAG, "Status Bar");
+ Slog.i(TAG, "Status Bar");
statusBar = new StatusBarService(context);
ServiceManager.addService(Context.STATUS_BAR_SERVICE, statusBar);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting StatusBarService", e);
+ Slog.e(TAG, "Failure starting StatusBarService", e);
}
try {
- Log.i(TAG, "Clipboard Service");
+ Slog.i(TAG, "Clipboard Service");
ServiceManager.addService(Context.CLIPBOARD_SERVICE,
new ClipboardService(context));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Clipboard Service", e);
+ Slog.e(TAG, "Failure starting Clipboard Service", e);
}
try {
- Log.i(TAG, "Input Method Service");
+ Slog.i(TAG, "Input Method Service");
imm = new InputMethodManagerService(context, statusBar);
ServiceManager.addService(Context.INPUT_METHOD_SERVICE, imm);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Input Manager Service", e);
+ Slog.e(TAG, "Failure starting Input Manager Service", e);
}
try {
- Log.i(TAG, "NetStat Service");
+ Slog.i(TAG, "NetStat Service");
ServiceManager.addService("netstat", new NetStatService(context));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting NetStat Service", e);
+ Slog.e(TAG, "Failure starting NetStat Service", e);
}
try {
- Log.i(TAG, "NetworkManagement Service");
+ Slog.i(TAG, "NetworkManagement Service");
ServiceManager.addService(
Context.NETWORKMANAGEMENT_SERVICE, new NetworkManagementService(context));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting NetworkManagement Service", e);
+ Slog.e(TAG, "Failure starting NetworkManagement Service", e);
}
try {
- Log.i(TAG, "Connectivity Service");
+ Slog.i(TAG, "Connectivity Service");
connectivity = ConnectivityService.getInstance(context);
ServiceManager.addService(Context.CONNECTIVITY_SERVICE, connectivity);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Connectivity Service", e);
+ Slog.e(TAG, "Failure starting Connectivity Service", e);
}
try {
- Log.i(TAG, "Accessibility Manager");
+ Slog.i(TAG, "Accessibility Manager");
ServiceManager.addService(Context.ACCESSIBILITY_SERVICE,
new AccessibilityManagerService(context));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Accessibility Manager", e);
+ Slog.e(TAG, "Failure starting Accessibility Manager", e);
}
try {
@@ -279,115 +280,115 @@
* NotificationManagerService is dependant on MountService,
* (for media / usb notifications) so we must start MountService first.
*/
- Log.i(TAG, "Mount Service");
+ Slog.i(TAG, "Mount Service");
ServiceManager.addService("mount", new MountService(context));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Mount Service", e);
+ Slog.e(TAG, "Failure starting Mount Service", e);
}
try {
- Log.i(TAG, "Notification Manager");
+ Slog.i(TAG, "Notification Manager");
notification = new NotificationManagerService(context, statusBar, lights);
ServiceManager.addService(Context.NOTIFICATION_SERVICE, notification);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Notification Manager", e);
+ Slog.e(TAG, "Failure starting Notification Manager", e);
}
try {
- Log.i(TAG, "Device Storage Monitor");
+ Slog.i(TAG, "Device Storage Monitor");
ServiceManager.addService(DeviceStorageMonitorService.SERVICE,
new DeviceStorageMonitorService(context));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting DeviceStorageMonitor service", e);
+ Slog.e(TAG, "Failure starting DeviceStorageMonitor service", e);
}
try {
- Log.i(TAG, "Location Manager");
- ServiceManager.addService(Context.LOCATION_SERVICE,
- new LocationManagerService(context));
+ Slog.i(TAG, "Location Manager");
+ location = new LocationManagerService(context);
+ ServiceManager.addService(Context.LOCATION_SERVICE, location);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Location Manager", e);
+ Slog.e(TAG, "Failure starting Location Manager", e);
}
try {
- Log.i(TAG, "Search Service");
+ Slog.i(TAG, "Search Service");
ServiceManager.addService(Context.SEARCH_SERVICE,
new SearchManagerService(context));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Search Service", e);
+ Slog.e(TAG, "Failure starting Search Service", e);
}
if (INCLUDE_DEMO) {
- Log.i(TAG, "Installing demo data...");
+ Slog.i(TAG, "Installing demo data...");
(new DemoThread(context)).start();
}
try {
- Log.i(TAG, "DropBox Service");
+ Slog.i(TAG, "DropBox Service");
ServiceManager.addService(Context.DROPBOX_SERVICE,
new DropBoxManagerService(context, new File("/data/system/dropbox")));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting DropBoxManagerService", e);
+ Slog.e(TAG, "Failure starting DropBoxManagerService", e);
}
try {
- Log.i(TAG, "Wallpaper Service");
+ Slog.i(TAG, "Wallpaper Service");
wallpaper = new WallpaperManagerService(context);
ServiceManager.addService(Context.WALLPAPER_SERVICE, wallpaper);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Wallpaper Service", e);
+ Slog.e(TAG, "Failure starting Wallpaper Service", e);
}
try {
- Log.i(TAG, "Audio Service");
+ Slog.i(TAG, "Audio Service");
ServiceManager.addService(Context.AUDIO_SERVICE, new AudioService(context));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Audio Service", e);
+ Slog.e(TAG, "Failure starting Audio Service", e);
}
try {
- Log.i(TAG, "Headset Observer");
+ Slog.i(TAG, "Headset Observer");
// Listen for wired headset changes
headset = new HeadsetObserver(context);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting HeadsetObserver", e);
+ Slog.e(TAG, "Failure starting HeadsetObserver", e);
}
try {
- Log.i(TAG, "Dock Observer");
+ Slog.i(TAG, "Dock Observer");
// Listen for dock station changes
dock = new DockObserver(context, power);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting DockObserver", e);
+ Slog.e(TAG, "Failure starting DockObserver", e);
}
try {
- Log.i(TAG, "Backup Service");
+ Slog.i(TAG, "Backup Service");
ServiceManager.addService(Context.BACKUP_SERVICE,
new BackupManagerService(context));
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Backup Service", e);
+ Slog.e(TAG, "Failure starting Backup Service", e);
}
try {
- Log.i(TAG, "AppWidget Service");
+ Slog.i(TAG, "AppWidget Service");
appWidget = new AppWidgetService(context);
ServiceManager.addService(Context.APPWIDGET_SERVICE, appWidget);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting AppWidget Service", e);
+ Slog.e(TAG, "Failure starting AppWidget Service", e);
}
try {
- Log.i(TAG, "Recognition Service");
+ Slog.i(TAG, "Recognition Service");
recognition = new RecognitionManagerService(context);
} catch (Throwable e) {
- Log.e(TAG, "Failure starting Recognition Service", e);
+ Slog.e(TAG, "Failure starting Recognition Service", e);
}
try {
com.android.server.status.StatusBarPolicy.installIcons(context, statusBar);
} catch (Throwable e) {
- Log.e(TAG, "Failure installing status bar icons", e);
+ Slog.e(TAG, "Failure installing status bar icons", e);
}
}
@@ -444,6 +445,7 @@
final WallpaperManagerService wallpaperF = wallpaper;
final InputMethodManagerService immF = imm;
final RecognitionManagerService recognitionF = recognition;
+ final LocationManagerService locationF = location;
// We now tell the activity manager it is okay to run third party
// code. It will call back into us once it has gotten to the state
@@ -453,7 +455,7 @@
((ActivityManagerService)ActivityManagerNative.getDefault())
.systemReady(new Runnable() {
public void run() {
- Log.i(TAG, "Making services ready");
+ Slog.i(TAG, "Making services ready");
if (batteryF != null) batteryF.systemReady();
if (connectivityF != null) connectivityF.systemReady();
@@ -467,11 +469,12 @@
if (appWidgetF != null) appWidgetF.systemReady(safeMode);
if (wallpaperF != null) wallpaperF.systemReady();
if (immF != null) immF.systemReady();
+ if (locationF != null) locationF.systemReady();
}
});
Looper.loop();
- Log.d(TAG, "System ServerThread is exiting!");
+ Slog.d(TAG, "System ServerThread is exiting!");
}
}
@@ -496,7 +499,7 @@
dataset.add(mContext);
}
} catch (Throwable e) {
- Log.e("SystemServer", "Failure installing demo data", e);
+ Slog.e("SystemServer", "Failure installing demo data", e);
}
}
@@ -543,7 +546,7 @@
}
public static final void init2() {
- Log.i(TAG, "Entered the Android system server!");
+ Slog.i(TAG, "Entered the Android system server!");
Thread thr = new ServerThread();
thr.setName("android.server.ServerThread");
thr.start();
diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java
index 3bee40c..664dfa5 100644
--- a/services/java/com/android/server/TelephonyRegistry.java
+++ b/services/java/com/android/server/TelephonyRegistry.java
@@ -29,7 +29,7 @@
import android.telephony.SignalStrength;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
-import android.util.Log;
+import android.util.Slog;
import java.util.ArrayList;
import java.io.FileDescriptor;
@@ -124,7 +124,7 @@
public void listen(String pkgForDebug, IPhoneStateListener callback, int events,
boolean notifyNow) {
- // Log.d(TAG, "listen pkg=" + pkgForDebug + " events=0x" +
+ // Slog.d(TAG, "listen pkg=" + pkgForDebug + " events=0x" +
// Integer.toHexString(events));
if (events != 0) {
/* Checks permission and throws Security exception */
@@ -575,7 +575,7 @@
}
String msg = "Modify Phone State Permission Denial: " + method + " from pid="
+ Binder.getCallingPid() + ", uid=" + Binder.getCallingUid();
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
return false;
}
diff --git a/services/java/com/android/server/TwilightCalculator.java b/services/java/com/android/server/TwilightCalculator.java
index a8f67d8..a5c93b5 100644
--- a/services/java/com/android/server/TwilightCalculator.java
+++ b/services/java/com/android/server/TwilightCalculator.java
@@ -46,10 +46,16 @@
// Java time on Jan 1, 2000 12:00 UTC.
private static final long UTC_2000 = 946728000000L;
- /** Time of sunset (civil twilight) in milliseconds. */
+ /**
+ * Time of sunset (civil twilight) in milliseconds or -1 in the case the day
+ * or night never ends.
+ */
public long mSunset;
- /** Time of sunrise (civil twilight) in milliseconds. */
+ /**
+ * Time of sunrise (civil twilight) in milliseconds or -1 in the case the
+ * day or night never ends.
+ */
public long mSunrise;
/** Current state */
@@ -85,10 +91,24 @@
double solarDec = Math.asin(FloatMath.sin(solarLng) * FloatMath.sin(OBLIQUITY));
final double latRad = latiude * DEGREES_TO_RADIANS;
- float hourAngle = (float) (Math
- .acos((FloatMath.sin(ALTIDUTE_CORRECTION_CIVIL_TWILIGHT) - Math.sin(latRad)
- * Math.sin(solarDec))
- / (Math.cos(latRad) * Math.cos(solarDec))) / (2 * Math.PI));
+
+ double cosHourAngle = (FloatMath.sin(ALTIDUTE_CORRECTION_CIVIL_TWILIGHT) - Math.sin(latRad)
+ * Math.sin(solarDec)) / (Math.cos(latRad) * Math.cos(solarDec));
+ // The day or night never ends for the given date and location, if this value is out of
+ // range.
+ if (cosHourAngle >= 1) {
+ mState = NIGHT;
+ mSunset = -1;
+ mSunrise = -1;
+ return;
+ } else if (cosHourAngle <= -1) {
+ mState = DAY;
+ mSunset = -1;
+ mSunrise = -1;
+ return;
+ }
+
+ float hourAngle = (float) (Math.acos(cosHourAngle) / (2 * Math.PI));
mSunset = Math.round((solarTransitJ2000 + hourAngle) * DateUtils.DAY_IN_MILLIS) + UTC_2000;
mSunrise = Math.round((solarTransitJ2000 - hourAngle) * DateUtils.DAY_IN_MILLIS) + UTC_2000;
diff --git a/services/java/com/android/server/VibratorService.java b/services/java/com/android/server/VibratorService.java
index 5282ba2..2e7e3e1 100755
--- a/services/java/com/android/server/VibratorService.java
+++ b/services/java/com/android/server/VibratorService.java
@@ -29,7 +29,7 @@
import android.os.IBinder;
import android.os.Binder;
import android.os.SystemClock;
-import android.util.Log;
+import android.util.Slog;
import java.util.LinkedList;
import java.util.ListIterator;
@@ -155,7 +155,7 @@
for (int i=0; i<N; i++) {
s += " " + pattern[i];
}
- Log.i(TAG, "vibrating with pattern: " + s);
+ Slog.i(TAG, "vibrating with pattern: " + s);
}
// we're running in the server so we can't fail
diff --git a/services/java/com/android/server/ViewServer.java b/services/java/com/android/server/ViewServer.java
index e9a1951..ae00438 100644
--- a/services/java/com/android/server/ViewServer.java
+++ b/services/java/com/android/server/ViewServer.java
@@ -16,7 +16,7 @@
package com.android.server;
-import android.util.Log;
+import android.util.Slog;
import java.net.ServerSocket;
import java.net.Socket;
@@ -129,7 +129,7 @@
mServer = null;
return true;
} catch (IOException e) {
- Log.w(LOG_TAG, "Could not close the view server");
+ Slog.w(LOG_TAG, "Could not close the view server");
}
}
return false;
@@ -191,7 +191,7 @@
}
if (!result) {
- Log.w(LOG_TAG, "An error occured with the command: " + command);
+ Slog.w(LOG_TAG, "An error occured with the command: " + command);
}
} finally {
if (in != null) {
@@ -199,7 +199,7 @@
}
}
} catch (Exception e) {
- Log.w(LOG_TAG, "Connection error: ", e);
+ Slog.w(LOG_TAG, "Connection error: ", e);
} finally {
if (client != null) {
try {
diff --git a/services/java/com/android/server/WallpaperManagerService.java b/services/java/com/android/server/WallpaperManagerService.java
index 481e6a4..7a03ebd 100644
--- a/services/java/com/android/server/WallpaperManagerService.java
+++ b/services/java/com/android/server/WallpaperManagerService.java
@@ -46,7 +46,7 @@
import android.service.wallpaper.IWallpaperEngine;
import android.service.wallpaper.IWallpaperService;
import android.service.wallpaper.WallpaperService;
-import android.util.Log;
+import android.util.Slog;
import android.util.Xml;
import android.view.IWindowManager;
import android.view.WindowManager;
@@ -67,9 +67,9 @@
import com.android.internal.content.PackageMonitor;
import com.android.internal.service.wallpaper.ImageWallpaper;
+import com.android.internal.util.FastXmlSerializer;
import com.android.server.DevicePolicyManagerService.ActiveAdmin;
import com.android.server.DevicePolicyManagerService.MyPackageMonitor;
-import com.android.common.FastXmlSerializer;
class WallpaperManagerService extends IWallpaperManager.Stub {
static final String TAG = "WallpaperService";
@@ -187,10 +187,10 @@
mService = null;
mEngine = null;
if (mWallpaperConnection == this) {
- Log.w(TAG, "Wallpaper service gone: " + mWallpaperComponent);
+ Slog.w(TAG, "Wallpaper service gone: " + mWallpaperComponent);
if (!mWallpaperUpdating && (mLastDiedTime+MIN_WALLPAPER_CRASH_TIME)
> SystemClock.uptimeMillis()) {
- Log.w(TAG, "Reverting to built-in wallpaper!");
+ Slog.w(TAG, "Reverting to built-in wallpaper!");
bindWallpaperComponentLocked(null);
}
}
@@ -254,7 +254,7 @@
|| change == PACKAGE_TEMPORARY_CHANGE) {
changed = true;
if (doit) {
- Log.w(TAG, "Wallpaper uninstalled, removing: " + mWallpaperComponent);
+ Slog.w(TAG, "Wallpaper uninstalled, removing: " + mWallpaperComponent);
clearWallpaperLocked();
}
}
@@ -272,7 +272,7 @@
mContext.getPackageManager().getServiceInfo(
mWallpaperComponent, 0);
} catch (NameNotFoundException e) {
- Log.w(TAG, "Wallpaper component gone, removing: " + mWallpaperComponent);
+ Slog.w(TAG, "Wallpaper component gone, removing: " + mWallpaperComponent);
clearWallpaperLocked();
}
}
@@ -291,7 +291,7 @@
}
public WallpaperManagerService(Context context) {
- if (DEBUG) Log.v(TAG, "WallpaperService startup");
+ if (DEBUG) Slog.v(TAG, "WallpaperService startup");
mContext = context;
mIWindowManager = IWindowManager.Stub.asInterface(
ServiceManager.getService(Context.WINDOW_SERVICE));
@@ -309,16 +309,16 @@
}
public void systemReady() {
- if (DEBUG) Log.v(TAG, "systemReady");
+ if (DEBUG) Slog.v(TAG, "systemReady");
synchronized (mLock) {
try {
bindWallpaperComponentLocked(mNextWallpaperComponent);
} catch (RuntimeException e) {
- Log.w(TAG, "Failure starting previous wallpaper", e);
+ Slog.w(TAG, "Failure starting previous wallpaper", e);
try {
bindWallpaperComponentLocked(null);
} catch (RuntimeException e2) {
- Log.w(TAG, "Failure starting default wallpaper", e2);
+ Slog.w(TAG, "Failure starting default wallpaper", e2);
clearWallpaperComponentLocked();
}
}
@@ -326,7 +326,7 @@
}
public void clearWallpaper() {
- if (DEBUG) Log.v(TAG, "clearWallpaper");
+ if (DEBUG) Slog.v(TAG, "clearWallpaper");
synchronized (mLock) {
clearWallpaperLocked();
}
@@ -399,7 +399,7 @@
return ParcelFileDescriptor.open(f, MODE_READ_ONLY);
} catch (FileNotFoundException e) {
/* Shouldn't happen as we check to see if the file exists */
- Log.w(TAG, "Error getting wallpaper", e);
+ Slog.w(TAG, "Error getting wallpaper", e);
}
return null;
}
@@ -415,7 +415,7 @@
}
public ParcelFileDescriptor setWallpaper(String name) {
- if (DEBUG) Log.v(TAG, "setWallpaper");
+ if (DEBUG) Slog.v(TAG, "setWallpaper");
checkPermission(android.Manifest.permission.SET_WALLPAPER);
synchronized (mLock) {
@@ -442,13 +442,13 @@
mName = name;
return fd;
} catch (FileNotFoundException e) {
- Log.w(TAG, "Error setting wallpaper", e);
+ Slog.w(TAG, "Error setting wallpaper", e);
}
return null;
}
public void setWallpaperComponent(ComponentName name) {
- if (DEBUG) Log.v(TAG, "setWallpaperComponent name=" + name);
+ if (DEBUG) Slog.v(TAG, "setWallpaperComponent name=" + name);
checkPermission(android.Manifest.permission.SET_WALLPAPER_COMPONENT);
synchronized (mLock) {
final long ident = Binder.clearCallingIdentity();
@@ -461,19 +461,19 @@
}
void bindWallpaperComponentLocked(ComponentName componentName) {
- if (DEBUG) Log.v(TAG, "bindWallpaperComponentLocked: componentName=" + componentName);
+ if (DEBUG) Slog.v(TAG, "bindWallpaperComponentLocked: componentName=" + componentName);
// Has the component changed?
if (mWallpaperConnection != null) {
if (mWallpaperComponent == null) {
if (componentName == null) {
- if (DEBUG) Log.v(TAG, "bindWallpaperComponentLocked: still using default");
+ if (DEBUG) Slog.v(TAG, "bindWallpaperComponentLocked: still using default");
// Still using default wallpaper.
return;
}
} else if (mWallpaperComponent.equals(componentName)) {
// Changing to same wallpaper.
- if (DEBUG) Log.v(TAG, "same wallpaper");
+ if (DEBUG) Slog.v(TAG, "same wallpaper");
return;
}
}
@@ -485,14 +485,14 @@
if (defaultComponent != null) {
// See if there is a default wallpaper component specified
componentName = ComponentName.unflattenFromString(defaultComponent);
- if (DEBUG) Log.v(TAG, "Use default component wallpaper:" + componentName);
+ if (DEBUG) Slog.v(TAG, "Use default component wallpaper:" + componentName);
}
if (componentName == null) {
// Fall back to static image wallpaper
componentName = mImageWallpaperComponent;
//clearWallpaperComponentLocked();
//return;
- if (DEBUG) Log.v(TAG, "Using image wallpaper");
+ if (DEBUG) Slog.v(TAG, "Using image wallpaper");
}
}
ServiceInfo si = mContext.getPackageManager().getServiceInfo(componentName,
@@ -531,7 +531,7 @@
}
// Bind the service!
- if (DEBUG) Log.v(TAG, "Binding to:" + componentName);
+ if (DEBUG) Slog.v(TAG, "Binding to:" + componentName);
WallpaperConnection newConn = new WallpaperConnection(wi);
intent.setComponent(componentName);
intent.putExtra(Intent.EXTRA_CLIENT_LABEL,
@@ -552,7 +552,7 @@
mWallpaperConnection = newConn;
mLastDiedTime = SystemClock.uptimeMillis();
try {
- if (DEBUG) Log.v(TAG, "Adding window token: " + newConn.mToken);
+ if (DEBUG) Slog.v(TAG, "Adding window token: " + newConn.mToken);
mIWindowManager.addWindowToken(newConn.mToken,
WindowManager.LayoutParams.TYPE_WALLPAPER);
} catch (RemoteException e) {
@@ -574,7 +574,7 @@
}
mContext.unbindService(mWallpaperConnection);
try {
- if (DEBUG) Log.v(TAG, "Removing window token: "
+ if (DEBUG) Slog.v(TAG, "Removing window token: "
+ mWallpaperConnection.mToken);
mIWindowManager.removeWindowToken(mWallpaperConnection.mToken);
} catch (RemoteException e) {
@@ -589,7 +589,7 @@
WindowManager.LayoutParams.TYPE_WALLPAPER, false,
mWidth, mHeight);
} catch (RemoteException e) {
- Log.w(TAG, "Failed attaching wallpaper; clearing", e);
+ Slog.w(TAG, "Failed attaching wallpaper; clearing", e);
if (!mWallpaperUpdating) {
bindWallpaperComponentLocked(null);
}
@@ -659,7 +659,7 @@
}
private void loadSettingsLocked() {
- if (DEBUG) Log.v(TAG, "loadSettingsLocked");
+ if (DEBUG) Slog.v(TAG, "loadSettingsLocked");
JournaledFile journal = makeJournaledFile();
FileInputStream stream = null;
@@ -685,25 +685,25 @@
: null;
if (DEBUG) {
- Log.v(TAG, "mWidth:" + mWidth);
- Log.v(TAG, "mHeight:" + mHeight);
- Log.v(TAG, "mName:" + mName);
- Log.v(TAG, "mNextWallpaperComponent:" + mNextWallpaperComponent);
+ Slog.v(TAG, "mWidth:" + mWidth);
+ Slog.v(TAG, "mHeight:" + mHeight);
+ Slog.v(TAG, "mName:" + mName);
+ Slog.v(TAG, "mNextWallpaperComponent:" + mNextWallpaperComponent);
}
}
}
} while (type != XmlPullParser.END_DOCUMENT);
success = true;
} catch (NullPointerException e) {
- Log.w(TAG, "failed parsing " + file + " " + e);
+ Slog.w(TAG, "failed parsing " + file + " " + e);
} catch (NumberFormatException e) {
- Log.w(TAG, "failed parsing " + file + " " + e);
+ Slog.w(TAG, "failed parsing " + file + " " + e);
} catch (XmlPullParserException e) {
- Log.w(TAG, "failed parsing " + file + " " + e);
+ Slog.w(TAG, "failed parsing " + file + " " + e);
} catch (IOException e) {
- Log.w(TAG, "failed parsing " + file + " " + e);
+ Slog.w(TAG, "failed parsing " + file + " " + e);
} catch (IndexOutOfBoundsException e) {
- Log.w(TAG, "failed parsing " + file + " " + e);
+ Slog.w(TAG, "failed parsing " + file + " " + e);
}
try {
if (stream != null) {
@@ -721,7 +721,7 @@
}
void settingsRestored() {
- if (DEBUG) Log.v(TAG, "settingsRestored");
+ if (DEBUG) Slog.v(TAG, "settingsRestored");
boolean success = false;
synchronized (mLock) {
@@ -741,13 +741,13 @@
// If there's a wallpaper name, we use that. If that can't be loaded, then we
// use the default.
if ("".equals(mName)) {
- if (DEBUG) Log.v(TAG, "settingsRestored: name is empty");
+ if (DEBUG) Slog.v(TAG, "settingsRestored: name is empty");
success = true;
} else {
- if (DEBUG) Log.v(TAG, "settingsRestored: attempting to restore named resource");
+ if (DEBUG) Slog.v(TAG, "settingsRestored: attempting to restore named resource");
success = restoreNamedResourceLocked();
}
- if (DEBUG) Log.v(TAG, "settingsRestored: success=" + success);
+ if (DEBUG) Slog.v(TAG, "settingsRestored: success=" + success);
if (success) {
bindWallpaperComponentLocked(mImageWallpaperComponent);
}
@@ -755,7 +755,7 @@
}
if (!success) {
- Log.e(TAG, "Failed to restore wallpaper: '" + mName + "'");
+ Slog.e(TAG, "Failed to restore wallpaper: '" + mName + "'");
mName = "";
WALLPAPER_FILE.delete();
}
@@ -792,7 +792,7 @@
Resources r = c.getResources();
resId = r.getIdentifier(resName, null, null);
if (resId == 0) {
- Log.e(TAG, "couldn't resolve identifier pkg=" + pkg + " type=" + type
+ Slog.e(TAG, "couldn't resolve identifier pkg=" + pkg + " type=" + type
+ " ident=" + ident);
return false;
}
@@ -807,14 +807,14 @@
}
// mWallpaperObserver will notice the close and send the change broadcast
- Log.v(TAG, "Restored wallpaper: " + resName);
+ Slog.v(TAG, "Restored wallpaper: " + resName);
return true;
} catch (NameNotFoundException e) {
- Log.e(TAG, "Package name " + pkg + " not found");
+ Slog.e(TAG, "Package name " + pkg + " not found");
} catch (Resources.NotFoundException e) {
- Log.e(TAG, "Resource not found: " + resId);
+ Slog.e(TAG, "Resource not found: " + resId);
} catch (IOException e) {
- Log.e(TAG, "IOException while restoring wallpaper ", e);
+ Slog.e(TAG, "IOException while restoring wallpaper ", e);
} finally {
if (res != null) {
try {
diff --git a/services/java/com/android/server/Watchdog.java b/services/java/com/android/server/Watchdog.java
index a6bfd99..ee69715 100644
--- a/services/java/com/android/server/Watchdog.java
+++ b/services/java/com/android/server/Watchdog.java
@@ -34,7 +34,7 @@
import android.provider.Settings;
import android.util.Config;
import android.util.EventLog;
-import android.util.Log;
+import android.util.Slog;
import java.io.IOException;
import java.util.ArrayList;
@@ -229,7 +229,7 @@
// During the last pass we collected pss information, so
// now it is time to report it.
mHaveGlobalPss = false;
- if (localLOGV) Log.v(TAG, "Received global pss, logging.");
+ if (localLOGV) Slog.v(TAG, "Received global pss, logging.");
logGlobalMemory();
}
} break;
@@ -239,7 +239,7 @@
// During the last pass we collected pss information, so
// now it is time to report it.
mHavePss = false;
- if (localLOGV) Log.v(TAG, "Have pss, checking memory.");
+ if (localLOGV) Slog.v(TAG, "Have pss, checking memory.");
checkMemory();
}
@@ -247,7 +247,7 @@
// During the last pass we collected pss information, so
// now it is time to report it.
mHaveGlobalPss = false;
- if (localLOGV) Log.v(TAG, "Have global pss, logging.");
+ if (localLOGV) Slog.v(TAG, "Have global pss, logging.");
logGlobalMemory();
}
@@ -275,7 +275,7 @@
// things simple, we will assume that everyone has
// reported back by the next MONITOR message.
mLastMemCheckTime = now;
- if (localLOGV) Log.v(TAG, "Collecting memory usage.");
+ if (localLOGV) Slog.v(TAG, "Collecting memory usage.");
collectMemory();
mHavePss = true;
@@ -285,7 +285,7 @@
long realtimeNow = SystemClock.elapsedRealtime();
if ((mLastMemCheckRealtime+memCheckRealtimeInterval) < realtimeNow) {
mLastMemCheckRealtime = realtimeNow;
- if (localLOGV) Log.v(TAG, "Collecting global memory usage.");
+ if (localLOGV) Slog.v(TAG, "Collecting global memory usage.");
collectGlobalMemory();
mHaveGlobalPss = true;
}
@@ -315,7 +315,7 @@
final class CheckupReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context c, Intent intent) {
- if (localLOGV) Log.v(TAG, "Alarm went off, checking memory.");
+ if (localLOGV) Slog.v(TAG, "Alarm went off, checking memory.");
checkMemory();
}
}
@@ -323,7 +323,7 @@
final class RebootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context c, Intent intent) {
- if (localLOGV) Log.v(TAG, "Alarm went off, checking reboot.");
+ if (localLOGV) Slog.v(TAG, "Alarm went off, checking reboot.");
checkReboot(true);
}
}
@@ -494,7 +494,7 @@
if (mPhoneMemMonitor.checkLocked(curTime, mPhonePid,
mPhonePss)) {
// Just kill the phone process and let it restart.
- Log.i(TAG, "Watchdog is killing the phone process");
+ Slog.i(TAG, "Watchdog is killing the phone process");
Process.killProcess(mPhonePid);
}
} else {
@@ -511,25 +511,25 @@
} else if (nextTime >= mMemcheckExecEndTime){
// Need to check during next exec time... so that needs
// to be computed.
- if (localLOGV) Log.v(TAG, "Computing next time range");
+ if (localLOGV) Slog.v(TAG, "Computing next time range");
computeMemcheckTimesLocked(nextTime);
nextTime = mMemcheckExecStartTime;
}
if (localLOGV) {
mCalendar.setTimeInMillis(nextTime);
- Log.v(TAG, "Next Alarm Time: " + mCalendar);
+ Slog.v(TAG, "Next Alarm Time: " + mCalendar);
}
}
}
if (needScheduledCheck) {
- if (localLOGV) Log.v(TAG, "Scheduling next memcheck alarm for "
+ if (localLOGV) Slog.v(TAG, "Scheduling next memcheck alarm for "
+ ((nextTime-curTime)/1000/60) + "m from now");
mAlarm.remove(mCheckupIntent);
mAlarm.set(AlarmManager.RTC_WAKEUP, nextTime, mCheckupIntent);
} else {
- if (localLOGV) Log.v(TAG, "No need to schedule a memcheck alarm!");
+ if (localLOGV) Slog.v(TAG, "No need to schedule a memcheck alarm!");
mAlarm.remove(mCheckupIntent);
}
}
@@ -592,7 +592,7 @@
mRebootInterval = rebootInterval;
if (rebootInterval <= 0) {
// No reboot interval requested.
- if (localLOGV) Log.v(TAG, "No need to schedule a reboot alarm!");
+ if (localLOGV) Slog.v(TAG, "No need to schedule a reboot alarm!");
mAlarm.remove(mRebootIntent);
return;
}
@@ -663,7 +663,7 @@
}
}
- if (localLOGV) Log.v(TAG, "Scheduling next reboot alarm for "
+ if (localLOGV) Slog.v(TAG, "Scheduling next reboot alarm for "
+ ((realStartTime-now)/1000/60) + "m from now");
mAlarm.remove(mRebootIntent);
mAlarm.set(AlarmManager.RTC_WAKEUP, realStartTime, mRebootIntent);
@@ -673,11 +673,11 @@
* Perform a full reboot of the system.
*/
void rebootSystem(String reason) {
- Log.i(TAG, "Rebooting system because: " + reason);
+ Slog.i(TAG, "Rebooting system because: " + reason);
try {
android.os.Power.reboot(reason);
} catch (IOException e) {
- Log.e(TAG, "Reboot failed!", e);
+ Slog.e(TAG, "Reboot failed!", e);
}
}
@@ -757,11 +757,11 @@
if (localLOGV) {
mCalendar.setTimeInMillis(curTime);
- Log.v(TAG, "Current Time: " + mCalendar);
+ Slog.v(TAG, "Current Time: " + mCalendar);
mCalendar.setTimeInMillis(mMemcheckExecStartTime);
- Log.v(TAG, "Start Check Time: " + mCalendar);
+ Slog.v(TAG, "Start Check Time: " + mCalendar);
mCalendar.setTimeInMillis(mMemcheckExecEndTime);
- Log.v(TAG, "End Check Time: " + mCalendar);
+ Slog.v(TAG, "End Check Time: " + mCalendar);
}
}
@@ -810,7 +810,7 @@
} catch (InterruptedException e) {
if (SystemProperties.getBoolean("ro.secure", false)) {
// If this is a secure build, just log the error.
- Log.e("WatchDog", "Woof! Woof! Interrupter!");
+ Slog.e("WatchDog", "Woof! Woof! Interrupter!");
} else {
throw new AssertionError("Someone interrupted the watchdog");
}
@@ -839,7 +839,7 @@
// Only kill the process if the debugger is not attached.
if (!Debug.isDebuggerConnected()) {
- Log.i(TAG, "Watchdog is killing the system process");
+ Slog.i(TAG, "Watchdog is killing the system process");
Process.killProcess(Process.myPid());
}
}
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index 60cf5a2..1455973 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -54,7 +54,7 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.provider.Settings;
-import android.util.Log;
+import android.util.Slog;
import android.text.TextUtils;
import java.util.ArrayList;
@@ -218,7 +218,7 @@
}
);
- Log.i(TAG, "WifiService starting up with Wi-Fi " +
+ Slog.i(TAG, "WifiService starting up with Wi-Fi " +
(wifiEnabled ? "enabled" : "disabled"));
mContext.registerReceiver(
@@ -346,13 +346,13 @@
if (enable) {
synchronized (mWifiStateTracker) {
if (!WifiNative.loadDriver()) {
- Log.e(TAG, "Failed to load Wi-Fi driver.");
+ Slog.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.");
+ Slog.e(TAG, "Failed to start supplicant daemon.");
setWifiEnabledState(WIFI_STATE_UNKNOWN, uid);
return false;
}
@@ -368,7 +368,7 @@
boolean failedToStopSupplicantOrUnloadDriver = false;
synchronized (mWifiStateTracker) {
if (!WifiNative.stopSupplicant()) {
- Log.e(TAG, "Failed to stop supplicant daemon.");
+ Slog.e(TAG, "Failed to stop supplicant daemon.");
setWifiEnabledState(WIFI_STATE_UNKNOWN, uid);
failedToStopSupplicantOrUnloadDriver = true;
}
@@ -380,7 +380,7 @@
mWifiStateTracker.resetConnections(true);
if (!WifiNative.unloadDriver()) {
- Log.e(TAG, "Failed to unload Wi-Fi driver.");
+ Slog.e(TAG, "Failed to unload Wi-Fi driver.");
if (!failedToStopSupplicantOrUnloadDriver) {
setWifiEnabledState(WIFI_STATE_UNKNOWN, uid);
failedToStopSupplicantOrUnloadDriver = true;
@@ -732,7 +732,7 @@
netId = WifiNative.addNetworkCommand();
if (netId < 0) {
if (DBG) {
- Log.d(TAG, "Failed to add a network!");
+ Slog.d(TAG, "Failed to add a network!");
}
return -1;
}
@@ -763,7 +763,7 @@
WifiConfiguration.ssidVarName,
convertToQuotedString(config.SSID))) {
if (DBG) {
- Log.d(TAG, "failed to set SSID: "+config.SSID);
+ Slog.d(TAG, "failed to set SSID: "+config.SSID);
}
break setVariables;
}
@@ -774,7 +774,7 @@
WifiConfiguration.bssidVarName,
config.BSSID)) {
if (DBG) {
- Log.d(TAG, "failed to set BSSID: "+config.BSSID);
+ Slog.d(TAG, "failed to set BSSID: "+config.BSSID);
}
break setVariables;
}
@@ -787,7 +787,7 @@
WifiConfiguration.KeyMgmt.varName,
allowedKeyManagementString)) {
if (DBG) {
- Log.d(TAG, "failed to set key_mgmt: "+
+ Slog.d(TAG, "failed to set key_mgmt: "+
allowedKeyManagementString);
}
break setVariables;
@@ -801,7 +801,7 @@
WifiConfiguration.Protocol.varName,
allowedProtocolsString)) {
if (DBG) {
- Log.d(TAG, "failed to set proto: "+
+ Slog.d(TAG, "failed to set proto: "+
allowedProtocolsString);
}
break setVariables;
@@ -815,7 +815,7 @@
WifiConfiguration.AuthAlgorithm.varName,
allowedAuthAlgorithmsString)) {
if (DBG) {
- Log.d(TAG, "failed to set auth_alg: "+
+ Slog.d(TAG, "failed to set auth_alg: "+
allowedAuthAlgorithmsString);
}
break setVariables;
@@ -829,7 +829,7 @@
WifiConfiguration.PairwiseCipher.varName,
allowedPairwiseCiphersString)) {
if (DBG) {
- Log.d(TAG, "failed to set pairwise: "+
+ Slog.d(TAG, "failed to set pairwise: "+
allowedPairwiseCiphersString);
}
break setVariables;
@@ -843,7 +843,7 @@
WifiConfiguration.GroupCipher.varName,
allowedGroupCiphersString)) {
if (DBG) {
- Log.d(TAG, "failed to set group: "+
+ Slog.d(TAG, "failed to set group: "+
allowedGroupCiphersString);
}
break setVariables;
@@ -857,7 +857,7 @@
WifiConfiguration.pskVarName,
config.preSharedKey)) {
if (DBG) {
- Log.d(TAG, "failed to set psk: "+config.preSharedKey);
+ Slog.d(TAG, "failed to set psk: "+config.preSharedKey);
}
break setVariables;
}
@@ -873,7 +873,7 @@
WifiConfiguration.wepKeyVarNames[i],
config.wepKeys[i])) {
if (DBG) {
- Log.d(TAG,
+ Slog.d(TAG,
"failed to set wep_key"+i+": " +
config.wepKeys[i]);
}
@@ -890,7 +890,7 @@
WifiConfiguration.wepTxKeyIdxVarName,
Integer.toString(config.wepTxKeyIndex))) {
if (DBG) {
- Log.d(TAG,
+ Slog.d(TAG,
"failed to set wep_tx_keyidx: "+
config.wepTxKeyIndex);
}
@@ -903,7 +903,7 @@
WifiConfiguration.priorityVarName,
Integer.toString(config.priority))) {
if (DBG) {
- Log.d(TAG, config.SSID + ": failed to set priority: "
+ Slog.d(TAG, config.SSID + ": failed to set priority: "
+config.priority);
}
break setVariables;
@@ -914,7 +914,7 @@
WifiConfiguration.hiddenSSIDVarName,
Integer.toString(config.hiddenSSID ? 1 : 0))) {
if (DBG) {
- Log.d(TAG, config.SSID + ": failed to set hiddenSSID: "+
+ Slog.d(TAG, config.SSID + ": failed to set hiddenSSID: "+
config.hiddenSSID);
}
break setVariables;
@@ -933,7 +933,7 @@
varName,
value)) {
if (DBG) {
- Log.d(TAG, config.SSID + ": failed to set " + varName +
+ Slog.d(TAG, config.SSID + ": failed to set " + varName +
": " + value);
}
break setVariables;
@@ -952,7 +952,7 @@
if (newNetwork) {
removeNetwork(netId);
if (DBG) {
- Log.d(TAG,
+ Slog.d(TAG,
"Failed to set a network variable, removed network: "
+ netId);
}
@@ -994,7 +994,7 @@
// if we ever get here, we should probably add the
// value to WifiConfiguration to reflect that it's
// supported by the WPA supplicant
- Log.w(TAG, "Failed to look-up a string: " + string);
+ Slog.w(TAG, "Failed to look-up a string: " + string);
}
return -1;
@@ -1098,7 +1098,7 @@
if (scanResult != null) {
scanList.add(scanResult);
} else if (DBG) {
- Log.w(TAG, "misformatted scan result for: " + line);
+ Slog.w(TAG, "misformatted scan result for: " + line);
}
}
lineBeg = lineEnd + 1;
@@ -1185,7 +1185,7 @@
}
}
} else {
- Log.w(TAG, "Misformatted scan result text with " +
+ Slog.w(TAG, "Misformatted scan result text with " +
result.length + " fields: " + line);
}
}
@@ -1256,7 +1256,7 @@
* {@code numChannels} is outside the valid range.
*/
public boolean setNumAllowedChannels(int numChannels, boolean persist) {
- Log.i(TAG, "WifiService trying to setNumAllowed to "+numChannels+
+ Slog.i(TAG, "WifiService trying to setNumAllowed to "+numChannels+
" with persist set to "+persist);
enforceChangePermission();
/*
@@ -1342,13 +1342,13 @@
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");
+ Slog.d(TAG, "ACTION_SCREEN_ON");
mAlarmManager.cancel(mIdleIntent);
mDeviceIdle = false;
mScreenOff = false;
mWifiStateTracker.enableRssiPolling(true);
} else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
- Log.d(TAG, "ACTION_SCREEN_OFF");
+ Slog.d(TAG, "ACTION_SCREEN_OFF");
mScreenOff = true;
mWifiStateTracker.enableRssiPolling(false);
/*
@@ -1365,21 +1365,21 @@
// as long as we would if connected (below)
// TODO - fix the race conditions and switch back to the immediate turn-off
long triggerTime = System.currentTimeMillis() + (2*60*1000); // 2 min
- Log.d(TAG, "setting ACTION_DEVICE_IDLE timer for 120,000 ms");
+ Slog.d(TAG, "setting ACTION_DEVICE_IDLE timer for 120,000 ms");
mAlarmManager.set(AlarmManager.RTC_WAKEUP, triggerTime, mIdleIntent);
// // do not keep Wifi awake when screen is off if Wifi is not associated
// mDeviceIdle = true;
// updateWifiState();
} else {
long triggerTime = System.currentTimeMillis() + idleMillis;
- Log.d(TAG, "setting ACTION_DEVICE_IDLE timer for " + idleMillis + "ms");
+ Slog.d(TAG, "setting ACTION_DEVICE_IDLE timer for " + idleMillis + "ms");
mAlarmManager.set(AlarmManager.RTC_WAKEUP, triggerTime, mIdleIntent);
}
}
/* we can return now -- there's nothing to do until we get the idle intent back */
return;
} else if (action.equals(ACTION_DEVICE_IDLE)) {
- Log.d(TAG, "got ACTION_DEVICE_IDLE");
+ Slog.d(TAG, "got ACTION_DEVICE_IDLE");
mDeviceIdle = true;
} else if (action.equals(Intent.ACTION_BATTERY_CHANGED)) {
/*
@@ -1390,11 +1390,11 @@
* the already-set timer.
*/
int pluggedType = intent.getIntExtra("plugged", 0);
- Log.d(TAG, "ACTION_BATTERY_CHANGED pluggedType: " + pluggedType);
+ Slog.d(TAG, "ACTION_BATTERY_CHANGED pluggedType: " + pluggedType);
if (mScreenOff && shouldWifiStayAwake(stayAwakeConditions, mPluggedType) &&
!shouldWifiStayAwake(stayAwakeConditions, pluggedType)) {
long triggerTime = System.currentTimeMillis() + idleMillis;
- Log.d(TAG, "setting ACTION_DEVICE_IDLE timer for " + idleMillis + "ms");
+ Slog.d(TAG, "setting ACTION_DEVICE_IDLE timer for " + idleMillis + "ms");
mAlarmManager.set(AlarmManager.RTC_WAKEUP, triggerTime, mIdleIntent);
mPluggedType = pluggedType;
return;
@@ -1752,7 +1752,7 @@
}
private boolean acquireWifiLockLocked(WifiLock wifiLock) {
- Log.d(TAG, "acquireWifiLockLocked: " + wifiLock);
+ Slog.d(TAG, "acquireWifiLockLocked: " + wifiLock);
mLocks.addLock(wifiLock);
@@ -1790,7 +1790,7 @@
WifiLock wifiLock = mLocks.removeLock(lock);
- Log.d(TAG, "releaseWifiLockLocked: " + wifiLock);
+ Slog.d(TAG, "releaseWifiLockLocked: " + wifiLock);
hadLock = (wifiLock != null);
@@ -1847,7 +1847,7 @@
}
public void binderDied() {
- Log.e(TAG, "Multicaster binderDied");
+ Slog.e(TAG, "Multicaster binderDied");
synchronized (mMulticasters) {
int i = mMulticasters.indexOf(this);
if (i != -1) {
diff --git a/services/java/com/android/server/WifiWatchdogService.java b/services/java/com/android/server/WifiWatchdogService.java
index f2347ed..e50b317 100644
--- a/services/java/com/android/server/WifiWatchdogService.java
+++ b/services/java/com/android/server/WifiWatchdogService.java
@@ -34,7 +34,7 @@
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Config;
-import android.util.Log;
+import android.util.Slog;
import java.io.IOException;
import java.net.DatagramPacket;
@@ -281,7 +281,7 @@
// Wait for the handler to be set by the other thread
wait();
} catch (InterruptedException e) {
- Log.e(TAG, "Interrupted while waiting on handler.");
+ Slog.e(TAG, "Interrupted while waiting on handler.");
}
}
}
@@ -293,11 +293,11 @@
* Logs with the current thread.
*/
private static void myLogV(String message) {
- Log.v(TAG, "(" + Thread.currentThread().getName() + ") " + message);
+ Slog.v(TAG, "(" + Thread.currentThread().getName() + ") " + message);
}
private static void myLogD(String message) {
- Log.d(TAG, "(" + Thread.currentThread().getName() + ") " + message);
+ Slog.d(TAG, "(" + Thread.currentThread().getName() + ") " + message);
}
/**
@@ -364,7 +364,7 @@
}
if (V) {
- Log.v(TAG, (dnsAlive ? " +" : " Ignored: -"));
+ Slog.v(TAG, (dnsAlive ? " +" : " Ignored: -"));
}
if (shouldCancel()) return false;
@@ -372,7 +372,7 @@
try {
Thread.sleep(pingDelay);
} catch (InterruptedException e) {
- Log.w(TAG, "Interrupted while pausing between pings", e);
+ Slog.w(TAG, "Interrupted while pausing between pings", e);
}
}
@@ -383,11 +383,11 @@
if (DnsPinger.isDnsReachable(dns, getPingTimeoutMs())) {
successCounter++;
if (V) {
- Log.v(TAG, " +");
+ Slog.v(TAG, " +");
}
} else {
if (V) {
- Log.v(TAG, " -");
+ Slog.v(TAG, " -");
}
}
@@ -396,13 +396,13 @@
try {
Thread.sleep(pingDelay);
} catch (InterruptedException e) {
- Log.w(TAG, "Interrupted while pausing between pings", e);
+ Slog.w(TAG, "Interrupted while pausing between pings", e);
}
}
int packetLossPercentage = 100 * (numPings - successCounter) / numPings;
if (D) {
- Log.d(TAG, packetLossPercentage
+ Slog.d(TAG, packetLossPercentage
+ "% packet loss (acceptable is " + acceptableLoss + "%)");
}
@@ -544,7 +544,7 @@
if (ssid == null) {
// It's still null, give up
if (V) {
- Log.v(TAG, " Invalid SSID, returning false");
+ Slog.v(TAG, " Invalid SSID, returning false");
}
return false;
}
@@ -559,7 +559,7 @@
if (TextUtils.isEmpty(bssid)) {
// It's still null, give up
if (V) {
- Log.v(TAG, " Invalid BSSID, returning false");
+ Slog.v(TAG, " Invalid BSSID, returning false");
}
return false;
}
@@ -567,7 +567,7 @@
if (!isOnWatchList(ssid)) {
if (V) {
- Log.v(TAG, " SSID not on watch list, returning false");
+ Slog.v(TAG, " SSID not on watch list, returning false");
}
return false;
}
@@ -667,7 +667,7 @@
// Make sure we are not sleeping
if (mState == WatchdogState.SLEEP) {
if (V) {
- Log.v(TAG, " Sleeping (in " + mSsid + "), so returning");
+ Slog.v(TAG, " Sleeping (in " + mSsid + "), so returning");
}
return;
}
@@ -681,7 +681,7 @@
mNumApsChecked++;
if (mNumApsChecked > getMaxApChecks()) {
if (V) {
- Log.v(TAG, " Passed the max attempts (" + getMaxApChecks()
+ Slog.v(TAG, " Passed the max attempts (" + getMaxApChecks()
+ "), going to sleep for " + mSsid);
}
mHandler.sleep(mSsid);
@@ -692,7 +692,7 @@
boolean isApAlive = checkDnsConnectivity();
if (V) {
- Log.v(TAG, " Is it alive: " + isApAlive);
+ Slog.v(TAG, " Is it alive: " + isApAlive);
}
// Take action based on results
@@ -753,7 +753,7 @@
if (!mWifiStateTracker.addToBlacklist(bssid)) {
// There's a known bug where this method returns failure on success
- //Log.e(TAG, "Blacklisting " + bssid + " failed");
+ //Slog.e(TAG, "Blacklisting " + bssid + " failed");
}
if (D) {
@@ -780,7 +780,7 @@
// Make sure we are not sleeping
if (mState == WatchdogState.SLEEP) {
if (V) {
- Log.v(TAG, " handleBackgroundCheckAp: Sleeping (in " + mSsid + "), so returning");
+ Slog.v(TAG, " handleBackgroundCheckAp: Sleeping (in " + mSsid + "), so returning");
}
return;
}
@@ -807,7 +807,7 @@
boolean isApAlive = backgroundCheckDnsConnectivity();
if (V && !isApAlive) {
- Log.v(TAG, " handleBackgroundCheckAp: Is it alive: " + isApAlive);
+ Slog.v(TAG, " handleBackgroundCheckAp: Is it alive: " + isApAlive);
}
if (shouldCancel()) {
@@ -851,7 +851,7 @@
*/
if (!mWifiStateTracker.clearBlacklist()) {
// There's a known bug where this method returns failure on success
- //Log.e(TAG, "Clearing blacklist failed");
+ //Slog.e(TAG, "Clearing blacklist failed");
}
if (V) {
@@ -895,7 +895,7 @@
// If we're sleeping, don't do anything
if (mState == WatchdogState.SLEEP) {
- Log.v(TAG, " Sleeping (in " + mSsid + "), so returning");
+ Slog.v(TAG, " Sleeping (in " + mSsid + "), so returning");
return;
}
@@ -903,7 +903,7 @@
setIdleState(false);
if (V) {
- Log.v(TAG, " Set state to IDLE");
+ Slog.v(TAG, " Set state to IDLE");
}
}
@@ -1245,13 +1245,13 @@
} catch (SocketException e) {
if (V) {
- Log.v(TAG, "DnsPinger.isReachable received SocketException", e);
+ Slog.v(TAG, "DnsPinger.isReachable received SocketException", e);
}
return false;
} catch (UnknownHostException e) {
if (V) {
- Log.v(TAG, "DnsPinger.isReachable is unable to resolve the DNS host", e);
+ Slog.v(TAG, "DnsPinger.isReachable is unable to resolve the DNS host", e);
}
return false;
@@ -1260,13 +1260,13 @@
} catch (IOException e) {
if (V) {
- Log.v(TAG, "DnsPinger.isReachable got an IOException", e);
+ Slog.v(TAG, "DnsPinger.isReachable got an IOException", e);
}
return false;
} catch (Exception e) {
if (V || Config.LOGD) {
- Log.d(TAG, "DnsPinger.isReachable got an unknown exception", e);
+ Slog.d(TAG, "DnsPinger.isReachable got an unknown exception", e);
}
return false;
}
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index a481036e..a75e05d 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -84,7 +84,7 @@
import android.provider.Settings;
import android.util.DisplayMetrics;
import android.util.EventLog;
-import android.util.Log;
+import android.util.Slog;
import android.util.SparseIntArray;
import android.view.Display;
import android.view.Gravity;
@@ -555,7 +555,7 @@
public void run() {
Looper.prepare();
//Looper.myLooper().setMessageLogging(new LogPrinter(
- // Log.VERBOSE, "WindowManagerPolicy"));
+ // Log.VERBOSE, "WindowManagerPolicy", Log.LOG_ID_SYSTEM));
android.os.Process.setThreadPriority(
android.os.Process.THREAD_PRIORITY_FOREGROUND);
mPolicy.init(mContext, mService, mPM);
@@ -638,7 +638,7 @@
// The window manager only throws security exceptions, so let's
// log all others.
if (!(e instanceof SecurityException)) {
- Log.e(TAG, "Window Manager Crash", e);
+ Slog.e(TAG, "Window Manager Crash", e);
}
throw e;
}
@@ -646,7 +646,7 @@
private void placeWindowAfter(Object pos, WindowState window) {
final int i = mWindows.indexOf(pos);
- if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Log.v(
+ if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
TAG, "Adding window " + window + " at "
+ (i+1) + " of " + mWindows.size() + " (after " + pos + ")");
mWindows.add(i+1, window);
@@ -654,7 +654,7 @@
private void placeWindowBefore(Object pos, WindowState window) {
final int i = mWindows.indexOf(pos);
- if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Log.v(
+ if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
TAG, "Adding window " + window + " at "
+ i + " of " + mWindows.size() + " (before " + pos + ")");
mWindows.add(i, window);
@@ -711,7 +711,7 @@
//apptoken note that the window could be a floating window
//that was created later or a window at the top of the list of
//windows associated with this token.
- if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Log.v(
+ if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
TAG, "Adding window " + win + " at "
+ (newIdx+1) + " of " + N);
localmWindows.add(newIdx+1, win);
@@ -719,7 +719,7 @@
}
}
} else {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Figuring out where to add app window "
+ client.asBinder() + " (token=" + token + ")");
// Figure out where the window should go, based on the
@@ -793,7 +793,7 @@
break;
}
}
- if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Log.v(
+ if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
TAG, "Adding window " + win + " at "
+ i + " of " + N);
localmWindows.add(i, win);
@@ -810,7 +810,7 @@
}
}
if (i < 0) i = 0;
- if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Log.v(
+ if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Slog.v(
TAG, "Adding window " + win + " at "
+ i + " of " + N);
localmWindows.add(i, win);
@@ -894,10 +894,10 @@
i--;
w = (WindowState)localmWindows.get(i);
- //Log.i(TAG, "Checking window @" + i + " " + w + " fl=0x"
+ //Slog.i(TAG, "Checking window @" + i + " " + w + " fl=0x"
// + Integer.toHexString(w.mAttrs.flags));
if (canBeImeTarget(w)) {
- //Log.i(TAG, "Putting input method here!");
+ //Slog.i(TAG, "Putting input method here!");
// Yet more tricksyness! If this window is a "starting"
// window, we do actually want to be on top of it, but
@@ -919,7 +919,7 @@
mUpcomingInputMethodTarget = w;
- if (DEBUG_INPUT_METHOD) Log.v(TAG, "Desired input method target="
+ if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Desired input method target="
+ w + " willMove=" + willMove);
if (willMove && w != null) {
@@ -953,7 +953,7 @@
}
if (highestTarget != null) {
- if (DEBUG_INPUT_METHOD) Log.v(TAG, "mNextAppTransition="
+ if (DEBUG_INPUT_METHOD) Slog.v(TAG, "mNextAppTransition="
+ mNextAppTransition + " " + highestTarget
+ " animating=" + highestTarget.isAnimating()
+ " layer=" + highestTarget.mAnimLayer
@@ -978,12 +978,12 @@
}
}
- //Log.i(TAG, "Placing input method @" + (i+1));
+ //Slog.i(TAG, "Placing input method @" + (i+1));
if (w != null) {
if (willMove) {
RuntimeException e = new RuntimeException();
if (!HIDE_STACK_CRAWLS) e.fillInStackTrace();
- if (DEBUG_INPUT_METHOD) Log.w(TAG, "Moving IM target from "
+ if (DEBUG_INPUT_METHOD) Slog.w(TAG, "Moving IM target from "
+ mInputMethodTarget + " to " + w, e);
mInputMethodTarget = w;
if (w.mAppToken != null) {
@@ -997,7 +997,7 @@
if (willMove) {
RuntimeException e = new RuntimeException();
if (!HIDE_STACK_CRAWLS) e.fillInStackTrace();
- if (DEBUG_INPUT_METHOD) Log.w(TAG, "Moving IM target from "
+ if (DEBUG_INPUT_METHOD) Slog.w(TAG, "Moving IM target from "
+ mInputMethodTarget + " to null", e);
mInputMethodTarget = null;
setInputMethodAnimLayerAdjustment(0);
@@ -1009,7 +1009,7 @@
int pos = findDesiredInputMethodWindowIndexLocked(true);
if (pos >= 0) {
win.mTargetAppToken = mInputMethodTarget.mAppToken;
- if (DEBUG_WINDOW_MOVEMENT) Log.v(
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(
TAG, "Adding input method window " + win + " at " + pos);
mWindows.add(pos, win);
moveInputMethodDialogsLocked(pos+1);
@@ -1021,19 +1021,19 @@
}
void setInputMethodAnimLayerAdjustment(int adj) {
- if (DEBUG_LAYERS) Log.v(TAG, "Setting im layer adj to " + adj);
+ if (DEBUG_LAYERS) Slog.v(TAG, "Setting im layer adj to " + adj);
mInputMethodAnimLayerAdjustment = adj;
WindowState imw = mInputMethodWindow;
if (imw != null) {
imw.mAnimLayer = imw.mLayer + adj;
- if (DEBUG_LAYERS) Log.v(TAG, "IM win " + imw
+ if (DEBUG_LAYERS) Slog.v(TAG, "IM win " + imw
+ " anim layer: " + imw.mAnimLayer);
int wi = imw.mChildWindows.size();
while (wi > 0) {
wi--;
WindowState cw = (WindowState)imw.mChildWindows.get(wi);
cw.mAnimLayer = cw.mLayer + adj;
- if (DEBUG_LAYERS) Log.v(TAG, "IM win " + cw
+ if (DEBUG_LAYERS) Slog.v(TAG, "IM win " + cw
+ " anim layer: " + cw.mAnimLayer);
}
}
@@ -1042,7 +1042,7 @@
di --;
imw = mInputMethodDialogs.get(di);
imw.mAnimLayer = imw.mLayer + adj;
- if (DEBUG_LAYERS) Log.v(TAG, "IM win " + imw
+ if (DEBUG_LAYERS) Slog.v(TAG, "IM win " + imw
+ " anim layer: " + imw.mAnimLayer);
}
}
@@ -1051,7 +1051,7 @@
int wpos = mWindows.indexOf(win);
if (wpos >= 0) {
if (wpos < interestingPos) interestingPos--;
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG, "Temp removing at " + wpos + ": " + win);
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Temp removing at " + wpos + ": " + win);
mWindows.remove(wpos);
int NC = win.mChildWindows.size();
while (NC > 0) {
@@ -1060,7 +1060,7 @@
int cpos = mWindows.indexOf(cw);
if (cpos >= 0) {
if (cpos < interestingPos) interestingPos--;
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG, "Temp removing child at "
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Temp removing child at "
+ cpos + ": " + cw);
mWindows.remove(cpos);
}
@@ -1076,7 +1076,7 @@
// this case should be rare, so it shouldn't be that big a deal.
int wpos = mWindows.indexOf(win);
if (wpos >= 0) {
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG, "ReAdd removing from " + wpos
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "ReAdd removing from " + wpos
+ ": " + win);
mWindows.remove(wpos);
reAddWindowLocked(wpos, win);
@@ -1087,7 +1087,7 @@
int N = mWindows.size();
while (N > 0) {
N--;
- Log.v(TAG, prefix + "#" + N + ": " + mWindows.get(N));
+ Slog.v(TAG, prefix + "#" + N + ": " + mWindows.get(N));
}
}
@@ -1095,12 +1095,12 @@
ArrayList<WindowState> dialogs = mInputMethodDialogs;
final int N = dialogs.size();
- if (DEBUG_INPUT_METHOD) Log.v(TAG, "Removing " + N + " dialogs w/pos=" + pos);
+ if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Removing " + N + " dialogs w/pos=" + pos);
for (int i=0; i<N; i++) {
pos = tmpRemoveWindowLocked(pos, dialogs.get(i));
}
if (DEBUG_INPUT_METHOD) {
- Log.v(TAG, "Window list w/pos=" + pos);
+ Slog.v(TAG, "Window list w/pos=" + pos);
logWindowList(" ");
}
@@ -1112,14 +1112,14 @@
pos++;
}
}
- if (DEBUG_INPUT_METHOD) Log.v(TAG, "Adding " + N + " dialogs at pos=" + pos);
+ if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Adding " + N + " dialogs at pos=" + pos);
for (int i=0; i<N; i++) {
WindowState win = dialogs.get(i);
win.mTargetAppToken = targetAppToken;
pos = reAddWindowLocked(pos, win);
}
if (DEBUG_INPUT_METHOD) {
- Log.v(TAG, "Final window list:");
+ Slog.v(TAG, "Final window list:");
logWindowList(" ");
}
return;
@@ -1129,7 +1129,7 @@
win.mTargetAppToken = null;
reAddWindowToListInOrderLocked(win);
if (DEBUG_INPUT_METHOD) {
- Log.v(TAG, "No IM target, final list:");
+ Slog.v(TAG, "No IM target, final list:");
logWindowList(" ");
}
}
@@ -1188,18 +1188,18 @@
if (imWin != null) {
if (DEBUG_INPUT_METHOD) {
- Log.v(TAG, "Moving IM from " + imPos);
+ Slog.v(TAG, "Moving IM from " + imPos);
logWindowList(" ");
}
imPos = tmpRemoveWindowLocked(imPos, imWin);
if (DEBUG_INPUT_METHOD) {
- Log.v(TAG, "List after moving with new pos " + imPos + ":");
+ Slog.v(TAG, "List after moving with new pos " + imPos + ":");
logWindowList(" ");
}
imWin.mTargetAppToken = mInputMethodTarget.mAppToken;
reAddWindowLocked(imPos, imWin);
if (DEBUG_INPUT_METHOD) {
- Log.v(TAG, "List after moving IM to " + imPos + ":");
+ Slog.v(TAG, "List after moving IM to " + imPos + ":");
logWindowList(" ");
}
if (DN > 0) moveInputMethodDialogsLocked(imPos+1);
@@ -1212,12 +1212,12 @@
// because they aren't currently associated with a focus window.
if (imWin != null) {
- if (DEBUG_INPUT_METHOD) Log.v(TAG, "Moving IM from " + imPos);
+ if (DEBUG_INPUT_METHOD) Slog.v(TAG, "Moving IM from " + imPos);
tmpRemoveWindowLocked(0, imWin);
imWin.mTargetAppToken = null;
reAddWindowToListInOrderLocked(imWin);
if (DEBUG_INPUT_METHOD) {
- Log.v(TAG, "List with no IM target:");
+ Slog.v(TAG, "List with no IM target:");
logWindowList(" ");
}
if (DN > 0) moveInputMethodDialogsLocked(-1);;
@@ -1239,7 +1239,7 @@
}
final boolean isWallpaperVisible(WindowState wallpaperTarget) {
- if (DEBUG_WALLPAPER) Log.v(TAG, "Wallpaper vis: target obscured="
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper vis: target obscured="
+ (wallpaperTarget != null ? Boolean.toString(wallpaperTarget.mObscured) : "??")
+ " anim=" + ((wallpaperTarget != null && wallpaperTarget.mAppToken != null)
? wallpaperTarget.mAppToken.animation : null)
@@ -1286,19 +1286,19 @@
// If this window's app token is hidden and not animating,
// it is of no interest to us.
if (w.mAppToken.hidden && w.mAppToken.animation == null) {
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"Skipping hidden or animating token: " + w);
topCurW = null;
continue;
}
}
- if (DEBUG_WALLPAPER) Log.v(TAG, "Win " + w + ": readyfordisplay="
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "Win " + w + ": readyfordisplay="
+ w.isReadyForDisplay() + " drawpending=" + w.mDrawPending
+ " commitdrawpending=" + w.mCommitDrawPending);
if ((w.mAttrs.flags&FLAG_SHOW_WALLPAPER) != 0 && w.isReadyForDisplay()
&& (mWallpaperTarget == w
|| (!w.mDrawPending && !w.mCommitDrawPending))) {
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"Found wallpaper activity: #" + i + "=" + w);
foundW = w;
foundI = i;
@@ -1308,7 +1308,7 @@
// The current wallpaper target is animating, so we'll
// look behind it for another possible target and figure
// out what is going on below.
- if (DEBUG_WALLPAPER) Log.v(TAG, "Win " + w
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "Win " + w
+ ": token animating, looking behind.");
continue;
}
@@ -1326,12 +1326,12 @@
// enough (we'll just wait until whatever transition is pending
// executes).
if (mWallpaperTarget != null && mWallpaperTarget.mAppToken != null) {
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"Wallpaper not changing: waiting for app anim in current target");
return 0;
}
if (foundW != null && foundW.mAppToken != null) {
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"Wallpaper not changing: waiting for app anim in found target");
return 0;
}
@@ -1339,7 +1339,7 @@
if (mWallpaperTarget != foundW) {
if (DEBUG_WALLPAPER) {
- Log.v(TAG, "New wallpaper target: " + foundW
+ Slog.v(TAG, "New wallpaper target: " + foundW
+ " oldTarget: " + mWallpaperTarget);
}
@@ -1357,17 +1357,17 @@
boolean foundAnim = foundW.mAnimation != null
|| (foundW.mAppToken != null && foundW.mAppToken.animation != null);
if (DEBUG_WALLPAPER) {
- Log.v(TAG, "New animation: " + foundAnim
+ Slog.v(TAG, "New animation: " + foundAnim
+ " old animation: " + oldAnim);
}
if (foundAnim && oldAnim) {
int oldI = localmWindows.indexOf(oldW);
if (DEBUG_WALLPAPER) {
- Log.v(TAG, "New i: " + foundI + " old i: " + oldI);
+ Slog.v(TAG, "New i: " + foundI + " old i: " + oldI);
}
if (oldI >= 0) {
if (DEBUG_WALLPAPER) {
- Log.v(TAG, "Animating wallpapers: old#" + oldI
+ Slog.v(TAG, "Animating wallpapers: old#" + oldI
+ "=" + oldW + "; new#" + foundI
+ "=" + foundW);
}
@@ -1375,7 +1375,7 @@
// Set the new target correctly.
if (foundW.mAppToken != null && foundW.mAppToken.hiddenRequested) {
if (DEBUG_WALLPAPER) {
- Log.v(TAG, "Old wallpaper still the target.");
+ Slog.v(TAG, "Old wallpaper still the target.");
}
mWallpaperTarget = oldW;
}
@@ -1386,7 +1386,7 @@
if (foundI > oldI) {
// The new target is on top of the old one.
if (DEBUG_WALLPAPER) {
- Log.v(TAG, "Found target above old target.");
+ Slog.v(TAG, "Found target above old target.");
}
mUpperWallpaperTarget = foundW;
mLowerWallpaperTarget = oldW;
@@ -1395,7 +1395,7 @@
} else {
// The new target is below the old one.
if (DEBUG_WALLPAPER) {
- Log.v(TAG, "Found target below old target.");
+ Slog.v(TAG, "Found target below old target.");
}
mUpperWallpaperTarget = oldW;
mLowerWallpaperTarget = foundW;
@@ -1414,7 +1414,7 @@
&& mUpperWallpaperTarget.mAppToken.animation != null);
if (!lowerAnimating || !upperAnimating) {
if (DEBUG_WALLPAPER) {
- Log.v(TAG, "No longer animating wallpaper targets!");
+ Slog.v(TAG, "No longer animating wallpaper targets!");
}
mLowerWallpaperTarget = null;
mUpperWallpaperTarget = null;
@@ -1426,7 +1426,7 @@
// The window is visible to the compositor... but is it visible
// to the user? That is what the wallpaper cares about.
visible = isWallpaperVisible(foundW);
- if (DEBUG_WALLPAPER) Log.v(TAG, "Wallpaper visibility: " + visible);
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper visibility: " + visible);
// If the wallpaper target is animating, we may need to copy
// its layer adjustment. Only do this if we are not transfering
@@ -1457,7 +1457,7 @@
foundI--;
}
} else {
- if (DEBUG_WALLPAPER) Log.v(TAG, "No wallpaper target");
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "No wallpaper target");
}
if (foundW == null && topCurW != null) {
@@ -1510,7 +1510,7 @@
if (wallpaper.mWallpaperVisible != visible) {
wallpaper.mWallpaperVisible = visible;
try {
- if (DEBUG_VISIBILITY || DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_VISIBILITY || DEBUG_WALLPAPER) Slog.v(TAG,
"Setting visibility of wallpaper " + wallpaper
+ ": " + visible);
wallpaper.mClient.dispatchAppVisibility(visible);
@@ -1519,7 +1519,7 @@
}
wallpaper.mAnimLayer = wallpaper.mLayer + mWallpaperAnimLayerAdjustment;
- if (DEBUG_LAYERS || DEBUG_WALLPAPER) Log.v(TAG, "Wallpaper win "
+ if (DEBUG_LAYERS || DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper win "
+ wallpaper + " anim layer: " + wallpaper.mAnimLayer);
// First, if this window is at the current index, then all
@@ -1536,7 +1536,7 @@
// not in the list.
int oldIndex = localmWindows.indexOf(wallpaper);
if (oldIndex >= 0) {
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG, "Wallpaper removing at "
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Wallpaper removing at "
+ oldIndex + ": " + wallpaper);
localmWindows.remove(oldIndex);
if (oldIndex < foundI) {
@@ -1545,7 +1545,7 @@
}
// Now stick it in.
- if (DEBUG_WALLPAPER || DEBUG_WINDOW_MOVEMENT) Log.v(TAG,
+ if (DEBUG_WALLPAPER || DEBUG_WINDOW_MOVEMENT) Slog.v(TAG,
"Moving wallpaper " + wallpaper
+ " from " + oldIndex + " to " + foundI);
@@ -1558,7 +1558,7 @@
}
void setWallpaperAnimLayerAdjustmentLocked(int adj) {
- if (DEBUG_LAYERS || DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_LAYERS || DEBUG_WALLPAPER) Slog.v(TAG,
"Setting wallpaper layer adj to " + adj);
mWallpaperAnimLayerAdjustment = adj;
int curTokenIndex = mWallpaperTokens.size();
@@ -1570,7 +1570,7 @@
curWallpaperIndex--;
WindowState wallpaper = token.windows.get(curWallpaperIndex);
wallpaper.mAnimLayer = wallpaper.mLayer + adj;
- if (DEBUG_LAYERS || DEBUG_WALLPAPER) Log.v(TAG, "Wallpaper win "
+ if (DEBUG_LAYERS || DEBUG_WALLPAPER) Slog.v(TAG, "Wallpaper win "
+ wallpaper + " anim layer: " + wallpaper.mAnimLayer);
}
}
@@ -1586,7 +1586,7 @@
int offset = availw > 0 ? -(int)(availw*wpx+.5f) : 0;
changed = wallpaperWin.mXOffset != offset;
if (changed) {
- if (DEBUG_WALLPAPER) Log.v(TAG, "Update wallpaper "
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "Update wallpaper "
+ wallpaperWin + " x: " + offset);
wallpaperWin.mXOffset = offset;
}
@@ -1601,7 +1601,7 @@
int availh = wallpaperWin.mFrame.bottom-wallpaperWin.mFrame.top-dh;
offset = availh > 0 ? -(int)(availh*wpy+.5f) : 0;
if (wallpaperWin.mYOffset != offset) {
- if (DEBUG_WALLPAPER) Log.v(TAG, "Update wallpaper "
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "Update wallpaper "
+ wallpaperWin + " y: " + offset);
changed = true;
wallpaperWin.mYOffset = offset;
@@ -1614,7 +1614,7 @@
if (rawChanged) {
try {
- if (DEBUG_WALLPAPER) Log.v(TAG, "Report new wp offset "
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "Report new wp offset "
+ wallpaperWin + " x=" + wallpaperWin.mWallpaperX
+ " y=" + wallpaperWin.mWallpaperY);
if (sync) {
@@ -1629,15 +1629,15 @@
if ((mLastWallpaperTimeoutTime+WALLPAPER_TIMEOUT_RECOVERY)
< start) {
try {
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"Waiting for offset complete...");
mWindowMap.wait(WALLPAPER_TIMEOUT);
} catch (InterruptedException e) {
}
- if (DEBUG_WALLPAPER) Log.v(TAG, "Offset complete!");
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "Offset complete!");
if ((start+WALLPAPER_TIMEOUT)
< SystemClock.uptimeMillis()) {
- Log.i(TAG, "Timeout waiting for wallpaper to offset: "
+ Slog.i(TAG, "Timeout waiting for wallpaper to offset: "
+ wallpaperWin);
mLastWallpaperTimeoutTime = start;
}
@@ -1729,7 +1729,7 @@
if (wallpaper.mWallpaperVisible != visible) {
wallpaper.mWallpaperVisible = visible;
try {
- if (DEBUG_VISIBILITY || DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_VISIBILITY || DEBUG_WALLPAPER) Slog.v(TAG,
"Updating visibility of wallpaper " + wallpaper
+ ": " + visible);
wallpaper.mClient.dispatchAppVisibility(visible);
@@ -1772,7 +1772,7 @@
}
wallpaper.mClient.dispatchPointer(ev, eventTime, false);
} catch (RemoteException e) {
- Log.w(TAG, "Failure sending pointer to wallpaper", e);
+ Slog.w(TAG, "Failure sending pointer to wallpaper", e);
}
}
}
@@ -1790,7 +1790,7 @@
// sending events until the final up.
if (mSendingPointersToWallpaper) {
if (skipped) {
- Log.i(TAG, "Sending skipped pointer to wallpaper!");
+ Slog.i(TAG, "Sending skipped pointer to wallpaper!");
}
sendPointerToWallpaperLocked(relWin, pointer, eventTime);
@@ -1828,20 +1828,20 @@
}
if (mWindowMap.containsKey(client.asBinder())) {
- Log.w(TAG, "Window " + client + " is already added");
+ Slog.w(TAG, "Window " + client + " is already added");
return WindowManagerImpl.ADD_DUPLICATE_ADD;
}
if (attrs.type >= FIRST_SUB_WINDOW && attrs.type <= LAST_SUB_WINDOW) {
attachedWindow = windowForClientLocked(null, attrs.token, false);
if (attachedWindow == null) {
- Log.w(TAG, "Attempted to add window with token that is not a window: "
+ Slog.w(TAG, "Attempted to add window with token that is not a window: "
+ attrs.token + ". Aborting.");
return WindowManagerImpl.ADD_BAD_SUBWINDOW_TOKEN;
}
if (attachedWindow.mAttrs.type >= FIRST_SUB_WINDOW
&& attachedWindow.mAttrs.type <= LAST_SUB_WINDOW) {
- Log.w(TAG, "Attempted to add window with token that is a sub-window: "
+ Slog.w(TAG, "Attempted to add window with token that is a sub-window: "
+ attrs.token + ". Aborting.");
return WindowManagerImpl.ADD_BAD_SUBWINDOW_TOKEN;
}
@@ -1852,17 +1852,17 @@
if (token == null) {
if (attrs.type >= FIRST_APPLICATION_WINDOW
&& attrs.type <= LAST_APPLICATION_WINDOW) {
- Log.w(TAG, "Attempted to add application window with unknown token "
+ Slog.w(TAG, "Attempted to add application window with unknown token "
+ attrs.token + ". Aborting.");
return WindowManagerImpl.ADD_BAD_APP_TOKEN;
}
if (attrs.type == TYPE_INPUT_METHOD) {
- Log.w(TAG, "Attempted to add input method window with unknown token "
+ Slog.w(TAG, "Attempted to add input method window with unknown token "
+ attrs.token + ". Aborting.");
return WindowManagerImpl.ADD_BAD_APP_TOKEN;
}
if (attrs.type == TYPE_WALLPAPER) {
- Log.w(TAG, "Attempted to add wallpaper window with unknown token "
+ Slog.w(TAG, "Attempted to add wallpaper window with unknown token "
+ attrs.token + ". Aborting.");
return WindowManagerImpl.ADD_BAD_APP_TOKEN;
}
@@ -1872,29 +1872,29 @@
&& attrs.type <= LAST_APPLICATION_WINDOW) {
AppWindowToken atoken = token.appWindowToken;
if (atoken == null) {
- Log.w(TAG, "Attempted to add window with non-application token "
+ Slog.w(TAG, "Attempted to add window with non-application token "
+ token + ". Aborting.");
return WindowManagerImpl.ADD_NOT_APP_TOKEN;
} else if (atoken.removed) {
- Log.w(TAG, "Attempted to add window with exiting application token "
+ Slog.w(TAG, "Attempted to add window with exiting application token "
+ token + ". Aborting.");
return WindowManagerImpl.ADD_APP_EXITING;
}
if (attrs.type == TYPE_APPLICATION_STARTING && atoken.firstWindowDrawn) {
// No need for this guy!
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "**** NO NEED TO START: " + attrs.getTitle());
return WindowManagerImpl.ADD_STARTING_NOT_NEEDED;
}
} else if (attrs.type == TYPE_INPUT_METHOD) {
if (token.windowType != TYPE_INPUT_METHOD) {
- Log.w(TAG, "Attempted to add input method window with bad token "
+ Slog.w(TAG, "Attempted to add input method window with bad token "
+ attrs.token + ". Aborting.");
return WindowManagerImpl.ADD_BAD_APP_TOKEN;
}
} else if (attrs.type == TYPE_WALLPAPER) {
if (token.windowType != TYPE_WALLPAPER) {
- Log.w(TAG, "Attempted to add wallpaper window with bad token "
+ Slog.w(TAG, "Attempted to add wallpaper window with bad token "
+ attrs.token + ". Aborting.");
return WindowManagerImpl.ADD_BAD_APP_TOKEN;
}
@@ -1905,7 +1905,7 @@
if (win.mDeathRecipient == null) {
// Client has apparently died, so there is no reason to
// continue.
- Log.w(TAG, "Adding window client " + client.asBinder()
+ Slog.w(TAG, "Adding window client " + client.asBinder()
+ " that is dead, aborting.");
return WindowManagerImpl.ADD_APP_EXITING;
}
@@ -1990,7 +1990,7 @@
mKeyWaiter.handleNewWindowLocked(mCurrentFocus);
}
}
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "New client " + client.asBinder()
+ ": window=" + win);
@@ -2024,7 +2024,7 @@
public void removeWindowLocked(Session session, WindowState win) {
- if (localLOGV || DEBUG_FOCUS) Log.v(
+ if (localLOGV || DEBUG_FOCUS) Slog.v(
TAG, "Remove " + win + " client="
+ Integer.toHexString(System.identityHashCode(
win.mClient.asBinder()))
@@ -2032,7 +2032,7 @@
final long origId = Binder.clearCallingIdentity();
- if (DEBUG_APP_TRANSITIONS) Log.v(
+ if (DEBUG_APP_TRANSITIONS) Slog.v(
TAG, "Remove " + win + ": mSurface=" + win.mSurface
+ " mExiting=" + win.mExiting
+ " isAnimating=" + win.isAnimating()
@@ -2063,7 +2063,7 @@
}
if (win.mExiting || win.isAnimating()) {
// The exit animation is running... wait for it!
- //Log.i(TAG, "*** Running exit animation...");
+ //Slog.i(TAG, "*** Running exit animation...");
win.mExiting = true;
win.mRemoveOnExit = true;
mLayoutNeeded = true;
@@ -2105,7 +2105,7 @@
if (false) {
RuntimeException e = new RuntimeException("here");
e.fillInStackTrace();
- Log.w(TAG, "Removing window " + win, e);
+ Slog.w(TAG, "Removing window " + win, e);
}
mPolicy.removeWindowLw(win);
@@ -2113,7 +2113,7 @@
mWindowMap.remove(win.mClient.asBinder());
mWindows.remove(win);
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG, "Final remove of window: " + win);
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Final remove of window: " + win);
if (mInputMethodWindow == win) {
mInputMethodWindow = null;
@@ -2127,7 +2127,7 @@
if (atoken != null) {
atoken.allAppWindows.remove(win);
}
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "**** Removing window " + win + ": count="
+ token.windows.size());
if (token.windows.size() == 0) {
@@ -2150,7 +2150,7 @@
// If this is the last window except for a starting transition
// window, we need to get rid of the starting transition.
if (DEBUG_STARTING_WINDOW) {
- Log.v(TAG, "Schedule remove starting " + token
+ Slog.v(TAG, "Schedule remove starting " + token
+ ": no more real windows");
}
Message m = mH.obtainMessage(H.REMOVE_STARTING, atoken);
@@ -2181,15 +2181,15 @@
synchronized (mWindowMap) {
WindowState w = windowForClientLocked(session, client, false);
if ((w != null) && (w.mSurface != null)) {
- if (SHOW_TRANSACTIONS) Log.i(TAG, ">>> OPEN TRANSACTION");
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION");
Surface.openTransaction();
try {
- if (SHOW_TRANSACTIONS) Log.i(
+ if (SHOW_TRANSACTIONS) Slog.i(
TAG, " SURFACE " + w.mSurface
+ ": transparentRegionHint=" + region);
w.mSurface.setTransparentRegionHint(region);
} finally {
- if (SHOW_TRANSACTIONS) Log.i(TAG, "<<< CLOSE TRANSACTION");
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION");
Surface.closeTransaction();
}
}
@@ -2315,7 +2315,7 @@
attrChanges = win.mAttrs.copyFrom(attrs);
}
- if (DEBUG_LAYOUT) Log.v(TAG, "Relayout " + win + ": " + win.mAttrs);
+ if (DEBUG_LAYOUT) Slog.v(TAG, "Relayout " + win + ": " + win.mAttrs);
if ((attrChanges & WindowManager.LayoutParams.ALPHA_CHANGED) != 0) {
win.mAlpha = attrs.alpha;
@@ -2383,7 +2383,7 @@
outSurface.copyFrom(surface);
win.mReportDestroySurface = false;
win.mSurfacePendingDestroy = false;
- if (SHOW_TRANSACTIONS) Log.i(TAG,
+ if (SHOW_TRANSACTIONS) Slog.i(TAG,
" OUT SURFACE " + outSurface + ": copied");
} else {
// For some reason there isn't a surface. Clear the
@@ -2391,7 +2391,7 @@
outSurface.release();
}
} catch (Exception e) {
- Log.w(TAG, "Exception thrown when creating surface for client "
+ Slog.w(TAG, "Exception thrown when creating surface for client "
+ client + " (" + win.mAttrs.getTitle() + ")",
e);
Binder.restoreCallingIdentity(origId);
@@ -2421,7 +2421,7 @@
} else {
win.mEnterAnimationPending = false;
if (win.mSurface != null) {
- if (DEBUG_VISIBILITY) Log.i(TAG, "Relayout invis " + win
+ if (DEBUG_VISIBILITY) Slog.i(TAG, "Relayout invis " + win
+ ": mExiting=" + win.mExiting
+ " mSurfacePendingDestroy=" + win.mSurfacePendingDestroy);
// If we are not currently running the exit animation, we
@@ -2467,9 +2467,9 @@
// destroyed at this point.
win.mSurfacePendingDestroy = false;
outSurface.release();
- if (DEBUG_VISIBILITY) Log.i(TAG, "Releasing surface in: " + win);
+ if (DEBUG_VISIBILITY) Slog.i(TAG, "Releasing surface in: " + win);
} else if (win.mSurface != null) {
- if (DEBUG_VISIBILITY) Log.i(TAG,
+ if (DEBUG_VISIBILITY) Slog.i(TAG,
"Keeping surface, will report destroy: " + win);
win.mReportDestroySurface = true;
outSurface.copyFrom(win.mSurface);
@@ -2521,7 +2521,7 @@
outFrame.set(win.mFrame);
outContentInsets.set(win.mContentInsets);
outVisibleInsets.set(win.mVisibleInsets);
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Relayout given client " + client.asBinder()
+ ", requestedWidth=" + requestedWidth
+ ", requestedHeight=" + requestedHeight
@@ -2529,7 +2529,7 @@
+ "\nRelayout returning frame=" + outFrame
+ ", surface=" + outSurface);
- if (localLOGV || DEBUG_FOCUS) Log.v(
+ if (localLOGV || DEBUG_FOCUS) Slog.v(
TAG, "Relayout of " + win + ": focusMayChange=" + focusMayChange);
inTouchMode = mInTouchMode;
@@ -2561,7 +2561,7 @@
}
private AttributeCache.Entry getCachedAnimations(WindowManager.LayoutParams lp) {
- if (DEBUG_ANIM) Log.v(TAG, "Loading animations: params package="
+ if (DEBUG_ANIM) Slog.v(TAG, "Loading animations: params package="
+ (lp != null ? lp.packageName : null)
+ " resId=0x" + (lp != null ? Integer.toHexString(lp.windowAnimations) : null));
if (lp != null && lp.windowAnimations != 0) {
@@ -2573,7 +2573,7 @@
if ((resId&0xFF000000) == 0x01000000) {
packageName = "android";
}
- if (DEBUG_ANIM) Log.v(TAG, "Loading animations: picked package="
+ if (DEBUG_ANIM) Slog.v(TAG, "Loading animations: picked package="
+ packageName);
return AttributeCache.instance().get(packageName, resId,
com.android.internal.R.styleable.WindowAnimation);
@@ -2582,13 +2582,13 @@
}
private AttributeCache.Entry getCachedAnimations(String packageName, int resId) {
- if (DEBUG_ANIM) Log.v(TAG, "Loading animations: params package="
+ if (DEBUG_ANIM) Slog.v(TAG, "Loading animations: params package="
+ packageName + " resId=0x" + Integer.toHexString(resId));
if (packageName != null) {
if ((resId&0xFF000000) == 0x01000000) {
packageName = "android";
}
- if (DEBUG_ANIM) Log.v(TAG, "Loading animations: picked package="
+ if (DEBUG_ANIM) Slog.v(TAG, "Loading animations: picked package="
+ packageName);
return AttributeCache.instance().get(packageName, resId,
com.android.internal.R.styleable.WindowAnimation);
@@ -2643,7 +2643,7 @@
a = loadAnimation(win.mAttrs, attr);
}
}
- if (DEBUG_ANIM) Log.v(TAG, "applyAnimation: win=" + win
+ if (DEBUG_ANIM) Slog.v(TAG, "applyAnimation: win=" + win
+ " anim=" + anim + " attr=0x" + Integer.toHexString(attr)
+ " mAnimation=" + win.mAnimation
+ " isEntrance=" + isEntrance);
@@ -2651,7 +2651,7 @@
if (DEBUG_ANIM) {
RuntimeException e = new RuntimeException();
if (!HIDE_STACK_CRAWLS) e.fillInStackTrace();
- Log.v(TAG, "Loaded animation " + a + " for " + win, e);
+ Slog.v(TAG, "Loaded animation " + a + " for " + win, e);
}
win.setAnimation(a);
win.mAnimationIsEntrance = isEntrance;
@@ -2705,7 +2705,7 @@
Animation a;
if (lp != null && (lp.flags & FLAG_COMPATIBLE_WINDOW) != 0) {
a = new FadeInOutAnimation(enter);
- if (DEBUG_ANIM) Log.v(TAG,
+ if (DEBUG_ANIM) Slog.v(TAG,
"applying FadeInOutAnimation for a window in compatibility mode");
} else if (mNextAppTransitionPackage != null) {
a = loadAnimation(mNextAppTransitionPackage, enter ?
@@ -2765,7 +2765,7 @@
break;
}
a = animAttr != 0 ? loadAnimation(lp, animAttr) : null;
- if (DEBUG_ANIM) Log.v(TAG, "applyAnimation: wtoken=" + wtoken
+ if (DEBUG_ANIM) Slog.v(TAG, "applyAnimation: wtoken=" + wtoken
+ " anim=" + a
+ " animAttr=0x" + Integer.toHexString(animAttr)
+ " transit=" + transit);
@@ -2774,7 +2774,7 @@
if (DEBUG_ANIM) {
RuntimeException e = new RuntimeException();
if (!HIDE_STACK_CRAWLS) e.fillInStackTrace();
- Log.v(TAG, "Loaded animation " + a + " for " + wtoken, e);
+ Slog.v(TAG, "Loaded animation " + a + " for " + wtoken, e);
}
wtoken.setAnimation(a);
}
@@ -2799,20 +2799,20 @@
continue;
}
if (tokens.get(v) != wtoken.token) {
- Log.w(TAG, "Tokens out of sync: external is " + tokens.get(v)
+ Slog.w(TAG, "Tokens out of sync: external is " + tokens.get(v)
+ " @ " + v + ", internal is " + wtoken.token + " @ " + m);
}
v--;
m--;
}
while (v >= 0) {
- Log.w(TAG, "External token not found: " + tokens.get(v) + " @ " + v);
+ Slog.w(TAG, "External token not found: " + tokens.get(v) + " @ " + v);
v--;
}
while (m >= 0) {
AppWindowToken wtoken = mAppTokens.get(m);
if (!wtoken.removed) {
- Log.w(TAG, "Invalid internal token: " + wtoken.token + " @ " + m);
+ Slog.w(TAG, "Invalid internal token: " + wtoken.token + " @ " + m);
}
m--;
}
@@ -2832,7 +2832,7 @@
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + permission;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
return false;
}
@@ -2853,7 +2853,7 @@
synchronized(mWindowMap) {
WindowToken wtoken = mTokenMap.get(token);
if (wtoken != null) {
- Log.w(TAG, "Attempted to add existing input method token: " + token);
+ Slog.w(TAG, "Attempted to add existing input method token: " + token);
return;
}
wtoken = new WindowToken(token, type, true);
@@ -2913,7 +2913,7 @@
}
} else {
- Log.w(TAG, "Attempted to remove non-existing token: " + token);
+ Slog.w(TAG, "Attempted to remove non-existing token: " + token);
}
}
Binder.restoreCallingIdentity(origId);
@@ -2929,7 +2929,7 @@
synchronized(mWindowMap) {
AppWindowToken wtoken = findAppWindowToken(token.asBinder());
if (wtoken != null) {
- Log.w(TAG, "Attempted to add existing app token: " + token);
+ Slog.w(TAG, "Attempted to add existing app token: " + token);
return;
}
wtoken = new AppWindowToken(token);
@@ -2937,7 +2937,7 @@
wtoken.appFullscreen = fullscreen;
wtoken.requestedOrientation = requestedOrientation;
mAppTokens.add(addPos, wtoken);
- if (localLOGV) Log.v(TAG, "Adding new app token: " + wtoken);
+ if (localLOGV) Slog.v(TAG, "Adding new app token: " + wtoken);
mTokenMap.put(token.asBinder(), wtoken);
mTokenList.add(wtoken);
@@ -2958,7 +2958,7 @@
synchronized(mWindowMap) {
AppWindowToken wtoken = findAppWindowToken(token);
if (wtoken == null) {
- Log.w(TAG, "Attempted to set group id of non-existing app token: " + token);
+ Slog.w(TAG, "Attempted to set group id of non-existing app token: " + token);
return;
}
wtoken.groupId = groupId;
@@ -3156,7 +3156,7 @@
synchronized(mWindowMap) {
AppWindowToken wtoken = findAppWindowToken(token.asBinder());
if (wtoken == null) {
- Log.w(TAG, "Attempted to set orientation of non-existing app token: " + token);
+ Slog.w(TAG, "Attempted to set orientation of non-existing app token: " + token);
return;
}
@@ -3184,19 +3184,19 @@
synchronized(mWindowMap) {
boolean changed = false;
if (token == null) {
- if (DEBUG_FOCUS) Log.v(TAG, "Clearing focused app, was " + mFocusedApp);
+ if (DEBUG_FOCUS) Slog.v(TAG, "Clearing focused app, was " + mFocusedApp);
changed = mFocusedApp != null;
mFocusedApp = null;
mKeyWaiter.tickle();
} else {
AppWindowToken newFocus = findAppWindowToken(token);
if (newFocus == null) {
- Log.w(TAG, "Attempted to set focus to non-existing app token: " + token);
+ Slog.w(TAG, "Attempted to set focus to non-existing app token: " + token);
return;
}
changed = mFocusedApp != newFocus;
mFocusedApp = newFocus;
- if (DEBUG_FOCUS) Log.v(TAG, "Set focused app to: " + mFocusedApp);
+ if (DEBUG_FOCUS) Slog.v(TAG, "Set focused app to: " + mFocusedApp);
mKeyWaiter.tickle();
}
@@ -3215,7 +3215,7 @@
}
synchronized(mWindowMap) {
- if (DEBUG_APP_TRANSITIONS) Log.v(
+ if (DEBUG_APP_TRANSITIONS) Slog.v(
TAG, "Prepare app transition: transit=" + transit
+ " mNextAppTransition=" + mNextAppTransition);
if (!mDisplayFrozen) {
@@ -3265,7 +3265,7 @@
if (DEBUG_APP_TRANSITIONS) {
RuntimeException e = new RuntimeException("here");
e.fillInStackTrace();
- Log.w(TAG, "Execute app transition: mNextAppTransition="
+ Slog.w(TAG, "Execute app transition: mNextAppTransition="
+ mNextAppTransition, e);
}
if (mNextAppTransition != WindowManagerPolicy.TRANSIT_UNSET) {
@@ -3286,13 +3286,13 @@
}
synchronized(mWindowMap) {
- if (DEBUG_STARTING_WINDOW) Log.v(
+ if (DEBUG_STARTING_WINDOW) Slog.v(
TAG, "setAppStartingIcon: token=" + token + " pkg=" + pkg
+ " transferFrom=" + transferFrom);
AppWindowToken wtoken = findAppWindowToken(token);
if (wtoken == null) {
- Log.w(TAG, "Attempted to set icon of non-existing app token: " + token);
+ Slog.w(TAG, "Attempted to set icon of non-existing app token: " + token);
return;
}
@@ -3318,7 +3318,7 @@
// shown immediately without any more transitions.
mSkipAppTransitionAnimation = true;
}
- if (DEBUG_STARTING_WINDOW) Log.v(TAG,
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG,
"Moving existing starting from " + ttoken
+ " to " + wtoken);
final long origId = Binder.clearCallingIdentity();
@@ -3335,7 +3335,7 @@
startingWindow.mToken = wtoken;
startingWindow.mRootToken = wtoken;
startingWindow.mAppToken = wtoken;
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG,
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG,
"Removing starting window: " + startingWindow);
mWindows.remove(startingWindow);
ttoken.windows.remove(startingWindow);
@@ -3380,7 +3380,7 @@
} else if (ttoken.startingData != null) {
// The previous app was getting ready to show a
// starting window, but hasn't yet done so. Steal it!
- if (DEBUG_STARTING_WINDOW) Log.v(TAG,
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG,
"Moving pending starting from " + ttoken
+ " to " + wtoken);
wtoken.startingData = ttoken.startingData;
@@ -3446,7 +3446,7 @@
synchronized(mWindowMap) {
wtoken = findAppWindowToken(token);
if (wtoken == null) {
- Log.w(TAG, "Attempted to set will be hidden of non-existing app token: " + token);
+ Slog.w(TAG, "Attempted to set will be hidden of non-existing app token: " + token);
return;
}
wtoken.willBeHidden = true;
@@ -3466,7 +3466,7 @@
if (wtoken.hidden == visible) {
final int N = wtoken.allAppWindows.size();
boolean changed = false;
- if (DEBUG_APP_TRANSITIONS) Log.v(
+ if (DEBUG_APP_TRANSITIONS) Slog.v(
TAG, "Changing app " + wtoken + " hidden=" + wtoken.hidden
+ " performLayout=" + performLayout);
@@ -3493,7 +3493,7 @@
delayed = true;
}
- //Log.i(TAG, "Window " + win + ": vis=" + win.isVisible());
+ //Slog.i(TAG, "Window " + win + ": vis=" + win.isVisible());
//win.dump(" ");
if (visible) {
if (!win.isVisibleNow()) {
@@ -3528,7 +3528,7 @@
}
}
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG, "setTokenVisibilityLocked: " + wtoken
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "setTokenVisibilityLocked: " + wtoken
+ ": hidden=" + wtoken.hidden + " hiddenRequested="
+ wtoken.hiddenRequested);
@@ -3559,14 +3559,14 @@
synchronized(mWindowMap) {
wtoken = findAppWindowToken(token);
if (wtoken == null) {
- Log.w(TAG, "Attempted to set visibility of non-existing app token: " + token);
+ Slog.w(TAG, "Attempted to set visibility of non-existing app token: " + token);
return;
}
if (DEBUG_APP_TRANSITIONS || DEBUG_ORIENTATION) {
RuntimeException e = new RuntimeException();
if (!HIDE_STACK_CRAWLS) e.fillInStackTrace();
- Log.v(TAG, "setAppVisibility(" + token + ", " + visible
+ Slog.v(TAG, "setAppVisibility(" + token + ", " + visible
+ "): mNextAppTransition=" + mNextAppTransition
+ " hidden=" + wtoken.hidden
+ " hiddenRequested=" + wtoken.hiddenRequested, e);
@@ -3581,7 +3581,7 @@
}
wtoken.hiddenRequested = !visible;
- if (DEBUG_APP_TRANSITIONS) Log.v(
+ if (DEBUG_APP_TRANSITIONS) Slog.v(
TAG, "Setting dummy animation on: " + wtoken);
wtoken.setDummyAnimation();
mOpeningApps.remove(wtoken);
@@ -3633,7 +3633,7 @@
void unsetAppFreezingScreenLocked(AppWindowToken wtoken,
boolean unfreezeSurfaceNow, boolean force) {
if (wtoken.freezingScreen) {
- if (DEBUG_ORIENTATION) Log.v(TAG, "Clear freezing of " + wtoken
+ if (DEBUG_ORIENTATION) Slog.v(TAG, "Clear freezing of " + wtoken
+ " force=" + force);
final int N = wtoken.allAppWindows.size();
boolean unfrozeWindows = false;
@@ -3648,7 +3648,7 @@
}
}
if (force || unfrozeWindows) {
- if (DEBUG_ORIENTATION) Log.v(TAG, "No longer freezing: " + wtoken);
+ if (DEBUG_ORIENTATION) Slog.v(TAG, "No longer freezing: " + wtoken);
wtoken.freezingScreen = false;
mAppsFreezingScreen--;
}
@@ -3667,7 +3667,7 @@
if (DEBUG_ORIENTATION) {
RuntimeException e = new RuntimeException();
if (!HIDE_STACK_CRAWLS) e.fillInStackTrace();
- Log.i(TAG, "Set freezing of " + wtoken.appToken
+ Slog.i(TAG, "Set freezing of " + wtoken.appToken
+ ": hidden=" + wtoken.hidden + " freezing="
+ wtoken.freezingScreen, e);
}
@@ -3698,13 +3698,13 @@
synchronized(mWindowMap) {
if (configChanges == 0 && !mDisplayFrozen) {
- if (DEBUG_ORIENTATION) Log.v(TAG, "Skipping set freeze of " + token);
+ if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping set freeze of " + token);
return;
}
AppWindowToken wtoken = findAppWindowToken(token);
if (wtoken == null || wtoken.appToken == null) {
- Log.w(TAG, "Attempted to freeze screen with non-existing app token: " + wtoken);
+ Slog.w(TAG, "Attempted to freeze screen with non-existing app token: " + wtoken);
return;
}
final long origId = Binder.clearCallingIdentity();
@@ -3725,7 +3725,7 @@
return;
}
final long origId = Binder.clearCallingIdentity();
- if (DEBUG_ORIENTATION) Log.v(TAG, "Clear freezing of " + token
+ if (DEBUG_ORIENTATION) Slog.v(TAG, "Clear freezing of " + token
+ ": hidden=" + wtoken.hidden + " freezing=" + wtoken.freezingScreen);
unsetAppFreezingScreenLocked(wtoken, true, force);
Binder.restoreCallingIdentity(origId);
@@ -3747,7 +3747,7 @@
WindowToken basewtoken = mTokenMap.remove(token);
mTokenList.remove(basewtoken);
if (basewtoken != null && (wtoken=basewtoken.appWindowToken) != null) {
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG, "Removing app token: " + wtoken);
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "Removing app token: " + wtoken);
delayed = setTokenVisibilityLocked(wtoken, null, false, WindowManagerPolicy.TRANSIT_UNSET, true);
wtoken.inPendingTransaction = false;
mOpeningApps.remove(wtoken);
@@ -3759,7 +3759,7 @@
wtoken.waitingToHide = true;
delayed = true;
}
- if (DEBUG_APP_TRANSITIONS) Log.v(
+ if (DEBUG_APP_TRANSITIONS) Slog.v(
TAG, "Removing app " + wtoken + " delayed=" + delayed
+ " animation=" + wtoken.animation
+ " animating=" + wtoken.animating);
@@ -3784,13 +3784,13 @@
}
unsetAppFreezingScreenLocked(wtoken, true, true);
if (mFocusedApp == wtoken) {
- if (DEBUG_FOCUS) Log.v(TAG, "Removing focused app token:" + wtoken);
+ if (DEBUG_FOCUS) Slog.v(TAG, "Removing focused app token:" + wtoken);
mFocusedApp = null;
updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL);
mKeyWaiter.tickle();
}
} else {
- Log.w(TAG, "Attempted to remove non-existing app token: " + token);
+ Slog.w(TAG, "Attempted to remove non-existing app token: " + token);
}
if (!delayed && wtoken != null) {
@@ -3800,7 +3800,7 @@
Binder.restoreCallingIdentity(origId);
if (startingToken != null) {
- if (DEBUG_STARTING_WINDOW) Log.v(TAG, "Schedule remove starting "
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG, "Schedule remove starting "
+ startingToken + ": app token removed");
Message m = mH.obtainMessage(H.REMOVE_STARTING, startingToken);
mH.sendMessage(m);
@@ -3811,13 +3811,13 @@
final int NW = token.windows.size();
for (int i=0; i<NW; i++) {
WindowState win = token.windows.get(i);
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG, "Tmp removing app window " + win);
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Tmp removing app window " + win);
mWindows.remove(win);
int j = win.mChildWindows.size();
while (j > 0) {
j--;
WindowState cwin = (WindowState)win.mChildWindows.get(j);
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG,
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG,
"Tmp removing child window " + cwin);
mWindows.remove(cwin);
}
@@ -3827,13 +3827,13 @@
void dumpAppTokensLocked() {
for (int i=mAppTokens.size()-1; i>=0; i--) {
- Log.v(TAG, " #" + i + ": " + mAppTokens.get(i).token);
+ Slog.v(TAG, " #" + i + ": " + mAppTokens.get(i).token);
}
}
void dumpWindowsLocked() {
for (int i=mWindows.size()-1; i>=0; i--) {
- Log.v(TAG, " #" + i + ": " + mWindows.get(i));
+ Slog.v(TAG, " #" + i + ": " + mWindows.get(i));
}
}
@@ -3855,10 +3855,10 @@
// Find the first app token below the new position that has
// a window displayed.
final AppWindowToken wtoken = mAppTokens.get(tokenPos-1);
- if (DEBUG_REORDER) Log.v(TAG, "Looking for lower windows @ "
+ if (DEBUG_REORDER) Slog.v(TAG, "Looking for lower windows @ "
+ tokenPos + " -- " + wtoken.token);
if (wtoken.sendingToBottom) {
- if (DEBUG_REORDER) Log.v(TAG,
+ if (DEBUG_REORDER) Slog.v(TAG,
"Skipping token -- currently sending to bottom");
tokenPos--;
continue;
@@ -3874,7 +3874,7 @@
if (cwin.mSubLayer >= 0) {
for (int pos=NW-1; pos>=0; pos--) {
if (mWindows.get(pos) == cwin) {
- if (DEBUG_REORDER) Log.v(TAG,
+ if (DEBUG_REORDER) Slog.v(TAG,
"Found child win @" + (pos+1));
return pos+1;
}
@@ -3883,7 +3883,7 @@
}
for (int pos=NW-1; pos>=0; pos--) {
if (mWindows.get(pos) == win) {
- if (DEBUG_REORDER) Log.v(TAG, "Found win @" + (pos+1));
+ if (DEBUG_REORDER) Slog.v(TAG, "Found win @" + (pos+1));
return pos+1;
}
}
@@ -3900,19 +3900,19 @@
for (int j=0; j<NCW; j++) {
WindowState cwin = (WindowState)win.mChildWindows.get(j);
if (!added && cwin.mSubLayer >= 0) {
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG, "Re-adding child window at "
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Re-adding child window at "
+ index + ": " + cwin);
mWindows.add(index, win);
index++;
added = true;
}
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG, "Re-adding window at "
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Re-adding window at "
+ index + ": " + cwin);
mWindows.add(index, cwin);
index++;
}
if (!added) {
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG, "Re-adding window at "
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "Re-adding window at "
+ index + ": " + win);
mWindows.add(index, win);
index++;
@@ -3935,26 +3935,26 @@
}
synchronized(mWindowMap) {
- if (DEBUG_REORDER) Log.v(TAG, "Initial app tokens:");
+ if (DEBUG_REORDER) Slog.v(TAG, "Initial app tokens:");
if (DEBUG_REORDER) dumpAppTokensLocked();
final AppWindowToken wtoken = findAppWindowToken(token);
if (wtoken == null || !mAppTokens.remove(wtoken)) {
- Log.w(TAG, "Attempting to reorder token that doesn't exist: "
+ Slog.w(TAG, "Attempting to reorder token that doesn't exist: "
+ token + " (" + wtoken + ")");
return;
}
mAppTokens.add(index, wtoken);
- if (DEBUG_REORDER) Log.v(TAG, "Moved " + token + " to " + index + ":");
+ if (DEBUG_REORDER) Slog.v(TAG, "Moved " + token + " to " + index + ":");
if (DEBUG_REORDER) dumpAppTokensLocked();
final long origId = Binder.clearCallingIdentity();
- if (DEBUG_REORDER) Log.v(TAG, "Removing windows in " + token + ":");
+ if (DEBUG_REORDER) Slog.v(TAG, "Removing windows in " + token + ":");
if (DEBUG_REORDER) dumpWindowsLocked();
if (tmpRemoveAppWindowsLocked(wtoken)) {
- if (DEBUG_REORDER) Log.v(TAG, "Adding windows back in:");
+ if (DEBUG_REORDER) Slog.v(TAG, "Adding windows back in:");
if (DEBUG_REORDER) dumpWindowsLocked();
reAddAppWindowsLocked(findWindowOffsetLocked(index), wtoken);
- if (DEBUG_REORDER) Log.v(TAG, "Final window list:");
+ if (DEBUG_REORDER) Slog.v(TAG, "Final window list:");
if (DEBUG_REORDER) dumpWindowsLocked();
updateFocusedWindowLocked(UPDATE_FOCUS_WILL_PLACE_SURFACES);
mLayoutNeeded = true;
@@ -3973,7 +3973,7 @@
IBinder token = tokens.get(i);
final AppWindowToken wtoken = findAppWindowToken(token);
if (!mAppTokens.remove(wtoken)) {
- Log.w(TAG, "Attempting to reorder token that doesn't exist: "
+ Slog.w(TAG, "Attempting to reorder token that doesn't exist: "
+ token + " (" + wtoken + ")");
i--;
N--;
@@ -4355,16 +4355,16 @@
mDisplayEnabled = true;
if (false) {
- Log.i(TAG, "ENABLING SCREEN!");
+ Slog.i(TAG, "ENABLING SCREEN!");
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
this.dump(null, pw, null);
- Log.i(TAG, sw.toString());
+ Slog.i(TAG, sw.toString());
}
try {
IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger");
if (surfaceFlinger != null) {
- //Log.i(TAG, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
+ //Slog.i(TAG, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
Parcel data = Parcel.obtain();
data.writeInterfaceToken("android.ui.ISurfaceComposer");
surfaceFlinger.transact(IBinder.FIRST_CALL_TRANSACTION,
@@ -4372,7 +4372,7 @@
data.recycle();
}
} catch (RemoteException ex) {
- Log.e(TAG, "Boot completed: SurfaceFlinger is dead!");
+ Slog.e(TAG, "Boot completed: SurfaceFlinger is dead!");
}
}
@@ -4401,7 +4401,7 @@
public void setRotationUnchecked(int rotation,
boolean alwaysSendConfiguration, int animFlags) {
- if(DEBUG_ORIENTATION) Log.v(TAG,
+ if(DEBUG_ORIENTATION) Slog.v(TAG,
"alwaysSendConfiguration set to "+alwaysSendConfiguration);
long origId = Binder.clearCallingIdentity();
@@ -4433,14 +4433,14 @@
mRequestedRotation = rotation;
mLastRotationFlags = animFlags;
}
- if (DEBUG_ORIENTATION) Log.v(TAG, "Overwriting rotation value from " + rotation);
+ if (DEBUG_ORIENTATION) Slog.v(TAG, "Overwriting rotation value from " + rotation);
rotation = mPolicy.rotationForOrientationLw(mForcedAppOrientation,
mRotation, mDisplayEnabled);
- if (DEBUG_ORIENTATION) Log.v(TAG, "new rotation is set to " + rotation);
+ if (DEBUG_ORIENTATION) Slog.v(TAG, "new rotation is set to " + rotation);
changed = mDisplayEnabled && mRotation != rotation;
if (changed) {
- if (DEBUG_ORIENTATION) Log.v(TAG,
+ if (DEBUG_ORIENTATION) Slog.v(TAG,
"Rotation changed to " + rotation
+ " from " + mRotation
+ " (forceApp=" + mForcedAppOrientation
@@ -4453,7 +4453,7 @@
mWaitingForConfig = true;
mLayoutNeeded = true;
startFreezingDisplayLocked();
- Log.i(TAG, "Setting rotation to " + rotation + ", animFlags=" + animFlags);
+ Slog.i(TAG, "Setting rotation to " + rotation + ", animFlags=" + animFlags);
mQueue.setOrientation(rotation);
if (mDisplayEnabled) {
Surface.setOrientation(0, rotation, animFlags);
@@ -4537,7 +4537,7 @@
try {
return mViewServer.start();
} catch (IOException e) {
- Log.w(TAG, "View server did not start");
+ Slog.w(TAG, "View server did not start");
}
}
return false;
@@ -4547,7 +4547,7 @@
mViewServer = new ViewServer(this, port);
return mViewServer.start();
} catch (IOException e) {
- Log.w(TAG, "View server did not start");
+ Slog.w(TAG, "View server did not start");
}
return false;
}
@@ -4722,7 +4722,7 @@
reply.readException();
} catch (Exception e) {
- Log.w(TAG, "Could not send command " + command + " with parameters " + parameters, e);
+ Slog.w(TAG, "Could not send command " + command + " with parameters " + parameters, e);
success = false;
} finally {
if (data != null) {
@@ -4920,7 +4920,7 @@
* @return Returns true if event was dispatched, false if it was dropped for any reason
*/
private int dispatchPointer(QueuedEvent qev, MotionEvent ev, int pid, int uid) {
- if (DEBUG_INPUT || WindowManagerPolicy.WATCH_POINTER) Log.v(TAG,
+ if (DEBUG_INPUT || WindowManagerPolicy.WATCH_POINTER) Slog.v(TAG,
"dispatchPointer " + ev);
if (MEASURE_LATENCY) {
@@ -4951,7 +4951,7 @@
// pointer without actually pressing down. All other cases should
// be atypical, so let's log them.
if (action != MotionEvent.ACTION_MOVE) {
- Log.w(TAG, "No window to dispatch pointer action " + ev.getAction());
+ Slog.w(TAG, "No window to dispatch pointer action " + ev.getAction());
}
synchronized (mWindowMap) {
dispatchPointerElsewhereLocked(null, null, ev, ev.getEventTime(), true);
@@ -4978,13 +4978,13 @@
final long eventTime = ev.getEventTime();
final long eventTimeNano = ev.getEventTimeNano();
- //Log.i(TAG, "Sending " + ev + " to " + target);
+ //Slog.i(TAG, "Sending " + ev + " to " + target);
if (uid != 0 && uid != target.mSession.mUid) {
if (mContext.checkPermission(
android.Manifest.permission.INJECT_EVENTS, pid, uid)
!= PackageManager.PERMISSION_GRANTED) {
- Log.w(TAG, "Permission denied: injecting pointer event from pid "
+ Slog.w(TAG, "Permission denied: injecting pointer event from pid "
+ pid + " uid " + uid + " to window " + target
+ " owned by uid " + target.mSession.mUid);
if (qev != null) {
@@ -5033,7 +5033,7 @@
//an invalid move have to cancel earlier action
ev.setAction(MotionEvent.ACTION_CANCEL);
action = MotionEvent.ACTION_CANCEL;
- if (DEBUG_INPUT) Log.v(TAG, "Sending cancel for invalid ACTION_MOVE");
+ if (DEBUG_INPUT) Slog.v(TAG, "Sending cancel for invalid ACTION_MOVE");
//note that the subsequent invalid moves will not get here
mFatTouch = true;
}
@@ -5113,7 +5113,7 @@
try {
out.mClient.dispatchPointer(oev, eventTime, false);
} catch (android.os.RemoteException e) {
- Log.i(TAG, "WINDOW DIED during outside motion dispatch: " + out);
+ Slog.i(TAG, "WINDOW DIED during outside motion dispatch: " + out);
}
oev.offsetLocation((float)frame.left, (float)frame.top);
out = out.mNextOutsideTouch;
@@ -5134,7 +5134,7 @@
// dispatch the event.
try {
if (DEBUG_INPUT || DEBUG_FOCUS || WindowManagerPolicy.WATCH_POINTER) {
- Log.v(TAG, "Delivering pointer " + qev + " to " + target);
+ Slog.v(TAG, "Delivering pointer " + qev + " to " + target);
}
if (MEASURE_LATENCY) {
@@ -5148,7 +5148,7 @@
}
return INJECT_SUCCEEDED;
} catch (android.os.RemoteException e) {
- Log.i(TAG, "WINDOW DIED during motion dispatch: " + target);
+ Slog.i(TAG, "WINDOW DIED during motion dispatch: " + target);
mKeyWaiter.mMotionTarget = null;
try {
removeWindow(target.mSession, target.mClient);
@@ -5164,13 +5164,13 @@
* @return Returns true if event was dispatched, false if it was dropped for any reason
*/
private int dispatchTrackball(QueuedEvent qev, MotionEvent ev, int pid, int uid) {
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "dispatchTrackball [" + ev.getAction() +"] <" + ev.getX() + ", " + ev.getY() + ">");
Object focusObj = mKeyWaiter.waitForNextEventTarget(null, qev,
ev, false, false, pid, uid);
if (focusObj == null) {
- Log.w(TAG, "No focus window, dropping trackball: " + ev);
+ Slog.w(TAG, "No focus window, dropping trackball: " + ev);
if (qev != null) {
mQueue.recycleEvent(qev);
}
@@ -5191,7 +5191,7 @@
if (mContext.checkPermission(
android.Manifest.permission.INJECT_EVENTS, pid, uid)
!= PackageManager.PERMISSION_GRANTED) {
- Log.w(TAG, "Permission denied: injecting key event from pid "
+ Slog.w(TAG, "Permission denied: injecting key event from pid "
+ pid + " uid " + uid + " to window " + focus
+ " owned by uid " + focus.mSession.mUid);
if (qev != null) {
@@ -5220,7 +5220,7 @@
focus.mClient.dispatchTrackball(ev, eventTime, true);
return INJECT_SUCCEEDED;
} catch (android.os.RemoteException e) {
- Log.i(TAG, "WINDOW DIED during key dispatch: " + focus);
+ Slog.i(TAG, "WINDOW DIED during key dispatch: " + focus);
try {
removeWindow(focus.mSession, focus.mClient);
} catch (java.util.NoSuchElementException ex) {
@@ -5236,12 +5236,12 @@
* @return Returns true if event was dispatched, false if it was dropped for any reason
*/
private int dispatchKey(KeyEvent event, int pid, int uid) {
- if (DEBUG_INPUT) Log.v(TAG, "Dispatch key: " + event);
+ if (DEBUG_INPUT) Slog.v(TAG, "Dispatch key: " + event);
Object focusObj = mKeyWaiter.waitForNextEventTarget(event, null,
null, false, false, pid, uid);
if (focusObj == null) {
- Log.w(TAG, "No focus window, dropping: " + event);
+ Slog.w(TAG, "No focus window, dropping: " + event);
return INJECT_FAILED;
}
if (focusObj == mKeyWaiter.CONSUMED_EVENT_TOKEN) {
@@ -5260,14 +5260,14 @@
WindowState focus = (WindowState)focusObj;
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "Dispatching to " + focus + ": " + event);
if (uid != 0 && uid != focus.mSession.mUid) {
if (mContext.checkPermission(
android.Manifest.permission.INJECT_EVENTS, pid, uid)
!= PackageManager.PERMISSION_GRANTED) {
- Log.w(TAG, "Permission denied: injecting key event from pid "
+ Slog.w(TAG, "Permission denied: injecting key event from pid "
+ pid + " uid " + uid + " to window " + focus
+ " owned by uid " + focus.mSession.mUid);
return INJECT_NO_PERMISSION;
@@ -5284,13 +5284,13 @@
try {
if (DEBUG_INPUT || DEBUG_FOCUS) {
- Log.v(TAG, "Delivering key " + event.getKeyCode()
+ Slog.v(TAG, "Delivering key " + event.getKeyCode()
+ " to " + focus);
}
focus.mClient.dispatchKey(event);
return INJECT_SUCCEEDED;
} catch (android.os.RemoteException e) {
- Log.i(TAG, "WINDOW DIED during key dispatch: " + focus);
+ Slog.i(TAG, "WINDOW DIED during key dispatch: " + focus);
try {
removeWindow(focus.mSession, focus.mClient);
} catch (java.util.NoSuchElementException ex) {
@@ -5550,7 +5550,7 @@
// it may change before we lock. Thus we must check it again.
WindowState targetWin = mLastWin;
boolean targetIsNew = targetWin == null;
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "waitForLastKey: mFinished=" + mFinished +
", mLastWin=" + mLastWin);
if (targetIsNew) {
@@ -5559,12 +5559,12 @@
if (target == SKIP_TARGET_TOKEN) {
// The user has pressed a special key, and we are
// dropping all pending events before it.
- if (DEBUG_INPUT) Log.v(TAG, "Skipping: " + nextKey
+ if (DEBUG_INPUT) Slog.v(TAG, "Skipping: " + nextKey
+ " " + nextMotion);
return null;
}
if (target == CONSUMED_EVENT_TOKEN) {
- if (DEBUG_INPUT) Log.v(TAG, "Consumed: " + nextKey
+ if (DEBUG_INPUT) Slog.v(TAG, "Consumed: " + nextKey
+ " " + nextMotion);
return target;
}
@@ -5588,7 +5588,7 @@
// If event dispatching is disabled, then we
// just consume the events.
if (!mEventDispatching) {
- if (DEBUG_INPUT) Log.v(TAG,
+ if (DEBUG_INPUT) Slog.v(TAG,
"Skipping event; dispatching disabled: "
+ nextKey + " " + nextMotion);
return null;
@@ -5604,14 +5604,14 @@
// If we didn't find a target window, and there is no
// focused app window, then just eat the events.
} else if (mFocusedApp == null) {
- if (DEBUG_INPUT) Log.v(TAG,
+ if (DEBUG_INPUT) Slog.v(TAG,
"Skipping event; no focused app: "
+ nextKey + " " + nextMotion);
return null;
}
}
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "Waiting for last key in " + mLastBinder
+ " target=" + targetWin
+ " mFinished=" + mFinished
@@ -5644,10 +5644,10 @@
try {
// after that continue
// processing keys, so we don't get stuck.
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "Waiting for key dispatch: " + curTimeout);
wait(curTimeout);
- if (DEBUG_INPUT) Log.v(TAG, "Finished waiting @"
+ if (DEBUG_INPUT) Slog.v(TAG, "Finished waiting @"
+ SystemClock.uptimeMillis() + " startTime="
+ startTime + " switchTime=" + mTimeToSwitch
+ " target=" + targetWin + " mLW=" + mLastWin
@@ -5670,12 +5670,12 @@
if (waitedFor >= keyDispatchingTimeout && mTimeToSwitch == 0) {
IApplicationToken at = null;
synchronized (this) {
- Log.w(TAG, "Key dispatching timed out sending to " +
+ Slog.w(TAG, "Key dispatching timed out sending to " +
(targetWin != null ? targetWin.mAttrs.getTitle()
: "<null>: no window ready for key dispatch"));
// NOSHIP debugging
- Log.w(TAG, "Previous dispatch state: " + mDispatchState);
- Log.w(TAG, "Current dispatch state: " +
+ Slog.w(TAG, "Previous dispatch state: " + mDispatchState);
+ Slog.w(TAG, "Current dispatch state: " +
new DispatchState(nextKey, targetWin));
// END NOSHIP
//dump();
@@ -5706,11 +5706,11 @@
if (abort && (mLastWin == targetWin || targetWin == null)) {
mFinished = true;
if (mLastWin != null) {
- if (DEBUG_INPUT) Log.v(TAG,
+ if (DEBUG_INPUT) Slog.v(TAG,
"Window " + mLastWin +
" timed out on key input");
if (mLastWin.mToken.paused) {
- Log.w(TAG, "Un-pausing dispatching to this window");
+ Slog.w(TAG, "Un-pausing dispatching to this window");
mLastWin.mToken.paused = false;
}
}
@@ -5723,7 +5723,7 @@
return null;
}
} else {
- Log.w(TAG, "Continuing to wait for key to be dispatched");
+ Slog.w(TAG, "Continuing to wait for key to be dispatched");
startTime = SystemClock.uptimeMillis();
}
}
@@ -5753,7 +5753,7 @@
nextKey.getMetaState(), down, repeatCount,
nextKey.getFlags());
}
- Log.w(TAG, "Event timeout during app switch: dropping "
+ Slog.w(TAG, "Event timeout during app switch: dropping "
+ nextKey);
return SKIP_TARGET_TOKEN;
}
@@ -5785,7 +5785,7 @@
} else if (!isPointerEvent) {
boolean dispatch = mKeyWaiter.checkShouldDispatchKey(-1);
if (!dispatch) {
- Log.w(TAG, "Event timeout during app switch: dropping trackball "
+ Slog.w(TAG, "Event timeout during app switch: dropping trackball "
+ nextMotion);
return SKIP_TARGET_TOKEN;
}
@@ -5806,7 +5806,7 @@
boolean dispatch = mKeyWaiter.checkShouldDispatchKey(
KeyEvent.KEYCODE_UNKNOWN);
if (!dispatch) {
- Log.w(TAG, "Event timeout during app switch: dropping pointer "
+ Slog.w(TAG, "Event timeout during app switch: dropping pointer "
+ nextMotion);
return SKIP_TARGET_TOKEN;
}
@@ -5830,7 +5830,7 @@
// already down!
// XXX: We should probably send an ACTION_UP to the current
// target.
- Log.w(TAG, "Pointer down received while already down in: "
+ Slog.w(TAG, "Pointer down received while already down in: "
+ mMotionTarget);
mMotionTarget = null;
}
@@ -5846,7 +5846,7 @@
final Rect tmpRect = mTempRect;
for (int i=N-1; i>=0; i--) {
WindowState child = (WindowState)windows.get(i);
- //Log.i(TAG, "Checking dispatch to: " + child);
+ //Slog.i(TAG, "Checking dispatch to: " + child);
final int flags = child.mAttrs.flags;
if ((flags & WindowManager.LayoutParams.FLAG_SYSTEM_ERROR) != 0) {
if (topErrWindow == null) {
@@ -5854,11 +5854,11 @@
}
}
if (!child.isVisibleLw()) {
- //Log.i(TAG, "Not visible!");
+ //Slog.i(TAG, "Not visible!");
continue;
}
if ((flags & WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE) != 0) {
- //Log.i(TAG, "Not touchable!");
+ //Slog.i(TAG, "Not touchable!");
if ((flags & WindowManager.LayoutParams
.FLAG_WATCH_OUTSIDE_TOUCH) != 0) {
child.mNextOutsideTouch = mOutsideTouchTargets;
@@ -5890,12 +5890,12 @@
(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
|WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);
if (tmpRect.contains(x, y) || touchFlags == 0) {
- //Log.i(TAG, "Using this target!");
+ //Slog.i(TAG, "Using this target!");
if (!screenWasOff || (flags &
WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING) != 0) {
mMotionTarget = child;
} else {
- //Log.i(TAG, "Waking, skip!");
+ //Slog.i(TAG, "Waking, skip!");
mMotionTarget = null;
}
break;
@@ -5905,7 +5905,7 @@
.FLAG_WATCH_OUTSIDE_TOUCH) != 0) {
child.mNextOutsideTouch = mOutsideTouchTargets;
mOutsideTouchTargets = child;
- //Log.i(TAG, "Adding to outside target list: " + child);
+ //Slog.i(TAG, "Adding to outside target list: " + child);
}
}
@@ -5967,7 +5967,7 @@
releasePendingPointerLocked(s);
s.mPendingPointerMove = pendingMotion;
s.mPendingPointerWindow = win;
- if (DEBUG_INPUT) Log.v(TAG,
+ if (DEBUG_INPUT) Slog.v(TAG,
"bindTargetToWindow " + s.mPendingPointerMove);
} else if (pendingWhat == RETURN_PENDING_TRACKBALL) {
releasePendingTrackballLocked(s);
@@ -5978,7 +5978,7 @@
}
void releasePendingPointerLocked(Session s) {
- if (DEBUG_INPUT) Log.v(TAG,
+ if (DEBUG_INPUT) Slog.v(TAG,
"releasePendingPointer " + s.mPendingPointerMove);
if (s.mPendingPointerMove != null) {
mQueue.recycleEvent(s.mPendingPointerMove);
@@ -5995,7 +5995,7 @@
MotionEvent finishedKey(Session session, IWindow client, boolean force,
int returnWhat) {
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "finishedKey: client=" + client + ", force=" + force);
if (client == null) {
@@ -6007,7 +6007,7 @@
WindowState win = null;
synchronized (this) {
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "finishedKey: client=" + client.asBinder()
+ ", force=" + force + ", last=" + mLastBinder
+ " (token=" + (mLastWin != null ? mLastWin.mToken : null) + ")");
@@ -6025,7 +6025,7 @@
}
if (mLastBinder == client.asBinder()) {
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "finishedKey: last paused="
+ ((mLastWin != null) ? mLastWin.mToken.paused : "null"));
if (mLastWin != null && (!mLastWin.mToken.paused || force
@@ -6042,7 +6042,7 @@
if (qev != null) {
res = (MotionEvent)qev.event;
- if (DEBUG_INPUT) Log.v(TAG,
+ if (DEBUG_INPUT) Slog.v(TAG,
"Returning pending motion: " + res);
mQueue.recycleEvent(qev);
if (win != null && returnWhat == RETURN_PENDING_POINTER) {
@@ -6071,7 +6071,7 @@
return;
}
synchronized (this) {
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "New key dispatch window: win="
+ newWindow.mClient.asBinder()
+ ", last=" + mLastBinder
@@ -6087,7 +6087,7 @@
mGotFirstWindow = true;
if ((newWindow.mAttrs.flags & FLAG_SYSTEM_ERROR) != 0) {
- if (DEBUG_INPUT) Log.v(TAG,
+ if (DEBUG_INPUT) Slog.v(TAG,
"New SYSTEM_ERROR window; resetting state");
mLastWin = null;
mLastBinder = null;
@@ -6097,7 +6097,7 @@
// If the new window is above the window we are
// waiting on, then stop waiting and let key dispatching
// start on the new guy.
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "Last win layer=" + mLastWin.mLayer
+ ", new win layer=" + newWindow.mLayer);
if (newWindow.mLayer >= mLastWin.mLayer) {
@@ -6118,7 +6118,7 @@
void pauseDispatchingLocked(WindowToken token) {
synchronized (this)
{
- if (DEBUG_INPUT) Log.v(TAG, "Pausing WindowToken " + token);
+ if (DEBUG_INPUT) Slog.v(TAG, "Pausing WindowToken " + token);
token.paused = true;
/*
@@ -6126,11 +6126,11 @@
mPaused = true;
} else {
if (mLastWin == null) {
- Log.i(TAG, "Key dispatching not paused: no last window.");
+ Slog.i(TAG, "Key dispatching not paused: no last window.");
} else if (mFinished) {
- Log.i(TAG, "Key dispatching not paused: finished last key.");
+ Slog.i(TAG, "Key dispatching not paused: finished last key.");
} else {
- Log.i(TAG, "Key dispatching not paused: window in higher layer.");
+ Slog.i(TAG, "Key dispatching not paused: window in higher layer.");
}
}
*/
@@ -6140,7 +6140,7 @@
void resumeDispatchingLocked(WindowToken token) {
synchronized (this) {
if (token.paused) {
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "Resuming WindowToken " + token
+ ", last=" + mLastBinder
+ " (token=" + (mLastWin != null ? mLastWin.mToken : null)
@@ -6168,7 +6168,7 @@
// Don't wait for more than .5 seconds for app to finish
// processing the pending events.
long now = SystemClock.uptimeMillis() + 500;
- if (DEBUG_INPUT) Log.v(TAG, "appSwitchComing: " + now);
+ if (DEBUG_INPUT) Slog.v(TAG, "appSwitchComing: " + now);
if (mTimeToSwitch == 0 || now < mTimeToSwitch) {
mTimeToSwitch = now;
}
@@ -6268,7 +6268,7 @@
if (screenIsOff) {
if (!mPolicy.isWakeRelMovementTq(event.deviceId,
device.classes, event)) {
- //Log.i(TAG, "dropping because screenIsOff and !isWakeKey");
+ //Slog.i(TAG, "dropping because screenIsOff and !isWakeKey");
return false;
}
event.flags |= WindowManagerPolicy.FLAG_WOKE_HERE;
@@ -6285,7 +6285,7 @@
if (screenIsOff) {
if (!mPolicy.isWakeAbsMovementTq(event.deviceId,
device.classes, event)) {
- //Log.i(TAG, "dropping because screenIsOff and !isWakeKey");
+ //Slog.i(TAG, "dropping because screenIsOff and !isWakeKey");
return false;
}
event.flags |= WindowManagerPolicy.FLAG_WOKE_HERE;
@@ -6306,7 +6306,7 @@
case RawInputEvent.CLASS_KEYBOARD:
KeyEvent ke = (KeyEvent)ev.event;
if (mPolicy.isMovementKeyTi(ke.getKeyCode())) {
- Log.w(TAG, "Dropping movement key during app switch: "
+ Slog.w(TAG, "Dropping movement key during app switch: "
+ ke.getKeyCode() + ", action=" + ke.getAction());
return FILTER_REMOVE;
}
@@ -6355,7 +6355,7 @@
try {
process();
} catch (Exception e) {
- Log.e(TAG, "Exception in input dispatcher", e);
+ Slog.e(TAG, "Exception in input dispatcher", e);
}
}
}
@@ -6381,7 +6381,7 @@
while (true) {
long curTime = SystemClock.uptimeMillis();
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "Waiting for next key: now=" + curTime
+ ", repeat @ " + nextKeyTime);
@@ -6393,7 +6393,7 @@
(int)((!configChanged && curTime < nextKeyTime)
? (nextKeyTime-curTime) : 0));
- if (DEBUG_INPUT && ev != null) Log.v(
+ if (DEBUG_INPUT && ev != null) Slog.v(
TAG, "Event: type=" + ev.classType + " data=" + ev.event);
if (MEASURE_LATENCY) {
@@ -6455,7 +6455,7 @@
lastKeyTime = curTime;
nextKeyTime = lastKeyTime
+ ViewConfiguration.getLongPressTimeout();
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "Received key down: first repeat @ "
+ nextKeyTime);
} else {
@@ -6464,7 +6464,7 @@
// Arbitrary long timeout.
lastKeyTime = curTime;
nextKeyTime = curTime + LONG_WAIT;
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "Received key up: ignore repeat @ "
+ nextKeyTime);
}
@@ -6472,7 +6472,7 @@
mQueue.recycleEvent(ev);
break;
case RawInputEvent.CLASS_TOUCHSCREEN:
- //Log.i(TAG, "Read next event " + ev);
+ //Slog.i(TAG, "Read next event " + ev);
dispatchPointer(ev, (MotionEvent)ev.event, 0, 0);
break;
case RawInputEvent.CLASS_TRACKBALL:
@@ -6495,7 +6495,7 @@
// Timeout occurred while key was down. If it is at or
// past the key repeat time, dispatch the repeat.
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "Key timeout: repeat=" + nextKeyTime
+ ", now=" + curTime);
if (curTime < nextKeyTime) {
@@ -6505,7 +6505,7 @@
lastKeyTime = nextKeyTime;
nextKeyTime = nextKeyTime + KEY_REPEAT_DELAY;
keyRepeatCount++;
- if (DEBUG_INPUT) Log.v(
+ if (DEBUG_INPUT) Slog.v(
TAG, "Key repeat: count=" + keyRepeatCount
+ ", next @ " + nextKeyTime);
KeyEvent newEvent;
@@ -6530,7 +6530,7 @@
}
} catch (Exception e) {
- Log.e(TAG,
+ Slog.e(TAG,
"Input thread received uncaught exception: " + e, e);
}
}
@@ -6618,7 +6618,7 @@
} catch (RuntimeException e) {
// Log all 'real' exceptions thrown to the caller
if (!(e instanceof SecurityException)) {
- Log.e(TAG, "Window Session Crash", e);
+ Slog.e(TAG, "Window Session Crash", e);
}
throw e;
}
@@ -6673,27 +6673,27 @@
}
public void finishDrawing(IWindow window) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "IWindow finishDrawing called for " + window);
finishDrawingWindow(this, window);
}
public void finishKey(IWindow window) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "IWindow finishKey called for " + window);
mKeyWaiter.finishedKey(this, window, false,
KeyWaiter.RETURN_NOTHING);
}
public MotionEvent getPendingPointerMove(IWindow window) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "IWindow getPendingMotionEvent called for " + window);
return mKeyWaiter.finishedKey(this, window, false,
KeyWaiter.RETURN_PENDING_POINTER);
}
public MotionEvent getPendingTrackballMove(IWindow window) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "IWindow getPendingMotionEvent called for " + window);
return mKeyWaiter.finishedKey(this, window, false,
KeyWaiter.RETURN_PENDING_TRACKBALL);
@@ -6762,10 +6762,10 @@
void windowAddedLocked() {
if (mSurfaceSession == null) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "First window added to " + this + ", creating SurfaceSession");
mSurfaceSession = new SurfaceSession();
- if (SHOW_TRANSACTIONS) Log.i(
+ if (SHOW_TRANSACTIONS) Slog.i(
TAG, " NEW SURFACE SESSION " + mSurfaceSession);
mSessions.add(this);
}
@@ -6781,15 +6781,15 @@
if (mNumWindow <= 0 && mClientDead) {
mSessions.remove(this);
if (mSurfaceSession != null) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Last window removed from " + this
+ ", destroying " + mSurfaceSession);
- if (SHOW_TRANSACTIONS) Log.i(
+ if (SHOW_TRANSACTIONS) Slog.i(
TAG, " KILL SURFACE SESSION " + mSurfaceSession);
try {
mSurfaceSession.kill();
} catch (Exception e) {
- Log.w(TAG, "Exception thrown when killing surface session "
+ Slog.w(TAG, "Exception thrown when killing surface session "
+ mSurfaceSession + " in session " + this
+ ": " + e.toString());
}
@@ -7009,7 +7009,7 @@
mViewVisibility = viewVisibility;
DeathRecipient deathRecipient = new DeathRecipient();
mAlpha = a.alpha;
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Window " + this + " client=" + c.asBinder()
+ " token=" + token + " (" + mAttrs.token + ")");
try {
@@ -7086,7 +7086,7 @@
}
void attach() {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Attaching " + this + " token=" + mToken
+ ", list=" + mToken.windows);
mSession.windowAddedLocked();
@@ -7173,7 +7173,7 @@
if (localLOGV) {
//if ("com.google.android.youtube".equals(mAttrs.packageName)
// && mAttrs.type == WindowManager.LayoutParams.TYPE_APPLICATION_PANEL) {
- Log.v(TAG, "Resolving (mRequestedWidth="
+ Slog.v(TAG, "Resolving (mRequestedWidth="
+ mRequestedWidth + ", mRequestedheight="
+ mRequestedHeight + ") to" + " (pw=" + pw + ", ph=" + ph
+ "): frame=" + mFrame.toShortString()
@@ -7232,7 +7232,7 @@
}
public void setAnimation(Animation anim) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Setting animation in " + this + ": " + anim);
mAnimating = false;
mLocalAnimating = false;
@@ -7268,7 +7268,7 @@
if ((mAttrs.flags&WindowManager.LayoutParams.FLAG_SECURE) != 0) {
flags |= Surface.SECURE;
}
- if (DEBUG_VISIBILITY) Log.v(
+ if (DEBUG_VISIBILITY) Slog.v(
TAG, "Creating surface in session "
+ mSession.mSurfaceSession + " window " + this
+ " w=" + mFrame.width()
@@ -7293,28 +7293,28 @@
mSurface = new Surface(
mSession.mSurfaceSession, mSession.mPid,
0, w, h, mAttrs.format, flags);
- if (SHOW_TRANSACTIONS) Log.i(TAG, " CREATE SURFACE "
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " CREATE SURFACE "
+ mSurface + " IN SESSION "
+ mSession.mSurfaceSession
+ ": pid=" + mSession.mPid + " format="
+ mAttrs.format + " flags=0x"
+ Integer.toHexString(flags));
} catch (Surface.OutOfResourcesException e) {
- Log.w(TAG, "OutOfResourcesException creating surface");
+ Slog.w(TAG, "OutOfResourcesException creating surface");
reclaimSomeSurfaceMemoryLocked(this, "create");
return null;
} catch (Exception e) {
- Log.e(TAG, "Exception creating surface", e);
+ Slog.e(TAG, "Exception creating surface", e);
return null;
}
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Got surface: " + mSurface
+ ", set left=" + mFrame.left + " top=" + mFrame.top
+ ", animLayer=" + mAnimLayer);
if (SHOW_TRANSACTIONS) {
- Log.i(TAG, ">>> OPEN TRANSACTION");
- Log.i(TAG, " SURFACE " + mSurface + ": CREATE ("
+ Slog.i(TAG, ">>> OPEN TRANSACTION");
+ Slog.i(TAG, " SURFACE " + mSurface + ": CREATE ("
+ mAttrs.getTitle() + ") pos=(" +
mFrame.left + "," + mFrame.top + ") (" +
mFrame.width() + "x" + mFrame.height() + "), layer=" +
@@ -7328,21 +7328,21 @@
mSurface.setLayer(mAnimLayer);
mSurface.hide();
if ((mAttrs.flags&WindowManager.LayoutParams.FLAG_DITHER) != 0) {
- if (SHOW_TRANSACTIONS) Log.i(TAG, " SURFACE "
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " SURFACE "
+ mSurface + ": DITHER");
mSurface.setFlags(Surface.SURFACE_DITHER,
Surface.SURFACE_DITHER);
}
} catch (RuntimeException e) {
- Log.w(TAG, "Error creating surface in " + w, e);
+ Slog.w(TAG, "Error creating surface in " + w, e);
reclaimSomeSurfaceMemoryLocked(this, "create-init");
}
mLastHidden = true;
} finally {
- if (SHOW_TRANSACTIONS) Log.i(TAG, "<<< CLOSE TRANSACTION");
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION");
Surface.closeTransaction();
}
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Created surface " + this);
}
return mSurface;
@@ -7388,18 +7388,18 @@
if (DEBUG_VISIBILITY) {
RuntimeException e = new RuntimeException();
if (!HIDE_STACK_CRAWLS) e.fillInStackTrace();
- Log.w(TAG, "Window " + this + " destroying surface "
+ Slog.w(TAG, "Window " + this + " destroying surface "
+ mSurface + ", session " + mSession, e);
}
if (SHOW_TRANSACTIONS) {
RuntimeException ex = new RuntimeException();
if (!HIDE_STACK_CRAWLS) ex.fillInStackTrace();
- Log.i(TAG, " SURFACE " + mSurface + ": DESTROY ("
+ Slog.i(TAG, " SURFACE " + mSurface + ": DESTROY ("
+ mAttrs.getTitle() + ")", ex);
}
mSurface.destroy();
} catch (RuntimeException e) {
- Log.w(TAG, "Exception thrown when destroying Window " + this
+ Slog.w(TAG, "Exception thrown when destroying Window " + this
+ " surface " + mSurface + " session " + mSession
+ ": " + e.toString());
}
@@ -7410,7 +7410,7 @@
boolean finishDrawingLocked() {
if (mDrawPending) {
- if (SHOW_TRANSACTIONS || DEBUG_ORIENTATION) Log.v(
+ if (SHOW_TRANSACTIONS || DEBUG_ORIENTATION) Slog.v(
TAG, "finishDrawingLocked: " + mSurface);
mCommitDrawPending = true;
mDrawPending = false;
@@ -7421,7 +7421,7 @@
// This must be called while inside a transaction.
boolean commitFinishDrawingLocked(long currentTime) {
- //Log.i(TAG, "commitFinishDrawingLocked: " + mSurface);
+ //Slog.i(TAG, "commitFinishDrawingLocked: " + mSurface);
if (!mCommitDrawPending) {
return false;
}
@@ -7440,14 +7440,14 @@
if (DEBUG_VISIBILITY) {
RuntimeException e = new RuntimeException();
if (!HIDE_STACK_CRAWLS) e.fillInStackTrace();
- Log.v(TAG, "performShow on " + this
+ Slog.v(TAG, "performShow on " + this
+ ": readyToShow=" + mReadyToShow + " readyForDisplay=" + isReadyForDisplay()
+ " starting=" + (mAttrs.type == TYPE_APPLICATION_STARTING), e);
}
if (mReadyToShow && isReadyForDisplay()) {
- if (SHOW_TRANSACTIONS || DEBUG_ORIENTATION) Log.i(
+ if (SHOW_TRANSACTIONS || DEBUG_ORIENTATION) Slog.i(
TAG, " SURFACE " + mSurface + ": SHOW (performShowLocked)");
- if (DEBUG_VISIBILITY) Log.v(TAG, "Showing " + this
+ if (DEBUG_VISIBILITY) Slog.v(TAG, "Showing " + this
+ " during animation: policyVis=" + mPolicyVisibility
+ " attHidden=" + mAttachedHidden
+ " tok.hiddenRequested="
@@ -7489,7 +7489,7 @@
mAppToken.firstWindowDrawn = true;
if (mAppToken.startingData != null) {
- if (DEBUG_STARTING_WINDOW || DEBUG_ANIM) Log.v(TAG,
+ if (DEBUG_STARTING_WINDOW || DEBUG_ANIM) Slog.v(TAG,
"Finish starting " + mToken
+ ": first real window is shown, no animation");
// If this initial window is animating, stop it -- we
@@ -7520,7 +7520,7 @@
mHasTransformation = true;
mHasLocalTransformation = true;
if (!mLocalAnimating) {
- if (DEBUG_ANIM) Log.v(
+ if (DEBUG_ANIM) Slog.v(
TAG, "Starting animation in " + this +
" @ " + currentTime + ": ww=" + mFrame.width() + " wh=" + mFrame.height() +
" dw=" + dw + " dh=" + dh + " scale=" + mWindowAnimationScale);
@@ -7532,14 +7532,14 @@
mTransformation.clear();
final boolean more = mAnimation.getTransformation(
currentTime, mTransformation);
- if (DEBUG_ANIM) Log.v(
+ if (DEBUG_ANIM) Slog.v(
TAG, "Stepped animation in " + this +
": more=" + more + ", xform=" + mTransformation);
if (more) {
// we're not done!
return true;
}
- if (DEBUG_ANIM) Log.v(
+ if (DEBUG_ANIM) Slog.v(
TAG, "Finished animation in " + this +
" @ " + currentTime);
mAnimation = null;
@@ -7578,7 +7578,7 @@
return false;
}
- if (DEBUG_ANIM) Log.v(
+ if (DEBUG_ANIM) Slog.v(
TAG, "Animation done in " + this + ": exiting=" + mExiting
+ ", reportedVisible="
+ (mAppToken != null ? mAppToken.reportedVisible : false));
@@ -7592,7 +7592,7 @@
} else if (mIsWallpaper) {
mAnimLayer += mWallpaperAnimLayerAdjustment;
}
- if (DEBUG_LAYERS) Log.v(TAG, "Stepping win " + this
+ if (DEBUG_LAYERS) Slog.v(TAG, "Stepping win " + this
+ " anim layer: " + mAnimLayer);
mHasTransformation = false;
mHasLocalTransformation = false;
@@ -7609,7 +7609,7 @@
&& mAppToken != null
&& mAppToken.firstWindowDrawn
&& mAppToken.startingData != null) {
- if (DEBUG_STARTING_WINDOW) Log.v(TAG, "Finish starting "
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG, "Finish starting "
+ mToken + ": first real window done animating");
mFinishedStarting.add(mAppToken);
mH.sendEmptyMessage(H.FINISHED_STARTING);
@@ -7625,7 +7625,7 @@
}
void finishExit() {
- if (DEBUG_ANIM) Log.v(
+ if (DEBUG_ANIM) Slog.v(
TAG, "finishExit in " + this
+ ": exiting=" + mExiting
+ " remove=" + mRemoveOnExit
@@ -7644,18 +7644,18 @@
return;
}
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Exit animation finished in " + this
+ ": remove=" + mRemoveOnExit);
if (mSurface != null) {
mDestroySurface.add(this);
mDestroying = true;
- if (SHOW_TRANSACTIONS) Log.i(
+ if (SHOW_TRANSACTIONS) Slog.i(
TAG, " SURFACE " + mSurface + ": HIDE (finishExit)");
try {
mSurface.hide();
} catch (RuntimeException e) {
- Log.w(TAG, "Error hiding surface in " + this, e);
+ Slog.w(TAG, "Error hiding surface in " + this, e);
}
mLastHidden = true;
mKeyWaiter.releasePendingPointerLocked(mSession);
@@ -7693,7 +7693,7 @@
!mWallpaperTarget.mAnimation.getDetachWallpaper()) {
attachedTransformation = mWallpaperTarget.mTransformation;
if (DEBUG_WALLPAPER && attachedTransformation != null) {
- Log.v(TAG, "WP target attached xform: " + attachedTransformation);
+ Slog.v(TAG, "WP target attached xform: " + attachedTransformation);
}
}
if (mWallpaperTarget.mAppToken != null &&
@@ -7702,7 +7702,7 @@
!mWallpaperTarget.mAppToken.animation.getDetachWallpaper()) {
appTransformation = mWallpaperTarget.mAppToken.transformation;
if (DEBUG_WALLPAPER && appTransformation != null) {
- Log.v(TAG, "WP target app xform: " + appTransformation);
+ Slog.v(TAG, "WP target app xform: " + appTransformation);
}
}
}
@@ -7731,7 +7731,7 @@
// (a 2x2 matrix + an offset)
// Here we must not transform the position of the surface
// since it is already included in the transformation.
- //Log.i(TAG, "Transform: " + matrix);
+ //Slog.i(TAG, "Transform: " + matrix);
tmpMatrix.getValues(tmpFloats);
mDsDx = tmpFloats[Matrix.MSCALE_X];
@@ -7754,7 +7754,7 @@
|| (!PixelFormat.formatHasAlpha(mAttrs.format)
|| (isIdentityMatrix(mDsDx, mDtDx, mDsDy, mDtDy)
&& x == frame.left && y == frame.top))) {
- //Log.i(TAG, "Applying alpha transform");
+ //Slog.i(TAG, "Applying alpha transform");
if (selfTransformation) {
mShownAlpha *= mTransformation.getAlpha();
}
@@ -7765,10 +7765,10 @@
mShownAlpha *= appTransformation.getAlpha();
}
} else {
- //Log.i(TAG, "Not applying alpha transform");
+ //Slog.i(TAG, "Not applying alpha transform");
}
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Continuing animation in " + this +
": " + mShownFrame +
", alpha=" + mTransformation.getAlpha());
@@ -7997,7 +7997,7 @@
try {
synchronized(mWindowMap) {
WindowState win = windowForClientLocked(mSession, mClient, false);
- Log.i(TAG, "WIN DEATH: " + win);
+ Slog.i(TAG, "WIN DEATH: " + win);
if (win != null) {
removeWindowLocked(mSession, win);
}
@@ -8362,7 +8362,7 @@
}
public void setAnimation(Animation anim) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Setting animation in " + this + ": " + anim);
animation = anim;
animating = false;
@@ -8384,7 +8384,7 @@
public void setDummyAnimation() {
if (animation == null) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Setting dummy animation in " + this);
animation = sDummyAnimation;
}
@@ -8403,7 +8403,7 @@
for (int i=0; i<N; i++) {
WindowState w = allAppWindows.get(i);
w.mAnimLayer = w.mLayer + adj;
- if (DEBUG_LAYERS) Log.v(TAG, "Updating layer " + w + ": "
+ if (DEBUG_LAYERS) Slog.v(TAG, "Updating layer " + w + ": "
+ w.mAnimLayer);
if (w == mInputMethodTarget) {
setInputMethodAnimLayerAdjustment(adj);
@@ -8423,7 +8423,7 @@
continue;
}
try {
- if (DEBUG_VISIBILITY) Log.v(TAG,
+ if (DEBUG_VISIBILITY) Slog.v(TAG,
"Setting visibility of " + win + ": " + (!clientHidden));
win.mClient.dispatchAppVisibility(!clientHidden);
} catch (RemoteException e) {
@@ -8435,7 +8435,7 @@
final int NW = allAppWindows.size();
for (int i=0; i<NW; i++) {
WindowState w = allAppWindows.get(i);
- if (DEBUG_VISIBILITY) Log.v(TAG,
+ if (DEBUG_VISIBILITY) Slog.v(TAG,
"performing show on: " + w);
w.performShowLocked();
}
@@ -8456,7 +8456,7 @@
if ((allDrawn || animating || startingDisplayed) && animation != null) {
if (!animating) {
- if (DEBUG_ANIM) Log.v(
+ if (DEBUG_ANIM) Slog.v(
TAG, "Starting animation in " + this +
" @ " + currentTime + ": dw=" + dw + " dh=" + dh
+ " scale=" + mTransitionAnimationScale
@@ -8468,7 +8468,7 @@
transformation.clear();
final boolean more = animation.getTransformation(
currentTime, transformation);
- if (DEBUG_ANIM) Log.v(
+ if (DEBUG_ANIM) Slog.v(
TAG, "Stepped animation in " + this +
": more=" + more + ", xform=" + transformation);
if (more) {
@@ -8476,7 +8476,7 @@
hasTransformation = true;
return true;
}
- if (DEBUG_ANIM) Log.v(
+ if (DEBUG_ANIM) Slog.v(
TAG, "Finished animation in " + this +
" @ " + currentTime);
animation = null;
@@ -8500,7 +8500,7 @@
moveInputMethodWindowsIfNeededLocked(true);
}
- if (DEBUG_ANIM) Log.v(
+ if (DEBUG_ANIM) Slog.v(
TAG, "Animation done in " + this
+ ": reportedVisible=" + reportedVisible);
@@ -8528,7 +8528,7 @@
int numVisible = 0;
boolean nowGone = true;
- if (DEBUG_VISIBILITY) Log.v(TAG, "Update reported visibility: " + this);
+ if (DEBUG_VISIBILITY) Slog.v(TAG, "Update reported visibility: " + this);
final int N = allAppWindows.size();
for (int i=0; i<N; i++) {
WindowState win = allAppWindows.get(i);
@@ -8537,11 +8537,11 @@
continue;
}
if (DEBUG_VISIBILITY) {
- Log.v(TAG, "Win " + win + ": isDrawn="
+ Slog.v(TAG, "Win " + win + ": isDrawn="
+ win.isDrawnLw()
+ ", isAnimating=" + win.isAnimating());
if (!win.isDrawnLw()) {
- Log.v(TAG, "Not displayed: s=" + win.mSurface
+ Slog.v(TAG, "Not displayed: s=" + win.mSurface
+ " pv=" + win.mPolicyVisibility
+ " dp=" + win.mDrawPending
+ " cdp=" + win.mCommitDrawPending
@@ -8564,10 +8564,10 @@
}
boolean nowVisible = numInteresting > 0 && numVisible >= numInteresting;
- if (DEBUG_VISIBILITY) Log.v(TAG, "VIS " + this + ": interesting="
+ if (DEBUG_VISIBILITY) Slog.v(TAG, "VIS " + this + ": interesting="
+ numInteresting + " visible=" + numVisible);
if (nowVisible != reportedVisible) {
- if (DEBUG_VISIBILITY) Log.v(
+ if (DEBUG_VISIBILITY) Slog.v(
TAG, "Visibility changed in " + this
+ ": vis=" + nowVisible);
reportedVisible = nowVisible;
@@ -8731,11 +8731,11 @@
return;
}
mLastFocus = newFocus;
- //Log.i(TAG, "Focus moving from " + lastFocus
+ //Slog.i(TAG, "Focus moving from " + lastFocus
// + " to " + newFocus);
if (newFocus != null && lastFocus != null
&& !newFocus.isDisplayedLw()) {
- //Log.i(TAG, "Delaying loss of focus...");
+ //Slog.i(TAG, "Delaying loss of focus...");
mLosingFocus.add(lastFocus);
lastFocus = null;
}
@@ -8746,7 +8746,7 @@
// + " to " + newFocus);
if (newFocus != null) {
try {
- //Log.i(TAG, "Gaining focus: " + newFocus);
+ //Slog.i(TAG, "Gaining focus: " + newFocus);
newFocus.mClient.windowFocusChanged(true, mInTouchMode);
} catch (RemoteException e) {
// Ignore if process has died.
@@ -8755,7 +8755,7 @@
if (lastFocus != null) {
try {
- //Log.i(TAG, "Losing focus: " + lastFocus);
+ //Slog.i(TAG, "Losing focus: " + lastFocus);
lastFocus.mClient.windowFocusChanged(false, mInTouchMode);
} catch (RemoteException e) {
// Ignore if process has died.
@@ -8775,7 +8775,7 @@
final int N = losers.size();
for (int i=0; i<N; i++) {
try {
- //Log.i(TAG, "Losing delayed focus: " + losers.get(i));
+ //Slog.i(TAG, "Losing delayed focus: " + losers.get(i));
losers.get(i).mClient.windowFocusChanged(false, mInTouchMode);
} catch (RemoteException e) {
// Ignore if process has died.
@@ -8799,7 +8799,7 @@
return;
}
- if (DEBUG_STARTING_WINDOW) Log.v(TAG, "Add starting "
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG, "Add starting "
+ wtoken + ": pkg=" + sd.pkg);
View view = null;
@@ -8809,7 +8809,7 @@
sd.theme, sd.nonLocalizedLabel, sd.labelRes,
sd.icon);
} catch (Exception e) {
- Log.w(TAG, "Exception when adding starting window", e);
+ Slog.w(TAG, "Exception when adding starting window", e);
}
if (view != null) {
@@ -8820,7 +8820,7 @@
// If the window was successfully added, then
// we need to remove it.
if (wtoken.startingWindow != null) {
- if (DEBUG_STARTING_WINDOW) Log.v(TAG,
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG,
"Aborted starting " + wtoken
+ ": removed=" + wtoken.removed
+ " startingData=" + wtoken.startingData);
@@ -8831,7 +8831,7 @@
} else {
wtoken.startingView = view;
}
- if (DEBUG_STARTING_WINDOW && !abort) Log.v(TAG,
+ if (DEBUG_STARTING_WINDOW && !abort) Slog.v(TAG,
"Added starting " + wtoken
+ ": startingWindow="
+ wtoken.startingWindow + " startingView="
@@ -8842,7 +8842,7 @@
try {
mPolicy.removeStartingWindow(wtoken.token, view);
} catch (Exception e) {
- Log.w(TAG, "Exception when removing starting window", e);
+ Slog.w(TAG, "Exception when removing starting window", e);
}
}
}
@@ -8853,7 +8853,7 @@
IBinder token = null;
View view = null;
synchronized (mWindowMap) {
- if (DEBUG_STARTING_WINDOW) Log.v(TAG, "Remove starting "
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG, "Remove starting "
+ wtoken + ": startingWindow="
+ wtoken.startingWindow + " startingView="
+ wtoken.startingView);
@@ -8869,7 +8869,7 @@
try {
mPolicy.removeStartingWindow(token, view);
} catch (Exception e) {
- Log.w(TAG, "Exception when removing starting window", e);
+ Slog.w(TAG, "Exception when removing starting window", e);
}
}
} break;
@@ -8885,7 +8885,7 @@
}
AppWindowToken wtoken = mFinishedStarting.remove(N-1);
- if (DEBUG_STARTING_WINDOW) Log.v(TAG,
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG,
"Finished starting " + wtoken
+ ": startingWindow=" + wtoken.startingWindow
+ " startingView=" + wtoken.startingView);
@@ -8904,7 +8904,7 @@
try {
mPolicy.removeStartingWindow(token, view);
} catch (Exception e) {
- Log.w(TAG, "Exception when removing starting window", e);
+ Slog.w(TAG, "Exception when removing starting window", e);
}
}
} break;
@@ -8916,7 +8916,7 @@
boolean nowGone = msg.arg2 != 0;
try {
- if (DEBUG_VISIBILITY) Log.v(
+ if (DEBUG_VISIBILITY) Slog.v(
TAG, "Reporting visible in " + wtoken
+ " visible=" + nowVisible
+ " gone=" + nowGone);
@@ -8931,14 +8931,14 @@
case WINDOW_FREEZE_TIMEOUT: {
synchronized (mWindowMap) {
- Log.w(TAG, "Window freeze timeout expired.");
+ Slog.w(TAG, "Window freeze timeout expired.");
int i = mWindows.size();
while (i > 0) {
i--;
WindowState w = (WindowState)mWindows.get(i);
if (w.mOrientationChanging) {
w.mOrientationChanging = false;
- Log.w(TAG, "Force clearing orientation change: " + w);
+ Slog.w(TAG, "Force clearing orientation change: " + w);
}
}
performLayoutAndPlaceSurfacesLocked();
@@ -8976,7 +8976,7 @@
case APP_TRANSITION_TIMEOUT: {
synchronized (mWindowMap) {
if (mNextAppTransition != WindowManagerPolicy.TRANSIT_UNSET) {
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"*** APP TRANSITION TIMEOUT");
mAppTransitionReady = true;
mAppTransitionTimeout = true;
@@ -9021,13 +9021,13 @@
case APP_FREEZE_TIMEOUT: {
synchronized (mWindowMap) {
- Log.w(TAG, "App freeze timeout expired.");
+ Slog.w(TAG, "App freeze timeout expired.");
int i = mAppTokens.size();
while (i > 0) {
i--;
AppWindowToken tok = mAppTokens.get(i);
if (tok.freezingScreen) {
- Log.w(TAG, "Force clearing freeze: " + tok);
+ Slog.w(TAG, "Force clearing freeze: " + tok);
unsetAppFreezingScreenLocked(tok, true, true);
}
}
@@ -9087,7 +9087,7 @@
final WindowState windowForClientLocked(Session session, IBinder client,
boolean throwOnError) {
WindowState win = mWindowMap.get(client);
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Looking up client " + client + ": " + win);
if (win == null) {
RuntimeException ex = new IllegalArgumentException(
@@ -9095,7 +9095,7 @@
if (throwOnError) {
throw ex;
}
- Log.w(TAG, "Failed looking up window", ex);
+ Slog.w(TAG, "Failed looking up window", ex);
return null;
}
if (session != null && win.mSession != session) {
@@ -9105,7 +9105,7 @@
if (throwOnError) {
throw ex;
}
- Log.w(TAG, "Failed looking up window", ex);
+ Slog.w(TAG, "Failed looking up window", ex);
return null;
}
@@ -9124,7 +9124,7 @@
WindowState w = (WindowState)mWindows.get(i);
if (w.mAppToken != null) {
WindowState win = (WindowState)mWindows.remove(i);
- if (DEBUG_WINDOW_MOVEMENT) Log.v(TAG,
+ if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG,
"Rebuild removing window: " + win);
NW--;
numRemoved++;
@@ -9158,7 +9158,7 @@
i -= lastWallpaper;
if (i != numRemoved) {
- Log.w(TAG, "Rebuild removed " + numRemoved
+ Slog.w(TAG, "Rebuild removed " + numRemoved
+ " windows but added " + i);
}
}
@@ -9191,7 +9191,7 @@
} else if (w.mIsWallpaper) {
w.mAnimLayer += mWallpaperAnimLayerAdjustment;
}
- if (DEBUG_LAYERS) Log.v(TAG, "Assign layer " + w + ": "
+ if (DEBUG_LAYERS) Slog.v(TAG, "Assign layer " + w + ": "
+ w.mAnimLayer);
//System.out.println(
// "Assigned layer " + curLayer + " to " + w.mClient.asBinder());
@@ -9204,7 +9204,7 @@
if (DEBUG) {
throw new RuntimeException("Recursive call!");
}
- Log.w(TAG, "performLayoutAndPlaceSurfacesLocked called while in layout");
+ Slog.w(TAG, "performLayoutAndPlaceSurfacesLocked called while in layout");
return;
}
@@ -9221,11 +9221,11 @@
// Wait a little it for things to settle down, and off we go.
for (int i=0; i<mForceRemoves.size(); i++) {
WindowState ws = mForceRemoves.get(i);
- Log.i(TAG, "Force removing: " + ws);
+ Slog.i(TAG, "Force removing: " + ws);
removeWindowInnerLocked(ws.mSession, ws);
}
mForceRemoves = null;
- Log.w(TAG, "Due to memory failure, waiting a bit for next layout");
+ Slog.w(TAG, "Due to memory failure, waiting a bit for next layout");
Object tmp = new Object();
synchronized (tmp) {
try {
@@ -9261,7 +9261,7 @@
}
} catch (RuntimeException e) {
mInLayout = false;
- Log.e(TAG, "Unhandled exception while layout out windows", e);
+ Slog.e(TAG, "Unhandled exception while layout out windows", e);
}
}
@@ -9273,7 +9273,7 @@
int repeats = 0;
int i;
- if (DEBUG_LAYOUT) Log.v(TAG, "performLayout: needed="
+ if (DEBUG_LAYOUT) Slog.v(TAG, "performLayout: needed="
+ mLayoutNeeded + " dw=" + dw + " dh=" + dh);
// FIRST LOOP: Perform a layout, if needed.
@@ -9303,10 +9303,10 @@
|| win.mExiting || win.mDestroying;
if (!win.mLayoutAttached) {
- if (DEBUG_LAYOUT) Log.v(TAG, "First pass " + win
+ if (DEBUG_LAYOUT) Slog.v(TAG, "First pass " + win
+ ": gone=" + gone + " mHaveFrame=" + win.mHaveFrame
+ " mLayoutAttached=" + win.mLayoutAttached);
- if (DEBUG_LAYOUT && gone) Log.v(TAG, " (mViewVisibility="
+ if (DEBUG_LAYOUT && gone) Slog.v(TAG, " (mViewVisibility="
+ win.mViewVisibility + " mRelayoutCalled="
+ win.mRelayoutCalled + " hidden="
+ win.mRootToken.hidden + " hiddenRequested="
@@ -9323,7 +9323,7 @@
if (!win.mLayoutAttached) {
mPolicy.layoutWindowLw(win, win.mAttrs, null);
win.mLayoutSeq = seq;
- if (DEBUG_LAYOUT) Log.v(TAG, "-> mFrame="
+ if (DEBUG_LAYOUT) Slog.v(TAG, "-> mFrame="
+ win.mFrame + " mContainingFrame="
+ win.mContainingFrame + " mDisplayFrame="
+ win.mDisplayFrame);
@@ -9346,7 +9346,7 @@
// windows, since that means "perform layout as normal,
// just don't display").
if (win.mLayoutAttached) {
- if (DEBUG_LAYOUT) Log.v(TAG, "Second pass " + win
+ if (DEBUG_LAYOUT) Slog.v(TAG, "Second pass " + win
+ " mHaveFrame=" + win.mHaveFrame
+ " mViewVisibility=" + win.mViewVisibility
+ " mRelayoutCalled=" + win.mRelayoutCalled);
@@ -9354,7 +9354,7 @@
|| !win.mHaveFrame) {
mPolicy.layoutWindowLw(win, win.mAttrs, win.mAttachedWindow);
win.mLayoutSeq = seq;
- if (DEBUG_LAYOUT) Log.v(TAG, "-> mFrame="
+ if (DEBUG_LAYOUT) Slog.v(TAG, "-> mFrame="
+ win.mFrame + " mContainingFrame="
+ win.mContainingFrame + " mDisplayFrame="
+ win.mDisplayFrame);
@@ -9371,7 +9371,7 @@
if (changes == 0) {
mLayoutNeeded = false;
} else if (repeats > 2) {
- Log.w(TAG, "Layout repeat aborted after too many iterations");
+ Slog.w(TAG, "Layout repeat aborted after too many iterations");
mLayoutNeeded = false;
if ((changes&WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG) != 0) {
if (updateOrientationFromAppTokensLocked()) {
@@ -9379,11 +9379,11 @@
}
}
} else {
- if (DEBUG_LAYOUT) Log.v(TAG, "Repeating layout because changes=0x"
+ if (DEBUG_LAYOUT) Slog.v(TAG, "Repeating layout because changes=0x"
+ Integer.toHexString(changes));
repeats++;
if ((changes&WindowManagerPolicy.FINISH_LAYOUT_REDO_CONFIG) != 0) {
- if (DEBUG_LAYOUT) Log.v(TAG, "Computing new config from layout");
+ if (DEBUG_LAYOUT) Slog.v(TAG, "Computing new config from layout");
if (updateOrientationFromAppTokensLocked()) {
mH.sendEmptyMessage(H.SEND_NEW_CONFIGURATION);
}
@@ -9407,7 +9407,7 @@
mFxSession = new SurfaceSession();
}
- if (SHOW_TRANSACTIONS) Log.i(TAG, ">>> OPEN TRANSACTION");
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION");
// Initialize state of exiting tokens.
for (i=mExitingTokens.size()-1; i>=0; i--) {
@@ -9452,7 +9452,7 @@
}
}
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG, "*** ANIM STEP: seq="
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "*** ANIM STEP: seq="
+ transactionSequence + " tokensAnimating="
+ tokensAnimating);
@@ -9477,7 +9477,7 @@
if (w.commitFinishDrawingLocked(currentTime)) {
if ((w.mAttrs.flags
& WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER) != 0) {
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"First draw done in potential wallpaper target " + w);
wallpaperMayChange = true;
}
@@ -9537,11 +9537,11 @@
== WindowManager.LayoutParams.TYPE_BASE_APPLICATION)
&& !w.mExiting && !w.mDestroying) {
if (DEBUG_VISIBILITY || DEBUG_ORIENTATION) {
- Log.v(TAG, "Eval win " + w + ": isDrawn="
+ Slog.v(TAG, "Eval win " + w + ": isDrawn="
+ w.isDrawnLw()
+ ", isAnimating=" + w.isAnimating());
if (!w.isDrawnLw()) {
- Log.v(TAG, "Not displayed: s=" + w.mSurface
+ Slog.v(TAG, "Not displayed: s=" + w.mSurface
+ " pv=" + w.mPolicyVisibility
+ " dp=" + w.mDrawPending
+ " cdp=" + w.mCommitDrawPending
@@ -9555,7 +9555,7 @@
atoken.numInterestingWindows++;
if (w.isDrawnLw()) {
atoken.numDrawnWindows++;
- if (DEBUG_VISIBILITY || DEBUG_ORIENTATION) Log.v(TAG,
+ if (DEBUG_VISIBILITY || DEBUG_ORIENTATION) Slog.v(TAG,
"tokenMayBeDrawn: " + atoken
+ " freezingScreen=" + atoken.freezingScreen
+ " mAppFreezing=" + w.mAppFreezing);
@@ -9587,7 +9587,7 @@
if (wtoken.freezingScreen) {
int numInteresting = wtoken.numInterestingWindows;
if (numInteresting > 0 && wtoken.numDrawnWindows >= numInteresting) {
- if (DEBUG_VISIBILITY) Log.v(TAG,
+ if (DEBUG_VISIBILITY) Slog.v(TAG,
"allDrawn: " + wtoken
+ " interesting=" + numInteresting
+ " drawn=" + wtoken.numDrawnWindows);
@@ -9598,7 +9598,7 @@
} else if (!wtoken.allDrawn) {
int numInteresting = wtoken.numInterestingWindows;
if (numInteresting > 0 && wtoken.numDrawnWindows >= numInteresting) {
- if (DEBUG_VISIBILITY) Log.v(TAG,
+ if (DEBUG_VISIBILITY) Slog.v(TAG,
"allDrawn: " + wtoken
+ " interesting=" + numInteresting
+ " drawn=" + wtoken.numDrawnWindows);
@@ -9620,7 +9620,7 @@
if (mAppTransitionReady) {
int NN = mOpeningApps.size();
boolean goodToGo = true;
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"Checking " + NN + " opening apps (frozen="
+ mDisplayFrozen + " timeout="
+ mAppTransitionTimeout + ")...");
@@ -9630,7 +9630,7 @@
// we'll unfreeze the display when everyone is ready.
for (i=0; i<NN && goodToGo; i++) {
AppWindowToken wtoken = mOpeningApps.get(i);
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"Check opening app" + wtoken + ": allDrawn="
+ wtoken.allDrawn + " startingDisplayed="
+ wtoken.startingDisplayed);
@@ -9641,7 +9641,7 @@
}
}
if (goodToGo) {
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG, "**** GOOD TO GO");
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "**** GOOD TO GO");
int transit = mNextAppTransition;
if (mSkipAppTransitionAnimation) {
transit = WindowManagerPolicy.TRANSIT_UNSET;
@@ -9683,7 +9683,7 @@
AppWindowToken animToken = null;
int bestAnimLayer = -1;
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"New wallpaper target=" + mWallpaperTarget
+ ", lower target=" + mLowerWallpaperTarget
+ ", upper target=" + mUpperWallpaperTarget);
@@ -9735,7 +9735,7 @@
}
if (foundWallpapers == 3) {
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"Wallpaper animation!");
switch (transit) {
case WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN:
@@ -9749,19 +9749,19 @@
transit = WindowManagerPolicy.TRANSIT_WALLPAPER_INTRA_CLOSE;
break;
}
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"New transit: " + transit);
} else if (oldWallpaper != null) {
// We are transitioning from an activity with
// a wallpaper to one without.
transit = WindowManagerPolicy.TRANSIT_WALLPAPER_CLOSE;
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"New transit away from wallpaper: " + transit);
} else if (mWallpaperTarget != null) {
// We are transitioning from an activity without
// a wallpaper to now showing the wallpaper
transit = WindowManagerPolicy.TRANSIT_WALLPAPER_OPEN;
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"New transit into wallpaper: " + transit);
}
@@ -9785,7 +9785,7 @@
NN = mOpeningApps.size();
for (i=0; i<NN; i++) {
AppWindowToken wtoken = mOpeningApps.get(i);
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"Now opening app" + wtoken);
wtoken.reportedVisible = false;
wtoken.inPendingTransaction = false;
@@ -9798,7 +9798,7 @@
NN = mClosingApps.size();
for (i=0; i<NN; i++) {
AppWindowToken wtoken = mClosingApps.get(i);
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG,
"Now closing app" + wtoken);
wtoken.inPendingTransaction = false;
wtoken.animation = null;
@@ -9864,10 +9864,10 @@
WindowState oldWallpaper = mWallpaperTarget;
if (mLowerWallpaperTarget != null
&& mLowerWallpaperTarget.mAppToken != null) {
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"wallpaperForceHiding changed with lower="
+ mLowerWallpaperTarget);
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"hidden=" + mLowerWallpaperTarget.mAppToken.hidden +
" hiddenRequested=" + mLowerWallpaperTarget.mAppToken.hiddenRequested);
if (mLowerWallpaperTarget.mAppToken.hidden) {
@@ -9881,7 +9881,7 @@
adjResult = adjustWallpaperWindowsLocked();
wallpaperMayChange = false;
wallpaperForceHidingChanged = false;
- if (DEBUG_WALLPAPER) Log.v(TAG, "****** OLD: " + oldWallpaper
+ if (DEBUG_WALLPAPER) Slog.v(TAG, "****** OLD: " + oldWallpaper
+ " NEW: " + mWallpaperTarget
+ " LOWER: " + mLowerWallpaperTarget);
if (mLowerWallpaperTarget == null) {
@@ -9893,7 +9893,7 @@
if (w.mSurface != null) {
final WindowManager.LayoutParams attrs = w.mAttrs;
if (mPolicy.doesForceHide(w, attrs) && w.isVisibleLw()) {
- if (DEBUG_FOCUS) Log.i(TAG, "win=" + w + " force hides other windows");
+ if (DEBUG_FOCUS) Slog.i(TAG, "win=" + w + " force hides other windows");
forceHiding = true;
} else if (mPolicy.canBeForceHidden(w, attrs)) {
if (!w.mAnimating) {
@@ -9908,19 +9908,19 @@
}
if (wallpaperMayChange) {
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"Wallpaper may change! Adjusting");
adjResult = adjustWallpaperWindowsLocked();
}
if ((adjResult&ADJUST_WALLPAPER_LAYERS_CHANGED) != 0) {
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"Wallpaper layer changed: assigning layers + relayout");
restart = true;
mLayoutNeeded = true;
assignLayersLocked();
} else if ((adjResult&ADJUST_WALLPAPER_VISIBILITY_CHANGED) != 0) {
- if (DEBUG_WALLPAPER) Log.v(TAG,
+ if (DEBUG_WALLPAPER) Slog.v(TAG,
"Wallpaper visibility changed: relayout");
restart = true;
mLayoutNeeded = true;
@@ -9938,7 +9938,7 @@
performLayoutLockedInner();
}
- if (DEBUG_APP_TRANSITIONS) Log.v(TAG, "*** ANIM STEP: restart="
+ if (DEBUG_APP_TRANSITIONS) Slog.v(TAG, "*** ANIM STEP: restart="
+ restart);
} while (restart);
@@ -9965,7 +9965,7 @@
if (w.mSurface != null) {
w.computeShownFrameLocked();
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Placing surface #" + i + " " + w.mSurface
+ ": new=" + w.mShownFrame + ", old="
+ w.mLastShownFrame);
@@ -9983,13 +9983,13 @@
w.mLastRequestedHeight = height;
w.mLastShownFrame.set(w.mShownFrame);
try {
- if (SHOW_TRANSACTIONS) Log.i(
+ if (SHOW_TRANSACTIONS) Slog.i(
TAG, " SURFACE " + w.mSurface
+ ": POS " + w.mShownFrame.left
+ ", " + w.mShownFrame.top);
w.mSurface.setPosition(w.mShownFrame.left, w.mShownFrame.top);
} catch (RuntimeException e) {
- Log.w(TAG, "Error positioning surface in " + w, e);
+ Slog.w(TAG, "Error positioning surface in " + w, e);
if (!recoveringMemory) {
reclaimSomeSurfaceMemoryLocked(w, "position");
}
@@ -10006,7 +10006,7 @@
if (height < 1) height = 1;
if (w.mSurface != null) {
try {
- if (SHOW_TRANSACTIONS) Log.i(
+ if (SHOW_TRANSACTIONS) Slog.i(
TAG, " SURFACE " + w.mSurface + ": POS "
+ w.mShownFrame.left + ","
+ w.mShownFrame.top + " SIZE "
@@ -10019,7 +10019,7 @@
// If something goes wrong with the surface (such
// as running out of memory), don't take down the
// entire system.
- Log.e(TAG, "Failure updating surface of " + w
+ Slog.e(TAG, "Failure updating surface of " + w
+ "size=(" + width + "x" + height
+ "), pos=(" + w.mShownFrame.left
+ "," + w.mShownFrame.top + ")", e);
@@ -10038,7 +10038,7 @@
w.mConfiguration != mCurConfiguration
&& (w.mConfiguration == null
|| mCurConfiguration.diff(w.mConfiguration) != 0);
- if (localLOGV) Log.v(TAG, "Resizing " + w
+ if (localLOGV) Slog.v(TAG, "Resizing " + w
+ ": configChanged=" + configChanged
+ " last=" + w.mLastFrame + " frame=" + w.mFrame);
if (!w.mLastFrame.equals(w.mFrame)
@@ -10052,7 +10052,7 @@
// it frozen until this window draws at its new
// orientation.
if (mDisplayFrozen) {
- if (DEBUG_ORIENTATION) Log.v(TAG,
+ if (DEBUG_ORIENTATION) Slog.v(TAG,
"Resizing while display frozen: " + w);
w.mOrientationChanging = true;
if (!mWindowsFreezingScreen) {
@@ -10070,7 +10070,7 @@
// to go through the process of getting informed
// by the application when it has finished drawing.
if (w.mOrientationChanging) {
- if (DEBUG_ORIENTATION) Log.v(TAG,
+ if (DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation start waiting for draw in "
+ w + ", surface " + w.mSurface);
w.mDrawPending = true;
@@ -10080,12 +10080,12 @@
w.mAppToken.allDrawn = false;
}
}
- if (DEBUG_ORIENTATION) Log.v(TAG,
+ if (DEBUG_ORIENTATION) Slog.v(TAG,
"Resizing window " + w + " to " + w.mFrame);
mResizingWindows.add(w);
} else if (w.mOrientationChanging) {
if (!w.mDrawPending && !w.mCommitDrawPending) {
- if (DEBUG_ORIENTATION) Log.v(TAG,
+ if (DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation not waiting for draw in "
+ w + ", surface " + w.mSurface);
w.mOrientationChanging = false;
@@ -10097,13 +10097,13 @@
if (!w.mLastHidden) {
//dump();
w.mLastHidden = true;
- if (SHOW_TRANSACTIONS) Log.i(
+ if (SHOW_TRANSACTIONS) Slog.i(
TAG, " SURFACE " + w.mSurface + ": HIDE (performLayout)");
if (w.mSurface != null) {
try {
w.mSurface.hide();
} catch (RuntimeException e) {
- Log.w(TAG, "Exception hiding surface in " + w);
+ Slog.w(TAG, "Exception hiding surface in " + w);
}
}
mKeyWaiter.releasePendingPointerLocked(w.mSession);
@@ -10116,7 +10116,7 @@
// new orientation.
if (w.mOrientationChanging) {
w.mOrientationChanging = false;
- if (DEBUG_ORIENTATION) Log.v(TAG,
+ if (DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation change skips hidden " + w);
}
} else if (w.mLastLayer != w.mAnimLayer
@@ -10137,7 +10137,7 @@
w.mLastDtDy = w.mDtDy;
w.mLastHScale = w.mHScale;
w.mLastVScale = w.mVScale;
- if (SHOW_TRANSACTIONS) Log.i(
+ if (SHOW_TRANSACTIONS) Slog.i(
TAG, " SURFACE " + w.mSurface + ": alpha="
+ w.mShownAlpha + " layer=" + w.mAnimLayer
+ " matrix=[" + (w.mDsDx*w.mHScale)
@@ -10152,7 +10152,7 @@
w.mDsDx*w.mHScale, w.mDtDx*w.mVScale,
w.mDsDy*w.mHScale, w.mDtDy*w.mVScale);
} catch (RuntimeException e) {
- Log.w(TAG, "Error updating surface in " + w, e);
+ Slog.w(TAG, "Error updating surface in " + w, e);
if (!recoveringMemory) {
reclaimSomeSurfaceMemoryLocked(w, "update");
}
@@ -10162,9 +10162,9 @@
if (w.mLastHidden && !w.mDrawPending
&& !w.mCommitDrawPending
&& !w.mReadyToShow) {
- if (SHOW_TRANSACTIONS) Log.i(
+ if (SHOW_TRANSACTIONS) Slog.i(
TAG, " SURFACE " + w.mSurface + ": SHOW (performLayout)");
- if (DEBUG_VISIBILITY) Log.v(TAG, "Showing " + w
+ if (DEBUG_VISIBILITY) Slog.v(TAG, "Showing " + w
+ " during relayout");
if (showSurfaceRobustlyLocked(w)) {
w.mHasDrawn = true;
@@ -10190,18 +10190,18 @@
if (w.mOrientationChanging) {
if (w.mDrawPending || w.mCommitDrawPending) {
orientationChangeComplete = false;
- if (DEBUG_ORIENTATION) Log.v(TAG,
+ if (DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation continue waiting for draw in " + w);
} else {
w.mOrientationChanging = false;
- if (DEBUG_ORIENTATION) Log.v(TAG,
+ if (DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation change complete in " + w);
}
}
w.mToken.hasVisible = true;
}
} else if (w.mOrientationChanging) {
- if (DEBUG_ORIENTATION) Log.v(TAG,
+ if (DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation change skips hidden " + w);
w.mOrientationChanging = false;
}
@@ -10242,7 +10242,7 @@
// performance reasons).
obscured = true;
} else if (opaqueDrawn && w.needsBackgroundFiller(dw, dh)) {
- if (SHOW_TRANSACTIONS) Log.d(TAG, "showing background filler");
+ if (SHOW_TRANSACTIONS) Slog.d(TAG, "showing background filler");
// This window is in compatibility mode, and needs background filler.
obscured = true;
if (mBackgroundFillerSurface == null) {
@@ -10252,7 +10252,7 @@
PixelFormat.OPAQUE,
Surface.FX_SURFACE_NORMAL);
} catch (Exception e) {
- Log.e(TAG, "Exception creating filler surface", e);
+ Slog.e(TAG, "Exception creating filler surface", e);
}
}
try {
@@ -10263,19 +10263,19 @@
mBackgroundFillerSurface.setLayer(w.mAnimLayer - 1);
mBackgroundFillerSurface.show();
} catch (RuntimeException e) {
- Log.e(TAG, "Exception showing filler surface");
+ Slog.e(TAG, "Exception showing filler surface");
}
backgroundFillerShown = true;
mBackgroundFillerShown = true;
} else if (canBeSeen && !obscured &&
(attrFlags&FLAG_BLUR_BEHIND|FLAG_DIM_BEHIND) != 0) {
- if (localLOGV) Log.v(TAG, "Win " + w
+ if (localLOGV) Slog.v(TAG, "Win " + w
+ ": blurring=" + blurring
+ " obscured=" + obscured
+ " displayed=" + displayed);
if ((attrFlags&FLAG_DIM_BEHIND) != 0) {
if (!dimming) {
- //Log.i(TAG, "DIM BEHIND: " + w);
+ //Slog.i(TAG, "DIM BEHIND: " + w);
dimming = true;
if (mDimAnimator == null) {
mDimAnimator = new DimAnimator(mFxSession);
@@ -10286,11 +10286,11 @@
}
if ((attrFlags&FLAG_BLUR_BEHIND) != 0) {
if (!blurring) {
- //Log.i(TAG, "BLUR BEHIND: " + w);
+ //Slog.i(TAG, "BLUR BEHIND: " + w);
blurring = true;
mBlurShown = true;
if (mBlurSurface == null) {
- if (SHOW_TRANSACTIONS) Log.i(TAG, " BLUR "
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " BLUR "
+ mBlurSurface + ": CREATE");
try {
mBlurSurface = new Surface(mFxSession, 0,
@@ -10298,10 +10298,10 @@
PixelFormat.OPAQUE,
Surface.FX_SURFACE_BLUR);
} catch (Exception e) {
- Log.e(TAG, "Exception creating Blur surface", e);
+ Slog.e(TAG, "Exception creating Blur surface", e);
}
}
- if (SHOW_TRANSACTIONS) Log.i(TAG, " BLUR "
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " BLUR "
+ mBlurSurface + ": SHOW pos=(0,0) (" +
dw + "x" + dh + "), layer=" + (w.mAnimLayer-1));
if (mBlurSurface != null) {
@@ -10310,7 +10310,7 @@
try {
mBlurSurface.show();
} catch (RuntimeException e) {
- Log.w(TAG, "Failure showing blur surface", e);
+ Slog.w(TAG, "Failure showing blur surface", e);
}
}
}
@@ -10329,11 +10329,11 @@
if (backgroundFillerShown == false && mBackgroundFillerShown) {
mBackgroundFillerShown = false;
- if (SHOW_TRANSACTIONS) Log.d(TAG, "hiding background filler");
+ if (SHOW_TRANSACTIONS) Slog.d(TAG, "hiding background filler");
try {
mBackgroundFillerSurface.hide();
} catch (RuntimeException e) {
- Log.e(TAG, "Exception hiding filler surface", e);
+ Slog.e(TAG, "Exception hiding filler surface", e);
}
}
@@ -10343,24 +10343,24 @@
}
if (!blurring && mBlurShown) {
- if (SHOW_TRANSACTIONS) Log.i(TAG, " BLUR " + mBlurSurface
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " BLUR " + mBlurSurface
+ ": HIDE");
try {
mBlurSurface.hide();
} catch (IllegalArgumentException e) {
- Log.w(TAG, "Illegal argument exception hiding blur surface");
+ Slog.w(TAG, "Illegal argument exception hiding blur surface");
}
mBlurShown = false;
}
- if (SHOW_TRANSACTIONS) Log.i(TAG, "<<< CLOSE TRANSACTION");
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION");
} catch (RuntimeException e) {
- Log.e(TAG, "Unhandled exception in Window Manager", e);
+ Slog.e(TAG, "Unhandled exception in Window Manager", e);
}
Surface.closeTransaction();
- if (DEBUG_ORIENTATION && mDisplayFrozen) Log.v(TAG,
+ if (DEBUG_ORIENTATION && mDisplayFrozen) Slog.v(TAG,
"With display frozen, orientationChangeComplete="
+ orientationChangeComplete);
if (orientationChangeComplete) {
@@ -10377,7 +10377,7 @@
i--;
WindowState win = mResizingWindows.get(i);
try {
- if (DEBUG_ORIENTATION) Log.v(TAG, "Reporting new frame to "
+ if (DEBUG_ORIENTATION) Slog.v(TAG, "Reporting new frame to "
+ win + ": " + win.mFrame);
boolean configChanged =
win.mConfiguration != mCurConfiguration
@@ -10385,7 +10385,7 @@
|| mCurConfiguration.diff(win.mConfiguration) != 0);
win.mConfiguration = mCurConfiguration;
if (DEBUG_ORIENTATION && configChanged) {
- Log.i(TAG, "Sending new config to window " + win + ": "
+ Slog.i(TAG, "Sending new config to window " + win + ": "
+ win.mFrame.width() + "x" + win.mFrame.height()
+ " / " + win.mConfiguration);
}
@@ -10533,7 +10533,7 @@
}
return true;
} catch (RuntimeException e) {
- Log.w(TAG, "Failure showing surface " + win.mSurface + " in " + win);
+ Slog.w(TAG, "Failure showing surface " + win.mSurface + " in " + win);
}
reclaimSomeSurfaceMemoryLocked(win, "show");
@@ -10558,12 +10558,12 @@
// around.
int N = mWindows.size();
boolean leakedSurface = false;
- Log.i(TAG, "Out of memory for surface! Looking for leaks...");
+ Slog.i(TAG, "Out of memory for surface! Looking for leaks...");
for (int i=0; i<N; i++) {
WindowState ws = (WindowState)mWindows.get(i);
if (ws.mSurface != null) {
if (!mSessions.contains(ws.mSession)) {
- Log.w(TAG, "LEAKED SURFACE (session doesn't exist): "
+ Slog.w(TAG, "LEAKED SURFACE (session doesn't exist): "
+ ws + " surface=" + ws.mSurface
+ " token=" + win.mToken
+ " pid=" + ws.mSession.mPid
@@ -10575,7 +10575,7 @@
N--;
leakedSurface = true;
} else if (win.mAppToken != null && win.mAppToken.clientHidden) {
- Log.w(TAG, "LEAKED SURFACE (app token hidden): "
+ Slog.w(TAG, "LEAKED SURFACE (app token hidden): "
+ ws + " surface=" + ws.mSurface
+ " token=" + win.mAppToken);
ws.mSurface.destroy();
@@ -10587,7 +10587,7 @@
boolean killedApps = false;
if (!leakedSurface) {
- Log.w(TAG, "No leaked surfaces; killing applicatons!");
+ Slog.w(TAG, "No leaked surfaces; killing applicatons!");
SparseIntArray pidCandidates = new SparseIntArray();
for (int i=0; i<N; i++) {
WindowState ws = (WindowState)mWindows.get(i);
@@ -10612,7 +10612,7 @@
if (leakedSurface || killedApps) {
// We managed to reclaim some memory, so get rid of the trouble
// surface and ask the app to request another one.
- Log.w(TAG, "Looks like we have reclaimed some memory, clearing surface for retry.");
+ Slog.w(TAG, "Looks like we have reclaimed some memory, clearing surface for retry.");
if (surface != null) {
surface.destroy();
win.mSurface = null;
@@ -10635,7 +10635,7 @@
// change message pending.
mH.removeMessages(H.REPORT_FOCUS_CHANGE);
mH.sendEmptyMessage(H.REPORT_FOCUS_CHANGE);
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Changing focus from " + mCurrentFocus + " to " + newFocus);
final WindowState oldFocus = mCurrentFocus;
mCurrentFocus = newFocus;
@@ -10677,7 +10677,7 @@
while (i >= 0) {
win = (WindowState)mWindows.get(i);
- if (localLOGV || DEBUG_FOCUS) Log.v(
+ if (localLOGV || DEBUG_FOCUS) Slog.v(
TAG, "Looking for focus: " + i
+ " = " + win
+ ", flags=" + win.mAttrs.flags
@@ -10701,7 +10701,7 @@
if (nextApp == mFocusedApp) {
// Whoops, we are below the focused app... no focus
// for you!
- if (localLOGV || DEBUG_FOCUS) Log.v(
+ if (localLOGV || DEBUG_FOCUS) Slog.v(
TAG, "Reached focused app: " + mFocusedApp);
return null;
}
@@ -10722,7 +10722,7 @@
// Dispatch to this window if it is wants key events.
if (win.canReceiveKeys()) {
- if (DEBUG_FOCUS) Log.v(
+ if (DEBUG_FOCUS) Slog.v(
TAG, "Found focus @ " + i + " = " + win);
result = win;
break;
@@ -10751,10 +10751,10 @@
mScreenFrozenLock.acquire();
long now = SystemClock.uptimeMillis();
- //Log.i(TAG, "Freezing, gc pending: " + mFreezeGcPending + ", now " + now);
+ //Slog.i(TAG, "Freezing, gc pending: " + mFreezeGcPending + ", now " + now);
if (mFreezeGcPending != 0) {
if (now > (mFreezeGcPending+1000)) {
- //Log.i(TAG, "Gc! " + now + " > " + (mFreezeGcPending+1000));
+ //Slog.i(TAG, "Gc! " + now + " > " + (mFreezeGcPending+1000));
mH.removeMessages(H.FORCE_GC);
Runtime.getRuntime().gc();
mFreezeGcPending = now;
@@ -11070,13 +11070,13 @@
DimAnimator (SurfaceSession session) {
if (mDimSurface == null) {
- if (SHOW_TRANSACTIONS) Log.i(TAG, " DIM "
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " DIM "
+ mDimSurface + ": CREATE");
try {
mDimSurface = new Surface(session, 0, -1, 16, 16, PixelFormat.OPAQUE,
Surface.FX_SURFACE_DIM);
} catch (Exception e) {
- Log.e(TAG, "Exception creating Dim surface", e);
+ Slog.e(TAG, "Exception creating Dim surface", e);
}
}
}
@@ -11085,7 +11085,7 @@
* Show the dim surface.
*/
void show(int dw, int dh) {
- if (SHOW_TRANSACTIONS) Log.i(TAG, " DIM " + mDimSurface + ": SHOW pos=(0,0) (" +
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " DIM " + mDimSurface + ": SHOW pos=(0,0) (" +
dw + "x" + dh + ")");
mDimShown = true;
try {
@@ -11093,7 +11093,7 @@
mDimSurface.setSize(dw, dh);
mDimSurface.show();
} catch (RuntimeException e) {
- Log.w(TAG, "Failure showing dim surface", e);
+ Slog.w(TAG, "Failure showing dim surface", e);
}
}
@@ -11105,7 +11105,7 @@
mDimSurface.setLayer(w.mAnimLayer-1);
final float target = w.mExiting ? 0 : w.mAttrs.dimAmount;
- if (SHOW_TRANSACTIONS) Log.i(TAG, " DIM " + mDimSurface
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " DIM " + mDimSurface
+ ": layer=" + (w.mAnimLayer-1) + " target=" + target);
if (mDimTargetAlpha != target) {
// If the desired dim level has changed, then
@@ -11165,7 +11165,7 @@
// Do we need to continue animating?
if (more) {
- if (SHOW_TRANSACTIONS) Log.i(TAG, " DIM "
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " DIM "
+ mDimSurface + ": alpha=" + mDimCurrentAlpha);
mLastDimAnimTime = currentTime;
mDimSurface.setAlpha(mDimCurrentAlpha);
@@ -11173,16 +11173,16 @@
} else {
mDimCurrentAlpha = mDimTargetAlpha;
mLastDimAnimTime = 0;
- if (SHOW_TRANSACTIONS) Log.i(TAG, " DIM "
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " DIM "
+ mDimSurface + ": final alpha=" + mDimCurrentAlpha);
mDimSurface.setAlpha(mDimCurrentAlpha);
if (!dimming) {
- if (SHOW_TRANSACTIONS) Log.i(TAG, " DIM " + mDimSurface
+ if (SHOW_TRANSACTIONS) Slog.i(TAG, " DIM " + mDimSurface
+ ": HIDE");
try {
mDimSurface.hide();
} catch (RuntimeException e) {
- Log.w(TAG, "Illegal argument exception hiding dim surface");
+ Slog.w(TAG, "Illegal argument exception hiding dim surface");
}
mDimShown = false;
}
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 5b37f47..2c82d9c 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -35,6 +35,7 @@
import android.app.ApplicationErrorReport;
import android.app.Dialog;
import android.app.IActivityController;
+import android.app.IActivityManager;
import android.app.IActivityWatcher;
import android.app.IApplicationThread;
import android.app.IInstrumentationWatcher;
@@ -96,6 +97,7 @@
import android.provider.Settings;
import android.util.Config;
import android.util.EventLog;
+import android.util.Slog;
import android.util.Log;
import android.util.PrintWriterPrinter;
import android.util.SparseArray;
@@ -135,6 +137,7 @@
static final boolean DEBUG_VISBILITY = localLOGV || false;
static final boolean DEBUG_PROCESSES = localLOGV || false;
static final boolean DEBUG_PROVIDER = localLOGV || false;
+ static final boolean DEBUG_URI_PERMISSION = localLOGV || false;
static final boolean DEBUG_USER_LEAVING = localLOGV || false;
static final boolean DEBUG_RESULTS = localLOGV || false;
static final boolean DEBUG_BACKUP = localLOGV || false;
@@ -387,6 +390,18 @@
= new ArrayList<PendingActivityLaunch>();
/**
+ * List of people waiting to find out about the next launched activity.
+ */
+ final ArrayList<IActivityManager.WaitResult> mWaitingActivityLaunched
+ = new ArrayList<IActivityManager.WaitResult>();
+
+ /**
+ * List of people waiting to find out about the next visible activity.
+ */
+ final ArrayList<IActivityManager.WaitResult> mWaitingActivityVisible
+ = new ArrayList<IActivityManager.WaitResult>();
+
+ /**
* List of all active broadcasts that are to be executed immediately
* (without waiting for another broadcast to finish). Currently this only
* contains broadcasts to registered receivers, to avoid spinning up
@@ -928,7 +943,7 @@
AppDeathRecipient(ProcessRecord app, int pid,
IApplicationThread thread) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "New death recipient " + this
+ " for thread " + thread.asBinder());
mApp = app;
@@ -937,7 +952,7 @@
}
public void binderDied() {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Death received in " + this
+ " for thread " + mAppThread.asBinder());
removeRequestedPss(mApp);
@@ -968,12 +983,13 @@
static final int PROC_START_TIMEOUT_MSG = 20;
static final int DO_PENDING_ACTIVITY_LAUNCHES_MSG = 21;
static final int KILL_APPLICATION_MSG = 22;
+ static final int FINALIZE_PENDING_INTENT_MSG = 23;
AlertDialog mUidAlert;
final Handler mHandler = new Handler() {
//public Handler() {
- // if (localLOGV) Log.v(TAG, "Handler started!");
+ // if (localLOGV) Slog.v(TAG, "Handler started!");
//}
public void handleMessage(Message msg) {
@@ -983,7 +999,7 @@
synchronized (ActivityManagerService.this) {
ProcessRecord proc = (ProcessRecord)data.get("app");
if (proc != null && proc.crashDialog != null) {
- Log.e(TAG, "App already has crash dialog: " + proc);
+ Slog.e(TAG, "App already has crash dialog: " + proc);
return;
}
AppErrorResult res = (AppErrorResult) data.get("result");
@@ -1005,7 +1021,7 @@
HashMap data = (HashMap) msg.obj;
ProcessRecord proc = (ProcessRecord)data.get("app");
if (proc != null && proc.anrDialog != null) {
- Log.e(TAG, "App already has anr dialog: " + proc);
+ Slog.e(TAG, "App already has anr dialog: " + proc);
return;
}
@@ -1057,7 +1073,7 @@
}
} break;
case BROADCAST_INTENT_MSG: {
- if (DEBUG_BROADCAST) Log.v(
+ if (DEBUG_BROADCAST) Slog.v(
TAG, "Received BROADCAST_INTENT_MSG");
processNextBroadcast(true);
} break;
@@ -1074,7 +1090,7 @@
IBinder token = (IBinder)msg.obj;
// We don't at this point know if the activity is fullscreen,
// so we need to be conservative and assume it isn't.
- Log.w(TAG, "Activity pause timeout for " + token);
+ Slog.w(TAG, "Activity pause timeout for " + token);
activityPaused(token, null, true);
} break;
case IDLE_TIMEOUT_MSG: {
@@ -1088,14 +1104,14 @@
// We don't at this point know if the activity is fullscreen,
// so we need to be conservative and assume it isn't.
IBinder token = (IBinder)msg.obj;
- Log.w(TAG, "Activity idle timeout for " + token);
+ Slog.w(TAG, "Activity idle timeout for " + token);
activityIdleInternal(token, true, null);
} break;
case DESTROY_TIMEOUT_MSG: {
IBinder token = (IBinder)msg.obj;
// We don't at this point know if the activity is fullscreen,
// so we need to be conservative and assume it isn't.
- Log.w(TAG, "Activity destroy timeout for " + token);
+ Slog.w(TAG, "Activity destroy timeout for " + token);
activityDestroyed(token);
} break;
case IDLE_NOW_MSG: {
@@ -1120,7 +1136,7 @@
try {
r.thread.updateTimeZone();
} catch (RemoteException ex) {
- Log.w(TAG, "Failed to update time zone for: " + r.info.processName);
+ Slog.w(TAG, "Failed to update time zone for: " + r.info.processName);
}
}
}
@@ -1153,7 +1169,7 @@
}
synchronized (ActivityManagerService.this) {
if (mLaunchingActivity.isHeld()) {
- Log.w(TAG, "Launch timeout has expired, giving up wake lock!");
+ Slog.w(TAG, "Launch timeout has expired, giving up wake lock!");
mLaunchingActivity.release();
}
}
@@ -1189,6 +1205,9 @@
forceStopPackageLocked(pkg, uid, restart, false, true);
}
} break;
+ case FINALIZE_PENDING_INTENT_MSG: {
+ ((PendingIntentRecord)msg.obj).completeFinalize();
+ } break;
}
}
};
@@ -1373,7 +1392,7 @@
mSimpleProcessManagement = true;
}
- Log.i(TAG, "Memory class: " + ActivityManager.staticGetMemoryClass());
+ Slog.i(TAG, "Memory class: " + ActivityManager.staticGetMemoryClass());
File dataDir = Environment.getDataDirectory();
File systemDir = new File(dataDir, "system");
@@ -1405,7 +1424,7 @@
final long now = SystemClock.uptimeMillis();
long nextCpuDelay = (mLastCpuTime+MONITOR_CPU_MAX_TIME)-now;
long nextWriteDelay = (mLastWriteTime+BATTERY_STATS_TIME)-now;
- //Log.i(TAG, "Cpu delay=" + nextCpuDelay
+ //Slog.i(TAG, "Cpu delay=" + nextCpuDelay
// + ", write delay=" + nextWriteDelay);
if (nextWriteDelay < nextCpuDelay) {
nextCpuDelay = nextWriteDelay;
@@ -1419,7 +1438,7 @@
updateCpuStatsNow();
} catch (Exception e) {
- Log.e(TAG, "Unexpected exception collecting process stats", e);
+ Slog.e(TAG, "Unexpected exception collecting process stats", e);
}
}
}
@@ -1436,7 +1455,7 @@
// The activity manager only throws security exceptions, so let's
// log all others.
if (!(e instanceof SecurityException)) {
- Log.e(TAG, "Activity Manager Crash", e);
+ Slog.e(TAG, "Activity Manager Crash", e);
}
throw e;
}
@@ -1461,11 +1480,11 @@
mLastCpuTime = now;
haveNewCpuStats = true;
mProcessStats.update();
- //Log.i(TAG, mProcessStats.printCurrentState());
- //Log.i(TAG, "Total CPU usage: "
+ //Slog.i(TAG, mProcessStats.printCurrentState());
+ //Slog.i(TAG, "Total CPU usage: "
// + mProcessStats.getTotalCpuPercent() + "%");
- // Log the cpu usage if the property is set.
+ // Slog the cpu usage if the property is set.
if ("true".equals(SystemProperties.get("events.cpu"))) {
int user = mProcessStats.getLastUserTime();
int system = mProcessStats.getLastSystemTime();
@@ -1596,7 +1615,7 @@
mLruProcesses.add(0, app);
}
- //Log.i(TAG, "Putting proc to front: " + app.processName);
+ //Slog.i(TAG, "Putting proc to front: " + app.processName);
if (oomAdj) {
updateOomAdjLocked();
}
@@ -1707,7 +1726,7 @@
r.app = app;
- if (localLOGV) Log.v(TAG, "Launching: " + r);
+ if (localLOGV) Slog.v(TAG, "Launching: " + r);
int idx = app.activities.indexOf(r);
if (idx < 0) {
@@ -1725,7 +1744,7 @@
results = r.results;
newIntents = r.newIntents;
}
- if (DEBUG_SWITCH) Log.v(TAG, "Launching: " + r
+ if (DEBUG_SWITCH) Slog.v(TAG, "Launching: " + r
+ " icicle=" + r.icicle
+ " with results=" + results + " newIntents=" + newIntents
+ " andResume=" + andResume);
@@ -1746,7 +1765,7 @@
if (r.launchFailed) {
// This is the second time we failed -- finish activity
// and give up.
- Log.e(TAG, "Second failure launching "
+ Slog.e(TAG, "Second failure launching "
+ r.intent.getComponent().flattenToShortString()
+ ", giving up", e);
appDiedLocked(app, app.pid, app.thread);
@@ -1763,7 +1782,7 @@
r.launchFailed = false;
if (updateLRUListLocked(r)) {
- Log.w(TAG, "Activity " + r
+ Slog.w(TAG, "Activity " + r
+ " being launched, but already in LRU list");
}
@@ -1816,7 +1835,7 @@
realStartActivityLocked(r, app, andResume, checkConfig);
return;
} catch (RemoteException e) {
- Log.w(TAG, "Exception when starting activity "
+ Slog.w(TAG, "Exception when starting activity "
+ r.intent.getComponent().flattenToShortString(), e);
}
@@ -1838,15 +1857,20 @@
// object attached to it so we know it couldn't have crashed; and
// (3) There is a pid assigned to it, so it is either starting or
// already running.
- if (DEBUG_PROCESSES) Log.v(TAG, "startProcess: name=" + processName
+ if (DEBUG_PROCESSES) Slog.v(TAG, "startProcess: name=" + processName
+ " app=" + app + " knownToBeDead=" + knownToBeDead
+ " thread=" + (app != null ? app.thread : null)
+ " pid=" + (app != null ? app.pid : -1));
- if (app != null &&
- (!knownToBeDead || app.thread == null) && app.pid > 0) {
- return app;
+ if (app != null && app.pid > 0) {
+ if (!knownToBeDead || app.thread == null) {
+ return app;
+ } else {
+ // An application record is attached to a previous process,
+ // clean it up now.
+ handleAppDiedLocked(app, true);
+ }
}
-
+
String hostingNameStr = hostingName != null
? hostingName.flattenToShortString() : null;
@@ -1923,7 +1947,7 @@
gids = mContext.getPackageManager().getPackageGids(
app.info.packageName);
} catch (PackageManager.NameNotFoundException e) {
- Log.w(TAG, "Unable to retrieve gids", e);
+ Slog.w(TAG, "Unable to retrieve gids", e);
}
if (mFactoryTest != SystemServer.FACTORY_TEST_OFF) {
if (mFactoryTest == SystemServer.FACTORY_TEST_LOW_LEVEL
@@ -1993,7 +2017,7 @@
}
}
buf.append("}");
- Log.i(TAG, buf.toString());
+ Slog.i(TAG, buf.toString());
if (pid == 0 || pid == MY_PID) {
// Processes are being emulated with threads.
app.pid = MY_PID;
@@ -2013,29 +2037,29 @@
RuntimeException e = new RuntimeException(
"Failure starting process " + app.processName
+ ": returned pid=" + pid);
- Log.e(TAG, e.getMessage(), e);
+ Slog.e(TAG, e.getMessage(), e);
}
} catch (RuntimeException e) {
// XXX do better error recovery.
app.pid = 0;
- Log.e(TAG, "Failure starting process " + app.processName, e);
+ Slog.e(TAG, "Failure starting process " + app.processName, e);
}
}
private final void startPausingLocked(boolean userLeaving, boolean uiSleeping) {
if (mPausingActivity != null) {
RuntimeException e = new RuntimeException();
- Log.e(TAG, "Trying to pause when pause is already pending for "
+ Slog.e(TAG, "Trying to pause when pause is already pending for "
+ mPausingActivity, e);
}
HistoryRecord prev = mResumedActivity;
if (prev == null) {
RuntimeException e = new RuntimeException();
- Log.e(TAG, "Trying to pause when nothing is resumed", e);
+ Slog.e(TAG, "Trying to pause when nothing is resumed", e);
resumeTopActivityLocked(null);
return;
}
- if (DEBUG_PAUSE) Log.v(TAG, "Start pausing: " + prev);
+ if (DEBUG_PAUSE) Slog.v(TAG, "Start pausing: " + prev);
mResumedActivity = null;
mPausingActivity = prev;
mLastPausedActivity = prev;
@@ -2045,7 +2069,7 @@
updateCpuStats();
if (prev.app != null && prev.app.thread != null) {
- if (DEBUG_PAUSE) Log.v(TAG, "Enqueueing pending pause: " + prev);
+ if (DEBUG_PAUSE) Slog.v(TAG, "Enqueueing pending pause: " + prev);
try {
EventLog.writeEvent(EventLogTags.AM_PAUSE_ACTIVITY,
System.identityHashCode(prev),
@@ -2055,7 +2079,7 @@
updateUsageStats(prev, false);
} catch (Exception e) {
// Ignore exception, if process died other code will cleanup.
- Log.w(TAG, "Exception thrown during pause", e);
+ Slog.w(TAG, "Exception thrown during pause", e);
mPausingActivity = null;
mLastPausedActivity = null;
}
@@ -2084,7 +2108,7 @@
if (!uiSleeping) {
prev.pauseKeyDispatchingLocked();
} else {
- if (DEBUG_PAUSE) Log.v(TAG, "Key dispatch not paused for screen off");
+ if (DEBUG_PAUSE) Slog.v(TAG, "Key dispatch not paused for screen off");
}
// Schedule a pause timeout in case the app doesn't respond.
@@ -2093,29 +2117,29 @@
Message msg = mHandler.obtainMessage(PAUSE_TIMEOUT_MSG);
msg.obj = prev;
mHandler.sendMessageDelayed(msg, PAUSE_TIMEOUT);
- if (DEBUG_PAUSE) Log.v(TAG, "Waiting for pause to complete...");
+ if (DEBUG_PAUSE) Slog.v(TAG, "Waiting for pause to complete...");
} else {
// This activity failed to schedule the
// pause, so just treat it as being paused now.
- if (DEBUG_PAUSE) Log.v(TAG, "Activity not running, resuming next.");
+ if (DEBUG_PAUSE) Slog.v(TAG, "Activity not running, resuming next.");
resumeTopActivityLocked(null);
}
}
private final void completePauseLocked() {
HistoryRecord prev = mPausingActivity;
- if (DEBUG_PAUSE) Log.v(TAG, "Complete pause: " + prev);
+ if (DEBUG_PAUSE) Slog.v(TAG, "Complete pause: " + prev);
if (prev != null) {
if (prev.finishing) {
- if (DEBUG_PAUSE) Log.v(TAG, "Executing finish of activity: " + prev);
+ if (DEBUG_PAUSE) Slog.v(TAG, "Executing finish of activity: " + prev);
prev = finishCurrentActivityLocked(prev, FINISH_AFTER_VISIBLE);
} else if (prev.app != null) {
- if (DEBUG_PAUSE) Log.v(TAG, "Enqueueing pending stop: " + prev);
+ if (DEBUG_PAUSE) Slog.v(TAG, "Enqueueing pending stop: " + prev);
if (prev.waitingVisible) {
prev.waitingVisible = false;
mWaitingVisibleActivities.remove(prev);
- if (DEBUG_SWITCH || DEBUG_PAUSE) Log.v(
+ if (DEBUG_SWITCH || DEBUG_PAUSE) Slog.v(
TAG, "Complete pause, no longer waiting: " + prev);
}
if (prev.configDestroy) {
@@ -2124,7 +2148,7 @@
// To juggle the fact that we are also starting a new
// instance right now, we need to first completely stop
// the current instance before starting the new one.
- if (DEBUG_PAUSE) Log.v(TAG, "Destroying after pause: " + prev);
+ if (DEBUG_PAUSE) Slog.v(TAG, "Destroying after pause: " + prev);
destroyActivityLocked(prev, true);
} else {
mStoppingActivities.add(prev);
@@ -2132,14 +2156,14 @@
// If we already have a few activities waiting to stop,
// then give up on things going idle and start clearing
// them out.
- if (DEBUG_PAUSE) Log.v(TAG, "To many pending stops, forcing idle");
+ if (DEBUG_PAUSE) Slog.v(TAG, "To many pending stops, forcing idle");
Message msg = Message.obtain();
msg.what = ActivityManagerService.IDLE_NOW_MSG;
mHandler.sendMessage(msg);
}
}
} else {
- if (DEBUG_PAUSE) Log.v(TAG, "App died during pause, not stopping: " + prev);
+ if (DEBUG_PAUSE) Slog.v(TAG, "App died during pause, not stopping: " + prev);
prev = null;
}
mPausingActivity = null;
@@ -2232,7 +2256,7 @@
*/
private final void ensureActivitiesVisibleLocked(HistoryRecord top,
HistoryRecord starting, String onlyThisProcess, int configChanges) {
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "ensureActivitiesVisible behind " + top
+ " configChanges=0x" + Integer.toHexString(configChanges));
@@ -2247,7 +2271,7 @@
boolean behindFullscreen = false;
for (; i>=0; i--) {
r = (HistoryRecord)mHistory.get(i);
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Make visible? " + r + " finishing=" + r.finishing
+ " state=" + r.state);
if (r.finishing) {
@@ -2269,13 +2293,13 @@
// This activity needs to be visible, but isn't even
// running... get it started, but don't resume it
// at this point.
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Start and freeze screen for " + r);
if (r != starting) {
r.startFreezingScreenLocked(r.app, configChanges);
}
if (!r.visible) {
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Starting and making visible: " + r);
mWindowManager.setAppVisibility(r, true);
}
@@ -2287,7 +2311,7 @@
} else if (r.visible) {
// If this activity is already visible, then there is nothing
// else to do here.
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Skipping: already visible at " + r);
r.stopFreezingScreenLocked(false);
@@ -2298,7 +2322,7 @@
if (r.state != ActivityState.RESUMED && r != starting) {
// If this activity is paused, tell it
// to now show its window.
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Making visible and scheduling visibility: " + r);
try {
mWindowManager.setAppVisibility(r, true);
@@ -2307,7 +2331,7 @@
} catch (Exception e) {
// Just skip on any failure; we'll make it
// visible when it next restarts.
- Log.w(TAG, "Exception thrown making visibile: "
+ Slog.w(TAG, "Exception thrown making visibile: "
+ r.intent.getComponent(), e);
}
}
@@ -2318,7 +2342,7 @@
if (r.fullscreen) {
// At this point, nothing else needs to be shown
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Stopping: fullscreen at " + r);
behindFullscreen = true;
i--;
@@ -2330,14 +2354,14 @@
// sure they no longer are keeping the screen frozen.
while (i >= 0) {
r = (HistoryRecord)mHistory.get(i);
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Make invisible? " + r + " finishing=" + r.finishing
+ " state=" + r.state
+ " behindFullscreen=" + behindFullscreen);
if (!r.finishing) {
if (behindFullscreen) {
if (r.visible) {
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Making invisible: " + r);
r.visible = false;
try {
@@ -2345,22 +2369,22 @@
if ((r.state == ActivityState.STOPPING
|| r.state == ActivityState.STOPPED)
&& r.app != null && r.app.thread != null) {
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Scheduling invisibility: " + r);
r.app.thread.scheduleWindowVisibility(r, false);
}
} catch (Exception e) {
// Just skip on any failure; we'll make it
// visible when it next restarts.
- Log.w(TAG, "Exception thrown making hidden: "
+ Slog.w(TAG, "Exception thrown making hidden: "
+ r.intent.getComponent(), e);
}
} else {
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Already invisible: " + r);
}
} else if (r.fullscreen) {
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Now behindFullscreen: " + r);
behindFullscreen = true;
}
@@ -2479,7 +2503,7 @@
}
private void reportResumedActivityLocked(HistoryRecord r) {
- //Log.i(TAG, "**** REPORT RESUME: " + r);
+ //Slog.i(TAG, "**** REPORT RESUME: " + r);
final int identHash = System.identityHashCode(r);
updateUsageStats(r, true);
@@ -2549,19 +2573,19 @@
mStoppingActivities.remove(next);
mWaitingVisibleActivities.remove(next);
- if (DEBUG_SWITCH) Log.v(TAG, "Resuming " + next);
+ if (DEBUG_SWITCH) Slog.v(TAG, "Resuming " + next);
// If we are currently pausing an activity, then don't do anything
// until that is done.
if (mPausingActivity != null) {
- if (DEBUG_SWITCH) Log.v(TAG, "Skip resume: pausing=" + mPausingActivity);
+ if (DEBUG_SWITCH) Slog.v(TAG, "Skip resume: pausing=" + mPausingActivity);
return false;
}
// We need to start pausing the current activity so the top one
// can be resumed...
if (mResumedActivity != null) {
- if (DEBUG_SWITCH) Log.v(TAG, "Skip resume: need to start pausing");
+ if (DEBUG_SWITCH) Slog.v(TAG, "Skip resume: need to start pausing");
startPausingLocked(userLeaving, false);
return true;
}
@@ -2570,7 +2594,7 @@
if (!prev.waitingVisible && next != null && !next.nowVisible) {
prev.waitingVisible = true;
mWaitingVisibleActivities.add(prev);
- if (DEBUG_SWITCH) Log.v(
+ if (DEBUG_SWITCH) Slog.v(
TAG, "Resuming top, waiting visible to hide: " + prev);
} else {
// The next activity is already visible, so hide the previous
@@ -2583,12 +2607,12 @@
// new one is found to be full-screen or not.
if (prev.finishing) {
mWindowManager.setAppVisibility(prev, false);
- if (DEBUG_SWITCH) Log.v(TAG, "Not waiting for visible to hide: "
+ if (DEBUG_SWITCH) Slog.v(TAG, "Not waiting for visible to hide: "
+ prev + ", waitingVisible="
+ (prev != null ? prev.waitingVisible : null)
+ ", nowVisible=" + next.nowVisible);
} else {
- if (DEBUG_SWITCH) Log.v(TAG, "Previous already visible but still waiting to hide: "
+ if (DEBUG_SWITCH) Slog.v(TAG, "Previous already visible but still waiting to hide: "
+ prev + ", waitingVisible="
+ (prev != null ? prev.waitingVisible : null)
+ ", nowVisible=" + next.nowVisible);
@@ -2601,7 +2625,7 @@
// to ignore it when computing the desired screen orientation.
if (prev != null) {
if (prev.finishing) {
- if (DEBUG_TRANSITION) Log.v(TAG,
+ if (DEBUG_TRANSITION) Slog.v(TAG,
"Prepare close transition: prev=" + prev);
if (mNoAnimActivities.contains(prev)) {
mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
@@ -2613,7 +2637,7 @@
mWindowManager.setAppWillBeHidden(prev);
mWindowManager.setAppVisibility(prev, false);
} else {
- if (DEBUG_TRANSITION) Log.v(TAG,
+ if (DEBUG_TRANSITION) Slog.v(TAG,
"Prepare open transition: prev=" + prev);
if (mNoAnimActivities.contains(next)) {
mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
@@ -2628,7 +2652,7 @@
mWindowManager.setAppVisibility(prev, false);
}
} else if (mHistory.size() > 1) {
- if (DEBUG_TRANSITION) Log.v(TAG,
+ if (DEBUG_TRANSITION) Slog.v(TAG,
"Prepare open transition: no previous");
if (mNoAnimActivities.contains(next)) {
mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
@@ -2638,7 +2662,7 @@
}
if (next.app != null && next.app.thread != null) {
- if (DEBUG_SWITCH) Log.v(TAG, "Resume running: " + next);
+ if (DEBUG_SWITCH) Slog.v(TAG, "Resume running: " + next);
// This activity is now becoming visible.
mWindowManager.setAppVisibility(next, true);
@@ -2673,7 +2697,7 @@
// is still at the top and schedule another run if something
// weird happened.
HistoryRecord nextNext = topRunningActivityLocked(null);
- if (DEBUG_SWITCH) Log.i(TAG,
+ if (DEBUG_SWITCH) Slog.i(TAG,
"Activity config changed during resume: " + next
+ ", new next: " + nextNext);
if (nextNext != next) {
@@ -2693,7 +2717,7 @@
if (a != null) {
final int N = a.size();
if (!next.finishing && N > 0) {
- if (DEBUG_RESULTS) Log.v(
+ if (DEBUG_RESULTS) Slog.v(
TAG, "Delivering results to " + next
+ ": " + a);
next.app.thread.scheduleSendResult(next, a);
@@ -2717,7 +2741,7 @@
// Whoops, need to restart this activity!
next.state = lastState;
mResumedActivity = lastResumedActivity;
- Log.i(TAG, "Restarting because process died: " + next);
+ Slog.i(TAG, "Restarting because process died: " + next);
if (!next.hasBeenLaunched) {
next.hasBeenLaunched = true;
} else {
@@ -2740,7 +2764,7 @@
} catch (Exception e) {
// If any exception gets thrown, toss away this
// activity and try the next one.
- Log.w(TAG, "Exception thrown during resume of " + next, e);
+ Slog.w(TAG, "Exception thrown during resume of " + next, e);
requestFinishActivityLocked(next, Activity.RESULT_CANCELED, null,
"resume-exception");
return true;
@@ -2762,7 +2786,7 @@
next.nonLocalizedLabel,
next.labelRes, next.icon, null, true);
}
- if (DEBUG_SWITCH) Log.v(TAG, "Restarting: " + next);
+ if (DEBUG_SWITCH) Slog.v(TAG, "Restarting: " + next);
}
startSpecificActivityLocked(next, true, true);
}
@@ -2821,7 +2845,7 @@
// activity
if (addPos < NH) {
mUserLeaving = false;
- if (DEBUG_USER_LEAVING) Log.v(TAG, "startActivity() behind front, mUserLeaving=false");
+ if (DEBUG_USER_LEAVING) Slog.v(TAG, "startActivity() behind front, mUserLeaving=false");
}
// Slot the activity into the history stack and proceed
@@ -2841,7 +2865,7 @@
if (proc == null || proc.thread == null) {
showStartingIcon = true;
}
- if (DEBUG_TRANSITION) Log.v(TAG,
+ if (DEBUG_TRANSITION) Slog.v(TAG,
"Prepare open transition: starting " + r);
if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
mWindowManager.prepareAppTransition(WindowManagerPolicy.TRANSIT_NONE);
@@ -3024,7 +3048,7 @@
r.app.thread.scheduleNewIntent(ar, r);
sent = true;
} catch (Exception e) {
- Log.w(TAG, "Exception thrown sending new intent to " + r, e);
+ Slog.w(TAG, "Exception thrown sending new intent to " + r, e);
}
}
if (!sent) {
@@ -3048,13 +3072,13 @@
String resultWho, int requestCode,
int callingPid, int callingUid, boolean onlyIfNeeded,
boolean componentSpecified) {
- Log.i(TAG, "Starting activity: " + intent);
+ Slog.i(TAG, "Starting activity: " + intent);
HistoryRecord sourceRecord = null;
HistoryRecord resultRecord = null;
if (resultTo != null) {
int index = indexOfTokenLocked(resultTo);
- if (DEBUG_RESULTS) Log.v(
+ if (DEBUG_RESULTS) Slog.v(
TAG, "Sending result to " + resultTo + " (index " + index + ")");
if (index >= 0) {
sourceRecord = (HistoryRecord)mHistory.get(index);
@@ -3104,7 +3128,7 @@
callingPid = callerApp.pid;
callingUid = callerApp.info.uid;
} else {
- Log.w(TAG, "Unable to find app for caller " + caller
+ Slog.w(TAG, "Unable to find app for caller " + caller
+ " (pid=" + callingPid + ") when starting: "
+ intent.toString());
err = START_PERMISSION_DENIED;
@@ -3132,7 +3156,7 @@
+ " from " + callerApp + " (pid=" + callingPid
+ ", uid=" + callingUid + ")"
+ " requires " + aInfo.permission;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
@@ -3220,7 +3244,7 @@
// We'll invoke onUserLeaving before onPause only if the launching
// activity did not explicitly state that this is an automated launch.
mUserLeaving = (launchFlags&Intent.FLAG_ACTIVITY_NO_USER_ACTION) == 0;
- if (DEBUG_USER_LEAVING) Log.v(TAG,
+ if (DEBUG_USER_LEAVING) Slog.v(TAG,
"startActivity() => mUserLeaving=" + mUserLeaving);
// If the caller has asked not to resume at this point, we make note
@@ -3262,7 +3286,7 @@
// This activity is not being started from another... in this
// case we -always- start a new task.
if ((launchFlags&Intent.FLAG_ACTIVITY_NEW_TASK) == 0) {
- Log.w(TAG, "startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: "
+ Slog.w(TAG, "startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: "
+ intent);
launchFlags |= Intent.FLAG_ACTIVITY_NEW_TASK;
}
@@ -3284,7 +3308,7 @@
// is pretty messed up, so instead immediately send back a cancel
// and let the new task continue launched as normal without a
// dependency on its originator.
- Log.w(TAG, "Activity is launching as a new task, so cancelling activity result.");
+ Slog.w(TAG, "Activity is launching as a new task, so cancelling activity result.");
sendActivityResultLocked(-1,
r.resultTo, r.resultWho, r.requestCode,
Activity.RESULT_CANCELED, null);
@@ -3431,9 +3455,9 @@
//String uri = r.intent.toURI();
//Intent intent2 = new Intent(uri);
- //Log.i(TAG, "Given intent: " + r.intent);
- //Log.i(TAG, "URI is: " + uri);
- //Log.i(TAG, "To intent: " + intent2);
+ //Slog.i(TAG, "Given intent: " + r.intent);
+ //Slog.i(TAG, "URI is: " + uri);
+ //Slog.i(TAG, "To intent: " + intent2);
if (r.packageName != null) {
// If the activity being launched is the same as the one currently
@@ -3486,7 +3510,7 @@
}
r.task = new TaskRecord(mCurTask, r.info, intent,
(r.info.flags&ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0);
- if (DEBUG_TASKS) Log.v(TAG, "Starting new activity " + r
+ if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
+ " in new task " + r.task);
newTask = true;
addRecentTask(r.task);
@@ -3529,7 +3553,7 @@
// to keep the new one in the same task as the one that is starting
// it.
r.task = sourceRecord.task;
- if (DEBUG_TASKS) Log.v(TAG, "Starting new activity " + r
+ if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
+ " in existing task " + r.task);
} else {
@@ -3543,7 +3567,7 @@
? prev.task
: new TaskRecord(mCurTask, r.info, intent,
(r.info.flags&ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0);
- if (DEBUG_TASKS) Log.v(TAG, "Starting new activity " + r
+ if (DEBUG_TASKS) Slog.v(TAG, "Starting new activity " + r
+ " in new guessed " + r.task);
}
if (newTask) {
@@ -3554,11 +3578,38 @@
return START_SUCCESS;
}
- public final int startActivity(IApplicationThread caller,
+ void reportActivityLaunchedLocked(boolean timeout, HistoryRecord r,
+ long thisTime, long totalTime) {
+ for (int i=mWaitingActivityLaunched.size()-1; i>=0; i--) {
+ WaitResult w = mWaitingActivityLaunched.get(i);
+ w.timeout = timeout;
+ if (r != null) {
+ w.who = new ComponentName(r.info.packageName, r.info.name);
+ }
+ w.thisTime = thisTime;
+ w.totalTime = totalTime;
+ }
+ notify();
+ }
+
+ void reportActivityVisibleLocked(HistoryRecord r) {
+ for (int i=mWaitingActivityVisible.size()-1; i>=0; i--) {
+ WaitResult w = mWaitingActivityVisible.get(i);
+ w.timeout = false;
+ if (r != null) {
+ w.who = new ComponentName(r.info.packageName, r.info.name);
+ }
+ w.totalTime = SystemClock.uptimeMillis() - w.thisTime;
+ w.thisTime = w.totalTime;
+ }
+ notify();
+ }
+
+ private final int startActivityMayWait(IApplicationThread caller,
Intent intent, String resolvedType, Uri[] grantedUriPermissions,
int grantedMode, IBinder resultTo,
String resultWho, int requestCode, boolean onlyIfNeeded,
- boolean debug) {
+ boolean debug, WaitResult outResult) {
// Refuse possible leaked file descriptors
if (intent != null && intent.hasFileDescriptors()) {
throw new IllegalArgumentException("File descriptors passed in Intent");
@@ -3598,18 +3649,77 @@
}
}
- synchronized(this) {
+ synchronized (this) {
+ int callingPid;
+ int callingUid;
+ if (caller == null) {
+ callingPid = Binder.getCallingPid();
+ callingUid = Binder.getCallingUid();
+ } else {
+ callingPid = callingUid = -1;
+ }
final long origId = Binder.clearCallingIdentity();
int res = startActivityLocked(caller, intent, resolvedType,
grantedUriPermissions, grantedMode, aInfo,
- resultTo, resultWho, requestCode, -1, -1,
+ resultTo, resultWho, requestCode, callingPid, callingUid,
onlyIfNeeded, componentSpecified);
Binder.restoreCallingIdentity(origId);
+
+ if (outResult != null) {
+ outResult.result = res;
+ if (res == IActivityManager.START_SUCCESS) {
+ mWaitingActivityLaunched.add(outResult);
+ do {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ }
+ } while (!outResult.timeout && outResult.who == null);
+ } else if (res == IActivityManager.START_TASK_TO_FRONT) {
+ HistoryRecord r = this.topRunningActivityLocked(null);
+ if (r.nowVisible) {
+ outResult.timeout = false;
+ outResult.who = new ComponentName(r.info.packageName, r.info.name);
+ outResult.totalTime = 0;
+ outResult.thisTime = 0;
+ } else {
+ outResult.thisTime = SystemClock.uptimeMillis();
+ mWaitingActivityVisible.add(outResult);
+ do {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ }
+ } while (!outResult.timeout && outResult.who == null);
+ }
+ }
+ }
+
return res;
}
}
- public int startActivityIntentSender(IApplicationThread caller,
+ public final int startActivity(IApplicationThread caller,
+ Intent intent, String resolvedType, Uri[] grantedUriPermissions,
+ int grantedMode, IBinder resultTo,
+ String resultWho, int requestCode, boolean onlyIfNeeded,
+ boolean debug) {
+ return startActivityMayWait(caller, intent, resolvedType, grantedUriPermissions,
+ grantedMode, resultTo, resultWho, requestCode, onlyIfNeeded, debug, null);
+ }
+
+ public final WaitResult startActivityAndWait(IApplicationThread caller,
+ Intent intent, String resolvedType, Uri[] grantedUriPermissions,
+ int grantedMode, IBinder resultTo,
+ String resultWho, int requestCode, boolean onlyIfNeeded,
+ boolean debug) {
+ WaitResult res = new WaitResult();
+ startActivityMayWait(caller, intent, resolvedType, grantedUriPermissions,
+ grantedMode, resultTo, resultWho, requestCode, onlyIfNeeded, debug, res);
+ return res;
+ }
+
+ public int startActivityIntentSender(IApplicationThread caller,
IntentSender intent, Intent fillInIntent, String resolvedType,
IBinder resultTo, String resultWho, int requestCode,
int flagsMask, int flagsValues) {
@@ -3836,7 +3946,7 @@
}
private final void stopActivityLocked(HistoryRecord r) {
- if (DEBUG_SWITCH) Log.d(TAG, "Stopping: " + r);
+ if (DEBUG_SWITCH) Slog.d(TAG, "Stopping: " + r);
if ((r.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_HISTORY) != 0
|| (r.info.flags&ActivityInfo.FLAG_NO_HISTORY) != 0) {
if (!r.finishing) {
@@ -3851,7 +3961,7 @@
try {
r.stopped = false;
r.state = ActivityState.STOPPING;
- if (DEBUG_VISBILITY) Log.v(
+ if (DEBUG_VISBILITY) Slog.v(
TAG, "Stopping visible=" + r.visible + " for " + r);
if (!r.visible) {
mWindowManager.setAppVisibility(r, false);
@@ -3861,7 +3971,7 @@
// Maybe just ignore exceptions here... if the process
// has crashed, our death notification will clean things
// up.
- Log.w(TAG, "Exception thrown during pause", e);
+ Slog.w(TAG, "Exception thrown during pause", e);
// Just in case, assume it to be stopped.
r.stopped = true;
r.state = ActivityState.STOPPED;
@@ -3878,7 +3988,7 @@
*/
private final boolean requestFinishActivityLocked(IBinder token, int resultCode,
Intent resultData, String reason) {
- if (DEBUG_RESULTS) Log.v(
+ if (DEBUG_RESULTS) Slog.v(
TAG, "Finishing activity: token=" + token
+ ", result=" + resultCode + ", data=" + resultData);
@@ -3917,7 +4027,7 @@
private final boolean finishActivityLocked(HistoryRecord r, int index,
int resultCode, Intent resultData, String reason) {
if (r.finishing) {
- Log.w(TAG, "Duplicate finish request for " + r);
+ Slog.w(TAG, "Duplicate finish request for " + r);
return false;
}
@@ -3941,7 +4051,7 @@
// send the result
HistoryRecord resultTo = r.resultTo;
if (resultTo != null) {
- if (DEBUG_RESULTS) Log.v(TAG, "Adding result to " + resultTo
+ if (DEBUG_RESULTS) Slog.v(TAG, "Adding result to " + resultTo
+ " who=" + r.resultWho + " req=" + r.requestCode
+ " res=" + resultCode + " data=" + resultData);
if (r.info.applicationInfo.uid > 0) {
@@ -3952,7 +4062,7 @@
resultData);
r.resultTo = null;
}
- else if (DEBUG_RESULTS) Log.v(TAG, "No result destination from " + r);
+ else if (DEBUG_RESULTS) Slog.v(TAG, "No result destination from " + r);
// Make sure this HistoryRecord is not holding on to other resources,
// because clients have remote IPC references to this object so we
@@ -3972,7 +4082,7 @@
if (mResumedActivity == r) {
boolean endTask = index <= 0
|| ((HistoryRecord)mHistory.get(index-1)).task != r.task;
- if (DEBUG_TRANSITION) Log.v(TAG,
+ if (DEBUG_TRANSITION) Slog.v(TAG,
"Prepare close transition: finishing " + r);
mWindowManager.prepareAppTransition(endTask
? WindowManagerPolicy.TRANSIT_TASK_CLOSE
@@ -3982,19 +4092,19 @@
mWindowManager.setAppVisibility(r, false);
if (mPausingActivity == null) {
- if (DEBUG_PAUSE) Log.v(TAG, "Finish needs to pause: " + r);
- if (DEBUG_USER_LEAVING) Log.v(TAG, "finish() => pause with userLeaving=false");
+ if (DEBUG_PAUSE) Slog.v(TAG, "Finish needs to pause: " + r);
+ if (DEBUG_USER_LEAVING) Slog.v(TAG, "finish() => pause with userLeaving=false");
startPausingLocked(false, false);
}
} else if (r.state != ActivityState.PAUSING) {
// If the activity is PAUSING, we will complete the finish once
// it is done pausing; else we can just directly finish it here.
- if (DEBUG_PAUSE) Log.v(TAG, "Finish not pausing: " + r);
+ if (DEBUG_PAUSE) Slog.v(TAG, "Finish not pausing: " + r);
return finishCurrentActivityLocked(r, index,
FINISH_AFTER_PAUSE) == null;
} else {
- if (DEBUG_PAUSE) Log.v(TAG, "Finish waiting for pause of: " + r);
+ if (DEBUG_PAUSE) Slog.v(TAG, "Finish waiting for pause of: " + r);
}
return false;
@@ -4054,7 +4164,7 @@
} else {
// Need to go through the full pause cycle to get this
// activity into the stopped state and then finish it.
- if (localLOGV) Log.v(TAG, "Enqueueing pending finish: " + r);
+ if (localLOGV) Slog.v(TAG, "Enqueueing pending finish: " + r);
mFinishingActivities.add(r);
resumeTopActivityLocked(null);
}
@@ -4110,7 +4220,7 @@
data, r);
}
- if (DEBUG_RESULTS) Log.v(TAG, "Send activity result to " + r
+ if (DEBUG_RESULTS) Slog.v(TAG, "Send activity result to " + r
+ " : who=" + resultWho + " req=" + requestCode
+ " res=" + resultCode + " data=" + data);
if (mResumedActivity == r && r.app != null && r.app.thread != null) {
@@ -4121,7 +4231,7 @@
r.app.thread.scheduleSendResult(r, list);
return;
} catch (Exception e) {
- Log.w(TAG, "Exception thrown sending result to " + r, e);
+ Slog.w(TAG, "Exception thrown sending result to " + r, e);
}
}
@@ -4264,7 +4374,7 @@
*/
private final boolean destroyActivityLocked(HistoryRecord r,
boolean removeFromApp) {
- if (DEBUG_SWITCH) Log.v(
+ if (DEBUG_SWITCH) Slog.v(
TAG, "Removing activity: token=" + r
+ ", app=" + (r.app != null ? r.app.processName : "(null)"));
EventLog.writeEvent(EventLogTags.AM_DESTROY_ACTIVITY,
@@ -4296,14 +4406,14 @@
boolean skipDestroy = false;
try {
- if (DEBUG_SWITCH) Log.i(TAG, "Destroying: " + r);
+ if (DEBUG_SWITCH) Slog.i(TAG, "Destroying: " + r);
r.app.thread.scheduleDestroyActivity(r, r.finishing,
r.configChangeFlags);
} catch (Exception e) {
// We can just ignore exceptions here... if the process
// has crashed, our death notification will clean things
// up.
- //Log.w(TAG, "Exception thrown during finish", e);
+ //Slog.w(TAG, "Exception thrown during finish", e);
if (r.finishing) {
removeActivityFromHistoryLocked(r);
removedFromHistory = true;
@@ -4335,7 +4445,7 @@
r.configChangeFlags = 0;
if (!mLRUActivities.remove(r) && hadApp) {
- Log.w(TAG, "Activity " + r + " being finished, but not in LRU list");
+ Slog.w(TAG, "Activity " + r + " being finished, but not in LRU list");
}
return removedFromHistory;
@@ -4343,16 +4453,16 @@
private static void removeHistoryRecordsForAppLocked(ArrayList list, ProcessRecord app) {
int i = list.size();
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Removing app " + app + " from list " + list
+ " with " + i + " entries");
while (i > 0) {
i--;
HistoryRecord r = (HistoryRecord)list.get(i);
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Record #" + i + " " + r + ": app=" + r.app);
if (r.app == app) {
- if (localLOGV) Log.v(TAG, "Removing this entry!");
+ if (localLOGV) Slog.v(TAG, "Removing this entry!");
list.remove(i);
}
}
@@ -4372,7 +4482,7 @@
// Just in case...
if (mPausingActivity != null && mPausingActivity.app == app) {
- if (DEBUG_PAUSE) Log.v(TAG, "App died while pausing: " + mPausingActivity);
+ if (DEBUG_PAUSE) Slog.v(TAG, "App died while pausing: " + mPausingActivity);
mPausingActivity = null;
}
if (mLastPausedActivity != null && mLastPausedActivity.app == app) {
@@ -4390,16 +4500,16 @@
// Clean out the history list.
int i = mHistory.size();
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Removing app " + app + " from history with " + i + " entries");
while (i > 0) {
i--;
HistoryRecord r = (HistoryRecord)mHistory.get(i);
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Record #" + i + " " + r + ": app=" + r.app);
if (r.app == app) {
if ((!r.haveState && !r.stateNotNeeded) || r.finishing) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Removing this entry! frozen=" + r.haveState
+ " finishing=" + r.finishing);
mHistory.remove(i);
@@ -4414,7 +4524,7 @@
} else {
// We have the current state for this activity, so
// it can be restarted later when needed.
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Keeping entry, setting app to null");
if (r.visible) {
hasVisibleActivities = true;
@@ -4435,7 +4545,7 @@
app.activities.clear();
if (app.instrumentationClass != null) {
- Log.w(TAG, "Crash of app " + app.processName
+ Slog.w(TAG, "Crash of app " + app.processName
+ " running instrumentation " + app.instrumentationClass);
Bundle info = new Bundle();
info.putString("shortMsg", "Process crashed.");
@@ -4484,11 +4594,13 @@
mProcDeaths[0]++;
- if (app.thread != null && app.thread.asBinder() == thread.asBinder()) {
- Log.i(TAG, "Process " + app.processName + " (pid " + pid
+ // Clean up already done if the process has been re-started.
+ if (app.pid == pid && app.thread != null &&
+ app.thread.asBinder() == thread.asBinder()) {
+ Slog.i(TAG, "Process " + app.processName + " (pid " + pid
+ ") has died.");
EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.pid, app.processName);
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Dying app: " + app + ", pid: " + pid
+ ", thread: " + thread.asBinder());
boolean doLowMem = app.instrumentationClass == null;
@@ -4508,7 +4620,7 @@
}
if (!haveBg) {
- Log.i(TAG, "Low Memory: No more background processes.");
+ Slog.i(TAG, "Low Memory: No more background processes.");
EventLog.writeEvent(EventLogTags.AM_LOW_MEMORY, mLruProcesses.size());
long now = SystemClock.uptimeMillis();
for (int i=mLruProcesses.size()-1; i>=0; i--) {
@@ -4532,8 +4644,13 @@
scheduleAppGcsLocked();
}
}
+ } else if (app.pid != pid) {
+ // A new process has already been started.
+ Slog.i(TAG, "Process " + app.processName + " (pid " + pid
+ + ") has died and restarted (pid " + app.pid + ").");
+ EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.pid, app.processName);
} else if (DEBUG_PROCESSES) {
- Log.d(TAG, "Received spurious death notification for thread "
+ Slog.d(TAG, "Received spurious death notification for thread "
+ thread.asBinder());
}
}
@@ -4559,7 +4676,7 @@
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);
+ Slog.w(TAG, "Unable to prepare ANR traces file: " + tracesPath, e);
return null;
}
@@ -4639,7 +4756,7 @@
info.append(cpuInfo);
}
- Log.e(TAG, info.toString());
+ Slog.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);
@@ -4712,7 +4829,7 @@
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.PERSISTENT_ACTIVITY;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
@@ -4724,26 +4841,26 @@
HistoryRecord r = (HistoryRecord)mHistory.get(index);
ProcessRecord app = r.app;
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Setting persistence " + isPersistent + ": " + r);
if (isPersistent) {
if (r.persistent) {
// Okay okay, I heard you already!
- if (localLOGV) Log.v(TAG, "Already persistent!");
+ if (localLOGV) Slog.v(TAG, "Already persistent!");
return;
}
r.persistent = true;
app.persistentActivities++;
- if (localLOGV) Log.v(TAG, "Num persistent now: " + app.persistentActivities);
+ if (localLOGV) Slog.v(TAG, "Num persistent now: " + app.persistentActivities);
if (app.persistentActivities > 1) {
// We aren't the first...
- if (localLOGV) Log.v(TAG, "Not the first!");
+ if (localLOGV) Slog.v(TAG, "Not the first!");
return;
}
if (app.persistent) {
// This would be redundant.
- if (localLOGV) Log.v(TAG, "App is persistent!");
+ if (localLOGV) Slog.v(TAG, "App is persistent!");
return;
}
@@ -4781,7 +4898,7 @@
} catch (RemoteException e) {
}
if (pkgUid == -1) {
- Log.w(TAG, "Invalid packageName:" + packageName);
+ Slog.w(TAG, "Invalid packageName:" + packageName);
return false;
}
if (uid == pkgUid || checkComponentPermission(
@@ -4822,7 +4939,7 @@
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.KILL_BACKGROUND_PROCESSES;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
@@ -4836,7 +4953,7 @@
} catch (RemoteException e) {
}
if (pkgUid == -1) {
- Log.w(TAG, "Invalid packageName: " + packageName);
+ Slog.w(TAG, "Invalid packageName: " + packageName);
return;
}
killPackageProcessesLocked(packageName, pkgUid,
@@ -4854,7 +4971,7 @@
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.FORCE_STOP_PACKAGES;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
@@ -4868,7 +4985,7 @@
} catch (RemoteException e) {
}
if (pkgUid == -1) {
- Log.w(TAG, "Invalid packageName: " + packageName);
+ Slog.w(TAG, "Invalid packageName: " + packageName);
return;
}
forceStopPackageLocked(packageName, pkgUid);
@@ -4888,7 +5005,7 @@
}
// Make sure the uid is valid.
if (uid < 0) {
- Log.w(TAG, "Invalid uid specified for pkg : " + pkg);
+ Slog.w(TAG, "Invalid uid specified for pkg : " + pkg);
return;
}
int callerUid = Binder.getCallingUid();
@@ -4971,7 +5088,7 @@
// If the other end already died, then our work here is done.
}
} else {
- Log.w(TAG, "Process/uid not found attempting kill of "
+ Slog.w(TAG, "Process/uid not found attempting kill of "
+ processName + " / " + uid);
}
}
@@ -5040,7 +5157,7 @@
}
if (doit) {
- Log.i(TAG, "Force stopping package " + name + " uid=" + uid);
+ Slog.i(TAG, "Force stopping package " + name + " uid=" + uid);
Iterator<SparseArray<Long>> badApps = mProcessCrashTimes.getMap().values().iterator();
while (badApps.hasNext()) {
@@ -5061,7 +5178,7 @@
return true;
}
didSomething = true;
- Log.i(TAG, " Force finishing activity " + r);
+ Slog.i(TAG, " Force finishing activity " + r);
if (r.app != null) {
r.app.removed = true;
}
@@ -5077,7 +5194,7 @@
return true;
}
didSomething = true;
- Log.i(TAG, " Force stopping service " + service);
+ Slog.i(TAG, " Force stopping service " + service);
if (service.app != null) {
service.app.removed = true;
}
@@ -5107,7 +5224,7 @@
private final boolean removeProcessLocked(ProcessRecord app, boolean callerWillRestart) {
final String name = app.processName;
final int uid = app.info.uid;
- if (DEBUG_PROCESSES) Log.d(
+ if (DEBUG_PROCESSES) Slog.d(
TAG, "Force removing process " + app + " (" + name
+ "/" + uid + ")");
@@ -5149,7 +5266,7 @@
}
if (gone) {
- Log.w(TAG, "Process " + app + " failed to attach");
+ Slog.w(TAG, "Process " + app + " failed to attach");
EventLog.writeEvent(EventLogTags.AM_PROCESS_START_TIMEOUT, pid, app.info.uid,
app.processName);
mProcessNames.remove(app.processName, app.info.uid);
@@ -5160,7 +5277,7 @@
ServiceRecord sr = mPendingServices.get(i);
if (app.info.uid == sr.appInfo.uid
&& app.processName.equals(sr.processName)) {
- Log.w(TAG, "Forcing bringing down service: " + sr);
+ Slog.w(TAG, "Forcing bringing down service: " + sr);
mPendingServices.remove(i);
i--;
bringDownServiceLocked(sr, true);
@@ -5168,7 +5285,7 @@
}
Process.killProcess(pid);
if (mBackupTarget != null && mBackupTarget.app.pid == pid) {
- Log.w(TAG, "Unattached app died before backup, skipping");
+ Slog.w(TAG, "Unattached app died before backup, skipping");
try {
IBackupManager bm = IBackupManager.Stub.asInterface(
ServiceManager.getService(Context.BACKUP_SERVICE));
@@ -5178,12 +5295,12 @@
}
}
if (mPendingBroadcast != null && mPendingBroadcast.curApp.pid == pid) {
- Log.w(TAG, "Unattached app died before broadcast acknowledged, skipping");
+ Slog.w(TAG, "Unattached app died before broadcast acknowledged, skipping");
mPendingBroadcast = null;
scheduleBroadcastsLocked();
}
} else {
- Log.w(TAG, "Spurious process start timeout - pid not known for " + app);
+ Slog.w(TAG, "Spurious process start timeout - pid not known for " + app);
}
}
@@ -5206,7 +5323,7 @@
}
if (app == null) {
- Log.w(TAG, "No pending application record for pid " + pid
+ Slog.w(TAG, "No pending application record for pid " + pid
+ " (IApplicationThread " + thread + "); dropping process");
EventLog.writeEvent(EventLogTags.AM_DROP_PROCESS, pid);
if (pid > 0 && pid != MY_PID) {
@@ -5229,7 +5346,7 @@
// Tell the process all about itself.
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Binding process pid " + pid + " to record " + app);
String processName = app.processName;
@@ -5258,10 +5375,10 @@
List providers = normalMode ? generateApplicationProvidersLocked(app) : null;
if (!normalMode) {
- Log.i(TAG, "Launching preboot mode app: " + app);
+ Slog.i(TAG, "Launching preboot mode app: " + app);
}
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "New app record " + app
+ " thread=" + thread.asBinder() + " pid=" + pid);
try {
@@ -5290,7 +5407,7 @@
if (app.instrumentationClass != null) {
ensurePackageDexOpt(app.instrumentationClass.getPackageName());
}
- if (DEBUG_CONFIGURATION) Log.v(TAG, "Binding proc "
+ if (DEBUG_CONFIGURATION) Slog.v(TAG, "Binding proc "
+ processName + " with config " + mConfiguration);
thread.bindApplication(processName, app.instrumentationInfo != null
? app.instrumentationInfo : app.info, providers,
@@ -5304,7 +5421,7 @@
// todo: Yikes! What should we do? For now we will try to
// start another process, but that could easily get us in
// an infinite loop of restarting processes...
- Log.w(TAG, "Exception thrown during bind!", e);
+ Slog.w(TAG, "Exception thrown during bind!", e);
app.resetPackageList();
startProcessLocked(app, "bind fail", processName);
@@ -5328,7 +5445,7 @@
didSomething = true;
}
} catch (Exception e) {
- Log.w(TAG, "Exception in new application when starting activity "
+ Slog.w(TAG, "Exception in new application when starting activity "
+ hr.intent.getComponent().flattenToShortString(), e);
badApp = true;
}
@@ -5354,7 +5471,7 @@
didSomething = true;
}
} catch (Exception e) {
- Log.w(TAG, "Exception in new application when starting service "
+ Slog.w(TAG, "Exception in new application when starting service "
+ sr.shortName, e);
badApp = true;
}
@@ -5368,24 +5485,26 @@
processCurBroadcastLocked(br, app);
didSomething = true;
} catch (Exception e) {
- Log.w(TAG, "Exception in new application when starting receiver "
+ Slog.w(TAG, "Exception in new application when starting receiver "
+ br.curComponent.flattenToShortString(), e);
badApp = true;
logBroadcastReceiverDiscard(br);
finishReceiverLocked(br.receiver, br.resultCode, br.resultData,
br.resultExtras, br.resultAbort, true);
scheduleBroadcastsLocked();
+ // We need to reset the state if we fails to start the receiver.
+ br.state = BroadcastRecord.IDLE;
}
}
// Check whether the next backup agent is in this process...
if (!badApp && mBackupTarget != null && mBackupTarget.appInfo.uid == app.info.uid) {
- if (DEBUG_BACKUP) Log.v(TAG, "New app is backup target, launching agent for " + app);
+ if (DEBUG_BACKUP) Slog.v(TAG, "New app is backup target, launching agent for " + app);
ensurePackageDexOpt(mBackupTarget.appInfo.packageName);
try {
thread.scheduleCreateBackupAgent(mBackupTarget.appInfo, mBackupTarget.backupMode);
} catch (Exception e) {
- Log.w(TAG, "Exception scheduling backup agent creation: ");
+ Slog.w(TAG, "Exception scheduling backup agent creation: ");
e.printStackTrace();
}
}
@@ -5431,7 +5550,7 @@
&& !mResumedActivity.waitingVisible;
for (int i=0; i<N; i++) {
HistoryRecord s = mStoppingActivities.get(i);
- if (localLOGV) Log.v(TAG, "Stopping " + s + ": nowVisible="
+ if (localLOGV) Slog.v(TAG, "Stopping " + s + ": nowVisible="
+ nowVisible + " waitingVisible=" + s.waitingVisible
+ " finishing=" + s.finishing);
if (s.waitingVisible && nowVisible) {
@@ -5443,12 +5562,12 @@
// so get rid of it. Otherwise, we need to go through the
// normal flow and hide it once we determine that it is
// hidden by the activities in front of it.
- if (localLOGV) Log.v(TAG, "Before stopping, can hide: " + s);
+ if (localLOGV) Slog.v(TAG, "Before stopping, can hide: " + s);
mWindowManager.setAppVisibility(s, false);
}
}
if (!s.waitingVisible && remove) {
- if (localLOGV) Log.v(TAG, "Ready to stop: " + s);
+ if (localLOGV) Slog.v(TAG, "Ready to stop: " + s);
if (stops == null) {
stops = new ArrayList<HistoryRecord>();
}
@@ -5470,7 +5589,7 @@
final void activityIdleInternal(IBinder token, boolean fromTimeout,
Configuration config) {
- if (localLOGV) Log.v(TAG, "Activity idle: " + token);
+ if (localLOGV) Slog.v(TAG, "Activity idle: " + token);
ArrayList<HistoryRecord> stops = null;
ArrayList<HistoryRecord> finishes = null;
@@ -5492,6 +5611,10 @@
if (index >= 0) {
HistoryRecord r = (HistoryRecord)mHistory.get(index);
+ if (fromTimeout) {
+ reportActivityLaunchedLocked(fromTimeout, r, -1, -1);
+ }
+
// This is a hack to semi-deal with a race condition
// in the client where it can be constructed with a
// newer configuration from when we asked it to launch.
@@ -5518,14 +5641,17 @@
// If this activity is fullscreen, set up to hide those under it.
- if (DEBUG_VISBILITY) Log.v(TAG, "Idle activity for " + r);
+ if (DEBUG_VISBILITY) Slog.v(TAG, "Idle activity for " + r);
ensureActivitiesVisibleLocked(null, 0);
- //Log.i(TAG, "IDLE: mBooted=" + mBooted + ", fromTimeout=" + fromTimeout);
+ //Slog.i(TAG, "IDLE: mBooted=" + mBooted + ", fromTimeout=" + fromTimeout);
if (!mBooted && !fromTimeout) {
mBooted = true;
enableScreen = true;
}
+
+ } else if (fromTimeout) {
+ reportActivityLaunchedLocked(fromTimeout, null, -1, -1);
}
// Atomically retrieve all of the other things to do.
@@ -5551,7 +5677,7 @@
try {
sendThumbnail.requestThumbnail(token);
} catch (Exception e) {
- Log.w(TAG, "Exception thrown when requesting thumbnail", e);
+ Slog.w(TAG, "Exception thrown when requesting thumbnail", e);
sendPendingThumbnail(null, token, null, null, true);
}
}
@@ -5670,7 +5796,7 @@
}
final void activityPaused(IBinder token, Bundle icicle, boolean timeout) {
- if (DEBUG_PAUSE) Log.v(
+ if (DEBUG_PAUSE) Slog.v(
TAG, "Activity paused: token=" + token + ", icicle=" + icicle
+ ", timeout=" + timeout);
@@ -5700,7 +5826,7 @@
public final void activityStopped(IBinder token, Bitmap thumbnail,
CharSequence description) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Activity stopped: token=" + token);
HistoryRecord r = null;
@@ -5734,7 +5860,7 @@
}
public final void activityDestroyed(IBinder token) {
- if (DEBUG_SWITCH) Log.v(TAG, "ACTIVITY DESTROYED: " + token);
+ if (DEBUG_SWITCH) Slog.v(TAG, "ACTIVITY DESTROYED: " + token);
synchronized (this) {
mHandler.removeMessages(DESTROY_TIMEOUT_MSG, token);
@@ -5825,7 +5951,7 @@
+ ", uid=" + Binder.getCallingUid()
+ ", (need uid=" + uid + ")"
+ " is not allowed to send as package " + packageName;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
}
@@ -5897,7 +6023,7 @@
+ ", uid=" + Binder.getCallingUid()
+ " is not allowed to cancel packges "
+ rec.key.packageName;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
} catch (RemoteException e) {
@@ -5968,7 +6094,7 @@
synchronized (mPidsSelfLocked) {
ProcessRecord pr = mPidsSelfLocked.get(pid);
if (pr == null) {
- Log.w(TAG, "setProcessForeground called on unknown pid: " + pid);
+ Slog.w(TAG, "setProcessForeground called on unknown pid: " + pid);
return;
}
ForegroundToken oldToken = mForegroundProcesses.get(pid);
@@ -6030,7 +6156,7 @@
// client identity accordingly before proceeding.
Identity tlsIdentity = sCallerIdentity.get();
if (tlsIdentity != null) {
- Log.d(TAG, "checkComponentPermission() adjusting {pid,uid} to {"
+ Slog.d(TAG, "checkComponentPermission() adjusting {pid,uid} to {"
+ tlsIdentity.pid + "," + tlsIdentity.uid + "}");
uid = tlsIdentity.uid;
pid = tlsIdentity.pid;
@@ -6043,7 +6169,7 @@
}
// If the target requires a specific UID, always fail for others.
if (reqUid >= 0 && uid != reqUid) {
- Log.w(TAG, "Permission denied: checkComponentPermission() reqUid=" + reqUid);
+ Slog.w(TAG, "Permission denied: checkComponentPermission() reqUid=" + reqUid);
return PackageManager.PERMISSION_DENIED;
}
if (permission == null) {
@@ -6054,7 +6180,7 @@
.checkUidPermission(permission, uid);
} catch (RemoteException e) {
// Should never happen, but if it does... deny!
- Log.e(TAG, "PackageManager is dead?!?", e);
+ Slog.e(TAG, "PackageManager is dead?!?", e);
}
return PackageManager.PERMISSION_DENIED;
}
@@ -6098,7 +6224,7 @@
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + permission;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
@@ -6166,10 +6292,15 @@
return;
}
+ if (DEBUG_URI_PERMISSION) Slog.v(TAG,
+ "Requested grant " + targetPkg + " permission to " + uri);
+
final IPackageManager pm = ActivityThread.getPackageManager();
// If this is not a content: uri, we can't do anything with it.
if (!ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())) {
+ if (DEBUG_URI_PERMISSION) Slog.v(TAG,
+ "Can't grant URI permission for non-content URI: " + uri);
return;
}
@@ -6187,7 +6318,7 @@
}
}
if (pi == null) {
- Log.w(TAG, "No content provider found for: " + name);
+ Slog.w(TAG, "No content provider found for: " + name);
return;
}
@@ -6195,6 +6326,8 @@
try {
targetUid = pm.getPackageUid(targetPkg);
if (targetUid < 0) {
+ if (DEBUG_URI_PERMISSION) Slog.v(TAG,
+ "Can't grant URI permission no uid for: " + targetPkg);
return;
}
} catch (RemoteException ex) {
@@ -6204,17 +6337,12 @@
// First... does the target actually need this permission?
if (checkHoldingPermissionsLocked(pm, pi, targetUid, modeFlags)) {
// No need to grant the target this permission.
+ if (DEBUG_URI_PERMISSION) Slog.v(TAG,
+ "Target " + targetPkg + " already has full permission to " + uri);
return;
}
- // Second... maybe someone else has already granted the
- // permission?
- if (checkUriPermissionLocked(uri, targetUid, modeFlags)) {
- // No need to grant the target this permission.
- return;
- }
-
- // Third... is the provider allowing granting of URI permissions?
+ // Second... is the provider allowing granting of URI permissions?
if (!pi.grantUriPermissions) {
throw new SecurityException("Provider " + pi.packageName
+ "/" + pi.name
@@ -6239,7 +6367,7 @@
}
}
- // Fourth... does the caller itself have permission to access
+ // Third... does the caller itself have permission to access
// this uri?
if (!checkHoldingPermissionsLocked(pm, pi, callingUid, modeFlags)) {
if (!checkUriPermissionLocked(uri, callingUid, modeFlags)) {
@@ -6252,6 +6380,9 @@
// to the uri, and the target doesn't. Let's now give this to
// the target.
+ if (DEBUG_URI_PERMISSION) Slog.v(TAG,
+ "Granting " + targetPkg + " permission to " + uri);
+
HashMap<Uri, UriPermission> targetUris
= mGrantedUriPermissions.get(targetUid);
if (targetUris == null) {
@@ -6306,11 +6437,11 @@
+ " when granting permission to uri " + uri);
}
if (targetPkg == null) {
- Log.w(TAG, "grantUriPermission: null target");
+ Slog.w(TAG, "grantUriPermission: null target");
return;
}
if (uri == null) {
- Log.w(TAG, "grantUriPermission: null uri");
+ Slog.w(TAG, "grantUriPermission: null uri");
return;
}
@@ -6325,6 +6456,8 @@
HashMap<Uri, UriPermission> perms
= mGrantedUriPermissions.get(perm.uid);
if (perms != null) {
+ if (DEBUG_URI_PERMISSION) Slog.v(TAG,
+ "Removing " + perm.uid + " permission to " + perm.uri);
perms.remove(perm.uri);
if (perms.size() == 0) {
mGrantedUriPermissions.remove(perm.uid);
@@ -6364,6 +6497,9 @@
return;
}
+ if (DEBUG_URI_PERMISSION) Slog.v(TAG,
+ "Revoking all granted permissions to " + uri);
+
final IPackageManager pm = ActivityThread.getPackageManager();
final String authority = uri.getAuthority();
@@ -6380,7 +6516,7 @@
}
}
if (pi == null) {
- Log.w(TAG, "No content provider found for: " + authority);
+ Slog.w(TAG, "No content provider found for: " + authority);
return;
}
@@ -6422,6 +6558,8 @@
continue toploop;
}
}
+ if (DEBUG_URI_PERMISSION) Slog.v(TAG,
+ "Revoking " + perm.uid + " permission to " + perm.uri);
perm.clearModes(modeFlags);
if (perm.modeFlags == 0) {
it.remove();
@@ -6447,7 +6585,7 @@
+ " when revoking permission to uri " + uri);
}
if (uri == null) {
- Log.w(TAG, "revokeUriPermission: null uri");
+ Slog.w(TAG, "revokeUriPermission: null uri");
return;
}
@@ -6473,7 +6611,7 @@
}
}
if (pi == null) {
- Log.w(TAG, "No content provider found for: " + authority);
+ Slog.w(TAG, "No content provider found for: " + authority);
return;
}
@@ -6515,7 +6653,7 @@
HistoryRecord topRecord = null;
synchronized(this) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "getTasks: max=" + maxNum + ", flags=" + flags
+ ", receiver=" + receiver);
@@ -6533,7 +6671,7 @@
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.GET_TASKS;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
@@ -6569,7 +6707,7 @@
topDescription = r.description;
}
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, r.intent.getComponent().flattenToShortString()
+ ": task=" + r.task);
@@ -6588,7 +6726,7 @@
//System.out.println(
// "#" + maxNum + ": " + " descr=" + ci.description);
if (ci.thumbnail == null && receiver != null) {
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "State=" + top.state + "Idle=" + top.idle
+ " app=" + top.app
+ " thr=" + (top.app != null ? top.app.thread : null));
@@ -6618,14 +6756,14 @@
}
}
- if (localLOGV) Log.v(TAG, "We have pending thumbnails: " + pending);
+ if (localLOGV) Slog.v(TAG, "We have pending thumbnails: " + pending);
if (topThumbnail != null) {
- if (localLOGV) Log.v(TAG, "Requesting top thumbnail");
+ if (localLOGV) Slog.v(TAG, "Requesting top thumbnail");
try {
topThumbnail.requestThumbnail(topRecord);
} catch (Exception e) {
- Log.w(TAG, "Exception thrown when requesting thumbnail", e);
+ Slog.w(TAG, "Exception thrown when requesting thumbnail", e);
sendPendingThumbnail(null, topRecord, null, null, true);
}
}
@@ -6798,7 +6936,7 @@
// same task affinity as the one we are moving,
// then merge it into the same task.
target.task = p.task;
- if (DEBUG_TASKS) Log.v(TAG, "Start pushing activity " + target
+ if (DEBUG_TASKS) Slog.v(TAG, "Start pushing activity " + target
+ " out to bottom task " + p.task);
} else {
mCurTask++;
@@ -6808,7 +6946,7 @@
target.task = new TaskRecord(mCurTask, target.info, null,
(target.info.flags&ActivityInfo.FLAG_CLEAR_TASK_ON_LAUNCH) != 0);
target.task.affinityIntent = target.intent;
- if (DEBUG_TASKS) Log.v(TAG, "Start pushing activity " + target
+ if (DEBUG_TASKS) Slog.v(TAG, "Start pushing activity " + target
+ " out to new task " + target.task);
}
mWindowManager.setAppGroupId(target, task.taskId);
@@ -6821,7 +6959,7 @@
if (p.finishing) {
continue;
}
- if (DEBUG_TASKS) Log.v(TAG, "Pushing next activity " + p
+ if (DEBUG_TASKS) Slog.v(TAG, "Pushing next activity " + p
+ " out to target's task " + target.task);
task.numActivities--;
p.task = target.task;
@@ -6958,7 +7096,7 @@
p.task.numActivities--;
p.task = task;
mHistory.add(lastReparentPos, p);
- if (DEBUG_TASKS) Log.v(TAG, "Pulling activity " + p
+ if (DEBUG_TASKS) Slog.v(TAG, "Pulling activity " + p
+ " in to resetting task " + task);
task.numActivities++;
mWindowManager.moveAppToken(lastReparentPos, p);
@@ -7034,7 +7172,7 @@
}
private final void moveTaskToFrontLocked(TaskRecord tr, HistoryRecord reason) {
- if (DEBUG_SWITCH) Log.v(TAG, "moveTaskToFront: " + tr);
+ if (DEBUG_SWITCH) Slog.v(TAG, "moveTaskToFront: " + tr);
final int task = tr.taskId;
int top = mHistory.size()-1;
@@ -7055,11 +7193,11 @@
// of the stack, keeping them in the same internal order.
while (pos >= 0) {
HistoryRecord r = (HistoryRecord)mHistory.get(pos);
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "At " + pos + " ckp " + r.task + ": " + r);
boolean first = true;
if (r.task.taskId == task) {
- if (localLOGV) Log.v(TAG, "Removing and adding at " + top);
+ if (localLOGV) Slog.v(TAG, "Removing and adding at " + top);
mHistory.remove(pos);
mHistory.add(top, r);
moved.add(0, r);
@@ -7072,7 +7210,7 @@
pos--;
}
- if (DEBUG_TRANSITION) Log.v(TAG,
+ if (DEBUG_TRANSITION) Slog.v(TAG,
"Prepare to front transition: task=" + tr);
if (reason != null &&
(reason.intent.getFlags()&Intent.FLAG_ACTIVITY_NO_ANIMATION) != 0) {
@@ -7148,7 +7286,7 @@
* @return Returns true if the move completed, false if not.
*/
private final boolean moveTaskToBackLocked(int task, HistoryRecord reason) {
- Log.i(TAG, "moveTaskToBack: " + task);
+ Slog.i(TAG, "moveTaskToBack: " + task);
// If we have a watcher, preflight the move before committing to it. First check
// for *other* available tasks, but if none are available, then try again allowing the
@@ -7174,7 +7312,7 @@
ArrayList moved = new ArrayList();
- if (DEBUG_TRANSITION) Log.v(TAG,
+ if (DEBUG_TRANSITION) Slog.v(TAG,
"Prepare to back transition: task=" + task);
final int N = mHistory.size();
@@ -7185,10 +7323,10 @@
// of the stack, keeping them in the same internal order.
while (pos < N) {
HistoryRecord r = (HistoryRecord)mHistory.get(pos);
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "At " + pos + " ckp " + r.task + ": " + r);
if (r.task.taskId == task) {
- if (localLOGV) Log.v(TAG, "Removing and adding at " + (N-1));
+ if (localLOGV) Slog.v(TAG, "Removing and adding at " + (N-1));
mHistory.remove(pos);
mHistory.add(bottom, r);
moved.add(r);
@@ -7232,7 +7370,7 @@
}
private final void moveTaskBackwardsLocked(int task) {
- Log.e(TAG, "moveTaskBackwards not yet implemented!");
+ Slog.e(TAG, "moveTaskBackwards not yet implemented!");
}
public int getTaskForActivity(IBinder token, boolean onlyRoot) {
@@ -7276,25 +7414,25 @@
if (!r.finishing && r.task != cp
&& r.launchMode != ActivityInfo.LAUNCH_SINGLE_INSTANCE) {
cp = r.task;
- //Log.i(TAG, "Comparing existing cls=" + r.task.intent.getComponent().flattenToShortString()
+ //Slog.i(TAG, "Comparing existing cls=" + r.task.intent.getComponent().flattenToShortString()
// + "/aff=" + r.task.affinity + " to new cls="
// + intent.getComponent().flattenToShortString() + "/aff=" + taskAffinity);
if (r.task.affinity != null) {
if (r.task.affinity.equals(info.taskAffinity)) {
- //Log.i(TAG, "Found matching affinity!");
+ //Slog.i(TAG, "Found matching affinity!");
return r;
}
} else if (r.task.intent != null
&& r.task.intent.getComponent().equals(cls)) {
- //Log.i(TAG, "Found matching class!");
+ //Slog.i(TAG, "Found matching class!");
//dump();
- //Log.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
+ //Slog.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
return r;
} else if (r.task.affinityIntent != null
&& r.task.affinityIntent.getComponent().equals(cls)) {
- //Log.i(TAG, "Found matching class!");
+ //Slog.i(TAG, "Found matching class!");
//dump();
- //Log.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
+ //Slog.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
return r;
}
}
@@ -7319,9 +7457,9 @@
HistoryRecord r = (HistoryRecord)mHistory.get(i);
if (!r.finishing) {
if (r.intent.getComponent().equals(cls)) {
- //Log.i(TAG, "Found matching class!");
+ //Slog.i(TAG, "Found matching class!");
//dump();
- //Log.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
+ //Slog.i(TAG, "For Intent " + intent + " bringing to top: " + r.intent);
return r;
}
}
@@ -7426,7 +7564,7 @@
pr.receiver.finished();
}
} catch (Exception e) {
- Log.w(TAG, "Exception thrown when sending thumbnail", e);
+ Slog.w(TAG, "Exception thrown when sending thumbnail", e);
}
}
}
@@ -7503,7 +7641,7 @@
+ " from " + (r != null ? r : "(null)") + " (pid=" + callingPid
+ ", uid=" + callingUid + ") requires "
+ cpi.readPermission + " or " + cpi.writePermission;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
return msg;
}
@@ -7552,7 +7690,7 @@
// In this case the provider instance already exists, so we can
// return it right away.
if (r != null) {
- if (DEBUG_PROVIDER) Log.v(TAG,
+ if (DEBUG_PROVIDER) Slog.v(TAG,
"Adding provider requested by "
+ r.processName + " from process "
+ cpr.info.processName);
@@ -7590,6 +7728,15 @@
? cpi.readPermission : cpi.writePermission);
}
+ if (!mSystemReady && !mDidUpdate && !mWaitingUpdate
+ && !cpi.processName.equals("system")) {
+ // If this content provider does not run in the system
+ // process, and the system is not yet ready to run other
+ // processes, then fail fast instead of hanging.
+ throw new IllegalArgumentException(
+ "Attempt to launch content provider before system ready");
+ }
+
cpr = (ContentProviderRecord)mProvidersByClass.get(cpi.name);
final boolean firstClass = cpr == null;
if (firstClass) {
@@ -7600,7 +7747,7 @@
cpi.applicationInfo.packageName,
STOCK_PM_FLAGS);
if (ai == null) {
- Log.w(TAG, "No package info for content provider "
+ Slog.w(TAG, "No package info for content provider "
+ cpi.name);
return null;
}
@@ -7620,7 +7767,7 @@
if (DEBUG_PROVIDER) {
RuntimeException e = new RuntimeException("here");
- Log.w(TAG, "LAUNCHING REMOTE PROVIDER (myuid " + r.info.uid
+ Slog.w(TAG, "LAUNCHING REMOTE PROVIDER (myuid " + r.info.uid
+ " pruid " + cpr.appInfo.uid + "): " + cpr.info.name, e);
}
@@ -7644,7 +7791,7 @@
new ComponentName(cpi.applicationInfo.packageName,
cpi.name), false);
if (proc == null) {
- Log.w(TAG, "Unable to launch app "
+ Slog.w(TAG, "Unable to launch app "
+ cpi.applicationInfo.packageName + "/"
+ cpi.applicationInfo.uid + " for provider "
+ name + ": process is bad");
@@ -7663,7 +7810,7 @@
mProvidersByName.put(name, cpr);
if (r != null) {
- if (DEBUG_PROVIDER) Log.v(TAG,
+ if (DEBUG_PROVIDER) Slog.v(TAG,
"Adding provider requested by "
+ r.processName + " from process "
+ cpr.info.processName);
@@ -7684,7 +7831,7 @@
synchronized (cpr) {
while (cpr.provider == null) {
if (cpr.launchingApp == null) {
- Log.w(TAG, "Unable to launch app "
+ Slog.w(TAG, "Unable to launch app "
+ cpi.applicationInfo.packageName + "/"
+ cpi.applicationInfo.uid + " for provider "
+ name + ": launching app became null");
@@ -7707,7 +7854,7 @@
if (caller == null) {
String msg = "null IApplicationThread when getting content provider "
+ name;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
@@ -7727,7 +7874,7 @@
ContentProviderRecord cpr = (ContentProviderRecord)mProvidersByName.get(name);
if(cpr == null) {
// remove from mProvidersByClass
- if (DEBUG_PROVIDER) Log.v(TAG, name +
+ if (DEBUG_PROVIDER) Slog.v(TAG, name +
" provider not found in providers list");
return;
}
@@ -7740,12 +7887,12 @@
//update content provider record entry info
ContentProviderRecord localCpr = (ContentProviderRecord)
mProvidersByClass.get(cpr.info.name);
- if (DEBUG_PROVIDER) Log.v(TAG, "Removing provider requested by "
+ if (DEBUG_PROVIDER) Slog.v(TAG, "Removing provider requested by "
+ r.info.processName + " from process "
+ localCpr.appInfo.processName);
if (localCpr.app == r) {
//should not happen. taken care of as a local provider
- Log.w(TAG, "removeContentProvider called on local provider: "
+ Slog.w(TAG, "removeContentProvider called on local provider: "
+ cpr.info.name + " in process " + r.processName);
return;
} else {
@@ -7766,7 +7913,7 @@
ContentProviderRecord cpr = (ContentProviderRecord)mProvidersByName.get(name);
if(cpr == null) {
//remove from mProvidersByClass
- if(localLOGV) Log.v(TAG, name+" content provider not found in providers list");
+ if(localLOGV) Slog.v(TAG, name+" content provider not found in providers list");
return;
}
@@ -7774,7 +7921,7 @@
ContentProviderRecord localCpr = (ContentProviderRecord) mProvidersByClass.get(cpr.info.name);
localCpr.externals--;
if (localCpr.externals < 0) {
- Log.e(TAG, "Externals < 0 for content provider " + localCpr);
+ Slog.e(TAG, "Externals < 0 for content provider " + localCpr);
}
updateOomAdjLocked();
}
@@ -7837,6 +7984,16 @@
public static final void installSystemProviders() {
ProcessRecord app = mSelf.mProcessNames.get("system", Process.SYSTEM_UID);
List providers = mSelf.generateApplicationProvidersLocked(app);
+ if (providers != null) {
+ for (int i=providers.size()-1; i>=0; i--) {
+ ProviderInfo pi = (ProviderInfo)providers.get(i);
+ if ((pi.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) == 0) {
+ Slog.w(TAG, "Not installing system proc provider " + pi.name
+ + ": not system .apk");
+ providers.remove(i);
+ }
+ }
+ }
mSystemThread.installSystemProviders(providers);
}
@@ -7883,7 +8040,7 @@
synchronized(this) {
int count = mHistory.size();
- if (DEBUG_SWITCH) Log.d(
+ if (DEBUG_SWITCH) Slog.d(
TAG, "Performing unhandledBack(): stack size = " + count);
if (count > 1) {
final long origId = Binder.clearCallingIdentity();
@@ -7920,7 +8077,7 @@
// We've got the fd now, so we're done with the provider.
removeContentProviderExternal(name);
} else {
- Log.d(TAG, "Failed to get provider for authority '" + name + "'");
+ Slog.d(TAG, "Failed to get provider for authority '" + name + "'");
}
return pfd;
}
@@ -7933,7 +8090,7 @@
if (mResumedActivity != null) {
pauseIfSleepingLocked();
} else {
- Log.w(TAG, "goingToSleep with no resumed activity!");
+ Slog.w(TAG, "goingToSleep with no resumed activity!");
}
}
}
@@ -7957,7 +8114,7 @@
while (mResumedActivity != null || mPausingActivity != null) {
long delay = endTime - System.currentTimeMillis();
if (delay <= 0) {
- Log.w(TAG, "Activity manager shutdown timed out");
+ Slog.w(TAG, "Activity manager shutdown timed out");
timedout = true;
break;
}
@@ -7989,8 +8146,8 @@
// one to pause. If we are pausing one, we will just let that stuff
// run and release the wake lock when all done.
if (mPausingActivity == null) {
- if (DEBUG_PAUSE) Log.v(TAG, "Sleep needs to pause...");
- if (DEBUG_USER_LEAVING) Log.v(TAG, "Sleep => pause with userLeaving=false");
+ if (DEBUG_PAUSE) Slog.v(TAG, "Sleep needs to pause...");
+ if (DEBUG_USER_LEAVING) Slog.v(TAG, "Sleep => pause with userLeaving=false");
startPausingLocked(false, true);
}
}
@@ -8052,7 +8209,7 @@
return true;
}
- Log.w(TAG, name + " request from " + callingUid + " stopped");
+ Slog.w(TAG, name + " request from " + callingUid + " stopped");
return false;
}
@@ -8199,7 +8356,7 @@
if (worstType < EMPTY_APP_ADJ && worstType > HIDDEN_APP_MIN_ADJ) {
worstType = HIDDEN_APP_MIN_ADJ;
}
- Log.w(TAG, "Killing processes for memory at adjustment " + worstType);
+ Slog.w(TAG, "Killing processes for memory at adjustment " + worstType);
for (int i=0; i<pids.length; i++) {
ProcessRecord proc = mPidsSelfLocked.get(pids[i]);
if (proc == null) {
@@ -8207,7 +8364,7 @@
}
int adj = proc.setAdj;
if (adj >= worstType) {
- Log.w(TAG, "Killing for memory: " + proc + " (adj "
+ Slog.w(TAG, "Killing for memory: " + proc + " (adj "
+ adj + ")");
EventLog.writeEvent(EventLogTags.AM_KILL_FOR_MEMORY, proc.pid,
proc.processName, adj);
@@ -8312,7 +8469,7 @@
if (proc.persistent) {
continue;
}
- //Log.i(TAG, "Proc " + proc + ": pss=" + proc.lastPss);
+ //Slog.i(TAG, "Proc " + proc + ": pss=" + proc.lastPss);
if (proc.lastPss == 0) {
stats.mNoPssCount++;
continue;
@@ -8375,7 +8532,7 @@
// change mConfiguration in-place.
mConfiguration.updateFrom(configuration);
mConfigurationSeq = mConfiguration.seq = 1;
- if (DEBUG_CONFIGURATION) Log.v(TAG, "Initial config: " + mConfiguration);
+ if (DEBUG_CONFIGURATION) Slog.v(TAG, "Initial config: " + mConfiguration);
}
}
@@ -8435,7 +8592,7 @@
}
};
}
- Log.i(TAG, "Sending system update to: " + intent.getComponent());
+ Slog.i(TAG, "Sending system update to: " + intent.getComponent());
broadcastIntentLocked(null, null, intent, null, finisher,
0, null, null, null, true, false, MY_PID, Process.SYSTEM_UID);
if (finisher != null) {
@@ -8472,13 +8629,13 @@
synchronized(this) {
for (int i=procsToKill.size()-1; i>=0; i--) {
ProcessRecord proc = procsToKill.get(i);
- Log.i(TAG, "Removing system update proc: " + proc);
+ Slog.i(TAG, "Removing system update proc: " + proc);
removeProcessLocked(proc, true);
}
}
}
- Log.i(TAG, "System now ready");
+ Slog.i(TAG, "System now ready");
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_AMS_READY,
SystemClock.uptimeMillis());
@@ -8623,7 +8780,7 @@
}
if (app.pid > 0 && app.pid != MY_PID) {
handleAppCrashLocked(app);
- Log.i(ActivityManagerService.TAG, "Killing process "
+ Slog.i(ActivityManagerService.TAG, "Killing process "
+ app.processName
+ " (pid=" + app.pid + ") at user's request");
Process.killProcess(app.pid);
@@ -8638,7 +8795,7 @@
app.info.uid);
if (crashTime != null && now < crashTime+MIN_CRASH_INTERVAL) {
// This process loses!
- Log.w(TAG, "Process " + app.info.processName
+ Slog.w(TAG, "Process " + app.info.processName
+ " has crashed too many times: killing!");
EventLog.writeEvent(EventLogTags.AM_PROCESS_CRASHED_TOO_MUCH,
app.info.processName, app.info.uid);
@@ -8646,7 +8803,7 @@
for (int i=mHistory.size()-1; i>=0; i--) {
HistoryRecord r = (HistoryRecord)mHistory.get(i);
if (r.app == app) {
- Log.w(TAG, " Force finishing activity "
+ Slog.w(TAG, " Force finishing activity "
+ r.intent.getComponent().flattenToShortString());
finishActivityLocked(r, i, Activity.RESULT_CANCELED, null, "crashed");
}
@@ -8702,7 +8859,7 @@
}
r = mPendingBroadcast;
if (r != null && r.curApp == app) {
- if (DEBUG_BROADCAST) Log.v(TAG,
+ if (DEBUG_BROADCAST) Slog.v(TAG,
"skip & discard pending app " + r);
logBroadcastReceiverDiscard(r);
finishReceiverLocked(r.receiver, r.resultCode, r.resultData,
@@ -8783,7 +8940,7 @@
}
}
- Log.w(TAG, "Can't find mystery application: " + app);
+ Slog.w(TAG, "Can't find mystery application: " + app);
return null;
}
}
@@ -8835,7 +8992,7 @@
}
}
} catch (RemoteException e) {
- Log.e(TAG, "Error getting package info: " + pkg, e);
+ Slog.e(TAG, "Error getting package info: " + pkg, e);
}
sb.append("\n");
}
@@ -8861,7 +9018,7 @@
try {
sb.append(FileUtils.readTextFile(logFile, 128 * 1024, "\n\n[[TRUNCATED]]"));
} catch (IOException e) {
- Log.e(TAG, "Error reading " + logFile, e);
+ Slog.e(TAG, "Error reading " + logFile, e);
}
}
if (crashInfo != null && crashInfo.stackTrace != null) {
@@ -8897,7 +9054,7 @@
int pid = r != null ? r.pid : Binder.getCallingPid();
if (!mController.appCrashed(name, pid,
shortMsg, longMsg, timeMillis, crashInfo.stackTrace)) {
- Log.w(TAG, "Force-killing crashed app " + name
+ Slog.w(TAG, "Force-killing crashed app " + name
+ " at watcher's request");
Process.killProcess(pid);
return;
@@ -8911,10 +9068,10 @@
// If this process is running instrumentation, finish it.
if (r != null && r.instrumentationClass != null) {
- Log.w(TAG, "Error in app " + r.processName
+ Slog.w(TAG, "Error in app " + r.processName
+ " running instrumentation " + r.instrumentationClass + ":");
- if (shortMsg != null) Log.w(TAG, " " + shortMsg);
- if (longMsg != null) Log.w(TAG, " " + longMsg);
+ if (shortMsg != null) Slog.w(TAG, " " + shortMsg);
+ if (longMsg != null) Slog.w(TAG, " " + longMsg);
Bundle info = new Bundle();
info.putString("shortMsg", shortMsg);
info.putString("longMsg", longMsg);
@@ -8958,7 +9115,7 @@
try {
mContext.startActivity(appErrorIntent);
} catch (ActivityNotFoundException e) {
- Log.w(TAG, "bug report receiver dissappeared", e);
+ Slog.w(TAG, "bug report receiver dissappeared", e);
}
}
}
@@ -9033,7 +9190,7 @@
}
errList.add(report);
} else {
- Log.w(TAG, "Missing app error report, app = " + app.processName +
+ Slog.w(TAG, "Missing app error report, app = " + app.processName +
" crashing = " + app.crashing +
" notResponding = " + app.notResponding);
}
@@ -9083,7 +9240,7 @@
if (app.adjTarget instanceof ComponentName) {
currApp.importanceReasonComponent = (ComponentName)app.adjTarget;
}
- //Log.v(TAG, "Proc " + app.processName + ": imp=" + currApp.importance
+ //Slog.v(TAG, "Proc " + app.processName + ": imp=" + currApp.importance
// + " lru=" + currApp.lru);
if (runList == null) {
runList = new ArrayList<ActivityManager.RunningAppProcessInfo>();
@@ -9942,7 +10099,7 @@
//c.conn.connected(r.className, null);
} catch (Exception e) {
// todo: this should be asynchronous!
- Log.w(TAG, "Exception thrown disconnected servce "
+ Slog.w(TAG, "Exception thrown disconnected servce "
+ r.shortName
+ " from app " + app.processName, e);
}
@@ -9982,7 +10139,7 @@
= sr.bindings.values().iterator();
while (bindings.hasNext()) {
IntentBindRecord b = bindings.next();
- if (DEBUG_SERVICE) Log.v(TAG, "Killing binding " + b
+ if (DEBUG_SERVICE) Slog.v(TAG, "Killing binding " + b
+ ": shouldUnbind=" + b.hasBound);
b.binder = null;
b.requested = b.received = b.hasBound = false;
@@ -9990,7 +10147,7 @@
}
if (sr.crashCount >= 2) {
- Log.w(TAG, "Service crashed " + sr.crashCount
+ Slog.w(TAG, "Service crashed " + sr.crashCount
+ " times, stopping: " + sr);
EventLog.writeEvent(EventLogTags.AM_SERVICE_CRASHED_TOO_MUCH,
sr.crashCount, sr.shortName, app.pid);
@@ -10052,7 +10209,7 @@
if (!capp.persistent && capp.thread != null
&& capp.pid != 0
&& capp.pid != MY_PID) {
- Log.i(TAG, "Killing app " + capp.processName
+ Slog.i(TAG, "Killing app " + capp.processName
+ " (pid " + capp.pid
+ ") because provider " + cpr.info.name
+ " is in dying process " + proc.processName);
@@ -10180,7 +10337,7 @@
// If the app is undergoing backup, tell the backup manager about it
if (mBackupTarget != null && app.pid == mBackupTarget.app.pid) {
- if (DEBUG_BACKUP) Log.d(TAG, "App " + mBackupTarget.appInfo + " died during backup");
+ if (DEBUG_BACKUP) Slog.d(TAG, "App " + mBackupTarget.appInfo + " died during backup");
try {
IBackupManager bm = IBackupManager.Stub.asInterface(
ServiceManager.getService(Context.BACKUP_SERVICE));
@@ -10197,7 +10354,7 @@
}
if (!app.persistent) {
- if (DEBUG_PROCESSES) Log.v(TAG,
+ if (DEBUG_PROCESSES) Slog.v(TAG,
"Removing non-persistent process during cleanup: " + app);
mProcessNames.remove(app.processName, app.info.uid);
} else if (!app.removed) {
@@ -10386,7 +10543,7 @@
if (checkComponentPermission(r.permission,
callingPid, callingUid, r.exported ? -1 : r.appInfo.uid)
!= PackageManager.PERMISSION_GRANTED) {
- Log.w(TAG, "Permission Denial: Accessing service " + r.name
+ Slog.w(TAG, "Permission Denial: Accessing service " + r.name
+ " from pid=" + callingPid
+ ", uid=" + callingUid
+ " requires " + r.permission);
@@ -10427,7 +10584,7 @@
ServiceInfo sInfo =
rInfo != null ? rInfo.serviceInfo : null;
if (sInfo == null) {
- Log.w(TAG, "Unable to start service " + service +
+ Slog.w(TAG, "Unable to start service " + service +
": not found");
return null;
}
@@ -10469,7 +10626,7 @@
if (checkComponentPermission(r.permission,
callingPid, callingUid, r.exported ? -1 : r.appInfo.uid)
!= PackageManager.PERMISSION_GRANTED) {
- Log.w(TAG, "Permission Denial: Accessing service " + r.name
+ Slog.w(TAG, "Permission Denial: Accessing service " + r.name
+ " from pid=" + Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + r.permission);
@@ -10505,7 +10662,7 @@
while (i < N) {
try {
ServiceRecord.StartItem si = r.pendingStarts.get(i);
- if (DEBUG_SERVICE) Log.v(TAG, "Sending arguments to service: "
+ if (DEBUG_SERVICE) Slog.v(TAG, "Sending arguments to service: "
+ r.name + " " + r.intent + " args=" + si.intent);
if (si.intent == null && N > 1) {
// If somehow we got a dummy start at the front, then
@@ -10535,7 +10692,7 @@
// care of this.
break;
} catch (Exception e) {
- Log.w(TAG, "Unexpected exception", e);
+ Slog.w(TAG, "Unexpected exception", e);
break;
}
}
@@ -10558,7 +10715,7 @@
if ((!i.requested || rebind) && i.apps.size() > 0) {
try {
bumpServiceExecutingLocked(r);
- if (DEBUG_SERVICE) Log.v(TAG, "Connecting binding " + i
+ if (DEBUG_SERVICE) Slog.v(TAG, "Connecting binding " + i
+ ": shouldUnbind=" + i.hasBound);
r.app.thread.scheduleBindService(r, i.intent.getIntent(), rebind);
if (!rebind) {
@@ -10598,7 +10755,7 @@
boolean created = false;
try {
- if (DEBUG_SERVICE) Log.v(TAG, "Scheduling start service: "
+ if (DEBUG_SERVICE) Slog.v(TAG, "Scheduling start service: "
+ r.name + " " + r.intent);
mStringBuilder.setLength(0);
r.intent.getIntent().toShortString(mStringBuilder, false, true);
@@ -10659,7 +10816,7 @@
if (minDuration < dur) minDuration = dur;
if (resetTime < dur) resetTime = dur;
} else {
- Log.w(TAG, "Canceling start item " + si.intent + " in service "
+ Slog.w(TAG, "Canceling start item " + si.intent + " in service "
+ r.name);
canceled = true;
}
@@ -10718,7 +10875,7 @@
mHandler.removeCallbacks(r.restarter);
mHandler.postAtTime(r.restarter, r.nextRestartTime);
r.nextRestartTime = SystemClock.uptimeMillis() + r.restartDelay;
- Log.w(TAG, "Scheduling restart of crashed service "
+ Slog.w(TAG, "Scheduling restart of crashed service "
+ r.shortName + " in " + r.restartDelay + "ms");
EventLog.writeEvent(EventLogTags.AM_SCHEDULE_SERVICE_RESTART,
r.shortName, r.restartDelay);
@@ -10745,7 +10902,7 @@
private final boolean bringUpServiceLocked(ServiceRecord r,
int intentFlags, boolean whileRestarting) {
- //Log.i(TAG, "Bring up service:");
+ //Slog.i(TAG, "Bring up service:");
//r.dump(" ");
if (r.app != null && r.app.thread != null) {
@@ -10758,7 +10915,7 @@
return true;
}
- if (DEBUG_SERVICE) Log.v(TAG, "Bringing up service " + r.name
+ if (DEBUG_SERVICE) Slog.v(TAG, "Bringing up service " + r.name
+ " " + r.intent);
// We are now bringing the service up, so no longer in the
@@ -10772,7 +10929,7 @@
realStartServiceLocked(r, app);
return true;
} catch (RemoteException e) {
- Log.w(TAG, "Exception when starting service " + r.shortName, e);
+ Slog.w(TAG, "Exception when starting service " + r.shortName, e);
}
// If a dead object exception was thrown -- fall through to
@@ -10783,7 +10940,7 @@
// to be executed when the app comes up.
if (startProcessLocked(appName, r.appInfo, true, intentFlags,
"service", r.name, false) == null) {
- Log.w(TAG, "Unable to launch app "
+ Slog.w(TAG, "Unable to launch app "
+ r.appInfo.packageName + "/"
+ r.appInfo.uid + " for service "
+ r.intent.getIntent() + ": process is bad");
@@ -10799,7 +10956,7 @@
}
private final void bringDownServiceLocked(ServiceRecord r, boolean force) {
- //Log.i(TAG, "Bring down service:");
+ //Slog.i(TAG, "Bring down service:");
//r.dump(" ");
// Does it still need to run?
@@ -10828,7 +10985,7 @@
// todo: shouldn't be a synchronous call!
c.conn.connected(r.name, null);
} catch (Exception e) {
- Log.w(TAG, "Failure disconnecting service " + r.name +
+ Slog.w(TAG, "Failure disconnecting service " + r.name +
" to connection " + c.conn.asBinder() +
" (in " + c.binding.client.processName + ")", e);
}
@@ -10840,7 +10997,7 @@
Iterator<IntentBindRecord> it = r.bindings.values().iterator();
while (it.hasNext()) {
IntentBindRecord ibr = it.next();
- if (DEBUG_SERVICE) Log.v(TAG, "Bringing down binding " + ibr
+ if (DEBUG_SERVICE) Slog.v(TAG, "Bringing down binding " + ibr
+ ": hasBound=" + ibr.hasBound);
if (r.app != null && r.app.thread != null && ibr.hasBound) {
try {
@@ -10850,7 +11007,7 @@
r.app.thread.scheduleUnbindService(r,
ibr.intent.getIntent());
} catch (Exception e) {
- Log.w(TAG, "Exception when unbinding service "
+ Slog.w(TAG, "Exception when unbinding service "
+ r.shortName, e);
serviceDoneExecutingLocked(r, true);
}
@@ -10858,7 +11015,7 @@
}
}
- if (DEBUG_SERVICE) Log.v(TAG, "Bringing down service " + r.name
+ if (DEBUG_SERVICE) Slog.v(TAG, "Bringing down service " + r.name
+ " " + r.intent);
EventLog.writeEvent(EventLogTags.AM_DESTROY_SERVICE,
System.identityHashCode(r), r.shortName,
@@ -10866,7 +11023,7 @@
mServices.remove(r.name);
mServicesByIntent.remove(r.intent);
- if (localLOGV) Log.v(TAG, "BRING DOWN SERVICE: " + r.shortName);
+ if (localLOGV) Slog.v(TAG, "BRING DOWN SERVICE: " + r.shortName);
r.totalRestartCount = 0;
unscheduleServiceRestartLocked(r);
@@ -10875,7 +11032,7 @@
for (int i=0; i<N; i++) {
if (mPendingServices.get(i) == r) {
mPendingServices.remove(i);
- if (DEBUG_SERVICE) Log.v(
+ if (DEBUG_SERVICE) Slog.v(
TAG, "Removed pending service: " + r.shortName);
i--;
N--;
@@ -10898,24 +11055,24 @@
r.app.services.remove(r);
if (r.app.thread != null) {
try {
- if (DEBUG_SERVICE) Log.v(TAG,
+ if (DEBUG_SERVICE) Slog.v(TAG,
"Stopping service: " + r.shortName);
bumpServiceExecutingLocked(r);
mStoppingServices.add(r);
updateOomAdjLocked(r.app);
r.app.thread.scheduleStopService(r);
} catch (Exception e) {
- Log.w(TAG, "Exception when stopping service "
+ Slog.w(TAG, "Exception when stopping service "
+ r.shortName, e);
serviceDoneExecutingLocked(r, true);
}
updateServiceForegroundLocked(r.app, false);
} else {
- if (DEBUG_SERVICE) Log.v(
+ if (DEBUG_SERVICE) Slog.v(
TAG, "Removed service that has no process: " + r.shortName);
}
} else {
- if (DEBUG_SERVICE) Log.v(
+ if (DEBUG_SERVICE) Slog.v(
TAG, "Removed service that is not running: " + r.shortName);
}
}
@@ -10924,7 +11081,7 @@
Intent service, String resolvedType,
int callingPid, int callingUid) {
synchronized(this) {
- if (DEBUG_SERVICE) Log.v(TAG, "startService: " + service
+ if (DEBUG_SERVICE) Slog.v(TAG, "startService: " + service
+ " type=" + resolvedType + " args=" + service.getExtras());
if (caller != null) {
@@ -10949,7 +11106,7 @@
}
ServiceRecord r = res.record;
if (unscheduleServiceRestartLocked(r)) {
- if (DEBUG_SERVICE) Log.v(TAG, "START SERVICE WHILE RESTART PENDING: "
+ if (DEBUG_SERVICE) Slog.v(TAG, "START SERVICE WHILE RESTART PENDING: "
+ r.shortName);
}
r.startRequested = true;
@@ -11007,7 +11164,7 @@
}
synchronized(this) {
- if (DEBUG_SERVICE) Log.v(TAG, "stopService: " + service
+ if (DEBUG_SERVICE) Slog.v(TAG, "stopService: " + service
+ " type=" + resolvedType);
final ProcessRecord callerApp = getRecordForAppLocked(caller);
@@ -11072,7 +11229,7 @@
public boolean stopServiceToken(ComponentName className, IBinder token,
int startId) {
synchronized(this) {
- if (DEBUG_SERVICE) Log.v(TAG, "stopServiceToken: " + className
+ if (DEBUG_SERVICE) Slog.v(TAG, "stopServiceToken: " + className
+ " " + token + " startId=" + startId);
ServiceRecord r = findServiceLocked(className, token);
if (r != null) {
@@ -11094,7 +11251,7 @@
}
if (r.deliveredStarts.size() > 0) {
- Log.w(TAG, "stopServiceToken startId " + startId
+ Slog.w(TAG, "stopServiceToken startId " + startId
+ " is last, but have " + r.deliveredStarts.size()
+ " remaining args");
}
@@ -11181,7 +11338,7 @@
}
synchronized(this) {
- if (DEBUG_SERVICE) Log.v(TAG, "bindService: " + service
+ if (DEBUG_SERVICE) Slog.v(TAG, "bindService: " + service
+ " type=" + resolvedType + " conn=" + connection.asBinder()
+ " flags=0x" + Integer.toHexString(flags));
final ProcessRecord callerApp = getRecordForAppLocked(caller);
@@ -11196,7 +11353,7 @@
if (token != null) {
int aindex = indexOfTokenLocked(token);
if (aindex < 0) {
- Log.w(TAG, "Binding with unknown activity: " + token);
+ Slog.w(TAG, "Binding with unknown activity: " + token);
return 0;
}
activity = (HistoryRecord)mHistory.get(aindex);
@@ -11239,7 +11396,7 @@
final long origId = Binder.clearCallingIdentity();
if (unscheduleServiceRestartLocked(s)) {
- if (DEBUG_SERVICE) Log.v(TAG, "BIND SERVICE WHILE RESTART PENDING: "
+ if (DEBUG_SERVICE) Slog.v(TAG, "BIND SERVICE WHILE RESTART PENDING: "
+ s.shortName);
}
@@ -11271,7 +11428,7 @@
updateOomAdjLocked(s.app);
}
- if (DEBUG_SERVICE) Log.v(TAG, "Bind " + s + " with " + b
+ if (DEBUG_SERVICE) Slog.v(TAG, "Bind " + s + " with " + b
+ ": received=" + b.intent.received
+ " apps=" + b.intent.apps.size()
+ " doRebind=" + b.intent.doRebind);
@@ -11282,7 +11439,7 @@
try {
c.conn.connected(s.name, b.intent.binder);
} catch (Exception e) {
- Log.w(TAG, "Failure sending service " + s.shortName
+ Slog.w(TAG, "Failure sending service " + s.shortName
+ " to connection " + c.conn.asBinder()
+ " (in " + c.binding.client.processName + ")", e);
}
@@ -11324,7 +11481,7 @@
b.intent.apps.remove(b.client);
}
- if (DEBUG_SERVICE) Log.v(TAG, "Disconnecting binding " + b.intent
+ if (DEBUG_SERVICE) Slog.v(TAG, "Disconnecting binding " + b.intent
+ ": shouldUnbind=" + b.intent.hasBound);
if (s.app != null && s.app.thread != null && b.intent.apps.size() == 0
&& b.intent.hasBound) {
@@ -11337,7 +11494,7 @@
b.intent.doRebind = false;
s.app.thread.scheduleUnbindService(s, b.intent.intent.getIntent());
} catch (Exception e) {
- Log.w(TAG, "Exception when unbinding service " + s.shortName, e);
+ Slog.w(TAG, "Exception when unbinding service " + s.shortName, e);
serviceDoneExecutingLocked(s, true);
}
}
@@ -11350,10 +11507,10 @@
public boolean unbindService(IServiceConnection connection) {
synchronized (this) {
IBinder binder = connection.asBinder();
- if (DEBUG_SERVICE) Log.v(TAG, "unbindService: conn=" + binder);
+ if (DEBUG_SERVICE) Slog.v(TAG, "unbindService: conn=" + binder);
ConnectionRecord r = mServiceConnections.get(binder);
if (r == null) {
- Log.w(TAG, "Unbind failed: could not find connection for "
+ Slog.w(TAG, "Unbind failed: could not find connection for "
+ connection.asBinder());
return false;
}
@@ -11387,7 +11544,7 @@
final long origId = Binder.clearCallingIdentity();
- if (DEBUG_SERVICE) Log.v(TAG, "PUBLISHING SERVICE " + r.name
+ if (DEBUG_SERVICE) Slog.v(TAG, "PUBLISHING SERVICE " + r.name
+ " " + intent + ": " + service);
if (r != null) {
Intent.FilterComparison filter
@@ -11403,19 +11560,19 @@
while (it.hasNext()) {
ConnectionRecord c = it.next();
if (!filter.equals(c.binding.intent.intent)) {
- if (DEBUG_SERVICE) Log.v(
+ if (DEBUG_SERVICE) Slog.v(
TAG, "Not publishing to: " + c);
- if (DEBUG_SERVICE) Log.v(
+ if (DEBUG_SERVICE) Slog.v(
TAG, "Bound intent: " + c.binding.intent.intent);
- if (DEBUG_SERVICE) Log.v(
+ if (DEBUG_SERVICE) Slog.v(
TAG, "Published intent: " + intent);
continue;
}
- if (DEBUG_SERVICE) Log.v(TAG, "Publishing to: " + c);
+ if (DEBUG_SERVICE) Slog.v(TAG, "Publishing to: " + c);
try {
c.conn.connected(r.name, service);
} catch (Exception e) {
- Log.w(TAG, "Failure sending service " + r.name +
+ Slog.w(TAG, "Failure sending service " + r.name +
" to connection " + c.conn.asBinder() +
" (in " + c.binding.client.processName + ")", e);
}
@@ -11448,7 +11605,7 @@
Intent.FilterComparison filter
= new Intent.FilterComparison(intent);
IntentBindRecord b = r.bindings.get(filter);
- if (DEBUG_SERVICE) Log.v(TAG, "unbindFinished in " + r
+ if (DEBUG_SERVICE) Slog.v(TAG, "unbindFinished in " + r
+ " at " + b + ": apps="
+ (b != null ? b.apps.size() : 0));
if (b != null) {
@@ -11478,11 +11635,11 @@
ServiceRecord r = (ServiceRecord)token;
boolean inStopping = mStoppingServices.contains(token);
if (r != null) {
- if (DEBUG_SERVICE) Log.v(TAG, "DONE EXECUTING SERVICE " + r.name
+ if (DEBUG_SERVICE) Slog.v(TAG, "DONE EXECUTING SERVICE " + r.name
+ ": nesting=" + r.executeNesting
+ ", inStopping=" + inStopping);
if (r != token) {
- Log.w(TAG, "Done executing service " + r.name
+ Slog.w(TAG, "Done executing service " + r.name
+ " with incorrect token: given " + token
+ ", expected " + r);
return;
@@ -11537,7 +11694,7 @@
serviceDoneExecutingLocked(r, inStopping);
Binder.restoreCallingIdentity(origId);
} else {
- Log.w(TAG, "Done executing unknown service " + r.name
+ Slog.w(TAG, "Done executing unknown service " + r.name
+ " with token " + token);
}
}
@@ -11577,7 +11734,7 @@
}
}
if (timeout != null && mLruProcesses.contains(proc)) {
- Log.w(TAG, "Timeout executing service: " + timeout);
+ Slog.w(TAG, "Timeout executing service: " + timeout);
appNotRespondingLocked(proc, null, null, "Executing service " + timeout.shortName);
} else {
Message msg = mHandler.obtainMessage(SERVICE_TIMEOUT_MSG);
@@ -11595,7 +11752,7 @@
// instantiated. The backup agent will invoke backupAgentCreated() on the
// activity manager to announce its creation.
public boolean bindBackupAgent(ApplicationInfo app, int backupMode) {
- if (DEBUG_BACKUP) Log.v(TAG, "startBackupAgent: app=" + app + " mode=" + backupMode);
+ if (DEBUG_BACKUP) Slog.v(TAG, "startBackupAgent: app=" + app + " mode=" + backupMode);
enforceCallingPermission("android.permission.BACKUP", "startBackupAgent");
synchronized(this) {
@@ -11612,7 +11769,7 @@
ProcessRecord proc = startProcessLocked(app.processName, app,
false, 0, "backup", hostingName, false);
if (proc == null) {
- Log.e(TAG, "Unable to start backup agent process " + r);
+ Slog.e(TAG, "Unable to start backup agent process " + r);
return false;
}
@@ -11626,14 +11783,14 @@
// If the process is already attached, schedule the creation of the backup agent now.
// If it is not yet live, this will be done when it attaches to the framework.
if (proc.thread != null) {
- if (DEBUG_BACKUP) Log.v(TAG, "Agent proc already running: " + proc);
+ if (DEBUG_BACKUP) Slog.v(TAG, "Agent proc already running: " + proc);
try {
proc.thread.scheduleCreateBackupAgent(app, backupMode);
} catch (RemoteException e) {
// Will time out on the backup manager side
}
} else {
- if (DEBUG_BACKUP) Log.v(TAG, "Agent proc not running, waiting for attach");
+ if (DEBUG_BACKUP) Slog.v(TAG, "Agent proc not running, waiting for attach");
}
// Invariants: at this point, the target app process exists and the application
// is either already running or in the process of coming up. mBackupTarget and
@@ -11646,12 +11803,12 @@
// A backup agent has just come up
public void backupAgentCreated(String agentPackageName, IBinder agent) {
- if (DEBUG_BACKUP) Log.v(TAG, "backupAgentCreated: " + agentPackageName
+ if (DEBUG_BACKUP) Slog.v(TAG, "backupAgentCreated: " + agentPackageName
+ " = " + agent);
synchronized(this) {
if (!agentPackageName.equals(mBackupAppName)) {
- Log.e(TAG, "Backup agent created for " + agentPackageName + " but not requested!");
+ Slog.e(TAG, "Backup agent created for " + agentPackageName + " but not requested!");
return;
}
@@ -11663,7 +11820,7 @@
} catch (RemoteException e) {
// can't happen; the backup manager service is local
} catch (Exception e) {
- Log.w(TAG, "Exception trying to deliver BackupAgent binding: ");
+ Slog.w(TAG, "Exception trying to deliver BackupAgent binding: ");
e.printStackTrace();
} finally {
Binder.restoreCallingIdentity(oldIdent);
@@ -11673,20 +11830,20 @@
// done with this agent
public void unbindBackupAgent(ApplicationInfo appInfo) {
- if (DEBUG_BACKUP) Log.v(TAG, "unbindBackupAgent: " + appInfo);
+ if (DEBUG_BACKUP) Slog.v(TAG, "unbindBackupAgent: " + appInfo);
if (appInfo == null) {
- Log.w(TAG, "unbind backup agent for null app");
+ Slog.w(TAG, "unbind backup agent for null app");
return;
}
synchronized(this) {
if (mBackupAppName == null) {
- Log.w(TAG, "Unbinding backup agent with no active backup");
+ Slog.w(TAG, "Unbinding backup agent with no active backup");
return;
}
if (!mBackupAppName.equals(appInfo.packageName)) {
- Log.e(TAG, "Unbind of " + appInfo + " but is not the current backup target");
+ Slog.e(TAG, "Unbind of " + appInfo + " but is not the current backup target");
return;
}
@@ -11702,7 +11859,7 @@
try {
proc.thread.scheduleDestroyBackupAgent(appInfo);
} catch (Exception e) {
- Log.e(TAG, "Exception when unbinding backup agent:");
+ Slog.e(TAG, "Exception when unbinding backup agent:");
e.printStackTrace();
}
}
@@ -11733,7 +11890,7 @@
}
private final void scheduleBroadcastsLocked() {
- if (DEBUG_BROADCAST) Log.v(TAG, "Schedule broadcasts: current="
+ if (DEBUG_BROADCAST) Slog.v(TAG, "Schedule broadcasts: current="
+ mBroadcastsScheduled);
if (mBroadcastsScheduled) {
@@ -11774,7 +11931,7 @@
// the client.
Intent sticky = allSticky != null ? (Intent)allSticky.get(0) : null;
- if (DEBUG_BROADCAST) Log.v(TAG, "Register receiver " + filter
+ if (DEBUG_BROADCAST) Slog.v(TAG, "Register receiver " + filter
+ ": " + sticky);
if (receiver == null) {
@@ -11802,7 +11959,7 @@
BroadcastFilter bf = new BroadcastFilter(filter, rl, permission);
rl.add(bf);
if (!bf.debugCheck()) {
- Log.w(TAG, "==> For Dynamic broadast");
+ Slog.w(TAG, "==> For Dynamic broadast");
}
mReceiverResolver.addFilter(bf);
@@ -11830,7 +11987,7 @@
}
public void unregisterReceiver(IIntentReceiver receiver) {
- if (DEBUG_BROADCAST) Log.v(TAG, "Unregister receiver: " + receiver);
+ if (DEBUG_BROADCAST) Slog.v(TAG, "Unregister receiver: " + receiver);
boolean doNext = false;
@@ -11881,11 +12038,11 @@
boolean ordered, boolean sticky, int callingPid, int callingUid) {
intent = new Intent(intent);
- if (DEBUG_BROADCAST_LIGHT) Log.v(
+ if (DEBUG_BROADCAST_LIGHT) Slog.v(
TAG, (sticky ? "Broadcast sticky: ": "Broadcast: ") + intent
+ " ordered=" + ordered);
if ((resultTo != null) && !ordered) {
- Log.w(TAG, "Broadcast " + intent + " not ordered but result callback requested!");
+ Slog.w(TAG, "Broadcast " + intent + " not ordered but result callback requested!");
}
// Handle special intents: if this broadcast is from the package
@@ -11938,7 +12095,7 @@
+ ", uid=" + callingUid + ")"
+ " requires "
+ android.Manifest.permission.BROADCAST_PACKAGE_REMOVED;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
}
@@ -11966,11 +12123,11 @@
String msg = "Permission Denial: not allowed to send broadcast "
+ intent.getAction() + " from pid="
+ callingPid + ", uid=" + callingUid;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
} catch (RemoteException e) {
- Log.w(TAG, "Remote exception", e);
+ Slog.w(TAG, "Remote exception", e);
return BROADCAST_SUCCESS;
}
}
@@ -11983,11 +12140,11 @@
String msg = "Permission Denial: broadcastIntent() requesting a sticky broadcast from pid="
+ callingPid + ", uid=" + callingUid
+ " requires " + android.Manifest.permission.BROADCAST_STICKY;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
if (requiredPermission != null) {
- Log.w(TAG, "Can't broadcast sticky intent " + intent
+ Slog.w(TAG, "Can't broadcast sticky intent " + intent
+ " and enforce permission " + requiredPermission);
return BROADCAST_STICKY_CANT_HAVE_PERMISSION;
}
@@ -12045,7 +12202,7 @@
final boolean replacePending =
(intent.getFlags()&Intent.FLAG_RECEIVER_REPLACE_PENDING) != 0;
- if (DEBUG_BROADCAST) Log.v(TAG, "Enqueing broadcast: " + intent.getAction()
+ if (DEBUG_BROADCAST) Slog.v(TAG, "Enqueing broadcast: " + intent.getAction()
+ " replacePending=" + replacePending);
int NR = registeredReceivers != null ? registeredReceivers.size() : 0;
@@ -12057,14 +12214,14 @@
callerPackage, callingPid, callingUid, requiredPermission,
registeredReceivers, resultTo, resultCode, resultData, map,
ordered, sticky, false);
- if (DEBUG_BROADCAST) Log.v(
+ if (DEBUG_BROADCAST) Slog.v(
TAG, "Enqueueing parallel broadcast " + r
+ ": prev had " + mParallelBroadcasts.size());
boolean replaced = false;
if (replacePending) {
for (int i=mParallelBroadcasts.size()-1; i>=0; i--) {
if (intent.filterEquals(mParallelBroadcasts.get(i).intent)) {
- if (DEBUG_BROADCAST) Log.v(TAG,
+ if (DEBUG_BROADCAST) Slog.v(TAG,
"***** DROPPING PARALLEL: " + intent);
mParallelBroadcasts.set(i, r);
replaced = true;
@@ -12158,18 +12315,18 @@
callerPackage, callingPid, callingUid, requiredPermission,
receivers, resultTo, resultCode, resultData, map, ordered,
sticky, false);
- if (DEBUG_BROADCAST) Log.v(
+ if (DEBUG_BROADCAST) Slog.v(
TAG, "Enqueueing ordered broadcast " + r
+ ": prev had " + mOrderedBroadcasts.size());
if (DEBUG_BROADCAST) {
int seq = r.intent.getIntExtra("seq", -1);
- Log.i(TAG, "Enqueueing broadcast " + r.intent.getAction() + " seq=" + seq);
+ Slog.i(TAG, "Enqueueing broadcast " + r.intent.getAction() + " seq=" + seq);
}
boolean replaced = false;
if (replacePending) {
for (int i=mOrderedBroadcasts.size()-1; i>=0; i--) {
if (intent.filterEquals(mOrderedBroadcasts.get(i).intent)) {
- if (DEBUG_BROADCAST) Log.v(TAG,
+ if (DEBUG_BROADCAST) Slog.v(TAG,
"***** DROPPING ORDERED: " + intent);
mOrderedBroadcasts.set(i, r);
replaced = true;
@@ -12205,7 +12362,7 @@
intent = new Intent(intent);
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
} else if ((flags&Intent.FLAG_RECEIVER_REGISTERED_ONLY) == 0){
- Log.e(TAG, "Attempt to launch receivers of broadcast intent " + intent
+ Slog.e(TAG, "Attempt to launch receivers of broadcast intent " + intent
+ " before boot completion");
throw new IllegalStateException("Cannot broadcast before boot completed");
}
@@ -12258,7 +12415,7 @@
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.BROADCAST_STICKY;
- Log.w(TAG, msg);
+ Slog.w(TAG, msg);
throw new SecurityException(msg);
}
ArrayList<Intent> list = mStickyBroadcasts.get(intent.getAction());
@@ -12280,26 +12437,26 @@
boolean explicit) {
if (mOrderedBroadcasts.size() == 0) {
if (explicit) {
- Log.w(TAG, "finishReceiver called but no pending broadcasts");
+ Slog.w(TAG, "finishReceiver called but no pending broadcasts");
}
return false;
}
BroadcastRecord r = mOrderedBroadcasts.get(0);
if (r.receiver == null) {
if (explicit) {
- Log.w(TAG, "finishReceiver called but none active");
+ Slog.w(TAG, "finishReceiver called but none active");
}
return false;
}
if (r.receiver != receiver) {
- Log.w(TAG, "finishReceiver called but active receiver is different");
+ Slog.w(TAG, "finishReceiver called but active receiver is different");
return false;
}
int state = r.state;
r.state = r.IDLE;
if (state == r.IDLE) {
if (explicit) {
- Log.w(TAG, "finishReceiver called but state is IDLE");
+ Slog.w(TAG, "finishReceiver called but state is IDLE");
}
}
r.receiver = null;
@@ -12330,7 +12487,7 @@
public void finishReceiver(IBinder who, int resultCode, String resultData,
Bundle resultExtras, boolean resultAbort) {
- if (DEBUG_BROADCAST) Log.v(TAG, "Finish receiver: " + who);
+ if (DEBUG_BROADCAST) Slog.v(TAG, "Finish receiver: " + who);
// Refuse possible leaked file descriptors
if (resultExtras != null && resultExtras.hasFileDescriptors()) {
@@ -12372,7 +12529,7 @@
((ResolveInfo)curReceiver).toString());
}
} else {
- Log.w(TAG, "Discarding broadcast before first receiver is invoked: "
+ Slog.w(TAG, "Discarding broadcast before first receiver is invoked: "
+ r);
EventLog.writeEvent(EventLogTags.AM_BROADCAST_DISCARD_APP,
System.identityHashCode(r),
@@ -12390,7 +12547,7 @@
long now = SystemClock.uptimeMillis();
BroadcastRecord r = mOrderedBroadcasts.get(0);
if ((r.receiverTime+BROADCAST_TIMEOUT) > now) {
- if (DEBUG_BROADCAST) Log.v(TAG,
+ if (DEBUG_BROADCAST) Slog.v(TAG,
"Premature timeout @ " + now + ": resetting BROADCAST_TIMEOUT_MSG for "
+ (r.receiverTime + BROADCAST_TIMEOUT));
Message msg = mHandler.obtainMessage(BROADCAST_TIMEOUT_MSG);
@@ -12398,20 +12555,20 @@
return;
}
- Log.w(TAG, "Timeout of broadcast " + r + " - receiver=" + r.receiver);
+ Slog.w(TAG, "Timeout of broadcast " + r + " - receiver=" + r.receiver);
r.receiverTime = now;
r.anrCount++;
// Current receiver has passed its expiration date.
if (r.nextReceiver <= 0) {
- Log.w(TAG, "Timeout on receiver with nextReceiver <= 0");
+ Slog.w(TAG, "Timeout on receiver with nextReceiver <= 0");
return;
}
ProcessRecord app = null;
Object curReceiver = r.receivers.get(r.nextReceiver-1);
- Log.w(TAG, "Receiver during timeout: " + curReceiver);
+ Slog.w(TAG, "Receiver during timeout: " + curReceiver);
logBroadcastReceiverDiscard(r);
if (curReceiver instanceof BroadcastFilter) {
BroadcastFilter bf = (BroadcastFilter)curReceiver;
@@ -12456,7 +12613,7 @@
boolean started = false;
try {
- if (DEBUG_BROADCAST_LIGHT) Log.v(TAG,
+ if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG,
"Delivering to component " + r.curComponent
+ ": " + r);
ensurePackageDexOpt(r.intent.getComponent().getPackageName());
@@ -12493,7 +12650,7 @@
int perm = checkComponentPermission(filter.requiredPermission,
r.callingPid, r.callingUid, -1);
if (perm != PackageManager.PERMISSION_GRANTED) {
- Log.w(TAG, "Permission Denial: broadcasting "
+ Slog.w(TAG, "Permission Denial: broadcasting "
+ r.intent.toString()
+ " from " + r.callerPackage + " (pid="
+ r.callingPid + ", uid=" + r.callingUid + ")"
@@ -12506,7 +12663,7 @@
int perm = checkComponentPermission(r.requiredPermission,
filter.receiverList.pid, filter.receiverList.uid, -1);
if (perm != PackageManager.PERMISSION_GRANTED) {
- Log.w(TAG, "Permission Denial: receiving "
+ Slog.w(TAG, "Permission Denial: receiving "
+ r.intent.toString()
+ " to " + filter.receiverList.app
+ " (pid=" + filter.receiverList.pid
@@ -12541,7 +12698,7 @@
try {
if (DEBUG_BROADCAST_LIGHT) {
int seq = r.intent.getIntExtra("seq", -1);
- Log.i(TAG, "Delivering to " + filter.receiverList.app
+ Slog.i(TAG, "Delivering to " + filter.receiverList.app
+ " (seq=" + seq + "): " + r);
}
performReceive(filter.receiverList.app, filter.receiverList.receiver,
@@ -12551,7 +12708,7 @@
r.state = BroadcastRecord.CALL_DONE_RECEIVE;
}
} catch (RemoteException e) {
- Log.w(TAG, "Failure sending broadcast " + r.intent, e);
+ Slog.w(TAG, "Failure sending broadcast " + r.intent, e);
if (ordered) {
r.receiver = null;
r.curFilter = null;
@@ -12579,7 +12736,7 @@
synchronized(this) {
BroadcastRecord r;
- if (DEBUG_BROADCAST) Log.v(TAG, "processNextBroadcast: "
+ if (DEBUG_BROADCAST) Slog.v(TAG, "processNextBroadcast: "
+ mParallelBroadcasts.size() + " broadcasts, "
+ mOrderedBroadcasts.size() + " serialized broadcasts");
@@ -12594,17 +12751,17 @@
r = mParallelBroadcasts.remove(0);
r.dispatchTime = SystemClock.uptimeMillis();
final int N = r.receivers.size();
- if (DEBUG_BROADCAST_LIGHT) Log.v(TAG, "Processing parallel broadcast "
+ if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG, "Processing parallel broadcast "
+ r);
for (int i=0; i<N; i++) {
Object target = r.receivers.get(i);
- if (DEBUG_BROADCAST) Log.v(TAG,
+ if (DEBUG_BROADCAST) Slog.v(TAG,
"Delivering non-serialized to registered "
+ target + ": " + r);
deliverToRegisteredReceiver(r, (BroadcastFilter)target, false);
}
addBroadcastToHistoryLocked(r);
- if (DEBUG_BROADCAST_LIGHT) Log.v(TAG, "Done with parallel broadcast "
+ if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG, "Done with parallel broadcast "
+ r);
}
@@ -12615,7 +12772,7 @@
// check that the process we're waiting for still exists.
if (mPendingBroadcast != null) {
if (DEBUG_BROADCAST_LIGHT) {
- Log.v(TAG, "processNextBroadcast: waiting for "
+ Slog.v(TAG, "processNextBroadcast: waiting for "
+ mPendingBroadcast.curApp);
}
@@ -12627,7 +12784,7 @@
// It's still alive, so keep waiting
return;
} else {
- Log.w(TAG, "pending app " + mPendingBroadcast.curApp
+ Slog.w(TAG, "pending app " + mPendingBroadcast.curApp
+ " died before responding to broadcast");
mPendingBroadcast = null;
}
@@ -12658,7 +12815,7 @@
if (r.dispatchTime > 0) {
if ((numReceivers > 0) &&
(now > r.dispatchTime + (2*BROADCAST_TIMEOUT*numReceivers))) {
- Log.w(TAG, "Hung broadcast discarded after timeout failure:"
+ Slog.w(TAG, "Hung broadcast discarded after timeout failure:"
+ " now=" + now
+ " dispatchTime=" + r.dispatchTime
+ " startTime=" + r.receiverTime
@@ -12673,7 +12830,7 @@
}
if (r.state != BroadcastRecord.IDLE) {
- if (DEBUG_BROADCAST) Log.d(TAG,
+ if (DEBUG_BROADCAST) Slog.d(TAG,
"processNextBroadcast() called when not idle (state="
+ r.state + ")");
return;
@@ -12687,21 +12844,21 @@
try {
if (DEBUG_BROADCAST) {
int seq = r.intent.getIntExtra("seq", -1);
- Log.i(TAG, "Finishing broadcast " + r.intent.getAction()
+ Slog.i(TAG, "Finishing broadcast " + r.intent.getAction()
+ " seq=" + seq + " app=" + r.callerApp);
}
performReceive(r.callerApp, r.resultTo,
new Intent(r.intent), r.resultCode,
r.resultData, r.resultExtras, false, false);
} catch (RemoteException e) {
- Log.w(TAG, "Failure sending broadcast result of " + r.intent, e);
+ Slog.w(TAG, "Failure sending broadcast result of " + r.intent, e);
}
}
- if (DEBUG_BROADCAST) Log.v(TAG, "Cancelling BROADCAST_TIMEOUT_MSG");
+ if (DEBUG_BROADCAST) Slog.v(TAG, "Cancelling BROADCAST_TIMEOUT_MSG");
mHandler.removeMessages(BROADCAST_TIMEOUT_MSG);
- if (DEBUG_BROADCAST_LIGHT) Log.v(TAG, "Finished with ordered broadcast "
+ if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG, "Finished with ordered broadcast "
+ r);
// ... and on to the next...
@@ -12722,9 +12879,9 @@
if (recIdx == 0) {
r.dispatchTime = r.receiverTime;
- if (DEBUG_BROADCAST_LIGHT) Log.v(TAG, "Processing ordered broadcast "
+ if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG, "Processing ordered broadcast "
+ r);
- if (DEBUG_BROADCAST) Log.v(TAG,
+ if (DEBUG_BROADCAST) Slog.v(TAG,
"Submitting BROADCAST_TIMEOUT_MSG for "
+ (r.receiverTime + BROADCAST_TIMEOUT));
Message msg = mHandler.obtainMessage(BROADCAST_TIMEOUT_MSG);
@@ -12736,7 +12893,7 @@
// Simple case: this is a registered receiver who gets
// a direct call.
BroadcastFilter filter = (BroadcastFilter)nextReceiver;
- if (DEBUG_BROADCAST) Log.v(TAG,
+ if (DEBUG_BROADCAST) Slog.v(TAG,
"Delivering serialized to registered "
+ filter + ": " + r);
deliverToRegisteredReceiver(r, filter, r.ordered);
@@ -12761,7 +12918,7 @@
info.activityInfo.exported
? -1 : info.activityInfo.applicationInfo.uid);
if (perm != PackageManager.PERMISSION_GRANTED) {
- Log.w(TAG, "Permission Denial: broadcasting "
+ Slog.w(TAG, "Permission Denial: broadcasting "
+ r.intent.toString()
+ " from " + r.callerPackage + " (pid=" + r.callingPid
+ ", uid=" + r.callingUid + ")"
@@ -12780,7 +12937,7 @@
perm = PackageManager.PERMISSION_DENIED;
}
if (perm != PackageManager.PERMISSION_GRANTED) {
- Log.w(TAG, "Permission Denial: receiving "
+ Slog.w(TAG, "Permission Denial: receiving "
+ r.intent + " to "
+ info.activityInfo.applicationInfo.packageName
+ " requires " + r.requiredPermission
@@ -12817,7 +12974,7 @@
processCurBroadcastLocked(r, app);
return;
} catch (RemoteException e) {
- Log.w(TAG, "Exception when sending broadcast to "
+ Slog.w(TAG, "Exception when sending broadcast to "
+ r.curComponent, e);
}
@@ -12834,7 +12991,7 @@
== null) {
// Ah, this recipient is unavailable. Finish it if necessary,
// and mark the broadcast record as ready for the next.
- Log.w(TAG, "Unable to launch app "
+ Slog.w(TAG, "Unable to launch app "
+ info.activityInfo.applicationInfo.packageName + "/"
+ info.activityInfo.applicationInfo.uid + " for broadcast "
+ r.intent + ": process is bad");
@@ -12923,7 +13080,7 @@
*/
private void reportStartInstrumentationFailure(IInstrumentationWatcher watcher,
ComponentName cn, String report) {
- Log.w(TAG, report);
+ Slog.w(TAG, report);
try {
if (watcher != null) {
Bundle results = new Bundle();
@@ -12932,7 +13089,7 @@
watcher.instrumentationStatus(cn, -1, results);
}
} catch (RemoteException e) {
- Log.w(TAG, e);
+ Slog.w(TAG, e);
}
}
@@ -12966,7 +13123,7 @@
synchronized(this) {
ProcessRecord app = getRecordForAppLocked(target);
if (app == null) {
- Log.w(TAG, "finishInstrumentation: no app for " + target);
+ Slog.w(TAG, "finishInstrumentation: no app for " + target);
return;
}
final long origId = Binder.clearCallingIdentity();
@@ -13040,7 +13197,7 @@
changes = newConfig.updateFrom(values);
if (changes != 0) {
if (DEBUG_SWITCH || DEBUG_CONFIGURATION) {
- Log.i(TAG, "Updating configuration to: " + values);
+ Slog.i(TAG, "Updating configuration to: " + values);
}
EventLog.writeEvent(EventLogTags.CONFIGURATION_CHANGED, changes);
@@ -13057,7 +13214,7 @@
}
newConfig.seq = mConfigurationSeq;
mConfiguration = newConfig;
- Log.i(TAG, "Config changed: " + newConfig);
+ Slog.i(TAG, "Config changed: " + newConfig);
AttributeCache ac = AttributeCache.instance();
if (ac != null) {
@@ -13072,7 +13229,7 @@
ProcessRecord app = mLruProcesses.get(i);
try {
if (app.thread != null) {
- if (DEBUG_CONFIGURATION) Log.v(TAG, "Sending to proc "
+ if (DEBUG_CONFIGURATION) Slog.v(TAG, "Sending to proc "
+ app.processName + " new config " + mConfiguration);
app.thread.scheduleConfigurationChanged(mConfiguration);
}
@@ -13106,7 +13263,7 @@
// If this didn't result in the starting activity being
// destroyed, then we need to make sure at this point that all
// other activities are made visible.
- if (DEBUG_SWITCH) Log.i(TAG, "Config didn't destroy " + starting
+ if (DEBUG_SWITCH) Slog.i(TAG, "Config didn't destroy " + starting
+ ", ensuring others are correct.");
ensureActivitiesVisibleLocked(starting, changes);
}
@@ -13127,7 +13284,7 @@
results = r.results;
newIntents = r.newIntents;
}
- if (DEBUG_SWITCH) Log.v(TAG, "Relaunching: " + r
+ if (DEBUG_SWITCH) Slog.v(TAG, "Relaunching: " + r
+ " with results=" + results + " newIntents=" + newIntents
+ " andResume=" + andResume);
EventLog.writeEvent(andResume ? EventLogTags.AM_RELAUNCH_RESUME_ACTIVITY
@@ -13137,7 +13294,7 @@
r.startFreezingScreenLocked(r.app, 0);
try {
- if (DEBUG_SWITCH) Log.i(TAG, "Switch is restarting resumed " + r);
+ if (DEBUG_SWITCH) Slog.i(TAG, "Switch is restarting resumed " + r);
r.app.thread.scheduleRelaunchActivity(r, results, newIntents,
changes, !andResume, mConfiguration);
// Note: don't need to call pauseIfSleepingLocked() here, because
@@ -13165,21 +13322,21 @@
*/
private final boolean ensureActivityConfigurationLocked(HistoryRecord r,
int globalChanges) {
- if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Log.v(TAG,
+ if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
"Ensuring correct configuration: " + r);
// Short circuit: if the two configurations are the exact same
// object (the common case), then there is nothing to do.
Configuration newConfig = mConfiguration;
if (r.configuration == newConfig) {
- if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Log.v(TAG,
+ if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
"Configuration unchanged in " + r);
return true;
}
// We don't worry about activities that are finishing.
if (r.finishing) {
- if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Log.v(TAG,
+ if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
"Configuration doesn't matter in finishing " + r);
r.stopFreezingScreenLocked(false);
return true;
@@ -13193,7 +13350,7 @@
// If the activity isn't currently running, just leave the new
// configuration and it will pick that up next time it starts.
if (r.app == null || r.app.thread == null) {
- if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Log.v(TAG,
+ if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
"Configuration doesn't matter not running " + r);
r.stopFreezingScreenLocked(false);
return true;
@@ -13206,7 +13363,7 @@
// Figure out what has changed between the two configurations.
int changes = oldConfig.diff(newConfig);
if (DEBUG_SWITCH || DEBUG_CONFIGURATION) {
- Log.v(TAG, "Checking to restart " + r.info.name + ": changed=0x"
+ Slog.v(TAG, "Checking to restart " + r.info.name + ": changed=0x"
+ Integer.toHexString(changes) + ", handles=0x"
+ Integer.toHexString(r.info.configChanges)
+ ", newConfig=" + newConfig);
@@ -13216,14 +13373,14 @@
r.configChangeFlags |= changes;
r.startFreezingScreenLocked(r.app, globalChanges);
if (r.app == null || r.app.thread == null) {
- if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Log.v(TAG,
+ if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
"Switch is destroying non-running " + r);
destroyActivityLocked(r, true);
} else if (r.state == ActivityState.PAUSING) {
// A little annoying: we are waiting for this activity to
// finish pausing. Let's not do anything now, but just
// flag that it needs to be restarted when done pausing.
- if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Log.v(TAG,
+ if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
"Switch is skipping already pausing " + r);
r.configDestroy = true;
return true;
@@ -13232,12 +13389,12 @@
// and we need to restart the top, resumed activity.
// Instead of doing the normal handshaking, just say
// "restart!".
- if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Log.v(TAG,
+ if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
"Switch is restarting resumed " + r);
relaunchActivityLocked(r, r.configChangeFlags, true);
r.configChangeFlags = 0;
} else {
- if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Log.v(TAG,
+ if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG,
"Switch is restarting non-resumed " + r);
relaunchActivityLocked(r, r.configChangeFlags, false);
r.configChangeFlags = 0;
@@ -13256,7 +13413,7 @@
// it last got.
if (r.app != null && r.app.thread != null) {
try {
- if (DEBUG_CONFIGURATION) Log.v(TAG, "Sending new config to " + r);
+ if (DEBUG_CONFIGURATION) Slog.v(TAG, "Sending new config to " + r);
r.app.thread.scheduleActivityConfigurationChanged(r);
} catch (RemoteException e) {
// If process died, whatever.
@@ -13399,7 +13556,7 @@
app.adjType = "bg-empty";
}
- //Log.i(TAG, "OOM " + app + ": initial adj=" + adj);
+ //Slog.i(TAG, "OOM " + app + ": initial adj=" + adj);
// By default, we use the computed adjustment. It may be changed if
// there are applications dependent on our services or providers, but
@@ -13411,7 +13568,7 @@
if (mBackupTarget != null && app == mBackupTarget.app) {
// If possible we want to avoid killing apps while they're being backed up
if (adj > BACKUP_APP_ADJ) {
- if (DEBUG_BACKUP) Log.v(TAG, "oom BACKUP_APP_ADJ for " + app);
+ if (DEBUG_BACKUP) Slog.v(TAG, "oom BACKUP_APP_ADJ for " + app);
adj = BACKUP_APP_ADJ;
app.adjType = "backup";
app.hidden = false;
@@ -13488,7 +13645,7 @@
}
HistoryRecord a = cr.activity;
//if (a != null) {
- // Log.i(TAG, "Connection to " + a ": state=" + a.state);
+ // Slog.i(TAG, "Connection to " + a ": state=" + a.state);
//}
if (a != null && adj > FOREGROUND_APP_ADJ &&
(a.state == ActivityState.RESUMED
@@ -13576,7 +13733,7 @@
app.curRawAdj = adj;
- //Log.i(TAG, "OOM ADJ " + app + ": pid=" + app.pid +
+ //Slog.i(TAG, "OOM ADJ " + app + ": pid=" + app.pid +
// " adj=" + adj + " curAdj=" + app.curAdj + " maxAdj=" + app.maxAdj);
if (adj > app.maxAdj) {
adj = app.maxAdj;
@@ -13748,7 +13905,7 @@
}
if (adj != app.setAdj) {
if (Process.setOomAdj(app.pid, adj)) {
- if (DEBUG_SWITCH || DEBUG_OOM_ADJ) Log.v(
+ if (DEBUG_SWITCH || DEBUG_OOM_ADJ) Slog.v(
TAG, "Set app " + app.processName +
" oom adj to " + adj);
app.setAdj = adj;
@@ -13758,7 +13915,7 @@
}
if (app.setSchedGroup != app.curSchedGroup) {
app.setSchedGroup = app.curSchedGroup;
- if (DEBUG_SWITCH || DEBUG_OOM_ADJ) Log.v(TAG,
+ if (DEBUG_SWITCH || DEBUG_OOM_ADJ) Slog.v(TAG,
"Setting process group of " + app.processName
+ " to " + app.curSchedGroup);
if (true) {
@@ -13766,7 +13923,7 @@
try {
Process.setProcessGroup(app.pid, app.curSchedGroup);
} catch (Exception e) {
- Log.w(TAG, "Failed setting process group of " + app.pid
+ Slog.w(TAG, "Failed setting process group of " + app.pid
+ " to " + app.curSchedGroup);
e.printStackTrace();
} finally {
@@ -13828,7 +13985,7 @@
if (false) {
RuntimeException e = new RuntimeException();
e.fillInStackTrace();
- Log.i(TAG, "updateOomAdj: top=" + TOP_ACT, e);
+ Slog.i(TAG, "updateOomAdj: top=" + TOP_ACT, e);
}
mAdjSeq++;
@@ -13849,7 +14006,7 @@
while (i > 0) {
i--;
ProcessRecord app = mLruProcesses.get(i);
- //Log.i(TAG, "OOM " + app + ": cur hidden=" + curHiddenAdj);
+ //Slog.i(TAG, "OOM " + app + ": cur hidden=" + curHiddenAdj);
if (updateOomAdjLocked(app, curHiddenAdj, TOP_APP)) {
if (curHiddenAdj < EMPTY_APP_ADJ
&& app.curAdj == curHiddenAdj) {
@@ -13880,7 +14037,7 @@
final ProcessRecord app = mRemovedProcesses.get(i);
if (app.activities.size() == 0
&& app.curReceiver == null && app.services.size() == 0) {
- Log.i(
+ Slog.i(
TAG, "Exiting empty application process "
+ app.processName + " ("
+ (app.thread != null ? app.thread.asBinder() : null)
@@ -13921,7 +14078,7 @@
|| app.persistentActivities > 0) {
// Don't count processes holding services against our
// maximum process count.
- if (localLOGV) Log.v(
+ if (localLOGV) Slog.v(
TAG, "Not trimming app " + app + " with services: "
+ app.services);
numServiceProcs++;
@@ -13947,7 +14104,7 @@
// running any activities.
if (!app.persistent && app.activities.size() == 0
&& app.curReceiver == null && app.services.size() == 0) {
- Log.i(
+ Slog.i(
TAG, "Exiting empty application process "
+ app.processName + " ("
+ (app.thread != null ? app.thread.asBinder() : null)
@@ -13972,7 +14129,7 @@
// If we still have too many processes, now from the least
// recently used process we start finishing activities.
- if (Config.LOGV) Log.v(
+ if (Config.LOGV) Slog.v(
TAG, "*** NOW HAVE " + mLruProcesses.size() +
" of " + curMaxProcs + " processes");
for ( i=0;
@@ -13987,11 +14144,11 @@
&& app.persistentActivities == 0;
int NUMA = app.activities.size();
int j;
- if (Config.LOGV) Log.v(
+ if (Config.LOGV) Slog.v(
TAG, "Looking to quit " + app.processName);
for (j=0; j<NUMA && canQuit; j++) {
HistoryRecord r = (HistoryRecord)app.activities.get(j);
- if (Config.LOGV) Log.v(
+ if (Config.LOGV) Slog.v(
TAG, " " + r.intent.getComponent().flattenToShortString()
+ ": frozen=" + r.haveState + ", visible=" + r.visible);
canQuit = (r.haveState || !r.stateNotNeeded)
@@ -14006,7 +14163,7 @@
}
r.resultTo = null;
}
- Log.i(TAG, "Exiting application process "
+ Slog.i(TAG, "Exiting application process "
+ app.processName + " ("
+ (app.thread != null ? app.thread.asBinder() : null)
+ ")\n");
diff --git a/services/java/com/android/server/am/AppErrorDialog.java b/services/java/com/android/server/am/AppErrorDialog.java
index 328f5e7..3a1aad6 100644
--- a/services/java/com/android/server/am/AppErrorDialog.java
+++ b/services/java/com/android/server/am/AppErrorDialog.java
@@ -23,7 +23,7 @@
import android.content.res.Resources;
import android.os.Handler;
import android.os.Message;
-import android.util.Log;
+import android.util.Slog;
class AppErrorDialog extends BaseErrorDialog {
private final static String TAG = "AppErrorDialog";
diff --git a/services/java/com/android/server/am/AppNotRespondingDialog.java b/services/java/com/android/server/am/AppNotRespondingDialog.java
index 57c75e0..9702f91 100644
--- a/services/java/com/android/server/am/AppNotRespondingDialog.java
+++ b/services/java/com/android/server/am/AppNotRespondingDialog.java
@@ -26,7 +26,7 @@
import android.os.Handler;
import android.os.Message;
import android.os.Process;
-import android.util.Log;
+import android.util.Slog;
class AppNotRespondingDialog extends BaseErrorDialog {
private static final String TAG = "AppNotRespondingDialog";
@@ -130,7 +130,7 @@
try {
getContext().startActivity(appErrorIntent);
} catch (ActivityNotFoundException e) {
- Log.w(TAG, "bug report receiver dissappeared", e);
+ Slog.w(TAG, "bug report receiver dissappeared", e);
}
}
}
diff --git a/services/java/com/android/server/am/BackupRecord.java b/services/java/com/android/server/am/BackupRecord.java
index 5ac8e0d..6590b91 100644
--- a/services/java/com/android/server/am/BackupRecord.java
+++ b/services/java/com/android/server/am/BackupRecord.java
@@ -54,4 +54,4 @@
.append(' ').append(appInfo.backupAgentName).append('}');
return stringName = sb.toString();
}
-}
\ No newline at end of file
+}
diff --git a/services/java/com/android/server/am/BaseErrorDialog.java b/services/java/com/android/server/am/BaseErrorDialog.java
index aa80ae6..03e3272 100644
--- a/services/java/com/android/server/am/BaseErrorDialog.java
+++ b/services/java/com/android/server/am/BaseErrorDialog.java
@@ -45,10 +45,10 @@
public boolean dispatchKeyEvent(KeyEvent event) {
if (mConsuming) {
- //Log.i(TAG, "Consuming: " + event);
+ //Slog.i(TAG, "Consuming: " + event);
return true;
}
- //Log.i(TAG, "Dispatching: " + event);
+ //Slog.i(TAG, "Dispatching: " + event);
return super.dispatchKeyEvent(event);
}
diff --git a/services/java/com/android/server/am/BatteryStatsService.java b/services/java/com/android/server/am/BatteryStatsService.java
index d59aead..cdf4e95 100644
--- a/services/java/com/android/server/am/BatteryStatsService.java
+++ b/services/java/com/android/server/am/BatteryStatsService.java
@@ -24,7 +24,7 @@
import android.os.Process;
import android.os.ServiceManager;
import android.telephony.SignalStrength;
-import android.util.Log;
+import android.util.Slog;
import com.android.internal.app.IBatteryStats;
import com.android.internal.os.BatteryStatsImpl;
@@ -57,7 +57,7 @@
}
public void shutdown() {
- Log.w("BatteryStats", "Writing battery stats before shutdown...");
+ Slog.w("BatteryStats", "Writing battery stats before shutdown...");
synchronized (mStats) {
mStats.writeLocked();
}
@@ -84,8 +84,8 @@
public byte[] getStatistics() {
mContext.enforceCallingPermission(
android.Manifest.permission.BATTERY_STATS, null);
- //Log.i("foo", "SENDING BATTERY INFO:");
- //mStats.dumpLocked(new LogPrinter(Log.INFO, "foo"));
+ //Slog.i("foo", "SENDING BATTERY INFO:");
+ //mStats.dumpLocked(new LogPrinter(Log.INFO, "foo", Log.LOG_ID_SYSTEM));
Parcel out = Parcel.obtain();
mStats.writeToParcel(out, 0);
byte[] data = out.marshall();
diff --git a/services/java/com/android/server/am/DeviceMonitor.java b/services/java/com/android/server/am/DeviceMonitor.java
index ce07430..5f3b0ce 100644
--- a/services/java/com/android/server/am/DeviceMonitor.java
+++ b/services/java/com/android/server/am/DeviceMonitor.java
@@ -16,7 +16,7 @@
package com.android.server.am;
-import android.util.Log;
+import android.util.Slog;
import java.io.*;
import java.util.Arrays;
@@ -65,7 +65,7 @@
try {
dump();
} catch (IOException e) {
- Log.w(LOG_TAG, "Dump failed.", e);
+ Slog.w(LOG_TAG, "Dump failed.", e);
}
pause();
}
@@ -100,7 +100,7 @@
Arrays.sort(files);
for (int i = 0; i < count; i++) {
if (!files[i].delete()) {
- Log.w(LOG_TAG, "Couldn't delete " + files[i] + ".");
+ Slog.w(LOG_TAG, "Couldn't delete " + files[i] + ".");
}
}
}
@@ -178,7 +178,7 @@
closeable.close();
}
} catch (IOException e) {
- Log.w(LOG_TAG, e);
+ Slog.w(LOG_TAG, e);
}
}
diff --git a/services/java/com/android/server/am/HistoryRecord.java b/services/java/com/android/server/am/HistoryRecord.java
index 0b34f7c..7d7247c 100644
--- a/services/java/com/android/server/am/HistoryRecord.java
+++ b/services/java/com/android/server/am/HistoryRecord.java
@@ -387,12 +387,14 @@
sb.append(" ms)");
Log.i(ActivityManagerService.TAG, sb.toString());
}
+ service.reportActivityLaunchedLocked(false, this, thisTime, totalTime);
if (totalTime > 0) {
service.mUsageStatsService.noteLaunchTime(realActivity, (int)totalTime);
}
startTime = 0;
service.mInitialStartTime = 0;
}
+ service.reportActivityVisibleLocked(this);
if (ActivityManagerService.DEBUG_SWITCH) Log.v(
ActivityManagerService.TAG, "windowsVisible(): " + this);
if (!nowVisible) {
diff --git a/services/java/com/android/server/am/PendingIntentRecord.java b/services/java/com/android/server/am/PendingIntentRecord.java
index b3086d5..847e91b 100644
--- a/services/java/com/android/server/am/PendingIntentRecord.java
+++ b/services/java/com/android/server/am/PendingIntentRecord.java
@@ -24,7 +24,7 @@
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
-import android.util.Log;
+import android.util.Slog;
import java.io.PrintWriter;
import java.lang.ref.WeakReference;
@@ -81,7 +81,7 @@
hash = (ODD_PRIME_NUMBER*hash) + _p.hashCode();
hash = (ODD_PRIME_NUMBER*hash) + _t;
hashCode = hash;
- //Log.i(ActivityManagerService.TAG, this + " hashCode=0x"
+ //Slog.i(ActivityManagerService.TAG, this + " hashCode=0x"
// + Integer.toHexString(hashCode));
}
@@ -145,8 +145,9 @@
public String toString() {
return "Key{" + typeName() + " pkg=" + packageName
- + " intent=" + requestIntent.toShortString(true, false) + " flags=0x"
- + Integer.toHexString(flags) + "}";
+ + " intent="
+ + (requestIntent != null ? requestIntent.toShortString(true, false) : "<null>")
+ + " flags=0x" + Integer.toHexString(flags) + "}";
}
String typeName() {
@@ -212,7 +213,7 @@
finalIntent, resolvedType,
resultTo, resultWho, requestCode, false);
} catch (RuntimeException e) {
- Log.w(ActivityManagerService.TAG,
+ Slog.w(ActivityManagerService.TAG,
"Unable to send startActivity intent", e);
}
break;
@@ -230,7 +231,7 @@
(finishedReceiver != null), false);
sendFinish = false;
} catch (RuntimeException e) {
- Log.w(ActivityManagerService.TAG,
+ Slog.w(ActivityManagerService.TAG,
"Unable to send startActivity intent", e);
}
break;
@@ -239,7 +240,7 @@
owner.startServiceInPackage(uid,
finalIntent, resolvedType);
} catch (RuntimeException e) {
- Log.w(ActivityManagerService.TAG,
+ Slog.w(ActivityManagerService.TAG,
"Unable to send startService intent", e);
}
break;
@@ -262,17 +263,26 @@
}
protected void finalize() throws Throwable {
- if (!canceled) {
- synchronized(owner) {
- WeakReference<PendingIntentRecord> current =
- owner.mIntentSenderRecords.get(key);
- if (current == ref) {
- owner.mIntentSenderRecords.remove(key);
- }
+ try {
+ if (!canceled) {
+ owner.mHandler.sendMessage(owner.mHandler.obtainMessage(
+ ActivityManagerService.FINALIZE_PENDING_INTENT_MSG, this));
}
+ } finally {
+ super.finalize();
}
}
+ public void completeFinalize() {
+ synchronized(owner) {
+ WeakReference<PendingIntentRecord> current =
+ owner.mIntentSenderRecords.get(key);
+ if (current == ref) {
+ owner.mIntentSenderRecords.remove(key);
+ }
+ }
+ }
+
void dump(PrintWriter pw, String prefix) {
pw.print(prefix); pw.print("uid="); pw.print(uid);
pw.print(" packageName="); pw.print(key.packageName);
@@ -286,8 +296,10 @@
pw.print(prefix); pw.print("requestCode="); pw.print(key.requestCode);
pw.print(" requestResolvedType="); pw.println(key.requestResolvedType);
}
- pw.print(prefix); pw.print("requestIntent=");
- pw.println(key.requestIntent.toShortString(true, true));
+ if (key.requestIntent != null) {
+ pw.print(prefix); pw.print("requestIntent=");
+ pw.println(key.requestIntent.toShortString(true, true));
+ }
if (sent || canceled) {
pw.print(prefix); pw.print("sent="); pw.print(sent);
pw.print(" canceled="); pw.println(canceled);
diff --git a/services/java/com/android/server/am/ServiceRecord.java b/services/java/com/android/server/am/ServiceRecord.java
index 2f2cc32..0542497 100644
--- a/services/java/com/android/server/am/ServiceRecord.java
+++ b/services/java/com/android/server/am/ServiceRecord.java
@@ -29,7 +29,7 @@
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemClock;
-import android.util.Log;
+import android.util.Slog;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -269,8 +269,12 @@
inm.enqueueNotification(localPackageName, localForegroundId,
localForegroundNoti, outId);
} catch (RuntimeException e) {
- Log.w(ActivityManagerService.TAG, "Error showing notification for service",
- e);
+ Slog.w(ActivityManagerService.TAG,
+ "Error showing notification for service", e);
+ // If it gave us a garbage notification, it doesn't
+ // get to be foreground.
+ ams.setServiceForeground(name, ServiceRecord.this,
+ localForegroundId, null, true);
} catch (RemoteException e) {
}
}
@@ -293,8 +297,8 @@
try {
inm.cancelNotification(localPackageName, localForegroundId);
} catch (RuntimeException e) {
- Log.w(ActivityManagerService.TAG, "Error canceling notification for"
- + " service", e);
+ Slog.w(ActivityManagerService.TAG,
+ "Error canceling notification for service", e);
} catch (RemoteException e) {
}
}
diff --git a/services/java/com/android/server/am/UsageStatsService.java b/services/java/com/android/server/am/UsageStatsService.java
index f99ca96..d170b02 100644
--- a/services/java/com/android/server/am/UsageStatsService.java
+++ b/services/java/com/android/server/am/UsageStatsService.java
@@ -27,7 +27,7 @@
import android.os.Process;
import android.os.ServiceManager;
import android.os.SystemClock;
-import android.util.Log;
+import android.util.Slog;
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
@@ -149,14 +149,14 @@
PkgUsageStatsExtended(Parcel in) {
mLaunchCount = in.readInt();
mUsageTime = in.readLong();
- if (localLOGV) Log.v(TAG, "Launch count: " + mLaunchCount
+ if (localLOGV) Slog.v(TAG, "Launch count: " + mLaunchCount
+ ", Usage time:" + mUsageTime);
final int N = in.readInt();
- if (localLOGV) Log.v(TAG, "Reading comps: " + N);
+ if (localLOGV) Slog.v(TAG, "Reading comps: " + N);
for (int i=0; i<N; i++) {
String comp = in.readString();
- if (localLOGV) Log.v(TAG, "Component: " + comp);
+ if (localLOGV) Slog.v(TAG, "Component: " + comp);
TimeStats times = new TimeStats(in);
mLaunchTimes.put(comp, times);
}
@@ -231,7 +231,7 @@
while (i > 0) {
i--;
if (fList[i].startsWith(prefix)) {
- Log.i(TAG, "Deleting old usage file: " + fList[i]);
+ Slog.i(TAG, "Deleting old usage file: " + fList[i]);
(new File(parentDir, fList[i])).delete();
}
}
@@ -291,7 +291,7 @@
newFile.createNewFile();
}
} catch (IOException e) {
- Log.w(TAG,"Error : " + e + " reading data from file:" + newFile);
+ Slog.w(TAG,"Error : " + e + " reading data from file:" + newFile);
}
}
}
@@ -300,7 +300,7 @@
Parcel in = getParcelForFile(file);
int vers = in.readInt();
if (vers != VERSION) {
- Log.w(TAG, "Usage stats version changed; dropping");
+ Slog.w(TAG, "Usage stats version changed; dropping");
return;
}
int N = in.readInt();
@@ -310,7 +310,7 @@
if (pkgName == null) {
break;
}
- if (localLOGV) Log.v(TAG, "Reading package #" + N + ": " + pkgName);
+ if (localLOGV) Slog.v(TAG, "Reading package #" + N + ": " + pkgName);
PkgUsageStatsExtended pus = new PkgUsageStatsExtended(in);
synchronized (mStatsLock) {
mStats.put(pkgName, pus);
@@ -356,7 +356,7 @@
for (int i = 0; i < count; i++) {
String fileName = fileList.get(i);
File file = new File(mDir, fileName);
- Log.i(TAG, "Deleting usage file : " + fileName);
+ Slog.i(TAG, "Deleting usage file : " + fileName);
file.delete();
}
}
@@ -384,7 +384,7 @@
if (mFile != null && mFile.exists()) {
backupFile = new File(mFile.getPath() + ".bak");
if (!mFile.renameTo(backupFile)) {
- Log.w(TAG, "Failed to persist new stats");
+ Slog.w(TAG, "Failed to persist new stats");
return;
}
}
@@ -407,7 +407,7 @@
backupFile.delete();
}
} catch (IOException e) {
- Log.w(TAG, "Failed writing stats to file:" + mFile);
+ Slog.w(TAG, "Failed writing stats to file:" + mFile);
if (backupFile != null) {
mFile.delete();
backupFile.renameTo(mFile);
@@ -448,7 +448,7 @@
}
public void shutdown() {
- Log.w(TAG, "Writing usage stats before shutdown...");
+ Slog.w(TAG, "Writing usage stats before shutdown...");
writeStatsToFile(true);
}
@@ -475,7 +475,7 @@
if (mLastResumedPkg != null) {
// We last resumed some other package... just pause it now
// to recover.
- Log.i(TAG, "Unexpected resume of " + pkgName
+ Slog.i(TAG, "Unexpected resume of " + pkgName
+ " while already resumed in " + mLastResumedPkg);
PkgUsageStatsExtended pus = mStats.get(mLastResumedPkg);
if (pus != null) {
@@ -491,7 +491,7 @@
mLastResumedPkg = pkgName;
mLastResumedComp = componentName.getClassName();
- if (localLOGV) Log.i(TAG, "started component:" + pkgName);
+ if (localLOGV) Slog.i(TAG, "started component:" + pkgName);
PkgUsageStatsExtended pus = mStats.get(pkgName);
if (pus == null) {
pus = new PkgUsageStatsExtended();
@@ -514,18 +514,18 @@
return;
}
if (!mIsResumed) {
- Log.i(TAG, "Something wrong here, didn't expect "
+ Slog.i(TAG, "Something wrong here, didn't expect "
+ pkgName + " to be paused");
return;
}
mIsResumed = false;
- if (localLOGV) Log.i(TAG, "paused component:"+pkgName);
+ if (localLOGV) Slog.i(TAG, "paused component:"+pkgName);
PkgUsageStatsExtended pus = mStats.get(pkgName);
if (pus == null) {
// Weird some error here
- Log.i(TAG, "No package stats for pkg:"+pkgName);
+ Slog.i(TAG, "No package stats for pkg:"+pkgName);
return;
}
pus.updatePause();
@@ -642,10 +642,10 @@
dFile.delete();
}
} catch (FileNotFoundException e) {
- Log.w(TAG, "Failed with "+e+" when collecting dump info from file : " + file);
+ Slog.w(TAG, "Failed with "+e+" when collecting dump info from file : " + file);
return;
} catch (IOException e) {
- Log.w(TAG, "Failed with "+e+" when collecting dump info from file : "+file);
+ Slog.w(TAG, "Failed with "+e+" when collecting dump info from file : "+file);
}
}
}
@@ -829,7 +829,7 @@
} else if (isCheckinRequest) {
// If checkin doesn't specify any packages, then we simply won't
// show anything.
- Log.w(TAG, "Checkin without packages");
+ Slog.w(TAG, "Checkin without packages");
return;
}
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index 1d20074..5f37a42 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -27,9 +27,11 @@
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.net.ConnectivityManager;
+import android.net.InterfaceConfiguration;
import android.net.IConnectivityManager;
import android.net.INetworkManagementEventObserver;
import android.net.NetworkInfo;
+import android.os.BatteryManager;
import android.os.Binder;
import android.os.IBinder;
import android.os.INetworkManagementService;
@@ -56,6 +58,7 @@
*
* TODO - look for parent classes and code sharing
*/
+
public class Tethering extends INetworkManagementEventObserver.Stub {
private Notification mTetheringNotification;
@@ -63,10 +66,14 @@
private final String TAG = "Tethering";
private boolean mPlaySounds = false;
+ private boolean mBooted = false;
+ //used to remember if we got connected before boot finished
+ private boolean mDeferedUsbConnection = false;
// TODO - remove both of these - should be part of interface inspection/selection stuff
private String[] mTetherableUsbRegexs;
private String[] mTetherableWifiRegexs;
+ private String[] mUpstreamIfaceRegexs;
private HashMap<String, TetherInterfaceSM> mIfaces;
@@ -74,10 +81,18 @@
private BroadcastReceiver mStateReceiver;
+ private static final String USB_NEAR_IFACE_ADDR = "169.254.2.1";
+
private String[] mDhcpRange;
+ private static final String DHCP_DEFAULT_RANGE_START = "169.254.2.10";
+ private static final String DHCP_DEFAULT_RANGE_STOP = "169.254.2.64";
private String[] mDnsServers;
+ private static final String DNS_DEFAULT_SERVER1 = "8.8.8.8";
+ private static final String DNS_DEFAULT_SERVER2 = "4.2.2.2";
+ private boolean mDunRequired;
+ private boolean mUseHiPri;
private String mUpstreamIfaceName;
HierarchicalStateMachine mTetherMasterSM;
@@ -103,9 +118,9 @@
// TODO - remove this hack after real USB connections are detected.
IntentFilter filter = new IntentFilter();
- filter.addAction(Intent.ACTION_UMS_DISCONNECTED);
- filter.addAction(Intent.ACTION_UMS_CONNECTED);
+ filter.addAction(Intent.ACTION_BATTERY_CHANGED);
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
+ filter.addAction(Intent.ACTION_BOOT_COMPLETED);
mStateReceiver = new StateReceiver();
mContext.registerReceiver(mStateReceiver, filter);
@@ -113,40 +128,34 @@
com.android.internal.R.array.config_tether_dhcp_range);
if (mDhcpRange.length == 0) {
mDhcpRange = new String[2];
- mDhcpRange[0] = new String("169.254.2.1");
- mDhcpRange[1] = new String("169.254.2.64");
+ mDhcpRange[0] = DHCP_DEFAULT_RANGE_START;
+ mDhcpRange[1] = DHCP_DEFAULT_RANGE_STOP;
} else if(mDhcpRange.length == 1) {
String[] tmp = new String[2];
tmp[0] = mDhcpRange[0];
tmp[1] = new String("");
mDhcpRange = tmp;
}
+ mDunRequired = context.getResources().getBoolean(
+ com.android.internal.R.bool.config_tether_dun_required);
mTetherableUsbRegexs = context.getResources().getStringArray(
com.android.internal.R.array.config_tether_usb_regexs);
mTetherableWifiRegexs = context.getResources().getStringArray(
com.android.internal.R.array.config_tether_wifi_regexs);
-
- String[] ifaces = new String[0];
- try {
- ifaces = service.listInterfaces();
- } catch (Exception e) {
- Log.e(TAG, "Error listing Interfaces :" + e);
- }
- for (String iface : ifaces) {
- interfaceAdded(iface);
- }
+ mUpstreamIfaceRegexs = context.getResources().getStringArray(
+ com.android.internal.R.array.config_tether_upstream_regexs);
// TODO - remove and rely on real notifications of the current iface
mDnsServers = new String[2];
- mDnsServers[0] = "8.8.8.8";
- mDnsServers[1] = "4.2.2.2";
- mUpstreamIfaceName = "rmnet0";
+ mDnsServers[0] = DNS_DEFAULT_SERVER1;
+ mDnsServers[1] = DNS_DEFAULT_SERVER2;
}
public void interfaceLinkStatusChanged(String iface, boolean link) {
Log.d(TAG, "interfaceLinkStatusChanged " + iface + ", " + link);
boolean found = false;
+ boolean usb = false;
for (String regex : mTetherableWifiRegexs) {
if (iface.matches(regex)) {
found = true;
@@ -156,6 +165,7 @@
for (String regex: mTetherableUsbRegexs) {
if (iface.matches(regex)) {
found = true;
+ usb = true;
break;
}
}
@@ -165,7 +175,7 @@
TetherInterfaceSM sm = mIfaces.get(iface);
if (link) {
if (sm == null) {
- sm = new TetherInterfaceSM(iface);
+ sm = new TetherInterfaceSM(iface, usb);
mIfaces.put(iface, sm);
sm.start();
}
@@ -179,7 +189,10 @@
}
public void interfaceAdded(String iface) {
+ IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
+ INetworkManagementService service = INetworkManagementService.Stub.asInterface(b);
boolean found = false;
+ boolean usb = false;
for (String regex : mTetherableWifiRegexs) {
if (iface.matches(regex)) {
found = true;
@@ -189,6 +202,7 @@
for (String regex : mTetherableUsbRegexs) {
if (iface.matches(regex)) {
found = true;
+ usb = true;
break;
}
}
@@ -196,13 +210,14 @@
Log.d(TAG, iface + " is not a tetherable iface, ignoring");
return;
}
+
synchronized (mIfaces) {
TetherInterfaceSM sm = mIfaces.get(iface);
if (sm != null) {
Log.e(TAG, "active iface (" + iface + ") reported as added, ignoring");
return;
}
- sm = new TetherInterfaceSM(iface);
+ sm = new TetherInterfaceSM(iface, usb);
mIfaces.put(iface, sm);
sm.start();
}
@@ -297,7 +312,8 @@
broadcast.putStringArrayListExtra(ConnectivityManager.EXTRA_ERRORED_TETHER,
erroredList);
mContext.sendStickyBroadcast(broadcast);
-
+ Log.d(TAG, "sendTetherStateChangedBroadcast " + availableList.size() + ", " +
+ activeList.size() + ", " + erroredList.size());
// check if we need to send a USB notification
// Check if the user wants to be bothered
boolean tellUser = (Settings.Secure.getInt(mContext.getContentResolver(),
@@ -314,8 +330,8 @@
if (tellUser) {
for (Object o : availableList) {
String s = (String)o;
- for (Object matchObject : mTetherableUsbRegexs) {
- if (s.matches((String)matchObject)) {
+ for (String match : mTetherableUsbRegexs) {
+ if (s.matches(match)) {
showTetherAvailableNotification();
return;
}
@@ -414,22 +430,24 @@
}
}
-
-
-
private class StateReceiver extends BroadcastReceiver {
public void onReceive(Context content, Intent intent) {
String action = intent.getAction();
- if (action.equals(Intent.ACTION_UMS_CONNECTED)) {
- Tethering.this.handleTtyConnect();
- } else if (action.equals(Intent.ACTION_UMS_DISCONNECTED)) {
- Tethering.this.handleTtyDisconnect();
+ if (action.equals(Intent.ACTION_BATTERY_CHANGED)) {
+ boolean usbConnected = (intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1)
+ == BatteryManager.BATTERY_PLUGGED_USB);
+ if (mBooted) {
+ Tethering.this.enableUsbIfaces(usbConnected); // add or remove them
+ } else {
+ mDeferedUsbConnection = usbConnected;
+ }
} else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
- IConnectivityManager service =
- IConnectivityManager.Stub.asInterface(b);
+ IConnectivityManager service = IConnectivityManager.Stub.asInterface(b);
try {
- NetworkInfo info = service.getNetworkInfo(ConnectivityManager.TYPE_MOBILE_DUN);
+ int netType = (mUseHiPri ? ConnectivityManager.TYPE_MOBILE_HIPRI:
+ ConnectivityManager.TYPE_MOBILE_DUN);
+ NetworkInfo info = service.getNetworkInfo(netType);
int msg;
if (info != null && info.isConnected() == true) {
msg = TetherMasterSM.CMD_CELL_DUN_ENABLED;
@@ -438,91 +456,107 @@
}
mTetherMasterSM.sendMessage(mTetherMasterSM.obtainMessage(msg));
} catch (RemoteException e) {}
+ } else if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
+ mBooted = true;
+ if (mDeferedUsbConnection) {
+ Tethering.this.enableUsbIfaces(true);
+ }
}
}
}
- private void handleTtyConnect() {
- Log.d(TAG, "handleTtyConnect");
- // for each of the available Tty not already supported by a ppp session,
- // create a ppp session
- // TODO - this should be data-driven rather than hard coded.
- String[] allowedTtys = new String[1];
- allowedTtys[0] = new String("ttyGS0");
-
+ // used on cable insert/remove
+ private void enableUsbIfaces(boolean enable) {
IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
INetworkManagementService service = INetworkManagementService.Stub.asInterface(b);
-
- String[] availableTtys;
+ String[] ifaces = new String[0];
try {
- availableTtys = service.listTtys();
- } catch (RemoteException e) {
- Log.e(TAG, "error listing Ttys :" + e);
+ ifaces = service.listInterfaces();
+ } catch (Exception e) {
+ Log.e(TAG, "Error listing Interfaces :" + e);
return;
}
-
- for (String tty : availableTtys) {
- for (String pattern : allowedTtys) {
- if (tty.matches(pattern)) {
- synchronized (this) {
- if (!mActiveTtys.contains(tty)) {
- // TODO - don't hardcode this
- try {
- // local, remote, dns
- service.attachPppd(tty, "169.254.1.128", "169.254.1.1",
- "169.254.1.128", "0.0.0.0");
- } catch (Exception e) {
- Log.e(TAG, "error calling attachPppd: " + e);
- return;
- }
- Log.d(TAG, "started Pppd on tty " + tty);
- mActiveTtys.add(tty);
- // TODO - remove this after we detect the new iface
- interfaceAdded("ppp0");
- }
+ for (String iface : ifaces) {
+ for (String regex : mTetherableUsbRegexs) {
+ if (iface.matches(regex)) {
+ if (enable) {
+ interfaceAdded(iface);
+ } else {
+ interfaceRemoved(iface);
}
}
}
}
}
- private synchronized void handleTtyDisconnect() {
- Log.d(TAG, "handleTtyDisconnect");
+ // toggled when we enter/leave the fully teathered state
+ private boolean enableUsbRndis(boolean enabled) {
+ Log.d(TAG, "enableUsbRndis(" + enabled + ")");
+ IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
+ INetworkManagementService service = INetworkManagementService.Stub.asInterface(b);
- // TODO - this should be data-driven rather than hard coded.
- String[] allowedTtys = new String[1];
- allowedTtys[0] = new String("ttyGS0");
+ try {
+ if (enabled) {
+ synchronized (this) {
+ if (!service.isUsbRNDISStarted()) {
+ service.startUsbRNDIS();
+ }
+ }
+ } else {
+ if (service.isUsbRNDISStarted()) {
+ service.stopUsbRNDIS();
+ }
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "Error toggling usb RNDIS :" + e);
+ return false;
+ }
+ return true;
+ }
+
+ // configured when we start tethering and unconfig'd on error or conclusion
+ private boolean configureUsbIface(boolean enabled) {
+ Log.d(TAG, "configureUsbIface(" + enabled + ")");
IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
INetworkManagementService service = INetworkManagementService.Stub.asInterface(b);
- String[] availableTtys;
+ // bring toggle the interfaces
+ String[] ifaces = new String[0];
try {
- availableTtys = service.listTtys();
- } catch (RemoteException e) {
- Log.e(TAG, "error listing Ttys :" + e);
- return;
+ ifaces = service.listInterfaces();
+ } catch (Exception e) {
+ Log.e(TAG, "Error listing Interfaces :" + e);
+ return false;
}
-
- for (String tty : availableTtys) {
- for (String pattern : allowedTtys) {
- if (tty.matches(pattern)) {
- synchronized (this) {
- if (mActiveTtys.contains(tty)) {
- try {
- service.detachPppd(tty);
- } catch (Exception e) {
- Log.e(TAG, "error calling detachPppd on " + tty + " :" + e);
+ for (String iface : ifaces) {
+ for (String regex : mTetherableUsbRegexs) {
+ if (iface.matches(regex)) {
+ InterfaceConfiguration ifcg = null;
+ try {
+ ifcg = service.getInterfaceConfig(iface);
+ if (ifcg != null) {
+ ifcg.ipAddr = (169 << 24) + (254 << 16) + (2 << 8) + 1;
+ ifcg.netmask = (255 << 24) + (255 << 16) + (255 << 8) + 0;
+ if (enabled) {
+ ifcg.interfaceFlags = ifcg.interfaceFlags.replace("down", "up");
+ } else {
+ ifcg.interfaceFlags = ifcg.interfaceFlags.replace("up", "down");
+ // TODO - clean this up - maybe a better regex?
+ ifcg.interfaceFlags = ifcg.interfaceFlags.replace("running", "");
+ ifcg.interfaceFlags = ifcg.interfaceFlags.replace(" "," ");
}
- mActiveTtys.remove(tty);
- // TODO - remove this after we detect the new iface
- interfaceRemoved("ppp0");
- return;
+ service.setInterfaceConfig(iface, ifcg);
}
+ } catch (Exception e) {
+ Log.e(TAG, "Error configuring interface " + iface + ", :" + e);
+ return false;
}
}
}
}
+
+ return true;
}
public String[] getTetherableUsbRegexs() {
@@ -533,6 +567,14 @@
return mTetherableWifiRegexs;
}
+ public String[] getUpstreamIfaceRegexs() {
+ return mUpstreamIfaceRegexs;
+ }
+
+ public boolean isDunRequired() {
+ return mDunRequired;
+ }
+
public String[] getTetheredIfaces() {
ArrayList<String> list = new ArrayList<String>();
synchronized (mIfaces) {
@@ -609,6 +651,7 @@
private HierarchicalState mUntetherInterfaceErrorState;
private HierarchicalState mEnableNatErrorState;
private HierarchicalState mDisableNatErrorState;
+ private HierarchicalState mUsbConfigurationErrorState;
private HierarchicalState mUnavailableState;
@@ -617,10 +660,12 @@
private boolean mTethered;
String mIfaceName;
+ boolean mUsb;
- TetherInterfaceSM(String name) {
+ TetherInterfaceSM(String name, boolean usb) {
super(name);
mIfaceName = name;
+ mUsb = usb;
mInitialState = new InitialState();
addState(mInitialState);
@@ -638,6 +683,8 @@
addState(mEnableNatErrorState);
mDisableNatErrorState = new DisableNatErrorState();
addState(mDisableNatErrorState);
+ mUsbConfigurationErrorState = new UsbConfigurationErrorState();
+ addState(mUsbConfigurationErrorState);
mUnavailableState = new UnavailableState();
addState(mUnavailableState);
@@ -656,6 +703,7 @@
if (current == mUntetherInterfaceErrorState) res += "UntetherInterfaceErrorState";
if (current == mEnableNatErrorState) res += "EnableNatErrorState";
if (current == mDisableNatErrorState) res += "DisableNatErrorState";
+ if (current == mUsbConfigurationErrorState) res += "UsbConfigurationErrorState";
if (current == mUnavailableState) res += "UnavailableState";
if (mAvailable) res += " - Available";
if (mTethered) res += " - Tethered";
@@ -686,8 +734,15 @@
return mErrored;
}
- private synchronized void setErrored(boolean errored) {
- mErrored = errored;
+ private void setErrored(boolean errored) {
+ synchronized (this) {
+ mErrored = errored;
+ }
+ if (errored && mUsb) {
+ // note everything's been unwound by this point so nothing to do on
+ // further error..
+ Tethering.this.configureUsbIface(false);
+ }
}
class InitialState extends HierarchicalState {
@@ -726,6 +781,19 @@
@Override
public void enter() {
setAvailable(false);
+ if (mUsb) {
+ if (!Tethering.this.configureUsbIface(true)) {
+ Message m = mTetherMasterSM.obtainMessage(
+ TetherMasterSM.CMD_TETHER_MODE_UNREQUESTED);
+ m.obj = TetherInterfaceSM.this;
+ mTetherMasterSM.sendMessage(m);
+
+ m = obtainMessage(CMD_TRANSITION_TO_ERROR);
+ m.obj = mUsbConfigurationErrorState;
+ sendMessageAtFrontOfQueue(m);
+ return;
+ }
+ }
sendTetherStateChangedBroadcast();
}
@Override
@@ -739,6 +807,12 @@
TetherMasterSM.CMD_TETHER_MODE_UNREQUESTED);
m.obj = TetherInterfaceSM.this;
mTetherMasterSM.sendMessage(m);
+ if (mUsb) {
+ if (!Tethering.this.configureUsbIface(false)) {
+ transitionTo(mUsbConfigurationErrorState);
+ break;
+ }
+ }
transitionTo(mInitialState);
break;
case CMD_TETHER_MODE_ALIVE:
@@ -759,6 +833,10 @@
mTetherMasterSM.sendMessage(m);
transitionTo(mUnavailableState);
break;
+ case CMD_TRANSITION_TO_ERROR:
+ HierarchicalState s = (HierarchicalState)(message.obj);
+ transitionTo(s);
+ break;
default:
retValue = false;
}
@@ -788,12 +866,17 @@
sendMessageAtFrontOfQueue(m);
return;
}
+ if (mUsb) Tethering.this.enableUsbRndis(true);
Log.d(TAG, "Tethered " + mIfaceName);
setAvailable(false);
setTethered(true);
sendTetherStateChangedBroadcast();
}
@Override
+ public void exit() {
+ if (mUsb) Tethering.this.enableUsbRndis(false);
+ }
+ @Override
public boolean processMessage(Message message) {
Log.d(TAG, "TetheredState.processMessage what=" + message.what);
boolean retValue = true;
@@ -821,12 +904,19 @@
m.obj = TetherInterfaceSM.this;
mTetherMasterSM.sendMessage(m);
if (message.what == CMD_TETHER_UNREQUESTED) {
- transitionTo(mInitialState);
+ if (mUsb) {
+ if (!Tethering.this.configureUsbIface(false)) {
+ transitionTo(mUsbConfigurationErrorState);
+ } else {
+ transitionTo(mInitialState);
+ }
+ } else {
+ transitionTo(mInitialState);
+ }
} else if (message.what == CMD_INTERFACE_DOWN) {
transitionTo(mUnavailableState);
}
Log.d(TAG, "Untethered " + mIfaceName);
- sendTetherStateChangedBroadcast();
break;
case CMD_CELL_DUN_ERROR:
case CMD_IP_FORWARDING_ENABLE_ERROR:
@@ -857,6 +947,12 @@
}
Log.d(TAG, "Tether lost upstream connection " + mIfaceName);
sendTetherStateChangedBroadcast();
+ if (mUsb) {
+ if (!Tethering.this.configureUsbIface(false)) {
+ transitionTo(mUsbConfigurationErrorState);
+ break;
+ }
+ }
transitionTo(mInitialState);
break;
case CMD_TRANSITION_TO_ERROR:
@@ -974,6 +1070,15 @@
sendTetherStateChangedBroadcast();
}
}
+
+ class UsbConfigurationErrorState extends ErrorState {
+ @Override
+ public void enter() {
+ Log.e(TAG, "Error trying to configure USB " + mIfaceName);
+ setAvailable(false);
+ setErrored(true);
+ }
+ }
}
class TetherMasterSM extends HierarchicalStateMachine {
@@ -1000,7 +1105,6 @@
private HierarchicalState mCellDunRequestedState;
private HierarchicalState mCellDunAliveState;
private HierarchicalState mTetherModeAliveState;
- private HierarchicalState mCellDunUnRequestedState;
private HierarchicalState mCellDunErrorState;
private HierarchicalState mSetIpForwardingEnabledErrorState;
@@ -1028,8 +1132,6 @@
addState(mCellDunAliveState);
mTetherModeAliveState = new TetherModeAliveState();
addState(mTetherModeAliveState);
- mCellDunUnRequestedState = new CellDunUnRequestedState();
- addState(mCellDunUnRequestedState);
mCellDunErrorState = new CellDunErrorState();
addState(mCellDunErrorState);
@@ -1049,8 +1151,118 @@
setInitialState(mInitialState);
}
+ class TetherMasterUtilState extends HierarchicalState {
+ @Override
+ public boolean processMessage(Message m) {
+ return false;
+ }
+ public int turnOnMobileDun() {
+ IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
+ IConnectivityManager service = IConnectivityManager.Stub.asInterface(b);
+ int retValue = Phone.APN_REQUEST_FAILED;
+ try {
+ retValue = service.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
+ (mUseHiPri ? Phone.FEATURE_ENABLE_HIPRI : Phone.FEATURE_ENABLE_DUN),
+ new Binder());
+ } catch (Exception e) {
+ }
+ return retValue;
+ }
+ public boolean turnOffMobileDun() {
+ IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
+ IConnectivityManager service =
+ IConnectivityManager.Stub.asInterface(b);
+ try {
+ service.stopUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
+ (mUseHiPri ? Phone.FEATURE_ENABLE_HIPRI : Phone.FEATURE_ENABLE_DUN));
+ } catch (Exception e) {
+ return false;
+ }
+ return true;
+ }
+ public boolean turnOnMasterTetherSettings() {
+ IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
+ INetworkManagementService service =
+ INetworkManagementService.Stub.asInterface(b);
+ try {
+ service.setIpForwardingEnabled(true);
+ } catch (Exception e) {
+ transitionTo(mSetIpForwardingEnabledErrorState);
+ return false;
+ }
+ try {
+ service.startTethering(mDhcpRange[0], mDhcpRange[1]);
+ } catch (Exception e) {
+ transitionTo(mStartTetheringErrorState);
+ return false;
+ }
+ try {
+ service.setDnsForwarders(mDnsServers);
+ } catch (Exception e) {
+ transitionTo(mSetDnsForwardersErrorState);
+ return false;
+ }
+ transitionTo(mTetherModeAliveState);
+ return true;
+ }
+ public boolean turnOffMasterTetherSettings() {
+ IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
+ INetworkManagementService service =
+ INetworkManagementService.Stub.asInterface(b);
+ try {
+ service.stopTethering();
+ } catch (Exception e) {
+ transitionTo(mStopTetheringErrorState);
+ return false;
+ }
+ try {
+ service.setIpForwardingEnabled(false);
+ } catch (Exception e) {
+ transitionTo(mSetIpForwardingDisabledErrorState);
+ return false;
+ }
+ transitionTo(mInitialState);
+ return true;
+ }
+ public String findActiveUpstreamIface() {
+ // check for what iface we can use - if none found switch to error.
+ IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
+ INetworkManagementService service = INetworkManagementService.Stub.asInterface(b);
- class InitialState extends HierarchicalState {
+ String[] ifaces = new String[0];
+ try {
+ ifaces = service.listInterfaces();
+ } catch (Exception e) {
+ Log.e(TAG, "Error listing Interfaces :" + e);
+ return null;
+ }
+ for (String iface : ifaces) {
+ for (String regex : mUpstreamIfaceRegexs) {
+ if (iface.matches(regex)) {
+ // verify it is up!
+ InterfaceConfiguration ifcg = null;
+ try {
+ ifcg = service.getInterfaceConfig(iface);
+ } catch (Exception e) {
+ Log.e(TAG, "Error getting iface config :" + e);
+ // ignore - try next
+ continue;
+ }
+ if (ifcg.interfaceFlags.contains("up")) {
+ return iface;
+ }
+ }
+ }
+ }
+ return null;
+ }
+ }
+
+ class InitialState extends TetherMasterUtilState {
+ @Override
+ public void enter() {
+ mUseHiPri = false;
+ }
@Override
public boolean processMessage(Message message) {
Log.d(TAG, "MasterInitialState.processMessage what=" + message.what);
@@ -1080,40 +1292,38 @@
return retValue;
}
}
- class CellDunRequestedState extends HierarchicalState {
+ class CellDunRequestedState extends TetherMasterUtilState {
@Override
public void enter() {
- ++mSequenceNumber;
- IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
- IConnectivityManager service =
- IConnectivityManager.Stub.asInterface(b);
- int result;
- try {
- result = service.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
- Phone.FEATURE_ENABLE_DUN, new Binder());
- } catch (Exception e) {
- result = Phone.APN_REQUEST_FAILED;
- }
- switch (result) {
- case Phone.APN_ALREADY_ACTIVE:
- Log.d(TAG, "Dun already active");
- sendMessage(obtainMessage(CMD_CELL_DUN_ENABLED));
- break;
- case Phone.APN_REQUEST_FAILED:
- case Phone.APN_TYPE_NOT_AVAILABLE:
- Log.d(TAG, "Error bringing up Dun connection");
- Message m = obtainMessage(CMD_CELL_DUN_TIMEOUT);
- m.arg1 = mSequenceNumber;
- sendMessage(m);
- break;
- case Phone.APN_REQUEST_STARTED:
- Log.d(TAG, "Started bringing up Dun connection");
- m = obtainMessage(CMD_CELL_DUN_TIMEOUT);
- m.arg1 = mSequenceNumber;
- sendMessageDelayed(m, CELL_DUN_TIMEOUT_MS);
- break;
- default:
- Log.e(TAG, "Unknown return value from startUsingNetworkFeature " + result);
+ mUseHiPri = (findActiveUpstreamIface() == null && !mDunRequired);
+ if (mDunRequired || mUseHiPri) {
+ ++mSequenceNumber;
+ int result = turnOnMobileDun();
+ switch (result) {
+ case Phone.APN_ALREADY_ACTIVE:
+ Log.d(TAG, "Dun already active");
+ sendMessage(obtainMessage(CMD_CELL_DUN_ENABLED));
+ break;
+ case Phone.APN_REQUEST_FAILED:
+ case Phone.APN_TYPE_NOT_AVAILABLE:
+ Log.d(TAG, "Error bringing up Dun connection");
+ Message m = obtainMessage(CMD_CELL_DUN_TIMEOUT);
+ m.arg1 = mSequenceNumber;
+ sendMessage(m);
+ break;
+ case Phone.APN_REQUEST_STARTED:
+ Log.d(TAG, "Started bringing up Dun connection");
+ m = obtainMessage(CMD_CELL_DUN_TIMEOUT);
+ m.arg1 = mSequenceNumber;
+ sendMessageDelayed(m, CELL_DUN_TIMEOUT_MS);
+ break;
+ default:
+ Log.e(TAG, "Unknown return value from startUsingNetworkFeature " +
+ result);
+ }
+ } else {
+ Log.d(TAG, "no Dun Required. Skipping to Active");
+ sendMessage(obtainMessage(CMD_CELL_DUN_ENABLED));
}
}
@@ -1132,34 +1342,15 @@
if (index != -1) {
mNotifyList.remove(index);
if (mNotifyList.isEmpty()) {
- transitionTo(mCellDunUnRequestedState);
+ if (mDunRequired || mUseHiPri) {
+ turnOffMobileDun();
+ }
+ transitionTo(mInitialState);
}
}
break;
case CMD_CELL_DUN_ENABLED:
- IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
- INetworkManagementService service =
- INetworkManagementService.Stub.asInterface(b);
-
- try {
- service.setIpForwardingEnabled(true);
- } catch (Exception e) {
- transitionTo(mSetIpForwardingEnabledErrorState);
- break;
- }
- try {
- service.startTethering(mDhcpRange[0], mDhcpRange[1]);
- } catch (Exception e) {
- transitionTo(mStartTetheringErrorState);
- break;
- }
- try {
- service.setDnsForwarders(mDnsServers);
- } catch (Exception e) {
- transitionTo(mSetDnsForwardersErrorState);
- break;
- }
- transitionTo(mTetherModeAliveState);
+ turnOnMasterTetherSettings();
break;
case CMD_CELL_DUN_DISABLED:
break;
@@ -1176,9 +1367,10 @@
}
}
- class CellDunAliveState extends HierarchicalState {
+ class CellDunAliveState extends TetherMasterUtilState {
@Override
public void enter() {
+ Log.d(TAG, "renewing Dun in " + CELL_DUN_RENEW_MS + "ms");
sendMessageDelayed(obtainMessage(CMD_CELL_DUN_RENEW), CELL_DUN_RENEW_MS);
}
@@ -1190,29 +1382,7 @@
case CMD_TETHER_MODE_REQUESTED:
TetherInterfaceSM who = (TetherInterfaceSM)message.obj;
mNotifyList.add(who);
- IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
- INetworkManagementService service =
- INetworkManagementService.Stub.asInterface(b);
-
- try {
- service.setIpForwardingEnabled(true);
- } catch (Exception e) {
- transitionTo(mSetIpForwardingEnabledErrorState);
- break;
- }
- try {
- service.startTethering(mDhcpRange[0], mDhcpRange[1]);
- } catch (Exception e) {
- transitionTo(mStartTetheringErrorState);
- break;
- }
- try {
- service.setDnsForwarders(mDnsServers);
- } catch (Exception e) {
- transitionTo(mSetDnsForwardersErrorState);
- break;
- }
- transitionTo(mTetherModeAliveState);
+ turnOnMasterTetherSettings();
break;
case CMD_TETHER_MODE_UNREQUESTED:
who = (TetherInterfaceSM)message.obj;
@@ -1220,7 +1390,10 @@
if (index != -1) {
mNotifyList.remove(index);
if (mNotifyList.isEmpty()) {
- transitionTo(mCellDunUnRequestedState);
+ if (mDunRequired || mUseHiPri) {
+ turnOffMobileDun();
+ }
+ transitionTo(mInitialState);
}
}
break;
@@ -1228,13 +1401,9 @@
transitionTo(mInitialState);
break;
case CMD_CELL_DUN_RENEW:
- b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
- IConnectivityManager cservice = IConnectivityManager.Stub.asInterface(b);
- try {
- cservice.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
- Phone.FEATURE_ENABLE_DUN, new Binder());
- } catch (Exception e) {
- }
+ Log.d(TAG, "renewing dun connection - requeuing for another " +
+ CELL_DUN_RENEW_MS + "ms");
+ turnOnMobileDun();
sendMessageDelayed(obtainMessage(CMD_CELL_DUN_RENEW), CELL_DUN_RENEW_MS);
break;
default:
@@ -1245,12 +1414,22 @@
}
}
- class TetherModeAliveState extends HierarchicalState {
+ class TetherModeAliveState extends TetherMasterUtilState {
@Override
public void enter() {
- for (Object o : mNotifyList) {
- TetherInterfaceSM sm = (TetherInterfaceSM)o;
- sm.sendMessage(sm.obtainMessage(TetherInterfaceSM.CMD_TETHER_MODE_ALIVE));
+ if (mDunRequired || mUseHiPri) {
+ Log.d(TAG, "renewing Dun in " + CELL_DUN_RENEW_MS + "ms");
+ sendMessageDelayed(obtainMessage(CMD_CELL_DUN_RENEW), CELL_DUN_RENEW_MS);
+ }
+ mUpstreamIfaceName = findActiveUpstreamIface();
+ if (mUpstreamIfaceName == null) {
+ Log.d(TAG, "Erroring our of tether - no upstream ifaces available");
+ sendMessage(obtainMessage(CMD_CELL_DUN_DISABLED));
+ } else {
+ for (Object o : mNotifyList) {
+ TetherInterfaceSM sm = (TetherInterfaceSM)o;
+ sm.sendMessage(sm.obtainMessage(TetherInterfaceSM.CMD_TETHER_MODE_ALIVE));
+ }
}
}
@Override
@@ -1269,7 +1448,11 @@
if (index != -1) {
mNotifyList.remove(index);
if (mNotifyList.isEmpty()) {
- transitionTo(mCellDunUnRequestedState);
+ if (mDunRequired || mUseHiPri) {
+ turnOffMobileDun();
+ }
+ turnOffMasterTetherSettings(); // transitions appropriately
+ mUpstreamIfaceName = null;
}
}
break;
@@ -1281,22 +1464,14 @@
sm.sendMessage(sm.obtainMessage(
TetherInterfaceSM.CMD_TETHER_MODE_DEAD));
}
- IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
- INetworkManagementService service =
- INetworkManagementService.Stub.asInterface(b);
- try {
- service.stopTethering();
- } catch (Exception e) {
- transitionTo(mStopTetheringErrorState);
- break;
- }
- try {
- service.setIpForwardingEnabled(false);
- } catch (Exception e) {
- transitionTo(mSetIpForwardingDisabledErrorState);
- break;
- }
- transitionTo(mInitialState);
+ turnOffMasterTetherSettings(); // transitions appropriately
+ mUpstreamIfaceName = null;
+ break;
+ case CMD_CELL_DUN_RENEW:
+ Log.d(TAG, "renewing dun connection - requeuing for another " +
+ CELL_DUN_RENEW_MS + "ms");
+ turnOnMobileDun();
+ sendMessageDelayed(obtainMessage(CMD_CELL_DUN_RENEW), CELL_DUN_RENEW_MS);
break;
default:
retValue = false;
@@ -1306,58 +1481,6 @@
}
}
- class CellDunUnRequestedState extends HierarchicalState {
- @Override
- public void enter() {
- IBinder b = ServiceManager.getService(Context.CONNECTIVITY_SERVICE);
- IConnectivityManager service =
- IConnectivityManager.Stub.asInterface(b);
- NetworkInfo dunInfo = null;
- try {
- dunInfo = service.getNetworkInfo(ConnectivityManager.TYPE_MOBILE_DUN);
- } catch (Exception e) {}
- if (dunInfo != null && !dunInfo.isConnectedOrConnecting()) {
- sendMessage(obtainMessage(CMD_CELL_DUN_DISABLED));
- return;
- }
- try {
- service.stopUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE,
- Phone.FEATURE_ENABLE_DUN);
- } catch (Exception e) {}
- Message m = obtainMessage(CMD_CELL_DUN_TIMEOUT);
- m.arg1 = ++mSequenceNumber;
- // use a short timeout - this will often be a no-op and
- // we just want this request to get into the queue before we
- // try again.
- sendMessageDelayed(m, CELL_DISABLE_DUN_TIMEOUT_MS);
- }
- @Override
- public boolean processMessage(Message message) {
- Log.d(TAG, "CellDunUnRequestedState.processMessage what=" + message.what);
- boolean retValue = true;
- switch (message.what) {
- case CMD_TETHER_MODE_REQUESTED:
- case CMD_TETHER_MODE_UNREQUESTED:
- deferMessage(message);
- break;
- case CMD_CELL_DUN_DISABLED:
- transitionTo(mInitialState);
- break;
- case CMD_CELL_DUN_TIMEOUT:
- // if we aren't using a sep apn, we won't get a disconnect broadcast..
- // just go back to initial after our short pause
- if (message.arg1 == mSequenceNumber) {
- transitionTo(mInitialState);
- }
- break;
- default:
- retValue = false;
- break;
- }
- return retValue;
- }
- }
-
class ErrorState extends HierarchicalState {
int mErrorNotification;
@Override
diff --git a/services/java/com/android/server/status/DateView.java b/services/java/com/android/server/status/DateView.java
index 78bfd5e..3e54a6d 100644
--- a/services/java/com/android/server/status/DateView.java
+++ b/services/java/com/android/server/status/DateView.java
@@ -5,7 +5,7 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.util.AttributeSet;
-import android.util.Log;
+import android.util.Slog;
import android.widget.TextView;
import android.view.MotionEvent;
diff --git a/services/java/com/android/server/status/ExpandedView.java b/services/java/com/android/server/status/ExpandedView.java
index d0f14cb..7e66810 100644
--- a/services/java/com/android/server/status/ExpandedView.java
+++ b/services/java/com/android/server/status/ExpandedView.java
@@ -7,21 +7,15 @@
import android.view.MotionEvent;
import android.view.WindowManager;
import android.widget.LinearLayout;
-import android.util.Log;
+import android.util.Slog;
public class ExpandedView extends LinearLayout {
- final Display mDisplay;
StatusBarService mService;
- boolean mTracking;
- int mStartX, mStartY;
- int mMaxHeight = 0;
int mPrevHeight = -1;
public ExpandedView(Context context, AttributeSet attrs) {
super(context, attrs);
- mDisplay = ((WindowManager)context.getSystemService(
- Context.WINDOW_SERVICE)).getDefaultDisplay();
}
@Override
@@ -36,26 +30,13 @@
}
@Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- super.onMeasure(widthMeasureSpec,
- MeasureSpec.makeMeasureSpec(mMaxHeight, MeasureSpec.AT_MOST));
- }
-
- @Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
int height = bottom - top;
if (height != mPrevHeight) {
- //Log.d(StatusBarService.TAG, "height changed old=" + mPrevHeight + " new=" + height);
+ //Slog.d(StatusBarService.TAG, "height changed old=" + mPrevHeight + " new=" + height);
mPrevHeight = height;
mService.updateExpandedViewPos(StatusBarService.EXPANDED_LEAVE_ALONE);
}
}
-
- void setMaxHeight(int h) {
- if (h != mMaxHeight) {
- mMaxHeight = h;
- requestLayout();
- }
- }
}
diff --git a/services/java/com/android/server/status/FixedSizeDrawable.java b/services/java/com/android/server/status/FixedSizeDrawable.java
index fe5abca..69a09d7 100644
--- a/services/java/com/android/server/status/FixedSizeDrawable.java
+++ b/services/java/com/android/server/status/FixedSizeDrawable.java
@@ -4,7 +4,7 @@
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Rect;
-import android.util.Log;
+import android.util.Slog;
class FixedSizeDrawable extends Drawable {
Drawable mDrawable;
diff --git a/services/java/com/android/server/status/IconData.java b/services/java/com/android/server/status/IconData.java
index 8a61eb5..adca375 100644
--- a/services/java/com/android/server/status/IconData.java
+++ b/services/java/com/android/server/status/IconData.java
@@ -1,6 +1,6 @@
package com.android.server.status;
-import android.util.Log;
+import android.util.Slog;
public class IconData {
/**
diff --git a/services/java/com/android/server/status/LatestItemView.java b/services/java/com/android/server/status/LatestItemView.java
index a47f6ad..6e7a9ce 100644
--- a/services/java/com/android/server/status/LatestItemView.java
+++ b/services/java/com/android/server/status/LatestItemView.java
@@ -2,7 +2,7 @@
import android.content.Context;
import android.util.AttributeSet;
-import android.util.Log;
+import android.util.Slog;
import android.view.MotionEvent;
import android.widget.FrameLayout;
diff --git a/services/java/com/android/server/status/NotificationViewList.java b/services/java/com/android/server/status/NotificationViewList.java
index 8f1633f..b9865a4 100644
--- a/services/java/com/android/server/status/NotificationViewList.java
+++ b/services/java/com/android/server/status/NotificationViewList.java
@@ -1,7 +1,7 @@
package com.android.server.status;
import android.os.IBinder;
-import android.util.Log;
+import android.util.Slog;
import android.view.View;
import java.util.ArrayList;
@@ -119,8 +119,8 @@
index++;
}
}
- Log.e(StatusBarService.TAG, "Couldn't find notification in NotificationViewList.");
- Log.e(StatusBarService.TAG, "notification=" + notification);
+ Slog.e(StatusBarService.TAG, "Couldn't find notification in NotificationViewList.");
+ Slog.e(StatusBarService.TAG, "notification=" + notification);
dump(notification);
return 0;
}
@@ -171,7 +171,7 @@
list.add(index, notification);
if (StatusBarService.SPEW) {
- Log.d(StatusBarService.TAG, "NotificationViewList index=" + index);
+ Slog.d(StatusBarService.TAG, "NotificationViewList index=" + index);
dump(notification);
}
}
@@ -190,7 +190,7 @@
}
s += " ";
}
- Log.d(StatusBarService.TAG, "NotificationViewList ongoing: " + s);
+ Slog.d(StatusBarService.TAG, "NotificationViewList ongoing: " + s);
s = "";
for (int i=0; i<mLatest.size(); i++) {
@@ -204,7 +204,7 @@
}
s += " ";
}
- Log.d(StatusBarService.TAG, "NotificationViewList latest: " + s);
+ Slog.d(StatusBarService.TAG, "NotificationViewList latest: " + s);
}
}
diff --git a/services/java/com/android/server/status/StatusBarIcon.java b/services/java/com/android/server/status/StatusBarIcon.java
index b20d3f6..c9e3b78 100644
--- a/services/java/com/android/server/status/StatusBarIcon.java
+++ b/services/java/com/android/server/status/StatusBarIcon.java
@@ -6,7 +6,7 @@
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
-import android.util.Log;
+import android.util.Slog;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
@@ -140,7 +140,7 @@
try {
r = context.getPackageManager().getResourcesForApplication(data.iconPackage);
} catch (PackageManager.NameNotFoundException ex) {
- Log.e(StatusBarService.TAG, "Icon package not found: " + data.iconPackage, ex);
+ Slog.e(StatusBarService.TAG, "Icon package not found: " + data.iconPackage, ex);
return null;
}
} else {
@@ -148,14 +148,14 @@
}
if (data.iconId == 0) {
- Log.w(StatusBarService.TAG, "No icon ID for slot " + data.slot);
+ Slog.w(StatusBarService.TAG, "No icon ID for slot " + data.slot);
return null;
}
try {
return r.getDrawable(data.iconId);
} catch (RuntimeException e) {
- Log.w(StatusBarService.TAG, "Icon not found in "
+ Slog.w(StatusBarService.TAG, "Icon not found in "
+ (data.iconPackage != null ? data.iconId : "<system>")
+ ": " + Integer.toHexString(data.iconId));
}
diff --git a/services/java/com/android/server/status/StatusBarPolicy.java b/services/java/com/android/server/status/StatusBarPolicy.java
index f1ccb9b..44e0dad 100644
--- a/services/java/com/android/server/status/StatusBarPolicy.java
+++ b/services/java/com/android/server/status/StatusBarPolicy.java
@@ -51,7 +51,7 @@
import android.text.style.RelativeSizeSpan;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
-import android.util.Log;
+import android.util.Slog;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
@@ -650,7 +650,7 @@
boolean plugged = intent.getIntExtra("plugged", 0) != 0;
int level = intent.getIntExtra("level", -1);
if (false) {
- Log.d(TAG, "updateBattery level=" + level
+ Slog.d(TAG, "updateBattery level=" + level
+ " plugged=" + plugged
+ " mBatteryPlugged=" + mBatteryPlugged
+ " mBatteryLevel=" + mBatteryLevel
@@ -679,14 +679,14 @@
}
*/
if (false) {
- Log.d(TAG, "plugged=" + plugged + " oldPlugged=" + oldPlugged + " level=" + level);
+ Slog.d(TAG, "plugged=" + plugged + " oldPlugged=" + oldPlugged + " level=" + level);
}
}
private void onBatteryLow(Intent intent) {
if (SHOW_LOW_BATTERY_WARNING) {
if (false) {
- Log.d(TAG, "mPhoneState=" + mPhoneState
+ Slog.d(TAG, "mPhoneState=" + mPhoneState
+ " mLowBatteryDialog=" + mLowBatteryDialog
+ " mBatteryShowLowOnEndCall=" + mBatteryShowLowOnEndCall);
}
@@ -838,7 +838,7 @@
private final void updateCallState(int state) {
mPhoneState = state;
if (false) {
- Log.d(TAG, "mPhoneState=" + mPhoneState
+ Slog.d(TAG, "mPhoneState=" + mPhoneState
+ " mLowBatteryDialog=" + mLowBatteryDialog
+ " mBatteryShowLowOnEndCall=" + mBatteryShowLowOnEndCall);
}
@@ -973,7 +973,7 @@
int[] iconList;
if (!hasService()) {
- //Log.d(TAG, "updateSignalStrength: no service");
+ //Slog.d(TAG, "updateSignalStrength: no service");
if (Settings.System.getInt(mContext.getContentResolver(),
Settings.System.AIRPLANE_MODE_ON, 0) == 1) {
mPhoneData.iconId = com.android.internal.R.drawable.stat_sys_signal_flightmode;
@@ -1012,7 +1012,7 @@
if ((mPhoneState == TelephonyManager.CALL_STATE_IDLE) && isEvdo()){
iconLevel = getEvdoLevel();
if (false) {
- Log.d(TAG, "use Evdo level=" + iconLevel + " to replace Cdma Level=" + getCdmaLevel());
+ Slog.d(TAG, "use Evdo level=" + iconLevel + " to replace Cdma Level=" + getCdmaLevel());
}
} else {
iconLevel = getCdmaLevel();
@@ -1306,16 +1306,16 @@
final String action = intent.getAction();
final boolean enabled = intent.getBooleanExtra(TtyIntent.TTY_ENABLED, false);
- if (false) Log.v(TAG, "updateTTY: enabled: " + enabled);
+ if (false) Slog.v(TAG, "updateTTY: enabled: " + enabled);
if (enabled) {
// TTY is on
- if (false) Log.v(TAG, "updateTTY: set TTY on");
+ if (false) Slog.v(TAG, "updateTTY: set TTY on");
mService.updateIcon(mTTYModeIcon, mTTYModeEnableIconData, null);
mService.setIconVisibility(mTTYModeIcon, true);
} else {
// TTY is off
- if (false) Log.v(TAG, "updateTTY: set TTY off");
+ if (false) Slog.v(TAG, "updateTTY: set TTY off");
mService.setIconVisibility(mTTYModeIcon, false);
}
}
@@ -1336,17 +1336,17 @@
int iconMode = state.getCdmaEriIconMode();
if (iconIndex == -1) {
- Log.e(TAG, "getCdmaEriIconIndex returned null, skipping ERI icon update");
+ Slog.e(TAG, "getCdmaEriIconIndex returned null, skipping ERI icon update");
return;
}
if (iconMode == -1) {
- Log.e(TAG, "getCdmeEriIconMode returned null, skipping ERI icon update");
+ Slog.e(TAG, "getCdmeEriIconMode returned null, skipping ERI icon update");
return;
}
if (iconIndex == EriInfo.ROAMING_INDICATOR_OFF) {
- if (false) Log.v(TAG, "Cdma ROAMING_INDICATOR_OFF, removing ERI icon");
+ if (false) Slog.v(TAG, "Cdma ROAMING_INDICATOR_OFF, removing ERI icon");
mService.setIconVisibility(mCdmaRoamingIndicatorIcon, false);
return;
}
diff --git a/services/java/com/android/server/status/StatusBarService.java b/services/java/com/android/server/status/StatusBarService.java
index 493bd93..d5f2c1d 100644
--- a/services/java/com/android/server/status/StatusBarService.java
+++ b/services/java/com/android/server/status/StatusBarService.java
@@ -41,7 +41,7 @@
import android.os.Message;
import android.os.SystemClock;
import android.provider.Telephony;
-import android.util.Log;
+import android.util.Slog;
import android.view.Display;
import android.view.Gravity;
import android.view.KeyEvent;
@@ -116,7 +116,7 @@
IBinder token;
public void binderDied() {
- Log.i(TAG, "binder died for pkg=" + pkg);
+ Slog.i(TAG, "binder died for pkg=" + pkg);
disable(0, token, pkg);
token.unlinkToDeath(this, 0);
}
@@ -187,8 +187,9 @@
TextView mSpnLabel;
TextView mPlmnLabel;
TextView mClearButton;
+ View mExpandedContents;
CloseDragHandle mCloseView;
- int[] mCloseLocation = new int[2];
+ int[] mPositionTmp = new int[2];
boolean mExpanded;
boolean mExpandedVisible;
@@ -198,7 +199,7 @@
// the tracker view
TrackingView mTrackingView;
WindowManager.LayoutParams mTrackingParams;
- int mTrackingPosition;
+ int mTrackingPosition; // the position of the top of the tracking view.
// ticker
private Ticker mTicker;
@@ -274,6 +275,7 @@
mExpandedDialog = new ExpandedDialog(context);
mExpandedView = expanded;
+ mExpandedContents = expanded.findViewById(R.id.notificationLinearLayout);
mOngoingTitle = (TextView)expanded.findViewById(R.id.ongoingTitle);
mOngoingItems = (LinearLayout)expanded.findViewById(R.id.ongoingItems);
mLatestTitle = (TextView)expanded.findViewById(R.id.latestTitle);
@@ -480,7 +482,7 @@
// lock on mDisableRecords
void manageDisableListLocked(int what, IBinder token, String pkg) {
if (SPEW) {
- Log.d(TAG, "manageDisableList what=0x" + Integer.toHexString(what)
+ Slog.d(TAG, "manageDisableList what=0x" + Integer.toHexString(what)
+ " pkg=" + pkg);
}
// update the list
@@ -659,7 +661,7 @@
/* private */ void performAddUpdateIcon(IBinder key, IconData data, NotificationData n)
throws StatusBarException {
if (SPEW) {
- Log.d(TAG, "performAddUpdateIcon icon=" + data + " notification=" + n + " key=" + key);
+ Slog.d(TAG, "performAddUpdateIcon icon=" + data + " notification=" + n + " key=" + key);
}
// notification
if (n != null) {
@@ -723,7 +725,7 @@
rightIcons[slotIndex] = icon;
mStatusIcons.addView(icon.view, pos);
} else {
- Log.e(TAG, "duplicate icon in slot " + slotIndex + "/" + data.slot);
+ Slog.e(TAG, "duplicate icon in slot " + slotIndex + "/" + data.slot);
mIconMap.remove(key);
mIconList.remove(icon);
return ;
@@ -752,7 +754,7 @@
/* private */ void performSetIconVisibility(IBinder key, boolean visible) {
synchronized (mIconMap) {
if (SPEW) {
- Log.d(TAG, "performSetIconVisibility key=" + key + " visible=" + visible);
+ Slog.d(TAG, "performSetIconVisibility key=" + key + " visible=" + visible);
}
StatusBarIcon icon = mIconMap.get(key);
icon.view.setVisibility(visible ? View.VISIBLE : View.GONE);
@@ -762,7 +764,7 @@
/* private */ void performRemoveIcon(IBinder key) {
synchronized (this) {
if (SPEW) {
- Log.d(TAG, "performRemoveIcon key=" + key);
+ Slog.d(TAG, "performRemoveIcon key=" + key);
}
StatusBarIcon icon = mIconMap.remove(key);
mIconList.remove(icon);
@@ -849,7 +851,7 @@
exception = e;
}
if (child == null) {
- Log.e(TAG, "couldn't inflate view for package " + n.pkg, exception);
+ Slog.e(TAG, "couldn't inflate view for package " + n.pkg, exception);
return null;
}
content.addView(child);
@@ -906,7 +908,7 @@
}
catch (RuntimeException e) {
// It failed to add cleanly. Log, and remove the view from the panel.
- Log.w(TAG, "couldn't reapply views for package " + n.contentView.getPackage(), e);
+ Slog.w(TAG, "couldn't reapply views for package " + n.contentView.getPackage(), e);
removeNotificationView(notification);
}
} else {
@@ -947,7 +949,7 @@
}
private void makeExpandedVisible() {
- if (SPEW) Log.d(TAG, "Make expanded visible: expanded visible=" + mExpandedVisible);
+ if (SPEW) Slog.d(TAG, "Make expanded visible: expanded visible=" + mExpandedVisible);
if (mExpandedVisible) {
return;
}
@@ -967,7 +969,7 @@
}
void animateExpand() {
- if (SPEW) Log.d(TAG, "Animate expand: expanded=" + mExpanded);
+ if (SPEW) Slog.d(TAG, "Animate expand: expanded=" + mExpanded);
if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
return ;
}
@@ -981,7 +983,7 @@
void animateCollapse() {
if (SPEW) {
- Log.d(TAG, "animateCollapse(): mExpanded=" + mExpanded
+ Slog.d(TAG, "animateCollapse(): mExpanded=" + mExpanded
+ " mExpandedVisible=" + mExpandedVisible
+ " mExpanded=" + mExpanded
+ " mAnimating=" + mAnimating
@@ -1007,7 +1009,7 @@
}
void performExpand() {
- if (SPEW) Log.d(TAG, "performExpand: mExpanded=" + mExpanded);
+ if (SPEW) Slog.d(TAG, "performExpand: mExpanded=" + mExpanded);
if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) {
return ;
}
@@ -1032,7 +1034,7 @@
}
void performCollapse() {
- if (SPEW) Log.d(TAG, "performCollapse: mExpanded=" + mExpanded
+ if (SPEW) Slog.d(TAG, "performCollapse: mExpanded=" + mExpanded
+ " mExpandedVisible=" + mExpandedVisible);
if (!mExpandedVisible) {
@@ -1058,18 +1060,18 @@
void doAnimation() {
if (mAnimating) {
- if (SPEW) Log.d(TAG, "doAnimation");
- if (SPEW) Log.d(TAG, "doAnimation before mAnimY=" + mAnimY);
+ if (SPEW) Slog.d(TAG, "doAnimation");
+ if (SPEW) Slog.d(TAG, "doAnimation before mAnimY=" + mAnimY);
incrementAnim();
- if (SPEW) Log.d(TAG, "doAnimation after mAnimY=" + mAnimY);
+ if (SPEW) Slog.d(TAG, "doAnimation after mAnimY=" + mAnimY);
if (mAnimY >= mDisplay.getHeight()-1) {
- if (SPEW) Log.d(TAG, "Animation completed to expanded state.");
+ if (SPEW) Slog.d(TAG, "Animation completed to expanded state.");
mAnimating = false;
updateExpandedViewPos(EXPANDED_FULL_OPEN);
performExpand();
}
else if (mAnimY < mStatusBarView.getHeight()) {
- if (SPEW) Log.d(TAG, "Animation completed to collapsed state.");
+ if (SPEW) Slog.d(TAG, "Animation completed to collapsed state.");
mAnimating = false;
updateExpandedViewPos(0);
performCollapse();
@@ -1097,7 +1099,7 @@
mAnimY = y + (v*t) + (0.5f*a*t*t); // px
mAnimVel = v + (a*t); // px/s
mAnimLastTime = now; // ms
- //Log.d(TAG, "y=" + y + " v=" + v + " a=" + a + " t=" + t + " mAnimY=" + mAnimY
+ //Slog.d(TAG, "y=" + y + " v=" + v + " a=" + a + " t=" + t + " mAnimY=" + mAnimY
// + " mAnimAccel=" + mAnimAccel);
}
@@ -1153,7 +1155,7 @@
mAnimY = y;
mAnimVel = vel;
- //Log.d(TAG, "starting with mAnimY=" + mAnimY + " mAnimVel=" + mAnimVel);
+ //Slog.d(TAG, "starting with mAnimY=" + mAnimY + " mAnimVel=" + mAnimVel);
if (mExpanded) {
if (!always && (
@@ -1193,7 +1195,7 @@
}
}
}
- //Log.d(TAG, "mAnimY=" + mAnimY + " mAnimVel=" + mAnimVel
+ //Slog.d(TAG, "mAnimY=" + mAnimY + " mAnimVel=" + mAnimVel
// + " mAnimAccel=" + mAnimAccel);
long now = SystemClock.uptimeMillis();
@@ -1208,7 +1210,7 @@
boolean interceptTouchEvent(MotionEvent event) {
if (SPEW) {
- Log.d(TAG, "Touch: rawY=" + event.getRawY() + " event=" + event + " mDisabled="
+ Slog.d(TAG, "Touch: rawY=" + event.getRawY() + " event=" + event + " mDisabled="
+ mDisabled);
}
@@ -1309,7 +1311,7 @@
mNotificationCallbacks.onNotificationClick(mPkg, mTag, mId);
} catch (PendingIntent.CanceledException e) {
// the stack trace isn't very helpful here. Just log the exception message.
- Log.w(TAG, "Sending contentIntent failed: " + e);
+ Slog.w(TAG, "Sending contentIntent failed: " + e);
}
deactivate();
}
@@ -1473,19 +1475,19 @@
mHandler.post(new Runnable() {
public void run() {
mStatusBarView.getLocationOnScreen(mAbsPos);
- Log.d(TAG, "mStatusBarView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
+ Slog.d(TAG, "mStatusBarView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
+ ") " + mStatusBarView.getWidth() + "x"
+ mStatusBarView.getHeight());
mStatusBarView.debug();
mExpandedView.getLocationOnScreen(mAbsPos);
- Log.d(TAG, "mExpandedView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
+ Slog.d(TAG, "mExpandedView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
+ ") " + mExpandedView.getWidth() + "x"
+ mExpandedView.getHeight());
mExpandedView.debug();
mTrackingView.getLocationOnScreen(mAbsPos);
- Log.d(TAG, "mTrackingView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
+ Slog.d(TAG, "mTrackingView: ----- (" + mAbsPos[0] + "," + mAbsPos[1]
+ ") " + mTrackingView.getWidth() + "x"
+ mTrackingView.getHeight());
mTrackingView.debug();
@@ -1530,20 +1532,11 @@
/// ---------- Expanded View --------------
pixelFormat = PixelFormat.TRANSLUCENT;
- bg = mExpandedView.getBackground();
- if (bg != null) {
- pixelFormat = bg.getOpacity();
- if (pixelFormat != PixelFormat.TRANSLUCENT) {
- // we want good-looking gradients, so we force a 8-bits per
- // pixel format.
- pixelFormat = PixelFormat.RGBX_8888;
- }
- }
final int disph = mDisplay.getHeight();
lp = mExpandedDialog.getWindow().getAttributes();
lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
- lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
+ lp.height = getExpandedHeight();
lp.x = 0;
mTrackingPosition = lp.y = -disph; // sufficiently large negative
lp.type = WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL;
@@ -1562,10 +1555,10 @@
mExpandedDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
mExpandedDialog.setContentView(mExpandedView,
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
- ViewGroup.LayoutParams.WRAP_CONTENT));
+ ViewGroup.LayoutParams.MATCH_PARENT));
+ mExpandedDialog.getWindow().setBackgroundDrawable(null);
mExpandedDialog.show();
FrameLayout hack = (FrameLayout)mExpandedView.getParent();
- hack.setForeground(null);
}
void setDateViewVisibility(boolean visible, int anim) {
@@ -1585,7 +1578,7 @@
void updateExpandedViewPos(int expandedPosition) {
if (SPEW) {
- Log.d(TAG, "updateExpandedViewPos before expandedPosition=" + expandedPosition
+ Slog.d(TAG, "updateExpandedViewPos before expandedPosition=" + expandedPosition
+ " mTrackingParams.y=" + mTrackingParams.y
+ " mTrackingPosition=" + mTrackingPosition);
}
@@ -1630,11 +1623,15 @@
mTrackingParams.height = disph-h;
WindowManagerImpl.getDefault().updateViewLayout(mTrackingView, mTrackingParams);
- mCloseView.getLocationInWindow(mCloseLocation);
-
if (mExpandedParams != null) {
+ mCloseView.getLocationInWindow(mPositionTmp);
+ final int closePos = mPositionTmp[1];
+
+ mExpandedContents.getLocationInWindow(mPositionTmp);
+ final int contentsBottom = mPositionTmp[1] + mExpandedContents.getHeight();
+
mExpandedParams.y = pos + mTrackingView.getHeight()
- - (mTrackingParams.height-mCloseLocation[1]) - mExpandedView.getHeight();
+ - (mTrackingParams.height-closePos) - contentsBottom;
int max = h;
if (mExpandedParams.y > max) {
mExpandedParams.y = max;
@@ -1644,30 +1641,33 @@
mExpandedParams.y = min;
}
- /*
- Log.d(TAG, "mTrackingPosition=" + mTrackingPosition
- + " mTrackingView.height=" + mTrackingView.getHeight()
- + " diff=" + (mTrackingPosition + mTrackingView.getHeight())
- + " h=" + h);
- */
- panelSlightlyVisible((mTrackingPosition + mTrackingView.getHeight()) > h);
+ boolean visible = (mTrackingPosition + mTrackingView.getHeight()) > h;
+ if (!visible) {
+ // if the contents aren't visible, move the expanded view way off screen
+ // because the window itself extends below the content view.
+ mExpandedParams.y = -disph;
+ }
+ panelSlightlyVisible(visible);
mExpandedDialog.getWindow().setAttributes(mExpandedParams);
}
if (SPEW) {
- Log.d(TAG, "updateExpandedViewPos after expandedPosition=" + expandedPosition
+ Slog.d(TAG, "updateExpandedViewPos after expandedPosition=" + expandedPosition
+ " mTrackingParams.y=" + mTrackingParams.y
+ " mTrackingPosition=" + mTrackingPosition
- + " mExpandedParams.y=" + mExpandedParams.y);
+ + " mExpandedParams.y=" + mExpandedParams.y
+ + " mExpandedParams.height=" + mExpandedParams.height);
}
}
- void updateAvailableHeight() {
+ int getExpandedHeight() {
+ return mDisplay.getHeight() - mStatusBarView.getHeight() - mCloseView.getHeight();
+ }
+
+ void updateExpandedHeight() {
if (mExpandedView != null) {
- int disph = mDisplay.getHeight();
- int h = mStatusBarView.getHeight();
- int max = disph - (mCloseView.getHeight() + h);
- mExpandedView.setMaxHeight(max);
+ mExpandedParams.height = getExpandedHeight();
+ mExpandedDialog.getWindow().setAttributes(mExpandedParams);
}
}
@@ -1697,13 +1697,13 @@
// act accordingly
if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) {
if ((net & StatusBarManager.DISABLE_EXPAND) != 0) {
- Log.d(TAG, "DISABLE_EXPAND: yes");
+ Slog.d(TAG, "DISABLE_EXPAND: yes");
animateCollapse();
}
}
if ((diff & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
if ((net & StatusBarManager.DISABLE_NOTIFICATION_ICONS) != 0) {
- Log.d(TAG, "DISABLE_NOTIFICATION_ICONS: yes");
+ Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: yes");
if (mTicking) {
mNotificationIcons.setVisibility(View.INVISIBLE);
mTicker.halt();
@@ -1711,7 +1711,7 @@
setNotificationIconVisibility(false, com.android.internal.R.anim.fade_out);
}
} else {
- Log.d(TAG, "DISABLE_NOTIFICATION_ICONS: no");
+ Slog.d(TAG, "DISABLE_NOTIFICATION_ICONS: no");
if (!mExpandedVisible) {
setNotificationIconVisibility(true, com.android.internal.R.anim.fade_in);
}
@@ -1751,7 +1751,7 @@
void updateNetworkName(boolean showSpn, String spn, boolean showPlmn, String plmn) {
if (false) {
- Log.d(TAG, "updateNetworkName showSpn=" + showSpn + " spn=" + spn
+ Slog.d(TAG, "updateNetworkName showSpn=" + showSpn + " spn=" + spn
+ " showPlmn=" + showPlmn + " plmn=" + plmn);
}
boolean something = false;
@@ -1793,7 +1793,7 @@
mEdgeBorder = res.getDimensionPixelSize(R.dimen.status_bar_edge_ignore);
- if (false) Log.v(TAG, "updateResources");
+ if (false) Slog.v(TAG, "updateResources");
}
//
@@ -1814,7 +1814,7 @@
public void run() {
vibrate();
SystemClock.sleep(250);
- Log.d(TAG, "startTracing");
+ Slog.d(TAG, "startTracing");
android.os.Debug.startMethodTracing("/data/statusbar-traces/trace");
mHandler.postDelayed(mStopTracing, 10000);
}
@@ -1823,7 +1823,7 @@
Runnable mStopTracing = new Runnable() {
public void run() {
android.os.Debug.stopMethodTracing();
- Log.d(TAG, "stopTracing");
+ Slog.d(TAG, "stopTracing");
vibrate();
}
};
diff --git a/services/java/com/android/server/status/StatusBarView.java b/services/java/com/android/server/status/StatusBarView.java
index 35dfb81..d12a3cf 100644
--- a/services/java/com/android/server/status/StatusBarView.java
+++ b/services/java/com/android/server/status/StatusBarView.java
@@ -2,7 +2,7 @@
import android.content.Context;
import android.util.AttributeSet;
-import android.util.Log;
+import android.util.Slog;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
diff --git a/services/java/com/android/server/status/StorageNotification.java b/services/java/com/android/server/status/StorageNotification.java
index 3b79049..8da8cd3 100644
--- a/services/java/com/android/server/status/StorageNotification.java
+++ b/services/java/com/android/server/status/StorageNotification.java
@@ -36,7 +36,8 @@
import android.os.storage.StorageEventListener;
import android.os.storage.StorageManager;
import android.os.storage.StorageResultCode;
-import android.util.Log;
+import android.provider.Settings;
+import android.util.Slog;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
@@ -46,6 +47,8 @@
public class StorageNotification extends StorageEventListener {
private static final String TAG = "StorageNotification";
+ private static final boolean POP_UMS_ACTIVITY_ON_CONNECT = true;
+
/**
* Binder context for this service
*/
@@ -78,7 +81,7 @@
mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
mUmsAvailable = mStorageManager.isUsbMassStorageConnected();
- Log.d(TAG, String.format( "Startup with UMS connection %s (media state %s)", mUmsAvailable,
+ Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)", mUmsAvailable,
Environment.getExternalStorageState()));
}
@@ -94,7 +97,7 @@
*/
String st = Environment.getExternalStorageState();
- Log.i(TAG, String.format("UMS connection changed to %s (media state %s)", connected, st));
+ Slog.i(TAG, String.format("UMS connection changed to %s (media state %s)", connected, st));
if (connected && (st.equals(
Environment.MEDIA_REMOVED) || st.equals(Environment.MEDIA_CHECKING))) {
@@ -111,7 +114,7 @@
*/
@Override
public void onStorageStateChanged(String path, String oldState, String newState) {
- Log.i(TAG, String.format(
+ Slog.i(TAG, String.format(
"Media {%s} state changed from {%s} -> {%s}", path, oldState, newState));
if (newState.equals(Environment.MEDIA_SHARED)) {
/*
@@ -226,7 +229,7 @@
true, true, null);
updateUsbMassStorageNotification(false);
} else {
- Log.w(TAG, String.format("Ignoring unknown state {%s}", newState));
+ Slog.w(TAG, String.format("Ignoring unknown state {%s}", newState));
}
}
@@ -239,12 +242,28 @@
Intent intent = new Intent();
intent.setClass(mContext, com.android.server.status.UsbStorageActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+
+ final boolean adbOn = 1 == Settings.Secure.getInt(
+ mContext.getContentResolver(),
+ Settings.Secure.ADB_ENABLED,
+ 0);
+
PendingIntent pi = PendingIntent.getActivity(mContext, 0, intent, 0);
setUsbStorageNotification(
com.android.internal.R.string.usb_storage_notification_title,
com.android.internal.R.string.usb_storage_notification_message,
com.android.internal.R.drawable.stat_sys_data_usb,
false, true, pi);
+
+ if (POP_UMS_ACTIVITY_ON_CONNECT && !adbOn) {
+ // We assume that developers don't want to enable UMS every
+ // time they attach a device to a USB host. The average user,
+ // however, is looking to charge the phone (in which case this
+ // is harmless) or transfer files (in which case this coaches
+ // the user about how to complete that task and saves several
+ // steps).
+ mContext.startActivity(intent);
+ }
} else {
setUsbStorageNotification(0, 0, 0, false, false, null);
}
diff --git a/services/java/com/android/server/status/Ticker.java b/services/java/com/android/server/status/Ticker.java
index c93ee0d..6626c86 100644
--- a/services/java/com/android/server/status/Ticker.java
+++ b/services/java/com/android/server/status/Ticker.java
@@ -9,7 +9,7 @@
import android.text.Layout.Alignment;
import android.text.TextPaint;
import android.text.TextUtils;
-import android.util.Log;
+import android.util.Slog;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
diff --git a/services/java/com/android/server/status/TrackingPatternView.java b/services/java/com/android/server/status/TrackingPatternView.java
index 4cb8eff..2c91aa4 100644
--- a/services/java/com/android/server/status/TrackingPatternView.java
+++ b/services/java/com/android/server/status/TrackingPatternView.java
@@ -19,7 +19,7 @@
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
-import android.util.Log;
+import android.util.Slog;
import android.view.View;
import android.graphics.BitmapFactory;
import android.graphics.Bitmap;
diff --git a/services/java/com/android/server/status/TrackingView.java b/services/java/com/android/server/status/TrackingView.java
index 722d10c..886d66d 100644
--- a/services/java/com/android/server/status/TrackingView.java
+++ b/services/java/com/android/server/status/TrackingView.java
@@ -23,7 +23,7 @@
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
- mService.updateAvailableHeight();
+ mService.updateExpandedHeight();
}
@Override
diff --git a/services/java/com/android/server/status/UsbStorageActivity.java b/services/java/com/android/server/status/UsbStorageActivity.java
index 7a2a2d6..c1c8c22 100644
--- a/services/java/com/android/server/status/UsbStorageActivity.java
+++ b/services/java/com/android/server/status/UsbStorageActivity.java
@@ -16,25 +16,27 @@
package com.android.server.status;
+import com.android.internal.R;
import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.DialogInterface.OnCancelListener;
import android.os.Bundle;
-import android.os.Handler;
import android.os.Environment;
+import android.os.IBinder;
+import android.os.storage.IMountService;
import android.os.storage.StorageManager;
import android.os.storage.StorageEventListener;
-import android.os.storage.StorageResultCode;
-import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.widget.ImageView;
import android.widget.Button;
import android.widget.TextView;
-import android.widget.Toast;
import android.view.View;
import android.util.Log;
@@ -43,7 +45,8 @@
* on-demand (that is, when the USB cable is connected). It uses the alert
* dialog style. It will be launched from a notification.
*/
-public class UsbStorageActivity extends Activity {
+public class UsbStorageActivity extends Activity
+ implements View.OnClickListener, OnCancelListener {
private static final String TAG = "UsbStorageActivity";
private Button mMountButton;
private Button mUnmountButton;
@@ -51,6 +54,9 @@
private TextView mMessage;
private ImageView mIcon;
private StorageManager mStorageManager = null;
+ private static final int DLG_CONFIRM_KILL_STORAGE_USERS = 1;
+ private static final int DLG_ERROR_SHARING = 2;
+ static final boolean localLOGV = false;
/** Used to detect when the USB cable is unplugged, so we can call finish() */
private BroadcastReceiver mBatteryReceiver = new BroadcastReceiver() {
@@ -82,7 +88,6 @@
if (mStorageManager == null) {
Log.w(TAG, "Failed to get StorageManager");
}
- mStorageManager.registerListener(mStorageListener);
}
setTitle(getString(com.android.internal.R.string.usb_storage_activity_title));
@@ -94,28 +99,9 @@
mMessage = (TextView) findViewById(com.android.internal.R.id.message);
mMountButton = (Button) findViewById(com.android.internal.R.id.mount_button);
- mMountButton.setOnClickListener(
- new View.OnClickListener() {
- public void onClick(View v) {
- int rc = mStorageManager.enableUsbMassStorage();
- if (rc != StorageResultCode.OperationSucceeded) {
- Log.e(TAG, String.format("UMS enable failed (%d)", rc));
- showSharingError();
- }
- }
- });
-
+ mMountButton.setOnClickListener(this);
mUnmountButton = (Button) findViewById(com.android.internal.R.id.unmount_button);
- mUnmountButton.setOnClickListener(
- new View.OnClickListener() {
- public void onClick(View v) {
- int rc = mStorageManager.disableUsbMassStorage();
- if (rc != StorageResultCode.OperationSucceeded) {
- Log.e(TAG, String.format("UMS disable failed (%d)", rc));
- showStoppingError();
- }
- }
- });
+ mUnmountButton.setOnClickListener(this);
}
private void switchDisplay(boolean usbStorageInUse) {
@@ -138,6 +124,7 @@
protected void onResume() {
super.onResume();
+ mStorageManager.registerListener(mStorageListener);
registerReceiver(mBatteryReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
try {
switchDisplay(mStorageManager.isUsbMassStorageEnabled());
@@ -151,6 +138,9 @@
super.onPause();
unregisterReceiver(mBatteryReceiver);
+ if (mStorageManager == null && mStorageListener != null) {
+ mStorageManager.unregisterListener(mStorageListener);
+ }
}
private void handleBatteryChanged(Intent intent) {
@@ -160,15 +150,81 @@
finish();
}
}
-
- private void showSharingError() {
- Toast.makeText(this, com.android.internal.R.string.usb_storage_error_message,
- Toast.LENGTH_LONG).show();
+
+ private IMountService getMountService() {
+ IBinder service = ServiceManager.getService("mount");
+ if (service != null) {
+ return IMountService.Stub.asInterface(service);
+ }
+ return null;
}
-
- private void showStoppingError() {
- Toast.makeText(this, com.android.internal.R.string.usb_storage_stop_error_message,
- Toast.LENGTH_LONG).show();
+
+ @Override
+ public Dialog onCreateDialog(int id, Bundle args) {
+ switch (id) {
+ case DLG_CONFIRM_KILL_STORAGE_USERS:
+ return new AlertDialog.Builder(this)
+ .setTitle(R.string.dlg_confirm_kill_storage_users_title)
+ .setPositiveButton(R.string.dlg_ok, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ mStorageManager.enableUsbMassStorage();
+ }})
+ .setNegativeButton(R.string.cancel, null)
+ .setMessage(R.string.dlg_confirm_kill_storage_users_text)
+ .setOnCancelListener(this)
+ .create();
+ case DLG_ERROR_SHARING:
+ return new AlertDialog.Builder(this)
+ .setTitle(R.string.dlg_error_title)
+ .setNeutralButton(R.string.dlg_ok, null)
+ .setMessage(R.string.usb_storage_error_message)
+ .setOnCancelListener(this)
+ .create();
+ }
+ return null;
+ }
+
+ private void showDialogInner(int id) {
+ removeDialog(id);
+ showDialog(id);
+ }
+
+ private void checkStorageUsers() {
+ IMountService ims = getMountService();
+ if (ims == null) {
+ // Display error dialog
+ showDialogInner(DLG_ERROR_SHARING);
+ }
+ String path = Environment.getExternalStorageDirectory().getPath();
+ int stUsers[] = null;
+ try {
+ if (localLOGV) Log.i(TAG, "Checking getStorageUsers");
+ stUsers = ims.getStorageUsers(path);
+ } catch (RemoteException e) {
+ showDialogInner(DLG_ERROR_SHARING);
+ }
+ if (stUsers != null && stUsers.length > 0) {
+ // Display dialog to user
+ showDialogInner(DLG_CONFIRM_KILL_STORAGE_USERS);
+ } else {
+ if (localLOGV) Log.i(TAG, "Enabling UMS");
+ mStorageManager.enableUsbMassStorage();
+ }
+ }
+
+ public void onClick(View v) {
+ Log.i(TAG, "Clicked button");
+ if (v == mMountButton) {
+ // Check for list of storage users and display dialog if needed.
+ checkStorageUsers();
+ } else if (v == mUnmountButton) {
+ if (localLOGV) Log.i(TAG, "Disabling UMS");
+ mStorageManager.disableUsbMassStorage();
+ }
+ }
+
+ public void onCancel(DialogInterface dialog) {
+ finish();
}
}
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
index 52c8b1f..cab7b81 100644
--- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
@@ -440,10 +440,11 @@
return Phone.APN_REQUEST_FAILED;
}
- if(DBG) Log.d(LOG_TAG, "enableApnType("+type+"), isApnTypeActive = "
+ if (DBG) Log.d(LOG_TAG, "enableApnType("+type+"), isApnTypeActive = "
+ isApnTypeActive(type) + " and state = " + state);
if (!isApnTypeAvailable(type)) {
+ if (DBG) Log.d(LOG_TAG, "type not available");
return Phone.APN_TYPE_NOT_AVAILABLE;
}
diff --git a/telephony/java/com/android/internal/telephony/IccPhoneBookInterfaceManager.java b/telephony/java/com/android/internal/telephony/IccPhoneBookInterfaceManager.java
index 31cf6a7..9f8e57f 100644
--- a/telephony/java/com/android/internal/telephony/IccPhoneBookInterfaceManager.java
+++ b/telephony/java/com/android/internal/telephony/IccPhoneBookInterfaceManager.java
@@ -22,10 +22,7 @@
import android.os.Looper;
import android.os.Message;
import android.os.ServiceManager;
-import android.telephony.PhoneNumberUtils;
-import android.util.Log;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -37,7 +34,7 @@
protected PhoneBase phone;
protected AdnRecordCache adnCache;
- protected Object mLock = new Object();
+ protected final Object mLock = new Object();
protected int recordSize[];
protected boolean success;
protected List<AdnRecord> records;
@@ -80,8 +77,7 @@
ar = (AsyncResult)msg.obj;
synchronized (mLock) {
if (ar.exception == null) {
- records = (List<AdnRecord>)
- ((ArrayList<AdnRecord>) ar.result);
+ records = (List<AdnRecord>) ar.result;
} else {
if(DBG) logd("Cannot load ADN records");
if (records != null) {
diff --git a/telephony/java/com/android/internal/telephony/IccProvider.java b/telephony/java/com/android/internal/telephony/IccProvider.java
index 4232887..fa91457 100644
--- a/telephony/java/com/android/internal/telephony/IccProvider.java
+++ b/telephony/java/com/android/internal/telephony/IccProvider.java
@@ -19,8 +19,9 @@
import android.content.ContentProvider;
import android.content.UriMatcher;
import android.content.ContentValues;
-import com.android.common.ArrayListCursor;
+import android.database.AbstractCursor;
import android.database.Cursor;
+import android.database.CursorWindow;
import android.net.Uri;
import android.os.SystemProperties;
import android.os.RemoteException;
@@ -35,6 +36,149 @@
import com.android.internal.telephony.AdnRecord;
import com.android.internal.telephony.IIccPhoneBook;
+/**
+ * XXX old code -- should be replaced with MatrixCursor.
+ * @deprecated This is has been replaced by MatrixCursor.
+*/
+class ArrayListCursor extends AbstractCursor {
+ private String[] mColumnNames;
+ private ArrayList<Object>[] mRows;
+
+ @SuppressWarnings({"unchecked"})
+ public ArrayListCursor(String[] columnNames, ArrayList<ArrayList> rows) {
+ int colCount = columnNames.length;
+ boolean foundID = false;
+ // Add an _id column if not in columnNames
+ for (int i = 0; i < colCount; ++i) {
+ if (columnNames[i].compareToIgnoreCase("_id") == 0) {
+ mColumnNames = columnNames;
+ foundID = true;
+ break;
+ }
+ }
+
+ if (!foundID) {
+ mColumnNames = new String[colCount + 1];
+ System.arraycopy(columnNames, 0, mColumnNames, 0, columnNames.length);
+ mColumnNames[colCount] = "_id";
+ }
+
+ int rowCount = rows.size();
+ mRows = new ArrayList[rowCount];
+
+ for (int i = 0; i < rowCount; ++i) {
+ mRows[i] = rows.get(i);
+ if (!foundID) {
+ mRows[i].add(i);
+ }
+ }
+ }
+
+ @Override
+ public void fillWindow(int position, CursorWindow window) {
+ if (position < 0 || position > getCount()) {
+ return;
+ }
+
+ window.acquireReference();
+ try {
+ int oldpos = mPos;
+ mPos = position - 1;
+ window.clear();
+ window.setStartPosition(position);
+ int columnNum = getColumnCount();
+ window.setNumColumns(columnNum);
+ while (moveToNext() && window.allocRow()) {
+ for (int i = 0; i < columnNum; i++) {
+ final Object data = mRows[mPos].get(i);
+ if (data != null) {
+ if (data instanceof byte[]) {
+ byte[] field = (byte[]) data;
+ if (!window.putBlob(field, mPos, i)) {
+ window.freeLastRow();
+ break;
+ }
+ } else {
+ String field = data.toString();
+ if (!window.putString(field, mPos, i)) {
+ window.freeLastRow();
+ break;
+ }
+ }
+ } else {
+ if (!window.putNull(mPos, i)) {
+ window.freeLastRow();
+ break;
+ }
+ }
+ }
+ }
+
+ mPos = oldpos;
+ } catch (IllegalStateException e){
+ // simply ignore it
+ } finally {
+ window.releaseReference();
+ }
+ }
+
+ @Override
+ public int getCount() {
+ return mRows.length;
+ }
+
+ @Override
+ public String[] getColumnNames() {
+ return mColumnNames;
+ }
+
+ @Override
+ public byte[] getBlob(int columnIndex) {
+ return (byte[]) mRows[mPos].get(columnIndex);
+ }
+
+ @Override
+ public String getString(int columnIndex) {
+ Object cell = mRows[mPos].get(columnIndex);
+ return (cell == null) ? null : cell.toString();
+ }
+
+ @Override
+ public short getShort(int columnIndex) {
+ Number num = (Number) mRows[mPos].get(columnIndex);
+ return num.shortValue();
+ }
+
+ @Override
+ public int getInt(int columnIndex) {
+ Number num = (Number) mRows[mPos].get(columnIndex);
+ return num.intValue();
+ }
+
+ @Override
+ public long getLong(int columnIndex) {
+ Number num = (Number) mRows[mPos].get(columnIndex);
+ return num.longValue();
+ }
+
+ @Override
+ public float getFloat(int columnIndex) {
+ Number num = (Number) mRows[mPos].get(columnIndex);
+ return num.floatValue();
+ }
+
+ @Override
+ public double getDouble(int columnIndex) {
+ Number num = (Number) mRows[mPos].get(columnIndex);
+ return num.doubleValue();
+ }
+
+ @Override
+ public boolean isNull(int columnIndex) {
+ return mRows[mPos].get(columnIndex) == null;
+ }
+}
+
/**
* {@hide}
diff --git a/telephony/java/com/android/internal/telephony/PhoneSubInfo.java b/telephony/java/com/android/internal/telephony/PhoneSubInfo.java
index 19900c8..1ac2da3 100644
--- a/telephony/java/com/android/internal/telephony/PhoneSubInfo.java
+++ b/telephony/java/com/android/internal/telephony/PhoneSubInfo.java
@@ -39,6 +39,11 @@
}
protected void finalize() {
+ try {
+ super.finalize();
+ } catch (Throwable throwable) {
+ Log.e(LOG_TAG, "Error while finalizing:", throwable);
+ }
Log.d(LOG_TAG, "PhoneSubInfo finalized");
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index fbb3c4c..b5461bf 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -23,6 +23,8 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
+import android.net.ConnectivityManager;
+import android.net.IConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiManager;
import android.os.AsyncResult;
@@ -103,6 +105,7 @@
private static final String[] mSupportedApnTypes = {
Phone.APN_TYPE_DEFAULT,
Phone.APN_TYPE_MMS,
+ Phone.APN_TYPE_DUN,
Phone.APN_TYPE_HIPRI };
// Possibly promoate to base class, the only difference is
@@ -188,8 +191,16 @@
// and 2) whether the RIL will setup the baseband to auto-PS attach.
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(phone.getContext());
+ boolean dataEnabledSetting = true;
+ try {
+ dataEnabledSetting = IConnectivityManager.Stub.asInterface(ServiceManager.
+ getService(Context.CONNECTIVITY_SERVICE)).getMobileDataEnabled();
+ } catch (Exception e) {
+ // nothing to do - use the old behavior and leave data on
+ }
dataEnabled[APN_DEFAULT_ID] =
- !sp.getBoolean(CDMAPhone.DATA_DISABLED_ON_BOOT_KEY, false);
+ !sp.getBoolean(CDMAPhone.DATA_DISABLED_ON_BOOT_KEY, false) &&
+ dataEnabledSetting;
if (dataEnabled[APN_DEFAULT_ID]) {
enabledCount++;
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/EriManager.java b/telephony/java/com/android/internal/telephony/cdma/EriManager.java
index 0e186d0..37c1d55 100644
--- a/telephony/java/com/android/internal/telephony/cdma/EriManager.java
+++ b/telephony/java/com/android/internal/telephony/cdma/EriManager.java
@@ -23,8 +23,8 @@
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneBase;
+import com.android.internal.util.XmlUtils;
-import com.android.common.XmlUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
diff --git a/telephony/java/com/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager.java b/telephony/java/com/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager.java
index 78e89d5..6e12f24a 100644
--- a/telephony/java/com/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager.java
+++ b/telephony/java/com/android/internal/telephony/cdma/RuimPhoneBookInterfaceManager.java
@@ -16,22 +16,10 @@
package com.android.internal.telephony.cdma;
-import android.content.pm.PackageManager;
-import android.os.AsyncResult;
-import android.os.Handler;
-import android.os.Looper;
import android.os.Message;
-import android.os.ServiceManager;
-import android.telephony.PhoneNumberUtils;
import android.util.Log;
-import com.android.internal.telephony.AdnRecord;
-import com.android.internal.telephony.AdnRecordCache;
import com.android.internal.telephony.IccPhoneBookInterfaceManager;
-import com.android.internal.telephony.PhoneProxy;
-
-import java.util.ArrayList;
-import java.util.List;
/**
* RuimPhoneBookInterfaceManager to provide an inter-process communication to
@@ -42,20 +30,6 @@
public class RuimPhoneBookInterfaceManager extends IccPhoneBookInterfaceManager {
static final String LOG_TAG = "CDMA";
-
- Handler mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- AsyncResult ar;
-
- switch(msg.what) {
- default:
- mBaseHandler.handleMessage(msg);
- break;
- }
- }
- };
-
public RuimPhoneBookInterfaceManager(CDMAPhone phone) {
super(phone);
adnCache = phone.mRuimRecords.getAdnCache();
@@ -67,6 +41,11 @@
}
protected void finalize() {
+ try {
+ super.finalize();
+ } catch (Throwable throwable) {
+ Log.e(LOG_TAG, "Error while finalizing:", throwable);
+ }
if(DBG) Log.d(LOG_TAG, "RuimPhoneBookInterfaceManager finalized");
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/RuimSmsInterfaceManager.java b/telephony/java/com/android/internal/telephony/cdma/RuimSmsInterfaceManager.java
index 9439359..cfcfd98 100644
--- a/telephony/java/com/android/internal/telephony/cdma/RuimSmsInterfaceManager.java
+++ b/telephony/java/com/android/internal/telephony/cdma/RuimSmsInterfaceManager.java
@@ -30,6 +30,7 @@
import com.android.internal.telephony.SmsRawData;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import static android.telephony.SmsManager.STATUS_ON_ICC_FREE;
@@ -89,6 +90,11 @@
}
protected void finalize() {
+ try {
+ super.finalize();
+ } catch (Throwable throwable) {
+ Log.e(LOG_TAG, "Error while finalizing:", throwable);
+ }
if(DBG) Log.d(LOG_TAG, "RuimSmsInterfaceManager finalized");
}
@@ -143,7 +149,7 @@
public boolean copyMessageToIccEf(int status, byte[] pdu, byte[] smsc) {
//NOTE smsc not used in RUIM
if (DBG) log("copyMessageToIccEf: status=" + status + " ==> " +
- "pdu=("+ pdu + ")");
+ "pdu=("+ Arrays.toString(pdu) + ")");
enforceReceiveAndSend("Copying message to RUIM");
synchronized(mLock) {
mSuccess = false;
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java
index 905d5e3..d893ec4 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java
@@ -18,8 +18,8 @@
import android.os.Message;
import android.util.Log;
+import android.util.Patterns;
-import com.android.common.Patterns;
import com.android.internal.telephony.DataConnection;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.RILConstants;
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 1fd6be8..30beaaa 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -27,6 +27,8 @@
import android.content.SharedPreferences;
import android.database.ContentObserver;
import android.database.Cursor;
+import android.net.ConnectivityManager;
+import android.net.IConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.net.wifi.WifiManager;
@@ -243,7 +245,15 @@
// This preference tells us 1) initial condition for "dataEnabled",
// and 2) whether the RIL will setup the baseband to auto-PS attach.
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(phone.getContext());
- dataEnabled[APN_DEFAULT_ID] = !sp.getBoolean(GSMPhone.DATA_DISABLED_ON_BOOT_KEY, false);
+ boolean dataEnabledSetting = true;
+ try {
+ dataEnabledSetting = IConnectivityManager.Stub.asInterface(ServiceManager.
+ getService(Context.CONNECTIVITY_SERVICE)).getMobileDataEnabled();
+ } catch (Exception e) {
+ // nothing to do - use the old behavior and leave data on
+ }
+ dataEnabled[APN_DEFAULT_ID] = !sp.getBoolean(GSMPhone.DATA_DISABLED_ON_BOOT_KEY, false) &&
+ dataEnabledSetting;
if (dataEnabled[APN_DEFAULT_ID]) {
enabledCount++;
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/SimPhoneBookInterfaceManager.java b/telephony/java/com/android/internal/telephony/gsm/SimPhoneBookInterfaceManager.java
index 076da6b..feb508a 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SimPhoneBookInterfaceManager.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SimPhoneBookInterfaceManager.java
@@ -16,22 +16,10 @@
package com.android.internal.telephony.gsm;
-import android.content.pm.PackageManager;
-import android.os.AsyncResult;
-import android.os.Handler;
-import android.os.Looper;
import android.os.Message;
-import android.os.ServiceManager;
-import android.telephony.PhoneNumberUtils;
import android.util.Log;
-import com.android.internal.telephony.AdnRecord;
-import com.android.internal.telephony.AdnRecordCache;
import com.android.internal.telephony.IccPhoneBookInterfaceManager;
-import com.android.internal.telephony.PhoneProxy;
-
-import java.util.ArrayList;
-import java.util.List;
/**
* SimPhoneBookInterfaceManager to provide an inter-process communication to
@@ -42,20 +30,6 @@
public class SimPhoneBookInterfaceManager extends IccPhoneBookInterfaceManager {
static final String LOG_TAG = "GSM";
-
- Handler mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- AsyncResult ar;
-
- switch(msg.what) {
- default:
- mBaseHandler.handleMessage(msg);
- break;
- }
- }
- };
-
public SimPhoneBookInterfaceManager(GSMPhone phone) {
super(phone);
adnCache = phone.mSIMRecords.getAdnCache();
@@ -67,6 +41,11 @@
}
protected void finalize() {
+ try {
+ super.finalize();
+ } catch (Throwable throwable) {
+ Log.e(LOG_TAG, "Error while finalizing:", throwable);
+ }
if(DBG) Log.d(LOG_TAG, "SimPhoneBookInterfaceManager finalized");
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/SimSmsInterfaceManager.java b/telephony/java/com/android/internal/telephony/gsm/SimSmsInterfaceManager.java
index 875d8d0..2028ca4 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SimSmsInterfaceManager.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SimSmsInterfaceManager.java
@@ -25,10 +25,10 @@
import com.android.internal.telephony.IccConstants;
import com.android.internal.telephony.IccSmsInterfaceManager;
import com.android.internal.telephony.IccUtils;
-import com.android.internal.telephony.PhoneProxy;
import com.android.internal.telephony.SmsRawData;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import static android.telephony.SmsManager.STATUS_ON_ICC_FREE;
@@ -65,8 +65,7 @@
ar = (AsyncResult)msg.obj;
synchronized (mLock) {
if (ar.exception == null) {
- mSms = (List<SmsRawData>)
- buildValidRawData((ArrayList<byte[]>) ar.result);
+ mSms = buildValidRawData((ArrayList<byte[]>) ar.result);
} else {
if(DBG) log("Cannot load Sms records");
if (mSms != null)
@@ -88,6 +87,11 @@
}
protected void finalize() {
+ try {
+ super.finalize();
+ } catch (Throwable throwable) {
+ Log.e(LOG_TAG, "Error while finalizing:", throwable);
+ }
if(DBG) Log.d(LOG_TAG, "SimSmsInterfaceManager finalized");
}
@@ -106,7 +110,7 @@
updateMessageOnIccEf(int index, int status, byte[] pdu) {
if (DBG) log("updateMessageOnIccEf: index=" + index +
" status=" + status + " ==> " +
- "("+ pdu + ")");
+ "("+ Arrays.toString(pdu) + ")");
enforceReceiveAndSend("Updating message on SIM");
synchronized(mLock) {
mSuccess = false;
@@ -118,7 +122,7 @@
mPhone.mCM.deleteSmsOnSim(index, response);
} else {
byte[] record = makeSmsRecordData(status, pdu);
- ((SIMFileHandler)mPhone.getIccFileHandler()).updateEFLinearFixed(
+ mPhone.getIccFileHandler().updateEFLinearFixed(
IccConstants.EF_SMS,
index, record, null, response);
}
@@ -142,7 +146,8 @@
*/
public boolean copyMessageToIccEf(int status, byte[] pdu, byte[] smsc) {
if (DBG) log("copyMessageToIccEf: status=" + status + " ==> " +
- "pdu=("+ pdu + "), smsm=(" + smsc +")");
+ "pdu=("+ Arrays.toString(pdu) +
+ "), smsm=(" + Arrays.toString(smsc) +")");
enforceReceiveAndSend("Copying message to SIM");
synchronized(mLock) {
mSuccess = false;
@@ -175,8 +180,7 @@
"Reading messages from SIM");
synchronized(mLock) {
Message response = mHandler.obtainMessage(EVENT_LOAD_DONE);
- ((SIMFileHandler)mPhone.getIccFileHandler()).loadEFLinearFixedAll(IccConstants.EF_SMS,
- response);
+ mPhone.getIccFileHandler().loadEFLinearFixedAll(IccConstants.EF_SMS, response);
try {
mLock.wait();
diff --git a/telephony/java/com/android/internal/telephony/gsm/SpnOverride.java b/telephony/java/com/android/internal/telephony/gsm/SpnOverride.java
index abb0230..9ea30101 100644
--- a/telephony/java/com/android/internal/telephony/gsm/SpnOverride.java
+++ b/telephony/java/com/android/internal/telephony/gsm/SpnOverride.java
@@ -13,7 +13,7 @@
import android.util.Log;
import android.util.Xml;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
public class SpnOverride {
private HashMap<String, String> CarrierSpnMap;
diff --git a/telephony/java/com/android/internal/telephony/gsm/VoiceMailConstants.java b/telephony/java/com/android/internal/telephony/gsm/VoiceMailConstants.java
index 0bedd53..0e49e35 100644
--- a/telephony/java/com/android/internal/telephony/gsm/VoiceMailConstants.java
+++ b/telephony/java/com/android/internal/telephony/gsm/VoiceMailConstants.java
@@ -28,7 +28,8 @@
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
-import com.android.common.XmlUtils;
+
+import com.android.internal.util.XmlUtils;
/**
* {@hide}
diff --git a/test-runner/src/android/test/InstrumentationTestRunner.java b/test-runner/src/android/test/InstrumentationTestRunner.java
index 4ae98e6..ee6b89c 100644
--- a/test-runner/src/android/test/InstrumentationTestRunner.java
+++ b/test-runner/src/android/test/InstrumentationTestRunner.java
@@ -19,6 +19,7 @@
import static android.test.suitebuilder.TestPredicates.REJECT_PERFORMANCE;
import com.android.internal.util.Predicate;
+import com.android.internal.util.Predicates;
import android.app.Activity;
import android.app.Instrumentation;
@@ -31,11 +32,14 @@
import android.test.suitebuilder.TestMethod;
import android.test.suitebuilder.TestPredicates;
import android.test.suitebuilder.TestSuiteBuilder;
+import android.test.suitebuilder.annotation.HasAnnotation;
+import android.test.suitebuilder.annotation.LargeTest;
import android.util.Log;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.PrintStream;
+import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
@@ -93,6 +97,18 @@
* -e size large
* com.android.foo/android.test.InstrumentationTestRunner
* <p/>
+ * <b>Filter test run to tests with given annotation:</b> adb shell am instrument -w
+ * -e annotation com.android.foo.MyAnnotation
+ * com.android.foo/android.test.InstrumentationTestRunner
+ * <p/>
+ * If used with other options, the resulting test run will contain the union of the two options.
+ * e.g. "-e size large -e annotation com.android.foo.MyAnnotation" will run only tests with both
+ * the {@link LargeTest} and "com.android.foo.MyAnnotation" annotations.
+ * <p/>
+ * <b>Filter test run to tests <i>without</i> given annotation:</b> adb shell am instrument -w
+ * -e notAnnotation com.android.foo.MyAnnotation
+ * com.android.foo/android.test.InstrumentationTestRunner
+ * <p/>
* <b>Running a single testcase:</b> adb shell am instrument -w
* -e class com.android.foo.FooTest
* com.android.foo/android.test.InstrumentationTestRunner
@@ -161,6 +177,10 @@
private static final String LARGE_SUITE = "large";
private static final String ARGUMENT_LOG_ONLY = "log";
+ /** @hide */
+ static final String ARGUMENT_ANNOTATION = "annotation";
+ /** @hide */
+ static final String ARGUMENT_NOT_ANNOTATION = "notAnnotation";
/**
* This constant defines the maximum allowed runtime (in ms) for a test included in the "small"
@@ -274,6 +294,8 @@
ClassPathPackageInfoSource.setApkPaths(apkPaths);
Predicate<TestMethod> testSizePredicate = null;
+ Predicate<TestMethod> testAnnotationPredicate = null;
+ Predicate<TestMethod> testNotAnnotationPredicate = null;
boolean includePerformance = false;
String testClassesArg = null;
boolean logOnly = false;
@@ -287,6 +309,11 @@
mPackageOfTests = arguments.getString(ARGUMENT_TEST_PACKAGE);
testSizePredicate = getSizePredicateFromArg(
arguments.getString(ARGUMENT_TEST_SIZE_PREDICATE));
+ testAnnotationPredicate = getAnnotationPredicate(
+ arguments.getString(ARGUMENT_ANNOTATION));
+ testNotAnnotationPredicate = getNotAnnotationPredicate(
+ arguments.getString(ARGUMENT_NOT_ANNOTATION));
+
includePerformance = getBooleanArgument(arguments, ARGUMENT_INCLUDE_PERF);
logOnly = getBooleanArgument(arguments, ARGUMENT_LOG_ONLY);
mCoverage = getBooleanArgument(arguments, "coverage");
@@ -306,6 +333,12 @@
if (testSizePredicate != null) {
testSuiteBuilder.addRequirements(testSizePredicate);
}
+ if (testAnnotationPredicate != null) {
+ testSuiteBuilder.addRequirements(testAnnotationPredicate);
+ }
+ if (testNotAnnotationPredicate != null) {
+ testSuiteBuilder.addRequirements(testNotAnnotationPredicate);
+ }
if (!includePerformance) {
testSuiteBuilder.addRequirements(REJECT_PERFORMANCE);
}
@@ -406,6 +439,59 @@
}
}
+ /**
+ * Returns the test predicate object, corresponding to the annotation class value provided via
+ * the {@link ARGUMENT_ANNOTATION} argument.
+ *
+ * @return the predicate or <code>null</code>
+ */
+ private Predicate<TestMethod> getAnnotationPredicate(String annotationClassName) {
+ Class<? extends Annotation> annotationClass = getAnnotationClass(annotationClassName);
+ if (annotationClass != null) {
+ return new HasAnnotation(annotationClass);
+ }
+ return null;
+ }
+
+ /**
+ * Returns the negative test predicate object, corresponding to the annotation class value
+ * provided via the {@link ARGUMENT_NOT_ANNOTATION} argument.
+ *
+ * @return the predicate or <code>null</code>
+ */
+ private Predicate<TestMethod> getNotAnnotationPredicate(String annotationClassName) {
+ Class<? extends Annotation> annotationClass = getAnnotationClass(annotationClassName);
+ if (annotationClass != null) {
+ return Predicates.not(new HasAnnotation(annotationClass));
+ }
+ return null;
+ }
+
+ /**
+ * Helper method to return the annotation class with specified name
+ *
+ * @param annotationClassName the fully qualified name of the class
+ * @return the annotation class or <code>null</code>
+ */
+ private Class<? extends Annotation> getAnnotationClass(String annotationClassName) {
+ if (annotationClassName == null) {
+ return null;
+ }
+ try {
+ Class<?> annotationClass = Class.forName(annotationClassName);
+ if (annotationClass.isAnnotation()) {
+ return (Class<? extends Annotation>)annotationClass;
+ } else {
+ Log.e(LOG_TAG, String.format("Provided annotation value %s is not an Annotation",
+ annotationClassName));
+ }
+ } catch (ClassNotFoundException e) {
+ Log.e(LOG_TAG, String.format("Could not find class for specified annotation %s",
+ annotationClassName));
+ }
+ return null;
+ }
+
@Override
public void onStart() {
Looper.prepare();
@@ -471,7 +557,7 @@
String coverageFilePath = getCoverageFilePath();
java.io.File coverageFile = new java.io.File(coverageFilePath);
try {
- Class emmaRTClass = Class.forName("com.vladium.emma.rt.RT");
+ Class<?> emmaRTClass = Class.forName("com.vladium.emma.rt.RT");
Method dumpCoverageMethod = emmaRTClass.getMethod("dumpCoverageData",
coverageFile.getClass(), boolean.class, boolean.class);
diff --git a/test-runner/src/android/test/IsolatedContext.java b/test-runner/src/android/test/IsolatedContext.java
index 485e45c..f093598 100644
--- a/test-runner/src/android/test/IsolatedContext.java
+++ b/test-runner/src/android/test/IsolatedContext.java
@@ -3,7 +3,11 @@
import com.google.android.collect.Lists;
import android.accounts.AccountManager;
+import android.accounts.AccountManagerCallback;
+import android.accounts.AccountManagerFuture;
+import android.accounts.AuthenticatorException;
import android.accounts.OnAccountsUpdateListener;
+import android.accounts.OperationCanceledException;
import android.accounts.Account;
import android.content.ContextWrapper;
import android.content.ContentResolver;
@@ -16,8 +20,13 @@
import android.net.Uri;
import android.os.Handler;
-import java.util.List;
import java.io.File;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeoutException;
+import java.util.List;
+
/**
* A mock context which prevents its users from talking to the rest of the device while
@@ -105,7 +114,58 @@
public Account[] getAccounts() {
return new Account[]{};
}
+
+ public AccountManagerFuture<Account[]> getAccountsByTypeAndFeatures(
+ final String type, final String[] features,
+ AccountManagerCallback<Account[]> callback, Handler handler) {
+ return new MockAccountManagerFuture<Account[]>(new Account[0]);
+ }
+
+ public String blockingGetAuthToken(Account account, String authTokenType,
+ boolean notifyAuthFailure)
+ throws OperationCanceledException, IOException, AuthenticatorException {
+ return null;
+ }
+
+
+ /**
+ * A very simple AccountManagerFuture class
+ * that returns what ever was passed in
+ */
+ private class MockAccountManagerFuture<T>
+ implements AccountManagerFuture<T> {
+
+ T mResult;
+
+ public MockAccountManagerFuture(T result) {
+ mResult = result;
+ }
+
+ public boolean cancel(boolean mayInterruptIfRunning) {
+ return false;
+ }
+
+ public boolean isCancelled() {
+ return false;
+ }
+
+ public boolean isDone() {
+ return true;
+ }
+
+ public T getResult()
+ throws OperationCanceledException, IOException, AuthenticatorException {
+ return mResult;
+ }
+
+ public T getResult(long timeout, TimeUnit unit)
+ throws OperationCanceledException, IOException, AuthenticatorException {
+ return getResult();
+ }
+ }
+
}
+
@Override
public File getFilesDir() {
return new File("/dev/null");
diff --git a/test-runner/tests/src/android/test/InstrumentationTestRunnerTest.java b/test-runner/tests/src/android/test/InstrumentationTestRunnerTest.java
index d9afd54..6db72ad 100644
--- a/test-runner/tests/src/android/test/InstrumentationTestRunnerTest.java
+++ b/test-runner/tests/src/android/test/InstrumentationTestRunnerTest.java
@@ -109,6 +109,33 @@
assertTrue(mStubAndroidTestRunner.isRun());
}
+ /**
+ * Test that the -e {@link InstrumentationTestRunner.ARGUMENT_ANNOTATION} parameter properly
+ * selects tests.
+ */
+ public void testAnnotationParameter() throws Exception {
+ String expectedTestClassName = AnnotationTest.class.getName();
+ Bundle args = new Bundle();
+ args.putString(InstrumentationTestRunner.ARGUMENT_TEST_CLASS, expectedTestClassName);
+ args.putString(InstrumentationTestRunner.ARGUMENT_ANNOTATION, FlakyTest.class.getName());
+ mInstrumentationTestRunner.onCreate(args);
+ assertTestRunnerCalledWithExpectedParameters(expectedTestClassName, "testAnnotated");
+ }
+
+ /**
+ * Test that the -e {@link InstrumentationTestRunner.ARGUMENT_NOT_ANNOTATION} parameter
+ * properly excludes tests.
+ */
+ public void testNotAnnotationParameter() throws Exception {
+ String expectedTestClassName = AnnotationTest.class.getName();
+ Bundle args = new Bundle();
+ args.putString(InstrumentationTestRunner.ARGUMENT_TEST_CLASS, expectedTestClassName);
+ args.putString(InstrumentationTestRunner.ARGUMENT_NOT_ANNOTATION,
+ FlakyTest.class.getName());
+ mInstrumentationTestRunner.onCreate(args);
+ assertTestRunnerCalledWithExpectedParameters(expectedTestClassName, "testNotAnnotated");
+ }
+
private void assertContentsInOrder(List<TestDescriptor> actual, TestDescriptor... source) {
TestDescriptor[] clonedSource = source.clone();
assertEquals("Unexpected number of items.", clonedSource.length, actual.size());
@@ -269,4 +296,17 @@
}
}
+
+ /**
+ * Annotated test used for validation.
+ */
+ public static class AnnotationTest extends TestCase {
+
+ public void testNotAnnotated() throws Exception {
+ }
+
+ @FlakyTest
+ public void testAnnotated() throws Exception {
+ }
+ }
}
diff --git a/common/tests/res/raw/alt_ip_only.crt b/tests/AndroidTests/res/raw/alt_ip_only.crt
similarity index 100%
rename from common/tests/res/raw/alt_ip_only.crt
rename to tests/AndroidTests/res/raw/alt_ip_only.crt
diff --git a/common/tests/res/raw/subject_alt_only.crt b/tests/AndroidTests/res/raw/subject_alt_only.crt
similarity index 100%
rename from common/tests/res/raw/subject_alt_only.crt
rename to tests/AndroidTests/res/raw/subject_alt_only.crt
diff --git a/common/tests/res/raw/subject_only.crt b/tests/AndroidTests/res/raw/subject_only.crt
similarity index 100%
rename from common/tests/res/raw/subject_only.crt
rename to tests/AndroidTests/res/raw/subject_only.crt
diff --git a/common/tests/res/raw/subject_with_alt_names.crt b/tests/AndroidTests/res/raw/subject_with_alt_names.crt
similarity index 100%
rename from common/tests/res/raw/subject_with_alt_names.crt
rename to tests/AndroidTests/res/raw/subject_with_alt_names.crt
diff --git a/common/tests/res/raw/subject_with_wild_alt_name.crt b/tests/AndroidTests/res/raw/subject_with_wild_alt_name.crt
similarity index 100%
rename from common/tests/res/raw/subject_with_wild_alt_name.crt
rename to tests/AndroidTests/res/raw/subject_with_wild_alt_name.crt
diff --git a/common/tests/res/raw/wild_alt_name_only.crt b/tests/AndroidTests/res/raw/wild_alt_name_only.crt
similarity index 100%
rename from common/tests/res/raw/wild_alt_name_only.crt
rename to tests/AndroidTests/res/raw/wild_alt_name_only.crt
diff --git a/tests/AndroidTests/src/com/android/unit_tests/AsecTests.java b/tests/AndroidTests/src/com/android/unit_tests/AsecTests.java
index 3bbb447..5aaf13b 100755
--- a/tests/AndroidTests/src/com/android/unit_tests/AsecTests.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/AsecTests.java
@@ -55,6 +55,7 @@
void failStr(String errMsg) {
Log.w(TAG, "errMsg="+errMsg);
}
+
void failStr(Exception e) {
Log.w(TAG, "e.getMessage="+e.getMessage());
Log.w(TAG, "e="+e);
@@ -67,6 +68,13 @@
cleanupContainers();
}
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ if (localLOGV) Log.i(TAG, "Cleaning out old test containers");
+ cleanupContainers();
+ }
+
private void cleanupContainers() throws RemoteException {
IMountService ms = getMs();
String[] containers = ms.getSecureContainerList();
@@ -132,6 +140,14 @@
return ms.destroySecureContainer(fullId, force);
}
+ private boolean isContainerMounted(String localId) throws RemoteException {
+ Assert.assertTrue(isMediaMounted());
+ String fullId = "com.android.unittests.AsecTests." + localId;
+
+ IMountService ms = getMs();
+ return ms.isSecureContainerMounted(fullId);
+ }
+
private IMountService getMs() {
IBinder service = ServiceManager.getService("mount");
if (service != null) {
@@ -300,7 +316,7 @@
}
}
- public void testRenameMountedContainer() {
+ public void testRenameSrcMountedContainer() {
try {
Assert.assertEquals(StorageResultCode.OperationSucceeded,
createContainer("testRenameContainer.1", 4, "none"));
@@ -312,12 +328,15 @@
}
}
- public void testRenameToExistingContainer() {
+ public void testRenameDstMountedContainer() {
try {
Assert.assertEquals(StorageResultCode.OperationSucceeded,
createContainer("testRenameContainer.1", 4, "none"));
Assert.assertEquals(StorageResultCode.OperationSucceeded,
+ unmountContainer("testRenameContainer.1", false));
+
+ Assert.assertEquals(StorageResultCode.OperationSucceeded,
createContainer("testRenameContainer.2", 4, "none"));
Assert.assertEquals(StorageResultCode.OperationFailedStorageMounted,
@@ -326,4 +345,25 @@
failStr(e);
}
}
+
+ public void testIsContainerMountedAfterRename() {
+ try {
+ Assert.assertEquals(StorageResultCode.OperationSucceeded,
+ createContainer("testRenameContainer.1", 4, "none"));
+
+ Assert.assertEquals(StorageResultCode.OperationSucceeded,
+ unmountContainer("testRenameContainer.1", false));
+
+ Assert.assertEquals(StorageResultCode.OperationSucceeded,
+ renameContainer("testRenameContainer.1", "testRenameContainer.2"));
+
+ Assert.assertEquals(false, containerExists("testRenameContainer.1"));
+ Assert.assertEquals(true, containerExists("testRenameContainer.2"));
+ // Check if isContainerMounted returns valid value
+ Assert.assertEquals(true, isContainerMounted("testRenameContainer.2"));
+ } catch (Exception e) {
+ failStr(e);
+ }
+ }
+
}
diff --git a/common/tests/src/com/android/common/DNParserTest.java b/tests/AndroidTests/src/com/android/unit_tests/DNParserTest.java
similarity index 95%
rename from common/tests/src/com/android/common/DNParserTest.java
rename to tests/AndroidTests/src/com/android/unit_tests/DNParserTest.java
index 34b140a..61d0b42 100644
--- a/common/tests/src/com/android/common/DNParserTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/DNParserTest.java
@@ -13,7 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.common;
+package com.android.unit_tests;
+
+import com.android.internal.net.DNParser;
import javax.security.auth.x500.X500Principal;
diff --git a/common/tests/src/com/android/common/DomainNameValidatorTest.java b/tests/AndroidTests/src/com/android/unit_tests/DomainNameValidatorTest.java
similarity index 98%
rename from common/tests/src/com/android/common/DomainNameValidatorTest.java
rename to tests/AndroidTests/src/com/android/unit_tests/DomainNameValidatorTest.java
index b825be4..1754dbe 100644
--- a/common/tests/src/com/android/common/DomainNameValidatorTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/DomainNameValidatorTest.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.common;
+package com.android.unit_tests;
-import com.android.common.tests.R;
+import com.android.internal.net.DomainNameValidator;
import android.test.AndroidTestCase;
diff --git a/tests/AndroidTests/src/com/android/unit_tests/PackageManagerTests.java b/tests/AndroidTests/src/com/android/unit_tests/PackageManagerTests.java
index 9c5c44d..5e3895a 100755
--- a/tests/AndroidTests/src/com/android/unit_tests/PackageManagerTests.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/PackageManagerTests.java
@@ -57,17 +57,25 @@
import android.os.Handler;
import android.os.IBinder;
import android.os.storage.IMountService;
+import android.os.storage.IMountServiceListener;
+import android.os.storage.StorageEventListener;
+import android.os.storage.StorageManager;
import android.os.storage.StorageResultCode;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.StatFs;
import android.provider.Settings;
+import android.provider.Settings.SettingNotFoundException;
public class PackageManagerTests extends AndroidTestCase {
private static final boolean localLOGV = true;
public static final String TAG="PackageManagerTests";
public final long MAX_WAIT_TIME=120*1000;
public final long WAIT_TIME_INCR=20*1000;
+ private static final String SECURE_CONTAINERS_PREFIX = "/mnt/asec";
+ private static final int APP_INSTALL_AUTO = 0;
+ private static final int APP_INSTALL_DEVICE = 1;
+ private static final int APP_INSTALL_SDCARD = 2;
void failStr(String errMsg) {
Log.w(TAG, "errMsg="+errMsg);
@@ -244,9 +252,46 @@
packageParser = null;
return pkg;
}
-
- private void assertInstall(String pkgName, int flags) {
+ private boolean getInstallLoc(int flags, int expInstallLocation) {
+ // Flags explicitly over ride everything else.
+ if ((flags & PackageManager.INSTALL_FORWARD_LOCK) != 0 ) {
+ return false;
+ } else if ((flags & PackageManager.INSTALL_EXTERNAL) != 0 ) {
+ return true;
+ }
+ // Manifest option takes precedence next
+ if (expInstallLocation == PackageInfo.INSTALL_LOCATION_PREFER_EXTERNAL) {
+ return true;
+ }
+ // TODO Out of memory checks here.
+ boolean checkSd = false;
+ int setLoc = 0;
try {
+ setLoc = Settings.System.getInt(mContext.getContentResolver(), Settings.System.SET_INSTALL_LOCATION);
+ } catch (SettingNotFoundException e) {
+ failStr(e);
+ }
+ if (setLoc == 1) {
+ int userPref = APP_INSTALL_AUTO;
+ try {
+ userPref = Settings.System.getInt(mContext.getContentResolver(), Settings.System.DEFAULT_INSTALL_LOCATION);
+ } catch (SettingNotFoundException e) {
+ failStr(e);
+ }
+ if (userPref == APP_INSTALL_DEVICE) {
+ checkSd = false;
+ } else if (userPref == APP_INSTALL_SDCARD) {
+ checkSd = true;
+ } else if (userPref == APP_INSTALL_AUTO) {
+ // Might be determined dynamically. TODO fix this
+ checkSd = false;
+ }
+ }
+ return checkSd;
+ }
+ private void assertInstall(PackageParser.Package pkg, int flags, int expInstallLocation) {
+ try {
+ String pkgName = pkg.packageName;
ApplicationInfo info = getPm().getApplicationInfo(pkgName, 0);
assertNotNull(info);
assertEquals(pkgName, info.packageName);
@@ -264,15 +309,14 @@
assertEquals(publicSrcPath, appInstallPath);
} else {
assertFalse((info.flags & ApplicationInfo.FLAG_FORWARD_LOCK) != 0);
- if ((flags & PackageManager.INSTALL_EXTERNAL) != 0) {
- assertTrue((info.flags & ApplicationInfo.FLAG_ON_SDCARD) != 0);
- // Hardcoded for now
- assertTrue(srcPath.startsWith("/asec"));
- assertTrue(publicSrcPath.startsWith("/asec"));
- } else {
+ if (!getInstallLoc(flags, expInstallLocation)) {
assertEquals(srcPath, appInstallPath);
assertEquals(publicSrcPath, appInstallPath);
assertFalse((info.flags & ApplicationInfo.FLAG_ON_SDCARD) != 0);
+ } else {
+ assertTrue((info.flags & ApplicationInfo.FLAG_ON_SDCARD) != 0);
+ assertTrue(srcPath.startsWith(SECURE_CONTAINERS_PREFIX));
+ assertTrue(publicSrcPath.startsWith(SECURE_CONTAINERS_PREFIX));
}
}
} catch (NameNotFoundException e) {
@@ -300,7 +344,7 @@
private InstallParams sampleInstallFromRawResource(int flags, boolean cleanUp) {
return installFromRawResource("install.apk", R.raw.install, flags, cleanUp,
- false, -1);
+ false, -1, PackageInfo.INSTALL_LOCATION_AUTO);
}
public void clearSecureContainersForPkg(String pkgName) {
@@ -327,7 +371,8 @@
* PackageManager api to install it.
*/
private InstallParams installFromRawResource(String outFileName,
- int rawResId, int flags, boolean cleanUp, boolean fail, int result) {
+ int rawResId, int flags, boolean cleanUp, boolean fail, int result,
+ int expInstallLocation) {
File filesDir = mContext.getFilesDir();
File outFile = new File(filesDir, outFileName);
Uri packageURI = getInstallablePackage(rawResId, outFile);
@@ -337,9 +382,7 @@
// Make sure the package doesn't exist
getPm().deletePackage(pkg.packageName, null, 0);
// Clean up the containers as well
- if ((flags & PackageManager.INSTALL_EXTERNAL) != 0) {
- clearSecureContainersForPkg(pkg.packageName);
- }
+ clearSecureContainersForPkg(pkg.packageName);
try {
try {
if (fail) {
@@ -351,7 +394,7 @@
assertTrue(invokeInstallPackage(packageURI, flags,
pkg.packageName, receiver));
// Verify installed information
- assertInstall(pkg.packageName, flags);
+ assertInstall(pkg, flags, expInstallLocation);
ip = new InstallParams(pkg, outFileName, packageURI);
}
} catch (Exception e) {
@@ -360,7 +403,7 @@
return ip;
} finally {
if (cleanUp) {
- cleanUpInstall(ip);
+ //cleanUpInstall(ip);
}
}
}
@@ -443,6 +486,7 @@
public void replaceFromRawResource(int flags) {
InstallParams ip = sampleInstallFromRawResource(flags, false);
boolean replace = ((flags & PackageManager.INSTALL_REPLACE_EXISTING) != 0);
+ Log.i(TAG, "replace=" + replace);
GenericReceiver receiver;
if (replace) {
receiver = new ReplaceReceiver(ip.pkg.packageName);
@@ -455,7 +499,7 @@
assertEquals(invokeInstallPackage(ip.packageURI, flags,
ip.pkg.packageName, receiver), replace);
if (replace) {
- assertInstall(ip.pkg.packageName, flags);
+ assertInstall(ip.pkg, flags, ip.pkg.installLocation);
}
} catch (Exception e) {
failStr("Failed with exception : " + e);
@@ -738,51 +782,73 @@
}
}
+ class StorageListener extends StorageEventListener {
+ String oldState;
+ String newState;
+ String path;
+ private boolean doneFlag = false;
+ @Override
+ public void onStorageStateChanged(String path, String oldState, String newState) {
+ if (localLOGV) Log.i(TAG, "Storage state changed from " + oldState + " to " + newState);
+ synchronized (this) {
+ this.oldState = oldState;
+ this.newState = newState;
+ this.path = path;
+ doneFlag = true;
+ notifyAll();
+ }
+ }
+
+ public boolean isDone() {
+ return doneFlag;
+ }
+ }
+
private boolean unmountMedia() {
if (!getMediaState()) {
return true;
}
+ String path = Environment.getExternalStorageDirectory().toString();
+ StorageListener observer = new StorageListener();
+ StorageManager sm = (StorageManager) mContext.getSystemService(Context.STORAGE_SERVICE);
+ sm.registerListener(observer);
try {
- String mPath = Environment.getExternalStorageDirectory().toString();
- int ret = getMs().unmountVolume(mPath, false);
- return ret == StorageResultCode.OperationSucceeded;
- } catch (RemoteException e) {
- return true;
+ // Wait on observer
+ synchronized(observer) {
+ getMs().unmountVolume(path, false);
+ long waitTime = 0;
+ while((!observer.isDone()) && (waitTime < MAX_WAIT_TIME) ) {
+ observer.wait(WAIT_TIME_INCR);
+ waitTime += WAIT_TIME_INCR;
+ }
+ if(!observer.isDone()) {
+ throw new Exception("Timed out waiting for packageInstalled callback");
+ }
+ return true;
+ }
+ } catch (Exception e) {
+ return false;
+ } finally {
+ sm.unregisterListener(observer);
}
}
- /*
- * Install package on sdcard. Unmount and then mount the media.
- * (Use PackageManagerService private api for now)
- * Make sure the installed package is available.
- * STOPSHIP will uncomment when MountService api's to mount/unmount
- * are made asynchronous.
- */
- public void xxxtestMountSdNormalInternal() {
- assertTrue(mountFromRawResource());
- }
-
private boolean mountFromRawResource() {
// Install pkg on sdcard
- InstallParams ip = sampleInstallFromRawResource(PackageManager.INSTALL_EXTERNAL |
- PackageManager.INSTALL_REPLACE_EXISTING, false);
+ InstallParams ip = sampleInstallFromRawResource(PackageManager.INSTALL_EXTERNAL, false);
if (localLOGV) Log.i(TAG, "Installed pkg on sdcard");
boolean origState = getMediaState();
+ boolean registeredReceiver = false;
SdMountReceiver receiver = new SdMountReceiver(new String[]{ip.pkg.packageName});
try {
if (localLOGV) Log.i(TAG, "Unmounting media");
// Unmount media
assertTrue(unmountMedia());
if (localLOGV) Log.i(TAG, "Unmounted media");
- try {
- if (localLOGV) Log.i(TAG, "Sleeping for 10 second");
- Thread.sleep(10*1000);
- } catch (InterruptedException e) {
- failStr(e);
- }
// Register receiver here
PackageManager pm = getPm();
mContext.registerReceiver(receiver, receiver.filter);
+ registeredReceiver = true;
// Wait on receiver
synchronized (receiver) {
@@ -807,7 +873,7 @@
failStr(e);
return false;
} finally {
- mContext.unregisterReceiver(receiver);
+ if (registeredReceiver) mContext.unregisterReceiver(receiver);
// Restore original media state
if (origState) {
mountMedia();
@@ -819,6 +885,17 @@
}
}
+ /*
+ * Install package on sdcard. Unmount and then mount the media.
+ * (Use PackageManagerService private api for now)
+ * Make sure the installed package is available.
+ * STOPSHIP will uncomment when MountService api's to mount/unmount
+ * are made asynchronous.
+ */
+ public void xxxtestMountSdNormalInternal() {
+ assertTrue(mountFromRawResource());
+ }
+
void cleanUpInstall(InstallParams ip) {
if (ip == null) {
return;
@@ -834,28 +911,29 @@
public void testManifestInstallLocationInternal() {
installFromRawResource("install.apk", R.raw.install_loc_internal,
- 0, true, false, -1);
+ 0, true, false, -1, PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY);
}
public void testManifestInstallLocationSdcard() {
installFromRawResource("install.apk", R.raw.install_loc_sdcard,
- 0, true, false, -1);
+ 0, true, false, -1, PackageInfo.INSTALL_LOCATION_PREFER_EXTERNAL);
}
public void testManifestInstallLocationAuto() {
installFromRawResource("install.apk", R.raw.install_loc_auto,
- 0, true, false, -1);
+ 0, true, false, -1, PackageInfo.INSTALL_LOCATION_AUTO);
}
public void testManifestInstallLocationUnspecified() {
installFromRawResource("install.apk", R.raw.install_loc_unspecified,
- 0, true, false, -1);
+ 0, true, false, -1, PackageInfo.INSTALL_LOCATION_AUTO);
}
public void testManifestInstallLocationFwdLockedSdcard() {
installFromRawResource("install.apk", R.raw.install_loc_sdcard,
PackageManager.INSTALL_FORWARD_LOCK, true, true,
- PackageManager.INSTALL_FAILED_INVALID_INSTALL_LOCATION);
+ PackageManager.INSTALL_FAILED_INVALID_INSTALL_LOCATION,
+ PackageInfo.INSTALL_LOCATION_AUTO);
}
public void xxxtestClearAllSecureContainers() {
diff --git a/common/tests/src/com/android/common/PatternsTest.java b/tests/AndroidTests/src/com/android/unit_tests/PatternsTest.java
similarity index 97%
rename from common/tests/src/com/android/common/PatternsTest.java
rename to tests/AndroidTests/src/com/android/unit_tests/PatternsTest.java
index 9e2ad58..0edcd6d 100644
--- a/common/tests/src/com/android/common/PatternsTest.java
+++ b/tests/AndroidTests/src/com/android/unit_tests/PatternsTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 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,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-package com.android.common;
+package com.android.unit_tests;
import android.test.suitebuilder.annotation.SmallTest;
-import junit.framework.TestCase;
+import android.util.Patterns;
import java.util.regex.Matcher;
-import java.util.regex.Pattern;
+
+import junit.framework.TestCase;
public class PatternsTest extends TestCase {
diff --git a/tests/CoreTests/android/core/MiscRegressionTest.java b/tests/CoreTests/android/core/MiscRegressionTest.java
index 8fe064c..8281db0 100644
--- a/tests/CoreTests/android/core/MiscRegressionTest.java
+++ b/tests/CoreTests/android/core/MiscRegressionTest.java
@@ -110,6 +110,16 @@
Logger.global.finest("This has logging Level.FINEST, should become VERBOSE");
}
+ // Regression test for Issue 5697:
+ // getContextClassLoader returns a non-application classloader
+ // http://code.google.com/p/android/issues/detail?id=5697
+ //
+ @MediumTest
+ public void testJavaContextClassLoader() throws Exception {
+ Assert.assertNotNull("Must hava a Java context ClassLoader",
+ Thread.currentThread().getContextClassLoader());
+ }
+
// Regression test for #1045939: Different output for Method.toString()
@SmallTest
public void testMethodToString() {
diff --git a/tests/DumpRenderTree/assets/run_layout_tests.py b/tests/DumpRenderTree/assets/run_layout_tests.py
index c3627bb..7f3ef2d 100755
--- a/tests/DumpRenderTree/assets/run_layout_tests.py
+++ b/tests/DumpRenderTree/assets/run_layout_tests.py
@@ -26,6 +26,7 @@
--time-out-ms (default is 8000 millis) for each test
--adb-options="-e" passes option string to adb
--results-directory=..., (default is ./layout-test-results) directory name under which results are stored.
+ --js-engine the JavaScript engine currently in use, determines which set of Android-specific expected results we should use, should be 'jsc' or 'v8'
"""
import logging
@@ -186,6 +187,16 @@
run_layout_test_cmd_postfix = " -e path \"" + path + "\" -e timeout " + timeout_ms
if options.rebaseline:
run_layout_test_cmd_postfix += " -e rebaseline true"
+
+ # If the JS engine is not specified on the command line, try reading the
+ # JS_ENGINE environment variable, which is used by the build system in
+ # external/webkit/Android.mk.
+ js_engine = options.js_engine
+ if not js_engine:
+ js_engine = os.environ['JS_ENGINE']
+ if js_engine:
+ run_layout_test_cmd_postfix += " -e jsengine " + js_engine
+
run_layout_test_cmd_postfix += " -w com.android.dumprendertree/.LayoutTestsAutoRunner"
# Call LayoutTestsAutoTest::startLayoutTests.
@@ -297,6 +308,9 @@
default=None,
dest="ref_directory",
help="directory where reference results are stored.")
+ option_parser.add_option("", "--js-engine",
+ default=None,
+ help="The JavaScript engine currently in use, which determines which set of Android-specific expected results we should use. Should be 'jsc' or 'v8'.");
options, args = option_parser.parse_args();
main(options, args)
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java b/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java
index ac98054..191b5e9 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/FileFilter.java
@@ -81,6 +81,29 @@
};
static void fillIgnoreResultList() {
+ // This first block of tests are for HTML5 features, for which Android
+ // should pass all tests. They are skipped only temporarily.
+ // TODO: Fix these failing tests and remove them from this list.
+ ignoreResultList.add("http/tests/appcache/auth.html"); // file not found
+ ignoreResultList.add("http/tests/appcache/deferred-events.html"); // file not found
+ ignoreResultList.add("http/tests/appcache/deferred-events-delete-while-raising.html"); // file not found
+ ignoreResultList.add("http/tests/appcache/destroyed-frame.html"); // file not found
+ ignoreResultList.add("http/tests/appcache/detached-iframe.html"); // file not found
+ ignoreResultList.add("http/tests/appcache/different-scheme.html"); // file not found
+ ignoreResultList.add("http/tests/appcache/disabled.html"); // not found
+ ignoreResultList.add("http/tests/appcache/empty-manifest.html"); // flaky
+ ignoreResultList.add("http/tests/appcache/foreign-iframe-main.html"); // flaky - skips states
+ ignoreResultList.add("http/tests/appcache/local-content.html"); // text diff
+ ignoreResultList.add("http/tests/appcache/max-size.html"); // no layoutTestController.setAppCacheMaximumSize
+ ignoreResultList.add("http/tests/appcache/manifest-with-empty-file.html"); // flaky
+ ignoreResultList.add("http/tests/appcache/whitelist-wildcard.html"); // file not found
+ ignoreResultList.add("storage/database-lock-after-reload.html"); // failure
+ ignoreResultList.add("storage/domstorage/localstorage/string-conversion.html"); // false failure due to whitespace diff in output with V8
+ ignoreResultList.add("storage/domstorage/sessionstorage/string-conversion.html"); // false failure due to whitespace diff in output with V8
+ ignoreResultList.add("storage/statement-error-callback.html"); // expected line number diff in V8 only
+ ignoreResultList.add("storage/transaction-error-callback.html"); // expected line number diff in V8 only
+ ignoreResultList.add("storage/transaction-callback-exception-crash.html"); // expected line number diff in V8 only
+
ignoreResultList.add("fast/css/case-transform.html"); // will not fix #619707
ignoreResultList.add("fast/dom/Element/offsetLeft-offsetTop-body-quirk.html"); // different screen size result in extra spaces in Apple compared to us
ignoreResultList.add("fast/dom/Window/Plug-ins.html"); // need test plugin
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
index 539d551..e058f32 100755
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoRunner.java
@@ -79,14 +79,17 @@
mSaveImagePath = (String) icicle.get("saveimage");
+ mJsEngine = (String) icicle.get("jsengine");
+
super.onCreate(icicle);
}
- public String mTestPath = null;
- public String mSaveImagePath = null;
- public int mTimeoutInMillis = 0;
- public int mDelay = 0;
- public boolean mRebaseline = false;
- public boolean mLogtime = false;
- public boolean mGetDrawTime = false;
+ public String mTestPath;
+ public String mSaveImagePath;
+ public int mTimeoutInMillis;
+ public int mDelay;
+ public boolean mRebaseline;
+ public boolean mLogtime;
+ public boolean mGetDrawTime;
+ public String mJsEngine;
}
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
index 8983612..d9ec3fa 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/LayoutTestsAutoTest.java
@@ -147,6 +147,9 @@
private MyTestRecorder mResultRecorder;
private Vector<String> mTestList;
private boolean mRebaselineResults;
+ // The JavaScript engine currently in use. This determines which set of Android-specific
+ // expected test results we use.
+ private String mJsEngine;
private String mTestPathPrefix;
private boolean mFinished;
@@ -214,14 +217,24 @@
return shortName.replaceFirst(LAYOUT_TESTS_ROOT, LAYOUT_TESTS_RESULT_DIR) + "-result.txt";
}
+ // Gets the file which contains WebKit's expected results for this test.
private String getExpectedResultFile(String test) {
+ // The generic result is at <path>/<name>-expected.txt
+ // First try the Android-specific result at
+ // platform/android-<js-engine>/<path>/<name>-expected.txt
int pos = test.lastIndexOf('.');
- if(pos == -1)
+ if (pos == -1)
return null;
- String shortName = test.substring(0, pos);
- return shortName + "-expected.txt";
+ String genericExpectedResult = test.substring(0, pos) + "-expected.txt";
+ String androidExpectedResultsDir = "platform/android-" + mJsEngine + "/";
+ String androidExpectedResult =
+ genericExpectedResult.replaceFirst(LAYOUT_TESTS_ROOT, LAYOUT_TESTS_ROOT + androidExpectedResultsDir);
+ File f = new File(androidExpectedResult);
+ return f.exists() ? androidExpectedResult : genericExpectedResult;
}
+ // Gets the file which contains the actual results of running the test on
+ // Android, generated by a previous run which set a new baseline.
private String getAndroidExpectedResultFile(String expectedResultFile) {
return expectedResultFile.replaceFirst(LAYOUT_TESTS_ROOT, ANDROID_EXPECTED_RESULT_DIR);
}
@@ -282,8 +295,8 @@
});
String resultFile = getResultFile(test);
- if(resultFile == null) {
- //simply ignore this test
+ if (resultFile == null) {
+ // Simply ignore this test.
return;
}
if (mRebaselineResults) {
@@ -339,15 +352,10 @@
this.mTestList = new Vector<String>();
// Read settings
- try {
- this.mTestPathPrefix =
- (new File(LAYOUT_TESTS_ROOT + runner.mTestPath)).getCanonicalPath();
- } catch (IOException e) {
- Log.e(LOGTAG, "Cannot find test path prefix: " + e.getMessage());
- return;
- }
-
- this.mRebaselineResults = runner.mRebaseline;
+ mTestPathPrefix = (new File(LAYOUT_TESTS_ROOT + runner.mTestPath)).getAbsolutePath();
+ mRebaselineResults = runner.mRebaseline;
+ // JSC is the default JavaScript engine.
+ mJsEngine = runner.mJsEngine == null ? "jsc" : runner.mJsEngine;
int timeout = runner.mTimeoutInMillis;
if (timeout <= 0) {
@@ -395,11 +403,7 @@
if (runner.mTestPath != null) {
test_path += runner.mTestPath;
}
- try {
- test_path = new File(test_path).getCanonicalPath();
- } catch (IOException e) {
- Log.e("LayoutTestsAutoTest", "Cannot get cannonical path " + e.getMessage());
- }
+ test_path = new File(test_path).getAbsolutePath();
Log.v("LayoutTestsAutoTest", " Test path : " + test_path);
return test_path;
diff --git a/tests/LocationTracker/Android.mk b/tests/LocationTracker/Android.mk
new file mode 100644
index 0000000..b142d22
--- /dev/null
+++ b/tests/LocationTracker/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 := LocationTracker
+
+LOCAL_MODULE_TAGS := tests
+
+include $(BUILD_PACKAGE)
diff --git a/tests/LocationTracker/AndroidManifest.xml b/tests/LocationTracker/AndroidManifest.xml
new file mode 100644
index 0000000..dc7ea99
--- /dev/null
+++ b/tests/LocationTracker/AndroidManifest.xml
@@ -0,0 +1,30 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.locationtracker">
+
+ <!-- Permissions for the Location Service -->
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+
+ <!-- Permission for wifi -->
+ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
+
+ <!-- give the location tracker ability to induce device insomnia -->
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
+
+ <!-- Permission for SD card -->
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+
+ <application android:label="@string/app_label">
+ <activity android:name="TrackerActivity" android:label="Location Tracker">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ <service android:name=".TrackerService" />
+ <activity android:label="@string/settings_menu" android:name="SettingsActivity" />
+ <provider android:name=".data.TrackerProvider"
+ android:authorities="com.android.locationtracker" />
+ </application>
+
+</manifest>
diff --git a/tests/LocationTracker/res/layout/entrylist_item.xml b/tests/LocationTracker/res/layout/entrylist_item.xml
new file mode 100644
index 0000000..d2a8033
--- /dev/null
+++ b/tests/LocationTracker/res/layout/entrylist_item.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2006-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.
+ */
+-->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/entrylist_item"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+/>
diff --git a/tests/LocationTracker/res/menu/menu.xml b/tests/LocationTracker/res/menu/menu.xml
new file mode 100644
index 0000000..05d13fd
--- /dev/null
+++ b/tests/LocationTracker/res/menu/menu.xml
@@ -0,0 +1,37 @@
+<?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.
+*/
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@+id/start_service_menu"
+ android:title="@string/start_service_menu" />
+ <item android:id="@+id/stop_service_menu"
+ android:title="@string/stop_service_menu" />
+ <item android:id="@+id/settings_menu"
+ android:title="@string/settings_menu" />
+ <item android:id="@+id/export_sub_menu"
+ android:title="@string/export_sub_menu">
+ <menu>
+ <item android:id="@+id/export_kml"
+ android:title="@string/export_kml" />
+ <item android:id="@+id/export_csv"
+ android:title="@string/export_csv" />
+ </menu>
+ </item>
+ <item android:title="@string/clear_data"
+ android:id="@+id/clear_data_menu"/>
+</menu>
diff --git a/tests/LocationTracker/res/values/strings.xml b/tests/LocationTracker/res/values/strings.xml
new file mode 100644
index 0000000..ea6bf2d
--- /dev/null
+++ b/tests/LocationTracker/res/values/strings.xml
@@ -0,0 +1,48 @@
+<?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.
+*/
+-->
+
+<resources>
+ <string name="start_service_menu">Start Service</string>
+ <string name="stop_service_menu">Stop Service</string>
+ <string name="settings_menu">Settings</string>
+ <string name="update_preference">Update frequency</string>
+ <string name="title_mintime_preference">Minimum update time</string>
+ <string name="summary_mintime_preference">The suggested minimum time interval for location updates, in seconds</string>
+ <string name="dialog_title_mintime_preference">Minimum update time</string>
+ <string name="title_mindistance_preference">Minimum distance</string>
+ <string name="summary_mindistance_preference">Minimum distance interval for location updates, in meters</string>
+ <string name="dialog_title_mindistance_preference">Minimum distance</string>
+ <string name="provider_preferences">Location providers</string>
+ <string name="title_network_preference">Network location</string>
+ <string name="summary_network_preference">Listen for updates to network location (Wi-Fi/cellid)</string>
+ <string name="title_gps_preference">GPS location</string>
+ <string name="summary_gps_preference">Listen for updates to GPS location</string>
+ <string name="title_signal_preference">Signal strength</string>
+ <string name="summary_signal_preference">Listen for updates to signal strength</string>
+ <string name="advanced_preferences">Advanced</string>
+ <string name="title_advanced_log_preference">Location debug logging</string>
+ <string name="summary_advanced_preference">Logs detailed location data, only relevant for location/test engineers</string>
+ <string name="app_label">Location Tracker</string>
+ <string name="export_sub_menu">Export\u2026</string>
+ <string name="export_kml">Export As KML</string>
+ <string name="export_csv">Export As CSV</string>
+ <string name="clear_data">Clear data</string>
+ <string name="delete_confirm">All current tracking data will be deleted.</string>
+ <string name="confirm_title">Clear data</string>
+</resources>
diff --git a/tests/LocationTracker/res/xml/preferences.xml b/tests/LocationTracker/res/xml/preferences.xml
new file mode 100755
index 0000000..61d4817
--- /dev/null
+++ b/tests/LocationTracker/res/xml/preferences.xml
@@ -0,0 +1,63 @@
+<?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.
+-->
+
+<!-- The Location preferences UI -->
+<PreferenceScreen
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <PreferenceCategory android:title="@string/update_preference">
+ <EditTextPreference android:key="mintime_preference"
+ android:defaultValue="0"
+ android:title="@string/title_mintime_preference"
+ android:summary="@string/summary_mintime_preference"
+ android:dialogTitle="@string/dialog_title_mintime_preference" />
+
+ <EditTextPreference android:key="mindistance_preference"
+ android:defaultValue="0"
+ android:title="@string/title_mindistance_preference"
+ android:summary="@string/summary_mindistance_preference"
+ android:dialogTitle="@string/dialog_title_mindistance_preference" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory android:title="@string/provider_preferences">
+
+ <CheckBoxPreference android:key="network_preference"
+ android:defaultValue="true"
+ android:title="@string/title_network_preference"
+ android:summary="@string/summary_network_preference" />
+
+ <CheckBoxPreference android:key="gps_preference"
+ android:defaultValue="true"
+ android:title="@string/title_gps_preference"
+ android:summary="@string/summary_gps_preference" />
+
+ <CheckBoxPreference android:key="signal_preference"
+ android:defaultValue="false"
+ android:title="@string/title_signal_preference"
+ android:summary="@string/summary_signal_preference" />
+
+ </PreferenceCategory>
+
+ <PreferenceCategory android:title="@string/advanced_preferences">
+
+ <CheckBoxPreference android:key="advanced_log_preference"
+ android:defaultValue="false"
+ android:title="@string/title_advanced_log_preference"
+ android:summary="@string/summary_advanced_preference" />
+ </PreferenceCategory>
+
+</PreferenceScreen>
diff --git a/tests/LocationTracker/src/com/android/locationtracker/SettingsActivity.java b/tests/LocationTracker/src/com/android/locationtracker/SettingsActivity.java
new file mode 100755
index 0000000..cb77118
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/SettingsActivity.java
@@ -0,0 +1,35 @@
+/*
+ * 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.locationtracker;
+
+import android.os.Bundle;
+import android.preference.PreferenceActivity;
+
+/**
+ * Settings preference screen for location tracker
+ */
+public class SettingsActivity extends PreferenceActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // Load the preferences from an XML resource
+ addPreferencesFromResource(R.xml.preferences);
+ }
+
+}
diff --git a/tests/LocationTracker/src/com/android/locationtracker/TrackerActivity.java b/tests/LocationTracker/src/com/android/locationtracker/TrackerActivity.java
new file mode 100644
index 0000000..98d0a50
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/TrackerActivity.java
@@ -0,0 +1,226 @@
+/*
+ * 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.locationtracker;
+
+import com.android.locationtracker.data.DateUtils;
+import com.android.locationtracker.data.TrackerDataHelper;
+import com.android.locationtracker.data.TrackerListHelper;
+
+import android.app.AlertDialog;
+import android.app.ListActivity;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.content.Intent;
+import android.database.Cursor;
+import android.location.LocationManager;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.widget.Toast;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * Activity for location tracker service
+ *
+ * Contains facilities for starting and
+ * stopping location tracker service, as well as displaying the current location
+ * data
+ *
+ * Future enhancements:
+ * - export data as dB
+ * - enable/disable "start service" and "stop service" menu items as
+ * appropriate
+ */
+public class TrackerActivity extends ListActivity {
+
+ static final String LOG_TAG = "LocationTracker";
+
+ private TrackerListHelper mDataHelper;
+
+ /**
+ * Retrieves and displays the currently logged location data from file
+ *
+ * @param icicle
+ */
+ @Override
+ protected void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+
+ mDataHelper = new TrackerListHelper(this);
+ mDataHelper.bindListUI(R.layout.entrylist_item);
+ }
+
+ /**
+ * Builds the menu
+ *
+ * @param menu - menu to add items to
+ */
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ MenuInflater menuInflater = getMenuInflater();
+ menuInflater.inflate(R.menu.menu, menu);
+ return true;
+ }
+
+ /**
+ * Handles menu item selection
+ *
+ * @param item - the selected menu item
+ */
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.start_service_menu: {
+ startService(new Intent(TrackerActivity.this,
+ TrackerService.class));
+ break;
+ }
+ case R.id.stop_service_menu: {
+ stopService(new Intent(TrackerActivity.this,
+ TrackerService.class));
+ break;
+ }
+ case R.id.settings_menu: {
+ launchSettings();
+ break;
+ }
+ case R.id.export_kml: {
+ exportKML();
+ break;
+ }
+ case R.id.export_csv: {
+ exportCSV();
+ break;
+ }
+ case R.id.clear_data_menu: {
+ clearData();
+ break;
+ }
+ }
+ return super.onOptionsItemSelected(item);
+ }
+
+ private void clearData() {
+ Runnable clearAction = new Runnable() {
+ public void run() {
+ TrackerDataHelper helper =
+ new TrackerDataHelper(TrackerActivity.this);
+ helper.deleteAll();
+ }
+ };
+ showConfirm(R.string.delete_confirm, clearAction);
+ }
+
+ private void showConfirm(int textId, final Runnable onConfirmAction) {
+ AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
+ dialogBuilder.setTitle(R.string.confirm_title);
+ dialogBuilder.setMessage(textId);
+ dialogBuilder.setPositiveButton(android.R.string.ok,
+ new OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ onConfirmAction.run();
+ }
+ });
+ dialogBuilder.setNegativeButton(android.R.string.cancel,
+ new OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ // do nothing
+ }
+ });
+ dialogBuilder.show();
+ }
+
+ private void exportCSV() {
+ String exportFileName = getUniqueFileName("csv");
+ exportFile(null, exportFileName, new TrackerDataHelper(this,
+ TrackerDataHelper.CSV_FORMATTER));
+ }
+
+ private void exportKML() {
+ String exportFileName = getUniqueFileName(
+ LocationManager.NETWORK_PROVIDER + ".kml");
+ exportFile(LocationManager.NETWORK_PROVIDER, exportFileName,
+ new TrackerDataHelper(this, TrackerDataHelper.KML_FORMATTER));
+ exportFileName = getUniqueFileName(
+ LocationManager.GPS_PROVIDER + ".kml");
+ exportFile(LocationManager.GPS_PROVIDER, exportFileName,
+ new TrackerDataHelper(this, TrackerDataHelper.KML_FORMATTER));
+ }
+
+ private void exportFile(String tagFilter,
+ String exportFileName,
+ TrackerDataHelper trackerData) {
+ BufferedWriter exportWriter = null;
+ Cursor cursor = trackerData.query(tagFilter);
+ try {
+ exportWriter = new BufferedWriter(new FileWriter(exportFileName));
+ exportWriter.write(trackerData.getOutputHeader());
+
+ String line = null;
+
+ while ((line = trackerData.getNextOutput(cursor)) != null) {
+ exportWriter.write(line);
+ }
+ exportWriter.write(trackerData.getOutputFooter());
+ Toast.makeText(this, "Successfully exported data to " +
+ exportFileName, Toast.LENGTH_SHORT).show();
+
+ } catch (IOException e) {
+ Toast.makeText(this, "Error exporting file: " +
+ e.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
+
+ Log.e(LOG_TAG, "Error exporting file", e);
+ } finally {
+ closeWriter(exportWriter);
+ if (cursor != null) {
+ cursor.close();
+ }
+ }
+ }
+
+ private void closeWriter(Writer exportWriter) {
+ if (exportWriter != null) {
+ try {
+ exportWriter.close();
+ } catch (IOException e) {
+ Log.e(LOG_TAG, "error closing file", e);
+ }
+ }
+ }
+
+ private String getUniqueFileName(String ext) {
+ File dir = new File("/sdcard/locationtracker");
+ if (!dir.exists()) {
+ dir.mkdir();
+ }
+ return "/sdcard/locationtracker/tracking-" +
+ DateUtils.getCurrentTimestamp() + "." + ext;
+ }
+
+ private void launchSettings() {
+ Intent settingsIntent = new Intent();
+ settingsIntent.setClass(this, SettingsActivity.class);
+ startActivity(settingsIntent);
+ }
+}
diff --git a/tests/LocationTracker/src/com/android/locationtracker/TrackerService.java b/tests/LocationTracker/src/com/android/locationtracker/TrackerService.java
new file mode 100644
index 0000000..5b75653
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/TrackerService.java
@@ -0,0 +1,445 @@
+/*
+ * 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.locationtracker;
+
+import com.android.locationtracker.data.TrackerDataHelper;
+
+import android.app.Service;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
+import android.location.Location;
+import android.location.LocationListener;
+import android.location.LocationManager;
+import android.net.ConnectivityManager;
+import android.net.wifi.ScanResult;
+import android.net.wifi.WifiManager;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.preference.PreferenceManager;
+import android.telephony.CellLocation;
+import android.telephony.PhoneStateListener;
+import android.telephony.SignalStrength;
+import android.telephony.TelephonyManager;
+import android.telephony.cdma.CdmaCellLocation;
+import android.telephony.gsm.GsmCellLocation;
+import android.util.Log;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Location Tracking service
+ *
+ * Records location updates for all registered location providers, and cell
+ * location updates
+ */
+public class TrackerService extends Service {
+
+ private List<LocationTrackingListener> mListeners;
+
+ private static final String LOG_TAG = TrackerActivity.LOG_TAG;
+
+ // controls which location providers to track
+ private Set<String> mTrackedProviders;
+
+ private TrackerDataHelper mTrackerData;
+
+ private TelephonyManager mTelephonyManager;
+ private Location mNetworkLocation;
+
+ // Handlers and Receivers for phone and network state
+ private NetworkStateBroadcastReceiver mNetwork;
+ private static final String CELL_PROVIDER_TAG = "cell";
+ // signal strength updates
+ private static final String SIGNAL_PROVIDER_TAG = "signal";
+ private static final String WIFI_PROVIDER_TAG = "wifi";
+ // tracking tag for data connectivity issues
+ private static final String DATA_CONN_PROVIDER_TAG = "data";
+
+ // preference constants
+ private static final String MIN_TIME_PREF = "mintime_preference";
+ private static final String MIN_DIS_PREF = "mindistance_preference";
+ private static final String GPS_PREF = "gps_preference";
+ private static final String NETWORK_PREF = "network_preference";
+ private static final String SIGNAL_PREF = "signal_preference";
+ private static final String DEBUG_PREF = "advanced_log_preference";
+
+ private PreferenceListener mPrefListener;
+
+ public TrackerService() {
+ }
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ // ignore - nothing to do
+ return null;
+ }
+
+ /**
+ * registers location listeners
+ *
+ * @param intent
+ * @param startId
+ */
+ @Override
+ public void onStart(Intent intent, int startId) {
+ super.onStart(intent, startId);
+ mNetworkLocation = null;
+
+ initLocationListeners();
+ Toast.makeText(this, "Tracking service started", Toast.LENGTH_SHORT);
+ }
+
+ private synchronized void initLocationListeners() {
+ mTrackerData = new TrackerDataHelper(this);
+ LocationManager lm = getLocationManager();
+
+ mTrackedProviders = getTrackedProviders();
+
+ List<String> locationProviders = lm.getAllProviders();
+ mListeners = new ArrayList<LocationTrackingListener>(
+ locationProviders.size());
+
+ long minUpdateTime = getLocationUpdateTime();
+ float minDistance = getLocationMinDistance();
+
+ for (String providerName : locationProviders) {
+ if (mTrackedProviders.contains(providerName)) {
+ Log.d(LOG_TAG, "Adding location listener for provider " +
+ providerName);
+ if (doDebugLogging()) {
+ mTrackerData.writeEntry("init", String.format(
+ "start listening to %s : %d ms; %f meters",
+ providerName, minUpdateTime, minDistance));
+ }
+ LocationTrackingListener listener =
+ new LocationTrackingListener();
+ lm.requestLocationUpdates(providerName, minUpdateTime,
+ minDistance, listener);
+ mListeners.add(listener);
+ }
+ }
+ mTelephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
+
+ if (doDebugLogging()) {
+ // register for cell location updates
+ mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CELL_LOCATION);
+
+ // Register for Network (Wifi or Mobile) updates
+ mNetwork = new NetworkStateBroadcastReceiver();
+ IntentFilter mIntentFilter;
+ mIntentFilter = new IntentFilter();
+ mIntentFilter.addAction(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
+ mIntentFilter.addAction(WifiManager.WIFI_STATE_CHANGED_ACTION);
+ mIntentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
+ Log.d(LOG_TAG, "registering receiver");
+ registerReceiver(mNetwork, mIntentFilter);
+ }
+
+ if (trackSignalStrength()) {
+ mTelephonyManager.listen(mPhoneStateListener,
+ PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
+ }
+
+ // register for preference changes, so we can restart listeners on
+ // pref changes
+ mPrefListener = new PreferenceListener();
+ getPreferences().registerOnSharedPreferenceChangeListener(mPrefListener);
+ }
+
+ private Set<String> getTrackedProviders() {
+ Set<String> providerSet = new HashSet<String>();
+
+ if (trackGPS()) {
+ providerSet.add(LocationManager.GPS_PROVIDER);
+ }
+ if (trackNetwork()) {
+ providerSet.add(LocationManager.NETWORK_PROVIDER);
+ }
+ return providerSet;
+ }
+
+ private SharedPreferences getPreferences() {
+ return PreferenceManager.getDefaultSharedPreferences(this);
+ }
+
+ private boolean trackNetwork() {
+ return getPreferences().getBoolean(NETWORK_PREF, true);
+ }
+
+ private boolean trackGPS() {
+ return getPreferences().getBoolean(GPS_PREF, true);
+ }
+
+ private boolean doDebugLogging() {
+ return getPreferences().getBoolean(DEBUG_PREF, true);
+ }
+
+ private boolean trackSignalStrength() {
+ return getPreferences().getBoolean(SIGNAL_PREF, true);
+ }
+
+ private float getLocationMinDistance() {
+ try {
+ String disString = getPreferences().getString(MIN_DIS_PREF, "0");
+ return Float.parseFloat(disString);
+ }
+ catch (NumberFormatException e) {
+ Log.e(LOG_TAG, "Invalid preference for location min distance", e);
+ }
+ return 0;
+ }
+
+ private long getLocationUpdateTime() {
+ try {
+ String timeString = getPreferences().getString(MIN_TIME_PREF, "0");
+ long secondsTime = Long.valueOf(timeString);
+ return secondsTime * 1000;
+ }
+ catch (NumberFormatException e) {
+ Log.e(LOG_TAG, "Invalid preference for location min time", e);
+ }
+ return 0;
+ }
+
+ /**
+ * Shuts down this service
+ */
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ Log.d(LOG_TAG, "Removing location listeners");
+ stopListeners();
+ Toast.makeText(this, "Tracking service stopped", Toast.LENGTH_SHORT);
+ }
+
+ /**
+ * De-registers all location listeners, closes persistent storage
+ */
+ protected synchronized void stopListeners() {
+ LocationManager lm = getLocationManager();
+ if (mListeners != null) {
+ for (LocationTrackingListener listener : mListeners) {
+ lm.removeUpdates(listener);
+ }
+ mListeners.clear();
+ }
+ mListeners = null;
+
+ // stop cell state listener
+ if (mTelephonyManager != null) {
+ mTelephonyManager.listen(mPhoneStateListener, 0);
+ }
+
+ // stop network/wifi listener
+ if (mNetwork != null) {
+ unregisterReceiver(mNetwork);
+ }
+ mNetwork = null;
+
+ mTrackerData = null;
+ if (mPrefListener != null) {
+ getPreferences().unregisterOnSharedPreferenceChangeListener(mPrefListener);
+ mPrefListener = null;
+ }
+ }
+
+ private LocationManager getLocationManager() {
+ return (LocationManager) getSystemService(Context.LOCATION_SERVICE);
+ }
+
+ /**
+ * Determine the current distance from given location to the last
+ * approximated network location
+ *
+ * @param location - new location
+ *
+ * @return float distance in meters
+ */
+ private synchronized float getDistanceFromNetwork(Location location) {
+ float value = 0;
+ if (mNetworkLocation != null) {
+ value = location.distanceTo(mNetworkLocation);
+ }
+ if (LocationManager.NETWORK_PROVIDER.equals(location.getProvider())) {
+ mNetworkLocation = location;
+ }
+ return value;
+ }
+
+ private class LocationTrackingListener implements LocationListener {
+
+ /**
+ * Writes details of location update to tracking file, including
+ * recording the distance between this location update and the last
+ * network location update
+ *
+ * @param location - new location
+ */
+ public void onLocationChanged(Location location) {
+ if (location == null) {
+ return;
+ }
+ float distance = getDistanceFromNetwork(location);
+ mTrackerData.writeEntry(location, distance);
+ }
+
+ /**
+ * Writes update to tracking file
+ *
+ * @param provider - name of disabled provider
+ */
+ public void onProviderDisabled(String provider) {
+ if (doDebugLogging()) {
+ mTrackerData.writeEntry(provider, "provider disabled");
+ }
+ }
+
+ /**
+ * Writes update to tracking file
+ *
+ * @param provider - name of enabled provider
+ */
+ public void onProviderEnabled(String provider) {
+ if (doDebugLogging()) {
+ mTrackerData.writeEntry(provider, "provider enabled");
+ }
+ }
+
+ /**
+ * Writes update to tracking file
+ *
+ * @param provider - name of provider whose status changed
+ * @param status - new status
+ * @param extras - optional set of extra status messages
+ */
+ public void onStatusChanged(String provider, int status, Bundle extras) {
+ if (doDebugLogging()) {
+ mTrackerData.writeEntry(provider, "status change: " + status);
+ }
+ }
+ }
+
+ PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
+ @Override
+ public void onCellLocationChanged(CellLocation location) {
+ try {
+ if (location instanceof GsmCellLocation) {
+ GsmCellLocation cellLocation = (GsmCellLocation)location;
+ String updateMsg = "cid=" + cellLocation.getCid() +
+ ", lac=" + cellLocation.getLac();
+ mTrackerData.writeEntry(CELL_PROVIDER_TAG, updateMsg);
+ } else if (location instanceof CdmaCellLocation) {
+ CdmaCellLocation cellLocation = (CdmaCellLocation)location;
+ String updateMsg = "BID=" + cellLocation.getBaseStationId() +
+ ", SID=" + cellLocation.getSystemId() +
+ ", NID=" + cellLocation.getNetworkId() +
+ ", lat=" + cellLocation.getBaseStationLatitude() +
+ ", long=" + cellLocation.getBaseStationLongitude() +
+ ", SID=" + cellLocation.getSystemId() +
+ ", NID=" + cellLocation.getNetworkId();
+ mTrackerData.writeEntry(CELL_PROVIDER_TAG, updateMsg);
+ }
+ } catch (Exception e) {
+ Log.e(LOG_TAG, "Exception in CellStateHandler.handleMessage:", e);
+ }
+ }
+
+ public void onSignalStrengthsChanged(SignalStrength signalStrength) {
+ if (mTelephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) {
+ String updateMsg = "cdma dBM=" + signalStrength.getCdmaDbm();
+ mTrackerData.writeEntry(SIGNAL_PROVIDER_TAG, updateMsg);
+ } else if (mTelephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) {
+ String updateMsg = "gsm signal=" + signalStrength.getGsmSignalStrength();
+ mTrackerData.writeEntry(SIGNAL_PROVIDER_TAG, updateMsg);
+ }
+ }
+ };
+
+ /**
+ * Listener + recorder for mobile or wifi updates
+ */
+ private class NetworkStateBroadcastReceiver extends BroadcastReceiver {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+
+ if (action.equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) {
+ WifiManager wifiManager =
+ (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
+ List<ScanResult> wifiScanResults = wifiManager.getScanResults();
+ String updateMsg = "num scan results=" +
+ (wifiScanResults == null ? "0" : wifiScanResults.size());
+ mTrackerData.writeEntry(WIFI_PROVIDER_TAG, updateMsg);
+
+ } else if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION)) {
+ String updateMsg;
+ boolean noConnectivity =
+ intent.getBooleanExtra(
+ ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);
+ if (noConnectivity) {
+ updateMsg = "no connectivity";
+ }
+ else {
+ updateMsg = "connection available";
+ }
+ mTrackerData.writeEntry(DATA_CONN_PROVIDER_TAG, updateMsg);
+
+ } else if (action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)) {
+ int state = intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE,
+ WifiManager.WIFI_STATE_UNKNOWN);
+
+ String stateString = "unknown";
+ switch (state) {
+ case WifiManager.WIFI_STATE_DISABLED:
+ stateString = "disabled";
+ break;
+ case WifiManager.WIFI_STATE_DISABLING:
+ stateString = "disabling";
+ break;
+ case WifiManager.WIFI_STATE_ENABLED:
+ stateString = "enabled";
+ break;
+ case WifiManager.WIFI_STATE_ENABLING:
+ stateString = "enabling";
+ break;
+ }
+ mTrackerData.writeEntry(WIFI_PROVIDER_TAG,
+ "state = " + stateString);
+ }
+ }
+ }
+
+ private class PreferenceListener implements OnSharedPreferenceChangeListener {
+
+ public void onSharedPreferenceChanged(
+ SharedPreferences sharedPreferences, String key) {
+ Log.d(LOG_TAG, "restarting listeners due to preference change");
+ synchronized (TrackerService.this) {
+ stopListeners();
+ initLocationListeners();
+ }
+ }
+ }
+}
diff --git a/tests/LocationTracker/src/com/android/locationtracker/data/CSVFormatter.java b/tests/LocationTracker/src/com/android/locationtracker/data/CSVFormatter.java
new file mode 100644
index 0000000..672ce28
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/data/CSVFormatter.java
@@ -0,0 +1,87 @@
+/*
+ * 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.locationtracker.data;
+
+import com.android.locationtracker.data.TrackerEntry.EntryType;
+
+/**
+ * Formats tracker data as CSV output
+ */
+class CSVFormatter implements IFormatter {
+
+ private static final String DELIMITER = ", ";
+
+ public String getHeader() {
+ StringBuilder csvBuilder = new StringBuilder();
+ for (String col : TrackerEntry.ATTRIBUTES) {
+ // skip type and id column
+ if (!TrackerEntry.ENTRY_TYPE.equals(col) &&
+ !TrackerEntry.ID_COL.equals(col)) {
+ csvBuilder.append(col);
+ csvBuilder.append(DELIMITER);
+ }
+ }
+ csvBuilder.append("\n");
+ return csvBuilder.toString();
+ }
+
+ public String getOutput(TrackerEntry entry) {
+ StringBuilder rowOutput = new StringBuilder();
+ // these must match order of columns added in getHeader
+ rowOutput.append(entry.getTimestamp());
+ rowOutput.append(DELIMITER);
+ rowOutput.append(entry.getTag());
+ rowOutput.append(DELIMITER);
+ //rowOutput.append(entry.getType());
+ //rowOutput.append(DELIMITER);
+ if (entry.getType() == EntryType.LOCATION_TYPE) {
+ if (entry.getLocation().hasAccuracy()) {
+ rowOutput.append(entry.getLocation().getAccuracy());
+ }
+ rowOutput.append(DELIMITER);
+ rowOutput.append(entry.getLocation().getLatitude());
+ rowOutput.append(DELIMITER);
+ rowOutput.append(entry.getLocation().getLongitude());
+ rowOutput.append(DELIMITER);
+ if (entry.getLocation().hasAltitude()) {
+ rowOutput.append(entry.getLocation().getAltitude());
+ }
+ rowOutput.append(DELIMITER);
+ if (entry.getLocation().hasSpeed()) {
+ rowOutput.append(entry.getLocation().getSpeed());
+ }
+ rowOutput.append(DELIMITER);
+ if (entry.getLocation().hasBearing()) {
+ rowOutput.append(entry.getLocation().getBearing());
+ }
+ rowOutput.append(DELIMITER);
+ rowOutput.append(entry.getDistFromNetLocation());
+ rowOutput.append(DELIMITER);
+ rowOutput.append(DateUtils.getKMLTimestamp(entry.getLocation()
+ .getTime()));
+ rowOutput.append(DELIMITER);
+ }
+ rowOutput.append(entry.getLogMsg());
+ rowOutput.append("\n");
+ return rowOutput.toString();
+ }
+
+ public String getFooter() {
+ // not needed, return empty string
+ return "";
+ }
+}
diff --git a/tests/LocationTracker/src/com/android/locationtracker/data/DateUtils.java b/tests/LocationTracker/src/com/android/locationtracker/data/DateUtils.java
new file mode 100644
index 0000000..13226bd
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/data/DateUtils.java
@@ -0,0 +1,61 @@
+/*
+ * 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.locationtracker.data;
+
+import java.util.Calendar;
+import java.util.TimeZone;
+
+/**
+ * Provides formatting date as string utilities
+ */
+public class DateUtils {
+
+ private DateUtils() {
+
+ }
+
+ /**
+ * Returns timestamp given by param in KML format ie yyyy-mm-ddThh:mm:ssZ,
+ * where T is the separator between the date and the time and the time zone
+ * is Z (for UTC)
+ *
+ * @return KML timestamp as String
+ */
+ public static String getKMLTimestamp(long when) {
+ TimeZone tz = TimeZone.getTimeZone("GMT");
+ Calendar c = Calendar.getInstance(tz);
+ c.setTimeInMillis(when);
+ return String.format("%tY-%tm-%tdT%tH:%tM:%tSZ", c, c, c, c, c, c);
+ }
+
+ /**
+ * Helper version of getKMLTimestamp, that returns timestamp for current
+ * time
+ */
+ public static String getCurrentKMLTimestamp() {
+ return getKMLTimestamp(System.currentTimeMillis());
+ }
+
+ /**
+ * Returns timestamp in following format: yyyy-mm-dd-hh-mm-ss
+ */
+ public static String getCurrentTimestamp() {
+ Calendar c = Calendar.getInstance();
+ c.setTimeInMillis(System.currentTimeMillis());
+ return String.format("%tY-%tm-%td-%tH-%tM-%tS", c, c, c, c, c, c);
+ }
+}
diff --git a/tests/LocationTracker/src/com/android/locationtracker/data/IFormatter.java b/tests/LocationTracker/src/com/android/locationtracker/data/IFormatter.java
new file mode 100644
index 0000000..af0b5ed
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/data/IFormatter.java
@@ -0,0 +1,27 @@
+/*
+ * 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.locationtracker.data;
+
+/**
+ * interface for formatting tracker data output
+ */
+interface IFormatter {
+
+ String getHeader();
+ String getOutput(TrackerEntry entry);
+ String getFooter();
+}
diff --git a/tests/LocationTracker/src/com/android/locationtracker/data/KMLFormatter.java b/tests/LocationTracker/src/com/android/locationtracker/data/KMLFormatter.java
new file mode 100644
index 0000000..a5e1816
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/data/KMLFormatter.java
@@ -0,0 +1,88 @@
+/*
+ * 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.locationtracker.data;
+
+import com.android.locationtracker.data.TrackerEntry.EntryType;
+
+import android.location.Location;
+
+/**
+ * Formats tracker data as KML output
+ */
+class KMLFormatter implements IFormatter {
+
+ public String getHeader() {
+ LineBuilder builder = new LineBuilder();
+ builder.addLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
+ builder.addLine("<kml xmlns=\"http://earth.google.com/kml/2.2\">");
+ builder.addLine("<Document>");
+ return builder.toString();
+ }
+
+ public String getFooter() {
+ LineBuilder builder = new LineBuilder();
+ builder.addLine("</Document>");
+ builder.addLine("</kml>");
+ return builder.toString();
+ }
+
+ public String getOutput(TrackerEntry entry) {
+ LineBuilder builder = new LineBuilder();
+
+ if (entry.getType() == EntryType.LOCATION_TYPE) {
+
+ Location loc = entry.getLocation();
+ builder.addLine("<Placemark>");
+ builder.addLine("<description>");
+ builder.addLine("accuracy = " + loc.getAccuracy());
+ builder.addLine("distance from last network location = "
+ + entry.getDistFromNetLocation());
+ builder.addLine("</description>");
+ builder.addLine("<TimeStamp>");
+ builder.addLine("<when>" + entry.getTimestamp() + "</when>");
+ builder.addLine("</TimeStamp>");
+ builder.addLine("<Point>");
+ builder.addLine("<coordinates>");
+ builder.addLine(loc.getLongitude() + "," + loc.getLatitude() + ","
+ + loc.getAltitude());
+ builder.addLine("</coordinates>");
+ builder.addLine("</Point>");
+ builder.addLine("</Placemark>");
+ }
+ return builder.toString();
+ }
+
+ private static class LineBuilder {
+ private StringBuilder mBuilder;
+
+ public LineBuilder() {
+ mBuilder = new StringBuilder();
+ }
+
+ public void addLine(String line) {
+ mBuilder.append(line);
+ mBuilder.append("\n");
+ }
+
+ @Override
+ public String toString() {
+ return mBuilder.toString();
+ }
+
+ }
+
+}
diff --git a/tests/LocationTracker/src/com/android/locationtracker/data/TrackerDataHelper.java b/tests/LocationTracker/src/com/android/locationtracker/data/TrackerDataHelper.java
new file mode 100644
index 0000000..a3838df
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/data/TrackerDataHelper.java
@@ -0,0 +1,173 @@
+/*
+ * 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.locationtracker.data;
+
+import android.content.Context;
+import android.database.Cursor;
+import android.location.Location;
+
+/**
+ * Helper class for writing and retrieving data using the TrackerProvider
+ * content provider
+ *
+ */
+public class TrackerDataHelper {
+
+ private Context mContext;
+ /** formats data output */
+ protected IFormatter mFormatter;
+
+ /** formats output as Comma separated value CSV file */
+ public static final IFormatter CSV_FORMATTER = new CSVFormatter();
+ /** formats output as KML file */
+ public static final IFormatter KML_FORMATTER = new KMLFormatter();
+ /** provides no formatting */
+ public static final IFormatter NO_FORMATTER = new IFormatter() {
+ public String getFooter() {
+ return "";
+ }
+
+ public String getHeader() {
+ return "";
+ }
+
+ public String getOutput(TrackerEntry entry) {
+ return "";
+ }
+ };
+
+ /**
+ * Creates instance
+ *
+ * @param context - content context
+ * @param formatter - formats the output from the get*Output* methods
+ */
+ public TrackerDataHelper(Context context, IFormatter formatter) {
+ mContext = context;
+ mFormatter = formatter;
+ }
+
+ /**
+ * Creates a instance with no output formatting capabilities. Useful for
+ * clients that require write-only access
+ */
+ public TrackerDataHelper(Context context) {
+ this(context, NO_FORMATTER);
+ }
+
+ /**
+ * insert given TrackerEntry into content provider
+ */
+ void writeEntry(TrackerEntry entry) {
+ mContext.getContentResolver().insert(TrackerProvider.CONTENT_URI,
+ entry.getAsContentValues());
+ }
+
+ /**
+ * insert given location into tracker data
+ */
+ public void writeEntry(Location loc, float distFromNetLoc) {
+ writeEntry(TrackerEntry.createEntry(loc, distFromNetLoc));
+ }
+
+ /**
+ * insert given log message into tracker data
+ */
+ public void writeEntry(String tag, String logMsg) {
+ writeEntry(TrackerEntry.createEntry(tag, logMsg));
+ }
+
+ /**
+ * Deletes all tracker entries
+ */
+ public void deleteAll() {
+ mContext.getContentResolver().delete(TrackerProvider.CONTENT_URI, null,
+ null);
+ }
+
+ /**
+ * Query tracker data, filtering by given tag
+ *
+ * @param tag
+ * @return Cursor to data
+ */
+ public Cursor query(String tag, int limit) {
+ String selection = (tag == null ? null : TrackerEntry.TAG + "=?");
+ String[] selectionArgs = (tag == null ? null : new String[] {tag});
+ Cursor cursor = mContext.getContentResolver().query(
+ TrackerProvider.CONTENT_URI, TrackerEntry.ATTRIBUTES,
+ selection, selectionArgs, null);
+ if (cursor == null) {
+ return cursor;
+ }
+ int pos = (cursor.getCount() < limit ? 0 : cursor.getCount() - limit);
+ cursor.moveToPosition(pos);
+ return cursor;
+ }
+
+ /**
+ * Retrieves a cursor that starts at the last limit rows
+ *
+ * @param limit
+ * @return a cursor, null if bad things happened
+ */
+ public Cursor query(int limit) {
+ return query(null, limit);
+ }
+
+ /**
+ * Query tracker data, filtering by given tag. mo limit to number of rows
+ * returned
+ *
+ * @param tag
+ * @return Cursor to data
+ */
+ public Cursor query(String tag) {
+ return query(tag, Integer.MAX_VALUE);
+ }
+
+ /**
+ * Returns the output header particular to the associated formatter
+ */
+ public String getOutputHeader() {
+ return mFormatter.getHeader();
+ }
+
+ /**
+ * Returns the output footer particular to the associated formatter
+ */
+ public String getOutputFooter() {
+ return mFormatter.getFooter();
+ }
+
+ /**
+ * Helper method which converts row referenced by given cursor to a string
+ * output
+ *
+ * @param cursor
+ * @return CharSequence output, null if given cursor is invalid or no more
+ * data
+ */
+ public String getNextOutput(Cursor cursor) {
+ if (cursor == null || cursor.isAfterLast()) {
+ return null;
+ }
+ String output = mFormatter.getOutput(TrackerEntry.createEntry(cursor));
+ cursor.moveToNext();
+ return output;
+ }
+}
diff --git a/tests/LocationTracker/src/com/android/locationtracker/data/TrackerEntry.java b/tests/LocationTracker/src/com/android/locationtracker/data/TrackerEntry.java
new file mode 100644
index 0000000..b2741f6
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/data/TrackerEntry.java
@@ -0,0 +1,253 @@
+/*
+ * 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.locationtracker.data;
+
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.location.Location;
+
+
+/**
+ * Class that holds a tracker entry. An entry can be either a valid location, or
+ * a simple log msg
+ *
+ * It provides a concrete data structure to represent data stored in the
+ * TrackerProvider
+ */
+class TrackerEntry {
+
+ static final String TIMESTAMP = "Timestamp";
+ static final String TAG = "Tag";
+ static final String ENTRY_TYPE = "Type";
+
+ private Location mLocation;
+ private float mDistFromNetLocation;
+ private String mLogMsg;
+
+ static final String ID_COL = "_id";
+ static final String ACCURACY = "Accuracy";
+ static final String LATITUDE = "Latitude";
+ static final String LONGITUDE = "Longitude";
+ static final String ALTITUDE = "Altitude";
+ static final String SPEED = "Speed";
+ static final String BEARING = "Bearing";
+ static final String DIST_NET_LOCATION = "DistFromNetLocation";
+ static final String LOC_TIME = "LocationTime";
+ static final String DEBUG_INFO = "DebugInfo";
+
+ static final String STRING_DATA = "STRING";
+ static final String INT_DATA = "INTEGER";
+ static final String REAL_DATA = "REAL";
+ static final String BLOB_DATA = "BLOB";
+
+ static final String[] ATTRIBUTES = {
+ ID_COL, TIMESTAMP, TAG, ENTRY_TYPE, ACCURACY, LATITUDE, LONGITUDE,
+ ALTITUDE, SPEED, BEARING, DIST_NET_LOCATION, LOC_TIME, DEBUG_INFO};
+ static final String[] ATTRIBUTES_DATA_TYPE = {
+ INT_DATA + " PRIMARY KEY", STRING_DATA, STRING_DATA, STRING_DATA,
+ REAL_DATA, REAL_DATA, REAL_DATA, REAL_DATA, REAL_DATA, REAL_DATA,
+ REAL_DATA, INT_DATA, STRING_DATA};
+
+ // location extra keys used to retrieve debug info
+ private static final String NETWORK_LOCATION_SOURCE_KEY =
+ "networkLocationSource";
+ private static final String NETWORK_LOCATION_TYPE_KEY =
+ "networkLocationType";
+ private static final String[] LOCATION_DEBUG_KEYS = {
+ NETWORK_LOCATION_SOURCE_KEY, NETWORK_LOCATION_TYPE_KEY};
+
+ enum EntryType {
+ LOCATION_TYPE, LOG_TYPE
+ }
+
+ private String mTimestamp;
+ private String mTag;
+ private EntryType mType;
+
+ private TrackerEntry(String tag, EntryType type) {
+ mType = type;
+ mTag = tag;
+ mLocation = null;
+ }
+
+ private TrackerEntry(Location loc) {
+ this(loc.getProvider(), EntryType.LOCATION_TYPE);
+ mLocation = new Location(loc);
+ }
+
+ /**
+ * Creates a TrackerEntry from a Location
+ */
+ static TrackerEntry createEntry(Location loc, float distFromNetLocation) {
+ TrackerEntry entry = new TrackerEntry(loc);
+
+ String timestampVal = DateUtils.getCurrentKMLTimestamp();
+ entry.setTimestamp(timestampVal);
+ entry.setDistFromNetLocation(distFromNetLocation);
+ return entry;
+ }
+
+ /**
+ * Creates a TrackerEntry from a log msg
+ */
+ static TrackerEntry createEntry(String tag, String msg) {
+ TrackerEntry entry = new TrackerEntry(tag, EntryType.LOG_TYPE);
+ String timestampVal = DateUtils.getCurrentKMLTimestamp();
+ entry.setTimestamp(timestampVal);
+ entry.setLogMsg(msg);
+ return entry;
+ }
+
+ private void setTimestamp(String timestamp) {
+ mTimestamp = timestamp;
+ }
+
+ EntryType getType() {
+ return mType;
+ }
+
+ private void setDistFromNetLocation(float distFromNetLocation) {
+ mDistFromNetLocation = distFromNetLocation;
+ }
+
+ private void setLogMsg(String msg) {
+ mLogMsg = msg;
+ }
+
+ private void setLocation(Location location) {
+ mLocation = location;
+ }
+
+ String getTimestamp() {
+ return mTimestamp;
+ }
+
+ String getTag() {
+ return mTag;
+ }
+
+ Location getLocation() {
+ return mLocation;
+ }
+
+ String getLogMsg() {
+ return mLogMsg;
+ }
+
+ float getDistFromNetLocation() {
+ return mDistFromNetLocation;
+ }
+
+ static void buildCreationString(StringBuilder builder) {
+ if (ATTRIBUTES.length != ATTRIBUTES_DATA_TYPE.length) {
+ throw new IllegalArgumentException(
+ "Attribute length does not match data type length");
+ }
+ for (int i = 0; i < ATTRIBUTES_DATA_TYPE.length; i++) {
+ if (i != 0) {
+ builder.append(", ");
+ }
+ builder.append(String.format("%s %s", ATTRIBUTES[i],
+ ATTRIBUTES_DATA_TYPE[i]));
+ }
+ }
+
+ ContentValues getAsContentValues() {
+ ContentValues cValues = new ContentValues(ATTRIBUTES.length);
+ cValues.put(TIMESTAMP, mTimestamp);
+ cValues.put(TAG, mTag);
+ cValues.put(ENTRY_TYPE, mType.toString());
+ if (mType == EntryType.LOCATION_TYPE) {
+ cValues.put(LATITUDE, mLocation.getLatitude());
+ cValues.put(LONGITUDE, mLocation.getLongitude());
+ if (mLocation.hasAccuracy()) {
+ cValues.put(ACCURACY, mLocation.getAccuracy());
+ }
+ if (mLocation.hasAltitude()) {
+ cValues.put(ALTITUDE, mLocation.getAltitude());
+ }
+ if (mLocation.hasSpeed()) {
+ cValues.put(SPEED, mLocation.getSpeed());
+ }
+ if (mLocation.hasBearing()) {
+ cValues.put(BEARING, mLocation.getBearing());
+ }
+ cValues.put(DIST_NET_LOCATION, mDistFromNetLocation);
+ cValues.put(LOC_TIME, mLocation.getTime());
+ StringBuilder debugBuilder = new StringBuilder("");
+ if (mLocation.getExtras() != null) {
+ for (String key : LOCATION_DEBUG_KEYS) {
+ Object val = mLocation.getExtras().get(key);
+ if (val != null) {
+ debugBuilder.append(String.format("%s=%s; ", key, val
+ .toString()));
+ }
+ }
+ }
+ cValues.put(DEBUG_INFO, debugBuilder.toString());
+ } else {
+ cValues.put(DEBUG_INFO, mLogMsg);
+ }
+ return cValues;
+ }
+
+ static TrackerEntry createEntry(Cursor cursor) {
+ String timestamp = cursor.getString(cursor.getColumnIndex(TIMESTAMP));
+ String tag = cursor.getString(cursor.getColumnIndex(TAG));
+ String sType = cursor.getString(cursor.getColumnIndex(ENTRY_TYPE));
+ TrackerEntry entry = new TrackerEntry(tag, EntryType.valueOf(sType));
+ entry.setTimestamp(timestamp);
+ if (entry.getType() == EntryType.LOCATION_TYPE) {
+ Location location = new Location(tag);
+ location.setLatitude(cursor.getFloat(cursor
+ .getColumnIndexOrThrow(LATITUDE)));
+ location.setLongitude(cursor.getFloat(cursor
+ .getColumnIndexOrThrow(LONGITUDE)));
+
+ Float accuracy = getNullableFloat(cursor, ACCURACY);
+ if (accuracy != null) {
+ location.setAccuracy(accuracy);
+ }
+ Float altitude = getNullableFloat(cursor, ALTITUDE);
+ if (altitude != null) {
+ location.setAltitude(altitude);
+ }
+ Float bearing = getNullableFloat(cursor, BEARING);
+ if (bearing != null) {
+ location.setBearing(bearing);
+ }
+ Float speed = getNullableFloat(cursor, SPEED);
+ if (speed != null) {
+ location.setSpeed(speed);
+ }
+ location.setTime(cursor.getLong(cursor.getColumnIndex(LOC_TIME)));
+ entry.setLocation(location);
+ }
+ entry.setLogMsg(cursor.getString(cursor.getColumnIndex(DEBUG_INFO)));
+
+ return entry;
+ }
+
+ private static Float getNullableFloat(Cursor cursor, String colName) {
+ Float retValue = null;
+ int colIndex = cursor.getColumnIndexOrThrow(colName);
+ if (!cursor.isNull(colIndex)) {
+ retValue = cursor.getFloat(colIndex);
+ }
+ return retValue;
+ }
+}
diff --git a/tests/LocationTracker/src/com/android/locationtracker/data/TrackerListHelper.java b/tests/LocationTracker/src/com/android/locationtracker/data/TrackerListHelper.java
new file mode 100644
index 0000000..55d4d1e
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/data/TrackerListHelper.java
@@ -0,0 +1,75 @@
+/*
+ * 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.locationtracker.data;
+
+import android.app.ListActivity;
+import android.content.Context;
+import android.database.Cursor;
+import android.view.View;
+import android.widget.ResourceCursorAdapter;
+import android.widget.TextView;
+
+import com.android.locationtracker.R;
+
+/**
+ * Used to bind Tracker data to a list view UI
+ */
+public class TrackerListHelper extends TrackerDataHelper {
+
+ private ListActivity mActivity;
+
+ // sort entries by most recent first
+ private static final String SORT_ORDER = TrackerEntry.ID_COL + " DESC";
+
+ public TrackerListHelper(ListActivity activity) {
+ super(activity, TrackerDataHelper.CSV_FORMATTER);
+ mActivity = activity;
+ }
+
+ /**
+ * Helper method for binding the list activities UI to the tracker data
+ * Tracker data will be sorted in most-recent first order
+ * Will enable automatic UI changes as tracker data changes
+ *
+ * @param layout - layout to populate data
+ */
+ public void bindListUI(int layout) {
+ Cursor cursor = mActivity.managedQuery(TrackerProvider.CONTENT_URI,
+ TrackerEntry.ATTRIBUTES, null, null, SORT_ORDER);
+ // Used to map tracker entries from the database to views
+ TrackerAdapter adapter = new TrackerAdapter(mActivity, layout, cursor);
+ mActivity.setListAdapter(adapter);
+ cursor.setNotificationUri(mActivity.getContentResolver(),
+ TrackerProvider.CONTENT_URI);
+
+ }
+
+ private class TrackerAdapter extends ResourceCursorAdapter {
+
+ public TrackerAdapter(Context context, int layout, Cursor c) {
+ super(context, layout, c);
+ }
+
+ @Override
+ public void bindView(View view, Context context, Cursor cursor) {
+ final TextView v = (TextView) view
+ .findViewById(R.id.entrylist_item);
+ String rowText = mFormatter.getOutput(TrackerEntry
+ .createEntry(cursor));
+ v.setText(rowText);
+ }
+ }
+}
diff --git a/tests/LocationTracker/src/com/android/locationtracker/data/TrackerProvider.java b/tests/LocationTracker/src/com/android/locationtracker/data/TrackerProvider.java
new file mode 100644
index 0000000..88f24c3
--- /dev/null
+++ b/tests/LocationTracker/src/com/android/locationtracker/data/TrackerProvider.java
@@ -0,0 +1,126 @@
+/*
+ * 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.locationtracker.data;
+
+import android.content.ContentProvider;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
+import android.net.Uri;
+import android.util.Log;
+
+/**
+ * Content provider for location tracking.
+ *
+ * It is recommended to use the TrackerDataHelper class to access this data
+ * rather than this class directly
+ */
+public class TrackerProvider extends ContentProvider {
+
+ public static final Uri CONTENT_URI = Uri
+ .parse("content://com.android.locationtracker");
+
+ private static final String DB_NAME = "tracking.db";
+ private static final String TABLE_NAME = "tracking";
+ private static final int DB_VERSION = 1;
+
+ private static final String LOG_TAG = "TrackerProvider";
+
+ /**
+ * This class helps open, create, and upgrade the database file.
+ */
+ private static class DatabaseHelper extends SQLiteOpenHelper {
+
+ DatabaseHelper(Context context) {
+ super(context, DB_NAME, null, DB_VERSION);
+ }
+
+ @Override
+ public void onCreate(SQLiteDatabase db) {
+ StringBuilder queryBuilder = new StringBuilder();
+ queryBuilder.append(String.format("CREATE TABLE %s (", TABLE_NAME));
+ TrackerEntry.buildCreationString(queryBuilder);
+
+ queryBuilder.append(");");
+ db.execSQL(queryBuilder.toString());
+ db.setVersion(DB_VERSION);
+ }
+
+ @Override
+ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+ // TODO: reimplement this when dB version changes
+ Log.w(LOG_TAG, "Upgrading database from version " + oldVersion
+ + " to " + newVersion
+ + ", which will destroy all old data");
+ db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
+ onCreate(db);
+ }
+ }
+
+ private DatabaseHelper mOpenHelper;
+
+ @Override
+ public boolean onCreate() {
+ mOpenHelper = new DatabaseHelper(getContext());
+ return true;
+ }
+
+ @Override
+ public int delete(Uri uri, String selection, String[] selectionArgs) {
+ SQLiteDatabase db = mOpenHelper.getWritableDatabase();
+ int result = db.delete(TABLE_NAME, selection, selectionArgs);
+ getContext().getContentResolver().notifyChange(uri, null);
+ return result;
+ }
+
+ @Override
+ public String getType(Uri uri) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Uri insert(Uri uri, ContentValues values) {
+ SQLiteDatabase db = mOpenHelper.getWritableDatabase();
+ long rowId = db.insert(TABLE_NAME, null, values);
+ if (rowId > 0) {
+ Uri addedUri = ContentUris.withAppendedId(CONTENT_URI, rowId);
+ getContext().getContentResolver().notifyChange(addedUri, null);
+ return addedUri;
+ }
+ return null;
+ }
+
+ @Override
+ public Cursor query(Uri uri, String[] projection, String selection,
+ String[] selectionArgs, String sortOrder) {
+ SQLiteDatabase db = mOpenHelper.getReadableDatabase();
+ // TODO: extract limit from URI ?
+ Cursor cursor = db.query(TABLE_NAME, projection, selection,
+ selectionArgs, null, null, sortOrder);
+ getContext().getContentResolver().notifyChange(uri, null);
+ return cursor;
+ }
+
+ @Override
+ public int update(Uri uri, ContentValues values, String selection,
+ String[] selectionArgs) {
+ throw new UnsupportedOperationException();
+ }
+}
diff --git a/tests/SslLoad/src/com/android/sslload/SslLoad.java b/tests/SslLoad/src/com/android/sslload/SslLoad.java
index 1470d48..62aa524 100644
--- a/tests/SslLoad/src/com/android/sslload/SslLoad.java
+++ b/tests/SslLoad/src/com/android/sslload/SslLoad.java
@@ -35,7 +35,7 @@
import android.widget.Button;
import android.widget.TextView;
import android.util.Log;
-import com.android.common.AndroidHttpClient;
+import android.net.http.AndroidHttpClient;
import org.apache.http.client.HttpClient;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.methods.HttpGet;
diff --git a/tools/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index 88c5441..ae4bd14 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -221,12 +221,12 @@
&& code != ResXMLTree::BAD_DOCUMENT) {
if (code == ResXMLTree::START_TAG) {
if (strcmp16(block.getElementName(&len), uses_sdk16.string()) == 0) {
- ssize_t minSdkIndex = block.indexOfAttribute("android",
+ ssize_t minSdkIndex = block.indexOfAttribute(RESOURCES_ANDROID_NAMESPACE,
"minSdkVersion");
if (minSdkIndex >= 0) {
- String8 minSdkString = String8(
- block.getAttributeStringValue(minSdkIndex, &len));
- bundle->setMinSdkVersion(minSdkString.string());
+ const uint16_t* minSdk16 = block.getAttributeStringValue(minSdkIndex, &len);
+ const char* minSdk8 = strdup(String8(minSdk16).string());
+ bundle->setMinSdkVersion(minSdk8);
}
}
}
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp
index 51afc0a..a09cec0 100644
--- a/tools/aapt/StringPool.cpp
+++ b/tools/aapt/StringPool.cpp
@@ -25,8 +25,12 @@
const size_t NS = pool->size();
for (size_t s=0; s<NS; s++) {
size_t len;
- printf("String #%ld: %s\n", s,
- String8(pool->stringAt(s, &len)).string());
+ const char *str = (const char*)pool->string8At(s, &len);
+ if (str == NULL) {
+ str = String8(pool->stringAt(s, &len)).string();
+ }
+
+ printf("String #%ld: %s\n", s, str);
}
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas.java b/tools/layoutlib/bridge/src/android/graphics/Canvas.java
index 8bf5e85..d5d315e 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas.java
@@ -236,11 +236,6 @@
// OVERRIDEN METHODS
// --------------------
- @Override
- public void finalize() throws Throwable {
- // pass
- }
-
/* (non-Javadoc)
* @see android.graphics.Canvas#setBitmap(android.graphics.Bitmap)
*/
diff --git a/tools/layoutlib/bridge/src/android/graphics/Matrix.java b/tools/layoutlib/bridge/src/android/graphics/Matrix.java
index 522415c..9e30671 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Matrix.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Matrix.java
@@ -52,11 +52,6 @@
mValues = data;
}
- @Override
- public void finalize() throws Throwable {
- // pass
- }
-
//---------- Custom Methods
/**
diff --git a/tools/layoutlib/bridge/src/android/graphics/Paint.java b/tools/layoutlib/bridge/src/android/graphics/Paint.java
index 2d03618..e4f9794 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Paint.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Paint.java
@@ -219,11 +219,6 @@
}
@Override
- public void finalize() throws Throwable {
- // pass
- }
-
- @Override
public void reset() {
super.reset();
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
index 41d9f9d..8e9e75f 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -16,7 +16,7 @@
package com.android.layoutlib.bridge;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
import com.android.layoutlib.api.ILayoutBridge;
import com.android.layoutlib.api.ILayoutLog;
import com.android.layoutlib.api.ILayoutResult;
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 73a3986..744bfbe 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java
@@ -927,6 +927,7 @@
return null;
}
+ @Override
public File getExternalCacheDir() {
// TODO Auto-generated method stub
return null;
@@ -964,6 +965,7 @@
return null;
}
+ @Override
public File getExternalFilesDir(String type) {
// TODO Auto-generated method stub
return null;
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 efd222e..70c5bd7 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeTypedArray.java
@@ -16,7 +16,7 @@
package com.android.layoutlib.bridge;
-import com.android.common.XmlUtils;
+import com.android.internal.util.XmlUtils;
import com.android.layoutlib.api.IResourceValue;
import com.android.layoutlib.api.IStyleResourceValue;
@@ -392,7 +392,8 @@
if (s == null) {
return defValue;
- } else if (s.equals(BridgeConstants.MATCH_PARENT)) {
+ } else if (s.equals(BridgeConstants.MATCH_PARENT) ||
+ s.equals(BridgeConstants.FILL_PARENT)) {
return LayoutParams.MATCH_PARENT;
} else if (s.equals(BridgeConstants.WRAP_CONTENT)) {
return LayoutParams.WRAP_CONTENT;
@@ -460,7 +461,8 @@
if (s == null) {
return defValue;
- } else if (s.equals(BridgeConstants.MATCH_PARENT)) {
+ } else if (s.equals(BridgeConstants.MATCH_PARENT) ||
+ s.equals(BridgeConstants.FILL_PARENT)) {
return LayoutParams.MATCH_PARENT;
} else if (s.equals(BridgeConstants.WRAP_CONTENT)) {
return LayoutParams.WRAP_CONTENT;
diff --git a/tools/preload/20100223.compiled b/tools/preload/20100223.compiled
new file mode 100644
index 0000000..3056388
--- /dev/null
+++ b/tools/preload/20100223.compiled
Binary files differ
diff --git a/tools/preload/MemoryUsage.java b/tools/preload/MemoryUsage.java
index bc21b6f..d8f95f4 100644
--- a/tools/preload/MemoryUsage.java
+++ b/tools/preload/MemoryUsage.java
@@ -166,7 +166,7 @@
+ ":/system/framework/loadclass.jar";
private static final String[] GET_DIRTY_PAGES = {
- "adb", "-e", "shell", "dalvikvm", CLASS_PATH, "LoadClass" };
+ "adb", "shell", "dalvikvm", CLASS_PATH, "LoadClass" };
/**
* Measures memory usage for the given class.
@@ -248,7 +248,7 @@
String line = in.readLine();
if (line == null || !line.startsWith("DECAFBAD,")) {
System.err.println("Got bad response for " + className
- + ": " + line);
+ + ": " + line + "; command was " + Arrays.toString(commands));
errorCount += 1;
return NOT_AVAILABLE;
}
diff --git a/tools/preload/Policy.java b/tools/preload/Policy.java
index a8d761d..f557365 100644
--- a/tools/preload/Policy.java
+++ b/tools/preload/Policy.java
@@ -43,9 +43,14 @@
"system_server",
"com.google.process.content",
"android.process.media",
+ "com.android.bluetooth",
+ "com.android.calendar",
+ "com.android.inputmethod.latin",
"com.android.phone",
- "com.google.android.apps.maps.FriendService",
+ "com.google.android.apps.maps.FriendService", // pre froyo
+ "com.google.android.apps.maps:FriendService", // froyo
"com.google.android.apps.maps.LocationFriendService",
+ "com.google.android.deskclock",
"com.google.process.gapps",
"android.tts"
));
diff --git a/tools/preload/Record.java b/tools/preload/Record.java
index b2be4d4..9d45a26 100644
--- a/tools/preload/Record.java
+++ b/tools/preload/Record.java
@@ -19,6 +19,19 @@
*/
class Record {
+ /**
+ * The delimiter character we use, {@code :}, conflicts with some other
+ * names. In that case, manually replace the delimiter with something else.
+ */
+ private static final String[] REPLACE_CLASSES = {
+ "com.google.android.apps.maps:FriendService",
+ "com.google.android.apps.maps\\u003AFriendService",
+ "com.google.android.apps.maps:driveabout",
+ "com.google.android.apps.maps\\u003Adriveabout",
+ "com.google.android.apps.maps:LocationFriendService",
+ "com.google.android.apps.maps\\u003ALocationFriendService",
+ };
+
enum Type {
/** Start of initialization. */
START_LOAD,
@@ -74,6 +87,10 @@
}
sourceLineNumber = lineNum;
+
+ for (int i = 0; i < REPLACE_CLASSES.length; i+= 2) {
+ line = line.replace(REPLACE_CLASSES[i], REPLACE_CLASSES[i+1]);
+ }
line = line.substring(1);
String[] parts = line.split(":");
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index afaed24..810e4d2 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -943,7 +943,7 @@
} else {
newDetailedState = DetailedState.FAILED;
}
- handleDisconnectedState(newDetailedState);
+ handleDisconnectedState(newDetailedState, true);
/**
* If we were associated with a network (networkId != -1),
* assume we reached this state because of a failed attempt
@@ -965,7 +965,7 @@
} else if (newState == SupplicantState.DISCONNECTED) {
mHaveIpAddress = false;
if (isDriverStopped() || mDisconnectExpected) {
- handleDisconnectedState(DetailedState.DISCONNECTED);
+ handleDisconnectedState(DetailedState.DISCONNECTED, true);
} else {
scheduleDisconnect();
}
@@ -1072,16 +1072,10 @@
*/
if (wasDisconnectPending) {
DetailedState saveState = getNetworkInfo().getDetailedState();
- handleDisconnectedState(DetailedState.DISCONNECTED);
+ handleDisconnectedState(DetailedState.DISCONNECTED, false);
setDetailedStateInternal(saveState);
- } else {
- /**
- * stop DHCP to ensure there is a new IP address
- * even if the supplicant transitions without disconnect
- * COMPLETED -> ASSOCIATED -> COMPLETED
- */
- resetConnections(false);
}
+
configureInterface();
mLastBssid = result.BSSID;
mLastSsid = mWifiInfo.getSSID();
@@ -1116,7 +1110,7 @@
case EVENT_DEFERRED_DISCONNECT:
if (mWifiInfo.getSupplicantState() != SupplicantState.UNINITIALIZED) {
- handleDisconnectedState(DetailedState.DISCONNECTED);
+ handleDisconnectedState(DetailedState.DISCONNECTED, true);
}
break;
@@ -1284,13 +1278,15 @@
* Reset our IP state and send out broadcasts following a disconnect.
* @param newState the {@code DetailedState} to set. Should be either
* {@code DISCONNECTED} or {@code FAILED}.
+ * @param disableInterface indicates whether the interface should
+ * be disabled
*/
- private void handleDisconnectedState(DetailedState newState) {
+ private void handleDisconnectedState(DetailedState newState, boolean disableInterface) {
if (mDisconnectPending) {
cancelDisconnect();
}
mDisconnectExpected = false;
- resetConnections(true);
+ resetConnections(disableInterface);
setDetailedState(newState);
sendNetworkStateChangeBroadcast(mLastBssid);
mWifiInfo.setBSSID(null);