Skip to content
Permalink
Browse files

Switch to androidx.preference

With the exception of wearable's ConfigActivity, which still uses PreferenceActivity to maintain the styling of Wear OS.
  • Loading branch information...
ianhanniballake committed Jun 9, 2019
1 parent a219b9d commit 7721b3a24a91c9d0651cdff27baacb289625103d
Showing with 21 additions and 14 deletions.
  1. +1 −0 android-client-common/build.gradle
  2. +1 −1 android-client-common/src/main/java/com/google/android/apps/muzei/WorkManagerInitializer.kt
  3. +1 −1 android-client-common/src/main/java/com/google/android/apps/muzei/sync/ProviderChangedWorker.kt
  4. +1 −1 android-client-common/src/main/java/com/google/android/apps/muzei/sync/ProviderManager.kt
  5. +1 −0 build.gradle
  6. +1 −0 main/build.gradle
  7. +1 −1 main/src/main/java/com/google/android/apps/muzei/MuzeiActivity.kt
  8. +1 −1 main/src/main/java/com/google/android/apps/muzei/TutorialFragment.kt
  9. +1 −1 main/src/main/java/com/google/android/apps/muzei/notifications/NewWallpaperNotificationReceiver.kt
  10. +1 −1 main/src/main/java/com/google/android/apps/muzei/notifications/NotificationSettingsDialogFragment.kt
  11. +1 −1 main/src/main/java/com/google/android/apps/muzei/settings/Prefs.kt
  12. +1 −0 source-featured-art/build.gradle
  13. +1 −1 source-featured-art/src/main/java/com/google/android/apps/muzei/featuredart/FeaturedArtWorker.kt
  14. +1 −0 wearable/build.gradle
  15. +3 −1 wearable/src/main/java/com/google/android/apps/muzei/ConfigActivity.kt
  16. +1 −1 wearable/src/main/java/com/google/android/apps/muzei/MuzeiWatchFace.kt
  17. +1 −1 ...e/src/main/java/com/google/android/apps/muzei/complications/ArtworkComplicationProviderService.kt
  18. +1 −1 wearable/src/main/java/com/google/android/apps/muzei/complications/ArtworkComplicationWorker.kt
  19. +1 −1 wearable/src/main/java/com/google/android/apps/muzei/datalayer/ActivateMuzeiIntentService.kt
