diff --git a/app/build.gradle b/app/build.gradle
index 71f7b62..105ed2a 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -17,8 +17,8 @@ android {
applicationId "io.virtualapp.sandvxposed"
minSdkVersion 19
targetSdkVersion 28
- versionCode 77
- versionName "1.2.5.1.3.1.6.0"
+ versionCode 79
+ versionName "1.2.5.1.3.1.6.2"
multiDexEnabled true
android {
defaultConfig {
diff --git a/app/debug/output.json b/app/debug/output.json
new file mode 100644
index 0000000..08ac03d
--- /dev/null
+++ b/app/debug/output.json
@@ -0,0 +1 @@
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":79,"versionName":"1.2.5.1.3.1.6.2","enabled":true,"outputFile":"app-debug.apk","fullName":"debug","baseName":"debug","dirName":""},"path":"app-debug.apk","properties":{}}]
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 8c1b7c9..fa44018 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -23,7 +23,17 @@
+ android:launchMode="singleInstance"
+ android:theme="@style/ShowWallpaper">
+
+
+
+
+
+
+
+
+
-
-
@@ -138,14 +146,6 @@
android:name=".splash.SplashActivity"
android:excludeFromRecents="true"
android:theme="@style/AppTheme">
-
-
-
-
-
-
-
-
finish())
.create().show();
- } else if (!Once.beenDone("appchoose_act_tips"))
+ }
+ else if (!Once.beenDone("appchoose_act_tips"))
{
new AlertDialog.Builder(this)
.setTitle(R.string.about)
@@ -56,7 +66,7 @@ private void setupChooseAct()
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("*/*");//设置类型,我这里是任意类型,任意后缀的可以这样写。
intent.addCategory(Intent.CATEGORY_OPENABLE);
- startActivityForResult(intent, 404);
+ startActivityForResult(intent, requestSAFCode);
})
.create().show();
} else
@@ -64,7 +74,7 @@ private void setupChooseAct()
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("*/*");//设置类型,我这里是任意类型,任意后缀的可以这样写。
intent.addCategory(Intent.CATEGORY_OPENABLE);
- startActivityForResult(intent, 404);
+ startActivityForResult(intent, requestSAFCode);
}
}catch (Throwable e)
{
@@ -76,7 +86,14 @@ private void setupChooseAct()
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
+ try{
+ setTheme(R.style.Translucent_NoTitle);
+ }catch (Exception e)
+ {
+ e.printStackTrace();
+ }
setContentView(R.layout.activity_app_choose);
+ /*
AlertDialog.Builder hBuilder = new AlertDialog.Builder(this);
hBuilder.setMessage(R.string.use_sk_installer);
hBuilder.setTitle(R.string.SK_Settings);
@@ -93,6 +110,9 @@ protected void onCreate(Bundle savedInstanceState)
})
.setCancelable(true)
.create().show();
+ */
+
+ setupChooseAct();
}
@Override
@@ -214,8 +234,13 @@ else if ("file".equalsIgnoreCase(uri.getScheme())) {
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
- String path;
+ String path = "";
Uri uri = null;
+ if(requestCode!=requestSAFCode||resultCode!=RESULT_OK)
+ {
+ finish();
+ return;
+ }
if (data != null)
{
try
@@ -238,6 +263,7 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable Inten
finish();
return;
}
+ /*
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) {//4.4以后
try
{
@@ -270,22 +296,47 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable Inten
finish();
return;
}
- if (useSKInstaller)
+ */
+
+ // 推荐使用安装器安装,选项更多
+ final Uri finalUri = uri;
+ final ZLoadingDialog zLoadingDialog = new ZLoadingDialog(this);
+ zLoadingDialog.setHintTextColor(Color.BLACK);
+ zLoadingDialog.setCancelable(false);
+ zLoadingDialog.setLoadingBuilder(Z_TYPE.MUSIC_PATH);
+ zLoadingDialog.setHintText("Loading");
+ zLoadingDialog.show();
+ new Thread(()->
{
- // 推荐使用安装器安装,选项更多
try
{
- Intent lpInstaller = new Intent(VirtualCore.get().getContext(), InstallPkgAct.class);
- lpInstaller.setData(Uri.parse(path));
+ File hFile = BufferUtils.fromUriToBuffer(this,finalUri);
+ Intent lpInstaller = new Intent(this, InstallPkgAct.class);
+ lpInstaller.putExtra("apk_path",hFile.getAbsolutePath());
startActivity(lpInstaller);
setResult(0x0);
} catch (Throwable e)
{
e.printStackTrace();
}
+ runOnUiThread(()->
+ {
+ zLoadingDialog.dismiss();
+ finish();
+ });
+ }).start();
+ /*
+ if(pActParent!=null)
if(pActParent.getActivity()!=null)
+ {
pActParent.getActivity().finish();
+ pActParent = null;
+ }
+ */
+ /*
+ if (useSKInstaller)
+ {
}
else
{
@@ -301,7 +352,7 @@ protected void onActivityResult(int requestCode, int resultCode, @Nullable Inten
e.printStackTrace();
}
}
- finish();
+ */
}
@Override
diff --git a/app/src/main/res/drawable/ic_close.xml b/app/src/main/res/drawable/ic_close.xml
new file mode 100644
index 0000000..db646c8
--- /dev/null
+++ b/app/src/main/res/drawable/ic_close.xml
@@ -0,0 +1,12 @@
+
+
+
+
diff --git a/app/src/main/res/layout/activity_install_pkg.xml b/app/src/main/res/layout/activity_install_pkg.xml
index 2bad105..3173e01 100644
--- a/app/src/main/res/layout/activity_install_pkg.xml
+++ b/app/src/main/res/layout/activity_install_pkg.xml
@@ -6,7 +6,7 @@
android:layout_height="match_parent"
tools:context="com.sk.installapp.InstallPkgAct">
-
@@ -19,7 +19,7 @@
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
-
+
@@ -33,7 +33,6 @@
android:text="@string/package_installer"
android:layout_gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
- android:textColor="@color/mainTextColor"
android:textSize="30sp" />
+ app:z_color="@color/colorPrimaryDark"/>
+
+
+ app:srcCompat="@drawable/ic_close" />