4664 Commits

Author SHA1 Message Date
Tom Cherry
2ff78bb657 Merge "Remove legacy logger_entry_v* structs"
am: 4be2934e61

Change-Id: I910d9429de9ae6dd571af726fc3dbd04c2b94490
2019-10-25 10:05:00 -07:00
Tom Cherry
d02698938e Remove legacy logger_entry_v* structs
These are obsolete so we move all users to a single format.

Test: build, logging unit tests
Change-Id: I05ebb0b9135c61585ff103d24b785b9f21197257
2019-10-24 10:56:34 -07:00
Tom Cherry
7b1e0eee95 Merge "Use sizeof(android_log_header_t) instead of sizeof its components"
am: 8facba4326

Change-Id: Ia7655b2d082c1b55fa2e0a98245e49d2b0326dbc
2019-10-17 06:54:34 -07:00
Tom Cherry
937e1bdc1f Use sizeof(android_log_header_t) instead of sizeof its components
Particularly because sizeof_log_id_t is a misnomer and is going away.

Test: build, liblog and logcat unit tests
Change-Id: I7978bf83e44336a334229753ff1e11a07134e8fc
2019-10-16 15:48:56 -07:00
Howard Ro
41128933e4 Merge "Terminate statsd on a few signals including SIGTERM"
am: 99f231f3bc

Change-Id: I4a1f39eac54da861d88337a15e0c8e7a764a66f3
2019-10-14 15:37:24 -07:00
Treehugger Robot
99f231f3bc Merge "Terminate statsd on a few signals including SIGTERM" 2019-10-14 22:23:12 +00:00
Howard Ro
48dfcdb90a Terminate statsd on a few signals including SIGTERM
- statsd is handling SIGHUP/SIGQUIT/SIGINT/SIGTERM, but doesn't exit.
- The expected behaviour is that statsd would exit after finalizing log
processing when those signals are received.

Bug: 139817664
Bug: 138764189
Test: Send SIGTERM to statsd and check if it is terminated. (note that
init will revive statsd)

Change-Id: Ie45821613664bf030754f835f5481c986ed3cede
Merged-In: Id1146d772f8c68892256ee7a3eea70837fee5c7a
2019-10-14 13:56:41 -07:00
Nick Desaulniers
4a3a9b4a9f Merge "[frameworks][base][statsd] fix -Wimplicit-int-float-conversion"
am: 8b178a6607

Change-Id: I6345752405ea779c221aff6699a832cc440de06e
2019-10-14 09:38:15 -07:00
Nick Desaulniers
8208b201ca Merge "[frameworks][base][statsd] fix -Wreorder-init-list"
am: 00ae277630

Change-Id: Icf1d23aba020cec0b084c435cfcf2a2ca4a66f83
2019-10-11 09:24:42 -07:00
Nick Desaulniers
58664e8a7c [frameworks][base][statsd] fix -Wimplicit-int-float-conversion
RAND_MAX cannot be precisely represented in an IEEE 754 single precision
float.  For the purpose of generating a random number, the imprecision
is irrelevant. Fix the warning with an explicit cast.

Bug: 139945549
Test: mm
Change-Id: Ica60b410bbbca0b3807f985e302abb0775133877
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-10-10 13:09:42 -07:00
Nick Desaulniers
691e1a093c [frameworks][base][statsd] fix -Wreorder-init-list
C++20 would like members of designated initializers to be ordered, so
that initialization side effects match member initialization in explicit
constructors. This differs from C99.

Bug: 139945549
Test: mm
Change-Id: Iadc96f8f0bf57181970ca3e96b5c5f68ac40a030
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
2019-10-10 13:08:34 -07:00
Ryan Mitchell
fa9362aec9 Merge "Add requiredSystemPropertyValue support in idmap2"
am: b30f65713f

Change-Id: Id9636ed8579775ba9ca91bc3f44bc481a89697a8
2019-10-02 13:32:16 -07:00
Ryan Mitchell
b30f65713f Merge "Add requiredSystemPropertyValue support in idmap2" 2019-10-02 16:48:50 +00:00
Brad Ebinger
05e03e8c0c Merge "Add Telecom command for setting connectionservice filter"
am: 25f4dca660

Change-Id: I00ba7ce3b64f4680eaf8798c52d98318160b45f0
2019-10-01 10:51:45 -07:00
Brad Ebinger
a9a33e1d68 Add Telecom command for setting connectionservice filter
For testing we need the emergency call to go through the CTS
ConnectionService. This is achieved by passing in a package
name filter for testing, which restricts which ConnectionServices
are available for emergency calling.

For safety this filter will be bypassed if the user calls an
actual emergency number (instead of a test number).

