Skip to content

Commit

Permalink
Merge branch 'microg:master' into patch-gms-version
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git authored Feb 21, 2024
2 parents cb215f8 + 11cc078 commit 11ce4c2
Show file tree
Hide file tree
Showing 37 changed files with 134 additions and 139 deletions.
29 changes: 15 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,35 @@ buildscript {
ext.cronetVersion = '102.5005.125'
ext.wearableVersion = '0.1.1'

ext.kotlinVersion = '1.7.22'
ext.coroutineVersion = '1.6.4'
ext.kotlinVersion = '1.9.22'
ext.coroutineVersion = '1.7.3'

ext.annotationVersion = '1.5.0'
ext.annotationVersion = '1.7.1'
ext.appcompatVersion = '1.6.1'
ext.biometricVersion = '1.1.0'
ext.coreVersion = '1.9.0'
ext.fragmentVersion = '1.5.5'
ext.lifecycleVersion = '2.5.1'
ext.coreVersion = '1.12.0'
ext.fragmentVersion = '1.6.2'
ext.lifecycleVersion = '2.7.0'
ext.loaderVersion = '1.1.0'
ext.mediarouterVersion = '1.3.1'
ext.materialVersion = '1.11.0'
ext.mediarouterVersion = '1.6.0'
ext.multidexVersion = '2.0.1'
ext.navigationVersion = '2.5.3'
ext.navigationVersion = '2.7.7'
ext.preferenceVersion = '1.2.0'
ext.recyclerviewVersion = '1.2.0'
ext.webkitVersion = '1.4.0'
ext.recyclerviewVersion = '1.3.2'
ext.webkitVersion = '1.10.0'

ext.slf4jVersion = '1.7.36'
ext.volleyVersion = '1.2.1'
ext.wireVersion = '4.8.0'

ext.androidBuildGradleVersion = '8.0.2'
ext.androidBuildGradleVersion = '8.2.2'

ext.androidBuildVersionTools = '33.0.1'
ext.androidBuildVersionTools = '34.0.0'

ext.androidMinSdk = 14
ext.androidMinSdk = 19
ext.androidTargetSdk = 29
ext.androidCompileSdk = 33
ext.androidCompileSdk = 34

ext.localProperties = new Properties()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, override val lifecycle: Lifecycle, private val packageName: String, private val libraryVersion: String?, private val apiKey: String) : IFirebaseAuthService.Stub(), LifecycleOwner {
private val client by lazy { IdentityToolkitClient(context, apiKey, packageName, PackageUtils.firstSignatureDigestBytes(context, packageName)) }
private var authorizedDomain: String? = null

Expand Down Expand Up @@ -151,8 +151,6 @@ class FirebaseAuthServiceImpl(private val context: Context, private val lifecycl
}
}

override fun getLifecycle(): Lifecycle = lifecycle

