Skip to content

Commit

Permalink
For mozilla-mobile#3886 - Uses defaultDeviceName for the `DeviceCon…
Browse files Browse the repository at this point in the history
…fig` device name
  • Loading branch information
boek committed Aug 1, 2019
1 parent a75c2f7 commit e4700f7
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit e4700f7

Please sign in to comment.