29 Commits

Author SHA1 Message Date
Svet Ganov
5d1ea59573 Prune unused static libs and instant apps if space needed am: f36d53cbfc
am: a8505b5448

Change-Id: I27762e5bf5141f7cc14a43163e67fcef13785419
2017-05-31 03:59:35 +00:00
Svet Ganov
f36d53cbfc Prune unused static libs and instant apps if space needed
We are caching unused static shared libs and instant apps
(installed and uninstalled) opportunistically. If space is
needed we delete these to free up space.

Test: manual

bug:62045000

Change-Id: Id992dee5c7c6e36b8e8b81050602dbc4eeafb0f9
2017-05-31 02:30:41 +00:00
Kevin Chyn
f8567234e0 Merge "strong fp lockout after 20 failed attempts" into oc-dev am: 310818ff82
am: 3ed8955aa3

Change-Id: Id8de8c421f31faa6ec30a8bd1e8d5d2585642363
2017-05-13 00:03:18 +00:00
John Reck
cefa024e73 Merge "Switch to protobuf lite" 2017-05-12 22:21:25 +00:00
Kevin Chyn
df9d33e903 strong fp lockout after 20 failed attempts
Fingerprint currently locks out for 30s after every 5 failed attempts.

This change makes it so that in addition to the above,
PIN/pattern/password will be required after 20 failed attempts.

Fixes: 35954316

Test: manual
Change-Id: I3aeb0e5b5b4d5011555f60fbe6cc2c1ce702a670
2017-05-12 13:01:01 -07:00
John Reck
915883b9f0 Switch to protobuf lite
Fixes: 36272398

Protobuf lite isn't just smaller, it also doesn't
have the problematic DescriptorPool at all. So no
need to switch this to a shared library.

Test: hwui_unit_test passes and doesn't crash. CTS incident tests pass
as well

Change-Id: I2693ba2c47af89a5c561c4f63cc7e1f509ebbbec
2017-05-12 10:44:46 -07:00
Chris Wren
89aa226190 add a global control for badging
Content observer callbacks don't specify the user,
so scan all the users we know about. User switches
will also trigger an update which will explicitly
check the setting for the (now) current user.

Migrate tests to TestableContext to allow the test
to safely override secure settings.

Bug: 36021111
Test: runtest systemui-notification
Change-Id: I588068382912955da114cc351df7a1e7b4f0733f
2017-05-11 17:19:01 -04:00
Antony Sargent
f5772c6121 Add persistent state for Bluetooth high quality audio support
Defines the flags used in code and the Settings.Global key names for
persisting the following state for Bluetooth A2DP Sink devices:
-Whether the device supports optional codecs or not
-Whether optional codecs should be turned on for the device

For each of these two properties we model the state in the code as
yes/no/unknown, so that we can tailor the UI and behavior
accordingly.

Bug=37441685
Test: manually

Change-Id: I6bcd02fd7c95bef989575f3b13d4788dab61971a
2017-05-03 04:36:51 +00:00
Makoto Onuki
9b1613de0a Add missing services to incident_report
Bug 37306229
Test: Manual test with "incident_report battery diskstats package"

Change-Id: I10c6e4514581aeef77e2609acc031ef38edb12f2
2017-04-17 15:37:57 -07:00
Jesse Evans
fc1bfc442c Rename WEB_ACTION_ENABLED to INSTANT_APPS_ENABLED
Renames the instant apps setting to reflect what it is for.

Adds the SystemApi annotation to make this field visible
to the resolver and installer.

Test: existing tests

Change-Id: I1651bb101d69bdfdaa63c004435025c68a33cd8e
2017-04-12 07:00:51 -07:00
Donghyun Cho
c1fa9afbcd CEC: Revisit the behavior of HDMI_SYSTEM_AUDIO_ENABLED
Currently the system setting, HDMI_SYSTEM_AUDIO_ENABLED, is used to
store the latest system audio mode status so that TV can keep this
status over reboot. But because the name is a little confusing and the
behavior isn't intuitive, it is likely to use this in a wrong way.
This change renames this setting to HDMI_SYSTEM_AUDIO_CONTROL_ENABLED
and tweak the purpose of it. Now, it will act more like a switch for
System Audio Control feature, so user can disable or enable this feature
entirely. With this way, implementation of audio output option will
also become easier.

Bug: 31449672
Test: Tested on archer
Change-Id: Ice8717135272d4b86665a3452bfe7527c0d6c08b
(cherry picked from commit 7b7aa8fb31ccf0cd3f36162a52f080263dd89e77)
2017-03-13 20:00:58 +09:00
Felipe Leme
640f30a776 Replaced auto-fill by autofill to keep it consistent with API style.
This change will affects 2 types of apps: autofill service implementations
and apps that use autofill APIs.

