From d63f5f5ab2c06a7e79b5ebd964becf5c6f0e7589 Mon Sep 17 00:00:00 2001 From: juntao Date: Tue, 4 Aug 2020 10:01:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B9=BF=E7=82=B9=E9=80=9A?= =?UTF-8?q?=E6=BF=80=E6=B4=BB=E6=95=B0=E6=8D=AE=E7=9A=84=E5=8F=91=E9=80=81?= =?UTF-8?q?=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/gh/gamecenter/SplashScreenActivity.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java b/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java index e30222afbe..1ca098e4c1 100644 --- a/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java +++ b/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java @@ -171,9 +171,7 @@ public class SplashScreenActivity extends BaseActivity { } private void requestPermission() { - if (EasyPermissions.hasPermissions(this, mPermissions)) { - GdtHelper.INSTANCE.logAction(ActionType.START_APP, GdtHelper.NETWORK_TYPE, DeviceUtils.getNetwork(this)); - } else { + if (!EasyPermissions.hasPermissions(this, mPermissions)) { checkAndRequestPermission(); } } @@ -278,8 +276,9 @@ public class SplashScreenActivity extends BaseActivity { private void launchMainActivity() { getUniqueId(); - // 在可能获取了相关权限后才初始化今日头条SDK + // 在可能获取了相关权限后才初始化SDK/发送激活数据 TeaHelper.init(getApplication(), HaloApp.getInstance().getChannel()); + GdtHelper.INSTANCE.logAction(ActionType.START_APP, GdtHelper.NETWORK_TYPE, DeviceUtils.getNetwork(this)); Bundle bundle = getIntent().getExtras(); Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);