Commit Graph

10597 Commits

Author SHA1 Message Date
Jeff Davidson
35cda39422 Squashed merge of master-sim into master.
Includes the following commits:

==

New system feature: eUICC.

Presence of this feature implies that eUICC-related APIs are expected
to function as long as an eUICC is present in the device. Note that an
eUICC may be embedded in the device but may also be removable.

==

Add empty EuiccManager API and plumbing.

==

Add stub EuiccService.

EuiccService is the class that the LPA app must implement; for now,
just define the action and priority so that the implementation can be
found. Actual methods will come later.

Also declare two relevant permissions: BIND_EUICC_SERVICE, which the
implementation must require (so that nobody else can bind to the
service directly), and WRITE_EMBEDDED_SUBSCRIPTIONS, which permits
signature|privileged apps and CTS (via development) to access
EuiccManager APIs.

==

Add UiccAccessRule based off UiccCarrierPrivilegeRules#AccessRule.

This class can be used to transfer access rules between an
EuiccService implementation and the platform.

We also add a simple encoding/decoding of a list of rules so that they
may be stored in the subscription info table.

==

Add getEid() to EuiccManager/EuiccService.

getEid() fetches the EID. It requires either a privileged permission
(READ_PRIVILEGED_PHONE_STATE) or carrier privileges on the
currently-active profile. Until there is a use case that requires
opening this up to apps with only READ_PHONE_STATE, we shouldn't do
so.

To avoid churn in the future, the API signatures for EuiccService
include a slot ID to identify which SIM slot is being used. However,
this parameter is currently not populated correctly (nor is it usable,
as no Telephony APIs accept a slot ID to address commands). There is
no need to expose it yet in the EuiccManager APIs as we expect to
follow the TelephonyManager pattern of allowing per-slot instances of
EuiccManager in the future while keeping other method signatures the
same.

==

Define Euicc UI actions in EuiccManager/EuiccService.

The EuiccManager actions are to be implemented by the platform (and
only the platform), which forwards the actions to the active
implementation.

Also, remove our explicit priority meta-data tag as we can just rely
on android:priority in the corresponding intent-filter.

==

APIs for downloading embedded subscriptions.

Includes:

-getDownloadableSubscriptionMetadata, used by the platform and LUI to
fetch metadata about a downloadable subscription. The platform will
use this to perform the necessary permission checks (only allowing
otherwise-unprivileged apps to download profiles that are permitted
per the subscription metadata), and the LUI can use this to present
the name of the profile.

-downloadSubscription, to actually perform a profile download.

The stub for startResolutionActivity is included but not implemented;
resolution activities will be handled in a follow-up change.

==

Test: TreeHugger
Change-Id: I47b1da5a69f0736012cb137e02cd6c4e07fdaace
2017-04-03 11:17:53 -07:00
TreeHugger Robot
5dbf82ed1f Merge "Correct unit in waitForMonitorWithTimeout JavaDoc." 2017-04-01 04:43:40 +00:00
Felipe Leme
09173fc216 Merge "Created an HtmlInfo object on ViewStructure." into oc-dev am: 4d558930c8
am: 7de522c966

Change-Id: I938906a27bc95b7e200fe1f1211dd757641209f4
2017-04-01 02:48:10 +00:00
Felipe Leme
7de522c966 Merge "Created an HtmlInfo object on ViewStructure." into oc-dev
am: 4d558930c8

Change-Id: I81b4396e998b375feca626e5c0bc188b5f85cb09
2017-04-01 02:39:50 +00:00
TreeHugger Robot
4d558930c8 Merge "Created an HtmlInfo object on ViewStructure." into oc-dev 2017-04-01 02:34:03 +00:00
Karthik Ravi Shankar
3b2b8a6753 Launch 2D activities in VR mode am: 99493dbc94
am: 9a26012d62

Change-Id: Id03fea3d32229761069f2bddfcadda60897c5637
2017-04-01 00:10:12 +00:00
Karthik Ravi Shankar
9a26012d62 Launch 2D activities in VR mode
am: 99493dbc94

Change-Id: I33c4458ca441b8e95d45516cce2bcb7eb020ee3f
2017-03-31 23:59:22 +00:00
TreeHugger Robot
f04d039584 Merge changes from topic 'launch-2d-activities-vr' into oc-dev
* changes:
  Allow shell uid to access Vr APIs
  Add vr persistent mode enable/disable
  Launch 2D activities in VR mode
2017-03-31 23:48:22 +00:00
Dianne Hackborn
cc88ddd7ea Merge "Implement issue #36590595: Add ability to associated a ClipData with JobInfo" into oc-dev am: 2d161b1d3f
am: 666fe849e3

