Commit Graph

21274 Commits

Author SHA1 Message Date
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
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
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
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
Chen Xu
469b9d6a84 Merge "new system API getRadioAccessFamily" 2018-10-29 18:07:35 +00:00
Chen Xu
d135468a98 Merge "Add CarrierId column in TelephonyProvider" 2018-10-29 18:04:04 +00:00
calvinpan
beb6cb3b03 Add CarrierId column in TelephonyProvider
Add a column in provider to migrate mno and mvno to carrierid.

Bug: 115709816
Test: runtest --path tests/src/com/android/providers/telephony/TelephonyProviderTest.java
Change-Id: I9c0c0fd069acc7f182d94f422ff15f45ebf187a9
2018-10-29 19:50:14 +08:00
Hai Zhang
b777668584 Add RoleManager into the system.
A role is a unique name within the system associated with certain
privileges. There can be multiple applications qualifying for a role,
but only a subset of them can become role holders. To qualify for a
role, an application must meet certain requirements, including
defining certain components in its manifest. Then the application will
need user consent to become the role holder.

Upon becoming a role holder, the application may be granted certain
privileges that are role specific. When an application loses its role,
these privileges will also be revoked.

Bug: 110557011
Test: build
Change-Id: Icd453a3b032857a8fd157048de8b9609f04e28b8
2018-10-27 11:14:32 -07:00
Kevin Chyn
1a3550c1e2 Merge "Update BiometricManager constants" 2018-10-27 06:49:02 +00:00
Varun Shah
59a1ff3ee7 Merge "Exposes user type related hidden APIs in UserManager." 2018-10-27 02:07:56 +00:00
Kevin Chyn
a8b57efec5 Update BiometricManager constants
Fixes: 117822032

Test: atest BiometricManagerTest
Change-Id: I9a384a94138e188d870dc3f224f6c21b7de1b82c
2018-10-26 16:46:51 -07:00
Julia Reynolds
26f79f9c4f Merge "Add APIs for notification app overlays" 2018-10-26 22:51:54 +00:00
Xiangyu/Malcolm Chen
0036d879dc Merge "Revert "Revert "Clean up SubMgr#getOpportunisticSubscriptions.""" 2018-10-26 22:06:37 +00:00
Xiangyu/Malcolm Chen
0c096a01f7 Revert "Revert "Clean up SubMgr#getOpportunisticSubscriptions.""
This reverts commit 8225032624.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Id620937aec1e19d541c6d1529e97d91292565c6e
2018-10-26 22:02:21 +00:00
Yuchao Zhou
928579ecb0 Merge "Revert "Clean up SubMgr#getOpportunisticSubscriptions."" 2018-10-26 21:58:32 +00:00
Yuchao Zhou
8225032624 Revert "Clean up SubMgr#getOpportunisticSubscriptions."
This reverts commit 9569bc70f9.

Reason for revert: The cl is breaking git_master.
https://android-build.googleplex.com/builds/submitted/5095196/errorprone/latest/view/logs/build_error.log

Change-Id: I534af936b718b2f132473b5b42ea2faabc9382cd
2018-10-26 21:57:29 +00:00
chen xu
c6d25be1bf new system API getRadioAccessFamily
1. new API in telephonyManager to getRadioAccessFamily
2. define bitmask for radioAccessFamily based on NetworkType because
we don't want to expose two sets of definition RIL_RADIO and Network
type together in public API surface
3. convert definition to NetworkType

Bug: 118351153
Test: telehony unit test
Change-Id: I4a71c61929d9df8ec13c157e0452c6f30d8e4b9c
2018-10-26 14:17:22 -07:00
Xiangyu/Malcolm Chen
60db69cd39 Merge "Clean up SubMgr#getOpportunisticSubscriptions." 2018-10-26 21:00:39 +00:00
Jeff Sharkey
bc2ae00878 Magic to keep "_data" paths working.
As part of the storage changes in Q, we're removing the ability for
apps to directly access storage devices like /sdcard/.  (Instead,
they'll need to go through ContentResolver.openFileDescriptor() to
gain access.)  However, in several places we're returning raw
filesystem paths in the "_data" column.  An initial attempt to simply
redact these with "/dev/null" shows that many popular apps are
depending on these paths, and become non-functional.

So we need to somehow return "_data" paths that apps can manually
open.  We explored tricks like /proc/self/fd/ and FUSE, but neither
of those are feasible.  Instead, we've created a cursor that returns
paths of this form:

/mnt/content/media/audio/12

And we then hook Libcore.os to intercept open() syscalls made by
Java code and redirect these to CR.openFileDescriptor() with Uris
like this:

content://media/audio/12

This appears to be enough to keep most popular apps working!  Note
that it doesn't support apps that try opening the returned paths
from native code, which we'll hopefully be solving via direct
developer outreach.

