Commit Graph

21307 Commits

Author SHA1 Message Date
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
Shuo Qian
474bfa9ce0 Merge "Make SignalStrength#INVALID public" am: f5852d1500 am: f79f209b08
am: 1a909973a2

Change-Id: Ia028c1f9732f882ba85ae4fea8f9abf52ca75a8c
2018-11-01 11:59:02 -07:00
Shuo Qian
1a909973a2 Merge "Make SignalStrength#INVALID public" am: f5852d1500
am: f79f209b08

Change-Id: I765099d1bdf906eb7709b3d83a594ea1febcf599
2018-11-01 11:42:01 -07:00
Shuo Qian
f5852d1500 Merge "Make SignalStrength#INVALID public" 2018-11-01 18:06:25 +00: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
Sunny Goyal
2daf457f4b Merge "Adding shared element transitions support in AppWidgets" 2018-11-01 16:19:12 +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
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
Chen Xu
cd5b6cfe3b Merge "refactor resetNv API to resetRadioConfig and rebootRadio" 2018-11-01 04:55:19 +00:00
Varun Shah
d7f381524d Merge "Exposes certain Settings fields as SystemApi for SUW." 2018-11-01 00:36:41 +00:00
Jeff Sharkey
cef5230240 Merge "APIs for reviewing, listing volumes, hashes." 2018-11-01 00:23:56 +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
TreeHugger Robot
09128036f4 Merge "Introduce Emergency number functions APIs" 2018-10-31 21:37:28 +00: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
chen xu
13841a8d83 resolve merge conflicts of 461aef854d to pi-dev-plus-aosp
Bug: 118351153
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ib804121f94f2fec404b39b90700092783b6ba58c
Merged-in: I4a71c61929d9df8ec13c157e0452c6f30d8e4b9c
2018-10-31 13:07:11 -07:00
TreeHugger Robot
2c87f2ead8 Merge "Add an intent to launch the app permission usage screen." 2018-10-31 19:28:03 +00:00
Chen Xu
3ad3478213 Merge "new system API getRadioAccessFamily" 2018-10-31 17:12:23 +00:00
chen xu
c2389322f5 refactor resetNv API to resetRadioConfig and rebootRadio
Bug: 116476729
Test: telephony unit test and Manual test
Change-Id: I420da20f2290d1fc3962f7c14a9ca4999eafbde8
2018-10-31 09:42:20 -07:00
TreeHugger Robot
316902da9b Merge "Add get/setExtras to TextClassification" 2018-10-31 12:24:30 +00:00
Tony Mak
1bae53ccc7 Merge "Introduce TextClassifier.suggestConversationActions" 2018-10-31 11:46:36 +00:00
Youming Ye
409b7fd693 Merge "Add CarrierConfig to hide "Network default" option in Caller ID setting" am: e3a989f7d3 am: 22b595e5bd
am: d07819d5cc

Change-Id: Ie07d14e12ef078f2dd87af697229b6c052a3d712
2018-10-30 19:02:26 -07:00
Youming Ye
d07819d5cc Merge "Add CarrierConfig to hide "Network default" option in Caller ID setting" am: e3a989f7d3
am: 22b595e5bd

Change-Id: If14fb8996f5cb829fdc0f41ecc7868656195265f
2018-10-30 18:37:59 -07:00
Youming Ye
e3a989f7d3 Merge "Add CarrierConfig to hide "Network default" option in Caller ID setting" 2018-10-31 00:44:04 +00:00
Michael Wachenschwanz
6b5d06fe4d Merge changes from topic "UsageSessionTimers"
* changes:
  Add SystemApi for registering Usage Session Observers in UsageStats
  Refactor AppTimeLimitController for Session Observers
2018-10-31 00:35:39 +00:00
Varun Shah
76c8e68e74 Exposes certain Settings fields as SystemApi for SUW.
User Setup related fields in Settings indicating the setup
personalization state are now exposed.

Global Settings fields indicating whether the device is in demo mode,
a password is required to decrypt the device, and if mobile data is
enabled for provisioning are now exposed.

Various Secure Settings fields are also now exposed. They indicate
information about  doze, user setup information, lock screen
notification settings, assist gesture setup, and whether a suggested
action was completed.

All of the exposed fields require the WRITE_SECURE_SETTINGS permission.

Bug: 116689780
Test: manual (run setup wizard)
Change-Id: If8a96cca216b1d3e3b9329a3f4695caf9f3f248a
2018-10-30 17:18:44 -07:00
Hai Zhang
87ed09ae42 Add controller APIs for RoleManager.
This change adds addRoleHolderFromController() and
removeRoleHolderFromController() to RoleManager. These APIs are
guarded by permission and intended to be called only by the controller
service, which will only modify records inside RoleManager and won't
affect the holder packages.

Bug: 110557011
Test: build
Change-Id: I15c6cde0b8c1c8c519ea521bc7bb6f97c7144ec4
2018-10-30 17:12:09 -07:00
sqian
08db0d14d8 Introduce Emergency number functions APIs
- getCurrentEmergencyNumberList
- getCurrentEmergencyNumberList (per categories)
- isCurrentEmergencyNumber

Note: the implementaion from PhoneInterfaceManager is empty, but the names
of the APIs need to be finalized so that the usages and test plan are not
blocked.

Bug: 112657134
Test: Treehugger
Change-Id: I854db34f4378f35f99c3d8133bf35f3d0b3aad2b
2018-10-30 15:41:14 -07:00
Phil Weaver
1b4ea3a11a Merge "Make performAccessibilityShortcut a SystemAPI" 2018-10-30 20:05:28 +00:00
Nathan Harold
bc2a1620d7 Merge "Define CellInfo.UNAVAILABLE for Unreported Fields" am: 40745e1def am: ae7dd94d7f
am: 9e6faba5ed

Change-Id: I161cf73348b08c99350295762da7a9ff03de55d2
2018-10-30 12:05:23 -07:00
Tony Mak
d6f3fb46c6 Add get/setExtras to TextClassification
Test: TextClassificationTest / TextClassifierValueObjectsTest

BUG: 118690735

Change-Id: I19dba3a3f6c1b14a871b33b9ffb94e0f4de58ac2
2018-10-30 18:38:50 +00:00
Nathan Harold
9e6faba5ed Merge "Define CellInfo.UNAVAILABLE for Unreported Fields" am: 40745e1def
am: ae7dd94d7f

Change-Id: I7491584dfba8ccfa8f9835623f766a87268ae1d3
2018-10-30 11:37:43 -07:00
Treehugger Robot
40745e1def Merge "Define CellInfo.UNAVAILABLE for Unreported Fields" 2018-10-30 17:53:24 +00:00
Chris Craik
ce0302890a Add 'profileable' application manifest tag
Bug: 117841084
Test: atest CtsAtraceHostTestCases:AtraceHostTest

Allow apps to opt-in to important profiling features (systrace, binder
tracing), without requiring debuggable=true. Debuggable has
significant performance overhead, and is undesirable for profiling.

Profileable is set to true when debuggable is true.

Change-Id: I16aaa7bc60dee4b1b262e169ac285759d57d8198
2018-10-30 10:24:31 -07:00
Phil Weaver
27beee50d3 Make performAccessibilityShortcut a SystemAPI
Also create a new MANAGE_ACCESSIBILITY permission to
perform the shortcut.

Bug: 116118615
Test: make, activate accessibility shortcut
Change-Id: Ic65a0cdf7393429e14cb98f4fb0734d20069b05a
2018-10-30 10:10:41 -07:00
Tony Mak
c9d31e2752 Introduce TextClassifier.suggestConversationActions
Example usage:
// App side
ConversationAction.TypeConfig typeConfig =
            new ConversationAction.TypeConfig.Builder().setIncludedTypes(
                    Collections.singletonList(ConversationAction.TYPE_TEXT_REPLY)).build();
ConversationAction.Message message =
        ConversationAction.Message.Builder().setText("How are you?").build();
ConversationAction.Request request =
        new ConversationAction.Request.Builder(
                Collections.singletonList(message), HINT_FOR_IN_APP)
                .setTypeConfig(typeConfig)
                .build();
List<ConversationAction> conversationActions =
        textClassifier.suggestConversationActions(request).getConversationActions();
for (ConversationAction conversationAction : conversationActions) {
    // 1. Use the RemoteAction directly (if available)
    RemoteAction actions= conversationAction.getActions();

    // 2. Use the parsed action types and entities.
    String type = conversationAction.getType();
    ConversationAction.Entities entities = conversationAction.getEntities();
}

// In the TextClassificationService side:
ConversationAction.Entities entities = new ConversationAction.Entities.Builder().setReplies(Arrays.asList("I am good.", ":(", ":)")).build();

ConversationAction conversationAction = new ConversationAction.Builder(
        ConversationAction.TYPE_TEXT_REPLY).setEntities(entities).build();

BUG: 111437455
BUG: 111406942

Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts/*cts/tests/tests/view/src/android/view/textclassifier/cts/TextClassificationManagerTest.java
Test: cts/tests/tests/view/src/android/view/textclassifier/cts/ConversationActionsTest.java

Change-Id: Ie8639f93f88336ecdfda602ce14cd8ca578c092a
2018-10-30 14:50:28 +00:00
vichang
5740576716 Merge changes from topic "icu63" am: f4ab8b61ec am: 818c18d9b8
am: 1ddd44b026

Change-Id: Ia4a2f35162360eeeb47cfd0c239a6246c3550023
2018-10-30 06:20:46 -07:00
vichang
1ddd44b026 Merge changes from topic "icu63" am: f4ab8b61ec
am: 818c18d9b8

Change-Id: I2086101f32d62f657ebfabbb297a2bcccfca13d5
2018-10-30 05:52:14 -07:00
vichang
f4ab8b61ec Merge changes from topic "icu63"
* changes:
  API updated for ICU4J 63.1
  Fix FormatterTest#testFormatShortElapsedTime due to CLDR 34 change
2018-10-30 12:04:05 +00:00
TreeHugger Robot
64f878e0a9 Merge "Add RoleManager into the system." 2018-10-30 10:03:39 +00:00
Sunny Goyal
43c970436d Adding shared element transitions support in AppWidgets
Bug: 113071278
Test: atest frameworks/base/core/tests/coretests/src/android/widget/RemoteViewsTest.java
Change-Id: I0d7698faa8d9e61913b55d34de8b7cfbb32863b1
2018-10-29 17:04:33 -07:00
Michael Wachenschwanz
641e338f8d Add SystemApi for registering Usage Session Observers in UsageStats
Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ProfileOwnerTest.java#testAppUsageObserver
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermission
Bug: 111465038
Change-Id: I70a7a5729117f8e9651a2e4ea732156537d2f3c1
2018-10-29 16:21:35 -07:00
Joseph Johnson
367d14a1b5 Merge "Make LAST_SETUP_SHOWN a SystemApi" 2018-10-29 22:03:54 +00:00
TreeHugger Robot
7cc7662d6f Merge "Reuse overlay view between two Visibility transitions" 2018-10-29 21:28:04 +00:00