Commit Graph

301953 Commits

Author SHA1 Message Date
Joe Onorato
1754d744a7 First checkin of incident reporting.
There are a few major pieces here:

incidentd
---------
This daemon (started by init) runs and accepts incoming requests to take
incident reports.  When prompted, it calls into various system services
and fills in an IncidentProto data structure, and then writes the report
into dropbox.

The next steps for incidentd:
    - Security review of SELinux policies. These will be a subset of
      the dumpstate permissions.  Until this is done, incidentd is
      not started at boot time.

incident
--------
This shell command calls into incidentd, and can initiate an incident
report and either capture the output or leave for dropbox.

incident_report
---------------
This host side tool can call adb shell with the correct parameters
and also format the incident report as text.  This formatting code
was left of the device on purpose.  Right now it's pretty small, but
as the number of fields increases, the metadata and code to do the
formatting will start to grow.

The incident_report command also contains a workaround to let it
work before incidentd is turned on by default.  Right now, it is
implemented to call adb shell dumpsys <service> --proto directly,
whereas in the future it will go through the full incidentd flow.

incident_section_gen
--------------------
A build-time tool that generates a stripped down set of information
about the fields that are available.

libincident
-----------
This library contains the code to connect to incidentd, and the
meta proto definitions that are used by the framework protos.
The basics are here now, but they are not fully fleshed out yet.
The privacy.proto file contains annotations that can go in the
proto file that we will later use to filter which fields are
uploaded, and which are used by local sources.  For example, a
device in a test lab is safe to upload much much more information
than a real user.  These will share the same mechanism, but the
user's output will be filtered according to these annotations.

frameworks/core/proto
---------------------
These .proto files contain the definitions of the system's
output.  There is one master android.os.IncidentProto file that
is the top level of an incident report, but some other services
(notification, fingerprint, batterystats, etc) will have others
that are used directly by the logging mechanism.

Other files which are shared by several of the services also go
here, such as ComponentName, Locale, Configuration, etc.  There
will be many more.

There is also a first iplementation of a dump method handling
--proto in the fingerprint service.

IncidentManager
---------------
The java API to trigger an incident report.

Test: Not written yet
Change-Id: I59568b115ac7fcf73af70c946c95752bf33ae67f
2016-12-15 11:23:05 -08:00
Joe Onorato
de5b027d2c Add a native class to interact with DropBoxManager.
Test: Not written yet
Change-Id: I63ed888bd76f75c78a244a1bffae2d26f3b5f055
2016-12-15 11:23:05 -08:00
Phil Weaver
354fe934d6 Merge "Add null check to a11y interrupt. am: 74f9e1b867 am: 278782f275" into nyc-mr2-dev-plus-aosp
am: 87d9244976

Change-Id: I596c43e798d9f975fc2b6a29bf078cf7d763447a
2016-12-15 19:19:54 +00:00
Phil Weaver
d434068dd7 Add null check to a11y interrupt. am: 74f9e1b867 am: 278782f275
am: a1e8241740

Change-Id: I0814b0246c122663c0575fd01c398919d5ab1ab7
2016-12-15 19:19:48 +00:00
Phil Weaver
bf4dd8faec Add null check to a11y interrupt. am: 74f9e1b867 am: 718f403b50
am: 037692d5ab

Change-Id: Ia7861d3799cb11d3c1fe98208386c020f8110dea
2016-12-15 19:18:34 +00:00
jackqdyulei
bde96b06d3 Add tint color for dot icon
Bug: 32592245
Test: Manual
Change-Id: Ie80b98a90978cd93fb5485f434f43f019a6c59b1
2016-12-15 11:14:15 -08:00
Android Build Merger (Role)
87d9244976 Merge "Add null check to a11y interrupt. am: 74f9e1b867 am: 278782f275" into nyc-mr2-dev-plus-aosp 2016-12-15 19:12:53 +00:00
Phil Weaver
037692d5ab Add null check to a11y interrupt. am: 74f9e1b867
am: 718f403b50

Change-Id: I9d70640813bd91e035f9614f0403e18b7706e53f
2016-12-15 19:12:02 +00:00
Phil Weaver
a1e8241740 Add null check to a11y interrupt. am: 74f9e1b867
am: 278782f275