Since this feature is a bit risky, it's guarded with a feature flag
that's disabled by default; a future CL will actually enable it,
offering a simple CL to revert in the case of trouble.

Bug: 111268862, 111960973
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ied15e62b46852aef73725f63d7648da390c4e03e
2018-10-26 09:32:29 -06:00
Courtney Goeltzenleuchter
d49325370b Merge "Make EGL15 class final" 2018-10-26 14:03:26 +00:00
Brad Ebinger
4b81463736 Merge "ImsSsData needs a public constructor for vendors to use" am: a1474266bf am: 207b9dcfbf
am: ee7267f8dd

Change-Id: Ia9ca9493a802b5e79ee7337ddb308b3dd4883114
2018-10-25 20:45:24 -07:00
Tony Zhu
065b19e137 Merge "[Call Screening]Support for carrier call screening app" am: ee31b2214d am: 3cde670dd3
am: 3403275a85

Change-Id: I6a9215503805b6aa42052e42ed0044b9d282ebb6
2018-10-25 20:30:56 -07:00
Hall Liu
0b9ebf1d44 Merge "Add test API to override carrier config" am: a82f952fe7 am: 657e2a925d
am: 19c6fd5ab1

Change-Id: Ie243b230d3f6d8aca5c292ee497d9e4dc060aec0
2018-10-25 19:39:19 -07:00
Nathan Harold
1be1fa0be0 Merge "Add getMobileNetworkOperator to CellIdentityTdscdma" am: ac87c0a884 am: 8dc36336d5
am: 7695b94e10

Change-Id: I2b6a3753b8aaf9e420f114e1c6acc227b38ba8a4
2018-10-25 19:32:53 -07:00
Tyler Gunn
1af91e3de8 Merge "Re-add removed APIs per API council feedback." am: a94a71af13 am: 7085118cfc
am: db0e0f8c57

Change-Id: If4d0ac8815596756774445c558a9456968c4e990
2018-10-25 18:55:47 -07:00
Nathan Harold
a629ea3928 Define CellInfo.UNAVAILABLE for Unreported Fields
For all CellInfo classes, there is a common value for
fields that are unreported by the modem: Integer.MAX_VALUE.
To better document this value, this CL defines it as a
constant "UNAVAILABLE" to indicate that for whatever reason
the framework is not reporting this value to the caller.

Bug: 28171234
Test: make; make offline-sdk-docs
Change-Id: I0aa692e3f1b5478284d262ef97fd65b90bce8293
2018-10-25 23:00:11 +00:00
Julia Reynolds
b6bd93d960 Add APIs for notification app overlays
- Can be enabled/disabled at channel and channel group levels
- An activity to launch can be added to notification

Test: atest, cts
Bug: 111236845
Change-Id: I9a4832211676cca4649d1f28e6e3e3157954d268
2018-10-25 14:17:02 -04:00
Jeff Sharkey
da3b55a122 Merge "Reroute Uri conversions though MediaProvider." 2018-10-25 16:57:59 +00:00
John Reck
fcf14cfd94 Merge "Add theme & View API to control force-dark" 2018-10-25 16:35:10 +00:00
Jeff Sharkey
643e99ef06 Reroute Uri conversions though MediaProvider.
Upcoming changes will prevent apps from reading "_data" columns
directly, which is required to convert between DocumentsProvider and
MediaProvider Uris.  To solve this, delegate the call() through
MediaProvider, where it can perform the "_data" lookup on behalf
of the caller.

Also add new getMediaUri() call to offer symmetry.

Bug: 111960973, 117627072, 110961701
Test: atest android.provider.cts.MediaStoreUiTest
Change-Id: I53c640704d86047d7a4bf1702aca027873395abf
2018-10-24 19:34:09 -06:00
Brad Ebinger
ee7267f8dd Merge "ImsSsData needs a public constructor for vendors to use" am: a1474266bf
am: 207b9dcfbf

Change-Id: Ia47462edc30809ca90f2955eeef87b0d4ba32a80
2018-10-24 17:59:39 -07:00
Youming Ye
e937fd1ad3 Merge "Revert "Add CarrierConfig to hide "Network default" option in Caller ID setting"" am: 94fe6430ea
am: 555090d597

Change-Id: Id8eb4dee3f864c939226321fce5189d43044d1c5
2018-10-24 17:41:46 -07:00
Tony Zhu
3403275a85 Merge "[Call Screening]Support for carrier call screening app" am: ee31b2214d
am: 3cde670dd3

Change-Id: Ibf5b6439d695a5cf6e2d08422370b26a165012da
2018-10-24 17:25:19 -07:00
Hall Liu
19c6fd5ab1 Merge "Add test API to override carrier config" am: a82f952fe7
am: 657e2a925d

Change-Id: Ic93a7e349e412c84d2c3752d9fe1911e42c08ceb
2018-10-24 16:33:18 -07:00