mirror of https://github.com/YTVanced/VancedMicroG
Fix
This commit is contained in:
parent
526092b920
commit
a686389baa
|
@ -18,7 +18,6 @@ This fork tweaks MicroG to be usable by applications that require Google authent
|
|||
- Droidguard
|
||||
- Exposure-Notifications
|
||||
- Feedback
|
||||
- Firebase
|
||||
- Games
|
||||
- Maps
|
||||
- Recovery
|
||||
|
|
|
@ -13,9 +13,11 @@ dependencies {
|
|||
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
|
||||
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
|
||||
|
||||
implementation "androidx.appcompat:appcompat:$appcompatVersion"
|
||||
implementation "androidx.appcompat:appcompat:1.2.0"
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
|
||||
implementation project(':play-services-core')
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.21"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion"
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ import androidx.lifecycle.LifecycleOwner
|
|||
import androidx.lifecycle.lifecycleScope
|
||||
import com.google.android.gms.common.api.CommonStatusCodes
|
||||
import com.google.android.gms.common.api.Status
|
||||
import com.google.android.gms.common.internal.GetServiceRequest
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks
|
||||
import com.google.firebase.auth.ActionCodeSettings
|
||||
import com.google.firebase.auth.EmailAuthCredential
|
||||
import com.google.firebase.auth.PhoneAuthCredential
|
||||
|
@ -28,6 +30,9 @@ import com.google.firebase.auth.UserProfileChangeRequest
|
|||
import com.google.firebase.auth.api.internal.*
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import org.microg.gms.BaseService
|
||||
import org.microg.gms.common.GmsService
|
||||
import org.microg.gms.common.PackageUtils
|
||||
|
||||
private const val TAG = "GmsFirebaseAuth"
|
||||
|
||||
|
@ -65,6 +70,19 @@ private fun Intent.getSmsMessages(): Array<SmsMessage> {
|
|||
}
|
||||
}
|
||||
|
||||
class FirebaseAuthService : BaseService(TAG, GmsService.FIREBASE_AUTH) {
|
||||
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService?) {
|
||||
PackageUtils.getAndCheckCallingPackage(this, request.packageName)
|
||||
val apiKey = request.extras?.getString(Constants.EXTRA_API_KEY)
|
||||
val libraryVersion = request.extras?.getString(Constants.EXTRA_LIBRARY_VERSION)
|
||||
if (apiKey == null) {
|
||||
callback.onPostInitComplete(CommonStatusCodes.DEVELOPER_ERROR, null, null)
|
||||
} else {
|
||||
callback.onPostInitComplete(0, FirebaseAuthServiceImpl(this, lifecycle, request.packageName, libraryVersion, apiKey).asBinder(), null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class FirebaseAuthServiceImpl(private val context: Context, private val lifecycle: Lifecycle, private val packageName: String, private val libraryVersion: String?, private val apiKey: String) : IFirebaseAuthService.Stub(), LifecycleOwner {
|
||||
private val client = IdentityToolkitClient(context, apiKey)
|
||||
private var authorizedDomain: String? = null
|
||||
|
|
|
@ -29,7 +29,6 @@ dependencies {
|
|||
implementation "info.armills.chromecast-java-api-v2:api-v2-raw-request:0.10.4-raw-request-1"
|
||||
|
||||
implementation project(':firebase-dynamic-links-api')
|
||||
implementation project(':firebase-auth-core')
|
||||
implementation project(':play-services-core-proto')
|
||||
implementation project(':play-services-core:microg-ui-tools') // deprecated
|
||||
implementation project(':play-services-api')
|
||||
|
|
Loading…
Reference in New Issue