85 Commits

Author SHA1 Message Date
Kweku Adams
f5cc5759d5 incidentd: parsing ps dump into proto.
Also changing from execv to execvp so that we don't have to specify the full command path.

Bug: 65750831
Test: atest incident_helper_test
Change-Id: I92191afff4e7f9a6d08ea22ecfc2de5623d3bde5
2018-01-02 15:49:23 -08:00
TreeHugger Robot
b944bc8607 Merge "incidentd: Parsing battery_type data to proto." 2018-01-02 23:33:44 +00:00
Kweku Adams
59e6fd792d incidentd: Parsing battery_type data to proto.
Bug: 65750835
Test: atest incident_helper_test
Change-Id: I3afefcfbd68924f8b6bd384cf1c7a41daeb243e3
2017-12-27 15:48:14 -08:00
Qingxi Li
5405836497 Add API to get eUICC's OTA status
The function will return current eUICC's OTA status and requests calling
app has WRITE_EMBEDDED_SUBSCRIPTIONS.

Test: E2E
Bug: 37279356
Change-Id: I823ed7aa9d86530c4bebd4c0b1a00f0c607105ed
2017-12-22 13:48:35 -08:00
abdalkader
e1a5469101 Merge "SMS over IMS APIs revision" am: 2bf7f03e63 am: f9eba1a18f
am: ca88d359c0

Change-Id: Iea7624e10230294505982f0373b97a2486d6996f
2017-12-21 20:10:03 +00:00
Brad Ebinger
b2a83cfcfc SMS over IMS APIs revision
- Move from being a feature to being a capability
- Move format to the constructor and make final
- Initial hooking up of APIs provided by platform for ims providers.
- Add constants for send status result
- Rename SmsListener callbacks.
- Split acknowledgeSms for sms and sms reports.
- Add reason for onSendSmsResult
Bug: 69846044

Test: None
Change-Id: I861664264a117d5483e392d4aabff59bfaf4373e
2017-12-20 17:18:50 -08:00
TreeHugger Robot
107f7cc4c4 Merge "Remove stream.proto and cpp-streaming-proto generates field name to id mapping by default" 2017-12-19 19:07:53 +00:00
Ricky Wai
04c17bec55 Merge "Add differential privacy library and algorithms" 2017-12-19 10:59:00 +00:00
TreeHugger Robot
81bfe137d0 Merge "Remove IIncidentReportCompleted and gmscore WW module would listen to android.intent.action.DROPBOX_ENTRY_ADDED and look up incident tag then upload the report." 2017-12-19 02:30:28 +00:00
Yi Jin
f68e747e05 Remove stream.proto and cpp-streaming-proto generates field name to id
mapping by default

Test: atest incident_helper_test
Change-Id: Iab04973ea78b942e44503fcd6ae60808caf3b9e0
2017-12-18 17:37:50 -08:00
Ricky Wai
0d1bc33285 Add differential privacy library and algorithms
- Created a differential privacy framework interface
- Added 2 DP algorithms in DP framework:
  -  Rappor, a wrapper based on external/rappor project
  -  Longitudinal Reporting, DP enhancement based on Rappor
- Created Privacy Tests for testing all privacy libraries
- Added original Rappor test case in privacy test
- Created tests to verify Rappor and Longitudinal Reporting result in DP framework

Test: bit FrameworksPrivacyLibraryTests:android.privacy.LongitudinalReportingEncoderTest
Test: bit FrameworksPrivacyLibraryTests:android.privacy.RapporEncoderTest

Change-Id: Id460665059653924434c141686b5cad3fb697046
2017-12-16 19:19:58 +00:00
TreeHugger Robot
6831a2646f Merge "Adds API for apps to push events to statsd." 2017-12-16 00:03:53 +00:00
Yi Jin
26ac0306ad Remove IIncidentReportCompleted and gmscore WW module would
listen to android.intent.action.DROPBOX_ENTRY_ADDED and look up
incident tag then upload the report.

Bug: 69860192
Test: N/A
Change-Id: I7f60ad631e8b3243e209aba9408f18bf0bfd4750
2017-12-15 15:35:34 -08:00
Brad Ebinger
a19ddec9b8 Merge "Adds MMTel APIs in temporary namespace" am: 4e54d6092b am: ac0d27659a
am: 0af882d629

Change-Id: I37c0ea61549282255f416855ec6663688e9d7cf3
2017-12-15 18:20:32 +00:00
Brad Ebinger
4e54d6092b Merge "Adds MMTel APIs in temporary namespace" 2017-12-15 17:53:16 +00:00
Colin Cross
2c37c058a0 Merge "Export aidl files for framework" am: f5e37d18de am: 28064dd526
am: 79aee072bb

