Commit Graph

2093 Commits

Author SHA1 Message Date
Yi Jin
822885d2cc Merge "Automatically generate section_list.cpp file from incident.proto with the SectionFlags field annotations" 2017-08-18 00:55:53 +00:00
Yi Jin
f860184599 Automatically generate section_list.cpp file from incident.proto
with the SectionFlags field annotations

Bug: 64728679
Test: tested manually on device
Change-Id: I5b067b09cd6ccc3528f0845d7290cc9e2bc63a07
2017-08-17 15:04:21 -07:00
TreeHugger Robot
ecffc47f2d Merge "Change BootActions to use oem.props." 2017-08-16 18:06:17 +00:00
TreeHugger Robot
5748508642 Merge "Remove useless open modes" 2017-08-15 23:27:15 +00:00
Ed Coyne
428ed51fce Change BootActions to use oem.props.
Use /oem/oem.props to configure what the library name for the boot
action
will be, expect that library to be found in /oem/lib

Bug: 62090281
Test: Ran locally against an imx7d, reads oem.props, finds, and loads
library.

Change-Id: I13c161e140747091595efa36f76297ba92cdfa4d
2017-08-15 15:04:14 -07:00
George Burgess IV
f4160311dd Remove useless open modes
Previously, the machinery that detected these was only enabled in
optimized builds. We're expanding it to work in code built with -O0, as
well. Thus, we now get compile-time warnings about these calls (which
get turned into errors by -Werror).

Bug: 12231437
Test: Builds without warnings about useless mode bits in calls to open()
Change-Id: Icb1bc5f0a7941bb90d8581d6c3bde7cc076f3e01
2017-08-14 18:55:40 -07:00
Yi Jin
4ef28b7353 Use Descriptor and Reflection to set table-like data, in this case
protobuf-cpp-full is worth using.

Test: tested it locally by running the command in README.md
Change-Id: I1c38bd7fee6d914c4a579ed82b9be4a8177e45b9
2017-08-14 18:53:10 -07:00
Yi Jin
f32af48069 Fix parsing enum types in incident report tool as well as adding
some additional loggings

Test: manually flashed to device and test calling IncidentManager.java
functions
Change-Id: I69610414edde865b20ba632837f037fbe43f99db
2017-08-11 17:28:12 -07:00
Steven Moreland
3c9d4f05d0 Merge "ScopedUtfChars: use proper nativehelper headers" into oc-dr1-dev-plus-aosp am: 1e8d712b78
am: 350b0ed191

Change-Id: I79194ce726ed314cc7d6c87d4a3ea4b0e12a7542
2017-08-11 03:34:50 +00:00
Steven Moreland
350b0ed191 Merge "ScopedUtfChars: use proper nativehelper headers" into oc-dr1-dev-plus-aosp
am: 1e8d712b78

Change-Id: I52b50aec4319183bebacaf7fb03e51dd6b51157a
2017-08-11 00:50:50 +00:00
Steven Moreland
65e2ca2808 ScopedUtfChars: use proper nativehelper headers
libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using ScopedUtfChars find headers
Bug: 63762847
Change-Id: I5e9f2b56f569b83ece0d854f7066655e1d64cc65
2017-08-10 23:00:10 +00:00
Narayan Kamath
8ec374d28e Merge "PackageParser: Parse android:classLoader during the full parse." into oc-mr1-dev am: af706b40de
am: b51eae5825

Change-Id: Idf542e9ee44362617ac247aa6c85921c76778e37
2017-08-10 11:28:24 +00:00
Narayan Kamath
b51eae5825 Merge "PackageParser: Parse android:classLoader during the full parse." into oc-mr1-dev
am: af706b40de

Change-Id: I8e761bf1c4afba4795aa4041aeabc66b48964030
2017-08-10 11:14:20 +00:00
Narayan Kamath
96c11c58c9 PackageParser: Parse android:classLoader during the full parse.
There's no need to do this during a "lite" parse. Moreover, we don't
resolve resource references during a lite parse, which means that we
lose a lot of flexibility.

Test: CtsAppSecurityTestCases
Bug: 64339642

Change-Id: I7d02faab6bd226d96d63d2edd8c06b94e15e14ad
2017-08-09 15:32:00 +01:00
Yi Jin
06525c209e Merge "The proto field is set based on which header the data belongs to." 2017-08-08 20:32:15 +00:00
Takashi Furukawa
1be845460b Merge "Cherry-pick: Add null check for Wi-Fi command" into oc-mr1-dev am: 552d35cb4f
am: 154a2377d5

Change-Id: I1c843a238cef6920887d8ed6a265913985452692
2017-08-08 18:36:55 +00:00
Takashi Furukawa
154a2377d5 Merge "Cherry-pick: Add null check for Wi-Fi command" into oc-mr1-dev
am: 552d35cb4f

Change-Id: I04ea51eee6ad1030844a720132a3e67b007cb19f
2017-08-08 18:30:55 +00:00
Takashi Furukawa
c6e2c78ee6 Merge "Add null check for Wi-Fi command" am: 43ee2ac140 am: 51e24de109
am: a6e588fffc

