mirror of
				https://github.com/SimpleMobileTools/Simple-Keyboard.git
				synced 2025-06-05 21:49:26 +02:00 
			
		
		
		
	lets simplify the null check
This commit is contained in:
		| @@ -749,12 +749,12 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     private fun clearClipboardContent() { |     private fun clearClipboardContent() { | ||||||
|         val clipboardManager = (context.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager) |         val clipboardManager = (context.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager) ?: return | ||||||
|         if (isPiePlus()) { |         if (isPiePlus()) { | ||||||
|             clipboardManager?.clearPrimaryClip() |             clipboardManager.clearPrimaryClip() | ||||||
|         } else { |         } else { | ||||||
|             val clip = ClipData.newPlainText("", "") |             val clip = ClipData.newPlainText("", "") | ||||||
|             clipboardManager?.setPrimaryClip(clip) |             clipboardManager.setPrimaryClip(clip) | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user