Change-Id: I92d0cce490535b667a10de46fe0e24fad6305c13
2016-12-15 19:11:56 +00:00
TreeHugger Robot
98173a3bc7 Merge "Import translations. DO NOT MERGE" 2016-12-15 19:06:06 +00:00
Phil Weaver
278782f275 Add null check to a11y interrupt.
am: 74f9e1b867

Change-Id: I51bcf42327f30a0c6b1dc7666a5c057d44eec98c
2016-12-15 19:05:00 +00:00
Phil Weaver
718f403b50 Add null check to a11y interrupt.
am: 74f9e1b867

Change-Id: I8bb63b88a12ab6f8dfae42918ab9fdf4b1a457b5
2016-12-15 19:04:59 +00:00
TreeHugger Robot
ce2f10d700 Merge "Fix failing SkiaPipeline unit tests" 2016-12-15 19:00:13 +00:00
Philip P. Moltmann
126913cb3a Ignore commands if service connection is destroyed.
Test: Print CTS tests (currently affected by b/33449823). Print spooler
      unit test
Fixes: 33106285
Change-Id: I5c771b17992ef627ce5ac3a66a02358c4540893c
2016-12-15 10:53:02 -08:00
John Reck
eb418edae4 Actually fix pixelcopy for 90/180/270 rotation
Bug: 33421965
Test: PixelCopyTest testWindow* CTS tests
Change-Id: I1b49b3643c5d030c3d2de95de4a0ce3a4ff0111d
2016-12-15 10:26:33 -08:00
Tom O'Neill
a206a0f17e Fix exploit where can hide the fact that a location was mocked
- Even if call setTestProviderLocation() with inconsistent providers,
should still end up with a location that is flagged as mocked

- Bug: 33091107

Change-Id: I39e038f25b975989c2e8651bfd9ec9e74073e6cd
2016-12-15 10:26:28 -08:00
dcashman
b1cc4f8ca4 Split mac_permissions.xml into plat and non-plat components.
Bug: 31363362
Test: Bullhead and Sailfish both build and boot without new denials.
Change-Id: Ic9523ce4b0755d6c585548f4f2b1f00e7000195b
2016-12-15 10:04:38 -08:00
Makoto Onuki
ab99c11c55 Merge "ShortcutManager: direct pin shortcut support." 2016-12-15 17:59:39 +00:00
Matt Sarett
9cf894cd4e Merge "Decode to sRGB in BitmapFactory" 2016-12-15 17:07:48 +00:00
Julia Reynolds
03c548f292 Volume header changes
- Show always
- Update locale immediately

Bug: 31847162
Bug: 33277887
Test: manual
Change-Id: I89c5cbddf08df3a9eba20f2fb3b76eec69926777
2016-12-15 11:42:37 -05:00
TreeHugger Robot
87a66afec2 Merge "IP Connectivity metrics: add connect() statistics" 2016-12-15 16:09:18 +00:00
TreeHugger Robot
8732a47a9d Merge "Change notification shade ordering." 2016-12-15 16:06:00 +00:00
Stan Iliev
ed4d58cc33 Fix failing SkiaPipeline unit tests
Fix SkiaPipeline unit tests failure, caused by double deallocation
of SkCanvas in DeferLayer.

Test: build and ran angler-eng, ran HWUI unit tests.
Change-Id: I4a0a0113588e40a8ed32093d57efc6af3c0d7745
2016-12-15 09:52:15 -05:00
Michal Karpinski
d1c0bfd58e DO NOT MERGE Make NetworkLogger.mIsLoggingEnabled an AtomicBoolean am: 92cd0ce92d
am: abad2df4c2  -s ours

Change-Id: Ibdd5c75415740869d0fc36b1dc04daa7e61ba386
2016-12-15 14:39:14 +00:00
Michal Karpinski
abad2df4c2 DO NOT MERGE Make NetworkLogger.mIsLoggingEnabled an AtomicBoolean
am: 92cd0ce92d

Change-Id: I598cd5962f9e38750d528f480b7a99e3357fc437
2016-12-15 14:31:47 +00:00
Nicolas Prévot
1548d5c43b Merge "Use affiliation ids when checking bind target users." 2016-12-15 14:31:39 +00:00
TreeHugger Robot
2cefcb3c56 Merge "Make master clear constants system APIs." 2016-12-15 14:11:59 +00:00
Matt Sarett
2312cdcaa3 Decode to sRGB in BitmapFactory
Test: Verified content looks as expected.  Color correct
modes are well tested in Skia.

Change-Id: I922540f0a16df8693e2c30944b595538c34c583a
2016-12-15 09:01:06 -05:00
Hugo Benichi
2299a1c401 DO NOT MERGE IP Connectivity metrics: add connect() statistics
This patch adds a ConnectStats class to aggregate connect() statistics
gathered in NetdEventListenerService. ConnectStats is uploaded once a
day by IpConnectivityMetrics.

Test: $ runtest frameworks-net + new unit test
Bug: 32198976

(cherry picked from commit 4f71a15973f7048076ed10f63d708f020e1a21e0)

Change-Id: I1450c126b90b628d9f1c73ddf054b4742f5e84c5
2016-12-15 22:56:36 +09:00
Hugo Benichi
0d4a398b78 IP Connectivity metrics: add connect() statistics
This patch adds a ConnectStats class to aggregate connect() statistics
gathered in NetdEventListenerService. ConnectStats is uploaded once a
day by IpConnectivityMetrics.

Test: $ runtest frameworks-net + new unit test
Bug: 32198976
Change-Id: Iea63339035415513a5ba0ff4b8f4d79f75fc652d
2016-12-15 22:53:53 +09:00
Michal Karpinski
b775737e95 Merge "Make NetworkLogger.mIsLoggingEnabled an AtomicBoolean" 2016-12-15 12:57:04 +00:00
Michal Karpinski
92cd0ce92d DO NOT MERGE Make NetworkLogger.mIsLoggingEnabled an AtomicBoolean
Fixes a potential race condition - when enabling/disabling the logging
some events might have been lost.

Bug: 29748723
Change-Id: I8a436d525393b2314805e287eddcea26d4ec073b
2016-12-15 12:54:36 +00:00
Michal Karpinski
d8145f6743 Make NetworkLogger.mIsLoggingEnabled an AtomicBoolean
Fixes a potential race condition - when enabling/disabling the logging
some events might have been lost.

Bug: 29748723
Change-Id: I8a436d525393b2314805e287eddcea26d4ec073b
2016-12-15 12:53:48 +00:00
Erik Kline
61a2e68ade Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity." am: 80ff5ecd4a am: cdcc931d93 am: 62c1d307e3
am: 7fed2942ea

Change-Id: Icd6e6452cfb2f1ee460851db95fa42f8d25f3279
2016-12-15 12:43:16 +00:00
Erik Kline
7fed2942ea Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity." am: 80ff5ecd4a am: cdcc931d93
am: 62c1d307e3

Change-Id: I05da79d601d412270a71026bbbad3c516a785422
2016-12-15 12:35:13 +00:00
Hugo Benichi
93c0de0a35 DO NOT MERGE Fix IP connectivity metrics tests
So that test assumptions match previous changes in ipconnectivity.proto.

This patch also tags metrics tests with @SmallTest.

Test: $ runtest frameworks-net
Bug: 32561414
Bug: 32198976

(cherry picked from commit 80df43ea8a)

Change-Id: I8926a92248ac2d46fc78749afc40bc5f0de10878
2016-12-15 21:31:25 +09:00
Hugo Benichi
097bde6c8f DO NOT MERGE IP connectivity metrics: introduce ConnectStatistics and DNS statistics
This patch introduces a ConnectStatistics message for collecting
Android devices connect() statistics.

It also changes DNS latency events to be grouped by (query_type,
query_return_value) to optimize space usage. For this purpose, a new
DNSLookupLatencies message is introduced and DNSLookupBatch is
deprecated. New counter fields are added for the number of queries,
and number of responses with A and AAAA records.

Test: manually taking a diff with reference ipconnectivity.proto
Bug: 32198976

(cherry picked from commit 7c3a786921)

Change-Id: I54403377bc5d4c7a1c77b563c588e5210edf56e5
2016-12-15 21:31:25 +09:00
Hugo Benichi
4c9d3f19cd DO NOT MERGE IP connectivity metrics: add transport field.
This patch adds a transport field dimension to IpConnectivityEvent for
replacing interface name, and eventually network ids.

