From 48f3d4a212d9492ed032b59043a60331759bec58 Mon Sep 17 00:00:00 2001 From: Cuynu Date: Thu, 28 Mar 2024 23:49:27 +0700 Subject: [PATCH] temporary detele everything --- .../gradle-build-kotlin-error-matcher.json | 17 - ...le-build-kotlin-error-matcher.json.license | 2 - .github/matchers/gradle-build-matcher.json | 16 - .../gradle-build-matcher.json.license | 2 - .github/workflows/build.yml | 47 - .github/workflows/debug.yml | 37 - .gitignore | 14 - Android.mk | 41 - LICENSE | 177 ---- LICENSES/Apache-2.0.txt | 208 ---- LICENSES/CC-BY-4.0.txt | 324 ------ LICENSES/CC0-1.0.txt | 121 --- build.gradle | 136 --- .../diff/AppListDatabaseOpenHelper.java | 75 -- fake-signature/src/main/res/values/arrays.xml | 39 - .../gms/firebase/auth/FirebaseAuthService.kt | 649 ------------ .../firebase/auth/IdentityToolkitClient.kt | 148 --- gradle.properties | 5 - gradle/wrapper/gradle-wrapper.jar | Bin 58910 -> 0 bytes gradle/wrapper/gradle-wrapper.properties | 11 - gradlew | 243 ----- gradlew.bat | 200 ---- .../ads/identifier/AdvertisingIdService.kt | 139 --- .../core/src/main/res/values-be/strings.xml | 7 - .../core/src/main/res/values-es/strings.xml | 7 - .../src/main/res/values-pt-rBR/strings.xml | 7 - .../core/src/main/res/values-ru/strings.xml | 7 - .../src/main/res/values-zh-rCN/strings.xml | 7 - play-services-api/build.gradle | 42 - play-services-api/gradle.properties | 33 - .../android/auth/IAuthManagerService.aidl | 23 - .../gms/auth/AccountChangeEventsRequest.aidl | 3 - .../gms/auth/AccountChangeEventsResponse.aidl | 3 - .../gms/auth/GetHubTokenInternalResponse.aidl | 3 - .../android/gms/auth/GetHubTokenRequest.aidl | 3 - .../gms/auth/HasCababilitiesRequest.aidl | 3 - .../gms/auth/api/credentials/Credential.aidl | 3 - .../api/credentials/CredentialRequest.aidl | 3 - .../credentials/internal/DeleteRequest.aidl | 3 - .../internal/GeneratePasswordRequest.aidl | 3 - .../internal/ICredentialsCallbacks.aidl | 10 - .../internal/ICredentialsService.aidl | 15 - .../api/credentials/internal/SaveRequest.aidl | 3 - .../gms/auth/api/internal/IAuthCallbacks.aidl | 8 - .../gms/auth/api/internal/IAuthService.aidl | 11 - .../gms/auth/api/proxy/ProxyRequest.aidl | 3 - .../gms/auth/api/proxy/ProxyResponse.aidl | 3 - .../gms/auth/appcert/IAppCertService.aidl | 6 - .../gms/checkin/internal/ICheckinService.aidl | 7 - .../gms/common/data/BitmapTeleporter.aidl | 8 - .../internal/GoogleCertificatesQuery.aidl | 3 - .../gms/common/internal/ICertData.aidl | 8 - .../internal/IGoogleCertificatesApi.aidl | 12 - .../common/internal/ISignInButtonCreator.aidl | 7 - .../common/server/FavaDiagnosticsEntity.aidl | 3 - .../android/gms/feedback/ErrorReport.aidl | 8 - .../android/gms/feedback/FileTeleporter.aidl | 8 - .../android/gms/feedback/LogOptions.aidl | 8 - .../android/gms/feedback/ThemeSettings.aidl | 8 - .../feedback/internal/IFeedbackCallbacks.aidl | 10 - .../feedback/internal/IFeedbackService.aidl | 33 - .../gms/gass/internal/GassRequestParcel.aidl | 8 - .../gms/gass/internal/GassResponseParcel.aidl | 8 - .../gms/gass/internal/IGassService.aidl | 16 - .../android/gms/http/IGoogleHttpService.aidl | 7 - .../gms/people/internal/IPeopleCallbacks.aidl | 12 - .../gms/people/internal/IPeopleService.aidl | 44 - .../phenotype/internal/IPhenotypeService.aidl | 35 - .../google/android/gms/potokens/PoToken.aidl | 8 - .../potokens/internal/IPoTokensService.aidl | 14 - .../potokens/internal/ITokenCallbacks.aidl | 13 - .../gms/pseudonymous/PseudonymousIdToken.aidl | 8 - .../internal/IPseudonymousIdCallbacks.aidl | 15 - .../internal/IPseudonymousIdService.aidl | 15 - .../SemanticLocationEventRequest.aidl | 7 - .../internal/ISemanticLocationService.aidl | 18 - .../internal/SemanticLocationParameters.aidl | 7 - .../android/gms/auth/AccountChangeEvent.java | 37 - .../gms/auth/AccountChangeEventsRequest.java | 45 - .../gms/auth/AccountChangeEventsResponse.java | 27 - .../gms/auth/GetHubTokenInternalResponse.java | 14 - .../android/gms/auth/GetHubTokenRequest.java | 18 - .../gms/auth/HasCababilitiesRequest.java | 16 - .../google/android/gms/auth/TokenData.java | 62 -- .../gms/auth/api/credentials/Credential.java | 160 --- .../credentials/CredentialPickerConfig.java | 67 -- .../api/credentials/CredentialRequest.java | 45 - .../gms/auth/api/credentials/HintRequest.java | 92 -- .../gms/auth/api/credentials/IdToken.java | 36 - .../api/credentials/IdentityProviders.java | 15 - .../credentials/internal/DeleteRequest.java | 23 - .../internal/GeneratePasswordRequest.java | 23 - .../api/credentials/internal/SaveRequest.java | 23 - .../gms/auth/api/proxy/ProxyRequest.java | 24 - .../gms/auth/api/proxy/ProxyResponse.java | 15 - .../AccountRecoveryGuidanceRequest.java | 44 - .../dataservice/AccountRemovalRequest.java | 44 - .../ConfirmCredentialsRequest.java | 24 - .../firstparty/dataservice/TokenRequest.java | 42 - .../ConfirmCredentialsWorkflowRequest.java | 34 - .../firstparty/shared/AccountCredentials.java | 36 - .../firstparty/shared/AppDescription.java | 24 - .../firstparty/shared/CaptchaSolution.java | 25 - .../gms/common/data/BitmapTeleporter.java | 110 -- .../android/gms/common/internal/CertData.java | 104 -- .../internal/GoogleCertificatesQuery.java | 55 - .../common/server/FavaDiagnosticsEntity.java | 24 - .../android/gms/feedback/ErrorReport.java | 163 --- .../android/gms/feedback/FeedbackOptions.java | 67 -- .../android/gms/feedback/FileTeleporter.java | 29 - .../android/gms/feedback/LogOptions.java | 37 - .../gms/gass/internal/GassRequestParcel.java | 32 - .../gms/gass/internal/GassResponseParcel.java | 49 - .../gms/measurement/internal/AppMetadata.java | 79 -- .../internal/ParcelableLoadImageOptions.java | 24 - .../gms/people/model/AccountMetadata.java | 24 - .../gms/people/model/AvatarReference.java | 27 - .../gms/phenotype/RegistrationInfo.java | 27 - .../google/android/gms/potokens/PoToken.java | 20 - .../gms/pseudonymous/PseudonymousIdToken.java | 34 - .../SemanticLocationEventRequest.java | 32 - .../internal/SemanticLocationParameters.java | 38 - .../gms/appinivite/AppInviteActivity.kt | 185 ---- play-services-appset/build.gradle | 37 - play-services-appset/core/build.gradle | 56 - .../core/src/main/AndroidManifest.xml | 16 - .../org/microg/gms/appset/AppSetService.kt | 42 - .../src/main/AndroidManifest.xml | 4 - .../gms/appset/AppSetIdRequestParams.aidl | 8 - .../android/gms/appset/AppSetInfoParcel.aidl | 8 - .../appset/internal/IAppSetIdCallback.aidl | 13 - .../gms/appset/internal/IAppSetService.aidl | 13 - .../com/google/android/gms/appset/AppSet.java | 25 - .../android/gms/appset/AppSetIdClient.java | 25 - .../android/gms/appset/AppSetIdInfo.java | 75 -- .../gms/appset/AppSetIdRequestParams.java | 45 - .../android/gms/appset/AppSetInfoParcel.java | 38 - .../android/gms/appset/package-info.java | 12 - .../microg/gms/auth/phone/SmsRetrieverCore.kt | 353 ------- .../gms/auth/phone/SmsRetrieverService.kt | 131 --- .../core/src/main/res/values-be/strings.xml | 6 - .../core/src/main/res/values-de/strings.xml | 6 - .../core/src/main/res/values-es/strings.xml | 6 - .../src/main/res/values-pt-rBR/strings.xml | 6 - .../core/src/main/res/values-ru/strings.xml | 6 - .../core/src/main/res/values-uk/strings.xml | 6 - .../src/main/res/values-zh-rCN/strings.xml | 6 - .../DeviceManagementInfoResponse.aidl | 8 - .../DeviceManagementInfoResponse.java | 44 - .../account/data/IAccountDataService.aidl | 16 - .../data/IDeviceManagementInfoCallback.aidl | 13 - .../auth/api/identity/BeginSignInRequest.aidl | 8 - .../auth/api/identity/BeginSignInResult.aidl | 8 - .../GetPhoneNumberHintIntentRequest.aidl | 8 - .../api/identity/GetSignInIntentRequest.aidl | 8 - .../auth/api/identity/SignInCredential.aidl | 8 - .../internal/IBeginSignInCallback.aidl | 13 - .../IGetPhoneNumberHintIntentCallback.aidl | 12 - .../internal/IGetSignInIntentCallback.aidl | 12 - .../api/identity/internal/ISignInService.aidl | 21 - .../auth/api/identity/BeginSignInRequest.java | 596 ----------- .../auth/api/identity/BeginSignInResult.java | 45 - .../api/identity/CredentialSavingClient.java | 56 - .../api/identity/CredentialSavingOptions.java | 23 - .../GetPhoneNumberHintIntentRequest.java | 69 -- .../api/identity/GetSignInIntentRequest.java | 200 ---- .../gms/auth/api/identity/Identity.java | 70 -- .../SaveAccountLinkingTokenRequest.java | 221 ---- .../SaveAccountLinkingTokenResult.java | 73 -- .../api/identity/SavePasswordRequest.java | 108 -- .../auth/api/identity/SavePasswordResult.java | 62 -- .../gms/auth/api/identity/SignInClient.java | 82 -- .../auth/api/identity/SignInCredential.java | 141 --- .../gms/auth/api/identity/SignInOptions.java | 23 - .../gms/auth/api/identity/SignInPassword.java | 70 -- play-services-base-api/build.gradle | 44 - .../common/api/internal/IStatusCallback.aidl | 7 - .../android/gms/common/data/DataHolder.aidl | 3 - .../android/gms/common/images/WebImage.aidl | 3 - .../auth/api/signin/GoogleSignInAccount.java | 12 - .../android/gms/common/data/DataHolder.java | 314 ------ .../android/gms/common/images/WebImage.java | 68 -- play-services-base-core/build.gradle | 37 - .../src/main/AndroidManifest.xml | 13 - .../microg/gms/AbstractGmsServiceBroker.java | 101 -- .../main/java/org/microg/gms/BaseService.java | 74 -- .../java/org/microg/gms/DummyService.java | 75 -- .../gms/common/DeviceConfiguration.java | 161 --- .../microg/gms/common/DeviceIdentifier.java | 63 -- .../gms/common/ForegroundServiceContext.java | 120 --- .../gms/common/ForegroundServiceInfo.java | 18 - .../org/microg/gms/common/HttpFormClient.java | 281 ----- .../microg/gms/common/MultiListenerProxy.java | 224 ---- .../org/microg/gms/common/NonCancelToken.java | 28 - .../org/microg/gms/common/PackageUtils.java | 458 --------- .../java/org/microg/gms/common/PhoneInfo.java | 35 - .../gms/common/RemoteListenerProxy.java | 135 --- .../java/org/microg/gms/common/Utils.java | 67 -- .../microg/gms/common/PackageSpoofUtils.kt | 155 --- .../kotlin/org/microg/gms/profile/Build.kt | 98 -- .../org/microg/gms/profile/ProfileManager.kt | 377 ------- .../org/microg/gms/utils/BinderUtils.kt | 24 - .../microg/gms/utils/ExtendedPackageInfo.kt | 54 - .../microg/gms/utils/FileXmlResourceParser.kt | 127 --- .../microg/gms/utils/SingleInstanceUtil.kt | 42 - .../microg/mgms/settings/SettingsContract.kt | 125 --- .../microg/mgms/settings/SettingsProvider.kt | 280 ----- .../drawable/ic_foreground_notification.xml | 17 - .../src/main/res/values-ar/strings.xml | 11 - .../src/main/res/values-az/strings.xml | 11 - .../src/main/res/values-be/strings.xml | 11 - .../src/main/res/values-bn/strings.xml | 11 - .../src/main/res/values-de/strings.xml | 10 - .../src/main/res/values-es-rES/strings.xml | 11 - .../src/main/res/values-fr/strings.xml | 11 - .../src/main/res/values-he/strings.xml | 11 - .../src/main/res/values-hi/strings.xml | 11 - .../src/main/res/values-hu/strings.xml | 11 - .../src/main/res/values-id/strings.xml | 11 - .../src/main/res/values-it/strings.xml | 11 - .../src/main/res/values-ja/strings.xml | 11 - .../src/main/res/values-ko/strings.xml | 11 - .../src/main/res/values-lt/strings.xml | 11 - .../src/main/res/values-pt-rBR/strings.xml | 11 - .../src/main/res/values-ru/strings.xml | 11 - .../src/main/res/values-th/strings.xml | 11 - .../src/main/res/values-tr/strings.xml | 11 - .../src/main/res/values-uk/strings.xml | 11 - .../src/main/res/values-vi/strings.xml | 11 - .../src/main/res/values-zh-rCN/strings.xml | 11 - .../src/main/res/values-zh-rTW/strings.xml | 12 - .../src/main/res/values/strings.xml | 12 - play-services-base/build.gradle | 44 - play-services-base/core/build.gradle | 61 -- .../microg/gms/common/KnownGooglePackages.kt | 198 ---- .../microg/gms/settings/SettingsContract.kt | 225 ---- .../microg/gms/settings/SettingsProvider.kt | 423 -------- .../org/microg/gms/ui/SwitchBarPreference.kt | 62 -- .../microg/gms/utils/IntentCacheManager.kt | 149 --- .../microg/gms/utils/PackageManagerUtils.kt | 49 - .../res/layout/preference_app_heading.xml | 46 - .../core/src/main/res/values-fr/strings.xml | 13 - .../src/main/res/values-pt-rBR/strings.xml | 19 - .../core/src/main/res/values/themes.xml | 93 -- play-services-base/gradle.properties | 33 - .../src/main/AndroidManifest.xml | 30 - .../gms/common/GoogleApiAvailability.java | 53 - .../gms/common/GooglePlayServicesClient.java | 42 - .../gms/common/GooglePlayServicesUtil.java | 135 --- .../android/gms/common/api/AccountInfo.java | 24 - .../google/android/gms/common/api/Api.java | 70 -- .../android/gms/common/api/GoogleApi.java | 28 - .../gms/common/api/GoogleApiActivity.java | 6 - .../gms/common/api/GoogleApiClient.java | 219 ---- .../android/gms/common/api/HasApiKey.java | 9 - .../android/gms/common/api/PendingResult.java | 20 - .../gms/common/api/internal/ApiKey.java | 12 - .../android/gms/common/data/DataBuffer.java | 67 -- .../gms/common/api/AbstractPendingResult.java | 29 - .../org/microg/gms/common/api/ApiClient.java | 33 - .../gms/common/api/ApiClientBuilder.java | 26 - .../gms/common/api/ApiClientSettings.java | 9 - .../gms/common/api/ConnectionCallbacks.java | 41 - .../gms/common/api/GoogleApiClientImpl.java | 145 --- .../gms/common/api/GoogleApiManager.java | 21 - .../api/OnConnectionFailedListener.java | 25 - .../gms/common/api/ResultCallbackHandler.java | 59 -- .../src/main/res/values/version.xml | 20 - play-services-basement/build.gradle | 58 -- play-services-basement/gradle.properties | 33 - .../google/android/gms/common/api/Status.aidl | 3 - .../common/internal/GetServiceRequest.aidl | 3 - .../gms/common/internal/ICancelToken.aidl | 5 - .../gms/common/internal/IGmsCallbacks.aidl | 7 - .../common/internal/IGmsServiceBroker.aidl | 15 - .../internal/ValidateAccountRequest.aidl | 3 - .../android/gms/dynamic/IObjectWrapper.aidl | 8 - .../android/gms/common/ConnectionResult.java | 274 ----- .../google/android/gms/common/Feature.java | 36 - .../com/google/android/gms/common/Scopes.java | 101 -- .../gms/common/api/CommonStatusCodes.java | 37 - .../android/gms/common/api/Releasable.java | 24 - .../google/android/gms/common/api/Result.java | 27 - .../gms/common/api/ResultCallback.java | 33 - .../google/android/gms/common/api/Scope.java | 69 -- .../google/android/gms/common/api/Status.java | 97 -- .../gms/common/internal/BinderWrapper.java | 51 - .../common/internal/GetServiceRequest.java | 88 -- .../internal/ValidateAccountRequest.java | 23 - .../safeparcel/AbstractSafeParcelable.java | 30 - .../android/gms/dynamic/ObjectWrapper.java | 100 -- .../org/microg/gms/auth/AuthConstants.java | 37 - .../java/org/microg/gms/common/Constants.java | 29 - .../org/microg/gms/common/GmsService.java | 152 --- .../java/org/microg/gms/common/PublicApi.java | 48 - .../java/org/microg/gms/gcm/GcmConstants.java | 44 - .../android/gms/dynamic/ObjectWrapper.kt | 18 - play-services-core-proto/build.gradle | 29 - .../src/main/proto/appcert.proto | 32 - .../src/main/proto/auth.proto | 58 -- .../src/main/proto/checkin.proto | 270 ----- .../src/main/proto/mcs.proto | 270 ----- .../src/main/proto/potoken.proto | 63 -- play-services-core/build.gradle | 176 ---- .../microg-ui-tools/build.gradle | 44 - .../tools/ui/AbstractAboutFragment.java | 147 --- .../tools/ui/AbstractDashboardActivity.java | 86 -- .../tools/ui/AbstractSettingsActivity.java | 57 -- .../tools/ui/AbstractSettingsFragment.java | 40 - .../java/org/microg/tools/ui/Condition.java | 296 ------ .../org/microg/tools/ui/DialogPreference.java | 114 --- .../tools/ui/ResourceSettingsFragment.java | 39 - .../java/org/microg/tools/ui/SwitchBar.java | 222 ---- .../ui/SwitchBarResourceSettingsFragment.java | 65 -- .../org/microg/tools/ui/ToggleSwitch.java | 59 -- .../src/main/res/drawable/ic_expand_less.xml | 30 - .../src/main/res/drawable/ic_expand_more.xml | 30 - .../res/layout-v21/preference_material.xml | 87 -- .../src/main/res/layout/about_root.xml | 83 -- .../src/main/res/layout/condition_card.xml | 135 --- .../main/res/layout/dashboard_activity.xml | 35 - .../layout/preference_widget_radiobutton.xml | 24 - .../src/main/res/layout/settings_activity.xml | 40 - .../src/main/res/layout/switch_bar.xml | 43 - .../src/main/res/values-ar/strings.xml | 25 - .../src/main/res/values-az/strings.xml | 25 - .../src/main/res/values-be/strings.xml | 25 - .../src/main/res/values-bn/strings.xml | 25 - .../src/main/res/values-cs/strings.xml | 25 - .../src/main/res/values-de/strings.xml | 25 - .../src/main/res/values-eo/strings.xml | 19 - .../src/main/res/values-es-rES/strings.xml | 25 - .../src/main/res/values-es/strings.xml | 19 - .../src/main/res/values-fr/strings.xml | 25 - .../src/main/res/values-he/strings.xml | 25 - .../src/main/res/values-hi/strings.xml | 25 - .../src/main/res/values-hu/strings.xml | 25 - .../src/main/res/values-id/strings.xml | 25 - .../src/main/res/values-it/strings.xml | 25 - .../src/main/res/values-ja/strings.xml | 25 - .../src/main/res/values-ko/strings.xml | 25 - .../src/main/res/values-lt/strings.xml | 25 - .../src/main/res/values-pl/strings.xml | 25 - .../src/main/res/values-pt-rBR/strings.xml | 25 - .../src/main/res/values-ro/strings.xml | 19 - .../src/main/res/values-ru/strings.xml | 25 - .../src/main/res/values-sr/strings.xml | 20 - .../src/main/res/values-th/strings.xml | 23 - .../src/main/res/values-tr/strings.xml | 25 - .../src/main/res/values-uk/strings.xml | 25 - .../src/main/res/values-vi/strings.xml | 25 - .../src/main/res/values-zh-rCN/strings.xml | 25 - .../src/main/res/values-zh-rTW/strings.xml | 25 - .../src/main/res/values/colors.xml | 21 - .../src/main/res/values/strings.xml | 29 - play-services-core/proguard-rules.pro | 61 -- .../src/huawei/AndroidManifest.xml | 38 - .../src/huaweilh/AndroidManifest.xml | 59 -- .../src/main/AndroidManifest.xml | 958 ------------------ .../src/main/ic_launcher-playstore.png | Bin 30880 -> 0 bytes .../com/google/android/gms/auth/GetToken.java | 30 - .../android/gms/auth/TokenActivity.java | 54 - .../gms/common/GoogleCertificatesImpl.java | 70 -- .../security/ProviderInstallerImpl.java | 225 ---- .../common/ui/SignInButtonCreatorImpl.java | 33 - .../gms/security/ProviderInstaller.java | 61 -- .../SemanticLocationService.kt | 56 - .../gms/auth/AccountContentProvider.java | 164 --- .../java/org/microg/gms/auth/AuthManager.java | 328 ------ .../gms/auth/AuthManagerServiceImpl.java | 232 ----- .../java/org/microg/gms/auth/AuthRequest.java | 282 ------ .../org/microg/gms/auth/AuthResponse.java | 127 --- .../org/microg/gms/auth/SignInService.java | 38 - .../gms/auth/login/AssistantActivity.java | 106 -- .../microg/gms/auth/login/LoginActivity.java | 587 ----------- .../loginservice/AccountAuthenticator.java | 145 --- .../auth/loginservice/GoogleLoginService.java | 41 - .../org/microg/gms/checkin/CheckinClient.java | 170 ---- .../microg/gms/checkin/CheckinManager.java | 79 -- .../microg/gms/checkin/CheckinService.java | 130 --- .../microg/gms/checkin/TriggerReceiver.java | 73 -- .../java/org/microg/gms/gcm/GcmDatabase.java | 316 ------ .../org/microg/gms/gcm/GcmLegacyData.java | 110 -- .../java/org/microg/gms/gcm/McsConstants.java | 47 - .../org/microg/gms/gcm/McsInputStream.java | 186 ---- .../org/microg/gms/gcm/McsOutputStream.java | 140 --- .../java/org/microg/gms/gcm/McsService.java | 796 --------------- .../microg/gms/gcm/PushRegisterManager.java | 176 ---- .../org/microg/gms/gcm/RegisterRequest.java | 156 --- .../org/microg/gms/gcm/RegisterResponse.java | 42 - .../java/org/microg/gms/gcm/SendReceiver.java | 44 - .../org/microg/gms/gcm/TriggerReceiver.java | 115 --- .../microg/gms/gcm/UnregisterReceiver.java | 47 - .../microg/gms/gservices/DatabaseHelper.java | 103 -- .../org/microg/gms/gservices/GServices.java | 73 -- .../gms/gservices/GServicesProvider.java | 128 --- .../microg/gms/people/ContactSyncService.java | 44 - .../org/microg/gms/people/DatabaseHelper.java | 125 --- .../org/microg/gms/people/PeopleManager.java | 126 --- .../org/microg/gms/people/PeopleService.java | 38 - .../microg/gms/people/PeopleServiceImpl.java | 184 ---- .../java/org/microg/gms/ui/AboutFragment.java | 68 -- .../gms/ui/AccountSettingsActivity.java | 72 -- .../org/microg/gms/ui/GoogleMoreFragment.java | 30 - .../org/microg/gms/ui/SettingsActivity.java | 56 - .../gms/ui/SettingsDashboardActivity.java | 36 - .../mgms/settings/GoogleSettingsProvider.java | 54 - .../microg/tools/AccountPickerActivity.java | 51 - .../selfcheck/RomSpoofSignatureChecks.java | 79 -- .../gms/common/GoogleCertificatesImpl.kt | 96 -- .../android/gms/feedback/FeedbackActivity.kt | 21 - .../service/history/FitHistoryBroker.kt | 101 -- .../gms/accountsettings/ui/LoaderActivity.kt | 163 --- .../gms/accountsettings/ui/WebViewHelper.kt | 130 --- .../org/microg/gms/audit/AuditService.kt | 45 - .../kotlin/org/microg/gms/auth/AuthPrefs.kt | 34 - .../auth/account/data/AccountDataService.kt | 52 - .../microg/gms/auth/appcert/AppCertManager.kt | 188 ---- .../microg/gms/auth/appcert/AppCertService.kt | 43 - .../gms/auth/consent/ConsentSignInActivity.kt | 166 --- .../credentials/CredentialPickerActivity.kt | 38 - .../auth/credentials/CredentialsService.kt | 56 - .../identity/IdentitySignInService.kt | 95 -- .../microg/gms/auth/proxy/AuthProxyService.kt | 74 -- .../gms/auth/signin/AuthSignInActivity.kt | 246 ----- .../gms/auth/signin/AuthSignInService.kt | 155 --- .../org/microg/gms/auth/signin/extensions.kt | 211 ---- .../gms/backup/BackupSettingsActivity.kt | 18 - .../org/microg/gms/checkin/CheckinPrefs.kt | 52 - .../org/microg/gms/checkin/LastCheckinInfo.kt | 90 -- .../org/microg/gms/checkin/ServiceInfo.kt | 46 - .../org/microg/gms/chimera/ServiceProvider.kt | 89 -- .../gms/clearcut/ClearcutLoggerService.kt | 77 -- .../credential/CredentialManagerService.kt | 90 -- .../microg/gms/feedback/FeedbackService.kt | 89 -- .../gms/games/FirstPartyGamesService.kt | 74 -- .../microg/gms/games/GamesConnectService.kt | 95 -- .../org/microg/gms/games/GamesService.kt | 574 ----------- .../kotlin/org/microg/gms/games/extensions.kt | 268 ----- .../kotlin/org/microg/gms/gass/GassService.kt | 39 - .../kotlin/org/microg/gms/gcm/GcmPrefs.kt | 191 ---- .../org/microg/gms/gcm/PushRegisterService.kt | 349 ------- .../kotlin/org/microg/gms/gcm/ServiceInfo.kt | 89 -- .../ui/GoogleHelpRedirectActivity.kt | 38 - .../gms/measurement/MeasurementService.kt | 95 -- .../microg/gms/phenotype/PhenotypeService.kt | 153 --- .../microg/gms/potokens/PoTokenConstants.kt | 17 - .../org/microg/gms/potokens/PoTokenHelper.kt | 217 ---- .../microg/gms/potokens/PoTokenPreferences.kt | 45 - .../microg/gms/potokens/PoTokensService.kt | 69 -- .../gms/pseudonymous/PseudonymousIdService.kt | 52 - .../org/microg/gms/signin/SignInService.kt | 138 --- .../org/microg/gms/ui/AccountsFragment.kt | 119 --- .../org/microg/gms/ui/AppIconPreference.kt | 31 - .../kotlin/org/microg/gms/ui/Constants.kt | 8 - .../gms/ui/DeviceRegistrationFragment.kt | 55 - .../DeviceRegistrationPreferencesFragment.kt | 164 --- .../gms/ui/PreferenceSwitchBarCallback.kt | 10 - .../ui/PushNotificationAdvancedFragment.kt | 113 --- .../gms/ui/PushNotificationAllAppsFragment.kt | 111 -- .../gms/ui/PushNotificationAppFragment.kt | 62 -- .../PushNotificationAppPreferencesFragment.kt | 137 --- .../microg/gms/ui/PushNotificationFragment.kt | 79 -- .../ui/PushNotificationPreferencesFragment.kt | 128 --- .../org/microg/gms/ui/SafetyNetFragment.kt | 311 ------ .../org/microg/gms/ui/SettingsFragment.kt | 114 --- .../org/microg/gms/ui/TextPreference.kt | 35 - .../main/kotlin/org/microg/gms/ui/Utils.kt | 59 -- .../org/microg/gms/ui/VendingFragment.kt | 69 -- .../microg/gms/vending/VendingPreferences.kt | 41 - .../color/material_switch_bar_text_color.xml | 9 - .../material_switch_bar_background.xml | 14 - ...aterial_switch_bar_background_disabled.xml | 14 - .../src/main/res/drawable/dots_horizontal.xml | 10 - .../src/main/res/drawable/ic_add.xml | 16 - .../src/main/res/drawable/ic_add_account.xml | 10 - .../drawable/ic_baseline_hide_source_24.xml | 10 - .../src/main/res/drawable/ic_cloud_bell.xml | 12 - .../src/main/res/drawable/ic_device_login.xml | 10 - .../src/main/res/drawable/ic_expand_apps.xml | 11 - .../src/main/res/drawable/ic_info_outline.xml | 10 - .../main/res/drawable/ic_manage_account.xml | 16 - .../main/res/drawable/ic_manage_accounts.xml | 22 - .../res/layout/activity_consent_sign_in.xml | 18 - .../layout/device_registration_fragment.xml | 40 - .../src/main/res/layout/login_assistant.xml | 99 -- .../res/layout/login_assistant_loading.xml | 38 - .../layout/preference_category_no_label.xml | 9 - .../res/layout/preference_material_switch.xml | 10 - .../layout/preference_material_switch_bar.xml | 58 -- .../res/layout/preference_progress_bar.xml | 17 - .../main/res/layout/preference_switch_bar.xml | 71 -- .../layout/push_notification_app_fragment.xml | 81 -- .../res/layout/push_notification_fragment.xml | 44 - .../res/layout/settings_root_activity.xml | 54 - .../src/main/res/layout/signin_confirm.xml | 106 -- .../res/mipmap-anydpi-v26/ic_launcher.xml | 5 - .../mipmap-anydpi-v26/ic_launcher_round.xml | 5 - .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 3963 -> 0 bytes .../mipmap-hdpi/ic_launcher_foreground.png | Bin 4470 -> 0 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 3963 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 2450 -> 0 bytes .../mipmap-mdpi/ic_launcher_foreground.png | Bin 2544 -> 0 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 2450 -> 0 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 5547 -> 0 bytes .../mipmap-xhdpi/ic_launcher_foreground.png | Bin 6284 -> 0 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 5547 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 9071 -> 0 bytes .../mipmap-xxhdpi/ic_launcher_foreground.png | Bin 11328 -> 0 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 9071 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 13090 -> 0 bytes .../mipmap-xxxhdpi/ic_launcher_foreground.png | Bin 16911 -> 0 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 13090 -> 0 bytes .../src/main/res/navigation/nav_settings.xml | 81 -- .../src/main/res/values-ar/arrays.xml | 31 - .../src/main/res/values-ar/plurals.xml | 25 - .../src/main/res/values-ar/strings.xml | 143 --- .../src/main/res/values-az/arrays.xml | 31 - .../src/main/res/values-az/plurals.xml | 25 - .../src/main/res/values-az/strings.xml | 143 --- .../src/main/res/values-be/arrays.xml | 31 - .../src/main/res/values-be/permissions.xml | 173 ---- .../src/main/res/values-be/plurals.xml | 52 - .../src/main/res/values-be/strings.xml | 360 ------- .../src/main/res/values-bn/arrays.xml | 31 - .../src/main/res/values-bn/plurals.xml | 25 - .../src/main/res/values-bn/strings.xml | 144 --- .../src/main/res/values-cs/strings.xml | 140 --- .../src/main/res/values-de/permissions.xml | 125 --- .../src/main/res/values-de/strings.xml | 217 ---- .../src/main/res/values-es-rES/arrays.xml | 31 - .../src/main/res/values-es-rES/plurals.xml | 49 - .../src/main/res/values-es-rES/strings.xml | 143 --- .../src/main/res/values-es/permissions.xml | 173 ---- .../src/main/res/values-es/strings.xml | 225 ---- .../src/main/res/values-fr/arrays.xml | 31 - .../src/main/res/values-fr/plurals.xml | 25 - .../src/main/res/values-fr/strings.xml | 240 ----- .../src/main/res/values-he/strings.xml | 90 -- .../src/main/res/values-hi/arrays.xml | 31 - .../src/main/res/values-hi/plurals.xml | 25 - .../src/main/res/values-hi/strings.xml | 142 --- .../src/main/res/values-id/arrays.xml | 31 - .../src/main/res/values-id/plurals.xml | 25 - .../src/main/res/values-id/strings.xml | 141 --- .../src/main/res/values-it/arrays.xml | 31 - .../src/main/res/values-it/permissions.xml | 173 ---- .../src/main/res/values-it/plurals.xml | 25 - .../src/main/res/values-it/strings.xml | 220 ---- .../src/main/res/values-ja/arrays.xml | 31 - .../src/main/res/values-ja/plurals.xml | 25 - .../src/main/res/values-ja/strings.xml | 143 --- .../src/main/res/values-ko/arrays.xml | 31 - .../src/main/res/values-ko/plurals.xml | 25 - .../src/main/res/values-ko/strings.xml | 143 --- .../src/main/res/values-lt/arrays.xml | 31 - .../src/main/res/values-lt/plurals.xml | 25 - .../src/main/res/values-lt/strings.xml | 143 --- .../src/main/res/values-night-v31/themes.xml | 20 - .../src/main/res/values-night-v8/themes.xml | 110 -- .../src/main/res/values-night/themes.xml | 8 - .../src/main/res/values-pt-rBR/arrays.xml | 31 - .../main/res/values-pt-rBR/permissions.xml | 151 --- .../src/main/res/values-pt-rBR/plurals.xml | 50 - .../src/main/res/values-pt-rBR/strings.xml | 360 ------- .../src/main/res/values-ro/strings.xml | 236 ----- .../src/main/res/values-ru/arrays.xml | 31 - .../src/main/res/values-ru/permissions.xml | 173 ---- .../src/main/res/values-ru/plurals.xml | 52 - .../src/main/res/values-ru/strings.xml | 354 ------- .../src/main/res/values-sr/strings.xml | 237 ----- .../src/main/res/values-sv/strings.xml | 209 ---- .../src/main/res/values-th/strings.xml | 131 --- .../src/main/res/values-tr/arrays.xml | 31 - .../src/main/res/values-tr/plurals.xml | 25 - .../src/main/res/values-tr/strings.xml | 143 --- .../src/main/res/values-uk/arrays.xml | 31 - .../src/main/res/values-uk/plurals.xml | 25 - .../src/main/res/values-uk/strings.xml | 174 ---- .../src/main/res/values-v23/themes.xml | 25 - .../src/main/res/values-v27/themes.xml | 15 - .../src/main/res/values-v31/themes.xml | 22 - .../src/main/res/values-vi/arrays.xml | 31 - .../src/main/res/values-vi/plurals.xml | 25 - .../src/main/res/values-vi/strings.xml | 144 --- .../src/main/res/values-zh-rCN/arrays.xml | 31 - .../src/main/res/values-zh-rCN/plurals.xml | 25 - .../src/main/res/values-zh-rCN/strings.xml | 290 ------ .../src/main/res/values-zh-rTW/arrays.xml | 31 - .../src/main/res/values-zh-rTW/plurals.xml | 25 - .../src/main/res/values-zh-rTW/strings.xml | 262 ----- .../src/main/res/values/arrays.xml | 41 - .../src/main/res/values/bools.xml | 18 - .../src/main/res/values/colors.xml | 78 -- .../src/main/res/values/dimens.xml | 17 - .../res/values/ic_launcher_background.xml | 4 - .../src/main/res/values/permissions.xml | 20 - .../src/main/res/values/plurals.xml | 23 - .../src/main/res/values/resources.xml | 6 - .../src/main/res/values/signature.xml | 21 - .../src/main/res/values/strings.xml | 258 ----- .../src/main/res/values/themes.xml | 168 --- .../src/main/res/xml/authenticator.xml | 24 - .../main/res/xml/network_security_config.xml | 23 - .../src/main/res/xml/preferences_account.xml | 75 -- .../src/main/res/xml/preferences_accounts.xml | 45 - .../src/main/res/xml/preferences_auth.xml | 39 - .../xml/preferences_device_registration.xml | 47 - .../main/res/xml/preferences_gcm_advanced.xml | 67 -- .../main/res/xml/preferences_google_more.xml | 72 -- .../xml/preferences_push_notifications.xml | 46 - ...references_push_notifications_all_apps.xml | 39 - .../preferences_push_notifications_app.xml | 53 - .../res/xml/preferences_safetynet_app.xml | 24 - .../src/main/res/xml/preferences_start.xml | 89 -- .../src/main/res/xml/preferences_vending.xml | 35 - .../core/DroidGuardResultCreator.kt | 62 -- .../core/DroidGuardServiceBroker.kt | 26 - .../gms/droidguard/core/HandleProxyFactory.kt | 226 ----- .../core/src/main/res/values-de/strings.xml | 7 - .../core/src/main/res/values-es/strings.xml | 8 - .../src/main/res/values-pt-rBR/strings.xml | 8 - .../microg/gms/fido/core/RequestHandling.kt | 262 ----- .../core/privileged/Fido2PrivilegedService.kt | 110 -- .../core/transport/nfc/NfcTransportHandler.kt | 113 --- .../usb/UsbDevicePermissionManager.kt | 84 -- .../core/src/main/res/values-be/strings.xml | 25 - .../core/src/main/res/values-de/strings.xml | 22 - .../core/src/main/res/values-es/strings.xml | 22 - .../src/main/res/values-pt-rBR/strings.xml | 22 - .../core/src/main/res/values-uk/strings.xml | 22 - play-services-fitness/.gitignore | 1 - play-services-fitness/build.gradle | 34 - .../src/main/AndroidManifest.xml | 4 - .../fitness/internal/IDailyTotalCallback.aidl | 10 - .../internal/IDataPointChangesCallback.aidl | 10 - .../fitness/internal/IDataReadCallback.aidl | 12 - .../fitness/internal/IDebugInfoCallback.aidl | 10 - .../fitness/internal/IFileUriCallback.aidl | 10 - .../internal/IGoogleFitHistoryApi.aidl | 39 - .../fitness/internal/IReadRawCallback.aidl | 10 - .../fitness/internal/IReadStatsCallback.aidl | 12 - .../internal/ISessionChangesCallback.aidl | 10 - .../gms/fitness/internal/IStatusCallback.aidl | 12 - .../fitness/internal/ISyncInfoCallback.aidl | 10 - .../fitness/request/DailyTotalRequest.aidl | 8 - .../fitness/request/DataDeleteRequest.aidl | 8 - .../fitness/request/DataInsertRequest.aidl | 8 - .../request/DataPointChangesRequest.aidl | 8 - .../gms/fitness/request/DataReadRequest.aidl | 8 - .../gms/fitness/request/DataReadResult.aidl | 8 - .../request/DataSourceQueryParams.aidl | 8 - ...DataUpdateListenerRegistrationRequest.aidl | 8 - ...taUpdateListenerUnregistrationRequest.aidl | 8 - .../fitness/request/DataUpdateRequest.aidl | 8 - .../gms/fitness/request/DebugInfoRequest.aidl | 8 - .../fitness/request/GetFileUriRequest.aidl | 8 - .../fitness/request/GetSyncInfoRequest.aidl | 8 - .../gms/fitness/request/ReadRawRequest.aidl | 8 - .../gms/fitness/request/ReadStatsRequest.aidl | 8 - .../request/SessionChangesRequest.aidl | 8 - .../fitness/result/DataSourceStatsResult.aidl | 8 - .../gms/fitness/result/DataStatsResult.aidl | 8 - .../android/gms/fitness/data/AppInfo.java | 48 - .../android/gms/fitness/data/Bucket.java | 60 -- .../android/gms/fitness/data/DataSet.java | 31 - .../android/gms/fitness/data/DataSource.java | 37 - .../android/gms/fitness/data/DataType.java | 102 -- .../android/gms/fitness/data/Device.java | 35 - .../android/gms/fitness/data/Field.java | 152 --- .../android/gms/fitness/data/Session.java | 24 - .../fitness/request/DailyTotalRequest.java | 34 - .../fitness/request/DataDeleteRequest.java | 70 -- .../fitness/request/DataInsertRequest.java | 34 - .../request/DataPointChangesRequest.java | 33 - .../gms/fitness/request/DataReadRequest.java | 59 -- .../gms/fitness/request/DataReadResult.java | 42 - .../request/DataSourceQueryParams.java | 37 - ...DataUpdateListenerRegistrationRequest.java | 38 - ...taUpdateListenerUnregistrationRequest.java | 32 - .../fitness/request/DataUpdateRequest.java | 36 - .../gms/fitness/request/DebugInfoRequest.java | 29 - .../fitness/request/GetFileUriRequest.java | 29 - .../fitness/request/GetSyncInfoRequest.java | 30 - .../gms/fitness/request/ReadRawRequest.java | 33 - .../gms/fitness/request/ReadStatsRequest.java | 36 - .../request/SessionChangesRequest.java | 33 - .../fitness/result/DataSourceStatsResult.java | 38 - .../gms/fitness/result/DataStatsResult.java | 49 - .../GmsDeviceComplianceService.kt | 47 - play-services-iid-api/build.gradle | 40 - play-services-iid-api/gradle.properties | 33 - .../android/gms/iid/IMessengerCompat.aidl | 7 - .../android/gms/iid/MessengerCompat.java | 94 -- play-services-location/build.gradle | 43 - play-services-location/core/build.gradle | 84 -- .../core/provider/build.gradle | 57 -- .../network/cell/CellDetailsSource.kt | 74 -- .../mozilla/MozillaLocationServiceClient.kt | 89 -- .../location/network/wifi/MovingWifiHelper.kt | 343 ------- .../NetworkLocationProviderPreTiramisu.kt | 124 --- .../OpenStreetMapNominatimGeocodeProvider.kt | 188 ---- .../core/src/huawei/AndroidManifest.xml | 33 - .../src/huawei/res/values-zh-rCN/strings.xml | 23 - .../core/src/main/AndroidManifest.xml | 62 -- .../manager/DeviceOrientationManager.kt | 314 ------ .../gms/location/manager/LocationManager.kt | 337 ------ .../manager/LocationManagerInstance.kt | 410 -------- .../manager/LocationRequestManager.kt | 455 --------- .../reporting/ReportingServiceInstance.kt | 65 -- .../DetailedLocationSettingsStates.kt | 72 -- .../LocationSettingsCheckerActivity.kt | 201 ---- .../ui/LocationPreferencesFragment.kt | 151 --- .../core/src/main/res/drawable/ic_gps.xml | 16 - .../res/layout/location_settings_dialog.xml | 68 -- .../layout/location_settings_dialog_item.xml | 25 - .../core/src/main/res/values-be/strings.xml | 24 - .../core/src/main/res/values-de/strings.xml | 24 - .../core/src/main/res/values-es/strings.xml | 24 - .../src/main/res/values-pt-rBR/strings.xml | 24 - .../core/src/main/res/values-ru/strings.xml | 24 - .../src/main/res/values-zh-rCN/strings.xml | 33 - .../core/src/main/res/values/strings.xml | 40 - .../xml/preferences_location_app_details.xml | 34 - .../IGoogleLocationManagerService.aidl | 138 --- .../gms/location/DeviceOrientation.java | 136 --- .../gms/location/LocationSettingsRequest.java | 135 --- .../location/LocationSettingsResponse.java | 41 - .../gms/location/LocationSettingsResult.java | 86 -- .../gms/location/LocationSettingsStates.java | 138 --- .../android/gms/location/SettingsClient.java | 44 - .../gms/location/SettingsClientImpl.java | 39 - .../org/microg/gms/maps/hms/GoogleMap.kt | 829 --------------- .../org/microg/gms/maps/hms/Projection.kt | 61 -- .../org/microg/gms/maps/hms/model/Marker.kt | 154 --- .../gms/maps/hms/utils/typeConverter.kt | 229 ----- .../gms/maps/mapbox/AbstractGoogleMap.kt | 171 ---- .../org/microg/gms/maps/mapbox/GoogleMap.kt | 915 ----------------- .../gms/maps/mapbox/utils/MapContext.kt | 81 -- .../gms/maps/mapbox/utils/MultiArchLoader.kt | 85 -- .../exposurenotification/AdvertiserService.kt | 268 ----- .../exposurenotification/CleanupService.kt | 64 -- .../ExposureNotificationServiceImpl.kt | 802 --------------- .../exposurenotification/NotifyService.kt | 140 --- .../exposurenotification/ScannerService.kt | 197 ---- .../core/src/main/res/values-be/strings.xml | 75 -- .../core/src/main/res/values-de/strings.xml | 75 -- .../core/src/main/res/values-es/strings.xml | 75 -- .../src/main/res/values-pt-rBR/strings.xml | 68 -- .../core/src/main/res/values-ro/strings.xml | 68 -- .../core/src/main/res/values-ru/strings.xml | 75 -- .../src/main/res/values-be/strings.xml | 9 - .../src/main/res/values-de/strings.xml | 9 - .../src/main/res/values-es/strings.xml | 9 - .../src/main/res/values-pt-rBR/strings.xml | 9 - .../src/main/res/values-ru/strings.xml | 9 - play-services-panorama/build.gradle | 41 - play-services-panorama/core/build.gradle | 56 - .../core/src/main/AndroidManifest.xml | 15 - .../microg/gms/panorama/PanoramaService.kt | 31 - .../src/AndroidManifest.xml | 6 - .../google/android/gms/panorama/Panorama.java | 30 - .../android/gms/panorama/PanoramaApi.java | 50 - .../panorama/internal/IPanoramaCallbacks.aidl | 11 - .../panorama/internal/IPanoramaService.aidl | 13 - .../gms/phenotype/ExperimentTokens.java | 34 - .../gms/recaptcha/RecaptchaGuardImpl.kt | 132 --- .../microg/gms/recaptcha/RecaptchaService.kt | 154 --- .../microg/gms/recaptcha/RecaptchaWebImpl.kt | 736 -------------- .../gms/safetynet/SafetyNetClientService.kt | 277 ----- play-services-tasks/build.gradle | 37 - play-services-tasks/gradle.properties | 33 - .../android/gms/tasks/CancellationToken.java | 88 -- .../gms/tasks/CancellationTokenSource.java | 46 - .../android/gms/tasks/Continuation.java | 62 -- .../DuplicateTaskCompletionException.java | 32 - .../android/gms/tasks/OnCanceledListener.java | 22 - .../android/gms/tasks/OnCompleteListener.java | 26 - .../android/gms/tasks/OnFailureListener.java | 27 - .../android/gms/tasks/OnSuccessListener.java | 26 - .../gms/tasks/OnTokenCanceledListener.java | 24 - .../gms/tasks/RuntimeExecutionException.java | 25 - .../gms/tasks/SuccessContinuation.java | 42 - .../com/google/android/gms/tasks/Task.java | 292 ------ .../gms/tasks/TaskCompletionSource.java | 115 --- .../android/gms/tasks/TaskExecutors.java | 33 - .../com/google/android/gms/tasks/Tasks.java | 63 -- .../gms/tasks/CancellationTokenImpl.java | 32 - .../microg/gms/tasks/CancelledExecutor.java | 34 - .../microg/gms/tasks/CompletedExecutor.java | 33 - .../gms/tasks/ContinuationExecutor.java | 46 - .../gms/tasks/ContinuationWithExecutor.java | 52 - .../org/microg/gms/tasks/FailureExecutor.java | 33 - .../tasks/SuccessContinuationExecutor.java | 54 - .../org/microg/gms/tasks/SuccessExecutor.java | 33 - .../java/org/microg/gms/tasks/TaskImpl.java | 241 ----- .../org/microg/gms/tasks/UpdateExecutor.java | 27 - .../org/microg/gms/tasks/UpdateListener.java | 14 - .../UpdateListenerLifecycleObserver.java | 98 -- .../gms/wearable/WearableServiceImpl.java | 507 --------- .../wearable/internal/IWearableService.aidl | 82 -- proguard.flags | 52 - .../microg/safeparcel/SafeParcelProcessor.kt | 428 -------- settings.gradle | 131 --- vending-app/build.gradle | 138 --- vending-app/src/huaweilh/AndroidManifest.xml | 21 - vending-app/src/main/AndroidManifest.xml | 170 ---- .../vending/billing/IInAppBillingService.aidl | 370 ------- .../gms/checkin/internal/ICheckinService.aidl | 7 - .../billingclient/api/BillingClient.java | 217 ---- .../android/billingclient/package-info.java | 9 - .../com/android/vending/VendingPreferences.kt | 27 - .../vending/billing/InAppBillingService.kt | 24 - .../vending/licensing/LicenseChecker.java | 211 ---- .../vending/licensing/LicenseRequest.java | 233 ----- .../LicenseServiceNotificationRunnable.java | 164 --- .../vending/licensing/LicensingService.java | 206 ---- .../microg/vending/MarketIntentRedirect.java | 84 -- .../org/microg/vending/billing/AuthManager.kt | 35 - .../vending/billing/CheckinServiceClient.kt | 49 - .../org/microg/vending/billing/Constants.kt | 17 - .../microg/vending/billing/ContextProvider.kt | 19 - .../vending/billing/DeviceIdentifier.kt | 71 -- .../org/microg/vending/billing/GServices.kt | 20 - .../billing/InAppBillingServiceImpl.kt | 629 ------------ .../vending/billing/PurchaseActivity.java | 24 - .../microg/vending/billing/PurchaseManager.kt | 129 --- .../microg/vending/billing/SettingsManager.kt | 31 - .../java/org/microg/vending/billing/Utils.kt | 340 ------- .../billing/core/AcknowledgePurchaseParams.kt | 7 - .../billing/core/AcknowledgePurchaseResult.kt | 36 - .../vending/billing/core/AcquireParams.kt | 9 - .../vending/billing/core/AcquireResult.kt | 29 - .../microg/vending/billing/core/AuthData.kt | 11 - .../vending/billing/core/BuyFlowParams.kt | 15 - .../microg/vending/billing/core/ClientInfo.kt | 7 - .../billing/core/ConsumePurchaseParams.kt | 7 - .../billing/core/ConsumePurchaseResult.kt | 30 - .../vending/billing/core/DeviceEnvInfo.kt | 68 -- .../billing/core/GetPurchaseHistoryParams.kt | 8 - .../billing/core/GetPurchaseHistoryResult.kt | 53 - .../billing/core/GetSkuDetailsParams.kt | 10 - .../billing/core/GetSkuDetailsResult.kt | 42 - .../vending/billing/core/GooglePlayApi.kt | 14 - .../vending/billing/core/HeaderProvider.kt | 40 - .../microg/vending/billing/core/HttpClient.kt | 140 --- .../vending/billing/core/IAPCacheManager.kt | 34 - .../microg/vending/billing/core/IAPCore.kt | 322 ------ .../microg/vending/billing/core/IAPResult.kt | 11 - .../vending/billing/core/PurchaseItem.kt | 25 - .../org/microg/vending/billing/core/Utils.kt | 309 ------ .../vending/billing/core/ui/UIComponents.kt | 301 ------ .../vending/billing/core/ui/UIParser.kt | 705 ------------- .../microg/vending/billing/core/ui/UIType.kt | 28 - .../org/microg/vending/billing/ui/Extends.kt | 161 --- .../org/microg/vending/billing/ui/HtmlText.kt | 278 ----- .../billing/ui/InAppBillingHostActivity.kt | 149 --- .../vending/billing/ui/PlayWebViewActivity.kt | 104 -- .../microg/vending/billing/ui/SheetUIPage.kt | 580 ----------- .../org/microg/vending/billing/ui/Utils.kt | 120 --- .../vending/billing/ui/WebViewHelper.kt | 117 --- .../billing/ui/logic/InAppBillingViewModel.kt | 310 ------ .../microg/vending/billing/ui/logic/Models.kt | 38 - .../microg/vending/billing/ui/theme/Color.kt | 13 - .../microg/vending/billing/ui/theme/Theme.kt | 78 -- .../microg/vending/billing/ui/theme/Type.kt | 34 - .../billing/ui/widgets/LoadingDialog.kt | 36 - .../billing/ui/widgets/PasswdInputDialog.kt | 182 ---- vending-app/src/main/proto/GooglePlay.proto | 688 ------------- .../src/main/proto/LicenseRequest.proto | 71 -- vending-app/src/main/proto/Timestamp.proto | 33 - .../main/res/drawable-v21/anim_check_mark.xml | 178 ---- .../src/main/res/drawable-v21/google_play.xml | 16 - .../src/main/res/drawable/ic_notification.xml | 42 - .../res/layout/activiy_confirm_purchase.xml | 13 - .../src/main/res/values-be/strings.xml | 13 - .../src/main/res/values-de/strings.xml | 6 - .../src/main/res/values-es/strings.xml | 12 - .../src/main/res/values-it/strings.xml | 7 - .../src/main/res/values-pt-rBR/strings.xml | 12 - .../src/main/res/values-ro/strings.xml | 13 - .../src/main/res/values-ru/strings.xml | 13 - .../src/main/res/values-sv/strings.xml | 12 - .../src/main/res/values-uk/strings.xml | 6 - .../src/main/res/values-zh-rCN/strings.xml | 17 - vending-app/src/main/res/values/colors.xml | 5 - vending-app/src/main/res/values/strings.xml | 31 - vending-app/src/main/res/values/styles.xml | 33 - 888 files changed, 68518 deletions(-) delete mode 100644 .github/matchers/gradle-build-kotlin-error-matcher.json delete mode 100644 .github/matchers/gradle-build-kotlin-error-matcher.json.license delete mode 100644 .github/matchers/gradle-build-matcher.json delete mode 100644 .github/matchers/gradle-build-matcher.json.license delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/debug.yml delete mode 100644 .gitignore delete mode 100644 Android.mk delete mode 100644 LICENSE delete mode 100644 LICENSES/Apache-2.0.txt delete mode 100644 LICENSES/CC-BY-4.0.txt delete mode 100644 LICENSES/CC0-1.0.txt delete mode 100644 build.gradle delete mode 100644 fake-signature/src/huawei/java/com/huawei/signature/diff/AppListDatabaseOpenHelper.java delete mode 100644 fake-signature/src/main/res/values/arrays.xml delete mode 100644 firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/FirebaseAuthService.kt delete mode 100644 firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/IdentityToolkitClient.kt delete mode 100644 gradle.properties delete mode 100644 gradle/wrapper/gradle-wrapper.jar delete mode 100644 gradle/wrapper/gradle-wrapper.properties delete mode 100755 gradlew delete mode 100644 gradlew.bat delete mode 100644 play-services-ads-identifier/core/src/main/kotlin/org/microg/gms/ads/identifier/AdvertisingIdService.kt delete mode 100644 play-services-ads-identifier/core/src/main/res/values-be/strings.xml delete mode 100644 play-services-ads-identifier/core/src/main/res/values-es/strings.xml delete mode 100644 play-services-ads-identifier/core/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-ads-identifier/core/src/main/res/values-ru/strings.xml delete mode 100644 play-services-ads-identifier/core/src/main/res/values-zh-rCN/strings.xml delete mode 100644 play-services-api/build.gradle delete mode 100644 play-services-api/gradle.properties delete mode 100644 play-services-api/src/main/aidl/com/google/android/auth/IAuthManagerService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsRequest.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsResponse.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/GetHubTokenInternalResponse.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/GetHubTokenRequest.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/HasCababilitiesRequest.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/Credential.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/CredentialRequest.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsCallbacks.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/SaveRequest.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthCallbacks.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyRequest.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyResponse.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/auth/appcert/IAppCertService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/checkin/internal/ICheckinService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/common/data/BitmapTeleporter.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/common/internal/GoogleCertificatesQuery.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/common/internal/ICertData.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/common/internal/IGoogleCertificatesApi.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/common/internal/ISignInButtonCreator.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/common/server/FavaDiagnosticsEntity.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/feedback/ErrorReport.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/feedback/FileTeleporter.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/feedback/LogOptions.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/feedback/ThemeSettings.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackCallbacks.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassRequestParcel.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassResponseParcel.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/gass/internal/IGassService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/http/IGoogleHttpService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleCallbacks.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/phenotype/internal/IPhenotypeService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/potokens/PoToken.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/IPoTokensService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/ITokenCallbacks.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/PseudonymousIdToken.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdCallbacks.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/ISemanticLocationService.aidl delete mode 100644 play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.aidl delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEvent.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsResponse.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/GetHubTokenInternalResponse.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/GetHubTokenRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/HasCababilitiesRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/TokenData.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/HintRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdentityProviders.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/SaveRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyResponse.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRecoveryGuidanceRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRemovalRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/ConfirmCredentialsRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/firstparty/delegate/ConfirmCredentialsWorkflowRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AccountCredentials.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AppDescription.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/CaptchaSolution.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/common/data/BitmapTeleporter.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/common/internal/CertData.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/common/internal/GoogleCertificatesQuery.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/common/server/FavaDiagnosticsEntity.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/feedback/ErrorReport.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/feedback/FeedbackOptions.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/feedback/FileTeleporter.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/feedback/LogOptions.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/gass/internal/GassRequestParcel.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/gass/internal/GassResponseParcel.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/measurement/internal/AppMetadata.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/people/internal/ParcelableLoadImageOptions.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/people/model/AccountMetadata.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/people/model/AvatarReference.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/phenotype/RegistrationInfo.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/potokens/PoToken.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/pseudonymous/PseudonymousIdToken.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.java delete mode 100644 play-services-api/src/main/java/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.java delete mode 100644 play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/AppInviteActivity.kt delete mode 100644 play-services-appset/build.gradle delete mode 100644 play-services-appset/core/build.gradle delete mode 100644 play-services-appset/core/src/main/AndroidManifest.xml delete mode 100644 play-services-appset/core/src/main/kotlin/org/microg/gms/appset/AppSetService.kt delete mode 100644 play-services-appset/src/main/AndroidManifest.xml delete mode 100644 play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetIdRequestParams.aidl delete mode 100644 play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetInfoParcel.aidl delete mode 100644 play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetIdCallback.aidl delete mode 100644 play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetService.aidl delete mode 100644 play-services-appset/src/main/java/com/google/android/gms/appset/AppSet.java delete mode 100644 play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdClient.java delete mode 100644 play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdInfo.java delete mode 100644 play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdRequestParams.java delete mode 100644 play-services-appset/src/main/java/com/google/android/gms/appset/AppSetInfoParcel.java delete mode 100644 play-services-appset/src/main/java/com/google/android/gms/appset/package-info.java delete mode 100644 play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverCore.kt delete mode 100644 play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverService.kt delete mode 100644 play-services-auth-api-phone/core/src/main/res/values-be/strings.xml delete mode 100644 play-services-auth-api-phone/core/src/main/res/values-de/strings.xml delete mode 100644 play-services-auth-api-phone/core/src/main/res/values-es/strings.xml delete mode 100644 play-services-auth-api-phone/core/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-auth-api-phone/core/src/main/res/values-ru/strings.xml delete mode 100644 play-services-auth-api-phone/core/src/main/res/values-uk/strings.xml delete mode 100644 play-services-auth-api-phone/core/src/main/res/values-zh-rCN/strings.xml delete mode 100644 play-services-auth-base/src/main/aidl/com/google/android/gms/auth/firstparty/dataservice/DeviceManagementInfoResponse.aidl delete mode 100644 play-services-auth-base/src/main/java/com/google/android/gms/auth/firstparty/dataservice/DeviceManagementInfoResponse.java delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/account/data/IAccountDataService.aidl delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/account/data/IDeviceManagementInfoCallback.aidl delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/BeginSignInRequest.aidl delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/BeginSignInResult.aidl delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.aidl delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.aidl delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/SignInCredential.aidl delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IBeginSignInCallback.aidl delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IGetPhoneNumberHintIntentCallback.aidl delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IGetSignInIntentCallback.aidl delete mode 100644 play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/ISignInService.aidl delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInRequest.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInResult.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/CredentialSavingClient.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/CredentialSavingOptions.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/Identity.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SaveAccountLinkingTokenRequest.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SaveAccountLinkingTokenResult.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SavePasswordRequest.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SavePasswordResult.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInClient.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInCredential.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInOptions.java delete mode 100644 play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInPassword.java delete mode 100644 play-services-base-api/build.gradle delete mode 100644 play-services-base-api/src/main/aidl/com/google/android/gms/common/api/internal/IStatusCallback.aidl delete mode 100644 play-services-base-api/src/main/aidl/com/google/android/gms/common/data/DataHolder.aidl delete mode 100644 play-services-base-api/src/main/aidl/com/google/android/gms/common/images/WebImage.aidl delete mode 100644 play-services-base-api/src/main/java/com/google/android/gms/auth/api/signin/GoogleSignInAccount.java delete mode 100644 play-services-base-api/src/main/java/com/google/android/gms/common/data/DataHolder.java delete mode 100644 play-services-base-api/src/main/java/com/google/android/gms/common/images/WebImage.java delete mode 100644 play-services-base-core/build.gradle delete mode 100644 play-services-base-core/src/main/AndroidManifest.xml delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/AbstractGmsServiceBroker.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/BaseService.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/DummyService.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/DeviceConfiguration.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/DeviceIdentifier.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/ForegroundServiceContext.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/ForegroundServiceInfo.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/HttpFormClient.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/MultiListenerProxy.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/NonCancelToken.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/PackageUtils.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/PhoneInfo.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/RemoteListenerProxy.java delete mode 100644 play-services-base-core/src/main/java/org/microg/gms/common/Utils.java delete mode 100644 play-services-base-core/src/main/kotlin/org/microg/gms/common/PackageSpoofUtils.kt delete mode 100644 play-services-base-core/src/main/kotlin/org/microg/gms/profile/Build.kt delete mode 100644 play-services-base-core/src/main/kotlin/org/microg/gms/profile/ProfileManager.kt delete mode 100644 play-services-base-core/src/main/kotlin/org/microg/gms/utils/BinderUtils.kt delete mode 100644 play-services-base-core/src/main/kotlin/org/microg/gms/utils/ExtendedPackageInfo.kt delete mode 100644 play-services-base-core/src/main/kotlin/org/microg/gms/utils/FileXmlResourceParser.kt delete mode 100644 play-services-base-core/src/main/kotlin/org/microg/gms/utils/SingleInstanceUtil.kt delete mode 100644 play-services-base-core/src/main/kotlin/org/microg/mgms/settings/SettingsContract.kt delete mode 100644 play-services-base-core/src/main/kotlin/org/microg/mgms/settings/SettingsProvider.kt delete mode 100644 play-services-base-core/src/main/res/drawable/ic_foreground_notification.xml delete mode 100644 play-services-base-core/src/main/res/values-ar/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-az/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-be/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-bn/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-de/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-es-rES/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-fr/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-he/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-hi/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-hu/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-id/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-it/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-ja/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-ko/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-lt/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-ru/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-th/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-tr/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-uk/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-vi/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-zh-rCN/strings.xml delete mode 100644 play-services-base-core/src/main/res/values-zh-rTW/strings.xml delete mode 100644 play-services-base-core/src/main/res/values/strings.xml delete mode 100644 play-services-base/build.gradle delete mode 100644 play-services-base/core/build.gradle delete mode 100644 play-services-base/core/src/main/kotlin/org/microg/gms/common/KnownGooglePackages.kt delete mode 100644 play-services-base/core/src/main/kotlin/org/microg/gms/settings/SettingsContract.kt delete mode 100644 play-services-base/core/src/main/kotlin/org/microg/gms/settings/SettingsProvider.kt delete mode 100644 play-services-base/core/src/main/kotlin/org/microg/gms/ui/SwitchBarPreference.kt delete mode 100644 play-services-base/core/src/main/kotlin/org/microg/gms/utils/IntentCacheManager.kt delete mode 100644 play-services-base/core/src/main/kotlin/org/microg/gms/utils/PackageManagerUtils.kt delete mode 100644 play-services-base/core/src/main/res/layout/preference_app_heading.xml delete mode 100644 play-services-base/core/src/main/res/values-fr/strings.xml delete mode 100644 play-services-base/core/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-base/core/src/main/res/values/themes.xml delete mode 100644 play-services-base/gradle.properties delete mode 100644 play-services-base/src/main/AndroidManifest.xml delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/GoogleApiAvailability.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesClient.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesUtil.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/api/AccountInfo.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/api/Api.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApi.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiActivity.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiClient.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/api/HasApiKey.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/api/PendingResult.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/api/internal/ApiKey.java delete mode 100644 play-services-base/src/main/java/com/google/android/gms/common/data/DataBuffer.java delete mode 100644 play-services-base/src/main/java/org/microg/gms/common/api/AbstractPendingResult.java delete mode 100644 play-services-base/src/main/java/org/microg/gms/common/api/ApiClient.java delete mode 100644 play-services-base/src/main/java/org/microg/gms/common/api/ApiClientBuilder.java delete mode 100644 play-services-base/src/main/java/org/microg/gms/common/api/ApiClientSettings.java delete mode 100644 play-services-base/src/main/java/org/microg/gms/common/api/ConnectionCallbacks.java delete mode 100644 play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiClientImpl.java delete mode 100644 play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiManager.java delete mode 100644 play-services-base/src/main/java/org/microg/gms/common/api/OnConnectionFailedListener.java delete mode 100644 play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java delete mode 100644 play-services-base/src/main/res/values/version.xml delete mode 100644 play-services-basement/build.gradle delete mode 100644 play-services-basement/gradle.properties delete mode 100644 play-services-basement/src/main/aidl/com/google/android/gms/common/api/Status.aidl delete mode 100644 play-services-basement/src/main/aidl/com/google/android/gms/common/internal/GetServiceRequest.aidl delete mode 100644 play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ICancelToken.aidl delete mode 100644 play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsCallbacks.aidl delete mode 100644 play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsServiceBroker.aidl delete mode 100644 play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ValidateAccountRequest.aidl delete mode 100644 play-services-basement/src/main/aidl/com/google/android/gms/dynamic/IObjectWrapper.aidl delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/ConnectionResult.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/Feature.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/Scopes.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/api/Releasable.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/api/Result.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/api/ResultCallback.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/api/Scope.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/api/Status.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/internal/BinderWrapper.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/internal/ValidateAccountRequest.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/common/internal/safeparcel/AbstractSafeParcelable.java delete mode 100644 play-services-basement/src/main/java/com/google/android/gms/dynamic/ObjectWrapper.java delete mode 100644 play-services-basement/src/main/java/org/microg/gms/auth/AuthConstants.java delete mode 100644 play-services-basement/src/main/java/org/microg/gms/common/Constants.java delete mode 100644 play-services-basement/src/main/java/org/microg/gms/common/GmsService.java delete mode 100644 play-services-basement/src/main/java/org/microg/gms/common/PublicApi.java delete mode 100644 play-services-basement/src/main/java/org/microg/gms/gcm/GcmConstants.java delete mode 100644 play-services-basement/src/main/kotlin/com/google/android/gms/dynamic/ObjectWrapper.kt delete mode 100644 play-services-core-proto/build.gradle delete mode 100644 play-services-core-proto/src/main/proto/appcert.proto delete mode 100644 play-services-core-proto/src/main/proto/auth.proto delete mode 100644 play-services-core-proto/src/main/proto/checkin.proto delete mode 100644 play-services-core-proto/src/main/proto/mcs.proto delete mode 100644 play-services-core-proto/src/main/proto/potoken.proto delete mode 100644 play-services-core/build.gradle delete mode 100644 play-services-core/microg-ui-tools/build.gradle delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java delete mode 100644 play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java delete mode 100644 play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_less.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_more.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/layout-v21/preference_material.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/layout/about_root.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/layout/condition_card.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/layout/dashboard_activity.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/layout/preference_widget_radiobutton.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/layout/settings_activity.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/layout/switch_bar.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-ar/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-az/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-be/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-bn/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-cs/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-de/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-eo/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-es-rES/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-es/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-fr/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-he/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-hi/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-hu/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-id/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-it/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-ja/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-ko/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-lt/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-pl/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-ro/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-ru/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-sr/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-th/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-tr/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-uk/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-vi/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-zh-rCN/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values-zh-rTW/strings.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values/colors.xml delete mode 100644 play-services-core/microg-ui-tools/src/main/res/values/strings.xml delete mode 100644 play-services-core/proguard-rules.pro delete mode 100644 play-services-core/src/huawei/AndroidManifest.xml delete mode 100644 play-services-core/src/huaweilh/AndroidManifest.xml delete mode 100644 play-services-core/src/main/AndroidManifest.xml delete mode 100644 play-services-core/src/main/ic_launcher-playstore.png delete mode 100644 play-services-core/src/main/java/com/google/android/gms/auth/GetToken.java delete mode 100644 play-services-core/src/main/java/com/google/android/gms/auth/TokenActivity.java delete mode 100644 play-services-core/src/main/java/com/google/android/gms/common/GoogleCertificatesImpl.java delete mode 100644 play-services-core/src/main/java/com/google/android/gms/common/security/ProviderInstallerImpl.java delete mode 100644 play-services-core/src/main/java/com/google/android/gms/common/ui/SignInButtonCreatorImpl.java delete mode 100644 play-services-core/src/main/java/com/google/android/gms/security/ProviderInstaller.java delete mode 100644 play-services-core/src/main/java/com/google/android/gms/semanticlocation/SemanticLocationService.kt delete mode 100644 play-services-core/src/main/java/org/microg/gms/auth/AccountContentProvider.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/auth/AuthManager.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/auth/AuthManagerServiceImpl.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/auth/AuthRequest.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/auth/AuthResponse.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/auth/SignInService.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/auth/login/AssistantActivity.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/auth/loginservice/AccountAuthenticator.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/auth/loginservice/GoogleLoginService.java delete mode 100755 play-services-core/src/main/java/org/microg/gms/checkin/CheckinClient.java delete mode 100755 play-services-core/src/main/java/org/microg/gms/checkin/CheckinManager.java delete mode 100755 play-services-core/src/main/java/org/microg/gms/checkin/CheckinService.java delete mode 100755 play-services-core/src/main/java/org/microg/gms/checkin/TriggerReceiver.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/GcmDatabase.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/GcmLegacyData.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/McsConstants.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/McsInputStream.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/McsOutputStream.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/McsService.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/PushRegisterManager.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/RegisterRequest.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/RegisterResponse.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/SendReceiver.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/TriggerReceiver.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gcm/UnregisterReceiver.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gservices/DatabaseHelper.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gservices/GServices.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/gservices/GServicesProvider.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/people/ContactSyncService.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/people/DatabaseHelper.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/people/PeopleManager.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/people/PeopleService.java delete mode 100644 play-services-core/src/main/java/org/microg/gms/people/PeopleServiceImpl.java delete mode 100755 play-services-core/src/main/java/org/microg/gms/ui/AboutFragment.java delete mode 100755 play-services-core/src/main/java/org/microg/gms/ui/AccountSettingsActivity.java delete mode 100755 play-services-core/src/main/java/org/microg/gms/ui/GoogleMoreFragment.java delete mode 100755 play-services-core/src/main/java/org/microg/gms/ui/SettingsActivity.java delete mode 100755 play-services-core/src/main/java/org/microg/gms/ui/SettingsDashboardActivity.java delete mode 100644 play-services-core/src/main/java/org/microg/mgms/settings/GoogleSettingsProvider.java delete mode 100755 play-services-core/src/main/java/org/microg/tools/AccountPickerActivity.java delete mode 100644 play-services-core/src/main/java/org/microg/tools/selfcheck/RomSpoofSignatureChecks.java delete mode 100644 play-services-core/src/main/kotlin/com/google/android/gms/common/GoogleCertificatesImpl.kt delete mode 100644 play-services-core/src/main/kotlin/com/google/android/gms/feedback/FeedbackActivity.kt delete mode 100644 play-services-core/src/main/kotlin/com/google/android/gms/fitness/service/history/FitHistoryBroker.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/accountsettings/ui/LoaderActivity.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/accountsettings/ui/WebViewHelper.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/audit/AuditService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/AuthPrefs.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/account/data/AccountDataService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/appcert/AppCertManager.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/appcert/AppCertService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/consent/ConsentSignInActivity.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/credentials/CredentialPickerActivity.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/credentials/CredentialsService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/credentials/identity/IdentitySignInService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/proxy/AuthProxyService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/signin/AuthSignInActivity.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/signin/AuthSignInService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/auth/signin/extensions.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/backup/BackupSettingsActivity.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/checkin/CheckinPrefs.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/checkin/LastCheckinInfo.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/checkin/ServiceInfo.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/chimera/ServiceProvider.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/clearcut/ClearcutLoggerService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/credential/CredentialManagerService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/feedback/FeedbackService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/games/FirstPartyGamesService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/games/GamesConnectService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/games/GamesService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/games/extensions.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/gass/GassService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/gcm/GcmPrefs.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/gcm/PushRegisterService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/gcm/ServiceInfo.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/googlehelp/ui/GoogleHelpRedirectActivity.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/measurement/MeasurementService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/phenotype/PhenotypeService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/potokens/PoTokenConstants.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/potokens/PoTokenHelper.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/potokens/PoTokenPreferences.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/potokens/PoTokensService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/pseudonymous/PseudonymousIdService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/signin/SignInService.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/ui/AccountsFragment.kt delete mode 100755 play-services-core/src/main/kotlin/org/microg/gms/ui/AppIconPreference.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/ui/Constants.kt delete mode 100755 play-services-core/src/main/kotlin/org/microg/gms/ui/DeviceRegistrationFragment.kt delete mode 100755 play-services-core/src/main/kotlin/org/microg/gms/ui/DeviceRegistrationPreferencesFragment.kt delete mode 100755 play-services-core/src/main/kotlin/org/microg/gms/ui/PreferenceSwitchBarCallback.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAdvancedFragment.kt delete mode 100755 play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAllAppsFragment.kt delete mode 100755 play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAppFragment.kt delete mode 100755 play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationAppPreferencesFragment.kt delete mode 100755 play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationFragment.kt delete mode 100755 play-services-core/src/main/kotlin/org/microg/gms/ui/PushNotificationPreferencesFragment.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/ui/SafetyNetFragment.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/ui/SettingsFragment.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/ui/TextPreference.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/ui/Utils.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/ui/VendingFragment.kt delete mode 100644 play-services-core/src/main/kotlin/org/microg/gms/vending/VendingPreferences.kt delete mode 100644 play-services-core/src/main/res/color/material_switch_bar_text_color.xml delete mode 100644 play-services-core/src/main/res/drawable-v23/material_switch_bar_background.xml delete mode 100644 play-services-core/src/main/res/drawable-v23/material_switch_bar_background_disabled.xml delete mode 100755 play-services-core/src/main/res/drawable/dots_horizontal.xml delete mode 100644 play-services-core/src/main/res/drawable/ic_add.xml delete mode 100644 play-services-core/src/main/res/drawable/ic_add_account.xml delete mode 100644 play-services-core/src/main/res/drawable/ic_baseline_hide_source_24.xml delete mode 100644 play-services-core/src/main/res/drawable/ic_cloud_bell.xml delete mode 100644 play-services-core/src/main/res/drawable/ic_device_login.xml delete mode 100755 play-services-core/src/main/res/drawable/ic_expand_apps.xml delete mode 100755 play-services-core/src/main/res/drawable/ic_info_outline.xml delete mode 100644 play-services-core/src/main/res/drawable/ic_manage_account.xml delete mode 100644 play-services-core/src/main/res/drawable/ic_manage_accounts.xml delete mode 100644 play-services-core/src/main/res/layout/activity_consent_sign_in.xml delete mode 100755 play-services-core/src/main/res/layout/device_registration_fragment.xml delete mode 100755 play-services-core/src/main/res/layout/login_assistant.xml delete mode 100755 play-services-core/src/main/res/layout/login_assistant_loading.xml delete mode 100755 play-services-core/src/main/res/layout/preference_category_no_label.xml delete mode 100644 play-services-core/src/main/res/layout/preference_material_switch.xml delete mode 100644 play-services-core/src/main/res/layout/preference_material_switch_bar.xml delete mode 100755 play-services-core/src/main/res/layout/preference_progress_bar.xml delete mode 100755 play-services-core/src/main/res/layout/preference_switch_bar.xml delete mode 100755 play-services-core/src/main/res/layout/push_notification_app_fragment.xml delete mode 100755 play-services-core/src/main/res/layout/push_notification_fragment.xml delete mode 100755 play-services-core/src/main/res/layout/settings_root_activity.xml delete mode 100644 play-services-core/src/main/res/layout/signin_confirm.xml delete mode 100644 play-services-core/src/main/res/mipmap-anydpi-v26/ic_launcher.xml delete mode 100644 play-services-core/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml delete mode 100644 play-services-core/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 play-services-core/src/main/res/mipmap-hdpi/ic_launcher_foreground.png delete mode 100644 play-services-core/src/main/res/mipmap-hdpi/ic_launcher_round.png delete mode 100644 play-services-core/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 play-services-core/src/main/res/mipmap-mdpi/ic_launcher_foreground.png delete mode 100644 play-services-core/src/main/res/mipmap-mdpi/ic_launcher_round.png delete mode 100644 play-services-core/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 play-services-core/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png delete mode 100644 play-services-core/src/main/res/mipmap-xhdpi/ic_launcher_round.png delete mode 100644 play-services-core/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 play-services-core/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png delete mode 100644 play-services-core/src/main/res/mipmap-xxhdpi/ic_launcher_round.png delete mode 100644 play-services-core/src/main/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 play-services-core/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png delete mode 100644 play-services-core/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png delete mode 100755 play-services-core/src/main/res/navigation/nav_settings.xml delete mode 100644 play-services-core/src/main/res/values-ar/arrays.xml delete mode 100644 play-services-core/src/main/res/values-ar/plurals.xml delete mode 100644 play-services-core/src/main/res/values-ar/strings.xml delete mode 100644 play-services-core/src/main/res/values-az/arrays.xml delete mode 100644 play-services-core/src/main/res/values-az/plurals.xml delete mode 100644 play-services-core/src/main/res/values-az/strings.xml delete mode 100644 play-services-core/src/main/res/values-be/arrays.xml delete mode 100644 play-services-core/src/main/res/values-be/permissions.xml delete mode 100644 play-services-core/src/main/res/values-be/plurals.xml delete mode 100644 play-services-core/src/main/res/values-be/strings.xml delete mode 100644 play-services-core/src/main/res/values-bn/arrays.xml delete mode 100644 play-services-core/src/main/res/values-bn/plurals.xml delete mode 100644 play-services-core/src/main/res/values-bn/strings.xml delete mode 100644 play-services-core/src/main/res/values-cs/strings.xml delete mode 100644 play-services-core/src/main/res/values-de/permissions.xml delete mode 100644 play-services-core/src/main/res/values-de/strings.xml delete mode 100644 play-services-core/src/main/res/values-es-rES/arrays.xml delete mode 100644 play-services-core/src/main/res/values-es-rES/plurals.xml delete mode 100644 play-services-core/src/main/res/values-es-rES/strings.xml delete mode 100644 play-services-core/src/main/res/values-es/permissions.xml delete mode 100644 play-services-core/src/main/res/values-es/strings.xml delete mode 100644 play-services-core/src/main/res/values-fr/arrays.xml delete mode 100644 play-services-core/src/main/res/values-fr/plurals.xml delete mode 100644 play-services-core/src/main/res/values-fr/strings.xml delete mode 100644 play-services-core/src/main/res/values-he/strings.xml delete mode 100644 play-services-core/src/main/res/values-hi/arrays.xml delete mode 100644 play-services-core/src/main/res/values-hi/plurals.xml delete mode 100644 play-services-core/src/main/res/values-hi/strings.xml delete mode 100644 play-services-core/src/main/res/values-id/arrays.xml delete mode 100644 play-services-core/src/main/res/values-id/plurals.xml delete mode 100644 play-services-core/src/main/res/values-id/strings.xml delete mode 100644 play-services-core/src/main/res/values-it/arrays.xml delete mode 100644 play-services-core/src/main/res/values-it/permissions.xml delete mode 100755 play-services-core/src/main/res/values-it/plurals.xml delete mode 100755 play-services-core/src/main/res/values-it/strings.xml delete mode 100644 play-services-core/src/main/res/values-ja/arrays.xml delete mode 100644 play-services-core/src/main/res/values-ja/plurals.xml delete mode 100644 play-services-core/src/main/res/values-ja/strings.xml delete mode 100644 play-services-core/src/main/res/values-ko/arrays.xml delete mode 100644 play-services-core/src/main/res/values-ko/plurals.xml delete mode 100644 play-services-core/src/main/res/values-ko/strings.xml delete mode 100644 play-services-core/src/main/res/values-lt/arrays.xml delete mode 100644 play-services-core/src/main/res/values-lt/plurals.xml delete mode 100644 play-services-core/src/main/res/values-lt/strings.xml delete mode 100644 play-services-core/src/main/res/values-night-v31/themes.xml delete mode 100644 play-services-core/src/main/res/values-night-v8/themes.xml delete mode 100644 play-services-core/src/main/res/values-night/themes.xml delete mode 100644 play-services-core/src/main/res/values-pt-rBR/arrays.xml delete mode 100644 play-services-core/src/main/res/values-pt-rBR/permissions.xml delete mode 100644 play-services-core/src/main/res/values-pt-rBR/plurals.xml delete mode 100644 play-services-core/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-core/src/main/res/values-ro/strings.xml delete mode 100644 play-services-core/src/main/res/values-ru/arrays.xml delete mode 100644 play-services-core/src/main/res/values-ru/permissions.xml delete mode 100644 play-services-core/src/main/res/values-ru/plurals.xml delete mode 100644 play-services-core/src/main/res/values-ru/strings.xml delete mode 100644 play-services-core/src/main/res/values-sr/strings.xml delete mode 100644 play-services-core/src/main/res/values-sv/strings.xml delete mode 100644 play-services-core/src/main/res/values-th/strings.xml delete mode 100644 play-services-core/src/main/res/values-tr/arrays.xml delete mode 100644 play-services-core/src/main/res/values-tr/plurals.xml delete mode 100644 play-services-core/src/main/res/values-tr/strings.xml delete mode 100644 play-services-core/src/main/res/values-uk/arrays.xml delete mode 100644 play-services-core/src/main/res/values-uk/plurals.xml delete mode 100644 play-services-core/src/main/res/values-uk/strings.xml delete mode 100644 play-services-core/src/main/res/values-v23/themes.xml delete mode 100644 play-services-core/src/main/res/values-v27/themes.xml delete mode 100644 play-services-core/src/main/res/values-v31/themes.xml delete mode 100644 play-services-core/src/main/res/values-vi/arrays.xml delete mode 100644 play-services-core/src/main/res/values-vi/plurals.xml delete mode 100644 play-services-core/src/main/res/values-vi/strings.xml delete mode 100644 play-services-core/src/main/res/values-zh-rCN/arrays.xml delete mode 100644 play-services-core/src/main/res/values-zh-rCN/plurals.xml delete mode 100644 play-services-core/src/main/res/values-zh-rCN/strings.xml delete mode 100644 play-services-core/src/main/res/values-zh-rTW/arrays.xml delete mode 100644 play-services-core/src/main/res/values-zh-rTW/plurals.xml delete mode 100644 play-services-core/src/main/res/values-zh-rTW/strings.xml delete mode 100755 play-services-core/src/main/res/values/arrays.xml delete mode 100755 play-services-core/src/main/res/values/bools.xml delete mode 100755 play-services-core/src/main/res/values/colors.xml delete mode 100755 play-services-core/src/main/res/values/dimens.xml delete mode 100644 play-services-core/src/main/res/values/ic_launcher_background.xml delete mode 100755 play-services-core/src/main/res/values/permissions.xml delete mode 100755 play-services-core/src/main/res/values/plurals.xml delete mode 100644 play-services-core/src/main/res/values/resources.xml delete mode 100755 play-services-core/src/main/res/values/signature.xml delete mode 100755 play-services-core/src/main/res/values/strings.xml delete mode 100755 play-services-core/src/main/res/values/themes.xml delete mode 100644 play-services-core/src/main/res/xml/authenticator.xml delete mode 100644 play-services-core/src/main/res/xml/network_security_config.xml delete mode 100755 play-services-core/src/main/res/xml/preferences_account.xml delete mode 100644 play-services-core/src/main/res/xml/preferences_accounts.xml delete mode 100755 play-services-core/src/main/res/xml/preferences_auth.xml delete mode 100755 play-services-core/src/main/res/xml/preferences_device_registration.xml delete mode 100755 play-services-core/src/main/res/xml/preferences_gcm_advanced.xml delete mode 100755 play-services-core/src/main/res/xml/preferences_google_more.xml delete mode 100755 play-services-core/src/main/res/xml/preferences_push_notifications.xml delete mode 100755 play-services-core/src/main/res/xml/preferences_push_notifications_all_apps.xml delete mode 100755 play-services-core/src/main/res/xml/preferences_push_notifications_app.xml delete mode 100644 play-services-core/src/main/res/xml/preferences_safetynet_app.xml delete mode 100755 play-services-core/src/main/res/xml/preferences_start.xml delete mode 100644 play-services-core/src/main/res/xml/preferences_vending.xml delete mode 100644 play-services-droidguard/core/src/main/kotlin/org/microg/gms/droidguard/core/DroidGuardResultCreator.kt delete mode 100644 play-services-droidguard/core/src/main/kotlin/org/microg/gms/droidguard/core/DroidGuardServiceBroker.kt delete mode 100644 play-services-droidguard/core/src/main/kotlin/org/microg/gms/droidguard/core/HandleProxyFactory.kt delete mode 100644 play-services-droidguard/core/src/main/res/values-de/strings.xml delete mode 100644 play-services-droidguard/core/src/main/res/values-es/strings.xml delete mode 100644 play-services-droidguard/core/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-fido/core/src/main/kotlin/org/microg/gms/fido/core/RequestHandling.kt delete mode 100644 play-services-fido/core/src/main/kotlin/org/microg/gms/fido/core/privileged/Fido2PrivilegedService.kt delete mode 100644 play-services-fido/core/src/main/kotlin/org/microg/gms/fido/core/transport/nfc/NfcTransportHandler.kt delete mode 100644 play-services-fido/core/src/main/kotlin/org/microg/gms/fido/core/transport/usb/UsbDevicePermissionManager.kt delete mode 100644 play-services-fido/core/src/main/res/values-be/strings.xml delete mode 100644 play-services-fido/core/src/main/res/values-de/strings.xml delete mode 100644 play-services-fido/core/src/main/res/values-es/strings.xml delete mode 100644 play-services-fido/core/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-fido/core/src/main/res/values-uk/strings.xml delete mode 100644 play-services-fitness/.gitignore delete mode 100644 play-services-fitness/build.gradle delete mode 100644 play-services-fitness/src/main/AndroidManifest.xml delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/IDailyTotalCallback.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/IDataPointChangesCallback.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/IDataReadCallback.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/IDebugInfoCallback.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/IFileUriCallback.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/IGoogleFitHistoryApi.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/IReadRawCallback.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/IReadStatsCallback.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/ISessionChangesCallback.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/IStatusCallback.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/internal/ISyncInfoCallback.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DailyTotalRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DataDeleteRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DataInsertRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DataPointChangesRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DataReadRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DataReadResult.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DataSourceQueryParams.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DataUpdateListenerRegistrationRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DataUpdateListenerUnregistrationRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DataUpdateRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/DebugInfoRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/GetFileUriRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/GetSyncInfoRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/ReadRawRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/ReadStatsRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/request/SessionChangesRequest.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/result/DataSourceStatsResult.aidl delete mode 100644 play-services-fitness/src/main/aidl/com/google/android/gms/fitness/result/DataStatsResult.aidl delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/data/AppInfo.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/data/Bucket.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/data/DataSet.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/data/DataSource.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/data/DataType.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/data/Device.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/data/Field.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/data/Session.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DailyTotalRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DataDeleteRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DataInsertRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DataPointChangesRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DataReadRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DataReadResult.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DataSourceQueryParams.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DataUpdateListenerRegistrationRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DataUpdateListenerUnregistrationRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DataUpdateRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/DebugInfoRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/GetFileUriRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/GetSyncInfoRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/ReadRawRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/ReadStatsRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/request/SessionChangesRequest.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/result/DataSourceStatsResult.java delete mode 100644 play-services-fitness/src/main/java/com/google/android/gms/fitness/result/DataStatsResult.java delete mode 100644 play-services-gmscompliance/core/src/main/kotlin/org/microg/gms/gmscompliance/GmsDeviceComplianceService.kt delete mode 100644 play-services-iid-api/build.gradle delete mode 100644 play-services-iid-api/gradle.properties delete mode 100644 play-services-iid-api/src/main/aidl/com/google/android/gms/iid/IMessengerCompat.aidl delete mode 100644 play-services-iid-api/src/main/java/com/google/android/gms/iid/MessengerCompat.java delete mode 100644 play-services-location/build.gradle delete mode 100644 play-services-location/core/build.gradle delete mode 100644 play-services-location/core/provider/build.gradle delete mode 100644 play-services-location/core/provider/src/main/kotlin/org/microg/gms/location/network/cell/CellDetailsSource.kt delete mode 100644 play-services-location/core/provider/src/main/kotlin/org/microg/gms/location/network/mozilla/MozillaLocationServiceClient.kt delete mode 100644 play-services-location/core/provider/src/main/kotlin/org/microg/gms/location/network/wifi/MovingWifiHelper.kt delete mode 100644 play-services-location/core/provider/src/main/kotlin/org/microg/gms/location/provider/NetworkLocationProviderPreTiramisu.kt delete mode 100644 play-services-location/core/provider/src/main/kotlin/org/microg/gms/location/provider/OpenStreetMapNominatimGeocodeProvider.kt delete mode 100644 play-services-location/core/src/huawei/AndroidManifest.xml delete mode 100644 play-services-location/core/src/huawei/res/values-zh-rCN/strings.xml delete mode 100644 play-services-location/core/src/main/AndroidManifest.xml delete mode 100644 play-services-location/core/src/main/kotlin/org/microg/gms/location/manager/DeviceOrientationManager.kt delete mode 100644 play-services-location/core/src/main/kotlin/org/microg/gms/location/manager/LocationManager.kt delete mode 100644 play-services-location/core/src/main/kotlin/org/microg/gms/location/manager/LocationManagerInstance.kt delete mode 100644 play-services-location/core/src/main/kotlin/org/microg/gms/location/manager/LocationRequestManager.kt delete mode 100644 play-services-location/core/src/main/kotlin/org/microg/gms/location/reporting/ReportingServiceInstance.kt delete mode 100644 play-services-location/core/src/main/kotlin/org/microg/gms/location/settings/DetailedLocationSettingsStates.kt delete mode 100644 play-services-location/core/src/main/kotlin/org/microg/gms/location/settings/LocationSettingsCheckerActivity.kt delete mode 100644 play-services-location/core/src/main/kotlin/org/microg/gms/location/ui/LocationPreferencesFragment.kt delete mode 100644 play-services-location/core/src/main/res/drawable/ic_gps.xml delete mode 100644 play-services-location/core/src/main/res/layout/location_settings_dialog.xml delete mode 100644 play-services-location/core/src/main/res/layout/location_settings_dialog_item.xml delete mode 100644 play-services-location/core/src/main/res/values-be/strings.xml delete mode 100644 play-services-location/core/src/main/res/values-de/strings.xml delete mode 100644 play-services-location/core/src/main/res/values-es/strings.xml delete mode 100644 play-services-location/core/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-location/core/src/main/res/values-ru/strings.xml delete mode 100644 play-services-location/core/src/main/res/values-zh-rCN/strings.xml delete mode 100644 play-services-location/core/src/main/res/values/strings.xml delete mode 100644 play-services-location/core/src/main/res/xml/preferences_location_app_details.xml delete mode 100644 play-services-location/src/main/aidl/com/google/android/gms/location/internal/IGoogleLocationManagerService.aidl delete mode 100644 play-services-location/src/main/java/com/google/android/gms/location/DeviceOrientation.java delete mode 100644 play-services-location/src/main/java/com/google/android/gms/location/LocationSettingsRequest.java delete mode 100644 play-services-location/src/main/java/com/google/android/gms/location/LocationSettingsResponse.java delete mode 100644 play-services-location/src/main/java/com/google/android/gms/location/LocationSettingsResult.java delete mode 100644 play-services-location/src/main/java/com/google/android/gms/location/LocationSettingsStates.java delete mode 100644 play-services-location/src/main/java/com/google/android/gms/location/SettingsClient.java delete mode 100644 play-services-location/src/main/java/org/microg/gms/location/SettingsClientImpl.java delete mode 100644 play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/GoogleMap.kt delete mode 100644 play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/Projection.kt delete mode 100644 play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/model/Marker.kt delete mode 100644 play-services-maps/core/hms/src/main/kotlin/org/microg/gms/maps/hms/utils/typeConverter.kt delete mode 100644 play-services-maps/core/mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/AbstractGoogleMap.kt delete mode 100644 play-services-maps/core/mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/GoogleMap.kt delete mode 100644 play-services-maps/core/mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/utils/MapContext.kt delete mode 100644 play-services-maps/core/mapbox/src/main/kotlin/org/microg/gms/maps/mapbox/utils/MultiArchLoader.kt delete mode 100644 play-services-nearby/core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/AdvertiserService.kt delete mode 100644 play-services-nearby/core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/CleanupService.kt delete mode 100644 play-services-nearby/core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationServiceImpl.kt delete mode 100644 play-services-nearby/core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/NotifyService.kt delete mode 100644 play-services-nearby/core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ScannerService.kt delete mode 100644 play-services-nearby/core/src/main/res/values-be/strings.xml delete mode 100644 play-services-nearby/core/src/main/res/values-de/strings.xml delete mode 100644 play-services-nearby/core/src/main/res/values-es/strings.xml delete mode 100644 play-services-nearby/core/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-nearby/core/src/main/res/values-ro/strings.xml delete mode 100644 play-services-nearby/core/src/main/res/values-ru/strings.xml delete mode 100644 play-services-oss-licenses/src/main/res/values-be/strings.xml delete mode 100644 play-services-oss-licenses/src/main/res/values-de/strings.xml delete mode 100644 play-services-oss-licenses/src/main/res/values-es/strings.xml delete mode 100644 play-services-oss-licenses/src/main/res/values-pt-rBR/strings.xml delete mode 100644 play-services-oss-licenses/src/main/res/values-ru/strings.xml delete mode 100644 play-services-panorama/build.gradle delete mode 100644 play-services-panorama/core/build.gradle delete mode 100644 play-services-panorama/core/src/main/AndroidManifest.xml delete mode 100644 play-services-panorama/core/src/main/kotlin/org/microg/gms/panorama/PanoramaService.kt delete mode 100644 play-services-panorama/src/AndroidManifest.xml delete mode 100644 play-services-panorama/src/main/aidl/com/google/android/gms/panorama/Panorama.java delete mode 100644 play-services-panorama/src/main/aidl/com/google/android/gms/panorama/PanoramaApi.java delete mode 100644 play-services-panorama/src/main/aidl/com/google/android/gms/panorama/internal/IPanoramaCallbacks.aidl delete mode 100644 play-services-panorama/src/main/aidl/com/google/android/gms/panorama/internal/IPanoramaService.aidl delete mode 100644 play-services-phenotype/src/main/java/com/google/android/gms/phenotype/ExperimentTokens.java delete mode 100644 play-services-recaptcha/core/src/main/kotlin/org/microg/gms/recaptcha/RecaptchaGuardImpl.kt delete mode 100644 play-services-recaptcha/core/src/main/kotlin/org/microg/gms/recaptcha/RecaptchaService.kt delete mode 100644 play-services-recaptcha/core/src/main/kotlin/org/microg/gms/recaptcha/RecaptchaWebImpl.kt delete mode 100644 play-services-safetynet/core/src/main/kotlin/org/microg/gms/safetynet/SafetyNetClientService.kt delete mode 100644 play-services-tasks/build.gradle delete mode 100644 play-services-tasks/gradle.properties delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/CancellationToken.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/CancellationTokenSource.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/Continuation.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/DuplicateTaskCompletionException.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/OnCanceledListener.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/OnCompleteListener.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/OnFailureListener.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/OnSuccessListener.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/OnTokenCanceledListener.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/RuntimeExecutionException.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/SuccessContinuation.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/Task.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/TaskCompletionSource.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/TaskExecutors.java delete mode 100644 play-services-tasks/src/main/java/com/google/android/gms/tasks/Tasks.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/CancellationTokenImpl.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/CancelledExecutor.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/CompletedExecutor.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/ContinuationExecutor.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/ContinuationWithExecutor.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/FailureExecutor.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/SuccessContinuationExecutor.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/SuccessExecutor.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/TaskImpl.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/UpdateExecutor.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/UpdateListener.java delete mode 100644 play-services-tasks/src/main/java/org/microg/gms/tasks/UpdateListenerLifecycleObserver.java delete mode 100644 play-services-wearable/core/src/main/java/org/microg/gms/wearable/WearableServiceImpl.java delete mode 100644 play-services-wearable/src/main/aidl/com/google/android/gms/wearable/internal/IWearableService.aidl delete mode 100644 proguard.flags delete mode 100644 safe-parcel-processor/src/main/kotlin/org/microg/safeparcel/SafeParcelProcessor.kt delete mode 100644 settings.gradle delete mode 100644 vending-app/build.gradle delete mode 100644 vending-app/src/huaweilh/AndroidManifest.xml delete mode 100644 vending-app/src/main/AndroidManifest.xml delete mode 100644 vending-app/src/main/aidl/com/android/vending/billing/IInAppBillingService.aidl delete mode 100644 vending-app/src/main/aidl/com/google/android/gms/checkin/internal/ICheckinService.aidl delete mode 100644 vending-app/src/main/java/com/android/billingclient/api/BillingClient.java delete mode 100644 vending-app/src/main/java/com/android/billingclient/package-info.java delete mode 100644 vending-app/src/main/java/com/android/vending/VendingPreferences.kt delete mode 100644 vending-app/src/main/java/com/android/vending/billing/InAppBillingService.kt delete mode 100644 vending-app/src/main/java/com/android/vending/licensing/LicenseChecker.java delete mode 100644 vending-app/src/main/java/com/android/vending/licensing/LicenseRequest.java delete mode 100644 vending-app/src/main/java/com/android/vending/licensing/LicenseServiceNotificationRunnable.java delete mode 100644 vending-app/src/main/java/com/android/vending/licensing/LicensingService.java delete mode 100644 vending-app/src/main/java/org/microg/vending/MarketIntentRedirect.java delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/AuthManager.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/CheckinServiceClient.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/Constants.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ContextProvider.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/DeviceIdentifier.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/GServices.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/InAppBillingServiceImpl.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/PurchaseActivity.java delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/PurchaseManager.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/SettingsManager.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/Utils.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/AcknowledgePurchaseParams.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/AcknowledgePurchaseResult.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/AcquireParams.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/AcquireResult.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/AuthData.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/BuyFlowParams.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/ClientInfo.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/ConsumePurchaseParams.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/ConsumePurchaseResult.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/DeviceEnvInfo.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/GetPurchaseHistoryParams.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/GetPurchaseHistoryResult.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/GetSkuDetailsParams.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/GetSkuDetailsResult.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/GooglePlayApi.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/HeaderProvider.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/HttpClient.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/IAPCacheManager.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/IAPCore.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/IAPResult.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/PurchaseItem.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/Utils.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/ui/UIComponents.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/ui/UIParser.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/core/ui/UIType.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/Extends.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/HtmlText.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/InAppBillingHostActivity.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/PlayWebViewActivity.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/SheetUIPage.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/Utils.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/WebViewHelper.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/logic/InAppBillingViewModel.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/logic/Models.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/theme/Color.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/theme/Theme.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/theme/Type.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/widgets/LoadingDialog.kt delete mode 100644 vending-app/src/main/java/org/microg/vending/billing/ui/widgets/PasswdInputDialog.kt delete mode 100644 vending-app/src/main/proto/GooglePlay.proto delete mode 100644 vending-app/src/main/proto/LicenseRequest.proto delete mode 100644 vending-app/src/main/proto/Timestamp.proto delete mode 100644 vending-app/src/main/res/drawable-v21/anim_check_mark.xml delete mode 100644 vending-app/src/main/res/drawable-v21/google_play.xml delete mode 100644 vending-app/src/main/res/drawable/ic_notification.xml delete mode 100644 vending-app/src/main/res/layout/activiy_confirm_purchase.xml delete mode 100644 vending-app/src/main/res/values-be/strings.xml delete mode 100644 vending-app/src/main/res/values-de/strings.xml delete mode 100644 vending-app/src/main/res/values-es/strings.xml delete mode 100644 vending-app/src/main/res/values-it/strings.xml delete mode 100644 vending-app/src/main/res/values-pt-rBR/strings.xml delete mode 100644 vending-app/src/main/res/values-ro/strings.xml delete mode 100644 vending-app/src/main/res/values-ru/strings.xml delete mode 100644 vending-app/src/main/res/values-sv/strings.xml delete mode 100644 vending-app/src/main/res/values-uk/strings.xml delete mode 100644 vending-app/src/main/res/values-zh-rCN/strings.xml delete mode 100644 vending-app/src/main/res/values/colors.xml delete mode 100644 vending-app/src/main/res/values/strings.xml delete mode 100644 vending-app/src/main/res/values/styles.xml diff --git a/.github/matchers/gradle-build-kotlin-error-matcher.json b/.github/matchers/gradle-build-kotlin-error-matcher.json deleted file mode 100644 index bd9e8762..00000000 --- a/.github/matchers/gradle-build-kotlin-error-matcher.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "gradle-build-kotlin-error-matcher", - "severity": "error", - "pattern": [ - { - "regexp": "^e:\\sfile:\/\/([^:]+):(\\d+):(\\d+)\\s(.+)$", - "file": 1, - "line": 2, - "column": 3, - "message": 4 - } - ] - } - ] -} diff --git a/.github/matchers/gradle-build-kotlin-error-matcher.json.license b/.github/matchers/gradle-build-kotlin-error-matcher.json.license deleted file mode 100644 index f24ebfe5..00000000 --- a/.github/matchers/gradle-build-kotlin-error-matcher.json.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: none -SPDX-License-Identifier: CC0-1.0 diff --git a/.github/matchers/gradle-build-matcher.json b/.github/matchers/gradle-build-matcher.json deleted file mode 100644 index df09e4f4..00000000 --- a/.github/matchers/gradle-build-matcher.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "gradle-build-matcher", - "pattern": [ - { - "regexp": "^\\s*([^:]+):(\\d+):\\s(error|Error):\\s(.+)$", - "file": 1, - "line": 2, - "severity": 3, - "message": 4 - } - ] - } - ] -} diff --git a/.github/matchers/gradle-build-matcher.json.license b/.github/matchers/gradle-build-matcher.json.license deleted file mode 100644 index f24ebfe5..00000000 --- a/.github/matchers/gradle-build-matcher.json.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: none -SPDX-License-Identifier: CC0-1.0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 0bd69ddc..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: "Gradle build" -permissions: {} -on: - - push - - pull_request - - workflow_dispatch - -jobs: - build: - name: "Gradle build" - runs-on: ubuntu-latest - - steps: - - name: "Checkout sources" - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: "Setup Java" - uses: actions/setup-java@v4 - with: - distribution: "temurin" - java-version: "17" - - name: "Gradle Wrapper validation" - uses: gradle/wrapper-validation-action@v2 - - name: "Setup Gradle" - uses: gradle/actions/setup-gradle@v3 - - name: "Setup matchers" - run: | - # Setting up matchers... - - matchers_dir='${{ github.workspace }}/.github/matchers' - matcher_list() - { - echo 'gradle-build-matcher.json' - echo 'gradle-build-kotlin-error-matcher.json' - } - - matcher_list | while IFS='' read -r NAME; do - if test -f "${matchers_dir:?}/${NAME:?}"; then - echo "::add-matcher::${matchers_dir:?}/${NAME:?}" - echo "Matcher configured: ${NAME:?}" - fi - done - - name: "Execute Gradle assemble" - run: "./gradlew --no-daemon assemble" - - name: "Execute Gradle check" - run: "./gradlew --no-daemon check" diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml deleted file mode 100644 index 1913b6f2..00000000 --- a/.github/workflows/debug.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Debug APK Builder - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: JDK 8 Setup - uses: actions/setup-java@v1 - with: - java-version: 11.0.8 - - - name: Install NDK - run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.0.6113669" - - - name: Grant rights - run: chmod +x ./gradlew - - - name: Build project - run: ./gradlew build - - - name: Build APK - run: ./gradlew assembleDebug - - - name: Upload to Artifacts - uses: actions/upload-artifact@v2 - with: - name: 'MicroG' - path: play-services-core/build/outputs/apk/debug/play-services-core-debug.apk \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ec5fff5e..00000000 --- a/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -*.iml -gen/ -bin/ -build/ -.gradle/ -.idea/ -user.gradle -local.properties -.directory -play-services-core/release - -.settings -.classpath -.project \ No newline at end of file diff --git a/Android.mk b/Android.mk deleted file mode 100644 index 2f7c68b6..00000000 --- a/Android.mk +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (c) 2015 μg Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_MODULE := GmsCore -LOCAL_MODULE_TAGS := optional -LOCAL_PACKAGE_NAME := GmsCore - -gmscore_root := $(LOCAL_PATH) -gmscore_dir := play-services-core -gmscore_out := $(TARGET_COMMON_OUT_ROOT)/obj/APPS/$(LOCAL_MODULE)_intermediates -gmscore_build := $(gmscore_dir)/build -gmscore_apk := $(gmscore_build)/outputs/apk/release/play-services-core-release-unsigned.apk - -$(gmscore_root)/$(gmscore_apk): - rm -Rf $(gmscore_root)/$(gmscore_build) - mkdir -p $(ANDROID_BUILD_TOP)/$(gmscore_out) - ln -s $(ANDROID_BUILD_TOP)/$(gmscore_out) $(ANDROID_BUILD_TOP)/$(gmscore_root)/$(gmscore_build) - echo "sdk.dir=$(ANDROID_HOME)" > $(gmscore_root)/local.properties - cd $(gmscore_root) && git submodule update --recursive --init - cd $(gmscore_root)/$(gmscore_dir) && JAVA_TOOL_OPTIONS="$(JAVA_TOOL_OPTIONS) -Dfile.encoding=UTF8" ../gradlew assembleRelease - -LOCAL_CERTIFICATE := platform -LOCAL_SRC_FILES := $(gmscore_apk) -LOCAL_MODULE_CLASS := APPS -LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) - -include $(BUILD_PREBUILT) \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f433b1a5..00000000 --- a/LICENSE +++ /dev/null @@ -1,177 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt deleted file mode 100644 index 4ed90b95..00000000 --- a/LICENSES/Apache-2.0.txt +++ /dev/null @@ -1,208 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, -AND DISTRIBUTION - - 1. Definitions. - - - -"License" shall mean the terms and conditions for use, reproduction, and distribution -as defined by Sections 1 through 9 of this document. - - - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - - - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (ii) ownership of fifty percent (50%) or more -of the outstanding shares, or (iii) beneficial ownership of such entity. - - - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions -granted by this License. - - - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - - - -"Object" form shall mean any form resulting from mechanical transformation -or translation of a Source form, including but not limited to compiled object -code, generated documentation, and conversions to other media types. - - - -"Work" shall mean the work of authorship, whether in Source or Object form, -made available under the License, as indicated by a copyright notice that -is included in or attached to the work (an example is provided in the Appendix -below). - - - -"Derivative Works" shall mean any work, whether in Source or Object form, -that is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative -Works shall not include works that remain separable from, or merely link (or -bind by name) to the interfaces of, the Work and Derivative Works thereof. - - - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative -Works thereof, that is intentionally submitted to Licensor for inclusion in -the Work by the copyright owner or by an individual or Legal Entity authorized -to submit on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication -sent to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor -for the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - - - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently incorporated -within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this -License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable copyright license to reproduce, prepare -Derivative Works of, publicly display, publicly perform, sublicense, and distribute -the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, -each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) patent -license to make, have made, use, offer to sell, sell, import, and otherwise -transfer the Work, where such license applies only to those patent claims -licensable by such Contributor that are necessarily infringed by their Contribution(s) -alone or by combination of their Contribution(s) with the Work to which such -Contribution(s) was submitted. If You institute patent litigation against -any entity (including a cross-claim or counterclaim in a lawsuit) alleging -that the Work or a Contribution incorporated within the Work constitutes direct -or contributory patent infringement, then any patent licenses granted to You -under this License for that Work shall terminate as of the date such litigation -is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or -Derivative Works thereof in any medium, with or without modifications, and -in Source or Object form, provided that You meet the following conditions: - -(a) You must give any other recipients of the Work or Derivative Works a copy -of this License; and - -(b) You must cause any modified files to carry prominent notices stating that -You changed the files; and - -(c) You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source -form of the Work, excluding those notices that do not pertain to any part -of the Derivative Works; and - -(d) If the Work includes a "NOTICE" text file as part of its distribution, -then any Derivative Works that You distribute must include a readable copy -of the attribution notices contained within such NOTICE file, excluding those -notices that do not pertain to any part of the Derivative Works, in at least -one of the following places: within a NOTICE text file distributed as part -of the Derivative Works; within the Source form or documentation, if provided -along with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents -of the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works -that You distribute, alongside or as an addendum to the NOTICE text from the -Work, provided that such additional attribution notices cannot be construed -as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, -or distribution of Your modifications, or for any such Derivative Works as -a whole, provided Your use, reproduction, and distribution of the Work otherwise -complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any -Contribution intentionally submitted for inclusion in the Work by You to the -Licensor shall be under the terms and conditions of this License, without -any additional terms or conditions. Notwithstanding the above, nothing herein -shall supersede or modify the terms of any separate license agreement you -may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, -trademarks, service marks, or product names of the Licensor, except as required -for reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to -in writing, Licensor provides the Work (and each Contributor provides its -Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied, including, without limitation, any warranties -or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR -A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness -of using or redistributing the Work and assume any risks associated with Your -exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether -in tort (including negligence), contract, or otherwise, unless required by -applicable law (such as deliberate and grossly negligent acts) or agreed to -in writing, shall any Contributor be liable to You for damages, including -any direct, indirect, special, incidental, or consequential damages of any -character arising as a result of this License or out of the use or inability -to use the Work (including but not limited to damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses), even if such Contributor has been advised of the possibility -of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work -or Derivative Works thereof, You may choose to offer, and charge a fee for, -acceptance of support, warranty, indemnity, or other liability obligations -and/or rights consistent with this License. However, in accepting such obligations, -You may act only on Your own behalf and on Your sole responsibility, not on -behalf of any other Contributor, and only if You agree to indemnify, defend, -and hold each Contributor harmless for any liability incurred by, or claims -asserted against, such Contributor by reason of your accepting any such warranty -or additional liability. END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own identifying -information. (Don't include the brackets!) The text should be enclosed in -the appropriate comment syntax for the file format. We also recommend that -a file or class name and description of purpose be included on the same "printed -page" as the copyright notice for easier identification within third-party -archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); - -you may not use this file except in compliance with the License. - -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software - -distributed under the License is distributed on an "AS IS" BASIS, - -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and - -limitations under the License. diff --git a/LICENSES/CC-BY-4.0.txt b/LICENSES/CC-BY-4.0.txt deleted file mode 100644 index 3f92dfc5..00000000 --- a/LICENSES/CC-BY-4.0.txt +++ /dev/null @@ -1,324 +0,0 @@ -Creative Commons Attribution 4.0 International Creative Commons Corporation -("Creative Commons") is not a law firm and does not provide legal services -or legal advice. Distribution of Creative Commons public licenses does not -create a lawyer-client or other relationship. Creative Commons makes its licenses -and related information available on an "as-is" basis. Creative Commons gives -no warranties regarding its licenses, any material licensed under their terms -and conditions, or any related information. Creative Commons disclaims all -liability for damages resulting from their use to the fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and conditions -that creators and other rights holders may use to share original works of -authorship and other material subject to copyright and certain other rights -specified in the public license below. The following considerations are for -informational purposes only, are not exhaustive, and do not form part of our -licenses. - -Considerations for licensors: Our public licenses are intended for use by -those authorized to give the public permission to use material in ways otherwise -restricted by copyright and certain other rights. Our licenses are irrevocable. -Licensors should read and understand the terms and conditions of the license -they choose before applying it. Licensors should also secure all rights necessary -before applying our licenses so that the public can reuse the material as -expected. Licensors should clearly mark any material not subject to the license. -This includes other CC-licensed material, or material used under an exception -or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors - -Considerations for the public: By using one of our public licenses, a licensor -grants the public permission to use the licensed material under specified -terms and conditions. If the licensor's permission is not necessary for any -reason–for example, because of any applicable exception or limitation to copyright–then -that use is not regulated by the license. Our licenses grant only permissions -under copyright and certain other rights that a licensor has authority to -grant. Use of the licensed material may still be restricted for other reasons, -including because others have copyright or other rights in the material. A -licensor may make special requests, such as asking that all changes be marked -or described. Although not required by our licenses, you are encouraged to -respect those requests where reasonable. More considerations for the public -: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution -4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution -4.0 International Public License ("Public License"). To the extent this Public -License may be interpreted as a contract, You are granted the Licensed Rights -in consideration of Your acceptance of these terms and conditions, and the -Licensor grants You such rights in consideration of benefits the Licensor -receives from making the Licensed Material available under these terms and -conditions. - -Section 1 – Definitions. - -a. Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which the -Licensed Material is translated, altered, arranged, transformed, or otherwise -modified in a manner requiring permission under the Copyright and Similar -Rights held by the Licensor. For purposes of this Public License, where the -Licensed Material is a musical work, performance, or sound recording, Adapted -Material is always produced where the Licensed Material is synched in timed -relation with a moving image. - -b. Adapter's License means the license You apply to Your Copyright and Similar -Rights in Your contributions to Adapted Material in accordance with the terms -and conditions of this Public License. - -c. Copyright and Similar Rights means copyright and/or similar rights closely -related to copyright including, without limitation, performance, broadcast, -sound recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, the -rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. - -d. Effective Technological Measures means those measures that, in the absence -of proper authority, may not be circumvented under laws fulfilling obligations -under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, -and/or similar international agreements. - -e. Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to Your -use of the Licensed Material. - -f. Licensed Material means the artistic or literary work, database, or other -material to which the Licensor applied this Public License. - -g. Licensed Rights means the rights granted to You subject to the terms and -conditions of this Public License, which are limited to all Copyright and -Similar Rights that apply to Your use of the Licensed Material and that the -Licensor has authority to license. - -h. Licensor means the individual(s) or entity(ies) granting rights under this -Public License. - -i. Share means to provide material to the public by any means or process that -requires permission under the Licensed Rights, such as reproduction, public -display, public performance, distribution, dissemination, communication, or -importation, and to make material available to the public including in ways -that members of the public may access the material from a place and at a time -individually chosen by them. - -j. Sui Generis Database Rights means rights other than copyright resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other essentially equivalent rights anywhere in the world. - -k. You means the individual or entity exercising the Licensed Rights under -this Public License. Your has a corresponding meaning. - -Section 2 – Scope. - - a. License grant. - -1. Subject to the terms and conditions of this Public License, the Licensor -hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, -irrevocable license to exercise the Licensed Rights in the Licensed Material -to: - - A. reproduce and Share the Licensed Material, in whole or in part; and - - B. produce, reproduce, and Share Adapted Material. - -2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions -and Limitations apply to Your use, this Public License does not apply, and -You do not need to comply with its terms and conditions. - - 3. Term. The term of this Public License is specified in Section 6(a). - -4. Media and formats; technical modifications allowed. The Licensor authorizes -You to exercise the Licensed Rights in all media and formats whether now known -or hereafter created, and to make technical modifications necessary to do -so. The Licensor waives and/or agrees not to assert any right or authority -to forbid You from making technical modifications necessary to exercise the -Licensed Rights, including technical modifications necessary to circumvent -Effective Technological Measures. For purposes of this Public License, simply -making modifications authorized by this Section 2(a)(4) never produces Adapted -Material. - - 5. Downstream recipients. - -A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed -Material automatically receives an offer from the Licensor to exercise the -Licensed Rights under the terms and conditions of this Public License. - -B. No downstream restrictions. You may not offer or impose any additional -or different terms or conditions on, or apply any Effective Technological -Measures to, the Licensed Material if doing so restricts exercise of the Licensed -Rights by any recipient of the Licensed Material. - -6. No endorsement. Nothing in this Public License constitutes or may be construed -as permission to assert or imply that You are, or that Your use of the Licensed -Material is, connected with, or sponsored, endorsed, or granted official status -by, the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). - - b. Other rights. - -1. Moral rights, such as the right of integrity, are not licensed under this -Public License, nor are publicity, privacy, and/or other similar personality -rights; however, to the extent possible, the Licensor waives and/or agrees -not to assert any such rights held by the Licensor to the limited extent necessary -to allow You to exercise the Licensed Rights, but not otherwise. - -2. Patent and trademark rights are not licensed under this Public License. - -3. To the extent possible, the Licensor waives any right to collect royalties -from You for the exercise of the Licensed Rights, whether directly or through -a collecting society under any voluntary or waivable statutory or compulsory -licensing scheme. In all other cases the Licensor expressly reserves any right -to collect such royalties. - -Section 3 – License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the following -conditions. - - a. Attribution. - -1. If You Share the Licensed Material (including in modified form), You must: - -A. retain the following if it is supplied by the Licensor with the Licensed -Material: - -i. identification of the creator(s) of the Licensed Material and any others -designated to receive attribution, in any reasonable manner requested by the -Licensor (including by pseudonym if designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of warranties; - -v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; - -B. indicate if You modified the Licensed Material and retain an indication -of any previous modifications; and - -C. indicate the Licensed Material is licensed under this Public License, and -include the text of, or the URI or hyperlink to, this Public License. - -2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner -based on the medium, means, and context in which You Share the Licensed Material. -For example, it may be reasonable to satisfy the conditions by providing a -URI or hyperlink to a resource that includes the required information. - -3. If requested by the Licensor, You must remove any of the information required -by Section 3(a)(1)(A) to the extent reasonably practicable. - -4. If You Share Adapted Material You produce, the Adapter's License You apply -must not prevent recipients of the Adapted Material from complying with this -Public License. - -Section 4 – Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that apply to -Your use of the Licensed Material: - -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, -reuse, reproduce, and Share all or a substantial portion of the contents of -the database; - -b. if You include all or a substantial portion of the database contents in -a database in which You have Sui Generis Database Rights, then the database -in which You have Sui Generis Database Rights (but not its individual contents) -is Adapted Material; and - -c. You must comply with the conditions in Section 3(a) if You Share all or -a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not replace -Your obligations under this Public License where the Licensed Rights include -other Copyright and Similar Rights. - -Section 5 – Disclaimer of Warranties and Limitation of Liability. - -a. Unless otherwise separately undertaken by the Licensor, to the extent possible, -the Licensor offers the Licensed Material as-is and as-available, and makes -no representations or warranties of any kind concerning the Licensed Material, -whether express, implied, statutory, or other. This includes, without limitation, -warranties of title, merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence of -errors, whether or not known or discoverable. Where disclaimers of warranties -are not allowed in full or in part, this disclaimer may not apply to You. - -b. To the extent possible, in no event will the Licensor be liable to You -on any legal theory (including, without limitation, negligence) or otherwise -for any direct, special, indirect, incidental, consequential, punitive, exemplary, -or other losses, costs, expenses, or damages arising out of this Public License -or use of the Licensed Material, even if the Licensor has been advised of -the possibility of such losses, costs, expenses, or damages. Where a limitation -of liability is not allowed in full or in part, this limitation may not apply -to You. - -c. The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most closely -approximates an absolute disclaimer and waiver of all liability. - -Section 6 – Term and Termination. - -a. This Public License applies for the term of the Copyright and Similar Rights -licensed here. However, if You fail to comply with this Public License, then -Your rights under this Public License terminate automatically. - -b. Where Your right to use the Licensed Material has terminated under Section -6(a), it reinstates: - -1. automatically as of the date the violation is cured, provided it is cured -within 30 days of Your discovery of the violation; or - - 2. upon express reinstatement by the Licensor. - -c. For the avoidance of doubt, this Section 6(b) does not affect any right -the Licensor may have to seek remedies for Your violations of this Public -License. - -d. For the avoidance of doubt, the Licensor may also offer the Licensed Material -under separate terms or conditions or stop distributing the Licensed Material -at any time; however, doing so will not terminate this Public License. - - e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. - -Section 7 – Other Terms and Conditions. - -a. The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. - -b. Any arrangements, understandings, or agreements regarding the Licensed -Material not stated herein are separate from and independent of the terms -and conditions of this Public License. - -Section 8 – Interpretation. - -a. For the avoidance of doubt, this Public License does not, and shall not -be interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission under -this Public License. - -b. To the extent possible, if any provision of this Public License is deemed -unenforceable, it shall be automatically reformed to the minimum extent necessary -to make it enforceable. If the provision cannot be reformed, it shall be severed -from this Public License without affecting the enforceability of the remaining -terms and conditions. - -c. No term or condition of this Public License will be waived and no failure -to comply consented to unless expressly agreed to by the Licensor. - -d. Nothing in this Public License constitutes or may be interpreted as a limitation -upon, or waiver of, any privileges and immunities that apply to the Licensor -or You, including from the legal processes of any jurisdiction or authority. - -Creative Commons is not a party to its public licenses. Notwithstanding, Creative -Commons may elect to apply one of its public licenses to material it publishes -and in those instances will be considered the "Licensor." The text of the -Creative Commons public licenses is dedicated to the public domain under the -CC0 Public Domain Dedication. Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as otherwise -permitted by the Creative Commons policies published at creativecommons.org/policies, -Creative Commons does not authorize the use of the trademark "Creative Commons" -or any other trademark or logo of Creative Commons without its prior written -consent including, without limitation, in connection with any unauthorized -modifications to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of doubt, -this paragraph does not form part of the public licenses. - -Creative Commons may be contacted at creativecommons.org. diff --git a/LICENSES/CC0-1.0.txt b/LICENSES/CC0-1.0.txt deleted file mode 100644 index 0e259d42..00000000 --- a/LICENSES/CC0-1.0.txt +++ /dev/null @@ -1,121 +0,0 @@ -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 6c86c4ec..00000000 --- a/build.gradle +++ /dev/null @@ -1,136 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2013, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -buildscript { -<<<<<<< HEAD - ext.kotlinVersion = '1.8.20' - ext.coroutineVersion = '1.6.4' - - ext.annotationVersion = '1.6.0' - ext.appcompatVersion = '1.6.1' - ext.coreVersion = '1.9.0' - ext.collectionVersion = '1.3.0-dev01' - ext.fragmentVersion = '1.5.5' - ext.lifecycleVersion = '2.5.1' - ext.materialVersion = '1.8.0' - ext.navigationVersion = '2.5.3' - ext.preferenceVersion = '1.2.0' - ext.webkitVersion = '1.6.0' -======= - ext.cronetVersion = '102.5005.125' - ext.wearableVersion = '0.1.1' - - ext.kotlinVersion = '1.9.22' - ext.coroutineVersion = '1.7.3' - - ext.annotationVersion = '1.7.1' - ext.appcompatVersion = '1.6.1' - ext.biometricVersion = '1.1.0' - ext.coreVersion = '1.12.0' - ext.fragmentVersion = '1.6.2' - ext.lifecycleVersion = '2.7.0' - ext.loaderVersion = '1.1.0' - ext.materialVersion = '1.11.0' - ext.mediarouterVersion = '1.6.0' - ext.multidexVersion = '2.0.1' - ext.navigationVersion = '2.7.7' - ext.preferenceVersion = '1.2.0' - ext.recyclerviewVersion = '1.3.2' - ext.webkitVersion = '1.10.0' ->>>>>>> 48e0b00a (Update build tools and dependencies) - - ext.circleimageviewVersion = '3.1.0' - ext.volleyVersion = '1.2.1' - ext.wireVersion = '4.5.5' - -<<<<<<< HEAD - - ext.androidBuildGradleVersion = '8.0.0' - ext.androidBuildVersionTools = '33.0.2' - - ext.androidMinSdk = 23 - ext.androidTargetSdk = 30 - ext.androidCompileSdk = 33 -======= - ext.androidBuildGradleVersion = '8.2.2' - - ext.androidBuildVersionTools = '34.0.0' - - ext.androidMinSdk = 19 - ext.androidTargetSdk = 29 - ext.androidCompileSdk = 34 ->>>>>>> 48e0b00a (Update build tools and dependencies) - - repositories { - mavenCentral() - google() - } - - dependencies { - classpath 'com.android.tools.build:gradle:8.0.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" - classpath "com.squareup.wire:wire-gradle-plugin:$wireVersion" - } -} - - -<<<<<<< HEAD -def gmsVersion = "24.10.17" -======= -def gmsVersion = "24.09.13" ->>>>>>> ef113281 (Bump GMS version to 24.09.13 (#2191)) -def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', '')) -<<<<<<< HEAD - -def ourVersionBase = "0.3.0" - -def ourVersionCode = gmsVersionCode * 1000 -def ourVersionName = "$ourVersionBase.$gmsVersionCode" -======= -def vendingVersion = "40.2.26" -def vendingVersionCode = Integer.parseInt(vendingVersion.replaceAll('\\.', '')) -def gitVersionBase = execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').trim().substring(1) -def gitCommitCount = Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD").trim()) -def gitCommitId = execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').trim().split(' ')[0] -def gitDirty = false -execResult('git', 'status', '--porcelain').lines().each { stat -> - def status = stat.substring(0,2) - def file = stat.substring(3) - if (status == '??') { - if (subprojects.any { p -> file.startsWith(p.name + '/') }) { - logger.lifecycle('Dirty file: {} (untracked)', file) - gitDirty = true - } else { - logger.info('New file outside module: {} (ignored for dirty check)', file) - } - } else { - logger.lifecycle('Dirty file: {} (changed)', file) - gitDirty = true - } -} -def ourVersionBase = gitVersionBase.substring(0, gitVersionBase.lastIndexOf('.')) -def ourVersionMinor = Integer.parseInt(ourVersionBase.substring(ourVersionBase.lastIndexOf('.') + 1)) -def ourGmsVersionCode = gmsVersionCode * 1000 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0) -def ourGmsVersionName = "$ourVersionBase.$gmsVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "") -def ourVendingVersionCode = 80000000 + vendingVersionCode * 100 + ourVersionMinor * 2 + (gitCommitCount > 0 || gitDirty ? 1 : 0) -def ourVendingVersionName = "$ourVersionBase.$vendingVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "") -logger.lifecycle('Starting build for GMS version {} ({})...', ourGmsVersionName, ourGmsVersionCode) ->>>>>>> 33109df6 (Bump Companion version) - -allprojects { - apply plugin: 'idea' - - group = 'org.microg.gms' - version = ourVersionName - ext.appVersionCode = ourVersionCode - ext.isReleaseVersion = false -} - -subprojects { - repositories { - mavenCentral() - google() - } -} diff --git a/fake-signature/src/huawei/java/com/huawei/signature/diff/AppListDatabaseOpenHelper.java b/fake-signature/src/huawei/java/com/huawei/signature/diff/AppListDatabaseOpenHelper.java deleted file mode 100644 index f7e2d26e..00000000 --- a/fake-signature/src/huawei/java/com/huawei/signature/diff/AppListDatabaseOpenHelper.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.huawei.signature.diff; - -import android.content.ContentValues; -import android.content.Context; -import android.database.sqlite.SQLiteDatabase; -import android.database.sqlite.SQLiteOpenHelper; -import android.util.Log; -import org.microg.signature.fake.R; - -public class AppListDatabaseOpenHelper extends SQLiteOpenHelper { - private static final String TAG = AppListDatabaseOpenHelper.class.getSimpleName(); - private static final String DATABASE_NAME = "app_list.db"; - public static final String TABLE_APPLIST = "applist"; - public static final String COLUMN_NAME = "name"; - public static final String COLUMN_FAKE = "fake"; - private static final int DATABASE_VERSION = 3; - private static final String DROP_APP_LIST_TABLE = "DROP TABLE IF EXISTS " + TABLE_APPLIST; - private static final String CREATE_APP_LIST_TABLE = "CREATE TABLE IF NOT EXISTS " + TABLE_APPLIST + "(" + - COLUMN_NAME + " VARCHAR(255) PRIMARY KEY, " + - COLUMN_FAKE + " INTEGER CHECK(" + COLUMN_FAKE + " >= 0 and " + COLUMN_FAKE + " <= 1)" + - ")"; - private final Context context; - - public AppListDatabaseOpenHelper(Context context) { - super(context, DATABASE_NAME, null, DATABASE_VERSION); - this.context = context; - } - - @Override - public void onCreate(SQLiteDatabase db) { - Log.d(TAG, "onCreate"); - db.execSQL(DROP_APP_LIST_TABLE); - db.execSQL(CREATE_APP_LIST_TABLE); - initData(db); - } - - @Override - public void onOpen(SQLiteDatabase db) { - super.onOpen(db); - if (!db.isReadOnly()) { - initData(db); - } - } - - private void initData(SQLiteDatabase db) { - String[] wantFakeApps = context.getResources().getStringArray(R.array.signature_want_fake); - String[] neverFakeApps = context.getResources().getStringArray(R.array.signature_never_fake); - if (wantFakeApps.length == 0 && neverFakeApps.length == 0) { - return; - } - for (String app : wantFakeApps) { - db.insertWithOnConflict(TABLE_APPLIST, null, generateValues(app, true), SQLiteDatabase.CONFLICT_REPLACE); - } - for (String app : neverFakeApps) { - db.insertWithOnConflict(TABLE_APPLIST, null, generateValues(app, false), SQLiteDatabase.CONFLICT_REPLACE); - } - } - - private ContentValues generateValues(String packageName, boolean fake) { - ContentValues contentValues = new ContentValues(); - contentValues.put(COLUMN_NAME, packageName); - contentValues.put(COLUMN_FAKE, fake ? 1 : 0); - return contentValues; - } - - @Override - public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { - onCreate(db); - } -} \ No newline at end of file diff --git a/fake-signature/src/main/res/values/arrays.xml b/fake-signature/src/main/res/values/arrays.xml deleted file mode 100644 index 4f3118db..00000000 --- a/fake-signature/src/main/res/values/arrays.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - com.google.android.gms - com.android.vending - com.spotify.music - com.getir - com.pozitron.iscep - com.widgetable.theme.android - pro.huobi - com.tarparos.phigaea - com.artem.scotepio - com.sabah.deprembs - com.boynergrup.hopi - com.belbim.istanbulkart - com.a101.plus - com.widgetable.theme.android - net.wargaming.wot.blitz - com.litatom.app - com.ataexpress.tiklagelsin - tr.com.petrolofisi - com.mobisoft.beymen - com.unilever.algida - com.mobisoft.morhipo - com.zzkko - com.didilabs.kaavefali - com.airbnb.android - com.mobillium.papara - co.com.fincaraiz.app - com.frisby.frisby - - - com.truecaller - - \ No newline at end of file diff --git a/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/FirebaseAuthService.kt b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/FirebaseAuthService.kt deleted file mode 100644 index ff411333..00000000 --- a/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/FirebaseAuthService.kt +++ /dev/null @@ -1,649 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.firebase.auth - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import android.content.IntentFilter -import android.os.Build.VERSION.SDK_INT -import android.os.Handler -import android.os.Parcel -import android.provider.Telephony -import android.telephony.SmsMessage -import android.util.Log -import androidx.lifecycle.Lifecycle -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 -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 -import org.microg.gms.utils.digest -import org.microg.gms.utils.getCertificates - -private const val TAG = "GmsFirebaseAuth" - -fun JSONObject.getStringOrNull(key: String) = if (has(key)) getString(key) else null -fun JSONObject.getJSONArrayOrNull(key: String) = if (has(key)) getJSONArray(key) else null -fun JSONArray?.orEmpty() = this ?: JSONArray() -fun JSONObject.getJSONArrayLength(key: String) = getJSONArrayOrNull(key).orEmpty().length() - -private val ActionCodeSettings.requestTypeAsString: String - get() = when (requestType) { - 1 -> "PASSWORD_RESET" - 2 -> "OLD_EMAIL_AGREE" - 3 -> "NEW_EMAIL_ACCEPT" - 4 -> "VERIFY_EMAIL" - 5 -> "RECOVER_EMAIL" - 6 -> "EMAIL_SIGNIN" - 7 -> "VERIFY_AND_CHANGE_EMAIL" - 8 -> "REVERT_SECOND_FACTOR_ADDITION" - else -> "OOB_REQ_TYPE_UNSPECIFIED" - } - -private val UserProfileChangeRequest.deleteAttributeList: List - get() { - val list = arrayListOf() - if (shouldRemoveDisplayName) list.add("DISPLAY_NAME") - if (shouldRemovePhotoUri) list.add("PHOTO_URL") - return list - } - -private fun Intent.getSmsMessages(): Array { - return if (SDK_INT >= 19) { - Telephony.Sms.Intents.getMessagesFromIntent(this) - } else { - (getSerializableExtra("pdus") as? Array)?.map { SmsMessage.createFromPdu(it) }.orEmpty().toTypedArray() - } -} - -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, 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, context.packageManager.getCertificates(packageName).firstOrNull()?.digest("SHA1")) } - private var authorizedDomain: String? = null - - private suspend fun getAuthorizedDomain(): String { - authorizedDomain?.let { return it } - val authorizedDomain = try { - client.getProjectConfig().getJSONArray("authorizedDomains").getString(0) - } catch (e: Exception) { - Log.w(TAG, e) - "localhost" - } - this.authorizedDomain = authorizedDomain - return authorizedDomain - } - - private suspend fun refreshTokenResponse(cachedState: String): GetTokenResponse { - var tokenResponse = GetTokenResponse.parseJson(cachedState) - if (System.currentTimeMillis() + 300000L < tokenResponse.issuedAt + tokenResponse.expiresIn * 1000) { - return tokenResponse - } - return client.getTokenByRefreshToken(tokenResponse.refreshToken).toGetTokenResponse() - } - - private fun JSONObject.toGetTokenResponse() = GetTokenResponse().apply { - refreshToken = getStringOrNull("refresh_token") - accessToken = getStringOrNull("access_token") - expiresIn = getStringOrNull("expires_in")?.toLong() - tokenType = getStringOrNull("token_type") - } - - private fun JSONObject.toGetAccountInfoUser(): GetAccountInfoUser = GetAccountInfoUser().apply { - localId = getStringOrNull("localId") - email = getStringOrNull("email") - isEmailVerified = optBoolean("emailVerified") - displayName = getStringOrNull("displayName") - photoUrl = getStringOrNull("photoUrl") - for (i in 0 until getJSONArrayLength("providerUserInfo")) { - getJSONArray("providerUserInfo").getJSONObject(i).run { - providerInfoList.providerUserInfos.add(ProviderUserInfo().apply { - federatedId = getStringOrNull("federatedId") - displayName = getStringOrNull("displayName") - photoUrl = getStringOrNull("photoUrl") - providerId = getStringOrNull("providerId") - phoneNumber = getStringOrNull("phoneNumber") - email = getStringOrNull("email") - rawUserInfo = this@run.toString() - }) - } - } - password = getStringOrNull("rawPassword") - phoneNumber = getStringOrNull("phoneNumber") - creationTimestamp = getStringOrNull("createdAt")?.toLong() ?: 0L - lastSignInTimestamp = getStringOrNull("lastLoginAt")?.toLong() ?: 0L - } - - private fun JSONObject.toCreateAuthUriResponse(): CreateAuthUriResponse = CreateAuthUriResponse().apply { - authUri = getStringOrNull("authUri") - isRegistered = optBoolean("registered") - providerId = getStringOrNull("providerId") - isForExistingProvider = optBoolean("forExistingProvider") - for (i in 0 until getJSONArrayLength("allProviders")) { - stringList.values.add(getJSONArray("allProviders").getString(i)) - } - for (i in 0 until getJSONArrayLength("signinMethods")) { - signInMethods.add(getJSONArray("signinMethods").getString(i)) - } - } - - override fun applyActionCode(request: ApplyActionCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: applyActionCode") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun applyActionCodeCompat(code: String?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: applyActionCodeCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun changeEmail(request: ChangeEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: changeEmail") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun changeEmailCompat(cachedState: String?, email: String?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: changeEmailCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun changePassword(request: ChangePasswordAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: changePassword") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun changePasswordCompat(cachedState: String?, password: String?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: changePasswordCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun checkActionCode(request: CheckActionCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: checkActionCode") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun checkActionCodeCompat(code: String?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: checkActionCodeCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun confirmPasswordReset(request: ConfirmPasswordResetAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: confirmPasswordReset") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun confirmPasswordResetCompat(code: String?, newPassword: String?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: confirmPasswordResetCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun createUserWithEmailAndPassword(request: CreateUserWithEmailAndPasswordAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - Log.d(TAG, "createUserWithEmailAndPassword") - try { - val tokenResult = client.signupNewUser(email = request.email, password = request.password, tenantId = request.tenantId) - val idToken = tokenResult.getString("idToken") - val refreshToken = tokenResult.getString("refreshToken") - val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() - val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = true } - Log.d(TAG, "callback: onGetTokenResponseAndUser") - callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun createUserWithEmailAndPasswordCompat(email: String?, password: String?, callbacks: IFirebaseAuthCallbacks) { - createUserWithEmailAndPassword(CreateUserWithEmailAndPasswordAidlRequest().apply { this.email = email; this.password = password }, callbacks) - } - - override fun delete(request: DeleteAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: delete") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun deleteCompat(cachedState: String?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: deleteCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun finalizeMfaEnrollment(request: FinalizeMfaEnrollmentAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: finalizeMfaEnrollment") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun finalizeMfaSignIn(request: FinalizeMfaSignInAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: finalizeMfaSignIn") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun getAccessToken(request: GetAccessTokenAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - Log.d(TAG, "getAccessToken") - try { - callbacks.onGetTokenResponse(client.getTokenByRefreshToken(request.refreshToken).toGetTokenResponse()) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun getAccessTokenCompat(refreshToken: String?, callbacks: IFirebaseAuthCallbacks) { - getAccessToken(GetAccessTokenAidlRequest().apply { this.refreshToken = refreshToken }, callbacks) - } - - override fun getProvidersForEmail(request: GetProvidersForEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - Log.d(TAG, "getProvidersForEmail") - try { - callbacks.onCreateAuthUriResponse(client.createAuthUri(identifier = request.email, tenantId = request.tenantId).toCreateAuthUriResponse()) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun getProvidersForEmailCompat(email: String?, callbacks: IFirebaseAuthCallbacks) { - getProvidersForEmail(GetProvidersForEmailAidlRequest().apply { this.email = email }, callbacks) - } - - override fun linkEmailAuthCredential(request: LinkEmailAuthCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - Log.d(TAG, "linkEmailAuthCredential") - try { - val getTokenResponse = refreshTokenResponse(request.cachedState) - val accountInfoResult = client.getAccountInfo(idToken = getTokenResponse.accessToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser() - val setAccountInfo = client.setAccountInfo(idToken = getTokenResponse.accessToken, localId = accountInfoResult.localId, email = request.email, password = request.password).toGetAccountInfoUser() - accountInfoResult.email = setAccountInfo.email - accountInfoResult.isEmailVerified = setAccountInfo.isEmailVerified - accountInfoResult.providerInfoList = setAccountInfo.providerInfoList - callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun linkEmailAuthCredentialCompat(email: String?, password: String?, cachedState: String?, callbacks: IFirebaseAuthCallbacks) { - linkEmailAuthCredential(LinkEmailAuthCredentialAidlRequest().apply { this.email = email; this.password = password; this.cachedState = cachedState }, callbacks) - } - - override fun linkFederatedCredential(request: LinkFederatedCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: linkFederatedCredential") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun linkFederatedCredentialCompat(cachedState: String?, verifyAssertionRequest: VerifyAssertionRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: linkFederatedCredentialCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun linkPhoneAuthCredential(request: LinkPhoneAuthCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: linkPhoneAuthCredential") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun linkPhoneAuthCredentialCompat(cachedState: String?, credential: PhoneAuthCredential?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: linkPhoneAuthCredentialCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun reload(request: ReloadAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - try { - Log.d(TAG, "reload") - val getTokenResponse = refreshTokenResponse(request.cachedState) - val accountInfoResult = client.getAccountInfo(idToken = getTokenResponse.accessToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser() - Log.d(TAG, "callback: onGetTokenResponseAndUser") - callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun reloadCompat(cachedState: String?, callbacks: IFirebaseAuthCallbacks) { - reload(ReloadAidlRequest().apply { this.cachedState = cachedState }, callbacks) - } - - override fun sendEmailVerification(request: SendEmailVerificationWithSettingsAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - try { - Log.d(TAG, "sendEmailVerification") - client.getOobConfirmationCode( - requestType = "VERIFY_EMAIL", - idToken = request.token, - iOSBundleId = request.settings?.iOSBundle, - iOSAppStoreId = request.settings?.iOSAppStoreId, - continueUrl = request.settings?.url, - androidInstallApp = request.settings?.androidInstallApp, - androidMinimumVersion = request.settings?.androidMinimumVersion, - androidPackageName = request.settings?.androidPackageName, - canHandleCodeInApp = request.settings?.handleCodeInApp - ) - callbacks.onEmailVerificationResponse() - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun sendEmailVerificationCompat(token: String?, actionCodeSettings: ActionCodeSettings?, callbacks: IFirebaseAuthCallbacks) { - sendEmailVerification(SendEmailVerificationWithSettingsAidlRequest().apply { this.token = token; this.settings = actionCodeSettings }, callbacks) - } - - override fun sendVerificationCode(request: SendVerificationCodeAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - try { - Log.d(TAG, "sendVerificationCode") - val reCaptchaToken = when { - request.request.recaptchaToken != null -> request.request.recaptchaToken - ReCaptchaOverlay.isSupported(context) -> ReCaptchaOverlay.awaitToken(context, apiKey, getAuthorizedDomain()) - ReCaptchaActivity.isSupported(context) -> ReCaptchaActivity.awaitToken(context, apiKey, getAuthorizedDomain()) - else -> throw RuntimeException("No recaptcha token available") - } - var sessionInfo: String? = null - var registered = true - val receiver = object : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - var smsCode: String? = null - for (message in intent.getSmsMessages()) { - smsCode = Regex("\\b([0-9]{6})\\b").find(message.messageBody)?.groups?.get(1)?.value - ?: continue - Log.d(TAG, "Received SMS verification code: $smsCode") - break - } - if (smsCode == null) return - registered = false - context.unregisterReceiver(this) - try { - callbacks.onVerificationCompletedResponse(PhoneAuthCredential().apply { - this.phoneNumber = request.request.phoneNumber - this.sessionInfo = sessionInfo - this.smsCode = smsCode - }) - Log.d(TAG, "callback: onVerificationCompletedResponse") - } catch (e: Exception) { - Log.w(TAG, e) - } - } - } - context.registerReceiver(receiver, IntentFilter("android.provider.Telephony.SMS_RECEIVED")) - var timeout = request.request.timeoutInSeconds * 1000L - if (timeout <= 0L) timeout = 120000L - Handler().postDelayed({ - if (registered) { - Log.d(TAG, "Waited ${timeout}ms for verification code SMS, timeout.") - context.unregisterReceiver(receiver) - callbacks.onVerificationAutoTimeOut(sessionInfo) - Log.d(TAG, "callback: onVerificationAutoTimeOut") - } - }, timeout) - sessionInfo = client.sendVerificationCode(phoneNumber = request.request.phoneNumber, reCaptchaToken = reCaptchaToken).getString("sessionInfo") - callbacks.onSendVerificationCodeResponse(sessionInfo) - Log.d(TAG, "callback: onSendVerificationCodeResponse") - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun sendVerificationCodeCompat(request: SendVerificationCodeRequest, callbacks: IFirebaseAuthCallbacks) { - sendVerificationCode(SendVerificationCodeAidlRequest().apply { this.request = request }, callbacks) - } - - override fun sendGetOobConfirmationCodeEmail(request: SendGetOobConfirmationCodeEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - try { - Log.d(TAG, "sendGetOobConfirmationCodeEmail") - client.getOobConfirmationCode( - requestType = request.settings?.requestTypeAsString ?: "OOB_REQ_TYPE_UNSPECIFIED", - email = request.email, - iOSBundleId = request.settings?.iOSBundle, - iOSAppStoreId = request.settings?.iOSAppStoreId, - continueUrl = request.settings?.url, - androidInstallApp = request.settings?.androidInstallApp, - androidMinimumVersion = request.settings?.androidMinimumVersion, - androidPackageName = request.settings?.androidPackageName, - canHandleCodeInApp = request.settings?.handleCodeInApp - ) - Log.d(TAG, "callback: onResetPasswordResponse") - callbacks.onResetPasswordResponse(null) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun sendGetOobConfirmationCodeEmailCompat(email: String?, actionCodeSettings: ActionCodeSettings?, callbacks: IFirebaseAuthCallbacks) { - sendGetOobConfirmationCodeEmail(SendGetOobConfirmationCodeEmailAidlRequest().apply { this.email = email; this.settings = actionCodeSettings }, callbacks) - } - - override fun setFirebaseUiVersion(request: SetFirebaseUiVersionAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: setFirebaseUiVersion") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun setFirebaseUIVersionCompat(firebaseUiVersion: String?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: setFirebaseUIVersionCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun signInAnonymously(request: SignInAnonymouslyAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - Log.d(TAG, "signInAnonymously") - try { - val tokenResult = client.signupNewUser(tenantId = request.tenantId) - val idToken = tokenResult.getString("idToken") - val refreshToken = tokenResult.getString("refreshToken") - val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() - val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = true } - Log.d(TAG, "callback: onGetTokenResponseAndUser") - callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun signInAnonymouslyCompat(callbacks: IFirebaseAuthCallbacks) { - signInAnonymously(SignInAnonymouslyAidlRequest(), callbacks) - } - - override fun signInWithCredential(request: SignInWithCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: signInWithCredential") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun signInWithCredentialCompat(verifyAssertionRequest: VerifyAssertionRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: signInWithCredentialCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun signInWithCustomToken(request: SignInWithCustomTokenAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - Log.d(TAG, "signInWithCustomToken") - try { - val tokenResult = client.verifyCustomToken(token = request.token) - val idToken = tokenResult.getString("idToken") - val refreshToken = tokenResult.getString("refreshToken") - val isNewUser = tokenResult.optBoolean("isNewUser") - val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() - val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = isNewUser } - Log.d(TAG, "callback: onGetTokenResponseAndUser") - callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun signInWithCustomTokenCompat(token: String, callbacks: IFirebaseAuthCallbacks) { - signInWithCustomToken(SignInWithCustomTokenAidlRequest().apply { this.token = token }, callbacks) - } - - override fun signInWithEmailAndPassword(request: SignInWithEmailAndPasswordAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - Log.d(TAG, "signInWithEmailAndPassword") - try { - val tokenResult = client.verifyPassword(email = request.email, password = request.password, tenantId = request.tenantId) - val idToken = tokenResult.getString("idToken") - val refreshToken = tokenResult.getString("refreshToken") - val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() - val accountInfoResult = client.getAccountInfo(idToken = idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser() - Log.d(TAG, "callback: onGetTokenResponseAndUser") - callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun signInWithEmailAndPasswordCompat(email: String?, password: String?, callbacks: IFirebaseAuthCallbacks) { - signInWithEmailAndPassword(SignInWithEmailAndPasswordAidlRequest().apply { this.email = email; this.password = password }, callbacks) - } - - override fun signInWithEmailLink(request: SignInWithEmailLinkAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: signInWithEmailLink") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun signInWithEmailLinkCompat(credential: EmailAuthCredential?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: signInWithEmailLinkCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun signInWithPhoneNumber(request: SignInWithPhoneNumberAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - Log.d(TAG, "signInWithPhoneNumber") - try { - val tokenResult = client.verifyPhoneNumber( - phoneNumber = request.credential.phoneNumber, - temporaryProof = request.credential.temporaryProof, - sessionInfo = request.credential.sessionInfo, - code = request.credential.smsCode - ) - val idToken = tokenResult.getString("idToken") - val refreshToken = tokenResult.getString("refreshToken") - val isNewUser = tokenResult.optBoolean("isNewUser") - val getTokenResponse = client.getTokenByRefreshToken(refreshToken).toGetTokenResponse() - val accountInfoResult = client.getAccountInfo(idToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser().apply { this.isNewUser = isNewUser } - Log.d(TAG, "callback: onGetTokenResponseAndUser") - callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun signInWithPhoneNumberCompat(credential: PhoneAuthCredential?, callbacks: IFirebaseAuthCallbacks) { - signInWithPhoneNumber(SignInWithPhoneNumberAidlRequest().apply { this.credential = credential }, callbacks) - } - - override fun startMfaEnrollmentWithPhoneNumber(request: StartMfaPhoneNumberEnrollmentAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: startMfaEnrollmentWithPhoneNumber") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun startMfaSignInWithPhoneNumber(request: StartMfaPhoneNumberSignInAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: startMfaSignInWithPhoneNumber") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun unenrollMfa(request: UnenrollMfaAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: unenrollMfa") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun unlinkEmailCredential(request: UnlinkEmailCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: unlinkEmailCredential") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun unlinkEmailCredentialCompat(cachedState: String?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: unlinkEmailCredentialCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun unlinkFederatedCredential(request: UnlinkFederatedCredentialAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: unlinkFederatedCredential") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun unlinkFederatedCredentialCompat(provider: String?, cachedState: String?, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: unlinkFederatedCredentialCompat") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - override fun updateProfile(request: UpdateProfileAidlRequest, callbacks: IFirebaseAuthCallbacks) { - lifecycleScope.launchWhenStarted { - Log.d(TAG, "updateProfile") - try { - val getTokenResponse = refreshTokenResponse(request.cachedState) - val accountInfoResult = client.getAccountInfo(idToken = getTokenResponse.accessToken).getJSONArray("users").getJSONObject(0).toGetAccountInfoUser() - val setAccountInfo = client.setAccountInfo(idToken = getTokenResponse.accessToken, localId = accountInfoResult.localId, displayName = request.request.displayName, photoUrl = request.request.photoUrl, deleteAttribute = request.request.deleteAttributeList).toGetAccountInfoUser() - accountInfoResult.photoUrl = setAccountInfo.photoUrl - accountInfoResult.displayName = setAccountInfo.displayName - callbacks.onGetTokenResponseAndUser(getTokenResponse, accountInfoResult) - } catch (e: Exception) { - Log.w(TAG, "callback: onFailure", e) - callbacks.onFailure(Status(CommonStatusCodes.INTERNAL_ERROR, e.message)) - } - } - } - - override fun updateProfileCompat(cachedState: String?, userProfileChangeRequest: UserProfileChangeRequest, callbacks: IFirebaseAuthCallbacks) { - updateProfile(UpdateProfileAidlRequest().apply { this.cachedState = cachedState; this.request = userProfileChangeRequest}, callbacks) - } - - override fun verifyBeforeUpdateEmail(request: VerifyBeforeUpdateEmailAidlRequest, callbacks: IFirebaseAuthCallbacks) { - Log.d(TAG, "Not yet implemented: verifyBeforeUpdateEmail") - callbacks.onFailure(Status(CommonStatusCodes.CANCELED, "Not supported")) - } - - - override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean { - if (super.onTransact(code, data, reply, flags)) return true - Log.d(TAG, "onTransact: $code, $data, $flags") - return false - } -} diff --git a/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/IdentityToolkitClient.kt b/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/IdentityToolkitClient.kt deleted file mode 100644 index ca391a6d..00000000 --- a/firebase-auth/core/src/main/kotlin/org/microg/gms/firebase/auth/IdentityToolkitClient.kt +++ /dev/null @@ -1,148 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.firebase.auth - -import android.content.Context -import android.util.Log -import com.android.volley.NetworkResponse -import com.android.volley.ParseError -import com.android.volley.Request.Method.GET -import com.android.volley.Request.Method.POST -import com.android.volley.Response -import com.android.volley.VolleyError -import com.android.volley.toolbox.HttpHeaderParser -import com.android.volley.toolbox.JsonObjectRequest -import com.android.volley.toolbox.JsonRequest -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 -import java.nio.charset.Charset -import kotlin.coroutines.resume -import kotlin.coroutines.resumeWithException -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 = 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" - - private fun getRequestHeaders(): Map = hashMapOf().apply { - if (packageName != null) put("X-Android-Package", packageName) - if (certSha1Hash != null) put("X-Android-Cert", certSha1Hash.toHexString().uppercase()) - } - - private suspend fun request(method: String, data: JSONObject): JSONObject = suspendCoroutine { continuation -> - queue.add(object : JsonObjectRequest(POST, buildRelyingPartyUrl(method), data, { - continuation.resume(it) - }, { - Log.d(TAG, "Error: ${it.networkResponse?.data?.decodeToString() ?: it.message}") - continuation.resumeWithException(RuntimeException(it)) - }) { - override fun getHeaders(): Map = getRequestHeaders() - }) - } - - suspend fun createAuthUri(identifier: String? = null, tenantId: String? = null, continueUri: String? = "http://localhost"): JSONObject = - request("createAuthUri", JSONObject() - .put("identifier", identifier) - .put("tenantId", tenantId) - .put("continueUri", continueUri)) - - suspend fun getAccountInfo(idToken: String? = null): JSONObject = - request("getAccountInfo", JSONObject() - .put("idToken", idToken)) - - suspend fun getProjectConfig(): JSONObject = suspendCoroutine { continuation -> - queue.add(JsonObjectRequest(GET, buildRelyingPartyUrl("getProjectConfig"), null, { continuation.resume(it) }, { continuation.resumeWithException(RuntimeException(it)) })) - } - - suspend fun getOobConfirmationCode(requestType: String, email: String? = null, newEmail: String? = null, continueUrl: String? = null, idToken: String? = null, iOSBundleId: String? = null, iOSAppStoreId: String? = null, androidMinimumVersion: String? = null, androidInstallApp: Boolean? = null, androidPackageName: String? = null, canHandleCodeInApp: Boolean? = null): JSONObject = - request("getOobConfirmationCode", JSONObject() - .put("kind", "identitytoolkit#relyingparty") - .put("requestType", requestType) - .put("email", email) - .put("newEmail", newEmail) - .put("continueUrl", continueUrl) - .put("idToken", idToken) - .put("iOSBundleId", iOSBundleId) - .put("iOSAppStoreId", iOSAppStoreId) - .put("androidMinimumVersion", androidMinimumVersion) - .put("androidInstallApp", androidInstallApp) - .put("androidPackageName", androidPackageName) - .put("canHandleCodeInApp", canHandleCodeInApp)) - - - suspend fun sendVerificationCode(phoneNumber: String? = null, reCaptchaToken: String? = null): JSONObject = - request("sendVerificationCode", JSONObject() - .put("phoneNumber", phoneNumber) - .put("recaptchaToken", reCaptchaToken)) - - suspend fun setAccountInfo(idToken: String? = null, localId: String? = null, email: String? = null, password: String? = null, displayName: String? = null, photoUrl: String? = null, deleteAttribute: List = emptyList()): JSONObject = - request("setAccountInfo", JSONObject() - .put("idToken", idToken) - .put("localId", localId) - .put("email", email) - .put("password", password) - .put("displayName", displayName) - .put("photoUrl", photoUrl) - .put("deleteAttribute", JSONArray().apply { deleteAttribute.map { put(it) } })) - - suspend fun signupNewUser(email: String? = null, password: String? = null, tenantId: String? = null): JSONObject = - request("signupNewUser", JSONObject() - .put("email", email) - .put("password", password) - .put("tenantId", tenantId)) - - suspend fun verifyCustomToken(token: String? = null, returnSecureToken: Boolean = true): JSONObject = - request("verifyCustomToken", JSONObject() - .put("token", token) - .put("returnSecureToken", returnSecureToken)) - - suspend fun verifyPassword(email: String? = null, password: String? = null, tenantId: String? = null, returnSecureToken: Boolean = true): JSONObject = - request("verifyPassword", JSONObject() - .put("email", email) - .put("password", password) - .put("tenantId", tenantId) - .put("returnSecureToken", returnSecureToken)) - - suspend fun verifyPhoneNumber(phoneNumber: String? = null, sessionInfo: String? = null, code: String? = null, idToken: String? = null, verificationProof: String? = null, temporaryProof: String? = null): JSONObject = - request("verifyPhoneNumber", JSONObject() - .put("verificationProof", verificationProof) - .put("code", code) - .put("idToken", idToken) - .put("temporaryProof", temporaryProof) - .put("phoneNumber", phoneNumber) - .put("sessionInfo", sessionInfo)) - - suspend fun getTokenByRefreshToken(refreshToken: String): JSONObject = suspendCoroutine { continuation -> - queue.add(object : JsonRequest(POST, buildStsUrl("token"), "grant_type=refresh_token&refresh_token=$refreshToken", { continuation.resume(it) }, { continuation.resumeWithException(RuntimeException(it)) }) { - override fun parseNetworkResponse(response: NetworkResponse): Response { - return try { - val jsonString = String(response.data, Charset.forName(HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET))) - Response.success(JSONObject(jsonString), null) - } catch (e: UnsupportedEncodingException) { - Response.error(ParseError(e)) - } catch (je: JSONException) { - Response.error(ParseError(je)) - } - } - - override fun getBodyContentType(): String { - return "application/x-www-form-urlencoded" - } - - override fun getHeaders(): Map = getRequestHeaders() - }) - } -} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index 86630672..00000000 --- a/gradle.properties +++ /dev/null @@ -1,5 +0,0 @@ -android.useAndroidX=true -org.gradle.jvmargs=-Xmx4096m -XX:+UseParallelGC -android.defaults.buildfeatures.buildconfig=true -android.nonTransitiveRClass=false -android.nonFinalResIds=false \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 62d4c053550b91381bbd28b1afc82d634bf73a8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 58910 zcmWIWW@h1HVBp|jU|?`$00AZt!N9=4$-uzi>l)&y>*?pF&&+_TFn6P!tpfuCgFOQS zg9x%hUq?SrH`m}0JzuxazGqJRccpwh-0K5rCf zo|1Hb%=t$|+Du{N1LhwZM>Yy`a>SMx7Rwi(ySnrHx%2V&>lrG#_A-3lvAJV6oOj?DLgEJ0!Cg-|K0&O+BBYpS(=)dFPpPORuKd_*UgD z;BNdd)$o*D`X&vL!^aEreh1z^WfFW*UE5tbb+LHmJFepoLb5KGUb0HvKEFi6L9J8D zvT@r^(OirH6GsV{CR=xkSuN!5P z*mpC%)i&1)_`mo|?t3TIIR|dt_npdnQAl?~`O#fD51Y+0ZA5=W8Ev*SzV_|Si&vYK zg+H`k+Q?A8^VY5$-i$+!>mPmkvGZAlg}mGK7p_~H%If}0ADRBj^1SU6nbzijc%4LTi$TAfWBoje(Y z^|yv?2y9(gCffOV|}v4_}&f{c`QC??C8tJd7;jH^*`sPvO`=*(hY@Tt>YFnPzaoeuErTQ<}+FEAL&A0b9Ff#y{I89bdmlwRG*tfF9jKuFT(G(^y2|qLKI1%Eb$sthwHGB{QrRx+YT7vd) zFAI^)KE69A7;N=Qgz9=E%e!z?_G5ZU(?u-tb4|H;(eD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B}JJ@rHBLD(R1&X=cw1-BW!sVMc5YX!GM0BFT%{kB&=qlH^)$J_eFQ{DqGas zF%hO0reif7n*Ooem5FXN`t5@VqjR$G8SRR47a_W-=ojxGOg&xVLd(Z+^bj|3u@IW+!s^IyUnqe2A z;BI!K8-Kld>t^JeRS?E&m1DRKW;`)nHgt<>(QZUQSaiD@!y+X2Y%to1_6TDy*5NZ2dAJAN%s*)78zamVZ^dUOcuWa?+A+GRDriRuBTQv# zBf?bhp`}<4a74FgDcX6c2#c0=5^E78c%Y}FqFaD|`Xs`FnLR{Ufafeqbeqsmq(j*B zegY9TITLd}9lD)0Xord+>|8LJ2s`l|F@|mx`k^cct4_}%!YVvRw4mD*f_DA|!lqMm ziLeQh92~KphJkJs`Y8hltIjVV+A8!-hUk`{Z{0>%a(^+=mO%0=(!n<9wxI73M%Z#^ zDbcn-c1>b$FQ9M4L|AZR1&J0A3NiFea0si8uO`AOf?^g1HU$G<%aJz@mV z_K+Yf3*AWAGVF1IzIp&*=K8}JW`ctQb1eb7JJBa05N7T+4NqaatP$PKAkDB=B4~6A g#0TLejW>>>>>> 48e0b00a (Update build tools and dependencies) -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew deleted file mode 100755 index 64544521..00000000 --- a/gradlew +++ /dev/null @@ -1,243 +0,0 @@ -#!/bin/sh - -# SPDX-License-Identifier: Apache-2.0 -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# 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/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# 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"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -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 -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - 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. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" \ No newline at end of file diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index d0412fa3..00000000 --- a/gradlew.bat +++ /dev/null @@ -1,200 +0,0 @@ -<<<<<<< HEAD -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="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 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega -======= -@rem SPDX-License-Identifier: Apache-2.0 -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -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! -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 - -:omega ->>>>>>> 48e0b00a (Update build tools and dependencies) diff --git a/play-services-ads-identifier/core/src/main/kotlin/org/microg/gms/ads/identifier/AdvertisingIdService.kt b/play-services-ads-identifier/core/src/main/kotlin/org/microg/gms/ads/identifier/AdvertisingIdService.kt deleted file mode 100644 index 0c4f96d1..00000000 --- a/play-services-ads-identifier/core/src/main/kotlin/org/microg/gms/ads/identifier/AdvertisingIdService.kt +++ /dev/null @@ -1,139 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ -package org.microg.gms.ads.identifier - -import android.app.Service -import android.content.Context -import android.content.Intent -import android.content.pm.PackageManager -import android.os.Binder -import android.os.Bundle -import android.os.IBinder -import android.util.Log -import androidx.core.os.bundleOf -import com.google.android.gms.ads.identifier.internal.IAdvertisingIdService -import org.microg.gms.common.GooglePackagePermission -import org.microg.gms.common.PackageUtils -import java.util.UUID - -const val TAG = "AdvertisingId" -const val EMPTY_AD_ID = "00000000-0000-0000-0000-000000000000" - -class AdvertisingIdService : Service() { - override fun onBind(intent: Intent): IBinder? { - return AdvertisingIdServiceImpl(this).asBinder() - } -} - -class MemoryAdvertisingIdConfiguration(context: Context) : AdvertisingIdConfiguration(context) { - override val adTrackingLimitedPerApp: MutableMap = hashMapOf() - override var adTrackingLimitedGlobally: Boolean = true - override var debugLogging: Boolean = false - override var adId: String = EMPTY_AD_ID - override var debugAdId: String = EMPTY_AD_ID - - init { - resetAdvertisingId() - } -} - -abstract class AdvertisingIdConfiguration(private val context: Context) { - abstract val adTrackingLimitedPerApp: MutableMap - abstract var adTrackingLimitedGlobally: Boolean - abstract var debugLogging: Boolean - abstract var adId: String - abstract var debugAdId: String - - fun isAdTrackingLimitedForApp(uid: Int): Boolean { - if (adTrackingLimitedGlobally) return true - return adTrackingLimitedPerApp[uid] ?: false - } - - fun resetAdvertisingId(): String { - adId = UUID.randomUUID().toString() - debugAdId = UUID.randomUUID().toString().dropLast(12) + "10ca1ad1abe1" - return if (debugLogging) debugAdId else adId - } - - fun getAdvertisingIdForApp(uid: Int): String { - if (isAdTrackingLimitedForApp(uid)) return EMPTY_AD_ID - try { - val packageNames = context.packageManager.getPackagesForUid(uid) ?: return EMPTY_AD_ID - for (packageName in packageNames) { - val applicationInfo = context.packageManager.getApplicationInfo(packageName, 0) - if (applicationInfo.targetSdkVersion > 33) { - if (context.packageManager.checkPermission("com.google.android.gms.permission.AD_ID", packageName) == PackageManager.PERMISSION_DENIED) { - throw SecurityException("Permission not granted") - } - } - } - } catch (e: Exception) { - Log.w(TAG, "Permission check failed", e) - return EMPTY_AD_ID - } - val adId = if (debugLogging) debugAdId else adId - return adId.ifEmpty { resetAdvertisingId() } - } -} - -class AdvertisingIdServiceImpl(private val context: Context) : IAdvertisingIdService.Stub() { - private val configuration = MemoryAdvertisingIdConfiguration(context) - - override fun getAdvertisingId(): String { - return configuration.getAdvertisingIdForApp(Binder.getCallingUid()) - } - - override fun isAdTrackingLimited(ignored: Boolean): Boolean { - return configuration.isAdTrackingLimitedForApp(Binder.getCallingUid()) - } - - override fun resetAdvertisingId(packageName: String): String { - PackageUtils.checkPackageUid(context, packageName, getCallingUid()) - PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) - return configuration.resetAdvertisingId() - } - - override fun setAdTrackingLimitedGlobally(packageName: String, limited: Boolean) { - PackageUtils.checkPackageUid(context, packageName, getCallingUid()) - PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) - configuration.adTrackingLimitedGlobally = limited - } - - override fun setDebugLoggingEnabled(packageName: String, enabled: Boolean): String { - PackageUtils.checkPackageUid(context, packageName, getCallingUid()) - PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) - configuration.debugLogging = enabled - return advertisingId - } - - override fun isDebugLoggingEnabled(): Boolean { - return configuration.debugLogging - } - - override fun isAdTrackingLimitedGlobally(): Boolean { - PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) - return configuration.adTrackingLimitedGlobally - } - - override fun setAdTrackingLimitedForApp(uid: Int, limited: Boolean) { - PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) - configuration.adTrackingLimitedPerApp[uid] = limited - } - - override fun resetAdTrackingLimitedForApp(uid: Int) { - PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) - configuration.adTrackingLimitedPerApp.remove(uid) - } - - override fun getAllAppsLimitedAdTrackingConfiguration(): Bundle { - PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) - return bundleOf(*configuration.adTrackingLimitedPerApp.map { it.key.toString() to it.value }.toTypedArray()) - } - - override fun getAdvertisingIdForApp(uid: Int): String { - PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID) - return configuration.getAdvertisingIdForApp(uid) - } -} diff --git a/play-services-ads-identifier/core/src/main/res/values-be/strings.xml b/play-services-ads-identifier/core/src/main/res/values-be/strings.xml deleted file mode 100644 index d4a8547b..00000000 --- a/play-services-ads-identifier/core/src/main/res/values-be/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - Дазвол рэкламнага ідэнтыфікатара - Дазваляе выдаўцу дадатку прама ці ўскосна атрымліваць доступ да рэкламнага ідэнтыфікатара. - Апавяшчэнне рэкламнага ідэнтыфікатара - Дазваляе з дадаткам атрымліваць апавяшчэнне калі рэкламны ідэнтыфікатар або перавага аб ліміце рэкламнай сачэння карыстальніка абноўленыя. - \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-es/strings.xml b/play-services-ads-identifier/core/src/main/res/values-es/strings.xml deleted file mode 100644 index 90c47f72..00000000 --- a/play-services-ads-identifier/core/src/main/res/values-es/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - Permiso de identificación publicitaria - Permite que una aplicación de editor acceda directa o indirectamente a un ID de publicidad válido. - Notificación del ID de publicidad - Permite que una aplicación reciba una notificación cuando se actualiza el ID de publicidad o la preferencia de limitar el seguimiento de anuncios del usuario. - \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-pt-rBR/strings.xml b/play-services-ads-identifier/core/src/main/res/values-pt-rBR/strings.xml deleted file mode 100644 index 389929df..00000000 --- a/play-services-ads-identifier/core/src/main/res/values-pt-rBR/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - Permissão do ID publicitário - Permite o app acessar um ID publicitário válido diretamente ou indiretamente. - Notificação de ID publicitário - Permite um app receber uma notificação quando o ID publicitário ou configuração de limitar rastreamento por anúncios do usuário muda. - \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-ru/strings.xml b/play-services-ads-identifier/core/src/main/res/values-ru/strings.xml deleted file mode 100644 index dc46f144..00000000 --- a/play-services-ads-identifier/core/src/main/res/values-ru/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - Разрешает приложению получать уведомление когда рекламный идентификатор или предпочтение о лимите рекламной слежки пользователя обновлены. - Разрешение рекламного идентификатора - Разрешает издателю приложения прямо или косвенно получать доступ к рекламному идентификатору. - Уведомление рекламного идентификатора - \ No newline at end of file diff --git a/play-services-ads-identifier/core/src/main/res/values-zh-rCN/strings.xml b/play-services-ads-identifier/core/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index fbe69d8a..00000000 --- a/play-services-ads-identifier/core/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - 广告 ID 权限 - 允许发布者应用直接或间接地访问广告 ID。 - 广告 ID 通知 - 允许应用在用户的广告 ID 或限制广告跟踪设置更改时得到通知。 - \ No newline at end of file diff --git a/play-services-api/build.gradle b/play-services-api/build.gradle deleted file mode 100644 index f78981e9..00000000 --- a/play-services-api/build.gradle +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -android { - compileSdk androidCompileSdk - buildToolsVersion '33.0.2' - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = "1.8" - } - namespace 'org.microg.gms.api' - buildFeatures { - aidl true - } -} - -dependencies { - api project(':play-services-basement') - api project(':play-services-iid-api') - api project(':play-services-base-api') -} \ No newline at end of file diff --git a/play-services-api/gradle.properties b/play-services-api/gradle.properties deleted file mode 100644 index cac2a521..00000000 --- a/play-services-api/gradle.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2013-2016 microG Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -POM_NAME=Play Services Internal API -POM_DESCRIPTION=Interfaces and objects for IPC between Play Services Library and Play Services Core - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsApi - -POM_SCM_URL=https://github.com/microg/android_external_GmsApi -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=mar-v-in -POM_DEVELOPER_NAME=Marvin W \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/auth/IAuthManagerService.aidl b/play-services-api/src/main/aidl/com/google/android/auth/IAuthManagerService.aidl deleted file mode 100644 index ae33a334..00000000 --- a/play-services-api/src/main/aidl/com/google/android/auth/IAuthManagerService.aidl +++ /dev/null @@ -1,23 +0,0 @@ -package com.google.android.auth; - -import android.os.Bundle; -import android.accounts.Account; - -import com.google.android.gms.auth.AccountChangeEventsResponse; -import com.google.android.gms.auth.AccountChangeEventsRequest; -import com.google.android.gms.auth.GetHubTokenRequest; -import com.google.android.gms.auth.GetHubTokenInternalResponse; -import com.google.android.gms.auth.HasCababilitiesRequest; - -interface IAuthManagerService { - Bundle getToken(String accountName, String scope, in Bundle extras) = 0; - Bundle clearToken(String token, in Bundle extras) = 1; - AccountChangeEventsResponse getChangeEvents(in AccountChangeEventsRequest request) = 2; - - Bundle getTokenWithAccount(in Account account, String scope, in Bundle extras) = 4; - Bundle getAccounts(in Bundle extras) = 5; - Bundle removeAccount(in Account account) = 6; - Bundle requestGoogleAccountsAccess(String packageName) = 7; - int hasCapabilities(in HasCababilitiesRequest request) = 8; - GetHubTokenInternalResponse getHubToken(in GetHubTokenRequest request, in Bundle extras) = 9; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsRequest.aidl deleted file mode 100644 index 206b1a9d..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth; - -parcelable AccountChangeEventsRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsResponse.aidl deleted file mode 100644 index 832e5859..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/AccountChangeEventsResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth; - -parcelable AccountChangeEventsResponse; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/GetHubTokenInternalResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/GetHubTokenInternalResponse.aidl deleted file mode 100644 index f73f91bb..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/GetHubTokenInternalResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth; - -parcelable GetHubTokenInternalResponse; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/GetHubTokenRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/GetHubTokenRequest.aidl deleted file mode 100644 index 74de2776..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/GetHubTokenRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth; - -parcelable GetHubTokenRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/HasCababilitiesRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/HasCababilitiesRequest.aidl deleted file mode 100644 index c0c080cd..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/HasCababilitiesRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth; - -parcelable HasCababilitiesRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/Credential.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/Credential.aidl deleted file mode 100644 index 82536b93..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/Credential.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.credentials; - -parcelable Credential; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/CredentialRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/CredentialRequest.aidl deleted file mode 100644 index d000f32e..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/CredentialRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.credentials; - -parcelable CredentialRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.aidl deleted file mode 100644 index 7fa0d4ab..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.credentials.internal; - -parcelable DeleteRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.aidl deleted file mode 100644 index 814f68da..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.credentials.internal; - -parcelable GeneratePasswordRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsCallbacks.aidl deleted file mode 100644 index da248c33..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsCallbacks.aidl +++ /dev/null @@ -1,10 +0,0 @@ -package com.google.android.gms.auth.api.credentials.internal; - -import com.google.android.gms.common.api.Status; -import com.google.android.gms.auth.api.credentials.Credential; - -interface ICredentialsCallbacks { - void onStatusAndCredential(in Status status, in Credential credential) = 0; - void onStatus(in Status status) = 1; - void onStatusAndString(in Status status, String string) = 2; -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsService.aidl deleted file mode 100644 index 89c6c7e2..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/ICredentialsService.aidl +++ /dev/null @@ -1,15 +0,0 @@ -package com.google.android.gms.auth.api.credentials.internal; - -import com.google.android.gms.auth.api.credentials.CredentialRequest; -import com.google.android.gms.auth.api.credentials.internal.ICredentialsCallbacks; -import com.google.android.gms.auth.api.credentials.internal.DeleteRequest; -import com.google.android.gms.auth.api.credentials.internal.GeneratePasswordRequest; -import com.google.android.gms.auth.api.credentials.internal.SaveRequest; - -interface ICredentialsService { - void request(ICredentialsCallbacks callbacks, in CredentialRequest request) = 0; - void save(ICredentialsCallbacks callbacks, in SaveRequest request) = 1; - void delete(ICredentialsCallbacks callbacks, in DeleteRequest request) = 2; - void disableAutoSignIn(ICredentialsCallbacks callbacks) = 3; - void generatePassword(ICredentialsCallbacks callbacks, in GeneratePasswordRequest request) = 4; -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/SaveRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/SaveRequest.aidl deleted file mode 100644 index b5bcb593..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/credentials/internal/SaveRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.credentials.internal; - -parcelable SaveRequest; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthCallbacks.aidl deleted file mode 100644 index ae8e79c5..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthCallbacks.aidl +++ /dev/null @@ -1,8 +0,0 @@ -package com.google.android.gms.auth.api.internal; - -import com.google.android.gms.auth.api.proxy.ProxyResponse; - -interface IAuthCallbacks { - void onProxyResponse(in ProxyResponse response) = 0; - void onSpatulaHeader(String spatulaHeader) = 1; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthService.aidl deleted file mode 100644 index a5f6a537..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/internal/IAuthService.aidl +++ /dev/null @@ -1,11 +0,0 @@ -package com.google.android.gms.auth.api.internal; - -import com.google.android.gms.auth.api.internal.IAuthCallbacks; -//import com.google.android.gms.auth.api.proxy.ProxyGrpcRequest; -import com.google.android.gms.auth.api.proxy.ProxyRequest; - -interface IAuthService { - void performProxyRequest(IAuthCallbacks callbacks, in ProxyRequest request) = 0; -// void performProxyGrpcRequest(IAuthCallback callbacks, in ProxyGrpcRequest request) = 1; - void getSpatulaHeader(IAuthCallbacks callbacks) = 2; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyRequest.aidl deleted file mode 100644 index fa5885f8..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.proxy; - -parcelable ProxyRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyResponse.aidl deleted file mode 100644 index eae21f3c..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/api/proxy/ProxyResponse.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.auth.api.proxy; - -parcelable ProxyResponse; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/auth/appcert/IAppCertService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/auth/appcert/IAppCertService.aidl deleted file mode 100644 index ee7f7338..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/auth/appcert/IAppCertService.aidl +++ /dev/null @@ -1,6 +0,0 @@ -package com.google.android.gms.auth.appcert; - -interface IAppCertService { - boolean fetchDeviceKey() = 0; - String getSpatulaHeader(String packageName) = 1; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/checkin/internal/ICheckinService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/checkin/internal/ICheckinService.aidl deleted file mode 100644 index 973de92f..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/checkin/internal/ICheckinService.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.checkin.internal; - -interface ICheckinService { - String getDeviceDataVersionInfo(); - long getLastCheckinSuccessTime(); - String getLastSimOperator(); -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/data/BitmapTeleporter.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/data/BitmapTeleporter.aidl deleted file mode 100644 index 832f0fd2..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/data/BitmapTeleporter.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common.data; - -parcelable BitmapTeleporter; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/GoogleCertificatesQuery.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/internal/GoogleCertificatesQuery.aidl deleted file mode 100644 index ae02e068..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/GoogleCertificatesQuery.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.internal; - -parcelable GoogleCertificatesQuery; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ICertData.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ICertData.aidl deleted file mode 100644 index 19839d7d..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ICertData.aidl +++ /dev/null @@ -1,8 +0,0 @@ -package com.google.android.gms.common.internal; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ICertData { - IObjectWrapper getWrappedBytes(); - int remoteHashCode(); -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/IGoogleCertificatesApi.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/internal/IGoogleCertificatesApi.aidl deleted file mode 100644 index da539f32..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/IGoogleCertificatesApi.aidl +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.android.gms.common.internal; - -import com.google.android.gms.common.internal.GoogleCertificatesQuery; -import com.google.android.gms.dynamic.IObjectWrapper; - -interface IGoogleCertificatesApi { - IObjectWrapper getGoogleCertficates(); - IObjectWrapper getGoogleReleaseCertificates(); - boolean isGoogleReleaseSigned(String packageName, IObjectWrapper certData); - boolean isGoogleSigned(String packageName, IObjectWrapper certData); - boolean isGoogleOrPlatformSigned(in GoogleCertificatesQuery query, IObjectWrapper packageManager); -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ISignInButtonCreator.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ISignInButtonCreator.aidl deleted file mode 100644 index f6c53996..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/internal/ISignInButtonCreator.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.common.internal; - -import com.google.android.gms.dynamic.IObjectWrapper; - -interface ISignInButtonCreator { - IObjectWrapper createSignInButton(IObjectWrapper context, int size, int color); // returns View -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/common/server/FavaDiagnosticsEntity.aidl b/play-services-api/src/main/aidl/com/google/android/gms/common/server/FavaDiagnosticsEntity.aidl deleted file mode 100644 index 69b856bc..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/common/server/FavaDiagnosticsEntity.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.server; - -parcelable FavaDiagnosticsEntity; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/ErrorReport.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/ErrorReport.aidl deleted file mode 100644 index 0b4980d3..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/feedback/ErrorReport.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.feedback; - -parcelable ErrorReport; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/FileTeleporter.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/FileTeleporter.aidl deleted file mode 100644 index d6dd1583..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/feedback/FileTeleporter.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.feedback; - -parcelable FileTeleporter; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/LogOptions.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/LogOptions.aidl deleted file mode 100644 index 433575b0..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/feedback/LogOptions.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.feedback; - -parcelable LogOptions; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/ThemeSettings.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/ThemeSettings.aidl deleted file mode 100644 index 7b189c99..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/feedback/ThemeSettings.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.feedback; - -parcelable ThemeSettings; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackCallbacks.aidl deleted file mode 100644 index eeb50c94..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackCallbacks.aidl +++ /dev/null @@ -1,10 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.feedback.internal; - -interface IFeedbackCallbacks { - void onServiceDestroy(); -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackService.aidl deleted file mode 100644 index 48401b0d..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/feedback/internal/IFeedbackService.aidl +++ /dev/null @@ -1,33 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.feedback.internal; - -import com.google.android.gms.feedback.FeedbackOptions; -import android.os.IBinder; -import android.os.IInterface; -import android.os.Parcel; -import com.google.android.gms.googlehelp.GoogleHelp; -import com.google.android.gms.feedback.ErrorReport; -import android.content.Context; -import android.os.Bundle; -import android.content.Intent; - - -interface IFeedbackService { - - boolean startFeedbackFlow(in ErrorReport errorReport) = 0; - - boolean silentSendFeedback(in ErrorReport errorReport) = 2; - - void saveFeedbackDataAsync(in Bundle bundle, long id) = 3; - - void saveFeedbackDataAsyncWithOption(in FeedbackOptions options, in Bundle bundle, long id) = 4; - - void startFeedbackFlowAsync(in ErrorReport errorReport, long id) = 5; - - boolean isValidConfiguration(in FeedbackOptions options) = 6; - -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassRequestParcel.aidl b/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassRequestParcel.aidl deleted file mode 100644 index ffe2ae73..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassRequestParcel.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.gass.internal; - -parcelable GassRequestParcel; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassResponseParcel.aidl b/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassResponseParcel.aidl deleted file mode 100644 index f8f40a73..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassResponseParcel.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.gass.internal; - -parcelable GassResponseParcel; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/IGassService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/IGassService.aidl deleted file mode 100644 index 7fafe56a..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/gass/internal/IGassService.aidl +++ /dev/null @@ -1,16 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.gass.internal; - -import android.os.Bundle; -import android.os.IInterface; -import com.google.android.gms.gass.internal.GassRequestParcel; -import com.google.android.gms.gass.internal.GassResponseParcel; - -interface IGassService { - GassResponseParcel getGassResponse(in GassRequestParcel gassRequestParcel) = 0; - Bundle getGassBundle(in Bundle bundle, int code) = 3; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/http/IGoogleHttpService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/http/IGoogleHttpService.aidl deleted file mode 100644 index 58ea0ba5..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/http/IGoogleHttpService.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.http; - -import android.os.Bundle; - -interface IGoogleHttpService { - Bundle checkUrl(String url); -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleCallbacks.aidl deleted file mode 100644 index 75db9fae..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleCallbacks.aidl +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.android.gms.people.internal; - -import android.os.Bundle; -import android.os.ParcelFileDescriptor; - -import com.google.android.gms.common.data.DataHolder; - -interface IPeopleCallbacks { - void onDataHolder(int code, in Bundle resolution, in DataHolder holder) = 1; - void onDataHolders(int code, in Bundle resolution, in DataHolder[] holders) = 3; - void onParcelFileDescriptor(int code, in Bundle resolution, in ParcelFileDescriptor fileDescriptor, in Bundle extras) = 4; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleService.aidl deleted file mode 100644 index 62ae1478..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/people/internal/IPeopleService.aidl +++ /dev/null @@ -1,44 +0,0 @@ -package com.google.android.gms.people.internal; - -import android.os.Bundle; - -import com.google.android.gms.people.internal.IPeopleCallbacks; -import com.google.android.gms.common.server.FavaDiagnosticsEntity; -import com.google.android.gms.common.internal.ICancelToken; - -interface IPeopleService { - // void loadOwners1(IPeopleCallbacks var1, boolean var2, boolean var3, String var4, String var5); - // void loadCirclesOld(IPeopleCallbacks var1, String var2, String var3, String var4, int var5, String var6); - // void loadPeopleOld(IPeopleCallbacks var1, String var2, String var3, String var4, in List var5, int var6, boolean var7, long var8); - // void loadAvatarLegacy(IPeopleCallbacks var1, String var2, int var3, int var4); - // void loadContactImageLegacy(IPeopleCallbacks var1, long var2, boolean var4); - // void blockPerson(IPeopleCallbacks var1, String var2, String var3, String var4, boolean var5); - // Bundle syncRawContact(in Uri var1); - // void loadPeopleForAggregation8(IPeopleCallbacks var1, String var2, String var3, String var4, boolean var5, int var6); - // void setSyncToContactsSettings(IPeopleCallbacks var1, String var2, boolean var3, in String[] var4); - - // Bundle startSync(String var1, String var2); - // void requestSync(IPeopleCallbacks var1, String var2, String var3, in Uri var4); - // void updatePersonCirclesOld(IPeopleCallbacks var1, String var2, String var3, String var4, in List var5, in List var6); - // boolean isSyncToContactsEnabled(); - // Bundle requestSyncOld(String var1, String var2); - // void setAvatar(IPeopleCallbacks var1, String var2, String var3, in Uri var4, boolean var5); - // void loadCircles(IPeopleCallbacks var1, String var2, String var3, String var4, int var5, String var6, boolean var7); - // Bundle requestSyncOld19(String var1, String var2, long var3); - // void loadPeople20(IPeopleCallbacks var1, String var2, String var3, String var4, in List var5, int var6, boolean var7, long var8, String var10, int var11); - // void loadPeopleLive(IPeopleCallbacks var1, String var2, String var3, String var4, int var5, String var6); - // void updatePersonCircles(IPeopleCallbacks var1, String var2, String var3, String var4, in List var5, in List var6, in FavaDiagnosticsEntity var7); - // void loadRemoteImageLegacy(IPeopleCallbacks var1, String var2); - // void loadContactsGaiaIds24(IPeopleCallbacks var1, String var2, String var3); - // Bundle requestSyncOld25(String var1, String var2, long var3, boolean var5); - // void addCircle(IPeopleCallbacks var1, String var2, String var3, String var4, String var5); - // void addPeopleToCircle(IPeopleCallbacks var1, String var2, String var3, String var4, in List var5); - - Bundle registerDataChangedListener(IPeopleCallbacks callbacks, boolean register, String var3, String var4, int scopes) = 10; - void loadCircles(IPeopleCallbacks callbacks, String account, String pageGaiaId, String circleId, int type, String var6, boolean var7) = 18; - Bundle requestSync(String account, String var2, long var3, boolean var5, boolean var6) = 204; - void loadOwners(IPeopleCallbacks callbacks, boolean var2, boolean var3, String account, String var5, int sortOrder) = 304; - void loadPeopleForAggregation(IPeopleCallbacks callbacks, String account, String var3, String filter, int var5, boolean var6, int var7, int var8, String var9, boolean var10, int var11, int var12) = 401; - ICancelToken loadOwnerAvatar(IPeopleCallbacks callbacks, String account, String pageId, int size, int flags) = 504; - ICancelToken loadAutocompleteList(IPeopleCallbacks callbacks, String account, String pageId, boolean directorySearch, String var5, String query, int autocompleteType, int var8, int numberOfResults, boolean var10) = 506; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/phenotype/internal/IPhenotypeService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/phenotype/internal/IPhenotypeService.aidl deleted file mode 100644 index 3b306d53..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/phenotype/internal/IPhenotypeService.aidl +++ /dev/null @@ -1,35 +0,0 @@ -package com.google.android.gms.phenotype.internal; - -import com.google.android.gms.common.api.internal.IStatusCallback; -import com.google.android.gms.phenotype.internal.IPhenotypeCallbacks; -import com.google.android.gms.phenotype.Flag; -import com.google.android.gms.phenotype.RegistrationInfo; - -interface IPhenotypeService { - 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 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 packageName, in byte[] p2) = 19; // returns via callbacks.onAppSpecificPropertiesSet() - - oneway void getServingVersion(IPhenotypeCallbacks callbacks) = 21; // returns via callbacks.onServingVersion() - 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 p2) = 25; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/potokens/PoToken.aidl b/play-services-api/src/main/aidl/com/google/android/gms/potokens/PoToken.aidl deleted file mode 100644 index 8cf0bb7e..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/potokens/PoToken.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.potokens; - -parcelable PoToken; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/IPoTokensService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/IPoTokensService.aidl deleted file mode 100644 index 938c848a..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/IPoTokensService.aidl +++ /dev/null @@ -1,14 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.potokens.internal; - -import com.google.android.gms.common.api.internal.IStatusCallback; -import com.google.android.gms.potokens.internal.ITokenCallbacks; - -interface IPoTokensService { - void responseStatus(IStatusCallback call, int code) = 1; - void responseStatusToken(ITokenCallbacks call, int i, in byte[] bArr) = 2; -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/ITokenCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/ITokenCallbacks.aidl deleted file mode 100644 index 55c71dfe..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/potokens/internal/ITokenCallbacks.aidl +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.potokens.internal; - -import com.google.android.gms.common.api.Status; -import com.google.android.gms.potokens.PoToken; - -interface ITokenCallbacks { - void responseToken(in Status status, in PoToken token) = 1; -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/PseudonymousIdToken.aidl b/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/PseudonymousIdToken.aidl deleted file mode 100644 index b8d88c14..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/PseudonymousIdToken.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.pseudonymous; - -parcelable PseudonymousIdToken; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdCallbacks.aidl deleted file mode 100644 index f6a47ded..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdCallbacks.aidl +++ /dev/null @@ -1,15 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.pseudonymous.internal; - -import com.google.android.gms.common.api.Status; -import com.google.android.gms.pseudonymous.PseudonymousIdToken; - -interface IPseudonymousIdCallbacks { - void onGetTokenResponse(in Status status, in PseudonymousIdToken token) = 0; - void onSetTokenResponse(in Status status) = 1; - void onGetLastResetWallTimeMsResponse(in Status status, long time) = 2; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdService.aidl deleted file mode 100644 index e99f7df6..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdService.aidl +++ /dev/null @@ -1,15 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.pseudonymous.internal; - -import com.google.android.gms.pseudonymous.internal.IPseudonymousIdCallbacks; -import com.google.android.gms.pseudonymous.PseudonymousIdToken; - -interface IPseudonymousIdService { - void getToken(IPseudonymousIdCallbacks call) = 0; - void setToken(IPseudonymousIdCallbacks call, in PseudonymousIdToken token) = 1; - void getLastResetWallTimeMs(IPseudonymousIdCallbacks callbacks) = 2; -} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.aidl deleted file mode 100644 index 715a75c0..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.aidl +++ /dev/null @@ -1,7 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ -package com.google.android.gms.semanticlocation; - -parcelable SemanticLocationEventRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/ISemanticLocationService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/ISemanticLocationService.aidl deleted file mode 100644 index de75deff..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/ISemanticLocationService.aidl +++ /dev/null @@ -1,18 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ -package com.google.android.gms.semanticlocation.internal; - -import android.app.PendingIntent; -import android.os.IInterface; -import com.google.android.gms.semanticlocation.SemanticLocationEventRequest; -import com.google.android.gms.semanticlocation.internal.SemanticLocationParameters; -import com.google.android.gms.common.api.internal.IStatusCallback; - -interface ISemanticLocationService { - void registerSemanticLocationEvents(in SemanticLocationParameters params, IStatusCallback callback, in SemanticLocationEventRequest request, in PendingIntent pendingIntent) = 0; - void unregisterSemanticLocationEvents(in SemanticLocationParameters params, IStatusCallback callback, in PendingIntent pendingIntent) = 1; - - void setIncognitoMode(in SemanticLocationParameters params, IStatusCallback callback, boolean mode) = 4; -} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.aidl b/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.aidl deleted file mode 100644 index 1ac959eb..00000000 --- a/play-services-api/src/main/aidl/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.aidl +++ /dev/null @@ -1,7 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ -package com.google.android.gms.semanticlocation.internal; - -parcelable SemanticLocationParameters; diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEvent.java b/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEvent.java deleted file mode 100644 index c147bcac..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEvent.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth; - -import org.microg.safeparcel.AutoSafeParcelable; - -<<<<<<< HEAD:play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEvent.java -public class AccountChangeEvent extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator<>(AccountChangeEvent.class); -======= -import java.util.List; - -public class GetAllCapabilitiesResponse extends AutoSafeParcelable { - @Field(1) - private int versionCode = 1; - @Field(2) - public int statusCode; - @Field(3) - public List capabilities; - - public static final Creator CREATOR = findCreator(GetAllCapabilitiesResponse.class); ->>>>>>> 1cc72500 (Wearable: Invoke callback on WearableService.getAllCapabilities()):play-services-wearable/src/main/java/com/google/android/gms/wearable/internal/GetAllCapabilitiesResponse.java -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsRequest.java deleted file mode 100644 index cf8561df..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsRequest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth; - -import static org.microg.gms.auth.AuthConstants.DEFAULT_ACCOUNT_TYPE; - -import android.accounts.Account; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class AccountChangeEventsRequest extends AutoSafeParcelable { - @Field(3) - @Deprecated - private final String accountName; - @Field(4) - private final Account account; - - public AccountChangeEventsRequest(String accountName, Account account) { - this.accountName = accountName; - this.account = account; - } - - public Account getAccount() { - if (account != null) return account; - if (accountName != null) return new Account(accountName, DEFAULT_ACCOUNT_TYPE); - return null; - } - - public static Creator CREATOR = new AutoCreator<>(AccountChangeEventsRequest.class); - -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsResponse.java b/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsResponse.java deleted file mode 100644 index 10491379..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/AccountChangeEventsResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class AccountChangeEventsResponse extends AutoSafeParcelable { - - public AccountChangeEventsResponse() { - } - - public static Creator CREATOR = new AutoCreator<>(AccountChangeEventsResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/GetHubTokenInternalResponse.java b/play-services-api/src/main/java/com/google/android/gms/auth/GetHubTokenInternalResponse.java deleted file mode 100644 index 4845ed41..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/GetHubTokenInternalResponse.java +++ /dev/null @@ -1,14 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class GetHubTokenInternalResponse extends AutoSafeParcelable { - @Field(2) - public String status; - public static final Creator CREATOR = new AutoCreator<>(GetHubTokenInternalResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/GetHubTokenRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/GetHubTokenRequest.java deleted file mode 100644 index 2c4e973c..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/GetHubTokenRequest.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class GetHubTokenRequest extends AutoSafeParcelable { - @Field(1) - public String accountName; - @Field(2) - public String service; - @Field(3) - public String packageName; - public static final Creator CREATOR = new AutoCreator<>(GetHubTokenRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/HasCababilitiesRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/HasCababilitiesRequest.java deleted file mode 100644 index c9907fa8..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/HasCababilitiesRequest.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth; - -import android.accounts.Account; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class HasCababilitiesRequest extends AutoSafeParcelable { - @Field(1) - public Account account; - public static final Creator CREATOR = new AutoCreator<>(HasCababilitiesRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/TokenData.java b/play-services-api/src/main/java/com/google/android/gms/auth/TokenData.java deleted file mode 100644 index df3768c8..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/TokenData.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth; - -import com.google.android.gms.common.api.Scope; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.List; - -public class TokenData extends AutoSafeParcelable { - - @SafeParceled(2) - public final String token; - - @SafeParceled(3) - public final Long expiry; - - @SafeParceled(5) - public final boolean isOAuth; - - @SafeParceled(value = 6, subClass = Scope.class) - public final List scopes; - - public TokenData() { - token = null; - expiry = null; - isOAuth = false; - scopes = null; - } - - public TokenData(String token, Long expiry, boolean isOAuth, List scopes) { - this.token = token; - this.expiry = expiry; - this.isOAuth = isOAuth; - this.scopes = scopes; - } - - public TokenData(String token, Long expiry) { - this.token = token; - this.expiry = expiry; - this.isOAuth = false; - this.scopes = null; - } - - public static final Creator CREATOR = new AutoCreator<>(TokenData.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java deleted file mode 100644 index 9ade5cc0..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/Credential.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2016, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import android.net.Uri; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -@PublicApi -public class Credential extends AutoSafeParcelable { - - @Field(1) - private String id; - @Field(2) - private String name; - @Field(3) - private Uri profilePictureUri; - @Field(value = 4, subClass = IdToken.class) - private List tokens; - @Field(5) - private String password; - @Field(6) - private String accountType; - @Field(7) - private String generatedPassword; - - private Credential() { - } - - /** - * Returns the type of federated identity account used to sign in the user. While this may be - * any string, it is strongly recommended that values from {@link com.google.android.gms.auth.api.credentials.IdentityProviders} - * are used, which are the login domains for common identity providers. - * - * @return A string identifying the federated identity provider associated with this account, - * typically in the form of the identity provider's login domain. null will be returned if the - * credential is a password credential. - */ - public String getAccountType() { - return accountType; - } - - /** - * Returns the credential identifier, typically an email address or user name, though it may - * also be some encoded unique identifier for a federated identity account. - */ - public String getId() { - return id; - } - - /** - * Returns the display name of the credential, if available. Typically, the display name will - * be the name of the user, or some other string which the user can easily recognize and - * distinguish from other accounts they may have. - */ - public String getName() { - return name; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Credential)) return false; - - Credential that = (Credential) o; - - if (!Objects.equals(id, that.id)) return false; - if (!Objects.equals(name, that.name)) return false; - if (!Objects.equals(profilePictureUri, that.profilePictureUri)) - return false; - if (!Objects.equals(password, that.password)) - return false; - if (!Objects.equals(accountType, that.accountType)) - return false; - return Objects.equals(generatedPassword, that.generatedPassword); - - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{id, name, profilePictureUri, password, accountType, generatedPassword}); - } - - public static class Builder { - private final String id; - private String name; - private final Uri profilePictureUri; - private final String password; - private String accountType; - - @PublicApi(exclude = true) - public List tokens; - @PublicApi(exclude = true) - private final String generatedPassword; - - /** - * Copies the information stored in an existing credential, in order to allow that information to be modified. - * - * @param credential the existing credential - */ - public Builder(Credential credential) { - this.id = credential.id; - this.name = credential.name; - this.profilePictureUri = credential.profilePictureUri; - this.password = credential.password; - this.accountType = credential.accountType; - this.tokens = credential.tokens; - this.generatedPassword = credential.generatedPassword; - } - - public Credential build() { - Credential credential = new Credential(); - credential.id = id; - credential.name = name; - credential.profilePictureUri = profilePictureUri; - credential.password = password; - credential.accountType = accountType; - credential.tokens = tokens; - credential.generatedPassword = generatedPassword; - return credential; - } - - /** - * Specifies the account type for a federated credential. The value should be set to - * identity provider's login domain, such as "https://accounts.google.com" for Google - * accounts. The login domains for common identity providers are listed in {@link IdentityProviders}. - * - * @param accountType The type of the account. Typically, one of the values in {@link IdentityProviders}. - */ - public Builder setAccountType(String accountType) { - this.accountType = accountType; - return this; - } - - /** - * Sets the display name for the credential, which should be easy for the user to recognize - * as associated to the credential, and distinguishable from other credentials they may - * have. This string will be displayed more prominently than, or instead of, the account ID - * whenever available. In most cases, the name of the user is sufficient. - */ - public Builder setName(String name) { - this.name = name; - return this; - } - - } - - public static final Creator CREATOR = new AutoCreator<>(Credential.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java deleted file mode 100644 index 41ca2191..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialPickerConfig.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2016, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import androidx.annotation.NonNull; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; - -@PublicApi -public class CredentialPickerConfig extends AutoSafeParcelable { - - @Field(1) - private final boolean showAddAccountButton; - @Field(2) - private final boolean showCancelButton; - @Field(3) - private final boolean forNewAccount; - - public CredentialPickerConfig(boolean showAddAccountButton, boolean showCancelButton, boolean forNewAccount) { - this.showAddAccountButton = showAddAccountButton; - this.showCancelButton = showCancelButton; - this.forNewAccount = forNewAccount; - } - - /** - * @deprecated It was determined that this method was not useful for developers. - */ - @Deprecated - public boolean isForNewAccount() { - return forNewAccount; - } - - @NonNull - @Override - public String toString() { - return "CredentialPickerConfig{" + - "showAddAccountButton=" + showAddAccountButton + - ", showCancelButton=" + showCancelButton + - '}'; - } - - public static class Builder { - private final boolean showAddAccountButton; - private final boolean showCancelButton; - private final boolean forNewAccount; - - public Builder(boolean showAddAccountButton, boolean showCancelButton, boolean forNewAccount) { - this.showAddAccountButton = showAddAccountButton; - this.showCancelButton = showCancelButton; - this.forNewAccount = forNewAccount; - } - - public CredentialPickerConfig build() { - return new CredentialPickerConfig(showAddAccountButton, showCancelButton, forNewAccount); - } - - } - - public static final Creator CREATOR = new AutoCreator<>(CredentialPickerConfig.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java deleted file mode 100644 index c4961d14..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/CredentialRequest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2016, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class CredentialRequest extends AutoSafeParcelable { - - @Field(1) - private final boolean passwordLoginSupported; - - public CredentialRequest(boolean passwordLoginSupported) { - this.passwordLoginSupported = passwordLoginSupported; - } - - /** - * @deprecated Use {@link #isPasswordLoginSupported()} - */ - @Deprecated - public boolean getSupportsPasswordLogin() { - return isPasswordLoginSupported(); - } - - public boolean isPasswordLoginSupported() { - return passwordLoginSupported; - } - - public static final Creator CREATOR = new AutoCreator(CredentialRequest.class); - - public static class Builder { - - public Builder() { - } - - public void setAccountTypes(String... accountTypes) { - accountTypes.clone(); - } - } -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/HintRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/HintRequest.java deleted file mode 100644 index 3f9336f4..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/HintRequest.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import androidx.annotation.NonNull; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; - -import java.util.Arrays; - -/** - * Parameters for requesting the display of the hint picker, via {@link CredentalsApi#getHintPickerIntent()}. - * Instances can be created using {@link HintRequest.Builder}. - */ -@PublicApi -public class HintRequest extends AutoSafeParcelable { - - @Field(1) - private final CredentialPickerConfig hintPickerConfig; - @Field(2) - private final boolean emailAddressIdentifierSupported; - @Field(3) - private final boolean phoneNumberIdentifierSupported; - @Field(4) - private final String[] accountTypes; - @Field(5) - private final boolean idTokenRequested; - @Field(6) - private final String serverClientId; - @Field(7) - private final String idTokenNonce; - - public HintRequest(CredentialPickerConfig hintPickerConfig, boolean emailAddressIdentifierSupported, boolean phoneNumberIdentifierSupported, String[] accountTypes, boolean idTokenRequested, String serverClientId, String idTokenNonce) { - this.hintPickerConfig = hintPickerConfig; - this.emailAddressIdentifierSupported = emailAddressIdentifierSupported; - this.phoneNumberIdentifierSupported = phoneNumberIdentifierSupported; - this.accountTypes = accountTypes; - this.idTokenRequested = idTokenRequested; - this.serverClientId = serverClientId; - this.idTokenNonce = idTokenNonce; - } - - public static final Creator CREATOR = new AutoCreator<>(HintRequest.class); - - @NonNull - @Override - public String toString() { - return "HintRequest{" + - "hintPickerConfig=" + hintPickerConfig + - ", emailAddressIdentifierSupported=" + emailAddressIdentifierSupported + - ", phoneNumberIdentifierSupported=" + phoneNumberIdentifierSupported + - ", accountTypes=" + Arrays.toString(accountTypes) + - ", idTokenRequested=" + idTokenRequested + - ", serverClientId='" + serverClientId + '\'' + - ", idTokenNonce='" + idTokenNonce + '\'' + - '}'; - } - - public static class Builder { - private final CredentialPickerConfig hintPickerConfig; - private final boolean emailAddressIdentifierSupported; - private final boolean phoneNumberIdentifierSupported; - private final String[] accountTypes; - private final String serverClientId; - private final String idTokenNonce; - - public Builder(CredentialPickerConfig hintPickerConfig, boolean emailAddressIdentifierSupported, boolean phoneNumberIdentifierSupported, String[] accountTypes, String serverClientId, String idTokenNonce) { - this.hintPickerConfig = hintPickerConfig; - this.emailAddressIdentifierSupported = emailAddressIdentifierSupported; - this.phoneNumberIdentifierSupported = phoneNumberIdentifierSupported; - this.accountTypes = accountTypes; - this.serverClientId = serverClientId; - this.idTokenNonce = idTokenNonce; - } - - /** - * Builds a {@link HintRequest}. - */ - public HintRequest build() { - boolean idTokenRequested = true; - return new HintRequest(hintPickerConfig, emailAddressIdentifierSupported, phoneNumberIdentifierSupported, accountTypes, idTokenRequested, serverClientId, idTokenNonce); - } - - } -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java deleted file mode 100644 index 5d84423e..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdToken.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2016, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; - -@PublicApi -public class IdToken extends AutoSafeParcelable { - - @Field(1) - private final String accountType; - - @Field(2) - private final String id; - - public IdToken(String accountType, String id) { - this.accountType = accountType; - this.id = id; - } - - /** - * Returns {@code AccountManager} account type for the token. - */ - public String getAccountType() { - return accountType; - } - - public static final Creator CREATOR = new AutoCreator<>(IdToken.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdentityProviders.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdentityProviders.java deleted file mode 100644 index 1d974993..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/IdentityProviders.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.credentials; - -/** - * Identity provider constants for use with {@link CredentialRequest.Builder#setAccountTypes(String...)} - */ -public final class IdentityProviders { -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.java deleted file mode 100644 index e560ddc5..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/DeleteRequest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.api.credentials.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class DeleteRequest extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(DeleteRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.java deleted file mode 100644 index 5fd6fcb7..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/GeneratePasswordRequest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.api.credentials.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class GeneratePasswordRequest extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(GeneratePasswordRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/SaveRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/SaveRequest.java deleted file mode 100644 index 24a9d92f..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/credentials/internal/SaveRequest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.api.credentials.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class SaveRequest extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(SaveRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyRequest.java deleted file mode 100644 index dc1fbd39..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyRequest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.proxy; - -import androidx.annotation.NonNull; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ProxyRequest extends AutoSafeParcelable { - - @Field(1) - public String url; - - @NonNull - @Override - public String toString() { - return url; - } - - public static final Creator CREATOR = new AutoCreator<>(ProxyRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyResponse.java b/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyResponse.java deleted file mode 100644 index 263d2e20..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/api/proxy/ProxyResponse.java +++ /dev/null @@ -1,15 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.proxy; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ProxyResponse extends AutoSafeParcelable { - @Field(1) - public int gmsStatusCode; - - public static final Creator CREATOR = new AutoCreator<>(ProxyResponse.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRecoveryGuidanceRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRecoveryGuidanceRequest.java deleted file mode 100644 index 1c267ed1..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRecoveryGuidanceRequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -import android.accounts.Account; - -import org.microg.gms.auth.AuthConstants; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class AccountRecoveryGuidanceRequest extends AutoSafeParcelable { - - @SafeParceled(2) - @Deprecated - public final String accountName; - @SafeParceled(3) - public final Account account; - - public AccountRecoveryGuidanceRequest(String accountName) { - this.accountName = accountName; - this.account = new Account(accountName, AuthConstants.DEFAULT_ACCOUNT_TYPE); - } - - public AccountRecoveryGuidanceRequest(Account account) { - this.accountName = account.name; - this.account = account; - } - - public static final Creator CREATOR = new AutoCreator<>(AccountRecoveryGuidanceRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRemovalRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRemovalRequest.java deleted file mode 100644 index dc90a7d0..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/AccountRemovalRequest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -import android.accounts.Account; - -import org.microg.gms.auth.AuthConstants; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class AccountRemovalRequest extends AutoSafeParcelable { - - @SafeParceled(2) - @Deprecated - public final String accountName; - @SafeParceled(3) - public final Account account; - - public AccountRemovalRequest(String accountName) { - this.accountName = accountName; - this.account = new Account(accountName, AuthConstants.DEFAULT_ACCOUNT_TYPE); - } - - public AccountRemovalRequest(Account account) { - this.accountName = account.name; - this.account = account; - } - - public static final Creator CREATOR = new AutoCreator(AccountRemovalRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/ConfirmCredentialsRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/ConfirmCredentialsRequest.java deleted file mode 100644 index 9edad8b2..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/ConfirmCredentialsRequest.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ConfirmCredentialsRequest extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator<>(ConfirmCredentialsRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java deleted file mode 100644 index 73062668..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/dataservice/TokenRequest.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -import android.accounts.Account; -import android.os.Bundle; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -// TODO -public class TokenRequest extends AutoSafeParcelable{ - - @SafeParceled(3) - public String accountName; - @SafeParceled(4) - public Bundle extras; - @SafeParceled(9) - public String consent; - @SafeParceled(15) - public String accountType; - - public Account getAccount() { - return new Account(accountName, accountType); - } - - public static final Creator CREATOR = new AutoCreator<>(TokenRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/delegate/ConfirmCredentialsWorkflowRequest.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/delegate/ConfirmCredentialsWorkflowRequest.java deleted file mode 100644 index b8e5ed63..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/delegate/ConfirmCredentialsWorkflowRequest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.delegate; - -import android.accounts.Account; -import android.os.Bundle; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class ConfirmCredentialsWorkflowRequest extends AutoSafeParcelable { - @SafeParceled(2) - public String accountName; - @SafeParceled(4) - public Bundle extras; - @SafeParceled(5) - public Account account; - - public static final Creator CREATOR = new AutoCreator<>(ConfirmCredentialsWorkflowRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AccountCredentials.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AccountCredentials.java deleted file mode 100644 index 67e7c7db..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AccountCredentials.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.shared; - -import android.accounts.Account; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -// TODO -public class AccountCredentials extends AutoSafeParcelable { - @SafeParceled(3) - public String accountName; - @SafeParceled(9) - public String accountType; - - public Account getAccount() { - return new Account(accountName, accountType); - } - - public static final Creator CREATOR = new AutoCreator<>(AccountCredentials.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AppDescription.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AppDescription.java deleted file mode 100644 index 1ccdf4f6..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/AppDescription.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.shared; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class AppDescription extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator<>(AppDescription.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/CaptchaSolution.java b/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/CaptchaSolution.java deleted file mode 100644 index ce1d3f61..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/auth/firstparty/shared/CaptchaSolution.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.auth.firstparty.shared; - -import org.microg.safeparcel.AutoSafeParcelable; - -// TODO -public class CaptchaSolution extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator<>(CaptchaSolution.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/common/data/BitmapTeleporter.java b/play-services-api/src/main/java/com/google/android/gms/common/data/BitmapTeleporter.java deleted file mode 100644 index 1af37b66..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/common/data/BitmapTeleporter.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common.data; - -import android.graphics.Bitmap; -import android.os.Parcel; -import android.os.ParcelFileDescriptor; -import android.util.Log; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -import java.io.Closeable; -import java.io.DataInputStream; -import java.io.File; -import java.io.IOException; -import java.nio.ByteBuffer; - -@SafeParcelable.Class -public class BitmapTeleporter extends AbstractSafeParcelable { - - @Field(1) - public int versionCode; - @Field(2) - public ParcelFileDescriptor fileDescriptor; - @Field(3) - public int status; - public boolean isParceled; - public Bitmap targetBitmap; - public File targetDirectory; - - public BitmapTeleporter() { - } - - public BitmapTeleporter(int version, ParcelFileDescriptor parcelFileDescriptor, int status) { - this.versionCode = version; - this.fileDescriptor = parcelFileDescriptor; - this.status = status; - this.targetBitmap = null; - this.isParceled = false; - } - - public BitmapTeleporter(Bitmap bitmap) { - this.versionCode = 1; - this.fileDescriptor = null; - this.status = 0; - this.targetBitmap = bitmap; - this.isParceled = true; - } - - public final Bitmap createTargetBitmap() { - if (!this.isParceled) { - ParcelFileDescriptor parcelFileDescriptor = this.fileDescriptor; - if (parcelFileDescriptor == null) { - throw new NullPointerException("null reference"); - } - DataInputStream dataInputStream = new DataInputStream(new ParcelFileDescriptor.AutoCloseInputStream(parcelFileDescriptor)); - try { - try { - byte[] bArr = new byte[dataInputStream.readInt()]; - int readInt = dataInputStream.readInt(); - int readInt2 = dataInputStream.readInt(); - Bitmap.Config valueOf = Bitmap.Config.valueOf(dataInputStream.readUTF()); - dataInputStream.read(bArr); - close(dataInputStream); - ByteBuffer wrap = ByteBuffer.wrap(bArr); - Bitmap createBitmap = Bitmap.createBitmap(readInt, readInt2, valueOf); - createBitmap.copyPixelsFromBuffer(wrap); - this.targetBitmap = createBitmap; - this.isParceled = true; - } catch (IOException e) { - throw new IllegalStateException("Could not read from parcel file descriptor", e); - } - } catch (Throwable th) { - close(dataInputStream); - throw th; - } - } - return this.targetBitmap; - } - - public final void setTargetDirectory(File file) { - if (file == null) { - throw new NullPointerException("Cannot set null temp directory"); - } - this.targetDirectory = file; - } - - private static void close(Closeable closeable) { - try { - closeable.close(); - } catch (IOException e) { - Log.w("BitmapTeleporter", "Could not close stream", e); - } - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(BitmapTeleporter.class); - -} diff --git a/play-services-api/src/main/java/com/google/android/gms/common/internal/CertData.java b/play-services-api/src/main/java/com/google/android/gms/common/internal/CertData.java deleted file mode 100644 index 38b86bc8..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/common/internal/CertData.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.internal; - -import android.os.IBinder; -import android.os.RemoteException; - -import androidx.annotation.Nullable; -import com.google.android.gms.dynamic.IObjectWrapper; -import com.google.android.gms.dynamic.ObjectWrapper; - -import java.util.Arrays; - -public class CertData extends ICertData.Stub { - private final byte[] bytes; - private final int hashCode; - - public CertData(byte[] bytes) { - this.bytes = bytes; - if (bytes.length < 25) throw new RuntimeException("CertData to small"); - hashCode = Arrays.hashCode(Arrays.copyOfRange(bytes, 0, 25)); - } - - @Override - public int hashCode() { - return hashCode; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ICertData)) return false; - ICertData cert = (ICertData) obj; - try { - if (cert.remoteHashCode() != hashCode()) return false; - return Arrays.equals(ObjectWrapper.unwrapTyped(cert.getWrappedBytes(), byte[].class), getBytes()); - } catch (RemoteException e) { - return false; - } - } - - public byte[] getBytes() { - return bytes; - } - - @Override - public IObjectWrapper getWrappedBytes() { - return ObjectWrapper.wrap(getBytes()); - } - - @Override - public int remoteHashCode() { - return hashCode(); - } - - @Nullable - public static CertData unwrap(IBinder certDataBinder) { - if (certDataBinder instanceof CertData) { - return (CertData) certDataBinder; - } else if (certDataBinder instanceof IObjectWrapper) { - return unwrap((IObjectWrapper) certDataBinder); - } else if (certDataBinder instanceof ICertData) { - return unwrap((ICertData) certDataBinder); - } - return null; - } - - public static CertData unwrap(IObjectWrapper certDataWrapper) { - CertData certData = ObjectWrapper.unwrapTyped(certDataWrapper, CertData.class); - if (certData != null) return certData; - byte[] bytes = ObjectWrapper.unwrapTyped(certDataWrapper, byte[].class); - if (bytes != null) return new CertData(bytes); - ICertData iCertData = ObjectWrapper.unwrapTyped(certDataWrapper, ICertData.class); - if (iCertData != null) return unwrap(iCertData); - return null; - } - - public static CertData unwrap(ICertData iCertData) { - if (iCertData == null) return null; - if (iCertData instanceof CertData) return (CertData) iCertData; - try { - byte[] bytes = ObjectWrapper.unwrapTyped(iCertData.getWrappedBytes(), byte[].class); - if (bytes != null) { - return new CertData(bytes); - } - } catch (RemoteException e) { - // Ignore - } - return null; - } -} diff --git a/play-services-api/src/main/java/com/google/android/gms/common/internal/GoogleCertificatesQuery.java b/play-services-api/src/main/java/com/google/android/gms/common/internal/GoogleCertificatesQuery.java deleted file mode 100644 index 86445d32..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/common/internal/GoogleCertificatesQuery.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.internal; - -import android.os.IBinder; -import android.os.RemoteException; - -import com.google.android.gms.dynamic.IObjectWrapper; -import com.google.android.gms.dynamic.ObjectWrapper; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -public class GoogleCertificatesQuery extends AutoSafeParcelable { - @SafeParceled(1) - private final String packageName; - @SafeParceled(2) - private final IBinder certDataBinder; - private CertData certData; - @SafeParceled(3) - private final boolean allowNonRelease; - - public GoogleCertificatesQuery(String packageName, IBinder certDataBinder, boolean allowNonRelease) { - this.packageName = packageName; - this.certDataBinder = certDataBinder; - this.allowNonRelease = allowNonRelease; - } - - public String getPackageName() { - return packageName; - } - - public CertData getCertData() { - if (certData == null && certDataBinder != null) { - certData = CertData.unwrap(certDataBinder); - } - return certData; - } - - public static final Creator CREATOR = new AutoCreator(GoogleCertificatesQuery.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/common/server/FavaDiagnosticsEntity.java b/play-services-api/src/main/java/com/google/android/gms/common/server/FavaDiagnosticsEntity.java deleted file mode 100644 index d32e668b..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/common/server/FavaDiagnosticsEntity.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.server; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class FavaDiagnosticsEntity extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator<>(FavaDiagnosticsEntity.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/feedback/ErrorReport.java b/play-services-api/src/main/java/com/google/android/gms/feedback/ErrorReport.java deleted file mode 100644 index 55d6d359..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/feedback/ErrorReport.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.feedback; - -import android.app.ApplicationErrorReport; -import android.graphics.Bitmap; -import android.graphics.RectF; -import android.os.Bundle; -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.data.BitmapTeleporter; -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -import java.util.List; - -@SafeParcelable.Class -public class ErrorReport extends AbstractSafeParcelable { - @Field(2) - public ApplicationErrorReport applicationErrorReport; - @Field(3) - public String feedbackMsg; - @Field(4) - public int versionCode; - @Field(5) - public String versionName; - @Field(6) - public String mobileDevice; - @Field(7) - public String mobileDisplay; - @Field(8) - public String mobileType; - @Field(9) - public String mobileModel; - @Field(10) - public String mobileProduct; - @Field(11) - public String mobileFingerprint; - @Field(12) - public int mobileSdkInt; - @Field(13) - public String mobileRelease; - @Field(14) - public String mobileIncremental; - @Field(15) - public String mobileCodeName; - @Field(16) - public String mobileBoard; - @Field(17) - public String mobileBrand; - @Field(18) - public String[] unknownStringArray18; - @Field(19) - public String[] unknownStringArray19; - @Field(20) - public String[] unknownStringArray20; - @Field(21) - public String unknownString21; - @Field(22) - public String screenshotImgSrc; - @Field(23) - public byte[] screenshotImgData; - @Field(24) - public int screenshotHeight; - @Field(25) - public int screenshotWidth; - @Field(26) - public int phoneType; - @Field(27) - public int networkType; - @Field(28) - public String networkOperatorName; - @Field(29) - public String email; - @Field(30) - public String languageTag; - @Field(31) - public Bundle bundle; - @Field(32) - public boolean isFixedUri; - @Field(33) - public int mobileCountryCode; - @Field(34) - public int mobileNetworkCode; - @Field(35) - public boolean unknownBool35; - @Field(36) - public String exceptionClassName; - @Field(37) - public String throwFileName; - @Field(38) - public int throwLineNumber; - @Field(39) - public String throwClassName; - @Field(40) - public String throwMethodName; - @Field(41) - public String stackTrace; - @Field(42) - public String exceptionMessage; - @Field(43) - public String unknownString43; - @Field(44) - public String unknownString44; - @Field(45) - public String packageName; - @Field(46) - public BitmapTeleporter bitmapTeleporter; - @Field(47) - public String unknownString47; - @Field(48) - public FileTeleporter[] files; - @Field(49) - public String[] unknownByteArray49; - @Field(50) - public boolean unknownBool50; - @Field(51) - public String unknownString51; - @Field(52) - public ThemeSettings themeSettings; - @Field(53) - public LogOptions logOptions; - @Field(54) - public String unknownString54; - @Field(55) - public boolean unknownBool55; - @Field(56) - public Bundle bundleText; - @Field(57) - public List rectFS; - @Field(58) - public boolean unknownBool58; - @Field(59) - public Bitmap bitmap; - @Field(60) - public String unknownString60; - @Field(61) - public List camList; - @Field(62) - public int unknownInt62; - @Field(63) - public int unknownInt63; - @Field(64) - public String[] unknownStringArray64; - @Field(65) - public String[] unknownStringArray65; - @Field(66) - public String[] unknownStringArray66; - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(ErrorReport.class); - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - -} diff --git a/play-services-api/src/main/java/com/google/android/gms/feedback/FeedbackOptions.java b/play-services-api/src/main/java/com/google/android/gms/feedback/FeedbackOptions.java deleted file mode 100644 index 679fe0f2..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/feedback/FeedbackOptions.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.feedback; - -import android.app.ApplicationErrorReport; -import android.graphics.Bitmap; -import android.os.Bundle; -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.data.BitmapTeleporter; -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -import java.util.List; - -@SafeParcelable.Class -public class FeedbackOptions extends AbstractSafeParcelable { - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(FeedbackOptions.class); - - @Field(2) - public String unknownString2; - @Field(3) - public Bundle unknownBundle3; - @Field(5) - public String unknownString3; - @Field(6) - public ApplicationErrorReport applicationErrorReport; - @Field(7) - public String unknownString7; - @Field(8) - public BitmapTeleporter bitmapTeleporter; - @Field(9) - public String packageName; - @Field(10) - public List files; - @Field(11) - public boolean unknownBoolean11; - @Field(12) - public ThemeSettings themeSettings; - @Field(13) - public LogOptions logOptions; - @Field(14) - public boolean unknownBoolean14; - @Field(15) - public Bitmap screenshot; - @Field(16) - public String unknownString16; - @Field(17) - public boolean unknownBoolean17; - @Field(18) - public long unknownLong18; - @Field(19) - public boolean unknownBool19; - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - -} diff --git a/play-services-api/src/main/java/com/google/android/gms/feedback/FileTeleporter.java b/play-services-api/src/main/java/com/google/android/gms/feedback/FileTeleporter.java deleted file mode 100644 index 445200bf..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/feedback/FileTeleporter.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.feedback; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -@SafeParcelable.Class -public class FileTeleporter extends AbstractSafeParcelable { - @Field(3) - public String contentType; - @Field(4) - public String content; - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(FileTeleporter.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/feedback/LogOptions.java b/play-services-api/src/main/java/com/google/android/gms/feedback/LogOptions.java deleted file mode 100644 index ce1f8201..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/feedback/LogOptions.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.feedback; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -@SafeParcelable.Class -public class LogOptions extends AbstractSafeParcelable { - - @Field(2) - public String options; - @Field(3) - public boolean unknownBool3; - @Field(4) - public boolean unknownBool4; - @Field(5) - public boolean unknownBool5; - @Field(6) - public boolean unknownBool6; - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(LogOptions.class); - -} diff --git a/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassRequestParcel.java b/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassRequestParcel.java deleted file mode 100644 index 66669683..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassRequestParcel.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.gass.internal; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -@SafeParcelable.Class -public class GassRequestParcel extends AbstractSafeParcelable { - - @Field(1) - public int versionCode; - @Field(2) - public String packageName; - @Field(3) - public String appVersionCode; - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GassRequestParcel.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassResponseParcel.java b/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassResponseParcel.java deleted file mode 100644 index 34e2c617..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/gass/internal/GassResponseParcel.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.gass.internal; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; -import com.google.android.gms.feedback.ErrorReport; - -@SafeParcelable.Class -public class GassResponseParcel extends AbstractSafeParcelable { - - @Field(1) - public int versionCode; - - @Field(2) - public byte[] data; - - public ErrorReport report; - - public GassResponseParcel() { - } - - public GassResponseParcel(int i, byte[] bArr) { - this.versionCode = i; - this.report = null; - this.data = bArr; - } - - public GassResponseParcel(ErrorReport report) { - this.versionCode = 1; - this.report = report; - this.data = null; - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GassResponseParcel.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/AppMetadata.java b/play-services-api/src/main/java/com/google/android/gms/measurement/internal/AppMetadata.java deleted file mode 100644 index d3726249..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/measurement/internal/AppMetadata.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.measurement.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -import java.util.List; - -public class AppMetadata extends AutoSafeParcelable { - @Field(2) - public String packageName; - @Field(3) - public String googleAppId; - @Field(4) - public String versionName; - @Field(5) - public String installerPackageName; - @Field(6) - private long googleVersion; - @Field(7) - private long devCertHash; - @Field(8) - private String healthMonitor; - @Field(9) - private boolean measurementEnabled = true; - @Field(10) - private boolean firstOpen; - @Field(11) - public long versionCode = Integer.MIN_VALUE; - @Field(12) - public String firebaseInstanceId; - @Field(13) - private long androidId; - @Field(14) - private long instantiationTime; - @Field(15) - public int appType; - @Field(16) - private boolean adIdReportingEnabled; - @Field(17) - public boolean ssaidCollectionEnabled = true; - @Field(18) - public boolean deferredAnalyticsCollection; - @Field(19) - public String admobAppId; - @Field(21) - public Boolean allowAdPersonalization; - @Field(22) - private long dynamiteVersion; - @Field(23) - public List safelistedEvents; - @Field(24) - public String gaAppId; - @Field(25) - private String consentSettings; - @Field(26) - public String ephemeralAppInstanceId; - @Field(27) - private String sessionStitchingToken; - @Field(28) - private boolean sgtmUploadEnabled; - @Field(29) - private long targetOsVersion; - @Field(30) - private int consentSource; - @Field(31) - private String dmaConsent; - @Field(32) - private int adServicesVersion; - - public String toString() { - return "AppMetadata[" + packageName + "]"; - } - - public static final Creator CREATOR = new AutoCreator<>(AppMetadata.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/people/internal/ParcelableLoadImageOptions.java b/play-services-api/src/main/java/com/google/android/gms/people/internal/ParcelableLoadImageOptions.java deleted file mode 100644 index 64322959..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/people/internal/ParcelableLoadImageOptions.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.people.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ParcelableLoadImageOptions extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator<>(ParcelableLoadImageOptions.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/people/model/AccountMetadata.java b/play-services-api/src/main/java/com/google/android/gms/people/model/AccountMetadata.java deleted file mode 100644 index dfb64544..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/people/model/AccountMetadata.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.people.model; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class AccountMetadata extends AutoSafeParcelable { - - public static Creator CREATOR = new AutoCreator<>(AccountMetadata.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/people/model/AvatarReference.java b/play-services-api/src/main/java/com/google/android/gms/people/model/AvatarReference.java deleted file mode 100644 index 6e3da8e2..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/people/model/AvatarReference.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.people.model; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class AvatarReference extends AutoSafeParcelable { - - public static final Creator CREATOR = new AutoCreator<>(AvatarReference.class); - - public AvatarReference() { - } -} diff --git a/play-services-api/src/main/java/com/google/android/gms/phenotype/RegistrationInfo.java b/play-services-api/src/main/java/com/google/android/gms/phenotype/RegistrationInfo.java deleted file mode 100644 index 7b9f6cd1..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/phenotype/RegistrationInfo.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.phenotype; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class RegistrationInfo extends AutoSafeParcelable { - @Field(1) - public String packageName; - @Field(2) - public int version; - @Field(3) - public String[] field3; - @Field(4) - public byte[] field4; - @Field(5) - public boolean weak; - @Field(6) - public int[] field6; - @Field(7) - public String clientPackageName; - - public static final Creator CREATOR = new AutoCreator<>(RegistrationInfo.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/potokens/PoToken.java b/play-services-api/src/main/java/com/google/android/gms/potokens/PoToken.java deleted file mode 100644 index 9f5a3f4c..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/potokens/PoToken.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.potokens; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class PoToken extends AutoSafeParcelable { - - @Field(1) - public byte[] data; - - public PoToken(byte[] data) { - this.data = data; - } - - public static Creator CREATOR = findCreator(PoToken.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/pseudonymous/PseudonymousIdToken.java b/play-services-api/src/main/java/com/google/android/gms/pseudonymous/PseudonymousIdToken.java deleted file mode 100644 index 18df15cb..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/pseudonymous/PseudonymousIdToken.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.pseudonymous; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -@SafeParcelable.Class -public class PseudonymousIdToken extends AbstractSafeParcelable { - - @Field(2) - public String name; - - @Constructor - public PseudonymousIdToken(@Param(2) String name) { - this.name = name; - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(PseudonymousIdToken.class); - -} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.java deleted file mode 100644 index 65ee1379..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/semanticlocation/SemanticLocationEventRequest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ -package com.google.android.gms.semanticlocation; - - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -@SafeParcelable.Class -public class SemanticLocationEventRequest extends AbstractSafeParcelable { - @Field(1) - public final float position; - - @Constructor - public SemanticLocationEventRequest(@Param(1) float position) { - this.position = position; - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SemanticLocationEventRequest.class); -} diff --git a/play-services-api/src/main/java/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.java b/play-services-api/src/main/java/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.java deleted file mode 100644 index 3dc753eb..00000000 --- a/play-services-api/src/main/java/com/google/android/gms/semanticlocation/internal/SemanticLocationParameters.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ -package com.google.android.gms.semanticlocation.internal; - -import android.accounts.Account; -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -@SafeParcelable.Class -public class SemanticLocationParameters extends AbstractSafeParcelable { - @Field(1) - public final Account account; - @Field(2) - public final String clientIdentifier; - @Field(3) - public final String packageName; - - @Constructor - public SemanticLocationParameters(@Param(1) Account account, @Param(2) String clientIdentifier, @Param(3) String packageName) { - this.account = account; - this.clientIdentifier = clientIdentifier; - this.packageName = packageName; - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SemanticLocationParameters.class); - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } -} diff --git a/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/AppInviteActivity.kt b/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/AppInviteActivity.kt deleted file mode 100644 index 526f10b1..00000000 --- a/play-services-appinvite/core/src/main/kotlin/org/microg/gms/appinivite/AppInviteActivity.kt +++ /dev/null @@ -1,185 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.appinivite - -import android.content.Intent -import android.net.Uri -import android.os.Build.VERSION.SDK_INT -import android.os.Bundle -import android.os.LocaleList -import android.util.Log -import android.view.ViewGroup -import android.view.Window -import android.widget.ProgressBar -import androidx.appcompat.app.AppCompatActivity -import androidx.core.content.pm.PackageInfoCompat -import androidx.core.os.bundleOf -import androidx.core.view.setPadding -import androidx.lifecycle.lifecycleScope -import com.android.volley.* -import com.android.volley.toolbox.Volley -import com.squareup.wire.Message -import com.squareup.wire.ProtoAdapter -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" - -private const val APPINVITE_DEEP_LINK = "com.google.android.gms.appinvite.DEEP_LINK" -private const val APPINVITE_INVITATION_ID = "com.google.android.gms.appinvite.INVITATION_ID" -private const val APPINVITE_OPENED_FROM_PLAY_STORE = "com.google.android.gms.appinvite.OPENED_FROM_PLAY_STORE" -private const val APPINVITE_REFERRAL_BUNDLE = "com.google.android.gms.appinvite.REFERRAL_BUNDLE" - -class AppInviteActivity : AppCompatActivity() { - private val queue by lazy { singleInstanceOf { Volley.newRequestQueue(applicationContext) } } - - private val Int.px: Int get() = (this * resources.displayMetrics.density).toInt() - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - requestWindowFeature(Window.FEATURE_NO_TITLE) - setContentView(ProgressBar(this).apply { - layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT) - setPadding(20.px) - isIndeterminate = true - }) - val extras = intent.extras - extras?.keySet() - Log.d(TAG, "Intent: $intent $extras") - if (intent?.data == null) return finish() - lifecycleScope.launchWhenStarted { run() } - } - - private fun redirectToBrowser() { - try { - startActivity(Intent(Intent.ACTION_VIEW).apply { - addCategory(Intent.CATEGORY_DEFAULT) - data = intent.data - }) - } catch (e: Exception) { - Log.w(TAG, e) - } - finish() - } - - private fun open(appInviteLink: MutateAppInviteLinkResponse) { - val intent = Intent(Intent.ACTION_VIEW).apply { - addCategory(Intent.CATEGORY_DEFAULT) - data = appInviteLink.data_?.intentData?.let { Uri.parse(it) } - `package` = appInviteLink.data_?.packageName - flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP - putExtra( - APPINVITE_REFERRAL_BUNDLE, bundleOf( - APPINVITE_DEEP_LINK to appInviteLink, - APPINVITE_INVITATION_ID to "", - APPINVITE_OPENED_FROM_PLAY_STORE to false - ) - ) - } - val fallbackIntent = Intent(Intent.ACTION_VIEW).apply { - addCategory(Intent.CATEGORY_DEFAULT) - data = appInviteLink.data_?.fallbackUrl?.let { Uri.parse(it) } - } - val installedVersionCode = runCatching { - intent.resolveActivity(packageManager)?.let { - PackageInfoCompat.getLongVersionCode(packageManager.getPackageInfo(it.packageName, 0)) - } - }.getOrNull() - if (installedVersionCode != null && (appInviteLink.data_?.app?.minAppVersion == null || installedVersionCode >= appInviteLink.data_.app.minAppVersion)) { - startActivity(intent) - finish() - } else { - try { - startActivity(fallbackIntent) - } catch (e: Exception) { - Log.w(TAG, e) - } - finish() - } - } - - private suspend fun run() { - val request = ProtobufPostRequest( - "https://datamixer-pa.googleapis.com/v1/mutateonekey?alt=proto&key=AIzaSyAP-gfH3qvi6vgHZbSYwQ_XHqV_mXHhzIk", MutateOperation( - id = MutateOperationId.AppInviteLink, - mutateRequest = MutateDataRequest( - appInviteLink = MutateAppInviteLinkRequest( - client = ClientIdInfo( - packageName = Constants.GMS_PACKAGE_NAME, - signature = Constants.GMS_PACKAGE_SIGNATURE_SHA1.decodeHex().base64(), - language = Locale.getDefault().language - ), - link = LinkInfo( - empty = "", - uri = intent.data.toString() - ), - system = SystemInfo( - gms = SystemInfo.GmsInfo( - versionCode = Constants.GMS_VERSION_CODE - ) - ) - ) - ) - ), MutateDataResponseWithError.ADAPTER - ) - val response = try { - request.sendAndAwait(queue) - } catch (e: Exception) { - Log.w(TAG, e) - return redirectToBrowser() - } - if (response.errorStatus != null || response.dataResponse?.appInviteLink == null) return redirectToBrowser() - open(response.dataResponse.appInviteLink) - } -} - -class ProtobufPostRequest, O>(url: String, private val i: I, private val oAdapter: ProtoAdapter) : - Request(Method.POST, url, null) { - private val deferred = CompletableDeferred() - - override fun getHeaders(): Map { - val headers = HashMap(super.getHeaders()) - headers["Accept-Language"] = if (SDK_INT >= 24) LocaleList.getDefault().toLanguageTags() else Locale.getDefault().language - headers["X-Android-Package"] = Constants.GMS_PACKAGE_NAME - headers["X-Android-Cert"] = Constants.GMS_PACKAGE_SIGNATURE_SHA1 - return headers - } - - override fun getBody(): ByteArray = i.encode() - - override fun getBodyContentType(): String = "application/x-protobuf" - - override fun parseNetworkResponse(response: NetworkResponse): Response { - try { - return Response.success(oAdapter.decode(response.data), null) - } catch (e: VolleyError) { - return Response.error(e) - } catch (e: Exception) { - return Response.error(VolleyError()) - } - } - - override fun deliverResponse(response: O) { - Log.d(TAG, "Got response: $response") - deferred.complete(response) - } - - override fun deliverError(error: VolleyError) { - deferred.completeExceptionally(error) - } - - suspend fun await(): O = deferred.await() - - suspend fun sendAndAwait(queue: RequestQueue): O { - Log.d(TAG, "Sending request: $i") - queue.add(this) - return await() - } -} \ No newline at end of file diff --git a/play-services-appset/build.gradle b/play-services-appset/build.gradle deleted file mode 100644 index cb838e7e..00000000 --- a/play-services-appset/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -apply plugin: 'com.android.library' - -android { - namespace "com.google.android.gms.appset" - - compileSdkVersion androidCompileSdk - buildToolsVersion "$androidBuildVersionTools" - - buildFeatures { - aidl = true - } - - defaultConfig { - versionName version - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } -} - -description = 'microG implementation of play-services-appset' - -dependencies { - api project(':play-services-base') - api project(':play-services-basement') - - annotationProcessor project(':safe-parcel-processor') -} diff --git a/play-services-appset/core/build.gradle b/play-services-appset/core/build.gradle deleted file mode 100644 index c6017e1a..00000000 --- a/play-services-appset/core/build.gradle +++ /dev/null @@ -1,56 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'maven-publish' -apply plugin: 'signing' - -dependencies { - api project(':play-services-appset') - - implementation project(':play-services-base-core') - - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion" -} - -android { - namespace "org.microg.gms.appset.core" - - compileSdkVersion androidCompileSdk - buildToolsVersion "$androidBuildVersionTools" - - defaultConfig { - versionName version - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - sourceSets { - main { - java.srcDirs = ['src/main/kotlin'] - } - } - - lintOptions { - disable 'MissingTranslation' - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } - - kotlinOptions { - jvmTarget = 1.8 - } -} - -// Nothing to publish yet -//apply from: '../gradle/publish-android.gradle' - -description = 'microG service implementation for play-services-appset' diff --git a/play-services-appset/core/src/main/AndroidManifest.xml b/play-services-appset/core/src/main/AndroidManifest.xml deleted file mode 100644 index 0df43222..00000000 --- a/play-services-appset/core/src/main/AndroidManifest.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - diff --git a/play-services-appset/core/src/main/kotlin/org/microg/gms/appset/AppSetService.kt b/play-services-appset/core/src/main/kotlin/org/microg/gms/appset/AppSetService.kt deleted file mode 100644 index 72e20682..00000000 --- a/play-services-appset/core/src/main/kotlin/org/microg/gms/appset/AppSetService.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.appset - -import android.util.Log -import com.google.android.gms.appset.AppSetIdInfo -import com.google.android.gms.appset.AppSetIdRequestParams -import com.google.android.gms.appset.AppSetInfoParcel -import com.google.android.gms.appset.internal.IAppSetIdCallback -import com.google.android.gms.appset.internal.IAppSetService -import com.google.android.gms.common.ConnectionResult -import com.google.android.gms.common.Feature -import com.google.android.gms.common.api.Status -import com.google.android.gms.common.internal.ConnectionInfo -import com.google.android.gms.common.internal.GetServiceRequest -import com.google.android.gms.common.internal.IGmsCallbacks -import org.microg.gms.BaseService -import org.microg.gms.common.GmsService - -private const val TAG = "AppSetService" -private val FEATURES = arrayOf(Feature("app_set_id", 1L)) - -class AppSetService : BaseService(TAG, GmsService.APP_SET) { - - override fun handleServiceRequest(callback: IGmsCallbacks?, request: GetServiceRequest?, service: GmsService?) { - callback?.onPostInitCompleteWithConnectionInfo( - ConnectionResult.SUCCESS, - AppSetServiceImpl().asBinder(), - ConnectionInfo().apply { features = FEATURES } - ) - } -} - -class AppSetServiceImpl : IAppSetService.Stub() { - override fun getAppSetIdInfo(params: AppSetIdRequestParams?, callback: IAppSetIdCallback?) { - Log.d(TAG, "AppSetServiceImp getAppSetIdInfo is called -> ${params?.toString()} ") - callback?.onAppSetInfo(Status.SUCCESS, AppSetInfoParcel("", AppSetIdInfo.SCOPE_APP)) - } -} diff --git a/play-services-appset/src/main/AndroidManifest.xml b/play-services-appset/src/main/AndroidManifest.xml deleted file mode 100644 index 8bdb7e14..00000000 --- a/play-services-appset/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetIdRequestParams.aidl b/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetIdRequestParams.aidl deleted file mode 100644 index 5beef708..00000000 --- a/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetIdRequestParams.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.appset; - -parcelable AppSetIdRequestParams; diff --git a/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetInfoParcel.aidl b/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetInfoParcel.aidl deleted file mode 100644 index c2d4818a..00000000 --- a/play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetInfoParcel.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.appset; - -parcelable AppSetInfoParcel; diff --git a/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetIdCallback.aidl b/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetIdCallback.aidl deleted file mode 100644 index 1b453de3..00000000 --- a/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetIdCallback.aidl +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.appset.internal; - -import com.google.android.gms.appset.AppSetInfoParcel; -import com.google.android.gms.common.api.Status; - -interface IAppSetIdCallback { - void onAppSetInfo(in Status status, in AppSetInfoParcel info) = 0; -} \ No newline at end of file diff --git a/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetService.aidl b/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetService.aidl deleted file mode 100644 index 59dbb6f9..00000000 --- a/play-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetService.aidl +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.appset.internal; - -import com.google.android.gms.appset.AppSetIdRequestParams; -import com.google.android.gms.appset.internal.IAppSetIdCallback; - -interface IAppSetService { - void getAppSetIdInfo(in AppSetIdRequestParams params, in IAppSetIdCallback callback) = 0; -} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSet.java b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSet.java deleted file mode 100644 index f3616527..00000000 --- a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSet.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.appset; - -import android.content.Context; -import androidx.annotation.NonNull; - -/** - * Entry point of the app set APIs. - */ -public class AppSet { - /** - * Creates a new instance of {@link AppSetIdClient}. - */ - @NonNull - public static AppSetIdClient getClient (Context context) { - throw new UnsupportedOperationException(); - } -} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdClient.java b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdClient.java deleted file mode 100644 index 91b6a671..00000000 --- a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdClient.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.appset; - -import androidx.annotation.NonNull; -import com.google.android.gms.tasks.Task; - -/** - * A client for interacting with the {@link AppSetIdInfo} API. - */ -public interface AppSetIdClient { - /** - * Gets the AppSetIdInfo asynchronously. - * - * @return a {@link Task} of the returned {@link AppSetIdInfo}. - */ - @NonNull - Task getAppSetIdInfo(); -} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdInfo.java b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdInfo.java deleted file mode 100644 index 29608f5f..00000000 --- a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdInfo.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.appset; - -import androidx.annotation.IntDef; -import org.microg.gms.common.Hide; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Contains information about app set ID. - */ -public class AppSetIdInfo { - /** - * The app set ID is scoped to the app. - */ - public static final int SCOPE_APP = 1; - /** - * The app set ID is scoped to a developer account on an app store. All apps from the same developer on a device will have - * the same developer scoped app set ID. - */ - public static final int SCOPE_DEVELOPER = 2; - - private final String id; - private final @Scope int scope; - - @Hide - public AppSetIdInfo(String id, @Scope int scope) { - this.id = id; - this.scope = scope; - } - - /** - * Gets the app set ID. - * - * @return the app set ID. - */ - public String getId() { - return id; - } - - /** - * Returns the {@link AppSetIdInfo.Scope} of the app set ID. Possible values include {@link #SCOPE_APP} and {@link #SCOPE_DEVELOPER}. - * - * @return the app set ID's {@link AppSetIdInfo.Scope}. - */ - public @Scope int getScope() { - return scope; - } - - /** - * Allowed constants for {@link AppSetIdInfo#getScope()}. - *

- * Supported constants: - *

    - *
  • {@link #SCOPE_APP}
  • - *
  • {@link #SCOPE_DEVELOPER}
  • - *
- */ - @Target({ElementType.TYPE_USE}) - @Retention(RetentionPolicy.SOURCE) - @IntDef({SCOPE_APP, SCOPE_DEVELOPER}) - public @interface Scope { - - } -} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdRequestParams.java b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdRequestParams.java deleted file mode 100644 index 2bc9b0d0..00000000 --- a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdRequestParams.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.appset; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -import org.microg.gms.common.Hide; -import org.microg.gms.utils.ToStringHelper; - -@SafeParcelable.Class -@Hide -public class AppSetIdRequestParams extends AbstractSafeParcelable { - @Field(1) - public final String version; - @Field(2) - public final String clientAppPackageName; - - @Constructor - public AppSetIdRequestParams(@Param(1) String version, @Param(2) String clientAppPackageName) { - this.version = version; - this.clientAppPackageName = clientAppPackageName; - } - - @NonNull - @Override - public String toString() { - return ToStringHelper.name("AppSetIdRequestParams").field("version", version).field("clientAppPackageName", clientAppPackageName).end(); - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(AppSetIdRequestParams.class); -} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetInfoParcel.java b/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetInfoParcel.java deleted file mode 100644 index dd47b947..00000000 --- a/play-services-appset/src/main/java/com/google/android/gms/appset/AppSetInfoParcel.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.appset; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; -import org.microg.gms.common.Hide; - -@SafeParcelable.Class -@Hide -public class AppSetInfoParcel extends AbstractSafeParcelable { - @Field(1) - public final String id; - @Field(2) - public final int scope; - - @Constructor - public AppSetInfoParcel(@Param(1) String id, @Param(2) int scope) { - this.id = id; - this.scope = scope; - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(AppSetInfoParcel.class); - -} diff --git a/play-services-appset/src/main/java/com/google/android/gms/appset/package-info.java b/play-services-appset/src/main/java/com/google/android/gms/appset/package-info.java deleted file mode 100644 index e9ab491d..00000000 --- a/play-services-appset/src/main/java/com/google/android/gms/appset/package-info.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: CC-BY-4.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ -/** - * For analytics or fraud prevention use cases, on a given device you may - need to correlate usage or actions across a set of apps owned by your organization. - */ -package com.google.android.gms.appset; diff --git a/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverCore.kt b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverCore.kt deleted file mode 100644 index 14096e4e..00000000 --- a/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverCore.kt +++ /dev/null @@ -1,353 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.auth.phone - -import android.Manifest.permission.READ_CONTACTS -import android.Manifest.permission.RECEIVE_SMS -import android.annotation.TargetApi -import android.app.Activity -import android.app.AlarmManager -import android.app.PendingIntent -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import android.content.IntentFilter -import android.content.pm.PackageManager.PERMISSION_GRANTED -import android.os.* -import android.os.Build.VERSION.SDK_INT -import android.provider.ContactsContract -import android.provider.ContactsContract.CommonDataKinds.Phone -import android.provider.Telephony -import android.telephony.SmsMessage -import android.text.TextUtils -import android.util.Base64 -import android.util.Log -import androidx.core.app.PendingIntentCompat -import androidx.core.content.ContextCompat -import androidx.core.os.bundleOf -import androidx.lifecycle.DefaultLifecycleObserver -import androidx.lifecycle.Lifecycle -import androidx.lifecycle.LifecycleOwner -import com.google.android.gms.auth.api.phone.SmsRetriever -import com.google.android.gms.common.api.CommonStatusCodes -import com.google.android.gms.common.api.Status -import kotlinx.coroutines.CompletableDeferred -import kotlinx.coroutines.Deferred -import kotlinx.coroutines.sync.Mutex -import kotlinx.coroutines.sync.withLock -import org.microg.gms.auth.phone.SmsRetrieverRequestType.RETRIEVER -import org.microg.gms.auth.phone.SmsRetrieverRequestType.USER_CONSENT -import org.microg.gms.common.Constants -import org.microg.gms.utils.getSignatures -import java.nio.charset.StandardCharsets -import java.security.MessageDigest -import java.util.concurrent.atomic.AtomicInteger - - -private const val TAG = "SmsRetrieverCore" - -private const val ACTION_SMS_RETRIEVE_TIMEOUT = "org.microg.gms.auth.phone.ACTION_SMS_RETRIEVE_TIMEOUT" -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, override val lifecycle: Lifecycle) : LifecycleOwner, DefaultLifecycleObserver { - private val requests: HashMap = hashMapOf() - private val requestIdCounter = AtomicInteger(0) - private lateinit var timeoutBroadcastReceiver: BroadcastReceiver - private lateinit var smsBroadcastReceiver: BroadcastReceiver - private var requestCode = 0 - private val alarmManager: AlarmManager - get() = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager - - init { - lifecycle.addObserver(this) - } - - @TargetApi(19) - private fun configureBroadcastListenersIfNeeded() { - synchronized(this) { - if (!this::timeoutBroadcastReceiver.isInitialized) { - val intentFilter = IntentFilter(ACTION_SMS_RETRIEVE_TIMEOUT) - timeoutBroadcastReceiver = TimeoutReceiver() - ContextCompat.registerReceiver(context, timeoutBroadcastReceiver, intentFilter, ContextCompat.RECEIVER_NOT_EXPORTED) - } - if (!this::smsBroadcastReceiver.isInitialized) { - val intentFilter = IntentFilter(Telephony.Sms.Intents.SMS_RECEIVED_ACTION) - intentFilter.priority = 999 - smsBroadcastReceiver = SmsReceiver() - context.registerReceiver(smsBroadcastReceiver, intentFilter) - } - } - } - - private suspend fun ensureReady(permissions: Array): Boolean { - if (SDK_INT < 19) throw RuntimeException("Version not supported") - if (!ensurePermission(permissions)) return false - configureBroadcastListenersIfNeeded() - return true - } - - suspend fun startSmsRetriever(packageName: String) { - val appHashString = getHashString(packageName) - - if (!ensureReady(arrayOf(RECEIVE_SMS))) - throw RuntimeException("Initialization failed") - if (anyOtherPackageHasHashString(packageName, appHashString)) - throw RuntimeException("Collision in hash string, can't use SMS Retriever API") - if (requests.values.any { it.packageName == packageName && it.appHashString == appHashString && it.type == RETRIEVER }) - throw RuntimeException("App already listening") - - val request = SmsRetrieverRequest( - id = requestIdCounter.incrementAndGet(), - type = RETRIEVER, - packageName = packageName, - appHashString = appHashString, - timeoutPendingIntent = getTimeoutPendingIntent(context, packageName) - ) - requests[request.id] = request - alarmManager.set(AlarmManager.RTC, request.creation + TIMEOUT, request.timeoutPendingIntent) - } - - suspend fun startWithConsentPrompt(packageName: String, senderPhoneNumber: String?) { - if (!ensureReady(arrayOf(RECEIVE_SMS, READ_CONTACTS))) - throw RuntimeException("Initialization failed") - if (requests.values.any { it.packageName == packageName && it.senderPhoneNumber == senderPhoneNumber && it.type == USER_CONSENT }) - throw RuntimeException("App already listening") - - val request = SmsRetrieverRequest( - id = requestIdCounter.incrementAndGet(), - type = USER_CONSENT, - packageName = packageName, - senderPhoneNumber = senderPhoneNumber, - timeoutPendingIntent = getTimeoutPendingIntent(context, packageName) - ) - requests[request.id] = request - alarmManager.set(AlarmManager.RTC, request.creation + TIMEOUT, request.timeoutPendingIntent) - } - - fun hasOngoingUserConsentRequest(): Boolean { - return requests.values.any { it.type == USER_CONSENT } - } - - private fun sendRetrieverBroadcast(request: SmsRetrieverRequest, message: SmsMessage) { - sendReply(request, Status.SUCCESS, bundleOf(SmsRetriever.EXTRA_SMS_MESSAGE to message.messageBody)) - } - - private fun sendUserConsentBroadcast(request: SmsRetrieverRequest, message: SmsMessage) { - val userConsentIntent = Intent(context, UserConsentPromptActivity::class.java) - userConsentIntent.setPackage(Constants.GMS_PACKAGE_NAME) - userConsentIntent.putExtra(EXTRA_MESSENGER, Messenger(object : Handler(Looper.getMainLooper()) { - override fun handleMessage(msg: Message) { - if (Binder.getCallingUid() == Process.myUid()) { - if (msg.what == MSG_REQUEST_MESSAGE_BODY) { - msg.replyTo?.send(Message.obtain().apply { - what = 1 - data = bundleOf("message" to message.messageBody) - }) - } else if (msg.what == MSG_CONSUME_MESSAGE) { - finishRequest(request) - } - } - } - })) - - sendReply(request, Status.SUCCESS, bundleOf(SmsRetriever.EXTRA_CONSENT_INTENT to userConsentIntent), false) - } - - private fun getTimeoutPendingIntent(context: Context, packageName: String): PendingIntent { - val intent = Intent(ACTION_SMS_RETRIEVE_TIMEOUT) - intent.setPackage(packageName) - return PendingIntentCompat.getBroadcast(context, ++requestCode, intent, 0, false)!! - } - - private fun tryHandleIncomingMessageAsRetrieverMessage(message: SmsMessage): Boolean { - for (request in requests.values) { - if (request.type == RETRIEVER) { - // 11-digit hash code that uniquely identifies your app - if (request.appHashString.isNullOrBlank() || !message.messageBody.contains(request.appHashString)) continue - - sendRetrieverBroadcast(request, message) - return true - } - } - return false - } - - private fun tryHandleIncomingMessageAsUserConsentMessage(message: SmsMessage): Boolean { - val senderPhoneNumber = message.originatingAddress ?: return false - - // 4-10 digit alphanumeric code containing at least one number - if (message.messageBody.split("[^A-Za-z0-9]".toRegex()).none { it.length in 4..10 && it.any(Char::isDigit) }) return false - - // Sender cannot be in the user's Contacts list - if (isPhoneNumberInContacts(context, senderPhoneNumber)) return false - - for (request in requests.values) { - if (request.type == USER_CONSENT) { - if (!request.senderPhoneNumber.isNullOrBlank() && request.senderPhoneNumber != senderPhoneNumber) continue - - sendUserConsentBroadcast(request, message) - return true - } - } - return false - } - - private fun handleIncomingSmsMessage(message: SmsMessage) { - if (message.messageBody.isNullOrBlank()) return - if (message.messageBody.length > MESSAGE_MAX_LEN) return - - if (tryHandleIncomingMessageAsRetrieverMessage(message)) return - if (tryHandleIncomingMessageAsUserConsentMessage(message)) return - } - - fun handleTimeout(requestId: Int) { - val request = requests[requestId] ?: return - sendReply(request, Status(CommonStatusCodes.TIMEOUT)) - } - - private fun sendReply(request: SmsRetrieverRequest, status: Status, extras: Bundle = Bundle.EMPTY, finish: Boolean = true) { - Log.d(TAG, "Send reply to ${request.packageName} ${CommonStatusCodes.getStatusCodeString(status.statusCode)}") - - val intent = Intent(SmsRetriever.SMS_RETRIEVED_ACTION) - intent.setPackage(request.packageName) - intent.putExtras(extras) - intent.putExtra(SmsRetriever.EXTRA_STATUS, status) - context.sendBroadcast(intent) - - if (finish) finishRequest(request) - } - - fun finishRequest(request: SmsRetrieverRequest) { - alarmManager.cancel(request.timeoutPendingIntent) - requests.remove(request.id) - } - - override fun onDestroy(owner: LifecycleOwner) { - super.onDestroy(owner) - - if (this::smsBroadcastReceiver.isInitialized) context.unregisterReceiver(smsBroadcastReceiver) - if (this::timeoutBroadcastReceiver.isInitialized) context.unregisterReceiver(timeoutBroadcastReceiver) - - for (request in requests.values) { - sendReply(request, Status(CommonStatusCodes.TIMEOUT)) - } - - requests.clear() - } - - @TargetApi(19) - private inner class SmsReceiver : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - if (Telephony.Sms.Intents.SMS_RECEIVED_ACTION == intent.action) { - val messages = Telephony.Sms.Intents.getMessagesFromIntent(intent) - for (message in messages) { - try { - handleIncomingSmsMessage(message) - } catch (e: Exception) { - Log.w(TAG, "Error handling incoming SMS", e) - } - } - } - } - } - - private inner class TimeoutReceiver : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - val requestId = intent.getIntExtra(EXTRA_REQUEST_ID, -1) - if (requestId != -1) { - handleTimeout(requestId) - } - } - } - - @TargetApi(19) - fun getHashString(packageName: String): String { - val signature = - context.packageManager.getSignatures(packageName).firstOrNull()?.toCharsString() ?: throw RuntimeException("No signature found for $packageName") - val appInfo = "$packageName $signature" - val messageDigest = MessageDigest.getInstance("SHA-256") - messageDigest.update(appInfo.toByteArray(StandardCharsets.UTF_8)) - return Base64.encodeToString(messageDigest.digest(), Base64.NO_PADDING or Base64.NO_WRAP).substring(0, 11) - } - - private fun anyOtherPackageHasHashString(packageName: String, hashString: String): Boolean { - val collision = context.packageManager.getInstalledPackages(0) - .firstOrNull { it.packageName != packageName && getHashString(it.packageName) == hashString } ?: return false - - Log.w(TAG, "Hash string collision between $packageName and ${collision.packageName} (both are $hashString)") - return true - } - - private fun isPhoneNumberInContacts(context: Context, phoneNumber: String): Boolean { - fun normalizePhoneNumber(input: String): String { - var output = "" - if (!TextUtils.isEmpty(input)) { - // only keep digits - val temp = input.replace("[^0-9]".toRegex(), "") - // trim leading zeroes - output = temp.replaceFirst("^0*".toRegex(), "") - } - return output - } - - val normalizePhoneNumber = normalizePhoneNumber(phoneNumber) - val cursor = context.contentResolver.query(Phone.CONTENT_URI, arrayOf(Phone.NUMBER), null, null, null) ?: return false - try { - while (cursor.moveToNext()) { - val addressIndex = cursor.getColumnIndex(Phone.NUMBER) - val contactPhoneNumber = normalizePhoneNumber(cursor.getString(addressIndex)) - if (normalizePhoneNumber == contactPhoneNumber) { - return true - } - } - } catch (e: Exception) { - Log.w(TAG, e) - } finally { - cursor.close() - } - return false - } - - private val activePermissionRequestLock = Mutex() - private var activePermissionRequest: Deferred? = null - - private suspend fun ensurePermission(permissions: Array): Boolean { - if (SDK_INT < 23) - return true - - if (permissions.all { ContextCompat.checkSelfPermission(context, it) == PERMISSION_GRANTED }) - return true - - val (completable, deferred) = activePermissionRequestLock.withLock { - if (activePermissionRequest == null) { - val completable = CompletableDeferred() - activePermissionRequest = completable - completable to activePermissionRequest!! - } else { - null to activePermissionRequest!! - } - } - if (completable != null) { - val intent = Intent(context, AskPermissionActivity::class.java) - intent.putExtra(EXTRA_MESSENGER, Messenger(object : Handler(Looper.getMainLooper()) { - override fun handleMessage(msg: Message) { - if (msg.what == Activity.RESULT_OK) { - val grantResults = msg.data?.getIntArray(EXTRA_GRANT_RESULTS) ?: IntArray(0) - completable.complete(grantResults.size == permissions.size && grantResults.all { it == PERMISSION_GRANTED }) - } else { - completable.complete(false) - } - } - })) - intent.putExtra(EXTRA_PERMISSIONS, permissions) - intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK - context.startActivity(intent) - } - return deferred.await() - } -} \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverService.kt b/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverService.kt deleted file mode 100644 index 76fe5359..00000000 --- a/play-services-auth-api-phone/core/src/main/kotlin/org/microg/gms/auth/phone/SmsRetrieverService.kt +++ /dev/null @@ -1,131 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.auth.phone - -import android.util.Log -import androidx.lifecycle.Lifecycle -import androidx.lifecycle.LifecycleOwner -import androidx.lifecycle.lifecycleScope -import com.google.android.gms.auth.api.phone.SmsRetrieverStatusCodes -import com.google.android.gms.auth.api.phone.internal.IAutofillPermissionStateCallback -import com.google.android.gms.auth.api.phone.internal.IOngoingSmsRequestCallback -import com.google.android.gms.auth.api.phone.internal.ISmsRetrieverApiService -import com.google.android.gms.auth.api.phone.internal.ISmsRetrieverResultCallback -import com.google.android.gms.common.Feature -import com.google.android.gms.common.api.CommonStatusCodes -import com.google.android.gms.common.api.Status -import com.google.android.gms.common.api.internal.IStatusCallback -import com.google.android.gms.common.internal.ConnectionInfo -import com.google.android.gms.common.internal.GetServiceRequest -import com.google.android.gms.common.internal.IGmsCallbacks -import org.microg.gms.BaseService -import org.microg.gms.common.GmsService -import org.microg.gms.common.PackageUtils - - -private const val TAG = "SmsRetrieverService" -private val FEATURES = arrayOf( - Feature("sms_retrieve", 1), - Feature("user_consent", 3) -) - -class SmsRetrieverService : BaseService(TAG, GmsService.SMS_RETRIEVER) { - private val smsRetriever = SmsRetrieverCore(this, lifecycle) - - override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) { - val packageName = PackageUtils.getAndCheckCallingPackage(this, request.packageName) - ?: throw IllegalArgumentException("Missing package name") - callback.onPostInitCompleteWithConnectionInfo( - CommonStatusCodes.SUCCESS, - SmsRetrieverServiceImpl(smsRetriever, packageName, lifecycle), - ConnectionInfo().apply { features = FEATURES } - ) - } -} - - -class SmsRetrieverServiceImpl(private val smsRetriever: SmsRetrieverCore, private val packageName: String, override val lifecycle: Lifecycle) : - ISmsRetrieverApiService.Stub(), LifecycleOwner { - - override fun startSmsRetriever(callback: ISmsRetrieverResultCallback) { - Log.d(TAG, "startSmsRetriever()") - lifecycleScope.launchWhenStarted { - val status = try { - smsRetriever.startSmsRetriever(packageName) - Status.SUCCESS - } catch (e: Exception) { - Status(CommonStatusCodes.INTERNAL_ERROR, e.message) - } - try { - callback.onResult(status) - } catch (e: Exception) { - Log.w(TAG, "Failed delivering $status for startSmsRetriever()", e) - } - } - } - - override fun startWithConsentPrompt(senderPhoneNumber: String?, callback: ISmsRetrieverResultCallback) { - Log.d(TAG, "startWithConsentPrompt($senderPhoneNumber)") - lifecycleScope.launchWhenStarted { - val status = try { - smsRetriever.startWithConsentPrompt(packageName, senderPhoneNumber) - Status.SUCCESS - } catch (e: Exception) { - Status(CommonStatusCodes.INTERNAL_ERROR, e.message) - } - try { - callback.onResult(status) - } catch (e: Exception) { - Log.w(TAG, "Failed delivering $status for startWithConsentPrompt()", e) - } - } - } - - override fun startSmsCodeAutofill(callback: IStatusCallback) { - Log.d(TAG, "startSmsCodeAutofill()") - try { - callback.onResult(Status(SmsRetrieverStatusCodes.API_NOT_AVAILABLE)) - } catch (e: Exception) { - Log.w(TAG, "Failed delivering result for startSmsCodeAutofill()", e) - } - } - - override fun checkAutofillPermissionState(callback: IAutofillPermissionStateCallback) { - Log.d(TAG, "checkAutofillPermissionState()") - try { - callback.onCheckPermissionStateResult(Status.SUCCESS, 1) - } catch (e: Exception) { - Log.w(TAG, "Failed delivering result for checkAutofillPermissionState()", e) - } - } - - override fun checkOngoingSmsRequest(packageName: String?, callback: IOngoingSmsRequestCallback) { - Log.d(TAG, "checkOngoingSmsRequest($packageName)") - lifecycleScope.launchWhenStarted { - val result = try { - smsRetriever.hasOngoingUserConsentRequest() - } catch (e: Exception) { - true - } - - try { - callback.onHasOngoingSmsRequestResult(Status.SUCCESS, result) - } catch (e: Exception) { - Log.w(TAG, "Failed delivering $result for checkOngoingSmsRequest()", e) - } - } - } - - - override fun startSmsCodeBrowser(callback: IStatusCallback) { - Log.d(TAG, "startSmsCodeBrowser()") - try { - callback.onResult(Status(SmsRetrieverStatusCodes.API_NOT_AVAILABLE)) - } catch (e: Exception) { - Log.w(TAG, "Failed delivering result for startSmsCodeBrowser()", e) - } - } -} \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/res/values-be/strings.xml b/play-services-auth-api-phone/core/src/main/res/values-be/strings.xml deleted file mode 100644 index 9ae425ad..00000000 --- a/play-services-auth-api-phone/core/src/main/res/values-be/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Дазволіць %s прачытаць паведамленне ніжэй і ўвесці код? - Дазволіць - Адхіліць - \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/res/values-de/strings.xml b/play-services-auth-api-phone/core/src/main/res/values-de/strings.xml deleted file mode 100644 index ca6ebacf..00000000 --- a/play-services-auth-api-phone/core/src/main/res/values-de/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Erlauben - Ablehnen - %s erlauben, die folgende Nachricht zu lesen und den Code einzugeben? - \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/res/values-es/strings.xml b/play-services-auth-api-phone/core/src/main/res/values-es/strings.xml deleted file mode 100644 index 28cb6c38..00000000 --- a/play-services-auth-api-phone/core/src/main/res/values-es/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - ¿Permitir que %s lean el mensaje de abajo e introduzcan el código? - Permitir - Denegar - \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/res/values-pt-rBR/strings.xml b/play-services-auth-api-phone/core/src/main/res/values-pt-rBR/strings.xml deleted file mode 100644 index 2af67da2..00000000 --- a/play-services-auth-api-phone/core/src/main/res/values-pt-rBR/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Permitir %s à ler a mensagem abaixo e inserir o código? - Permitir - Negar - \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/res/values-ru/strings.xml b/play-services-auth-api-phone/core/src/main/res/values-ru/strings.xml deleted file mode 100644 index 8857cd90..00000000 --- a/play-services-auth-api-phone/core/src/main/res/values-ru/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Разрешить %s прочитать сообщение ниже и ввести код? - Разрешить - Отклонить - \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/res/values-uk/strings.xml b/play-services-auth-api-phone/core/src/main/res/values-uk/strings.xml deleted file mode 100644 index f8b7e515..00000000 --- a/play-services-auth-api-phone/core/src/main/res/values-uk/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - Дозволити - Дозволити %s прочитати наведене нижче повідомлення та ввести код? - Відхилити - \ No newline at end of file diff --git a/play-services-auth-api-phone/core/src/main/res/values-zh-rCN/strings.xml b/play-services-auth-api-phone/core/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index 6d1cf71f..00000000 --- a/play-services-auth-api-phone/core/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 允许%s读取以下消息并输入代码吗? - 允许 - 拒绝 - \ No newline at end of file diff --git a/play-services-auth-base/src/main/aidl/com/google/android/gms/auth/firstparty/dataservice/DeviceManagementInfoResponse.aidl b/play-services-auth-base/src/main/aidl/com/google/android/gms/auth/firstparty/dataservice/DeviceManagementInfoResponse.aidl deleted file mode 100644 index 950fc2fb..00000000 --- a/play-services-auth-base/src/main/aidl/com/google/android/gms/auth/firstparty/dataservice/DeviceManagementInfoResponse.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -parcelable DeviceManagementInfoResponse; diff --git a/play-services-auth-base/src/main/java/com/google/android/gms/auth/firstparty/dataservice/DeviceManagementInfoResponse.java b/play-services-auth-base/src/main/java/com/google/android/gms/auth/firstparty/dataservice/DeviceManagementInfoResponse.java deleted file mode 100644 index bb93f63a..00000000 --- a/play-services-auth-base/src/main/java/com/google/android/gms/auth/firstparty/dataservice/DeviceManagementInfoResponse.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.firstparty.dataservice; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -@SafeParcelable.Class -public class DeviceManagementInfoResponse extends AbstractSafeParcelable { - @Field(1) - public final int versionCode; - @Field(2) - public final String info; - @Field(3) - public final boolean status; - - - @Constructor - public DeviceManagementInfoResponse(@Param(1) int versionCode, @Param(2) String info, @Param(3) boolean status) { - this.versionCode = versionCode; - this.info = info; - this.status = status; - } - - public DeviceManagementInfoResponse(String info, boolean status) { - this(1, info, status); - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(DeviceManagementInfoResponse.class); - -} diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/account/data/IAccountDataService.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/account/data/IAccountDataService.aidl deleted file mode 100644 index 2fd6c854..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/account/data/IAccountDataService.aidl +++ /dev/null @@ -1,16 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.account.data; - -import com.google.android.gms.auth.account.data.IDeviceManagementInfoCallback; -import android.accounts.Account; -import com.google.android.gms.common.api.internal.IStatusCallback; - -interface IAccountDataService { - void requestDeviceManagementInfo(in IDeviceManagementInfoCallback callback, in Account account) = 0; - void requestAccountInfo(in IStatusCallback callback, in Account account, boolean isPrimary) = 1; - void requestProfileInfo(in IStatusCallback callback, String profile) = 2; -} diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/account/data/IDeviceManagementInfoCallback.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/account/data/IDeviceManagementInfoCallback.aidl deleted file mode 100644 index 801beac3..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/account/data/IDeviceManagementInfoCallback.aidl +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.account.data; - -import com.google.android.gms.auth.firstparty.dataservice.DeviceManagementInfoResponse; -import com.google.android.gms.common.api.Status; - -interface IDeviceManagementInfoCallback { - void onResult(in Status status, in DeviceManagementInfoResponse response); -} diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/BeginSignInRequest.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/BeginSignInRequest.aidl deleted file mode 100644 index 843cdbfa..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/BeginSignInRequest.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity; - -parcelable BeginSignInRequest; \ No newline at end of file diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/BeginSignInResult.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/BeginSignInResult.aidl deleted file mode 100644 index 994924a7..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/BeginSignInResult.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity; - -parcelable BeginSignInResult; \ No newline at end of file diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.aidl deleted file mode 100644 index fc8071fc..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity; - -parcelable GetPhoneNumberHintIntentRequest; \ No newline at end of file diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.aidl deleted file mode 100644 index 69650b83..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity; - -parcelable GetSignInIntentRequest; \ No newline at end of file diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/SignInCredential.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/SignInCredential.aidl deleted file mode 100644 index d2de2746..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/SignInCredential.aidl +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity; - -parcelable SignInCredential; \ No newline at end of file diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IBeginSignInCallback.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IBeginSignInCallback.aidl deleted file mode 100644 index 41b3e006..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IBeginSignInCallback.aidl +++ /dev/null @@ -1,13 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity.internal; - -import com.google.android.gms.auth.api.identity.BeginSignInResult; -import com.google.android.gms.common.api.Status; - -interface IBeginSignInCallback { - void onResult(in Status status, in BeginSignInResult beginSignInResult); -} \ No newline at end of file diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IGetPhoneNumberHintIntentCallback.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IGetPhoneNumberHintIntentCallback.aidl deleted file mode 100644 index a07988a2..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IGetPhoneNumberHintIntentCallback.aidl +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity.internal; - -import com.google.android.gms.common.api.Status; - -interface IGetPhoneNumberHintIntentCallback { - void onResult(in Status status, in PendingIntent pendingIntent); -} \ No newline at end of file diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IGetSignInIntentCallback.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IGetSignInIntentCallback.aidl deleted file mode 100644 index ba6c5850..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/IGetSignInIntentCallback.aidl +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity.internal; - -import com.google.android.gms.common.api.Status; - -interface IGetSignInIntentCallback { - void onResult(in Status status, in PendingIntent pendingIntent); -} \ No newline at end of file diff --git a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/ISignInService.aidl b/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/ISignInService.aidl deleted file mode 100644 index cbb5bb66..00000000 --- a/play-services-auth/src/main/aidl/com/google/android/gms/auth/api/identity/internal/ISignInService.aidl +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity.internal; - -import com.google.android.gms.common.api.internal.IStatusCallback; -import com.google.android.gms.auth.api.identity.internal.IBeginSignInCallback; -import com.google.android.gms.auth.api.identity.internal.IGetSignInIntentCallback; -import com.google.android.gms.auth.api.identity.internal.IGetPhoneNumberHintIntentCallback; -import com.google.android.gms.auth.api.identity.BeginSignInRequest; -import com.google.android.gms.auth.api.identity.GetSignInIntentRequest; -import com.google.android.gms.auth.api.identity.GetPhoneNumberHintIntentRequest; - -interface ISignInService { - void beginSignIn(in IBeginSignInCallback callback, in BeginSignInRequest request) = 0; - void signOut(in IStatusCallback callback, String userId) = 1; - void getSignInIntent(in IGetSignInIntentCallback callback, in GetSignInIntentRequest request) = 2; - void getPhoneNumberHintIntent(in IGetPhoneNumberHintIntentCallback callback, in GetPhoneNumberHintIntentRequest request) = 3; -} \ No newline at end of file diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInRequest.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInRequest.java deleted file mode 100644 index f844822c..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInRequest.java +++ /dev/null @@ -1,596 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import androidx.annotation.Nullable; -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; -import com.google.android.gms.fido.fido2.api.common.PublicKeyCredentialRequestOptions; -import org.microg.gms.common.Hide; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -/** - * Configurations that can be used to filter acceptable types of credentials returned from a sign-in attempt. - */ -@SafeParcelable.Class -public class BeginSignInRequest extends AbstractSafeParcelable { - @Field(value = 1, getterName = "getPasswordRequestOptions") - private final PasswordRequestOptions passwordRequestOptions; - @Field(value = 2, getterName = "getGoogleIdTokenRequestOptions") - private final GoogleIdTokenRequestOptions googleIdTokenRequestOptions; - @Field(value = 3, getterName = "getSessionId") - private final String sessionId; - @Field(value = 4, getterName = "isAutoSelectEnabled") - private final boolean autoSelectEnabled; - @Field(value = 5, getterName = "getTheme") - private final int theme; - @Field(value = 6, getterName = "getPasskeysRequestOptions") - private final PasskeysRequestOptions passkeysRequestOptions; - @Field(value = 7, getterName = "getPasskeyJsonRequestOptions") - private final PasskeyJsonRequestOptions passkeyJsonRequestOptions; - - @Constructor - BeginSignInRequest(@Param(1) PasswordRequestOptions passwordRequestOptions, @Param(2) GoogleIdTokenRequestOptions googleIdTokenRequestOptions, @Param(3) String sessionId, @Param(4) boolean autoSelectEnabled, @Param(5) int theme, @Param(6) PasskeysRequestOptions passkeysRequestOptions, @Param(7) PasskeyJsonRequestOptions passkeyJsonRequestOptions) { - this.passwordRequestOptions = passwordRequestOptions; - this.googleIdTokenRequestOptions = googleIdTokenRequestOptions; - this.sessionId = sessionId; - this.autoSelectEnabled = autoSelectEnabled; - this.theme = theme; - this.passkeysRequestOptions = passkeysRequestOptions; - this.passkeyJsonRequestOptions = passkeyJsonRequestOptions; - } - - @NonNull - public static Builder builder() { - return new Builder(); - } - - public GoogleIdTokenRequestOptions getGoogleIdTokenRequestOptions() { - return googleIdTokenRequestOptions; - } - - public PasskeyJsonRequestOptions getPasskeyJsonRequestOptions() { - return passkeyJsonRequestOptions; - } - - public PasskeysRequestOptions getPasskeysRequestOptions() { - return passkeysRequestOptions; - } - - public PasswordRequestOptions getPasswordRequestOptions() { - return passwordRequestOptions; - } - - @Hide - public String getSessionId() { - return sessionId; - } - - @Hide - public int getTheme() { - return theme; - } - - /** - * Returns {@code true} if auto-select is requested, {@code false} otherwise. - */ - public boolean isAutoSelectEnabled() { - return autoSelectEnabled; - } - - public static class Builder { - - } - - /** - * Options for requesting Google ID token-backed credentials during sign-in. - */ - @Class - public static class GoogleIdTokenRequestOptions extends AbstractSafeParcelable { - @Field(value = 1, getterName = "isSupported") - private final boolean supported; - @Field(value = 2, getterName = "getServerClientId") - private final String serverClientId; - @Field(value = 3, getterName = "getNonce") - private final String nonce; - @Field(value = 4, getterName = "filterByAuthorizedAccounts") - private final boolean filterByAuthorizedAccounts; - @Field(value = 5, getterName = "getLinkedServiceId") - private final String linkedServiceId; - @Field(value = 6, getterName = "getIdTokenDepositionScopes") - private final List idTokenDepositionScopes; - @Field(value = 7, getterName = "requestVerifiedPhoneNumber") - private final boolean requestVerifiedPhoneNumber; - - @Hide - @Constructor - public GoogleIdTokenRequestOptions(@Param(1) boolean supported, @Param(2) String serverClientId, @Param(3) String nonce, @Param(4) boolean filterByAuthorizedAccounts, @Param(5) String linkedServiceId, @Param(6) List idTokenDepositionScopes, @Param(7) boolean requestVerifiedPhoneNumber) { - this.supported = supported; - this.serverClientId = serverClientId; - this.nonce = nonce; - this.filterByAuthorizedAccounts = filterByAuthorizedAccounts; - this.linkedServiceId = linkedServiceId; - this.idTokenDepositionScopes = idTokenDepositionScopes; - this.requestVerifiedPhoneNumber = requestVerifiedPhoneNumber; - } - - @NonNull - public static Builder builder() { - return new Builder(); - } - - public boolean filterByAuthorizedAccounts() { - return filterByAuthorizedAccounts; - } - - public List getIdTokenDepositionScopes() { - return idTokenDepositionScopes; - } - - public String getLinkedServiceId() { - return linkedServiceId; - } - - public String getNonce() { - return nonce; - } - - public String getServerClientId() { - return serverClientId; - } - - public boolean isSupported() { - return supported; - } - - /** - * @deprecated No replacement. - */ - @Deprecated - public boolean requestVerifiedPhoneNumber() { - return requestVerifiedPhoneNumber; - } - - /** - * Builder for {@link BeginSignInRequest.GoogleIdTokenRequestOptions}. - */ - public static class Builder { - private boolean supported; - @Nullable - private String serverClientId; - @Nullable - private String nonce; - private boolean filterByAuthorizedAccounts = true; - @Nullable - private String linkedServiceId; - @Nullable - private List idTokenDepositionScopes; - private boolean requestVerifiedPhoneNumber; - - /** - * Sets whether to support sign-in using Google accounts that are linked to your users' accounts. - *

- * When such a credential is selected, a Google ID token for the Google account that the selected account is linked to, will - * first be deposited to your server and then returned to you. Similar to the regular sign-in, your backend could use the ID - * token to sign the user in. Note that, the ID token deposition will only happen the first time signing in, using this credential. - * Subsequent sign-ins will not require a deposition, since the ID token will already have been associated with your user's - * account. - * - * @param linkedServiceId service ID used when linking accounts to a Google account. - * @param idTokenDepositionScopes Oauth scopes that Google will need to deposit a Google ID token to your application's backend server. This - * is optional and can be set to null. Only required if Google requires particular scopes to be able to deposit - * the ID token. - */ - public Builder associateLinkedAccounts(@NonNull String linkedServiceId, @Nullable List idTokenDepositionScopes) { - this.linkedServiceId = linkedServiceId; - this.idTokenDepositionScopes = idTokenDepositionScopes; - return this; - } - - /** - * Returns the built {@link BeginSignInRequest.GoogleIdTokenRequestOptions}. - */ - @NonNull - public GoogleIdTokenRequestOptions build() { - return new GoogleIdTokenRequestOptions(supported, serverClientId, nonce, filterByAuthorizedAccounts, linkedServiceId, idTokenDepositionScopes, requestVerifiedPhoneNumber); - } - - /** - * Sets whether to only allow the user to select from Google accounts that are already authorized to sign in to your - * application. The default value is true. - *

- * If {@code true}, the user will not be able to select any Google account that would otherwise require explicit authorization to - * share basic profile/email data with your application. This may reduce some friction in the sign-in user journey, and - * guarantees that the returned credential is for a "returning user", but limits the user's freedom to choose among all the - * Google accounts on the device. - * - * @param filterByAuthorizedAccounts whether to only allow the user to select from Google accounts that are already authorized to sign in to - * your application - */ - @NonNull - public Builder setFilterByAuthorizedAccounts(boolean filterByAuthorizedAccounts) { - this.filterByAuthorizedAccounts = filterByAuthorizedAccounts; - return this; - } - - /** - * Sets the nonce to use when generating a Google ID token. - * - * @param nonce the nonce to use during ID token generation - */ - @NonNull - public Builder setNonce(@Nullable String nonce) { - this.nonce = nonce; - return this; - } - - /** - * Sets whether to request for a verified phone number during sign-ups. - *

- * In order to use this feature, the - * {@link BeginSignInRequest.GoogleIdTokenRequestOptions#filterByAuthorizedAccounts()} field must be explicitly set - * to false, because this feature is only available during sign-ups. - * - * @deprecated No replacement. - */ - @Deprecated - @NonNull - public Builder setRequestVerifiedPhoneNumber(boolean requestVerifiedPhoneNumber) { - this.requestVerifiedPhoneNumber = requestVerifiedPhoneNumber; - return this; - } - - /** - * Sets the server's client ID to use as the audience for Google ID tokens generated during the sign-in. - * - * @param serverClientId the client ID of the server to which the ID token will be issued - */ - @NonNull - public Builder setServerClientId(@NonNull String serverClientId) { - this.serverClientId = serverClientId; - return this; - } - - /** - * Sets whether Google ID token-backed credentials should be returned by the API. - * - * @param supported whether Google ID token-backed credentials should be returned - */ - @NonNull - public Builder setSupported(boolean supported) { - this.supported = supported; - return this; - } - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof GoogleIdTokenRequestOptions)) return false; - - GoogleIdTokenRequestOptions that = (GoogleIdTokenRequestOptions) o; - - if (supported != that.supported) return false; - if (filterByAuthorizedAccounts != that.filterByAuthorizedAccounts) return false; - if (requestVerifiedPhoneNumber != that.requestVerifiedPhoneNumber) return false; - if (!Objects.equals(serverClientId, that.serverClientId)) return false; - if (!Objects.equals(nonce, that.nonce)) return false; - if (!Objects.equals(linkedServiceId, that.linkedServiceId)) return false; - return Objects.equals(idTokenDepositionScopes, that.idTokenDepositionScopes); - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{supported, serverClientId, nonce, filterByAuthorizedAccounts, linkedServiceId, idTokenDepositionScopes, requestVerifiedPhoneNumber}); - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GoogleIdTokenRequestOptions.class); - } - - /** - * Options for requesting passkeys during sign-in. - */ - @Class - public static class PasskeyJsonRequestOptions extends AbstractSafeParcelable { - @Field(value = 1, getterName = "isSupported") - private final boolean supported; - @Field(value = 2, getterName = "getRequestJson") - private final String requestJson; - - @Constructor - @Hide - public PasskeyJsonRequestOptions(@Param(1) boolean supported, @Param(2) String requestJson) { - this.supported = supported; - this.requestJson = requestJson; - } - - public static Builder builder() { - return new Builder(); - } - - public String getRequestJson() { - return requestJson; - } - - public boolean isSupported() { - return supported; - } - - /** - * Builder for {@link BeginSignInRequest.PasskeyJsonRequestOptions}. - */ - public static class Builder { - private boolean supported; - private String requestJson; - - @NonNull - public PasskeyJsonRequestOptions build() { - return new PasskeyJsonRequestOptions(supported, requestJson); - } - - /** - * Sets the {@link PublicKeyCredentialRequestOptions} in JSON format. - * - * @param requestJson the JSON formatted representation of the WebAuthn request. - */ - @NonNull - public Builder setRequestJson(@NonNull String requestJson) { - this.requestJson = requestJson; - return this; - } - - /** - * Sets whether passkey credentials should be returned by this API. - * - * @param supported whether passkey credentials should be returned - */ - @NonNull - public Builder setSupported(boolean supported) { - this.supported = supported; - return this; - } - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PasskeyJsonRequestOptions)) return false; - - PasskeyJsonRequestOptions that = (PasskeyJsonRequestOptions) o; - - if (supported != that.supported) return false; - return Objects.equals(requestJson, that.requestJson); - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{supported, requestJson}); - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(PasskeyJsonRequestOptions.class); - } - - /** - * Options for requesting passkeys during sign-in. - * - * @deprecated Use {@link BeginSignInRequest.PasskeyJsonRequestOptions} instead. - */ - @Deprecated - @Class - public static class PasskeysRequestOptions extends AbstractSafeParcelable { - @Field(value = 1, getterName = "isSupported") - private final boolean supported; - @Field(value = 2, getterName = "getChallenge") - private final byte[] challenge; - @Field(value = 3, getterName = "getRpId") - private final String rpId; - - @Constructor - @Hide - public PasskeysRequestOptions(@Param(1) boolean supported, @Param(2) byte[] challenge, @Param(3) String rpId) { - this.supported = supported; - this.challenge = challenge; - this.rpId = rpId; - } - - public static Builder builder() { - return new Builder(); - } - - public byte[] getChallenge() { - return challenge; - } - - public String getRpId() { - return rpId; - } - - public boolean isSupported() { - return supported; - } - - /** - * Builder for {@link BeginSignInRequest.PasskeysRequestOptions}. - */ - public static class Builder { - private boolean supported; - private byte[] challenge; - private String rpId; - - public PasskeysRequestOptions build() { - return new PasskeysRequestOptions(supported, challenge, rpId); - } - - /** - * Sets the nonce value that the authenticator should sign using a private key corresponding to a public key credential that - * is acceptable for this authentication session. - * - * @param challenge the challenge - */ - @NonNull - public Builder setChallenge(@NonNull byte[] challenge) { - this.challenge = challenge; - return this; - } - - /** - * Sets identifier for a relying party, on whose behalf a given authentication operation is being performed. A public key - * credential can only be used for authentication with the same replying party it was registered with. - *

- * Note: the RpId should be an effective domain (without scheme or port). - * - * @param rpId identifier for a relying party - */ - @NonNull - public Builder setRpId(@NonNull String rpId) { - this.rpId = rpId; - return this; - } - - /** - * Sets whether passkey credentials should be returned by this API. - * - * @param supported whether passkey credentials should be returned - */ - @NonNull - public Builder setSupported(boolean supported) { - this.supported = supported; - return this; - } - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof PasskeysRequestOptions)) return false; - - PasskeysRequestOptions that = (PasskeysRequestOptions) o; - - if (supported != that.supported) return false; - if (!Arrays.equals(challenge, that.challenge)) return false; - return Objects.equals(rpId, that.rpId); - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{supported, challenge, rpId}); - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(PasskeysRequestOptions.class); - } - - /** - * Options for requesting password-backed credentials during sign-in. - */ - @Class - public static class PasswordRequestOptions extends AbstractSafeParcelable { - @Field(value = 1, getterName = "isSupported") - public final boolean supported; - - @Constructor - @Hide - public PasswordRequestOptions(@Param(1) boolean supported) { - this.supported = supported; - } - - public static Builder builder() { - return new Builder(); - } - - public boolean isSupported() { - return supported; - } - - /** - * Builder for {@link BeginSignInRequest.PasswordRequestOptions}. - */ - public static class Builder { - private boolean supported = false; - - /** - * Returns the built {@link BeginSignInRequest.PasswordRequestOptions}. - */ - @NonNull - public PasswordRequestOptions build() { - return new PasswordRequestOptions(supported); - } - - /** - * Sets whether password-backed credentials should be returned by the API. - * - * @param supported whether password-backed credentials should be returned - */ - @NonNull - public Builder setSupported(boolean supported) { - this.supported = supported; - return this; - } - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(PasswordRequestOptions.class); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof BeginSignInRequest)) return false; - - BeginSignInRequest that = (BeginSignInRequest) o; - - if (autoSelectEnabled != that.autoSelectEnabled) return false; - if (theme != that.theme) return false; - if (!Objects.equals(passwordRequestOptions, that.passwordRequestOptions)) return false; - if (!Objects.equals(googleIdTokenRequestOptions, that.googleIdTokenRequestOptions)) - return false; - if (!Objects.equals(sessionId, that.sessionId)) return false; - if (!Objects.equals(passkeysRequestOptions, that.passkeysRequestOptions)) return false; - return Objects.equals(passkeyJsonRequestOptions, that.passkeyJsonRequestOptions); - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{passwordRequestOptions, googleIdTokenRequestOptions, sessionId, autoSelectEnabled, theme, passkeysRequestOptions, passkeyJsonRequestOptions}); - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(BeginSignInRequest.class); - -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInResult.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInResult.java deleted file mode 100644 index ab875a06..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInResult.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.app.PendingIntent; -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; -import org.microg.gms.common.Hide; - -/** - * Result returned from sign-in initiation that includes a {@link PendingIntent} that can be used to continue the sign-in flow. - */ -@SafeParcelable.Class -public class BeginSignInResult extends AbstractSafeParcelable { - @Field(value = 1, getterName = "getPendingIntent") - private final PendingIntent pendingIntent; - - @Constructor - @Hide - public BeginSignInResult(@Param(1) PendingIntent pendingIntent) { - this.pendingIntent = pendingIntent; - } - - public PendingIntent getPendingIntent() { - return pendingIntent; - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(BeginSignInResult.class); -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/CredentialSavingClient.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/CredentialSavingClient.java deleted file mode 100644 index 1761d85e..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/CredentialSavingClient.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.app.PendingIntent; -import android.content.Intent; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import com.google.android.gms.common.api.HasApiKey; -import com.google.android.gms.common.api.Status; -import com.google.android.gms.tasks.Task; - -/** - * A client for the Credential Saving API. - */ -public interface CredentialSavingClient extends HasApiKey { - /** - * Extracts the {@link Status} from the {@link Intent} object in activity results. - */ - @NonNull - Status getStatusFromIntent(@Nullable Intent intent); - - /** - * Attempts to save a token for account linking. - *

- * Calling this method will provide a {@link PendingIntent} in the response that can be used to launch the flow to complete the - * saving of the account linking token. As part of the request, you need to provide a {@link PendingIntent} for your consent page - * that Google Play services will launch in the middle of the flow. The result must then be sent back to the caller following a - * certain contract described in {@link SaveAccountLinkingTokenRequest.Builder#setConsentPendingIntent(PendingIntent)}. - * - * @param saveAccountLinkingTokenRequest the request that contains the parameters to successfully return a response that can be used to - * launch the appropriate flow. - * @return {@link Task} which may contain the {@link PendingIntent} required to launch the flow. To find out if the response can be used - * to start the flow, first call {@link SaveAccountLinkingTokenResult#hasResolution()}. - */ - @NonNull - Task saveAccountLinkingToken(@NonNull SaveAccountLinkingTokenRequest saveAccountLinkingTokenRequest); - - /** - * Initiates the storage of a password-backed credential that can later be used to sign a user in. - *

- * If the request cannot be honored, an exception will be set on the returned {@link Task}. In all other cases, a - * {@link SavePasswordResult} will be returned. - * - * @param savePasswordRequest container for the {@link SignInPassword} for the password-saving flow - * @return {@link Task} which eventually contains the result of the initialization - */ - @NonNull - Task savePassword(@NonNull SavePasswordRequest savePasswordRequest); -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/CredentialSavingOptions.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/CredentialSavingOptions.java deleted file mode 100644 index bfdd7320..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/CredentialSavingOptions.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity; - -import androidx.annotation.Nullable; -import com.google.android.gms.common.api.Api; - -import java.util.Arrays; - -public class CredentialSavingOptions implements Api.ApiOptions.Optional { - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{CredentialSavingOptions.class}); - } - - @Override - public boolean equals(@Nullable Object obj) { - return obj instanceof CredentialSavingOptions; - } -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.java deleted file mode 100644 index 89063405..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; -import org.microg.gms.common.Hide; - -/** - * Request object used to get an Intent to start the Phone Number Hint flow. - */ -@SafeParcelable.Class -public class GetPhoneNumberHintIntentRequest extends AbstractSafeParcelable { - @Field(value = 1, getterName = "getTheme") - private final int theme; - - @Constructor - GetPhoneNumberHintIntentRequest(@Param(1) int theme) { - this.theme = theme; - } - - @NonNull - public static Builder builder() { - return new Builder(); - } - - @Hide - public int getTheme() { - return theme; - } - - /** - * Builder for {@link GetPhoneNumberHintIntentRequest} - */ - public static class Builder { - private int theme; - - @NonNull - public GetPhoneNumberHintIntentRequest build() { - return new GetPhoneNumberHintIntentRequest(theme); - } - - @Hide - @NonNull - public Builder setTheme(int theme) { - this.theme = theme; - return this; - } - } - - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GetPhoneNumberHintIntentRequest.class); -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.java deleted file mode 100644 index c656b329..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import androidx.annotation.Nullable; -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; -import org.microg.gms.common.Hide; - -import java.util.Arrays; -import java.util.Objects; - -/** - * Request to get a Google sign-in intent. - */ -@SafeParcelable.Class -public class GetSignInIntentRequest extends AbstractSafeParcelable { - @Field(value = 1, getterName = "getServerClientId") - private final String serverClientId; - @Field(value = 2, getterName = "getHostedDomainFilter") - private final String hostedDomainFilter; - @Field(value = 3, getterName = "getSessionId") - private final String sessionId; - @Field(value = 4, getterName = "getNonce") - private final String nonce; - @Field(value = 5, getterName = "requestVerifiedPhoneNumber") - private final boolean requestVerifiedPhoneNumber; - @Field(value = 6, getterName = "getTheme") - private final int theme; - - @Constructor - GetSignInIntentRequest(@Param(1) String serverClientId, @Param(2) String hostedDomainFilter, @Param(3) String sessionId, @Param(4) String nonce, @Param(5) boolean requestVerifiedPhoneNumber, @Param(6) int theme) { - this.serverClientId = serverClientId; - this.hostedDomainFilter = hostedDomainFilter; - this.sessionId = sessionId; - this.nonce = nonce; - this.requestVerifiedPhoneNumber = requestVerifiedPhoneNumber; - this.theme = theme; - } - - @NonNull - public static Builder builder() { - return new Builder(); - } - - /** - * Returns the {@code hostedDomainFilter} if it was set in the request, or {@code null} otherwise. - */ - public String getHostedDomainFilter() { - return hostedDomainFilter; - } - - /** - * Returns the nonce that was set in the request. - */ - public String getNonce() { - return nonce; - } - - /** - * Returns the {@code serverClientId} that was set in the request. - */ - public String getServerClientId() { - return serverClientId; - } - - @Hide - public String getSessionId() { - return sessionId; - } - - @Hide - public int getTheme() { - return theme; - } - - /** - * Returns whether a verified phone number is requested. - * - * @deprecated No replacement. - */ - @Deprecated - public boolean requestVerifiedPhoneNumber() { - return requestVerifiedPhoneNumber; - } - - /** - * Builder class for {@link GetSignInIntentRequest}. - */ - public static class Builder { - private String serverClientId; - private String hostedDomainFilter; - private String sessionId; - private String nonce; - private boolean requestVerifiedPhoneNumber; - private int theme; - - @NonNull - public GetSignInIntentRequest build() { - return new GetSignInIntentRequest(serverClientId, hostedDomainFilter, sessionId, nonce, requestVerifiedPhoneNumber, theme); - } - - /** - * Sets the hosted domain filter (e.g. myuniveristy.edu). Default is no filter. - */ - @NonNull - public Builder filterByHostedDomain(@Nullable String hostedDomainFilter) { - this.hostedDomainFilter = hostedDomainFilter; - return this; - } - - /** - * Sets the nonce to use when generating a Google ID token. The values for nonce can be any random string and is used to - * prevent replay-attack. Default is no nonce. - * - * @param nonce the nonce to use during ID token generation - */ - @NonNull - public Builder setNonce(@Nullable String nonce) { - this.nonce = nonce; - return this; - } - - /** - * Sets whether to prompt the users to share a verified phone number associated with their Google accounts. - *

- * Note that if the user selects a Google account which has previously been used to sign up to your app, they won't be - * prompted with the phone number selection. - * - * @deprecated No replacement. - */ - @Deprecated - @NonNull - public Builder setRequestVerifiedPhoneNumber(boolean requestsVerifiedPhoneNumber) { - this.requestVerifiedPhoneNumber = requestsVerifiedPhoneNumber; - return this; - } - - /** - * Sets the client ID of the server that will verify the integrity of the token. Calling this method to set the {@code serverClientId} is - * required. - */ - @NonNull - public Builder setServerClientId(@NonNull String serverClientId) { - this.serverClientId = serverClientId; - return this; - } - - @NonNull - public Builder setSessionId(@Nullable String sessionId) { - this.sessionId = sessionId; - return this; - } - - @NonNull - public Builder setTheme(int theme) { - this.theme = theme; - return this; - } - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof GetSignInIntentRequest)) return false; - - GetSignInIntentRequest that = (GetSignInIntentRequest) o; - - if (requestVerifiedPhoneNumber != that.requestVerifiedPhoneNumber) return false; - if (theme != that.theme) return false; - if (!Objects.equals(serverClientId, that.serverClientId)) return false; - if (!Objects.equals(hostedDomainFilter, that.hostedDomainFilter)) return false; - if (!Objects.equals(sessionId, that.sessionId)) return false; - return Objects.equals(nonce, that.nonce); - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{serverClientId, hostedDomainFilter, serverClientId, nonce, requestVerifiedPhoneNumber, theme}); - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GetSignInIntentRequest.class); - -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/Identity.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/Identity.java deleted file mode 100644 index 19647beb..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/Identity.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.app.Activity; -import android.content.Context; -import androidx.annotation.NonNull; - -/** - * The entry point to the Sign-In APIs. - */ -public final class Identity { - -// /** -// * Returns a new instance of {@link AuthorizationClient}. -// */ -// @NonNull -// public static AuthorizationClient getAuthorizationClient(@NonNull Context context) { -// throw new UnsupportedOperationException(); -// } -// -// /** -// * Returns a new instance of {@link AuthorizationClient}. -// */ -// @NonNull -// public static AuthorizationClient getAuthorizationClient(@NonNull Activity activity) { -// throw new UnsupportedOperationException(); -// } - - /** - * Returns a new instance of {@link CredentialSavingClient}. - */ - @NonNull - public static CredentialSavingClient getCredentialSavingClient(@NonNull Activity activity) { - throw new UnsupportedOperationException(); - } - - /** - * Returns a new instance of {@link CredentialSavingClient}. - */ - @NonNull - public static CredentialSavingClient getCredentialSavingClient(@NonNull Context context) { - throw new UnsupportedOperationException(); - } - - /** - * Returns a new instance of {@link SignInClient}. - */ - @NonNull - public static SignInClient getSignInClient(@NonNull Activity activity) { - throw new UnsupportedOperationException(); - } - - /** - * Returns a new instance of {@link SignInClient}. - */ - @NonNull - public static SignInClient getSignInClient(@NonNull Context context) { - throw new UnsupportedOperationException(); - } - - private Identity() { - } -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SaveAccountLinkingTokenRequest.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SaveAccountLinkingTokenRequest.java deleted file mode 100644 index ada66da8..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SaveAccountLinkingTokenRequest.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.app.Activity; -import android.app.PendingIntent; -import android.os.Parcel; -import androidx.annotation.NonNull; -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; -import org.microg.gms.common.Hide; - -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -/** - * Configurations that allow saving a token to Google for the purpose of account linking. - */ -public class SaveAccountLinkingTokenRequest extends AbstractSafeParcelable { - public static final String EXTRA_TOKEN = "extra_token"; - /** - * A constant to indicate that the type of token that will be saved is an Authorization Code. - */ - public static final String TOKEN_TYPE_AUTH_CODE = "auth_code"; - - @Field(value = 1, getterName = "getConsentPendingIntent") - private final PendingIntent consentPendingIntent; - @Field(value = 2, getterName = "getTokenType") - private final String tokenType; - @Field(value = 3, getterName = "getServiceId") - private final String serviceId; - @Field(value = 4, getterName = "getScopes") - private final List scopes; - @Field(value = 5, getterName = "getSessionId") - private final String sessionId; - @Field(value = 6, getterName = "getTheme") - private final int theme; - - @Constructor - SaveAccountLinkingTokenRequest(@Param(1) PendingIntent consentPendingIntent, @Param(2) String tokenType, @Param(3) String serviceId, @Param(4) List scopes, @Param(5) String sessionId, @Param(6) int theme) { - this.consentPendingIntent = consentPendingIntent; - this.tokenType = tokenType; - this.serviceId = serviceId; - this.scopes = scopes; - this.sessionId = sessionId; - this.theme = theme; - } - - /** - * Returns an instance of the {@link SaveAccountLinkingTokenRequest.Builder} that can be used to build an instance of {@link SaveAccountLinkingTokenRequest}. - */ - public static Builder builder() { - return new Builder(); - } - - /** - * Returns the {@link PendingIntent} that is set in the request and will be used to launch the consent page by Google Play Services during the flow. - */ - public PendingIntent getConsentPendingIntent() { - return consentPendingIntent; - } - - /** - * Returns the scopes that were set in the request. These are the requested scopes for the token that will be issued by your application. - */ - public List getScopes() { - return scopes; - } - - /** - * Returns the service-id that was set in the request. This service-id can be found in your cloud project. - */ - public String getServiceId() { - return serviceId; - } - - @Hide - public String getSessionId() { - return sessionId; - } - - @Hide - public int getTheme() { - return theme; - } - - /** - * Returns the type of token that is requested. - */ - public String getTokenType() { - return tokenType; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof SaveAccountLinkingTokenRequest)) return false; - - SaveAccountLinkingTokenRequest that = (SaveAccountLinkingTokenRequest) o; - - if (theme != that.theme) return false; - if (!Objects.equals(consentPendingIntent, that.consentPendingIntent)) return false; - if (!Objects.equals(tokenType, that.tokenType)) return false; - if (!Objects.equals(serviceId, that.serviceId)) return false; - if (!Objects.equals(scopes, that.scopes)) return false; - return Objects.equals(sessionId, that.sessionId); - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{consentPendingIntent, tokenType, serviceId, scopes, serviceId, theme}); - } - - /** - * Builder for {@link SaveAccountLinkingTokenRequest}. - */ - public static class Builder { - private PendingIntent consentPendingIntent; - private String tokenType; - private String serviceId; - private List scopes; - private String sessionId; - private int theme; - - /** - * Builds an immutable instance of the {@link SaveAccountLinkingTokenRequest}. - */ - @NonNull - public SaveAccountLinkingTokenRequest build() { - return new SaveAccountLinkingTokenRequest(consentPendingIntent, tokenType, serviceId, scopes, sessionId, theme); - } - - /** - * Sets the (mandatory) {@link PendingIntent} that can be launched by Google Play services to show the consent page during - * the flow. When the launched Activity is finished, it has to provide the appropriate data in the result that it returns to the - * caller, based on the following contract: - *

    - *
  • - * If the user has accepted the consent, the launched Activity must call {@code setResult} with {@link Activity#RESULT_OK}, along with a - * token as a (string) intent extra in the result, with the key {@link SaveAccountLinkingTokenRequest#EXTRA_TOKEN}, - * similar to the following snippet: - *
    -         *  Intent intent = new Intent();
    -         *  intent.putExtra(SaveAccountLinkingTokenRequest.EXTRA_TOKEN, token);
    -         *  setResult(Activity.RESULT_OK, intent);
    -         *  finish();
    -         *         
    - *
  • - *
  • - * If, however, the user has rejected the consent, the Activity has to call {@code setResult} with {@link Activity#RESULT_CANCELED}. - *
  • - *
- */ - @NonNull - public Builder setConsentPendingIntent(PendingIntent consentPendingIntent) { - this.consentPendingIntent = consentPendingIntent; - return this; - } - - /** - * Sets the list of scopes that are associated with the token that will be saved to Google. Calling this method with the - * correct scope(s) is required. - */ - @NonNull - public Builder setScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Sets the service-id that can be obtained from your Google Cloud project. Calling this method to set {@code serviceId} - * is required. - */ - @NonNull - public Builder setServiceId(String serviceId) { - this.serviceId = serviceId; - return this; - } - - @Hide - @NonNull - public Builder setSessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - @Hide - @NonNull - public Builder setTheme(int theme) { - this.theme = theme; - return this; - } - - /** - * Sets the type of token that will be saved to Google. Valid options are: - *
    - *
  • {@link SaveAccountLinkingTokenRequest#TOKEN_TYPE_AUTH_CODE}
  • - *
- * Calling this method with a valid token type is required. - */ - @NonNull - public Builder setTokenType(String tokenType) { - this.tokenType = tokenType; - return this; - } - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SaveAccountLinkingTokenRequest.class); -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SaveAccountLinkingTokenResult.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SaveAccountLinkingTokenResult.java deleted file mode 100644 index 11448995..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SaveAccountLinkingTokenResult.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.app.PendingIntent; -import android.os.Parcel; -import androidx.annotation.NonNull; -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; -import org.microg.gms.common.Hide; - -import java.util.Objects; - -/** - * Result returned from the initial call to save an account linking token that includes a {@link PendingIntent} that can be used to - * continue the flow. - */ -@SafeParcelable.Class -public class SaveAccountLinkingTokenResult extends AbstractSafeParcelable { - @Field(value = 1, getterName = "getPendingIntent") - private final PendingIntent pendingIntent; - - @Constructor - @Hide - public SaveAccountLinkingTokenResult(@Param(1) PendingIntent pendingIntent) { - this.pendingIntent = pendingIntent; - } - - /** - * Returns the {@link PendingIntent} that can be used to launch the flow. Note that this method can return a {@code null} value if such - * flow cannot be started. It is expected that the caller first calls {@link #hasResolution()} to make sure the flow can be started, - * instead of examining the nullness of the result returned by this method. - */ - public PendingIntent getPendingIntent() { - return pendingIntent; - } - - /** - * Returns {@code true} if and only if this result contains a resolution that needs to be launched. - */ - public boolean hasResolution() { - return pendingIntent != null; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof SaveAccountLinkingTokenResult)) return false; - - SaveAccountLinkingTokenResult that = (SaveAccountLinkingTokenResult) o; - - return Objects.equals(pendingIntent, that.pendingIntent); - } - - @Override - public int hashCode() { - return pendingIntent != null ? pendingIntent.hashCode() : 0; - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SaveAccountLinkingTokenResult.class); -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SavePasswordRequest.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SavePasswordRequest.java deleted file mode 100644 index cd998a20..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SavePasswordRequest.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.os.Parcel; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; -import org.microg.gms.common.Hide; - -/** - * Configurations that allow saving a {@link SignInPassword} to Google. - */ -@SafeParcelable.Class -public class SavePasswordRequest extends AbstractSafeParcelable { - @Field(value = 1, getterName = "getSignInPassword") - private final SignInPassword signInPassword; - @Field(value = 2, getterName = "getSessionId") - @Nullable - private final String sessionId; - @Field(value = 3, getterName = "getTheme") - private final int theme; - - @Constructor - SavePasswordRequest(@Param(1) SignInPassword signInPassword, @Param(2) @Nullable String sessionId, @Param(3) int theme) { - this.signInPassword = signInPassword; - this.sessionId = sessionId; - this.theme = theme; - } - - /** - * Returns a new instance of the {@link SavePasswordRequest.Builder}. - */ - public static Builder builder() { - return new Builder(); - } - - @Hide - @Nullable - public String getSessionId() { - return sessionId; - } - - public SignInPassword getSignInPassword() { - return signInPassword; - } - - @Hide - public int getTheme() { - return theme; - } - - /** - * Builder for {@link SavePasswordRequest}. - */ - public static class Builder { - private SignInPassword signInPassword; - @Nullable - private String sessionId; - private int theme; - - /** - * Sets the {@link SignInPassword} - */ - @NonNull - public Builder setSignInPassword(@NonNull SignInPassword signInPassword) { - this.signInPassword = signInPassword; - return this; - } - - @Hide - @NonNull - public Builder setSessionId(@Nullable String sessionId) { - this.sessionId = sessionId; - return this; - } - - @Hide - @NonNull - public Builder setTheme(int theme) { - this.theme = theme; - return this; - } - - /** - * Builds and returns a new instance of {@link SavePasswordRequest}. - */ - @NonNull - public SavePasswordRequest build() { - return new SavePasswordRequest(signInPassword, sessionId, theme); - } - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SavePasswordRequest.class); -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SavePasswordResult.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SavePasswordResult.java deleted file mode 100644 index 9360a1c3..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SavePasswordResult.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.app.PendingIntent; -import android.os.Parcel; -import androidx.annotation.NonNull; -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -import java.util.Objects; - -/** - * The result returned from calling {@link CredentialSavingClient#savePassword(SavePasswordRequest)} that includes a - * {@link PendingIntent} that can be used to launch the password saving flow. - */ -@SafeParcelable.Class -public class SavePasswordResult extends AbstractSafeParcelable { - @Field(value = 1, getterName = "getPendingIntent") - private final PendingIntent pendingIntent; - - @Constructor - public SavePasswordResult(@Param(1) PendingIntent pendingIntent) { - this.pendingIntent = pendingIntent; - } - - /** - * Returns the {@link PendingIntent} that should be launched to start the UI flow for saving the password. - */ - public PendingIntent getPendingIntent() { - return pendingIntent; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof SavePasswordResult)) return false; - - SavePasswordResult that = (SavePasswordResult) o; - - return Objects.equals(pendingIntent, that.pendingIntent); - } - - @Override - public int hashCode() { - return pendingIntent != null ? pendingIntent.hashCode() : 0; - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SavePasswordResult.class); -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInClient.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInClient.java deleted file mode 100644 index 0268ef85..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInClient.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.app.PendingIntent; -import android.content.Intent; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import com.google.android.gms.common.api.ApiException; -import com.google.android.gms.common.api.HasApiKey; -import com.google.android.gms.tasks.Task; - -public interface SignInClient extends HasApiKey { - /** - * Initiates the retrieval of a credential that can assist the caller in signing a user in to their application. - *

- * If the request cannot be honored, an exception will be set on the returned {@link Task}. In all other cases, a - * {@link BeginSignInResult} will be returned. - * - * @param signInRequest configuration for the sign-in operation - * @return {@link Task} which eventually contains the result of the initialization - */ - @NonNull - Task beginSignIn(@NonNull BeginSignInRequest signInRequest); - - /** - * Retrieves the Phone Number from the {@link Intent} returned upon a successful Phone Number Hint request, throwing an - * {@link ApiException} if no phone number is available or the input {@link Intent} is null. - * - * @throws ApiException - */ - @NonNull - String getPhoneNumberFromIntent(@Nullable Intent data) throws ApiException; - - /** - * Gets the {@link PendingIntent} that initiates the Phone Number Hint flow. - *

- * If there is no phone number on the device, an exception will be set on the returned {@link Task}. In all other cases, a - * {@link PendingIntent} will be returned. - * - * @return {@link Task} which can be used to start the Phone Number Hint flow. - */ - @NonNull - Task getPhoneNumberHintIntent(@NonNull GetPhoneNumberHintIntentRequest getPhoneNumberHintIntentRequest); - - /** - * Retrieves the {@link SignInCredential} from the {@link Intent} returned upon successful sign-in, throwing an {@link ApiException} if no - * credential is present. - * - * @throws ApiException - */ - @NonNull - SignInCredential getSignInCredentialFromIntent(@Nullable Intent data) throws ApiException; - - /** - * Gets the {@link PendingIntent} that initiates the Google Sign-in flow. - *

- * If the request cannot be honored, an exception will be set on the returned {@link Task}. In all other cases, a {@link PendingIntent} - * will be returned. - * - * @param getSignInIntentRequest configuration for Google Sign-in flow - * @return {@link Task} which eventually contains the {@link PendingIntent} to start the Google Sign-in flow. - */ - @NonNull - Task getSignInIntent(@NonNull GetSignInIntentRequest getSignInIntentRequest); - - /** - * Resets internal state related to sign-in. - *

- * This method should be invoked when a user signs out of your app. - * - * @return {@link Task} which eventually terminates in success or failure - */ - @NonNull - Task signOut(); -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInCredential.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInCredential.java deleted file mode 100644 index 85ef8e92..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInCredential.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.net.Uri; -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; -import com.google.android.gms.fido.fido2.api.common.PublicKeyCredential; -import org.microg.gms.common.Hide; - -import java.util.Arrays; -import java.util.Objects; - -/** - * The credential returned as a result of a successful sign-in. Data returned within this object depends on the type of - * credential that user has selected; for example a password is returned only when a password-backed credential was - * selected. - */ -@SafeParcelable.Class -public class SignInCredential extends AbstractSafeParcelable { - @Field(value = 1, getterName = "getId") - private final String id; - @Field(value = 2, getterName = "getDisplayName") - private final String displayName; - @Field(value = 3, getterName = "getGivenName") - private final String givenName; - @Field(value = 4, getterName = "getFamilyName") - private final String familyName; - @Field(value = 5, getterName = "getProfilePictureUri") - private final Uri profilePictureUri; - @Field(value = 6, getterName = "getPassword") - private final String password; - @Field(value = 7, getterName = "getGoogleIdToken") - private final String googleIdToken; - @Field(value = 8, getterName = "getPhoneNumber") - private final String phoneNumber; - @Field(value = 9, getterName = "getPublicKeyCredential") - private final PublicKeyCredential publicKeyCredential; - - @Hide - @Constructor - public SignInCredential(@Param(1) String id, @Param(2) String displayName, @Param(3) String givenName, @Param(4) String familyName, @Param(5) Uri profilePictureUri, @Param(6) String password, @Param(7) String googleIdToken, @Param(8) String phoneNumber, @Param(9) PublicKeyCredential publicKeyCredential) { - this.id = id; - this.displayName = displayName; - this.givenName = givenName; - this.familyName = familyName; - this.profilePictureUri = profilePictureUri; - this.password = password; - this.googleIdToken = googleIdToken; - this.phoneNumber = phoneNumber; - this.publicKeyCredential = publicKeyCredential; - } - - public String getDisplayName() { - return displayName; - } - - public String getFamilyName() { - return familyName; - } - - public String getGivenName() { - return givenName; - } - - public String getGoogleIdToken() { - return googleIdToken; - } - - public String getPassword() { - return password; - } - - /** - * Returns the identifier of the credential. For an ID token credential, this returns the email address of the user's account - * and for a password-backed credential, it returns the username for that password. - */ - public String getId() { - return id; - } - - /** - * @deprecated No replacement. - */ - @Deprecated - public String getPhoneNumber() { - return phoneNumber; - } - - public Uri getProfilePictureUri() { - return profilePictureUri; - } - - /** - * Returns {@code publicKeyCredential}. - */ - public PublicKeyCredential getPublicKeyCredential() { - return publicKeyCredential; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof SignInCredential)) return false; - - SignInCredential that = (SignInCredential) o; - - if (!Objects.equals(id, that.id)) return false; - if (!Objects.equals(displayName, that.displayName)) return false; - if (!Objects.equals(givenName, that.givenName)) return false; - if (!Objects.equals(familyName, that.familyName)) return false; - if (!Objects.equals(profilePictureUri, that.profilePictureUri)) return false; - if (!Objects.equals(password, that.password)) return false; - if (!Objects.equals(googleIdToken, that.googleIdToken)) return false; - if (!Objects.equals(phoneNumber, that.phoneNumber)) return false; - return Objects.equals(publicKeyCredential, that.publicKeyCredential); - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{id, displayName, givenName, familyName, profilePictureUri, password, googleIdToken, phoneNumber, publicKeyCredential}); - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SignInCredential.class); -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInOptions.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInOptions.java deleted file mode 100644 index c1078df4..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInOptions.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.identity; - -import androidx.annotation.Nullable; -import com.google.android.gms.common.api.Api; - -import java.util.Arrays; - -public class SignInOptions implements Api.ApiOptions.Optional { - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{SignInOptions.class}); - } - - @Override - public boolean equals(@Nullable Object obj) { - return obj instanceof SignInOptions; - } -} diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInPassword.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInPassword.java deleted file mode 100644 index a2889522..00000000 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInPassword.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.auth.api.identity; - -import android.os.Parcel; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelable; -import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; - -import java.util.Arrays; - -/** - * An account ID such as a username or an email, and a password that can be used to sign a user in. - */ -@SafeParcelable.Class -public class SignInPassword extends AbstractSafeParcelable { - @Field(value = 1, getterName = "getId") - @NonNull - private final String id; - @Field(value = 2, getterName = "getPassword") - @NonNull - private final String password; - - @Constructor - public SignInPassword(@Param(1) @NonNull String id, @Param(2) @NonNull String password) { - this.id = id; - this.password = password; - } - - @NonNull - public String getId() { - return id; - } - - @NonNull - public String getPassword() { - return password; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof SignInPassword)) return false; - - SignInPassword that = (SignInPassword) o; - - if (!id.equals(that.id)) return false; - return password.equals(that.password); - } - - @Override - public int hashCode() { - return Arrays.hashCode(new String[]{id, password}); - } - - @Override - public void writeToParcel(@NonNull Parcel dest, int flags) { - CREATOR.writeToParcel(this, dest, flags); - } - - public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SignInPassword.class); -} diff --git a/play-services-base-api/build.gradle b/play-services-base-api/build.gradle deleted file mode 100644 index 59dc1be7..00000000 --- a/play-services-base-api/build.gradle +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -dependencies { - api project(':play-services-basement') -} - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion androidBuildVersionTools - - aidlPackageWhiteList "com/google/android/gms/common/data/DataHolder.aidl" - aidlPackageWhiteList "com/google/android/gms/common/images/WebImage.aidl" - aidlPackageWhiteList "com/google/android/gms/common/api/internal/IStatusCallback.aidl" - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } - namespace 'org.microg.gms.base.api' - buildFeatures { - aidl true - } -} \ No newline at end of file diff --git a/play-services-base-api/src/main/aidl/com/google/android/gms/common/api/internal/IStatusCallback.aidl b/play-services-base-api/src/main/aidl/com/google/android/gms/common/api/internal/IStatusCallback.aidl deleted file mode 100644 index 6355a13b..00000000 --- a/play-services-base-api/src/main/aidl/com/google/android/gms/common/api/internal/IStatusCallback.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.common.api.internal; - -import com.google.android.gms.common.api.Status; - -interface IStatusCallback { - void onResult(in Status status); -} diff --git a/play-services-base-api/src/main/aidl/com/google/android/gms/common/data/DataHolder.aidl b/play-services-base-api/src/main/aidl/com/google/android/gms/common/data/DataHolder.aidl deleted file mode 100644 index 3bbd1174..00000000 --- a/play-services-base-api/src/main/aidl/com/google/android/gms/common/data/DataHolder.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.data; - -parcelable DataHolder; diff --git a/play-services-base-api/src/main/aidl/com/google/android/gms/common/images/WebImage.aidl b/play-services-base-api/src/main/aidl/com/google/android/gms/common/images/WebImage.aidl deleted file mode 100644 index e31f15ab..00000000 --- a/play-services-base-api/src/main/aidl/com/google/android/gms/common/images/WebImage.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.images; - -parcelable WebImage; diff --git a/play-services-base-api/src/main/java/com/google/android/gms/auth/api/signin/GoogleSignInAccount.java b/play-services-base-api/src/main/java/com/google/android/gms/auth/api/signin/GoogleSignInAccount.java deleted file mode 100644 index 031c5b37..00000000 --- a/play-services-base-api/src/main/java/com/google/android/gms/auth/api/signin/GoogleSignInAccount.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.auth.api.signin; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class GoogleSignInAccount extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(GoogleSignInAccount.class); -} diff --git a/play-services-base-api/src/main/java/com/google/android/gms/common/data/DataHolder.java b/play-services-base-api/src/main/java/com/google/android/gms/common/data/DataHolder.java deleted file mode 100644 index 77acbb1b..00000000 --- a/play-services-base-api/src/main/java/com/google/android/gms/common/data/DataHolder.java +++ /dev/null @@ -1,314 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.data; - -import android.annotation.SuppressLint; -import android.database.Cursor; -import android.database.CursorWindow; -import android.os.Bundle; -import android.os.Parcel; - -import androidx.annotation.NonNull; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.io.Closeable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Class for accessing collections of data, organized into columns. This provides the backing - * support for DataBuffer. Much like a cursor, the holder supports the notion of a current - * position, and has methods for extracting various types of data from named columns. - */ -@PublicApi(until = "1") -public class DataHolder extends AutoSafeParcelable implements Closeable { - @SafeParceled(1) - private final String[] columns; - - @SafeParceled(2) - private final CursorWindow[] windows; - - @SafeParceled(3) - private final int statusCode; - - @SafeParceled(4) - private final Bundle metadata; - - private boolean closed = false; - private Map columnIndices; - - protected static final int FIELD_TYPE_NULL = 0; - protected static final int FIELD_TYPE_INTEGER = 1; - protected static final int FIELD_TYPE_FLOAT = 2; - protected static final int FIELD_TYPE_STRING = 3; - protected static final int FIELD_TYPE_BLOB = 4; - - /** - * Creates a data holder with the specified data. - * - * @param columns The column names corresponding to the data in the given windows. - * @param windows The {@link CursorWindow} instances holding the data. - * @param statusCode The status code of this {@link DataHolder}. - * @param metadata The metadata associated with this {@link DataHolder} (may be null). - */ - public DataHolder(String[] columns, CursorWindow[] windows, int statusCode, Bundle metadata) { - this.columns = columns; - this.windows = windows; - this.statusCode = statusCode; - this.metadata = metadata; - validateContents(); - } - - /** - * Creates a data holder wrapping the provided cursor, with provided status code and metadata. - * - * @param cursor The cursor containing the data. - * @param statusCode The status code of this {@link DataHolder}. - * @param metadata The metadata associated with this {@link DataHolder} (may be null). - */ - public DataHolder(Cursor cursor, int statusCode, Bundle metadata) { - this(cursor.getColumnNames(), createCursorWindows(cursor), statusCode, metadata); - } - - /** - * Get a {@link DataHolder.Builder} to create a new {@link DataHolder} manually. - * - * @param columns The array of column names that the object supports. - * @return {@link DataHolder.Builder} object to work with. - */ - public static Builder builder(String[] columns) { - return new Builder(columns); - } - - @SuppressLint({"NewApi", "ObsoleteSdkInt"}) - static int getCursorType(Cursor cursor, int i) { - return cursor.getType(i); - } - - /** - * Closes the data holder, releasing all of its resources and making it completely invalid. - */ - @Override - public void close() { - synchronized (this) { - if (!closed) { - closed = true; - for (CursorWindow window : windows) { - window.close(); - } - } - } - } - - @SuppressWarnings("deprecation") - private static CursorWindow[] createCursorWindows(Builder builder) { - if (builder.columns.length == 0) return new CursorWindow[0]; - List windows = new ArrayList<>(); - try { - CursorWindow current = null; - for (int rowIndex = 0; rowIndex < builder.rows.size(); rowIndex++) { - Map row = builder.rows.get(rowIndex); - if (current == null || !current.allocRow()) { - current = new CursorWindow(false); - current.setStartPosition(rowIndex); - current.setNumColumns(builder.columns.length); - windows.add(current); - if (!current.allocRow()) { - windows.remove(current); - return windows.toArray(new CursorWindow[0]); - } - } - for (int columnIndex = 0; columnIndex < builder.columns.length; columnIndex++) { - Object val = row.get(builder.columns[columnIndex]); - if (val == null) { - current.putNull(rowIndex, columnIndex); - } else if (val instanceof String) { - current.putString((String) val, rowIndex, columnIndex); - } else if (val instanceof Long) { - current.putLong((Long) val, rowIndex, columnIndex); - } else if (val instanceof Integer) { - current.putLong((Integer) val, rowIndex, columnIndex); - } else if (val instanceof Boolean) { - if ((Boolean) val) - current.putLong(1, rowIndex, columnIndex); - } else if (val instanceof byte[]) { - current.putBlob((byte[]) val, rowIndex, columnIndex); - } else if (val instanceof Double) { - current.putDouble((Double) val, rowIndex, columnIndex); - } else if (val instanceof Float) { - current.putDouble((Float) val, rowIndex, columnIndex); - } else { - throw new IllegalArgumentException("Unsupported object for column " + columnIndex + ": " + val); - } - } - } - } catch (RuntimeException e) { - for (CursorWindow window : windows) { - window.close(); - } - throw e; - } - return windows.toArray(new CursorWindow[0]); - } - - private static CursorWindow[] createCursorWindows(Cursor cursor) { - if (cursor.getColumnCount() == 0) return new CursorWindow[0]; - List windows = new ArrayList<>(); - CursorWindow current = null; - int rowIndex = 0; - while (cursor.moveToNext()) { - if (current == null || !current.allocRow()) { - current = new CursorWindow(false); - current.setStartPosition(rowIndex); - current.setNumColumns(cursor.getColumnCount()); - windows.add(current); - if (!current.allocRow()) { - windows.remove(current); - return windows.toArray(new CursorWindow[0]); - } - } - for (int i = 0; i < cursor.getColumnCount(); i++) { - switch (getCursorType(cursor, i)) { - case FIELD_TYPE_NULL: - current.putNull(rowIndex, i); - break; - case FIELD_TYPE_BLOB: - current.putBlob(cursor.getBlob(i), rowIndex, i); - break; - case FIELD_TYPE_FLOAT: - current.putDouble(cursor.getDouble(i), rowIndex, i); - break; - case FIELD_TYPE_INTEGER: - current.putLong(cursor.getLong(i), rowIndex, i); - break; - case FIELD_TYPE_STRING: - current.putString(cursor.getString(i), rowIndex, i); - break; - } - } - rowIndex++; - } - cursor.close(); - return windows.toArray(new CursorWindow[0]); - } - - /** - * Gets the number of rows in the data holder. - * - * @return the number of rows in the data holder. - */ - public int getCount() { - int c = 0; - if (windows != null) { - for (CursorWindow window : windows) { - c += window.getNumRows(); - } - } - return c; - } - - /** - * Retrieves the string value for a given column at the provided position. - * This will throw an {@link IllegalArgumentException} if the column does not exist, the - * position is invalid, or the data holder has been closed. - * - * @param column The column to retrieve. - * @param row The row to retrieve the data from. - * @param windowIndex Index of the cursor window to extract the data from. - * @return The string value in that column. - */ - public String getString(String column, int row, int windowIndex) { - return windows[windowIndex].getString(row, columnIndices.get(column)); - } - - @NonNull - @Override - public String toString() { - return "DataHolder{" + - "columns=" + Arrays.toString(columns) + - ", windows=" + Arrays.toString(windows) + - ", statusCode=" + statusCode + - ", metadata=" + metadata + - '}'; - } - - public void validateContents() { - columnIndices = new HashMap<>(); - for (int i = 0; i < columns.length; i++) { - columnIndices.put(columns[i], i); - } - } - - /** - * Helper class to build {@link DataHolder} instances containing arbitrary data. - *

- * Note that the constructor is private; use DataHolder.builder() to create instances of this class. - */ - public static class Builder { - private final String[] columns; - private final ArrayList> rows; - - private Builder(String[] columns) { - this.columns = columns; - this.rows = new ArrayList<>(); - } - - /** - * Instantiate an {@link DataHolder} from this {@link DataHolder.Builder} with the given status code and metadata. - * - * @param statusCode The status code of this {@link DataHolder}. - * @param metadata The metadata associated with this {@link DataHolder} (may be null). - * @return {@link DataHolder} representation of this object. - */ - public DataHolder build(int statusCode, Bundle metadata) { - return new DataHolder(columns, createCursorWindows(this), statusCode, metadata); - } - - /** - * Instantiate an {@link DataHolder} from this {@link DataHolder.Builder} with the given status code and null metadata. - * - * @param statusCode The status code of this {@link DataHolder}. - * @return {@link DataHolder} representation of this object. - */ - public DataHolder build(int statusCode) { - return build(statusCode, null); - } - - /** - * @return The number of rows that the resulting DataHolder will contain. - */ - public int getCount() { - return rows.size(); - } - - } - - public static final Creator CREATOR = new AutoCreator(DataHolder.class) { - @Override - public DataHolder createFromParcel(Parcel parcel) { - DataHolder res = super.createFromParcel(parcel); - res.validateContents(); - return res; - } - }; -} diff --git a/play-services-base-api/src/main/java/com/google/android/gms/common/images/WebImage.java b/play-services-base-api/src/main/java/com/google/android/gms/common/images/WebImage.java deleted file mode 100644 index 4b5e4ad7..00000000 --- a/play-services-base-api/src/main/java/com/google/android/gms/common/images/WebImage.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2013-2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.images; - -import android.net.Uri; - -import androidx.annotation.NonNull; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import java.util.Locale; - -public class WebImage extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(WebImage.class); - - public WebImage () { - this.uri = null; - } - - public WebImage (Uri uri) { - this.uri = uri; - } - - @SafeParceled(1) - private final int versionCode = 1; - - @SafeParceled(2) - private final Uri uri; - - @SafeParceled(3) - private final int width = 0; - - @SafeParceled(4) - private final int height = 0; - - public Uri getUrl() { - return uri; - } - - public int getWidth() { - return width; - } - - public int getHeight() { - return height; - } - - @NonNull - public String toString() { - assert uri != null; - return String.format(Locale.getDefault(), "Image %dx%d %s", width, height, uri); - } -} diff --git a/play-services-base-core/build.gradle b/play-services-base-core/build.gradle deleted file mode 100644 index 5a5dfa30..00000000 --- a/play-services-base-core/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'maven-publish' -apply plugin: 'signing' - -dependencies { - api project(':play-services-basement') - api "androidx.lifecycle:lifecycle-service:$lifecycleVersion" - - implementation "androidx.annotation:annotation:$annotationVersion" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion" -} - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion androidBuildVersionTools - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - compileOptions { - sourceCompatibility = 17 - targetCompatibility = 17 - } - namespace 'org.microg.gms.base.core' -} \ No newline at end of file diff --git a/play-services-base-core/src/main/AndroidManifest.xml b/play-services-base-core/src/main/AndroidManifest.xml deleted file mode 100644 index 6585028c..00000000 --- a/play-services-base-core/src/main/AndroidManifest.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - diff --git a/play-services-base-core/src/main/java/org/microg/gms/AbstractGmsServiceBroker.java b/play-services-base-core/src/main/java/org/microg/gms/AbstractGmsServiceBroker.java deleted file mode 100644 index 9ff67ff8..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/AbstractGmsServiceBroker.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms; - -import android.os.Bundle; -import android.os.Parcel; -import android.os.RemoteException; -import android.util.Log; - -import com.google.android.gms.common.internal.GetServiceRequest; -import com.google.android.gms.common.internal.IGmsCallbacks; -import com.google.android.gms.common.internal.IGmsServiceBroker; -import com.google.android.gms.common.internal.ValidateAccountRequest; - -import org.microg.gms.common.GmsService; - -import java.util.EnumSet; - -public abstract class AbstractGmsServiceBroker extends IGmsServiceBroker.Stub { - private static final String TAG = "GmsServiceBroker"; - private final EnumSet supportedServices; - - public AbstractGmsServiceBroker(EnumSet supportedServices) { - this.supportedServices = supportedServices; - } - - @Deprecated - @Override - public void getPeopleService(IGmsCallbacks callback, int versionCode, String packageName, - Bundle params) throws RemoteException { - callGetService(GmsService.PEOPLE, callback, versionCode, packageName, params); - } - - @Deprecated - @Override - public void getGoogleIdentityService(IGmsCallbacks callback, int versionCode, - String packageName, Bundle params) throws RemoteException { - callGetService(GmsService.ACCOUNT, callback, versionCode, packageName, params); - } - - @Deprecated - @Override - public void getAddressService(IGmsCallbacks callback, int versionCode, String packageName) - throws RemoteException { - callGetService(callback, versionCode, packageName); - } - - private void callGetService(IGmsCallbacks callback, int gmsVersion, - String packageName) throws RemoteException { - callGetService(GmsService.ADDRESS, callback, gmsVersion, packageName, null); - } - - private void callGetService(GmsService service, IGmsCallbacks callback, int gmsVersion, String packageName, Bundle extras) throws RemoteException { - GetServiceRequest request = new GetServiceRequest(service.SERVICE_ID); - request.gmsVersion = gmsVersion; - request.packageName = packageName; - request.extras = extras; - request.account = null; - request.scopes = null; - getService(callback, request); - } - - @Override - public void getService(IGmsCallbacks callback, GetServiceRequest request) throws RemoteException { - GmsService gmsService = GmsService.byServiceId(request.serviceId); - if ((supportedServices.contains(gmsService)) || supportedServices.contains(GmsService.ANY)) { - handleServiceRequest(callback, request, gmsService); - } else { - Log.d(TAG, "Service not supported: " + request); - throw new IllegalArgumentException("Service not supported: " + request.serviceId); - } - } - - public abstract void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException; - - @Override - public void validateAccount(IGmsCallbacks callback, ValidateAccountRequest request) { - throw new IllegalArgumentException("ValidateAccountRequest not supported"); - } - - @Override - public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { - if (super.onTransact(code, data, reply, flags)) return true; - Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags); - return false; - } -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/BaseService.java b/play-services-base-core/src/main/java/org/microg/gms/BaseService.java deleted file mode 100644 index 38545ff0..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/BaseService.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms; - -import android.content.Intent; -import android.os.IBinder; -import android.os.RemoteException; -import android.util.Log; - -import androidx.annotation.NonNull; -import androidx.lifecycle.LifecycleService; - -import com.google.android.gms.common.internal.GetServiceRequest; -import com.google.android.gms.common.internal.IGmsCallbacks; -import com.google.android.gms.common.internal.IGmsServiceBroker; - -import org.microg.gms.common.GmsService; - -import java.io.FileDescriptor; -import java.io.PrintWriter; -import java.util.Arrays; -import java.util.EnumSet; - -public abstract class BaseService extends LifecycleService { - private final IGmsServiceBroker broker; - private final EnumSet services; - protected final String TAG; - - public BaseService(String tag, GmsService supportedService, GmsService... supportedServices) { - this.TAG = tag; - services = EnumSet.of(supportedService); - services.addAll(Arrays.asList(supportedServices)); - broker = new AbstractGmsServiceBroker(services) { - @Override - public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException { - try { - request.extras.keySet(); // call to unparcel() - } catch (Exception e) { - // Sometimes we need to define the correct ClassLoader before unparcel(). Ignore those. - } - Log.d(TAG, "bound by: " + request); - BaseService.this.handleServiceRequest(callback, request, service); - } - }; - } - - @Override - public IBinder onBind(@NonNull Intent intent) { - super.onBind(intent); - Log.d(TAG, "onBind: " + intent); - return broker.asBinder(); - } - - @Override - protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) { - writer.println(TAG + " providing services " + services.toString()); - } - - public abstract void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException; -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/DummyService.java b/play-services-base-core/src/main/java/org/microg/gms/DummyService.java deleted file mode 100644 index 5e19cc31..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/DummyService.java +++ /dev/null @@ -1,75 +0,0 @@ -/* -<<<<<<< HEAD:play-services-base-core/src/main/java/org/microg/gms/DummyService.java - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -======= - * SPDX-FileCopyrightText: 2017 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. ->>>>>>> 2e4d3ae4 (Location: Implement settings request (#2216)):play-services-location/src/main/java/com/google/android/gms/location/LocationSettingsStatusCodes.java - */ - -package org.microg.gms; - -import android.os.RemoteException; - -import androidx.annotation.NonNull; -import com.google.android.gms.common.api.CommonStatusCodes; -import com.google.android.gms.common.internal.GetServiceRequest; -import com.google.android.gms.common.internal.IGmsCallbacks; - -<<<<<<< HEAD:play-services-base-core/src/main/java/org/microg/gms/DummyService.java -import org.microg.gms.common.GmsService; - -public class DummyService extends BaseService { - public DummyService() { - super("GmsDummySvc", GmsService.ANY); - } - - @Override - public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException { - callback.onPostInitComplete(CommonStatusCodes.ERROR, null, null); -======= -import org.microg.gms.common.Hide; -import org.microg.gms.common.PublicApi; - -/** - * Location settings specific status codes, for use in {@link Status#getStatusCode()} - */ -@PublicApi -public class LocationSettingsStatusCodes extends CommonStatusCodes { - /** - * Location settings can't be changed to meet the requirements, no dialog pops up - */ - public static final int SETTINGS_CHANGE_UNAVAILABLE = 8502; - - @NonNull - @Hide - public static String getStatusCodeString(int statusCode) { - switch (statusCode) { - case SETTINGS_CHANGE_UNAVAILABLE: - return "SETTINGS_CHANGE_UNAVAILABLE"; - case 8500: - case 8501: - case 8503: - case 8505: - return "INTERNAL_LOCATION_SETTINGS_STATUS_CODE"; - default: - return CommonStatusCodes.getStatusCodeString(statusCode); - } ->>>>>>> 2e4d3ae4 (Location: Implement settings request (#2216)):play-services-location/src/main/java/com/google/android/gms/location/LocationSettingsStatusCodes.java - } -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/DeviceConfiguration.java b/play-services-base-core/src/main/java/org/microg/gms/common/DeviceConfiguration.java deleted file mode 100644 index d4ab5940..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/DeviceConfiguration.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import android.app.ActivityManager; -import android.content.Context; -import android.content.pm.ConfigurationInfo; -import android.content.pm.FeatureInfo; -import android.content.pm.PackageManager; -import android.content.res.Configuration; -import android.opengl.GLES10; -import android.os.Build; -import android.util.DisplayMetrics; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import javax.microedition.khronos.egl.EGL10; -import javax.microedition.khronos.egl.EGLConfig; -import javax.microedition.khronos.egl.EGLContext; -import javax.microedition.khronos.egl.EGLDisplay; - -public class DeviceConfiguration { - public List availableFeatures; - public int densityDpi; - public int glEsVersion; - public List glExtensions; - public boolean hasFiveWayNavigation; - public boolean hasHardKeyboard; - public int heightPixels; - public int keyboardType; - public List locales; - public List nativePlatforms; - public int navigation; - public int screenLayout; - public List sharedLibraries; - public int touchScreen; - public int widthPixels; - - public DeviceConfiguration(Context context) { - ConfigurationInfo configurationInfo = ((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)).getDeviceConfigurationInfo(); - touchScreen = configurationInfo.reqTouchScreen; - keyboardType = configurationInfo.reqKeyboardType; - navigation = configurationInfo.reqNavigation; - Configuration configuration = context.getResources().getConfiguration(); - screenLayout = configuration.screenLayout; - hasHardKeyboard = (configurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD) > 0; - hasFiveWayNavigation = (configurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV) > 0; - DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics(); - densityDpi = displayMetrics.densityDpi; - glEsVersion = configurationInfo.reqGlEsVersion; - PackageManager packageManager = context.getPackageManager(); - String[] systemSharedLibraryNames = packageManager.getSystemSharedLibraryNames(); - sharedLibraries = new ArrayList<>(); - if (systemSharedLibraryNames != null) sharedLibraries.addAll(Arrays.asList(systemSharedLibraryNames)); - for (String s : new String[]{"com.google.android.maps", "com.google.android.media.effects", "com.google.widevine.software.drm"}) { - if (!sharedLibraries.contains(s)) { - sharedLibraries.add(s); - } - } - Collections.sort(sharedLibraries); - availableFeatures = new ArrayList<>(); - if (packageManager.getSystemAvailableFeatures() != null) { - for (FeatureInfo featureInfo : packageManager.getSystemAvailableFeatures()) { - if (featureInfo != null && featureInfo.name != null) availableFeatures.add(featureInfo.name); - } - } - Collections.sort(availableFeatures); - this.nativePlatforms = getNativePlatforms(); - widthPixels = displayMetrics.widthPixels; - heightPixels = displayMetrics.heightPixels; - locales = new ArrayList<>(Arrays.asList(context.getAssets().getLocales())); - for (int i = 0; i < locales.size(); i++) { - locales.set(i, locales.get(i).replace("-", "_")); - } - Collections.sort(locales); - Set glExtensions = new HashSet<>(); - addEglExtensions(glExtensions); - this.glExtensions = new ArrayList<>(glExtensions); - Collections.sort(this.glExtensions); - } - - @SuppressWarnings({"deprecation", "InlinedApi"}) - private static List getNativePlatforms() { - List nativePlatforms; - return Arrays.asList(Build.SUPPORTED_ABIS); - } - - private static void addEglExtensions(Set glExtensions) { - EGL10 egl10 = (EGL10) EGLContext.getEGL(); - if (egl10 != null) { - EGLDisplay display = egl10.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); - egl10.eglInitialize(display, new int[2]); - int[] cf = new int[1]; - if (egl10.eglGetConfigs(display, null, 0, cf)) { - EGLConfig[] configs = new EGLConfig[cf[0]]; - if (egl10.eglGetConfigs(display, configs, cf[0], cf)) { - int[] a1 = - new int[]{EGL10.EGL_WIDTH, EGL10.EGL_PBUFFER_BIT, EGL10.EGL_HEIGHT, EGL10.EGL_PBUFFER_BIT, - EGL10.EGL_NONE}; - int[] a2 = new int[]{12440, EGL10.EGL_PIXMAP_BIT, EGL10.EGL_NONE}; - int[] a3 = new int[1]; - for (int i = 0; i < cf[0]; i++) { - egl10.eglGetConfigAttrib(display, configs[i], EGL10.EGL_CONFIG_CAVEAT, a3); - if (a3[0] != EGL10.EGL_SLOW_CONFIG) { - egl10.eglGetConfigAttrib(display, configs[i], EGL10.EGL_SURFACE_TYPE, a3); - if ((1 & a3[0]) != 0) { - egl10.eglGetConfigAttrib(display, configs[i], EGL10.EGL_RENDERABLE_TYPE, a3); - if ((1 & a3[0]) != 0) { - addExtensionsForConfig(egl10, display, configs[i], a1, null, glExtensions); - } - if ((4 & a3[0]) != 0) { - addExtensionsForConfig(egl10, display, configs[i], a1, a2, glExtensions); - } - } - } - } - } - } - egl10.eglTerminate(display); - } - } - - private static void addExtensionsForConfig(EGL10 egl10, EGLDisplay egldisplay, EGLConfig eglconfig, int[] ai, - int[] ai1, Set set) { - EGLContext eglcontext = egl10.eglCreateContext(egldisplay, eglconfig, EGL10.EGL_NO_CONTEXT, ai1); - if (eglcontext != EGL10.EGL_NO_CONTEXT) { - javax.microedition.khronos.egl.EGLSurface eglsurface = - egl10.eglCreatePbufferSurface(egldisplay, eglconfig, ai); - if (eglsurface != EGL10.EGL_NO_SURFACE) { - egl10.eglMakeCurrent(egldisplay, eglsurface, eglsurface, eglcontext); - String s = GLES10.glGetString(7939); - if (s != null && !s.isEmpty()) { - String[] as = s.split(" "); - set.addAll(Arrays.asList(as).subList(0, as.length)); - } - egl10.eglMakeCurrent(egldisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); - egl10.eglDestroySurface(egldisplay, eglsurface); - } - egl10.eglDestroyContext(egldisplay, eglcontext); - } - } -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/DeviceIdentifier.java b/play-services-base-core/src/main/java/org/microg/gms/common/DeviceIdentifier.java deleted file mode 100644 index ab5d22cb..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/DeviceIdentifier.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import java.util.Random; - -public class DeviceIdentifier { - public String wifiMac = randomMacAddress(); // TODO: static - public String meid = randomMeid(); - public String esn; - - - private static String randomMacAddress() { - StringBuilder mac = new StringBuilder("b407f9"); - Random rand = new Random(); - for (int i = 0; i < 6; i++) { - mac.append(Integer.toString(rand.nextInt(16), 16)); - } - return mac.toString(); - } - - private static String randomMeid() { - // http://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity - // We start with a known base, and generate random MEID - String meid; - Random rand = new Random(); - StringBuilder meidBuilder = new StringBuilder("35503104"); - for (int i = 0; i < 6; i++) { - meidBuilder.append(rand.nextInt(10)); - } - meid = meidBuilder.toString(); - - // Luhn algorithm (check digit) - int sum = 0; - for (int i = 0; i < meid.length(); i++) { - int c = Integer.parseInt(String.valueOf(meid.charAt(i))); - if ((meid.length() - i - 1) % 2 == 0) { - c *= 2; - c = c % 10 + c / 10; - } - - sum += c; - } - final int check = (100 - sum) % 10; - meid += Integer.toString(check); - - return meid; - } -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/ForegroundServiceContext.java b/play-services-base-core/src/main/java/org/microg/gms/common/ForegroundServiceContext.java deleted file mode 100644 index c7a2ff52..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/ForegroundServiceContext.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.microg.gms.common; - -import android.annotation.SuppressLint; -import android.app.Notification; -import android.app.NotificationChannel; -import android.app.NotificationManager; -import android.app.PendingIntent; -import android.app.Service; -import android.content.ComponentName; -import android.content.Context; -import android.content.ContextWrapper; -import android.content.Intent; -import android.net.Uri; -import android.os.Build; -import android.os.PowerManager; -import android.provider.Settings; -import android.util.Log; - -import androidx.core.app.NotificationCompat; - -import org.microg.gms.base.core.R; - -public class ForegroundServiceContext extends ContextWrapper { - private static final String TAG = "ForegroundService"; - public static final String EXTRA_FOREGROUND = "foreground"; - - public ForegroundServiceContext(Context base) { - super(base); - } - - @Override - public ComponentName startService(Intent service) { - if (!isIgnoringBatteryOptimizations()) { - Log.d(TAG, "Starting in foreground mode."); - service.putExtra(EXTRA_FOREGROUND, true); - if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - return super.startForegroundService(service); - } else { - return super.startService(service); - } - } - return super.startService(service); - } - - private boolean isIgnoringBatteryOptimizations() { - PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE); - return powerManager.isIgnoringBatteryOptimizations(getPackageName()); - } - - private static String getServiceName(Service service) { - String serviceName = null; - try { - ForegroundServiceInfo annotation = service.getClass().getAnnotation(ForegroundServiceInfo.class); - if (annotation != null) { - if (annotation.res() != 0) { - try { - serviceName = service.getString(annotation.res()); - } catch (Exception ignored) { - } - } - if (serviceName == null) { - serviceName = annotation.value(); - } - } - } catch (Exception ignored) { - } - if (serviceName == null) { - serviceName = service.getClass().getSimpleName(); - } - return serviceName; - } - - public static void completeForegroundService(Service service, Intent intent, String tag) { - if (intent != null && intent.getBooleanExtra(EXTRA_FOREGROUND, false)) { - String serviceName = getServiceName(service); - Log.d(tag, "Started " + serviceName + " in foreground mode."); - try { - Notification notification = buildForegroundNotification(service, serviceName); - service.startForeground(serviceName.hashCode(), notification); - Log.d(tag, "Notification: " + notification); - } catch (Exception e) { - Log.w(tag, e); - } - } - } - - @SuppressLint("BatteryLife") - private static Notification buildForegroundNotification(Context context, String serviceName) { - Intent notificationIntent = new Intent(); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - notificationIntent.setAction(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS); - notificationIntent.setData(Uri.parse("package:" + context.getPackageName())); - } else { - notificationIntent.setAction(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS); - notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - } - PendingIntent notificationPendingIntent = PendingIntent.getActivity(context, - 0, - notificationIntent, - 0); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - NotificationChannel Channel = new NotificationChannel("foreground-service", - context.getResources().getString(R.string.notification_service_name), - NotificationManager.IMPORTANCE_LOW); - Channel.setShowBadge(false); - Channel.setVibrationPattern(new long[]{0}); - Channel.setLockscreenVisibility(0); - context.getSystemService(NotificationManager.class).createNotificationChannel(Channel); - } - return new NotificationCompat.Builder(context, "foreground-service") - .setOngoing(true) - .setContentIntent(notificationPendingIntent) - .setSmallIcon(R.drawable.ic_foreground_notification) - .setContentTitle(context.getResources().getString(R.string.small_notification_service_title)) - .setStyle(new NotificationCompat.BigTextStyle() - .setBigContentTitle(context.getResources().getString(R.string.big_notification_service_title)) - .bigText(context.getResources().getString(R.string.notification_service_content))) - .build(); - } -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/ForegroundServiceInfo.java b/play-services-base-core/src/main/java/org/microg/gms/common/ForegroundServiceInfo.java deleted file mode 100644 index 8a8102a6..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/ForegroundServiceInfo.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface ForegroundServiceInfo { - String value(); - int res() default 0; -} \ No newline at end of file diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/HttpFormClient.java b/play-services-base-core/src/main/java/org/microg/gms/common/HttpFormClient.java deleted file mode 100644 index ee9c79f7..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/HttpFormClient.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import android.net.Uri; -import android.util.Log; - -import java.io.IOException; -import java.io.OutputStream; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.reflect.Field; -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.List; -import java.util.Map; - -public class HttpFormClient { - private static final String TAG = "GmsHttpFormClient"; - - public static T request(String url, Request request, Class tClass) throws IOException { - HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); - connection.setRequestMethod("POST"); - connection.setDoInput(true); - connection.setDoOutput(true); - connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - StringBuilder content = new StringBuilder(); - request.prepare(); - for (Field field : request.getClass().getDeclaredFields()) { - try { - field.setAccessible(true); - Object objVal = field.get(request); - if (field.isAnnotationPresent(RequestContentDynamic.class)) { - Map contentParams = (Map) objVal; - for (Map.Entry param : contentParams.entrySet()) { - appendParam(content, param.getKey(), param.getValue()); - } - continue; - } - String value = objVal != null ? String.valueOf(objVal) : null; - Boolean boolVal = null; - if (field.getType().equals(boolean.class)) { - boolVal = field.getBoolean(request); - } - if (field.isAnnotationPresent(RequestHeader.class)) { - RequestHeader annotation = field.getAnnotation(RequestHeader.class); - value = valueFromBoolVal(value, boolVal, annotation.truePresent(), annotation.falsePresent()); - if (value != null || annotation.nullPresent()) { - for (String key : annotation.value()) { - connection.setRequestProperty(key, String.valueOf(value)); - } - } - } - if (field.isAnnotationPresent(RequestContent.class)) { - RequestContent annotation = field.getAnnotation(RequestContent.class); - value = valueFromBoolVal(value, boolVal, annotation.truePresent(), annotation.falsePresent()); - if (value != null || annotation.nullPresent()) { - for (String key : annotation.value()) { - appendParam(content, key, value); - } - } - } - } catch (Exception ignored) { - } - } - - Log.d(TAG, "-- Request --\n" + content); - String replace = content.toString().trim().replace("\n", ""); - OutputStream os = connection.getOutputStream(); - os.write(replace.trim().getBytes()); - os.close(); - - if (connection.getResponseCode() != 200) { - String error = connection.getResponseMessage(); - try { - error = new String(Utils.readStreamToEnd(connection.getErrorStream())); - } catch (IOException e) { - // Ignore - } - throw new IOException(error); - } - - String result = new String(Utils.readStreamToEnd(connection.getInputStream())); - Log.d(TAG, "-- Response --\n" + result); - return parseResponse(tClass, connection, result); - } - - private static String valueFromBoolVal(String value, Boolean boolVal, boolean truePresent, boolean falsePresent) { - if (boolVal != null) { - if (boolVal && truePresent) { - return "1"; - } else if (!boolVal && falsePresent) { - return "0"; - } else { - return null; - } - } else { - return value; - } - } - - private static void appendParam(StringBuilder content, String key, String value) { - if (content.length() > 0) - content.append("&"); - if (key.equals("token_request_options")) { - content.append(Uri.encode(key)).append("=").append(value); - } else { - content.append(Uri.encode(key)).append("=").append(Uri.encode(String.valueOf(value))); - } - } - - private static T parseResponse(Class tClass, HttpURLConnection connection, String result) throws IOException { - Map> headerFields = connection.getHeaderFields(); - T response; - try { - response = tClass.getConstructor().newInstance(); - } catch (Exception e) { - return null; - } - String[] entries = result.split("\n"); - for (String s : entries) { - String[] keyValuePair = s.split("=", 2); - String key = keyValuePair[0].trim(); - String value = keyValuePair[1].trim(); - boolean matched = false; - try { - for (Field field : tClass.getDeclaredFields()) { - if (field.isAnnotationPresent(ResponseField.class) && - key.equals(field.getAnnotation(ResponseField.class).value())) { - field.setAccessible(true); - matched = true; - if (field.getType().equals(String.class)) { - field.set(response, value); - } else if (field.getType().equals(boolean.class)) { - field.setBoolean(response, value.equals("1")); - } else if (field.getType().equals(long.class)) { - field.setLong(response, Long.parseLong(value)); - } else if (field.getType().equals(int.class)) { - field.setInt(response, Integer.parseInt(value)); - } - } - } - } catch (Exception e) { - Log.w(TAG, e); - } - if (!matched) { - Log.w(TAG, "Response line '" + s + "' not processed"); - } - } - for (Field field : tClass.getDeclaredFields()) { - if (field.isAnnotationPresent(ResponseHeader.class)) { - List strings = headerFields.get(field.getAnnotation(ResponseHeader.class).value()); - if (strings == null || strings.size() != 1) continue; - String value = strings.get(0); - try { - field.setAccessible(true); - if (field.getType().equals(String.class)) { - field.set(response, value); - } else if (field.getType().equals(boolean.class)) { - field.setBoolean(response, value.equals("1")); - } else if (field.getType().equals(long.class)) { - field.setLong(response, Long.parseLong(value)); - } else if (field.getType().equals(int.class)) { - field.setInt(response, Integer.parseInt(value)); - } - } catch (Exception e) { - Log.w(TAG, e); - } - } - if (field.isAnnotationPresent(ResponseStatusCode.class) && field.getType() == int.class) { - try { - field.setAccessible(true); - field.setInt(response, connection.getResponseCode()); - } catch (IllegalAccessException e) { - Log.w(TAG, e); - } - } - if (field.isAnnotationPresent(ResponseStatusText.class) && field.getType() == String.class) { - try { - field.setAccessible(true); - field.set(response, connection.getResponseMessage()); - } catch (IllegalAccessException e) { - Log.w(TAG, e); - } - } - } - return response; - } - - public static void requestAsync(final String url, final Request request, final Class tClass, - final Callback callback) { - new Thread(new Runnable() { - @Override - public void run() { - try { - callback.onResponse(request(url, request, tClass)); - } catch (Exception e) { - callback.onException(e); - } - } - }).start(); - } - - public static abstract class Request { - protected void prepare() { - } - } - - public interface Callback { - void onResponse(T response); - - void onException(Exception exception); - } - - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.FIELD) - public @interface RequestHeader { - public String[] value(); - - public boolean truePresent() default true; - - public boolean falsePresent() default false; - - public boolean nullPresent() default false; - } - - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.FIELD) - public @interface RequestContent { - public String[] value(); - - public boolean truePresent() default true; - - public boolean falsePresent() default false; - - public boolean nullPresent() default false; - } - - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.FIELD) - public @interface RequestContentDynamic { - } - - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.FIELD) - public @interface ResponseField { - public String value(); - } - - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.FIELD) - public @interface ResponseHeader { - public String value(); - } - - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.FIELD) - public @interface ResponseStatusCode { - } - - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.FIELD) - public @interface ResponseStatusText { - } -} \ No newline at end of file diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/MultiListenerProxy.java b/play-services-base-core/src/main/java/org/microg/gms/common/MultiListenerProxy.java deleted file mode 100644 index 66f44776..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/MultiListenerProxy.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import android.os.IInterface; -import android.util.Log; - -import androidx.annotation.NonNull; - -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.util.Collection; -import java.util.HashSet; -import java.util.Iterator; - -public class MultiListenerProxy implements InvocationHandler { - private static final String TAG = "GmsMultiListener"; - - public static T get(Class tClass, final Collection listeners) { - return get(tClass, new CollectionListenerPool<>(listeners)); - } - - public static T get(Class tClass, final ListenerPool listenerPool) { - return (T) Proxy.newProxyInstance(tClass.getClassLoader(), new Class[]{tClass}, new MultiListenerProxy<>(listenerPool)); - } - - private final ListenerPool listeners; - - private MultiListenerProxy(ListenerPool listeners) { - this.listeners = listeners; - } - - @Override - public Object invoke(Object proxy, Method method, Object[] args) { - for (T listener : new HashSet<>(listeners)) { - try { - method.invoke(listener, args); - } catch (Exception e) { - Log.w(TAG, e); - listeners.remove(listener); - } - } - return null; - } - - public static abstract class ListenerPool implements Collection { - @Override - public boolean addAll(Collection collection) { - return false; - } - - @Override - public boolean add(T object) { - return false; - } - - @Override - public boolean containsAll(Collection collection) { - for (Object o : collection) { - if (!contains(o)) return false; - } - return true; - } - - @Override - public boolean removeAll(Collection collection) { - boolean x = true; - for (Object o : collection) { - if (!remove(o)) x = false; - } - return x; - } - - @Override - public boolean retainAll(Collection collection) { - return false; - } - - @NonNull - @Override - public Object[] toArray() { - throw new IllegalArgumentException(); - } - - @NonNull - @Override - public T1[] toArray(T1[] array) { - throw new IllegalArgumentException(); - } - } - - private static class CollectionListenerPool extends ListenerPool { - - private final Collection listeners; - - public CollectionListenerPool(Collection listeners) { - this.listeners = listeners; - } - - @Override - public void clear() { - listeners.clear(); - } - - @Override - public boolean contains(Object object) { - return listeners.contains(object); - } - - @Override - public boolean isEmpty() { - return listeners.isEmpty(); - } - - @NonNull - @Override - public Iterator iterator() { - return listeners.iterator(); - } - - @Override - public boolean remove(Object object) { - return listeners.remove(object); - } - - @Override - public int size() { - return listeners.size(); - } - } - - public static class MultiCollectionListenerPool extends ListenerPool { - private final Collection> multiCol; - - public MultiCollectionListenerPool(Collection> multiCol) { - this.multiCol = multiCol; - } - - @Override - public void clear() { - for (Collection ts : multiCol) { - ts.clear(); - } - } - - @Override - public boolean contains(Object object) { - for (Collection ts : multiCol) { - if (ts.contains(object)) return true; - } - return false; - } - - @Override - public boolean isEmpty() { - for (Collection ts : multiCol) { - if (!ts.isEmpty()) return false; - } - return true; - } - - @NonNull - @Override - public Iterator iterator() { - final Iterator> interMed = multiCol.iterator(); - return new Iterator() { - private Iterator med; - - @Override - public boolean hasNext() { - while ((med == null || !med.hasNext()) && interMed.hasNext()) { - med = interMed.next().iterator(); - } - return med != null && med.hasNext(); - } - - @Override - public T next() { - while (med == null || !med.hasNext()) { - med = interMed.next().iterator(); - } - return med.next(); - } - - @Override - public void remove() { - med.remove(); - } - }; - } - - @Override - public boolean remove(Object object) { - for (Collection ts : multiCol) { - if (ts.remove(object)) return true; - } - return false; - } - - @Override - public int size() { - int sum = 0; - for (Collection ts : multiCol) { - sum += ts.size(); - } - return sum; - } - } -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/NonCancelToken.java b/play-services-base-core/src/main/java/org/microg/gms/common/NonCancelToken.java deleted file mode 100644 index 29cdba34..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/NonCancelToken.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import android.os.RemoteException; - -import com.google.android.gms.common.internal.ICancelToken; - -public class NonCancelToken extends ICancelToken.Stub { - @Override - public void cancel() throws RemoteException { - - } -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/PackageUtils.java b/play-services-base-core/src/main/java/org/microg/gms/common/PackageUtils.java deleted file mode 100644 index 62c2a478..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/PackageUtils.java +++ /dev/null @@ -1,458 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import android.app.ActivityManager; -import android.app.Application; -import android.app.PendingIntent; -import android.content.Context; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import android.content.pm.Signature; -import android.os.Binder; -import android.util.Log; - -import androidx.annotation.Nullable; -import org.microg.gms.utils.ExtendedPackageInfo; - -import java.lang.reflect.Method; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.Arrays; -import java.util.List; - -import static android.os.Build.VERSION.SDK_INT; -import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME; -import static org.microg.gms.common.Constants.GMS_PACKAGE_SIGNATURE_SHA1; -import static org.microg.gms.common.Constants.GMS_SECONDARY_PACKAGE_SIGNATURE_SHA1; - -public class PackageUtils { - - private static final String GOOGLE_PLATFORM_KEY = GMS_PACKAGE_SIGNATURE_SHA1; - private static final String GOOGLE_PLATFORM_KEY_2 = GMS_SECONDARY_PACKAGE_SIGNATURE_SHA1; - private static final String GOOGLE_APP_KEY = "24bb24c05e47e0aefa68a58a766179d9b613a600"; - private static final String[] GOOGLE_PRIMARY_KEYS = {GOOGLE_PLATFORM_KEY, GOOGLE_PLATFORM_KEY_2, GOOGLE_APP_KEY}; - -<<<<<<< HEAD:play-services-base-core/src/main/java/org/microg/gms/common/PackageUtils.java - private static final Map KNOWN_GOOGLE_PACKAGES; - - static { - KNOWN_GOOGLE_PACKAGES = new HashMap<>(); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.youtube.music", "afb0fed5eeaebdd86f56a97742f4b6b33ef59875"); -<<<<<<< HEAD:play-services-base-core/src/main/java/org/microg/gms/common/PackageUtils.java - KNOWN_GOOGLE_PACKAGES.put("com.google.android.youtube", "24bb24c05e47e0aefa68a58a766179d9b613a600"); -======= - KNOWN_GOOGLE_PACKAGES.put("com.google.android.vr.home", "fc1edc68f7e3e4963c998e95fc38f3de8d1bfc96"); - KNOWN_GOOGLE_PACKAGES.put("com.google.vr.cyclops", "188c5ca3863fa121216157a5baa80755ceda70ab"); - KNOWN_GOOGLE_PACKAGES.put("com.waze", "35b438fe1bc69d975dc8702dc16ab69ebf65f26f"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.wellbeing", "4ebdd02380f1fa0b6741491f0af35625dba76e9f"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.village.boond", "48e7985b8f901df335b5d5223579c81618431c7b"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.subscriptions.red", "de8304ace744ae4c4e05887a27a790815e610ff0"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.meetings", "47a6936b733dbdb45d71997fbe1d610eca36b8bf"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.nbu.paisa.user", "80df78bb700f9172bc671779b017ddefefcbf552"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.dynamite", "519c5a17a60596e6fe5933b9cb4285e7b0e5eb7b"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.projection.gearhead", "9ca91f9e704d630ef67a23f52bf1577a92b9ca5d"); - KNOWN_GOOGLE_PACKAGES.put("com.google.stadia.android", "133aad3b3d3b580e286573c37f20549f9d3d1cce"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.kids.familylink", "88652b8464743e5ce80da0d4b890d13f9b1873df"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.walletnfcrel", "82759e2db43f9ccbafce313bc674f35748fabd7a"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.recorder", "394d84cd2cf89d3453702c663f98ec6554afc3cd"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.messaging", "0980a12be993528c19107bc21ad811478c63cefc"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.tachyon", "a0bc09af527b6397c7a9ef171d6cf76f757becc3"); - KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.access.wifi.consumer", "d850379540d68fbec82a742ab6a8321a3f9a4c7c"); ->>>>>>> 21ac41f4 (Fix account access for google wifi (#2205)):play-services-base/core/src/main/java/org/microg/gms/common/PackageUtils.java - } - -======= - @Deprecated ->>>>>>> a9906e52 (Rework known google package system):play-services-base/core/src/main/java/org/microg/gms/common/PackageUtils.java - public static boolean isGooglePackage(Context context, String packageName) { - return new ExtendedPackageInfo(context, packageName).isGoogleOrPlatformPackage(); - } - - /** - * @deprecated Extended access is a deprecated concept - */ - @Deprecated - public static boolean callerHasExtendedAccessPermission(Context context) { - return context.checkCallingPermission("org.microg.gms.EXTENDED_ACCESS") == PackageManager.PERMISSION_GRANTED; - } - - public static void assertGooglePackagePermission(Context context, GooglePackagePermission permission) { - try { - if (!callerHasGooglePackagePermission(context, permission)) - throw new SecurityException("Access denied, missing google package permission for " + permission.name()); - } catch (SecurityException e) { - Log.w("ExtendedAccess", e); - throw e; - } - } - -<<<<<<< HEAD:play-services-base-core/src/main/java/org/microg/gms/common/PackageUtils.java - public static boolean isGooglePackage(String packageName, String signatureDigest) { - if (signatureDigest == null) return false; - if (Arrays.asList(GOOGLE_PRIMARY_KEYS).contains(signatureDigest)) return true; - if (!KNOWN_GOOGLE_PACKAGES.containsKey(packageName)) return false; - return KNOWN_GOOGLE_PACKAGES.get(packageName).equals(signatureDigest); - } - - public static void assertExtendedAccess(Context context) { - if (!callerHasExtendedAccess(context)) - throw new SecurityException("Access denied, missing EXTENDED_ACCESS permission"); - } - - public static boolean callerHasExtendedAccess(Context context) { - String[] packagesForUid = context.getPackageManager().getPackagesForUid(Binder.getCallingUid()); - if (packagesForUid != null && packagesForUid.length != 0) { - for (String packageName : packagesForUid) { - packageName = PackageSpoofUtils.spoofPackageName(context.getPackageManager(), packageName); - if (isGooglePackage(context, packageName) || GMS_PACKAGE_NAME.equals(packageName)) - return true; - } - } - return context.checkCallingPermission("org.mgoogle.gms.EXTENDED_ACCESS") == PackageManager.PERMISSION_GRANTED; -======= - public static boolean callerHasGooglePackagePermission(Context context, GooglePackagePermission permission) { - for (String packageCandidate : getCallingPackageCandidates(context)) { - if (new ExtendedPackageInfo(context, packageCandidate).hasGooglePackagePermission(permission)) { - return true; - } - } - - // TODO: Replace with explicit permission instead of generic "extended access" - if (callerHasExtendedAccessPermission(context)) return true; - - return false; ->>>>>>> a9906e52 (Rework known google package system):play-services-base/core/src/main/java/org/microg/gms/common/PackageUtils.java - } - - public static void checkPackageUid(Context context, String packageName, int callingUid) { - getAndCheckPackage(context, packageName, callingUid, 0); - } - - /** - * @deprecated We should stop using SHA-1 for certificate fingerprints! - */ - @Deprecated - @Nullable - public static String firstSignatureDigest(Context context, String packageName) { - return firstSignatureDigest(context.getPackageManager(), packageName); - } - - /** - * @deprecated We should stop using SHA-1 for certificate fingerprints! - */ - @Deprecated - @Nullable - public static String firstSignatureDigest(PackageManager packageManager, String packageName) { - if (packageName.equals("com.google.android.apps.youtube.music") || packageName.contains("youtube.music")) { - return "afb0fed5eeaebdd86f56a97742f4b6b33ef59875"; - } - if (packageName.equals("com.google.android.apps.youtube.unplugged") || packageName.contains("youtube.unplugged")) { - return "3a82b5ee26bc46bf68113d920e610cd090198d4a"; - } - if (packageName.equals("com.google.android.youtube.tv") || packageName.contains("youtube.tv")) { - return "61226bdb57cc32c8a2a9ef71f7bc9548e95dcc0b"; - } - if (packageName.equals("com.google.android.youtube") || packageName.contains("youtube")) { - return "24bb24c05e47e0aefa68a58a766179d9b613a600"; - } - final PackageInfo info; - try { - info = packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES); - } catch (PackageManager.NameNotFoundException e) { - return null; - } - if (info != null && info.signatures != null && info.signatures.length > 0) { - for (Signature sig : info.signatures) { - String digest = sha1sum(sig.toByteArray()); - if (digest != null) { - // spoof or use real one - return PackageSpoofUtils.spoofStringSignature(packageManager, packageName, digest); - } - } - } - return null; - } - - /** - * @deprecated We should stop using SHA-1 for certificate fingerprints! - */ - @Deprecated - @Nullable - public static byte[] firstSignatureDigestBytes(Context context, String packageName) { - return firstSignatureDigestBytes(context.getPackageManager(), packageName); - } - - /** - * @deprecated We should stop using SHA-1 for certificate fingerprints! - */ - @Deprecated - @Nullable - public static byte[] firstSignatureDigestBytes(PackageManager packageManager, String packageName) { - final PackageInfo info; - try { - info = packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES); - } catch (PackageManager.NameNotFoundException e) { - return null; - } - if (info != null && info.signatures != null && info.signatures.length > 0) { - for (Signature sig : info.signatures) { - byte[] digest = sha1bytes(sig.toByteArray()); - if (digest != null) { - // spoof or use real one - return PackageSpoofUtils.spoofBytesSignature(packageManager, packageName, digest); - } - } - } - return null; - } - - @Nullable - public static String getCallingPackage(Context context) { - int callingUid = Binder.getCallingUid(), callingPid = Binder.getCallingPid(); - String packageName = packageFromProcessId(context, callingPid); - if (packageName == null) { - packageName = firstPackageFromUserId(context, callingUid); - } - - // spoof or use real one - return PackageSpoofUtils.spoofPackageName(context.getPackageManager(), packageName); - } - - public static byte[] sha1bytes(byte[] bytes) { - MessageDigest md; - try { - md = MessageDigest.getInstance("SHA1"); - } catch (final NoSuchAlgorithmException e) { - return null; - } - if (md != null) { - return md.digest(bytes); - } - return null; - } - - public static String[] getCallingPackageCandidates(Context context) { - int callingUid = Binder.getCallingUid(), callingPid = Binder.getCallingPid(); - String packageName = packageFromProcessId(context, callingPid); - if (packageName != null) return new String[]{packageName}; - String[] candidates = context.getPackageManager().getPackagesForUid(callingUid); - if (candidates == null) return new String[0]; - return candidates; - } - - @Nullable - public static String getAndCheckCallingPackage(Context context, String suggestedPackageName) { - return getAndCheckCallingPackage(context, suggestedPackageName, 0); - } - - @Nullable - public static String getAndCheckCallingPackageOrImpersonation(Context context, String suggestedPackageName) { - try { - return getAndCheckCallingPackage(context, suggestedPackageName, 0); - } catch (Exception e) { - if (callerHasGooglePackagePermission(context, GooglePackagePermission.IMPERSONATE)) { - return suggestedPackageName; - } - throw e; - } - } - - @Nullable - public static String getAndCheckCallingPackage(Context context, int suggestedCallerUid) { - return getAndCheckCallingPackage(context, null, suggestedCallerUid); - } - - @Nullable - public static String getAndCheckCallingPackage(Context context, String suggestedPackageName, int suggestedCallerUid) { - return getAndCheckCallingPackage(context, suggestedPackageName, suggestedCallerUid, 0); - } - - @Nullable - public static String getAndCheckCallingPackage(Context context, String suggestedPackageName, int suggestedCallerUid, int suggestedCallerPid) { - int callingUid = Binder.getCallingUid(), callingPid = Binder.getCallingPid(); - if (suggestedCallerUid > 0 && suggestedCallerUid != callingUid) { - throw new SecurityException("suggested UID [" + suggestedCallerUid + "] and real calling UID [" + callingUid + "] mismatch!"); - } - if (suggestedCallerPid > 0 && suggestedCallerPid != callingPid) { - throw new SecurityException("suggested PID [" + suggestedCallerPid + "] and real calling PID [" + callingPid + "] mismatch!"); - } - return getAndCheckPackage(context, suggestedPackageName, callingUid, Binder.getCallingPid()); - } - - @Nullable - public static String getAndCheckPackage(Context context, String suggestedPackageName, int callingUid) { - return getAndCheckPackage(context, suggestedPackageName, callingUid, 0); - } - - @Nullable - public static String getAndCheckPackage(Context context, String suggestedPackageName, int callingUid, int callingPid) { - String packageName = packageFromProcessId(context, callingPid); - if (packageName == null) { - String[] packagesForUid = context.getPackageManager().getPackagesForUid(callingUid); - if (packagesForUid != null && packagesForUid.length != 0) { - if (packagesForUid.length == 1) { - packageName = packagesForUid[0]; - } else if (Arrays.asList(packagesForUid).contains(suggestedPackageName)) { - packageName = suggestedPackageName; - } else { - packageName = packagesForUid[0]; - } - } - } - if (packageName != null && suggestedPackageName != null && !packageName.equals(suggestedPackageName)) { - throw new SecurityException("UID [" + callingUid + "] is not related to packageName [" + suggestedPackageName + "] (seems to be " + packageName + ")"); - } - - // spoof or use real one - return PackageSpoofUtils.spoofPackageName(context.getPackageManager(), packageName); - } - - @Nullable - @Deprecated - public static String packageFromProcessId(Context context, int pid) { - ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); - if (manager == null) return null; - if (pid <= 0) return null; - List runningAppProcesses = manager.getRunningAppProcesses(); - if (runningAppProcesses != null) { - for (ActivityManager.RunningAppProcessInfo processInfo : runningAppProcesses) { - if (processInfo.pid == pid && processInfo.pkgList.length == 1) { - return processInfo.pkgList[0]; - } - } - } - return null; - } - - @Nullable - public static String firstPackageFromUserId(Context context, int uid) { - String[] packagesForUid = context.getPackageManager().getPackagesForUid(uid); - if (packagesForUid != null && packagesForUid.length != 0) { - return packagesForUid[0]; - } - return null; - } - - @SuppressWarnings("deprecation") - public static String packageFromPendingIntent(PendingIntent pi) { - if (pi == null) return null; - return pi.getCreatorPackage(); - } - - public static String getProcessName() { - if (android.os.Build.VERSION.SDK_INT >= 28) - return Application.getProcessName(); - try { - Class activityThread = Class.forName("android.app.ActivityThread"); - String methodName = "currentProcessName"; - Method getProcessName = activityThread.getDeclaredMethod(methodName); - return (String) getProcessName.invoke(null); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - public static boolean isPersistentProcess() { - String processName = getProcessName(); - if (processName == null) { - Log.w("GmsPackageUtils", "Can't determine process name of current process"); - return false; - } - return processName.endsWith(":persistent"); - } - - public static boolean isMainProcess(Context context) { - String processName = getProcessName(); - if (processName == null) { - Log.w("GmsPackageUtils", "Can't determine process name of current process"); - return false; - } - return processName.equals(context.getPackageName()); - } - - public static void warnIfNotPersistentProcess(Class clazz) { - if (!isPersistentProcess()) { - Log.w("GmsPackageUtils", clazz.getSimpleName() + " initialized outside persistent process", new RuntimeException()); - } - } - - public static void warnIfNotMainProcess(Context context, Class clazz) { - if (!isMainProcess(context)) { - Log.w("GmsPackageUtils", clazz.getSimpleName() + " initialized outside main process", new RuntimeException()); - } - } - - /** - * @deprecated We should stop using SHA-1 for certificate fingerprints! - */ - @Deprecated - public static String sha1sum(byte[] bytes) { - MessageDigest md; - try { - md = MessageDigest.getInstance("SHA1"); - } catch (final NoSuchAlgorithmException e) { - return null; - } - if (md != null) { - bytes = md.digest(bytes); - if (bytes != null) { - StringBuilder sb = new StringBuilder(2 * bytes.length); - for (byte b : bytes) { - sb.append(String.format("%02x", b)); - } - return sb.toString(); - } - } - return null; - } - -<<<<<<< HEAD:play-services-base-core/src/main/java/org/microg/gms/common/PackageUtils.java -======= - /** - * @deprecated We should stop using SHA-1 for certificate fingerprints! - */ - @Deprecated - public static byte[] sha1bytes(byte[] bytes) { - MessageDigest md; - try { - md = MessageDigest.getInstance("SHA1"); - } catch (final NoSuchAlgorithmException e) { - return null; - } - if (md != null) { - return md.digest(bytes); - } - return null; - } - - @Deprecated ->>>>>>> a9906e52 (Rework known google package system):play-services-base/core/src/main/java/org/microg/gms/common/PackageUtils.java - public static int versionCode(Context context, String packageName) { - return new ExtendedPackageInfo(context, packageName).getShortVersionCode(); - } - - @Deprecated - public static String versionName(Context context, String packageName) { - return new ExtendedPackageInfo(context, packageName).getVersionName(); - } - - @Deprecated - public static int targetSdkVersion(Context context, String packageName) { - return new ExtendedPackageInfo(context, packageName).getTargetSdkVersion(); - } -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/PhoneInfo.java b/play-services-base-core/src/main/java/org/microg/gms/common/PhoneInfo.java deleted file mode 100644 index 1fbc4bf9..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/PhoneInfo.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import java.util.Random; - -public class PhoneInfo { - public String cellOperator = "26207"; - public String roaming = "mobile-notroaming"; - public String simOperator = "26207"; - public String imsi = randomImsi(); - - private String randomImsi() { - Random random = new Random(); - StringBuilder sb = new StringBuilder(simOperator); - while (sb.length() < 15) { - sb.append(random.nextInt(10)); - } - return sb.toString(); - } -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/RemoteListenerProxy.java b/play-services-base-core/src/main/java/org/microg/gms/common/RemoteListenerProxy.java deleted file mode 100644 index bc310c1c..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/RemoteListenerProxy.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (C) 2013-2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import android.content.ComponentName; -import android.content.Context; -import android.content.Intent; -import android.content.ServiceConnection; -import android.content.pm.ResolveInfo; -import android.os.IBinder; -import android.os.IInterface; -import android.util.Log; - -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.util.ArrayList; -import java.util.List; - -public class RemoteListenerProxy implements ServiceConnection, InvocationHandler { - private static final String TAG = "GmsRemoteListener"; - private final Context context; - private final Intent searchIntent; - private final String bindAction; - private IBinder remote; - private boolean connecting; - private final List waiting = new ArrayList<>(); - private final Class tClass; - - public static T get(Context context, Intent intent, Class tClass, String bindAction) { - return (T) Proxy.newProxyInstance(tClass.getClassLoader(), new Class[]{tClass}, - new RemoteListenerProxy<>(context, intent, tClass, bindAction)); - } - - private RemoteListenerProxy(Context context, Intent intent, Class tClass, String bindAction) { - this.context = context; - this.searchIntent = intent; - this.tClass = tClass; - this.bindAction = bindAction; - } - - private boolean connect() { - synchronized (this) { - if (!connecting) { - try { - ResolveInfo resolveInfo = context.getPackageManager().resolveService(searchIntent, 0); - if (resolveInfo != null) { - Intent intent = new Intent(bindAction); - intent.setPackage(resolveInfo.serviceInfo.packageName); - intent.setClassName(resolveInfo.serviceInfo.packageName, resolveInfo.serviceInfo.name); - connecting = context.bindService(intent, this, Context.BIND_AUTO_CREATE); - if (!connecting) Log.d(TAG, "Could not connect to: " + intent); - return connecting; - } - return false; - } catch (Exception e) { - Log.w(TAG, e); - } - } - return true; - } - } - - private void runOncePossible(Runnable runnable) { - synchronized (this) { - if (remote == null) { - waiting.add(runnable); - } else { - runnable.run(); - } - } - } - - @Override - public void onServiceConnected(ComponentName name, IBinder service) { - synchronized (this) { - remote = service; - if (!waiting.isEmpty()) { - try { - for (Runnable runnable : waiting) { - runnable.run(); - } - } catch (Exception e) { - } - waiting.clear(); - try { - context.unbindService(RemoteListenerProxy.this); - } catch (Exception e) { - } - connecting = false; - remote = null; - } - } - } - - @Override - public void onServiceDisconnected(ComponentName name) { - synchronized (this) { - remote = null; - } - } - - @Override - public Object invoke(Object proxy, final Method method, final Object[] args) throws Throwable { - if (method.getDeclaringClass().equals(tClass)) { - runOncePossible(() -> { - try { - Object asInterface = Class.forName(tClass.getName() + "$Stub").getMethod("asInterface", IBinder.class).invoke(null, remote); - method.invoke(asInterface, args); - } catch (Exception e) { - Log.w(TAG, e); - } - }); - connect(); - return null; - } else if (method.getDeclaringClass().equals(Object.class)) { - return method.invoke(this, args); - } - return null; - } -} diff --git a/play-services-base-core/src/main/java/org/microg/gms/common/Utils.java b/play-services-base-core/src/main/java/org/microg/gms/common/Utils.java deleted file mode 100644 index 1aa984a2..00000000 --- a/play-services-base-core/src/main/java/org/microg/gms/common/Utils.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import static android.content.pm.PackageManager.PERMISSION_GRANTED; - -import android.content.Context; -import android.util.Log; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Locale; - -public class Utils { - - public static Locale getLocale(Context context) { - return Locale.getDefault(); // TODO - } - - public static DeviceIdentifier getDeviceIdentifier(Context context) { - return new DeviceIdentifier(); - } - - public static PhoneInfo getPhoneInfo(Context context) { - return new PhoneInfo(); - } - - public static boolean hasSelfPermissionOrNotify(Context context, String permission) { - if (context.checkCallingOrSelfPermission(permission) != PERMISSION_GRANTED) { - Log.w("GmsUtils", "Lacking permission to " + permission + " for pid:" + android.os.Process.myPid() + " uid:" + android.os.Process.myUid()); - try { - //TODO: Toast.makeText(context, context.getString(R.string.lacking_permission_toast, permission), Toast.LENGTH_SHORT).show(); - } catch (RuntimeException e) { - } - return false; - } - return true; - } - - public static byte[] readStreamToEnd(final InputStream is) throws IOException { - final ByteArrayOutputStream bos = new ByteArrayOutputStream(); - if (is != null) { - final byte[] buff = new byte[1024]; - int read; - do { - bos.write(buff, 0, (read = is.read(buff)) < 0 ? 0 : read); - } while (read >= 0); - is.close(); - } - return bos.toByteArray(); - } -} diff --git a/play-services-base-core/src/main/kotlin/org/microg/gms/common/PackageSpoofUtils.kt b/play-services-base-core/src/main/kotlin/org/microg/gms/common/PackageSpoofUtils.kt deleted file mode 100644 index 94ec088d..00000000 --- a/play-services-base-core/src/main/kotlin/org/microg/gms/common/PackageSpoofUtils.kt +++ /dev/null @@ -1,155 +0,0 @@ -package org.microg.gms.common - -import android.content.pm.PackageManager -import android.os.Bundle -import android.util.Log - -/** - * utilities to spoof package information - */ -internal object PackageSpoofUtils { - private const val TAG = "SpoofUtils" - private const val META_SPOOF_PACKAGE_NAME = - "com.mgoogle.android.gms.SPOOFED_PACKAGE_NAME" - private const val META_SPOOF_PACKAGE_SIGNATURE = - "com.mgoogle.android.gms.SPOOFED_PACKAGE_SIGNATURE" - - private val spoofedPackageNameCache = HashMap() - private val spoofedPackageSignatureCache = HashMap() - - /** - * spoof the package name of a package, if a spoofed name is set - * - * @param packageManager manager used to get package information - * @param realPackageName the real package name - * @return either the spoofed or the real package name, depending on if the package requested spoofing - */ - @JvmStatic - fun spoofPackageName( - packageManager: PackageManager, - realPackageName: String? - ): String? { - if (realPackageName.isNullOrEmpty()) return realPackageName - - val spoofedPackageName = getSpoofedPackageName(packageManager, realPackageName) - return if (!spoofedPackageName.isNullOrEmpty()) { - Log.i(TAG, "package name of $realPackageName spoofed to $spoofedPackageName") - spoofedPackageName - } else realPackageName - } - - /** - * spoof the signature of a package, if a spoofed name is set - * - * @param packageManager manager used to get package information - * @param packageName name of the package to check - * @param realSignature the real package signature - * @return either the spoofed or the real signature, depending on if the package requested spoofing - */ - @JvmStatic - @JvmName("spoofStringSignature") - fun spoofSignature( - packageManager: PackageManager, - packageName: String, - realSignature: String? - ): String? { - val spoofedSignature = getSpoofedSignature(packageManager, packageName) - return if (!spoofedSignature.isNullOrEmpty()) { - Log.i(TAG, "package signature of $packageName spoofed to $spoofedSignature") - spoofedSignature - } else realSignature - } - - /** - * spoof the signature of a package, if a spoofed name is set - * - * @param packageManager manager used to get package information - * @param packageName name of the package to check - * @param realSignature the real package signature - * @return either the spoofed or the real signature, depending on if the package requested spoofing - */ - @JvmStatic - @JvmName("spoofBytesSignature") - fun spoofSignature( - packageManager: PackageManager, - packageName: String, - realSignature: ByteArray? - ): ByteArray? { - val spoofedSignatureString = getSpoofedSignature(packageManager, packageName) - return if (!spoofedSignatureString.isNullOrEmpty()) { - Log.i(TAG, "package signature of $packageName spoofed to $spoofedSignatureString") - - // convert hex string to bytes - spoofedSignatureString.chunked(2) - .map { it.toInt(16).toByte() } - .toByteArray() - } else realSignature - } - - /** - * get the spoofed package name for a package - * - * @param packageManager manager used to get package information - * @param packageName name of the package to get spoofed name of - * @return spoofed name string, or null if none set - */ - private fun getSpoofedPackageName( - packageManager: PackageManager, - packageName: String - ): String? { - return spoofedPackageNameCache[packageName] ?: run { - // fetch value - val meta = getPackageMetadata(packageManager, packageName) - val spoofedPackageName = meta?.getString(META_SPOOF_PACKAGE_NAME) - if (spoofedPackageName != null) { - spoofedPackageNameCache[packageName] = spoofedPackageName - } - - spoofedPackageName - } - } - - /** - * get the spoofed package signature for a package - * - * @param packageManager manager used to get package information - * @param packageName name of the package to get spoofed signature of - * @return spoofed signature string, or null if none set - */ - private fun getSpoofedSignature( - packageManager: PackageManager, - packageName: String - ): String? { - return spoofedPackageSignatureCache[packageName] ?: run { - // fetch value - val meta = getPackageMetadata(packageManager, packageName) - val spoofedSignature = meta?.getString(META_SPOOF_PACKAGE_SIGNATURE) - if (spoofedSignature != null) { - spoofedPackageSignatureCache[packageName] = spoofedSignature - } - - spoofedSignature - } - } - - /** - * get package metadata - * - * @param packageManager manager used to get package information - * @param packageName name of the package to get metadata of - * @return package metadata bundle - */ - private fun getPackageMetadata(packageManager: PackageManager, packageName: String): Bundle? { - return try { - // PackageManager.getPackageInfo() has been deprecated in targetSdkVersion 30+ - // To solve this, add the QUERY_ALL_PACKAGES permission to AndroidManifest.xml - packageManager - .getPackageInfo(packageName, PackageManager.GET_META_DATA) - ?.applicationInfo - ?.metaData - } catch (e: PackageManager.NameNotFoundException) { - Log.e(TAG, "failed to get application metadata for $packageName", e) - null - } - } -} diff --git a/play-services-base-core/src/main/kotlin/org/microg/gms/profile/Build.kt b/play-services-base-core/src/main/kotlin/org/microg/gms/profile/Build.kt deleted file mode 100644 index c0398c2b..00000000 --- a/play-services-base-core/src/main/kotlin/org/microg/gms/profile/Build.kt +++ /dev/null @@ -1,98 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.profile - -object Build { - @JvmField - var BOARD: String? = null - - @JvmField - var BOOTLOADER: String? = null - - @JvmField - var BRAND: String? = null - - @JvmField - var CPU_ABI: String? = null - - @JvmField - var CPU_ABI2: String? = null - - @JvmField - var SUPPORTED_ABIS: Array = emptyArray() - - @JvmField - var DEVICE: String? = null - - @JvmField - var DISPLAY: String? = null - - @JvmField - var FINGERPRINT: String? = null - - @JvmField - var HARDWARE: String? = null - - @JvmField - var HOST: String? = null - - @JvmField - var ID: String? = null - - @JvmField - var MANUFACTURER: String? = null - - @JvmField - var MODEL: String? = null - - @JvmField - var PRODUCT: String? = null - - @JvmField - var RADIO: String? = null - - @JvmField - var SERIAL: String? = null - - @JvmField - var TAGS: String? = null - - @JvmField - var TIME: Long = 0L - - @JvmField - var TYPE: String? = null - - @JvmField - var USER: String? = null - - object VERSION { - @JvmField - var CODENAME: String? = null - - @JvmField - var INCREMENTAL: String? = null - - @JvmField - var RELEASE: String? = null - - @JvmField - var SDK: String? = null - - @JvmField - var SDK_INT: Int = 0 - - @JvmField - var SECURITY_PATCH: String? = null - } - - fun generateWebViewUserAgentString(original: String): String { - if (!original.startsWith("Mozilla/5.0 (")) return original - val closeParen: Int = original.indexOf(')') - - return "Mozilla/5.0 (Linux; Android ${VERSION.RELEASE}; $MODEL Build/$ID; wv)${original.substring(closeParen + 1)}" - } -} diff --git a/play-services-base-core/src/main/kotlin/org/microg/gms/profile/ProfileManager.kt b/play-services-base-core/src/main/kotlin/org/microg/gms/profile/ProfileManager.kt deleted file mode 100644 index abcdb8d1..00000000 --- a/play-services-base-core/src/main/kotlin/org/microg/gms/profile/ProfileManager.kt +++ /dev/null @@ -1,377 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.profile - -import android.annotation.SuppressLint -import android.content.Context -import android.content.pm.PackageManager -import android.content.res.XmlResourceParser -import android.net.Uri -import android.os.Bundle -import android.util.Log -import org.microg.gms.utils.FileXmlResourceParser -import org.microg.mgms.settings.SettingsContract -import org.microg.mgms.settings.SettingsContract.Profile -import org.xmlpull.v1.XmlPullParser -import java.io.File -import java.util.* -import kotlin.random.Random - -@Suppress("Warnings") -object ProfileManager { - private const val TAG = "ProfileManager" - const val META_DATA_KEY_SOURCE_PACKAGE = "org.microg.gms.profile:source-package" - const val PROFILE_REAL = "real" - const val PROFILE_AUTO = "auto" - const val PROFILE_NATIVE = "native" - const val PROFILE_USER = "user" - const val PROFILE_SYSTEM = "system" - const val PROFILE_REMOTE = "remote" - - private var activeProfile: String? = null - - private fun getUserProfileFile(context: Context): File = File(context.filesDir, "device_profile.xml") - private fun getSystemProfileFile(): File = File("/system/etc/microg_device_profile.xml") - private fun getProfileResId(context: Context, profile: String) = context.resources.getIdentifier("${context.packageName}:xml/profile_$profile".lowercase(Locale.US), null, null) - - fun getConfiguredProfile(context: Context): String = Profile.getContentUri(context)?.let { - SettingsContract.getSettings(context, - it, arrayOf(Profile.PROFILE)) { it.getString(0) } - } - ?: PROFILE_AUTO - - fun getAutoProfile(context: Context): String { - if (hasProfile(context, PROFILE_SYSTEM) && isAutoProfile(context, PROFILE_SYSTEM)) return PROFILE_SYSTEM - val profile = "${android.os.Build.PRODUCT}_${android.os.Build.VERSION.SDK_INT}" - if (hasProfile(context, profile) && isAutoProfile(context, profile)) return profile - return PROFILE_NATIVE - } - - fun hasProfile(context: Context, profile: String): Boolean = when (profile) { - PROFILE_AUTO -> hasProfile(context, getAutoProfile(context)) - PROFILE_NATIVE, PROFILE_REAL -> true - PROFILE_USER -> getUserProfileFile(context).exists() - PROFILE_SYSTEM -> getSystemProfileFile().exists() - else -> getProfileResId(context, profile) != 0 - } - - private fun getProfileXml(context: Context, profile: String): XmlResourceParser? = kotlin.runCatching { - when (profile) { - PROFILE_AUTO -> getProfileXml(context, getAutoProfile(context)) - PROFILE_NATIVE, PROFILE_REAL -> null - PROFILE_USER -> FileXmlResourceParser(getUserProfileFile(context)) - PROFILE_SYSTEM -> FileXmlResourceParser(getSystemProfileFile()) - else -> { - val profileResId = getProfileResId(context, profile) - if (profileResId == 0) return@runCatching null - context.resources.getXml(profileResId) - } - } - }.getOrNull() - - fun isAutoProfile(context: Context, profile: String): Boolean = kotlin.runCatching { - when (profile) { - PROFILE_AUTO -> false - PROFILE_REAL -> false - PROFILE_NATIVE -> true - else -> getProfileXml(context, profile)?.use { - var next = it.next() - while (next != XmlPullParser.END_DOCUMENT) { - when (next) { - XmlPullParser.START_TAG -> when (it.name) { - "profile" -> { - return@use it.getAttributeBooleanValue(null, "auto", false) - } - } - } - next = it.next() - } - } == true - } - }.getOrDefault(false) - - private fun getProfileData(context: Context, profile: String, realData: Map): Map { - try { - if (profile in listOf(PROFILE_REAL, PROFILE_NATIVE)) return realData - val profileResId = getProfileResId(context, profile) - if (profileResId == 0) return realData - val resultData = mutableMapOf() - resultData.putAll(realData) - getProfileXml(context, profile)?.use { - var next = it.next() - while (next != XmlPullParser.END_DOCUMENT) { - when (next) { - XmlPullParser.START_TAG -> when (it.name) { - "data" -> { - val key = it.getAttributeValue(null, "key") - val value = it.getAttributeValue(null, "value") - resultData[key] = value - Log.d(TAG, "Overwrite from profile: $key = $value") - } - } - } - next = it.next() - } - } - return resultData - } catch (e: Exception) { - Log.w(TAG, e) - return realData - } - } - - private fun getRemoteProfileData(context: Context, packageName: String): Map { - val data = mutableMapOf() - val cursor = context.contentResolver.query(Uri.parse("content://${packageName}.microg.profile"), null, null, null, null) - cursor?.use { - while (cursor.moveToNext()) { - data[cursor.getString(0)] = cursor.getString(1) - } - } - return data - } - - private fun getProfile(context: Context) = getConfiguredProfile(context).let { if (it != PROFILE_AUTO) it else getAutoProfile(context) } - private fun getSerialFromSettings(context: Context): String? = - Profile.getContentUri(context)?.let { - SettingsContract.getSettings(context, - it, arrayOf(Profile.SERIAL)) { it.getString(0) } - } - private fun saveSerial(context: Context, serial: String) = - Profile.getContentUri(context) - ?.let { SettingsContract.setSettings(context, it) { put(Profile.SERIAL, serial) } } - - private fun randomSerial(template: String, prefixLength: Int = (template.length / 2).coerceAtMost(6)): String { - val serial = StringBuilder() - template.forEachIndexed { index, c -> - serial.append(when { - index < prefixLength -> c - c.isDigit() -> '0' + Random.nextInt(10) - c.isLowerCase() && c <= 'f' -> 'a' + Random.nextInt(6) - c.isLowerCase() -> 'a' + Random.nextInt(26) - c.isUpperCase() && c <= 'F' -> 'A' + Random.nextInt(6) - c.isUpperCase() -> 'A' + Random.nextInt(26) - else -> c - }) - } - return serial.toString() - } - - @SuppressLint("MissingPermission") - private fun getProfileSerialTemplate(context: Context, profile: String): String { - // Native - if (profile in listOf(PROFILE_REAL, PROFILE_NATIVE)) { - var candidate = try { - if (android.os.Build.VERSION.SDK_INT >= 26) { - android.os.Build.getSerial() - } else { - android.os.Build.SERIAL - } - } catch (e: Exception) { - android.os.Build.SERIAL - } - if (candidate != android.os.Build.UNKNOWN) return candidate - } - - // From profile - try { - getProfileXml(context, profile)?.use { - var next = it.next() - while (next != XmlPullParser.END_DOCUMENT) { - when (next) { - XmlPullParser.START_TAG -> when (it.name) { - "serial" -> return it.getAttributeValue(null, "template") - } - } - next = it.next() - } - } - } catch (e: Exception) { - Log.w(TAG, e) - } - - // Fallback - return randomSerial("008741A0B2C4D6E8") - } - - @SuppressLint("MissingPermission") - fun getSerial(context: Context, profile: String = getProfile(context), local: Boolean = false): String { - if (!local) getSerialFromSettings(context)?.let { return it } - val serialTemplate = getProfileSerialTemplate(context, profile) - val serial = when { - profile == PROFILE_REAL && serialTemplate != android.os.Build.UNKNOWN -> serialTemplate - else -> randomSerial(serialTemplate) - } - if (!local) saveSerial(context, serial) - return serial - } - - private fun getRealData(): Map = mutableMapOf( - "Build.BOARD" to android.os.Build.BOARD, - "Build.BOOTLOADER" to android.os.Build.BOOTLOADER, - "Build.BRAND" to android.os.Build.BRAND, - "Build.CPU_ABI" to android.os.Build.CPU_ABI, - "Build.CPU_ABI2" to android.os.Build.CPU_ABI2, - "Build.DEVICE" to android.os.Build.DEVICE, - "Build.DISPLAY" to android.os.Build.DISPLAY, - "Build.FINGERPRINT" to android.os.Build.FINGERPRINT, - "Build.HARDWARE" to android.os.Build.HARDWARE, - "Build.HOST" to android.os.Build.HOST, - "Build.ID" to android.os.Build.ID, - "Build.MANUFACTURER" to android.os.Build.MANUFACTURER, - "Build.MODEL" to android.os.Build.MODEL, - "Build.PRODUCT" to android.os.Build.PRODUCT, - "Build.RADIO" to android.os.Build.RADIO, - "Build.SERIAL" to android.os.Build.SERIAL, - "Build.TAGS" to android.os.Build.TAGS, - "Build.TIME" to android.os.Build.TIME.toString(), - "Build.TYPE" to android.os.Build.TYPE, - "Build.USER" to android.os.Build.USER, - "Build.VERSION.CODENAME" to android.os.Build.VERSION.CODENAME, - "Build.VERSION.INCREMENTAL" to android.os.Build.VERSION.INCREMENTAL, - "Build.VERSION.RELEASE" to android.os.Build.VERSION.RELEASE, - "Build.VERSION.SDK" to android.os.Build.VERSION.SDK, - "Build.VERSION.SDK_INT" to android.os.Build.VERSION.SDK_INT.toString() - ).apply { - if (android.os.Build.VERSION.SDK_INT >= 21) { - put("Build.SUPPORTED_ABIS", android.os.Build.SUPPORTED_ABIS.joinToString(",")) - } - if (android.os.Build.VERSION.SDK_INT >= 23) { - put("Build.VERSION.SECURITY_PATCH", android.os.Build.VERSION.SECURITY_PATCH) - } - } - - private fun applyProfileData(profileData: Map) { - fun applyStringField(key: String, valueSetter: (String) -> Unit) = profileData[key]?.let { valueSetter(it) } - fun applyIntField(key: String, valueSetter: (Int) -> Unit) = profileData[key]?.toIntOrNull()?.let { valueSetter(it) } - fun applyLongField(key: String, valueSetter: (Long) -> Unit) = profileData[key]?.toLongOrNull()?.let { valueSetter(it) } - - applyStringField("Build.BOARD") { Build.BOARD = it } - applyStringField("Build.BOOTLOADER") { Build.BOOTLOADER = it } - applyStringField("Build.BRAND") { Build.BRAND = it } - applyStringField("Build.CPU_ABI") { Build.CPU_ABI = it } - applyStringField("Build.CPU_ABI2") { Build.CPU_ABI2 = it } - applyStringField("Build.DEVICE") { Build.DEVICE = it } - applyStringField("Build.DISPLAY") { Build.DISPLAY = it } - applyStringField("Build.FINGERPRINT") { Build.FINGERPRINT = it } - applyStringField("Build.HARDWARE") { Build.HARDWARE = it } - applyStringField("Build.HOST") { Build.HOST = it } - applyStringField("Build.ID") { Build.ID = it } - applyStringField("Build.MANUFACTURER") { Build.MANUFACTURER = it } - applyStringField("Build.MODEL") { Build.MODEL = it } - applyStringField("Build.PRODUCT") { Build.PRODUCT = it } - applyStringField("Build.RADIO") { Build.RADIO = it } - applyStringField("Build.SERIAL") { Build.SERIAL = it } - applyStringField("Build.TAGS") { Build.TAGS = it } - applyLongField("Build.TIME") { Build.TIME = it } - applyStringField("Build.TYPE") { Build.TYPE = it } - applyStringField("Build.USER") { Build.USER = it } - applyStringField("Build.VERSION.CODENAME") { Build.VERSION.CODENAME = it } - applyStringField("Build.VERSION.INCREMENTAL") { Build.VERSION.INCREMENTAL = it } - applyStringField("Build.VERSION.RELEASE") { Build.VERSION.RELEASE = it } - applyStringField("Build.VERSION.SDK") { Build.VERSION.SDK = it } - applyIntField("Build.VERSION.SDK_INT") { Build.VERSION.SDK_INT = it } - if (android.os.Build.VERSION.SDK_INT >= 21) { - Build.SUPPORTED_ABIS = profileData["Build.SUPPORTED_ABIS"]?.split(",")?.toTypedArray() ?: emptyArray() - } else { - Build.SUPPORTED_ABIS = emptyArray() - } - if (android.os.Build.VERSION.SDK_INT >= 23) { - Build.VERSION.SECURITY_PATCH = profileData["Build.VERSION.SECURITY_PATCH"] - } else { - Build.VERSION.SECURITY_PATCH = null - } - } - - private fun applyProfile(context: Context, profile: String, serial: String = getSerial(context, profile)) { - val profileData = getProfileData(context, profile, getRealData()) - if (Log.isLoggable(TAG, Log.VERBOSE)) { - for ((key, value) in profileData) { - Log.v(TAG, "") - } - } - applyProfileData(profileData) - Build.SERIAL = serial - Log.d(TAG, "Using Serial ${Build.SERIAL}") - activeProfile = profile - } - - private fun applyRemoteProfile(context: Context, packageName: String) { - val profileData = getRemoteProfileData(context, packageName) - if (Log.isLoggable(TAG, Log.VERBOSE)) { - for ((key, value) in profileData) { - Log.v(TAG, "") - } - } - applyProfileData(profileData) - activeProfile = PROFILE_REMOTE - } - - fun getProfileName(context: Context, profile: String): String? = getProfileName { getProfileXml(context, profile) } - - private fun getProfileName(parserCreator: () -> XmlResourceParser?): String? = parserCreator()?.use { - var next = it.next() - while (next != XmlPullParser.END_DOCUMENT) { - when (next) { - XmlPullParser.START_TAG -> when (it.name) { - "profile" -> { - return@use it.getAttributeValue(null, "name") - } - } - } - next = it.next() - } - null - } - - fun setProfile(context: Context, profile: String?) { - val changed = getProfile(context) != profile - val newProfile = profile ?: PROFILE_AUTO - val newSerial = if (changed) getSerial(context, newProfile, true) else getSerial(context) - Profile.getContentUri(context)?.let { - SettingsContract.setSettings(context, it) { - put(Profile.PROFILE, newProfile) - if (changed) put(Profile.SERIAL, newSerial) - } - } - if (changed && activeProfile != null) applyProfile(context, newProfile, newSerial) - } - - fun importUserProfile(context: Context, file: File): Boolean { - val profileName = getProfileName { FileXmlResourceParser(file) } ?: return false - try { - Log.d(TAG, "Importing user profile '$profileName'") - file.copyTo(getUserProfileFile(context)) - if (activeProfile == PROFILE_USER) applyProfile(context, PROFILE_USER) - return true - } catch (e: Exception) { - Log.w(TAG, e) - return false - } - } - - @JvmStatic - fun ensureInitialized(context: Context) { - val metaData = runCatching { context.packageManager.getApplicationInfo(context.packageName, PackageManager.GET_META_DATA).metaData }.getOrNull() ?: Bundle.EMPTY - synchronized(this) { - try { - if (metaData.containsKey(META_DATA_KEY_SOURCE_PACKAGE)) { - if (activeProfile != PROFILE_REMOTE) { - val packageName = metaData.getString(META_DATA_KEY_SOURCE_PACKAGE)!! - applyRemoteProfile(context, packageName) - } - } else { - val profile = getProfile(context) - if (activeProfile == profile) return - applyProfile(context, profile) - } - } catch (e: Exception) { - Log.w(TAG, e) - } - Unit - } - } -} diff --git a/play-services-base-core/src/main/kotlin/org/microg/gms/utils/BinderUtils.kt b/play-services-base-core/src/main/kotlin/org/microg/gms/utils/BinderUtils.kt deleted file mode 100644 index 79e8ff8f..00000000 --- a/play-services-base-core/src/main/kotlin/org/microg/gms/utils/BinderUtils.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.utils - -import android.os.Binder -import android.os.IBinder -import android.os.Parcel -import android.util.Log - -private const val TAG = "BinderUtils" - -fun IBinder.warnOnTransactionIssues(code: Int, reply: Parcel?, flags: Int, base: () -> Boolean): Boolean { - if (base.invoke()) { - if ((flags and Binder.FLAG_ONEWAY) > 0 && (reply?.dataSize() ?: 0) > 0) { - Log.w(TAG, "Method $code in $interfaceDescriptor is oneway, but returned data") - } - return true - } - Log.w(TAG, "Unknown method $code in $interfaceDescriptor, skipping") - return (flags and Binder.FLAG_ONEWAY) > 0 // Don't return false on oneway transaction to suppress warning -} diff --git a/play-services-base-core/src/main/kotlin/org/microg/gms/utils/ExtendedPackageInfo.kt b/play-services-base-core/src/main/kotlin/org/microg/gms/utils/ExtendedPackageInfo.kt deleted file mode 100644 index af5a4b15..00000000 --- a/play-services-base-core/src/main/kotlin/org/microg/gms/utils/ExtendedPackageInfo.kt +++ /dev/null @@ -1,54 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.utils - -import android.content.Context -import android.content.pm.PackageManager -import androidx.core.content.pm.PackageInfoCompat -import org.microg.gms.common.* - -class ExtendedPackageInfo(private val packageManager: PackageManager, val packageName: String) { - constructor(context: Context, packageName: String) : this(context.packageManager, packageName) - - private val basicPackageInfo by lazy { kotlin.runCatching { packageManager.getPackageInfo(packageName, 0) }.getOrNull() } - private val basicApplicationInfo by lazy { kotlin.runCatching { packageManager.getApplicationInfo(packageName, 0) }.getOrNull() } - - val isInstalled by lazy { basicPackageInfo != null } - - val certificates by lazy { packageManager.getCertificates(packageName) } - private val certificatesHashSha1 by lazy { certificates.map { it.digest("SHA1") } } - val firstCertificateSha1 by lazy { certificatesHashSha1.firstOrNull() } - val firstCertificateSha1Hex by lazy { firstCertificateSha1?.toHexString() } - private val certificatesHashSha256 by lazy { certificates.map { it.digest("SHA-256") } } - val firstCertificateSha256 by lazy { certificatesHashSha256.firstOrNull() } - private val certificatesHashSha1Strings by lazy { certificatesHashSha1.map { it.toHexString() } } - private val certificatesHashSha256Strings by lazy { certificatesHashSha256.map { it.toHexString() } } - - val applicationLabel by lazy { packageManager.getApplicationLabel(packageName) } - - @Deprecated("version code is now a long", replaceWith = ReplaceWith("versionCode")) - val shortVersionCode by lazy { basicPackageInfo?.versionCode ?: -1 } - val versionCode by lazy { basicPackageInfo?.let { PackageInfoCompat.getLongVersionCode(it) } ?: -1 } - val versionName by lazy { basicPackageInfo?.versionName } - - val targetSdkVersion by lazy { basicApplicationInfo?.targetSdkVersion ?: -1 } - - private val packageAndCertHashes by lazy { - listOf( - certificatesHashSha1Strings.map { PackageAndCertHash(packageName, "SHA1", it) }, - certificatesHashSha256Strings.map { PackageAndCertHash(packageName, "SHA-256", it) }, - ).flatten() - } - val isGooglePackage by lazy { packageAndCertHashes.any { isGooglePackage(it) } } - val isPlatformPackage by lazy { - val platformCertificates = packageManager.getPlatformCertificates() - certificates.any { it in platformCertificates } - } - val isGoogleOrPlatformPackage by lazy { isGooglePackage || isPlatformPackage } - - private val googlePackagePermissions by lazy { packageAndCertHashes.flatMap { getGooglePackagePermissions(it) }.toSet() } - fun hasGooglePackagePermission(permission: GooglePackagePermission) = permission in googlePackagePermissions -} \ No newline at end of file diff --git a/play-services-base-core/src/main/kotlin/org/microg/gms/utils/FileXmlResourceParser.kt b/play-services-base-core/src/main/kotlin/org/microg/gms/utils/FileXmlResourceParser.kt deleted file mode 100644 index 689d0f46..00000000 --- a/play-services-base-core/src/main/kotlin/org/microg/gms/utils/FileXmlResourceParser.kt +++ /dev/null @@ -1,127 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.utils - -import android.content.res.XmlResourceParser -import android.util.Xml -import org.xmlpull.v1.XmlPullParser -import java.io.Closeable -import java.io.File -import java.io.FileReader -import java.io.Reader - -class FileXmlResourceParser(private val reader: Reader, private val parser: XmlPullParser = Xml.newPullParser()) : - XmlResourceParser, - XmlPullParser by parser, - Closeable by reader { - constructor(file: File) : this(FileReader(file)) - - init { - parser.setInput(reader) - } - - override fun getAttributeNameResource(index: Int): Int { - return 0 - } - - override fun getAttributeListValue( - namespace: String?, attribute: String?, - options: Array?, defaultValue: Int - ): Int { - val s = getAttributeValue(namespace, attribute) - return s?.toInt() ?: defaultValue - } - - override fun getAttributeBooleanValue( - namespace: String?, attribute: String?, - defaultValue: Boolean - ): Boolean { - - val s = getAttributeValue(namespace, attribute) - return s?.toBooleanStrictOrNull() ?: defaultValue - } - - override fun getAttributeResourceValue( - namespace: String?, attribute: String?, - defaultValue: Int - ): Int { - val s = getAttributeValue(namespace, attribute) - return s?.toInt() ?: defaultValue - } - - override fun getAttributeIntValue( - namespace: String?, attribute: String?, - defaultValue: Int - ): Int { - val s = getAttributeValue(namespace, attribute) - return s?.toInt() ?: defaultValue - } - - override fun getAttributeUnsignedIntValue( - namespace: String?, attribute: String?, - defaultValue: Int - ): Int { - val s = getAttributeValue(namespace, attribute) - return s?.toInt() ?: defaultValue - } - - override fun getAttributeFloatValue( - namespace: String?, attribute: String?, - defaultValue: Float - ): Float { - val s = getAttributeValue(namespace, attribute) - return s?.toFloat() ?: defaultValue - } - - override fun getAttributeListValue( - index: Int, - options: Array?, defaultValue: Int - ): Int { - val s = getAttributeValue(index) - return s?.toInt() ?: defaultValue - } - - override fun getAttributeBooleanValue(index: Int, defaultValue: Boolean): Boolean { - val s = getAttributeValue(index) - return s?.toBooleanStrictOrNull() ?: defaultValue - } - - override fun getAttributeResourceValue(index: Int, defaultValue: Int): Int { - val s = getAttributeValue(index) - return s?.toInt() ?: defaultValue - } - - override fun getAttributeIntValue(index: Int, defaultValue: Int): Int { - val s = getAttributeValue(index) - return s?.toInt() ?: defaultValue - } - - override fun getAttributeUnsignedIntValue(index: Int, defaultValue: Int): Int { - val s = getAttributeValue(index) - return s?.toInt() ?: defaultValue - } - - override fun getAttributeFloatValue(index: Int, defaultValue: Float): Float { - val s = getAttributeValue(index) - return s?.toFloat() ?: defaultValue - } - - override fun getIdAttribute(): String? { - return getAttributeValue(null, "id") - } - - override fun getClassAttribute(): String? { - return getAttributeValue(null, "class") - } - - override fun getIdAttributeResourceValue(defaultValue: Int): Int { - return getAttributeResourceValue(null, "id", defaultValue) - } - - override fun getStyleAttribute(): Int { - return getAttributeResourceValue(null, "style", 0) - } -} diff --git a/play-services-base-core/src/main/kotlin/org/microg/gms/utils/SingleInstanceUtil.kt b/play-services-base-core/src/main/kotlin/org/microg/gms/utils/SingleInstanceUtil.kt deleted file mode 100644 index 0b5dc89d..00000000 --- a/play-services-base-core/src/main/kotlin/org/microg/gms/utils/SingleInstanceUtil.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.utils - -private val singleInstanceLock = Any() -private val singleInstanceMap: MutableMap, Any> = hashMapOf() - -fun singleInstanceOf(tClass: Class, tCreator: () -> T): T { - val tVolatileItem = singleInstanceMap[tClass] - @Suppress("UNCHECKED_CAST") - if (tVolatileItem != null && tClass.isAssignableFrom(tVolatileItem.javaClass)) return tVolatileItem as T - val tLock = synchronized(singleInstanceLock) { - val tItem = singleInstanceMap[tClass] - if (tItem != null) { - @Suppress("UNCHECKED_CAST") - if (tClass.isAssignableFrom(tItem.javaClass)) return tItem as T - tItem - } else { - val tLock = Any() - singleInstanceMap[tClass] = tLock - tLock - } - } - synchronized(tLock) { - val tItem = synchronized(singleInstanceMap) { singleInstanceMap[tClass] } - if (tItem == null) throw IllegalStateException() - @Suppress("UNCHECKED_CAST") - if (tClass.isAssignableFrom(tItem.javaClass)) return tItem as T - if (tItem != tLock) throw IllegalStateException() - - val tNewItem = tCreator() - synchronized(singleInstanceMap) { - singleInstanceMap[tClass] = tNewItem - } - return tNewItem - } -} - -inline fun singleInstanceOf(noinline tCreator: () -> T): T = singleInstanceOf(T::class.java, tCreator) \ No newline at end of file diff --git a/play-services-base-core/src/main/kotlin/org/microg/mgms/settings/SettingsContract.kt b/play-services-base-core/src/main/kotlin/org/microg/mgms/settings/SettingsContract.kt deleted file mode 100644 index 4f930962..00000000 --- a/play-services-base-core/src/main/kotlin/org/microg/mgms/settings/SettingsContract.kt +++ /dev/null @@ -1,125 +0,0 @@ -package org.microg.mgms.settings - -import android.content.ContentValues -import android.content.Context -import android.database.Cursor -import android.net.Uri -import android.os.Binder - -object SettingsContract { - fun getAuthority(context: Context) = "${context.packageName}.microg.settings" - fun getAuthorityUri(context: Context): Uri = Uri.parse("content://${getAuthority(context)}") - - object CheckIn { - private const val id = "check-in" - fun getContentUri(context: Context): Uri? = Uri.withAppendedPath(getAuthorityUri(context), id) - - const val ENABLED = "checkin_enable_service" - const val ANDROID_ID = "androidId" - const val DIGEST = "digest" - const val LAST_CHECK_IN = "lastCheckin" - const val SECURITY_TOKEN = "securityToken" - const val VERSION_INFO = "versionInfo" - const val DEVICE_DATA_VERSION_INFO = "deviceDataVersionInfo" - - const val BRAND_SPOOF = "brandSpoof" - - const val HIDE_LAUNCHER_ICON = "hideLauncherIcon" - - val PROJECTION = arrayOf( - ENABLED, - ANDROID_ID, - DIGEST, - LAST_CHECK_IN, - SECURITY_TOKEN, - VERSION_INFO, - DEVICE_DATA_VERSION_INFO, - BRAND_SPOOF, - HIDE_LAUNCHER_ICON, - ) - const val PREFERENCES_NAME = "checkin" - const val INITIAL_DIGEST = "1-929a0dca0eee55513280171a8585da7dcd3700f8" - } - - object Gcm { - private const val id = "gcm" - fun getContentUri(context: Context): Uri? = Uri.withAppendedPath(getAuthorityUri(context), id) - - const val FULL_LOG = "gcm_full_log" - const val LAST_PERSISTENT_ID = "gcm_last_persistent_id" - const val ENABLE_GCM = "gcm_enable_mcs_service" - - const val NETWORK_MOBILE = "gcm_network_mobile" - const val NETWORK_WIFI = "gcm_network_wifi" - const val NETWORK_ROAMING = "gcm_network_roaming" - const val NETWORK_OTHER = "gcm_network_other" - - const val LEARNT_MOBILE = "gcm_learnt_mobile" - const val LEARNT_WIFI = "gcm_learnt_wifi" - const val LEARNT_OTHER = "gcm_learnt_other" - - val PROJECTION = arrayOf( - FULL_LOG, - LAST_PERSISTENT_ID, - ENABLE_GCM, - NETWORK_MOBILE, - NETWORK_WIFI, - NETWORK_ROAMING, - NETWORK_OTHER, - LEARNT_MOBILE, - LEARNT_WIFI, - LEARNT_OTHER, - ) - } - - object Auth { - private const val id = "auth" - fun getContentUri(context: Context): Uri? = Uri.withAppendedPath(getAuthorityUri(context), id) - - const val TRUST_GOOGLE = "auth_manager_trust_google" - const val VISIBLE = "auth_manager_visible" - - val PROJECTION = arrayOf( - TRUST_GOOGLE, - VISIBLE, - ) - } - - object Profile { - private const val id = "profile" - fun getContentUri(context: Context): Uri? = Uri.withAppendedPath(getAuthorityUri(context), id) - - const val PROFILE = "device_profile" - const val SERIAL = "device_profile_serial" - - val PROJECTION = arrayOf( - PROFILE, - SERIAL - ) - } - - private fun withoutCallingIdentity(f: () -> T): T { - val identity = Binder.clearCallingIdentity() - try { - return f.invoke() - } finally { - Binder.restoreCallingIdentity(identity) - } - } - - @JvmStatic - fun getSettings(context: Context, uri: Uri, projection: Array?, f: (Cursor) -> T): T = withoutCallingIdentity { - context.contentResolver.query(uri, projection, null, null, null).use { c -> - require(c != null) { "Cursor for query $uri ${projection?.toList()} was null" } - if (!c.moveToFirst()) error("Cursor for query $uri ${projection?.toList()} was empty") - f.invoke(c) - } - } - - @JvmStatic - fun setSettings(context: Context, uri: Uri, v: ContentValues.() -> Unit) = withoutCallingIdentity { - val values = ContentValues().apply { v.invoke(this) } - val affected = context.contentResolver.update(uri, values, null, null) - require(affected == 1) { "Update for $uri with $values affected 0 rows"} - } -} diff --git a/play-services-base-core/src/main/kotlin/org/microg/mgms/settings/SettingsProvider.kt b/play-services-base-core/src/main/kotlin/org/microg/mgms/settings/SettingsProvider.kt deleted file mode 100644 index ba7e2e25..00000000 --- a/play-services-base-core/src/main/kotlin/org/microg/mgms/settings/SettingsProvider.kt +++ /dev/null @@ -1,280 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ -@file:Suppress("DEPRECATION") - -package org.microg.mgms.settings - -import android.annotation.SuppressLint -import android.content.ContentProvider -import android.content.ContentValues -import android.content.Context -import android.content.Context.MODE_PRIVATE -import android.content.SharedPreferences -import android.database.Cursor -import android.database.MatrixCursor -import android.net.Uri -import android.preference.PreferenceManager -import org.microg.gms.common.PackageUtils.warnIfNotMainProcess -import org.microg.mgms.settings.SettingsContract.Auth -import org.microg.mgms.settings.SettingsContract.CheckIn -import org.microg.mgms.settings.SettingsContract.Gcm -import org.microg.mgms.settings.SettingsContract.Profile -import org.microg.mgms.settings.SettingsContract.getAuthority -import java.io.File - -/** - * All settings access should go through this [ContentProvider], - * because it provides safe access from different processes which normal [SharedPreferences] don't. - */ -@SuppressLint("DiscouragedPrivateApi") -class SettingsProvider : ContentProvider() { - companion object { - const val INTERVAL = 1 * 60 * 1000 // 1 minute - } - - private val preferences: SharedPreferences by lazy { - PreferenceManager.getDefaultSharedPreferences(context) - } - private val checkInPrefs by lazy { - context!!.getSharedPreferences(CheckIn.PREFERENCES_NAME, MODE_PRIVATE) - } - private val systemDefaultPreferences: SharedPreferences? by lazy { - try { - Context::class.java.getDeclaredMethod( - "getSharedPreferences", - File::class.java, - Int::class.javaPrimitiveType - ).invoke(context, File("/system/etc/microg.xml"), MODE_PRIVATE) as SharedPreferences - } catch (ignored: Exception) { - null - } - } - - override fun onCreate(): Boolean { - return true - } - - override fun query( - uri: Uri, - projection: Array?, - selection: String?, - selectionArgs: Array?, - sortOrder: String? - ): Cursor? = when (uri) { - CheckIn.getContentUri(context!!) -> queryCheckIn(projection ?: CheckIn.PROJECTION) - Gcm.getContentUri(context!!) -> queryGcm(projection ?: Gcm.PROJECTION) - Auth.getContentUri(context!!) -> queryAuth(projection ?: Auth.PROJECTION) - Profile.getContentUri(context!!) -> queryProfile(projection ?: Profile.PROJECTION) - else -> null - } - - override fun update( - uri: Uri, - values: ContentValues?, - selection: String?, - selectionArgs: Array? - ): Int { - warnIfNotMainProcess(context, this.javaClass) - if (values == null) return 0 - when (uri) { - CheckIn.getContentUri(context!!) -> updateCheckIn(values) - Gcm.getContentUri(context!!) -> updateGcm(values) - Auth.getContentUri(context!!) -> updateAuth(values) - Profile.getContentUri(context!!) -> updateProfile(values) - else -> return 0 - } - return 1 - } - - private fun queryCheckIn(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - CheckIn.ENABLED -> getSettingsBoolean(key, true) - CheckIn.ANDROID_ID -> checkInPrefs.getLong(key, 0) - CheckIn.DIGEST -> checkInPrefs.getString(key, CheckIn.INITIAL_DIGEST) - ?: CheckIn.INITIAL_DIGEST - CheckIn.LAST_CHECK_IN -> checkInPrefs.getLong(key, 0) - CheckIn.SECURITY_TOKEN -> checkInPrefs.getLong(key, 0) - CheckIn.VERSION_INFO -> checkInPrefs.getString(key, "") ?: "" - CheckIn.DEVICE_DATA_VERSION_INFO -> checkInPrefs.getString(key, "") ?: "" - CheckIn.BRAND_SPOOF -> getSettingsBoolean(key, false) - CheckIn.HIDE_LAUNCHER_ICON -> getSettingsBoolean(key, false) - else -> throw IllegalArgumentException() - } - } - - private fun updateCheckIn(values: ContentValues) { - if (values.size() == 0) return - if (values.size() == 1 && values.containsKey(CheckIn.ENABLED)) { - // special case: only changing enabled state - updateCheckInEnabled(values.getAsBoolean(CheckIn.ENABLED)) - return - } - val editor = checkInPrefs.edit() - values.valueSet().forEach { (key, value) -> - if (key == CheckIn.ENABLED) { - // special case: not saved in checkInPrefs - updateCheckInEnabled(value as Boolean) - } - if (key == CheckIn.BRAND_SPOOF) { - // special case: not saved in checkInPrefs - updateSpoofingEnabled(value as Boolean) - } - if (key == CheckIn.HIDE_LAUNCHER_ICON) { - // special case: not saved in checkInPrefs - updateHideLauncherIcon(value as Boolean) - } - when (key) { - CheckIn.ANDROID_ID -> editor.putLong(key, value as Long) - CheckIn.DIGEST -> editor.putString(key, value as String?) - CheckIn.LAST_CHECK_IN -> editor.putLong(key, value as Long) - CheckIn.SECURITY_TOKEN -> editor.putLong(key, value as Long) - CheckIn.VERSION_INFO -> editor.putString(key, value as String?) - CheckIn.DEVICE_DATA_VERSION_INFO -> editor.putString(key, value as String?) - } - } - editor.apply() - } - - private fun updateCheckInEnabled(enabled: Boolean) { - preferences.edit() - .putBoolean(CheckIn.ENABLED, enabled) - .apply() - } - - private fun updateSpoofingEnabled(enabled: Boolean) { - preferences.edit() - .putBoolean(CheckIn.BRAND_SPOOF, enabled) - .apply() - } - - private fun updateHideLauncherIcon(enabled: Boolean) { - preferences.edit() - .putBoolean(CheckIn.HIDE_LAUNCHER_ICON, enabled) - .apply() - } - - private fun queryGcm(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - Gcm.ENABLE_GCM -> getSettingsBoolean(key, true) - Gcm.FULL_LOG -> getSettingsBoolean(key, true) - - Gcm.LAST_PERSISTENT_ID -> preferences.getString(key, "") ?: "" - - Gcm.NETWORK_MOBILE -> Integer.parseInt(preferences.getString(key, "0") ?: "0") - Gcm.NETWORK_WIFI -> Integer.parseInt(preferences.getString(key, "0") ?: "0") - Gcm.NETWORK_ROAMING -> Integer.parseInt(preferences.getString(key, "0") ?: "0") - Gcm.NETWORK_OTHER -> Integer.parseInt(preferences.getString(key, "0") ?: "0") - - Gcm.LEARNT_MOBILE -> preferences.getInt(key, INTERVAL) - Gcm.LEARNT_WIFI -> preferences.getInt(key, INTERVAL) - Gcm.LEARNT_OTHER -> preferences.getInt(key, INTERVAL) - - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - - private fun updateGcm(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - Gcm.ENABLE_GCM -> editor.putBoolean(key, value as Boolean) - Gcm.FULL_LOG -> editor.putBoolean(key, value as Boolean) - - Gcm.LAST_PERSISTENT_ID -> editor.putString(key, value as String?) - - Gcm.NETWORK_MOBILE -> editor.putString(key, (value as Int).toString()) - Gcm.NETWORK_WIFI -> editor.putString(key, (value as Int).toString()) - Gcm.NETWORK_ROAMING -> editor.putString(key, (value as Int).toString()) - Gcm.NETWORK_OTHER -> editor.putString(key, (value as Int).toString()) - - Gcm.LEARNT_MOBILE -> editor.putInt(key, value as Int) - Gcm.LEARNT_WIFI -> editor.putInt(key, value as Int) - Gcm.LEARNT_OTHER -> editor.putInt(key, value as Int) - - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun queryAuth(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - Auth.TRUST_GOOGLE -> getSettingsBoolean(key, true) - Auth.VISIBLE -> getSettingsBoolean(key, false) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - - private fun updateAuth(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - Auth.TRUST_GOOGLE -> editor.putBoolean(key, value as Boolean) - Auth.VISIBLE -> editor.putBoolean(key, value as Boolean) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun queryProfile(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - Profile.PROFILE -> getSettingsString(key, "auto") - Profile.SERIAL -> getSettingsString(key) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - - private fun updateProfile(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - Profile.PROFILE -> editor.putString(key, value as String?) - Profile.SERIAL -> editor.putString(key, value as String?) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun MatrixCursor.addRow( - p: Array, - valueGetter: (String) -> Any? - ): MatrixCursor { - val row = newRow() - for (key in p) row.add(valueGetter.invoke(key)) - return this - } - - override fun getType(uri: Uri): String { - return "vnd.android.cursor.item/vnd.${getAuthority(context!!)}.${uri.path}" - } - - override fun insert(uri: Uri, values: ContentValues?): Uri? { - throw UnsupportedOperationException() - } - - override fun delete(uri: Uri, selection: String?, selectionArgs: Array?): Int { - throw UnsupportedOperationException() - } - - /** - * Returns the current setting of the given [key] - * using the default value from [systemDefaultPreferences] or [def] if not available. - * @return the current setting as [Int], because [ContentProvider] does not support [Boolean]. - */ - private fun getSettingsBoolean(key: String, def: Boolean): Int { - return listOf(preferences, systemDefaultPreferences).getBooleanAsInt(key, def) - } - - private fun getSettingsString(key: String, def: String? = null): String? = listOf(preferences, systemDefaultPreferences).getString(key, def) - - private fun List.getString(key: String, def: String?): String? = foldRight(def) { preferences, defValue -> preferences?.getString(key, defValue) ?: defValue } - private fun List.getBoolean(key: String, def: Boolean): Boolean = foldRight(def) { preferences, defValue -> preferences?.getBoolean(key, defValue) ?: defValue } - private fun List.getBooleanAsInt(key: String, def: Boolean): Int = if (getBoolean(key, def)) 1 else 0 -} diff --git a/play-services-base-core/src/main/res/drawable/ic_foreground_notification.xml b/play-services-base-core/src/main/res/drawable/ic_foreground_notification.xml deleted file mode 100644 index ace07f8a..00000000 --- a/play-services-base-core/src/main/res/drawable/ic_foreground_notification.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/play-services-base-core/src/main/res/values-ar/strings.xml b/play-services-base-core/src/main/res/values-ar/strings.xml deleted file mode 100644 index e6947e00..00000000 --- a/play-services-base-core/src/main/res/values-ar/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - تحذير توفير البطارية - توسيع الإشعارات - الحفاظ على microG يعمل في الخلفية - انقر هنا لتعطيل تحسين البطارية لـ vanced microG ، ثم أعد تشغيل الجهاز لإزالة هذا الإشعار - diff --git a/play-services-base-core/src/main/res/values-az/strings.xml b/play-services-base-core/src/main/res/values-az/strings.xml deleted file mode 100644 index c24e9758..00000000 --- a/play-services-base-core/src/main/res/values-az/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Batareya qənaət xəbərdarlığı - Bildirişi genişləndir - MicroG-ni arxa planda saxla - MicroG üçün batareyanın optimallaşdırılmasını deaktiv etmək üçün bura klikləyin, sonra bu bildirişi silmək üçün cihazı yenidən başladın - diff --git a/play-services-base-core/src/main/res/values-be/strings.xml b/play-services-base-core/src/main/res/values-be/strings.xml deleted file mode 100644 index d887a045..00000000 --- a/play-services-base-core/src/main/res/values-be/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Папярэджанне аб працы ў рэжыме эканоміі энергіі - Разгарнуць апавяшчэнне - Трымаць microG у фоне - Націсніце тут, каб адключыць аптымізацыю батарэі для Vanced microG, а потым перазапусціце прыладу, каб гэта паведамленне знікла - diff --git a/play-services-base-core/src/main/res/values-bn/strings.xml b/play-services-base-core/src/main/res/values-bn/strings.xml deleted file mode 100644 index 34114e10..00000000 --- a/play-services-base-core/src/main/res/values-bn/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - ব্যাটারি সংরক্ষণ সতর্কতা - বিজ্ঞপ্তি প্রসারিত করুন - microG ব্যাকগ্রাউন্ডে রাখুন - vanced microG কে ব্যাটারি অপটিমাইজেশন থেকে সরাতে এখানে ট্যাপ করুন, এরপর এই বিজ্ঞপ্তি সরাতে ফোন রিস্টার্ট করুন - diff --git a/play-services-base-core/src/main/res/values-de/strings.xml b/play-services-base-core/src/main/res/values-de/strings.xml deleted file mode 100644 index 0ff5c5e0..00000000 --- a/play-services-base-core/src/main/res/values-de/strings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Battery Saving Warning - Expand notification - Keep microG in background - diff --git a/play-services-base-core/src/main/res/values-es-rES/strings.xml b/play-services-base-core/src/main/res/values-es-rES/strings.xml deleted file mode 100644 index 3ecced44..00000000 --- a/play-services-base-core/src/main/res/values-es-rES/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Advertencia de ahorro de batería - Expandir notificación - Mantener microG en segundo plano - Toque aquí para desactivar la optimización de la batería para vanced microG, luego reinicie el dispositivo para eliminar esta notificación - diff --git a/play-services-base-core/src/main/res/values-fr/strings.xml b/play-services-base-core/src/main/res/values-fr/strings.xml deleted file mode 100644 index 09ccaafa..00000000 --- a/play-services-base-core/src/main/res/values-fr/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Avertissement d\'économie de batterie - Élargir la notification - Garder microG en arrière-plan - Appuyez ici pour désactiver l\'optimisation de la batterie pour la microG vanced, puis redémarrez l\'appareil pour supprimer cette notification - diff --git a/play-services-base-core/src/main/res/values-he/strings.xml b/play-services-base-core/src/main/res/values-he/strings.xml deleted file mode 100644 index ea887fa9..00000000 --- a/play-services-base-core/src/main/res/values-he/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - אזהרת חיסכון בסוללה - הרחב את ההודעה - השאר את microG ברקע - הקש כאן כדי להשבית את אופטימיזציית הסוללה עבור vanced microG, ולאחר מכן הפעל מחדש את המכשיר כדי להסיר את ההתראה הזו - diff --git a/play-services-base-core/src/main/res/values-hi/strings.xml b/play-services-base-core/src/main/res/values-hi/strings.xml deleted file mode 100644 index 91551946..00000000 --- a/play-services-base-core/src/main/res/values-hi/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - बैटरी बचाने की चेतावनी - अधिसूचना का विस्तार करें - माइक्रो जी को बैकग्राउंड में रखें - वैन्ड माइक्रोजी के लिए बैटरी अनुकूलन को अक्षम करने के लिए यहां टैप करें, फिर इस अधिसूचना को हटाने के लिए डिवाइस को पुनरारंभ करें - diff --git a/play-services-base-core/src/main/res/values-hu/strings.xml b/play-services-base-core/src/main/res/values-hu/strings.xml deleted file mode 100644 index 8a6badd3..00000000 --- a/play-services-base-core/src/main/res/values-hu/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Akkumulátorkímélő figyelmeztetés - Értesítés bővítése - Tartsa a microG-t a háttérben - Koppintson ide az akkumulátor-optimalizálás letiltásához a vanced microG számára, majd indítsa újra a készüléket az értesítés eltávolításához - diff --git a/play-services-base-core/src/main/res/values-id/strings.xml b/play-services-base-core/src/main/res/values-id/strings.xml deleted file mode 100644 index 11599ce3..00000000 --- a/play-services-base-core/src/main/res/values-id/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Peringatan daya baterai - Perluas notifikasi - Izinkan microG berjalan di latar belakang - Tekan disini untuk mematikan optimasi baterai untuk vanced microG, lalu mulai ulang perangkat untuk menghapus notifikasi ini - diff --git a/play-services-base-core/src/main/res/values-it/strings.xml b/play-services-base-core/src/main/res/values-it/strings.xml deleted file mode 100644 index 420ece24..00000000 --- a/play-services-base-core/src/main/res/values-it/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Avviso Risparmio Energetico - Espandi la notifica - Mantieni i microG in secondo piano - Tocca qui per disattivare l\'ottimizzazione della batteria per microG, poi riavvia il dispositivo per rimuovere questa notifica. - diff --git a/play-services-base-core/src/main/res/values-ja/strings.xml b/play-services-base-core/src/main/res/values-ja/strings.xml deleted file mode 100644 index 97f279c1..00000000 --- a/play-services-base-core/src/main/res/values-ja/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - 電池の最適化 の警告 - 通知を展開する - Vanced microGをバックグラウンドで保持 - ここをタップして、Vanced microGの[電池の最適化]を無効にし、デバイスを再起動して通知を削除してください。 - diff --git a/play-services-base-core/src/main/res/values-ko/strings.xml b/play-services-base-core/src/main/res/values-ko/strings.xml deleted file mode 100644 index 20515386..00000000 --- a/play-services-base-core/src/main/res/values-ko/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - 배터리 절약 경고 - 알림 펼치기 - microG를 백그라운드에서 유지 - 여기를 탭하여 vanced microG의 배터리 최적화를 비활성화한 다음 기기를 다시 시작하여 이 알림을 제거하세요 - diff --git a/play-services-base-core/src/main/res/values-lt/strings.xml b/play-services-base-core/src/main/res/values-lt/strings.xml deleted file mode 100644 index 02dfd797..00000000 --- a/play-services-base-core/src/main/res/values-lt/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Baterijos taupymo įspėjimas - Išskleisti pranešimą - Laikyti microG fone - Bakstelėkite čia, kad išjungtumėte microG akumuliatoriaus optimizavimą, tada iš naujo paleiskite įrenginį, kad pašalintumėte šį pranešimą - diff --git a/play-services-base-core/src/main/res/values-pt-rBR/strings.xml b/play-services-base-core/src/main/res/values-pt-rBR/strings.xml deleted file mode 100644 index c0440e52..00000000 --- a/play-services-base-core/src/main/res/values-pt-rBR/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Aviso de carregamento da bateria - Expandir notificações - Manter o microG em segundo plano - Toque aqui para desativar a otimização de bateria para microG. Tancado e reinicie o dispositivo para remover esta notificação - diff --git a/play-services-base-core/src/main/res/values-ru/strings.xml b/play-services-base-core/src/main/res/values-ru/strings.xml deleted file mode 100644 index 169bde62..00000000 --- a/play-services-base-core/src/main/res/values-ru/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Предупреждение о работе в режиме энергосбережения - Развернуть уведомление - Держать microG в фоне - Нажмите здесь, чтобы отключить оптимизацию батареи для vanced microG, а затем перезапустите устройство, чтобы это уведомление пропало - diff --git a/play-services-base-core/src/main/res/values-th/strings.xml b/play-services-base-core/src/main/res/values-th/strings.xml deleted file mode 100644 index 6b918bea..00000000 --- a/play-services-base-core/src/main/res/values-th/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - คำเตือนการประหยัดแบตเตอรี่ - ขยายการแจ้งเตือน - ให้ microG ทำงานเบื้องหลัง - แตะที่นี่เพื่อปิดใช้งานการเพิ่มประสิทธิภาพแบตเตอรี่สำหรับ vanced microG จากนั้นรีสตาร์ทอุปกรณ์เพื่อลบการแจ้งเตือนนี้  - diff --git a/play-services-base-core/src/main/res/values-tr/strings.xml b/play-services-base-core/src/main/res/values-tr/strings.xml deleted file mode 100644 index 7ab0c17f..00000000 --- a/play-services-base-core/src/main/res/values-tr/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Pil tasarrufu uyarısı - Bildirimleri genişlet - MicroG arka planda çalışsın - Vanced microG için batarya optimizasyonunu devre dışı bırakmak için buraya tıklayın, daha sonra bu bildirimi silmek için cihazı yeniden başlatın - diff --git a/play-services-base-core/src/main/res/values-uk/strings.xml b/play-services-base-core/src/main/res/values-uk/strings.xml deleted file mode 100644 index 4d49f0eb..00000000 --- a/play-services-base-core/src/main/res/values-uk/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Попередження про економію батареї - Розгорнути сповіщення - Тримайте microG у фоновому режимі - Торкніться тут, щоб вимкнути оптимізацію акумулятора для vanced microG, а потім перезапустіть пристрій, щоб видалити це сповіщення - diff --git a/play-services-base-core/src/main/res/values-vi/strings.xml b/play-services-base-core/src/main/res/values-vi/strings.xml deleted file mode 100644 index 6df24ce4..00000000 --- a/play-services-base-core/src/main/res/values-vi/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - Cảnh báo tối ưu hóa pin - Mở rộng thông báo - Giữ Vanced microG chạy trong nền - Nhấn vào đây để tắt tối ưu hóa pin cho Vanced microG, sau đó khởi động lại thiết bị hoặc buộc dừng ứng dụng để xóa thông báo này - diff --git a/play-services-base-core/src/main/res/values-zh-rCN/strings.xml b/play-services-base-core/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index 3afca6ef..00000000 --- a/play-services-base-core/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - 省电警告 - 展开通知 - 保持 microG 后台服务 - 点此关闭 vanced microG 的电池最适化,然后重启手机以移除该通知 - diff --git a/play-services-base-core/src/main/res/values-zh-rTW/strings.xml b/play-services-base-core/src/main/res/values-zh-rTW/strings.xml deleted file mode 100644 index 4e03cda1..00000000 --- a/play-services-base-core/src/main/res/values-zh-rTW/strings.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - 電池最佳化警示 - 展開完整通知 - 讓microG在背景執行 - 點擊此通知來關閉Vanced microG的電池最佳化 -關閉後重新啟動手機以移除此通知 - diff --git a/play-services-base-core/src/main/res/values/strings.xml b/play-services-base-core/src/main/res/values/strings.xml deleted file mode 100644 index 55d77535..00000000 --- a/play-services-base-core/src/main/res/values/strings.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Battery Saving Warning - Expand notification - Keep Vanced microG in background - Tap here to disable battery optimization for Vanced microG, then restart the device to remove this notification - diff --git a/play-services-base/build.gradle b/play-services-base/build.gradle deleted file mode 100644 index 7c7057d4..00000000 --- a/play-services-base/build.gradle +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion androidBuildVersionTools - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - namespace 'org.microg.gms.base' -} - -dependencies { - api project(':play-services-base-api') - - // Dependencies from play-services-base:18.1.0 - api "androidx.collection:collection:$collectionVersion" - api "androidx.core:core:$coreVersion" - api "androidx.fragment:fragment:$fragmentVersion" - api project(':play-services-basement') - api project(':play-services-tasks') -} \ No newline at end of file diff --git a/play-services-base/core/build.gradle b/play-services-base/core/build.gradle deleted file mode 100644 index 96ace60a..00000000 --- a/play-services-base/core/build.gradle +++ /dev/null @@ -1,61 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'maven-publish' -apply plugin: 'signing' - -dependencies { - api project(':play-services-basement-ktx') - - implementation "androidx.annotation:annotation:$annotationVersion" - implementation "androidx.appcompat:appcompat:$appcompatVersion" - implementation "androidx.core:core-ktx:$coreVersion" - implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion" - implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion" - implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion" - implementation "androidx.preference:preference-ktx:$preferenceVersion" - - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" -} - -android { - namespace "org.microg.gms.base.core" - - compileSdkVersion androidCompileSdk - buildToolsVersion "$androidBuildVersionTools" - - defaultConfig { - versionName version - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - buildFeatures { - dataBinding = true - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } - - kotlinOptions { - jvmTarget = 1.8 - } - - lintOptions { - disable 'MissingTranslation' - } -} - -apply from: '../../gradle/publish-android.gradle' - -description = 'microG service implementation for play-services-base' diff --git a/play-services-base/core/src/main/kotlin/org/microg/gms/common/KnownGooglePackages.kt b/play-services-base/core/src/main/kotlin/org/microg/gms/common/KnownGooglePackages.kt deleted file mode 100644 index e0a644d7..00000000 --- a/play-services-base/core/src/main/kotlin/org/microg/gms/common/KnownGooglePackages.kt +++ /dev/null @@ -1,198 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common - -import com.google.android.gms.common.internal.CertData -import org.microg.gms.common.GooglePackagePermission.* -import org.microg.gms.utils.digest -import org.microg.gms.utils.toHexString - -enum class GooglePackagePermission { - ACCOUNT, // Find accounts - AD_ID, // Advertising ID - APP_CERT, // Receive certificate confirming valid app installation (incl. Spatula) - AUTH, // Sign in to Google account without user interface confirmation - CREDENTIALS, // Access to credentials - GAMES, // Google Play Games first party access - IMPERSONATE, // Allow to act as another package - OWNER, // Details about own accounts (name, email, photo) - PEOPLE, // Details about contacts - REPORTING, // Access reporting service - SAFETYNET, // Access SafetyNet UUID -} - -// These are SHA-256 hashes of the Google privileged signing certificates -private val KNOWN_GOOGLE_PRIVILEGED_CERT_HASHES = listOf( - "f0fd6c5b410f25cb25c3b53346c8972fae30f8ee7411df910480ad6b2d60db83", - "7ce83c1b71f3d572fed04c8d40c5cb10ff75e6d87d9df6fbd53f0468c2905053", -) - -// These are the permissions that we grant to apps signed with a Google -// privileged platform signing certificate. Those could be in the same -// shared UID on regular Play Services and thus have full access by -// design, as they could even directly access all private details in GMS. -private val PERMISSIONS_PRIVILEGED = GooglePackagePermission.entries.toSet() - -// These are SHA-256 hashes of signing certificates used by official Google apps -// Signing certificates that are only used for a small number of apps are likely not -// official Google apps, but either acquisitions or independent teams / projects -// within Google. We don't put them here, but via KNOWN_GOOGLE_PACKAGES. -private val KNOWN_GOOGLE_APP_CERT_HASHES = listOf( - "3d7a1223019aa39d9ea0e3436ab7c0896bfb4fb679f4de5fe7c23f326c8f994a" -) - -// This is a subset of permissions that we grant to apps signed with an official -// Google apps certificate. Note that this has lower priority than the -// KNOWN_GOOGLE_PACKAGES list, so if any app needs more permissions than this, -// this can be handled through KNOWN_GOOGLE_PACKAGES. -private val PERMISSIONS_APP = setOf(ACCOUNT, APP_CERT, AUTH, OWNER, PEOPLE, REPORTING, SAFETYNET) - -private const val SHA1 = "SHA1" -private const val SHA256 = "SHA-256" - -data class PackageAndCertHash(val packageName: String, val algorithm: String, val certHash: String) - -private val KNOWN_GOOGLE_PACKAGES = mapOf( - // Legacy set - // These include all previously KNOWN_GOOGLE_PACKAGES and grant them all google package permissions - // Those should be replaced by new entries that - // - use SHA-256 instead of SHA-1 - // - has more accurate permission set (in most cases, ACCOUNT+AUTH+OWNER is sufficient) - Pair( - PackageAndCertHash("com.google.android.apps.classroom", SHA1, "46f6c8987311e131f4f558d8e0ae145bebab6da3"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.inbox", SHA1, "aa87ce1260c008d801197bb4ecea4ab8929da246"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.playconsole", SHA1, "d6c35e55b481aefddd74152ca7254332739a81d6"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.travel.onthego", SHA1, "0cbe08032217d45e61c0bc72f294395ee9ecb5d5"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.tycho", SHA1, "01b844184e360686aa98b48eb16e05c76d4a72ad"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.contacts", SHA1, "ee3e2b5d95365c5a1ccc2d8dfe48d94eb33b3ebe"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.wearable.app", SHA1, "a197f9212f2fed64f0ff9c2a4edf24b9c8801c8c"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.youtube.music", SHA1, "afb0fed5eeaebdd86f56a97742f4b6b33ef59875"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.vr.home", SHA1, "fc1edc68f7e3e4963c998e95fc38f3de8d1bfc96"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.vr.cyclops", SHA1, "188c5ca3863fa121216157a5baa80755ceda70ab"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.waze", SHA1, "35b438fe1bc69d975dc8702dc16ab69ebf65f26f"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.wellbeing", SHA1, "4ebdd02380f1fa0b6741491f0af35625dba76e9f"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.village.boond", SHA1, "48e7985b8f901df335b5d5223579c81618431c7b"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.subscriptions.red", SHA1, "de8304ace744ae4c4e05887a27a790815e610ff0"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.meetings", SHA1, "47a6936b733dbdb45d71997fbe1d610eca36b8bf"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.nbu.paisa.user", SHA1, "80df78bb700f9172bc671779b017ddefefcbf552"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.dynamite", SHA1, "519c5a17a60596e6fe5933b9cb4285e7b0e5eb7b"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.projection.gearhead", SHA1, "9ca91f9e704d630ef67a23f52bf1577a92b9ca5d"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.stadia.android", SHA1, "133aad3b3d3b580e286573c37f20549f9d3d1cce"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.kids.familylink", SHA1, "88652b8464743e5ce80da0d4b890d13f9b1873df"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.walletnfcrel", SHA1, "82759e2db43f9ccbafce313bc674f35748fabd7a"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.recorder", SHA1, "394d84cd2cf89d3453702c663f98ec6554afc3cd"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.messaging", SHA1, "0980a12be993528c19107bc21ad811478c63cefc"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.tachyon", SHA1, "a0bc09af527b6397c7a9ef171d6cf76f757becc3"), - PERMISSIONS_PRIVILEGED - ), - Pair( - PackageAndCertHash("com.google.android.apps.access.wifi.consumer", SHA1,"d850379540d68fbec82a742ab6a8321a3f9a4c7c"), - PERMISSIONS_PRIVILEGED - ), - - // Google Jamboard - Pair( - PackageAndCertHash("com.google.android.apps.jam", SHA256, "9db7ff389ab6a30d5f5c92a8629ff0baa93fa8430f0503c04d72640a1cf323f5"), - setOf(ACCOUNT, AUTH, OWNER) - ), - - // Fitbit - Pair( - PackageAndCertHash("com.fitbit.FitbitMobile", SHA256, "fa6a198803aac1939fed6bab9295e5184c00966bf912f8c5faff26576cc770ff"), - setOf(ACCOUNT, AUTH, OWNER) - ), - - // Google Tasks - Pair( - PackageAndCertHash("com.google.android.apps.tasks", SHA256, "99f6cc5308e6f3318a3bf168bf106d5b5defe2b4b9c561e5ddd7924a7a2ba1e2"), - setOf(ACCOUNT, AUTH, OWNER) - ), -) - -fun isGooglePackage(pkg: PackageAndCertHash): Boolean { - if (pkg.algorithm == SHA256 && pkg.certHash in KNOWN_GOOGLE_PRIVILEGED_CERT_HASHES) return true - if (pkg.algorithm == SHA256 && pkg.certHash in KNOWN_GOOGLE_APP_CERT_HASHES) return true - return KNOWN_GOOGLE_PACKAGES.containsKey(pkg) -} -fun getGooglePackagePermissions(pkg: PackageAndCertHash): Set { - if (KNOWN_GOOGLE_PACKAGES.containsKey(pkg)) return KNOWN_GOOGLE_PACKAGES[pkg].orEmpty() - if (pkg.algorithm == SHA256 && pkg.certHash in KNOWN_GOOGLE_PRIVILEGED_CERT_HASHES) return PERMISSIONS_PRIVILEGED - if (pkg.algorithm == SHA256 && pkg.certHash in KNOWN_GOOGLE_APP_CERT_HASHES) return PERMISSIONS_APP - return emptySet() -} -fun hasGooglePackagePermission(pkg: PackageAndCertHash, permission: GooglePackagePermission) = getGooglePackagePermissions(pkg).contains(permission) - -fun isGooglePackage(packageName: String, certificate: CertData): Boolean = - listOf(SHA1, SHA256).any { isGooglePackage(PackageAndCertHash(packageName, it, certificate.digest(it).toHexString())) } \ No newline at end of file diff --git a/play-services-base/core/src/main/kotlin/org/microg/gms/settings/SettingsContract.kt b/play-services-base/core/src/main/kotlin/org/microg/gms/settings/SettingsContract.kt deleted file mode 100644 index 9791f4f0..00000000 --- a/play-services-base/core/src/main/kotlin/org/microg/gms/settings/SettingsContract.kt +++ /dev/null @@ -1,225 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.settings - -import android.content.ContentValues -import android.content.Context -import android.content.pm.PackageManager -import android.database.Cursor -import android.net.Uri -import android.os.Binder -import android.os.Bundle - -object SettingsContract { - const val META_DATA_KEY_SOURCE_PACKAGE = "org.microg.gms.settings:source-package" - fun getAuthority(context: Context): String { - val metaData = runCatching { context.packageManager.getApplicationInfo(context.packageName, PackageManager.GET_META_DATA).metaData }.getOrNull() ?: Bundle.EMPTY - val sourcePackage = metaData.getString(META_DATA_KEY_SOURCE_PACKAGE, context.packageName) - return "${sourcePackage}.microg.settings" - } - fun getAuthorityUri(context: Context): Uri = Uri.parse("content://${getAuthority(context)}") - - object CheckIn { - private const val id = "check-in" - fun getContentUri(context: Context) = Uri.withAppendedPath(getAuthorityUri(context), id) - fun getContentType(context: Context) = "vnd.android.cursor.item/vnd.${getAuthority(context)}.$id" - - const val ENABLED = "checkin_enable_service" - const val ANDROID_ID = "androidId" - const val DIGEST = "digest" - const val LAST_CHECK_IN = "lastCheckin" - const val SECURITY_TOKEN = "securityToken" - const val VERSION_INFO = "versionInfo" - const val DEVICE_DATA_VERSION_INFO = "deviceDataVersionInfo" - - val PROJECTION = arrayOf( - ENABLED, - ANDROID_ID, - DIGEST, - LAST_CHECK_IN, - SECURITY_TOKEN, - VERSION_INFO, - DEVICE_DATA_VERSION_INFO, - ) - const val PREFERENCES_NAME = "checkin" - const val INITIAL_DIGEST = "1-929a0dca0eee55513280171a8585da7dcd3700f8" - } - - object Gcm { - private const val id = "gcm" - fun getContentUri(context: Context) = Uri.withAppendedPath(getAuthorityUri(context), id) - fun getContentType(context: Context) = "vnd.android.cursor.item/vnd.${getAuthority(context)}.$id" - - const val FULL_LOG = "gcm_full_log" - const val LAST_PERSISTENT_ID = "gcm_last_persistent_id" - const val CONFIRM_NEW_APPS = "gcm_confirm_new_apps" - const val ENABLE_GCM = "gcm_enable_mcs_service" - - const val NETWORK_MOBILE = "gcm_network_mobile" - const val NETWORK_WIFI = "gcm_network_wifi" - const val NETWORK_ROAMING = "gcm_network_roaming" - const val NETWORK_OTHER = "gcm_network_other" - - const val LEARNT_MOBILE = "gcm_learnt_mobile" - const val LEARNT_WIFI = "gcm_learnt_wifi" - const val LEARNT_OTHER = "gcm_learnt_other" - - val PROJECTION = arrayOf( - FULL_LOG, - LAST_PERSISTENT_ID, - CONFIRM_NEW_APPS, - ENABLE_GCM, - NETWORK_MOBILE, - NETWORK_WIFI, - NETWORK_ROAMING, - NETWORK_OTHER, - LEARNT_MOBILE, - LEARNT_WIFI, - LEARNT_OTHER, - ) - } - - object Auth { - private const val id = "auth" - fun getContentUri(context: Context) = Uri.withAppendedPath(getAuthorityUri(context), id) - fun getContentType(context: Context) = "vnd.android.cursor.item/vnd.${getAuthority(context)}.$id" - - const val TRUST_GOOGLE = "auth_manager_trust_google" - const val VISIBLE = "auth_manager_visible" - const val INCLUDE_ANDROID_ID = "auth_include_android_id" - const val STRIP_DEVICE_NAME = "auth_strip_device_name" - - val PROJECTION = arrayOf( - TRUST_GOOGLE, - VISIBLE, - INCLUDE_ANDROID_ID, - STRIP_DEVICE_NAME, - ) - } - - object Exposure { - private const val id = "exposureNotification" - fun getContentUri(context: Context) = Uri.withAppendedPath(getAuthorityUri(context), id) - fun getContentType(context: Context) = "vnd.android.cursor.item/vnd.${getAuthority(context)}.$id" - - const val SCANNER_ENABLED = "exposure_scanner_enabled" - const val LAST_CLEANUP = "exposure_last_cleanup" - - val PROJECTION = arrayOf( - SCANNER_ENABLED, - LAST_CLEANUP, - ) - } - - object SafetyNet { - private const val id = "safety-net" - fun getContentUri(context: Context) = Uri.withAppendedPath(getAuthorityUri(context), id) - fun getContentType(context: Context) = "vnd.android.cursor.item/vnd.${getAuthority(context)}.$id" - - const val ENABLED = "safetynet_enabled" - - val PROJECTION = arrayOf( - ENABLED - ) - } - - object DroidGuard { - private const val id = "droidguard" - fun getContentUri(context: Context) = Uri.withAppendedPath(getAuthorityUri(context), id) - fun getContentType(context: Context) = "vnd.android.cursor.item/vnd.${getAuthority(context)}.$id" - - const val ENABLED = "droidguard_enabled" - const val MODE = "droidguard_mode" - const val NETWORK_SERVER_URL = "droidguard_network_server_url" - const val FORCE_LOCAL_DISABLED = "droidguard_force_local_disabled" - - val PROJECTION = arrayOf( - ENABLED, - MODE, - NETWORK_SERVER_URL, - FORCE_LOCAL_DISABLED, - ) - } - - object Profile { - private const val id = "profile" - fun getContentUri(context: Context) = Uri.withAppendedPath(getAuthorityUri(context), id) - fun getContentType(context: Context) = "vnd.android.cursor.item/vnd.${getAuthority(context)}.$id" - - const val PROFILE = "device_profile" - const val SERIAL = "device_profile_serial" - - val PROJECTION = arrayOf( - PROFILE, - SERIAL - ) - } - - object Location { - private const val id = "location" - fun getContentUri(context: Context) = Uri.withAppendedPath(getAuthorityUri(context), id) - fun getContentType(context: Context) = "vnd.android.cursor.item/vnd.${getAuthority(context)}.$id" - - const val WIFI_MLS = "location_wifi_mls" - const val WIFI_MOVING = "location_wifi_moving" - const val WIFI_LEARNING = "location_wifi_learning" - const val CELL_MLS = "location_cell_mls" - const val CELL_LEARNING = "location_cell_learning" - const val GEOCODER_NOMINATIM = "location_geocoder_nominatim" - - val PROJECTION = arrayOf( - WIFI_MLS, - WIFI_MOVING, - WIFI_LEARNING, - CELL_MLS, - CELL_LEARNING, - GEOCODER_NOMINATIM, - ) - } - - object Vending { - private const val id = "vending" - fun getContentUri(context: Context) = Uri.withAppendedPath(getAuthorityUri(context), id) - fun getContentType(context: Context) = "vnd.android.cursor.item/vnd.${getAuthority(context)}.$id" - - const val LICENSING = "vending_licensing" - const val BILLING = "vending_billing" - - val PROJECTION = arrayOf( - LICENSING, - BILLING, - ) - } - - private fun withoutCallingIdentity(f: () -> T): T { - val identity = Binder.clearCallingIdentity() - try { - return f.invoke() - } finally { - Binder.restoreCallingIdentity(identity) - } - } - - @JvmStatic - fun getSettings(context: Context, uri: Uri, projection: Array?, f: (Cursor) -> T): T = withoutCallingIdentity { - val c = context.contentResolver.query(uri, projection, null, null, null) - try { - require(c != null) { "Cursor for query $uri ${projection?.toList()} was null" } - if (!c.moveToFirst()) error("Cursor for query $uri ${projection?.toList()} was empty") - f.invoke(c) - } finally { - c?.close() - } - } - - @JvmStatic - fun setSettings(context: Context, uri: Uri, v: ContentValues.() -> Unit) = withoutCallingIdentity { - val values = ContentValues().apply { v.invoke(this) } - val affected = context.contentResolver.update(uri, values, null, null) - require(affected == 1) { "Update for $uri with $values affected 0 rows"} - } - -} diff --git a/play-services-base/core/src/main/kotlin/org/microg/gms/settings/SettingsProvider.kt b/play-services-base/core/src/main/kotlin/org/microg/gms/settings/SettingsProvider.kt deleted file mode 100644 index dfb027d9..00000000 --- a/play-services-base/core/src/main/kotlin/org/microg/gms/settings/SettingsProvider.kt +++ /dev/null @@ -1,423 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2021, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.settings - -import android.content.ContentProvider -import android.content.ContentValues -import android.content.Context -import android.content.Context.MODE_PRIVATE -import android.content.SharedPreferences -import android.database.Cursor -import android.database.MatrixCursor -import android.net.Uri -import android.os.Build.VERSION.SDK_INT -import android.preference.PreferenceManager -import org.microg.gms.common.PackageUtils.warnIfNotMainProcess -import org.microg.gms.settings.SettingsContract.Auth -import org.microg.gms.settings.SettingsContract.CheckIn -import org.microg.gms.settings.SettingsContract.DroidGuard -import org.microg.gms.settings.SettingsContract.Exposure -import org.microg.gms.settings.SettingsContract.Gcm -import org.microg.gms.settings.SettingsContract.Location -import org.microg.gms.settings.SettingsContract.Vending -import org.microg.gms.settings.SettingsContract.Profile -import org.microg.gms.settings.SettingsContract.SafetyNet -import org.microg.gms.settings.SettingsContract.getAuthority -import java.io.File - -private const val SETTINGS_PREFIX = "org.microg.gms.settings." - -/** - * All settings access should go through this [ContentProvider], - * because it provides safe access from different processes which normal [SharedPreferences] don't. - */ -class SettingsProvider : ContentProvider() { - - private val preferences: SharedPreferences by lazy { - PreferenceManager.getDefaultSharedPreferences(context) - } - private val checkInPrefs by lazy { - context!!.getSharedPreferences(CheckIn.PREFERENCES_NAME, MODE_PRIVATE) - } - private val unifiedNlpPreferences by lazy { - context!!.getSharedPreferences("unified_nlp", MODE_PRIVATE) - } - private val systemDefaultPreferences: SharedPreferences? by lazy { - try { - Context::class.java.getDeclaredMethod( - "getSharedPreferences", - File::class.java, - Int::class.javaPrimitiveType - ).invoke(context, File("/system/etc/microg.xml"), MODE_PRIVATE) as SharedPreferences - } catch (ignored: Exception) { - null - } - } - private val metaDataPreferences: SharedPreferences by lazy { - MetaDataPreferences(context!!, SETTINGS_PREFIX) - } - - override fun onCreate(): Boolean { - return true - } - - override fun query( - uri: Uri, - projection: Array?, - selection: String?, - selectionArgs: Array?, - sortOrder: String? - ): Cursor? = when (uri) { - CheckIn.getContentUri(context!!) -> queryCheckIn(projection ?: CheckIn.PROJECTION) - Gcm.getContentUri(context!!) -> queryGcm(projection ?: Gcm.PROJECTION) - Auth.getContentUri(context!!) -> queryAuth(projection ?: Auth.PROJECTION) - Exposure.getContentUri(context!!) -> queryExposure(projection ?: Exposure.PROJECTION) - SafetyNet.getContentUri(context!!) -> querySafetyNet(projection ?: SafetyNet.PROJECTION) - DroidGuard.getContentUri(context!!) -> queryDroidGuard(projection ?: DroidGuard.PROJECTION) - Profile.getContentUri(context!!) -> queryProfile(projection ?: Profile.PROJECTION) - Location.getContentUri(context!!) -> queryLocation(projection ?: Location.PROJECTION) - Vending.getContentUri(context!!) -> queryVending(projection ?: Vending.PROJECTION) - else -> null - } - - override fun update( - uri: Uri, - values: ContentValues?, - selection: String?, - selectionArgs: Array? - ): Int { - warnIfNotMainProcess(context, this.javaClass) - if (values == null) return 0 - when (uri) { - CheckIn.getContentUri(context!!) -> updateCheckIn(values) - Gcm.getContentUri(context!!) -> updateGcm(values) - Auth.getContentUri(context!!) -> updateAuth(values) - Exposure.getContentUri(context!!) -> updateExposure(values) - SafetyNet.getContentUri(context!!) -> updateSafetyNet(values) - DroidGuard.getContentUri(context!!) -> updateDroidGuard(values) - Profile.getContentUri(context!!) -> updateProfile(values) - Location.getContentUri(context!!) -> updateLocation(values) - Vending.getContentUri(context!!) -> updateVending(values) - else -> return 0 - } - return 1 - } - - private fun queryCheckIn(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - CheckIn.ENABLED -> getSettingsBoolean(key, false) - CheckIn.ANDROID_ID -> checkInPrefs.getLong(key, 0) - CheckIn.DIGEST -> checkInPrefs.getString(key, CheckIn.INITIAL_DIGEST) - ?: CheckIn.INITIAL_DIGEST - CheckIn.LAST_CHECK_IN -> checkInPrefs.getLong(key, 0) - CheckIn.SECURITY_TOKEN -> checkInPrefs.getLong(key, 0) - CheckIn.VERSION_INFO -> checkInPrefs.getString(key, "") ?: "" - CheckIn.DEVICE_DATA_VERSION_INFO -> checkInPrefs.getString(key, "") ?: "" - else -> throw IllegalArgumentException() - } - } - - private fun updateCheckIn(values: ContentValues) { - if (values.size() == 0) return - if (values.size() == 1 && values.containsKey(CheckIn.ENABLED)) { - // special case: only changing enabled state - updateCheckInEnabled(values.getAsBoolean(CheckIn.ENABLED)) - return - } - val editor = checkInPrefs.edit() - values.valueSet().forEach { (key, value) -> - if (key == CheckIn.ENABLED) { - // special case: not saved in checkInPrefs - updateCheckInEnabled(value as Boolean) - } - when (key) { - CheckIn.ANDROID_ID -> editor.putLong(key, value as Long) - CheckIn.DIGEST -> editor.putString(key, value as String?) - CheckIn.LAST_CHECK_IN -> editor.putLong(key, value as Long) - CheckIn.SECURITY_TOKEN -> editor.putLong(key, value as Long) - CheckIn.VERSION_INFO -> editor.putString(key, value as String?) - CheckIn.DEVICE_DATA_VERSION_INFO -> editor.putString(key, value as String?) - } - } - editor.apply() - } - - private fun updateCheckInEnabled(enabled: Boolean) { - preferences.edit() - .putBoolean(CheckIn.ENABLED, enabled) - .apply() - } - - private fun queryGcm(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - Gcm.ENABLE_GCM -> getSettingsBoolean(key, false) - Gcm.FULL_LOG -> getSettingsBoolean(key, true) - Gcm.CONFIRM_NEW_APPS -> getSettingsBoolean(key, false) - - Gcm.LAST_PERSISTENT_ID -> preferences.getString(key, "") ?: "" - - Gcm.NETWORK_MOBILE -> Integer.parseInt(preferences.getString(key, "0") ?: "0") - Gcm.NETWORK_WIFI -> Integer.parseInt(preferences.getString(key, "0") ?: "0") - Gcm.NETWORK_ROAMING -> Integer.parseInt(preferences.getString(key, "0") ?: "0") - Gcm.NETWORK_OTHER -> Integer.parseInt(preferences.getString(key, "0") ?: "0") - - Gcm.LEARNT_MOBILE -> preferences.getInt(key, 300000) - Gcm.LEARNT_WIFI -> preferences.getInt(key, 300000) - Gcm.LEARNT_OTHER -> preferences.getInt(key, 300000) - - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - - private fun updateGcm(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - Gcm.ENABLE_GCM -> editor.putBoolean(key, value as Boolean) - Gcm.FULL_LOG -> editor.putBoolean(key, value as Boolean) - Gcm.CONFIRM_NEW_APPS -> editor.putBoolean(key, value as Boolean) - - Gcm.LAST_PERSISTENT_ID -> editor.putString(key, value as String?) - - Gcm.NETWORK_MOBILE -> editor.putString(key, (value as Int).toString()) - Gcm.NETWORK_WIFI -> editor.putString(key, (value as Int).toString()) - Gcm.NETWORK_ROAMING -> editor.putString(key, (value as Int).toString()) - Gcm.NETWORK_OTHER -> editor.putString(key, (value as Int).toString()) - - Gcm.LEARNT_MOBILE -> editor.putInt(key, value as Int) - Gcm.LEARNT_WIFI -> editor.putInt(key, value as Int) - Gcm.LEARNT_OTHER -> editor.putInt(key, value as Int) - - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun queryAuth(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - Auth.TRUST_GOOGLE -> getSettingsBoolean(key, true) - Auth.VISIBLE -> getSettingsBoolean(key, false) - Auth.INCLUDE_ANDROID_ID -> getSettingsBoolean(key, true) - Auth.STRIP_DEVICE_NAME -> getSettingsBoolean(key, false) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - - private fun updateAuth(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - Auth.TRUST_GOOGLE -> editor.putBoolean(key, value as Boolean) - Auth.VISIBLE -> editor.putBoolean(key, value as Boolean) - Auth.INCLUDE_ANDROID_ID -> editor.putBoolean(key, value as Boolean) - Auth.STRIP_DEVICE_NAME -> editor.putBoolean(key, value as Boolean) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun queryExposure(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - Exposure.SCANNER_ENABLED -> getSettingsBoolean(key, false) - Exposure.LAST_CLEANUP -> preferences.getLong(key, 0L) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - - private fun updateExposure(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - Exposure.SCANNER_ENABLED -> editor.putBoolean(key, value as Boolean) - Exposure.LAST_CLEANUP -> editor.putLong(key, value as Long) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun querySafetyNet(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - SafetyNet.ENABLED -> getSettingsBoolean(key, false) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - - private fun updateSafetyNet(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - SafetyNet.ENABLED -> editor.putBoolean(key, value as Boolean) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun queryDroidGuard(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - DroidGuard.ENABLED -> getSettingsBoolean(key, false) - DroidGuard.MODE -> getSettingsString(key) - DroidGuard.NETWORK_SERVER_URL -> getSettingsString(key) - DroidGuard.FORCE_LOCAL_DISABLED -> systemDefaultPreferences?.getBoolean(key, false) ?: false - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - - private fun updateDroidGuard(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - DroidGuard.ENABLED -> editor.putBoolean(key, value as Boolean) - DroidGuard.MODE -> editor.putString(key, value as String) - DroidGuard.NETWORK_SERVER_URL -> editor.putString(key, value as String) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun queryProfile(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - Profile.PROFILE -> getSettingsString(key, "auto") - Profile.SERIAL -> getSettingsString(key) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - - private fun updateProfile(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - Profile.PROFILE -> editor.putString(key, value as String?) - Profile.SERIAL -> editor.putString(key, value as String?) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun queryLocation(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - Location.WIFI_MLS -> getSettingsBoolean(key, hasUnifiedNlpLocationBackend("org.microg.nlp.backend.ichnaea")) - Location.WIFI_MOVING -> getSettingsBoolean(key, hasUnifiedNlpLocationBackend("de.sorunome.unifiednlp.trains")) - Location.WIFI_LEARNING -> getSettingsBoolean(key, hasUnifiedNlpLocationBackend("helium314.localbackend", "org.fitchfamily.android.dejavu")) - Location.CELL_MLS -> getSettingsBoolean(key, hasUnifiedNlpLocationBackend("org.microg.nlp.backend.ichnaea")) - Location.CELL_LEARNING -> getSettingsBoolean(key, hasUnifiedNlpLocationBackend("helium314.localbackend", "org.fitchfamily.android.dejavu")) - Location.GEOCODER_NOMINATIM -> getSettingsBoolean(key, hasUnifiedNlpGeocoderBackend("org.microg.nlp.backend.nominatim") ) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - private fun hasUnifiedNlpPrefixInStringSet(key: String, vararg prefixes: String) = getUnifiedNlpSettingsStringSetCompat(key, emptySet()).any { entry -> prefixes.any { prefix -> entry.startsWith(prefix)}} - private fun hasUnifiedNlpLocationBackend(vararg packageNames: String) = hasUnifiedNlpPrefixInStringSet("location_backends", *packageNames.map { "$it/" }.toTypedArray()) - private fun hasUnifiedNlpGeocoderBackend(vararg packageNames: String) = hasUnifiedNlpPrefixInStringSet("geocoder_backends", *packageNames.map { "$it/" }.toTypedArray()) - - private fun updateLocation(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - Location.WIFI_MLS -> editor.putBoolean(key, value as Boolean) - Location.WIFI_MOVING -> editor.putBoolean(key, value as Boolean) - Location.WIFI_LEARNING -> editor.putBoolean(key, value as Boolean) - Location.CELL_MLS -> editor.putBoolean(key, value as Boolean) - Location.CELL_LEARNING -> editor.putBoolean(key, value as Boolean) - Location.GEOCODER_NOMINATIM -> editor.putBoolean(key, value as Boolean) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun queryVending(p: Array): Cursor = MatrixCursor(p).addRow(p) { key -> - when (key) { - Vending.LICENSING -> getSettingsBoolean(key, false) - Vending.BILLING -> getSettingsBoolean(key, false) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - - private fun updateVending(values: ContentValues) { - if (values.size() == 0) return - val editor = preferences.edit() - values.valueSet().forEach { (key, value) -> - when (key) { - Vending.LICENSING -> editor.putBoolean(key, value as Boolean) - Vending.BILLING -> editor.putBoolean(key, value as Boolean) - else -> throw IllegalArgumentException("Unknown key: $key") - } - } - editor.apply() - } - - private fun MatrixCursor.addRow( - p: Array, - valueGetter: (String) -> Any? - ): MatrixCursor { - val row = newRow() - for (key in p) row.add(valueGetter.invoke(key)) - return this - } - - override fun getType(uri: Uri): String { - return "vnd.android.cursor.item/vnd.${getAuthority(context!!)}.${uri.path}" - } - - override fun insert(uri: Uri, values: ContentValues?): Uri? { - throw UnsupportedOperationException() - } - - override fun delete(uri: Uri, selection: String?, selectionArgs: Array?): Int { - throw UnsupportedOperationException() - } - - /** - * Returns the current setting of the given [key] - * using the default value from [systemDefaultPreferences] or [def] if not available. - * @return the current setting as [Int], because [ContentProvider] does not support [Boolean]. - */ - private fun getSettingsBoolean(key: String, def: Boolean): Int { - return listOf(preferences, systemDefaultPreferences, metaDataPreferences).getBooleanAsInt(key, def) - } - - private fun getSettingsString(key: String, def: String? = null): String? = listOf(preferences, systemDefaultPreferences, metaDataPreferences).getString(key, def) - private fun getSettingsInt(key: String, def: Int): Int = listOf(preferences, systemDefaultPreferences, metaDataPreferences).getInt(key, def) - private fun getSettingsLong(key: String, def: Long): Long = listOf(preferences, systemDefaultPreferences, metaDataPreferences).getLong(key, def) - private fun getUnifiedNlpSettingsStringSetCompat(key: String, def: Set): Set = listOf(unifiedNlpPreferences, preferences, systemDefaultPreferences).getStringSetCompat(key, def) - - private fun SharedPreferences.getStringSetCompat(key: String, def: Set): Set { - if (SDK_INT >= 11) { - try { - val res = getStringSet(key, null) - if (res != null) return res.filter { it.isNotEmpty() }.toSet() - } catch (ignored: Exception) { - // Ignore - } - } - try { - val str = getString(key, null) - if (str != null) return str.split("\\|".toRegex()).filter { it.isNotEmpty() }.toSet() - } catch (ignored: Exception) { - // Ignore - } - return def - } - - private fun List.getStringSetCompat(key: String, def: Set): Set = foldRight(def) { preferences, defValue -> preferences?.getStringSetCompat(key, defValue) ?: defValue } - private fun List.getString(key: String, def: String?): String? = foldRight(def) { preferences, defValue -> preferences?.getString(key, defValue) ?: defValue } - private fun List.getInt(key: String, def: Int): Int = foldRight(def) { preferences, defValue -> preferences?.getInt(key, defValue) ?: defValue } - private fun List.getLong(key: String, def: Long): Long = foldRight(def) { preferences, defValue -> preferences?.getLong(key, defValue) ?: defValue } - private fun List.getBoolean(key: String, def: Boolean): Boolean = foldRight(def) { preferences, defValue -> preferences?.getBoolean(key, defValue) ?: defValue } - private fun List.getBooleanAsInt(key: String, def: Boolean): Int = if (getBoolean(key, def)) 1 else 0 -} diff --git a/play-services-base/core/src/main/kotlin/org/microg/gms/ui/SwitchBarPreference.kt b/play-services-base/core/src/main/kotlin/org/microg/gms/ui/SwitchBarPreference.kt deleted file mode 100644 index 446be354..00000000 --- a/play-services-base/core/src/main/kotlin/org/microg/gms/ui/SwitchBarPreference.kt +++ /dev/null @@ -1,62 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.ui - -import android.content.Context -import android.graphics.drawable.Drawable -import android.util.AttributeSet -import androidx.appcompat.widget.SwitchCompat -import androidx.core.content.res.TypedArrayUtils -import androidx.preference.PreferenceViewHolder -import androidx.preference.TwoStatePreference -import org.microg.gms.base.core.R - -// TODO -class SwitchBarPreference : TwoStatePreference { - private val frameId: Int - private val backgroundOn: Drawable? - private val backgroundOff: Drawable? - private val backgroundDisabled: Drawable? - - constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) { - val a = context.obtainStyledAttributes(attrs, R.styleable.SwitchBarPreference, defStyleAttr, defStyleRes) - frameId = a.getResourceId(R.styleable.SwitchBarPreference_switchBarFrameId, 0) - backgroundOn = a.getDrawable(R.styleable.SwitchBarPreference_switchBarFrameBackgroundOn) - backgroundOff = a.getDrawable(R.styleable.SwitchBarPreference_switchBarFrameBackgroundOff) - backgroundDisabled = a.getDrawable(R.styleable.SwitchBarPreference_switchBarFrameBackgroundDisabled) - } - constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : this(context, attrs, defStyleAttr, R.style.Preference_SwitchBar) - constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, R.attr.switchBarPreferenceStyle) - constructor(context: Context) : this(context, null) - - override fun onBindViewHolder(holder: PreferenceViewHolder) { - super.onBindViewHolder(holder) - holder.isDividerAllowedBelow = false - holder.isDividerAllowedAbove = false - val switch = holder.findViewById(R.id.switch_widget) as SwitchCompat - switch.setOnCheckedChangeListener(null) - switch.isChecked = isChecked - switch.setOnCheckedChangeListener { view, isChecked -> - if (!callChangeListener(isChecked)) { - view.isChecked = !isChecked - return@setOnCheckedChangeListener - } - this.isChecked = isChecked - } - val frame = if (frameId == 0) null else holder.findViewById(frameId) - val backgroundView = frame ?: holder.itemView - val (backgroundDrawable, backgroundColorAttribute) = when { - !isEnabled -> Pair(backgroundDisabled, androidx.appcompat.R.attr.colorControlHighlight) - isChecked -> Pair(backgroundOn, androidx.appcompat.R.attr.colorControlActivated) - else -> Pair(backgroundOff, androidx.appcompat.R.attr.colorButtonNormal) - } - if (backgroundDrawable != null) { - backgroundView.setBackgroundDrawable(backgroundDrawable) - } else { - backgroundView.setBackgroundColorAttribute(backgroundColorAttribute) - } - } -} \ No newline at end of file diff --git a/play-services-base/core/src/main/kotlin/org/microg/gms/utils/IntentCacheManager.kt b/play-services-base/core/src/main/kotlin/org/microg/gms/utils/IntentCacheManager.kt deleted file mode 100644 index 4a5e55be..00000000 --- a/play-services-base/core/src/main/kotlin/org/microg/gms/utils/IntentCacheManager.kt +++ /dev/null @@ -1,149 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.utils - -import android.app.AlarmManager -import android.app.AlarmManager.ELAPSED_REALTIME_WAKEUP -import android.app.PendingIntent.FLAG_NO_CREATE -import android.app.PendingIntent.FLAG_UPDATE_CURRENT -import android.app.Service -import android.content.Context -import android.content.Intent -import android.os.Build.VERSION.SDK_INT -import android.os.Parcelable -import android.os.SystemClock -import android.util.Log -import androidx.core.app.PendingIntentCompat -import androidx.core.content.getSystemService -import java.util.UUID - -class IntentCacheManager(private val context: Context, private val clazz: Class, private val type: Int) { - private val lock = Any() - private lateinit var content: ArrayList - private lateinit var id: String - private var isReady: Boolean = false - private val pendingActions: MutableList<() -> Unit> = arrayListOf() - - init { - val pendingIntent = PendingIntentCompat.getService(context, type, getIntent(), 0, true)!! - val alarmManager = context.getSystemService() - if (SDK_INT >= 19) { - alarmManager?.setWindow(ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + TEN_YEARS, -1, pendingIntent) - } else { - alarmManager?.set(ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + TEN_YEARS, pendingIntent) - } - pendingIntent.send() - } - - private fun getIntent() = Intent(context, clazz).apply { - action = ACTION - putExtra(EXTRA_IS_CACHE, true) - putExtra(EXTRA_CACHE_TYPE, this@IntentCacheManager.type) - } - - fun add(entry: T, check: (T) -> Boolean = { false }) = runIfReady { - val iterator = content.iterator() - while (iterator.hasNext()) { - if (check(iterator.next())) { - iterator.remove() - } - } - content.add(entry) - updateIntent() - } - - fun remove(entry: T) = runIfReady { - if (content.remove(entry)) updateIntent() - } - - fun removeIf(check: (T) -> Boolean) = runIfReady { - var removed = false - val iterator = content.iterator() - while (iterator.hasNext()) { - if (check(iterator.next())) { - iterator.remove() - removed = true - } - } - if (removed) updateIntent() - } - - fun clear() = runIfReady { - content.clear() - updateIntent() - } - - fun getId(): String? = if (this::id.isInitialized) id else null - - fun getEntries(): List = if (this::content.isInitialized) content else emptyList() - - fun processIntent(intent: Intent) { - if (isCache(intent) && getType(intent) == type) { - synchronized(lock) { - content = intent.getParcelableArrayListExtra(EXTRA_DATA) ?: arrayListOf() - id = intent.getStringExtra(EXTRA_ID) ?: UUID.randomUUID().toString() - if (!intent.hasExtra(EXTRA_ID)) { - Log.d(TAG, "Created new intent cache with id $id") - } else if (intent.hasExtra(EXTRA_DATA)) { - Log.d(TAG, "Recovered data from intent cache with id $id") - } - pendingActions.forEach { it() } - pendingActions.clear() - isReady = true - updateIntent() - } - } - } - - private fun runIfReady(action: () -> Unit) { - synchronized(lock) { - if (isReady) { - action() - } else { - pendingActions.add(action) - } - } - } - - private fun updateIntent() { - synchronized(lock) { - if (isReady) { - val intent = getIntent().apply { - putExtra(EXTRA_ID, id) - putParcelableArrayListExtra(EXTRA_DATA, content) - } - val pendingIntent = PendingIntentCompat.getService(context, type, intent, FLAG_NO_CREATE or FLAG_UPDATE_CURRENT, true) - if (pendingIntent == null) { - Log.w(TAG, "Failed to update existing pending intent, will likely have a loss of information") - } - } - } - } - - companion object { - private const val TAG = "IntentCacheManager" - private const val TEN_YEARS = 315360000000L - private const val ACTION = "org.microg.gms.ACTION_INTENT_CACHE_MANAGER" - private const val EXTRA_IS_CACHE = "org.microg.gms.IntentCacheManager.is_cache" - private const val EXTRA_CACHE_TYPE = "org.microg.gms.IntentCacheManager.cache_type" - private const val EXTRA_ID = "org.microg.gms.IntentCacheManager.id" - private const val EXTRA_DATA = "org.microg.gms.IntentCacheManager.data" - - inline fun create(context: Context, type: Int) = IntentCacheManager(context, S::class.java, type) - - fun isCache(intent: Intent): Boolean = try { - intent.getBooleanExtra(EXTRA_IS_CACHE, false) - } catch (e: Exception) { - false - } - - fun getType(intent: Intent): Int { - val ret = intent.getIntExtra(EXTRA_CACHE_TYPE, -1) - if (ret == -1) throw IllegalArgumentException() - return ret - } - } -} \ No newline at end of file diff --git a/play-services-base/core/src/main/kotlin/org/microg/gms/utils/PackageManagerUtils.kt b/play-services-base/core/src/main/kotlin/org/microg/gms/utils/PackageManagerUtils.kt deleted file mode 100644 index 5a5e2f72..00000000 --- a/play-services-base/core/src/main/kotlin/org/microg/gms/utils/PackageManagerUtils.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.utils - -import android.content.pm.PackageManager -import android.content.pm.PackageManager.NameNotFoundException -import android.content.pm.Signature -import android.util.Base64 -import com.google.android.gms.common.internal.CertData -import java.security.MessageDigest -import java.util.* - -fun PackageManager.isPlatformCertificate(cert: CertData) = getPlatformCertificates().contains(cert) -fun PackageManager.getPlatformCertificates() = getCertificates("android") - -fun PackageManager.getCertificates(packageName: String): List = try { - getPackageInfo(packageName, PackageManager.GET_SIGNATURES).signatures.map { CertData(it.toByteArray()) } -} catch (e: NameNotFoundException) { - emptyList() -} - -@Deprecated("It's actually a certificate", ReplaceWith("getCertificates")) -fun PackageManager.getSignatures(packageName: String): Array = try { - getPackageInfo(packageName, PackageManager.GET_SIGNATURES).signatures -} catch (e: NameNotFoundException) { - emptyArray() -} - -fun PackageManager.getApplicationLabel(packageName: String): CharSequence = try { - getApplicationLabel(getApplicationInfo(packageName, 0)) -} catch (e: Exception) { - packageName -} - -fun PackageManager.getExtendedPackageInfo(packageName: String) = ExtendedPackageInfo(this, packageName) - -fun ByteArray.toBase64(vararg flags: Int): String = Base64.encodeToString(this, flags.fold(0) { a, b -> a or b }) -fun ByteArray.toHexString(separator: String = ""): String = joinToString(separator) { "%02x".format(it) } - -fun PackageManager.getFirstSignatureDigest(packageName: String, md: String): ByteArray? = - getCertificates(packageName).firstOrNull()?.digest(md) - -fun ByteArray.digest(md: String): ByteArray = MessageDigest.getInstance(md).digest(this) -@Deprecated("It's actually a certificate") -fun Signature.digest(md: String): ByteArray = toByteArray().digest(md) -fun CertData.digest(md: String): ByteArray = bytes.digest(md) diff --git a/play-services-base/core/src/main/res/layout/preference_app_heading.xml b/play-services-base/core/src/main/res/layout/preference_app_heading.xml deleted file mode 100644 index 1a229987..00000000 --- a/play-services-base/core/src/main/res/layout/preference_app_heading.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/play-services-base/core/src/main/res/values-fr/strings.xml b/play-services-base/core/src/main/res/values-fr/strings.xml deleted file mode 100644 index baa3b65f..00000000 --- a/play-services-base/core/src/main/res/values-fr/strings.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - Avancé - Aucun - Désactivé - Activé - Automatique - Manuel - Actif en arrière-plan - \ No newline at end of file diff --git a/play-services-base/core/src/main/res/values-pt-rBR/strings.xml b/play-services-base/core/src/main/res/values-pt-rBR/strings.xml deleted file mode 100644 index 999c3508..00000000 --- a/play-services-base/core/src/main/res/values-pt-rBR/strings.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - Avançado - Nenhum - %1$s está rodando em segundo plano. - Ligado - Desligado - Ativo em segundo plano - Excluá %1$s das configurações de otimização de bateria ou mude as configurações de notificação para esconder essa notificação. - Ver tudo - Abrir - Desativado - Ativado - Automático - Manual - \ No newline at end of file diff --git a/play-services-base/core/src/main/res/values/themes.xml b/play-services-base/core/src/main/res/values/themes.xml deleted file mode 100644 index a125f9cf..00000000 --- a/play-services-base/core/src/main/res/values/themes.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/play-services-base/gradle.properties b/play-services-base/gradle.properties deleted file mode 100644 index 6949ecb1..00000000 --- a/play-services-base/gradle.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2013-2016 microG Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -POM_NAME=Play Services Library Base -POM_DESCRIPTION=Base classes used by all Play Services Library modules - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsLib - -POM_SCM_URL=https://github.com/microg/android_external_GmsLib -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsLib.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsLib.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=mar-v-in -POM_DEVELOPER_NAME=Marvin W \ No newline at end of file diff --git a/play-services-base/src/main/AndroidManifest.xml b/play-services-base/src/main/AndroidManifest.xml deleted file mode 100644 index c31f1c05..00000000 --- a/play-services-base/src/main/AndroidManifest.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - diff --git a/play-services-base/src/main/java/com/google/android/gms/common/GoogleApiAvailability.java b/play-services-base/src/main/java/com/google/android/gms/common/GoogleApiAvailability.java deleted file mode 100644 index 61ee1ec0..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/GoogleApiAvailability.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common; - -import android.app.Dialog; - -import org.microg.gms.common.PublicApi; - -@PublicApi -public class GoogleApiAvailability { - - private GoogleApiAvailability() { - } - - private static final class InstanceHolder { - static final GoogleApiAvailability instance = new GoogleApiAvailability(); - } - - /** - * Returns the singleton instance of GoogleApiAvailability. - */ - public static GoogleApiAvailability getInstance() { - return InstanceHolder.instance; - } - - - /** - * Returns a dialog to address the provided errorCode. The returned dialog displays a localized - * message about the error and upon user confirmation (by tapping on dialog) will direct them - * to the Play Store if Google Play services is out of date or missing, or to system settings - * if Google Play services is disabled on the device. - * - */ - public Dialog getErrorDialog() { - // TODO - return null; - } - -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesClient.java b/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesClient.java deleted file mode 100644 index 0941e410..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesClient.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common; - -import android.os.Bundle; - -@Deprecated -public interface GooglePlayServicesClient { - void connect(); - - void disconnect(); - - boolean isConnected(); - - @Deprecated - interface OnConnectionFailedListener { - - void onConnectionFailed(ConnectionResult result); - } - - @Deprecated - interface ConnectionCallbacks { - - void onConnected(Bundle connectionHint); - - void onDisconnected(); - } -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesUtil.java b/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesUtil.java deleted file mode 100644 index d5399280..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesUtil.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common; - -import android.app.Dialog; -import android.app.PendingIntent; -import android.util.Log; - -import org.microg.gms.common.Constants; -import org.microg.gms.common.PublicApi; - -/** - * Utility class for verifying that the Google Play services APK is available and up-to-date on - * this device. The same checks are performed if one uses {@link AdvertisingIdClient} or - * {@link GoogleAuthUtil} to connect to the service. - *

- * TODO: methods :) - */ -@PublicApi -public class GooglePlayServicesUtil { - private static final String TAG = "GooglePlayServicesUtil"; - - /** - * Package name for Google Play services. - */ - @Deprecated - public static final String GOOGLE_PLAY_SERVICES_PACKAGE = Constants.GMS_PACKAGE_NAME; - - /** - * Google Play services client library version (declared in library's AndroidManifest.xml android:versionCode). - */ - @Deprecated - public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = Constants.GMS_VERSION_CODE; - - /** - * Returns a dialog to address the provided errorCode. The returned dialog displays a localized - * message about the error and upon user confirmation (by tapping on dialog) will direct them - * to the Play Store if Google Play services is out of date or missing, or to system settings - * if Google Play services is disabled on the device. - * - */ - @Deprecated - public static Dialog getErrorDialog() { - return GoogleApiAvailability.getInstance().getErrorDialog(); - } - - /** - * Returns a PendingIntent to address the provided errorCode. It will direct them to one of the - * following places to either the Play Store if Google Play services is out of date or missing, - * or system settings if Google Play services is disabled on the device. - * - */ - @Deprecated - public static PendingIntent getErrorPendingIntent() { - return null; // TODO - } - - /** - * Returns a human-readable string of the error code returned from {@link #isGooglePlayServicesAvailable()}. - */ - @Deprecated - public static String getErrorString() { - return null; // TODO - } - - /** - * Returns the open source software license information for the Google Play services - * application, or null if Google Play services is not available on this device. - */ - @Deprecated - public static String getOpenSourceSoftwareLicenseInfo() { - return null; // TODO - } - - /** - * Verifies that Google Play services is installed and enabled on this device, and that the - * version installed on this device is no older than the one required by this client. - * - * @return status code indicating whether there was an error. Can be one of following in - * {@link ConnectionResult}: SUCCESS, SERVICE_MISSING, SERVICE_VERSION_UPDATE_REQUIRED, - * SERVICE_DISABLED, SERVICE_INVALID - */ - @Deprecated - public static int isGooglePlayServicesAvailable() { - Log.d(TAG, "As we can't know right now if the later desired feature is available, " + - "we just pretend it to be."); - return ConnectionResult.SUCCESS; - } - - @Deprecated - public static boolean isGoogleSignedUid() { - return false; // TODO - } - - /** - * Determines whether an error is user-recoverable. If true, proceed by calling - * {@link #getErrorDialog()} and showing the dialog. - * - * @return true if the error is recoverable with {@link #getErrorDialog()} - */ - @Deprecated - public static boolean isUserRecoverableError() { - return false; // TODO - } - - @Deprecated - public static boolean showErrorDialogFragment() { - return false; // TODO - } - - /** - * Displays a notification relevant to the provided error code. This method is similar to - * {@link #getErrorDialog()}, but is provided for background - * tasks that cannot or shouldn't display dialogs. - * - */ - @Deprecated - public static void showErrorNotification() { - // TODO - } -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/AccountInfo.java b/play-services-base/src/main/java/com/google/android/gms/common/api/AccountInfo.java deleted file mode 100644 index fd400c45..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/AccountInfo.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import org.microg.safeparcel.AutoSafeParcelable; - -@Deprecated -public class AccountInfo extends AutoSafeParcelable { - public static final Creator CREATOR = new AutoCreator<>(AccountInfo.class); -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/Api.java b/play-services-base/src/main/java/com/google/android/gms/common/api/Api.java deleted file mode 100644 index 6b7f15e3..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/Api.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import org.microg.gms.common.PublicApi; -import org.microg.gms.common.api.ApiClientBuilder; - -/** - * Describes a section of the Google Play Services API that should be made available. Instances of - * this should be passed into {@link GoogleApiClient.Builder#addApi(Api)} to enable the appropriate - * parts of Google Play Services. - *

- * Google APIs are partitioned into sections which allow your application to configure only the - * services it requires. Each Google API provides an API object which can be passed to - * {@link GoogleApiClient.Builder#addApi(Api)} in order to configure and enable that functionality - * in your {@link GoogleApiClient} instance. - *

- * See {@link GoogleApiClient.Builder} for usage examples. - */ -@PublicApi -public final class Api { - private final ApiClientBuilder builder; - - @PublicApi(exclude = true) - public Api(ApiClientBuilder builder) { - this.builder = builder; - } - - @PublicApi(exclude = true) - public ApiClientBuilder getBuilder() { - return builder; - } - - /** - * Base interface for API options. These are used to configure specific parameters for - * individual API surfaces. The default implementation has no parameters. - */ - @PublicApi - public interface ApiOptions { - /** - * Base interface for {@link ApiOptions} in {@link Api}s that have options. - */ - @PublicApi - interface HasOptions extends ApiOptions { - } - - /** - * Base interface for {@link ApiOptions} that are not required, don't exist. - */ - @PublicApi - interface NotRequiredOptions extends ApiOptions { - } - - } - -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApi.java b/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApi.java deleted file mode 100644 index f0adb967..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApi.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common.api; - -import android.content.Context; - -import org.microg.gms.common.PublicApi; -import org.microg.gms.common.api.GoogleApiManager; - -@PublicApi -public abstract class GoogleApi implements HasApiKey { - @PublicApi(exclude = true) - public Api api; - - @PublicApi(exclude = true) - protected GoogleApi(Context context, Api api) { - this.api = api; - GoogleApiManager.getInstance(); - } - - @PublicApi(exclude = true) - public O getOptions() { - return null; - } -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiActivity.java b/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiActivity.java deleted file mode 100644 index 8a6b0690..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiActivity.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.google.android.gms.common.api; - -import android.app.Activity; - -public class GoogleApiActivity extends Activity { -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiClient.java b/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiClient.java deleted file mode 100644 index 0e20b6d5..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/GoogleApiClient.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import android.app.Activity; -import android.content.Context; -import android.os.Bundle; -import android.os.Looper; - -import com.google.android.gms.common.ConnectionResult; - -import org.microg.gms.common.PublicApi; -import org.microg.gms.common.api.ApiClientSettings; -import org.microg.gms.common.api.GoogleApiClientImpl; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -/** - * The main entry point for Google Play services integration. - *

- * GoogleApiClient is used with a variety of static methods. Some of these methods require that - * GoogleApiClient be connected, some will queue up calls before GoogleApiClient is connected; - * check the specific API documentation to determine whether you need to be connected. - *

- * Before any operation is executed, the GoogleApiClient must be connected using the - * {@link #connect()} method. The client is not considered connected until the - * {@link ConnectionCallbacks#onConnected(Bundle)} callback has been called. - *

- * When your app is done using this client, call {@link #disconnect()}, even if the async result - * from {@link #connect()} has not yet been delivered. - *

- * You should instantiate a client object in your Activity's {@link Activity#onCreate(Bundle)} - * method and then call {@link #connect()} in {@link Activity#onStart()} and {@link #disconnect()} - * in {@link Activity#onStop()}, regardless of the state. - */ -@PublicApi -@Deprecated -public interface GoogleApiClient { - - /** - * Connects the client to Google Play services. This method returns immediately, and connects - * to the service in the background. If the connection is successful, - * {@link ConnectionCallbacks#onConnected(Bundle)} is called and enqueued items are executed. - * On a failure, {@link OnConnectionFailedListener#onConnectionFailed(ConnectionResult)} is - * called. - */ - void connect(); - - /** - * Closes the connection to Google Play services. No calls can be made using this client after - * calling this method. Any method calls that haven't executed yet will be canceled. That is - * {@link ResultCallback#onResult(Result)} won't be called, if connection to the service hasn't - * been established yet all calls already made will be canceled. - * - * @see #connect() - */ - void disconnect(); - - /** - * Checks if the client is currently connected to the service, so that requests to other - * methods will succeed. Applications should guard client actions caused by the user with a - * call to this method. - * - * @return {@code true} if the client is connected to the service. - */ - boolean isConnected(); - - /** - * Checks if the client is attempting to connect to the service. - * - * @return {@code true} if the client is attempting to connect to the service. - */ - boolean isConnecting(); - - /** - * Returns {@code true} if the specified listener is currently registered to receive connection - * events. - * - * @param listener The listener to check for. - * @return {@code true} if the specified listener is currently registered to receive connection - * events. - * @see #registerConnectionCallbacks(ConnectionCallbacks) - * @see #unregisterConnectionCallbacks(ConnectionCallbacks) - */ - boolean isConnectionCallbacksRegistered(ConnectionCallbacks listener); - - /** - * Returns {@code true} if the specified listener is currently registered to receive connection - * failed events. - * - * @param listener The listener to check for. - * @return {@code true} if the specified listener is currently registered to receive connection - * failed events. - * @see #registerConnectionFailedListener(OnConnectionFailedListener) - * @see #unregisterConnectionFailedListener(OnConnectionFailedListener) - */ - boolean isConnectionFailedListenerRegistered(OnConnectionFailedListener listener); - - /** - * Registers a listener to receive connection events from this {@link GoogleApiClient}. If the - * service is already connected, the listener's {@link ConnectionCallbacks#onConnected(Bundle)} - * method will be called immediately. Applications should balance calls to this method with - * calls to {@link #unregisterConnectionCallbacks(ConnectionCallbacks)} to avoid leaking - * resources. - *

- * If the specified listener is already registered to receive connection events, this method - * will not add a duplicate entry for the same listener, but will still call the listener's - * {@link ConnectionCallbacks#onConnected(Bundle)} method if currently connected. - *

- * Note that the order of messages received here may not be stable, so clients should not rely - * on the order that multiple listeners receive events in. - * - * @param listener the listener where the results of the asynchronous {@link #connect()} call - * are delivered. - */ - void registerConnectionCallbacks(ConnectionCallbacks listener); - - /** - * Registers a listener to receive connection failed events from this {@link GoogleApiClient}. - * Unlike {@link #registerConnectionCallbacks(ConnectionCallbacks)}, if the service is not - * already connected, the listener's - * {@link OnConnectionFailedListener#onConnectionFailed(ConnectionResult)} method will not be - * called immediately. Applications should balance calls to this method with calls to - * {@link #unregisterConnectionFailedListener(OnConnectionFailedListener)} to avoid leaking - * resources. - *

- * If the specified listener is already registered to receive connection failed events, this - * method will not add a duplicate entry for the same listener. - *

- * Note that the order of messages received here may not be stable, so clients should not rely - * on the order that multiple listeners receive events in. - * - * @param listener the listener where the results of the asynchronous {@link #connect()} call - * are delivered. - */ - void registerConnectionFailedListener(OnConnectionFailedListener listener); - - /** - * Removes a connection listener from this {@link GoogleApiClient}. Note that removing a - * listener does not generate any callbacks. - *

- * If the specified listener is not currently registered to receive connection events, this - * method will have no effect. - * - * @param listener the listener to unregister. - */ - void unregisterConnectionCallbacks(ConnectionCallbacks listener); - - @PublicApi - class Builder { - private final Context context; - private final Map apis = new HashMap<>(); - private final Set connectionCallbacks = new HashSet<>(); - private final Set connectionFailedListeners = new HashSet<>(); - private final Looper looper; - - public Builder(Context context) { - this.context = context; - this.looper = context.getMainLooper(); - } - - /** - * Specify which Apis are requested by your app. See {@link Api} for more information. - * - * @param api The Api requested by your app. - * @see Api - */ - public Builder addApi(Api api) { - apis.put(api, null); - return this; - } - - /** - * Builds a new {@link GoogleApiClient} object for communicating with the Google APIs. - * - * @return The {@link GoogleApiClient} object. - */ - public GoogleApiClient build() { - int clientId = -1; - return new GoogleApiClientImpl(context, looper, getClientSettings(), apis, connectionCallbacks, connectionFailedListeners); - } - - private ApiClientSettings getClientSettings() { - return null; - } - - } - - /** - * Provides callbacks that are called when the client is connected or disconnected from the - * service. Most applications implement {@link #onConnected(Bundle)} to start making requests. - */ - @PublicApi - @Deprecated - interface ConnectionCallbacks extends org.microg.gms.common.api.ConnectionCallbacks { - } - - @PublicApi - @Deprecated - interface OnConnectionFailedListener extends org.microg.gms.common.api.OnConnectionFailedListener { - } -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/HasApiKey.java b/play-services-base/src/main/java/com/google/android/gms/common/api/HasApiKey.java deleted file mode 100644 index 642a636d..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/HasApiKey.java +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common.api; - -public interface HasApiKey { -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/PendingResult.java b/play-services-base/src/main/java/com/google/android/gms/common/api/PendingResult.java deleted file mode 100644 index e5f92160..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/PendingResult.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -public interface PendingResult { -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/api/internal/ApiKey.java b/play-services-base/src/main/java/com/google/android/gms/common/api/internal/ApiKey.java deleted file mode 100644 index b679b2b9..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/api/internal/ApiKey.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common.api.internal; - -public class ApiKey { - - public ApiKey() { - } -} diff --git a/play-services-base/src/main/java/com/google/android/gms/common/data/DataBuffer.java b/play-services-base/src/main/java/com/google/android/gms/common/data/DataBuffer.java deleted file mode 100644 index 907aee2d..00000000 --- a/play-services-base/src/main/java/com/google/android/gms/common/data/DataBuffer.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.data; - -import androidx.annotation.NonNull; - -import com.google.android.gms.common.api.Releasable; - -import org.microg.gms.common.PublicApi; - -import java.util.Iterator; - -/** - * TODO - */ -@PublicApi -public abstract class DataBuffer implements Releasable, Iterable { - - @PublicApi(exclude = true) - public DataBuffer() { - } - - /** - * @deprecated use {@link #release()} instead - */ - @Deprecated - public final void close() { - release(); - } - - /** - * @deprecated {@link #release()} is idempotent, and so is safe to call multiple times - */ - @Deprecated - public boolean isClosed() { - return false; - } - - @NonNull - @Override - public Iterator iterator() { - return null; - } - - /** - * Releases resources used by the buffer. This method is idempotent. - */ - @Override - public void release() { - - } - -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/AbstractPendingResult.java b/play-services-base/src/main/java/org/microg/gms/common/api/AbstractPendingResult.java deleted file mode 100644 index cea4229b..00000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/AbstractPendingResult.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -import android.os.Looper; - -import com.google.android.gms.common.api.PendingResult; - -public class AbstractPendingResult implements PendingResult { - - public AbstractPendingResult(Looper looper) { - new ResultCallbackHandler<>(looper); - } - -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClient.java b/play-services-base/src/main/java/org/microg/gms/common/api/ApiClient.java deleted file mode 100644 index fbe23365..00000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClient.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -<<<<<<< HEAD:play-services-base/src/main/java/org/microg/gms/common/api/ApiClient.java -public interface ApiClient { - void connect(); - - void disconnect(); - - boolean isConnected(); - - boolean isConnecting(); -======= -public class ModuleDescriptor { - public static final String MODULE_ID = "com.google.android.gms.measurement.dynamite"; - public static final int MODULE_VERSION = 98; ->>>>>>> df6f331a (Dynamite: Bump version of measurement API):play-services-core/src/main/java/com/google/android/gms/dynamite/descriptors/com/google/android/gms/measurement/dynamite/ModuleDescriptor.java -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientBuilder.java b/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientBuilder.java deleted file mode 100644 index b5aa386f..00000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -import android.content.Context; -import android.os.Looper; - -import com.google.android.gms.common.api.Api; - -public interface ApiClientBuilder { - ApiClient build(O options, Context context, Looper looper, ApiClientSettings clientSettings, ConnectionCallbacks callbacks, OnConnectionFailedListener connectionFailedListener); -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientSettings.java b/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientSettings.java deleted file mode 100644 index d1e314a7..00000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ApiClientSettings.java +++ /dev/null @@ -1,9 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common.api; - -public class ApiClientSettings { -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ConnectionCallbacks.java b/play-services-base/src/main/java/org/microg/gms/common/api/ConnectionCallbacks.java deleted file mode 100644 index 738a43d3..00000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ConnectionCallbacks.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common.api; - -import android.os.Bundle; - -import com.google.android.gms.common.api.GoogleApiClient; - -public interface ConnectionCallbacks { - - /** - * After calling {@link #connect()}, this method will be invoked asynchronously when the - * connect request has successfully completed. After this callback, the application can - * make requests on other methods provided by the client and expect that no user - * intervention is required to call methods that use account and scopes provided to the - * client constructor. - *

- * Note that the contents of the {@code connectionHint} Bundle are defined by the specific - * services. Please see the documentation of the specific implementation of - * {@link GoogleApiClient} you are using for more information. - * - * @param connectionHint Bundle of data provided to clients by Google Play services. May - * be null if no content is provided by the service. - */ - void onConnected(Bundle connectionHint); - - /** - * Called when the client is temporarily in a disconnected state. This can happen if there - * is a problem with the remote service (e.g. a crash or resource problem causes it to be - * killed by the system). When called, all requests have been canceled and no outstanding - * listeners will be executed. GoogleApiClient will automatically attempt to restore the - * connection. Applications should disable UI components that require the service, and wait - * for a call to {@link #onConnected(Bundle)} to re-enable them. - * - * @param cause The reason for the disconnection. Defined by constants {@code CAUSE_*}. - */ - void onConnectionSuspended(int cause); -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiClientImpl.java b/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiClientImpl.java deleted file mode 100644 index 371a6555..00000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiClientImpl.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -import android.content.Context; -import android.os.Bundle; -import android.os.Looper; -import android.util.Log; - -import com.google.android.gms.common.api.Api; -import com.google.android.gms.common.api.GoogleApiClient; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -public class GoogleApiClientImpl implements GoogleApiClient { - private static final String TAG = "GmsApiClientImpl"; - - private final Map apiConnections = new HashMap<>(); - private final Set connectionCallbacks = new HashSet<>(); - private final Set connectionFailedListeners = new HashSet<>(); - private boolean shouldDisconnect = false; - - public GoogleApiClientImpl(Context context, Looper looper, ApiClientSettings clientSettings, - Map apis, - Set connectionCallbacks, - Set connectionFailedListeners) { - this.connectionCallbacks.addAll(connectionCallbacks); - this.connectionFailedListeners.addAll(connectionFailedListeners); - - for (Api api : apis.keySet()) { - ConnectionCallbacks baseConnectionCallbacks = new ConnectionCallbacks() { - @Override - public void onConnected(Bundle connectionHint) { - Log.d(TAG, "ConnectionCallbacks : onConnected()"); - for (ConnectionCallbacks callback : connectionCallbacks) { - callback.onConnected(connectionHint); - } - } - - @Override - public void onConnectionSuspended(int cause) { - Log.d(TAG, "ConnectionCallbacks : onConnectionSuspended()"); - for (ConnectionCallbacks callback : connectionCallbacks) { - callback.onConnectionSuspended(cause); - } - } - }; - OnConnectionFailedListener baseConnectionFailedListener = result -> { - Log.d(TAG, "OnConnectionFailedListener : onConnectionFailed()"); - for (OnConnectionFailedListener listener : connectionFailedListeners) { - listener.onConnectionFailed(result); - } - }; - apiConnections.put(api, api.getBuilder().build(apis.get(api), context, looper, clientSettings, baseConnectionCallbacks, baseConnectionFailedListener)); - } - } - - @Override - public synchronized void connect() { - Log.d(TAG, "connect()"); - if (isConnected() || isConnecting()) { - if (shouldDisconnect) { - shouldDisconnect = false; - return; - } - Log.d(TAG, "Already connected/connecting, nothing to do"); - return; - } - for (ApiClient connection : apiConnections.values()) { - if (!connection.isConnected()) { - connection.connect(); - } - } - } - - @Override - public synchronized void disconnect() { - Log.d(TAG, "disconnect()"); - for (ApiClient connection : apiConnections.values()) { - if (connection.isConnected()) { - connection.disconnect(); - } - } - } - - @Override - public synchronized boolean isConnected() { - for (ApiClient connection : apiConnections.values()) { - if (!connection.isConnected()) return false; - } - return true; - } - - @Override - public synchronized boolean isConnecting() { - for (ApiClient connection : apiConnections.values()) { - if (connection.isConnecting()) return true; - } - return false; - } - - @Override - public boolean isConnectionCallbacksRegistered(ConnectionCallbacks listener) { - return connectionCallbacks.contains(listener); - } - - @Override - public boolean isConnectionFailedListenerRegistered( - OnConnectionFailedListener listener) { - return connectionFailedListeners.contains(listener); - } - - @Override - public void registerConnectionCallbacks(ConnectionCallbacks listener) { - connectionCallbacks.add(listener); - } - - @Override - public void registerConnectionFailedListener(OnConnectionFailedListener listener) { - connectionFailedListeners.add(listener); - } - - @Override - public void unregisterConnectionCallbacks(ConnectionCallbacks listener) { - connectionCallbacks.remove(listener); - } - -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiManager.java b/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiManager.java deleted file mode 100644 index a5fa2545..00000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/GoogleApiManager.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common.api; - -import android.annotation.SuppressLint; - -public class GoogleApiManager { - @SuppressLint("StaticFieldLeak") - private static GoogleApiManager instance; - - private GoogleApiManager() { - } - - public synchronized static void getInstance() { - if (instance == null) instance = new GoogleApiManager(); - } - -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/OnConnectionFailedListener.java b/play-services-base/src/main/java/org/microg/gms/common/api/OnConnectionFailedListener.java deleted file mode 100644 index cd994235..00000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/OnConnectionFailedListener.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package org.microg.gms.common.api; - -import android.app.Activity; - -import com.google.android.gms.common.ConnectionResult; - -public interface OnConnectionFailedListener { - /** - * Called when there was an error connecting the client to the service. - * - * @param result A {@link ConnectionResult} that can be used for resolving the error, and - * deciding what sort of error occurred. To resolve the error, the resolution - * must be started from an activity with a non-negative {@code requestCode} - * passed to {@link ConnectionResult#startResolutionForResult(Activity, int)}. - * Applications should implement {@link Activity#onActivityResult} in their - * Activity to call {@link #connect()} again if the user has resolved the - * issue (resultCode is {@link Activity#RESULT_OK}). - */ - void onConnectionFailed(ConnectionResult result); -} diff --git a/play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java b/play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java deleted file mode 100644 index a737a076..00000000 --- a/play-services-base/src/main/java/org/microg/gms/common/api/ResultCallbackHandler.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common.api; - -import android.os.Handler; -import android.os.Looper; -import android.os.Message; -import android.util.Log; - -import com.google.android.gms.common.api.Result; -import com.google.android.gms.common.api.ResultCallback; - -class ResultCallbackHandler extends Handler { - private static final String TAG = "GmsResultCbackHandler"; - public static final int CALLBACK_ON_COMPLETE = 1; - public static final int CALLBACK_ON_TIMEOUT = 2; - - public ResultCallbackHandler(Looper looper) { - super(looper); - } - - @Override - public void handleMessage(Message msg) { - switch (msg.what) { - case CALLBACK_ON_COMPLETE: - OnCompleteObject o = (OnCompleteObject) msg.obj; - Log.d(TAG, "handleMessage() : onResult(" + o.result + ")"); - o.callback.onResult(o.result); - break; - case CALLBACK_ON_TIMEOUT: - // TODO - break; - } - } - - public static class OnCompleteObject { - public ResultCallback callback; - public R result; - - public OnCompleteObject(ResultCallback callback, R result) { - this.callback = callback; - this.result = result; - } - } -} diff --git a/play-services-base/src/main/res/values/version.xml b/play-services-base/src/main/res/values/version.xml deleted file mode 100644 index 318bb1c2..00000000 --- a/play-services-base/src/main/res/values/version.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - 6599436 - diff --git a/play-services-basement/build.gradle b/play-services-basement/build.gradle deleted file mode 100644 index 8971fb98..00000000 --- a/play-services-basement/build.gradle +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2013-2015 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -dependencies { - api "org.microg:safe-parcel:1.7.0" - - // Dependencies from play-services-basement:18.0.0 - api "androidx.collection:collection:$collectionVersion" - api "androidx.core:core-ktx:$coreVersion" - api "androidx.fragment:fragment-ktx:$fragmentVersion" -} - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion androidBuildVersionTools - - aidlPackageWhiteList "com/google/android/gms/common/api/Status.aidl" - aidlPackageWhiteList "com/google/android/gms/common/internal/ICancelToken.aidl" - aidlPackageWhiteList "com/google/android/gms/common/server/FavaDiagnosticsEntity.aidl" - aidlPackageWhiteList "com/google/android/gms/dynamic/IObjectWrapper.aidl" - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - buildConfigField "int", "VERSION_CODE", "$appVersionCode" - } - - buildFeatures { - viewBinding = true - aidl true - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - compileOptions { - sourceCompatibility = 17 - targetCompatibility = 17 - } - namespace 'org.microg.gms.basement' -} \ No newline at end of file diff --git a/play-services-basement/gradle.properties b/play-services-basement/gradle.properties deleted file mode 100644 index f7f3ecc1..00000000 --- a/play-services-basement/gradle.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright 2013-2016 microG Project Team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -POM_NAME=Play Services Basement -POM_DESCRIPTION=Interfaces and objects used all over Play Services API, Library and Core - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsApi - -POM_SCM_URL=https://github.com/microg/android_external_GmsApi -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=mar-v-in -POM_DEVELOPER_NAME=Marvin W \ No newline at end of file diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/api/Status.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/api/Status.aidl deleted file mode 100644 index 701f99a9..00000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/api/Status.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.api; - -parcelable Status; \ No newline at end of file diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/GetServiceRequest.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/GetServiceRequest.aidl deleted file mode 100644 index 791dbe90..00000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/GetServiceRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.internal; - -parcelable GetServiceRequest; diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ICancelToken.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ICancelToken.aidl deleted file mode 100644 index aebd4794..00000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ICancelToken.aidl +++ /dev/null @@ -1,5 +0,0 @@ -package com.google.android.gms.common.internal; - -interface ICancelToken { - void cancel(); -} diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsCallbacks.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsCallbacks.aidl deleted file mode 100644 index b0210281..00000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsCallbacks.aidl +++ /dev/null @@ -1,7 +0,0 @@ -package com.google.android.gms.common.internal; - -import android.os.Bundle; - -interface IGmsCallbacks { - void onPostInitComplete(int statusCode, IBinder binder, in Bundle params); -} diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsServiceBroker.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsServiceBroker.aidl deleted file mode 100644 index 8ff5c840..00000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/IGmsServiceBroker.aidl +++ /dev/null @@ -1,15 +0,0 @@ -package com.google.android.gms.common.internal; - -import android.os.Bundle; - -import com.google.android.gms.common.internal.IGmsCallbacks; -import com.google.android.gms.common.internal.GetServiceRequest; -import com.google.android.gms.common.internal.ValidateAccountRequest; - -interface IGmsServiceBroker { - void getPeopleService(IGmsCallbacks callback, int code, String str, in Bundle params) = 4; - void getGoogleIdentityService(IGmsCallbacks callback, int code, String str, in Bundle params) = 16; - void getAddressService(IGmsCallbacks callback, int code, String str) = 23; - void getService(IGmsCallbacks callback, in GetServiceRequest request) = 45; - void validateAccount(IGmsCallbacks callback, in ValidateAccountRequest request) = 46; -} diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ValidateAccountRequest.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ValidateAccountRequest.aidl deleted file mode 100644 index cef6ad7e..00000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/common/internal/ValidateAccountRequest.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.android.gms.common.internal; - -parcelable ValidateAccountRequest; diff --git a/play-services-basement/src/main/aidl/com/google/android/gms/dynamic/IObjectWrapper.aidl b/play-services-basement/src/main/aidl/com/google/android/gms/dynamic/IObjectWrapper.aidl deleted file mode 100644 index 35e1474a..00000000 --- a/play-services-basement/src/main/aidl/com/google/android/gms/dynamic/IObjectWrapper.aidl +++ /dev/null @@ -1,8 +0,0 @@ -package com.google.android.gms.dynamic; - -/** - * The concrete class implementing IObjectWrapper must have exactly one declared private field - * for the wrapped object. Preferably, this is an instance of the ObjectWrapper class. - */ -interface IObjectWrapper { -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/ConnectionResult.java b/play-services-basement/src/main/java/com/google/android/gms/common/ConnectionResult.java deleted file mode 100644 index 23ebfb81..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/ConnectionResult.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common; - -import android.app.Activity; -import android.app.PendingIntent; -import android.content.IntentSender; -import android.text.TextUtils; - -import java.util.Arrays; - -/** - * Contains all possible error codes for when a client fails to connect to Google Play services. - * These error codes are used by {@link GoogleApiClient.OnConnectionFailedListener}. - */ -public class ConnectionResult { - /** - * The connection was successful. - */ - public static final int SUCCESS = 0; - /** - * Google Play services is missing on this device. The calling activity should pass this error - * code to {@link GooglePlayServicesUtil#getErrorDialog(int, Activity, int)} to get a localized - * error dialog that will resolve the error when shown. - */ - public static final int SERVICE_MISSING = 1; - /** - * The installed version of Google Play services is out of date. The calling activity should - * pass this error code to {@link GooglePlayServicesUtil#getErrorDialog(int, Activity, int)} to - * get a localized error dialog that will resolve the error when shown. - */ - public static final int SERVICE_VERSION_UPDATE_REQUIRED = 2; - /** - * The installed version of Google Play services has been disabled on this device. The calling - * activity should pass this error code to - * {@link GooglePlayServicesUtil#getErrorDialog(int, Activity, int)} to get a localized error - * dialog that will resolve the error when shown. - */ - public static final int SERVICE_DISABLED = 3; - /** - * The client attempted to connect to the service but the user is not signed in. The client may - * choose to continue without using the API or it may call - * {@link #startResolutionForResult(Activity, int)} to prompt the user to sign in. After the - * sign in activity returns with {@link Activity#RESULT_OK} further attempts to connect should - * succeed. - */ - public static final int SIGN_IN_REQUIRED = 4; - /** - * The client attempted to connect to the service with an invalid account name specified. - */ - public static final int INVALID_ACCOUNT = 5; - /** - * Completing the connection requires some form of resolution. A resolution will be available - * to be started with {@link #startResolutionForResult(Activity, int)}. If the result returned - * is {@link Activity#RESULT_OK}, then further attempts to connect should either complete or - * continue on to the next issue that needs to be resolved. - */ - public static final int RESOLUTION_REQUIRED = 6; - /** - * A network error occurred. Retrying should resolve the problem. - */ - public static final int NETWORK_ERROR = 7; - /** - * An internal error occurred. Retrying should resolve the problem. - */ - public static final int INTERNAL_ERROR = 8; - /** - * The version of the Google Play services installed on this device is not authentic. - */ - public static final int SERVICE_INVALID = 9; - /** - * The application is misconfigured. This error is not recoverable and will be treated as - * fatal. The developer should look at the logs after this to determine more actionable - * information. - */ - public static final int DEVELOPER_ERROR = 10; - /** - * The application is not licensed to the user. This error is not recoverable and will be - * treated as fatal. - */ - public static final int LICENSE_CHECK_FAILED = 11; - /** - * The client canceled the connection by calling {@link GoogleApiClient#disconnect()}. - * Only returned by {@link GoogleApiClient#blockingConnect()}. - */ - public static final int CANCELED = 13; - /** - * The timeout was exceeded while waiting for the connection to complete. Only returned by - * {@link GoogleApiClient#blockingConnect()}. - */ - public static final int TIMEOUT = 14; - /** - * An interrupt occurred while waiting for the connection complete. Only returned by - * {@link GoogleApiClient#blockingConnect()}. - */ - public static final int INTERRUPTED = 15; - /** - * One of the API components you attempted to connect to is not available. The API will not - * work on this device, and updating Google Play services will not likely solve the problem. - * Using the API on the device should be avoided. - */ - public static final int API_UNAVAILABLE = 16; - - /** - * Service doesn't have one or more required permissions. - */ - public static final int SERVICE_MISSING_PERMISSION = 19; - - /** - * The Drive API requires external storage (such as an SD card), but no external storage is - * mounted. This error is recoverable if the user installs external storage (if none is - * present) and ensures that it is mounted (which may involve disabling USB storage mode, - * formatting the storage, or other initialization as required by the device). - *

- * This error should never be returned on a device with emulated external storage. On devices - * with emulated external storage, the emulated "external storage" is always present regardless - * of whether the device also has removable storage. - */ - @Deprecated - public static final int DRIVE_EXTERNAL_STORAGE_REQUIRED = 1500; - - private final int statusCode; - private final PendingIntent pendingIntent; - private final String message; - - /** - * Creates a connection result. - * - * @param statusCode The status code. - */ - public ConnectionResult(int statusCode) { - this(statusCode, null); - } - - /** - * Creates a connection result. - * - * @param statusCode The status code. - * @param pendingIntent A pending intent that will resolve the issue when started, or null. - */ - public ConnectionResult(int statusCode, PendingIntent pendingIntent) { - this(statusCode, pendingIntent, getStatusString(statusCode)); - } - - /** - * Creates a connection result. - * - * @param statusCode The status code. - * @param pendingIntent A pending intent that will resolve the issue when started, or null. - * @param message An additional error message for the connection result, or null. - */ - public ConnectionResult(int statusCode, PendingIntent pendingIntent, String message) { - this.statusCode = statusCode; - this.pendingIntent = pendingIntent; - this.message = message; - } - - static String getStatusString(int statusCode) { - switch (statusCode) { - case -1: - return "UNKNOWN"; - case 0: - return "SUCCESS"; - case 1: - return "SERVICE_MISSING"; - case 2: - return "SERVICE_VERSION_UPDATE_REQUIRED"; - case 3: - return "SERVICE_DISABLED"; - case 4: - return "SIGN_IN_REQUIRED"; - case 5: - return "INVALID_ACCOUNT"; - case 6: - return "RESOLUTION_REQUIRED"; - case 7: - return "NETWORK_ERROR"; - case 8: - return "INTERNAL_ERROR"; - case 9: - return "SERVICE_INVALID"; - case 10: - return "DEVELOPER_ERROR"; - case 11: - return "LICENSE_CHECK_FAILED"; - case 13: - return "CANCELED"; - case 14: - return "TIMEOUT"; - case 15: - return "INTERRUPTED"; - case 16: - return "API_UNAVAILABLE"; - case 17: - return "SIGN_IN_FAILED"; - case 18: - return "SERVICE_UPDATING"; - case 19: - return "SERVICE_MISSING_PERMISSION"; - case 20: - return "RESTRICTED_PROFILE"; - case 21: - return "API_VERSION_UPDATE_REQUIRED"; - case 42: - return "UPDATE_ANDROID_WEAR"; - case 99: - return "UNFINISHED"; - case 1500: - return "DRIVE_EXTERNAL_STORAGE_REQUIRED"; - default: - return "UNKNOWN_ERROR_CODE(" + statusCode + ")"; - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } else if (!(o instanceof ConnectionResult)) { - return false; - } else { - ConnectionResult r = (ConnectionResult)o; - return statusCode == r.statusCode && pendingIntent == null ? r.pendingIntent == null : pendingIntent.equals(r.pendingIntent) && TextUtils.equals(message, r.message); - } - } - - @Override - public int hashCode() { - return Arrays.hashCode(new Object[]{statusCode, pendingIntent, message}); - } - - /** - * Returns {@code true} if calling {@link #startResolutionForResult(Activity, int)} will start - * any intents requiring user interaction. - * - * @return {@code true} if there is a resolution that can be started. - */ - public boolean hasResolution() { - return statusCode != 0 && pendingIntent != null; - } - - /** - * Resolves an error by starting any intents requiring user interaction. See - * {@link #SIGN_IN_REQUIRED}, and {@link #RESOLUTION_REQUIRED}. - * - * @param activity An Activity context to use to resolve the issue. The activity's - * {@link Activity#onActivityResult} method will be invoked after the user - * is done. If the resultCode is {@link Activity#RESULT_OK}, the application - * should try to connect again. - * @param requestCode The request code to pass to {@link Activity#onActivityResult}. - * @throws IntentSender.SendIntentException If the resolution intent has been canceled or is no - * longer able to execute the request. - */ - public void startResolutionForResult(Activity activity, int requestCode) throws - IntentSender.SendIntentException { - if (hasResolution()) { - activity.startIntentSenderForResult(pendingIntent.getIntentSender(), requestCode, null, 0, 0, 0); - } - } -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/Feature.java b/play-services-basement/src/main/java/com/google/android/gms/common/Feature.java deleted file mode 100644 index 0a5b0813..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/Feature.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class Feature extends AutoSafeParcelable { - @Field(1) - private String name; - @Field(2) - private int oldVersion; - @Field(3) - private long version = -1; - - private Feature() { - } - - public Feature(String name, long version) { - this.name = name; - this.version = version; - } - - public String getName() { - return name; - } - - public long getVersion() { - if (version == -1) return oldVersion; - return version; - } - - public static final Creator CREATOR = new AutoSafeParcelable.AutoCreator<>(Feature.class); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/Scopes.java b/play-services-basement/src/main/java/com/google/android/gms/common/Scopes.java deleted file mode 100644 index a359d6b7..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/Scopes.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2015 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - * Notice: Portions of this file are reproduced from work created and shared by Google and used - * according to terms described in the Creative Commons 4.0 Attribution License. - * See https://developers.google.com/readme/policies for details. - */ - -package com.google.android.gms.common; - -import org.microg.gms.common.Hide; - -/** - * OAuth 2.0 scopes for use with Google Play services. See the specific client methods for details on which scopes are required. - */ -public class Scopes { - /** - * OAuth 2.0 scope for viewing a user's basic profile information. - */ - public static final String PROFILE = "profile"; - @Hide - public static final String OPENID = "openid"; - /** - * OAuth 2.0 scope for accessing user's Google account email address. - */ - public static final String EMAIL = "email"; - /** - * OAuth 2.0 scope for accessing the user's name, basic profile info and Google+ profile info. - *

- * When using this scope, your app will have access to: - *

    - *
  • the user's full name, profile picture, Google+ profile ID, age range, and language
  • - *
  • any other publicly available information on the user's Google+ profile
  • - *
- * - * @deprecated We recommend switching to {@link #PROFILE} scope to get the one-tap sign-in experience. Your app will get much higher sign-in completion - * rate by switching to profile scopes because of the streamlined user experience. And your existing users with PLUS_LOGIN grant will not be asked to - * sign-in again. - * If you really need user's age range and locale information (which is the only additional information you can get from PLUS_LOGIN as of - * September 2016), use below scopes in addition to PROFILE:
    - *
  • www.googleapis.com/auth/profile.agerange.read
  • - *
  • www.googleapis.com/auth/profile.language.read
  • - *
- */ - @Deprecated - public static final String PLUS_LOGIN = "https://www.googleapis.com/auth/plus.login"; - /** - * This scope was previously named PLUS_PROFILE. - *

- * When using this scope, it does the following: - *

    - *
  • It lets you know who the currently authenticated user is by letting you replace a Google+ user ID with "me", which represents the authenticated - * user, in any call to the Google+ API.
  • - *
- */ - public static final String PLUS_ME = "https://www.googleapis.com/auth/plus.me"; - /** - * Scope for accessing data from Google Play Games. - */ - public static final String GAMES = "https://www.googleapis.com/auth/games"; - @Hide - public static final String GAMES_LITE = "https://www.googleapis.com/auth/games_lite"; - @Hide - public static final String GAMES_FIRSTPARTY = "https://www.googleapis.com/auth/games.firstparty"; - /** - * Scope for using the CloudSave service. - */ - public static final String CLOUD_SAVE = "https://www.googleapis.com/auth/datastoremobile"; - /** - * Scope for using the App State service. - */ - public static final String APP_STATE = "https://www.googleapis.com/auth/appstate"; - /** - * Scope for access user-authorized files from Google Drive. - */ - public static final String DRIVE_FILE = "https://www.googleapis.com/auth/drive.file"; - /** - * Scope for accessing appfolder files from Google Drive. - */ - public static final String DRIVE_APPFOLDER = "https://www.googleapis.com/auth/drive.appdata"; - @Hide - public static final String FITNESS_ACTIVITY_READ = "https://www.googleapis.com/auth/fitness.activity.read"; - @Hide - public static final String FITNESS_ACTIVITY_READ_WRITE = "https://www.googleapis.com/auth/fitness.activity.write"; - @Hide - public static final String FITNESS_LOCATION_READ = "https://www.googleapis.com/auth/fitness.location.read"; - @Hide - public static final String FITNESS_LOCATION_READ_WRITE = "https://www.googleapis.com/auth/fitness.location.write"; - @Hide - public static final String FITNESS_BODY_READ = "https://www.googleapis.com/auth/fitness.body.read"; - @Hide - public static final String FITNESS_BODY_READ_WRITE = "https://www.googleapis.com/auth/fitness.body.write"; - @Hide - public static final String USERINFO_EMAIL = "https://www.googleapis.com/auth/userinfo.email"; - @Hide - public static final String USERINFO_PROFILE = "https://www.googleapis.com/auth/userinfo.profile"; - @Hide - public static final String USER_BIRTHDAY_READ = "https://www.googleapis.com/auth/user.birthday.read"; - @Hide - public static final String GMAIL_READONLY = "https://www.googleapis.com/auth/gmail.readonly"; -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java deleted file mode 100644 index 984c6fce..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/CommonStatusCodes.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import org.microg.gms.common.PublicApi; - -@PublicApi -public class CommonStatusCodes { - public static final int SUCCESS = 0; - @Deprecated - public static final int SERVICE_MISSING = 1; - @Deprecated - public static final int SERVICE_VERSION_UPDATE_REQUIRED = 2; - @Deprecated - public static final int SERVICE_DISABLED = 3; - public static final int SIGN_IN_REQUIRED = 4; - public static final int RESOLUTION_REQUIRED = 6; - public static final int INTERNAL_ERROR = 8; - public static final int ERROR = 13; - public static final int INTERRUPTED = 14; - public static final int CANCELED = 16; - -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/Releasable.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/Releasable.java deleted file mode 100644 index cbbbd4c7..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/Releasable.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -/** - * Represents a resource, or a holder of resources, which may be released once they are no longer needed. - */ -public interface Releasable { - void release(); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/Result.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/Result.java deleted file mode 100644 index 6c4f6921..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/Result.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import org.microg.gms.common.PublicApi; - -/** - * Represents the final result of invoking an API method in Google Play Services. - */ -@PublicApi -public interface Result { - Status getStatus(); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/ResultCallback.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/ResultCallback.java deleted file mode 100644 index f6c46b06..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/ResultCallback.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -/** - * An interface for receiving a {@link Result} from a {@link PendingResult} as an asynchronous - * callback. - */ -public interface ResultCallback { - /** - * Called when the {@link Result} is ready. It is the responsibility of each callback to - * release any resources associated with the result. Some result types may implement - * {@link Releasable}, in which case {@link Releasable#release()} should be used to free the - * associated resources. - * - * @param result The result from the API call. May not be null. - */ - void onResult(R result); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/Scope.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/Scope.java deleted file mode 100644 index a90803e7..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/Scope.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import androidx.annotation.NonNull; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -/** - * Describes an OAuth 2.0 scope to request. This has security implications for the user, and - * requesting additional scopes will result in authorization dialogs. - */ -@PublicApi -public class Scope extends AutoSafeParcelable { - @SafeParceled(1) - private final int versionCode = 1; - @SafeParceled(2) - private final String scopeUri; - - private Scope() { - scopeUri = null; - } - - /** - * Creates a new scope with the given URI. - */ - public Scope(String scopeUri) { - this.scopeUri = scopeUri; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Scope)) return false; - assert scopeUri != null; - return scopeUri.equals(((Scope) o).scopeUri); - } - - @Override - public int hashCode() { - assert scopeUri != null; - return scopeUri.hashCode(); - } - - @NonNull - @Override - public String toString() { - assert scopeUri != null; - return scopeUri; - } - - public static final Creator CREATOR = new AutoCreator<>(Scope.class); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/api/Status.java b/play-services-basement/src/main/java/com/google/android/gms/common/api/Status.java deleted file mode 100644 index 433ef043..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/api/Status.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.api; - -import android.app.PendingIntent; - -import org.microg.gms.common.PublicApi; -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -/** - * Represents the results of work. - */ -@PublicApi -public final class Status extends AutoSafeParcelable implements Result { - @PublicApi(exclude = true) - public static final Status INTERNAL_ERROR = new Status(CommonStatusCodes.INTERNAL_ERROR, "Internal error"); - @PublicApi(exclude = true) - public static final Status CANCELED = new Status(CommonStatusCodes.CANCELED, "Cancelled"); - @PublicApi(exclude = true) - public static final Status SUCCESS = new Status(CommonStatusCodes.SUCCESS, "Success"); - - @SafeParceled(1000) - private final int versionCode = 1; - - @SafeParceled(1) - private final int statusCode; - - private Status() { - statusCode = 0; - } - - /** - * Creates a representation of the status resulting from a GoogleApiClient operation. - * - * @param statusCode The status code. - */ - public Status(int statusCode) { - this(statusCode, null); - } - - /** - * Creates a representation of the status resulting from a GoogleApiClient operation. - * - * @param statusCode The status code. - * @param statusMessage The message associated with this status, or null. - */ - public Status(int statusCode, String statusMessage) { - this(statusCode, statusMessage, null); - } - - /** - * Creates a representation of the status resulting from a GoogleApiClient operation. - * - * @param statusCode The status code. - * @param statusMessage The message associated with this status, or null. - * @param resolution A pending intent that will resolve the issue when started, or null. - */ - public Status(int statusCode, String statusMessage, PendingIntent resolution) { - this.statusCode = statusCode; - } - - /** - * Returns the status of this result. Use {@link #isSuccess()} to determine whether the call - * was successful, and {@link #getStatusCode()} to determine what the error cause was. - *

- * Certain errors are due to failures that can be resolved by launching a particular intent. - * The resolution intent is available via {@link #getResolution()}. - */ - @Override - public Status getStatus() { - return this; - } - - /** - * Returns true if the operation was canceled. - */ - public boolean isCanceled() { - return statusCode == CommonStatusCodes.CANCELED; - } - - public static final Creator CREATOR = new AutoCreator<>(Status.class); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/internal/BinderWrapper.java b/play-services-basement/src/main/java/com/google/android/gms/common/internal/BinderWrapper.java deleted file mode 100644 index 47ec3949..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/internal/BinderWrapper.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.internal; - -import android.os.IBinder; -import android.os.Parcel; -import android.os.Parcelable; - -public class BinderWrapper implements Parcelable { - public IBinder binder; - - public BinderWrapper(IBinder binder) { - this.binder = binder; - } - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(Parcel dest, int flags) { - dest.writeStrongBinder(binder); - } - - public static final Creator CREATOR = new Creator() { - @Override - public BinderWrapper createFromParcel(Parcel source) { - return new BinderWrapper(source.readStrongBinder()); - } - - @Override - public BinderWrapper[] newArray(int size) { - return new BinderWrapper[size]; - } - }; -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java b/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java deleted file mode 100644 index a203a99f..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.internal; - -import android.accounts.Account; -import android.os.Bundle; -import android.os.IBinder; - -import com.google.android.gms.common.Feature; -import com.google.android.gms.common.api.Scope; - -import org.microg.gms.common.Constants; -import org.microg.gms.common.GmsService; -import org.microg.safeparcel.AutoSafeParcelable; - -import java.util.Arrays; - -public class GetServiceRequest extends AutoSafeParcelable { - @Field(1) - private final int versionCode = 4; - @Field(2) - public final int serviceId; - @Field(3) - public int gmsVersion; - @Field(4) - public String packageName; - @Field(5) - public IBinder accountAccessor; - @Field(6) - public Scope[] scopes; - @Field(7) - public Bundle extras; - @Field(8) - public Account account; - @Field(9) - private long field9; - @Field(10) - public Feature[] defaultFeatures; - @Field(11) - public Feature[] apiFeatures; - @Field(12) - private boolean field12; - @Field(13) - private int field13; - @Field(14) - private boolean field14; - @Field(15) - private String field15; - - private GetServiceRequest() { - serviceId = -1; - gmsVersion = Constants.GMS_VERSION_CODE; - } - - public GetServiceRequest(int serviceId) { - this.serviceId = serviceId; - this.gmsVersion = Constants.GMS_VERSION_CODE; - this.field12 = true; - } - - @Override - public String toString() { - return "GetServiceRequest{" + - "serviceId=" + GmsService.nameFromServiceId(serviceId) + - ", gmsVersion=" + gmsVersion + - ", packageName='" + packageName + '\'' + - (scopes == null || scopes.length == 0 ? "" : (", scopes=" + Arrays.toString(scopes))) + - (extras == null ? "" : (", extras=" + extras)) + - (account == null ? "" : (", account=" + account)) + - '}'; - } - - public static Creator CREATOR = new AutoCreator(GetServiceRequest.class); -} \ No newline at end of file diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/internal/ValidateAccountRequest.java b/play-services-basement/src/main/java/com/google/android/gms/common/internal/ValidateAccountRequest.java deleted file mode 100644 index 75e59d95..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/internal/ValidateAccountRequest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.common.internal; - -import org.microg.safeparcel.AutoSafeParcelable; - -public class ValidateAccountRequest extends AutoSafeParcelable { - public static Creator CREATOR = new AutoCreator<>(ValidateAccountRequest.class); -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/internal/safeparcel/AbstractSafeParcelable.java b/play-services-basement/src/main/java/com/google/android/gms/common/internal/safeparcel/AbstractSafeParcelable.java deleted file mode 100644 index 671c3c4a..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/common/internal/safeparcel/AbstractSafeParcelable.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.common.internal.safeparcel; - -public abstract class AbstractSafeParcelable implements SafeParcelable { - - @SuppressWarnings("unchecked") - public static SafeParcelableCreatorAndWriter findCreator(java.lang.Class tClass) { - java.lang.Class upmostClass = tClass; - while (upmostClass.getEnclosingClass() != null) upmostClass = upmostClass.getEnclosingClass(); - String upmostClassName = upmostClass.getName(); - int idx = upmostClassName.lastIndexOf('.'); - String packagePrefix = idx > 0 ? upmostClassName.substring(0, idx + 1) : ""; - String creatorClassName = packagePrefix + tClass.getSimpleName() + "$000Creator"; - try { - return (SafeParcelableCreatorAndWriter) java.lang.Class.forName(creatorClassName).newInstance(); - } catch (Exception e) { - throw new RuntimeException("No Creator found for " + tClass.getName(), e); - } - } - - @Override - public int describeContents() { - return 0; - } - -} diff --git a/play-services-basement/src/main/java/com/google/android/gms/dynamic/ObjectWrapper.java b/play-services-basement/src/main/java/com/google/android/gms/dynamic/ObjectWrapper.java deleted file mode 100644 index 9158c941..00000000 --- a/play-services-basement/src/main/java/com/google/android/gms/dynamic/ObjectWrapper.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.dynamic; - -import android.os.IBinder; - -import androidx.annotation.Nullable; - -import java.lang.reflect.Field; - -public class ObjectWrapper extends IObjectWrapper.Stub { - private final T t; - - public ObjectWrapper(T t) { - this.t = t; - } - - @Nullable - public static Object unwrap(IObjectWrapper obj) { - if (obj == null) { - return null; - } - if (obj instanceof ObjectWrapper) { - return ((ObjectWrapper) obj).t; - } - IBinder binder = obj.asBinder(); - Field[] fields = binder.getClass().getDeclaredFields(); - - if (fields.length < 1) { - throw new IllegalArgumentException("No fields were found"); - } - - // Ignore synthetic field(s) from JaCoCo or elsewhere - // https://www.jacoco.org/jacoco/trunk/doc/faq.html - - @Nullable - Field field = null; - - for (Field currentField : fields) { - if (currentField.isSynthetic()) { - continue; - } - - if (field == null) { - field = currentField; - } else { - throw new IllegalArgumentException("Too many non-synthetic fields were found"); - } - } - - if (field == null) { - throw new IllegalArgumentException("No non-synthetic fields were found"); - } - - if (!field.isAccessible()) { - field.setAccessible(true); - try { - return field.get(binder); - } catch (NullPointerException localNullPointerException) { - throw new IllegalArgumentException("Binder object is null.", - localNullPointerException); - } catch (IllegalArgumentException localIllegalArgumentException) { - throw new IllegalArgumentException("remoteBinder is the wrong class.", - localIllegalArgumentException); - } catch (IllegalAccessException localIllegalAccessException) { - throw new IllegalArgumentException("Could not access the field in remoteBinder.", - localIllegalAccessException); - } - } else { - throw new IllegalArgumentException(); - } - } - - @Nullable - public static T unwrapTyped(IObjectWrapper obj, Class clazz) { - try { - return clazz.cast(unwrap(obj)); - } catch (ClassCastException e) { - return null; - } - } - - public static ObjectWrapper wrap(T t) { - return new ObjectWrapper<>(t); - } -} \ No newline at end of file diff --git a/play-services-basement/src/main/java/org/microg/gms/auth/AuthConstants.java b/play-services-basement/src/main/java/org/microg/gms/auth/AuthConstants.java deleted file mode 100644 index 7de65daf..00000000 --- a/play-services-basement/src/main/java/org/microg/gms/auth/AuthConstants.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.auth; - -public class AuthConstants { - public static final String DEFAULT_ACCOUNT = "<>"; - public static final String SCOPE_GET_ACCOUNT_ID = "^^_account_id_^^"; - public static final String PROVIDER_METHOD_GET_ACCOUNTS = "get_accounts"; - public static final String PROVIDER_METHOD_CLEAR_PASSWORD = "clear_password"; - public static final String PROVIDER_EXTRA_CLEAR_PASSWORD = "clear_password"; - public static final String PROVIDER_EXTRA_ACCOUNTS = "accounts"; - public static final String DEFAULT_ACCOUNT_TYPE = "com.google"; - public static final String GOOGLE_USER_ID = "GoogleUserId"; - public static final String GOOGLE_SIGN_IN_STATUS = "googleSignInStatus"; - public static final String GOOGLE_SIGN_IN_ACCOUNT = "googleSignInAccount"; - public static final String SIGN_IN_ACCOUNT = "signInAccount"; - public static final String ERROR_CODE = "errorCode"; - public static final String SIGN_IN_CREDENTIAL = "sign_in_credential"; - public static final String STATUS = "status"; - public static final String SCOPE_OAUTH2 = "oauth2:"; - public static final String SCOPE_EM_OP_PRO = "oauth2:email openid profile"; - -} diff --git a/play-services-basement/src/main/java/org/microg/gms/common/Constants.java b/play-services-basement/src/main/java/org/microg/gms/common/Constants.java deleted file mode 100644 index 077bdbde..00000000 --- a/play-services-basement/src/main/java/org/microg/gms/common/Constants.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2013-2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import org.microg.gms.basement.BuildConfig; - -public class Constants { - public static final int GMS_VERSION_CODE = (BuildConfig.VERSION_CODE / 1000) * 1000; - public static final String GMS_PACKAGE_NAME = "com.google.android.gms"; - public static final String GMS_PACKAGE_SIGNATURE_SHA1 = "38918a453d07199354f8b19af05ec6562ced5788"; - public static final String GMS_SECONDARY_PACKAGE_SIGNATURE_SHA1 = "bd32424203e0fb25f36b57e5aa356f9bdd1da998"; - - @Deprecated - public static final int MAX_REFERENCE_VERSION = GMS_VERSION_CODE; -} diff --git a/play-services-basement/src/main/java/org/microg/gms/common/GmsService.java b/play-services-basement/src/main/java/org/microg/gms/common/GmsService.java deleted file mode 100644 index 5fb9f315..00000000 --- a/play-services-basement/src/main/java/org/microg/gms/common/GmsService.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -public enum GmsService { - UNKNOWN(-2), - ANY(-1), - PEOPLE(5, "com.google.android.gms.people.service.START"), - ACCOUNT(9, "com.google.android.gms.accounts.ACCOUNT_SERVICE"), - ADDRESS(12, "com.google.android.gms.identity.service.BIND"), - AUTH_PROXY(16, "com.google.android.gms.auth.service.START"), - INDEX(21, "com.google.android.gms.icing.INDEX_SERVICE"), - COMMON(39, "com.google.android.gms.common.service.START"), - SIGN_IN(44, "com.google.android.gms.signin.service.START"), - CREDENTIALS(68, "com.google.android.gms.auth.api.credentials.service.START"), -<<<<<<< HEAD -======= - NEARBY_BOOTSTRAP(69, "com.google.android.gms.nearby.bootstrap.service.NearbyBootstrapService.START"), - PLUS_INTERNAL(70), - SOURCE_DEVICE(75, "com.google.android.gms.smartdevice.d2d.SourceDeviceService.START"), - TARGET_DEVICE(76, "com.google.android.gms.smartdevice.d2d.TargetDeviceService.START"), - APP_INVITE(77, "com.google.android.gms.appinvite.service.START"), - TAP_AND_PAY(79, "com.google.android.gms.tapandpay.service.BIND"), - CHROME_SYNC(80, "com.google.android.gms.chromesync.service.START"), - ACCOUNTS(81, "com.google.android.gms.smartdevice.setup.accounts.AccountsService.START"), - CAST_REMOTE_DISPLAY(83, "com.google.android.gms.cast.remote_display.service.START"), - TRUST_AGENT(85, "com.google.android.gms.trustagent.StateApi.START"), - AUTH_SIGN_IN(91, "com.google.android.gms.auth.api.signin.service.START"), - MEASUREMENT(93, "com.google.android.gms.measurement.START"), - FREIGHTER(98, "com.google.android.gms.freighter.service.START"), - GUNS(110, "com.google.android.gms.notifications.service.START"), - BLE(111, "com.google.android.gms.beacon.internal.IBleService.START"), - FIREBASE_AUTH(112, "com.google.firebase.auth.api.gms.service.START"), - APP_INDEXING(113), - GASS(116, "com.google.android.gms.gass.START"), - WORK_ACCOUNT(120), - INSTANT_APPS(121, "com.google.android.gms.instantapps.START"), - CAST_FIRSTPATY(122, "com.google.android.gms.cast.firstparty.START"), - AD_CACHE(123, "com.google.android.gms.ads.service.CACHE"), - SMS_RETRIEVER(126, "com.google.android.gms.auth.api.phone.service.SmsRetrieverApiService.START"), - CRYPT_AUTH(129, "com.google.android.gms.auth.cryptauth.cryptauthservice.START"), - DYNAMIC_LINKS(131, "com.google.firebase.dynamiclinks.service.START"), - FONTS(132, "com.google.android.gms.fonts.service.START"), - ROMANESCO(135, "com.google.android.gms.romanesco.service.START"), - TRAINER(139, "com.google.android.gms.learning.trainer.START"), - FIDO2_REGULAR(148, "com.google.android.gms.fido.fido2.regular.START"), - FIDO2_PRIVILEGED(149, "com.google.android.gms.fido.fido2.privileged.START"), - DATA_DOWNLOAD(152, "com.google.android.mdd.service.START"), - ACCOUNT_DATA(153, "com.google.android.gms.auth.account.data.service.START"), - CONSTELLATION(155, "com.google.android.gms.constellation.service.START"), - AUDIT(154, "com.google.android.gms.audit.service.START"), - SYSTEM_UPDATE(157, "com.google.android.gms.update.START_API_SERVICE"), - MOBSTORE(160, "com.google.android.mobstore.service.START"), - USER_LOCATION(163, "com.google.android.gms.userlocation.service.START"), - AD_HTTP(166, "com.google.android.gms.ads.service.HTTP"), - LANGUAGE_PROFILE(167, "com.google.android.gms.languageprofile.service.START"), - MDNS(168, "com.google.android.gms.mdns.service.START"), - SEMANTIC_LOCATION(173, "com.google.android.gms.semanticlocation.service.START_ODLH"), - FIDO2_ZEROPARTY(180, "com.google.android.gms.fido.fido2.zeroparty.START"), - G1_RESTORE(181, "com.google.android.gms.backup.G1_RESTORE"), - G1_BACKUP(182, "com.google.android.gms.backup.G1_BACKUP"), - OSS_LICENSES(185, "com.google.android.gms.oss.licenses.service.START"), - PAYSE(188, "com.google.android.gms.payse.service.BIND"), - RCS(189, "com.google.android.gms.rcs.START"), - CARRIER_AUTH(191, "com.google.android.gms.carrierauth.service.START"), - SYSTEM_UPDATE_SINGLE_UESR(192, "com.google.android.gms.update.START_SINGLE_USER_API_SERVICE"), - APP_USAGE(193, "com.google.android.gms.appusage.service.START"), - NEARBY_SHARING_2(194, "com.google.android.gms.nearby.sharing.START_SERVICE"), - AD_CONSENT_LOOKUP(195, "com.google.android.gms.ads.service.CONSENT_LOOKUP"), - CREDENTIAL_MANAGER(196, "com.google.android.gms.credential.manager.service.firstparty.START"), - PHONE_INTERNAL(197, "com.google.android.gms.auth.api.phone.service.InternalService.START"), - PAY(198, "com.google.android.gms.pay.service.BIND"), - ASTERISM(199, "com.google.android.gms.asterism.service.START"), - MODULE_RESTORE(201, "com.google.android.gms.backup.GMS_MODULE_RESTORE"), - FACS_CACHE(202, "com.google.android.gms.facs.cache.service.START"), - RECAPTCHA(205, "com.google.android.gms.recaptcha.service.START"), - CONTACT_SYNC(208, "com.google.android.gms.people.contactssync.service.START"), ->>>>>>> 37dd2b59 (Add dummy service for SEMANTIC_LOCATION(173) (#2174)) - IDENTITY_SIGN_IN(212, "com.google.android.gms.auth.api.identity.service.signin.START"), -<<<<<<< HEAD -======= - CREDENTIAL_STORE(214, "com.google.android.gms.fido.credentialstore.internal_service.START"), - MDI_SYNC(215, "com.google.android.gms.mdisync.service.START"), - EVENT_ATTESTATION(216, "com.google.android.gms.ads.identifier.service.EVENT_ATTESTATION"), - SCHEDULER(218, "com.google.android.gms.scheduler.ACTION_PROXY_SCHEDULE"), - AUTHORIZATION(219, "com.google.android.gms.auth.api.identity.service.authorization.START"), - FACS_SYNC(220, "com.google.android.gms.facs.internal.service.START"), - AUTH_CONFIG_SYNC(221, "com.google.android.gms.auth.config.service.START"), - CREDENTIAL_SAVING(223, "com.google.android.gms.auth.api.identity.service.credentialsaving.START"), - GOOGLE_AUTH(224, "com.google.android.gms.auth.account.authapi.START"), - ENTERPRISE_LOADER(225, "com.google.android.gms.enterprise.loader.service.START"), - THUNDERBIRD(226, "com.google.android.gms.thunderbird.service.START"), - NEARBY_EXPOSURE(236, "com.google.android.gms.nearby.exposurenotification.START"), - GMS_COMPLIANCE(257, "com.google.android.gms.gmscompliance.service.START"), - BLOCK_STORE(258, "com.google.android.gms.auth.blockstore.service.START"), - FIDO_SOURCE_DEVICE(262, "com.google.android.gms.fido.sourcedevice.service.START"), - FAST_PAIR(265, "com.google.android.gms.nearby.fastpair.START"), - MATCHSTICK_LIGHTER(268, "com.google.android.gms.matchstick.lighter.service.START"), - FIDO_TARGET_DEVICE_INTERNAL(269, "com.google.android.gms.fido.targetdevice.internal_service.START"), - TELEMETRY(270, "com.google.android.gms.common.telemetry.service.START"), - SECOND_DEVICE_AUTH(275, "com.google.android.gms.setup.auth.SecondDeviceAuth.START"), - LOCATION_SHARING_REPORTER(277, "com.google.android.gms.locationsharingreporter.service.START"), - OCR(279, "com.google.android.gms.ocr.service.START"), - POTOKENS(285, "com.google.android.gms.potokens.service.START"), - OCR_INTERNAL(281, "com.google.android.gms.ocr.service.internal.START"), - APP_SET(300, "com.google.android.gms.appset.service.START"), - MODULE_INSTALL(308, "com.google.android.gms.chimera.container.moduleinstall.ModuleInstallService.START"), - IN_APP_REACH(315, "com.google.android.gms.inappreach.service.START"), - APP_ERRORS(334, "com.google.android.gms.apperrors.service.START_APP_ERROR"), ->>>>>>> 9ee35e3c (Add dummy services for PSEUDONYMOUS_ID(52), GASS(116), ACCOUNT_DATA(153) and APP_SET(300) (#2175)) - ; - - public final int SERVICE_ID; - public final String ACTION; - public final String[] SECONDARY_ACTIONS; - - GmsService(int serviceId, String... actions) { - this.SERVICE_ID = serviceId; - this.ACTION = actions.length > 0 ? actions[0] : null; - this.SECONDARY_ACTIONS = actions; - } - - public static GmsService byServiceId(int serviceId) { - for (GmsService service : values()) { - if (service.SERVICE_ID == serviceId) return service; - } - return UNKNOWN; - } - - public static String nameFromServiceId(int serviceId) { - return byServiceId(serviceId).toString(serviceId); - } - - public String toString(int serviceId) { - if (this != UNKNOWN) return toString(); - return "UNKNOWN(" + serviceId + ")"; - } -} \ No newline at end of file diff --git a/play-services-basement/src/main/java/org/microg/gms/common/PublicApi.java b/play-services-basement/src/main/java/org/microg/gms/common/PublicApi.java deleted file mode 100644 index 92663979..00000000 --- a/play-services-basement/src/main/java/org/microg/gms/common/PublicApi.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.common; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * An class, method or field is named public, if it can be used with the original play services - * client library. - */ -@Retention(RetentionPolicy.SOURCE) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR}) -public @interface PublicApi { - /** - * @return the first version that contains the given class, method or field - */ - String since() default "0"; - - /** - * @return the last version that contains the given class, method or field - */ - String until() default "latest"; - - /** - * Used on a method or field to exclude it from the public api if the corresponding class was - * marked as public api. - * - * @return true if the method or field is not part of the public api - */ - boolean exclude() default false; -} diff --git a/play-services-basement/src/main/java/org/microg/gms/gcm/GcmConstants.java b/play-services-basement/src/main/java/org/microg/gms/gcm/GcmConstants.java deleted file mode 100644 index d96fe90a..00000000 --- a/play-services-basement/src/main/java/org/microg/gms/gcm/GcmConstants.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.gms.gcm; - -public final class GcmConstants { - public static final String ACTION_C2DM_RECEIVE = "com.mgoogle.android.c2dm.intent.RECEIVE"; - public static final String ACTION_C2DM_REGISTER = "com.mgoogle.android.c2dm.intent.REGISTER"; - public static final String ACTION_C2DM_REGISTRATION = "com.mgoogle.android.c2dm.intent.REGISTRATION"; - public static final String ACTION_C2DM_UNREGISTER = "com.mgoogle.android.c2dm.intent.UNREGISTER"; - - public static final String EXTRA_APP = "app"; - public static final String EXTRA_APP_OVERRIDE = "org.microg.gms.gcm.APP_OVERRIDE"; - public static final String EXTRA_APP_VERSION_NAME = "app_ver_name"; - public static final String EXTRA_COLLAPSE_KEY = "collapse_key"; - public static final String EXTRA_DELETE = "delete"; - public static final String EXTRA_ERROR = "error"; - public static final String EXTRA_FROM = "from"; - public static final String EXTRA_KID = "kid"; - public static final String EXTRA_MESSENGER = "google.messenger"; - public static final String EXTRA_MESSAGE_ID = "google.message_id"; - public static final String EXTRA_REGISTRATION_ID = "registration_id"; - public static final String EXTRA_RETRY_AFTER = "Retry-After"; - public static final String EXTRA_SENDER = "sender"; - public static final String EXTRA_SEND_TO = "google.to"; - public static final String EXTRA_SEND_FROM = "google.from"; - public static final String EXTRA_TTL = "google.ttl"; - public static final String EXTRA_UNREGISTERED = "unregistered"; - - public static final String ERROR_SERVICE_NOT_AVAILABLE = "SERVICE_NOT_AVAILABLE"; -} diff --git a/play-services-basement/src/main/kotlin/com/google/android/gms/dynamic/ObjectWrapper.kt b/play-services-basement/src/main/kotlin/com/google/android/gms/dynamic/ObjectWrapper.kt deleted file mode 100644 index 27996b8f..00000000 --- a/play-services-basement/src/main/kotlin/com/google/android/gms/dynamic/ObjectWrapper.kt +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) 2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.android.gms.dynamic - diff --git a/play-services-core-proto/build.gradle b/play-services-core-proto/build.gradle deleted file mode 100644 index 6edfcb4b..00000000 --- a/play-services-core-proto/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -apply plugin: 'com.squareup.wire' -apply plugin: 'kotlin' - -dependencies { - implementation "com.squareup.wire:wire-runtime:$wireVersion" -} - -wire { - kotlin { - javaInterop = true - } -} - -sourceSets { - main.java.srcDirs += "$buildDir/generated/source/wire" -} - -compileKotlin { - kotlinOptions.jvmTarget = 17 -} - -compileTestKotlin { - kotlinOptions.jvmTarget = 17 -} \ No newline at end of file diff --git a/play-services-core-proto/src/main/proto/appcert.proto b/play-services-core-proto/src/main/proto/appcert.proto deleted file mode 100644 index ee02bf55..00000000 --- a/play-services-core-proto/src/main/proto/appcert.proto +++ /dev/null @@ -1,32 +0,0 @@ -option java_package = "org.microg.gms.auth.appcert"; -option java_outer_classname = "AppCertProto"; - -message DeviceKeyRequest { - optional uint64 androidId = 2; - optional uint64 sessionId = 3; - message VersionInfo { - optional fixed32 sdkVersion = 1; - optional fixed32 gmsVersion = 2; - } - optional VersionInfo versionInfo = 4; - optional string token = 6; -} - -message DeviceKey { - optional uint64 keyId = 1; - optional uint64 deviceId = 3; - optional bytes macSecret = 4; - optional bytes keyCert = 5; -} - -message SpatulaHeaderProto { - message PackageInfo { - optional string packageName = 1; - optional string packageCertificateHash = 3; - } - optional PackageInfo packageInfo = 1; - optional bytes hmac = 2; - optional uint64 deviceId = 3; - optional uint64 keyId = 4; - optional bytes keyCert = 5; -} diff --git a/play-services-core-proto/src/main/proto/auth.proto b/play-services-core-proto/src/main/proto/auth.proto deleted file mode 100644 index d6c759f0..00000000 --- a/play-services-core-proto/src/main/proto/auth.proto +++ /dev/null @@ -1,58 +0,0 @@ -option java_package = "org.microg.gms.auth"; - -option java_outer_classname = "AuthProto"; - -message ConsentData { - message AppDetails { - optional string title = 1; - optional string email = 3; - } - optional AppDetails app = 1; - message ScopeDetails { - optional string title = 1; - optional string description = 2; - optional string id = 6; - } - repeated ScopeDetails scopes = 2; -} - -message RequestOptions { -// optional bool field_1 = 1; -// optional string field_2 = 2; -// optional string field_3 = 3; -// optional int32 field_4 = 4; -// optional int32 field_5 = 5; - optional int32 remote = 7; - optional int32 version = 10; - optional string sessionId = 11; -// optional bool field_12 = 12; -} - -message ConsentUrlResponse { - optional int32 resultCode = 2; - optional string consentUrl = 3; - optional Cookie cookie = 4; -} - -message ConsentCookiesResponse { - optional ConsentCookies consentCookies = 1; -} - -message ConsentCookies { - optional int32 resultCode = 1; - repeated Cookie cookies = 2; -} - -message Cookie { - optional string cookieName = 1; - optional string cookieValue = 2; - optional string domain = 3; - optional string path = 4; - optional int64 sameSite = 5; - optional int64 secure = 6; - optional int64 httpOnly = 7; - optional int64 maxAge = 8; - optional int64 version = 9; - optional string discard = 10; - optional string comment = 12; -} diff --git a/play-services-core-proto/src/main/proto/checkin.proto b/play-services-core-proto/src/main/proto/checkin.proto deleted file mode 100644 index 5b1e8141..00000000 --- a/play-services-core-proto/src/main/proto/checkin.proto +++ /dev/null @@ -1,270 +0,0 @@ -option java_package = "org.microg.gms.checkin"; - -option java_outer_classname = "CheckinProto"; - -// Sample data, if provided, is fished from a Nexus 7 (2013) / flo running Android 5.0 -message CheckinRequest { - // unused - optional string imei = 1; - - // Gservices["android_id"] or 0 on first-checkin - optional int64 androidId = 2; - - // Gservices["digest"] or "" - optional string digest = 3; - - required Checkin checkin = 4; - message Checkin { - // empty Build on pre-checkin - required Build build = 1; - message Build { - // Build.FINGERPRINT - // eg. google/razor/flo:5.0.1/LRX22C/1602158:user/release-keys - optional string fingerprint = 1; - - // Build.HARDWARE - // eg. flo - optional string hardware = 2; - - // Build.BRAND - // eg. google - optional string brand = 3; - - // Build.getRadioVersion() - optional string radio = 4; - - // Build.BOOTLOADER - // eg. FLO-04.04 - optional string bootloader = 5; - - // GoogleSettingsContract.Partner["client_id"] - // eg. android-google - optional string clientId = 6; - - // Build.TIME / 1000L - // eg. 1416533192 - optional int64 time = 7; - - // PackageInfo.versionCode - // eg. 6188736 - optional int32 packageVersionCode = 8; - - // Build.DEVICE - // eg. flo - optional string device = 9; - - // Build.VERSION.SDK_INT - // eg. 21 - optional int32 sdkVersion = 10; - - // Build.MODEL - // eg. Nexus 7 - optional string model = 11; - - // Build.MANUFACTURER - // eg. asus - optional string manufacturer = 12; - - // Build.PRODUCT - // eg. razor - optional string product = 13; - - // fileExists("/system/recovery-from-boot.p") - // eg. false - optional bool otaInstalled = 14; - } - - // last checkin ms or 0 if first checkin - // eg. 0 - optional int64 lastCheckinMs = 2; - - // eg. ("event_log_start",~,1424612602652) on first checkin - repeated Event event = 3; - message Event { - optional string tag = 1; - optional string value = 2; - optional int64 timeMs = 3; - } - - // unknown, n/a on first checkin - repeated Statistic stat = 4; - message Statistic { - required string tag = 1; - optional int32 count = 2; - optional float sum = 3; - } - - // unused - repeated string requestedGroup = 5; - - // TelephonyManager.getNetworkOperator != null|empty - optional string cellOperator = 6; - - // TelephonyManager.getSimOperator != null|empty - optional string simOperator = 7; - - // "WIFI::" | ("mobile" | "notmobile" | "unknown") + "-" + ("roaming" | "notroaming" | "unknown") - optional string roaming = 8; - - // UserHandle.myUserId - // eg. 0 - optional int32 userNumber = 9; - } - - // unused - optional string desiredBuild = 5; - - // Locale.toString - optional string locale = 6; - - // GoogleSettingsContract.Partner["logging_id2"] (choosen randomly on first checkin) - // eg. 12561488293572742346 - optional int64 loggingId = 7; - - // unused - optional string marketCheckin = 8; - - // NetworkInfo.getExtraInfo, WifiInfo.getMacAddress (12 hex-digits) - // eg. d850e6abcdef - repeated string macAddress = 9; - - // TelephonyManager.getDeviceId (14 hex-digits), not set on tablets - optional string meid = 10; - - // "[]" followed by "", empty string on first checkin - repeated string accountCookie = 11; - - // TimeZone.getId - // eg. GMT - optional string timeZone = 12; - - // security token as given on first checkin, not set on first checkin - optional fixed64 securityToken = 13; - - // use 3 - optional int32 version = 14; - - // SHA-1 of each in /system/etc/security/otacerts.zip or "--IOException--" or "--no-output--" - // eg. dKXTm1QH9QShGQwBM/4rg6/lCNQ= - repeated string otaCert = 15; - - // Build.SERIAL != "unknown" - // eg. 07d90b18 - optional string serial = 16; - - // TelephonyManager.getDeviceId (8 hex-digits), not set on tablets - optional string esn = 17; - - optional DeviceConfig deviceConfiguration = 18; - message DeviceConfig { - // ConfigurationInfo.reqTouchScreen - // eg. 3 - optional int32 touchScreen = 1; - - // ConfigurationInfo.reqKeyboardType - // eg. 1 - optional int32 keyboardType = 2; - - // ConfigurationInfo.reqNavigation - // eg. 1 - optional int32 navigation = 3; - // ConfigurationInfo.screenLayout - // eg. 3 - optional int32 screenLayout = 4; - - // ConfigurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD - // eg. 0 - optional bool hasHardKeyboard = 5; - - // ConfigurationInfo.reqInputFeatures & ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV - // eg. 0 - optional bool hasFiveWayNavigation = 6; - - // DisplayMetrics.densityDpi - // eg. 320 - optional int32 densityDpi = 7; - - // ConfigurationInfo.reqGlEsVersion - // eg. 196608 - optional int32 glEsVersion = 8; - - // PackageManager.getSystemSharedLibraryNames - // eg. "android.test.runner", "com.android.future.usb.accessory", - // "com.android.media.remotedisplay", "com.android.mediadrm.signer", "com.google.android.maps", - // "com.google.android.media.effects", "com.google.widevine.software.drm", "javax.obex" - repeated string sharedLibrary = 9; - - // PackageManager.getSystemAvailableFeatures - // eg. android.hardware.[...] - repeated string availableFeature = 10; - - // Build.CPU_ABI and Build.CPU_ABI2 != "unknown" - // eg. "armeabi-v7a", "armeabi" - repeated string nativePlatform = 11; - - // DisplayMetrics.widthPixels - // eg. 1200 - optional int32 widthPixels = 12; - - // DisplayMetrics.heightPixels - // eg. 1824 - optional int32 heightPixels = 13; - - // Context.getAssets.getLocales - // eg. [...], "en-US", [...] - repeated string locale = 14; - - // GLES10.glGetString(GLES10.GL_EXTENSIONS) - // eg. "GL_AMD_compressed_ATC_texture", [...] - repeated string glExtension = 15; - - // unused - optional int32 deviceClass = 16; - // unused - optional int32 maxApkDownloadSizeMb = 17; - } - - // "ethernet" or "wifi" - repeated string macAddressType = 19; - - // unknown, use 0 on pre- and first-checkin, and 1 for later checkins - // also present on pre-checkin - required int32 fragment = 20; - - // unknown - optional string userName = 21; - - // UserManager.getUserSerialNumber - // eg. 0 - optional int32 userSerialNumber = 22; -} - -message CheckinResponse { - optional bool statsOk = 1; - repeated Intent intent = 2; - message Intent { - optional string action = 1; - optional string dataUri = 2; - optional string mimeType = 3; - optional string javaClass = 4; - repeated Extra extra = 5; - message Extra { - optional string name = 6; - optional string value = 7; - } - } - optional int64 timeMs = 3; - optional string digest = 4; - repeated GservicesSetting setting = 5; - message GservicesSetting { - optional bytes name = 1; - optional bytes value = 2; - } - optional bool marketOk = 6; - optional fixed64 androidId = 7; - optional fixed64 securityToken = 8; - optional bool settingsDiff = 9; - repeated string deleteSetting = 10; - optional string versionInfo = 11; - optional string deviceDataVersionInfo = 12; -} diff --git a/play-services-core-proto/src/main/proto/mcs.proto b/play-services-core-proto/src/main/proto/mcs.proto deleted file mode 100644 index 590f7138..00000000 --- a/play-services-core-proto/src/main/proto/mcs.proto +++ /dev/null @@ -1,270 +0,0 @@ -// Derived from mcs.proto in chromium source code. Original license text below. - -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// MCS protocol for communication between Chrome client and Mobile Connection -// Server . - -option java_package = "org.microg.gms.gcm.mcs"; - -/* - Common fields/comments: - - stream_id: no longer sent by server, each side keeps a counter - last_stream_id_received: sent only if a packet was received since last time - a last_stream was sent - status: new bitmask including the 'idle' as bit 0. - - */ - -/** - TAG: 0 - */ -message HeartbeatPing { - optional int32 stream_id = 1; - optional int32 last_stream_id_received = 2; - optional int64 status = 3; -} - -/** - TAG: 1 - */ -message HeartbeatAck { - optional int32 stream_id = 1; - optional int32 last_stream_id_received = 2; - optional int64 status = 3; -} - -message ErrorInfo { - required int32 code = 1; - optional string message = 2; - optional string type = 3; - optional Extension extension = 4; -} - -// MobileSettings class. -// "u:f", "u:b", "u:s" - multi user devices reporting foreground, background -// and stopped users. -// hbping: heatbeat ping interval -// rmq2v: include explicit stream IDs - -message Setting { - required string name = 1; - required string value = 2; -} - -message HeartbeatStat { - required string ip = 1; - required bool timeout = 2; - required int32 interval_ms = 3; -} - -message HeartbeatConfig { - optional bool upload_stat = 1; - optional string ip = 2; - optional int32 interval_ms = 3; -} - -/** - TAG: 2 - */ -message LoginRequest { - enum AuthService { - ANDROID_ID = 2; - } - required string id = 1; // Must be present ( proto required ), may be empty - // string. - // mcs.android.com. - required string domain = 2; - // Decimal android ID - required string user = 3; - - required string resource = 4; - - // Secret - required string auth_token = 5; - - // Format is: android-HEX_DEVICE_ID - // The user is the decimal value. - optional string device_id = 6; - - // RMQ1 - no longer used - optional int64 last_rmq_id = 7; - - repeated Setting setting = 8; - optional int32 compress = 9; - repeated string received_persistent_id = 10; - - // Replaced by "rmq2v" setting - optional bool include_stream_ids = 11; - - optional bool adaptive_heartbeat = 12; - optional HeartbeatStat heartbeat_stat = 13; - // Must be true. - optional bool use_rmq2 = 14; - optional int64 account_id = 15; - - // ANDROID_ID = 2 - optional AuthService auth_service = 16; - - optional int32 network_type = 17; - optional int64 status = 18; -} - -/** - * TAG: 3 - */ -message LoginResponse { - required string id = 1; - // Not used. - optional string jid = 2; - // Null if login was ok. - optional ErrorInfo error = 3; - repeated Setting setting = 4; - optional int32 stream_id = 5; - // Should be "1" - optional int32 last_stream_id_received = 6; - optional HeartbeatConfig heartbeat_config = 7; - // used by the client to synchronize with the server timestamp. - optional int64 server_timestamp = 8; -} - -message StreamErrorStanza { - required string type = 1; - optional string text = 2; -} - -/** - * TAG: 4 - */ -message Close { -} - -message Extension { - // 12: SelectiveAck - // 13: StreamAck - required int32 id = 1; - required bytes data = 2; -} - -/** - * TAG: 7 - * IqRequest must contain a single extension. IqResponse may contain 0 or 1 - * extensions. - */ -message IqStanza { - enum IqType { - GET = 0; - SET = 1; - RESULT = 2; - IQ_ERROR = 3; - } - - optional int64 rmq_id = 1; - required IqType type = 2; - required string id = 3; - optional string from = 4; - optional string to = 5; - optional ErrorInfo error = 6; - - // Only field used in the 38+ protocol (besides common last_stream_id_received, status, rmq_id) - optional Extension extension = 7; - - optional string persistent_id = 8; - optional int32 stream_id = 9; - optional int32 last_stream_id_received = 10; - optional int64 account_id = 11; - optional int64 status = 12; -} - -message AppData { - required string key = 1; - required string value = 2; -} - -/** - * TAG: 8 - */ -message DataMessageStanza { - // Not used. - optional int64 rmq_id = 1; - - // This is the message ID, set by client, DMP.9 (message_id) - optional string id = 2; - - // Project ID of the sender, DMP.1 - required string from = 3; - - // Part of DMRequest - also the key in DataMessageProto. - optional string to = 4; - - // Package name. DMP.2 - required string category = 5; - - // The collapsed key, DMP.3 - optional string token = 6; - - // User data + GOOGLE. prefixed special entries, DMP.4 - repeated AppData app_data = 7; - - // Not used. - optional bool from_trusted_server = 8; - - // Part of the ACK protocol, returned in DataMessageResponse on server side. - // It's part of the key of DMP. - optional string persistent_id = 9; - - // In-stream ack. Increments on each message sent - a bit redundant - // Not used in DMP/DMR. - optional int32 stream_id = 10; - optional int32 last_stream_id_received = 11; - - // Not used. - optional string permission = 12; - - // Sent by the device shortly after registration. - optional string reg_id = 13; - - // Not used. - optional string pkg_signature = 14; - // Not used. - optional string client_id = 15; - - // serial number of the target user, DMP.8 - // It is the 'serial number' according to user manager. - optional int64 device_user_id = 16; - - // Time to live, in seconds. - optional int32 ttl = 17; - // Timestamp ( according to client ) when message was sent by app, in seconds - optional int64 sent = 18; - - // How long has the message been queued before the flush, in seconds. - // This is needed to account for the time difference between server and - // client: server should adjust 'sent' based on his 'receive' time. - optional int32 queued = 19; - - optional int64 status = 20; - - optional bytes raw_data = 21; - - optional int32 delay = 22; -} - -/** - Included in IQ with ID 13, sent from client or server after 10 unconfirmed - messages. - */ -message StreamAck { - // No last_streamid_received required. This is included within an IqStanza, - // which includes the last_stream_id_received. -} - -/** - Included in IQ sent after LoginResponse from server with ID 12. -*/ -message SelectiveAck { - repeated string id = 1; -} diff --git a/play-services-core-proto/src/main/proto/potoken.proto b/play-services-core-proto/src/main/proto/potoken.proto deleted file mode 100644 index 98475912..00000000 --- a/play-services-core-proto/src/main/proto/potoken.proto +++ /dev/null @@ -1,63 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -option java_package = "com.google.android.gms.potokens"; - -option java_multiple_files = true; - -message CipherKey { - optional int32 key = 1; - optional bytes value = 3; -} - -message KeyData { - optional string typeUrl = 1; - optional CipherKey value = 2; - optional int32 keyMaterialType = 3; -} - -message Key { - optional KeyData data = 1; - optional int32 status = 2; - optional int32 keyId = 3; - optional int32 outputPrefixType = 4; -} - -message KeySet { - optional int32 keyId = 1; - repeated Key keyList = 2; -} - -message PoTokenInfo { - optional int32 key = 6; - optional int32 time = 1; - optional bytes inputData = 2; - optional string pkgName = 3; - optional bytes pkgSignSha256 = 4; - optional bytes tokenData = 5; -} - -message GetPoIntegrityTokenRequest { - optional int32 mode = 1; - optional bytes dgResult = 2; - optional bytes dgRandKey = 3; -} - -message GetPoIntegrityTokenResponse { - optional bytes desc = 1; - optional int32 code = 2; - optional bytes backup = 3; -// optional bytes d = 4; -// optional bytes e = 5; -} - -message PoTokenResult { - optional bytes encryptData = 1; - optional bytes tokenData = 2; -} - -message PoTokenResultWrap { - optional PoTokenResult data = 1; -} diff --git a/play-services-core/build.gradle b/play-services-core/build.gradle deleted file mode 100644 index cae9eb8b..00000000 --- a/play-services-core/build.gradle +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright 2013-2019 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' - -dependencies { - implementation "com.squareup.wire:wire-runtime:$wireVersion" -<<<<<<< HEAD - implementation "de.hdodenhof:circleimageview:$circleimageviewVersion" -======= - implementation "de.hdodenhof:circleimageview:1.3.0" - - implementation project(':fake-signature') - implementation project(':firebase-dynamic-links') - implementation project(':firebase-auth-core') - implementation project(':play-services-ads-core') - implementation project(':play-services-ads-identifier-core') - implementation project(':play-services-ads-lite-core') - implementation project(':play-services-appinvite-core') - implementation project(':play-services-appset-core') - implementation project(':play-services-auth-api-phone-core') - implementation project(':play-services-base-core') - implementation project(':play-services-cast-core') - implementation project(':play-services-cast-framework-core') - implementation project(':play-services-conscrypt-provider-core') - implementation project(':play-services-cronet-core') - implementation project(':play-services-droidguard-core') - implementation project(':play-services-fido-core') - implementation project(':play-services-gmscompliance-core') - implementation project(':play-services-location-core') - implementation project(':play-services-location-core-base') - implementation project(':play-services-oss-licenses-core') - implementation project(':play-services-panorama-core') - implementation project(':play-services-pay-core') - implementation project(':play-services-recaptcha-core') - implementation project(':play-services-safetynet-core') - implementation project(':play-services-tapandpay-core') - implementation project(':play-services-vision-core') - implementation project(':play-services-wearable-core') - - implementation project(':play-services-core-proto') - - implementation project(':play-services-core:microg-ui-tools') // deprecated - implementation project(':play-services-base-core-package') - implementation project(':play-services-api') - - implementation project(':play-services-appinvite') - implementation project(':play-services-auth-base') - implementation project(':play-services-auth') - implementation project(':play-services-clearcut') - implementation project(':play-services-drive') - implementation project(':play-services-games') - implementation project(':play-services-maps') - implementation project(':play-services-measurement-base') - implementation project(':play-services-places') - implementation project(':play-services-recaptcha') - implementation project(':play-services-safetynet') - implementation project(':play-services-tasks-ktx') - implementation project(':play-services-fitness') - - mapboxRuntimeOnly project(':play-services-maps-core-mapbox') - vtmRuntimeOnly project(':play-services-maps-core-vtm') - defaultRuntimeOnly project(':play-services-location-core-provider') - - if (hasModule("nearby", true)) runtimeOnly project(':play-services-nearby-core-package') - if (hasModule("hms", false)) hmsRuntimeOnly project(':play-services-maps-core-hms') - - // AndroidX UI - implementation "androidx.multidex:multidex:$multidexVersion" - implementation "androidx.appcompat:appcompat:$appcompatVersion" - implementation "androidx.mediarouter:mediarouter:$mediarouterVersion" - implementation "androidx.preference:preference-ktx:$preferenceVersion" ->>>>>>> 1b34bbd3 (Add dummy service for PANORAMA(3) (#2173)) - implementation "androidx.webkit:webkit:$webkitVersion" - -<<<<<<< HEAD - implementation project(':play-services-base-core') - implementation project(':play-services-core-proto') - implementation project(':play-services-core:microg-ui-tools') // deprecated - implementation project(':play-services-api') - implementation project(':play-services-tasks') - - // AndroidX UI - implementation "androidx.appcompat:appcompat:$appcompatVersion" - implementation "androidx.preference:preference-ktx:$preferenceVersion" - - implementation 'org.microg.gms:conscrypt-gmscore:2.5.2' -======= - // Material Components ->>>>>>> 48e0b00a (Update build tools and dependencies) - implementation "com.google.android.material:material:$materialVersion" - - // Navigation - implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion" - implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion" - - implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion" - implementation "com.android.volley:volley:$volleyVersion" - - api project(':play-services-basement') -} - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion androidBuildVersionTools - - defaultConfig { - versionName version - versionCode appVersionCode - resConfigs 'xxhdpi' - - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - - ndk { - abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64" - } - - } - - buildFeatures { - dataBinding = true - viewBinding = true - } - - sourceSets { - main { - java.srcDirs += 'src/main/kotlin' - } - } - - - buildTypes { - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 - } - - packagingOptions { - jniLibs { - useLegacyPackaging false - } - resources { - excludes += ['META-INF/ASL2.0'] - } - } - lint { - disable 'MissingTranslation', 'BatteryLife', 'ImpliedQuantity', 'MissingQuantity', 'InvalidWakeLockTag', 'Range' - } - namespace 'com.mgoogle.android.gms' -} - -if (file('user.gradle').exists()) { - apply from: 'user.gradle' -} \ No newline at end of file diff --git a/play-services-core/microg-ui-tools/build.gradle b/play-services-core/microg-ui-tools/build.gradle deleted file mode 100644 index d9a5c2bb..00000000 --- a/play-services-core/microg-ui-tools/build.gradle +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2013-2016 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -apply plugin: 'com.android.library' - -android { - compileSdkVersion androidCompileSdk - buildToolsVersion androidBuildVersionTools - - defaultConfig { - minSdkVersion androidMinSdk - targetSdkVersion androidTargetSdk - } - - compileOptions { - sourceCompatibility = 11 - targetCompatibility = 11 - } - lint { - disable 'MissingTranslation' - } - namespace 'org.microg.tools.ui' - -} - -dependencies { - implementation "androidx.appcompat:appcompat:$appcompatVersion" - implementation "androidx.preference:preference:$preferenceVersion" - implementation "com.google.android.material:material:$materialVersion" -} - diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java deleted file mode 100644 index 2c4c2399..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractAboutFragment.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.content.Context; -import android.content.pm.PackageManager; -import android.graphics.drawable.Drawable; -import android.os.Bundle; -import android.text.TextUtils; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.TextView; -<<<<<<< HEAD - -import androidx.annotation.NonNull; -======= ->>>>>>> bfabc38e (About: Fix scrolling) -import androidx.annotation.Nullable; -import androidx.fragment.app.Fragment; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Locale; - -public abstract class AbstractAboutFragment extends Fragment { - - protected abstract void collectLibraries(List libraries); - - public static Drawable getIcon(Context context) { - try { - PackageManager pm = context.getPackageManager(); - return pm.getPackageInfo(context.getPackageName(), 0).applicationInfo.loadIcon(pm); - } catch (PackageManager.NameNotFoundException e) { - // Never happens, self package always exists! - throw new RuntimeException(e); - } - } - - public static String getAppName(Context context) { - try { - PackageManager pm = context.getPackageManager(); - CharSequence label = pm.getPackageInfo(context.getPackageName(), 0).applicationInfo.loadLabel(pm); - if (TextUtils.isEmpty(label)) return context.getPackageName(); - return label.toString().trim(); - } catch (PackageManager.NameNotFoundException e) { - // Never happens, self package always exists! - throw new RuntimeException(e); - } - } - - protected String getAppName() { - return getAppName(requireContext()); - } - - public static String getLibVersion(String packageName) { - try { - String versionName = (String) Class.forName(packageName + ".BuildConfig").getField("VERSION_NAME").get(null); - if (TextUtils.isEmpty(versionName)) return ""; - return versionName.trim(); - } catch (Exception e) { - return ""; - } - } - - public static String getSelfVersion(Context context) { - return getLibVersion(context.getPackageName()); - } - - protected String getSelfVersion() { - return getSelfVersion(requireContext()); - } - - protected String getSummary() { - return null; - } - - @Nullable - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View aboutRoot = inflater.inflate(R.layout.about_root, container, false); - ((ImageView) aboutRoot.findViewById(android.R.id.icon)).setImageDrawable(getIcon(requireContext())); - ((TextView) aboutRoot.findViewById(android.R.id.title)).setText(getAppName()); - ((TextView) aboutRoot.findViewById(R.id.about_version)).setText(getString(R.string.about_version_str, getSelfVersion())); - String summary = getSummary(); - if (summary != null) { - ((TextView) aboutRoot.findViewById(android.R.id.summary)).setText(summary); - aboutRoot.findViewById(android.R.id.summary).setVisibility(View.VISIBLE); - } - - List libraries = new ArrayList<>(); - collectLibraries(libraries); - Collections.sort(libraries); -<<<<<<< HEAD - ((ListView) aboutRoot.findViewById(android.R.id.list)).setAdapter(new LibraryAdapter(getContext(), libraries.toArray(new Library[0]))); - -======= - ViewGroup list = aboutRoot.findViewById(android.R.id.list); - for (Library library : libraries) { - View v = inflater.inflate(android.R.layout.simple_list_item_2, list, false); - ((TextView) v.findViewById(android.R.id.text1)).setText(getString(R.string.about_name_version_str, library.name, getLibVersion(library.packageName))); - ((TextView) v.findViewById(android.R.id.text2)).setText(library.copyright != null ? library.copyright : getString(R.string.about_default_license)); - list.addView(v); - } ->>>>>>> bfabc38e (About: Fix scrolling) - return aboutRoot; - } - - protected static class Library implements Comparable { - private final String packageName; - private final String name; - private final String copyright; - - public Library(String packageName, String name, String copyright) { - this.packageName = packageName; - this.name = name; - this.copyright = copyright; - } - - @NonNull - @Override - public String toString() { - return name + ", " + copyright; - } - - @Override - public int compareTo(Library another) { - return name.toLowerCase(Locale.US).compareTo(another.name.toLowerCase(Locale.US)); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java deleted file mode 100644 index 85bc123f..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractDashboardActivity.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.microg.tools.ui; - -import android.os.Bundle; -import android.view.ViewGroup; - -import androidx.appcompat.app.AppCompatActivity; -import androidx.fragment.app.Fragment; - -import java.util.ArrayList; -import java.util.List; - -public abstract class AbstractDashboardActivity extends AppCompatActivity { - protected int preferencesResource = 0; - - private final List conditions = new ArrayList<>(); - private ViewGroup conditionContainer; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.dashboard_activity); - conditionContainer = (ViewGroup) findViewById(R.id.condition_container); - - getSupportFragmentManager().beginTransaction() - .replace(R.id.content_wrapper, getFragment()) - .commit(); - } - - @Override - protected void onResume() { - super.onResume(); - forceConditionReevaluation(); - } - - private synchronized void resetConditionViews() { - conditionContainer.removeAllViews(); - for (Condition condition : conditions) { - if (condition.isEvaluated()) { - if (condition.isActive(this)) { - addConditionToView(condition); - } - } else { - evaluateConditionAsync(condition); - } - } - } - - private void evaluateConditionAsync(final Condition condition) { - if (condition.willBeEvaluating()) { - new Thread(() -> { - if (condition.isActive(AbstractDashboardActivity.this)) { - runOnUiThread(() -> { - if (conditions.contains(condition) && condition.isEvaluated()) { - addConditionToView(condition); - } - }); - } - }).start(); - } - } - - protected void forceConditionReevaluation() { - for (Condition condition : conditions) { - condition.resetEvaluated(); - } - resetConditionViews(); - } - - private synchronized void addConditionToView(Condition condition) { - for (int i = 0; i < conditionContainer.getChildCount(); i++) { - if (conditionContainer.getChildAt(i).getTag() == condition) return; - } - conditionContainer.addView(condition.createView(this, conditionContainer)); - } - - protected Fragment getFragment() { - if (preferencesResource == 0) { - throw new IllegalStateException("Neither preferencesResource given, nor overriden getFragment()"); - } - ResourceSettingsFragment fragment = new ResourceSettingsFragment(); - Bundle b = new Bundle(); - b.putInt(ResourceSettingsFragment.EXTRA_PREFERENCE_RESOURCE, preferencesResource); - fragment.setArguments(b); - return fragment; - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java deleted file mode 100644 index db1da7b2..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsActivity.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.microg.tools.ui; - -import android.os.Bundle; -import android.view.MenuItem; -import android.view.ViewGroup; - -import androidx.appcompat.app.AppCompatActivity; -import androidx.fragment.app.Fragment; - -import java.util.Objects; - -public abstract class AbstractSettingsActivity extends AppCompatActivity { - protected boolean showHomeAsUp = false; - protected int preferencesResource = 0; - protected int customBarLayout = 0; - protected SwitchBar switchBar; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.settings_activity); - if (showHomeAsUp) { - Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true); - } - - switchBar = (SwitchBar) findViewById(R.id.switch_bar); - - ViewGroup customBarContainer = (ViewGroup) findViewById(R.id.custom_bar); - if (customBarLayout != 0) { - customBarContainer.addView(getLayoutInflater().inflate(customBarLayout, customBarContainer, false)); - } - - getSupportFragmentManager().beginTransaction() - .replace(R.id.content_wrapper, getFragment()) - .commit(); - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - if (item.getItemId() == android.R.id.home) { - finish(); - return true; - } - return super.onOptionsItemSelected(item); - } - - protected Fragment getFragment() { - if (preferencesResource == 0) { - throw new IllegalStateException("Neither preferencesResource given, nor overriden getFragment()"); - } - ResourceSettingsFragment fragment = new ResourceSettingsFragment(); - Bundle b = new Bundle(); - b.putInt(ResourceSettingsFragment.EXTRA_PREFERENCE_RESOURCE, preferencesResource); - fragment.setArguments(b); - return fragment; - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java deleted file mode 100644 index 78ac70b0..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/AbstractSettingsFragment.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import androidx.annotation.NonNull; -import androidx.fragment.app.DialogFragment; -import androidx.preference.Preference; -import androidx.preference.PreferenceFragmentCompat; - -public abstract class AbstractSettingsFragment extends PreferenceFragmentCompat { - private static final String TAG = AbstractSettingsFragment.class.getSimpleName(); - - private static final String DIALOG_FRAGMENT_TAG = "androidx.preference.PreferenceFragment.DIALOG"; - - @Override - public void onDisplayPreferenceDialog(@NonNull Preference preference) { - if (preference instanceof DialogPreference) { - DialogFragment f = DialogPreference.DialogPreferenceCompatDialogFragment.newInstance(preference.getKey()); - f.setTargetFragment(this, 0); - assert getFragmentManager() != null; - f.show(getFragmentManager(), DIALOG_FRAGMENT_TAG); - } else { - super.onDisplayPreferenceDialog(preference); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java deleted file mode 100644 index c94b3bd6..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/Condition.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.content.Context; -import android.graphics.drawable.Drawable; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import android.widget.ImageView; -import android.widget.TextView; - -import androidx.annotation.DrawableRes; -import androidx.annotation.PluralsRes; -import androidx.annotation.StringRes; -import androidx.core.content.res.ResourcesCompat; - -public class Condition { - @DrawableRes - private final int iconRes; - private final Drawable icon; - - @StringRes - private final int titleRes; - @PluralsRes - private final int titlePluralsRes; - private final CharSequence title; - - @StringRes - private final int summaryRes; - @PluralsRes - private final int summaryPluralsRes; - private final CharSequence summary; - - @StringRes - private final int firstActionTextRes; - @PluralsRes - private final int firstActionPluralsRes; - private final CharSequence firstActionText; - private final View.OnClickListener firstActionListener; - - @StringRes - private final int secondActionTextRes; - @PluralsRes - private final int secondActionPluralsRes; - private final CharSequence secondActionText; - private final View.OnClickListener secondActionListener; - - private final Evaluation evaluation; - - private boolean evaluated = false; - private boolean evaluating = false; - private int evaluatedPlurals = -1; - private boolean active; - - Condition(Builder builder) { - icon = builder.icon; - title = builder.title; - summary = builder.summary; - firstActionText = builder.firstActionText; - firstActionListener = builder.firstActionListener; - secondActionText = builder.secondActionText; - secondActionListener = builder.secondActionListener; - summaryRes = builder.summaryRes; - iconRes = builder.iconRes; - firstActionTextRes = builder.firstActionTextRes; - secondActionTextRes = builder.secondActionTextRes; - titleRes = builder.titleRes; - evaluation = builder.evaluation; - titlePluralsRes = builder.titlePluralsRes; - summaryPluralsRes = builder.summaryPluralsRes; - firstActionPluralsRes = builder.firstActionPluralsRes; - secondActionPluralsRes = builder.secondActionPluralsRes; - } - - View createView(final Context context, ViewGroup container) { - LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - View view = inflater.inflate(R.layout.condition_card, container, false); - Drawable icon = getIcon(context); - if (icon != null) - ((ImageView) view.findViewById(android.R.id.icon)).setImageDrawable(icon); - ((TextView) view.findViewById(android.R.id.title)).setText(getTitle(context)); - ((TextView) view.findViewById(android.R.id.summary)).setText(getSummary(context)); - Button first = (Button) view.findViewById(R.id.first_action); - first.setText(getFirstActionText(context)); - first.setOnClickListener(getFirstActionListener()); - CharSequence secondActionText = getSecondActionText(context); - if (secondActionText != null) { - Button second = (Button) view.findViewById(R.id.second_action); - second.setText(secondActionText); - second.setOnClickListener(getSecondActionListener()); - second.setVisibility(View.VISIBLE); - } - final View detailGroup = view.findViewById(R.id.detail_group); - final ImageView expandIndicator = (ImageView) view.findViewById(R.id.expand_indicator); - View.OnClickListener expandListener = v -> { - if (detailGroup.getVisibility() == View.VISIBLE) { - expandIndicator.setImageDrawable(ResourcesCompat.getDrawable(context.getResources(), R.drawable.ic_expand_more, context.getTheme())); - detailGroup.setVisibility(View.GONE); - } else { - expandIndicator.setImageDrawable(ResourcesCompat.getDrawable(context.getResources(), R.drawable.ic_expand_less, context.getTheme())); - detailGroup.setVisibility(View.VISIBLE); - } - }; - view.findViewById(R.id.collapsed_group).setOnClickListener(expandListener); - expandIndicator.setOnClickListener(expandListener); - view.setTag(this); - return view; - } - - public Drawable getIcon(Context context) { - if (iconRes != 0) { - return ResourcesCompat.getDrawable(context.getResources(), iconRes, context.getTheme()); - } - return icon; - } - - public CharSequence getTitle(Context context) { - if (titleRes != 0) { - return context.getString(titleRes); - } - if (titlePluralsRes != 0) { - return context.getResources().getQuantityString(titlePluralsRes, evaluatedPlurals); - } - return title; - } - - public CharSequence getSummary(Context context) { - if (summaryRes != 0) { - return context.getString(summaryRes); - } - if (summaryPluralsRes != 0) { - return context.getResources().getQuantityString(summaryPluralsRes, evaluatedPlurals); - } - return summary; - } - - public View.OnClickListener getFirstActionListener() { - return firstActionListener; - } - - public CharSequence getFirstActionText(Context context) { - if (firstActionTextRes != 0) { - return context.getString(firstActionTextRes); - } - if (firstActionPluralsRes != 0) { - return context.getResources().getQuantityString(firstActionPluralsRes, evaluatedPlurals); - } - return firstActionText; - } - - public View.OnClickListener getSecondActionListener() { - return secondActionListener; - } - - public CharSequence getSecondActionText(Context context) { - if (secondActionTextRes != 0) { - return context.getString(secondActionTextRes); - } - if (secondActionPluralsRes != 0) { - return context.getResources().getQuantityString(secondActionPluralsRes, evaluatedPlurals); - } - return secondActionText; - } - - public synchronized boolean willBeEvaluating() { - if (!evaluating && !evaluated && evaluation != null) { - return evaluating = true; - } else { - return false; - } - } - - public boolean isEvaluated() { - return evaluated || evaluation == null; - } - - public synchronized void evaluate(Context context) { - active = evaluation == null || evaluation.isActive(context); - assert evaluation != null; - evaluatedPlurals = evaluation.getPluralsCount(); - evaluated = true; - evaluating = false; - } - - public boolean isActive(Context context) { - if (!evaluated && evaluation != null) evaluate(context); - return active; - } - - public void resetEvaluated() { - this.evaluated = false; - } - - public static abstract class Evaluation { - public abstract boolean isActive(Context context); - - public int getPluralsCount() { - return 1; - } - } - - public static class Builder { - - @DrawableRes - private int iconRes; - private Drawable icon; - @StringRes - private int titleRes; - @PluralsRes - private final int titlePluralsRes; - private CharSequence title; - @StringRes - private int summaryRes; - @PluralsRes - private final int summaryPluralsRes; - private CharSequence summary; - @StringRes - private final int firstActionTextRes; - @PluralsRes - private final int firstActionPluralsRes; - private final CharSequence firstActionText; - private final View.OnClickListener firstActionListener; - @StringRes - private final int secondActionTextRes; - @PluralsRes - private final int secondActionPluralsRes; - private final CharSequence secondActionText; - private final View.OnClickListener secondActionListener; - private final Evaluation evaluation; - - - public Builder(int titlePluralsRes, int summaryPluralsRes, int firstActionTextRes, int firstActionPluralsRes, CharSequence firstActionText, View.OnClickListener firstActionListener, int secondActionTextRes, int secondActionPluralsRes, CharSequence secondActionText, View.OnClickListener secondActionListener, Evaluation evaluation) { - this.titlePluralsRes = titlePluralsRes; - this.summaryPluralsRes = summaryPluralsRes; - this.firstActionTextRes = firstActionTextRes; - this.firstActionPluralsRes = firstActionPluralsRes; - this.firstActionText = firstActionText; - this.firstActionListener = firstActionListener; - this.secondActionTextRes = secondActionTextRes; - this.secondActionPluralsRes = secondActionPluralsRes; - this.secondActionText = secondActionText; - this.secondActionListener = secondActionListener; - this.evaluation = evaluation; - } - - public Builder icon(Drawable val) { - icon = val; - return this; - } - - public Builder icon(@DrawableRes int val) { - iconRes = val; - return this; - } - - public Builder title(CharSequence val) { - title = val; - return this; - } - - public Builder title(@StringRes int val) { - titleRes = val; - return this; - } - - public Builder summary(CharSequence val) { - summary = val; - return this; - } - - public Builder summary(@StringRes int val) { - summaryRes = val; - return this; - } - - public Condition build() { - return new Condition(this); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java deleted file mode 100644 index b5335089..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/DialogPreference.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2013-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.content.Context; -import android.content.SharedPreferences; -import android.os.Bundle; -import android.util.AttributeSet; -import android.view.View; -import android.view.ViewGroup; -import android.widget.LinearLayout; - -import androidx.annotation.NonNull; -import androidx.fragment.app.DialogFragment; -import androidx.preference.Preference; -import androidx.preference.PreferenceDialogFragmentCompat; -import androidx.preference.PreferenceFragmentCompat; -import androidx.preference.PreferenceViewHolder; - -public class DialogPreference extends androidx.preference.DialogPreference implements PreferenceFragmentCompat.OnPreferenceDisplayDialogCallback { - - private static final String DIALOG_FRAGMENT_TAG = - "android.support.v7.preference.PreferenceFragment.DIALOG"; - - public DialogPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes); - } - - public DialogPreference(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - public DialogPreference(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public DialogPreference(Context context) { - super(context); - } - - protected View onCreateDialogView() { - return null; - } - - /** - * Called when the dialog is dismissed and should be used to save data to - * the {@link SharedPreferences}. - * - */ - protected void onDialogClosed() { - } - - @Override - public boolean onPreferenceDisplayDialog(@NonNull PreferenceFragmentCompat caller, @NonNull Preference pref) { - DialogPreferenceCompatDialogFragment fragment = new DialogPreferenceCompatDialogFragment(); - fragment.setTargetFragment(caller, 0); - assert caller.getFragmentManager() != null; - fragment.show(caller.getFragmentManager(), DIALOG_FRAGMENT_TAG); - return true; - } - - @Override - public void onBindViewHolder(@NonNull PreferenceViewHolder view) { - super.onBindViewHolder(view); - - ViewGroup.LayoutParams layoutParams = view.findViewById(R.id.icon_frame).getLayoutParams(); - if (layoutParams instanceof LinearLayout.LayoutParams) { - if (((LinearLayout.LayoutParams) layoutParams).leftMargin < 0) { - ((LinearLayout.LayoutParams) layoutParams).leftMargin = 0; - } - } - } - - public static class DialogPreferenceCompatDialogFragment extends PreferenceDialogFragmentCompat { - - @Override - protected View onCreateDialogView(@NonNull Context context) { - if (getPreference() instanceof DialogPreference) { - View view = ((DialogPreference) getPreference()).onCreateDialogView(); - if (view != null) return view; - } - return super.onCreateDialogView(context); - } - - @Override - public void onDialogClosed(boolean positiveResult) { - if (getPreference() instanceof DialogPreference) { - ((DialogPreference) getPreference()).onDialogClosed(); - } - } - - public static DialogFragment newInstance(String key) { - final DialogPreferenceCompatDialogFragment fragment = new DialogPreferenceCompatDialogFragment(); - final Bundle b = new Bundle(1); - b.putString(ARG_KEY, key); - fragment.setArguments(b); - return fragment; - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java deleted file mode 100644 index 78abc781..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ResourceSettingsFragment.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.os.Bundle; - -import androidx.annotation.Nullable; - -public class ResourceSettingsFragment extends AbstractSettingsFragment { - - public static final String EXTRA_PREFERENCE_RESOURCE = "preferencesResource"; - - protected int preferencesResource; - - @Override - public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) { - Bundle b = getArguments(); - if (b != null) { - preferencesResource = b.getInt(EXTRA_PREFERENCE_RESOURCE, preferencesResource); - } - if (preferencesResource != 0) { - addPreferencesFromResource(preferencesResource); - } - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java deleted file mode 100644 index 0a30f683..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBar.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * Copyright (C) 2014-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.content.Context; -import android.os.Parcel; -import android.os.Parcelable; -import android.text.SpannableStringBuilder; -import android.text.TextUtils; -import android.text.style.TextAppearanceSpan; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.CompoundButton; -import android.widget.LinearLayout; -import android.widget.TextView; - -import androidx.annotation.NonNull; - -import com.google.android.material.switchmaterial.SwitchMaterial; - -import java.util.ArrayList; - -public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedChangeListener, - View.OnClickListener { - - public interface OnSwitchChangeListener { - /** - * Called when the checked state of the Switch has changed. - * - * @param switchView The Switch view whose state has changed. - * @param isChecked The new checked state of switchView. - */ - void onSwitchChanged(SwitchMaterial switchView, boolean isChecked); - } - - private final TextAppearanceSpan mSummarySpan; - - private final ToggleSwitch mSwitch; - private final TextView mTextView; - private String mLabel; - private String mSummary; - - private final ArrayList mSwitchChangeListeners = - new ArrayList<>(); - - public SwitchBar(Context context) { - this(context, null); - } - - public SwitchBar(Context context, AttributeSet attrs) { - super(context, attrs); - - LayoutInflater.from(context).inflate(R.layout.switch_bar, this); - - mTextView = (TextView) findViewById(R.id.switch_text); - mTextView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO); - mLabel = getResources().getString(R.string.abc_capital_off); - mSummarySpan = new TextAppearanceSpan(context, androidx.appcompat.R.style.TextAppearance_AppCompat_Widget_Switch); - updateText(); - - mSwitch = (ToggleSwitch) findViewById(R.id.switch_widget); - // Prevent onSaveInstanceState() to be called as we are managing the state of the Switch - // on our own - mSwitch.setSaveEnabled(false); - mSwitch.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO); - - addOnSwitchChangeListener((switchView, isChecked) -> setTextViewLabel(isChecked)); - - setOnClickListener(this); - - // Default is hide - setVisibility(View.GONE); - } - - public void setTextViewLabel(boolean isChecked) { - mLabel = getResources() - .getString(isChecked ? R.string.abc_capital_on : R.string.abc_capital_off); - updateText(); - } - - public void setSummary(String summary) { - mSummary = summary; - updateText(); - } - - private void updateText() { - if (TextUtils.isEmpty(mSummary)) { - mTextView.setText(mLabel); - return; - } - final SpannableStringBuilder ssb = new SpannableStringBuilder(mLabel).append('\n'); - final int start = ssb.length(); - ssb.append(mSummary); - ssb.setSpan(mSummarySpan, start, ssb.length(), 0); - mTextView.setText(ssb); - } - - public void setChecked(boolean checked) { - setTextViewLabel(checked); - mSwitch.setChecked(checked); - } - - public void setEnabled(boolean enabled) { - super.setEnabled(enabled); - mTextView.setEnabled(enabled); - mSwitch.setEnabled(enabled); - } - - public boolean isShowing() { - return (getVisibility() == View.VISIBLE); - } - - @Override - public void onClick(View v) { - final boolean isChecked = !mSwitch.isChecked(); - setChecked(isChecked); - } - - public void propagateChecked(boolean isChecked) { - final int count = mSwitchChangeListeners.size(); - for (int n = 0; n < count; n++) { - mSwitchChangeListeners.get(n).onSwitchChanged(mSwitch, isChecked); - } - } - - @Override - public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - propagateChecked(isChecked); - } - - public void addOnSwitchChangeListener(OnSwitchChangeListener listener) { - if (mSwitchChangeListeners.contains(listener)) { - throw new IllegalStateException("Cannot add twice the same OnSwitchChangeListener"); - } - mSwitchChangeListeners.add(listener); - } - - static class SavedState extends BaseSavedState { - boolean checked; - boolean visible; - - SavedState(Parcelable superState) { - super(superState); - } - - /** - * Constructor called from {@link #CREATOR} - */ - private SavedState(Parcel in) { - super(in); - checked = (Boolean) in.readValue(Boolean.class.getClassLoader()); - visible = (Boolean) in.readValue(Boolean.class.getClassLoader()); - } - - @Override - public void writeToParcel(Parcel out, int flags) { - super.writeToParcel(out, flags); - out.writeValue(checked); - out.writeValue(visible); - } - - @NonNull - @Override - public String toString() { - return "SwitchBar.SavedState{" - + Integer.toHexString(System.identityHashCode(this)) - + " checked=" + checked - + " visible=" + visible + "}"; - } - - public static final Parcelable.Creator CREATOR - = new Parcelable.Creator() { - public SavedState createFromParcel(Parcel in) { - return new SavedState(in); - } - - public SavedState[] newArray(int size) { - return new SavedState[size]; - } - }; - } - - @Override - public Parcelable onSaveInstanceState() { - Parcelable superState = super.onSaveInstanceState(); - - SavedState ss = new SavedState(superState); - ss.checked = mSwitch.isChecked(); - ss.visible = isShowing(); - return ss; - } - - @Override - public void onRestoreInstanceState(Parcelable state) { - SavedState ss = (SavedState) state; - - super.onRestoreInstanceState(ss.getSuperState()); - - mSwitch.setCheckedInternal(ss.checked); - setTextViewLabel(ss.checked); - setVisibility(ss.visible ? View.VISIBLE : View.GONE); - mSwitch.setOnCheckedChangeListener(ss.visible ? this : null); - - requestLayout(); - } -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java deleted file mode 100644 index f590aa25..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/SwitchBarResourceSettingsFragment.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.os.Bundle; - -import com.google.android.material.switchmaterial.SwitchMaterial; - -public abstract class SwitchBarResourceSettingsFragment extends ResourceSettingsFragment implements SwitchBar.OnSwitchChangeListener { - private final SwitchMaterial switchMaterial; - private boolean listenerSetup = false; - - protected SwitchBarResourceSettingsFragment(SwitchMaterial switchMaterial) { - this.switchMaterial = switchMaterial; - } - - @Override - public void onActivityCreated(Bundle savedInstanceState) { - super.onActivityCreated(savedInstanceState); - } - - @Override - public void onDestroyView() { - super.onDestroyView(); - } - - @Override - public void onResume() { - super.onResume(); - if (!listenerSetup) { - listenerSetup = true; - } - } - - @Override - public void onPause() { - if (listenerSetup) { - listenerSetup = false; - } - super.onPause(); - } - - @Override - public void onSwitchChanged(SwitchMaterial switchView, boolean isChecked) { - if (switchView == switchMaterial) { - onSwitchBarChanged(isChecked); - } - } - - public abstract void onSwitchBarChanged(boolean isChecked); -} diff --git a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java b/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java deleted file mode 100644 index 3a3a7bb3..00000000 --- a/play-services-core/microg-ui-tools/src/main/java/org/microg/tools/ui/ToggleSwitch.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * Copyright (C) 2014-2017 microG Project Team - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.microg.tools.ui; - -import android.annotation.SuppressLint; -import android.content.Context; -import android.util.AttributeSet; - -import com.google.android.material.switchmaterial.SwitchMaterial; - -@SuppressLint("NewApi") -public class ToggleSwitch extends SwitchMaterial { - - private ToggleSwitch.OnBeforeCheckedChangeListener mOnBeforeListener; - - public interface OnBeforeCheckedChangeListener { - boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked); - } - - public ToggleSwitch(Context context) { - super(context); - } - - public ToggleSwitch(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public ToggleSwitch(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - } - - @Override - public void setChecked(boolean checked) { - if (mOnBeforeListener != null - && mOnBeforeListener.onBeforeCheckedChanged(this, checked)) { - return; - } - super.setChecked(checked); - } - - public void setCheckedInternal(boolean checked) { - super.setChecked(checked); - } -} diff --git a/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_less.xml b/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_less.xml deleted file mode 100644 index 62ff063e..00000000 --- a/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_less.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - diff --git a/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_more.xml b/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_more.xml deleted file mode 100644 index 871f6575..00000000 --- a/play-services-core/microg-ui-tools/src/main/res/drawable/ic_expand_more.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - diff --git a/play-services-core/microg-ui-tools/src/main/res/layout-v21/preference_material.xml b/play-services-core/microg-ui-tools/src/main/res/layout-v21/preference_material.xml deleted file mode 100644 index 3f7906ae..00000000 --- a/play-services-core/microg-ui-tools/src/main/res/layout-v21/preference_material.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/play-services-core/microg-ui-tools/src/main/res/layout/about_root.xml b/play-services-core/microg-ui-tools/src/main/res/layout/about_root.xml deleted file mode 100644 index 32e29bfa..00000000 --- a/play-services-core/microg-ui-tools/src/main/res/layout/about_root.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - -======= - android:layout_height="wrap_content"/> ->>>>>>> bfabc38e (About: Fix scrolling) - diff --git a/play-services-core/microg-ui-tools/src/main/res/layout/condition_card.xml b/play-services-core/microg-ui-tools/src/main/res/layout/condition_card.xml deleted file mode 100644 index d42bf4a6..00000000 --- a/play-services-core/microg-ui-tools/src/main/res/layout/condition_card.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -