Commit Graph

265 Commits

Author SHA1 Message Date
Justin Lebar
7aac24a9e8 No bug: Fix whitespace error. DONTBUILD 2012-12-03 16:56:54 -05:00
Steven Lee
67df335bb1 Bug 809106 - RegisterSwitchObserver through hal::Sandbox. r=jlebar 2012-11-29 17:52:02 -05:00
Boris Zbarsky
69ab92b7a0 Bug 815671 part 5. Various miscellaneous fixups in dom/ and hal/ code to copy arrays only when we explicitly want to. r=jlebar 2012-11-29 11:14:14 -05:00
Kan-Ru Chen (陳侃如)
21004569fc Bug 814822 - Notify wake lock change when content crashes. r=jlebar 2012-11-27 10:28:11 +08:00
Kan-Ru Chen (陳侃如)
43ad18d1ee Bug 806363 - Remove wake locks on content-shutdown. r=jlebar 2012-11-17 23:05:18 +08:00
Boris Zbarsky
1dc187ca64 Bug 812086 part 3. Convert internal consumers of mozHidden and mozVisibilityState to the unprefixed versions. r=smaug 2012-11-16 14:22:56 -08:00
Steven Lee
d01969e517 Bug 808983 - Don't call hal_sandbox::Vibrate when ipc is broken. r=jlebar 2012-11-08 14:35:03 -05:00
Steven Lee
c1e57fbdec Bug 800263 - [FM Radio] Launch the FM Radio with headphone already plugged-in will cause screen freeze. r=cjones 2012-11-06 22:32:00 -05:00
Alan Huang
454ff67f83 Bug 802029 - When PollSensors() found one of its event type is SENSOR_UNKNOWN, don't create a SensorRunnable. r=mwu 2012-10-31 15:03:19 +08:00
Andrea Marchesini
70e95a96b4 Bug 703612 - Make DBUS calls asynchronous to prevent slowness because of DBus daemon being overloaded in Battery API UPower backend. r=mounir 2012-11-02 16:11:50 -04:00
Justin Lebar
8a80bd0a22 Bug 771195 - Fire memory pressure events on Gonk. r=dhylands 2012-10-31 13:29:14 -04:00
Nathan Froyd
f9b2a74082 Bug 806618 - rewrite PR_NewLogModule calls to not generate static initializers; r=ehsan 2012-10-29 19:32:10 -04:00
Benjamin Chen
7a6895cd0b Bug 797817 - Update the battery indicator led when receiving battery status change. r=cjones 2012-10-22 11:10:05 +08:00
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
Isaac Aggrey
e4756de38b Bug 794510: Part 4 - Use PR_NewLogModule instead of PR_LOG_DEFINE; r=ehsan,wtc 2012-10-13 15:56:35 -05:00
Steven Lee
2e0526c0c4 Bug 790499 - Time API: Call JS_ClearDateCaches() to update Date object's timezone when the system timezone is reset, r=jlebar 2012-10-17 00:26:00 -04:00
Andreas Gal
deb7e01143 Bug 800533 - Don't handle magnetic field sensor, r=mwu 2012-10-16 01:11:06 -04:00
Steven Lee
e340059732 Bug 793759 - Implement HalChild::ActorDestroy and prevent HalChild calls to HalParent after ActorDestroy is called. r=cjones 2012-10-06 21:53:22 -04:00
Gina Yeh
78c37a4bca Bug 796300 - Final version: Set audio device BLUETOOTH_SCO_HEADSET to unavailable when disconnect Sco socket, r=qdot 2012-10-03 10:55:28 +08:00
Gene Lian
60d335c589 Bug 793970 - Reuse nsAppStartup's watchdog to compulsively power-off/reboot/quit Gecko if profile synchronizing hangs. r=cjones 2012-10-02 15:26:32 +08:00
Doug Turner
b6b2b821ab Bug 790503 - On Mac Mini, defaultCalibration reads outside of sensors[]. r=jruderman@gmail.com,blassey 2012-10-01 20:45:32 -07:00
Chris Jones
fcbd8b701e Bug 794188: Check the fmradio permission at process boundaries. r=jlebar 2012-09-29 15:09:19 -07: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
Gina Yeh
323709cc8c Bug 794903 - Final version: BluetoothScoManager implementation, r=qdot 2012-09-29 17:39:05 +08:00
Gene Lian
94eb40e12d Bug 790527 - When rebooting/powering off, go through normal gecko shutdown. r=bsmedberg,sr=cjones 2012-09-26 17:12:33 +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
Chris Jones
47adc85527 Bug 793479: Update C++ permission-checking API to match that of the message-manager one. r=jlebar 2012-09-25 11:52:30 -07: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
Reuben Morais
bc3c8d7542 Bug 793418 - OS X Battery Backend: Report time to charge when available. r=mounir 2012-09-25 15:32:02 +01:00
Steven Lee
bfafbca8ed Bug 792443 - hal::RegisterSystemTimeChangeObserver should register the observer through sandbox, r=jlebar 2012-09-23 13:00:32 -04:00
Reuben Morais
85a3e6993b Bug 696045 - Implement Mac backend for Battery API. r=BenWa,mounir 2012-09-21 23:36:14 -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
Ehsan Akhgari
67e39b5c59 Backout changeset 9f16bba541cc (bug 790499) becasuse of build bustage 2012-09-21 15:57:42 -04:00
Steven Lee
08cbc6270d Bug 790499 - Time API: Call JS_ClearDateCaches() to update Date object's timezone when the system timezone is reset, r=jlebar
--HG--
extra : rebase_source : ddd264047c861c3244dfdf43e695705ec675f066
2012-09-21 14:56:01 -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
Michael Wu
8e52887010 Fix red from broken FallbackFMRadio.cpp from bug 749053 2012-09-19 14:16:13 -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
Mounir Lamouri
38cc3be56e Bug 787534 - Remove Portrait and Landscape special ScreenOrientation values. r=jlebar 2012-09-19 17:28:16 +01:00
Justin Lebar
767acadbe2 Bug 791261 - Remove the requirement that a TabParent must be Active in order to send vibrations. Also remove TabParent::Active(). r=cjones 2012-09-19 09:48:38 -04:00
Chris Jones
1273b139d3 No bug: Update the cross-process permission checks for time permissions to match the DOM check. r=jlebar 2012-09-18 20:25:12 -07: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
Steven Lee
1d2c1b3351 Bug 791682: Hal's sSystemTimeObserver should be called sSystemTimeObservers, r=jlebar 2012-09-17 08:48:00 -04:00
Ms2ger
10ec580e54 Bug 787933 - Stop using stdin types in IPC code; r=bsmedberg+cjones sr=cjones 2012-09-17 10:37:20 +02: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
Jesse Ruderman
802de982c9 Bug 790781 - fix bustage from bug 714358. 2012-09-12 17:25:55 -07:00
Steven Lee
b50ad6db3a Bug 714358 System time change implementation, r=mounir 2012-09-11 02:40:00 -04:00
Mounir Lamouri
24745804d4 Bug 787532 - Update Android HAL backend to take into account new screen lock values. r=jlebar 2012-09-11 11:57:20 +01:00
Chris Jones
1834ac946d Bug 789130: Unregister hal observers on HalParent::ActorDestroy(), and make Unregister*() functions resilient to unregister-of-not-registered observers. r=jlebar 2012-09-06 14:58:36 -07:00
Jan Beich
1e6a0fb020 Bug 788414 - DragonFly target doesn't use BSD suffix in uname -s. r=landry 2012-09-06 12:01:55 +01: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
Rafael Ávila de Espíndola
fa9b9c167a Bug 786148 - s/IPC/ipc/. r=ted.
This makes our builds a bit more reproducible. Without it when processing

