mirror of
				https://git.tardis.systems/mirrors/yuzu
				synced 2025-11-03 20:24:43 +01:00 
			
		
		
		
	android: Export PiP receiver on API 33 and later
Could cause crashes on API 33+ devices
This commit is contained in:
		
							parent
							
								
									4d28e60694
								
							
						
					
					
						commit
						e3c546a1ed
					
				@ -3,6 +3,7 @@
 | 
			
		||||
 | 
			
		||||
package org.yuzu.yuzu_emu.activities
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint
 | 
			
		||||
import android.app.Activity
 | 
			
		||||
import android.app.PendingIntent
 | 
			
		||||
import android.app.PictureInPictureParams
 | 
			
		||||
@ -397,6 +398,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @SuppressLint("UnspecifiedRegisterReceiverFlag")
 | 
			
		||||
    override fun onPictureInPictureModeChanged(
 | 
			
		||||
        isInPictureInPictureMode: Boolean,
 | 
			
		||||
        newConfig: Configuration
 | 
			
		||||
@ -409,7 +411,11 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
 | 
			
		||||
                addAction(actionMute)
 | 
			
		||||
                addAction(actionUnmute)
 | 
			
		||||
            }.also {
 | 
			
		||||
                registerReceiver(pictureInPictureReceiver, it)
 | 
			
		||||
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
 | 
			
		||||
                    registerReceiver(pictureInPictureReceiver, it, RECEIVER_EXPORTED)
 | 
			
		||||
                } else {
 | 
			
		||||
                    registerReceiver(pictureInPictureReceiver, it)
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            try {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user