diff --git a/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java b/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java index 6914d8d0b..fa761d83c 100644 --- a/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java +++ b/app/src/main/java/com/shayu/phonelive/NeverCrashUtils.java @@ -5,9 +5,7 @@ import android.os.Handler; import android.os.Looper; import android.util.Log; import android.widget.Toast; - import com.yunbao.common.utils.FileUtil; - import java.io.File; import java.io.PrintWriter; import java.io.StringWriter; diff --git a/app/src/main/java/com/shayu/phonelive/utils/CustomMessageReceiver.java b/app/src/main/java/com/shayu/phonelive/utils/CustomMessageReceiver.java index 7da523062..e5776571b 100644 --- a/app/src/main/java/com/shayu/phonelive/utils/CustomMessageReceiver.java +++ b/app/src/main/java/com/shayu/phonelive/utils/CustomMessageReceiver.java @@ -157,7 +157,12 @@ public class CustomMessageReceiver extends PushMessageReceiver { // 设置通知的点击行为:这里启动一个 Activity Intent intent = new Intent(context, MainActivity.class); intent.setFlags(FLAG_ACTIVITY_CLEAR_TOP); - PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); + PendingIntent pendingIntent; + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) { + pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE); + } else { + pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT); + } String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH); // 构建 remoteView RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layout.notification_message); diff --git a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java index 0b9fd5630..e97a16d76 100644 --- a/main/src/main/java/com/yunbao/main/activity/EntryActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EntryActivity.java @@ -122,7 +122,7 @@ public class EntryActivity extends AppCompatActivity { private TwitterLoginButton tt_login_button; public static Activity activity; private static String mLoginType = Constants.MOB_PHONE;//登录方式 - private String mPromoCode = "";//推广码 + public String mPromoCode = "";//推广码 private String mUuidDevice = "";//手机唯一标识符 private static boolean mFirstLogin;//是否是第一次登录 private static boolean mShowInvite;//显示邀请码弹窗 @@ -672,8 +672,9 @@ public class EntryActivity extends AppCompatActivity { */ private void loginBuyThird(LoginData data) { mLoginType = data.getType(); - - + if(CommonAppConfig.IS_GOOGLE_PLAY==true) { + mPromoCode = ""; + } MainHttpUtil.loginByThird(data.getOpenID(), mPromoCode, mUuidDevice, data.getNickName(), data.getAvatar(), data.getType(), new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) {