admin 1 yıl önce
ebeveyn
işleme
bed2a35529

+ 1 - 10
.idea/compiler.xml

@@ -1,15 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="CompilerConfiguration">
-    <bytecodeTargetLevel target="11">
-      <module name="Swago.app" target="16" />
-      <module name="Swago.baseswago" target="16" />
-      <module name="Swago.home" target="16" />
-      <module name="Swago.lib_country_picker" target="16" />
-      <module name="Swago.login" target="16" />
-      <module name="Swago.room" target="16" />
-      <module name="Swago.tuikit" target="16" />
-      <module name="Swago.user" target="16" />
-    </bytecodeTargetLevel>
+    <bytecodeTargetLevel target="17" />
   </component>
 </project>

+ 1 - 1
.idea/gradle.xml

@@ -7,7 +7,7 @@
         <option name="testRunner" value="GRADLE" />
         <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
-        <option name="gradleJvm" value="#JAVA_HOME" />
+        <option name="gradleJvm" value="jbr-17" />
         <option name="modules">
           <set>
             <option value="$PROJECT_DIR$" />

+ 6 - 0
.idea/kotlinc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="KotlinJpsPluginSettings">
+    <option name="version" value="1.7.10" />
+  </component>
+</project>

+ 5 - 5
app/build.gradle

@@ -8,15 +8,15 @@ plugins {
 }
 
 android {
-    compileSdkVersion 31
-    buildToolsVersion "31.0.0"
+    compileSdkVersion 33
+    buildToolsVersion "33.0.2"
 
     defaultConfig {
         applicationId "com.swagolite.app"
         minSdkVersion 21
-        targetSdkVersion 31
-        versionCode 1003
-        versionName "1.0.0.3"
+        targetSdkVersion 33
+        versionCode 1004
+        versionName "1.0.0.4"
         multiDexEnabled true
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
 

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

@@ -21,6 +21,11 @@
     <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"
         android:allowBackup="false"

+ 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 - 6
room/src/main/java/com/swago/room/anchor/AnchorRoomActivity.kt

@@ -1,11 +1,14 @@
 package com.swago.room.anchor
 
+import android.Manifest
 import android.content.Intent
+import android.os.Build
 import android.os.Bundle
 import android.util.Log
 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
@@ -14,6 +17,7 @@ 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
@@ -155,13 +159,39 @@ class AnchorRoomActivity : AbsAnchorActivity<ActivityAnchorRoomBinding, IRoomInf
 
         binding.tvStartLive.setOnClickListener(object : NoDoubleClickListener() {
             override fun onClick() {
-                binding.tvStartLive.isEnabled = false
-                val userModel = UserRoomModel()
-                userModel.roomType = roomType
-                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
+                                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
+                    SwagoRoomManager.changeRoom(userModel)
+                    if (roomType == RoomType.VIDEO){
+                        anchorRoomFragment?.setAudioRvState(false)
+                    }
                 }
+
+
+
             }
         })
         binding.ivClose.setOnClickListener(object : NoDoubleClickListener() {

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

@@ -126,19 +126,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

@@ -78,20 +78,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) {
             }
         })
 

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

@@ -170,19 +170,19 @@ 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) {
                         joinRoomRootView?.visibility = View.INVISIBLE
                         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 - 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"
 

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

@@ -347,7 +347,11 @@ public class InputLayout extends InputLayoutUI implements View.OnClickListener,
         {
             TUIKitLog.e(TAG, "MediaMetadataRetriever exception " + ex);
         } finally {
-            mmr.release();
+            try {
+                mmr.release();
+            }catch (Exception 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"