From 8ff77b90f388187e04f6a376702c6a10873ea49e Mon Sep 17 00:00:00 2001 From: bloslo Date: Tue, 30 Jul 2019 19:28:19 +0200 Subject: [PATCH] For #3886 - Change default device name to show the app name. (#3916) * Fix default device name to show the app name. * Add string resource with placeholders. * Wrap line that triggers MaxLineLength lint issue. --- .../org/mozilla/fenix/components/BackgroundServices.kt | 8 +++++++- app/src/main/res/values/strings.xml | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt index b3a750fdc..f7875f981 100644 --- a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt +++ b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt @@ -148,6 +148,13 @@ class BackgroundServices( } } + private val defaultDeviceName = context.getString( + R.string.default_device_name, + context.getString(R.string.app_name), + Build.MANUFACTURER, + Build.MODEL + ) + /** * We add an observer to the AccountManager so that we can control when the Firebase service * will start/stop. This is only needed when landing the push service to ensure Firebase works @@ -161,7 +168,6 @@ class BackgroundServices( */ private val accountObserver = object : AccountObserver { override fun onAuthenticationProblems() {} - override fun onProfileUpdated(profile: Profile) {} override fun onLoggedOut() { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bcf1e0eac..b81aba5bb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -171,6 +171,10 @@ Last synced: %s Last synced: never + + %s on %s %s