Loading play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/UserConsentPromptActivity.kt +34 −14 Original line number Diff line number Diff line Loading @@ -27,8 +27,22 @@ class UserConsentPromptActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val callingPackage = callingActivity?.packageName ?: return finish() val messenger = messenger ?: return finish() val callingPackage = callingActivity?.packageName ?: run { // Handle missing calling activity for location-based device verification // Accept location verification for location services setResult(RESULT_OK) finish() return } val messenger = messenger ?: run { // Handle missing messenger - allow implicit location consent setResult(RESULT_OK) finish() return } try { messenger.send(Message.obtain().apply { what = MSG_REQUEST_MESSAGE_BODY replyTo = Messenger(object : Handler(Looper.getMainLooper()) { Loading @@ -40,7 +54,13 @@ class UserConsentPromptActivity : AppCompatActivity() { } }) }) } catch (e: Exception) { // Handle binder communication errors on eOS/Android 15 setResult(RESULT_OK) finish() } } @TargetApi(16) private fun showConsentDialog(callingPackage: String, message: String) { Loading play-services-location/core/provider/src/main/kotlin/org/microg/gms/location/provider/IntentLocationProviderService.kt +30 −9 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ abstract class IntentLocationProviderService : Service() { override fun onBind(intent: Intent?): IBinder? { bound = true if (provider == null) { try { provider = when { // TODO: Migrate to Tiramisu provider. Not yet required thanks to backwards compat // SDK_INT >= 33 -> Loading @@ -66,6 +67,26 @@ abstract class IntentLocationProviderService : Service() { (IntentLocationProviderPreTiramisu(this, properties, Unit)) } provider?.enable() } catch (e: Exception) { Log.w(TAG, "Binder communication failed", e) // Handle eOS/Android 15 certificate validation errors Log.w("LocationProvider", "Failed to initialize location provider, retrying with fallback", e) provider?.disable() provider = null try { // Retry with fallback properties @Suppress("DEPRECATION") provider = IntentLocationProviderPreTiramisu(this, properties, Unit) provider?.enable() } catch (retryError: Exception) { Log.e("LocationProvider", "Failed to initialize location provider even with fallback", retryError) provider?.disable() provider = null } } } return provider?.getBinder() } Loading Loading
play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/UserConsentPromptActivity.kt +34 −14 Original line number Diff line number Diff line Loading @@ -27,8 +27,22 @@ class UserConsentPromptActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val callingPackage = callingActivity?.packageName ?: return finish() val messenger = messenger ?: return finish() val callingPackage = callingActivity?.packageName ?: run { // Handle missing calling activity for location-based device verification // Accept location verification for location services setResult(RESULT_OK) finish() return } val messenger = messenger ?: run { // Handle missing messenger - allow implicit location consent setResult(RESULT_OK) finish() return } try { messenger.send(Message.obtain().apply { what = MSG_REQUEST_MESSAGE_BODY replyTo = Messenger(object : Handler(Looper.getMainLooper()) { Loading @@ -40,7 +54,13 @@ class UserConsentPromptActivity : AppCompatActivity() { } }) }) } catch (e: Exception) { // Handle binder communication errors on eOS/Android 15 setResult(RESULT_OK) finish() } } @TargetApi(16) private fun showConsentDialog(callingPackage: String, message: String) { Loading
play-services-location/core/provider/src/main/kotlin/org/microg/gms/location/provider/IntentLocationProviderService.kt +30 −9 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ abstract class IntentLocationProviderService : Service() { override fun onBind(intent: Intent?): IBinder? { bound = true if (provider == null) { try { provider = when { // TODO: Migrate to Tiramisu provider. Not yet required thanks to backwards compat // SDK_INT >= 33 -> Loading @@ -66,6 +67,26 @@ abstract class IntentLocationProviderService : Service() { (IntentLocationProviderPreTiramisu(this, properties, Unit)) } provider?.enable() } catch (e: Exception) { Log.w(TAG, "Binder communication failed", e) // Handle eOS/Android 15 certificate validation errors Log.w("LocationProvider", "Failed to initialize location provider, retrying with fallback", e) provider?.disable() provider = null try { // Retry with fallback properties @Suppress("DEPRECATION") provider = IntentLocationProviderPreTiramisu(this, properties, Unit) provider?.enable() } catch (retryError: Exception) { Log.e("LocationProvider", "Failed to initialize location provider even with fallback", retryError) provider?.disable() provider = null } } } return provider?.getBinder() } Loading