@@ -28,6 +28,7 @@ dependencies {
implementation "androidx.exifinterface:exifinterface:$exifInterfaceVersion"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
api "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
implementation "androidx.preference:preference-ktx:$preferenceVersion"
implementation "androidx.work:work-runtime-ktx:$workManagerVersion"
api "androidx.room:room-ktx:$roomVersion"
kapt "androidx.room:room-compiler:$roomVersion"
@@ -7,11 +7,11 @@ import android.content.Context
import android.database.Cursor
import android.net.Uri
import android.os.Build
import android.preference.PreferenceManager
import android.util.Log
import androidx.core.content.edit
import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner
import androidx.preference.PreferenceManager
import androidx.work.Configuration
import androidx.work.WorkManager
import net.nurik.roman.muzei.androidclientcommon.BuildConfig
@@ -21,12 +21,12 @@ import android.content.Context
import android.database.Cursor
import android.net.Uri
import android.os.Build
import android.preference.PreferenceManager
import android.util.Log
import androidx.annotation.RequiresApi
import androidx.core.content.edit
import androidx.core.net.toUri
import androidx.lifecycle.Observer
import androidx.preference.PreferenceManager
import androidx.work.Constraints
import androidx.work.CoroutineWorker
import androidx.work.ExistingWorkPolicy
@@ -29,11 +29,11 @@ import android.os.Build
import android.os.Handler
import android.os.Looper
import android.os.RemoteException
import android.preference.PreferenceManager
import android.util.Log
import androidx.core.content.edit
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Observer
import androidx.preference.PreferenceManager
import com.google.android.apps.muzei.api.internal.ProtocolConstants
import com.google.android.apps.muzei.api.provider.ProviderContract
import com.google.android.apps.muzei.room.Artwork
@@ -38,6 +38,7 @@ buildscript {
okhttpVersion = '3.12.1'
pagingVersion = '2.1.0'
playServicesWearableVersion = '16.0.1'
preferenceVersion = '1.1.0-beta01'
recyclerViewVersion = '1.1.0-alpha06'
roomVersion = '2.1.0-rc01'
wearableVersion = '2.4.0'
@@ -124,6 +124,7 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
implementation "androidx.preference:preference-ktx:$preferenceVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"

@@ -20,7 +20,6 @@ import android.app.Application
import android.app.Notification
import android.content.SharedPreferences
import android.os.Bundle
import android.preference.PreferenceManager
import android.view.View
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
@@ -32,6 +31,7 @@ import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.observe
import androidx.preference.PreferenceManager
import com.google.android.apps.muzei.notifications.NotificationSettingsDialogFragment
import com.google.android.apps.muzei.wallpaper.WallpaperActiveState
import com.google.firebase.analytics.FirebaseAnalytics
@@ -21,7 +21,6 @@ import android.animation.ObjectAnimator
import android.graphics.drawable.AnimatedVectorDrawable
import android.os.Build
import android.os.Bundle
import android.preference.PreferenceManager
import android.util.TypedValue
import android.view.View
import android.view.animation.OvershootInterpolator
@@ -31,6 +30,7 @@ import androidx.core.content.edit
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.ViewCompat
import androidx.fragment.app.Fragment
import androidx.preference.PreferenceManager
import com.google.firebase.analytics.FirebaseAnalytics
import net.nurik.roman.muzei.R

@@ -24,7 +24,6 @@ import android.content.Context
import android.content.Intent
import android.content.res.Resources
import android.os.Build
import android.preference.PreferenceManager
import android.provider.Settings
import android.util.Log
import androidx.annotation.RequiresApi
@@ -34,6 +33,7 @@ import androidx.core.app.RemoteInput
import androidx.core.content.ContextCompat
import androidx.core.content.edit
import androidx.core.os.bundleOf
import androidx.preference.PreferenceManager
import com.google.android.apps.muzei.ArtDetailOpenLiveData
import com.google.android.apps.muzei.ArtworkInfoRedirectActivity
import com.google.android.apps.muzei.render.ContentUriImageLoader
@@ -21,12 +21,12 @@ import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.preference.PreferenceManager
import android.provider.Settings
import android.widget.Toast
import androidx.core.content.edit
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.FragmentManager
import androidx.preference.PreferenceManager
import com.google.android.apps.muzei.util.toast
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import net.nurik.roman.muzei.R
@@ -18,10 +18,10 @@ package com.google.android.apps.muzei.settings

import android.content.Context
import android.content.SharedPreferences
import android.preference.PreferenceManager
import androidx.core.content.ContextCompat
import androidx.core.content.edit
import androidx.core.os.UserManagerCompat
import androidx.preference.PreferenceManager

/**
* Preference constants/helpers.
@@ -23,6 +23,7 @@ dependencies {
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
implementation "androidx.core:core-ktx:$coreVersion"
implementation "androidx.preference:preference-ktx:$preferenceVersion"
implementation ("androidx.work:work-runtime-ktx:$workManagerVersion") {
exclude module: 'fragment'
}
@@ -17,11 +17,11 @@
package com.google.android.apps.muzei.featuredart

import android.content.Context
import android.preference.PreferenceManager
import android.text.format.DateUtils
import android.util.Log
import androidx.core.content.edit
import androidx.core.net.toUri
import androidx.preference.PreferenceManager
import androidx.work.Constraints
import androidx.work.CoroutineWorker
import androidx.work.ExistingWorkPolicy
@@ -93,6 +93,7 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion"
implementation "androidx.fragment:fragment-ktx:$fragmentVersion"
implementation "androidx.exifinterface:exifinterface:$exifInterfaceVersion"
implementation "androidx.preference:preference-ktx:$preferenceVersion"
implementation "androidx.wear:wear:$wearVersion"
compileOnly "com.google.android.wearable:wearable:$wearableVersion"
implementation ("com.google.android.support:wearable:$wearableVersion") {
@@ -14,6 +14,8 @@
* limitations under the License.
*/

@file:Suppress("DEPRECATION")

package com.google.android.apps.muzei

import android.app.Activity
@@ -23,13 +25,13 @@ import android.os.Build
import android.os.Bundle
import android.preference.Preference
import android.preference.PreferenceActivity
import android.preference.PreferenceManager
import android.support.wearable.complications.ComplicationData
import android.support.wearable.complications.ComplicationHelperActivity
import android.support.wearable.complications.ComplicationProviderInfo
import android.support.wearable.complications.ProviderChooserIntent
import android.support.wearable.complications.ProviderInfoRetriever
import androidx.core.content.ContextCompat
import androidx.preference.PreferenceManager
import net.nurik.roman.muzei.R
import java.util.concurrent.Executor
import java.util.concurrent.Executors
@@ -33,7 +33,6 @@ import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.os.Message
import android.preference.PreferenceManager
import android.support.wearable.complications.ComplicationData
import android.support.wearable.complications.SystemProviders
import android.support.wearable.complications.rendering.ComplicationDrawable
@@ -52,6 +51,7 @@ import androidx.lifecycle.LifecycleRegistry
import androidx.lifecycle.Observer
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.observe
import androidx.preference.PreferenceManager
import com.google.android.apps.muzei.complications.ArtworkComplicationProviderService
import com.google.android.apps.muzei.datalayer.ActivateMuzeiIntentService
import com.google.android.apps.muzei.featuredart.BuildConfig.FEATURED_ART_AUTHORITY
@@ -19,7 +19,6 @@ package com.google.android.apps.muzei.complications
import android.content.Intent
import android.graphics.drawable.Icon
import android.os.Build
import android.preference.PreferenceManager
import android.support.wearable.complications.ComplicationData
import android.support.wearable.complications.ComplicationManager
import android.support.wearable.complications.ComplicationProviderService
@@ -29,6 +28,7 @@ import androidx.annotation.RequiresApi
import androidx.core.app.TaskStackBuilder
import androidx.core.content.edit
import androidx.core.os.bundleOf
import androidx.preference.PreferenceManager
import com.google.android.apps.muzei.FullScreenActivity
import com.google.android.apps.muzei.ProviderChangedReceiver
import com.google.android.apps.muzei.datalayer.ActivateMuzeiIntentService
@@ -19,10 +19,10 @@ package com.google.android.apps.muzei.complications
import android.content.ComponentName
import android.content.Context
import android.os.Build
import android.preference.PreferenceManager
import android.support.wearable.complications.ProviderUpdateRequester
import android.util.Log
import androidx.annotation.RequiresApi
import androidx.preference.PreferenceManager
import androidx.work.Constraints
import androidx.work.ExistingWorkPolicy
import androidx.work.OneTimeWorkRequestBuilder
@@ -30,14 +30,14 @@ import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.os.ResultReceiver
import android.preference.PreferenceManager
import android.util.Log
import androidx.annotation.RequiresApi
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.core.app.TaskStackBuilder
import androidx.core.content.ContextCompat
import androidx.core.content.edit
import androidx.preference.PreferenceManager
import com.google.android.apps.muzei.ChooseProviderActivity
import com.google.android.apps.muzei.util.toast
import com.google.android.gms.wearable.CapabilityClient

0 comments on commit 7721b3a

Please sign in to comment.
You can’t perform that action at this time.