Bug: 138741228
Test: atest CtsTelecomTestCases
Change-Id: I656533e4a36a7bba48625bf6f763731991695aed
2019-09-30 17:46:36 -07:00
Brad Ebinger
64418f4c31 Merge "Integrate the active emergency session listener in TelephonyRegistry"
am: 4a54c2fa2b

Change-Id: I890a913c18332669dee8f21baf81db78a50a0fb0
2019-09-30 16:08:04 -07:00
Shuo Qian
b61230c51d Integrate the active emergency session listener in TelephonyRegistry
Add Telecom shell command: "adb shell telecom set-system-dialer"

Test: PhoneStateListener cts
Bug: 135204580
Merged-In: I5eaada6a671606642a849f0ff6fe964332d80d5f
Change-Id: I5eaada6a671606642a849f0ff6fe964332d80d5f
2019-09-30 20:43:42 +00:00
Gabriel Siqueira
d7fc4f774a Add requiredSystemPropertyValue support in idmap2
Up to Android P, there was this feature were we are able to
define "requiredSystemPropertyValue" in the AndroidManifest.xml
of the RRO apk, so that it will only be loaded if
requiredSystemPropertyValue/requiredSystemPropertyName are matched.

Porting support from idmap
https://android.googlesource.com/platform/frameworks/base/+/master/cmds/idmap/scan.cpp#135

To idmap2
https://android.googlesource.com/platform/frameworks/base/+/master/cmds/idmap2/idmap2/Scan.cpp#175

Bug: 140891738
Change-Id: I47752af93efa4563a60e336c1e1b1ffc081b51ec
2019-09-27 11:35:34 -03:00
Jeongik Cha
dee02a0fae Merge changes from topic "system_ext"
am: a828ee6442

Change-Id: I2b636d0c54c932342586de47a38c16e93bf978e8
2019-09-26 15:40:26 -07:00
Treehugger Robot
a828ee6442 Merge changes from topic "system_ext"
* changes:
  Consider overlay in system_ext as system's
  Support /system_ext partition
2019-09-26 22:18:07 +00:00
Mike Ma
af1f91a133 Merge "Add an API to dump incident report for dumpstate"
am: a11beeca12

Change-Id: If5ca98de9a5a85ae6e2aff90224a80e925ea419c
2019-09-23 21:17:34 -07:00
Mike Ma
a11beeca12 Merge "Add an API to dump incident report for dumpstate" 2019-09-24 01:07:25 +00:00
Mike Ma
15f83a3118 Add an API to dump incident report for dumpstate
Instead of just relying on the regular iteration through the system
services inside dumpstate, add another API to IIncidentManager
dedicated for dumpstate.

- It is only callable by dumpstate() (check the calling uid)
- It has the same behavior as the current call inside dump()

Advantages:
- More explicit function name, right next to takeIncidentReport will
  make it easier to keep them in sync.
- Nobody else can call it, make security easier.
- If dumpstate calls it explicitly, it can skip the 10 second timeout
- The regular dump() call should provide debugging data about
  incidentd itself, for example timestamps for the most recent N
  incident reports taken and the current state of the work directory,
  allowing us to debug incidentd itself.

Bug: 137493082
Test: Manually trigger a bug report, and verify
      /proto/incident_log.proto in the zip file.

Change-Id: I19139c765b53ede63d3beb3ea3ac40ada1aba42d
Merged-In: I19139c765b53ede63d3beb3ea3ac40ada1aba42d
2019-09-23 16:20:53 -07:00
Jeongik Cha
3e725f2224 Consider overlay in system_ext as system's
When there is overlay package in system_ext, turn on POLICY_SYSTEM_PARTITION.
In other words, overlay pacakge in /system_ext is considered as system's one

Test: mv vendor/overlay/framework-res__auto_generated_rro.apk system_ext/overlay
      and then check if it works properly.
Bug: 136715327

Change-Id: Ib225368eae41203a8630f4310d26e9cf1afa706a
Merged-In: Ib225368eae41203a8630f4310d26e9cf1afa706a
(cherry picked from commit cba9579158cc70bf8eadb6e8a239e0ab2dc073d2)
2019-09-23 22:01:29 +00:00
Steven Moreland
330c15e273 Merge "Host users of libutils trace use libcutils."
am: 4a17a712f5

Change-Id: I76a52b5b9d7c27c6a7058eb8a8f8e3e12899d802
2019-09-23 09:29:34 -07:00
Steven Moreland
598bda8624 Host users of libutils trace use libcutils.
Reducing device/host differences. This is now required since libutils
Trace.h always calls the libcutils functions, instead of before where
it only called these functions on device.

Bug: 124524556
Test: build & boot
Change-Id: Ic096ed7caf8ca59292b3427a16c4e2545d12dfd9
2019-09-20 11:27:59 -07:00
atrost
e36b1a142f Implement stats logging for Compatibility API.
Add a new atom and log from both the app process API and the system server API
Bug: 136794938
Bug: 138378110
Test: statsd_testdrive 228

