Commit Graph

139 Commits

Author SHA1 Message Date
Gene Lian
49f7f7432c Bug 801096 - [settings] Set-Automatically for time should take effect *immediately* instead of waiting on next NITZ coming (part 1). r=jlebar 2012-10-23 15:15:43 +08:00
Shih-Chiang Chien
1942917947 Bug 790393 - Add MozPower.factoryReset() for factory reset. r=cjones, r=vingtetun, sr=sicking 2012-10-04 17:28:34 +08:00
Andreas Gal
deb7e01143 Bug 800533 - Don't handle magnetic field sensor, r=mwu 2012-10-16 01:11:06 -04:00
Vincent Chang
a0129fa495 Bug 793558 - Time API: changes does not persist after a restart. r=mwu 2012-09-28 14:38:50 +08:00
foudfou
62d7406c52 Bug 785542 - Convert usages of PR_MIN and PR_MAX to NS_MIN and NS_MAX; r=ehsan
Occurences of PR_MAX in layout/style/nsCSSProps.cpp and xpcom/glue/nsTArray.h
can not be converted without C++11 support (constexpr).

--HG--
extra : rebase_source : 3b4f7e26690fad487dd11594449948411d4e79bc
2012-09-27 23:44:47 +02:00
Michael Wu
d8733cbdcf Bug 793809 - Take FM radio initialization off main thread, r=jlebar 2012-09-26 15:35:40 -04:00
Thomas Zimmermann
318aaffea1 Bug 794051 - Read battery status via fgets. r=dhylands
The call to fscanf for reading the battery status used an incorrect pointer in its
arguments. The code only worked because the first byte of a character array is the
first element within the array. To fix this problem, fscanf has been replaced by
fgets, which is less error prone and checks the length of the supplied array.

Additionaly, we don't want to operate on an undefined result if fgets fails. In
this case we assume that the battery is not being charged.
2012-09-26 08:45:06 -07:00
Gene Lian
aa922bc172 Bug 794127 - hal::AdjustSystemClock should take a 64-bit value. r=cjones 2012-09-26 11:51:29 +08:00
Marco Chen
ed5da86f7b Bug 791329 - Let GonkSwitch to know the status about headset or headphone from uevent. r=dhylands 2012-09-25 19:03:13 +08:00
Steven Lee
bfafbca8ed Bug 792443 - hal::RegisterSystemTimeChangeObserver should register the observer through sandbox, r=jlebar 2012-09-23 13:00:32 -04:00
Steven Lee
928a3692d4 Bug 749053 - FM radio support: hal implementation, r=jlebar
Hal interface by Steven Lee (slee), gonk backend by Michael Wu (mwu).
2012-09-19 11:17:13 -04:00
Dave Hylands
32e1c93e8f Bug 792682 - GonkHal vibrator code incorrectly uses a weak reference. r=qDot 2012-09-19 23:34:07 -07:00
Dave Hylands
98d4ca9914 Bug 792529 - ASSERTION: VibratorRunnable not thread-safe. r=qDot 2012-09-19 13:55:10 -07:00
Ehsan Akhgari
a51e1f674c Backout bug 792109, bug 749053 and bug 779500 because of leaks in debug tests 2012-09-19 15:42:18 -04:00
Steven Lee
1566e37586 Bug 749053 - FM radio support: hal implementation, r=jlebar
Hal interface by Steven Lee (slee), gonk backend by Michael Wu (mwu).
2012-09-19 11:17:13 -04:00
Marco Chen
505c41dc8c Bug 788118 - Non-continuous type of sensor blocked thread on polling so the action of switching sensor can't be done on blocked thread. r=mwu
1. Moving switching sensor from thread to main thread.
2. Moving the control of sensor hw module from SensorDevice to GonkSensor.
   Avoid the 5 seconds from Binder IPC timeout for geting Android Battery Service.