#include "IPC/IPCMessageUtils.h

we end up in

#include "ShadowLayers.h"

which in the final XUL translates into the symbol (run nm -a to see it):

 - 00 0000   SOL ../../../../gfx/layers/IPC/ShadowLayers.h

now when some file in gfx/layers/ipc does

#include "ShadowLayres.h"

the file found is the local one with the lowercase directory name and we end up
with

 - 00 0000   SOL ../../../../gfx/layers/ipc/ShadowLayers.h

--HG--
extra : rebase_source : 96c68f6a3448eedaa280039960df911a9c707cac
2012-08-28 08:41:04 -04:00
Chris Jones
ce51cbe36a Bug 782460: Fix hal enum serializers, make wake lock permission checking match the DOM's, and log a message when an app process fails a backstop permission check. r=gal 2012-08-25 15:38:04 -07:00
Chris Jones
8abbd9e7cf Bug 785166: Protect against already-canceled vibrations. r=jlebar 2012-08-23 17:32:00 -07:00
Chris Jones
d04e5d0df7 Backed out changeset df85150b8d2f 2012-08-23 17:33:12 -07:00
Chris Jones
352812e2a0 Bug 785167: Protect against already-canceled vibrations. r=jlebar 2012-08-23 17:32:00 -07: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
Chris Jones
005e04d8c2 Bug 776835: Check process capabilities in hal. r=blassey,jlebar 2012-08-16 12:34:53 -07: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
Mike Hommey
c1b35e7b2a Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02: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
Chris Jones
0020ef3dcc Bug 777890: The cached value is valid after we synchronously Get() it, as far as we know. r=jlebar 2012-07-27 11:39:44 -07:00
Justin Lebar
56db9a6e24 Bug 772987 - Part 2: Use Static{Auto,Ref}Ptr where appropriate. r=mounir
--HG--
extra : rebase_source : 4e3e72ba53cd0177160f80231eebeb4972119eec
2012-07-26 15:33:45 -04:00
Brian R. Bondy
66e3cf369b Bug 774140 - Remove code duplication for IsVistaOrLater. r=bsmedberg 2012-07-25 10:23:26 -04:00
Joshua Cranmer
4a5b32fae2 Bug 702877 - Replace NS_OVERRIDE with MOZ_OVERRIDE. r=ehsan
--HG--
extra : rebase_source : 1843575683c3897f96f3966cbce26140ff1a7d90
2012-07-06 13:15:45 -05:00
Gervase Markham
69110ab2b1 Bug 774614 - Relicense Gonk/Gecko interface code to Apache License 2.0. 2012-07-20 10:10:44 +01:00
Rafael Ávila de Espíndola
319610caaa Bug 774015 - Fix -Wdelete-non-virtual-dtor warning. r=justin.lebar 2012-07-15 11:13:15 -04:00
Mounir Lamouri
0a3c1cf42a Bug 772373 - Force warnings as errors in hal/. r=jlebar 2012-07-12 21:34:18 +02:00
Reuben Morais
d387457032 Bug 772524 - Fix "data argument not used by format string" warnings in smslib.mm. r=mounir 2012-07-10 18:31:04 -04:00
Reuben Morais
81b49519fc Bug 772351 - Fix deprecated writable strings warnings on smslib.mm. r=mounir 2012-07-10 18:31:04 -04:00
Gene Lian
6c4a2306fe Bug 749551 - Alarm API (Hal/Gonk). r=cjones 2012-07-06 12:42:10 +02:00
Kan-Ru Chen
bf6be2fea4 Bug 768364 - Clear sLockTable on shutdown r=jlebar 2012-07-06 10:09:46 +08: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
Justin Lebar
4c3ea02bd1 Bug 769585 - Fix vim modelines. DONTBUILD rs=mrbkap 2012-06-29 12:42:59 +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
Landry Breuil
7257d139f1 Bug 758849 - UPower isn't linux-only, give it a chance to build on BSDs at least. Add a section taking them into account. r=mounir 2012-05-29 10:57:15 +02:00
Landry Breuil
bdff27768c Bug 712910 - Use stdint types in sandbox/PHal.ipdl too, fixes build on OpenBSD - r=Ms2ger 2012-05-26 09:33:51 -04: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