Change-Id: I61afc96a01bc8bc5d637d65a3f9a84452babd3ed
2017-03-31 23:44:42 +00:00
Dianne Hackborn
666fe849e3 Merge "Implement issue #36590595: Add ability to associated a ClipData with JobInfo" into oc-dev
am: 2d161b1d3f

Change-Id: I4aed07a3ad88f3b171e92aaa70f88bcc4da131b8
2017-03-31 23:29:01 +00:00
TreeHugger Robot
2d161b1d3f Merge "Implement issue #36590595: Add ability to associated a ClipData with JobInfo" into oc-dev 2017-03-31 23:21:11 +00:00
Dianne Hackborn
a47223f99b Implement issue #36590595: Add ability to associated a ClipData with JobInfo
Yum!

Also needed to have a Context.revokeUriPermission() variant that is sane,
so reasonable CTS tests can be written.

Test: new ClipDataJobTest added.

Change-Id: Ia3135ea788a6e32c971bae7dab3a844d0ef4139c
2017-03-31 10:41:50 -07:00
Julia Reynolds
8e6cb82a1a Merge "Rename badge icon method" into oc-dev am: ed8d07f213
am: 52e063ee15

Change-Id: If360b1c8a5f84c0be519cc8ce7e472c23608c202
2017-03-31 16:51:51 +00:00
Julia Reynolds
52e063ee15 Merge "Rename badge icon method" into oc-dev
am: ed8d07f213

Change-Id: I26f8b9cf46ebd30608bd038dde946e7139c9f25a
2017-03-31 16:41:27 +00:00
Julia Reynolds
ed8d07f213 Merge "Rename badge icon method" into oc-dev 2017-03-31 16:34:03 +00:00
Karthik Ravi Shankar
99493dbc94 Launch 2D activities in VR mode
When in VR mode, launch all activities into the virtual display ID as
provided by the Compatibility display. This includes two cases -

- New activity launches
- Existing activity in the background.

Testing Done: Tested with PlanarVirtualDisplay app and Settings,
Calculator and GestureApp with different intent flags.

Bug: 36071574
Bug: 36071445
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testVrActivityLaunch
Test: #testVrActivityReLaunch

Change-Id: Ic590a7cbd6f9b339dc83b22a8ffb1252219ef22e
Signed-off-by: Karthik Ravi Shankar <karthikrs@google.com>
2017-03-31 08:37:05 -07:00
Nimrod Gileadi
c895a4b870 Correct unit in waitForMonitorWithTimeout JavaDoc.
The method delegates to ActivityMonitor.waitForActivityWithTimeout,
which takes milliseconds.

Bug: 6150572
Test: JavaDoc only.
Change-Id: I5a7c7634ddc6ac45bc6e64c9f1bd568c38d0b75f
2017-03-31 13:23:32 +01:00
Anton Philippov
b55847891b Merge "Fix BackupManagerMonitor wrapping in RestoreSession" into oc-dev am: 537fd18eaf
am: 7cecad7b7b

Change-Id: I54a0c04e4d2da06ad28ed56aac038c8a88be4d90
2017-03-31 10:54:10 +00:00
Anton Philippov
7cecad7b7b Merge "Fix BackupManagerMonitor wrapping in RestoreSession" into oc-dev
am: 537fd18eaf

Change-Id: I7d83249d341d150d3cdd3aad9b784e6ef8a4b792
2017-03-31 10:49:10 +00:00
Anton Philippov
537fd18eaf Merge "Fix BackupManagerMonitor wrapping in RestoreSession" into oc-dev 2017-03-31 10:43:28 +00:00
Philip P. Moltmann
4a61ca5ef6 Merge "Rename autoFillHint to autoFillHints." into oc-dev
am: 1a098cf62b

Change-Id: I8e20dac31fac8becbdd553b436a8a38312979e50
2017-03-31 01:47:35 +00:00
TreeHugger Robot
1a098cf62b Merge "Rename autoFillHint to autoFillHints." into oc-dev 2017-03-31 01:41:45 +00:00
Chris Tate
a97c5dce75 Merge "Reschedule jobs that crash partway through" into oc-dev am: 4a0e84b454
am: 4f81ea1bf6

Change-Id: I1d7251641d7cb0472d844b6b7b42e024c288e46d
2017-03-30 23:59:58 +00:00
Chris Tate
4f81ea1bf6 Merge "Reschedule jobs that crash partway through" into oc-dev
am: 4a0e84b454

