Commit Graph

95580 Commits

Author SHA1 Message Date
TreeHugger Robot
9aab89bd58 Merge "ResetListener in StorageManagerService" 2018-11-02 18:23:49 +00:00
TreeHugger Robot
8a7fb85282 Merge "Add a missing sync to RemoteCallbackList dump" 2018-11-02 18:10:23 +00:00
TreeHugger Robot
1b2a677360 Merge "Refactor model listing / selection code to support other types of model" 2018-11-02 16:08:41 +00:00
David Brazdil
d68ee776be Merge "Remove non-SDK API toast" am: 13c2382d4f am: 6a35521032
am: c62139b488

Change-Id: Ie2a51568cf0630e0634548121b713f1778f1ff84
2018-11-02 06:30:04 -07:00
Beverly Tai
b9bfae6401 Merge "Use consolidated zen policy for dnd" 2018-11-02 13:21:06 +00:00
David Brazdil
c62139b488 Merge "Remove non-SDK API toast" am: 13c2382d4f
am: 6a35521032

Change-Id: Idd0496cf57b2b58a95a0377d969f7a0589f904a7
2018-11-02 06:17:10 -07:00
Tony Mak
ba22842144 Refactor model listing / selection code to support other types of model
Currently, listModelFiles and findBestModelFile methods only support annotator model.
But we want to extend them to support other models as well, like langID and actions.

Thus, introducing ModelFileManager, which provides listModelFiles and
findBestModelFile. ModelFileManager takes a Supplier<List<ModelFile>> to list model files.
For different types of model, we just need to provide a different supplier to the ModelFileManager.

There should be no behavior change.

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/ModelFileManagerTest.java
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/TextClassificationManagerTest.java

Change-Id: I4fc3fd1c9246383ee5d906792bb14b96dbf0a79f
2018-11-02 11:19:44 +00:00
David Brazdil
13c2382d4f Merge "Remove non-SDK API toast" 2018-11-02 10:17:28 +00:00
TreeHugger Robot
a17b785a64 Merge "Performs null checks in NanoApp class" 2018-11-02 03:43:02 +00:00
Risan
aec0ee73d7 ResetListener in StorageManagerService
Bug: 110380403
Test: Manual test in ARC++, prototyped a way that reset reaches ARC++
service.
Change-Id: Icc7dcc8b5c726ed9f61226569227c4d47f44b386
2018-11-02 03:42:15 +00:00
TreeHugger Robot
c0f94f4189 Merge "Grant split permission from config" 2018-11-02 01:10:46 +00:00
Kenny Root
8b0a22dbad Merge changes from topic "usb-adb-separation"
* changes:
  Update USB tests for ADB split
  Move AdbDebuggingManager to AdbService
  AdbService: move source of truth for enabled
  Add empty AdbHandler
  Add systemReady call for AdbService
  Add function to query ADB state
  Register USB as an ADB transport type
  Add ADB transport skeleton
  Add empty AdbManagerInternal for system server
  Add empty AdbService to SystemServer
  Move ADB debugging manager to core
  Rename to AdbDebuggingManager
  Move UsbDebuggingManager to new package
2018-11-02 00:43:05 +00:00
Kevin Chyn
838df2502f Merge "Update LockPatternUtils for consistency" 2018-11-02 00:37:24 +00:00
TreeHugger Robot
005489c07e Merge "Adding screen recording function." 2018-11-01 23:14:14 +00:00
Wei Wang
356a75ad94 Add a missing sync to RemoteCallbackList dump
Test: Build and boot
Change-Id: Icda7aa10569c0946bbbf0ed08d04b4d21c53b7aa
2018-11-01 16:07:38 -07:00
Eugene Susla
8394092808 Merge "Revert sms appops to their original defaults" 2018-11-01 22:32:55 +00:00
TreeHugger Robot
eb651edabf Merge "Add controller APIs for RoleManager." 2018-11-01 22:22:45 +00:00
Chris Craik
ce58754645 Merge "Add 'profileable' application manifest tag" 2018-11-01 21:28:58 +00:00
Jeff Sharkey
e80ef951cb Merge "APIs for reviewing, listing volumes, hashes." 2018-11-01 20:25:21 +00:00
Arthur Ishiguro
926c73479b Performs null checks in NanoApp class
Bug: 37274672
Test: Compile only
Change-Id: I5a82edd2f7a99a05c26c72b09872e964dbffd935
2018-11-01 13:14:17 -07:00
Beth Thibodeau
5898ac47b2 Adding screen recording function.
Screen recording can be launched via long press on screenshot in
the global actions menu if the local feature flag is enabled.
Otherwise, long press on screenshot will also trigger a screenshot.