Change-Id: I4b09b7af3edc8656378a2abec2c395c07bb61fae
2017-08-08 18:27:19 +00:00
Takashi Furukawa
51e24de109 Merge "Add null check for Wi-Fi command"
am: 43ee2ac140

Change-Id: Ideddbcd85dc15012f405138c358f3dd8c516eef5
2017-08-08 18:14:53 +00:00
Treehugger Robot
43ee2ac140 Merge "Add null check for Wi-Fi command" 2017-08-08 18:03:14 +00:00
Yi Jin
603f3b3c4f The proto field is set based on which header the data belongs to.
Bug: 64371071
Test: tested manually using native test
Change-Id: Ic7671041981d9a722ef00ce6c50cdb12b3e5414d
2017-08-07 15:55:10 -07:00
Takashi Furukawa
1aa263e5ab Cherry-pick: Add null check for Wi-Fi command
When WifiService is not ready during boot phase and Wi-Fi command
is executed on console, NullPointerException happens.
To prevent this, null check is needed.

Test: Manual test
Bug: 64040515
Change-Id: I5684cdc7661b7d93fd6f2ac61863919077d12935
Merged-In: I5684cdc7661b7d93fd6f2ac61863919077d12935
2017-08-07 13:27:56 -07:00
Martijn Coenen
6513db5b49 Merge "screencap: always exit with _exit()." into oc-dr1-dev
am: 4499576db0

Change-Id: I5b48a5792994034e93f7ed7d5024e44fb452e994
2017-08-07 11:01:15 +00:00
Yi Jin
2bd76471c3 Merge "Add tests for reporter class" 2017-08-04 18:06:44 +00:00
Martijn Coenen
48b7408201 screencap: always exit with _exit().
Delay starting the threadpool until necessary,
and once started, always exit with _exit().

Bug: 36066697
Bug: 62956201
Test: mma, screencap -p
Merged-In: I0b9ab542f6434f57b498cd7dc41219ef57e36721
Change-Id: I0b9ab542f6434f57b498cd7dc41219ef57e36721

(cherry picked from commit 4d125c1df6)

Change-Id: Ie79ead94c62df0c4057d7fc6735abe9dcd1e940f
2017-08-04 07:31:09 +00:00
TreeHugger Robot
3e9db6d8e4 Merge "Remove useless mode bits" 2017-08-04 03:56:01 +00:00
Yi Jin
add11e9176 Add tests for reporter class
Test: Add test for Reporter class
Change-Id: Ic1d87a26dd4b8271bab7b03374c7a1d4d7b87f92
2017-08-03 19:40:21 -07:00
Makoto Onuki
079f8e802b Merge "Bit: Don't ignore errors and crashes" into oc-mr1-dev am: 437e43ed1f
am: d3cafac64d

Change-Id: I2723ca82a18e3c9ac507e6a7113618c1850f577a
2017-08-04 00:12:38 +00:00
Makoto Onuki
d3cafac64d Merge "Bit: Don't ignore errors and crashes" into oc-mr1-dev
am: 437e43ed1f

Change-Id: Idc4e96751659c08d0b95760f41ba47c45bc4e476
2017-08-03 23:53:25 +00:00
George Burgess IV
6f9735b203 Remove useless mode bits
Looks like a rebase of I099808fd13bf9ed9a564b122f1126b1691a83291
accidentally wiped out part of
I5d9b98152e48135ea716592b28c5c771cc74018b.

This reapplies the part that was undone.

Bug: 64132680
Test: mma.
Change-Id: If213996103c3988e8a609c266a59a2791675fd0a
2017-08-03 16:14:11 -07:00
Yi Jin
d352519843 Merge "This cl implements CommandSection and use it to add procrank.proto Section" 2017-08-03 18:04:38 +00:00
Yi Jin
b44f7d46b6 This cl implements CommandSection and use it to add procrank.proto Section
Bug: 63863444
Test: manual - create gtests for CommandSection and Procrank Parser following
instructions in the README.md of incidentd and incident_helper on how to
run them.

Change-Id: I099808fd13bf9ed9a564b122f1126b1691a83291
2017-08-02 16:33:17 -07:00
Makoto Onuki
6fb2c9718c Bit: Don't ignore errors and crashes
Bit used to only see success results and failures (== assertion failures?),
and didn't see "errors" (other exceptions) and test process crashes.

Fixed it.

Now it also returns an error status code if there was a test failure.

Bug 64292779
Test: manual

Change-Id: Iaba93910d32abfc615ae595746a0e9be1108583a
2017-08-02 14:49:30 -07:00
Steven Moreland
f91ca58ec4 com.android.server: use proper nativehelper headers
libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: com.android.server finds headers
Bug: 63762847
Merged-In: Icb3018f520004f65e8dd565d6e1d563551548eba
Change-Id: Ib36fec53c30760af5dac4097b3eceda6c4c6c7f0
2017-08-02 14:19:20 -07:00
Steven Moreland
2710473544 Merge "com.android.server: use proper nativehelper headers" into stage-aosp-master am: 7d7c269944 am: 81972a18e4 am: 795bcc5b75
am: c64c642e14

