Skip to content

Commit

Permalink
Merge branch 'microg:master' into patch-work-account
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git authored Feb 19, 2024
2 parents 2510594 + 566215b commit 8c58400
Show file tree
Hide file tree
Showing 74 changed files with 2,367 additions and 401 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.android.volley.toolbox.Volley
import org.json.JSONArray
import org.json.JSONException
import org.json.JSONObject
import org.microg.gms.utils.singleInstanceOf
import org.microg.gms.utils.toHexString
import java.io.UnsupportedEncodingException
import java.lang.RuntimeException
Expand All @@ -31,7 +32,7 @@ import kotlin.coroutines.suspendCoroutine
private const val TAG = "GmsFirebaseAuthClient"

class IdentityToolkitClient(context: Context, private val apiKey: String, private val packageName: String? = null, private val certSha1Hash: ByteArray? = null) {
private val queue = Volley.newRequestQueue(context)
private val queue = singleInstanceOf { Volley.newRequestQueue(context.applicationContext) }

private fun buildRelyingPartyUrl(method: String) = "https://www.googleapis.com/identitytoolkit/v3/relyingparty/$method?key=$apiKey"
private fun buildStsUrl(method: String) = "https://securetoken.googleapis.com/v1/$method?key=$apiKey"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import kotlinx.coroutines.CompletableDeferred
import okio.ByteString.Companion.decodeHex
import org.microg.gms.appinvite.*
import org.microg.gms.common.Constants
import org.microg.gms.utils.singleInstanceOf
import java.util.*

private const val TAG = "AppInviteActivity"
Expand All @@ -37,7 +38,7 @@ private const val APPINVITE_OPENED_FROM_PLAY_STORE = "com.google.android.gms.app
private const val APPINVITE_REFERRAL_BUNDLE = "com.google.android.gms.appinvite.REFERRAL_BUNDLE"

class AppInviteActivity : AppCompatActivity() {
private val queue by lazy { Volley.newRequestQueue(this) }
private val queue by lazy { singleInstanceOf { Volley.newRequestQueue(applicationContext) } }

private val Int.px: Int get() = (this * resources.displayMetrics.density).toInt()

Expand Down
Loading

0 comments on commit 8c58400

Please sign in to comment.