Demo videos: https://drive.google.com/open?id=1oJzfzJb8aGXSUqn4CZ_Yn7qWmJ2dvRd5

Test: manual
Change-Id: I373d38ad86291ff6f26f7dca3195001bd8f5ee16
Bug: 111395687
Bug: 118826991
2018-11-01 15:56:39 -04:00
TreeHugger Robot
c1513cd4d4 Merge "Adds ContextHubIntentEvent class" 2018-11-01 19:45:42 +00:00
Dmitry Dementyev
16c8b72999 Merge "Document AccountManager method failures for locked user." 2018-11-01 18:23:37 +00:00
Arthur Ishiguro
a95fe31562 Adds ContextHubIntentEvent class
Helper class to parse Intent events.

Bug: 117612105
Test: Compile and flash, verify Intent events can be parsed
      using the class
Change-Id: I1267a1ce0cbbfd56ff9abb059ccc0117f060b7ff
2018-11-01 10:09:45 -07:00
Jeff Sharkey
0fc74ab226 APIs for reviewing, listing volumes, hashes.
As part of creating a "default gallery" app in Q, we need to define
the expected contract of how recently captured media can be reviewed
by the user.  Mirrored off the existing CAPTURE intents.

The Q storage work will start calculating SHA-1 hashes for each
media item to identify them in a stable way.

API to list all available volume names on the device, which includes
all attached shared storage devices, like SD cards.

Clean up all Uri creation to use Uri.Builder to ensure that incoming
volumeName values are escaped correctly.

Bug: 111268862
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ib7e5bf814b407f4d611767d2a5d26ccfe6d8d034
2018-11-01 11:07:55 -06:00
TreeHugger Robot
ae3c76df23 Merge "Each displays can have individual app transition." 2018-11-01 17:03:19 +00:00
Sunny Goyal
2daf457f4b Merge "Adding shared element transitions support in AppWidgets" 2018-11-01 16:19:12 +00:00
Zimuzo
cc2932fd81 Grant split permission from config
Instead of defining split permissions in Java file, we now move them to XML allowing us define vendor specific split permissions.

Test: Activity recognition is split correctly and auto granted when below split targetSdk.
Bug: 111411340
Change-Id: Ia5b3f47b73c9feea924373268a4eee142f555091
2018-11-01 16:08:27 +00:00
Olivier Gaillard
33c7610814 Merge "Add @CriticalNative to a few Binder methods." 2018-11-01 16:05:10 +00:00
TreeHugger Robot
bf4deb273b Merge "Make transitions Scene.getCurrentScene() public" 2018-11-01 14:34:08 +00:00
Risan
7c8506d6c7 Merge "Add a more flexible queryRecentDocuments" am: 627441218d am: a366edd78d
am: 729067376c

Change-Id: Ie1652bc9dfb413fe22962ee66024acd0d44ed127
2018-11-01 07:02:42 -07:00
Risan
729067376c Merge "Add a more flexible queryRecentDocuments" am: 627441218d
am: a366edd78d

Change-Id: Ib746205cd82634d0d7b821db94c8316e8260689c
2018-11-01 06:43:51 -07:00
Treehugger Robot
627441218d Merge "Add a more flexible queryRecentDocuments" 2018-11-01 13:11:09 +00:00
lumark
588a3e86a9 Each displays can have individual app transition.
Include below refectoring items to support per display AppTransition:

WMS / AM refectoring parts:
- Move AppTransition related stuff from WMS into DisplayContent.
- Move WMS.prepareAppTransition into DisplayWindowController.
- Move WMS.executeAppTransition to DisplayWindowController.
- Move ATM.isNextTransitionForward to DisplayWindowController.
- Move WMS.getPendingAppTransition to DisplayWindowController.
- Move WMS.overrideAppTransition like APIs to DisplayWindowController.
- Move ActivityRecord.applyOptionsLocked to AppContainerController.
- Support tracing all display's AppTransition status for
  DisplayContent.pendingLayoutChanges & window hierachy update.
- Modify logics for AppTransition related caller parts.
- Move WindowSurfacePlacer.handleAppTransitionReadyLocked related
  stuffs into added class AppTransitionController.

WM unit test parts:
- Add test case for verifying app transition state per display:
  - AppTransitionTests.testAppTransitionStateForMultiDisplay
  - AppTransitionTests.testCleanAppTransitionWhenTaskStackReparent
- Rename WindowSurfacePlacerTest to AppTransitionControllerTest since
  the test is related handle AppTransition flow.

Bug: 111362605
Test: go/wm-smoke
Test: atest ActivityManagerTransitionSelectionTests
Test: atest ActivityManagerMultiDisplayTests
Test: atest FrameworksServicesTests for DisplayContent / AppTransition
      related tests.
Change-Id: Ic1793aa794eb161bec31fda57847a6ba2ff4f84f
2018-11-01 21:10:37 +08:00
Andrey Kulikov
a4ae81857a Make transitions Scene.getCurrentScene() public
I pretty sure the getter method Scene.getCurrentScene() should be promoted to be public. This method is the only option for developers to understand is the sceneRoot already in the scene they need. Otherwise they have to introduce their own states and sync it with all scene changes which is more error-prone. To make it simpler to developers we can just make the method public. As an example of usage:

void displayMessages(List<Message> messages) {
    if (!messages.isEmpty()) {
        if (Scene.getCurrentScene(root) != messagesScene) {
            TransitionManager.go(messagesScene);
            MyAnalytics.trackDisplayMessages();
            (... more initialization ... )
        }
        messagesView.display(messages);
    }
}

Test: added a cts test for getCurrentScene
Change in AndroidX: aosp/807055
Bug: 118720709
Change-Id: Ic90e3576a82b5ab9a88e38e396efd49875968011
2018-11-01 12:33:53 +00:00
Sergey Vasilinets
1e5b5d0326 Merge "Revert "APIs for reviewing, listing volumes, hashes."" 2018-11-01 12:08:34 +00:00
Sergey Vasilinets
07dfd0a185 Revert "APIs for reviewing, listing volumes, hashes."
This reverts commit b7634f49ae.

Reason for revert: docs build was broken https://android-build.googleplex.com/builds/submitted/5104251/sdk_phone_armv7-sdk/latest/view/logs/build_error.log

Bug: 111268862
Change-Id: I95967186def8a3c81e7a2e0e2915d4280cd78af4
2018-11-01 12:06:56 +00:00
David Brazdil
c2a8de549b Remove non-SDK API toast
It served its purpose but it's time to remove it.

Test: m
Change-Id: Idc36cacae89e74f5ce01bcf51dce24cdedfda40f
2018-11-01 10:05:28 +00:00
TreeHugger Robot
1b11fcc9c9 Merge "Extract IMM internal flags into StartInputFlags" 2018-11-01 09:09:15 +00:00
Luke Huang
13801b90e2 Merge "interface-related commands porting" am: 808c2fa747 am: 21fecd5957
am: f1fba3e8fd

Change-Id: I7a44b6e8521dd2a852bbd7b4e07599df8951f7b2
2018-11-01 00:46:40 -07:00
Luke Huang
f1fba3e8fd Merge "interface-related commands porting" am: 808c2fa747
am: 21fecd5957

Change-Id: Iab8092b55399397d9e9f2333ce358964562daed7
2018-11-01 00:31:30 -07:00
Luke Huang
808c2fa747 Merge "interface-related commands porting" 2018-11-01 07:09:54 +00:00
Yohei Yukawa
35fa6d581e Extract IMM internal flags into StartInputFlags
This is a mechanical refactoring like we did to split
InputMethodClient for Bug 118040692.