2012-09-18 10:51:35 +08:00
Thomas Zimmermann
4c6d7cd938 Bug 785171 - Support OOM adjustment via /proc/<pid>/oom_score_adj. r=dhylands
The interface /proc/<pid>/oom_score_adj has been added as a replacement for /proc/<pid>/oom_adj. It
is now supported and used by default within Gonk. If oom_scrore_adj is not available, the code falls
back to the old interface.
2012-09-14 11:52:07 -07:00
Thomas Zimmermann
9ccf6066a4 Bug 785171 - Clamp OOM adjustment settings to valid range. r=dhylands
The supported OOM adjustment is between -1000 to 1000. If the user specifies a value outside
this range, we clamp it and output a warning.
2012-09-14 11:52:07 -07:00
Thomas Zimmermann
1f17381b82 Bug 785171 - Adopt semantics of /proc/<pid>/oom_score_adjust in preferences. r=dhylands
The preference settings

  hal.processPriorityManager.gonk.backgroundOomAdjust,
  hal.processPriorityManager.gonk.foregroundOomAdjust, and
  hal.processPriorityManager.gonk.masterOomAdjust

have been replaced by

  hal.processPriorityManager.gonk.backgroundOomScoreAdjust,
  hal.processPriorityManager.gonk.foregroundOomScoreAdjust, and
  hal.processPriorityManager.gonk.masterOomScoreAdjust.

The new settings adopt the semantics of /proc/<pid>/oom_score_adj and the default
values have been changed accordingly. The interface to the OOM killer interface is
still /proc/<pid>/oom_adj, and its input values are computed from the settings.
2012-09-14 11:52:07 -07:00
Thomas Zimmermann
0efe0ea895 Bug 785171 - Return success from WriteToFile. r=dhylands
For supporting multiple files in the OOM adjustment, we need to know if a file
has been successfully written to. in this case WriteToFile now returns 'true',
otherwise it returns 'false'.
2012-09-14 11:52:07 -07:00
Thomas Zimmermann
64595e0ccc Bug 785171 - Whitespace cleanups. r=dhylands 2012-09-14 11:52:07 -07:00
Steven Lee
b50ad6db3a Bug 714358 System time change implementation, r=mounir 2012-09-11 02:40:00 -04:00
Gene Lian
468c7c6ef3 Bug 783021 - System time: listen to timezone settings changes and update system timezone (part 1). r=cjones 2012-08-23 17:00:00 +08:00
Marco Chen
bd85c6f806 Bug 773792: Remove unused field SensorStatus::data and make SensorStatus::count as a array of int[] for fixing an instance of creating/desctroying XPCOM objects from a static constructor/deconstructor. r=jlebar 2012-09-04 17:56:20 +08:00
Marshall Culpepper
3f62d234fe Bug 784728: Make Gonk's battery observer a RefPtr, fixing an abort on process exit in debug builds. r=jlebar 2012-08-29 12:32:56 -03:00
Chris Jones
262988ed07 Bug 786573: The XPCOM thread manager can't shut down the sensor thread, so use one of our other various thread types for the sensor thread. r=bent
--HG--
extra : rebase_source : 07b0fc9ccd710601948c1cd10098fa2b8c681932
2012-08-29 12:26:18 -03:00
Ehsan Akhgari
8c296bbcd4 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Phil Ringnalda
2400fbd6d1 Backout 5439489dc320, 983f76488e59, 7a92558a8dec (Bug 714358) for debug build assertions and leaks 2012-08-07 22:18:27 -07:00
Steven Lee
ab3e1cc85d Bug 714358: System time change implementation, r=mounir 2012-08-07 19:20:00 -04:00
Justin Lebar
20266d6b15 Bug 768832 - Set OOM adjust for background windows. r=bz,cjones 2012-08-05 01:09:39 -04:00
Steven Lee
6668c8e910 Bug 745078 Get switch device states at any time, r=dhylands 2012-08-01 07:58:58 -07:00
Gene Lian
cd33639a03 Bug 776785 - Alarm API - hal::SetAlarm takes |long|s, but should instead take PRInt32s. r=jlebar 2012-07-31 10:52:57 +08:00
Aryeh Gregor
57c0ad57fb Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Jeff Muizelaar
6dca3de931 Bug 777381. Use SIGUSR1 instead of SIGUSR2 to avoid interferring with profiling. r=cjones
SIGUSR2 was originally chosen to avoid interferering with dalvik. We don't need
to avoid that on B2G.

