Skip to content

Commit

Permalink
支持uri
Browse files Browse the repository at this point in the history
  • Loading branch information
nnjun committed May 23, 2021
1 parent 3b1f671 commit efc3907
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Bcore/src/main/java/top/niunaijun/blackbox/BlackDexCore.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package top.niunaijun.blackbox;

import android.content.Context;
import android.net.Uri;

import java.io.File;

Expand Down Expand Up @@ -51,6 +52,15 @@ public boolean dumpDex(File file) {
}
}

public boolean dumpDex(Uri file) {
InstallResult installResult = BlackBoxCore.get().installPackage(file);
if (installResult.success) {
return BlackBoxCore.get().launchApk(installResult.packageName);
} else {
return false;
}
}

public void registerDumpMonitor(IBDumpMonitor monitor) {
BlackBoxCore.getBDumpManager().registerMonitor(monitor.asBinder());
}
Expand Down

0 comments on commit efc3907

Please sign in to comment.