summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/AppOpsService.java
diff options
context:
space:
mode:
authorDave Burke <daveburke@google.com>2013-08-02 13:44:17 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-08-02 13:44:17 -0700
commitaa3b0ff3e18585d055494ec3f63f1e0ce1325dd9 (patch)
tree2745783ed3a83406e2b0ea4ef66e342b18935ad2 /services/java/com/android/server/AppOpsService.java
parentb213cec0ce659c1e35c3e7f60a61bae38d94482a (diff)
parent0eab98dd24b3a4272d5e9a41f353071f8508ec2a (diff)
am 0eab98dd: am 019f4385: am 7925e7cc: Merge "Revert "Add version identifier to app ops."" into jb-mr2-dev
* commit '0eab98dd24b3a4272d5e9a41f353071f8508ec2a': Revert "Add version identifier to app ops."
Diffstat (limited to 'services/java/com/android/server/AppOpsService.java')
-rw-r--r--services/java/com/android/server/AppOpsService.java21
1 files changed, 5 insertions, 16 deletions
diff --git a/services/java/com/android/server/AppOpsService.java b/services/java/com/android/server/AppOpsService.java
index b2d8b94c002a..6b4d24843d5b 100644
--- a/services/java/com/android/server/AppOpsService.java
+++ b/services/java/com/android/server/AppOpsService.java
@@ -64,8 +64,6 @@ public class AppOpsService extends IAppOpsService.Stub {
// Write at most every 30 minutes.
static final long WRITE_DELAY = DEBUG ? 1000 : 30*60*1000;
- static final int CURRENT_VERSION = 1;
-
Context mContext;
final AtomicFile mFile;
final Handler mHandler;
@@ -706,9 +704,6 @@ public class AppOpsService extends IAppOpsService.Stub {
throw new IllegalStateException("no start tag found");
}
- String versStr = parser.getAttributeValue(null, "vers");
- int vers = versStr != null ? Integer.parseInt(versStr) : 0;
-
int outerDepth = parser.getDepth();
while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
&& (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
@@ -718,7 +713,7 @@ public class AppOpsService extends IAppOpsService.Stub {
String tagName = parser.getName();
if (tagName.equals("pkg")) {
- readPackage(parser, vers);
+ readPackage(parser);
} else {
Slog.w(TAG, "Unknown element under <app-ops>: "
+ parser.getName());
@@ -751,7 +746,7 @@ public class AppOpsService extends IAppOpsService.Stub {
}
}
- void readPackage(XmlPullParser parser, int vers) throws NumberFormatException,
+ void readPackage(XmlPullParser parser) throws NumberFormatException,
XmlPullParserException, IOException {
String pkgName = parser.getAttributeValue(null, "n");
int outerDepth = parser.getDepth();
@@ -764,7 +759,7 @@ public class AppOpsService extends IAppOpsService.Stub {
String tagName = parser.getName();
if (tagName.equals("uid")) {
- readUid(parser, vers, pkgName);
+ readUid(parser, pkgName);
} else {
Slog.w(TAG, "Unknown element under <pkg>: "
+ parser.getName());
@@ -773,7 +768,7 @@ public class AppOpsService extends IAppOpsService.Stub {
}
}
- void readUid(XmlPullParser parser, int vers, String pkgName) throws NumberFormatException,
+ void readUid(XmlPullParser parser, String pkgName) throws NumberFormatException,
XmlPullParserException, IOException {
int uid = Integer.parseInt(parser.getAttributeValue(null, "n"));
int outerDepth = parser.getDepth();
@@ -789,12 +784,7 @@ public class AppOpsService extends IAppOpsService.Stub {
Op op = new Op(uid, pkgName, Integer.parseInt(parser.getAttributeValue(null, "n")));
String mode = parser.getAttributeValue(null, "m");
if (mode != null) {
- if (vers < CURRENT_VERSION && op.op != AppOpsManager.OP_POST_NOTIFICATION) {
- Slog.w(TAG, "AppOps vers " + vers + ": drop mode from "
- + pkgName + "/" + uid + " op " + op.op);
- } else {
- op.mode = Integer.parseInt(mode);
- }
+ op.mode = Integer.parseInt(mode);
}
String time = parser.getAttributeValue(null, "t");
if (time != null) {
@@ -844,7 +834,6 @@ public class AppOpsService extends IAppOpsService.Stub {
out.setOutput(stream, "utf-8");
out.startDocument(null, true);
out.startTag(null, "app-ops");
- out.attribute(null, "vers", Integer.toString(CURRENT_VERSION));
if (allOps != null) {
String lastPkg = null;