Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ssYanhuo committed Aug 25, 2019
1 parent b646fb7 commit 1462e50
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
/captures
.externalNativeBuild
*.jks
*.apk
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.ssyanhuo.arknightshelper"
minSdkVersion 21
targetSdkVersion 28
versionCode 4
versionName "Alpha-3.0"
versionCode 5
versionName "Alpha-3.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"Alpha-3.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":5,"versionName":"Alpha-3.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.content.ComponentName;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
Expand Down Expand Up @@ -47,8 +48,20 @@ public class MainActivity extends AppCompatActivity
implements NavigationView.OnNavigationItemSelectedListener {
final String TAG = "MainActivity";
Handler handler;
SharedPreferences sharedPreferences;
public void startEngine(View view, boolean startGame){
Snackbar.make(view, R.string.start_game, Snackbar.LENGTH_LONG).show();
sharedPreferences = getSharedPreferences("Config", MODE_PRIVATE);
if((Build.BRAND.equals("Meizu") || Build.BRAND.equals("MEIZU")) && sharedPreferences.getBoolean("firstRun", true)){
Snackbar.make(view, "魅族用户请手动前往系统设置授予应用悬浮窗权限", Snackbar.LENGTH_INDEFINITE).show();
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("firstRun", false);
editor.apply();
return;
}
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.putBoolean("firstRun", false);
editor.apply();
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
if(Settings.canDrawOverlays(getApplicationContext())){
Intent intent1 = new Intent(getApplicationContext(), BackendService.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,22 @@ public void changeFloatingWindowContent(int i){
linearLayout_hr.setVisibility(View.VISIBLE);
linearLayout_exp.setVisibility(View.GONE);
linearLayout_material.setVisibility(View.GONE);
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
windowManager.updateViewLayout(linearLayout, layoutParams);
break;
case EXP:
linearLayout_hr.setVisibility(View.GONE);
linearLayout_exp.setVisibility(View.VISIBLE);
linearLayout_material.setVisibility(View.GONE);
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
windowManager.updateViewLayout(linearLayout, layoutParams);
break;
case MATERIAL:
linearLayout_hr.setVisibility(View.GONE);
linearLayout_exp.setVisibility(View.GONE);
linearLayout_material.setVisibility(View.VISIBLE);
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
windowManager.updateViewLayout(linearLayout, layoutParams);
break;
default:
break;
Expand Down
12 changes: 4 additions & 8 deletions versioninfo
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
versionCode 4
versionName Alpha-3.0
releaseNote 增加通知栏磁贴支持(Android 7.0+)
公开招募长按结果反向查询
材料掉率查询(Beta)
添加反馈群链接(侧边栏-关于)
发现了魅族机型存在悬浮窗无法显示的情况,可在设置中手动打开悬浮窗权限,下个版本将进行修复
*Easter Egg*
versionCode 5
versionName Alpha-3.1
releaseNote 尝试修复Flyme系统无法获取悬浮窗权限的问题
尝试修复企鹅物流无法登录的问题

0 comments on commit 1462e50

Please sign in to comment.