Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Aug 30, 2018
1 parent a6a7d50 commit 49e1d39
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
4 changes: 2 additions & 2 deletions VirtualApp/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {
applicationId "io.va.exposed"
minSdkVersion 21
targetSdkVersion 23
versionCode 130
versionName "0.13.0"
versionCode 140
versionName "0.14.0"
multiDexEnabled false
android {
defaultConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
Expand All @@ -20,10 +21,14 @@
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import android.util.TypedValue;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.android.launcher3.LauncherFiles;
Expand Down Expand Up @@ -78,6 +83,7 @@ public void onCreate(Bundle savedInstanceState) {
alertForMeizu();
alertForDoze();
mDirectlyBack = sharedPreferences.getBoolean(SettingsActivity.DIRECTLY_BACK_KEY, false);
alertForExp();
}

private void installXposed() {
Expand Down Expand Up @@ -251,6 +257,61 @@ private void alertForMeizu() {
}, 2000);
}

protected int dp2px(float dp) {
final float scale = getResources().getDisplayMetrics().density;
return (int) (dp * scale + 0.5f);
}

private void alertForExp() {
final String shown = "_exp_has_alert";
boolean aBoolean = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(shown, false);
if (aBoolean) {
return;
}

LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);

int _20dp = dp2px(20);
layout.setPadding(_20dp, _20dp, _20dp, _20dp);

TextView tv = new TextView(this);
tv.setTextColor(Color.BLACK);
tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 16);
tv.setText(R.string.exp_tips);
layout.addView(tv);

CheckBox checkBox = new CheckBox(this);
checkBox.setText("不再提示");
checkBox.setOnClickListener(v -> {
if (checkBox.isChecked()) {
PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).edit().putBoolean(shown, true).apply();
}
});

layout.addView(checkBox);
mUiHandler.postDelayed(() -> {
AlertDialog alertDialog = new AlertDialog.Builder(getContext())
.setTitle("关于新项目EXP的说明")
.setView(layout)
.setPositiveButton("查看详情说明", (dialog, which) -> {
Intent t = new Intent(Intent.ACTION_VIEW);
t.setData(Uri.parse("https://vxposed.com/exp.html"));
startActivity(t);
}).setNegativeButton("支持我", (dialog, which) -> {
Intent t = new Intent(Intent.ACTION_VIEW);
t.setData(Uri.parse("https://vxposed.com/donate.html"));
startActivity(t);
})
.create();
try {
alertDialog.show();

} catch (Throwable ignored) {
}
}, 2000);
}

private void alertForDoze() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
return;
Expand Down
6 changes: 6 additions & 0 deletions VirtualApp/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,10 @@
<string name="install_file_manager_tips">File Manager is supported by Amaze File Manager, download(about 3M) and install it now?</string>
<string name="settings_permission_manage_text">Permission Manage</string>
<string name="install_permission_manager_tips">Permission Manage is implemented by XPrivacyLua, download(about 1.7M) and install it now?</string>
<string name="exp_tips">VirtualXposed 自去年诞生以来,已经经历了相当一段时间;在项目的演进过程中,逐渐发现它的一些不足。\n因此我产生了从另外换一种方式实现免ROOT Xposed功能的想法,我把它称之为 E-Xposed,简称EXP;简单来说,它有如下特性:\n\n

1. 不再使用双开。\n
2. 直接运行原始APP。\n
3. 不易被检测。\n
</string>
</resources>

0 comments on commit 49e1d39

Please sign in to comment.