Permalink
Browse files

Migrate to AndroidX

Initial migration to AndroidX with 1.0.0 Support Library and 2.0.0 Architecture Components versions.
  • Loading branch information...
ianhanniballake committed Dec 5, 2018
1 parent 54c5996 commit 76b7942e639f1dd84797bf5478f10c642b936942
Showing with 453 additions and 451 deletions.
  1. +8 −8 android-client-common/build.gradle
  2. +1 −1 android-client-common/src/main/java/com/google/android/apps/muzei/provider/DirectBootCache.kt
  3. +2 −2 android-client-common/src/main/java/com/google/android/apps/muzei/provider/MuzeiProvider.kt
  4. +1 −1 android-client-common/src/main/java/com/google/android/apps/muzei/render/ImageLoader.kt
  5. +5 −5 android-client-common/src/main/java/com/google/android/apps/muzei/room/Artwork.kt
  6. +4 −4 android-client-common/src/main/java/com/google/android/apps/muzei/room/ArtworkDao.kt
  7. +1 −1 android-client-common/src/main/java/com/google/android/apps/muzei/room/InstalledProvidersLiveData.kt
  8. +6 −8 android-client-common/src/main/java/com/google/android/apps/muzei/room/MuzeiDatabase.kt
  9. +2 −2 android-client-common/src/main/java/com/google/android/apps/muzei/room/Provider.kt
  10. +6 −6 android-client-common/src/main/java/com/google/android/apps/muzei/room/ProviderDao.kt
  11. +4 −4 android-client-common/src/main/java/com/google/android/apps/muzei/room/Source.kt
  12. +7 −7 android-client-common/src/main/java/com/google/android/apps/muzei/room/SourceDao.kt
  13. +1 −1 ...t-common/src/main/java/com/google/android/apps/muzei/room/converter/ComponentNameTypeConverter.kt
  14. +1 −1 ...oid-client-common/src/main/java/com/google/android/apps/muzei/room/converter/DateTypeConverter.kt
  15. +1 −1 android-client-common/src/main/java/com/google/android/apps/muzei/room/converter/UriTypeConverter.kt
  16. +1 −1 ...ent-common/src/main/java/com/google/android/apps/muzei/room/converter/UserCommandTypeConverter.kt
  17. +2 −2 android-client-common/src/main/java/com/google/android/apps/muzei/sync/ProviderChangedWorker.kt
  18. +2 −2 android-client-common/src/main/java/com/google/android/apps/muzei/sync/ProviderManager.kt
  19. +7 −7 build.gradle
  20. +2 −2 example-watchface/build.gradle
  21. +1 −1 example-watchface/src/main/java/com/example/muzei/watchface/ArtworkImageLoader.kt
  22. +5 −5 example-watchface/src/main/java/com/example/muzei/watchface/MuzeiExampleWatchface.kt
  23. +3 −3 extensions/build.gradle
  24. +1 −1 extensions/src/main/java/com/google/android/apps/muzei/util/ContextExt.kt
  25. +3 −3 extensions/src/main/java/com/google/android/apps/muzei/util/LiveDataExt.kt
  26. +3 −3 extensions/src/main/java/com/google/android/apps/muzei/util/LivecycleJob.kt
  27. +2 −2 extensions/src/main/java/com/google/android/apps/muzei/util/ScopedAndroidViewModel.kt
  28. +2 −0 gradle.properties
  29. +13 −13 main/build.gradle
  30. +1 −1 main/src/main/AndroidManifest.xml
  31. +9 −9 main/src/main/java/com/google/android/apps/muzei/ArtDetailFragment.kt
  32. +1 −1 main/src/main/java/com/google/android/apps/muzei/ArtDetailViewport.kt
  33. +1 −1 main/src/main/java/com/google/android/apps/muzei/ArtworkInfoRedirectActivity.kt
  34. +1 −1 main/src/main/java/com/google/android/apps/muzei/AutoAdvanceSettingsFragment.kt
  35. +10 −10 main/src/main/java/com/google/android/apps/muzei/ChooseProviderFragment.kt
  36. +3 −3 main/src/main/java/com/google/android/apps/muzei/ChooseProviderViewModel.kt
  37. +1 −3 main/src/main/java/com/google/android/apps/muzei/IntroFragment.kt
  38. +3 −3 main/src/main/java/com/google/android/apps/muzei/MainFragment.kt
  39. +4 −4 main/src/main/java/com/google/android/apps/muzei/MissingResourcesDialogFragment.kt
  40. +7 −7 main/src/main/java/com/google/android/apps/muzei/MuzeiActivity.kt
  41. +7 −7 main/src/main/java/com/google/android/apps/muzei/MuzeiWallpaperService.kt
  42. +1 −1 main/src/main/java/com/google/android/apps/muzei/PhotoSetAsTargetActivity.kt
  43. +3 −3 main/src/main/java/com/google/android/apps/muzei/TutorialFragment.kt
  44. +9 −9 main/src/main/java/com/google/android/apps/muzei/browse/BrowseProviderFragment.kt
  45. +3 −3 main/src/main/java/com/google/android/apps/muzei/browse/BrowseProviderViewModel.kt
  46. +5 −5 main/src/main/java/com/google/android/apps/muzei/notifications/NewWallpaperNotificationReceiver.kt
  47. +3 −3 main/src/main/java/com/google/android/apps/muzei/notifications/NotificationSettingsDialogFragment.kt
  48. +2 −2 main/src/main/java/com/google/android/apps/muzei/notifications/NotificationUpdater.kt
  49. +5 −5 main/src/main/java/com/google/android/apps/muzei/quicksettings/NextArtworkTileService.kt
  50. +1 −1 main/src/main/java/com/google/android/apps/muzei/render/DemoRenderController.kt
  51. +2 −2 main/src/main/java/com/google/android/apps/muzei/render/MuzeiBlurRenderer.kt
  52. +1 −1 main/src/main/java/com/google/android/apps/muzei/render/MuzeiRendererFragment.kt
  53. +1 −1 main/src/main/java/com/google/android/apps/muzei/render/RealRenderController.kt
  54. +2 −2 main/src/main/java/com/google/android/apps/muzei/render/RenderController.kt
  55. +5 −5 main/src/main/java/com/google/android/apps/muzei/settings/AboutActivity.kt
  56. +8 −8 main/src/main/java/com/google/android/apps/muzei/settings/EffectsFragment.kt
  57. +1 −1 main/src/main/java/com/google/android/apps/muzei/settings/EffectsScreenFragment.kt
  58. +5 −5 main/src/main/java/com/google/android/apps/muzei/settings/GesturesFragment.kt
  59. +2 −2 main/src/main/java/com/google/android/apps/muzei/settings/Prefs.kt
  60. +1 −1 main/src/main/java/com/google/android/apps/muzei/settings/SettingsActivity.kt
  61. +3 −3 main/src/main/java/com/google/android/apps/muzei/shortcuts/ArtworkInfoShortcutController.kt
  62. +2 −2 main/src/main/java/com/google/android/apps/muzei/sources/NetworkChangeObserver.kt
  63. +1 −1 main/src/main/java/com/google/android/apps/muzei/sources/OkHttpClientFactory.java
  64. +5 −5 main/src/main/java/com/google/android/apps/muzei/sources/SourceManager.kt
  65. +4 −4 main/src/main/java/com/google/android/apps/muzei/sources/SourceSettingsActivity.kt
  66. +4 −4 main/src/main/java/com/google/android/apps/muzei/sources/SourceSetupActivity.kt
  67. +3 −3 main/src/main/java/com/google/android/apps/muzei/tasker/TaskerSettingActivity.kt
  68. +4 −4 main/src/main/java/com/google/android/apps/muzei/tasker/TaskerSettingViewModel.kt
  69. +1 −1 main/src/main/java/com/google/android/apps/muzei/util/AnimatedMuzeiLogoFragment.kt
  70. +1 −1 main/src/main/java/com/google/android/apps/muzei/util/PanScaleProxyView.kt
  71. +3 −3 main/src/main/java/com/google/android/apps/muzei/wallpaper/LockscreenObserver.kt
  72. +3 −3 main/src/main/java/com/google/android/apps/muzei/wallpaper/WallpaperAnalytics.kt
  73. +2 −2 main/src/main/java/com/google/android/apps/muzei/wearable/WearableController.kt
  74. +2 −2 main/src/main/java/com/google/android/apps/muzei/widget/AppWidgetUpdateTask.kt
  75. +2 −2 main/src/main/java/com/google/android/apps/muzei/widget/WidgetUpdater.kt
  76. +1 −1 main/src/main/res/layout-sw600dp/about_activity.xml
  77. +1 −1 main/src/main/res/layout-v21/main_fragment.xml
  78. +1 −1 main/src/main/res/layout/about_activity.xml
  79. +1 −1 main/src/main/res/layout/art_detail_fragment.xml
  80. +2 −2 main/src/main/res/layout/auto_advance_settings_fragment.xml
  81. +7 −7 main/src/main/res/layout/browse_provider_fragment.xml
  82. +2 −2 main/src/main/res/layout/browse_provider_item.xml
  83. +9 −9 main/src/main/res/layout/choose_provider_fragment.xml
  84. +5 −5 main/src/main/res/layout/choose_provider_item.xml
  85. +3 −3 main/src/main/res/layout/effects_fragment.xml
  86. +3 −3 main/src/main/res/layout/effects_screen_fragment_include_content.xml
  87. +9 −9 main/src/main/res/layout/gestures_fragment.xml
  88. +1 −1 main/src/main/res/layout/main_fragment.xml
  89. +1 −1 muzei-api/build.gradle
  90. +2 −1 muzei-api/src/main/java/com/google/android/apps/muzei/api/Artwork.java
  91. +5 −4 muzei-api/src/main/java/com/google/android/apps/muzei/api/MuzeiArtSource.java
  92. +5 −4 muzei-api/src/main/java/com/google/android/apps/muzei/api/MuzeiContract.java
  93. +4 −3 muzei-api/src/main/java/com/google/android/apps/muzei/api/RemoteMuzeiArtSource.java
  94. +2 −1 muzei-api/src/main/java/com/google/android/apps/muzei/api/UserCommand.java
  95. +2 −1 muzei-api/src/main/java/com/google/android/apps/muzei/api/internal/RecentArtworkIdsConverter.java
  96. +3 −2 muzei-api/src/main/java/com/google/android/apps/muzei/api/provider/Artwork.java
  97. +5 −4 muzei-api/src/main/java/com/google/android/apps/muzei/api/provider/MuzeiArtProvider.java
  98. +3 −2 muzei-api/src/main/java/com/google/android/apps/muzei/api/provider/ProviderClient.java
  99. +4 −3 muzei-api/src/main/java/com/google/android/apps/muzei/api/provider/ProviderContract.java
  100. +1 −1 source-featured-art/build.gradle
  101. +2 −2 source-featured-art/src/main/java/com/google/android/apps/muzei/featuredart/FeaturedArtProvider.kt
  102. +10 −10 source-gallery/build.gradle
  103. +5 −5 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/ChosenPhoto.kt
  104. +7 −7 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/ChosenPhotoDao.kt
  105. +3 −3 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/GalleryAddPhotosActivity.kt
  106. +5 −5 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/GalleryDatabase.kt
  107. +1 −1 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/GalleryEmptyStateGraphicView.kt
  108. +6 −6 ...-gallery/src/main/java/com/google/android/apps/muzei/gallery/GalleryImportPhotosDialogFragment.kt
  109. +3 −3 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/GalleryScanWorker.kt
  110. +16 −16 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/GallerySettingsActivity.kt
  111. +5 −5 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/GallerySettingsViewModel.kt
  112. +3 −3 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/GallerySetupActivity.kt
  113. +5 −7 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/Metadata.kt
  114. +5 −6 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/MetadataDao.kt
  115. +1 −1 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/converter/DateTypeConverter.kt
  116. +1 −1 source-gallery/src/main/java/com/google/android/apps/muzei/gallery/converter/UriTypeConverter.kt
  117. +8 −8 source-gallery/src/main/res/layout/gallery_activity.xml
  118. +2 −2 source-gallery/src/main/res/layout/gallery_chosen_photo_item.xml
  119. +1 −1 source-single/build.gradle
  120. +3 −6 wearable/build.gradle
  121. +7 −7 wearable/src/main/java/com/google/android/apps/muzei/ChooseProviderActivity.kt
  122. +2 −2 wearable/src/main/java/com/google/android/apps/muzei/ChooseProviderViewModel.kt
  123. +1 −1 wearable/src/main/java/com/google/android/apps/muzei/ConfigActivity.kt
  124. +2 −2 wearable/src/main/java/com/google/android/apps/muzei/FullScreenActivity.kt
  125. +6 −6 wearable/src/main/java/com/google/android/apps/muzei/MuzeiActivity.kt
  126. +5 −5 wearable/src/main/java/com/google/android/apps/muzei/MuzeiWatchFace.kt
  127. +2 −2 ...e/src/main/java/com/google/android/apps/muzei/complications/ArtworkComplicationProviderService.kt
  128. +1 −1 wearable/src/main/java/com/google/android/apps/muzei/complications/ArtworkComplicationWorker.kt
  129. +4 −4 wearable/src/main/java/com/google/android/apps/muzei/datalayer/ActivateMuzeiIntentService.kt
  130. +1 −1 wearable/src/main/java/com/google/android/apps/muzei/util/PanView.kt
  131. +1 −1 wearable/src/main/res/layout/choose_provider_activity.xml
  132. +2 −2 wearable/src/main/res/layout/muzei_activity.xml
@@ -25,15 +25,15 @@ dependencies {
implementation "androidx.core:core-ktx:$rootProject.ext.ktxVersion"
implementation project(':muzei-api')
implementation project(':extensions')
implementation "com.android.support:support-compat:$supportLibraryVersion"
implementation "com.android.support:exifinterface:$supportLibraryVersion"
api "android.arch.lifecycle:livedata:$lifecycleVersion"
kapt "android.arch.lifecycle:compiler:$lifecycleVersion"
implementation "androidx.core:core:$supportLibraryVersion"
implementation "androidx.exifinterface:exifinterface:$supportLibraryVersion"
api "androidx.lifecycle:lifecycle-livedata:$lifecycleVersion"
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycleVersion"
implementation "android.arch.work:work-runtime-ktx:$workManagerVersion"
implementation "com.android.support:support-core-ui:$supportLibraryVersion"
implementation "com.android.support:support-fragment:$supportLibraryVersion"
api "android.arch.persistence.room:runtime:$roomVersion"
kapt "android.arch.persistence.room:compiler:$roomVersion"
implementation "androidx.legacy:legacy-support-core-ui:$supportLibraryVersion"
implementation "androidx.fragment:fragment:$supportLibraryVersion"
api "androidx.room:room-runtime:$roomVersion"
kapt "androidx.room:room-compiler:$roomVersion"
api("com.google.firebase:firebase-core:$firebaseCoreVersion") {
exclude module: 'support-v4'
}
@@ -18,8 +18,8 @@ package com.google.android.apps.muzei.provider

import android.content.Context
import android.os.Build
import android.support.v4.content.ContextCompat
import android.util.Log
import androidx.core.content.ContextCompat
import com.google.android.apps.muzei.api.MuzeiContract
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.Job
@@ -16,7 +16,6 @@

package com.google.android.apps.muzei.provider

import android.arch.persistence.db.SupportSQLiteQueryBuilder
import android.content.ContentProvider
import android.content.ContentUris
import android.content.ContentValues
@@ -28,8 +27,9 @@ import android.net.Uri
import android.os.Binder
import android.os.ParcelFileDescriptor
import android.provider.BaseColumns
import android.support.v4.os.UserManagerCompat
import android.util.Log
import androidx.core.os.UserManagerCompat
import androidx.sqlite.db.SupportSQLiteQueryBuilder
import com.google.android.apps.muzei.api.MuzeiContract
import com.google.android.apps.muzei.room.MuzeiDatabase
import com.google.android.apps.muzei.sync.ProviderManager
@@ -23,8 +23,8 @@ import android.graphics.BitmapFactory
import android.graphics.Matrix
import android.net.Uri
import android.os.Build
import android.support.media.ExifInterface
import android.util.Log
import androidx.exifinterface.media.ExifInterface
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import net.nurik.roman.muzei.androidclientcommon.BuildConfig
@@ -16,15 +16,15 @@

package com.google.android.apps.muzei.room

import android.arch.persistence.room.ColumnInfo
import android.arch.persistence.room.Entity
import android.arch.persistence.room.Index
import android.arch.persistence.room.PrimaryKey
import android.arch.persistence.room.TypeConverters
import android.content.ContentResolver
import android.content.ContentUris
import android.net.Uri
import android.provider.BaseColumns
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import com.google.android.apps.muzei.api.MuzeiContract
import com.google.android.apps.muzei.room.converter.DateTypeConverter
import com.google.android.apps.muzei.room.converter.UriTypeConverter
@@ -16,10 +16,10 @@

package com.google.android.apps.muzei.room

import android.arch.lifecycle.LiveData
import android.arch.persistence.room.Dao
import android.arch.persistence.room.Insert
import android.arch.persistence.room.Query
import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

@@ -16,14 +16,14 @@

package com.google.android.apps.muzei.room

import android.arch.lifecycle.MutableLiveData
import android.content.BroadcastReceiver
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.content.pm.PackageManager
import android.content.pm.ProviderInfo
import androidx.lifecycle.MutableLiveData
import com.google.android.apps.muzei.api.provider.MuzeiArtProvider
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.asCoroutineDispatcher
@@ -16,23 +16,21 @@

package com.google.android.apps.muzei.room

import android.arch.persistence.db.SupportSQLiteDatabase
import android.arch.persistence.room.Database
import android.arch.persistence.room.InvalidationTracker
import android.arch.persistence.room.Room
import android.arch.persistence.room.RoomDatabase
import android.arch.persistence.room.migration.Migration
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.database.sqlite.SQLiteConstraintException
import androidx.room.Database
import androidx.room.InvalidationTracker
import androidx.room.Room
import androidx.room.RoomDatabase
import androidx.room.migration.Migration
import androidx.sqlite.db.SupportSQLiteDatabase
import com.google.android.apps.muzei.api.MuzeiContract
import com.google.android.apps.muzei.provider.DirectBootCache
import java.io.File



/**
* Room Database for Muzei
*/
@@ -16,8 +16,8 @@

package com.google.android.apps.muzei.room

import android.arch.persistence.room.Entity
import android.arch.persistence.room.PrimaryKey
import androidx.room.Entity
import androidx.room.PrimaryKey

/**
* Provider information's representation in Room
@@ -16,12 +16,12 @@

package com.google.android.apps.muzei.room

import android.arch.lifecycle.LiveData
import android.arch.persistence.room.Dao
import android.arch.persistence.room.Delete
import android.arch.persistence.room.Insert
import android.arch.persistence.room.Query
import android.arch.persistence.room.Update
import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

@@ -16,11 +16,11 @@

package com.google.android.apps.muzei.room

import android.arch.persistence.room.ColumnInfo
import android.arch.persistence.room.Entity
import android.arch.persistence.room.PrimaryKey
import android.arch.persistence.room.TypeConverters
import android.content.ComponentName
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import com.google.android.apps.muzei.api.UserCommand
import com.google.android.apps.muzei.room.converter.ComponentNameTypeConverter
import com.google.android.apps.muzei.room.converter.UserCommandTypeConverter
@@ -16,14 +16,14 @@

package com.google.android.apps.muzei.room

import android.arch.lifecycle.LiveData
import android.arch.persistence.room.Dao
import android.arch.persistence.room.Delete
import android.arch.persistence.room.Insert
import android.arch.persistence.room.Query
import android.arch.persistence.room.TypeConverters
import android.arch.persistence.room.Update
import android.content.ComponentName
import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.TypeConverters
import androidx.room.Update
import com.google.android.apps.muzei.room.converter.ComponentNameTypeConverter
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
@@ -16,8 +16,8 @@

package com.google.android.apps.muzei.room.converter

import android.arch.persistence.room.TypeConverter
import android.content.ComponentName
import androidx.room.TypeConverter

/**
* Converts a [ComponentName] into and from a persisted value
@@ -16,7 +16,7 @@

package com.google.android.apps.muzei.room.converter

import android.arch.persistence.room.TypeConverter
import androidx.room.TypeConverter
import java.util.Date

/**
@@ -16,9 +16,9 @@

package com.google.android.apps.muzei.room.converter

import android.arch.persistence.room.TypeConverter
import android.net.Uri
import androidx.core.net.toUri
import androidx.room.TypeConverter

/**
* Converts a [Uri] into and from a persisted value
@@ -16,8 +16,8 @@

package com.google.android.apps.muzei.room.converter

import android.arch.persistence.room.TypeConverter
import android.util.Log
import androidx.room.TypeConverter
import com.google.android.apps.muzei.api.UserCommand
import org.json.JSONArray
import org.json.JSONException
@@ -16,17 +16,17 @@

package com.google.android.apps.muzei.sync

import android.arch.lifecycle.Observer
import android.content.ContentUris
import android.content.Context
import android.database.Cursor
import android.net.Uri
import android.os.Build
import android.preference.PreferenceManager
import android.support.annotation.RequiresApi
import android.util.Log
import androidx.annotation.RequiresApi
import androidx.core.content.edit
import androidx.core.net.toUri
import androidx.lifecycle.Observer
import androidx.work.Constraints
import androidx.work.CoroutineWorker
import androidx.work.ExistingWorkPolicy
@@ -17,8 +17,6 @@
package com.google.android.apps.muzei.sync

import android.annotation.SuppressLint
import android.arch.lifecycle.MutableLiveData
import android.arch.lifecycle.Observer
import android.content.BroadcastReceiver
import android.content.ContentResolver
import android.content.Context
@@ -34,6 +32,8 @@ 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 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
@@ -21,13 +21,13 @@ buildscript {

kotlinVersion = "1.3.0"
coroutinesVersion = "1.0.0"
ktxVersion = "0.3"
multidexVersion = "1.0.3"
supportLibraryVersion = "28.0.0"
constraintLayoutVersion = "1.1.3"
lifecycleVersion = "1.1.1"
roomVersion = "1.1.1"
pagingVersion = "1.0.1"
ktxVersion = "1.0.1"
multidexVersion = "2.0.0"
supportLibraryVersion = "1.0.0"
constraintLayoutVersion = "2.0.0-alpha2"
lifecycleVersion = "2.0.0"
roomVersion = "2.0.0"
pagingVersion = "2.0.0"
navigationVersion = "1.0.0-alpha07"
workManagerVersion = "1.0.0-alpha11"
playServicesWearableVersion = "16.0.1"
@@ -19,8 +19,8 @@ apply plugin: 'kotlin-android'

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation "android.arch.lifecycle:runtime:$lifecycleVersion"
implementation "android.arch.lifecycle:livedata:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata:$lifecycleVersion"
compileOnly "com.google.android.wearable:wearable:$wearableVersion"
implementation "com.google.android.support:wearable:$wearableVersion"
//implementation "com.google.android.apps.muzei:muzei-api:+"
@@ -17,12 +17,12 @@
package com.example.muzei.watchface

import android.annotation.SuppressLint
import android.arch.lifecycle.MutableLiveData
import android.content.Context
import android.database.ContentObserver
import android.graphics.Bitmap
import android.util.Log
import android.util.Size
import androidx.lifecycle.MutableLiveData
import com.google.android.apps.muzei.api.MuzeiContract
import java.io.FileNotFoundException
import java.util.concurrent.ExecutorService
@@ -16,16 +16,11 @@

package com.example.muzei.watchface

import android.arch.lifecycle.Lifecycle
import android.arch.lifecycle.LifecycleOwner
import android.arch.lifecycle.LifecycleRegistry
import android.arch.lifecycle.Observer
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Rect
import android.os.Bundle
import android.support.v4.content.ContextCompat
import android.support.wearable.complications.ComplicationData
import android.support.wearable.complications.SystemProviders
import android.support.wearable.complications.rendering.ComplicationDrawable
@@ -34,6 +29,11 @@ import android.support.wearable.watchface.WatchFaceStyle
import android.util.Size
import android.view.Gravity
import android.view.SurfaceHolder
import androidx.core.content.ContextCompat
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.LifecycleRegistry
import androidx.lifecycle.Observer

/**
* Simple watchface example which loads and displays Muzei images as the background
@@ -21,9 +21,9 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
implementation "android.arch.lifecycle:common-java8:$lifecycleVersion"
api "android.arch.lifecycle:livedata-core:$lifecycleVersion"
api "android.arch.lifecycle:viewmodel:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
api "androidx.lifecycle:lifecycle-livedata-core:$lifecycleVersion"
api "androidx.lifecycle:lifecycle-viewmodel:$lifecycleVersion"
}

android {
@@ -17,8 +17,8 @@
package com.google.android.apps.muzei.util

import android.content.Context
import android.support.annotation.StringRes
import android.widget.Toast
import androidx.annotation.StringRes
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
Oops, something went wrong.

0 comments on commit 76b7942

Please sign in to comment.