Change-Id: I1491878b8d009c0fe8e688c2397ea9380ff0335c
2017-12-15 16:42:07 +00:00
David Chen
0a368b2c39 Adds API for apps to push events to statsd.
This API allows app to construct custom metrics based on labels
chosen by the app developers. Also added some buttons to manually
test this functionality in the dogfood app.

Test: Verified that Android can be built and tested with custom app.
Bug: 69522276
Change-Id: Ifb7abea4c1d62fb435a9cb6f32df12bc2234d82f
2017-12-14 16:19:29 -08:00
Colin Cross
4eb0784df4 Export aidl files for framework
Export the aidl files for framework so that anything building
against the framework automatically gets the default aidl
includes.

Test: m checkbuild
Change-Id: I26c599c79babd8ac91340a4e9d2c75d3f211f776
2017-12-14 15:25:33 -08:00
Brad Ebinger
ea8fd1bd0a Adds MMTel APIs in temporary namespace
This change adds the new MMTel APIs in a
temporary android.telephony.ims.internal
namespace so that integration work can start
from the ImsService side.

Once the APIs are finalized further and integrated
into the platform, the namespace will be moved
back to android.telephony.ims.

Tests and integration CLs to follow in
separate CLs. Anything that is not implemented
yet has a TODO.

Test: Manual
Bug: 63987047
Change-Id: Iec5e15438f6259c6edd9a308e66bebc92685c578
2017-12-14 14:51:12 -08:00
Joe Onorato
c9f1a9e3dd Merge "Fix how we build the statsd protos." 2017-12-14 05:33:33 +00:00
Joe Onorato
62c220b20b Fix how we build the statsd protos.
This lets us include frameworks protos, and use the constants
and messages from them.

Change-Id: I609d6e524f780e6a5beea543a68561bede47813e
Test: make
2017-12-13 18:26:45 -08:00
Jason Monk
74f5e36f49 Give SliceManagerService a concept of pinned slices.
Allow launcher/assistant to pin slices. Also allow other apps
with access to a slice to pin it dynamically by adding a listener
to it. Dynamic pinnings can expire when the host app dies because
the binder will no longer be alive.

Public docs and unhiding will come in a later CL with CTS tests.

Bug: 68378571
Test: runtest --path frameworks/base/services/tests/uiservicestests
Change-Id: I1dd9a839f547fc949922b766ba4b54e6d50f3125
2017-12-13 14:28:09 -05:00
Ricardo Quesada
ab086c5a3b Add Chromium ARC EventLogTags
Add EventLogTags for org.chromium.arc package.

Small CL that enables org.chromium.arc EventLogTags in master.

Bug: 70513529
Test: compiled on marlin. did not generate any conflict. marlin worked
      Ok.

Change-Id: I4bda5985c337e0b3434774c4b6b11c83d3ac49ed
2017-12-11 11:26:53 -08:00
Siyuan Zhou
070e318501 BootReceiver: Added an event log after the dropbox file copy is successful.
The log can be used to test if LAST KMSG or other items are copied
to dropbox successfully, especially in user builds without root
privilege.

BUG: 69685635

Test: manually verified the desired log from bugreport on user
and userdebug builds.

Change-Id: I6570d95538d678c98d261690ca3c20416d7a31c6
Merged-In: Ie6033bf04c7f79fc596761ab751aa5fcea2c1130
(cherry-picked from commit bafcd7b59519ce67738c870cf9b69a7c0583cc9b)
2017-12-08 22:51:23 +00:00
Siyuan Zhou
bafcd7b595 BootReceiver: Added an event log after the dropbox file copy is successful.
The log can be used to test if LAST KMSG or other items are copied
to dropbox successfully, especially in user builds without root
privilege.

BUG: 69685635

Test: manually verified the desired log from bugreport on user
and userdebug builds.

Change-Id: Ie6033bf04c7f79fc596761ab751aa5fcea2c1130
2017-12-08 09:52:17 -08:00
Colin Cross
98a40befbf Merge "Remove logtags property" am: f2ed7683da am: 9367657b27
am: a7cfd1e93d

Change-Id: I95218306f0acb891f7a8324ad8f94ace4ae48886
2017-12-08 16:48:10 +00:00
Colin Cross
af4e47892d Remove logtags property
logtags previously needed to be listed in logtags and srcs, now
they only need to be listed in logtags.