Change-Id: I7815db015b05c148ec7b62783a4843e0a4c04e90
2017-08-02 15:47:36 +00:00
Steven Moreland
c64c642e14 Merge "com.android.server: use proper nativehelper headers" into stage-aosp-master am: 7d7c269944 am: 81972a18e4
am: 795bcc5b75

Change-Id: I6ef4e3b5c44272f5f0a8d585afea15a901178d2a
2017-08-02 15:38:40 +00:00
Steven Moreland
795bcc5b75 Merge "com.android.server: use proper nativehelper headers" into stage-aosp-master am: 7d7c269944
am: 81972a18e4

Change-Id: Id008ba3508c972d8d27eebca22009b4823e387e0
2017-08-02 15:30:37 +00:00
Steven Moreland
c95dca8ce1 com.android.server: use proper nativehelper headers
libnativehelper exports headers under nativehelper. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: com.android.server finds headers
Bug: 63762847
Change-Id: Icb3018f520004f65e8dd565d6e1d563551548eba
2017-08-01 20:04:50 +00:00
George Burgess IV
4e4a34bc4f Remove useless open modes
Open modes are ignored if the user doesn't want the file to be created:
http://man7.org/linux/man-pages/man2/open.2.html

Since it's somewhat misleading/potentially indicative of a missing
O_CREAT/O_TMPFILE, we plan to issue a warning on open calls with useless
mode bits in the near future. Because -Werror is used in this project
(thank you!), we need to either make these modes useful, or remove them.

Bug: 64132680
Test: mma. New warnings no longer appear.
Change-Id: I5d9b98152e48135ea716592b28c5c771cc74018b
2017-07-31 11:12:23 -07:00
Martijn Coenen
a2af86b747 Merge "screencap: always exit with _exit()." into oc-mr1-dev am: b92375fe9f
am: bf3dc5ca6a

Change-Id: I3d88c123467f993ced804e5f8cbdd7d420111f4b
2017-07-27 10:26:26 +00:00
Takashi Furukawa
7ba244d6d8 Add null check for Wi-Fi command
When WifiService is not ready during boot phase and Wi-Fi command
is executed on console, NullPointerException happens.
To prevent this, null check is needed.

Test: Manual test
Bug: 64040515
Change-Id: I5684cdc7661b7d93fd6f2ac61863919077d12935
2017-07-27 10:40:01 +09:00
Martijn Coenen
4d125c1df6 screencap: always exit with _exit().
Delay starting the threadpool until necessary,
and once started, always exit with _exit().

Bug: 36066697
Bug: 62956201
Test: mma, screencap -p
Change-Id: I0b9ab542f6434f57b498cd7dc41219ef57e36721
2017-07-26 09:33:59 +02:00
TreeHugger Robot
51f151512c Merge "Add null check" 2017-07-25 16:56:54 +00:00
Yi Jin
c6de08a371 Merge "This cl does the following things:" 2017-07-24 21:12:27 +00:00
Marco Nelissen
3eb4baafc0 Add null check
Bundle returned from ContentProvider.call() may be null, and content
command shouldn't crash because of that.

Test: manual

Change-Id: I4c7e6c2b607b065699b58e6b9bca20e84cdb19ca
2017-07-24 13:36:58 -07:00
Yi Jin
0a3406fc4f This cl does the following things:
0) Implements a skeleton of incident_helper
1) Implements FileSection class which calls incident_helper to parse
   file content to protobuf
2) Adds Kernel Wake Sources to incident.proto and makes it parsed by
   FileSection
3) Adds basic gtests to test FdBuffer, io_utils, FileSection
implementation

Bug: 62923266
Bug: 62926061
Test: manual - push incidentd, incident_helper and incident to my device
      and verify kernel wakeup sources file is able to be parsed.
Change-Id: I2aa6b6158d962ce70e6fa6c8a9c42213a45ff41c
2017-07-24 11:50:33 -07:00
Andrii Kulian
94e82d9b0e DO NOT MERGE ActivityView be gone!
This hidden functionality is no longer support/needed since
we now have multi-window/display. A new view group class
will be added later that uses multi-window to support remaining
functionality of this class.

Test: go/wm-smoke
Change-Id: Ie2fa2de92841d33199da9988741905060dd1ddf4
2017-07-21 13:14:19 -07:00
Andrii Kulian
8d5a505d6a Merge changes from topic 'activity_view_v2'
* changes:
  VirtualDisplay wrapper with input forwarding
  ActivityView be gone!
2017-07-20 15:48:26 +00:00
TreeHugger Robot
2a45221fac Merge "Fix nobootanimation toggle" 2017-07-15 08:53:51 +00:00
Andrii Kulian
b1cdb10e7c ActivityView be gone!
This hidden functionality is no longer support/needed since
we now have multi-window/display. A new view group class
will be added later that uses multi-window to support remaining
functionality of this class.

Test: go/wm-smoke
Change-Id: Ie2fa2de92841d33199da9988741905060dd1ddf4
2017-07-14 23:27:12 -07:00