зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1180996 - Basic device name on Android. r=margaret
This commit is contained in:
Родитель
037d573caf
Коммит
40c8d39e82
|
@ -183,7 +183,7 @@ LocalDevice.prototype = {
|
||||||
*/
|
*/
|
||||||
_generate: function() {
|
_generate: function() {
|
||||||
if (Services.appinfo.widgetToolkit == "gonk") {
|
if (Services.appinfo.widgetToolkit == "gonk") {
|
||||||
// For Gonk devices, create one from the device name plus a little
|
// For Firefox OS devices, create one from the device name plus a little
|
||||||
// randomness. The goal is just to distinguish devices in an office
|
// randomness. The goal is just to distinguish devices in an office
|
||||||
// environment where many people may have the same device model for
|
// environment where many people may have the same device model for
|
||||||
// testing purposes (which would otherwise all report the same name).
|
// testing purposes (which would otherwise all report the same name).
|
||||||
|
@ -193,6 +193,10 @@ LocalDevice.prototype = {
|
||||||
// To hex and zero pad
|
// To hex and zero pad
|
||||||
randomID = ("00000000" + randomID.toString(16)).slice(-8);
|
randomID = ("00000000" + randomID.toString(16)).slice(-8);
|
||||||
this.name = name + "-" + randomID;
|
this.name = name + "-" + randomID;
|
||||||
|
} else if (Services.appinfo.widgetToolkit == "android") {
|
||||||
|
// For Firefox for Android, use the device's model name.
|
||||||
|
// TODO: Bug 1180997: Find the right way to expose an editable name
|
||||||
|
this.name = sysInfo.get("device");
|
||||||
} else {
|
} else {
|
||||||
this.name = sysInfo.get("host");
|
this.name = sysInfo.get("host");
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче