Skip to content

Commit

Permalink
make vxp independent with TaiChi
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Feb 16, 2019
1 parent 6569e12 commit 4aa9b45
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public final class VirtualCore {
private PhoneInfoDelegate phoneInfoDelegate;
private ComponentDelegate componentDelegate;
private TaskDescriptionDelegate taskDescriptionDelegate;
private Boolean taichiInstalled = null;

private VirtualCore() {
}
Expand Down Expand Up @@ -391,7 +390,7 @@ public void removeVisibleOutsidePackage(String pkg) {
}

public boolean isOutsidePackageVisible(String pkg) {
if (!isXposedEnabled() || isTaiChiInstalled()) {
if (!isXposedEnabled()) {
PackageManager unHookPackageManager = getUnHookPackageManager();
try {
unHookPackageManager.getPackageInfo(pkg, 0);
Expand All @@ -408,21 +407,6 @@ public boolean isOutsidePackageVisible(String pkg) {
}
}

private boolean isTaiChiInstalled() {
if (taichiInstalled != null) {
return taichiInstalled;
}

try {
getUnHookPackageManager().getPackageInfo(TAICHI_PACKAGE, 0);
taichiInstalled = true;
} catch (PackageManager.NameNotFoundException e) {
taichiInstalled = false;
}

return taichiInstalled;
}

public boolean isXposedEnabled() {
return !VirtualCore.get().getContext().getFileStreamPath(".disable_xposed").exists();
}
Expand Down

0 comments on commit 4aa9b45

Please sign in to comment.