Change-Id: I4462c39784cbd93d0799edfc899d627230890afc
2017-03-30 23:55:30 +00:00
Chris Tate
4a0e84b454 Merge "Reschedule jobs that crash partway through" into oc-dev 2017-03-30 23:46:39 +00:00
Philip P. Moltmann
81192b40de Rename autoFillHint to autoFillHints.
Fixes: 35364993
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
Change-Id: I65a4c2c65563e7bbd60c4e99c8800b0b11af2300
(cherry picked from commit feb3299ed5)
2017-03-30 23:45:33 +00:00
TreeHugger Robot
1507baaf8e Merge "Revert "Another buggy app is already targeting O."" 2017-03-30 23:27:38 +00:00
Philip P. Moltmann
4f656ce246 Merge "Rename autoFillHint to autoFillHints." 2017-03-30 22:22:21 +00:00
Felipe Leme
25bf787ffb Created an HtmlInfo object on ViewStructure.
The ViewStructure typically represents a View, but it it can also be a virtual
view; in particular, WebView uses virtual views to represent HTML elements.

Although most of the properties of the HTML element maps to properties of
Android Views, some properties (such as 'name' and 'id' on <INPUT> fields)
don't, and those are crucial for autofilling web pages.

Rather than trying to artificially map these properties, it's better to create
a generic representation, for the following reasons:

1. Web standards move in a different velocity than Android APIs
2. Android APIs cannot be changed easily. Deprecated APIs continue to work,
   and new added APIs don't work in older versions
3. The data used for autofill is opaque to the Framework - it's only relevant
   to the node producers (like WebView) and consumers (Autofill services).

Also removed the setIdEntry() that was used for the same purpose.

Fixes: 36696757
Bug: 36718508
Test: VirtualContainerActivityTest with new checks pass

Change-Id: Ia626bd1f640b0b5861e81a5915504b95029874c9
2017-03-30 14:24:05 -07:00
Jeff Sharkey
be630119c9 Revert "Another buggy app is already targeting O."
This reverts commit 4498e03d2b.

Reason for revert: b/36612878 is fixed for realz

Change-Id: I5b7e78e52165d51631ca0a39cce3a7a05090ae0f
2017-03-30 21:21:13 +00:00
Christopher Tate
2c86398857 Merge "API refactor: context.startForegroundService()" into oc-dev
am: 60e0c19505

Change-Id: Id1a027f181ae6cf8e4040b0c8f705504026c34a6
2017-03-30 21:06:55 +00:00
Christopher Tate
08992ac57e API refactor: context.startForegroundService()
Rather than require an a-priori Notification be supplied in order to
start a service directly into the foreground state, we adopt a two-stage
compound operation for undertaking ongoing service work even from a
background execution state.  Context#startForegroundService() is not
subject to background restrictions, with the requirement that the
service formally enter the foreground state via startForeground() within
5 seconds.  If the service does not do so, it is stopped by the OS and
the app is blamed with a service ANR.

We also introduce a new flavor of PendingIntent that starts a service
into this two-stage "promises to call startForeground()" sequence, so
that deferred and second-party launches can take advantage of it.

Bug 36130212
Test: CTS

Change-Id: I96d6b23fcfc27d8fa606827b7d48a093611b2345
(cherry picked from commit 79047c62b5)
2017-03-30 18:31:24 +00:00
Chris Tate
a94c58642f Merge "API refactor: context.startForegroundService()" 2017-03-30 18:24:53 +00:00
Maurice Lam
7c61bd0fbc Merge "Make Notification.EXTRA_ALLOW_DURING_SETUP system API" into oc-dev
am: 257047b24b

Change-Id: I2c2efe34719c14cd3fc3ff55f91917a2141218d3
2017-03-30 18:11:07 +00:00
Maurice Lam
257047b24b Merge "Make Notification.EXTRA_ALLOW_DURING_SETUP system API" into oc-dev 2017-03-30 18:04:24 +00:00
Evan Rosky
2c449964f8 Merge "Allow ToolbarActionBar to pass-through unhandled keyShortcuts" into oc-dev
am: f114667f2d

Change-Id: I75deead3b2767d19f25378c4f34ca31c87027cae
2017-03-30 17:00:27 +00:00
Evan Rosky
f114667f2d Merge "Allow ToolbarActionBar to pass-through unhandled keyShortcuts" into oc-dev 2017-03-30 16:46:27 +00:00
George Mount
be99bf2cd4 Merge "Fix getting wrong instance when restoring non-config" into oc-dev
am: 8386603230

Change-Id: I7ee0bb17c62ec2a40c4f2e168f88296b7bc86989
2017-03-30 16:33:35 +00:00
Julia Reynolds
612beb2f2f Rename badge icon method
Test: make
Change-Id: Ic7f7dc3319ba4ffa67e1e02acd1828ca46975baf
2017-03-30 11:42:35 -04:00
George Mount
b81f36bb72 Merge "Make public getFragments() and onGetLayoutInflater() methods" into oc-dev
am: ce3cf36652

