Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Actually it is just plain simple ...
Browse files Browse the repository at this point in the history
Refs #357
  • Loading branch information
M66B committed Dec 26, 2013
1 parent 4a4ab5b commit bb22584
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 159 deletions.
2 changes: 1 addition & 1 deletion src/biz/bokhorst/xprivacy/PrivacyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public class PrivacyManager {
static {
// Scan meta data
try {
File in = new File(Util.getDataDirectory() + File.separator + "meta.xml");
File in = new File(Util.getUserDataDirectory() + File.separator + "meta.xml");
Util.log(null, Log.INFO, "Reading meta=" + in.getAbsolutePath());
FileInputStream fis = null;
try {
Expand Down
5 changes: 2 additions & 3 deletions src/biz/bokhorst/xprivacy/PrivacyProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,7 @@ public static void flush() {
// Helper methods

private void enforcePermission() throws SecurityException {
int uid = Util.getAppId(Binder.getCallingUid());
if (uid != Process.myUid())
if (Binder.getCallingUid() != Process.myUid())
throw new SecurityException();
}

Expand Down Expand Up @@ -566,7 +565,7 @@ private static String getSettingName(String settingKey) {
}

private void writeMetaData() throws IOException, FileNotFoundException {
File out = new File(Util.getDataDirectory() + File.separator + "meta.xml");
File out = new File(Util.getUserDataDirectory() + File.separator + "meta.xml");
Util.log(null, Log.INFO, "Writing meta=" + out.getAbsolutePath());
InputStream is = getContext().getAssets().open("meta.xml");
OutputStream os = new FileOutputStream(out.getAbsolutePath());
Expand Down
5 changes: 0 additions & 5 deletions src/biz/bokhorst/xprivacy/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,6 @@ public static int getUserId(int uid) {
return userId;
}

public static String getDataDirectory() {
return Environment.getDataDirectory() + File.separator + "data" + File.separator
+ Util.class.getPackage().getName();
}

public static String getUserDataDirectory() {
// Build data directory
String dataDir = Environment.getDataDirectory() + File.separator;
Expand Down
70 changes: 0 additions & 70 deletions src/biz/bokhorst/xprivacy/XPackageManagerService.java

This file was deleted.

74 changes: 0 additions & 74 deletions src/biz/bokhorst/xprivacy/XPackageParser.java

This file was deleted.

6 changes: 0 additions & 6 deletions src/biz/bokhorst/xprivacy/XPrivacy.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ public void initZygote(StartupParam startupParam) throws Throwable {
// Runtime
hookAll(XRuntime.getInstances());

// Package manager service
hookAll(XPackageManagerService.getInstances());

// Package parser
hookAll(XPackageParser.getInstances());

// Service
hookAll(XService.getInstances());

Expand Down

0 comments on commit bb22584

Please sign in to comment.