mirror of
https://github.com/YTVanced/VancedMicroG
synced 2024-12-02 16:07:25 +00:00
FirebaseAuth: Allow apps to not announce library version
This commit is contained in:
parent
0c321fd1eb
commit
a83b677f46
1 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ class FirebaseAuthService : BaseService(TAG, GmsService.FIREBASE_AUTH) {
|
|||
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 || libraryVersion == null) {
|
||||
if (apiKey == null) {
|
||||
callback.onPostInitComplete(CommonStatusCodes.DEVELOPER_ERROR, null, null)
|
||||
} else {
|
||||
callback.onPostInitComplete(0, FirebaseAuthServiceImpl(this, lifecycle, request.packageName, libraryVersion, apiKey).asBinder(), null)
|
||||
|
@ -82,7 +82,7 @@ class FirebaseAuthService : BaseService(TAG, GmsService.FIREBASE_AUTH) {
|
|||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue