1612 Commits

Author SHA1 Message Date
Abodunrinwa Toki
c565e1d3ce Implement TextClassification system service.
- This service provides the TextClassificationManager access to the
  classification model file.
  See: Icb82b707c9c1b4dcb739f44d888bbc43bc3b03bb
- This service is started at boot time.
  See: Ie4a597bc5c6c4140afbcf7feaa9dd237a3fd5fef

Test: Manually tested. Also see: Ic2a5eceeaec4cd2943c6c753084df46d30511fee
Bug: 32503402
Change-Id: Ic428d00f291e268211866b3fc6b7acbc3eb04e1e
2017-01-20 20:22:16 +00:00
Jeff Sharkey
389b853bc8 DO NOT MERGE: Switch over to new "time.android.com" NTP pool.
Also add logging to measure success/failure details.

Test: builds, boots, and NTP fix obtained
Bug: 32969463

(cherry picked from commit d3f689bf14a05de735b5cc92dcf20e7226c78690)

(cherry picked from commit dda938a698a17b2943bbe78f6631a26dedabf28a)

Change-Id: I67e4f54f8f2ec69b6522fbbe06ef196b1084f44a
2017-01-18 19:08:35 +09:00
Jim Miller
40e4645e6e Rewrite FingerprintService to use HIDL 2.1
Bug: 33199080
Test: Fingerprint enroll, remove, unlock, fingerprint arbitration.

Change-Id: I8b98236ba81f053527ee74c8a189af1adfd17d55
2017-01-17 11:45:41 -08:00
Felipe Leme
6d553874be YAMAFFR - Yet Another Major AutoFill Framework Refactoring
- Explicitly split View methods into Assist and AutoFill methods, rather
  than use an overloaded method that takes flags.
- Simarly, renamed ASSIST_FLAG_SANITIZED_TEXT and
  ASSIST_FLAG_NON_SANITIZED_TEXT flags to
  AUTO_FILL_FLAG_TYPE_FILL and AUTO_FILL_FLAG_TYPE_SAVE respectively.
- Created a AutoFillUI class to host the auto-fill bar and other UI
  affordances.
- Moved the temporary notifications to AutoFillUI (eventually that
  class will host the real UI).
- Moved FillData to android.app.view.autofill package.
- Split IAutoFillCallback in 2 (IAutoFillAppCallback and
  IAutoFillServerCallback, residing at the app and system_server
  respectively), so service cannot fill the app directly (which lets
  the framework control the UI).
- Moved assist's IResultReceiver to AutoFillServiceImpl so
  system_server can act as a mediator between the AutoFillService
  implementation and the app being auto-filled.
- Replaced FillData and FillableInputFields by a bunch of new objects:
  - FillResponse contains a group of Datasets, each representing
  different values
    that can be used to auto-fill an activity (for example, different
    user accounts), optional id of fields the service is interested
    to save, and an optional bundle for service-side extras.
  - Dataset contains a name, Fields, and an optional bundle for
    service-side extras.
  - Fields contain an AutoFillId (parcelable) and a value (Bundle)
- Changed the temporary notifications to emulate the new workflow:
  - Initial notification requests the auto-fill data but do not
    auto-fill.
  - Once service calls back, a new notification is shown with the
    results.
  - Then if the user selects a dataset, the activity is auto-filled
    with it.
  - It also shows a notification to emulate what can be saved.
- Created an VirtualViewDelegate for views that uses a virtual
  hierarchy for assist data.
- Added new methods on ViewStructure to add children with virtual ids.
- Added 2 methods on View to support auto-fill:
  - autoFill(Bundle) to auto-fill the view.
  - getAutoFillType() to return how the view can be auto-filled.
- AutoFillType defines the input fields that support auto-fill:
  - Text fields (like EditText)
  - Toggle fields (like CheckBox)
  - Lists (like RadioGroup)
- AutoFillType can also have a sub-type representing its semantic (for
  now only text fields have it, and it's the same as getInputType()).
- etc :-)

Bug: 31001899
Test: manual verification
Change-Id: I2dd2fdedcb3ecd1e4403f9c32fa644cb914e186f
2017-01-10 12:50:47 -08:00
Geoffrey Pitsch
9f7fd6c734 Merge "API improvements for creating NotificationChannels" 2017-01-10 16:20:13 +00:00
Jeff Sharkey
8dedad31f7 Wire up storage stats API to installd.
Now that installd has the implementation details we need, we can wire
up the public APIs to use them.

Shuffle APIs around a bit so that StorageStats can be reused for both
UID and UserHandle results, and rename StorageSummary to
ExternalStorageStats.  Provide getTotalBytes() and getFreeBytes() as
first-class methods so we can answer those questions quickly without
paying the cost of measuring external storage details.

Current costs on a typical device with a test account after flushing
dentry caches:

queryStatsForUid() manual: 6922ms
queryStatsForUid() quota: 525ms

queryStatsForUser() manual: 1686ms
queryStatsForUser() quota: 113ms

queryExternalStatsForUser() manual: 42ms
queryExternalStatsForUser() quota: 2ms

For verification purposes, a new "fw.verify_storage" system property
can be set to compute both manual and quota statistics, and log any
discrepancies.

Test: builds, boots
Bug: 27948817, 32206268
Change-Id: I4ea3df3372a7379aa8cf4c20c44120c8f0702c15
2017-01-09 22:30:58 -07:00
Geoffrey Pitsch
0353371529 API improvements for creating NotificationChannels
Remove listener for aysnchronous operation.
Allow multiple channel creation from a single call.
Silently no-op for creating existing channels.

Test: runtest systemui-notification
Change-Id: Ibc1340d21efa0c12d126bee437adcbb99141e86a
2017-01-06 16:13:04 -05:00
Jeff Sharkey
e8cece9f20 Initial API shape for storage statistics.
This API is designed to provide both UID-level stats and overall
summary data for a given storage device, as identified by UUID.

The use of UID-level granularity might appear a bit clunky, but it
matches other usage statistics (such as network and battery), and it
allows us to implement it using an extremely fast quota kernel
feature.

A future CL will wire up the implementation to installd.

Test: builds, boots
Bug: 32206268
Change-Id: I7b51877682d0370c2402c19346f57809f0e7ac53
2017-01-05 15:39:16 -07:00
Ivan Podogov
48e6745a08 Rename the Bluetooth profile classes for HID Device role. am: 0afe190af5 am: 94e3d3f499 am: 91ab2e2f98
am: 48738f5ad0

Change-Id: I15651c5a6e3baf53d915626ea6c55180fefe28b5
2016-12-29 20:08:38 +00:00
Hemant Gupta
c519b8d83e Bluetooth: Add support for HID Device Role am: e88fd4b594 am: ee469c6fe9 am: 1ee22b7f70
am: a9c92c2442

Change-Id: I56625e00b1b6c2b7b11e4ce4dc3038072ef6c231
2016-12-29 20:07:51 +00:00
Ivan Podogov
48738f5ad0 Rename the Bluetooth profile classes for HID Device role. am: 0afe190af5 am: 94e3d3f499
am: 91ab2e2f98

Change-Id: If0e072e96491020191a7742928cc90adff151342
2016-12-29 20:00:09 +00:00
Hemant Gupta
a9c92c2442 Bluetooth: Add support for HID Device Role am: e88fd4b594 am: ee469c6fe9
am: 1ee22b7f70

Change-Id: Ia82f834d4d2ad800574bb0317f4fb3b3786972fc
2016-12-29 19:59:28 +00:00
Ivan Podogov
91ab2e2f98 Rename the Bluetooth profile classes for HID Device role. am: 0afe190af5
am: 94e3d3f499

Change-Id: I97ff93fd2564bd76d90095f8086f79c6c6086aff
2016-12-29 19:46:55 +00:00
Hemant Gupta
1ee22b7f70 Bluetooth: Add support for HID Device Role am: e88fd4b594
am: ee469c6fe9

