Skip to content

Commit

Permalink
fix XSharePreference
Browse files Browse the repository at this point in the history
  • Loading branch information
swift_gan authored and swift_gan committed Apr 10, 2019
1 parent 6f69e00 commit fc571b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 30 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ext {
userOrg = 'ganyao114'
groupId = 'com.swift.sandhook'
repoName = 'SandHook'
publishVersion = '3.2.0'
publishVersion = '3.4.6'
desc = 'android art hook'
website = 'https://github.com/ganyao114/SandHook'
licences = ['Apache-2.0']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import org.xmlpull.v1.XmlPullParserException;

import java.io.InputStream;
import java.util.Map;
import java.util.HashMap;

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;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package de.robv.android.xposed;

import com.swift.sandhook.xposedcompat.XposedCompat;

import de.robv.android.xposed.services.BaseService;
import de.robv.android.xposed.services.DirectAccessService;

Expand All @@ -10,10 +8,6 @@
*/
public final class SELinuxHelper {

static {
initForProcess(XposedCompat.processName);
}

private SELinuxHelper() {}

/**
Expand Down Expand Up @@ -54,31 +48,12 @@ public static String getContext() {
public static BaseService getAppDataFileService() {
if (sServiceAppDataFile != null)
return sServiceAppDataFile;
throw new UnsupportedOperationException();
return new DirectAccessService();
}


// ----------------------------------------------------------------------------
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();
}
}
}

0 comments on commit fc571b2

Please sign in to comment.