admin 1 tahun lalu
induk
melakukan
16003ff50b

+ 3 - 3
app/build.gradle

@@ -8,13 +8,13 @@ plugins {
 }
 
 android {
-    compileSdkVersion 31
-    buildToolsVersion "31.0.0"
+    compileSdkVersion 33
+    buildToolsVersion "33.0.2"
 
     defaultConfig {
         applicationId "com.swago.app"
         minSdkVersion 21
-        targetSdkVersion 31
+        targetSdkVersion 33
         versionCode 1201
         versionName "1.2.0.1"
         multiDexEnabled true

+ 4 - 0
app/src/main/AndroidManifest.xml

@@ -20,6 +20,10 @@
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
     <uses-permission android:name="android.permission.VIBRATE"/>
+    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
+    <uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
+    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
+    <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
 
     <application
         android:name=".SwagoApp"

+ 5 - 5
baseswago/build.gradle

@@ -5,12 +5,12 @@ plugins {
 }
 
 android {
-    compileSdkVersion 31
-    buildToolsVersion "31.0.0"
+    compileSdkVersion 33
+    buildToolsVersion "33.0.2"
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 31
+        targetSdkVersion 33
         versionCode 1
         versionName "1.0"
 
@@ -98,7 +98,7 @@ dependencies {
     api 'com.github.Zhao-Yan-Yan:MultiStatePage:2.0.2'
     api "de.hdodenhof:circleimageview:3.1.0"
     api 'top.zibin:Luban:1.1.8'
-    api 'com.github.HuanTanSheng:EasyPhotos:3.1.3'
+    api 'com.gitee.hhqhonghengqiang:easy-photos:3.1.8'
     //facebook`
     api 'com.facebook.android:facebook-android-sdk:14.1.0'
     //google
@@ -108,7 +108,7 @@ dependencies {
     //agora
     api "io.agora.rtc:full-rtc-basic:3.7.0.2"
     //支付
-    api 'com.android.billingclient:billing-ktx:4.1.0'
+    api 'com.android.billingclient:billing-ktx:5.2.0'
     //抓包
     debugImplementation "com.github.chuckerteam.chucker:library:3.5.2"
     releaseImplementation "com.github.chuckerteam.chucker:library-no-op:3.5.2"

+ 2 - 2
home/build.gradle

@@ -5,11 +5,11 @@ plugins {
 }
 
 android {
-    compileSdkVersion 31
+    compileSdkVersion 33
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 31
+        targetSdkVersion 33
         versionCode 1
         versionName "1.0"
 

+ 2 - 2
lib_country_picker/build.gradle

@@ -4,11 +4,11 @@ plugins {
 }
 
 android {
-    compileSdkVersion 31
+    compileSdkVersion 33
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 31
+        targetSdkVersion 33
         versionCode 1
         versionName "1.0"
 

+ 2 - 2
login/build.gradle

@@ -5,11 +5,11 @@ plugins {
 }
 
 android {
-    compileSdkVersion 31
+    compileSdkVersion 33
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 31
+        targetSdkVersion 33
         versionCode 1
         versionName "1.0"
 

+ 2 - 2
room/build.gradle

@@ -5,11 +5,11 @@ plugins {
 }
 
 android {
-    compileSdkVersion 31
+    compileSdkVersion 33
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 31
+        targetSdkVersion 33
         versionCode 1
         versionName "1.0"
 

+ 36 - 15
room/src/main/java/com/swago/room/anchor/AnchorRoomActivity.kt

@@ -1,30 +1,28 @@
 package com.swago.room.anchor
 
+import android.Manifest
 import android.content.Intent
-import android.os.Bundle
-import android.util.Log
+import android.os.Build
 import android.view.View
 import android.view.ViewGroup
 import android.view.WindowManager
+import android.widget.Toast
 import androidx.activity.viewModels
 import androidx.constraintlayout.widget.ConstraintLayout
 import androidx.core.content.ContextCompat
 import androidx.lifecycle.lifecycleScope
-import androidx.recyclerview.widget.LinearLayoutManager
-import androidx.recyclerview.widget.RecyclerView
 import com.alibaba.android.arouter.facade.annotation.Route
 import com.gyf.immersionbar.ImmersionBar
+import com.permissionx.guolindev.PermissionX
 import com.swago.baseswago.SwagoAdapter
 import com.swago.baseswago.agora.AgoraManager
 import com.swago.baseswago.agora.ISwagoIRtcEngineEventHandler
 import com.swago.baseswago.baseroom.IRoomInfo
-import com.swago.baseswago.baseroom.RoleType
 import com.swago.baseswago.baseroom.SwagoRoomManager
 import com.swago.baseswago.baseroom.ui.AbsAnchorActivity
 import com.swago.baseswago.constant.ARouteConstant
 import com.swago.baseswago.dialog.ChoiceDialogFragment
 import com.swago.baseswago.model.live.audio.AudioBg
-import com.swago.baseswago.model.live.audio.AudioBgModel
 import com.swago.baseswago.model.live.audio.AudioSeatModel
 import com.swago.baseswago.model.live.audio.IMAudioModel
 import com.swago.baseswago.model.live.pk.ProcessPKModel
@@ -35,10 +33,8 @@ import com.swago.baseswago.util.AppContext
 import com.swago.baseswago.util.DpPxUtil
 import com.swago.baseswago.util.NoDoubleClickListener
 import com.swago.baseswago.util.UserInfo
-import com.swago.loadUrl
 import com.swago.loadUrlNoPlaceHolder
 import com.swago.room.R
-import com.swago.room.adapter.GameAdapter
 import com.swago.room.audio.AudioRoomManager
 import com.swago.room.audio.IAudioRoomListener
 import com.swago.room.base.NoContentFragment
@@ -179,13 +175,38 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
 
         binding.tvStartLive.setOnClickListener(object : NoDoubleClickListener() {
             override fun onClick() {
-                binding.tvStartLive.isEnabled = false
-                val userModel = UserRoomModel()
-                userModel.roomType = roomType
-                userModel.selectedBgUrl = selectedBgUrl
-                SwagoRoomManager.changeRoom(userModel)
-                if (roomType == RoomType.VIDEO){
-                    anchorRoomFragment?.setAudioRvState(false)
+
+                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU){
+                    PermissionX.init(this@AnchorRoomActivity)
+                        .permissions(Manifest.permission.POST_NOTIFICATIONS)
+                        .request { allGranted, grantedList, deniedList ->
+                            if (allGranted) {
+                                binding.tvStartLive.isEnabled = false
+                                val userModel = UserRoomModel()
+                                userModel.roomType = roomType
+                                userModel.selectedBgUrl = selectedBgUrl
+                                SwagoRoomManager.changeRoom(userModel)
+                                if (roomType == RoomType.VIDEO){
+                                    anchorRoomFragment?.setAudioRvState(false)
+                                }
+                            } else {
+                                binding.tvStartLive.isEnabled = true
+                                Toast.makeText(
+                                    AppContext.getContext(),
+                                    "These permissions are denied: $deniedList",
+                                    Toast.LENGTH_LONG
+                                ).show()
+                            }
+                        }
+                }else{
+                    binding.tvStartLive.isEnabled = false
+                    val userModel = UserRoomModel()
+                    userModel.roomType = roomType
+                    userModel.selectedBgUrl = selectedBgUrl
+                    SwagoRoomManager.changeRoom(userModel)
+                    if (roomType == RoomType.VIDEO){
+                        anchorRoomFragment?.setAudioRvState(false)
+                    }
                 }
             }
         })

+ 8 - 8
room/src/main/java/com/swago/room/audio/widget/AudioContainGiftView.kt

@@ -127,19 +127,19 @@ class AudioContainGiftView : ConstraintLayout, IRoomActiveListener {
                 allAnimationSetList.add(animatorSet)
 
                 animatorSet.addListener(object: Animator.AnimatorListener{
-                    override fun onAnimationStart(animation: Animator?) {
+                    override fun onAnimationStart(animation: Animator) {
                     }
 
-                    override fun onAnimationEnd(animation: Animator?) {
+                    override fun onAnimationEnd(animation: Animator) {
                         currentModel = null
                         isBusy = false
                     }
 
-                    override fun onAnimationCancel(animation: Animator?) {
+                    override fun onAnimationCancel(animation: Animator) {
 
                     }
 
-                    override fun onAnimationRepeat(animation: Animator?) {}
+                    override fun onAnimationRepeat(animation: Animator) {}
 
                 })
             }else{
@@ -196,19 +196,19 @@ class AudioContainGiftView : ConstraintLayout, IRoomActiveListener {
                     allAnimationSetList.add(animatorSet)
 
                     animatorSet.addListener(object: Animator.AnimatorListener{
-                        override fun onAnimationStart(animation: Animator?) {
+                        override fun onAnimationStart(animation: Animator) {
                         }
 
-                        override fun onAnimationEnd(animation: Animator?) {
+                        override fun onAnimationEnd(animation: Animator) {
                             currentModel = null
                             isBusy = false
                         }
 
-                        override fun onAnimationCancel(animation: Animator?) {
+                        override fun onAnimationCancel(animation: Animator) {
 
                         }
 
-                        override fun onAnimationRepeat(animation: Animator?) {}
+                        override fun onAnimationRepeat(animation: Animator) {}
 
                     })
                 }

+ 4 - 4
room/src/main/java/com/swago/room/gift/control/SvgDanDaoView.kt

@@ -98,20 +98,20 @@ class SvgDanDaoView : ConstraintLayout {
         innerAnimatorSet.play(stayAnimal)
 
         innerAnimatorSet.addListener(object : Animator.AnimatorListener {
-            override fun onAnimationRepeat(animation: Animator?) {
+            override fun onAnimationRepeat(animation: Animator) {
             }
 
-            override fun onAnimationEnd(animation: Animator?) {
+            override fun onAnimationEnd(animation: Animator) {
                 binding?.marqueeTextView?.stopScroll()
                 cl.visibility = View.GONE
                 animatorSet = null
                 loopNextWaft()
             }
 
-            override fun onAnimationCancel(animation: Animator?) {
+            override fun onAnimationCancel(animation: Animator) {
             }
 
-            override fun onAnimationStart(animation: Animator?) {
+            override fun onAnimationStart(animation: Animator) {
             }
         })
 

+ 2 - 0
room/src/main/java/com/swago/room/giftdandao/GiftDanDaoView.kt

@@ -379,6 +379,8 @@ class GiftDanDaoView : FrameLayout {
             vibrator?.cancel()
             binding!!.clWinPrize.visibility = View.INVISIBLE
             binding!!.tvWinPrize.text = ""
+            binding!!.svgaWinPrize.visibility = View.INVISIBLE
+            binding!!.tvWinPrize2.text = ""
         }
     }
 

+ 4 - 4
room/src/main/java/com/swago/room/manager/JoinRoomManager.kt

@@ -209,11 +209,11 @@ class JoinRoomManager : IRoomActiveListener {
                     .after(joinRoomObjectAnimator)
                     .after(4000)
                 animationSet.addListener(object : Animator.AnimatorListener {
-                    override fun onAnimationStart(p0: Animator?) {
+                    override fun onAnimationStart(p0: Animator) {
                         joinRoomRootView?.visibility = View.VISIBLE
                     }
 
-                    override fun onAnimationEnd(p0: Animator?) {
+                    override fun onAnimationEnd(p0: Animator) {
                         svgaImageView?.apply {
                             if (isAnimating){
                                 stopAnimation()
@@ -223,10 +223,10 @@ class JoinRoomManager : IRoomActiveListener {
                         isRunning = false
                     }
 
-                    override fun onAnimationCancel(p0: Animator?) {
+                    override fun onAnimationCancel(p0: Animator) {
                     }
 
-                    override fun onAnimationRepeat(p0: Animator?) {
+                    override fun onAnimationRepeat(p0: Animator) {
                     }
                 })
             }

+ 4 - 4
room/src/main/java/com/swago/room/piaotiao/WaftView.kt

@@ -68,19 +68,19 @@ class WaftView : FrameLayout {
         innerAnimatorSet.playTogether(objectAnimator, stayAnimal)
 
         innerAnimatorSet.addListener(object : Animator.AnimatorListener {
-            override fun onAnimationRepeat(animation: Animator?) {
+            override fun onAnimationRepeat(animation: Animator) {
             }
 
-            override fun onAnimationEnd(animation: Animator?) {
+            override fun onAnimationEnd(animation: Animator) {
                 animatorSet = null
                 binding?.ll?.visibility = View.INVISIBLE
                 loopNextWaft()
             }
 
-            override fun onAnimationCancel(animation: Animator?) {
+            override fun onAnimationCancel(animation: Animator) {
             }
 
-            override fun onAnimationStart(animation: Animator?) {
+            override fun onAnimationStart(animation: Animator) {
                 binding?.ll?.visibility = View.VISIBLE
             }
         })

+ 2 - 0
room/src/main/res/layout/view_item_gift.xml

@@ -177,6 +177,8 @@
         android:text="Win 500x coins"
         android:textColor="#fff"
         android:textSize="11dp"
+        android:visibility="gone"
+        tools:visibility="visible"
         android:layout_width="0dp"
         android:maxLines="1"
         android:layout_height="wrap_content"/>

+ 2 - 2
tuikit/build.gradle

@@ -1,10 +1,10 @@
 apply plugin: 'com.android.library'
 android {
-    compileSdkVersion 31
+    compileSdkVersion 33
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 31
+        targetSdkVersion 33
         versionCode 1
         versionName "5.5.892"
 

+ 6 - 1
tuikit/src/main/java/com/tencent/qcloud/tim/uikit/modules/chat/layout/input/InputLayout.java

@@ -48,6 +48,7 @@ import com.tencent.qcloud.tim.uikit.utils.TUIKitLog;
 import com.tencent.qcloud.tim.uikit.utils.ToastUtil;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -347,7 +348,11 @@ public class InputLayout extends InputLayoutUI implements View.OnClickListener,
         {
             TUIKitLog.e(TAG, "MediaMetadataRetriever exception " + ex);
         } finally {
-            mmr.release();
+            try {
+                mmr.release();
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
         }
 
         return null;

+ 2 - 2
user/build.gradle

@@ -5,11 +5,11 @@ plugins {
 }
 
 android {
-    compileSdkVersion 31
+    compileSdkVersion 33
 
     defaultConfig {
         minSdkVersion 21
-        targetSdkVersion 31
+        targetSdkVersion 33
         versionCode 1
         versionName "1.0"