--HG--
extra : rebase_source : 99098a28daee28933f379cfa520a433c44d5465d
2012-07-26 12:15:26 -04:00
Gervase Markham
69110ab2b1 Bug 774614 - Relicense Gonk/Gecko interface code to Apache License 2.0. 2012-07-20 10:10:44 +01:00
Gene Lian
6c4a2306fe Bug 749551 - Alarm API (Hal/Gonk). r=cjones 2012-07-06 12:42:10 +02:00
Ed Morley
2a1d58cfe5 Backout 1dba66cfad9a, ed768b821da1, 23fd9a8d0c9a, 1e90805d96aa, 07425f0e921e (bug 749551) for M3 failures 2012-07-03 11:23:54 +01:00
Gene Lian
8bd1d9451c Bug 749551 - Alarm API (Hal/Gonk). r=cjones 2012-07-03 11:24:13 +02:00
Cervantes Yu
bfa936860d Bug 764773: Fix memory leak in UeventPoller. r=cjones 2012-06-18 12:13:30 +02:00
Ryan VanderMeulen
b74e4a29db Revert c39d36167b99 due to a horribly munged backout. 2012-06-10 19:44:50 -04:00
Ryan VanderMeulen
061d4c2616 Backout the bug 754202 backout due to orange. 2012-06-10 19:37:47 -04:00
Steven Lee
f87cdd3b31 Bug 761796 Fixed the assertion failure. r=mwu 2012-06-07 10:00:26 -07:00
Ms2ger
2d6f04146c Merge m-c to m-i. 2012-05-25 11:15:32 +02:00
Ms2ger
cd52b67ce6 Bug 712910 - Use stdint types in HAL; r=cjones 2012-05-25 09:18:30 +02:00
Cervantes Yu
bd6bfa30f7 Bug 758096: don't use NS_INLINE_DECL_REFCOUNTING() for classes to be passed between threads. r=mwu 2012-05-24 17:09:05 +08:00
Cervantes Yu
ddd21ace5a Bug 758097: fix false warnings in debug build when reading switch uevent. r=mwu 2012-05-25 15:56:03 +08:00
Dave Hylands
7cbc07a2bb Bug 737153 - Enable mounting storage through USB from a host machine - Add the AutoMounter, sr=cjones r=qDot 2012-05-24 21:03:34 -07:00
Michael Wu
fb6913bd3f Bug 755142 - Use ssize_t to store length of the sensor list, patch by an anonymous silicon vendor contributor, r=mwu 2012-05-16 14:52:00 -04:00
Michael Wu
4d5c363c02 Bug 753521 - Use libhardware_legacy to turn off screen, r=jlebar 2012-05-09 14:30:22 -07:00
Etienne Segonzac
6af99b97a0 Bug 752683 - Always broadcasting the sensor events. r=dougt 2012-05-09 13:35:14 -07:00
Cervantes Yu
9e34e52e44 Bug 743638: Implement orientation API backend in gonk. r=mwu 2012-04-20 19:43:25 +08:00
Chris Jones
03cf24ab29 Bug 745145, part 2: Implement the ScreenConfiguration hal for gonk. r=mounir 2012-05-08 14:36:07 -07:00
Steven Lee
54757fadc3 Bug 751423 - Wait for IO thread to finish setup. r=cjones 2012-05-04 15:16:27 +08:00
Doug Turner
9eaa2d7486 Bug 738465 - implement device light sensor. r=smaug 2012-05-02 09:43:45 -07:00
Doug Turner
f158836867 Bug 738131 - implement device proximity. r=smaug
* * *
Bug 738131 - implement device proximity. gonk implementation. r=mwu
2012-05-02 09:43:45 -07:00
Mounir Lamouri
a51ab096d6 Bug 749645 - Use fallback files in hal/ when a backend isn't implemneted instead of having randomly defined methods. r=cjones
--HG--
rename : hal/fallback/ScreenOrientationFallback.cpp => hal/fallback/FallbackScreenOrientation.cpp
rename : hal/linux/Power.cpp => hal/linux/LinuxPower.cpp
2012-05-03 12:05:32 +02:00
Steven Lee
aac1e868e2 Bug 736939 - Audio routing support. r=cjones, a=b2g-only 2012-04-22 14:09:22 -04:00
Kyle Machulis
8d6a060fd5 Bug 747545: Uevent Poller causes compile error when built debug due to ScopedClose member change - r=mwu a=b2g-only 2012-04-20 18:43:25 -07:00
Michael Wu
c3f60daae2 Bug 746728 - Add sensor index fallback for qemu, r=gal a=b2g-only 2012-04-18 17:18:08 -04:00
Kan-Ru Chen
aa08af3ddb Bug 739913 - Add cpuSleepAllowed attribute to mozPower. r=cjones 2012-04-16 18:35:33 -04:00
Cervantes Yu
3c7724646e Bug 742226 - Refactor battery updater using uevent poller. r=cjones 2012-04-11 15:59:00 +08:00
Cervantes Yu
e8ac3dca53 Bug 742226 - Create a uevent poller implementation. r=cjones 2012-04-13 12:02:33 +08:00
Ryan VanderMeulen
0dae59a989 Back out entire dd28759eba7b push (bug 739913 and bug 742226) due to OSX 10.7 and b2g bustage. r=shouldausedtry 2012-04-12 20:00:57 -04:00
Cervantes Yu
4f29a1fdfa Bug 742226 - Refactor battery updater using the uevent poller. r=cjones 2012-04-11 15:59:00 +08:00
Cervantes Yu
503521efbe Bug 742226 - Add a uevent poller implementation. r=cjones 2012-04-05 15:49:28 +08:00
Kan-Ru Chen
b8b1c82e13 Bug 739913 - Use kernel wake lock when the "cpu" topic is locked. r=cjones 2012-04-12 19:24:20 -04:00
Steven Lee
df8d8f4125 Bug 734869 - Fix hang when shutting down sensors. r=mwu 2012-03-26 09:59:02 +02:00
Doug Turner
8a52ef48c7 Bug 735330 - move device motion from dom/system to hal. gonk cleanup. r=jdm 2012-03-20 23:36:17 -07:00
Doug Turner
e9b99834bc Bug 735330 - move device motion from dom/system to hal. r=jdm
* * *
Bug 735330 - move device motion from dom/system to hal. cocoa bits. r=jdm
* * *
Bug 735330 - move device motion from dom/system to hal. window/qt/linux bits. r=jdm
* * *
Bug 735330 - move device motion from dom/system to hal. move accuracy into sensor data.  support compassneedscalibration. r=jdm

