From 40c8d39e82a0add92306b83b1ed1b4f15eb43cc2 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 6 Jul 2015 21:46:59 -0500 Subject: [PATCH] Bug 1180996 - Basic device name on Android. r=margaret --- toolkit/devtools/discovery/discovery.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/toolkit/devtools/discovery/discovery.js b/toolkit/devtools/discovery/discovery.js index 851af05227ab..732d0e45a449 100644 --- a/toolkit/devtools/discovery/discovery.js +++ b/toolkit/devtools/discovery/discovery.js @@ -183,7 +183,7 @@ LocalDevice.prototype = { */ _generate: function() { 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 // environment where many people may have the same device model for // testing purposes (which would otherwise all report the same name). @@ -193,6 +193,10 @@ LocalDevice.prototype = { // To hex and zero pad randomID = ("00000000" + randomID.toString(16)).slice(-8); 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 { this.name = sysInfo.get("host"); }