Skip to content

Commit 49e1d39

Browse files
author
tiann
committed
bump version
1 parent a6a7d50 commit 49e1d39

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

VirtualApp/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ android {
2828
applicationId "io.va.exposed"
2929
minSdkVersion 21
3030
targetSdkVersion 23
31-
versionCode 130
32-
versionName "0.13.0"
31+
versionCode 140
32+
versionName "0.14.0"
3333
multiDexEnabled false
3434
android {
3535
defaultConfig {

VirtualApp/app/src/main/java/io/virtualapp/home/NewHomeActivity.java

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import android.content.Context;
99
import android.content.Intent;
1010
import android.content.SharedPreferences;
11+
import android.graphics.Color;
1112
import android.graphics.drawable.BitmapDrawable;
1213
import android.graphics.drawable.Drawable;
1314
import android.net.Uri;
@@ -20,10 +21,14 @@
2021
import android.provider.Settings;
2122
import android.text.TextUtils;
2223
import android.util.Log;
24+
import android.util.TypedValue;
2325
import android.view.KeyEvent;
2426
import android.view.View;
2527
import android.view.Window;
2628
import android.view.WindowManager;
29+
import android.widget.CheckBox;
30+
import android.widget.LinearLayout;
31+
import android.widget.TextView;
2732
import android.widget.Toast;
2833

2934
import com.android.launcher3.LauncherFiles;
@@ -78,6 +83,7 @@ public void onCreate(Bundle savedInstanceState) {
7883
alertForMeizu();
7984
alertForDoze();
8085
mDirectlyBack = sharedPreferences.getBoolean(SettingsActivity.DIRECTLY_BACK_KEY, false);
86+
alertForExp();
8187
}
8288

8389
private void installXposed() {
@@ -251,6 +257,61 @@ private void alertForMeizu() {
251257
}, 2000);
252258
}
253259

260+
protected int dp2px(float dp) {
261+
final float scale = getResources().getDisplayMetrics().density;
262+
return (int) (dp * scale + 0.5f);
263+
}
264+
265+
private void alertForExp() {
266+
final String shown = "_exp_has_alert";
267+
boolean aBoolean = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(shown, false);
268+
if (aBoolean) {
269+
return;
270+
}
271+
272+
LinearLayout layout = new LinearLayout(this);
273+
layout.setOrientation(LinearLayout.VERTICAL);
274+
275+
int _20dp = dp2px(20);
276+
layout.setPadding(_20dp, _20dp, _20dp, _20dp);
277+
278+
TextView tv = new TextView(this);
279+
tv.setTextColor(Color.BLACK);
280+
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
281+
tv.setText(R.string.exp_tips);
282+
layout.addView(tv);
283+
284+
CheckBox checkBox = new CheckBox(this);
285+
checkBox.setText("不再提示");
286+
checkBox.setOnClickListener(v -> {
287+
if (checkBox.isChecked()) {
288+
PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).edit().putBoolean(shown, true).apply();
289+
}
290+
});
291+
292+
layout.addView(checkBox);
293+
mUiHandler.postDelayed(() -> {
294+
AlertDialog alertDialog = new AlertDialog.Builder(getContext())
295+
.setTitle("关于新项目EXP的说明")
296+
.setView(layout)
297+
.setPositiveButton("查看详情说明", (dialog, which) -> {
298+
Intent t = new Intent(Intent.ACTION_VIEW);
299+
t.setData(Uri.parse("https://vxposed.com/exp.html"));
300+
startActivity(t);
301+
}).setNegativeButton("支持我", (dialog, which) -> {
302+
Intent t = new Intent(Intent.ACTION_VIEW);
303+
t.setData(Uri.parse("https://vxposed.com/donate.html"));
304+
startActivity(t);
305+
})
306+
.create();
307+
try {
308+
alertDialog.show();
309+
310+
} catch (Throwable ignored) {
311+
}
312+
}, 2000);
313+
}
314+
254315
private void alertForDoze() {
255316
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
256317
return;

VirtualApp/app/src/main/res/values/strings.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,10 @@
166166
<string name="install_file_manager_tips">File Manager is supported by Amaze File Manager, download(about 3M) and install it now?</string>
167167
<string name="settings_permission_manage_text">Permission Manage</string>
168168
<string name="install_permission_manager_tips">Permission Manage is implemented by XPrivacyLua, download(about 1.7M) and install it now?</string>
169+
<string name="exp_tips">VirtualXposed 自去年诞生以来,已经经历了相当一段时间;在项目的演进过程中,逐渐发现它的一些不足。\n因此我产生了从另外换一种方式实现免ROOT Xposed功能的想法,我把它称之为 E-Xposed,简称EXP;简单来说,它有如下特性:\n\n
170+
171+
1. 不再使用双开。\n
172+
2. 直接运行原始APP。\n
173+
3. 不易被检测。\n
174+
</string>
169175
</resources>

0 commit comments

Comments
 (0)