Commit Graph

6140 Commits

Author SHA1 Message Date
Alexander Dorokhine
0731f57193 Add AppSearch.java, containing the Document class, base Builder, and Email.
Document is the basic entity to be indexed and queried in AppSearch.
AppSearch.java contains all AppSearch Document types and their Builders.
They are grouped here to avoid potential collisions with other
generically-named classes like Email and Contact).

Bug: 143789408
Test: atest FrameworksCoreTests:android.app.appsearch
Change-Id: I7bb607ad4114451a3db11b9ade9c197da1e6556a
2020-01-15 13:31:45 -08:00
Nikita Dubrovsky
d69517ebf1 Merge "Fix NPE in InsertionPointCursorController.onTouchEvent" 2020-01-14 16:00:53 +00:00
Nikita Dubrovsky
99b55fa6a5 Fix NPE in InsertionPointCursorController.onTouchEvent
Calls to SelectionModifierCursorController must be guarded by
hasSelectionController() because it's possible to have a TextView
with an Editor but no selection controller if the TextView is
configured to have non-selectable text.

Bug: 147366705
Bug: 145535274
Bug: 143852764
Test: Manual and unit test
  atest FrameworksCoreTests:EditorCursorDragTest
Change-Id: I7fdec754e6fa51561b08fab024ea672c43f2c8f5
2020-01-13 21:54:20 -08:00
Nikita Dubrovsky
9afd708630 Merge "Fix and re-enable TextViewActivityMouseTest" 2020-01-14 05:51:24 +00:00
TreeHugger Robot
f8e29c1d60 Merge "Supplying the IBinder to binderDied" 2020-01-14 01:09:45 +00:00
Suprabh Shukla
b8f20004f1 Supplying the IBinder to binderDied
Plugging the binder instance that dies. This helps a single
DeathRecipient to listen for multiple binder deaths.

Test: atest FrameworksCoreTests:BinderDeathRecipientTest

Bug: 135633339
Change-Id: I976ee2a138877830885ee1cbbd2b313ecb87aeb3
2020-01-13 14:57:03 -08:00
Qingxi Li
21c2d78f07 Merge "Create an until function to check location permission" 2020-01-13 21:23:09 +00:00
Ryan Mitchell
0252b862de Merge changes from topic "shared-lib-tele-res"
* changes:
  Allow for overlaying dynamic shared libraries
  Assign shared libraries stable package ids
2020-01-13 15:15:57 +00:00
Minche Li
b95dfee332 Merge "Add new switchToInputMethod API" 2020-01-13 02:31:53 +00:00
Nikita Dubrovsky
4dca994b24 Fix and re-enable TextViewActivityMouseTest
The main problem was in MouseUiController: when generating an ACTION_UP
event, button state was not being reset so the event was getting
filtered out by the check in Editor.shouldFilterOutTouchEvent.

This CL also removes the slow negative assertions for the selection
handles (assertNoSelectionHandles).

There is one remaining issue in testDragAndDrop_longClick() which for
now is still suppressed. The real for this will be in a separate CL
because it requires updates to the touch state logic of Editor.

Bug: 29591177
Test: Ran tests
  atest FrameworksCoreTests:TextViewActivityMouseTest
  atest FrameworksCoreTests:TextViewActivityTest
Change-Id: I6ce73bf30d9c49ec1b5a5930db0f9cf52929bf43
2020-01-12 17:01:10 -08:00
Ryan Mitchell
ee4a564d4f Allow for overlaying dynamic shared libraries
Overlays targeting shared libraries should be loaded into the
resources of every target that depends on the shared library.

Static shared libraries are currently not supported because overlays
should override all versions of static shared libraries and there is
not currently support for an overlay targeting multiple APKs.

Also created a test instrumentation and host test suite for testing
overlays and packages on the system image.

Bug: 140790224
Test: atest OverlayRemountedTest
Change-Id: I20a217b6368d6cf92b2b9f46908fd58012933f72
2020-01-10 23:20:19 +00:00
Qingxi Li
97d01e2ff0 Create an until function to check location permission
This util function will check whether the app has location permission
and whether the location mode is enabled for the users. This function
will be used by both connectivity service and wifi networks.

Bug: 142072839
Test: atest ConnectivityUtilTest
Change-Id: I5558ed04e5ef28033a1c649f5491f2f15aa63557
2020-01-10 14:01:55 -08:00
Automerger Merge Worker
60579b88eb Merge changes I401c064c,I16431a4d am: 84464cae37 am: 2d6a025c1d am: 16f33e4381
Change-Id: I7827a9ed8fa46cdac667d1af42719e7d84133a91
2020-01-10 19:34:50 +00:00
Automerger Merge Worker
16f33e4381 Merge changes I401c064c,I16431a4d am: 84464cae37 am: 2d6a025c1d
Change-Id: I10f8439a8e8dbca17c163f9a5561b4ebbd2372be
2020-01-10 18:16:03 +00:00
David Su
84464cae37 Merge changes I401c064c,I16431a4d
* changes:
  NetworkScoreServiceTest: Remove usages of @hide Wifi APIs
  NetworkKeyTest: remove @hide Wifi API usages
2020-01-10 17:54:10 +00:00
Jorim Jaggi
fa833b69b4 Merge "Move visible insets calculation to client" 2020-01-10 17:17:42 +00:00
Nikita Dubrovsky
28bd186e32 Merge "Simplify state in SelectionModifierCursorController" 2020-01-10 15:55:50 +00:00
Jorim Jaggi
4e04eb24ae Move visible insets calculation to client
As otherwise they may be out of sync, leading to shifting when the
IME disappears.

Bug: 111084606
Test: InsetsSourceTest, InsetsStateTest, InsetsSourceProviderTest
Change-Id: Ifd7dfa6694efccf8693fd46bec1a9dea879790ff
2020-01-10 15:36:51 +00:00
Automerger Merge Worker
2134fc50d0 Merge "Using WifiCommand to toggle the Wi-Fi state" am: bec5dc830e am: e1ba791c28 am: ae63f23efa
Change-Id: I0ae684b52989d9d02d8d78a1afcef40c1469c9b4
2020-01-10 15:36:05 +00:00
Automerger Merge Worker
ae63f23efa Merge "Using WifiCommand to toggle the Wi-Fi state" am: bec5dc830e am: e1ba791c28
Change-Id: I4d42acafbebd1ca11e50573d3b3458f5e931074e
2020-01-10 15:18:36 +00:00
Treehugger Robot
bec5dc830e Merge "Using WifiCommand to toggle the Wi-Fi state" 2020-01-10 14:39:40 +00:00
TreeHugger Robot
f093b48b58 Merge "Correct layout/draw/animation interleaving for insets callbacks" 2020-01-10 13:35:28 +00:00
Jorim Jaggi
a51168aaee Correct layout/draw/animation interleaving for insets callbacks
See WindowInsetsAnimationCallback.onPrepare for detailed
description of new behavior.

Also rename InsetsSourceConsumer.setVisible to setRequestedVisible
to communicate that this is client intent vs. current state.

Test: windowinsetstest application
Bug: 111084606
Change-Id: Id35c60e0f59a8aa4f0d300220391d1e2b96a91fd
2020-01-10 11:24:31 +01:00
Automerger Merge Worker
aa58c0d5c3 Merge "Rename android.util.TimestampedValue to android.os" am: 641fa6730a am: fee904a5fb
Change-Id: Ib439759dbee692a624491267d07f72b0d754779d
2020-01-10 09:18:38 +00:00
mincheli
850892b7fa Add new switchToInputMethod API
Make accessibility service able to set the current input method
for current user.

Bug: 145710994
Test: atest AccessibilitySoftKeyboardTest
   1. Get current enabled IMEs
   $ adb shell settings get secure enabled_input_methods
   com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService
   com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME
   2. Get current default IME
   $ adb shell settings get secure default_input_method
   3. Set current default IME
   $ adb shell settings put secure default_input_method
     com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService
Change-Id: I00aa2170ef2fcc4daf50d09a57b8e2ad16c0a6cb
2020-01-10 16:58:12 +08:00
Neil Fuller
641fa6730a Merge "Rename android.util.TimestampedValue to android.os" 2020-01-10 08:11:14 +00:00
Nikita Dubrovsky
1f78b11bbf Simplify state in SelectionModifierCursorController
This change removes some code from SelectionModifierCursorController
in favor of calling EditorTouchState instead.

Bug: 143852764
Test: Manual and unit tests
  atest FrameworksCoreTests:EditorTouchStateTest
  atest FrameworksCoreTests:EditorCursorDragTest
  atest FrameworksCoreTests:TextViewActivityTest
  atest FrameworksCoreTests:SuggestionsPopupWindowTest

Change-Id: I40f0ad8bd4eb0d4af33d0e2cd1a79c99812a9c40
2020-01-09 19:28:17 -08:00
Hongming Jin
d261711e49 Merge "System action registration API for SystemUI" 2020-01-09 21:00:39 +00:00
Automerger Merge Worker
8c079472ee Merge "Fix ConnectivityManagerTest @hide Wifi API usages" am: 7304f01576 am: c975b2d949 am: b28775fbbc
Change-Id: I5e34330954312412e25964e1e86c3997acf38fd8
2020-01-09 18:35:28 +00:00
Automerger Merge Worker
b28775fbbc Merge "Fix ConnectivityManagerTest @hide Wifi API usages" am: 7304f01576 am: c975b2d949
Change-Id: Iab3c8e256b5d948378d7c83d2882587234091980
2020-01-09 18:23:24 +00:00
David Su
7304f01576 Merge "Fix ConnectivityManagerTest @hide Wifi API usages" 2020-01-09 18:07:30 +00:00
Neil Fuller
35cc296228 Rename android.util.TimestampedValue to android.os
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.

Bug: 147012511
Test: boot
Merged-In: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
(cherry picked from commit d159015e54)
2020-01-09 15:34:43 +00:00
TreeHugger Robot
b22fc1bea4 Merge "Use START/STOP messages to update visibility" 2020-01-09 14:30:37 +00:00
Automerger Merge Worker
785d0be343 Merge "[SP01] Add NetworkStats to system API" am: a113464439 am: b340068a3e am: e4601e0a58
Change-Id: I1bb272727cbaec0102669b3f3b8141994f8e1f9a
2020-01-09 09:37:50 +00:00
Automerger Merge Worker
e4601e0a58 Merge "[SP01] Add NetworkStats to system API" am: a113464439 am: b340068a3e
Change-Id: I771bf8836f9b754fc05fd743de8cc5a15aecddf1
2020-01-09 09:18:36 +00:00
Naga Venkata Durga Ashok Mutyala
90ece871f2 Using WifiCommand to toggle the Wi-Fi state
Unable to turn ON the WiFi in Setup phase as there is a restriction for
setWifiEnabled only work for System Apps.

Bug: 147349850
Test: atest FrameworksCoreTests:DownloadManagerFunctionalTest

Change-Id: I452b81bcf72182c999d6f12c900860bf68fd910f
Signed-off-by: Naga Venkata Durga Ashok Mutyala <quic_nmutya@quicinc.com>
2020-01-09 14:00:13 +05:30
TreeHugger Robot
141751afe7 Merge "Propagate exception stacktrace via AndroidFuture IPC" 2020-01-09 06:01:05 +00:00
junyulai
d27a1725e8 [SP01] Add NetworkStats to system API
In order to let external module report their network stats,
expose necessary APIs to construct NetworkStats object.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Id3ec8aaff3df67948c25eac2319a74cf33a27979
2020-01-09 03:11:22 +00:00
Eugene Susla
49b8cdf5d0 Propagate exception stacktrace via AndroidFuture IPC
Re-uses the code from Parcel to make it consistent with binder IPC exception
stacktrace propagation behavior.

Test: atest AndroidFutureTest
Change-Id: I5c73c42544af5bf964c7b6cd646bcb347e3ae146
2020-01-08 17:32:00 -08:00
Andrii Kulian
b9faa03b90 Use START/STOP messages to update visibility
Activity visibility messages simply move the activity to STOPPED or
STARTED state. We can use the lifecycle messages to do the same and
simplify the logic/remove duplicated code.

This CL also removes the option to send STOP message without making
the client invisible and actually calling onStop(). This option
caused a mismatch of the state between server (STOPPED) and client
(PAUSED). Also, in cases when the device was going to sleep, STOP
message was always followed by SLEEP message, which called onStop()
anyway.

Bug: 137329632
Bug: 129750406
Test: AM/WM CTS and unit tests
Change-Id: I487575520ce301bb2f65519f0c0a30b6b9edac0c
2020-01-08 15:29:57 -08:00
Jorim Jaggi
7894518e04 Merge "Treat IME adjust flags correctly" 2020-01-08 20:44:38 +00:00
Hongming Jin
bc76112e0b System action registration API for SystemUI
Bug: 136286274
Test: atest AccessibilityManagerTest
      atest AccessibilityManagerServiceTest
Change-Id: I6bbdf3627bfc9b39551cc7809dda1cf43d1d6ea4
2020-01-08 11:22:48 -08:00
Jorim Jaggi
761a5ab018 Treat IME adjust flags correctly
- IME insets always get reported through WindowInsets.getInsets(ime())
- However, getSystemWindowInsets will not report it if ADJUST_RESIZE
isn't set.
- Fix bitmask check for ADJUST_RESIZE

Test: InsetsStateTest
Test: WindowInsetsTest
Fixes: 146465040
Bug: 111084606
Change-Id: Ib19c89050af4f669ddda14d2bf2415aa3b5092c1
2020-01-08 17:40:54 +00:00
Neil Fuller
d159015e54 Rename android.util.TimestampedValue to android.os
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.

Bug: 147012511
Test: boot
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
2020-01-08 17:00:34 +00:00
David Su
5b1cd91c2f NetworkKeyTest: remove @hide Wifi API usages
new ScanResult() is @hide. Instead use Mockito to
create a new instance of ScanResult.

Bug: 138801922
Test: atest NetworkKeyTest
Change-Id: I16431a4df088220b631e873db116b30d19a9b674
2020-01-07 20:21:39 -08:00
David Su
1de3ed987c Fix ConnectivityManagerTest @hide Wifi API usages
Migrate @hide Wifi API usages to @SystemApi/public
alternatives

Bug: 138801922
Test: compiles
Change-Id: I33373fa7ed1aedfdda18f5e688330f4959158055
2020-01-07 18:11:25 -08:00
TreeHugger Robot
05528bc690 Merge "Fix serialization issue of ExternalVibration" 2020-01-07 20:19:05 +00:00
Nikita Dubrovsky
f8143c2042 Merge "Ensure cursor drag is suppressed during selection drag" 2020-01-07 19:23:17 +00:00
Alexey Kuzmin
5051b03896 Fix serialization issue of ExternalVibration
Remove excessive serialization of Audio Attributes
Bug: 140417434
Test: atest ExternalVibrationTest#testSerialization

Change-Id: Ib7ceaed875889126a53f874eec64fab4817e48d1
2020-01-07 18:52:03 +00:00
Nikita Dubrovsky
c18581d9cc Merge "Suppress cursor drag when the user swipes vertically" 2020-01-07 16:22:21 +00:00