So-called "controlFlags" in InputMethodManager (IMM) was originally
introduced for IMM#startInput()/windowGainedFocus() [1] to carry
additional client information then reused when we unify startInput()
and windowGainedFocus() into startInputOrWindowGainedFocus() [2].

This CL mechanically moves the location where those flags are defined,
from InputMethodManager.java to a newly created file
StartInputFlags.java.

This is still just a mechanical refacotring / renaming.  There should
be no user-visible behavior change.

 [1]: Icb58bef75ef4bf9979f3e2ba88cea20db2e2c3fb
      7663d80f6b
 [2]: I56934f18e30d90fcdf77bcbb0c35a92a5feb1b82
      05c25f8a3a

Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: atest FrameworksCoreTests:com.android.internal.inputmethod.InputMethodDebugTest
Change-Id: If5a4810dece852edcff0d1119463711249bb7ef2
2018-10-31 22:56:41 -07:00
TreeHugger Robot
dd7ea7069d Merge "Use StringJoiner in InputMethodDebug" 2018-11-01 05:48:05 +00:00
Varun Shah
d7f381524d Merge "Exposes certain Settings fields as SystemApi for SUW." 2018-11-01 00:36:41 +00:00
Risan
6a4a8f6046 Add a more flexible queryRecentDocuments
The existing queryRecentDocuments have a hard limit 64. However, case
like ARC++ wishes to have a more flexible limit that can be passed as an
extra parameter. This new API will gracefully degrade to the old API to
maintain backward compatibility with old providers.

Bug: 111288304
Test: manual test (patched the MediaDocumentsProvider, and test calling
the new API):
1. Test that passing Bundle with QUERY_ARG_LIMIT=5 is honored and
returned is limited to 5.
2. Test that passing null will release the limit to default 64.
3. Test that removing MediaProvider implementation for new method and
implement the old method will automatically redirect the call to old
method (backward compatible with old providers).

Change-Id: I37b1785b94f3e9cf09128fbf1e8779a4447fe7a9
2018-10-31 23:30:35 +00:00
Yohei Yukawa
5e46a66c6d Use StringJoiner in InputMethodDebug
This is a follow up CL to my previous CL [1], which added
InputMethodDebug#softInputModeToString().

It turns out that there is already a nice utility class
java.util.StringJoiner that can deal with delimiter when joining
multiple string tokens.

This CL also adds some simple unit tests for InputMethodDebug.

 [1]: I83f4795e95bc2e8ae325ad6e28d3a42317414e8d
      a468d70e5f

Bug: 118040692
Test: atest FrameworksCoreTests:com.android.internal.inputmethod.InputMethodDebugTest
Change-Id: I55fcdecee108b3e56bf7fd480d6f71de580dcbf6
2018-10-31 14:45:52 -07:00
Jeff Sharkey
b7634f49ae APIs for reviewing, listing volumes, hashes.
As part of creating a "default gallery" app in Q, we need to define
the expected contract of how recently captured media can be reviewed
by the user.  Mirrored off the existing CAPTURE intents.

The Q storage work will start calculating SHA-1 hashes for each
media item to identify them in a stable way.

API to list all available volume names on the device, which includes
all attached shared storage devices, like SD cards.

Clean up all Uri creation to use Uri.Builder to ensure that incoming
volumeName values are escaped correctly.

Bug: 111268862
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I460593466d85ff052fd157d8fd784e7ac5b25d78
2018-10-31 21:27:04 +00:00
Eugene Susla
aaff007b17 Revert sms appops to their original defaults
The appop defaults change is now handled in a better way with ag/5372491

This also reverts the special treatment of MODE_IGNORED in SmsAmmplication
to be compatible with the default value of OP_WRITE_SMS being reverted to

Fixes: 118452447
Test: atest android.telephony.cts.SmsManagerTest
Change-Id: I88b01136aaaf8a243d3a14a873e8a15c02a57673
2018-10-31 19:53:28 +00:00
TreeHugger Robot
2c87f2ead8 Merge "Add an intent to launch the app permission usage screen." 2018-10-31 19:28:03 +00:00