Commit cf4b3140 authored by fallenstardust's avatar fallenstardust

不在logoActivity申请权限

parent 9c7bb047
package cn.garymb.ygomobile.ui.activities; package cn.garymb.ygomobile.ui.activities;
import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
...@@ -12,7 +13,7 @@ import cn.garymb.ygomobile.YGOStarter; ...@@ -12,7 +13,7 @@ import cn.garymb.ygomobile.YGOStarter;
import cn.garymb.ygomobile.lite.R; import cn.garymb.ygomobile.lite.R;
import cn.garymb.ygomobile.ui.home.MainActivity; import cn.garymb.ygomobile.ui.home.MainActivity;
public class LogoActivity extends BaseActivity { public class LogoActivity extends Activity {
Handler handler; Handler handler;
Runnable runnable; Runnable runnable;
...@@ -25,20 +26,6 @@ public class LogoActivity extends BaseActivity { ...@@ -25,20 +26,6 @@ public class LogoActivity extends BaseActivity {
YGOStarter.startGame(this, null); YGOStarter.startGame(this, null);
finish(); finish();
return; return;
}
if (!isTaskRoot()) {
finish();
return;
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
// 拒绝时, 关闭页面, 缺少主要权限, 无法运行
if (requestCode == REQUEST_PERMISSIONS && resultCode == PermissionsActivity.PERMISSIONS_DENIED) {
finish();
} else { } else {
handler = new Handler(); handler = new Handler();
runnable = new Runnable() { runnable = new Runnable() {
...@@ -51,6 +38,11 @@ public class LogoActivity extends BaseActivity { ...@@ -51,6 +38,11 @@ public class LogoActivity extends BaseActivity {
handler.postDelayed(runnable, 1000); handler.postDelayed(runnable, 1000);
Toast.makeText(LogoActivity.this, R.string.logo_text, Toast.LENGTH_SHORT).show(); Toast.makeText(LogoActivity.this, R.string.logo_text, Toast.LENGTH_SHORT).show();
} }
if (!isTaskRoot()) {
finish();
return;
}
} }
protected void hideBottomUIMenu() { protected void hideBottomUIMenu() {
......
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