зеркало из https://github.com/mozilla/pluotsorbet.git
Merge pull request #633 from PinZhang/pzhang/batterylevel
Add system property com.nokia.mid.batterylevel
This commit is contained in:
Коммит
3bb67efde0
|
@ -20,6 +20,7 @@
|
|||
* midletClassName
|
||||
* network_mcc
|
||||
* network_mnc
|
||||
* platform
|
||||
* profile
|
||||
* pushConn
|
||||
* pushMidlet
|
||||
|
|
|
@ -143,6 +143,10 @@ Native.create("java/lang/System.getProperty0.(Ljava/lang/String;)Ljava/lang/Stri
|
|||
console.warn("Property 'com.nokia.multisim.imsi.sim2' is a stub");
|
||||
value = null;
|
||||
break;
|
||||
case "com.nokia.mid.batterylevel":
|
||||
// http://developer.nokia.com/community/wiki/Checking_battery_level_in_Java_ME
|
||||
value = Math.floor(navigator.battery.level * 100).toString();
|
||||
break;
|
||||
case "com.nokia.mid.imsi":
|
||||
console.warn("Property 'com.nokia.mid.imsi' is a stub");
|
||||
value = "000000000000000";
|
||||
|
|
Загрузка…
Ссылка в новой задаче