Commit Graph

10197 Commits

Author SHA1 Message Date
Zhijun He 64567d165a Merge "graphics: update raw10 to allow padding between rows" into lmp-dev 2014-07-24 15:37:54 +00:00
Elliott Hughes d41f1a7ae4 Clarify init's write command.
Bug: https://code.google.com/p/android/issues/detail?id=73996

(cherry picked from commit afc08ce392)

Change-Id: Id2fb11d5259957ef23cc839fba14af8452fc69e4
2014-07-25 15:49:44 -07:00
Zhijun He c73b73a3c9 graphics: update raw10 to allow padding between rows
Change-Id: Ied1f42bb977212d9e5f3b2b2b3caa9c8c2caac5d
2014-07-25 11:42:38 -07:00
leozwang 48a904240b Redirect debug output to logcat.
If ADB_TRACE is enabled, debug output will be redirected to logcat.

Change-Id: I9c36ada7690a2b946ecd6a926d04e36a8313c36a
2014-07-23 22:45:02 -07:00
Sreeram Ramachandran e5ab3e3a4c Add a comment to not delete seemingly unused code.
Change-Id: I5b9d23eea7e850ab5a1f3a4e6c4f8ecdc3844864
2014-07-23 11:33:36 -07:00
Sreeram Ramachandran eec232603d Put back some deleted code.
http://ag/507249 removed a bunch of supposedly dead (unused) code. It turns out
at least ifc_disable() is being used in some protected partner branches. Put
back that as well as ifc_enable() to keep it symmetric.

Bug: 15413389
Change-Id: Ibec83a66e5d9079876ccf36d250b95b7c0294c03
2014-07-23 09:30:53 -07:00
Sreeram Ramachandran 759356bbd8 Merge "Cleanup: Delete dead code." into lmp-dev 2014-07-22 16:13:36 +00:00
Sreeram Ramachandran 435fe9bb02 Stop and start netd explicitly for "adb shell stop/start". DO NOT MERGE
netd is supposed to be restarted when the zygote is restarted (see the
"onrestart" section for "service zygote" in init.zygote*.rc). But this
only works if you send a restart command (say via "ctl.restart").

"stop && start" != "restart". It seems ingrained in developers to do
"stop && start", so we don't have much hope of convincing everyone to
switch to "adb shell restart", even if we did add such a toolbox command.

(cherry picked from commit 018c6a57f3)

Bug: 15855807
Change-Id: I387fe86600f4a2862abc3a05a2ef9a1e7374e21d
2014-07-22 22:43:42 +00:00
Sreeram Ramachandran a723689eca Cleanup: Delete dead code.
Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
2014-07-22 15:00:21 -07:00
Elliott Hughes 930d53eae6 Switch to NetBSD's kill(1).
(cherry picked from commit 5054c0db70)

Change-Id: I7e1e311d8d8e43e4ee59119eef4eec13c552cae9
2014-07-22 14:22:02 -07:00
Elliott Hughes bb2e400ec7 Fix cp(1) for files in /proc.
Also modernize the Android-specific hacks.

Bug: https://code.google.com/p/android/issues/detail?id=70793

(cherry picked from commit 1dc64f7a46)

Change-Id: Icacb20e735ec4ab3a93889f06a8d7b1a917f6b16
2014-07-22 13:28:31 -07:00
Riley Andrews 67cb1aeaa5 Remove the /dev/.booting file before triggering boot.
On mako only, there is a race condition such that
core + main services must be started after releasing
ueventd (by removing /dev/.booting).

bug 16304711
bug 16333352
2014-07-22 00:23:30 -07:00
Nick Kralevich ef16a17afb Merge "adb: set O_CLOEXEC on lots of file descriptors" into lmp-dev 2014-07-21 15:42:19 +00:00
Nick Kralevich fe8d7f4f2e adb: set O_CLOEXEC on lots of file descriptors
Too many leaking FDs.

Fixes bug: https://code.google.com/p/android/issues/detail?id=65857
(and more)

Change-Id: I67d8683244e54288a8105f6f65ee40abe2378d7e
2014-07-18 20:57:35 -07:00
Hans Boehm b14f65cb50 Do not typedef char16_t if it is a keyword.
Don't define char16_t on platforms where char16_t is a keyword, as
C11 and C++11 define it to be.

(cherry picked from commit dfdbe61d28)
Change-Id: I6717bc2133c1363ecd85861f3869e1eabd2ce96a
2014-07-18 17:53:02 -07:00
Elliott Hughes c11146efdf Fix implicit declaration of function 'prctl' in logd.
(cherry picked from commit e5a0f2064b)

Change-Id: Iee202daf3c637271a30ba0271abe68e939b5a887
2014-07-18 17:40:52 -07:00
Elliott Hughes cbbb83b0eb Fix implicit declaration of function 'prctl' in adb.
(cherry picked from commit b4dd6ef223)

Change-Id: Ia64bec746ae8d2c45663f61afb46702838b1e5bf
2014-07-18 16:46:39 -07:00
Elliott Hughes 400c381835 Move sched_policy.c off bionic's PR_SET_TIMERSLACK_PID.
Change-Id: I3a27803d46b5b88a10aa8043a114d780ed685e56
2014-07-17 17:15:14 -07:00
Daniel Rosenberg 7677e04ef6 Merge "newfs_msdos: Added option to cluster-align the start of the root directory" into lmp-dev 2014-07-17 21:15:46 +00:00
Patrick Tjin 4415e2a269 Scan all descriptors when checking for fastboot [DO NOT MERGE]
For Linux, the USB code was only looking at the first
descriptor when searching for the fastboot interface
which caused some devices to not be found.

Also clarify some code by using the actual USB structures
instead of void or char pointers.

(Cherry Picked from aac89db8a5)
Change-Id: I9e4871c4d477ac10ba75bb17a955f176809af289
Signed-off-by: Patrick Tjin <pattjin@google.com>
2014-07-17 10:07:19 -07:00
Nick Kralevich 04f9b2a809 debuggerd: use O_NOFOLLOW|O_CLOEXEC for tombstones
Change-Id: I71bdfba30346a9fad3129b404f39eda8190698e3
2014-07-16 20:08:41 -07:00
Daniel Rosenberg 052f275621 newfs_msdos: Added option to cluster-align the start of the root directory
This follows the recommendations of the SD-card association.

Change-Id: Ie89a5972d086b3df9d92e631c394a521f807b016
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2014-07-16 16:56:00 -07:00
Jungshik Jang cadd5bb70e Add force usage and config type for HDMI-CEC system audio mode.
New Usage Type: AUDIO_POLICY_FORCE_FOR_HDMI_SYSTEM_AUDIO
New Config Type: AUDIO_POLICY_FORCE_HDMI_SYSTEM_AUDIO_ENFORCED
When HDMI-CEC system audio mode is enabled, AudioService will
call
 setForceUse(AUDIO_POLICY_FORCE_FOR_HDMI_SYSTEM_AUDIO,
          AUDIO_POLICY_FORCE_HDMI_SYSTEM_AUDIO_ENFORCED);
in order to notify enabled system audio mode, so that
audio policy manager chooses proper output.
When it turns into off, AudioService will call
 setForceUse(AUDIO_POLICY_FORCE_FOR_HDMI_SYSTEM_AUDIO,
          AUDIO_POLICY_FORCE_NONE);

Along with it, add new audio output devic type,
AUDIO_DEVICE_OUT_AUX_LINE, in order to distinguish
line out for headphone and aux output of av device.

Bug: 16305986
Bug: 16002150
Change-Id: Idecdf626737f6635ea3cda638c343260b1661c77
2014-07-16 09:21:04 +09:00
Elliott Hughes e9f7361ea9 Add SIGFPE to crasher.
Bug: 3399996

(cherry picked from commit 3ecc42106e)

Change-Id: I075613ca3c022ce8d38a06a5ba236ceff32d181c
2014-07-15 13:18:32 -07:00
Colin Cross 7e55d8899c Merge topic 'lmkd' into lmp-dev
* changes:
  lmkd: kill a process if zoneinfo can't be read
  lmkd: kill multiple tasks
  lmkd: use open instead of fopen
  lmkd: make lmkd SCHED_FIFO
  lmkd: mlock all memory
  lmkd: remove libcutils from LOCAL_SHARED_LIBRARIES
2014-07-15 16:06:25 +00:00
Elliott Hughes aae5d43755 Add missing arm64 registers.
Also fix dumping of arm64's vector registers, which are actually 128 bits wide.

Also move the arm/arm64 FP registers to the tombstone. (We've never dumped
them at all for the other architectures.)

(cherry picked from commit b40c50351e)

Change-Id: Ic646fb9ea01e9beb42e1757feb8742c1d4efafa7
2014-07-14 18:56:53 -07:00
Colin Cross f8857cc24a lmkd: kill a process if zoneinfo can't be read
Opening /proc/zoneinfo may return -ENOMEM under memory pressure,
assume something needs to be killed if that happens.

Bug: 16236289
Change-Id: I25aab09f4c3f2b9e176eaaeca94fd6bd790dad4e
2014-07-14 17:41:17 -07:00
Colin Cross 16b0946da1 lmkd: kill multiple tasks
The task selected to die may be small, add its approximate size
to other_free and other_file and keep killing until all thresholds
are met.

Bug: 16236289
Change-Id: Iceeca4c63fec98cae2bf53e258f7707cea408b07
2014-07-14 17:41:17 -07:00
Colin Cross ce85d955a3 lmkd: use open instead of fopen
fopen and fgets require allocations, switch to open/read with
stack allocated buffers.

Bug: 16236289
Change-Id: I10586883fe78caf59d309eff7f7989b3e45beb7d
2014-07-14 17:41:17 -07:00
Colin Cross 1a0d9be53e lmkd: make lmkd SCHED_FIFO
If kswapd runs more than lmkd it may throw away all page cache pages
before lmkd gets a chance to kill a process.  Make lmkd SCHED_FIFO
so it can react quickly to kernel low memory notifications.

Bug: 16236289
Change-Id: I46767b4ec81ef8638d0c9e47d168a68b62e3cac5
2014-07-14 17:41:17 -07:00
Christopher Tate 71bbc6789f Fix the build in clang
"fprintf(stderr, buf)" is a warning in some compilers, and we're
building with all warnings promoted to error.

Change-Id: Ie3c6ddcd74cf4dda40cf7b742df955dde1d1a5ff
2014-07-14 16:53:57 -07:00
Colin Cross b28ff91313 lmkd: mlock all memory
Use mlockall(MCL_FUTURE) to lock all lmkd pages in memory.  This
avoids lmkd thrashing when the system is low on memory.

As a side effect, it will also keep the .text sections of liblog, libm,
libc, and libprocessgroup in memory at all times.

Bug: 16236289
Change-Id: Idd70557efa4b1e14bc86f14220672a30f6c956e3
2014-07-14 16:39:56 -07:00
Colin Cross 9d9e62cf37 lmkd: remove libcutils from LOCAL_SHARED_LIBRARIES
While lmkd does technically use libcutils' socket.h, it only
uses a static inline.  Remove libcutils from LOCAL_SHARED_LIBRARIES
so it doesn't end up mlock'd in memory in the next patch.

Bug: 16236289
Change-Id: I744d69bfff06cb904836f64e1d5f6e530604bff4
2014-07-14 16:39:56 -07:00
Ruben Brunk a5e65d86a2 Allow sticky transform to be set in ANativeWindow.
Bug: 15116722

- Adds methods to set the sticky transform field.

Change-Id: Idaa4311dfd027b2d2b8ea5e2c6cba2da5779d753
2014-07-14 22:14:49 +00:00
Jeff Sharkey 1404e65472 Merge "Fix 64-bit builds." into lmp-dev 2014-07-14 18:38:02 +00:00
Jeff Sharkey c03064ea71 Fix 64-bit builds.
Change-Id: I1ff5c9c3dc8d870aef2885f8a1989c6c913ccb3d
2014-07-14 13:57:54 -07:00
Riley Andrews fd0f390869 Merge "Move unlink("/dev/.booting") until after filesystems are mounted." into lmp-dev 2014-07-14 18:37:56 +00:00
Riley Andrews 80c7a5e8a8 Move unlink("/dev/.booting") until after filesystems are mounted.
Move the unlink out of init.c and into init.rc, so that the file
will be removed after all the filesystems with firmware are up.

Change-Id: Ifdd5dd1e95d7e064dde5c80b70198882d949a710
2014-07-14 13:17:43 -07:00
Todd Poynor 2eb3d3b55c am 7b29cc8c: Merge branch \'lmp-dev-plus-aosp\' of https://googleplex-android.googlesource.com/_direct/platform/system/core into lmp-dev-plus-aosp
* commit '7b29cc8c026548306e661f22573dc80c8e7fba0f':
2014-07-14 18:52:38 +00:00
Todd Poynor 7b29cc8c02 Merge branch 'lmp-dev-plus-aosp' of https://googleplex-android.googlesource.com/_direct/platform/system/core into lmp-dev-plus-aosp 2014-07-14 18:17:22 +00:00
aarti jadhav-gaikwad c6cca01756 am 24ca56e1: am 923e7408: audio: add definitions for aac sub formats
* commit '24ca56e1e0f04061d5ea0d5750ea2d487bcd5322':
2014-07-14 18:00:26 +00:00
Sreeram Ramachandran 2cb1c3c23b am 9ec4cb80: am f813da2d: am e26ca55b: am b12e40da: am 0a7b44d5: am ab98d2e6: Merge "Create a data directory for netd and other network-related files."
* commit '9ec4cb80658b67e6fe95917cb9a1f697546beb13':
2014-07-14 18:00:25 +00:00
Elliott Hughes c43a3e875a am 9f8fa8f2: am 99adb755: am b5dfe272: am f761709a: am 1829b14c: am 18e754ee: Merge "Fix LP64 tombstone.cpp build failure."
* commit '9f8fa8f2786c0156b43be7e83e70b8a267c4527a':
2014-07-14 18:00:24 +00:00
Elliott Hughes 4d5d830bc4 am b5e36713: am afacbefb: am 7ca8bae8: am 4f27968f: am 494bd36d: am dda63545: Merge "Improving maps output."
* commit 'b5e367131568573f9b9da7c130a1a73c85261958':
2014-07-14 18:00:23 +00:00
dcashman 342681c2a2 am 80e236a1: am 9ae2b5e1: am 8c7e0520: am cddb15b8: am b4e74db7: am 3fa71b8e: Merge "Remove sshd."
* commit '80e236a11cd2d1d327ccfae47421a5c35188216b':
2014-07-14 18:00:22 +00:00
Jungshik Jang b61ae5d9a0 am d7fedf9a: am 6fe31610: Merge "Fix size of "values" fields of audio_gain_config."
* commit 'd7fedf9abd5ad0b6ba1ea93ed0d6f53f73d2a891':
2014-07-14 18:00:21 +00:00
Jungshik Jang 37ad4cc965 am 6a6f1166: am 2c7cfc10: Remove forced usage types for HDMI-CEC system audio mode.
* commit '6a6f116621d549554679523be35db7033a710445':
2014-07-14 18:00:20 +00:00
Ruchi Kandoi c543235814 am d48e5fb4: am a78fc234: healthd: Reports arbitrary numbers for capacity and temperature when connected to fake battery.
* commit 'd48e5fb4378b6e29d8d33194ece7e5f02d210d76':
2014-07-14 18:00:19 +00:00
Colin Cross 4d96be15b6 am 59a954a8: am 212e9798: add cleanspec for lmkd
* commit '59a954a80cc6669dadd9444ddb6b2fb39ef778dd':
2014-07-14 18:00:18 +00:00
Colin Cross 01dc8b19ab am 8cb357ea: am 420f0a25: Merge "lmkd: use libprocessgroup to kill forked processes"
* commit '8cb357ea50f993c3a61a2aaf511c37a1d69b26a1':
2014-07-14 18:00:17 +00:00