Change-Id: I80f07d0beb30c779c4bce70bebf2bb4ab22f6bfe
Merged-In: I80f07d0beb30c779c4bce70bebf2bb4ab22f6bfe
2019-09-16 14:55:53 +01:00
atrost
1516d5290c Implement stats logging for Compatibility API.
Add a new atom and log from both the app process API and the system server API
Bug: 136794938
Bug: 138378110
Test: statsd_testdrive 228

Change-Id: I80f07d0beb30c779c4bce70bebf2bb4ab22f6bfe
Merged-In: I80f07d0beb30c779c4bce70bebf2bb4ab22f6bfe
2019-09-16 14:54:44 +01:00
TreeHugger Robot
ad324a3d7e Merge "Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master" into stage-aosp-master 2019-09-11 20:31:32 +00:00
Colin Cross
2e928fb62a Merge changes from topic "protobuf-3.9.1"
* changes:
  Convert statsd_test and statsd_benchmark to proto lite
  Adapt to google::protobuf::uint64 type change
2019-09-11 18:00:16 +00:00
Xin Li
d57e959e71 Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master
Bug: 135460123
Change-Id: I65906d82b14125c0893d5cde0cfebb73bf9e38ab
Merged-In: I1f2564837c33cd4c6c3db6aac3cbaf8c09707da9
2019-09-10 11:16:29 -07:00
Steven Moreland
0daed48a88 Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I136e4d4459bb8c3c5abf3c0758dd5ae14d0ad2a2
2019-09-09 16:28:55 +00:00
Colin Cross
959cc442a1 Convert statsd_test and statsd_benchmark to proto lite
libplatformprotos for the device is compiled using proto lite, and
statsd_test and statsd_benchmark have protos that reference the
libplatformprotos.  With protobuf 3.9.1 compiling a full proto
against a lite proto doesn't work.  Convert them to lite.  Requires
adding the protobuf internal protos to the sources,
libprotobuf-cpp-lite does not contain the compiled version of
field_options.proto.

Bug: 117607748
Test: m checkbuild
Change-Id: I0b101555ff604df17b2e3e06f3b3ce25adb1c9fb
Merged-In: I0b101555ff604df17b2e3e06f3b3ce25adb1c9fb
2019-09-06 13:54:11 -07:00
Colin Cross
f74defb808 Adapt to google::protobuf::uint64 type change
Protobuf 3.9.1 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long.  Use PRIu64 to print it, and add an implementation
of ProtoOutputStream::write for long.

Bug: 117607748
Test: m checkbuild
Change-Id: Ib2d3f4e17857f8ccbbe342ce6678e76b591df510
Merged-In: Ib2d3f4e17857f8ccbbe342ce6678e76b591df510
2019-09-06 13:54:11 -07:00
Yi Kong
9b00f181da Fix android-cloexec-pipe clang-tidy warning
The upcoming clang-tidy update finds a new instance of
android-cloexec-pipe warning:

FileUtilsTests.cpp:72:13: error: prefer pipe2() with O_CLOEXEC to avoid leaking file descriptors to child processes
ASSERT_EQ(pipe(pipefd), 0);
^~~~~~~~~~~~
pipe2(pipefd, O_CLOEXEC)

Apply the suggested fix by clang-tidy.

Test: build
Bug: 131328001
Exempt-From-Owner-Approval: Cherrypick
Change-Id: Iee772b5c3ed5e2af481e479dab19030f8419290a
Merged-In: Iee772b5c3ed5e2af481e479dab19030f8419290a
(cherry picked from commit f61e2167d5352b63eb34a086cdcb0dfec485bdf0)
(cherry picked from commit 1fa946a2f285283277d75bf741bfef05f6bc9d8e)
2019-08-23 16:46:05 +00:00
Yi Kong
fbafa5162a Disable modernize-use-trailing-return-type clang-tidy check
Upcoming clang update introduced the new modernize-use-trailing-return-type
check which is not useful. Disable this warning for now (even before the
new clang update lands) since clang-tidy doesn't complain about flags it
doesn't know.

Test: build with new clang-tidy
Bug: 131328001
Change-Id: I7fbc10fb9044904f85f9a1ec6cf712ce3cec0a79
Merged-In: I7fbc10fb9044904f85f9a1ec6cf712ce3cec0a79
Exempt-From-Owner-Approval: Trivial, no functionality change
(cherry picked from commit fc8e666d67afef241ddb6491ddc13948c3b837c0)
(cherry picked from commit a0914d81ef9f4d7258f1530dc3bfdd575f6e448d)
2019-08-22 22:33:37 +00:00
Colin Cross
dfa50902b8 Adapt to google::protobuf::int64 type change
Protobuf 3.9.1 redefines google::protobuf::int64 from long long
to int64_t, which is sometimes long and sometimes long long.  Use
PRIi64 to print it.  Also temporarily cast to int64_t to decouple
this change from the change that updates protobuf.