Test: m checkbuild
Change-Id: I7750116675d9497782642a9b8c86288d42bf0a54
2017-12-07 17:56:12 -08:00
TreeHugger Robot
2e24967956 Merge "Add system service for slices" 2017-12-06 15:58:46 +00:00
Calin Juravle
d3392daa3b Merge "Add SystemApis to expose runtime profile information" 2017-12-05 19:10:34 +00:00
Jason Monk
8f5f7ff5fa Add system service for slices
Will be used to manage permissions and possibly pinned state for slices.

Test: manual
Change-Id: Ie53f4988f817ac5b920087567dbac751e2857dbf
2017-12-05 13:37:37 -05:00
Colin Cross
f62c26562f Merge "Don't use path to find protoc-gen-javastream" am: 1a2a45667b am: 1c578e8032
am: b8e4d0e561

Change-Id: I4a9d4dfb15d958b28cf329c5ebc0009654345fbf
2017-12-05 05:52:02 +00:00
Colin Cross
1c578e8032 Merge "Don't use path to find protoc-gen-javastream"
am: 1a2a45667b

Change-Id: Idf4e12d812cf9108f8c3b22057e0bcbd90c14807
2017-12-05 05:33:47 +00:00
Colin Cross
6471db9b71 Don't use path to find protoc-gen-javastream
Previous attempts to use a full path in the --plugin argument
failed, but that was because the --plugin argument had the wrong
name (protoc-gen-java-stream instead of protoc-gen-javastream)
and was being completely ignored.  Passing a full path where
the last element of the path is protoc-gen-javastream works fine.

Fixes issues where the command line is expanded with $PATH in
it 58 times which could hit command length limits if $PATH was
even a little bit larger than the default.

Test: m framework
Change-Id: Icd336f522fb8770d9058d18d8a04d24a96405615
2017-12-05 01:09:52 +00:00
Calin Juravle
45f8b29ce0 Add SystemApis to expose runtime profile information
The API allows a system apps which acquired
{@code android.permission.READ_RUNTIME_PROFILE} to snapshot the runtime
profiles of installed packages.

The API is implemented in a new service class (AndroidRuntimeManager)
accessible from the context using
context().getPackageManager().getAndroidRuntimeManager().

The main functionality is exposed as a one way call into the
AndroidRuntimeManager with the result being posted on a callback. The
profile is available to the caller as a read-only ParcelFileDescriptor.

This CL only adds the API interfaces and validation. It does not fully
implement the functionality.

oneway void snapshotRuntimeProfile(in String packageName,
  in String codePath, in ISnapshotRuntimeProfileCallback callback)

Bug: 30934496
Test: gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases

Change-Id: Iaa6be4715840f24508acba3162ea9c1ab725bd38
2017-12-04 14:26:46 -08:00
Colin Cross
943e2aa7ef Convert framework.jar to Android.bp
Use Soong to build framework-res.apk and framework.jar.
See build/soong/README.md for more information.

Bug: 69917341
Test: m checkbuild tests docs
Test: manually compare framework.jar and framework-res.apk
Test: manually compare out/target/common/docs
Change-Id: Ibdfe1cbf34d97c43f4857c2c5d7604fa72d5b5a4
Merged-In: Ibdfe1cbf34d97c43f4857c2c5d7604fa72d5b5a4
(cherry picked from commit cf3a0b5355c6138538f9f3d4b369a875814bc01c)
2017-12-03 20:23:43 -08:00
Colin Cross
5f4dcf6702 Convert framework.jar to Android.bp
Use Soong to build framework-res.apk and framework.jar.
See build/soong/README.md for more information.

Bug: 69917341
Test: m checkbuild tests docs
Test: manually compare framework.jar and framework-res.apk
Test: manually compare out/target/common/docs
Change-Id: Ibdfe1cbf34d97c43f4857c2c5d7604fa72d5b5a4
Merged-In: Ibdfe1cbf34d97c43f4857c2c5d7604fa72d5b5a4
(cherry picked from commit cf3a0b5355c6138538f9f3d4b369a875814bc01c)
2017-12-03 17:50:34 +00:00
Colin Cross
eb63393fdf Merge "Convert framework.jar to Android.bp" 2017-12-02 23:20:49 +00:00
Yi Jin
bdf58942c8 1. Implement Privacy Policy Tag Inheritance
2. Expose Dest values in IIncidentReportArgs.h

Please see bug for detail descriptions.

Bug: 67869340
Test: unit tested and on-device test. Ran command:
$ out/host/linux-x86/bin/incident-section-gen incidentd
to test various of privacy taggings.
Change-Id: I12af3d7da4c7c72bd63598893fe2c1f70b09baa4
2017-12-01 13:37:13 -08:00
Colin Cross
cf3a0b5355 Convert framework.jar to Android.bp
Use Soong to build framework-res.apk and framework.jar.
See build/soong/README.md for more information.