Change-Id: Ic48911d254671d402f5a6b8198109f28e6497036
2016-12-29 19:46:08 +00:00
Ivan Podogov
94e3d3f499 Rename the Bluetooth profile classes for HID Device role.
am: 0afe190af5

Change-Id: Ib5c9b904da57048d719df504142edd3dab0e6ec3
2016-12-29 19:38:41 +00:00
Hemant Gupta
ee469c6fe9 Bluetooth: Add support for HID Device Role
am: e88fd4b594

Change-Id: Ic2a82d5670ffbd3046766d73ed9b180546c59169
2016-12-29 19:37:58 +00:00
Ivan Podogov
0afe190af5 Rename the Bluetooth profile classes for HID Device role.
We already have BluetoothInputDevice class, so adding something
called BluetoothHidDevice seems confusing. On the other hand,
the new class is designed to connect to HID Host devices, so
naming it BluetoothInputHost makes sense and goes in line with
the existing BluetoothInputDevice.

The same goes for the new constant HID_DEVICE that is just as
confusing to have together with the INPUT_DEVICE one.

This CL also renames the "connection state changed" broadcast
(for the same reasons), declares it as an SDK constant, and also
adds some javadoc to it.

Note that BluetoothHidDeviceApp* classes remained unchanged, as
those correspond to the app that implements the Device (and
connects to the Host).

Test: make
Change-Id: I5075ca5b97db3c1dd403c2e9660eecc7380cffe2
2016-12-29 14:30:40 +00:00
Hemant Gupta
e88fd4b594 Bluetooth: Add support for HID Device Role
This patch adds the HID Device Role support in Bluetooth framework.
Also AIDL and callback related files for HID Device role are added
to provide interface for third party applications to communicate with
HID Device Service.

Change-Id: Id03a362b7bcfa2e76056fa0197eaac12ce49b5a2
2016-12-29 14:29:53 +00:00
Jean-Michel Trivi
292a6a4e99 Notification of playback activity
AudioService keeps track of status of implementations of PlayerBase.
AudioService's PlaybackActivityMonitor maintains a list of
  playback configurations for each PlayerBase, and a list
  of clients that want to receive updates about the playback.
Playback activity clients can query the playback configuration
  of the system through AudioManager, or register a callback
  for updates. For clients with MODIFY_AUDIO_ROUTING permission
  (system), the playback configurations contain more information
  about each player (player type, uid, pid, state), and can see
  all players, not just the "active" ones. The act of stripping
  off data about the players that is not supposed to be seen
  by non-system clients, is referred to as "anonymization". It
  is implemented in system server, so no system data is ever
  sent to playback activity clients without system permission.
More information about the AudioPlaybackConfiguration is
  available in the SystemApi (uid, pid, player type, player state).

Test: run cts -m CtsMediaTestCases -t android.media.cts.AudioPlaybackConfigurationTest
Bug: 30955183

Change-Id: I85997594c0378216419f5f0fdaa0714996fd3573
2016-12-21 13:58:08 -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
Makoto Onuki
ab99c11c55 Merge "ShortcutManager: direct pin shortcut support." 2016-12-15 17:59:39 +00:00
Paul Duffin
bf46e6b2e1 Copy core-junit files into legacy-test. am: cd7c34d8bf am: 98e609d556 am: c3650beee5
am: e9be5d908d

Change-Id: I826ea0752c64b39f3cb9c96a6a33c0f2c4fad98b
2016-12-14 15:22:43 +00:00
Paul Duffin
e9be5d908d Copy core-junit files into legacy-test. am: cd7c34d8bf am: 98e609d556
am: c3650beee5

Change-Id: I04560b5982651d175a268056f32eb36980ef2259
2016-12-14 15:15:51 +00:00
Paul Duffin
c3650beee5 Copy core-junit files into legacy-test. am: cd7c34d8bf
am: 98e609d556

Change-Id: I4eb422f8fe217e5528e632d1f85c1303604b0d64
2016-12-14 15:09:22 +00:00
Paul Duffin
98e609d556 Copy core-junit files into legacy-test.
am: cd7c34d8bf

Change-Id: I672fa4b006b04db5a4c8f86793f1c891bc55754a
2016-12-14 15:02:16 +00:00
Paul Duffin
cd7c34d8bf Copy core-junit files into legacy-test.
The legacy-test directory contains part of the Android API and
so must maintain backwards compatibility. The junit classes that
are in the API are copied here to ensure that they do not change
when external/junit is upgraded.

Bug: 30188076
Test: make checkbuild and checked legacy-test contents
Change-Id: I6c263afc16c06abfd027334be51a41422239a189
2016-12-14 14:19:08 +00:00
Michal Karpinski
d1c710d5cf DO NOT MERGE [DPM] Management and retrieval of network logs
am: 4c47adef60

Change-Id: I39486c9d6116023f1ee9bd576b7fcd0fe20023a1
2016-12-14 10:51:33 +00:00
Michal Karpinski
b2e8690507 DO NOT MERGE [DPM] DO can start network logging and listen for events
am: c3abd34cfe

Change-Id: I7952d67d22a141040f3ee3ac2b6c3aa2cfccbbf7
2016-12-14 10:50:36 +00:00
Makoto Onuki
2d895c3efd ShortcutManager: direct pin shortcut support.
Test: Manual test and all the unit tests:
adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
... to test8

Bug 32908854

Change-Id: I11b81656959cccfb4efa83f08380b915e6eb84a6
2016-12-13 09:56:03 -08:00
Michal Karpinski
4c47adef60 DO NOT MERGE [DPM] Management and retrieval of network logs
This CL follows up on ag/1530343 and adds:
1) Various network events.
2) Retrieval method in DPM and APIs in DeviceAdminReceiver.
3) Extension of NetworkLogger and it's NetworkLoggingHandler.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Bug: 29748723
Change-Id: I42a1a477e7c75c109a3982f809c22732b814e8b2
2016-12-13 17:19:22 +00:00
Michal Karpinski
c3abd34cfe DO NOT MERGE [DPM] DO can start network logging and listen for events
This CL adds:
1) Setter and getter in DPM to manipulate logging switch (retrieval
method to come in a subsequent CL(s)).
2) A way for DPM to register to listen for events.
3) Skeleton of NetworkLogger class (more to come in subsequent CL(s)).

Bug: 29748723
Change-Id: I5c04662ccc6febd2ba294b0eaca1ed1da9c16e47
2016-12-13 17:15:38 +00:00
Jeff Sharkey
c5b5694202 Merge commit '7797e545239e81a9216994527badcc98178ebfcc' into dec10
Change-Id: I430a39241bd2d278eaf1e01b89be3ad368789f6d
2016-12-10 16:29:23 -07:00
Jeff Sharkey
9ff67746e6 Merge "Final push of installd to Binder; goodbye socket!" am: 1950377f91
am: 104fd011b2

Change-Id: I4b2ae2329e8842def8682199c5ee8544c22c2be4
2016-12-10 23:07:59 +00:00
Jeff Sharkey
104fd011b2 Merge "Final push of installd to Binder; goodbye socket!"
am: 1950377f91

Change-Id: If10d4f4aafa68b78ddd9a98e8699fe008bbda49b
2016-12-10 23:01:59 +00:00
Jeff Sharkey
740f523b25 Final push of installd to Binder; goodbye socket!
Move last two straggling installd commands to Binder and destroy the
socket-based communication channel forever.

Test: builds, boots, apps install fine, pre-OTA dexopt works
Bug: 13758960, 30944031
Change-Id: I9afb9f71858febde34a94f53839b2986493b68a0
2016-12-09 15:30:34 -07:00
Julia Reynolds
e03b8124d0 Merge "Accept adjustments from notification assistant." 2016-12-09 15:23:08 +00:00
Paul Duffin
7e28011fea Merge "Move android.test classes from core/java to legacy-test/src" am: 2761ed124a
am: 28b617bdea

Change-Id: I83a6ce6c329e7eb18ee90689682c30d4a73d7f8e
2016-12-09 15:10:10 +00:00
Paul Duffin
28b617bdea Merge "Move android.test classes from core/java to legacy-test/src"
am: 2761ed124a

Change-Id: I0009b93ff096456d7f5fd5f83e71fd4b9bff31db
2016-12-09 15:05:06 +00:00
Paul Duffin
2761ed124a Merge "Move android.test classes from core/java to legacy-test/src" 2016-12-09 14:56:37 +00:00
Jeff Sharkey
dda938a698 DO NOT MERGE: Switch over to new "time.android.com" NTP pool.
Also add logging to measure success/failure details.

Test: builds, boots, and NTP fix obtained
Bug: 32969463

(cherry picked from commit d3f689bf14a05de735b5cc92dcf20e7226c78690)

Change-Id: I7da416099ae903fd92beb516251ef4e51673eecf
2016-12-09 13:59:18 +09:00
Paul Duffin
df2576045e Move android.test classes from core/java to legacy-test/src
(cherry picked from 2395179afb2ea957a9ba66404021c14160361611)

Bug: 30188076
Test: make checkbuild
Merged-In: Ifa291909fcf47da788627b496bd72f54efd78ed7
Change-Id: Ie20dceb9f89df245ed6da5fc2fb06185bd7b104b
2016-12-08 14:55:35 +00:00
Paul Duffin
2395179afb Move android.test classes from core/java to legacy-test/src
Bug: 30188076
Test: make checkbuild
Change-Id: Ifa291909fcf47da788627b496bd72f54efd78ed7
2016-12-08 14:49:35 +00:00
Julia Reynolds
22f02b3e4a Accept adjustments from notification assistant.
Test: runtest systemui-notification & cts in same topic.
Change-Id: Icff1f89eac32b82d583eca24b0a15f67795912a1
2016-12-07 12:51:16 -05:00
Jeremy Joslin
33e8de479a Merge "API for requesting network recommendations." am: 800a4e753e
am: 2b57c69e25

Change-Id: I8f2357942919193a22e97e4f1d9ec415b736565c
2016-12-07 00:05:29 +00:00
Jeremy Joslin
2b57c69e25 Merge "API for requesting network recommendations."
am: 800a4e753e

Change-Id: Icda431682a283051d4f5f5052dc70b8ab8e01dc9
2016-12-06 23:58:13 +00:00
Bill Yi
82834baa35 Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD 2016-12-06 15:17:16 -08:00
Jeremy Joslin
d1daf6d22a API for requesting network recommendations.
Defining a new system API that will allow the system to request
network recommendations from a NetworkScoreService implementation.

Test: Coming in a future CL.
BUG: 32909424
Merged-In: I2d5c0a843b928b04e87c1862a78702a02fd54c31
Change-Id: Idd33095c6cd2f5b391796c900399f18a2c40fcc3
2016-12-06 12:48:30 -08:00
Jeremy Joslin
1397837af3 API for requesting network recommendations.
Defining a new system API that will allow the system to request
network recommendations from a NetworkScoreService implementation.

Test: Coming after the API is approved.
BUG: 32909424
Change-Id: I2d5c0a843b928b04e87c1862a78702a02fd54c31
2016-12-06 07:33:25 -08:00
Jeff Sharkey
d3f689bf14 Switch over to new "time.android.com" NTP pool.
Also add logging to measure success/failure details.

Test: builds, boots, and NTP fix obtained
Bug: 32969463
Change-Id: I66a8a78480e087acdcf8a11e79f80b7a7a4969c9
2016-12-02 12:25:03 -07:00
Geoffrey Pitsch
aac3cba531 Merge "Listener in createNotificationChannel" 2016-12-01 19:46:09 +00:00