From e4700f76c6917824731e1d32ef27dc38140276d7 Mon Sep 17 00:00:00 2001 From: Jeff Boek Date: Wed, 31 Jul 2019 21:32:06 -0700 Subject: [PATCH] For #3886 - Uses `defaultDeviceName` for the `DeviceConfig` device name --- .../fenix/components/BackgroundServices.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 71ace54ed..738a57b79 100644 --- a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt +++ b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt @@ -55,9 +55,16 @@ class BackgroundServices( const val REDIRECT_URL = "https://accounts.firefox.com/oauth/success/$CLIENT_ID" } + private val defaultDeviceName = context.getString( + R.string.default_device_name, + context.getString(R.string.app_name), + Build.MANUFACTURER, + Build.MODEL + ) + private val serverConfig = ServerConfig.release(CLIENT_ID, REDIRECT_URL) private val deviceConfig = DeviceConfig( - name = Build.MANUFACTURER + " " + Build.MODEL, + name = defaultDeviceName, type = DeviceType.MOBILE, // NB: flipping this flag back and worth is currently not well supported and may need hand-holding. @@ -112,13 +119,6 @@ class BackgroundServices( } } - private val defaultDeviceName = context.getString( - R.string.default_device_name, - context.getString(R.string.app_name), - Build.MANUFACTURER, - Build.MODEL - ) - /** * When we login/logout of FxA, we need to update our push subscriptions to match the newly * logged in account.