Commit Graph

84483 Commits

Author SHA1 Message Date
Olivier Gaillard
f82d2e7369 Tracks exception count by class name.
The goal is to figure out if it would be worth monitoring these
exceptions. If exception types are only caller issues like
SecurityException and IllegalArgumentException, it is probably not worth
it. If we can find NPE or internal exceptions it would be worth
uploading the exceptions through dropbox.

Test: unit test

Change-Id: I779d43a0e6ca1a33535b90809491675420a51726
2018-07-03 22:22:42 +01:00
Wale Ogunwale
20a65c4e7b Merge "Break direct calls to UserController object in AMS from activity classes (12/n)" 2018-07-03 20:50:18 +00:00
TreeHugger Robot
080faba4f4 Merge "Stop restoring spell checker settings" 2018-07-03 20:34:32 +00:00
Neil Fuller
bfef432a69 Merge "Make Half class use public APIs" am: 7e957e57b7 am: 04c66489bc
am: 8b14d33acb

Change-Id: I6eb87843c251f726de2feb6827c54c8f7b75f1fe
2018-07-03 13:27:01 -07:00
Neil Fuller
8b14d33acb Merge "Make Half class use public APIs" am: 7e957e57b7
am: 04c66489bc

Change-Id: I35fa0a22465885a47612601d541afb366b5953ec
2018-07-03 13:17:31 -07:00
Neil Fuller
04c66489bc Merge "Make Half class use public APIs"
am: 7e957e57b7

Change-Id: I7f41f07ed5d35a0c538c90b49b4500ba9952f74d
2018-07-03 13:08:26 -07:00
Wale Ogunwale
86b7446c2b Break direct calls to UserController object in AMS from activity classes (12/n)
Make calls from activity classes go through ActivityManagerInternal
interface to case UserController instead of calling AMS.mUserController
object directly. Note that calls to UserController should not hold the
AMS lock.

Bug: 80414790
Test: Existing tests pass
Change-Id: Ie56f08d10b62d609e9b5e31f45b5f0d6eed3a9d4
2018-07-03 08:22:59 -07:00
TreeHugger Robot
95e4e67dc6 Merge "Docs: generateKeyPair() can't be called from the main thread." 2018-07-03 08:32:23 +00:00
TreeHugger Robot
9e01f4293c Merge "Add Feature Flag for Hearing Aid Profile" 2018-07-03 01:18:15 +00:00
TreeHugger Robot
b5ec0b8053 Merge "Add SHOW_SOURCE_PUSH_TO_TALK to indicate that the interaction service was invoked by a hardware button." 2018-07-02 23:42:54 +00:00
Jorim Jaggi
1f079b4f97 Merge "Only use simple rects for cutout region" into pi-dev am: 4764921dcc
am: b7dc212a61

Change-Id: I2af32c72ea859ff908fa30b5de1e722a99b28479
2018-07-02 14:58:32 -07:00
Jorim Jaggi
b7dc212a61 Merge "Only use simple rects for cutout region" into pi-dev
am: 4764921dcc

Change-Id: Icfb41008189d5c01f90afd4992428433043b4c4e
2018-07-02 14:47:09 -07:00
Winson Chung
8f54a7c515 Merge changes Ibae2de51,I1d6718d9
* changes:
  Allow share/edit screenshot actions from lockscreen
  Prevent clobbering of activity options bundle when merging
2018-07-02 21:04:39 +00:00
TreeHugger Robot
ca48d74547 Merge "Make getDimension's Javadoc say it returns px." 2018-07-02 20:29:29 +00:00
TreeHugger Robot
f574d538c1 Merge "Add a package declaration to RulesState" 2018-07-02 19:28:22 +00:00
Yohei Yukawa
1893bd162a Stop restoring spell checker settings
This CL logically reverts the following CL (and some subsequent
changes) to stop restoring spell checker related secure settings.

 * Ib8382f0296f0726b64494d3b1fd8237e13adb540
   06cbaddb87

Reason for revert:
Although we believe it would be great if we can seamlessly migrate to
a new phone with keeping spell checker related settings, there still
remain several tricky scenarios.

 * We are not ready to distinguish whether a certain spell checker
   related setting was explicitly set by the user or programmatically
   set by some components in the previoud device.  This includes the
   case where TextServicesManagerService (TSMS) itself automatically
   updates those settings e.g. by selecting a default spell checker
   service from the pre-installed ones.  We are not sure if trying to
   migrate such an auto-selected setting to a new device actually
   makes sense, especially if it happens without any user
   confirmation.

 * We have a strict rule about what spell checker service can be
   selected automatically, and the rule has been that only
   pre-installed spell checker services can be automatically selected
   by the system, unless some system components that have
   WRITE_SECURE_SETTINGS permission overrides it. Mechanically
   selecting a spell checker service just because it was enabled in
   the previous device may not fit this model well.

 * Unlike IMEs, currently the Android OS allows only one spell checker
   service to be enabled.  This means that if the new device doesn't
   have the corresponding spell checker service, the user will lose
   spell checking functionality even if the device pre-installs
   functional spell checker service.  This problem is hard to notice
   because unlike IMEs spell checker service does not have its own UI.

 * Also unlike IMEs, spell checker related secure settings are still
   hidden and not published as public APIs.  Those settings do not
   have no official compatibility story across devices yet.

 * It is also possible that the default spell checker service in the
   previous device is not published to all the devices thus there is
   no way for the the new device to install it.

This CL therefore excludes spell checker related settings from
backup/restore, as a short-term answer to above scenarios until we
come up with better ideas to deal nicely with them.

Bug: 110367605
Test: atest FrameworksCoreTests:android.provider.SettingsBackupTest
Test: atest FrameworksCoreTests:android.provider.SettingsValidatorsTest
Change-Id: I8e4a0d4b3b758a84d5a075fa52851b1e8dd707eb
2018-07-02 11:31:42 -07:00
TreeHugger Robot
1a81a7457b Merge "Allow 0sp text size in xml for TextView" 2018-07-02 17:02:20 +00:00
Jorim Jaggi
606405180f Only use simple rects for cutout region
Otherwise there is a big performance hit in all kinds of
situations where we do operations with the region, specifically
when:

- updating input windows
- insetting the cutout during layout
- touch dispatch

Test: DisplayCutoutTest, WmDisplayCutoutTest
Bug: 110464019
Bug: 110452325
Change-Id: I94a25c3794ecd33b8b7204ca308ac91623498f13
2018-07-02 17:58:10 +02:00
TreeHugger Robot
19bbcfff1e Merge "Only play in-call notification if ringer is normal" 2018-07-02 14:31:31 +00:00
Mihai Popa
f03b7543c7 Allow 0sp text size in xml for TextView
Before this CL, when TextView's textSize attribute was set to 0sp in
XML, the text would still be visible on the screen, as the actual
textSize set was non zero. On the other hand, if the text size was set
to 0sp programmatically, the text would not be visible. This was a P
regression, as on O the text would be invisible in both cases.

This CL fixes the attribute reading stage in TextView, allowing the
application of a 0 text size on the view.

Bug: 110251171
Test: atest CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I3798361e182f45a67cd0a69d40e09e559375aa20
2018-07-02 12:58:22 +00:00
Neil Fuller
f9d88dfac1 Make Half class use public APIs
Half has a dependency on an internal sun.misc.FloatingDecimal
that can be replaced by an equivalent call on java.lang.Float
(which calls through to FloatingDecimal).

Any performance hit is worth it for a smaller API surface.

Bug: 111055375
Test: Build
Change-Id: Iecdf3aa9414922a77edbdc439b0c2b88033b3af8
2018-07-02 12:04:39 +01:00
TreeHugger Robot
ce77407144 Merge "StrictMode to catch storage while locked." 2018-06-30 22:04:26 +00:00
Jeff Sharkey
41cebf51c5 Merge "Get android.os tests running against real APIs." 2018-06-30 21:02:54 +00:00
Kevin Chyn
082c201438 Merge "FaceManager removal callback should propagate remaining" 2018-06-30 00:56:32 +00:00
Winson Chung
3743d28ec9 Prevent clobbering of activity options bundle when merging
- RemoteViews specify an ActivityOptions when calling startIntentSender()
  (for click handling), but if the PendingIntent being started also has an
  ActivityOptions, the merging of the two options will fail since the
  ActivityOptions properties are always written into the bundle (regardless
  of whether they are actually set).  Instead, only write non-default
  values to the bundle (the defaults will be read out if not set when
  restoring the options from the bundle anyways).

Bug: 72459081
Test: atest FrameworksServicesTests:ActivityOptionsTest

change-id: i1d6718d9db4b3f7056412c5b4c5347a19ffa7c09
2018-06-29 17:36:16 -07:00
TreeHugger Robot
cee49cd54d Merge "Make scroll bars more noticeable on round screens." 2018-06-30 00:26:35 +00:00
TreeHugger Robot
e26fae649b Merge "Moved more stuff from ActivityManagerService to ActivityTaskManagerService (11/n)" 2018-06-30 00:21:40 +00:00
Wale Ogunwale
f673393b93 Moved more stuff from ActivityManagerService to ActivityTaskManagerService (11/n)
Moved more stuff related to activities out of the current service to the new one.

Bug: 80414790
Fixes: 110988007
Test: Existing tests pass.
Change-Id: Iceed1da8a7441a26d11efebc6d9f692fd053bc7f
2018-06-29 23:51:01 +00:00
Danny Epstein
4ffbd471b4 Make getDimension's Javadoc say it returns px.
Bug: 24467193
Test: Only changed Javadoc.
Change-Id: I209d8ddbe025ec2c35668ddaac2bdba79305ec6a
2018-06-29 16:24:29 -07:00
Jeff Sharkey
c609116a1b Get android.os tests running against real APIs.
Combination of moving to existing public API, tagging things as
@TestApi, and bringing utility methods into tests.

Bug: 13282254
Test: atest cts/tests/tests/os/
Change-Id: Ifd24c0d048d200e8595e194890cc1dc53ddc2b3e
2018-06-29 17:15:44 -06:00
Beverly
28c3d164d9 Only play in-call notification if ringer is normal
- Add secure setting to enable/disable in call notifications
- Can toggle system setting using the following adb command:
adb shell settings put secure in_call_notification_enabled [0/1]

Bug: 71586014
Test: manual
Change-Id: I32e1d1d6dcae806e655ae6875a43d07ca83e77f4
2018-06-29 16:52:14 -04:00
Kevin Chyn
7e88d113d6 FaceManager removal callback should propagate remaining
Fixes: 110994796

Test: builds
Change-Id: I9a82a50a8bbd4b0c21a2acef33c9ec3fdff5c7f8
2018-06-29 12:57:01 -07:00
shepshapard
5229200dd3 Fix invisible scroll thumb blocks clicks.
The current issue is that Views that have either the horizontal or
vertical scroll bars enabled will intercept mouse interactions that
entire the region where the scrolling thumb would be even if the View
cannot actually scroll because it's content isn't larger than it.

This is fixed by only intercepting mouse interactions in the scroll
thumb region if there is something to scroll.

Bug: 110375792
Test: None yet

Change-Id: Ib638b4ac88375f55bc80ba2a66d945a16ecd6d22
2018-06-29 10:57:18 -07:00
Jeff Sharkey
dd02e33417 StrictMode to catch storage while locked.
When an app starts becoming Direct Boot aware, it can be difficult
to track down all the places they're reading data from credential
protected storage.

When a user is locked, credential protected storage is unavailable,
and files stored in these locations appear to not exist, which can
result in subtle app bugs if they assume default behaviors or
empty states. Instead, apps should store data needed while a user
is locked under device protected storage areas.

Bug: 110413274
Test: atest cts/tests/tests/os/src/android/os/cts/StrictModeTest.java
Change-Id: Ia390318efa6fefda8f10ac684d0206e67aa1d3dc
2018-06-29 11:41:00 -06:00
Danny Epstein
b8cbf3aa5b Make scroll bars more noticeable on round screens.
Increase alpha from 15 to 30% for the track and use Google Material
Grey 200 for the thumb. Fix the geometry so that the track and thumb
don't extend off the edge of the screen.

Bug: 80258942
Change-Id: I43e603e5fffb8a05f486af35194c801060dd0b51
(cherry picked from commit 97b00cbc039a090659aed75e47a172a70222b02f)
2018-06-29 16:40:08 +00:00
TreeHugger Robot
af57538369 Merge "Clarify WebView's lack of plugin support." 2018-06-29 16:04:31 +00:00
Benjamin Miller
2a8f129c2a Docs: generateKeyPair() can't be called from the main thread.
Bug: 110194933
Test: make ds-docs with visual inspection of generated HTML
Change-Id: I5f7839cbf57d9150ad4c9a9c4ac943064fb1f6c0
2018-06-29 08:07:47 +00:00
Bernardo Rufino
62863825e0 Fix file matching w/ full-backup rules xml
Documentation is pretty vague:
https://developer.android.com/guide/topics/data/autobackup#XMLSyntax.

But there were a couple of issues:
* It was prematurely returning false without consuming the rest of the
  includes (cause of the bug linked).
* It was using string comparison for checking if a file is in a
  directory, which ended up flagging directories such as "a/b" as
  containing files "a/b.txt".

Reviewers,

* Please, pay full attention to test cases.
* Since this is code move + code change, set diff as 2..latest to check
changes to the function.

Bug: 110720194
Test: atest BackupUtilsTest
Test: Backup and restore app w/ multiple directory includes, verify
      everything restored

Change-Id: Ic0fea43156ce8fb641af69ae73679289a20c291c
2018-06-29 07:18:26 +00:00
Riddle Hsu
9a936e9677 Merge "Check for valid surface when starting to drag" 2018-06-29 03:57:40 +00:00
Winson Chung
1241652d8a Merge "Ensure PiP test apis are marked as TestApi" 2018-06-29 03:13:25 +00:00
Torne (Richard Coles)
1676c95ddc Clarify WebView's lack of plugin support.
Update docs to clarify that plugins are in fact not supported from K
onward and that enabling them doesn't do anything.

Test: m offline-sdk-docs
Change-Id: I8678ea716be0adc4cd3a6fae1b4776e312ec29e0
2018-06-28 19:34:17 -04:00
Winson Chung
37b99ba2e4 Ensure PiP test apis are marked as TestApi
Bug: 77533294
Test: atest CtsAndroidAppTestCases:PictureInPictureParamsBuilderTest
Change-Id: Icbcea8cf9d7e49db7ebcc1ce676b43722f75b7f4
2018-06-28 15:42:06 -07:00
Stanley Tng
fe8c8337ed Add Feature Flag for Hearing Aid Profile
Using the Settings App-Developer Options-Feature Flag, allow the user to
enable or disable the Hearing Aid Profile.

Test: Manual testing using Settings App
Change-Id: I58a9d339941e235242c443c85b6f4194b5a296c9
2018-06-28 15:31:50 -07:00
Riddle Hsu
0328b9c025 Check for valid surface when starting to drag
Also protect creating SurfaceSession with root surface.

Change-Id: I3649f160e85367169710b36faf26c96bef0f71fe
Fix: 110922266
Test: atest CtsViewTestCases:android.view.cts.DragDropTest
2018-06-28 20:59:37 +00:00
TreeHugger Robot
c39a8ac6e7 Merge "Remove sleep_timeout setting from backup" 2018-06-28 17:34:11 +00:00
Bernardo Rufino
338832fad8 Remove sleep_timeout setting from backup
It is not user-configurable.

Bug: 79779285
Test: atest SettingsBackupTest
Test: # w/ LocalTransport
      adb shell settings put secure sleep_timeout 5000
      adb shell bmgr backupnow com.android.providers.settings
      adb shell settings put secure sleep_timeout 3000
      adb shell bmgr restore 1 com.android.providers.settings
      adb shell settings get secure sleep_timeout => ensure 3000

Change-Id: I68bf2f91cc3d4c00463468a6abaef3b64d5c10b9
2018-06-28 16:32:42 +00:00
TreeHugger Robot
43ef2a1b69 Merge "Stop invoke initAppOps in Camera default constructor." 2018-06-28 03:28:32 +00:00
TreeHugger Robot
a88791a72a Merge "Update notification settings Javadoc links." 2018-06-28 00:01:59 +00:00
Jeff Sharkey
ed71f10907 Merge "Give StrictMode more bits to work with." 2018-06-27 22:33:07 +00:00
Kevin Chyn
02bcebede4 Merge "6/n: Have FaceService extend BiometricService" 2018-06-27 22:09:01 +00:00