Bug: 117607748
Test: m checkbuild
Change-Id: I482b957d2262e5001140ed1153c7de2b17facae2
2019-08-14 16:32:22 -07:00
Miguel de Dios
961d48ab5c Merge "bootanimation: Change bootanim ioprio to highest in IOPRIO_CLASS_RT" into qt-r1-dev
am: f64c698ec7

Change-Id: Idf29cbd60434359de2ccfc9664ccec4526685b2c
2019-08-13 11:13:41 -07:00
Miguel de Dios
b717e8e8c2 bootanimation: Change bootanim ioprio to highest in IOPRIO_CLASS_RT
We see cases where bootanim is IO sleeping on boot and its causing
jank. Change the ioprio to the highest in an attempt to reduce this.

Bug: 138459662
Test: manual - flash and factory reset, looking for artifacts in the boot animation
Change-Id: I9734edea37c92e365a2b359a5180303e9b9284f7
2019-08-09 14:06:42 -07:00
Elliott Hughes
21f0d74043 Merge "Use String8 for UTF16 to UTF8 conversion." am: 527c91320d am: c3b0712ed2
am: 3c24dd8caf

Change-Id: I80b2a53cbfea246f1341d6169809582ff2988a81
2019-08-08 13:33:51 -07:00
Elliott Hughes
c3b0712ed2 Merge "Use String8 for UTF16 to UTF8 conversion."
am: 527c91320d

Change-Id: Ica55f07373dfada4729df8472b1bae71bf0011c3
2019-08-08 12:51:31 -07:00
Elliott Hughes
527c91320d Merge "Use String8 for UTF16 to UTF8 conversion." 2019-08-08 19:12:04 +00:00
Elliott Hughes
1f7b854d70 Use String8 for UTF16 to UTF8 conversion.
This is the only actual user of libcutils' jstring.h.

Test: treehugger
Change-Id: I0444d42e5a3ca57de3bffca48aa265f267c3d4dc
2019-08-08 09:36:14 -07:00
Hyunyoung Song
a708c25bc6 Merge "create ExclusionRectStateChanged/BackGesture atom" into qt-r1-dev
am: 7e9c5d047d

Change-Id: I840ad234db5e53553cc2d69dcda9b1644ea639d8
2019-08-04 01:28:27 -07:00
Hyunyoung Song
f1b935ea2e create ExclusionRectStateChanged/BackGesture atom
Bug: 135152789
Test: manual
Test: m statsd_testdrive -j31
Test: out/host/linux-x86/bin/statsd_testdrive [223|224]
Change-Id: Id4b36c89ed5bf3330795107fb6cd6750edcd0dbf
Merged-In: Id4b36c89ed5bf3330795107fb6cd6750edcd0dbf
2019-08-02 12:14:25 +00:00
Elliott Hughes
7d6f9a2274 resolve merge conflicts of 93fdd252d24da9da34fe76ba353f90f332c6abb5 to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ia98bcfb2dcc8bb45fbec4e2fb354fb1c6bea8ae8
2019-07-31 15:55:26 -07:00
Elliott Hughes
24667360c8 Remove product_is_iot.
Test: treehugger
Change-Id: I975f86999e4e40c06d6239fbc63e200042d37cc4
Merged-In: I975f86999e4e40c06d6239fbc63e200042d37cc4
2019-07-31 19:45:51 +00:00
Elliott Hughes
adea203cb0 Merge "Remove product_is_iot." into qt-dev-plus-aosp
am: 50e5baa5a2

Change-Id: I11d183c87e3ab5fdcf845197744c6ad807558365
2019-07-31 11:52:25 -07:00
Elliott Hughes
938a132791 Remove product_is_iot.
Test: treehugger
Change-Id: I975f86999e4e40c06d6239fbc63e200042d37cc4
2019-07-30 23:29:43 +00:00
Frank Li
762eb4a215 Add one field(sampling_rate_denom) in NetworkDnsEventReported for recording sample rate.
The sample rate of DNS stats(to statsd) is 1/sampling_rate_denom.

Bug: 119862317
Test: ./out/host/linux-x86/bin/statsd_testdrive 116

Merged-In: Iab542b32a8a18ae0bdbd8e005c430a876f056806
Merged-In: I9d37cac0bca53b3d7c6751ca69c1d304dfe17098
(cherry picked from commit 60d4f1a5bdc2a8412e285baf74e0e9a54b8c42d2)

Change-Id: If380a730942195db91a66944f103674c539ca7ad
2019-07-25 22:00:05 +00:00