override fun applyActionCode(request: ApplyActionCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) {
Log.d(TAG, "Not yet implemented: applyActionCode")
callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported"))
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 14 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -81,10 +81,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -144,12 +144,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -206,6 +210,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
15 changes: 9 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -26,7 +26,8 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -41,7 +42,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -76,13 +77,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@ import com.google.android.gms.phenotype.Flag;
import com.google.android.gms.phenotype.RegistrationInfo;

interface IPhenotypeService {
oneway void register(IPhenotypeCallbacks callbacks, String p1, int p2, in String[] p3, in byte[] p4) = 0; // returns via callbacks.onRegistered()
oneway void weakRegister(IPhenotypeCallbacks callbacks, String p1, int p2, in String[] p3, in int[] p4, in byte[] p5) = 1; // returns via callbacks.onWeakRegistered()
oneway void unregister(IPhenotypeCallbacks callbacks, String p1) = 2; // returns via callbacks.onUnregistered()
oneway void getConfigurationSnapshot(IPhenotypeCallbacks callbacks, String p1, String p2) = 3; // returns via callbacks.onConfiguration()
oneway void commitToConfiguration(IPhenotypeCallbacks callbacks, String p1) = 4; // returns via callbacks.onCommitedToConfiguration()
oneway void getExperimentTokens(IPhenotypeCallbacks callbacks, String p1, String logSourceName) = 5; // returns via callbacks.onExperimentTokens()
oneway void register(IPhenotypeCallbacks callbacks, String packageName, int version, in String[] p3, in byte[] p4) = 0; // returns via callbacks.onRegistered()
oneway void weakRegister(IPhenotypeCallbacks callbacks, String packageName, int version, in String[] p3, in int[] p4, in byte[] p5) = 1; // returns via callbacks.onWeakRegistered()
oneway void unregister(IPhenotypeCallbacks callbacks, String packageName) = 2; // returns via callbacks.onUnregistered()
oneway void getConfigurationSnapshot(IPhenotypeCallbacks callbacks, String packageName, String user) = 3; // returns via callbacks.onConfiguration()
oneway void commitToConfiguration(IPhenotypeCallbacks callbacks, String snapshotToken) = 4; // returns via callbacks.onCommitedToConfiguration()
oneway void getExperimentTokens(IPhenotypeCallbacks callbacks, String packageName, String logSourceName) = 5; // returns via callbacks.onExperimentTokens()
oneway void getDogfoodsToken(IPhenotypeCallbacks callbacks) = 6; // returns via callbacks.onDogfoodsToken()
oneway void setDogfoodsToken(IPhenotypeCallbacks callbacks, in byte[] p1) = 7; // returns via callbacks.onDogfoodsTokenSet()
oneway void getFlag(IPhenotypeCallbacks callbacks, String packageName, String name, int type) = 8; // returns via callbacks.onFlag()
oneway void getCommitedConfiguration(IPhenotypeCallbacks callbacks, String p1) = 9; // returns via callbacks.onCommittedConfiguration()
oneway void getConfigurationSnapshot2(IPhenotypeCallbacks callbacks, String p1, String p2, String p3) = 10; // returns via callbacks.onConfiguration()
oneway void syncAfterOperation(IPhenotypeCallbacks callbacks, String p1, long p2) = 11; // returns via callbacks.onSyncFinished()
oneway void registerSync(IPhenotypeCallbacks callbacks, String p1, int p2, in String[] p3, in byte[] p4, String p5, String p6) = 12; // returns via callbacks.onConfiguration()
oneway void getCommitedConfiguration(IPhenotypeCallbacks callbacks, String packageName) = 9; // returns via callbacks.onCommittedConfiguration()
oneway void getConfigurationSnapshot2(IPhenotypeCallbacks callbacks, String packageName, String user, String p3) = 10; // returns via callbacks.onConfiguration()
oneway void syncAfterOperation(IPhenotypeCallbacks callbacks, String packageName, long version) = 11; // returns via callbacks.onSyncFinished()
oneway void registerSync(IPhenotypeCallbacks callbacks, String packageName, int version, in String[] p3, in byte[] p4, String p5, String p6) = 12; // returns via callbacks.onConfiguration()
oneway void setFlagOverrides(IPhenotypeCallbacks callbacks, String packageName, String user, String flagName, int flagType, int flagDataType, String flagValue) = 13; // returns via callbacks.onFlagOverridesSet()
oneway void deleteFlagOverrides(IPhenotypeCallbacks callbacks, String packageName, String user, String flagName) = 14; // returns via callbacks.onFlagOverrides()
oneway void listFlagOverrides(IPhenotypeCallbacks callbacks, String packageName, String user, String flagName) = 15; // returns via callbacks.onFlagOverrides()

oneway void clearFlagOverrides(IPhenotypeCallbacks callbacks, String packageName, String user) = 17; // returns via callbacks.onFlagOverridesSet()
oneway void bulkRegister(IPhenotypeCallbacks callbacks, in RegistrationInfo[] infos) = 18; // returns via callbacks.onRegister()
oneway void setAppSpecificProperties(IPhenotypeCallbacks callbacks, String p1, in byte[] p2) = 19; // returns via callbacks.onAppSpecificPropertiesSet()
oneway void setAppSpecificProperties(IPhenotypeCallbacks callbacks, String packageName, in byte[] p2) = 19; // returns via callbacks.onAppSpecificPropertiesSet()

oneway void getServingVersion(IPhenotypeCallbacks callbacks) = 21; // returns via callbacks.onServingVersion()
oneway void getExperimentTokens2(IPhenotypeCallbacks callbacks, String p1, String p2, String p3, String p4) = 22; // returns via callbacks.onExperimentTokens()
oneway void syncAfterOperation2(IPhenotypeCallbacks callbacks, long p1) = 23; // returns via callbacks.onSyncFinished()
oneway void getExperimentTokensForLogging(IPhenotypeCallbacks callbacks, String packageName, String logSourceName, String p3, String clientPackageName) = 22; // returns via callbacks.onExperimentTokens()
oneway void syncAllAfterOperation(IPhenotypeCallbacks callbacks, long p1) = 23; // returns via callbacks.onSyncFinished()
oneway void setRuntimeProperties(IStatusCallback callbacks, String p1, in byte[] p2) = 24;
// oneway void setExternalExperiments(IStatusCallback callbacks, String p1, in List<byte[]> p2) = 25;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@

public class RegistrationInfo extends AutoSafeParcelable {
@Field(1)
public String field1;
public String packageName;
@Field(2)
public int field2;
public int version;
@Field(3)
public String[] field3;
@Field(4)
public byte[] field4;
@Field(5)
public boolean field5;
public boolean weak;
@Field(6)
public int[] field6;
@Field(7)
public String field7;
public String clientPackageName;

public static final Creator<RegistrationInfo> CREATOR = new AutoCreator<>(RegistrationInfo.class);
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private const val EXTRA_REQUEST_ID = "requestId"
private const val TIMEOUT = 1000 * 60 * 5 // 5 minutes
private const val MESSAGE_MAX_LEN = 140

class SmsRetrieverCore(private val context: Context, private val lifecycle: Lifecycle) : LifecycleOwner, DefaultLifecycleObserver {
class SmsRetrieverCore(private val context: Context, override val lifecycle: Lifecycle) : LifecycleOwner, DefaultLifecycleObserver {
private val requests: HashMap<Int, SmsRetrieverRequest> = hashMapOf()
private val requestIdCounter = AtomicInteger(0)
private lateinit var timeoutBroadcastReceiver: BroadcastReceiver
Expand All @@ -66,8 +66,6 @@ class SmsRetrieverCore(private val context: Context, private val lifecycle: Life
lifecycle.addObserver(this)
}

override fun getLifecycle(): Lifecycle = lifecycle

@TargetApi(19)
private fun configureBroadcastListenersIfNeeded() {
synchronized(this) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@ class SmsRetrieverService : BaseService(TAG, GmsService.SMS_RETRIEVER) {
}


class SmsRetrieverServiceImpl(private val smsRetriever: SmsRetrieverCore, private val packageName: String, private val lifecycle: Lifecycle) :
class SmsRetrieverServiceImpl(private val smsRetriever: SmsRetrieverCore, private val packageName: String, override val lifecycle: Lifecycle) :
ISmsRetrieverApiService.Stub(), LifecycleOwner {

override fun getLifecycle(): Lifecycle = lifecycle

override fun startSmsRetriever(callback: ISmsRetrieverResultCallback) {
Log.d(TAG, "startSmsRetriever()")
lifecycleScope.launchWhenStarted {
Expand Down
2 changes: 1 addition & 1 deletion play-services-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ dependencies {
implementation "androidx.webkit:webkit:$webkitVersion"

// Material Components
implementation 'com.google.android.material:material:1.9.0'
implementation "com.google.android.material:material:$materialVersion"

// Navigation
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class LoaderActivity : AppCompatActivity() {
Uri.parse(fallbackUrl)
}
Log.d(TAG, "Opening fallback $fallbackUrl")
// noinspection UnsafeImplicitIntentLaunch
val intent = Intent(ACTION_VIEW, uri).apply { addCategory(CATEGORY_BROWSABLE) }
startActivity(intent)
finishResult(RESULT_OK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class WebViewHelper(private val activity: AppCompatActivity, private val webView
}
if (allowedPrefixes.isNotEmpty() && allowedPrefixes.none { url.startsWith(it) }) {
try {
// noinspection UnsafeImplicitIntentLaunch
activity.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)).apply { addCategory(Intent.CATEGORY_BROWSABLE) })
} catch (e: Exception) {
Log.w(TAG, "Error forwarding to browser", e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AuthProxyService : BaseService(TAG, GmsService.AUTH_PROXY) {
}
}

class AuthServiceImpl(private val context: Context, private val lifecycle: Lifecycle, private val packageName: String) : IAuthService.Stub(), LifecycleOwner {
class AuthServiceImpl(private val context: Context, override val lifecycle: Lifecycle, private val packageName: String) : IAuthService.Stub(), LifecycleOwner {
override fun performProxyRequest(callbacks: IAuthCallbacks, request: ProxyRequest) {
Log.d(TAG, "performProxyRequest($packageName, $request)")
lifecycleScope.launchWhenStarted {
Expand All @@ -57,7 +57,5 @@ class AuthServiceImpl(private val context: Context, private val lifecycle: Lifec
}
}

override fun getLifecycle(): Lifecycle = lifecycle

override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) }
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,13 @@ class AuthSignInService : BaseService(TAG, GmsService.AUTH_SIGN_IN) {

class AuthSignInServiceImpl(
private val context: Context,
private val lifecycle: Lifecycle,
override val lifecycle: Lifecycle,
private val packageName: String,
private val account: Account?,
private val scopes: List<Scope>,
private val extras: Bundle
) : ISignInService.Stub(), LifecycleOwner {
private val queue = singleInstanceOf { Volley.newRequestQueue(context.applicationContext) }
override fun getLifecycle(): Lifecycle = lifecycle

override fun silentSignIn(callbacks: ISignInCallbacks, options: GoogleSignInOptions?) {
Log.d(TAG, "$packageName:silentSignIn($options)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ClearcutLoggerService : BaseService(TAG, GmsService.CLEARCUT_LOGGER) {
}
}

class ClearcutLoggerServiceImpl(private val lifecycle: Lifecycle) : IClearcutLoggerService.Stub(), LifecycleOwner {
class ClearcutLoggerServiceImpl(override val lifecycle: Lifecycle) : IClearcutLoggerService.Stub(), LifecycleOwner {
private var collectForDebugExpiryTime: Long = 0

override fun log(callbacks: IClearcutLoggerCallbacks, event: LogEventParcelable) {
Expand Down Expand Up @@ -73,7 +73,5 @@ class ClearcutLoggerServiceImpl(private val lifecycle: Lifecycle) : IClearcutLog
}
}

override fun getLifecycle(): Lifecycle = lifecycle

override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags, TAG) { super.onTransact(code, data, reply, flags) }
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ class CredentialManagerService : BaseService(TAG, GmsService.CREDENTIAL_MANAGER)

}

private class CredentialManagerServiceImpl(private val context: Context, private val lifecycle: Lifecycle) : ICredentialManagerService.Stub(), LifecycleOwner {
override fun getLifecycle(): Lifecycle = lifecycle
private class CredentialManagerServiceImpl(private val context: Context, override val lifecycle: Lifecycle) : ICredentialManagerService.Stub(), LifecycleOwner {

override fun getCredentialManagerIntent(callback: IPendingIntentCallback?, params: CredentialManagerInvocationParams?) {
Log.d(TAG, "Not yet implemented: getCredentialManagerIntent $params")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ class GamesConnectService : BaseService(TAG, GmsService.GAMES) {
}
}

class GamesConnectServiceImpl(val context: Context, private val lifecycle: Lifecycle, val packageName: String) : IGamesConnectService.Stub(), LifecycleOwner {

override fun getLifecycle(): Lifecycle = lifecycle
class GamesConnectServiceImpl(val context: Context, override val lifecycle: Lifecycle, val packageName: String) : IGamesConnectService.Stub(), LifecycleOwner {

override fun signIn(callback: IGamesConnectCallbacks?, request: GamesSignInRequest?) {
Log.d(TAG, "signIn($request)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,9 @@ class GamesService : BaseService(TAG, GmsService.GAMES) {
}
}

class GamesServiceImpl(val context: Context, private val lifecycle: Lifecycle, val packageName: String, val account: Account, val player: Player) :
class GamesServiceImpl(val context: Context, override val lifecycle: Lifecycle, val packageName: String, val account: Account, val player: Player) :
IGamesService.Stub(), LifecycleOwner {

override fun getLifecycle(): Lifecycle = lifecycle

override fun clientDisconnecting(clientId: Long) {
Log.d(TAG, "Not yet implemented: clientDisconnecting($clientId)")
}
Expand Down
Loading

0 comments on commit 11ce4c2

Please sign in to comment.