pull/1/head
Milk 4 years ago
parent c09abb2963
commit cb48aaddae
  1. 12
      Bcore/src/main/java/top/niunaijun/blackbox/BlackBoxCore.java
  2. 7
      app/src/main/java/top/niunaijun/blackdex/MainActivity.java

@ -203,21 +203,9 @@ public class BlackBoxCore extends ClientConfiguration {
return binder; return binder;
} }
/**
* Process type
*/
private enum ProcessType { private enum ProcessType {
/**
* Server process
*/
Server, Server,
/**
* Virtual app process
*/
BAppClient, BAppClient,
/**
* Main process
*/
Main, Main,
} }

@ -4,7 +4,6 @@ import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
import android.view.View;
import java.io.File; import java.io.File;
@ -13,15 +12,12 @@ import top.niunaijun.blackbox.entity.pm.InstallResult;
public class MainActivity extends AppCompatActivity { public class MainActivity extends AppCompatActivity {
public static final String TAG = "MainActivity"; public static final String TAG = "MainActivity";
public static final int USER_ID = 0;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); setContentView(R.layout.activity_main);
findViewById(R.id.btn_click).setOnClickListener(new View.OnClickListener() { findViewById(R.id.btn_click).setOnClickListener(v -> {
@Override
public void onClick(View v) {
String hlx = "com.huluxia.gametools"; String hlx = "com.huluxia.gametools";
boolean installed = BlackBoxCore.get().isInstalled(hlx); boolean installed = BlackBoxCore.get().isInstalled(hlx);
if (!installed) { if (!installed) {
@ -29,7 +25,6 @@ public class MainActivity extends AppCompatActivity {
Log.d(TAG, "onClick: " + installResult.toString()); Log.d(TAG, "onClick: " + installResult.toString());
} }
BlackBoxCore.get().launchApk(hlx); BlackBoxCore.get().launchApk(hlx);
}
}); });
} }
} }
Loading…
Cancel
Save