At the moment the transport field is not populated.

Test: manually taking a diff against reference ipconnectivity.proto
Bug: 32198976

(cherry picked from commit 807124a7f5)

Change-Id: Idf2167973c322153659b8e755d8be973e70d972a
2016-12-15 21:31:25 +09:00
Erik Kline
62c1d307e3 Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity." am: 80ff5ecd4a
am: cdcc931d93

Change-Id: Ib46bdab897cef221f4c22326e562130822d42298
2016-12-15 12:28:41 +00:00
Lenka Trochtova
73aeea2da2 Make master clear constants system APIs.
This is needed for unbundling of the OobConfig apk.

Test: gts-tradefed run gts -m GtsGmscoreHostTestCases --test com.google.android.gts.devicepolicy.DeviceOwnerUserRestrictionTest#testFactoryReset_disallowFactoryReset

Bug: 32974361

Change-Id: I71e7270bb4c3234ec0516382b18a2ca35aab4c81
2016-12-15 13:25:09 +01:00
Erik Kline
cdcc931d93 Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity."
am: 80ff5ecd4a

Change-Id: If85702e1cc44967841ab91d723aa627862bcda21
2016-12-15 12:22:06 +00:00
Michal Karpinski
67ed651dab Merge "[DPM] Allow lower strong auth timeout on debuggable builds" 2016-12-15 12:20:27 +00:00
Erik Kline
80ff5ecd4a Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity." 2016-12-15 12:10:17 +00:00
Joachim Sauer
b07ff47024 Merge "API updated for ICU4J 58.1" am: 9e3b160fc3 am: d20aebb443 am: c066d73c32
am: be12d9bfd3

Change-Id: I54236850068cd458725df9440b69a23fc8562c83
2016-12-15 12:09:26 +00:00
Joachim Sauer
be12d9bfd3 Merge "API updated for ICU4J 58.1" am: 9e3b160fc3 am: d20aebb443
am: c066d73c32

Change-Id: Ie3f10df12dd96d9e002bdef017759c394aa3e780
2016-12-15 11:54:42 +00:00
Hugo Benichi
e8fe0aaab9 DO NOT MERGE Netd events: record connect() success/errno
Test: $ runtest frameworks-net pass
Bug: 32198976

(cherry picked from commit 8b06bcdfd2)

Change-Id: I527f98c28b31f490ea999222ef8d0b685a2f24ed
2016-12-15 20:51:14 +09:00
Joachim Sauer
c066d73c32 Merge "API updated for ICU4J 58.1" am: 9e3b160fc3
am: d20aebb443

Change-Id: Ib3ddf7441306adca048e2ef5c6cda31bb2543df6
2016-12-15 11:39:37 +00:00
Hugo Benichi
84daaea8fd DO NOT MERGE Network notifications: revamp keying scheme
This patch changes the (tag: String, id: Int) keying scheme for network
notifications so that TRON notification counters can count network
related notifications unambiguously.

TRON instruments all notifications shown for package "android" as well
as user interactions with these Notifications. These counters are
grouped by id. However the network notifications ("no internet" dialog,
"captive portal sign in" dialog, ...) use a static tag and a dynamic id
for keying notifications, preventing the counters to correctly
aggregate. In addition there is also the risk of collision with other
SystemUi notification ids not managed by NetworkNotificationManager.

In order to make the TRON counters useful for network notifications,
the id is now encoding the network notification type in a stable way
while the tag is used to uniquely identify network notifications.

Test: change covered by previously added new unit tests.
Bug: 32198726
Bug: 33030620

(cherry picked from commit fb2609d3ee)

Change-Id: Iadf7f15da38de28587090ed0395f15c24d4ad442
2016-12-15 20:31:11 +09:00
Joachim Sauer
d20aebb443 Merge "API updated for ICU4J 58.1"
am: 9e3b160fc3

Change-Id: If8d8b9708217442bf23f092ef2e1bfd235926aff
2016-12-15 11:24:52 +00:00
Joachim Sauer
9e3b160fc3 Merge "API updated for ICU4J 58.1" 2016-12-15 11:16:41 +00:00