Skip to content

Commit

Permalink
go
Browse files Browse the repository at this point in the history
  • Loading branch information
nnjun committed May 21, 2021
1 parent c09abb2 commit cb48aad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ lint/tmp/
*.DS_Store

# git rm -r --cached .
# git add .
# git add .
12 changes: 0 additions & 12 deletions Bcore/src/main/java/top/niunaijun/blackbox/BlackBoxCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,9 @@ public IBinder getService(String name) {
return binder;
}

/**
* Process type
*/
private enum ProcessType {
/**
* Server process
*/
Server,
/**
* Virtual app process
*/
BAppClient,
/**
* Main process
*/
Main,
}

Expand Down
19 changes: 7 additions & 12 deletions app/src/main/java/top/niunaijun/blackdex/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import android.os.Bundle;
import android.util.Log;
import android.view.View;

import java.io.File;

Expand All @@ -13,23 +12,19 @@

public class MainActivity extends AppCompatActivity {
public static final String TAG = "MainActivity";
public static final int USER_ID = 0;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
findViewById(R.id.btn_click).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String hlx = "com.huluxia.gametools";
boolean installed = BlackBoxCore.get().isInstalled(hlx);
if (!installed) {
InstallResult installResult = BlackBoxCore.get().installPackage(new File("/sdcard/huluxia.apk"));
Log.d(TAG, "onClick: " + installResult.toString());
}
BlackBoxCore.get().launchApk(hlx);
findViewById(R.id.btn_click).setOnClickListener(v -> {
String hlx = "com.huluxia.gametools";
boolean installed = BlackBoxCore.get().isInstalled(hlx);
if (!installed) {
InstallResult installResult = BlackBoxCore.get().installPackage(new File("/sdcard/huluxia.apk"));
Log.d(TAG, "onClick: " + installResult.toString());
}
BlackBoxCore.get().launchApk(hlx);
});
}
}

0 comments on commit cb48aad

Please sign in to comment.