Bug: 69917341
Test: m checkbuild tests docs
Test: manually compare framework.jar and framework-res.apk
Test: manually compare out/target/common/docs
Change-Id: Ibdfe1cbf34d97c43f4857c2c5d7604fa72d5b5a4
2017-11-30 14:14:08 -08:00
Yi Jin
0dc7e54400 Merge "Implement Cpu Freq Section" 2017-11-20 19:34:15 +00:00
Nan Zhang
24c9924797 Merge "Build fontchain_lint using python_binary_host" am: 7ecac139ea am: 7ade558ad2
am: 67695d3aff

Change-Id: I850304f79c1c35bfeb6951307b8ca2365da0330b
2017-11-17 22:30:37 +00:00
Nan Zhang
2db709de30 Build fontchain_lint using python_binary_host
Test: out/host/linux-x86/bin/fontchain_lint
out/target/product/generic/system true external/unicode
Bug: b/27727331

Change-Id: Ib9353d2338c3b939027069f49e3e847c65526581
2017-11-17 09:22:12 -08:00
Yi Jin
0eb223496c Implement Cpu Freq Section
When poll from sysfs, revents return POLLERR by default, handles
this edge case in this cl.

Bug: 68774444
Test: unit tested + on device tests
Change-Id: I23540299c026d3e7676497f56690e9f8646a47bd
2017-11-14 13:22:25 -08:00
Yi Jin
0dfa752e67 Implement System Properties Section
Bug: 68774852
Test: unit tested and on device tests
Change-Id: I0d4aadf8d4203fe56e35bbfb77e5c532116fd27e
2017-11-14 10:54:24 -08:00
Yi Jin
e2f7f79d02 Implement Cpu Info Section
Support carriage return in Read class, and add a new way to parse lines
which is not able to split purly by delimiters

Bug: 65642861
Test: unit test and on device test
Change-Id: Ib82dd4e458bb7d2fa33462b23fbe11b828325916
2017-11-10 17:34:07 -08:00
Yi Jin
04625ad488 Refactor incident_helper to use protoutil and cppstream plugin.
1. Split the parsers to its own file to prevent all the parsers in one
gaint file.

2. Completely get rid of protobuf-cpp-full in incident_helper, use
ProtoOutputStream and cppstream instead, the incident_helper binary is
reduced from ~500K to ~113K.

3. Write data to protobuf even its values are zero/default, the reason
is for example we have a repeated int32 orders = 1; and people
explicitly append 0 so the total repeated field has 10 values, if zero
is not written to serialized data, this repeated field will only have 9
values which is not what we want at first place. This also aligns with
the default protobuf serialization behavior in incident_helper_test.

4. Use Android.bp for protoutil lib since it is not able to depend on
libs compiled by .mk file, it works the other way.

5. Add a new custom message option for streaming_proto, if specified,
the cppstream will create extra metadata to get field ids by field name.
A Table class is created in incident_helper to use it.

Bug: 67860303
Test: unit tested as well as on device test
Change-Id: I8e136fd15f343a4a623d20910ec64b622b478a3e
2017-10-31 16:54:38 -07:00
Colin Cross
9de94c628b Merge "Convert framework-protos to Android.bp" am: d4609af986 am: d78b46eb63
am: 5fec62ceb7

Change-Id: Ice5e7dfcf2ac8d58cde7cc5691271e318a45582d
2017-10-26 01:42:45 +00:00
Colin Cross
747e7c15d8 Convert framework-protos to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Change-Id: Id7992ff0cc5d631b64c1fa8e82e8a130ea508236
2017-10-24 17:48:49 -07:00
Jeff Sharkey
01478ec183 Export AIDL for keystore Android.bp.
Test: builds, boots
Bug: 67041047
Change-Id: Iaff1de1f9c015a824ffc1f4946ced4a13d9bd7c1
Merged-In: Iaff1de1f9c015a824ffc1f4946ced4a13d9bd7c1
(cherry picked from commit 0c686e78ad2fbfc9e814bdd3abc5bd66c858c60f)
2017-10-24 16:09:01 -07:00
Jeff Sharkey
0c686e78ad Export AIDL for keystore Android.bp.
Test: builds, boots
Bug: 67041047
Change-Id: Iaff1de1f9c015a824ffc1f4946ced4a13d9bd7c1
2017-10-23 16:04:35 -06:00