Commit Graph

6086 Commits

Author SHA1 Message Date
Automerger Merge Worker
8303c9def2 Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756 am: ef100e45fe
Change-Id: Ie4ab2ecaa0778fa6ff7d75e5677dfb4bed1d443d
2020-01-07 10:45:04 +00:00
Automerger Merge Worker
ef100e45fe Merge "Change NetworkTimeUpdateServiceImpl behavior" am: 48247d9223 am: f11a45b756
Change-Id: Ie3b6457ba196f7aa00ffb6e2fa77e5acbb926374
2020-01-07 10:30:35 +00:00
Neil Fuller
48247d9223 Merge "Change NetworkTimeUpdateServiceImpl behavior" 2020-01-07 10:07:08 +00:00
Automerger Merge Worker
646bdf8e89 Merge "Convert some users of Time.format() to an alt." am: 267b83e7d6 am: 1b0c2fcd3b
Change-Id: I1cb9722000898c9d1a7d479e9b0d88f717c57414
2020-01-07 03:25:07 +00:00
Allen Su
267b83e7d6 Merge "Convert some users of Time.format() to an alt." 2020-01-07 02:28:15 +00:00
TreeHugger Robot
a6447f2832 Merge "Fix issue with letterboxing" 2020-01-07 00:29:30 +00:00
Winson Chiu
b07e14152b Merge "Test InstantAppResolverService method fallback" 2020-01-07 00:20:51 +00:00
Jorim Jaggi
0dd0cf911b Fix issue with letterboxing
- Only consider client state if new API is actually turned on.
- We only sent the state the client was actually controlling.
However, we then later check for visibility for state that may not
even exist. Thus, we keep the state but only update the sources
the client is actually controlling.
- Initialize source with default visibility. This prevents
issues where the source may not exist but we still check it.

This fixes issues where a letterbox was accidentally placed on
screen because WM was thinking client requested fullscreen flag
(hiding the status bar), and other places where we checked
requested visibility.

Also renamed client state to requested state.

Test: Open any app, open IME
Bug: 111084606
Change-Id: Ibead561fc5593d8944400320f5e31dbe262612fe
2020-01-06 23:50:39 +01:00
TreeHugger Robot
aa864ecafd Merge "Remove flaky annotation of ActivityThreadClientTest" 2020-01-06 01:30:22 +00:00
Joanne Chung
0041b17113 Merge "Ensure OVERTYPE event has an entity type." 2020-01-04 05:46:11 +00:00
Adam He
7bc8f60377 Added attributes for IME and AutofillService to indicate they support
inline suggestions.

Fixes: 146452946
Test: atest FrameworksCoreTests:android.view.inputmethod.InputMethodInfoTest
Change-Id: I709b16d3f12c693bc670600bdcb9125630eb9b8e
2020-01-03 14:14:17 -08:00
TreeHugger Robot
c07ad2d6d5 Merge "Improve ResolverActivity UX on TV" 2020-01-03 13:49:35 +00:00
Jeff Chang
67335d2307 Remove flaky annotation of ActivityThreadClientTest
Remove flaky annotation on ActivityThreadClientTest since they are
stable from test metrics.

fixes:144675058
Test: atest ActivityThreadClientTest
Change-Id: I67e95f955f2b73721a35ceb7748271977e607f8b
2020-01-03 16:47:56 +08:00
David Su
a676b9934c Revert "ConnectivityManagerTest: grant access to Wifi @hide APIs"
This reverts commit 434fe602b8.

Reason for revert: Broke build

Change-Id: I15d6fbf06902987e0517f4c72cbf440b7b570a60
2020-01-02 18:09:48 -08:00
David Su
1029e50022 Merge changes from topics "framework-wifi-test-defaults", "frameworkwifiapitests-mk-to-bp", "wifitrackerlibtests-access-hidden-apis"
* changes:
  Formalize WifiConfiguration#getIpConfiguration()
  WifiTrackerLibTests: grant access to Wifi @hide APIs
  ConnectivityManagerTest: grant access to Wifi @hide APIs
  FrameworksWifiApiTests: build against framework-wifi
  framework-wifi: default build rule for tests
  Convert FrameworksWifiApiTests mk to bp
2020-01-03 00:52:37 +00:00
Automerger Merge Worker
71d5f85ea3 Merge "Fix Error Prone errors" am: 645ae56f43 am: 90d6707b02
Change-Id: Ie41cec5e38a8c7c6334ff0fc89f26e5f2680ecc0
2020-01-03 00:19:12 +00:00
Colin Cross
645ae56f43 Merge "Fix Error Prone errors" 2020-01-02 23:33:56 +00:00
Joanne Chung
a4099aaa01 Ensure OVERTYPE event has an entity type.
Bug: 145282510
Test: atest FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: Ia064318198effbdfde00566c6746ab922573c32d
2020-01-02 22:20:25 +08:00
TreeHugger Robot
c3a20c3b2c Merge "Make the short term brightness model configurable." 2019-12-31 13:06:29 +00:00
Sergey Troshin
40e979e60a Improve ResolverActivity UX on TV
The following problems were fixed:

1. It's not possible to select "Just once" / "Always" buttons when the list doesn't fit all the items;

2. The list doesn't automatically scroll when selecting an item that's out of the view;

3. When there's a default action assigned, the dialog has an interactive "Use a different app" header, that's selected by default and does nothing.

Bug: 119841729
Test: atest ChooserActivityTest ResolverActivityTest
Change-Id: Ib143636ea009f9f155942af68c3a3a6250ec8261
2019-12-31 13:47:16 +01:00
Colin Cross
3a9f1e91a9 Merge "Fix Error Prone errors" 2019-12-31 06:04:23 +00:00
Tej Singh
b8f296da22 Unit tests for PullAtomMetadata
Bug: 146385269
Test: bit FrameworksCoreTests:android.app.PullAtomMetadata
Change-Id: I4c78d2744348dbab6ee792caa0a7a8bbd3c17f28
2019-12-30 13:04:46 -08:00
Colin Cross
5ea7fb7f89 Fix Error Prone errors
Soong wasn't including android_app or android_test sources in the
javac-check target used for the Error Prone build, which allowed
some Error Prone errors to get in.  Fix them so Error Prone can be
re-enabled for these targets.

Fixes:
frameworks/base/core/tests/coretests/src/android/view/textclassifier/ActionsSuggestionsHelperTest.java:241: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java:97: error: [JUnit3TestNotRun] Test method will not be run; please correct method signature (Should be public, non-static, and method name should begin with "test").
frameworks/base/services/tests/servicestests/src/com/android/server/backup/BackupManagerServiceTest.java:546: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/services/tests/servicestests/src/com/android/server/backup/BackupManagerServiceTest.java:557: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/services/tests/servicestests/src/com/android/server/backup/DataChangedJournalTest.java:139: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/FileUtilsTest.java:64: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue
frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/FileUtilsTest.java:68: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue
frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/FileUtilsTest.java:78: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue
frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystemTest.java:537: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/NotificationHistoryManagerTest.java:127: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java:4505: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java:5770: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.

Bug: 146455923
Bug: 147012496
Bug: 147012298
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I829373d41c97962fe2122ea74cef12ba342ac33c
2019-12-30 13:03:44 -08:00
Kenny Guy
b29fdf1d71 Make the short term brightness model configurable.
Bug: 146141793
Test: atest BrightnessConfigurationTest
Test: atest AutomaticBrightnessControllerTest
Test: manual - use reflection to configure the new parameters from turbo app and check dumpsys

Change-Id: I78af8009f15400f2f91e55363066d97f008a7922
2019-12-30 16:19:59 +00:00
TreeHugger Robot
05ea439025 Merge "Attempt to fix the ActivityThreadClientTest test case failed." 2019-12-30 14:04:19 +00:00
Fabian Kozynski
052fe8b866 Merge "Changes to API adding new templates and actions" 2019-12-27 15:04:12 +00:00
Fabian Kozynski
2d212127fb Changes to API adding new templates and actions
This change adds new templates and actions, as well as DeviceTypes.
Also refactor the parcelling and unparcelling to support composite templates.

Javadoc to come on a later CL.

Test: atest

Change-Id: Ib240ef9930d37d464ea3a31a5cc245e02908eb05
2019-12-27 10:03:09 -05:00
Yunfan Chen
02abf55ab0 Decoupling InsetsAnimationControlImpl and the client
Currently InsetsAnimationControlImpl is heavily rely on
InsetsSourceConsumer and InsetsController on the client side, which
caused difficulties to the server to re-use the code. Decoupling it to
make it re-usable.

This patch made the following changes:
1. Introduce a callback interface to let InsetsAnimationControlImpl talk
   to InsetsController.
2. Use InsetsSourceControl instead of InsetsSourceConsumer in the
   InsetsAnimationControlImpl.
3. Remove all the consumers in the InsetsAnimationControlImpl.

Test: atest InsetsAnimationControlImplTest
Test: manual test with the new insets API, it works as expected.
Test: go/wm-smoke
Test: atest FrameworksCoreTests:InsetsControllerTest

Change-Id: I30f5aa73ff31e07c0dd8d61edbb208f16c5a6775
2019-12-27 12:04:54 +08:00
Jeff Chang
6d12c9c940 Attempt to fix the ActivityThreadClientTest test case failed.
ActivityThreadclient test case failed in emulator environment, but they
always work successfully on devices. This CL try to fix the test
case failed by mocking the LoadApk#updateApplicationInfo function
because the purpose of the test focuses on activity client state changes
behavior.

Bug: 144675058
Test: atest FrameworksMockingCoreTests:android.app.activity.ActivityThreadClientTest
Change-Id: I8bec296b65a4e688166fde0f2803bdb06d981a30
2019-12-26 22:02:46 +08:00
Ben Lin
eefcd54641 Merge "Add #onPictureInPictureRequested to Activity and ATM" 2019-12-23 22:08:59 +00:00
Joanne Chung
3468ae5320 Merge "TextLinks API updates." 2019-12-23 02:11:45 +00:00
Winson
191069d56e Test InstantAppResolverService method fallback
Verifies the appropriate methods are called or not called
when onGetInstantAppResolveInfo and onGetInstantAppIntentFilter
are invoked and different API versions are implemented.

There are 5 versions tested, with version 0 meaning no API was
implemented.

Bug: 137962971

Test: atest FrameworksInstantAppResolverTests
Test: manual swapped platform implementation to log method calls
		and verify call stack when under test

Change-Id: I66f84630d9824b74de57eaae71422d8773279a0f
2019-12-20 16:13:19 -08:00
jorgegil@google.com
06bc3233c7 Add #onPictureInPictureRequested to Activity and ATM
Allows vendors to signal that an activity should enter
picture-in-picture if possible.
Additionally, removes the need for an Activity to go
through onPause to enter picture-in-picture. Apps can
now override this new API and enter PIP from there
instead of relying on #onUserLeaveHint.

Bug: 143365086
Test: atest FrameworksCoreTests:android.app.activity.ActivityThreadTest
Test: atest CtsWindowManagerDeviceTestCases:PinnedStackTests
Test: atest WmTests:ActivityTaskManagerServiceTests
Change-Id: Ib7ae9d1a7055ceed73e9643982033de9d4ad7350
2019-12-20 14:38:25 -08:00
TreeHugger Robot
5a9109789e Merge "Add tests for layout overlaying" 2019-12-20 21:40:41 +00:00
Colin Cross
1f4620ac7a Fix Error Prone errors
Soong wasn't including android_app or android_test sources in the
javac-check target used for the Error Prone build, which allowed
some Error Prone errors to get in.  Fix them so Error Prone can be
re-enabled for these targets.

Fixes:
frameworks/base/core/tests/coretests/src/android/view/textclassifier/ActionsSuggestionsHelperTest.java:241: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/core/tests/systemproperties/src/android/os/SystemPropertiesTest.java:97: error: [JUnit3TestNotRun] Test method will not be run; please correct method signature (Should be public, non-static, and method name should begin with "test").
frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/FileUtilsTest.java:64: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue
frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/FileUtilsTest.java:68: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue
frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/FileUtilsTest.java:78: error: [CheckReturnValue] Ignored return value of method that is annotated with @CheckReturnValue
frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystemTest.java:533: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java:480: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java:491: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.
frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java:4196: error: [JUnit4TestNotRun] This looks like a test method but is not run; please add @Test and @Ignore, or, if this is a helper method, reduce its visibility.

Bug: 146455923
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I829373d41c97962fe2122ea74cef12ba342ac33c
Merged-In: I829373d41c97962fe2122ea74cef12ba342ac33c
2019-12-20 10:32:49 -08:00
Automerger Merge Worker
6af4789825 Merge "Add an API to tell whenever device supports userspace reboot" am: 670352e807 am: d1c0e074c0 am: 0b11673991
Change-Id: I797923d568645425aca0659d02cd8dc0364a25ff
2019-12-20 02:27:51 +00:00
Automerger Merge Worker
0b11673991 Merge "Add an API to tell whenever device supports userspace reboot" am: 670352e807 am: d1c0e074c0
Change-Id: I5e51be225c3063e250facec51cf4976c3004acc4
2019-12-20 00:26:24 +00:00
Automerger Merge Worker
62b841ca94 [DO NOT MERGE] Exclude euicc_unsupported_countries from backup test am: 10097500e6
Change-Id: Iab993a5705ef01cc95d3ebb8956da98e6db99d92
2019-12-20 00:25:28 +00:00
SzuWei Lin
10097500e6 [DO NOT MERGE] Exclude euicc_unsupported_countries from backup test
Bug: 146550929
Test: atest SettingsBackupTest
Change-Id: I48c255a4e8999be903e5642ca6d7b312b214d05f
2019-12-19 22:06:44 +00:00
Nikita Dubrovsky
8cdd14c92e Merge "Ability to start a cursor drag from anywhere in an editable TextView" 2019-12-19 19:34:51 +00:00
Neil Fuller
4ab8a199de Change NetworkTimeUpdateServiceImpl behavior
This change moves some logic associated with time detection out of the
NetworkTimeUpdateServiceImpl and moves it to the TimeDetectorStrategy
called by the TimeDetectorService.

The TimeDetectorStategy implementation now decides when to use an
NTP-derived time instead. The logic implemented here is effectively the
same as it was: NITZ takes priority over NTP until the latest NITZ
signal becomes "too old".

The motivating reasons for the change:
1) The "what signal is used when several are available?" logic should be
in one place: the TimeDetectoryStrategy not scattered around the
platform. Centralizing will enable different strategies and time sources
to be introduced over time.

2) It will allow removal of the ACTION_NETWORK_SET_TIME intent in a
follow-up commit; this intent was used to coordinate the NTP vs NITZ
logic should no longer be required.

The "bonus" effect of this change is that NetworkTimeUpdateServiceImpl
becomes more general: It can now be the authority for the NTP time on a
device independently of how the system clock should be set. e.g. it
could be used in future to back the
AlarmManager.currentNetworkTimeMillis() API call.  Anything that needs a
"what is the best time according to NTP?" answer could use this service.

Note: The NetworkTimeUpdateServiceImpl still observes the AUTO_TIME
setting and will perform an NTP lookup "on demand" (if required) when
the user enables the setting. This should be a temporary state and
likely to be removed in future; knowledge of AUTO_TIME shouldn't be
required for the NTP info to be correct and if
NetworkTimeUpdateServiceImpl is doing the right thing.

Bug: 140712361
Test: atest com.android.server.timedetector
Test: atest android.app.timedetector
Change-Id: I4b2936a42c552c4dd4cb55010306bb81bca0c712
2019-12-19 19:21:47 +00:00
Nikita Ioffe
717dbbf1a4 Add an API to tell whenever device supports userspace reboot
If device doesn't support userspace reboot then call to
PowerManager.reboot("userspace") will throw an
UnsupportedOperationException.

For the case of upgrading devices, Treble enforces that previous vendor
image should work with the new system image. Since userspace reboot
requires services to be stopped and restarted cleanly, which upgrading
devices might not be able to comply with, we need to have an API to
distinguish between devices that support userspace reboot and the ones
that do not.

Test: atest PowerManagerTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 138605273
Bug: 135984674
Change-Id: I8303f43ab29499eb2995f0256854c787055d9560
2019-12-19 17:26:19 +00:00
Nikita Dubrovsky
9a1369b4ad Ability to start a cursor drag from anywhere in an editable TextView
Bug: 143852764, 145535274
Test: Manual testing and unit tests
  atest FrameworksCoreTests:EditorTouchStateTest
  atest FrameworksCoreTests:EditorCursorDragTest
Change-Id: I6de3da98bd1e9e37a7d81e343514cb1e7ab6816a
2019-12-19 08:26:23 -08:00
Joanne Chung
f652343e63 TextLinks API updates.
1. Add get/setReferenceTime to TextLinks
2. Make TextLinks.getText() public

Bug: 143873595
Test: atest FrameworksCoreTests:android.view.textclassifier
Test: atest android.view.textclassifier.cts.TextClassifierValueObjectsTest
Change-Id: I720e0e1fe9e4d05de0d7a1427f7d7ded01287aff
2019-12-19 14:32:57 +08:00
David Su
434fe602b8 ConnectivityManagerTest: grant access to Wifi @hide APIs
Bug: 146513037
Test: atest ConnectivityManagerTest
Change-Id: If2a65abede0ab76b0435c252a893df9791645607
2019-12-18 21:48:17 -08:00
TreeHugger Robot
bce6abd2b7 Merge "Fix TaskDescription's copy method" 2019-12-18 22:26:49 +00:00
Mehdi Alizadeh
c5e29907c4 Fix TaskDescription's copy method
copyFromPreserveHiddenFields should only copy hidden fields if the field
is set in the other TaskDescription.

Bug: 144348683
Test: atest FrameworksCoreTests:ActivityManagerTest

Change-Id: I8475e82b7aeb0b7fc6a8cc0de88b926a847c7ac2
2019-12-18 11:47:37 -08:00
Automerger Merge Worker
3b05bd784e DO NOT MERGE: Exclude nearby_sharing_component from backup test am: d4af97c549
Change-Id: I7229440f1cf986d6d37731373715a4a536462b4c
2019-12-18 01:53:56 +00:00
Dan Sandler
d4af97c549 DO NOT MERGE: Exclude nearby_sharing_component from backup test
Fixes: 146019461
Test: atest SettingsBackupTest
Change-Id: Ieb953284f2c00d69220e776f2b628f73013140e0
2019-12-18 01:08:13 +00:00
Taran Singh
a4e4cd1a3d Merge "Add alpha support to Insets API" 2019-12-17 23:52:31 +00:00