Commit fc571b2c authored by swift_gan's avatar swift_gan Committed by swift_gan

fix XSharePreference

parent 6f69e00a
...@@ -30,7 +30,7 @@ ext { ...@@ -30,7 +30,7 @@ ext {
userOrg = 'ganyao114' userOrg = 'ganyao114'
groupId = 'com.swift.sandhook' groupId = 'com.swift.sandhook'
repoName = 'SandHook' repoName = 'SandHook'
publishVersion = '3.2.0' publishVersion = '3.4.6'
desc = 'android art hook' desc = 'android art hook'
website = 'https://github.com/ganyao114/SandHook' website = 'https://github.com/ganyao114/SandHook'
licences = ['Apache-2.0'] licences = ['Apache-2.0']
......
...@@ -3,11 +3,11 @@ package com.android.internal.util; ...@@ -3,11 +3,11 @@ package com.android.internal.util;
import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserException;
import java.io.InputStream; import java.io.InputStream;
import java.util.Map; import java.util.HashMap;
public class XmlUtils { public class XmlUtils {
public static Map readMapXml(InputStream inputStream) throws XmlPullParserException { public static final HashMap<String, ?> readMapXml(InputStream in) throws XmlPullParserException, java.io.IOException {
return null; return null;
} }
......
package de.robv.android.xposed; package de.robv.android.xposed;
import com.swift.sandhook.xposedcompat.XposedCompat;
import de.robv.android.xposed.services.BaseService; import de.robv.android.xposed.services.BaseService;
import de.robv.android.xposed.services.DirectAccessService; import de.robv.android.xposed.services.DirectAccessService;
...@@ -10,10 +8,6 @@ import de.robv.android.xposed.services.DirectAccessService; ...@@ -10,10 +8,6 @@ import de.robv.android.xposed.services.DirectAccessService;
*/ */
public final class SELinuxHelper { public final class SELinuxHelper {
static {
initForProcess(XposedCompat.processName);
}
private SELinuxHelper() {} private SELinuxHelper() {}
/** /**
...@@ -54,31 +48,12 @@ public final class SELinuxHelper { ...@@ -54,31 +48,12 @@ public final class SELinuxHelper {
public static BaseService getAppDataFileService() { public static BaseService getAppDataFileService() {
if (sServiceAppDataFile != null) if (sServiceAppDataFile != null)
return sServiceAppDataFile; return sServiceAppDataFile;
throw new UnsupportedOperationException(); return new DirectAccessService();
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
private static boolean sIsSELinuxEnabled = false; private static boolean sIsSELinuxEnabled = false;
private static BaseService sServiceAppDataFile = null; private static BaseService sServiceAppDataFile = new DirectAccessService();
/*package*/ static void initOnce() {
try {
//sIsSELinuxEnabled = SELinux.isSELinuxEnabled();
} catch (NoClassDefFoundError ignored) {}
}
/*package*/ static void initForProcess(String packageName) {
if (sIsSELinuxEnabled) {
if (packageName == null) { // Zygote
//sServiceAppDataFile = new ZygoteService();
} else if (packageName.equals("android")) { //system_server
//sServiceAppDataFile = BinderService.getService(BinderService.TARGET_APP);
} else { // app
sServiceAppDataFile = new DirectAccessService();
}
} else {
sServiceAppDataFile = new DirectAccessService();
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment