Merge change 4262 into donut
* changes:
Add utility methods to AndroidTestCase for asserting permission requirements for launching activities and accessing ContentProviders.
diff --git a/api/4.xml b/api/4.xml
index 893301e..b117a87 100644
--- a/api/4.xml
+++ b/api/4.xml
@@ -122,17 +122,6 @@
visibility="public"
>
</field>
-<field name="ADD_SYSTEM_SERVICE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.permission.ADD_SYSTEM_SERVICE""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="BATTERY_STATS"
type="java.lang.String"
transient="false"
@@ -463,17 +452,6 @@
visibility="public"
>
</field>
-<field name="FOTA_UPDATE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.permission.FOTA_UPDATE""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="GET_ACCOUNTS"
type="java.lang.String"
transient="false"
@@ -925,17 +903,6 @@
visibility="public"
>
</field>
-<field name="SET_PROCESS_FOREGROUND"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.permission.SET_PROCESS_FOREGROUND""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="SET_PROCESS_LIMIT"
type="java.lang.String"
transient="false"
diff --git a/api/current.xml b/api/current.xml
index 1861cf5..133b21f 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -122,17 +122,6 @@
visibility="public"
>
</field>
-<field name="ADD_SYSTEM_SERVICE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.permission.ADD_SYSTEM_SERVICE""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="BATTERY_STATS"
type="java.lang.String"
transient="false"
@@ -474,17 +463,6 @@
visibility="public"
>
</field>
-<field name="FOTA_UPDATE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.permission.FOTA_UPDATE""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="GET_ACCOUNTS"
type="java.lang.String"
transient="false"
@@ -947,17 +925,6 @@
visibility="public"
>
</field>
-<field name="SET_PROCESS_FOREGROUND"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.permission.SET_PROCESS_FOREGROUND""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="SET_PROCESS_LIMIT"
type="java.lang.String"
transient="false"
diff --git a/core/java/android/provider/Browser.java b/core/java/android/provider/Browser.java
index 0bab2a7..9c8c537 100644
--- a/core/java/android/provider/Browser.java
+++ b/core/java/android/provider/Browser.java
@@ -78,7 +78,19 @@
* @hide
*/
public static final String EXTRA_INLINE_FAILURL ="com.android.browser.inline.failurl";
-
+
+ /**
+ * The name of the extra data in the VIEW intent. The data is in boolean.
+ * <p>
+ * If the Browser is handling the intent and the setting for
+ * USE_LOCATION_FOR_SERVICES is allow, the Browser will send the location in
+ * the POST data if this extra data is presented and it is true.
+ * <p>
+ * pending api approval
+ * @hide
+ */
+ public static final String EXTRA_APPEND_LOCATION = "com.android.browser.append_location";
+
/* if you change column order you must also change indices
below */
public static final String[] HISTORY_PROJECTION = new String[] {
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index c2da593..ff38e5a 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3049,6 +3049,13 @@
public static final String ANR_BUGREPORT_RECIPIENT = "anr_bugreport_recipient";
/**
+ * Flag for allowing service provider to use location information to improve products and
+ * services.
+ * Type: int ( 0 = disallow, 1 = allow )
+ */
+ public static final String USE_LOCATION_FOR_SERVICES = "use_location";
+
+ /**
* @deprecated
* @hide
*/
diff --git a/core/java/android/server/search/SearchManagerService.java b/core/java/android/server/search/SearchManagerService.java
index db812d1..373e61f 100644
--- a/core/java/android/server/search/SearchManagerService.java
+++ b/core/java/android/server/search/SearchManagerService.java
@@ -30,6 +30,8 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.RemoteException;
+import android.os.SystemProperties;
+import android.text.TextUtils;
import android.util.Log;
import java.util.List;
@@ -59,6 +61,10 @@
final SearchDialog mSearchDialog;
ISearchManagerCallback mCallback = null;
+ private final boolean mDisabledOnBoot;
+
+ private static final String DISABLE_SEARCH_PROPERTY = "dev.disablesearchdialog";
+
/**
* Initializes the Search Manager service in the provided system context.
* Only one instance of this object should be created!
@@ -86,6 +92,9 @@
// After startup settles down, preload the searchables list,
// which will reduce the delay when the search UI is invoked.
mHandler.post(mRunUpdateSearchable);
+
+ // allows disabling of search dialog for stress testing runs
+ mDisabledOnBoot = !TextUtils.isEmpty(SystemProperties.get(DISABLE_SEARCH_PROPERTY));
}
/**
@@ -207,6 +216,13 @@
boolean globalSearch,
ISearchManagerCallback searchManagerCallback) {
if (DBG) debug("performStartSearch()");
+
+ if (mDisabledOnBoot) {
+ Log.d(TAG, "ignoring start search request because " + DISABLE_SEARCH_PROPERTY
+ + " system property is set.");
+ return;
+ }
+
mSearchDialog.show(initialQuery, selectInitialQuery, launchActivity, appSearchData,
globalSearch);
if (searchManagerCallback != null) {
diff --git a/core/java/android/text/format/Formatter.java b/core/java/android/text/format/Formatter.java
index 1b30aa0..367b26c 100644
--- a/core/java/android/text/format/Formatter.java
+++ b/core/java/android/text/format/Formatter.java
@@ -59,9 +59,15 @@
result = result / 1024;
}
if (result < 100) {
- return String.format("%.2f%s", result, context.getText(suffix).toString());
+ String value = String.format("%.2f", result);
+ return context.getResources().
+ getString(com.android.internal.R.string.fileSizeSuffix,
+ value, context.getString(suffix));
}
- return String.format("%.0f%s", result, context.getText(suffix).toString());
+ String value = String.format("%.0f", result);
+ return context.getResources().
+ getString(com.android.internal.R.string.fileSizeSuffix,
+ value, context.getString(suffix));
}
/**
diff --git a/core/java/android/webkit/JWebCoreJavaBridge.java b/core/java/android/webkit/JWebCoreJavaBridge.java
index 2a84683..7739300 100644
--- a/core/java/android/webkit/JWebCoreJavaBridge.java
+++ b/core/java/android/webkit/JWebCoreJavaBridge.java
@@ -186,6 +186,21 @@
mHasInstantTimer = false;
}
+ private String[] getKeyStrengthList() {
+ // FIXME: fake the list for now
+ String[] list = new String[2];
+ list[0] = "1024";
+ list[1] = "512";
+ return list;
+ }
+
+ private String getSignedPublicKey(int index, String challenge, String url) {
+ // FIXME: do nothing for now
+ Log.w(LOGTAG, "getSignedPublicKey for " + index + " and challenge="
+ + challenge + " and url=" + url);
+ return "";
+ }
+
private native void nativeConstructor();
private native void nativeFinalize();
private native void sharedTimerFired();
diff --git a/core/java/com/android/internal/backup/LocalTransport.java b/core/java/com/android/internal/backup/LocalTransport.java
index 83182f2..f7b89f2 100644
--- a/core/java/com/android/internal/backup/LocalTransport.java
+++ b/core/java/com/android/internal/backup/LocalTransport.java
@@ -1,6 +1,7 @@
package com.android.internal.backup;
import android.backup.BackupDataInput;
+import android.backup.BackupDataOutput;
import android.backup.RestoreSet;
import android.content.Context;
import android.content.pm.PackageInfo;
@@ -147,7 +148,7 @@
return packages.toArray(result);
}
- public int getRestoreData(int token, PackageInfo packageInfo, ParcelFileDescriptor output)
+ public int getRestoreData(int token, PackageInfo packageInfo, ParcelFileDescriptor outFd)
throws android.os.RemoteException {
if (DEBUG) Log.v(TAG, "getting restore data " + token + " : " + packageInfo.packageName);
// we only support one hardcoded restore set
@@ -161,28 +162,21 @@
File[] blobs = packageDir.listFiles();
int err = 0;
if (blobs != null && blobs.length > 0) {
- for (File f : blobs) {
- err = copyFileToFD(f, output);
- if (err != 0) break;
+ BackupDataOutput out = new BackupDataOutput(mContext, outFd.getFileDescriptor());
+ try {
+ for (File f : blobs) {
+ FileInputStream in = new FileInputStream(f);
+ int size = (int) f.length();
+ byte[] buf = new byte[size];
+ in.read(buf);
+ out.writeEntityHeader(f.getName(), size);
+ out.writeEntityData(buf, size);
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "Unable to read backup records");
+ err = -1;
}
}
-
return err;
}
-
- private int copyFileToFD(File source, ParcelFileDescriptor dest) {
- try {
- FileInputStream in = new FileInputStream(source);
- FileOutputStream out = new FileOutputStream(dest.getFileDescriptor());
- byte[] buffer = new byte[4096];
- int bytesRead;
- while ((bytesRead = in.read(buffer)) >= 0) {
- out.write(buffer, 0, bytesRead);
- }
- } catch (IOException e) {
- // something went wrong; claim failure
- return -1;
- }
- return 0;
- }
}
diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp
index 925c9ff..945a325 100644
--- a/core/jni/android_util_Process.cpp
+++ b/core/jni/android_util_Process.cpp
@@ -50,8 +50,6 @@
#undef __KERNEL__
#endif
-#define ENABLE_CGROUP_DEBUG 0
-
/*
* List of cgroup names which map to ANDROID_TGROUP_ values in Thread.h
* and Process.java
@@ -205,39 +203,31 @@
sprintf(path, "/dev/cpuctl/%s/tasks",
(cgroup_names[grp] ? cgroup_names[grp] : ""));
- if ((fd = open(path, O_WRONLY)) < 0) {
- LOGE("Error opening '%s' (%s)", path, strerror(errno));
+ if ((fd = open(path, O_WRONLY)) < 0)
return -1;
- }
sprintf(text, "%d", pid);
if (write(fd, text, strlen(text)) < 0) {
- LOGE("Error writing to '%s' (%s)", path, strerror(errno));
close(fd);
return -1;
}
close(fd);
-
-#if ENABLE_CGROUP_DEBUG
- LOGD("Pid %d sucessfully added to '%s'", pid, path);
-#endif
return 0;
}
void android_os_Process_setThreadGroup(JNIEnv* env, jobject clazz, int pid, jint grp)
{
-#if ENABLE_CGROUP_DEBUG
- LOGD("android_os_Process_setThreadGroup(%d, %d)", pid, grp);
-#endif
-
if (grp > ANDROID_TGROUP_MAX || grp < 0) {
signalExceptionForGroupError(env, clazz, EINVAL);
return;
}
- if (add_pid_to_cgroup(pid, grp))
- signalExceptionForGroupError(env, clazz, errno);
+ if (add_pid_to_cgroup(pid, grp)) {
+ // If the thread exited on us, don't generate an exception
+ if (errno != ESRCH && errno != ENOENT)
+ signalExceptionForGroupError(env, clazz, errno);
+ }
}
void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jint grp)
@@ -247,10 +237,6 @@
char proc_path[255];
struct dirent *de;
-#if ENABLE_CGROUP_DEBUG
- LOGD("android_os_Process_setProcessGroup(%d, %d)", pid, grp);
-#endif
-
if (grp > ANDROID_TGROUP_MAX || grp < 0) {
signalExceptionForGroupError(env, clazz, EINVAL);
return;
@@ -258,17 +244,23 @@
sprintf(proc_path, "/proc/%d/task", pid);
if (!(d = opendir(proc_path))) {
- signalExceptionForGroupError(env, clazz, errno);
+ // If the process exited on us, don't generate an exception
+ if (errno != ENOENT)
+ signalExceptionForGroupError(env, clazz, errno);
return;
}
while ((de = readdir(d))) {
if (de->d_name[0] == '.')
continue;
+
if (add_pid_to_cgroup(atoi(de->d_name), grp)) {
- signalExceptionForGroupError(env, clazz, errno);
- closedir(d);
- return;
+ // If the thread exited on us, ignore it and keep going
+ if (errno != ESRCH && errno != ENOENT) {
+ signalExceptionForGroupError(env, clazz, errno);
+ closedir(d);
+ return;
+ }
}
}
closedir(d);
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 20cb34a..7542775 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -738,13 +738,6 @@
android:description="@string/permdesc_statusBar"
android:protectionLevel="signatureOrSystem" />
- <!-- Allows an application to force any currently running process to be
- in the foreground. -->
- <permission android:name="android.permission.SET_PROCESS_FOREGROUND"
- android:label="@string/permlab_setProcessForeground"
- android:description="@string/permdesc_setProcessForeground"
- android:protectionLevel="signature" />
-
<!-- Allows an application to force a BACK operation on whatever is the
top activity. -->
<permission android:name="android.permission.FORCE_BACK"
@@ -752,19 +745,6 @@
android:description="@string/permdesc_forceBack"
android:protectionLevel="signature" />
- <!-- Allows an application to publish system-level services. Such services
- can only be published from processes that never go away, so this is
- not something that any normal application can do. -->
- <permission android:name="android.permission.ADD_SYSTEM_SERVICE"
- android:label="@string/permlab_addSystemService"
- android:description="@string/permdesc_addSystemService"
- android:protectionLevel="signature" />
-
- <permission android:name="android.permission.FOTA_UPDATE"
- android:label="@string/permlab_fotaUpdate"
- android:description="@string/permdesc_fotaUpdate"
- android:protectionLevel="signature" />
-
<!-- Allows an application to update device statistics. Not for
use by third party apps. -->
<permission android:name="android.permission.UPDATE_DEVICE_STATS"
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 9cf12a5..7dbeaeb 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -161,14 +161,10 @@
<string name="permdesc_changeConfiguration">"Umožňuje aplikaci změnit aktuální konfiguraci, např. národní prostředí či obecnou velikost písma."</string>
<string name="permlab_restartPackages">"restartování ostatních aplikací"</string>
<string name="permdesc_restartPackages">"Umožňuje aplikaci vynutit restartování jiných aplikací."</string>
- <string name="permlab_setProcessForeground">"zamezení zastavení aplikace"</string>
- <string name="permdesc_setProcessForeground">"Umožňuje aplikaci spustit jakýkoli proces v popředí tak, že ho nelze ukončit. Běžné aplikace by toto nastavení nikdy neměly používat."</string>
<string name="permlab_forceBack">"vynucení zavření aplikace"</string>
<string name="permdesc_forceBack">"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">"načtení interního stavu systému"</string>
<string name="permdesc_dump">"Umožňuje aplikaci načíst interní stav systému. Škodlivé aplikace mohou načíst řádu soukromých a zabezpečených informací, které by nikdy neměly potřebovat."</string>
- <string name="permlab_addSystemService">"zveřejnění nízkoúrovňových služeb"</string>
- <string name="permdesc_addSystemService">"Umožňuje aplikaci zveřejnit své vlastní nízkoúrovňové systémové služby. Škodlivé aplikace mohou převzít kontrolu nad systémem a získat či poškodit jakákoli data v něm obsažená."</string>
<string name="permlab_runSetActivityWatcher">"sledování a řízení spouštění všech aplikací"</string>
<string name="permdesc_runSetActivityWatcher">"Umožňuje aplikaci sledovat a řídit spouštění činností systémem. Škodlivé aplikace mohou zcela ovládnout systém. Toto oprávnění je zapotřebí pouze pro účely vývoje, nikdy pro běžné použití telefonu."</string>
<string name="permlab_broadcastPackageRemoved">"odeslání vysílání o odstranění balíčku"</string>
@@ -181,8 +177,6 @@
<string name="permdesc_setProcessLimit">"Umožňuje aplikaci řídit maximální počet spuštěných procesů. Běžné aplikace toto nastavení nikdy nevyužívají."</string>
<string name="permlab_setAlwaysFinish">"zavření všech aplikací na pozadí"</string>
<string name="permdesc_setAlwaysFinish">"Umožňuje aplikaci ovládat, zda jsou činnosti vždy dokončeny po přesunutí do pozadí. Běžné aplikace toto nastavení nikdy nevyužívají."</string>
- <string name="permlab_fotaUpdate">"automatická instalace aktualizací systému"</string>
- <string name="permdesc_fotaUpdate">"Umožňuje aplikaci přijímat oznámení o čekajících aktualizacích systému a spouštět jejich instalaci. Škodlivé aplikace mohou díky tomuto nastavení poškodit systém pomocí neoprávněných aktualizací nebo celkově narušovat proces aktualizace."</string>
<string name="permlab_batteryStats">"změna statistických údajů o baterii"</string>
<string name="permdesc_batteryStats">"Umožňuje změnu shromážděných statistických údajů o baterii. Není určeno pro běžné aplikace."</string>
<string name="permlab_internalSystemWindow">"zobrazení nepovolených oken"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 4a12ef9..dfb4549 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -161,14 +161,10 @@
<string name="permdesc_changeConfiguration">"Ermöglicht einer Anwendung, die aktuelle Konfiguration zu ändern, etwa das Gebietsschema oder die Schriftgröße."</string>
<string name="permlab_restartPackages">"Andere Anwendungen neu starten"</string>
<string name="permdesc_restartPackages">"Ermöglicht einer Anwendung, den Neustart anderer Anwendungen zu erzwingen."</string>
- <string name="permlab_setProcessForeground">"Beenden nicht zulassen"</string>
- <string name="permdesc_setProcessForeground">"Ermöglicht einer Anwendung, beliebige Prozesse im Vordergrund auszuführen, damit diese nicht beendet werden können. Sollte nicht für normale Anwendungen benötigt werden."</string>
<string name="permlab_forceBack">"Schließen von Anwendung erzwingen"</string>
<string name="permdesc_forceBack">"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">"Systeminternen Status abrufen"</string>
<string name="permdesc_dump">"Ermöglicht einer Anwendung, den internen Status des Systems abzurufen. Schädliche Anwendungen rufen hierbei möglicherweise eine Vielzahl an privaten und geschützten Daten ab, die Sie in der Regel nicht benötigen würden."</string>
- <string name="permlab_addSystemService">"systemnahe Dienste veröffentlichen"</string>
- <string name="permdesc_addSystemService">"Ermöglicht der Anwendung, ihre eigenen systemnahen Dienste anzubieten. Schädliche Anwendungen könnten in das System eindringen und darin befindliche Daten stehlen oder manipulieren."</string>
<string name="permlab_runSetActivityWatcher">"Start von Anwendungen überwachen und steuern"</string>
<string name="permdesc_runSetActivityWatcher">"Ermöglicht der Anwendung, den Start von Systemaktivitäten zu überwachen und zu steuern. Schädliche Anwendungen können so das gesamte System beeinträchtigen. Diese Berechtigung wird nur zu Entwicklungszwecken und nie für die normale Telefonnutzung benötigt."</string>
<string name="permlab_broadcastPackageRemoved">"Broadcast ohne Paket senden"</string>
@@ -181,8 +177,6 @@
<string name="permdesc_setProcessLimit">"Ermöglicht einer Anwendung, die maximale Anzahl an laufenden Prozessen zu steuern. Wird nicht für normale Anwendungen benötigt."</string>
<string name="permlab_setAlwaysFinish">"alle Anwendungen im Hintergrund schließen"</string>
<string name="permdesc_setAlwaysFinish">"Überlässt einer Anwendung die Entscheidung, ob Aktivitäten beendet werden, sobald Sie in den Hintergrund rücken. Wird nicht für normale Anwendungen benötigt."</string>
- <string name="permlab_fotaUpdate">"System-Updates automatisch installieren"</string>
- <string name="permdesc_fotaUpdate">"Ermöglicht einer Anwendung, Benachrichtigungen zu ausstehenden System-Updates zu erhalten und deren Installation einzuleiten. Schädliche Anwendungen können so das System durch nicht autorisierte Updates beschädigen oder in den Update-Prozess eingreifen."</string>
<string name="permlab_batteryStats">"Akku-Daten ändern"</string>
<string name="permdesc_batteryStats">"Ermöglicht die Änderung von gesammelten Akku-Daten. Nicht für normale Anwendungen vorgesehen."</string>
<string name="permlab_internalSystemWindow">"nicht autorisierte Fenster anzeigen"</string>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index a1dd49b..3de378b 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -314,10 +314,6 @@
<skip />
<!-- no translation found for permdesc_setAlwaysFinish (2437195869854312148) -->
<skip />
- <!-- no translation found for permlab_fotaUpdate (1813039882829307079) -->
- <skip />
- <!-- no translation found for permdesc_fotaUpdate (2544137712607584763) -->
- <skip />
<!-- no translation found for permlab_batteryStats (1598947993704535568) -->
<skip />
<!-- no translation found for permdesc_batteryStats (6247598531831307989) -->
diff --git a/core/res/res/values-en-rSG/strings.xml b/core/res/res/values-en-rSG/strings.xml
index ef1cb5b..2ec6b0b 100644
--- a/core/res/res/values-en-rSG/strings.xml
+++ b/core/res/res/values-en-rSG/strings.xml
@@ -314,10 +314,6 @@
<skip />
<!-- no translation found for permdesc_setAlwaysFinish (2437195869854312148) -->
<skip />
- <!-- no translation found for permlab_fotaUpdate (1813039882829307079) -->
- <skip />
- <!-- no translation found for permdesc_fotaUpdate (2544137712607584763) -->
- <skip />
<!-- no translation found for permlab_batteryStats (1598947993704535568) -->
<skip />
<!-- no translation found for permdesc_batteryStats (6247598531831307989) -->
diff --git a/core/res/res/values-en-rUS/strings.xml b/core/res/res/values-en-rUS/strings.xml
index b9df983..05f30fc 100644
--- a/core/res/res/values-en-rUS/strings.xml
+++ b/core/res/res/values-en-rUS/strings.xml
@@ -314,10 +314,6 @@
<skip />
<!-- no translation found for permdesc_setAlwaysFinish (2437195869854312148) -->
<skip />
- <!-- no translation found for permlab_fotaUpdate (1813039882829307079) -->
- <skip />
- <!-- no translation found for permdesc_fotaUpdate (2544137712607584763) -->
- <skip />
<!-- no translation found for permlab_batteryStats (1598947993704535568) -->
<skip />
<!-- no translation found for permdesc_batteryStats (6247598531831307989) -->
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 9134811..84435aa 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -178,14 +178,10 @@
<string name="permdesc_changeConfiguration">"Admite una aplicación para cambiar la configuración actual, como el tamaño de fuente local o general."</string>
<string name="permlab_restartPackages">"reiniciar otras aplicaciones"</string>
<string name="permdesc_restartPackages">"Admite una aplicación que reinicia otras aplicaciones por la fuerza."</string>
- <string name="permlab_setProcessForeground">"impedir la detención"</string>
- <string name="permdesc_setProcessForeground">"Admite una aplicación que ejecuta cualquier tipo de proceso en primer plano, de manera que no se pueda suprimir. Se debe evitar utilizarlo en aplicaciones normales."</string>
<string name="permlab_forceBack">"provocar que la aplicación se acerque"</string>
<string name="permdesc_forceBack">"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">"recuperar el estado interno del sistema"</string>
<string name="permdesc_dump">"Admite que la aplicación recupere el estado interno del sistema. Las aplicaciones maliciosas pueden recuperar una gran variedad de información privada y segura que normalmente nunca necesitaría."</string>
- <string name="permlab_addSystemService">"publicar servicios de bajo nivel"</string>
- <string name="permdesc_addSystemService">"Admite que la aplicación publique sus propios servicios del sistema de bajo nivel. Las aplicaciones maliciosas pueden apropiarse del sistema y robar o corromper cualquiera de sus datos."</string>
<string name="permlab_runSetActivityWatcher">"verificar y controlar todos los lanzamientos de actividades"</string>
<string name="permdesc_runSetActivityWatcher">"Admite una aplicación que verifica y controla el lanzamiento de actividades por parte del sistema. Las aplicaciones maliciosas pueden comprometer totalmente al sistema. Este permiso sólo es necesario para el desarrollo, nunca para el uso normal del teléfono."</string>
<string name="permlab_broadcastPackageRemoved">"enviar emisión de paquete eliminado"</string>
@@ -198,8 +194,6 @@
<string name="permdesc_setProcessLimit">"Admite una aplicación que controla la cantidad máxima de procesos que se ejecutarán. No se utiliza nunca en aplicaciones normales."</string>
<string name="permlab_setAlwaysFinish">"cerrar todas las aplicaciones del fondo"</string>
<string name="permdesc_setAlwaysFinish">"Admite una aplicación que controla si las actividades siempre finalizan cuando van al fondo. No se utiliza nunca en aplicaciones normales."</string>
- <string name="permlab_fotaUpdate">"instalar automáticamente las actualizaciones del sistema"</string>
- <string name="permdesc_fotaUpdate">"Admite una aplicación que recibe notificaciones sobre las actualizaciones pendientes del sistema y activa su instalación. Las aplicaciones maliciosas pueden utilizarlo para corromper el sistema con actualizaciones no autorizadas o, en general, para interferir en el proceso de actualización."</string>
<string name="permlab_batteryStats">"modificar la estadística de la batería"</string>
<string name="permdesc_batteryStats">"Admite la modificación de estadísticas recopiladas sobre la batería. Las aplicaciones normales no deben utilizarlo."</string>
<string name="permlab_internalSystemWindow">"mostrar ventanas no autorizadas"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index d1d835b..920ac3e 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -161,14 +161,10 @@
<string name="permdesc_changeConfiguration">"Permite que una aplicación cambie la configuración actual como, por ejemplo, la configuración local o el tamaño de fuente general."</string>
<string name="permlab_restartPackages">"reiniciar otras aplicaciones"</string>
<string name="permdesc_restartPackages">"Permite que una aplicación reinicie de forma forzosa otras aplicaciones."</string>
- <string name="permlab_setProcessForeground">"impedir su interrupción"</string>
- <string name="permdesc_setProcessForeground">"Permite que una aplicación ejecute cualquier proceso en segundo plano, de forma que no se pueda interrumpir. No debería ser necesario nunca para las aplicaciones normales."</string>
<string name="permlab_forceBack">"forzar el cierre de la aplicación"</string>
<string name="permdesc_forceBack">"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">"recuperar estado interno del sistema"</string>
<string name="permdesc_dump">"Permite que la aplicación recupere el estado interno del sistema. Las aplicaciones malintencionadas pueden recuperar una amplia variedad de información protegida y privada que normalmente no deberían necesitar."</string>
- <string name="permlab_addSystemService">"publicar servicios de nivel inferior"</string>
- <string name="permdesc_addSystemService">"Permite que la aplicación publique sus propios servicios de sistema de nivel inferior. Las aplicaciones malintencionadas pueden hacerse con el control del sistema, y robar o dañar los datos contenidos en él."</string>
<string name="permlab_runSetActivityWatcher">"supervisar y controlar la ejecución de todas las aplicaciones"</string>
<string name="permdesc_runSetActivityWatcher">"Permite que una aplicación supervise y controle la ejecución de las actividades por parte del sistema. Las aplicaciones malintencionadas pueden vulnerar la seguridad del sistema. Este permiso sólo es necesario para tareas de desarrollo, nunca para el uso habitual del teléfono."</string>
<string name="permlab_broadcastPackageRemoved">"enviar emisión eliminada de paquete"</string>
@@ -181,8 +177,6 @@
<string name="permdesc_setProcessLimit">"Permite que una aplicación controle el número máximo de procesos que se ejecutarán. No es necesario nunca para las aplicaciones normales."</string>
<string name="permlab_setAlwaysFinish">"hacer que se cierren todas las aplicaciones en segundo plano"</string>
<string name="permdesc_setAlwaysFinish">"Permite que una aplicación controle si las actividades finalizan siempre en cuanto pasan a segundo plano. No es necesario nunca para las aplicaciones normales."</string>
- <string name="permlab_fotaUpdate">"instalar actualizaciones del sistema de forma automática"</string>
- <string name="permdesc_fotaUpdate">"Permite que una aplicación reciba notificaciones sobre actualizaciones pendientes del sistema e inicie su instalación. Las aplicaciones malintencionadas pueden utilizar este permiso para provocar daños en el sistema con actualizaciones no autorizadas o interferir de forma general en el proceso de actualización."</string>
<string name="permlab_batteryStats">"modificar estadísticas de la batería"</string>
<string name="permdesc_batteryStats">"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_internalSystemWindow">"mostrar ventanas no autorizadas"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index e85b14c..ce650c1 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -21,6 +21,7 @@
<string name="gigabyteShort">"Go"</string>
<string name="terabyteShort">"To"</string>
<string name="petabyteShort">"Po"</string>
+ <string name="fileSizeSuffix"><xliff:g id="number" example="123">%1$s</xliff:g> <xliff:g id="unit" example="KB">%2$s</xliff:g></string>
<string name="untitled">"<sans titre>"</string>
<string name="ellipsis">"…"</string>
<string name="emptyPhoneNumber">"(Aucun numéro de téléphone)"</string>
@@ -161,14 +162,10 @@
<string name="permdesc_changeConfiguration">"Permet à une application de modifier la configuration actuelle (par ex. : la taille de la police générale ou des paramètres régionaux)."</string>
<string name="permlab_restartPackages">"Démarrage d\'autres applications"</string>
<string name="permdesc_restartPackages">"Permet à une application de forcer le lancement d\'autres applications."</string>
- <string name="permlab_setProcessForeground">"Non-possibilité d\'interruption"</string>
- <string name="permdesc_setProcessForeground">"Permet à une application d\'exécuter tout processus au premier plan afin qu\'il ne puisse pas être interrompu. Les applications normales ne devraient jamais nécessiter cette fonctionnalité."</string>
<string name="permlab_forceBack">"Fermeture forcée de l\'application"</string>
<string name="permdesc_forceBack">"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">"Vérification de l\'état interne du système"</string>
<string name="permdesc_dump">"Permet à l\'application de récupérer l\'état interne du système. Des applications malveillantes peuvent obtenir de nombreuses informations personnelles et sécurisées auxquelles elles ne devraient pas avoir accès."</string>
- <string name="permlab_addSystemService">"Éditer des services à faible niveau"</string>
- <string name="permdesc_addSystemService">"Permet à l\'application de publier ses propres services de système de niveau inférieur. Des applications malveillantes peuvent prendre le contrôle du système et subtiliser ou endommager ses données."</string>
<string name="permlab_runSetActivityWatcher">"Contrôle du lancement des applications"</string>
<string name="permdesc_runSetActivityWatcher">"Permet à une application de suivre et de contrôler la façon dont le système lance des activités. Des applications malveillantes peuvent entièrement déstabiliser le système. Cette autorisation est uniquement nécessaire au développement et non pour l\'utilisation normale du téléphone."</string>
<string name="permlab_broadcastPackageRemoved">"Envoyer une diffusion sans paquet"</string>
@@ -181,8 +178,6 @@
<string name="permdesc_setProcessLimit">"Permet à une application de contrôler le nombre de processus maximal exécutés en même temps. Les applications normales n\'ont jamais recours à cette fonctionnalité."</string>
<string name="permlab_setAlwaysFinish">"Fermeture de toutes les applications en tâche de fond"</string>
<string name="permdesc_setAlwaysFinish">"Permet à une application de vérifier si des activités sont systématiquement interrompues lorsqu\'elles sont placées en tâche de fond. Cette fonctionnalité n\'est jamais utilisée par les applications normales."</string>
- <string name="permlab_fotaUpdate">"Installation des mises à jour du système"</string>
- <string name="permdesc_fotaUpdate">"Permet à une application de recevoir des notifications sur des mises à jour système en cours et de lancer leur installation. Des applications malveillantes peuvent utiliser cette fonctionnalité pour endommager le système avec des mises à jour non autorisées ou interférer avec le processus de mise à jour."</string>
<string name="permlab_batteryStats">"Modification des statistiques de la batterie"</string>
<string name="permdesc_batteryStats">"Autoriser la modification des statistiques de la batterie. Les applications normales n\'utilisent pas cette fonctionnalité."</string>
<string name="permlab_internalSystemWindow">"Affichage de fenêtres non autorisées"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index b5cbd98..5bfbc49 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -161,14 +161,10 @@
<string name="permdesc_changeConfiguration">"Consente a un\'applicazione di modificare la configurazione corrente, come le dimensioni dei caratteri locali o complessive."</string>
<string name="permlab_restartPackages">"riavvio altre applicazioni"</string>
<string name="permdesc_restartPackages">"Consente a un\'applicazione di riavviare forzatamente altre applicazioni."</string>
- <string name="permlab_setProcessForeground">"impedire l\'interruzione"</string>
- <string name="permdesc_setProcessForeground">"Consente a un\'applicazione di eseguire i processi in primo piano in modo che non possano essere interrotti. Non dovrebbe essere mai necessario per le normali applicazioni."</string>
<string name="permlab_forceBack">"chiusura forzata dell\'applicazione"</string>
<string name="permdesc_forceBack">"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">"recupero stato interno del sistema"</string>
<string name="permdesc_dump">"Consente all\'applicazione di recuperare lo stato interno del sistema. Le applicazioni dannose potrebbero recuperare molte informazioni riservate e protette di cui non dovrebbero avere mai bisogno."</string>
- <string name="permlab_addSystemService">"pubblicaz. servizi di basso livello"</string>
- <string name="permdesc_addSystemService">"Consente a un\'applicazione di pubblicare i suoi servizi di sistema di basso livello. Le applicazioni dannose potrebbero assumere il controllo del sistema e impossessarsi di dati o danneggiarli."</string>
<string name="permlab_runSetActivityWatcher">"monitoraggio e controllo avvio applicazioni"</string>
<string name="permdesc_runSetActivityWatcher">"Consente a un\'applicazione di monitorare e controllare la modalità di avvio delle attività nel sistema. Le applicazioni dannose potrebbero compromettere totalmente il sistema. Questa autorizzazione è necessaria soltanto per lo sviluppo, mai per il normale utilizzo del telefono."</string>
<string name="permlab_broadcastPackageRemoved">"invio broadcast rimossi dal pacchetto"</string>
@@ -181,8 +177,6 @@
<string name="permdesc_setProcessLimit">"Consente a un\'applicazione di stabilire il numero massimo di processi in esecuzione. Mai necessario per le normali applicazioni."</string>
<string name="permlab_setAlwaysFinish">"chiusura applicazioni in background"</string>
<string name="permdesc_setAlwaysFinish">"Consente a un\'applicazione di controllare se le attività sono sempre completate quando vengono messe in secondo piano. Mai necessario per le normali applicazioni."</string>
- <string name="permlab_fotaUpdate">"installazione autom. aggiornamenti di sistema"</string>
- <string name="permdesc_fotaUpdate">"Consente a un\'applicazione di ricevere notifiche sugli aggiornamenti del sistema in sospeso e di attivarne l\'installazione. Le applicazioni dannose possono sfruttare questa possibilità per danneggiare il sistema con aggiornamenti non autorizzati, o interferire con il processo di aggiornamento."</string>
<string name="permlab_batteryStats">"modifica statistiche batteria"</string>
<string name="permdesc_batteryStats">"Consente la modifica delle statistiche sulla batteria raccolte. Da non usare per normali applicazioni."</string>
<string name="permlab_internalSystemWindow">"visualizzazione finestre non autorizzate"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 0f73bb3..a2e3e51 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -161,14 +161,10 @@
<string name="permdesc_changeConfiguration">"地域/言語やフォントのサイズなど、現在の設定の変更をアプリケーションに許可します。"</string>
<string name="permlab_restartPackages">"他のアプリケーションの再起動"</string>
<string name="permdesc_restartPackages">"他のアプリケーションの強制的な再起動をアプリケーションに許可します。"</string>
- <string name="permlab_setProcessForeground">"停止の阻止"</string>
- <string name="permdesc_setProcessForeground">"フォアグラウンドでプロセスを実行して、強制終了できないようにすることをアプリケーションに許可します。通常のアプリケーションではまったく必要ありません。"</string>
<string name="permlab_forceBack">"アプリケーションの強制終了"</string>
<string name="permdesc_forceBack">"フォアグラウンドで実行されている操作を強制終了して戻ることをアプリケーションに許可します。通常のアプリケーションではまったく必要ありません。"</string>
<string name="permlab_dump">"システムの内部状態の取得"</string>
<string name="permdesc_dump">"システムの内部状態の取得をアプリケーションに許可します。悪意のあるアプリケーションが、通常は必要としない広範囲にわたる非公開の機密情報を取得する恐れがあります。"</string>
- <string name="permlab_addSystemService">"低レベルサービスの公開"</string>
- <string name="permdesc_addSystemService">"独自の低レベルのシステムサービスを公開することをアプリケーションに許可します。悪意のあるアプリケーションがシステムを乗っ取って、データの盗用や破壊をする恐れがあります。"</string>
<string name="permlab_runSetActivityWatcher">"起動中のすべてのアプリケーションの監視と制御"</string>
<string name="permdesc_runSetActivityWatcher">"システムが起動する操作の監視と制御をアプリケーションに許可します。悪意のあるアプリケーションがシステムを完全に破壊する恐れがあります。この許可は開発にのみ必要で、携帯電話の通常の使用にはまったく必要ありません。"</string>
<string name="permlab_broadcastPackageRemoved">"パッケージ削除ブロードキャストの送信"</string>
@@ -181,8 +177,6 @@
<string name="permdesc_setProcessLimit">"実行するプロセス数の上限の制御をアプリケーションに許可します。通常のアプリケーションにはまったく必要ありません。"</string>
<string name="permlab_setAlwaysFinish">"バックグラウンドアプリケーションをすべて終了する"</string>
<string name="permdesc_setAlwaysFinish">"バックグラウンドになり次第必ず操作を終了させるかどうかの制御をアプリケーションに許可します。通常のアプリケーションではまったく必要ありません。"</string>
- <string name="permlab_fotaUpdate">"システムアップデートの自動インストール"</string>
- <string name="permdesc_fotaUpdate">"保留中のシステムアップデートに関する通知の受信とインストールの開始をアプリケーションに許可します。悪意のあるアプリケーションが許可なく更新を行ってシステムを破壊したり、更新処理を妨害する恐れがあります。"</string>
<string name="permlab_batteryStats">"電池統計情報の変国"</string>
<string name="permdesc_batteryStats">"収集した電池統計情報の変更を許可します。通常のアプリケーションでは使用しません。"</string>
<string name="permlab_internalSystemWindow">"未許可のウィンドウの表示"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 75cbd62..e2c6e57 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -161,14 +161,10 @@
<string name="permdesc_changeConfiguration">"응용프로그램이 로케일 또는 전체 글꼴 크기 같은 현재 구성을 변경할 수 있습니다."</string>
<string name="permlab_restartPackages">"다른 응용프로그램 다시 시작"</string>
<string name="permdesc_restartPackages">"응용프로그램이 다른 응용프로그램을 강제로 다시 시작할 수 있습니다."</string>
- <string name="permlab_setProcessForeground">"중지되지 않도록 하기"</string>
- <string name="permdesc_setProcessForeground">"응용프로그램이 프로세스를 포그라운드에서 실행되도록 하여 프로세스를 중지할 수 있습니다. 일반 응용프로그램에는 필요하지 않습니다."</string>
<string name="permlab_forceBack">"강제로 응용프로그램 닫기"</string>
<string name="permdesc_forceBack">"응용프로그램이 포그라운드에 있는 활동을 강제로 닫을 수 있습니다. 일반 응용프로그램에는 필요하지 않습니다."</string>
<string name="permlab_dump">"시스템 내부 상태 검색"</string>
<string name="permdesc_dump">"응용프로그램이 시스템의 내부 상태를 검색할 수 있습니다. 악성 응용프로그램은 이 기능을 이용하여 일반적으로 필요하지 않은 다양한 개인 정보와 보안 정보를 검색할 수 있습니다."</string>
- <string name="permlab_addSystemService">"하위 수준 서비스 게시"</string>
- <string name="permdesc_addSystemService">"응용프로그램이 자체 하위 수준 시스템 서비스를 게시할 수 있습니다. 악성 응용프로그램은 이 기능을 이용하여 시스템을 하이재킹하거나 시스템의 데이터를 도용 또는 손상시킬 수 있습니다."</string>
<string name="permlab_runSetActivityWatcher">"실행 중인 모든 응용프로그램 모니터링 및 제어"</string>
<string name="permdesc_runSetActivityWatcher">"응용프로그램이 시스템에서 활동이 시작되는 방식을 모니터링하고 제어할 수 있습니다. 악성 응용프로그램은 이 기능을 이용하여 시스템을 완전히 손상시킬 수 있습니다. 이 권한은 개발 과정에만 필요하며 일반 전화기 사용 시에는 필요하지 않습니다."</string>
<string name="permlab_broadcastPackageRemoved">"패키지 제거 브로드캐스트 보내기"</string>
@@ -181,8 +177,6 @@
<string name="permdesc_setProcessLimit">"응용프로그램이 실행할 최대 프로세스 수를 제어할 수 있습니다. 일반 응용프로그램에는 필요하지 않습니다."</string>
<string name="permlab_setAlwaysFinish">"모든 백그라운드 응용프로그램이 닫히도록 하기"</string>
<string name="permdesc_setAlwaysFinish">"응용프로그램이 백그라운드로 이동한 활동을 항상 바로 마칠지 여부를 제어할 수 있습니다. 일반 응용프로그램에는 필요하지 않습니다."</string>
- <string name="permlab_fotaUpdate">"시스템 업데이트 자동으로 설치"</string>
- <string name="permdesc_fotaUpdate">"응용프로그램이 대기 중인 시스템 업데이트에 대한 알림을 받고 설치를 트리거할 수 있습니다. 악성 응용프로그램은 이 기능을 이용하여 인증되지 않은 업데이트로 시스템을 손상시키거나 업데이트 절차를 방해할 수 있습니다."</string>
<string name="permlab_batteryStats">"배터리 통계 수정"</string>
<string name="permdesc_batteryStats">"수집된 배터리 통계를 수정할 수 있습니다. 일반 응용프로그램에서는 사용하지 않습니다."</string>
<string name="permlab_internalSystemWindow">"인증되지 않은 창 표시"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 3faf00a..33d0159 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -166,14 +166,10 @@
<string name="permdesc_changeConfiguration">"Tillater applikasjonen å endre gjeldende innstillinger, slik som språk eller skriftstørrelse."</string>
<string name="permlab_restartPackages">"omstarte andre applikasjoner"</string>
<string name="permdesc_restartPackages">"Lar applikasjonen tvinge andre applikasjoner til å starte på nytt."</string>
- <string name="permlab_setProcessForeground">"unngå å bli stoppet"</string>
- <string name="permdesc_setProcessForeground">"Lar applikasjonen sette en vilkårlig prosess i forgrunnen, så den ikke kan bli drept. Vanlige applikasjoner bør aldri trenge dette."</string>
<string name="permlab_forceBack">"tvinge applikasjoner til å lukkes"</string>
<string name="permdesc_forceBack">"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">"hente intern systemtilstand"</string>
<string name="permdesc_dump">"Lar applikasjonen hente intern tilstand fra systemet. Onsdinnede applikasjoner kan hente et bredt spekter av privat og sikker informasjon som de vanligvis aldri burde ha behov for."</string>
- <string name="permlab_addSystemService">"publisere lavnivåtjenester"</string>
- <string name="permdesc_addSystemService">"Lar applikasjonen publisere sine egne lavnivås systemtjenester. Ondsinnede applikasjoner kan kapre systemet, og stjele eller ødelegge alle data på det."</string>
<string name="permlab_runSetActivityWatcher">"overvåke og kontrollere all applikasjonsoppstart"</string>
<string name="permdesc_runSetActivityWatcher">"Lar applikasjonen overvåke og kontrollere hvordan systemet starter applikasjoner. Ondsinnede applikasjoner kan ta over systemet helt. Denne rettigheten behøves bare for utvikling, aldri for vanlig bruk av telefonen."</string>
<string name="permlab_broadcastPackageRemoved">"kringkaste melding om fjernet pakke"</string>
@@ -186,8 +182,6 @@
<string name="permdesc_setProcessLimit">"Lar applikasjonen kontrollere maksimalt antall kjørende prosesser. Behøves aldri for vanlige applikasjoner."</string>
<string name="permlab_setAlwaysFinish">"få alle bakgrunnsapplikasjoner til å lukkes"</string>
<string name="permdesc_setAlwaysFinish">"Lar applikasjonen kontrollere om aktiviteter alltid avsluttes når de sendes til bakgrunnen. Behøves aldri for vanlige applikasjoner."</string>
- <string name="permlab_fotaUpdate">"installere systemoppdateringer automatisk"</string>
- <string name="permdesc_fotaUpdate">"Lar applikasjonen motta meldinger om pågående systemoppdateringer, og starte installeringen av dem. Ondsinnede applikasjoner kan bruke dette for å skade systemet med uautoriserte oppdateringer, eller generelt forstyrre oppdateringsprosessen."</string>
<string name="permlab_batteryStats">"endre batteristatistikk"</string>
<string name="permdesc_batteryStats">"Lar applikasjonen endre på innsamlet batteristatistikk. Ikke ment for vanlige applikasjoner."</string>
<string name="permlab_internalSystemWindow">"vis uautoriserte vinduer"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 925dc5b..a418d72 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -161,14 +161,10 @@
<string name="permdesc_changeConfiguration">"Hiermee kan een toepassing de huidige configuratie, zoals de landinstelling of de algemene lettergrootte, wijzigen."</string>
<string name="permlab_restartPackages">"andere toepassingen opnieuw starten"</string>
<string name="permdesc_restartPackages">"Hiermee kan een toepassing andere toepassingen opnieuw starten."</string>
- <string name="permlab_setProcessForeground">"stoppen voorkomen"</string>
- <string name="permdesc_setProcessForeground">"Hiermee kan een toepassing ervoor zorgen dat elk willekeurig proces op de voorgrond wordt uitgevoerd en dus niet kan worden afgesloten. Nooit vereist voor normale toepassingen."</string>
<string name="permlab_forceBack">"toepassing nu sluiten"</string>
<string name="permdesc_forceBack">"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">"interne systeemstatus ophalen"</string>
<string name="permdesc_dump">"Hiermee kan een toepassing de interne status van het systeem ophalen. Schadelijke toepassingen kunnen privé- of veiligheidsgegevens ophalen die ze normaal niet nodig hebben."</string>
- <string name="permlab_addSystemService">"services op laag niveau publiceren"</string>
- <string name="permdesc_addSystemService">"Hiermee kunnen toepassingen hun eigen systeemservices op laag niveau publiceren. Schadelijke toepassingen kunnen het systeem mogelijk kapen en willekeurige gegevens van het systeem stelen of beschadigen."</string>
<string name="permlab_runSetActivityWatcher">"alle startende toepassingen bijhouden en beheren"</string>
<string name="permdesc_runSetActivityWatcher">"Hiermee kan een toepassing de manier waarop het systeem activiteiten start, bijhouden en beheren. Schadelijke toepassingen kunnen het systeem volledig in gevaar brengen. Deze machtiging is alleen voor ontwikkeling vereist, nooit voor normaal telefoongebruik."</string>
<string name="permlab_broadcastPackageRemoved">"melding verzenden dat pakket is verwijderd"</string>
@@ -181,8 +177,6 @@
<string name="permdesc_setProcessLimit">"Hiermee kan een toepassing het maximum aantal processen bepalen dat wordt uitgevoerd. Nooit vereist voor normale toepassingen."</string>
<string name="permlab_setAlwaysFinish">"alle achtergrondtoepassingen sluiten"</string>
<string name="permdesc_setAlwaysFinish">"Hiermee kan een toepassing bepalen of activiteiten altijd worden afgesloten zodra deze naar de achtergrond gaan. Nooit nodig voor normale toepassingen."</string>
- <string name="permlab_fotaUpdate">"systeemupdates automatisch installeren"</string>
- <string name="permdesc_fotaUpdate">"Hiermee ontvangt een toepassing meldingen over beschikbare systeemupdates en kan hun installatie starten. Schadelijke toepassingen kunnen hiervan gebruik maken om het systeem met ongeautoriseerde updates te beschadigen of het updateproces in het algemeen te verstoren."</string>
<string name="permlab_batteryStats">"accustatistieken aanpassen"</string>
<string name="permdesc_batteryStats">"Hiermee kunnen verzamelde accustatistieken worden gewijzigd. Niet voor gebruik door normale toepassingen."</string>
<string name="permlab_internalSystemWindow">"niet-geautoriseerde vensters weergeven"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index c69e900..c6c9bd0 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -161,14 +161,10 @@
<string name="permdesc_changeConfiguration">"Pozwala aplikacji zmieniać bieżącą konfigurację, na przykład lokalny lub globalny rozmiar czcionki."</string>
<string name="permlab_restartPackages">"resetowanie innych aplikacji"</string>
<string name="permdesc_restartPackages">"Pozwala aplikacji na wymuszenie ponownego uruchomienia innych aplikacji."</string>
- <string name="permlab_setProcessForeground">"zapobieganie zatrzymaniu"</string>
- <string name="permdesc_setProcessForeground">"Pozwala aplikacji na uruchamianie dowolnego procesu na pierwszym planie tak, że nie można go wyłączyć. Nigdy nie powinno być potrzebne normalnym aplikacjom."</string>
<string name="permlab_forceBack">"wymuszanie zamknięcia aplikacji"</string>
<string name="permdesc_forceBack">"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">"pobieranie informacji o wewnętrznym stanie systemu"</string>
<string name="permdesc_dump">"Pozwala aplikacjom na pobieranie informacji o wewnętrznym stanie systemu. Szkodliwe aplikacje mogą pobrać szeroką gamę osobistych i zabezpieczonych informacji, które normalnie nie powinny im być nigdy potrzebne."</string>
- <string name="permlab_addSystemService">"publikowanie usług niskiego poziomu"</string>
- <string name="permdesc_addSystemService">"Pozwala aplikacji na publikowanie własnych usług systemowych niskiego poziomu. Szkodliwe aplikacje mogą przejąć kontrolę nad systemem oraz wykraść lub uszkodzić znajdujące się w nim dane."</string>
<string name="permlab_runSetActivityWatcher">"monitorowanie i kontrolowanie wszystkich uruchamianych aplikacji"</string>
<string name="permdesc_runSetActivityWatcher">"Pozwala aplikacji na monitorowanie i kontrolowanie sposobu, w jaki w systemie uruchamiane są różne działania. Szkodliwe aplikacje mogą całkowicie przejąć system. Te uprawnienia potrzebne są tylko programistom, nigdy w przypadku normalnego wykorzystywania telefonu."</string>
<string name="permlab_broadcastPackageRemoved">"wysyłanie transmisji informującej o usuniętym pakiecie"</string>
@@ -181,8 +177,6 @@
<string name="permdesc_setProcessLimit">"Pozwala aplikacji na kontrolowanie maksymalnej liczby uruchamianych procesów. Nigdy nie wykorzystywane przez normalne aplikacje."</string>
<string name="permlab_setAlwaysFinish">"zamykanie wszystkich aplikacji działających w tle"</string>
<string name="permdesc_setAlwaysFinish">"Pozwala aplikacji na kontrolowanie, czy czynności są zawsze kończone, kiedy zaczynają działać w tle. Nigdy nie jest potrzebne normalnym aplikacjom."</string>
- <string name="permlab_fotaUpdate">"automatyczne instalowanie aktualizacji systemu"</string>
- <string name="permdesc_fotaUpdate">"Pozwala aplikacji na otrzymywanie powiadomień o oczekujących aktualizacjach systemu i uruchamianie ich instalacji. Szkodliwe aplikacje mogą to wykorzystać do uszkodzenia systemu za pomocą nieuwierzytelnionych aktualizacji lub ogólnie wpłynąć na proces aktualizowania."</string>
<string name="permlab_batteryStats">"zmienianie statystyk dotyczących baterii"</string>
<string name="permdesc_batteryStats">"Pozwala na zmianę zebranych statystyk dotyczących baterii. Nie do wykorzystania przez normalne aplikacje."</string>
<string name="permlab_internalSystemWindow">"wyświetlanie nieuwierzytelnionych okien"</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index bcfcd52..c5c5bbb 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -218,14 +218,10 @@
<string name="permdesc_changeConfiguration">"Permite que um aplicativo mude a configuração atual, como a localidade ou o tamanho geral de fonte."</string>
<string name="permlab_restartPackages">"reiniciar outros aplicativos"</string>
<string name="permdesc_restartPackages">"Permite que um aplicativo reinicie outros aplicativos forçosamente."</string>
- <string name="permlab_setProcessForeground">"impedir a interrupção"</string>
- <string name="permdesc_setProcessForeground">"Permite que um aplicativo faça qualquer processo executar em primeiro plano, não podendo ser encerrado. Normalmente não é necessário para aplicativos normais."</string>
<string name="permlab_forceBack">"forçar fechamento do aplicativo"</string>
<string name="permdesc_forceBack">"Permite que um aplicativo force qualquer atividade que esteja em primeiro plano a fechar e voltar. Normalmente não é necessário para aplicativos normais."</string>
<string name="permlab_dump">"recuperar estado interno do sistema"</string>
<string name="permdesc_dump">"Permite que um aplicativo recupere o estado interno do sistema. Aplicativos maliciosos podem recuperar um ampla variedade de informações privadas e seguras, as quais não deveriam precisar normalmente."</string>
- <string name="permlab_addSystemService">"publicar serviços de nível inferior"</string>
- <string name="permdesc_addSystemService">"Permite que o aplicativo publique seus próprios serviços do sistema de nível inferior. Aplicativos maliciosos podem seqüestrar o sistema e roubar ou corromper quaisquer dados contidos nele."</string>
<!-- no translation found for permlab_shutdown (7185747824038909016) -->
<skip />
<!-- no translation found for permdesc_shutdown (7046500838746291775) -->
@@ -246,8 +242,6 @@
<string name="permdesc_setProcessLimit">"Permite que um aplicativo controle o número máximo de processos que serão executados. Nunca é necessário para aplicativos normais."</string>
<string name="permlab_setAlwaysFinish">"fazer todos os aplicativos em segundo plano fechar"</string>
<string name="permdesc_setAlwaysFinish">"Permite que um aplicativo controle se as atividades são sempre concluídas assim que vão para o segundo plano. Nunca é necessário para aplicativos normais."</string>
- <string name="permlab_fotaUpdate">"instalar automaticamente atualizações do sistema"</string>
- <string name="permdesc_fotaUpdate">"Permite que um aplicativo receba notificações sobre atualizações pendentes do sistema e dispare suas instalações. Aplicativos maliciosos podem usar isso para corromper o sistema com atualizações não autorizadas ou normalmente interferem com o processo de atualização."</string>
<string name="permlab_batteryStats">"Modificar as estatísticas da bateria"</string>
<string name="permdesc_batteryStats">"Permite a modificação das estatísticas coletadas sobre a bateria. Não deve ser usado em aplicativos normais."</string>
<!-- no translation found for permlab_backup (470013022865453920) -->
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 8b91e4b..048f6b1 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -161,14 +161,10 @@
<string name="permdesc_changeConfiguration">"Позволяет приложению изменять текущую конфигурацию, например локаль и общий размер шрифта."</string>
<string name="permlab_restartPackages">"перезапускать другие приложения"</string>
<string name="permdesc_restartPackages">"Разрешает приложению принудительно перезапускать другие приложения."</string>
- <string name="permlab_setProcessForeground">"предотвращать остановку"</string>
- <string name="permdesc_setProcessForeground">"Разрешает приложению запускать любые процессы на переднем плане так, что их нельзя прекратить. Не требуется обычным приложениям."</string>
<string name="permlab_forceBack">"принудительно закрывать приложения"</string>
<string name="permdesc_forceBack">"Позволяет приложению принудительно закрывать и переводить в фоновый режим действия, работающие на переднем плане. Не требуется обычным приложениям."</string>
<string name="permlab_dump">"получать внутреннее состояние системы"</string>
<string name="permdesc_dump">"Разрешает приложениям получать внутреннее состояние системы. Вредоносное ПО может получать множество личной и защищенной информации, которая обычно не была бы им доступна."</string>
- <string name="permlab_addSystemService">"публиковать службы низкого уровня"</string>
- <string name="permdesc_addSystemService">"Разрешает приложению публиковать собственные системные службы низкого уровня. Вредоносное ПО может взломать систему и украсть или повредить данные в ней."</string>
<string name="permlab_runSetActivityWatcher">"наблюдать и управлять запуском всех приложений"</string>
<string name="permdesc_runSetActivityWatcher">"Разрешает приложению следить и управлять тем, как система запускает действия. Вредоносное ПО может полностью нарушить работу системы. Это разрешение нужно только для разработки, но не при обычном использовании телефона."</string>
<string name="permlab_broadcastPackageRemoved">"отправлять оповещения об удалении пакетов"</string>
@@ -181,8 +177,6 @@
<string name="permdesc_setProcessLimit">"Позволяет приложению контролировать максимальное количество выполняемых процессов. Не требуется обычным приложениям."</string>
<string name="permlab_setAlwaysFinish">"закрывать все фоновые приложения"</string>
<string name="permdesc_setAlwaysFinish">"Разрешает приложению следить, чтобы действия всегда завершались после перехода в фоновый режим. Не требуется обычным приложениям."</string>
- <string name="permlab_fotaUpdate">"автоматически устанавливать системные обновления"</string>
- <string name="permdesc_fotaUpdate">"Разрешает приложению получать уведомления о предстоящих обновлениях системы и запускать их установку. Это дает вредоносному ПО возможность повредить систему неавторизованными обновлениями или помешать выполнению обновления."</string>
<string name="permlab_batteryStats">"изменять данные о батарее"</string>
<string name="permdesc_batteryStats">"Разрешает изменять данные о батарее. Не используется обычными приложениями."</string>
<string name="permlab_internalSystemWindow">"отображать неавторизованные окна"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index b4386d0..3be8aa0 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -166,14 +166,10 @@
<string name="permdesc_changeConfiguration">"允许应用程序更改当前配置,例如语言设置或整体的字体大小。"</string>
<string name="permlab_restartPackages">"重新启动其他应用程序"</string>
<string name="permdesc_restartPackages">"允许应用程序强制重新启动其他应用程序。"</string>
- <string name="permlab_setProcessForeground">"防止停止"</string>
- <string name="permdesc_setProcessForeground">"允许应用程序在前台运行任何进程,因此该进程不能被终止。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_forceBack">"强制应用程序关闭"</string>
<string name="permdesc_forceBack">"允许应用程序强制前台的任何活动关闭和重新开始。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_dump">"检索系统内部状态"</string>
<string name="permdesc_dump">"允许应用程序检索系统的内部状态。恶意应用程序可能会借此检索通常它们本不需要的各种私有和安全信息。"</string>
- <string name="permlab_addSystemService">"发布低级服务"</string>
- <string name="permdesc_addSystemService">"允许应用程序发布自己的低级系统服务。恶意应用程序可能会借此攻击系统,以及盗取或破坏系统中的任何数据。"</string>
<string name="permlab_runSetActivityWatcher">"监视和控制所有应用程序启动"</string>
<string name="permdesc_runSetActivityWatcher">"允许应用程序监视和控制系统启动活动的方式。恶意应用程序可能会借此彻底损坏系统。此权限仅在开发时才需要,普通的手机应用不需要。"</string>
<string name="permlab_broadcastPackageRemoved">"发送包删除的广播"</string>
@@ -186,8 +182,6 @@
<string name="permdesc_setProcessLimit">"允许应用程序控制运行的进程数上限。普通应用程序从不需要使用此权限。"</string>
<string name="permlab_setAlwaysFinish">"关闭所有后台应用程序"</string>
<string name="permdesc_setAlwaysFinish">"允许应用程序控制活动是否始终是一转至后台就完成。普通应用程序从不需要使用此权限。"</string>
- <string name="permlab_fotaUpdate">"自动安装系统更新"</string>
- <string name="permdesc_fotaUpdate">"允许应用程序接收有关未决系统更新的通知并安装这些更新。恶意应用程序可能会借此通过未经授权的更新破坏系统,通常情况下,它们会干扰更新过程。"</string>
<string name="permlab_batteryStats">"修改电池统计信息"</string>
<string name="permdesc_batteryStats">"允许修改收集的电池统计信息。普通应用程序不能使用此权限。"</string>
<string name="permlab_internalSystemWindow">"显示未授权的窗口"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 0d7c0bb..8cace66 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -161,14 +161,10 @@
<string name="permdesc_changeConfiguration">"允許應用程式變更目前設定,例如:地區設定或字型大小。"</string>
<string name="permlab_restartPackages">"重新啟動其他應用程式"</string>
<string name="permdesc_restartPackages">"允許應用程式強制重新啟動其他應用程式。"</string>
- <string name="permlab_setProcessForeground">"保持已停止狀態"</string>
- <string name="permdesc_setProcessForeground">"允許應用程式在前端執行任何程序 (無法中止)。一般應用程式不需要此功能。"</string>
<string name="permlab_forceBack">"強制關閉應用程式"</string>
<string name="permdesc_forceBack">"允許應用程式強制關閉在前端運作的活動並返回。一般應用程式不需要此功能。"</string>
<string name="permlab_dump">"接收系統內部狀態"</string>
<string name="permdesc_dump">"允許應用程式取得系統內部狀態。請注意:惡意程式可能利用此功能,不當取得私人或安全性資料。"</string>
- <string name="permlab_addSystemService">"發行低階服務"</string>
- <string name="permdesc_addSystemService">"允許應用程式發行自有低階系統服務。請注意:惡意程式可能利用此功能綁架系統或偷取、竄改資料內容。"</string>
<string name="permlab_runSetActivityWatcher">"監視控制所有應用程式啟動狀態。"</string>
<string name="permdesc_runSetActivityWatcher">"允許應用程式監控管理系統啟動活動。請注意:惡意程式可能因此癱瘓整個系統。此權限只在開發時需要,一般手機使用不需要此權限。"</string>
<string name="permlab_broadcastPackageRemoved">"傳送程式已移除廣播"</string>
@@ -181,8 +177,6 @@
<string name="permdesc_setProcessLimit">"允許應用程式控制可使用的最大執行緒。一般應用程式不需要此功能。"</string>
<string name="permlab_setAlwaysFinish">"關閉所有背景程式"</string>
<string name="permdesc_setAlwaysFinish">"允許應用程式控制哪些活動在被移到背景執行時,儘速結束。一般應用程式不需要此功能。"</string>
- <string name="permlab_fotaUpdate">"自動安裝系統更新"</string>
- <string name="permdesc_fotaUpdate">"允許應用程式接收可安裝系統更新的通知,並啟動安裝。請注意:惡意程式可能透過未授權的更新竄改系統,或干擾更新程序。"</string>
<string name="permlab_batteryStats">"編輯電池狀態"</string>
<string name="permdesc_batteryStats">"允許修改電池狀態。一般應用程式不會使用此功能。"</string>
<string name="permlab_internalSystemWindow">"顯示未授權視窗"</string>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 79dc1ba..05a20aa 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -30,6 +30,11 @@
<string name="terabyteShort">TB</string>
<!-- Suffix added to a number to signify size in petabytes. -->
<string name="petabyteShort">PB</string>
+ <!-- Format string used to add a suffix like "KB" or "MB" to a number
+ to display a size in kilobytes, megabytes, or other size units.
+ Some languages (like French) will want to add a space between
+ the placeholders. -->
+ <string name="fileSizeSuffix"><xliff:g id="number" example="123">%1$s</xliff:g><xliff:g id="unit" example="KB">%2$s</xliff:g></string>
<!-- Used in Contacts for a field that has no label and in Note Pad
for a note with no name. -->
@@ -456,13 +461,6 @@
forcibly restart other applications.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_setProcessForeground">keep from being stopped</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_setProcessForeground">Allows an application to make
- any process run in the foreground, so it can\'t be killed.
- Should never be needed for normal applications.</string>
-
- <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_forceBack">force application to close</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_forceBack">Allows an application to force any
@@ -478,13 +476,6 @@
never normally need.</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_addSystemService">publish low-level services</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_addSystemService">Allows application to publish
- its own low-level system services. Malicious applications may hijack
- the system, and steal or corrupt any data on it.</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_shutdown">partial shutdown</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_shutdown">Puts the activity manager into a shutdown
@@ -543,15 +534,6 @@
go to the background. Never needed for normal applications.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_fotaUpdate">automatically install system updates</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_fotaUpdate">Allows an application to receive
- notifications about pending system updates and trigger their
- installation. Malicious applications may use this to corrupt the system
- with unauthorized updates, or generally interfere with the update
- process.</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_batteryStats">modify battery statistics</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_batteryStats">Allows the modification of
diff --git a/packages/SettingsProvider/AndroidManifest.xml b/packages/SettingsProvider/AndroidManifest.xml
index 4abc337..16c66a6 100644
--- a/packages/SettingsProvider/AndroidManifest.xml
+++ b/packages/SettingsProvider/AndroidManifest.xml
@@ -2,12 +2,6 @@
package="com.android.providers.settings"
android:sharedUserId="android.uid.system">
- <!-- Permission to write Gservices in SettingsProvider -->
- <permission android:name="android.permission.WRITE_GSERVICES"
- android:label="@string/permlab_writeGservices"
- android:description="@string/permdesc_writeGservices"
- android:protectionLevel="signature" />
-
<application android:allowClearUserData="false"
android:label="Settings Storage"
android:icon="@drawable/ic_launcher_settings">
diff --git a/packages/SettingsProvider/res/values/strings.xml b/packages/SettingsProvider/res/values/strings.xml
deleted file mode 100644
index 8a00091..0000000
--- a/packages/SettingsProvider/res/values/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * 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.
- */
--->
-<resources>
- <string name="permlab_writeGservices">Write Gservices settings.</string>
- <string name="permdesc_writeGservices">Allows the application to
- change the settings in Gservices.</string>
-</resources>
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 828b8aa..3b47ae7 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -174,6 +174,10 @@
*/
static final int DIM_DURATION_MULTIPLIER = 6;
+ static final int INJECT_FAILED = 0;
+ static final int INJECT_SUCCEEDED = 1;
+ static final int INJECT_NO_PERMISSION = -1;
+
static final int UPDATE_FOCUS_NORMAL = 0;
static final int UPDATE_FOCUS_WILL_ASSIGN_LAYERS = 1;
static final int UPDATE_FOCUS_PLACING_SURFACES = 2;
@@ -1317,7 +1321,7 @@
// Update Orientation after adding a window, only if the window needs to be
// displayed right away
if (win.isVisibleOrAdding()) {
- if (updateOrientationFromAppTokens(null, null) != null) {
+ if (updateOrientationFromAppTokensUnchecked(null, null) != null) {
sendNewConfiguration();
}
}
@@ -1956,7 +1960,7 @@
public void addWindowToken(IBinder token, int type) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"addWindowToken()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -1974,7 +1978,7 @@
public void removeWindowToken(IBinder token) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"removeWindowToken()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
final long origId = Binder.clearCallingIdentity();
@@ -2027,7 +2031,7 @@
int groupId, int requestedOrientation, boolean fullscreen) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"addAppToken()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -2056,7 +2060,7 @@
public void setAppGroupId(IBinder token, int groupId) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppStartingIcon()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -2154,8 +2158,22 @@
public Configuration updateOrientationFromAppTokens(
Configuration currentConfig, IBinder freezeThisOneIfNeeded) {
+ if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
+ "updateOrientationFromAppTokens()")) {
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
+ }
+
Configuration config;
long ident = Binder.clearCallingIdentity();
+ config = updateOrientationFromAppTokensUnchecked(currentConfig,
+ freezeThisOneIfNeeded);
+ Binder.restoreCallingIdentity(ident);
+ return config;
+ }
+
+ Configuration updateOrientationFromAppTokensUnchecked(
+ Configuration currentConfig, IBinder freezeThisOneIfNeeded) {
+ Configuration config;
synchronized(mWindowMap) {
config = updateOrientationFromAppTokensLocked(currentConfig, freezeThisOneIfNeeded);
}
@@ -2163,7 +2181,6 @@
mLayoutNeeded = true;
performLayoutAndPlaceSurfacesLocked();
}
- Binder.restoreCallingIdentity(ident);
return config;
}
@@ -2235,7 +2252,7 @@
public void setAppOrientation(IApplicationToken token, int requestedOrientation) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppOrientation()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -2263,7 +2280,7 @@
public void setFocusedApp(IBinder token, boolean moveFocusNow) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setFocusedApp()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -2296,7 +2313,7 @@
public void prepareAppTransition(int transit) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"prepareAppTransition()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -2325,7 +2342,7 @@
public void executeAppTransition() {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"executeAppTransition()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -2345,7 +2362,7 @@
IBinder transferFrom, boolean createIfNeeded) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppStartingIcon()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -2479,7 +2496,7 @@
public void setAppWillBeHidden(IBinder token) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppWillBeHidden()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
AppWindowToken wtoken;
@@ -2590,7 +2607,7 @@
public void setAppVisibility(IBinder token, boolean visible) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppVisibility()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
AppWindowToken wtoken;
@@ -2720,7 +2737,7 @@
public void startAppFreezingScreen(IBinder token, int configChanges) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppFreezingScreen()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -2743,7 +2760,7 @@
public void stopAppFreezingScreen(IBinder token, boolean force) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"setAppFreezingScreen()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -2762,7 +2779,7 @@
public void removeAppToken(IBinder token) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"removeAppToken()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
AppWindowToken wtoken = null;
@@ -2930,7 +2947,7 @@
public void moveAppToken(int index, IBinder token) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"moveAppToken()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized(mWindowMap) {
@@ -3012,7 +3029,7 @@
public void moveAppTokensToTop(List<IBinder> tokens) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"moveAppTokensToTop()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
final long origId = Binder.clearCallingIdentity();
@@ -3033,7 +3050,7 @@
public void moveAppTokensToBottom(List<IBinder> tokens) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"moveAppTokensToBottom()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
final long origId = Binder.clearCallingIdentity();
@@ -3120,7 +3137,7 @@
public void setAnimationScale(int which, float scale) {
if (!checkCallingPermission(android.Manifest.permission.SET_ANIMATION_SCALE,
"setAnimationScale()")) {
- return;
+ throw new SecurityException("Requires SET_ANIMATION_SCALE permission");
}
if (scale < 0) scale = 0;
@@ -3138,7 +3155,7 @@
public void setAnimationScales(float[] scales) {
if (!checkCallingPermission(android.Manifest.permission.SET_ANIMATION_SCALE,
"setAnimationScale()")) {
- return;
+ throw new SecurityException("Requires SET_ANIMATION_SCALE permission");
}
if (scales != null) {
@@ -3169,7 +3186,7 @@
public int getSwitchState(int sw) {
if (!checkCallingPermission(android.Manifest.permission.READ_INPUT_STATE,
"getSwitchState()")) {
- return -1;
+ throw new SecurityException("Requires READ_INPUT_STATE permission");
}
return KeyInputQueue.getSwitchState(sw);
}
@@ -3177,7 +3194,7 @@
public int getSwitchStateForDevice(int devid, int sw) {
if (!checkCallingPermission(android.Manifest.permission.READ_INPUT_STATE,
"getSwitchStateForDevice()")) {
- return -1;
+ throw new SecurityException("Requires READ_INPUT_STATE permission");
}
return KeyInputQueue.getSwitchState(devid, sw);
}
@@ -3185,7 +3202,7 @@
public int getScancodeState(int sw) {
if (!checkCallingPermission(android.Manifest.permission.READ_INPUT_STATE,
"getScancodeState()")) {
- return -1;
+ throw new SecurityException("Requires READ_INPUT_STATE permission");
}
return KeyInputQueue.getScancodeState(sw);
}
@@ -3193,7 +3210,7 @@
public int getScancodeStateForDevice(int devid, int sw) {
if (!checkCallingPermission(android.Manifest.permission.READ_INPUT_STATE,
"getScancodeStateForDevice()")) {
- return -1;
+ throw new SecurityException("Requires READ_INPUT_STATE permission");
}
return KeyInputQueue.getScancodeState(devid, sw);
}
@@ -3201,7 +3218,7 @@
public int getKeycodeState(int sw) {
if (!checkCallingPermission(android.Manifest.permission.READ_INPUT_STATE,
"getKeycodeState()")) {
- return -1;
+ throw new SecurityException("Requires READ_INPUT_STATE permission");
}
return KeyInputQueue.getKeycodeState(sw);
}
@@ -3209,7 +3226,7 @@
public int getKeycodeStateForDevice(int devid, int sw) {
if (!checkCallingPermission(android.Manifest.permission.READ_INPUT_STATE,
"getKeycodeStateForDevice()")) {
- return -1;
+ throw new SecurityException("Requires READ_INPUT_STATE permission");
}
return KeyInputQueue.getKeycodeState(devid, sw);
}
@@ -3298,7 +3315,7 @@
boolean alwaysSendConfiguration, int animFlags) {
if (!checkCallingPermission(android.Manifest.permission.SET_ORIENTATION,
"setRotation()")) {
- return;
+ throw new SecurityException("Requires SET_ORIENTATION permission");
}
setRotationUnchecked(rotation, alwaysSendConfiguration, animFlags);
@@ -3776,7 +3793,7 @@
/**
* @return Returns true if event was dispatched, false if it was dropped for any reason
*/
- private boolean dispatchPointer(QueuedEvent qev, MotionEvent ev, int pid, int uid) {
+ private int dispatchPointer(QueuedEvent qev, MotionEvent ev, int pid, int uid) {
if (DEBUG_INPUT || WindowManagerPolicy.WATCH_POINTER) Log.v(TAG,
"dispatchPointer " + ev);
@@ -3806,14 +3823,14 @@
mQueue.recycleEvent(qev);
}
ev.recycle();
- return false;
+ return INJECT_FAILED;
}
if (targetObj == mKeyWaiter.CONSUMED_EVENT_TOKEN) {
if (qev != null) {
mQueue.recycleEvent(qev);
}
ev.recycle();
- return true;
+ return INJECT_SUCCEEDED;
}
WindowState target = (WindowState)targetObj;
@@ -3833,7 +3850,7 @@
mQueue.recycleEvent(qev);
}
ev.recycle();
- return false;
+ return INJECT_NO_PERMISSION;
}
}
@@ -3883,7 +3900,7 @@
mQueue.recycleEvent(qev);
}
ev.recycle();
- return false;
+ return INJECT_FAILED;
}
} //end if target
@@ -3957,7 +3974,7 @@
Log.v(TAG, "Delivering pointer " + qev + " to " + target);
}
target.mClient.dispatchPointer(ev, eventTime);
- return true;
+ return INJECT_SUCCEEDED;
} catch (android.os.RemoteException e) {
Log.i(TAG, "WINDOW DIED during motion dispatch: " + target);
mKeyWaiter.mMotionTarget = null;
@@ -3968,13 +3985,13 @@
// removed.
}
}
- return false;
+ return INJECT_FAILED;
}
/**
* @return Returns true if event was dispatched, false if it was dropped for any reason
*/
- private boolean dispatchTrackball(QueuedEvent qev, MotionEvent ev, int pid, int uid) {
+ private int dispatchTrackball(QueuedEvent qev, MotionEvent ev, int pid, int uid) {
if (DEBUG_INPUT) Log.v(
TAG, "dispatchTrackball [" + ev.getAction() +"] <" + ev.getX() + ", " + ev.getY() + ">");
@@ -3986,14 +4003,14 @@
mQueue.recycleEvent(qev);
}
ev.recycle();
- return false;
+ return INJECT_FAILED;
}
if (focusObj == mKeyWaiter.CONSUMED_EVENT_TOKEN) {
if (qev != null) {
mQueue.recycleEvent(qev);
}
ev.recycle();
- return true;
+ return INJECT_SUCCEEDED;
}
WindowState focus = (WindowState)focusObj;
@@ -4009,7 +4026,7 @@
mQueue.recycleEvent(qev);
}
ev.recycle();
- return false;
+ return INJECT_NO_PERMISSION;
}
}
@@ -4029,7 +4046,7 @@
try {
focus.mClient.dispatchTrackball(ev, eventTime);
- return true;
+ return INJECT_SUCCEEDED;
} catch (android.os.RemoteException e) {
Log.i(TAG, "WINDOW DIED during key dispatch: " + focus);
try {
@@ -4040,23 +4057,23 @@
}
}
- return false;
+ return INJECT_FAILED;
}
/**
* @return Returns true if event was dispatched, false if it was dropped for any reason
*/
- private boolean dispatchKey(KeyEvent event, int pid, int uid) {
+ private int dispatchKey(KeyEvent event, int pid, int uid) {
if (DEBUG_INPUT) Log.v(TAG, "Dispatch key: " + event);
Object focusObj = mKeyWaiter.waitForNextEventTarget(event, null,
null, false, false);
if (focusObj == null) {
Log.w(TAG, "No focus window, dropping: " + event);
- return false;
+ return INJECT_FAILED;
}
if (focusObj == mKeyWaiter.CONSUMED_EVENT_TOKEN) {
- return true;
+ return INJECT_SUCCEEDED;
}
WindowState focus = (WindowState)focusObj;
@@ -4071,7 +4088,7 @@
Log.w(TAG, "Permission denied: injecting key event from pid "
+ pid + " uid " + uid + " to window " + focus
+ " owned by uid " + focus.mSession.mUid);
- return false;
+ return INJECT_NO_PERMISSION;
}
}
@@ -4089,7 +4106,7 @@
+ " to " + focus);
}
focus.mClient.dispatchKey(event);
- return true;
+ return INJECT_SUCCEEDED;
} catch (android.os.RemoteException e) {
Log.i(TAG, "WINDOW DIED during key dispatch: " + focus);
try {
@@ -4100,13 +4117,13 @@
}
}
- return false;
+ return INJECT_FAILED;
}
public void pauseKeyDispatching(IBinder _token) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"pauseKeyDispatching()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized (mWindowMap) {
@@ -4120,7 +4137,7 @@
public void resumeKeyDispatching(IBinder _token) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"resumeKeyDispatching()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized (mWindowMap) {
@@ -4134,7 +4151,7 @@
public void setEventDispatching(boolean enabled) {
if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
"resumeKeyDispatching()")) {
- return;
+ throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
}
synchronized (mWindowMap) {
@@ -4167,11 +4184,18 @@
KeyEvent newEvent = new KeyEvent(downTime, eventTime, action, code, repeatCount, metaState,
deviceId, scancode, KeyEvent.FLAG_FROM_SYSTEM);
- boolean result = dispatchKey(newEvent, Binder.getCallingPid(), Binder.getCallingUid());
+ int result = dispatchKey(newEvent, Binder.getCallingPid(), Binder.getCallingUid());
if (sync) {
mKeyWaiter.waitForNextEventTarget(null, null, null, false, true);
}
- return result;
+ switch (result) {
+ case INJECT_NO_PERMISSION:
+ throw new SecurityException(
+ "Injecting to another application requires INJECT_EVENT permission");
+ case INJECT_SUCCEEDED:
+ return true;
+ }
+ return false;
}
/**
@@ -4184,11 +4208,18 @@
* @return Returns true if event was dispatched, false if it was dropped for any reason
*/
public boolean injectPointerEvent(MotionEvent ev, boolean sync) {
- boolean result = dispatchPointer(null, ev, Binder.getCallingPid(), Binder.getCallingUid());
+ int result = dispatchPointer(null, ev, Binder.getCallingPid(), Binder.getCallingUid());
if (sync) {
mKeyWaiter.waitForNextEventTarget(null, null, null, false, true);
}
- return result;
+ switch (result) {
+ case INJECT_NO_PERMISSION:
+ throw new SecurityException(
+ "Injecting to another application requires INJECT_EVENT permission");
+ case INJECT_SUCCEEDED:
+ return true;
+ }
+ return false;
}
/**
@@ -4201,11 +4232,18 @@
* @return Returns true if event was dispatched, false if it was dropped for any reason
*/
public boolean injectTrackballEvent(MotionEvent ev, boolean sync) {
- boolean result = dispatchTrackball(null, ev, Binder.getCallingPid(), Binder.getCallingUid());
+ int result = dispatchTrackball(null, ev, Binder.getCallingPid(), Binder.getCallingUid());
if (sync) {
mKeyWaiter.waitForNextEventTarget(null, null, null, false, true);
}
- return result;
+ switch (result) {
+ case INJECT_NO_PERMISSION:
+ throw new SecurityException(
+ "Injecting to another application requires INJECT_EVENT permission");
+ case INJECT_SUCCEEDED:
+ return true;
+ }
+ return false;
}
private WindowState getFocusedWindow() {
@@ -7492,7 +7530,7 @@
}
case COMPUTE_AND_SEND_NEW_CONFIGURATION: {
- if (updateOrientationFromAppTokens(null, null) != null) {
+ if (updateOrientationFromAppTokensUnchecked(null, null) != null) {
sendNewConfiguration();
}
break;
diff --git a/tests/DumpRenderTree/assets/run_reliability_tests.py b/tests/DumpRenderTree/assets/run_reliability_tests.py
index b038740..23f93df 100755
--- a/tests/DumpRenderTree/assets/run_reliability_tests.py
+++ b/tests/DumpRenderTree/assets/run_reliability_tests.py
@@ -14,6 +14,7 @@
import subprocess
import sys
import time
+from Numeric import *
TEST_LIST_FILE = "/sdcard/android/reliability_tests_list.txt"
TEST_STATUS_FILE = "/sdcard/android/reliability_running_test.txt"
@@ -75,21 +76,28 @@
logging.info("Line has more than one '|': " + line)
continue
if pair[0] not in load_times:
- load_times[pair[0]] = [0, 0]
+ load_times[pair[0]] = []
try:
pair[1] = int(pair[1])
except ValueError:
logging.info("Lins has non-numeric load time: " + line)
continue
- load_times[pair[0]][0] += pair[1]
- load_times[pair[0]][1] += 1
+ load_times[pair[0]].append(pair[1])
log_handle.close()
# rewrite the average time to file
log_handle = open(raw_log, "w")
for url, times in load_times.iteritems():
- log_handle.write("%s|%f\n" % (url, float(times[0]) / times[1]))
+ # calculate std
+ arr = array(times)
+ avg = average(arr)
+ d = arr - avg
+ std = sqrt(sum(d * d) / len(arr))
+ output = ("%-70s%-10d%-10d%-12.2f%-12.2f%s\n" %
+ (url, min(arr), max(arr), avg, std,
+ array2string(arr)))
+ log_handle.write(output)
log_handle.close()
@@ -156,6 +164,7 @@
# clean up previous results
RemoveDeviceFile(adb_cmd, TEST_STATUS_FILE)
RemoveDeviceFile(adb_cmd, TEST_TIMEOUT_FILE)
+ RemoveDeviceFile(adb_cmd, TEST_LOAD_TIME_FILE)
logging.info("Running the test ...")
diff --git a/tests/permission/Android.mk b/tests/permission/Android.mk
new file mode 100644
index 0000000..a6df98e
--- /dev/null
+++ b/tests/permission/Android.mk
@@ -0,0 +1,14 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+# We only want this apk build for tests.
+LOCAL_MODULE_TAGS := tests
+
+# Include all test java files.
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_JAVA_LIBRARIES := android.test.runner
+LOCAL_PACKAGE_NAME := FrameworkPermissionTests
+
+include $(BUILD_PACKAGE)
+
diff --git a/tests/permission/AndroidManifest.xml b/tests/permission/AndroidManifest.xml
new file mode 100644
index 0000000..b19bf00
--- /dev/null
+++ b/tests/permission/AndroidManifest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2009 Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.framework.permission.tests">
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <!--
+ The test declared in this instrumentation can be run via this command
+ "adb shell am instrument -w com.android.framework.permission.tests/android.test.InstrumentationTestRunner"
+ -->
+ <instrumentation android:name="android.test.InstrumentationTestRunner"
+ android:targetPackage="com.android.framework.permission.tests"
+ android:label="Tests for private API framework permissions"/>
+
+</manifest>
diff --git a/tests/permission/src/com/android/framework/permission/tests/ActivityManagerPermissionTests.java b/tests/permission/src/com/android/framework/permission/tests/ActivityManagerPermissionTests.java
new file mode 100644
index 0000000..14d3d73
--- /dev/null
+++ b/tests/permission/src/com/android/framework/permission/tests/ActivityManagerPermissionTests.java
@@ -0,0 +1,182 @@
+package com.android.framework.permission.tests;
+
+import android.app.ActivityManagerNative;
+import android.app.IActivityManager;
+import android.content.res.Configuration;
+import android.os.RemoteException;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import junit.framework.TestCase;
+
+/**
+ * TODO: Remove this. This is only a placeholder, need to implement this.
+ */
+public class ActivityManagerPermissionTests extends TestCase {
+ IActivityManager mAm;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ mAm = ActivityManagerNative.getDefault();
+ }
+
+ @SmallTest
+ public void testREORDER_TASKS() {
+ try {
+ mAm.moveTaskToFront(-1);
+ fail("IActivityManager.moveTaskToFront did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mAm.moveTaskToBack(-1);
+ fail("IActivityManager.moveTaskToBack did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mAm.moveTaskBackwards(-1);
+ fail("IActivityManager.moveTaskToFront did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testCHANGE_CONFIGURATION() {
+ try {
+ mAm.updateConfiguration(new Configuration());
+ fail("IActivityManager.updateConfiguration did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testSET_DEBUG_APP() {
+ try {
+ mAm.setDebugApp(null, false, false);
+ fail("IActivityManager.setDebugApp did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testSET_PROCESS_LIMIT() {
+ try {
+ mAm.setProcessLimit(10);
+ fail("IActivityManager.setProcessLimit did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testALWAYS_FINISH() {
+ try {
+ mAm.setAlwaysFinish(false);
+ fail("IActivityManager.setAlwaysFinish did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testSIGNAL_PERSISTENT_PROCESSES() {
+ try {
+ mAm.signalPersistentProcesses(-1);
+ fail("IActivityManager.signalPersistentProcesses did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testFORCE_BACK() {
+ try {
+ mAm.unhandledBack();
+ fail("IActivityManager.unhandledBack did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testSET_ACTIVITY_WATCHER() {
+ try {
+ mAm.setActivityWatcher(null);
+ fail("IActivityManager.setActivityWatcher did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testSHUTDOWN() {
+ try {
+ mAm.shutdown(0);
+ fail("IActivityManager.shutdown did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testSTOP_APP_SWITCHES() {
+ try {
+ mAm.stopAppSwitches();
+ fail("IActivityManager.stopAppSwitches did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mAm.resumeAppSwitches();
+ fail("IActivityManager.resumeAppSwitches did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+}
diff --git a/tests/permission/src/com/android/framework/permission/tests/PmPermissionsTests.java b/tests/permission/src/com/android/framework/permission/tests/PmPermissionsTests.java
new file mode 100644
index 0000000..b690c45
--- /dev/null
+++ b/tests/permission/src/com/android/framework/permission/tests/PmPermissionsTests.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.framework.permission.tests;
+
+import junit.framework.TestCase;
+import android.content.pm.PackageManager;
+import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
+
+/**
+ * Verify PackageManager api's that require specific permissions.
+ */
+public class PmPermissionsTests extends AndroidTestCase {
+ private PackageManager mPm;
+ private String mPkgName = "com.android.framework.permission.tests";
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ mPm = getContext().getPackageManager();
+ }
+
+ /*
+ * This test verifies that PackageManger.getPackageSizeInfo enforces permission
+ * android.permission.GET_PACKAGE_SIZE
+ */
+ @SmallTest
+ public void testGetPackageSize() {
+ try {
+ mPm.getPackageSizeInfo(mPkgName, null);
+ fail("PackageManager.getPackageSizeInfo" +
+ "did not throw SecurityException as expected");
+ } catch (SecurityException e) {
+ // expected
+ }
+ }
+
+ /*
+ * This test verifies that PackageManger.DeleteApplicationCacheFiles enforces permission
+ * android.permission.DELETE_CACHE_FILES
+ */
+ @SmallTest
+ public void testDeleteApplicationCacheFiles() {
+ try {
+ mPm.deleteApplicationCacheFiles(mPkgName, null);
+ fail("PackageManager.deleteApplicationCacheFiles" +
+ "did not throw SecurityException as expected");
+ } catch (SecurityException e) {
+ // expected
+ }
+ }
+
+ /*
+ * This test verifies that PackageManger.installPackage enforces permission
+ * android.permission.INSTALL_PACKAGES
+ */
+ @SmallTest
+ public void testInstallPackage() {
+ try {
+ mPm.installPackage(null, null, 0, null);
+ fail("PackageManager.installPackage" +
+ "did not throw SecurityException as expected");
+ } catch (SecurityException e) {
+ // expected
+ }
+ }
+
+ /*
+ * This test verifies that PackageManger.freeStorage
+ * enforces permission android.permission.CLEAR_APP_CACHE
+ */
+ @SmallTest
+ public void testFreeStorage1() {
+ try {
+ mPm.freeStorage(100000, null);
+ fail("PackageManager.freeStorage " +
+ "did not throw SecurityException as expected");
+ } catch (SecurityException e) {
+ // expected
+ }
+ }
+
+ /*
+ * This test verifies that PackageManger.freeStorageAndNotify
+ * enforces permission android.permission.CLEAR_APP_CACHE
+ */
+ @SmallTest
+ public void testFreeStorage2() {
+ try {
+ mPm.freeStorageAndNotify(100000, null);
+ fail("PackageManager.freeStorageAndNotify" +
+ " did not throw SecurityException as expected");
+ } catch (SecurityException e) {
+ // expected
+ }
+ }
+
+ /*
+ * This test verifies that PackageManger.clearApplicationUserData
+ * enforces permission android.permission.CLEAR_APP_USER_DATA
+ */
+ @SmallTest
+ public void testClearApplicationUserData() {
+ try {
+ mPm.clearApplicationUserData(mPkgName, null);
+ fail("PackageManager.clearApplicationUserData" +
+ "did not throw SecurityException as expected");
+ } catch (SecurityException e) {
+ // expected
+ }
+ }
+
+ /*
+ * This test verifies that PackageManger.deletePackage
+ * enforces permission android.permission.DELETE_PACKAGES
+ */
+ @SmallTest
+ public void testDeletePackage() {
+ try {
+ mPm.deletePackage(mPkgName, null, 0);
+ fail("PackageManager.deletePackage" +
+ "did not throw SecurityException as expected");
+ } catch (SecurityException e) {
+ // expected
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/permission/src/com/android/framework/permission/tests/ServiceManagerPermissionTests.java b/tests/permission/src/com/android/framework/permission/tests/ServiceManagerPermissionTests.java
new file mode 100644
index 0000000..3f1e27e
--- /dev/null
+++ b/tests/permission/src/com/android/framework/permission/tests/ServiceManagerPermissionTests.java
@@ -0,0 +1,50 @@
+package com.android.framework.permission.tests;
+
+import com.android.internal.os.BinderInternal;
+
+import android.os.Binder;
+import android.os.IPermissionController;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.ServiceManagerNative;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import junit.framework.TestCase;
+
+/**
+ * TODO: Remove this. This is only a placeholder, need to implement this.
+ */
+public class ServiceManagerPermissionTests extends TestCase {
+ @SmallTest
+ public void testAddService() {
+ try {
+ // The security in the service manager is that you can't replace
+ // a service that is already published.
+ Binder binder = new Binder();
+ ServiceManager.addService("activity", binder);
+ fail("ServiceManager.addService did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ }
+ }
+
+ @SmallTest
+ public void testSetPermissionController() {
+ try {
+ IPermissionController pc = new IPermissionController.Stub() {
+ public boolean checkPermission(java.lang.String permission, int pid, int uid) {
+ return true;
+ }
+ };
+ ServiceManagerNative.asInterface(BinderInternal.getContextObject())
+ .setPermissionController(pc);
+ fail("IServiceManager.setPermissionController did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+}
diff --git a/tests/permission/src/com/android/framework/permission/tests/SettingsPermissionsTests.java b/tests/permission/src/com/android/framework/permission/tests/SettingsPermissionsTests.java
new file mode 100644
index 0000000..f55998f
--- /dev/null
+++ b/tests/permission/src/com/android/framework/permission/tests/SettingsPermissionsTests.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2009 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.framework.permission.tests;
+
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.provider.Settings;
+import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.MediumTest;
+
+/**
+ * Verify that accessing private-API protected Settings require specific permissions.
+ */
+public class SettingsPermissionsTests extends AndroidTestCase {
+
+ private ContentResolver mContentResolver;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ mContentResolver = getContext().getContentResolver();
+ }
+
+ /**
+ * Verify that writing to the GServices table in Settings provider requires permissions.
+ * <p>Tests Permission:
+ * {@link android.Manifest.permission#WRITE_GSERVICES}
+ */
+ @MediumTest
+ public void testWriteGServices() {
+ try {
+ ContentValues values = new ContentValues();
+ values.put("url", "android");
+ mContentResolver.insert(Settings.Gservices.CONTENT_URI, values);
+ fail("Write into Gservices provider did not throw SecurityException as expected.");
+ } catch (SecurityException e) {
+ // expected
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
new file mode 100644
index 0000000..8ab2a10
--- /dev/null
+++ b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
@@ -0,0 +1,409 @@
+package com.android.framework.permission.tests;
+
+import android.content.res.Configuration;
+import android.os.Binder;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.view.IWindowManager;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+
+import junit.framework.TestCase;
+
+/**
+ * TODO: Remove this. This is only a placeholder, need to implement this.
+ */
+public class WindowManagerPermissionTests extends TestCase {
+ IWindowManager mWm;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ mWm = IWindowManager.Stub.asInterface(
+ ServiceManager.getService("window"));
+ }
+
+ @SmallTest
+ public void testMANAGE_APP_TOKENS() {
+ try {
+ mWm.pauseKeyDispatching(null);
+ fail("IWindowManager.pauseKeyDispatching did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.resumeKeyDispatching(null);
+ fail("IWindowManager.resumeKeyDispatching did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.setEventDispatching(true);
+ fail("IWindowManager.setEventDispatching did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.addWindowToken(null, 0);
+ fail("IWindowManager.addWindowToken did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.removeWindowToken(null);
+ fail("IWindowManager.removeWindowToken did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.addAppToken(0, null, 0, 0, false);
+ fail("IWindowManager.addAppToken did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.setAppGroupId(null, 0);
+ fail("IWindowManager.setAppGroupId did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.updateOrientationFromAppTokens(new Configuration(), null);
+ fail("IWindowManager.updateOrientationFromAppTokens did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.setAppOrientation(null, 0);
+ mWm.addWindowToken(null, 0);
+ fail("IWindowManager.setAppOrientation did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.setFocusedApp(null, false);
+ fail("IWindowManager.setFocusedApp did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.prepareAppTransition(0);
+ fail("IWindowManager.prepareAppTransition did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.executeAppTransition();
+ fail("IWindowManager.executeAppTransition did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.setAppStartingWindow(null, "foo", 0, null, 0, 0, null, false);
+ fail("IWindowManager.setAppStartingWindow did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.setAppWillBeHidden(null);
+ fail("IWindowManager.setAppWillBeHidden did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.setAppVisibility(null, false);
+ fail("IWindowManager.setAppVisibility did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.startAppFreezingScreen(null, 0);
+ fail("IWindowManager.startAppFreezingScreen did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.stopAppFreezingScreen(null, false);
+ fail("IWindowManager.stopAppFreezingScreen did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.removeAppToken(null);
+ fail("IWindowManager.removeAppToken did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.moveAppToken(0, null);
+ fail("IWindowManager.moveAppToken did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.moveAppTokensToTop(null);
+ fail("IWindowManager.moveAppTokensToTop did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.moveAppTokensToBottom(null);
+ fail("IWindowManager.moveAppTokensToBottom did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testINJECT_EVENTS() {
+ try {
+ mWm.injectKeyEvent(new KeyEvent(0, 0), false);
+ fail("IWindowManager.injectKeyEvent did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.injectPointerEvent(MotionEvent.obtain(0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0), false);
+ fail("IWindowManager.injectPointerEvent did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.injectTrackballEvent(MotionEvent.obtain(0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0), false);
+ fail("IWindowManager.injectTrackballEvent did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testDISABLE_KEYGUARD() {
+ Binder token = new Binder();
+ try {
+ mWm.disableKeyguard(token, "foo");
+ fail("IWindowManager.disableKeyguard did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.reenableKeyguard(token);
+ fail("IWindowManager.reenableKeyguard did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.exitKeyguardSecurely(null);
+ fail("IWindowManager.exitKeyguardSecurely did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testSET_ANIMATION_SCALE() {
+ try {
+ mWm.setAnimationScale(0, 1);
+ fail("IWindowManager.setAnimationScale did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.setAnimationScales(new float[1]);
+ fail("IWindowManager.setAnimationScales did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testREAD_INPUT_STATE() {
+ try {
+ mWm.getSwitchState(0);
+ fail("IWindowManager.getSwitchState did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.getSwitchStateForDevice(0, 0);
+ fail("IWindowManager.getSwitchStateForDevice did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.getScancodeState(0);
+ fail("IWindowManager.getScancodeState did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.getScancodeStateForDevice(0, 0);
+ fail("IWindowManager.getScancodeStateForDevice did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.getKeycodeState(0);
+ fail("IWindowManager.getKeycodeState did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+
+ try {
+ mWm.getKeycodeStateForDevice(0, 0);
+ fail("IWindowManager.getKeycodeStateForDevice did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+
+ @SmallTest
+ public void testSET_ORIENTATION() {
+ try {
+ mWm.setRotation(0, true, 0);
+ mWm.getSwitchState(0);
+ fail("IWindowManager.setRotation did not throw SecurityException as"
+ + " expected");
+ } catch (SecurityException e) {
+ // expected
+ } catch (RemoteException e) {
+ fail("Unexpected remote exception");
+ }
+ }
+}