From 92d6356750bcf5278223f16702b7768d688fbf60 Mon Sep 17 00:00:00 2001 From: Licaon_Kter Date: Mon, 18 Jul 2022 11:04:39 +0000 Subject: [PATCH] Delete unused muzei patch --- .../3.4.3-remove-play-services.patch | 1193 ----------------- 1 file changed, 1193 deletions(-) delete mode 100644 metadata/net.nurik.roman.muzei/3.4.3-remove-play-services.patch diff --git a/metadata/net.nurik.roman.muzei/3.4.3-remove-play-services.patch b/metadata/net.nurik.roman.muzei/3.4.3-remove-play-services.patch deleted file mode 100644 index 292dfe90f7..0000000000 --- a/metadata/net.nurik.roman.muzei/3.4.3-remove-play-services.patch +++ /dev/null @@ -1,1193 +0,0 @@ -diff --git a/android-client-common/build.gradle b/android-client-common/build.gradle -index 26e02da1..3fa47267 100644 ---- a/android-client-common/build.gradle -+++ b/android-client-common/build.gradle -@@ -33,10 +33,6 @@ dependencies { - implementation "androidx.work:work-runtime-ktx:$workManagerVersion" - api "androidx.room:room-ktx:$roomVersion" - kapt "androidx.room:room-compiler:$roomVersion" -- api "com.google.firebase:firebase-analytics-ktx:$firebaseAnalyticsVersion" -- api "com.google.firebase:firebase-crashlytics-ktx:$firebaseCrashlyticsVersion" -- api "com.google.firebase:firebase-perf-ktx:$firebasePerfVersion" -- api "com.google.android.gms:play-services-wearable:$playServicesWearableVersion" - } - - android { -diff --git a/android-client-common/src/main/java/com/google/android/apps/muzei/wearable/ArtworkTransfer.kt b/android-client-common/src/main/java/com/google/android/apps/muzei/wearable/ArtworkTransfer.kt -deleted file mode 100644 -index 4ff77591..00000000 ---- a/android-client-common/src/main/java/com/google/android/apps/muzei/wearable/ArtworkTransfer.kt -+++ /dev/null -@@ -1,55 +0,0 @@ --/* -- * Copyright 2017 Google Inc. -- * -- * 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.apps.muzei.wearable -- --import androidx.core.net.toUri --import androidx.core.os.bundleOf --import com.google.android.apps.muzei.room.Artwork --import com.google.android.gms.wearable.DataMap -- --private const val KEY_IMAGE_URI = "imageUri" --private const val KEY_TITLE = "title" --private const val KEY_BYLINE = "byline" --private const val KEY_ATTRIBUTION = "attribution" -- --/** -- * Serializes this artwork object to a [DataMap] representation. -- * -- * @return a serialized version of the artwork. -- * @see toArtwork -- */ --fun Artwork.toDataMap(): DataMap = DataMap.fromBundle(bundleOf( -- KEY_IMAGE_URI to imageUri.toString(), -- KEY_TITLE to title, -- KEY_BYLINE to byline, -- KEY_ATTRIBUTION to attribution)) -- --/** -- * Deserializes an artwork object from a [DataMap]. -- * -- * @return the artwork from the [DataMap] -- * @see toDataMap -- */ --fun DataMap.toArtwork(): com.google.android.apps.muzei.api.provider.Artwork { -- val bundle = toBundle() -- return com.google.android.apps.muzei.api.provider.Artwork( -- persistentUri = bundle.getString(KEY_IMAGE_URI)?.takeUnless { it.isBlank() }?.toUri(), -- title = bundle.getString(KEY_TITLE), -- byline = bundle.getString(KEY_BYLINE), -- attribution = bundle.getString(KEY_ATTRIBUTION) -- ) --} -diff --git a/build.gradle b/build.gradle -index ff9e86d6..bad68a53 100644 ---- a/build.gradle -+++ b/build.gradle -@@ -30,9 +30,6 @@ buildscript { - dokkaVersion = '0.10.0' - drawerLayoutVersion = '1.1.1' - exifInterfaceVersion = '1.3.2' -- firebaseAnalyticsVersion = '18.0.0' -- firebaseCrashlyticsVersion = '17.3.0' -- firebasePerfVersion = '19.0.10' - fragmentVersion = '1.3.0-beta02' - kotlinVersion = '1.4.20' - lifecycleVersion = '2.3.0-beta01' -@@ -42,7 +39,6 @@ buildscript { - navigationVersion = '2.3.2' - okhttpVersion = '3.12.12' - pagingVersion = '3.0.0-alpha10' -- playServicesWearableVersion = '17.0.0' - preferenceVersion = '1.1.1' - recyclerViewVersion = '1.2.0-beta01' - retrofitVersion = '2.9.0' -@@ -61,9 +57,6 @@ buildscript { - } - dependencies { - classpath 'com.android.tools.build:gradle:4.1.1' -- classpath "com.google.gms:google-services:4.3.4" -- classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1' -- classpath "com.google.firebase:perf-plugin:1.3.4" - classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion" - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" - classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion" -diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties -index 47865460..18e19e3f 100644 ---- a/gradle/wrapper/gradle-wrapper.properties -+++ b/gradle/wrapper/gradle-wrapper.properties -@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME - distributionPath=wrapper/dists - zipStoreBase=GRADLE_USER_HOME - zipStorePath=wrapper/dists --distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-rc-4-all.zip -+distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip -diff --git a/legacy-standalone/build.gradle b/legacy-standalone/build.gradle -index 80451174..a8bb26c4 100644 ---- a/legacy-standalone/build.gradle -+++ b/legacy-standalone/build.gradle -@@ -17,8 +17,6 @@ - apply plugin: 'com.android.application' - apply plugin: 'kotlin-android' - apply plugin: 'kotlin-kapt' --apply plugin: 'com.google.firebase.crashlytics' --apply plugin: 'com.google.firebase.firebase-perf' - - android { - resourcePrefix 'legacy_' -@@ -52,34 +50,16 @@ android { - } - } - -- signingConfigs { -- release { -- Properties localProps = new Properties() -- localProps.load(new FileInputStream(file('../local.properties'))) -- Properties keyProps = new Properties() -- if (localProps['keystore.props.file'] != null) { -- keyProps.load(new FileInputStream(file(localProps['keystore.props.file']))) -- } -- storeFile keyProps["store"] != null ? file(keyProps["store"]) : null -- keyAlias keyProps["alias"] ?: "" -- storePassword keyProps["storePass"] ?: "" -- keyPassword keyProps["pass"] ?: "" -- } -- } - - buildTypes { - debug { - versionNameSuffix " Debug" -- FirebasePerformance { -- instrumentationEnabled false -- } - } - - release { - minifyEnabled true - shrinkResources true - proguardFiles getDefaultProguardFile('proguard-android.txt'), file('proguard-project.txt') -- signingConfig signingConfigs.release - } - } - -@@ -107,13 +87,9 @@ dependencies { - implementation "androidx.room:room-ktx:$roomVersion" - kapt "androidx.room:room-compiler:$roomVersion" - implementation "com.google.android.material:material:$materialVersion" -- implementation "com.google.firebase:firebase-analytics-ktx:$firebaseAnalyticsVersion" -- api "com.google.firebase:firebase-crashlytics-ktx:$firebaseCrashlyticsVersion" -- implementation "com.google.firebase:firebase-perf-ktx:$firebasePerfVersion" - implementation "com.squareup.okhttp3:okhttp:$okhttpVersion" - implementation project(':muzei-api') - implementation project(':extensions') - implementation project(':legacy-common') - } - --apply plugin: 'com.google.gms.google-services' -\ No newline at end of file -diff --git a/legacy-standalone/src/main/java/com/google/android/apps/muzei/legacy/LegacySourceService.kt b/legacy-standalone/src/main/java/com/google/android/apps/muzei/legacy/LegacySourceService.kt -index 5026df7e..bc649330 100644 ---- a/legacy-standalone/src/main/java/com/google/android/apps/muzei/legacy/LegacySourceService.kt -+++ b/legacy-standalone/src/main/java/com/google/android/apps/muzei/legacy/LegacySourceService.kt -@@ -43,8 +43,6 @@ import com.google.android.apps.muzei.sources.SourceSubscriberService - import com.google.android.apps.muzei.util.goAsync - import com.google.android.apps.muzei.util.launchWhenStartedIn - import com.google.android.apps.muzei.util.toastFromBackground --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.ExperimentalCoroutinesApi - import kotlinx.coroutines.GlobalScope - import kotlinx.coroutines.asCoroutineDispatcher -diff --git a/legacy-standalone/src/main/java/com/google/android/apps/muzei/legacy/SourceSettingsActivity.kt b/legacy-standalone/src/main/java/com/google/android/apps/muzei/legacy/SourceSettingsActivity.kt -index 2eb444e6..819843bd 100644 ---- a/legacy-standalone/src/main/java/com/google/android/apps/muzei/legacy/SourceSettingsActivity.kt -+++ b/legacy-standalone/src/main/java/com/google/android/apps/muzei/legacy/SourceSettingsActivity.kt -@@ -52,10 +52,6 @@ import androidx.lifecycle.lifecycleScope - import com.google.android.apps.muzei.api.provider.MuzeiArtProvider - import com.google.android.apps.muzei.util.launchWhenStartedIn - import com.google.android.material.dialog.MaterialAlertDialogBuilder --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.NonCancellable - import kotlinx.coroutines.flow.onEach - import kotlinx.coroutines.launch -diff --git a/main/build.gradle b/main/build.gradle -index 54938531..667fe58e 100644 ---- a/main/build.gradle -+++ b/main/build.gradle -@@ -17,8 +17,6 @@ - apply plugin: 'com.android.application' - apply plugin: 'kotlin-android' - apply plugin: 'kotlin-kapt' --apply plugin: 'com.google.firebase.crashlytics' --apply plugin: 'com.google.firebase.firebase-perf' - apply plugin: 'androidx.navigation.safeargs.kotlin' - - project.archivesBaseName = "muzei" -@@ -48,34 +46,16 @@ android { - buildConfigField "String", "DEVICE_TYPE", "\"android\"" - } - -- signingConfigs { -- release { -- Properties localProps = new Properties() -- localProps.load(new FileInputStream(file('../local.properties'))) -- Properties keyProps = new Properties() -- if (localProps['keystore.props.file'] != null) { -- keyProps.load(new FileInputStream(file(localProps['keystore.props.file']))) -- } -- storeFile keyProps["store"] != null ? file(keyProps["store"]) : null -- keyAlias keyProps["alias"] ?: "" -- storePassword keyProps["storePass"] ?: "" -- keyPassword keyProps["pass"] ?: "" -- } -- } - - buildTypes { - debug { - versionNameSuffix " Debug" -- FirebasePerformance { -- instrumentationEnabled false -- } - } - - release { - minifyEnabled true - shrinkResources true - proguardFiles getDefaultProguardFile('proguard-android.txt'), file('proguard-project.txt') -- signingConfig signingConfigs.release - } - - publicBeta.initWith(buildTypes.release) -@@ -108,7 +88,6 @@ dependencies { - api "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion" - implementation "androidx.multidex:multidex:$multidexVersion" - implementation "io.coil-kt:coil:$coilVersion" -- implementation "com.google.android.gms:play-services-wearable:$playServicesWearableVersion" - implementation "com.twofortyfouram:android-plugin-api-for-locale:$localeVersion" - implementation "com.davemorrissey.labs:subsampling-scale-image-view-androidx:$subsamplingVersion" - implementation "androidx.core:core-ktx:$coreVersion" -@@ -137,5 +116,3 @@ dependencies { - implementation project(':source-single') - implementation project(':gl-wallpaper') - } -- --apply plugin: 'com.google.gms.google-services' -\ No newline at end of file -diff --git a/main/src/main/java/com/google/android/apps/muzei/ArtDetailFragment.kt b/main/src/main/java/com/google/android/apps/muzei/ArtDetailFragment.kt -index 45e1eba2..52401ec4 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/ArtDetailFragment.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/ArtDetailFragment.kt -@@ -64,10 +64,6 @@ import com.google.android.apps.muzei.sync.ProviderManager - import com.google.android.apps.muzei.util.launchWhenStartedIn - import com.google.android.apps.muzei.util.makeCubicGradientScrimDrawable - import com.google.android.apps.muzei.widget.showWidgetPreview --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.Dispatchers - import kotlinx.coroutines.ExperimentalCoroutinesApi - import kotlinx.coroutines.Job -@@ -186,12 +182,6 @@ class ArtDetailFragment : Fragment(R.layout.art_detail_fragment) { - val action = overflowSourceActionMap.get(menuItem.itemId) - if (action != null) { - viewModel.currentArtwork.value?.run { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, providerAuthority) -- param(FirebaseAnalytics.Param.ITEM_NAME, menuItem.title.toString()) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "actions") -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "art_detail") -- } - try { - action.actionIntent.send() - } catch (e: PendingIntent.CanceledException) { -@@ -204,21 +194,16 @@ class ArtDetailFragment : Fragment(R.layout.art_detail_fragment) { - - return@setOnMenuItemClickListener when (menuItem.itemId) { - R.id.action_gestures -> { -- Firebase.analytics.logEvent("gestures_open", null) - findNavController().navigate(ArtDetailFragmentDirections.gestures()) - true - } - R.id.action_always_dark -> { - val alwaysDark = !menuItem.isChecked - menuItem.isChecked = alwaysDark -- Firebase.analytics.logEvent("always_dark") { -- param(FirebaseAnalytics.Param.VALUE, alwaysDark.toString()) -- } - MuzeiApplication.setAlwaysDark(context, alwaysDark) - true - } - R.id.action_about -> { -- Firebase.analytics.logEvent("about_open", null) - startActivity(Intent(context, AboutActivity::class.java)) - true - } -@@ -227,9 +212,6 @@ class ArtDetailFragment : Fragment(R.layout.art_detail_fragment) { - } - - binding.nextArtwork.setOnClickListener { -- Firebase.analytics.logEvent("next_artwork") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "art_detail") -- } - ProviderManager.getInstance(requireContext()).nextArtwork() - showFakeLoading() - } -@@ -342,9 +324,6 @@ class ArtDetailFragment : Fragment(R.layout.art_detail_fragment) { - binding.metadata.setOnClickListener { - val context = requireContext() - lifecycleScope.launch { -- Firebase.analytics.logEvent("artwork_info_open") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "art_detail") -- } - viewModel.currentArtwork.value?.openArtworkInfo(context) - } - } -diff --git a/main/src/main/java/com/google/android/apps/muzei/ArtworkInfoRedirectActivity.kt b/main/src/main/java/com/google/android/apps/muzei/ArtworkInfoRedirectActivity.kt -index 2e6e953a..660c4dac 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/ArtworkInfoRedirectActivity.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/ArtworkInfoRedirectActivity.kt -@@ -22,10 +22,6 @@ import androidx.fragment.app.FragmentActivity - import androidx.lifecycle.lifecycleScope - import com.google.android.apps.muzei.room.MuzeiDatabase - import com.google.android.apps.muzei.room.openArtworkInfo --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - - /** - * Open the Artwork Info associated with the current artwork -@@ -48,9 +44,6 @@ class ArtworkInfoRedirectActivity : FragmentActivity() { - .getCurrentArtwork() - artwork?.run { - val from = intent?.getStringExtra(EXTRA_FROM) ?: "activity_shortcut" -- Firebase.analytics.logEvent("artwork_info_open") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, from) -- } - openArtworkInfo(this@ArtworkInfoRedirectActivity) - } - finish() -diff --git a/main/src/main/java/com/google/android/apps/muzei/AutoAdvanceFragment.kt b/main/src/main/java/com/google/android/apps/muzei/AutoAdvanceFragment.kt -index d4aab48d..f9b2ba49 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/AutoAdvanceFragment.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/AutoAdvanceFragment.kt -@@ -31,10 +31,6 @@ import androidx.core.text.toSpannable - import androidx.fragment.app.Fragment - import com.google.android.apps.muzei.sync.ProviderManager - import com.google.android.apps.muzei.util.toast --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import net.nurik.roman.muzei.R - import net.nurik.roman.muzei.databinding.AutoAdvanceFragmentBinding - -@@ -69,9 +65,6 @@ class AutoAdvanceFragment : Fragment(R.layout.auto_advance_fragment) { - val providerManager = ProviderManager.getInstance(requireContext()) - binding.useWifi.isChecked = providerManager.loadOnWifi - binding.useWifi.setOnCheckedChangeListener { _, isChecked -> -- Firebase.analytics.logEvent("auto_advance_load_on_wifi") { -- param(FirebaseAnalytics.Param.VALUE, isChecked.toString()) -- } - providerManager.loadOnWifi = isChecked - } - -@@ -79,9 +72,6 @@ class AutoAdvanceFragment : Fragment(R.layout.auto_advance_fragment) { - - binding.intervalGroup.check(INTERVAL_RADIO_BUTTON_IDS_BY_TIME[currentInterval.toInt()]) - binding.intervalGroup.setOnCheckedChangeListener { _, id -> -- Firebase.analytics.logEvent("auto_advance_load_frequency") { -- param(FirebaseAnalytics.Param.VALUE, INTERVAL_TIME_BY_RADIO_BUTTON_ID[id]) -- } - providerManager.loadFrequencySeconds = INTERVAL_TIME_BY_RADIO_BUTTON_ID[id] - } - -@@ -105,7 +95,6 @@ class AutoAdvanceFragment : Fragment(R.layout.auto_advance_fragment) { - "%26utm_medium%3Dapp" + - "%26utm_campaign%3Dauto_advance")) - ).addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT)) -- Firebase.analytics.logEvent("tasker_open", null) - } catch (e: ActivityNotFoundException) { - context.toast(R.string.play_store_not_found, Toast.LENGTH_LONG) - } catch (e: SecurityException) { -diff --git a/main/src/main/java/com/google/android/apps/muzei/ChooseProviderFragment.kt b/main/src/main/java/com/google/android/apps/muzei/ChooseProviderFragment.kt -index 19f548ef..f1f1814d 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/ChooseProviderFragment.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/ChooseProviderFragment.kt -@@ -56,10 +56,6 @@ import com.google.android.apps.muzei.sync.ProviderManager - import com.google.android.apps.muzei.util.launchWhenStartedIn - import com.google.android.apps.muzei.util.toast - import com.google.android.material.snackbar.Snackbar --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.NonCancellable - import kotlinx.coroutines.flow.distinctUntilChanged - import kotlinx.coroutines.flow.map -@@ -101,11 +97,6 @@ class ChooseProviderFragment : Fragment(R.layout.choose_provider_fragment) { - if (success && provider != null) { - val context = requireContext() - lifecycleScope.launch(NonCancellable) { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, provider) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "providers") -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "after_setup") -- } - ProviderManager.select(context, provider) - } - } -@@ -134,21 +125,16 @@ class ChooseProviderFragment : Fragment(R.layout.choose_provider_fragment) { - if (binding.drawer.isDrawerOpen(GravityCompat.END)) { - binding.drawer.closeDrawer(GravityCompat.END) - } else { -- Firebase.analytics.logEvent("auto_advance_open", null) - binding.drawer.openDrawer(GravityCompat.END) - } - true - } - R.id.auto_advance_disabled -> { -- Firebase.analytics.logEvent("auto_advance_disabled", null) - context.toast(R.string.auto_advance_disabled_description, - Toast.LENGTH_LONG) - true - } - R.id.action_notification_settings -> { -- Firebase.analytics.logEvent("notification_settings_open") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "overflow") -- } - NotificationSettingsDialogFragment.showSettings(context, - childFragmentManager) - true -@@ -286,11 +272,6 @@ class ChooseProviderFragment : Fragment(R.layout.choose_provider_fragment) { - try { - startActivity(Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, - Uri.fromParts("package", packageName, null))) -- Firebase.analytics.logEvent("app_settings_open") { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, authority) -- param(FirebaseAnalytics.Param.ITEM_NAME, title) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "providers") -- } - } catch (e: ActivityNotFoundException) { - return@setOnLongClickListener false - } -@@ -306,19 +287,9 @@ class ChooseProviderFragment : Fragment(R.layout.choose_provider_fragment) { - - setSelected(providerInfo) - binding.settings.setOnClickListener { -- Firebase.analytics.logEvent("provider_settings_open") { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, authority) -- param(FirebaseAnalytics.Param.ITEM_NAME, title) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "providers") -- } - launchProviderSettings(this) - } - binding.browse.setOnClickListener { -- Firebase.analytics.logEvent("provider_browse_open") { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, authority) -- param(FirebaseAnalytics.Param.ITEM_NAME, title) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "providers") -- } - findNavController().navigate( - ChooseProviderFragmentDirections.browse( - ProviderContract.getContentUri(authority))) -@@ -401,27 +372,13 @@ class ChooseProviderFragment : Fragment(R.layout.choose_provider_fragment) { - val context = context - val parentFragment = parentFragment?.parentFragment - if (context is Callbacks) { -- Firebase.analytics.logEvent("choose_provider_reselected", null) - context.onRequestCloseActivity() - } else if (parentFragment is Callbacks) { -- Firebase.analytics.logEvent("choose_provider_reselected", null) - parentFragment.onRequestCloseActivity() - } - } else if (setupActivity != null) { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.VIEW_ITEM) { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, authority) -- param(FirebaseAnalytics.Param.ITEM_NAME, title) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "providers") -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "choose") -- } - launchProviderSetup(this) - } else { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, authority) -- param(FirebaseAnalytics.Param.ITEM_NAME, title) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "providers") -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "choose") -- } - val context = requireContext() - lifecycleScope.launch(NonCancellable) { - ProviderManager.select(context, authority) -@@ -503,7 +460,6 @@ class ChooseProviderFragment : Fragment(R.layout.choose_provider_fragment) { - - override fun onBindViewHolder(holder: ProviderViewHolder, position: Int) { - holder.bind(playStoreProviderInfo!!) { -- Firebase.analytics.logEvent("more_sources_open", null) - try { - startActivity(playStoreIntent) - } catch (e: ActivityNotFoundException) { -diff --git a/main/src/main/java/com/google/android/apps/muzei/IntroFragment.kt b/main/src/main/java/com/google/android/apps/muzei/IntroFragment.kt -index 559369c8..c22c8f02 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/IntroFragment.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/IntroFragment.kt -@@ -27,9 +27,6 @@ import androidx.fragment.app.Fragment - import androidx.fragment.app.commitNow - import com.google.android.apps.muzei.util.AnimatedMuzeiLogoFragment - import com.google.android.apps.muzei.util.toast --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.ktx.Firebase - import net.nurik.roman.muzei.R - import net.nurik.roman.muzei.databinding.IntroFragmentBinding - -@@ -41,14 +38,12 @@ class IntroFragment : Fragment(R.layout.intro_fragment) { - super.onCreate(savedInstanceState) - - if (savedInstanceState == null) { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.TUTORIAL_BEGIN, null) - } - } - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - binding = IntroFragmentBinding.bind(view) - binding.activateMuzei.setOnClickListener { -- Firebase.analytics.logEvent("activate", null) - try { - startActivity(Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER) - .putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT, -diff --git a/main/src/main/java/com/google/android/apps/muzei/MainFragment.kt b/main/src/main/java/com/google/android/apps/muzei/MainFragment.kt -index 156f764b..8bfd2dbf 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/MainFragment.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/MainFragment.kt -@@ -29,10 +29,6 @@ import androidx.navigation.fragment.NavHostFragment - import androidx.navigation.ui.setupWithNavController - import com.google.android.apps.muzei.browse.BrowseProviderFragment - import com.google.android.apps.muzei.settings.EffectsFragment --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import net.nurik.roman.muzei.R - import net.nurik.roman.muzei.databinding.MainFragmentBinding - -@@ -77,32 +73,12 @@ class MainFragment : Fragment(R.layout.main_fragment), ChooseProviderFragment.Ca - navController.addOnDestinationChangedListener { _, destination, _ -> - when (destination.id) { - R.id.main_art_details -> { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) { -- param(FirebaseAnalytics.Param.SCREEN_NAME, "ArtDetail") -- param(FirebaseAnalytics.Param.SCREEN_CLASS, -- ArtDetailFragment::class.java.simpleName) -- } - } - R.id.main_choose_provider -> { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) { -- param(FirebaseAnalytics.Param.SCREEN_NAME, "ChooseProvider") -- param(FirebaseAnalytics.Param.SCREEN_CLASS, -- ChooseProviderFragment::class.java.simpleName) -- } - } - R.id.browse_provider -> { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) { -- param(FirebaseAnalytics.Param.SCREEN_NAME, "BrowseProvider") -- param(FirebaseAnalytics.Param.SCREEN_CLASS, -- BrowseProviderFragment::class.java.simpleName) -- } - } - R.id.main_effects -> { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) { -- param(FirebaseAnalytics.Param.SCREEN_NAME, "Effects") -- param(FirebaseAnalytics.Param.SCREEN_CLASS, -- EffectsFragment::class.java.simpleName) -- } - } - } - } -diff --git a/main/src/main/java/com/google/android/apps/muzei/MuzeiActivity.kt b/main/src/main/java/com/google/android/apps/muzei/MuzeiActivity.kt -index f48c7e1f..9680fdc7 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/MuzeiActivity.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/MuzeiActivity.kt -@@ -35,10 +35,6 @@ import com.google.android.apps.muzei.settings.EffectsFragment - import com.google.android.apps.muzei.util.launchWhenStartedIn - import com.google.android.apps.muzei.wallpaper.WallpaperActiveState - import com.google.android.apps.muzei.wallpaper.initializeWallpaperActiveState --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.ExperimentalCoroutinesApi - import kotlinx.coroutines.channels.awaitClose - import kotlinx.coroutines.channels.sendBlocking -@@ -66,38 +62,18 @@ class MuzeiActivity : AppCompatActivity() { - return when { - WallpaperActiveState.value && seenTutorial -> { - // The wallpaper is active and they've seen the tutorial -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) { -- param(FirebaseAnalytics.Param.SCREEN_NAME, "Main") -- param(FirebaseAnalytics.Param.SCREEN_CLASS, -- MainFragment::class.java.simpleName) -- } - MainFragment() - } - WallpaperActiveState.value && !seenTutorial -> { - // They need to see the tutorial after activating Muzei for the first time -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) { -- param(FirebaseAnalytics.Param.SCREEN_NAME, "Tutorial") -- param(FirebaseAnalytics.Param.SCREEN_CLASS, -- TutorialFragment::class.java.simpleName) -- } - TutorialFragment() - } - isPreviewMode -> { - // We're previewing the wallpaper and want to adjust its settings -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) { -- param(FirebaseAnalytics.Param.SCREEN_NAME, "Effects") -- param(FirebaseAnalytics.Param.SCREEN_CLASS, -- EffectsFragment::class.java.simpleName) -- } - EffectsFragment() - } - else -> { - // Show the intro fragment to have them activate Muzei -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW) { -- param(FirebaseAnalytics.Param.SCREEN_NAME, "Intro") -- param(FirebaseAnalytics.Param.SCREEN_CLASS, -- IntroFragment::class.java.simpleName) -- } - IntroFragment() - } - }.also { -@@ -112,7 +88,6 @@ class MuzeiActivity : AppCompatActivity() { - } - binding = MuzeiActivityBinding.inflate(layoutInflater) - setContentView(binding.root) -- Firebase.analytics.setUserProperty("device_type", BuildConfig.DEVICE_TYPE) - - binding.container.systemUiVisibility = (View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN - or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION -@@ -152,9 +127,6 @@ class MuzeiActivity : AppCompatActivity() { - } - }.launchWhenStartedIn(this) - if (intent?.hasCategory(Notification.INTENT_CATEGORY_NOTIFICATION_PREFERENCES) == true) { -- Firebase.analytics.logEvent("notification_settings_open") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "intent") -- } - NotificationSettingsDialogFragment.showSettings(this, - supportFragmentManager) - } -diff --git a/main/src/main/java/com/google/android/apps/muzei/MuzeiWallpaperService.kt b/main/src/main/java/com/google/android/apps/muzei/MuzeiWallpaperService.kt -index 1db342ec..2ef0de8c 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/MuzeiWallpaperService.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/MuzeiWallpaperService.kt -@@ -55,12 +55,7 @@ import com.google.android.apps.muzei.sync.ProviderManager - import com.google.android.apps.muzei.util.launchWhenStartedIn - import com.google.android.apps.muzei.wallpaper.LockscreenObserver - import com.google.android.apps.muzei.wallpaper.WallpaperAnalytics --import com.google.android.apps.muzei.wearable.WearableController - import com.google.android.apps.muzei.widget.WidgetUpdater --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.ExperimentalCoroutinesApi - import kotlinx.coroutines.Job - import kotlinx.coroutines.NonCancellable -@@ -100,7 +95,6 @@ class MuzeiWallpaperService : GLWallpaperService(), LifecycleOwner { - addObserver(WorkManagerInitializer.initializeObserver(this@MuzeiWallpaperService)) - addObserver(LegacySourceManager.getInstance(this@MuzeiWallpaperService)) - addObserver(NotificationUpdater(this@MuzeiWallpaperService)) -- addObserver(WearableController(this@MuzeiWallpaperService)) - addObserver(WidgetUpdater(this@MuzeiWallpaperService)) - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) { - addObserver(ArtworkInfoShortcutController(this@MuzeiWallpaperService)) -@@ -323,9 +317,6 @@ class MuzeiWallpaperService : GLWallpaperService(), LifecycleOwner { - private fun triggerTapAction(action: String, type: String) { - when (action) { - Prefs.PREF_TAP_ACTION_TEMP -> { -- Firebase.analytics.logEvent("temp_disable_effects") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, type) -- } - // Temporarily toggle focused/blurred - queueEvent { - renderer.setIsBlurred(!renderer.isBlurred, false) -@@ -335,9 +326,6 @@ class MuzeiWallpaperService : GLWallpaperService(), LifecycleOwner { - } - Prefs.PREF_TAP_ACTION_NEXT -> { - lifecycleScope.launch(NonCancellable) { -- Firebase.analytics.logEvent("next_artwork") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, type) -- } - LegacySourceManager.getInstance(this@MuzeiWallpaperService).nextArtwork() - } - } -@@ -348,9 +336,6 @@ class MuzeiWallpaperService : GLWallpaperService(), LifecycleOwner { - .artworkDao() - .getCurrentArtwork() - artwork?.run { -- Firebase.analytics.logEvent("artwork_info_open") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, type) -- } - openArtworkInfo(this@MuzeiWallpaperService) - } - } -diff --git a/main/src/main/java/com/google/android/apps/muzei/NextArtworkActivity.kt b/main/src/main/java/com/google/android/apps/muzei/NextArtworkActivity.kt -index 9d5c90fc..2821d8aa 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/NextArtworkActivity.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/NextArtworkActivity.kt -@@ -20,10 +20,6 @@ import android.os.Bundle - import androidx.activity.ComponentActivity - import androidx.lifecycle.lifecycleScope - import com.google.android.apps.muzei.legacy.LegacySourceManager --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.NonCancellable - import kotlinx.coroutines.launch - -@@ -34,9 +30,6 @@ class NextArtworkActivity : ComponentActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - lifecycleScope.launch(NonCancellable) { -- Firebase.analytics.logEvent("next_artwork") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "activity_shortcut") -- } - LegacySourceManager.getInstance(this@NextArtworkActivity).nextArtwork() - } - finish() -diff --git a/main/src/main/java/com/google/android/apps/muzei/PhotoSetAsTargetActivity.kt b/main/src/main/java/com/google/android/apps/muzei/PhotoSetAsTargetActivity.kt -index daa35a5c..7fefa072 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/PhotoSetAsTargetActivity.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/PhotoSetAsTargetActivity.kt -@@ -27,10 +27,6 @@ import com.google.android.apps.muzei.single.BuildConfig.SINGLE_AUTHORITY - import com.google.android.apps.muzei.single.SingleArtProvider - import com.google.android.apps.muzei.sync.ProviderManager - import com.google.android.apps.muzei.util.toast --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.NonCancellable - import kotlinx.coroutines.launch - import net.nurik.roman.muzei.R -@@ -59,11 +55,6 @@ class PhotoSetAsTargetActivity : ComponentActivity() { - - // If adding the artwork succeeded, select the single artwork provider - if (!MuzeiContract.Sources.isProviderSelected(context, SINGLE_AUTHORITY)) { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, SINGLE_AUTHORITY) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "providers") -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "set_as") -- } - ProviderManager.select(context, SINGLE_AUTHORITY) - } - startActivity(Intent.makeMainActivity(ComponentName( -diff --git a/main/src/main/java/com/google/android/apps/muzei/TutorialFragment.kt b/main/src/main/java/com/google/android/apps/muzei/TutorialFragment.kt -index fa8d7635..35a1c86b 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/TutorialFragment.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/TutorialFragment.kt -@@ -29,9 +29,6 @@ import androidx.core.content.edit - import androidx.core.content.res.ResourcesCompat - import androidx.fragment.app.Fragment - import androidx.preference.PreferenceManager --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.ktx.Firebase - import net.nurik.roman.muzei.R - import net.nurik.roman.muzei.databinding.TutorialFragmentBinding - -@@ -46,7 +43,6 @@ class TutorialFragment : Fragment(R.layout.tutorial_fragment) { - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - val binding = TutorialFragmentBinding.bind(view).content - binding.iconAffordance.setOnClickListener { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.TUTORIAL_COMPLETE, null) - PreferenceManager.getDefaultSharedPreferences(context).edit { - putBoolean(PREF_SEEN_TUTORIAL, true) - } -diff --git a/main/src/main/java/com/google/android/apps/muzei/browse/BrowseProviderFragment.kt b/main/src/main/java/com/google/android/apps/muzei/browse/BrowseProviderFragment.kt -index 87f544ff..9ea84436 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/browse/BrowseProviderFragment.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/browse/BrowseProviderFragment.kt -@@ -39,10 +39,6 @@ import com.google.android.apps.muzei.room.getCommands - import com.google.android.apps.muzei.sync.ProviderManager - import com.google.android.apps.muzei.util.launchWhenStartedIn - import com.google.android.apps.muzei.util.toast --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.Dispatchers - import kotlinx.coroutines.delay - import kotlinx.coroutines.flow.onEach -@@ -122,12 +118,6 @@ class BrowseProviderFragment: Fragment(R.layout.browse_provider_fragment) { - } - itemView.setOnClickListener { - owner.lifecycleScope.launch(Dispatchers.Main) { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, artwork.providerAuthority) -- param(FirebaseAnalytics.Param.ITEM_NAME, artwork.title ?: "") -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "actions") -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "browse") -- } - // Ensure the date added is set to the current time - artwork.dateAdded.time = System.currentTimeMillis() - MuzeiDatabase.getInstance(context).artworkDao() -@@ -150,12 +140,6 @@ class BrowseProviderFragment: Fragment(R.layout.browse_provider_fragment) { - actions.forEachIndexed { index, action -> - menu.add(Menu.NONE, index, index, action.title).apply { - setOnMenuItemClickListener { menuItem -> -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, artwork.providerAuthority) -- param(FirebaseAnalytics.Param.ITEM_NAME, menuItem.title.toString()) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "actions") -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "browse") -- } - try { - action.actionIntent.send() - } catch (e: PendingIntent.CanceledException) { -diff --git a/main/src/main/java/com/google/android/apps/muzei/legacy/LegacySourceInfoFragment.kt b/main/src/main/java/com/google/android/apps/muzei/legacy/LegacySourceInfoFragment.kt -index 576d6131..46b9f638 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/legacy/LegacySourceInfoFragment.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/legacy/LegacySourceInfoFragment.kt -@@ -34,10 +34,6 @@ import androidx.recyclerview.widget.ListAdapter - import androidx.recyclerview.widget.RecyclerView - import com.google.android.apps.muzei.util.launchWhenStartedIn - import com.google.android.apps.muzei.util.toast --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.flow.SharingStarted - import kotlinx.coroutines.flow.onEach - import kotlinx.coroutines.flow.shareIn -@@ -90,11 +86,6 @@ class LegacySourceInfoFragment : Fragment(R.layout.legacy_source_info_fragment) - binding.icon.setImageBitmap(icon) - binding.title.text = title - binding.appInfo.setOnClickListener { -- Firebase.analytics.logEvent("legacy_source_info_app_info_open") { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, packageName) -- param(FirebaseAnalytics.Param.ITEM_NAME, title) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "sources") -- } - val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS) - intent.data = "package:$packageName".toUri() - startActivity(intent) -@@ -104,11 +95,6 @@ class LegacySourceInfoFragment : Fragment(R.layout.legacy_source_info_fragment) - binding.sendFeedback.isVisible = - intent.resolveActivity(requireContext().packageManager) != null - binding.sendFeedback.setOnClickListener { -- Firebase.analytics.logEvent("legacy_source_info_send_feedback_open") { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, packageName) -- param(FirebaseAnalytics.Param.ITEM_NAME, title) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "sources") -- } - startActivity(intent) - } - } -diff --git a/main/src/main/java/com/google/android/apps/muzei/notifications/NewWallpaperNotificationReceiver.kt b/main/src/main/java/com/google/android/apps/muzei/notifications/NewWallpaperNotificationReceiver.kt -index ab345653..5acec060 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/notifications/NewWallpaperNotificationReceiver.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/notifications/NewWallpaperNotificationReceiver.kt -@@ -40,10 +40,6 @@ import com.google.android.apps.muzei.render.ContentUriImageLoader - import com.google.android.apps.muzei.room.MuzeiDatabase - import com.google.android.apps.muzei.room.getCommands - import com.google.android.apps.muzei.util.goAsync --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.ExperimentalCoroutinesApi - import net.nurik.roman.muzei.R - -@@ -304,9 +300,6 @@ class NewWallpaperNotificationReceiver : BroadcastReceiver() { - when (intent?.action) { - ACTION_MARK_NOTIFICATION_READ -> markNotificationRead(context) - ACTION_NEXT_ARTWORK -> { -- Firebase.analytics.logEvent( -- "next_artwork", bundleOf( -- FirebaseAnalytics.Param.CONTENT_TYPE to "notification")) - LegacySourceManager.getInstance(context).nextArtwork() - } - ACTION_USER_COMMAND -> triggerUserCommandFromRemoteInput(context, intent) -@@ -323,12 +316,6 @@ class NewWallpaperNotificationReceiver : BroadcastReceiver() { - if (artwork != null) { - val commands = artwork.getCommands(context) - commands.find { selectedCommand == it.title }?.run { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, artwork.providerAuthority) -- param(FirebaseAnalytics.Param.ITEM_NAME, title.toString()) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "actions") -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "notification") -- } - try { - actionIntent.send() - } catch (e: PendingIntent.CanceledException) { -diff --git a/main/src/main/java/com/google/android/apps/muzei/quicksettings/NextArtworkTileService.kt b/main/src/main/java/com/google/android/apps/muzei/quicksettings/NextArtworkTileService.kt -index 754fef31..4df98430 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/quicksettings/NextArtworkTileService.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/quicksettings/NextArtworkTileService.kt -@@ -38,10 +38,6 @@ import com.google.android.apps.muzei.room.Provider - import com.google.android.apps.muzei.util.launchWhenStartedIn - import com.google.android.apps.muzei.util.toast - import com.google.android.apps.muzei.wallpaper.WallpaperActiveState --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.ExperimentalCoroutinesApi - import kotlinx.coroutines.NonCancellable - import kotlinx.coroutines.flow.onEach -@@ -80,7 +76,6 @@ class NextArtworkTileService : TileService(), LifecycleOwner { - } - - override fun onTileAdded() { -- Firebase.analytics.logEvent("tile_next_artwork_added", null) - } - - override fun onStartListening() { -@@ -117,15 +112,11 @@ class NextArtworkTileService : TileService(), LifecycleOwner { - when (state) { - Tile.STATE_ACTIVE -> { // Active means we send the 'Next Artwork' command - lifecycleScope.launch(NonCancellable) { -- Firebase.analytics.logEvent("next_artwork") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "tile") -- } - LegacySourceManager.getInstance(context).nextArtwork() - } - } - else -> unlockAndRun { - // Inactive means we attempt to activate Muzei -- Firebase.analytics.logEvent("tile_next_artwork_activate", null) - try { - startActivityAndCollapse(Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER) - .putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT, -@@ -150,7 +141,6 @@ class NextArtworkTileService : TileService(), LifecycleOwner { - } - - override fun onTileRemoved() { -- Firebase.analytics.logEvent("tile_next_artwork_removed", null) - } - - override fun onDestroy() { -diff --git a/main/src/main/java/com/google/android/apps/muzei/tasker/TaskerActionReceiver.kt b/main/src/main/java/com/google/android/apps/muzei/tasker/TaskerActionReceiver.kt -index b09199b2..c5921a91 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/tasker/TaskerActionReceiver.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/tasker/TaskerActionReceiver.kt -@@ -22,10 +22,6 @@ import android.content.Intent - import com.google.android.apps.muzei.legacy.LegacySourceManager - import com.google.android.apps.muzei.sync.ProviderManager - import com.google.android.apps.muzei.util.goAsync --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - import com.twofortyfouram.locale.api.Intent.ACTION_FIRE_SETTING - import com.twofortyfouram.locale.api.Intent.EXTRA_BUNDLE - -@@ -44,18 +40,10 @@ class TaskerActionReceiver : BroadcastReceiver() { - is SelectProviderAction -> { - val authority = selectedAction.authority - if (context.packageManager.resolveContentProvider(authority, 0) != null) { -- Firebase.analytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) { -- param(FirebaseAnalytics.Param.ITEM_LIST_ID, authority) -- param(FirebaseAnalytics.Param.ITEM_LIST_NAME, "providers") -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "tasker") -- } - ProviderManager.select(context, authority) - } - } - is NextArtworkAction -> { -- Firebase.analytics.logEvent("next_artwork") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "tasker") -- } - LegacySourceManager.getInstance(context).nextArtwork() - } - } -diff --git a/main/src/main/java/com/google/android/apps/muzei/wallpaper/WallpaperAnalytics.kt b/main/src/main/java/com/google/android/apps/muzei/wallpaper/WallpaperAnalytics.kt -index c4d73e10..a305d7de 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/wallpaper/WallpaperAnalytics.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/wallpaper/WallpaperAnalytics.kt -@@ -20,8 +20,6 @@ import android.app.WallpaperManager - import android.content.Context - import androidx.lifecycle.DefaultLifecycleObserver - import androidx.lifecycle.LifecycleOwner --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.ktx.Firebase - import kotlinx.coroutines.ExperimentalCoroutinesApi - import kotlinx.coroutines.flow.MutableStateFlow - import kotlinx.coroutines.flow.StateFlow -@@ -54,17 +52,14 @@ class WallpaperAnalytics(context: Context) : DefaultLifecycleObserver { - } - - override fun onStart(owner: LifecycleOwner) { -- Firebase.analytics.setUserProperty("device_type", BuildConfig.DEVICE_TYPE) - } - - override fun onResume(owner: LifecycleOwner) { -- Firebase.analytics.logEvent("wallpaper_created", null) - mutableWallpaperActiveState.value = true - initializedState = true - } - - override fun onPause(owner: LifecycleOwner) { -- Firebase.analytics.logEvent("wallpaper_destroyed", null) - mutableWallpaperActiveState.value = false - initializedState = true - } -diff --git a/main/src/main/java/com/google/android/apps/muzei/wearable/NotificationOpenListenerService.kt b/main/src/main/java/com/google/android/apps/muzei/wearable/NotificationOpenListenerService.kt -deleted file mode 100644 -index 0e5be16b..00000000 ---- a/main/src/main/java/com/google/android/apps/muzei/wearable/NotificationOpenListenerService.kt -+++ /dev/null -@@ -1,28 +0,0 @@ --/* -- * Copyright 2014 Google Inc. -- * -- * 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.apps.muzei.wearable -- --import com.google.android.gms.wearable.MessageEvent --import com.google.android.gms.wearable.WearableListenerService -- --class NotificationOpenListenerService : WearableListenerService() { -- override fun onMessageReceived(messageEvent: MessageEvent?) { -- // Only notification/open actions trigger this WearableListenerService -- val mainIntent = packageManager.getLaunchIntentForPackage(packageName) -- startActivity(mainIntent) -- } --} -diff --git a/main/src/main/java/com/google/android/apps/muzei/wearable/WearableController.kt b/main/src/main/java/com/google/android/apps/muzei/wearable/WearableController.kt -deleted file mode 100644 -index a9e0d5fc..00000000 ---- a/main/src/main/java/com/google/android/apps/muzei/wearable/WearableController.kt -+++ /dev/null -@@ -1,93 +0,0 @@ --/* -- * Copyright 2014 Google Inc. -- * -- * 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.apps.muzei.wearable -- --import android.content.Context --import android.graphics.Bitmap --import android.util.Log --import androidx.lifecycle.DefaultLifecycleObserver --import androidx.lifecycle.LifecycleOwner --import com.google.android.apps.muzei.render.ImageLoader --import com.google.android.apps.muzei.room.Artwork --import com.google.android.apps.muzei.room.MuzeiDatabase --import com.google.android.apps.muzei.util.launchWhenStartedIn --import com.google.android.gms.common.ConnectionResult --import com.google.android.gms.common.GoogleApiAvailability --import com.google.android.gms.common.api.AvailabilityException --import com.google.android.gms.wearable.Asset --import com.google.android.gms.wearable.PutDataMapRequest --import com.google.android.gms.wearable.Wearable --import kotlinx.coroutines.NonCancellable --import kotlinx.coroutines.flow.filterNotNull --import kotlinx.coroutines.flow.onEach --import kotlinx.coroutines.tasks.await --import kotlinx.coroutines.withContext --import java.io.ByteArrayOutputStream -- --/** -- * Controller for updating Android Wear devices with new wallpapers. -- */ --class WearableController(private val context: Context) : DefaultLifecycleObserver { -- -- companion object { -- private const val TAG = "WearableController" -- } -- -- override fun onCreate(owner: LifecycleOwner) { -- // Update Android Wear whenever the artwork changes -- val database = MuzeiDatabase.getInstance(context) -- database.artworkDao().currentArtwork.filterNotNull().onEach { artwork -> -- updateArtwork(artwork) -- }.launchWhenStartedIn(owner) -- } -- -- private suspend fun updateArtwork(artwork: Artwork) = withContext(NonCancellable) { -- if (ConnectionResult.SUCCESS != GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context)) { -- return@withContext -- } -- val dataClient = Wearable.getDataClient(context) -- try { -- GoogleApiAvailability.getInstance().checkApiAvailability(dataClient).await() -- } catch (e: AvailabilityException) { -- val connectionResult = e.getConnectionResult(dataClient) -- if (connectionResult.errorCode != ConnectionResult.API_UNAVAILABLE) { -- Log.w(TAG, "onConnectionFailed: $connectionResult", e.cause) -- } -- return@withContext -- } catch (e: Exception) { -- Log.w(TAG, "Unable to check for Wear API availability", e) -- return@withContext -- } -- -- val image: Bitmap = ImageLoader.decode( -- context.contentResolver, artwork.contentUri, -- 320) ?: return@withContext -- -- val byteStream = ByteArrayOutputStream() -- image.compress(Bitmap.CompressFormat.PNG, 100, byteStream) -- val asset = Asset.createFromBytes(byteStream.toByteArray()) -- val dataMapRequest = PutDataMapRequest.create("/artwork").apply { -- dataMap.putDataMap("artwork", artwork.toDataMap()) -- dataMap.putAsset("image", asset) -- } -- try { -- dataClient.putDataItem(dataMapRequest.asPutDataRequest().setUrgent()).await() -- } catch (e: Exception) { -- Log.w(TAG, "Error uploading artwork to Wear", e) -- } -- } --} -diff --git a/main/src/main/java/com/google/android/apps/muzei/widget/MuzeiAppWidgetProvider.kt b/main/src/main/java/com/google/android/apps/muzei/widget/MuzeiAppWidgetProvider.kt -index 0d00244e..9d674f94 100644 ---- a/main/src/main/java/com/google/android/apps/muzei/widget/MuzeiAppWidgetProvider.kt -+++ b/main/src/main/java/com/google/android/apps/muzei/widget/MuzeiAppWidgetProvider.kt -@@ -23,10 +23,6 @@ import android.content.Intent - import android.os.Bundle - import com.google.android.apps.muzei.legacy.LegacySourceManager - import com.google.android.apps.muzei.util.goAsync --import com.google.firebase.analytics.FirebaseAnalytics --import com.google.firebase.analytics.ktx.analytics --import com.google.firebase.analytics.ktx.logEvent --import com.google.firebase.ktx.Firebase - - /** - * AppWidgetProvider for Muzei. The actual updating is done asynchronously in -@@ -42,9 +38,6 @@ class MuzeiAppWidgetProvider : AppWidgetProvider() { - super.onReceive(context, intent) - if (intent?.action == ACTION_NEXT_ARTWORK) { - goAsync { -- Firebase.analytics.logEvent("next_artwork") { -- param(FirebaseAnalytics.Param.CONTENT_TYPE, "app_widget") -- } - LegacySourceManager.getInstance(context).nextArtwork() - } - }