2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/3886 - Uses defaultDeviceName for the DeviceConfig device name

This commit is contained in:
Jeff Boek 2019-07-31 21:32:06 -07:00
parent 4019019ea3
commit 32143301ef

View File

@ -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.