--HG--
rename : dom/system/cocoa/smslib.h => hal/cocoa/smslib.h
rename : dom/system/cocoa/smslib.mm => hal/cocoa/smslib.mm
2012-03-20 23:36:17 -07:00
Matt Brubeck
bb974fd0d2 Back out bug 735330, bug 737462, bug 734854 because they broke XUL Fennec
--HG--
rename : hal/cocoa/smslib.h => dom/system/cocoa/smslib.h
rename : hal/cocoa/smslib.mm => dom/system/cocoa/smslib.mm
2012-03-20 16:59:24 -07:00
Doug Turner
627f30a32b Bug 735330 - move device motion from dom/system to hal. gonk cleanup. r=jdm 2012-03-20 14:46:37 -07:00
Doug Turner
cb66f15674 Bug 735330 - move device motion from dom/system to hal. r=jdm
* * *
Bug 735330 - move device motion from dom/system to hal. cocoa bits. r=jdm
* * *
Bug 735330 - move device motion from dom/system to hal. window/qt/linux bits. r=jdm
* * *
Bug 735330 - move device motion from dom/system to hal. move accuracy into sensor data.  support compassneedscalibration. r=jdm

--HG--
rename : dom/system/cocoa/smslib.h => hal/cocoa/smslib.h
rename : dom/system/cocoa/smslib.mm => hal/cocoa/smslib.mm
2012-03-20 14:46:14 -07:00
Fabrice Desré
bc2cd6dad8 Bug 730363 - startup slowdown waiting for batteryinfo [r=cjones] 2012-03-07 08:27:09 -08:00
Chris Jones
fd940540cc Bug 722953 - "Cause hardware buttons to illuminate when button is pressed" [r=gal] 2012-02-14 19:24:00 -08:00
Vincent Chang
116aaa5731 Bug 717150: Support adjust system clock and set timezone APIs in hal layer r=cjones. 2012-02-17 02:44:00 -08:00
Fabrice Desré
3f105d381f Bug 727287 - Battery support for akami devices [r=mounir] 2012-02-16 14:40:43 -08:00
Ben Francis
dc37a99bf7 Bug 726612 - Gonk Battery API backend doesn't mark the device as charging when plugged to AC. r=mounir 2012-02-15 13:10:15 -05:00
Ms2ger
3953c27825 Bug 712378 followup - Fix incorrect license headers; r=sparky 2012-02-10 11:04:44 +01:00
Jim Straus
e873ad365e Bug 712378: Add an interface to control lights, and use it for the screen backlight on Gonk. r=cjones 2012-02-01 22:09:00 -08:00
Steven Lee
558004c794 Bug 714413 - Sensor support for gonk [r=cjones] 2012-02-05 18:41:15 -08:00
Ed Morley
c427e1b142 Backout 90f7f032757f, 6695904a4a70, 50e98f67df1b & d26e8631514c (bug 697641) for native Android failures and 20289eb83e51 (bug 712378) because it conflicted with the backout CLOSED TREE 2012-02-02 10:09:40 +00:00
Jim Straus
87d44b9f14 Bug 712378: Add an interface to control lights, and use it for the screen backlight on Gonk. r=cjones 2012-02-01 22:09:00 -08:00
Mounir Lamouri
8727971f2d Bug 719632 - Add Network API fallback methods to the hal's gonk backend. r=cjones 2012-01-22 08:43:38 +01:00
Chris Jones
6c88085d76 Bug 717155: Poke a different backlight controller. Stopgap for bug 712378. rs=jlebar 2012-01-11 11:56:23 -08:00
Philipp von Weitershausen
bef6c15bac Bug 713149 - hal_impl has no method GetCurrentBatteryInformation. r=cjones 2011-12-24 06:03:55 +01:00
Justin Lebar
c5dcd31779 Bug 712665 - Fix GonkHal.cpp debug compile errors. r=mwu 2011-12-21 17:58:29 -08:00
Chris Jones
0eff829115 Bug 712226 - Crash when fclose(NULL)'ing a battery-status FILE*, r=mwu 2011-12-21 17:58:29 -08:00
Justin Lebar
73e59b28dd Bug 694862 - Implement navigator.mozVibrate for Gonk, r=cjones 2011-12-21 17:58:29 -08:00
Michael Wu
37a4ba5160 Land GonkHal.cpp - Bug 696042 r=cjones, Bug 702256 r=cjones,mounir, Bug 694862 r=cjones 2011-12-20 11:31:53 -08:00