Since just the former is known to be used at the moment, we're not trying
to keep backward compatibility with the latter.

Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Test: android.provider.SettingsBackupTest pass

Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
2017-03-09 08:14:49 -08:00
Netta Peterbursky
bf07da5650 Merge "Protobufferize PowerManager dumpsys" 2017-02-24 21:36:19 +00:00
Netta P
958d0a5036 Protobufferize PowerManager dumpsys
Bug: 34230125
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCase -t com.android.server.cts.PowerIncidentTest
Change-Id: Ib71563cfc9ca95c297111430d8bbe2ce88d7a41d
2017-02-23 15:19:11 -08:00
Netta P
426cbefdf3 Protobufferize PackageManager dumpsys
Bug: 34230809
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCase -t com.android.server.cts.PackageIncidentTest
Change-Id: I6dc455db47a8a636267cf7abe993e135e9044b33
2017-02-23 09:34:32 -08:00
John Reck
df1742ed47 Overhaul GraphicsStatsService
* LRU cache of recently-used is dead, replaced
  disk storage
* ASHMEM size is read from native by the system service,
  no longer requires keeping a sizeof() in sync with a
  constant in Java
* Supports dumping in proto format by passing --proto
* Rotates logs on a daily basis
* Keeps a history of the most recent 3 days

Bug: 33705836
Test: Manual. Verified log rotating works by setting it up to
rotate every minute instead of day. Confirmed /data/system/graphicsstats
only has the most recent 3 entries after several minutes

Change-Id: Ib84bafb26c58701cc86f123236de4fff01aaa4aa
2017-02-21 09:49:10 -08:00
Julia Reynolds
520df6e74a Add logs, reorder bugreport.
Bug: 32986903
Bug: 34227881
Test: cts hostside
Change-Id: Ic5dfe4be5632c6bd7c70115c6a60b060d23be9bd
2017-02-15 15:25:28 +00:00
Jeremy Joslin
c9eb3c4651 Add a new setting to store the network recommendation app.
Test: manual
Bug: 35095406
Change-Id: I3d0b7f3b977c0862969d61a4e46f12151eb15417
2017-02-09 08:43:19 -08:00
Julia Reynolds
c9842c1627 Dump notification records to proto
Bug: 34227881
Test: cts
Change-Id: I1b55d37ee73a17330f4039a50bdf05e9ce1be24d
2017-02-07 15:46:10 -05:00
Netta Peterbursky
886cc09383 Merge "Protobufferize BatteryManager dumpsys" 2017-02-03 20:50:12 +00:00
TreeHugger Robot
4fc4100e2d Merge "Add comment to netstats proto" 2017-02-02 21:21:14 +00:00
Makoto Onuki
9e0800d3b7 Add comment to netstats proto
Test: Build only
Change-Id: I29d7dbda0f0a8b393f250a9106bcb696e0c2431a
2017-02-02 10:54:03 -08:00
Netta P
e2a3cd8f69 Protobufferize BatteryManager dumpsys
Bug: 34227623
Test: cts-tradefed run cts-dev -t CtsIncidentHostTestCases
Change-Id: I6e36d725c50105ad1f6f86f890db49ea253907c0
2017-02-02 10:41:48 -08:00
Mario Bertschler
86882f4587 App Widget Service with dump in protobuf format
Test: This protobuf format is validated as a CTS test
Bug: 33088921
Change-Id: I9d2a983052ade06cd3a13857b7e7f9e3d9bc275e
2017-02-01 10:58:31 -08:00
Eugene Susla
d72c39709d Add ability to dump settings as proto buf
Test: Extracted the result via proto bug and as text and compared,
      ran new CTS Setting incident test
Change-Id: Icf7b54b9c5c0a613dfd413ad575001c7b637ca01
2017-01-22 15:25:22 -08:00
Amith Yamasani
38f91ff986 Protobufferize DiskStats dumpsys
Bug: 34227723
Test: cts-tradefed run cts-dev -t CtsIncidentHostTestCases
Change-Id: I4c99b8d4a2f120bea3d0ab196c44f6634224d59b
2017-01-19 09:35:54 -08:00
Makoto Onuki
da65a52f87 Support protofied dumpsys for NetStats
Bug 34228873
Test: manual tests with "incident_report netstats"

Change-Id: I359b364c64d9798fd4229018a905658d5d46ea5c
2017-01-17 14:16:01 -08:00
Joe Onorato
7669012623 Clean up file names for protos
Test: cts-tradefed run singleCommand cts -d --module CtsIncidentHostTestCases
Change-Id: Iea2fc81768082e8e01afa8df86e113665020e7f6
2016-12-20 22:28:56 -08:00
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