Change-Id: I4ebe9cd31732ea45e77e6bb0a640160a90c910b0
2017-03-30 01:37:30 +00:00
Christopher Tate
b2087f874c Reschedule jobs that crash partway through
We were properly re-running jobs if the app hung during their
execution, but outright crashes wound up with the scheduled job
being dropped.  That's bad; it can easily lead to broken monitoring
in the case of content-triggered jobs.

We now reschedule with backoff when this happens.  In addition, to
mitigate the impact of repeatedly crashing apps, we now enforce a
minimum backoff interval of 10 seconds for automatic reschedules.

Bug 36030229
Test: manual

Change-Id: Ib5da583d7901d1255066c48558b35186eb641e17
2017-03-29 18:12:36 -07:00
Nathan Harold
560c9ec724 Merge commit 'e45e328821ba' into oc-dev-plus-aosp
Change-Id: I30ad9038be8faee57e5d6b1391d9e70a966a9a77
2017-03-29 17:05:10 -07:00
Nathan Harold
e45e328821 Merge commit 'ce073d70bedc' into stage-aosp-master
am: 4fdc7d5ddd

Change-Id: I4bde8eedc986900096fc8429da2b195f907605c9
2017-03-29 23:56:06 +00:00
Evan Rosky
c46203785c Allow ToolbarActionBar to pass-through unhandled keyShortcuts
It was consuming all keyShortcuts which broke system hotkeys
like shift+tab.

In order to prevent the decor/phonewindow from creating menus,
this creates a dummy view in onCreatePanelView.

This also includes a change to Activity to not send KEYCODE_TAB
keystrokes to the defaulthandler. This was preventing keyboard
navigation from working on any activity that had a default
search fallback.

Bug: 32482282
Bug: 18021345
Test: Added a CTS test (ToolbarTest#testKeyShortcuts) for toolbar
      keyShortcuts. Verified Tab-navigation works in Play Store.
Change-Id: I5c732a2b21219157818bed49576debd20d5a8178
(cherry picked from commit b22faf524e)
2017-03-29 23:41:47 +00:00
Maurice Lam
96c1003e1a Make Notification.EXTRA_ALLOW_DURING_SETUP system API
Test: Manually tested setup wizard notifications continue to work
Bug: 34705874
Change-Id: If2bff20a74caeac5041d97f1656138676c93f554
2017-03-29 16:19:54 -07:00
Nathan Harold
4fdc7d5ddd Merge commit 'ce073d70bedc' into stage-aosp-master
Change-Id: I319034a5b77de5cf71de0e110bb17819fb907f1b
2017-03-29 16:04:31 -07:00
George Mount
5dd7c9af6d Fix getting wrong instance when restoring non-config
Bug 36679897

When restoring the non-config fragments, the wrong index was
being used to lookup the fragment fromt the list of active
fragment states.

Test: Ic862fd9670408dab09ab5817cdec21e91aef001b
Change-Id: Ic5a8e723041949e6d01d4f5ddc6d54e491143b59
2017-03-29 15:17:44 -07:00
Philip P. Moltmann
feb3299ed5 Rename autoFillHint to autoFillHints.
Fixes: 35364993
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
Change-Id: I65a4c2c65563e7bbd60c4e99c8800b0b11af2300
2017-03-29 15:14:38 -07:00
George Mount
c7146beabe Make public getFragments() and onGetLayoutInflater() methods
Bug 34703669
Test: I846ef668e3dd7d664cfb56d2b9400467ba9b79f4
Change-Id: Ie202960ada86b25e964f98a639b5f5740c8fdb79
2017-03-29 14:58:42 -07:00
Christopher Tate
79047c62b5 API refactor: context.startForegroundService()
Rather than require an a-priori Notification be supplied in order to
start a service directly into the foreground state, we adopt a two-stage
compound operation for undertaking ongoing service work even from a
background execution state.  Context#startForegroundService() is not
subject to background restrictions, with the requirement that the
service formally enter the foreground state via startForeground() within
5 seconds.  If the service does not do so, it is stopped by the OS and
the app is blamed with a service ANR.

We also introduce a new flavor of PendingIntent that starts a service
into this two-stage "promises to call startForeground()" sequence, so
that deferred and second-party launches can take advantage of it.

Bug 36130212
Test: CTS

Change-Id: I96d6b23fcfc27d8fa606827b7d48a093611b2345
2017-03-29 13:12:09 -07:00