Commit 431b0412 authored by fallenstardust's avatar fallenstardust Committed by GitHub

Merge pull request #29 from mercury233/patch-fix-duelassistant

fix DuelAssiatant tip
parents bab397c8 df26e5b2
......@@ -198,14 +198,16 @@ public class MainActivity extends HomeActivity {
dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
PermissionUtil.isServicePermission(MainActivity.this, true);
if (AppsSettings.get().isServiceDuelAssistant())
PermissionUtil.isServicePermission(MainActivity.this, true);
}
});
dialog.show();
}
} else {
PermissionUtil.isServicePermission(MainActivity.this, true);
if (AppsSettings.get().isServiceDuelAssistant())
PermissionUtil.isServicePermission(MainActivity.this, true);
getGameUriManager().doIntent(getIntent());
}
}
......
......@@ -44,6 +44,7 @@ import cn.garymb.ygomobile.ui.preference.PreferenceFragmentPlus;
import cn.garymb.ygomobile.utils.FileUtils;
import cn.garymb.ygomobile.utils.IOUtils;
import cn.garymb.ygomobile.utils.SystemUtils;
import cn.garymb.ygomobile.utils.PermissionUtil;
import ocgcore.ConfigManager;
import ocgcore.DataManager;
......@@ -193,6 +194,7 @@ public class SettingFragment extends PreferenceFragmentPlus {
//开关决斗助手
if (preference.getKey().equals(PREF_START_SERVICEDUELASSISTANT)) {
if (checkBoxPreference.isChecked()) {
PermissionUtil.isServicePermission(getActivity(), true);
getActivity().startService(new Intent(getActivity(), ServiceDuelAssistant.class));
} else {
getActivity().stopService(new Intent(getActivity(), ServiceDuelAssistant.class));
......
......@@ -217,8 +217,8 @@
\n之后快捷加房时就会加入置顶的服务器
\n使用此功能须开启本软件悬浮窗
\n并确保本软件后台运行中</string>
<string name="EXPAND_STATUS_BAR">需要开启通知权限\n开启通知权限才能正常使用功能</string>
<string name="SYSTEM_ALERT_WINDOW">需要开启悬浮窗权限\n开启悬浮窗权限才能正常使用功能</string>
<string name="EXPAND_STATUS_BAR">需要开启通知权限\n开启权限才能正常使用决斗助手功能</string>
<string name="SYSTEM_ALERT_WINDOW">需要开启悬浮窗权限\n开启权限才能正常使用决斗助手功能</string>
<string name="OpenTIP">快捷加房使用方法</string>
<string name="Open_Alert_Window">去打开悬浮窗</string>
<string name="Function_Menu">功能菜单</string>
......
......@@ -218,8 +218,8 @@
\nthen join helper will acquiescently start in it
\npls click to APP permission to find me and open the "Pop-ups"
\nand keep the soft run in the background</string>
<string name="EXPAND_STATUS_BAR">Apply expand status bar\n then soft will work normally</string>
<string name="SYSTEM_ALERT_WINDOW">Apply Display over other APPs\n then soft will work normally</string>
<string name="EXPAND_STATUS_BAR">Apply expand status bar\n then DuelAssiatant will work normally</string>
<string name="SYSTEM_ALERT_WINDOW">Apply Display over other APPs\n then DuelAssiatant will work normally</string>
<string name="OpenTIP">about Quick Join in Game</string>
<string name="Open_Alert_Window">To Open Pop-ups</string>
<string name="Function_Menu">MENU</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment