Created
September 5, 2022 07:46
-
-
Save Mugurell/5a0cc7662e5a3b679dc01f982fcf4c1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt | |
--- a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt (revision 99759dd728a07bcb4eb619c7b1d76d9f279516e5) | |
+++ b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt (date 1662363996585) | |
@@ -208,10 +208,14 @@ | |
// DO NOT ADD ANYTHING ABOVE THIS getProfilerTime CALL! | |
val profilerStartTime = requireComponents.core.engine.profiler?.getProfilerTime() | |
+ println("Mugurel: onCreateView entered") | |
+ | |
_binding = FragmentHomeBinding.inflate(inflater, container, false) | |
val activity = activity as HomeActivity | |
val components = requireComponents | |
+ println("Mugurel: onCreateView binding inflated") | |
+ | |
currentMode = CurrentMode( | |
requireContext(), | |
onboarding, | |
@@ -388,7 +392,9 @@ | |
FxNimbus.features.homescreen.recordExposure() | |
+ println("Mugurel: onCreateView before displaying wallpaper") | |
displayWallpaperIfEnabled() | |
+ println("Mugurel: onCreateView after displaying wallpaper") | |
binding.root.doOnPreDraw { | |
requireComponents.appStore.dispatch(AppAction.UpdateFirstFrameDrawn(drawn = true)) | |
@@ -397,6 +403,8 @@ | |
requireComponents.core.engine.profiler?.addMarker( | |
MarkersFragmentLifecycleCallbacks.MARKER_NAME, profilerStartTime, "HomeFragment.onCreateView", | |
) | |
+ println("Mugurel: onCreateView finished") | |
+ | |
return binding.root | |
} | |
@@ -723,6 +731,8 @@ | |
} | |
override fun onStart() { | |
+ println("Mugurel: onStart entered") | |
+ | |
super.onStart() | |
subscribeToTabCollections() | |
@@ -793,6 +803,8 @@ | |
) | |
} | |
} | |
+ | |
+ println("Mugurel: onStart finished") | |
} | |
private fun dispatchModeChanges(mode: Mode) { | |
@@ -999,7 +1011,9 @@ | |
// We only want to update the wallpaper when it's different from the default one | |
// as the default is applied already on xml by default. | |
if (wallpaperManger.currentWallpaper != WallpaperManager.defaultWallpaper) { | |
+ println("Mugurel: onCreateView: displayWallpaperIfEnabled: before updateWallpaper") | |
wallpaperManger.updateWallpaper(binding.wallpaperImageView, wallpaperManger.currentWallpaper) | |
+ println("Mugurel: onCreateView: displayWallpaperIfEnabled: after updateWallpaper") | |
} | |
} | |
} | |
@@ -1044,3 +1058,19 @@ | |
internal const val TOAST_ELEVATION = 80f | |
} | |
} | |
+ | |
+ | |
+10:36:58.056: Mugurel: onCreateView entered | |
+10:36:58.132: Mugurel: onCreateView binding inflated | |
+10:36:58.169: Mugurel: onCreateView before displaying wallpaper | |
+10:36:58.169: Mugurel: onCreateView: displayWallpaperIfEnabled: before updateWallpaper | |
+10:36:58.169: Mugurel: updateWallpaper: Firefox(name=amethyst, drawableId=2131230867) | |
+10:36:58.169: Mugurel: updateWallpaper: before loadSavedWallpaper | |
+10:36:58.223: Mugurel: updateWallpaper: after loadSavedWallpaper | |
+10:36:58.223: Mugurel: updateWallpaper: before scaleBitmapToBottom | |
+10:36:58.224: Mugurel: updateWallpaper: after scaleBitmapToBottom | |
+10:36:58.224: Mugurel: onCreateView: displayWallpaperIfEnabled: after updateWallpaper | |
+10:36:58.224: Mugurel: onCreateView after displaying wallpaper | |
+10:36:58.224: Mugurel: onCreateView finished | |
+10:36:58.247: Mugurel: onStart entered | |
+10:36:58.250: Mugurel: onStart finished | |
Index: app/src/main/java/org/mozilla/fenix/wallpapers/WallpaperManager.kt | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
diff --git a/app/src/main/java/org/mozilla/fenix/wallpapers/WallpaperManager.kt b/app/src/main/java/org/mozilla/fenix/wallpapers/WallpaperManager.kt | |
--- a/app/src/main/java/org/mozilla/fenix/wallpapers/WallpaperManager.kt (revision 99759dd728a07bcb4eb619c7b1d76d9f279516e5) | |
+++ b/app/src/main/java/org/mozilla/fenix/wallpapers/WallpaperManager.kt (date 1662359309325) | |
@@ -55,12 +55,15 @@ | |
* Apply the [newWallpaper] into the [wallpaperContainer] and update the [currentWallpaper]. | |
*/ | |
fun updateWallpaper(wallpaperContainer: ImageView, newWallpaper: Wallpaper) { | |
+ println("Mugurel: updateWallpaper: $newWallpaper") | |
val context = wallpaperContainer.context | |
if (newWallpaper == defaultWallpaper) { | |
wallpaperContainer.visibility = View.GONE | |
logger.info("Wallpaper update to default background") | |
} else { | |
+ println("Mugurel: updateWallpaper: before loadSavedWallpaper") | |
val bitmap = loadSavedWallpaper(context, newWallpaper) | |
+ println("Mugurel: updateWallpaper: after loadSavedWallpaper") | |
if (bitmap == null) { | |
val message = "Could not load wallpaper bitmap. Resetting to default." | |
logger.error(message) | |
@@ -69,7 +72,9 @@ | |
return | |
} else { | |
wallpaperContainer.visibility = View.VISIBLE | |
+ println("Mugurel: updateWallpaper: before scaleBitmapToBottom") | |
scaleBitmapToBottom(bitmap, wallpaperContainer) | |
+ println("Mugurel: updateWallpaper: after scaleBitmapToBottom") | |
} | |
} | |
currentWallpaper = newWallpaper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment