In rare cases the hardware storage on the device may be hosed and return
garbage. Use ParseInt which handles bad input instead of stoi.
BUG: 29334139
Change-Id: I91aedc169df110bea8097775f73dda11def22311
* Use const reference type for for-loop index variables
to avoid unnecessary copy.
Bug: 30413223
Change-Id: I5514384ef3af77c00aa3e8417acd8d70981e0afb
Test: build with WITH_TIDY=1
* Use const reference type for parameters to avoid unnecessary copy.
Bug: 30407689
Change-Id: I926ea7b6e9e020a228c812b7e23087a2b7ed9809
Test: build with WITH_TIDY=1
* Use const reference type for parameters to avoid unnecessary copy.
Bug: 30407689
Change-Id: I5e6bfd1cd3bcf54666316573281b79573cd8a780
Test: build with WITH_TIDY=1
Remove the /dev/__kmsg__ workarounds (which can then be removed
from sepolicy), and fix confusion in the translation between
android-base logging and kernel logging priorities (in particular,
where 'notice' comes in the hierarchy).
Bug: http://b/30317429
Change-Id: I6eaf9919904b6b55bc402c20bf1a4ae269014bc7
Test: adb shell dmesg | grep init
There's no need to use a different name for target and host moudles. In
Soong, it's better to use the same for both, as target and host modules
can be defined at the same time.
Change-Id: I32ee5bbd54b16a4ed9d812db4da836e96b1e8654
"PRI{u,x}64" was not compiling on C++ because of macro expansions.
Implement DLOG the same way DCHECK is implemented in
<android-base/logging.h>, and mechanically replace the problematic
lines with C++ logging. Remaining TRACE() lines will be replaced in a
follow-up CL.
Bug: 30222003
Change-Id: I377a91722eb4c035093fc96b79438c4f638b9a45
Having CaseInsensitiveCompare use strcasecomp is not ideal, but other
solutions are not prettier.
Also, add a TODO to fix FUSE_TRACE, broken by the switch to C++.
Bug: 27147273
Change-Id: I0017c3a7d0254eb81abd128b97cd06c5ad0d1dff
http://b/28149048http://b/29823425
Disable -Wvarargs that gets triggered in
system/core/debuggerd/test/ptrace_fake.cpp:ptrace_fake. The second bug
above tracks that this warning gets re-enabled.
Test: Tested build, boot and common usage for Arm, Arm64, x86, x86_64,
Mips images in AOSP and internal branch.
Change-Id: Ife68675a77431bcc4717b4da297c14dc486d1413
Makes code smaller, removes duplication. Using Minijail also allows
adding further sandboxing down the road.
Bug: 30156807
Change-Id: I8fa242fba545049ee82f6655fe6ecc14c53fcab7
Arguably, we don't need a ScopedMinijail for a program that only execs,
but I'd rather keep the code consistent and have all uses of Minijail
be good examples.
Bug: 30156807
Change-Id: I08a968835e0f3e2afcd5e7736626edbed658cde2
Rndis n/w interface "usb0" registration/deregistration is broken. If a
user try to switch to other functions or disable usb tethering or unplug
the usb cable then it doesn't kill "usb0" interface.
Fix is to delete Rndis function to unregister tethering interface when
switching from tethering to other functions or disable/unplug the
tethering cable. If we don't do that then the rndis netdev interface
will never be freed or unregistered.
This also means the rndis function has to be created everytime user
enable tethering function from Settings instead of creating it at
"on boot" in init.$hardware.usb.rc like we do currently. A relevant fix,
Change-Id: Icb49020d624fb21ef2607d473948cbbf3b9cc469, for reference has
already been submitted for device/linaro/hikey
Change-Id: If1f922e02277cccdc8c0b263be63989ee102cc80
Reported-by: Winter Wang <wente.wang@nxp.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
The ioprio.h header is not a uapi header, so remove it's use and
add the two values that this code needs to use.
Bug: 30072483
Change-Id: I5c8b6f40bd60a43f50ac26792f96d2fa3f6db020