Commit Graph

9881 Commits

Author SHA1 Message Date
Jesse Hall
b12249b671 Create GraphicsEnvironment for communicating with driver loaders
The GraphicsEnvironment class is given information during application
start, and makes it available to EGL/GLES/Vulkan loaders that don't
have easy access to the VM or to the application Context. Currently
only the driver path is handled, but the existing support for setting
library paths (for Vulkan extensions) and cache directory information
should move here.

Bug: 33531483
Test: various apps w/ and w/o driver package installed
Change-Id: I5820d3d1301d5461e10706f551b268c54d4f8926
2017-01-14 17:31:56 -08:00
TreeHugger Robot
18de051c98 Merge "Send EXTRA_USER with DevicePolicy lock broadcasts" 2017-01-14 17:12:57 +00:00
Bartosz Fabianowski
9e0642287e Merge "Add install reason" 2017-01-14 12:58:20 +00:00
Zak Cohen
9013325c3a Merge changes from topic 'vrmode'
* changes:
  Set ui mode in UiModeManagerService to vrheadset when VR mode is enabled.
  Introduce new UI_MODE_TYPE_VR_HEADSET and qualifier.
2017-01-13 23:15:00 +00:00
Bartosz Fabianowski
a34f53f61b Add install reason
This CL allows a reason to be specified when installing a package. The
install reason is a sticky piece of metadata: When a package is e.g.
installed via enterprise policy and an update is then manually
installed or sideloaded, the install reason will remain "policy."
The install reason is tracked separately for each user.

With this CL, two install reasons exist: "policy" and "unknown." Other
install reasons will likely be supported in the future.

Bug: 32692748
Bug: 33415829
Test: Tested manually with "adb install" / "adb uninstall"

Change-Id: I0c9b9e1b8eb666bb6962564f6efd97e41703cd86
2017-01-13 16:51:28 +01:00
Winson Chung
27379c0f89 Merge "Ensure that we always resume task overlay activities if requested." 2017-01-13 07:02:51 +00:00
Winson Chung
cbcadc981b Ensure that we always resume task overlay activities if requested.
- Distinguish between task overlays that need to be resumed and
  those that should not.

Bug: 34240533
Test: Open PiP, tap to show menu.
Change-Id: Ibdb54d544c501a492260f02cdc2de40c5c1a66d1
2017-01-12 17:23:18 -08:00
TreeHugger Robot
317d0c9887 Merge "Send Snooze callback for Assistant" 2017-01-12 20:54:52 +00:00
TreeHugger Robot
d96cc6e250 Merge changes I2ff9bd44,I946e681e,If72df07b
* changes:
  Handle content insets for snapshots
  Always remove starting window in performShow
  Initial implementation of snapshots
2017-01-12 17:39:15 +00:00
Jeff Sharkey
9bc89af3f1 Add API for apps to declare their "category".
Upcoming platform features need to cluster apps together into broad
categories to help summarize information to users.  (For example,
when presenting battery, network, and disk usage.)

We are tightly limiting the set of categories to keep them easily
presentable to users when summarizing information.  This feature is
not designed to be a general-purpose taxonomy, nor should it be
allowed to become one.

Older apps may not have defined a category in their manifests, so
allow the installing app to define a category on their behalf.

Test: builds, boots
Bug: 33815939
Change-Id: I785b882ee7c18072ef47d56e0fc19ad72888e1b7
2017-01-12 09:53:44 -07:00
Julia Reynolds
7967230de2 Send Snooze callback for Assistant
On selection of a snooze context SnoozeCriterion.

Test: runtest systemui-notification & make cts-verifier
Change-Id: Iaca567100c29295fbbf1d327195a114106909652
2017-01-12 10:40:11 -05:00
Jorim Jaggi
e2c77f9035 Handle content insets for snapshots
Pass information about content insets of a snapshotted task to
SystemUI and use it there to correctly offset the snapshot
when drawing.

Test: Open app, go to recents, make sure app aligns before
and after the animation.
Bug: 31339431
Change-Id: I2ff9bd44534bd8f66b591385da1e1e3aec40b6c5
2017-01-12 16:28:19 +01:00
Jorim Jaggi
02886a82d8 Initial implementation of snapshots
All this functionality is hidden behind a flag. If this flag is
active, we disable the regular screenshots.

Instead, we take a screenshot when an app transition for which a
task is disappearing is starting. The screenshot gets stored
into a gralloc buffer. SystemUI uses a new method to retrieve
a snapshot gralloc buffer and then draws it using GraphicBuffer.
createHardwareBitmap().

When starting an existing activity in an existing tasks, or when
bringing an existing tasks to front from recents, we add a new
snapshot starting window. For that, we reuse the existing
starting window, but when creating the window, we use a fake
window that draws the contents of the starting window.

Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotControllerTest
Bug: 31339431
Change-Id: If72df07b3e56f30413db5029d0887b8c9665aaf4
2017-01-12 16:28:01 +01:00
TreeHugger Robot
adf8b4ca76 Merge "Converting action bars to clusters." 2017-01-12 05:11:26 +00:00
Vadim Tryshev
1abe85c867 Converting action bars to clusters.
ActionBar keyboard navigation logic is now implemented via clusters.
Old implementation using setTouchscreenBlocksFocus and Ctrl+Shift+<
shortcut is removed.

Looking at the code, I can’t rule out existence of all 3 categories
(1) action bars with a nested toolbar, (2) action bars without a
nested toolbar and (3) Toolbars outside of action bars.
Because of this, I set “cluster” attribute both on action bar and
toolbar, and have code to avoid nested clusters in case (1).

Support lib’s action/tool bars aren’t converted, however, they
didn’t regress since Ctrl+Shift+< never worked for them. Will be
done after feature freeze.

Bug: 32151632
Test: Manual checks.
Change-Id: Ieb93980088c0fb385a9bc8a5d218ffc269b94dc5
2017-01-11 17:19:39 -08:00
Jeff Schumacher
e5dfa979cb Merge "Made ActivityManager.forceStopPackage a @SystemApi" 2017-01-11 22:34:31 +00:00
TreeHugger Robot
e12c790464 Merge "Make hidden DevicePolicyManager#getDeviceOwnerComponentOnAnyUser system API." 2017-01-11 21:11:06 +00:00
TreeHugger Robot
8b21542ba3 Merge "Added BUGREPORT_OPTION_TELEPHONY." 2017-01-11 20:45:42 +00:00
Zak Cohen
1a6acdbb86 Introduce new UI_MODE_TYPE_VR_HEADSET and qualifier.
Bug: 30989383
Test: Unit test for aapt2
Change-Id: I66dc65af6327b94fed74538bee08cada0b8be4fa
2017-01-11 11:44:47 -08:00
TreeHugger Robot
772ff11cb5 Merge "Add missing break statement to fix cts test" 2017-01-11 19:39:07 +00:00
TreeHugger Robot
3c6f28aa59 Merge "Added TaskWindowContainerController" 2017-01-11 19:14:55 +00:00
TreeHugger Robot
b82e176b55 Merge "Add new system api to pass parameters from Oobconfig to ManagedProvisioning" 2017-01-11 18:56:37 +00:00
Robin Lee
3101b3ad21 Merge changes I3fd28e69,If43820b6
* changes:
  Lock work tasks from SystemUI instead of ActivityStarter
  Bounce work challenge through a WorkLockActivity
2017-01-11 17:41:01 +00:00
Wale Ogunwale
e1fe7fa288 Added TaskWindowContainerController
For linking TaskRecord in AMS to Task window container in WMS.

Bug: 30060889
Test: bit FrameworksServicesTests:com.android.server.wm.AppWindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.TaskWindowContainerControllerTests
Test: Existing test pass and manual testing.
Change-Id: I16248f3e96e5087ba24198a48a3bd10a12ae76a6
2017-01-11 09:19:35 -08:00
Felipe Leme
9606c3bf58 Added BUGREPORT_OPTION_TELEPHONY.
This option takes a lightweight version of bugreport that only includes a few,
urgent sections used to report telephony bugs.

BUG: 32589463
BUG: 26849505
Test: manual
Change-Id: I6f90c02779a1e8aead690428626e3b9f06aa04df
2017-01-11 09:10:57 -08:00
Robin Lee
c41f6ec877 Lock work tasks from SystemUI instead of ActivityStarter
By adding an onTaskProfileLocked(taskId, userId) RPC to
TaskStackListener and routing that through to a new WorkLockController.

Bug: 31001762
Test: //tests/PoApi/src/com/google/android/afwtest/poapi/WorkChallengeTest
Change-Id: I3fd28e6926c3f928e78b3c6ce0fe27413617695f
2017-01-11 14:13:07 +00:00
Amith Yamasani
61019113c4 Add missing break statement to fix cts test
Fix CTS test LocalVoiceInteractionTest#testLifecycle

Fixes: 34194821
Test: cts-tradefed run commandAndExit cts --skip-device-info
--skip-system-status-check --abi=armeabi-v7a -m
CtsVoiceInteractionTestCases -t
android.voiceinteraction.cts.LocalVoiceInteractionTest#testLifecycle
Change-Id: If14126e645b2d0a1307404e2f50088b3994abce2
2017-01-10 15:45:00 -08:00
Felipe Leme
6d553874be YAMAFFR - Yet Another Major AutoFill Framework Refactoring
- Explicitly split View methods into Assist and AutoFill methods, rather
  than use an overloaded method that takes flags.
- Simarly, renamed ASSIST_FLAG_SANITIZED_TEXT and
  ASSIST_FLAG_NON_SANITIZED_TEXT flags to
  AUTO_FILL_FLAG_TYPE_FILL and AUTO_FILL_FLAG_TYPE_SAVE respectively.
- Created a AutoFillUI class to host the auto-fill bar and other UI
  affordances.
- Moved the temporary notifications to AutoFillUI (eventually that
  class will host the real UI).
- Moved FillData to android.app.view.autofill package.
- Split IAutoFillCallback in 2 (IAutoFillAppCallback and
  IAutoFillServerCallback, residing at the app and system_server
  respectively), so service cannot fill the app directly (which lets
  the framework control the UI).
- Moved assist's IResultReceiver to AutoFillServiceImpl so
  system_server can act as a mediator between the AutoFillService
  implementation and the app being auto-filled.
- Replaced FillData and FillableInputFields by a bunch of new objects:
  - FillResponse contains a group of Datasets, each representing
  different values
    that can be used to auto-fill an activity (for example, different
    user accounts), optional id of fields the service is interested
    to save, and an optional bundle for service-side extras.
  - Dataset contains a name, Fields, and an optional bundle for
    service-side extras.
  - Fields contain an AutoFillId (parcelable) and a value (Bundle)
- Changed the temporary notifications to emulate the new workflow:
  - Initial notification requests the auto-fill data but do not
    auto-fill.
  - Once service calls back, a new notification is shown with the
    results.
  - Then if the user selects a dataset, the activity is auto-filled
    with it.
  - It also shows a notification to emulate what can be saved.
- Created an VirtualViewDelegate for views that uses a virtual
  hierarchy for assist data.
- Added new methods on ViewStructure to add children with virtual ids.
- Added 2 methods on View to support auto-fill:
  - autoFill(Bundle) to auto-fill the view.
  - getAutoFillType() to return how the view can be auto-filled.
- AutoFillType defines the input fields that support auto-fill:
  - Text fields (like EditText)
  - Toggle fields (like CheckBox)
  - Lists (like RadioGroup)
- AutoFillType can also have a sub-type representing its semantic (for
  now only text fields have it, and it's the same as getInputType()).
- etc :-)

Bug: 31001899
Test: manual verification
Change-Id: I2dd2fdedcb3ecd1e4403f9c32fa644cb914e186f
2017-01-10 12:50:47 -08:00
Mark Renouf
fb5b147781 Merge "Update javadoc for startActivityForResult(Intent, int, Bundle)" 2017-01-10 17:53:11 +00:00
Geoffrey Pitsch
9f7fd6c734 Merge "API improvements for creating NotificationChannels" 2017-01-10 16:20:13 +00:00
Andrew Scull
54402aab14 Merge "Evict CE key on request and when work mode is turned off." 2017-01-10 13:20:49 +00:00
Jeff Sharkey
8dedad31f7 Wire up storage stats API to installd.
Now that installd has the implementation details we need, we can wire
up the public APIs to use them.

Shuffle APIs around a bit so that StorageStats can be reused for both
UID and UserHandle results, and rename StorageSummary to
ExternalStorageStats.  Provide getTotalBytes() and getFreeBytes() as
first-class methods so we can answer those questions quickly without
paying the cost of measuring external storage details.

Current costs on a typical device with a test account after flushing
dentry caches:

queryStatsForUid() manual: 6922ms
queryStatsForUid() quota: 525ms

queryStatsForUser() manual: 1686ms
queryStatsForUser() quota: 113ms

queryExternalStatsForUser() manual: 42ms
queryExternalStatsForUser() quota: 2ms

For verification purposes, a new "fw.verify_storage" system property
can be set to compute both manual and quota statistics, and log any
discrepancies.

Test: builds, boots
Bug: 27948817, 32206268
Change-Id: I4ea3df3372a7379aa8cf4c20c44120c8f0702c15
2017-01-09 22:30:58 -07:00
Robin Lee
d2a73ed211 Send EXTRA_USER with DevicePolicy lock broadcasts
DeviceAdmins inside profiles may receive broadcasts referring either
to the parent profile or to themselves.

We need a way to differentiate that.

Same commit fixes a bug in DevicePolicyManagerTest where USER_SYSTEM
is returned twice in getProfiles() when called for a managed profile of
USER_SYSTEM. This does not happen in the real API.

Bug: 30185351
Bug: 31001762
Test: runtest -x services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Change-Id: Iea2735357f4019b2b81b6784e7ea6aead63f2636
2017-01-09 18:56:12 +00:00
Julia Reynolds
6eb2857ee2 Merge "Cannot have badge only channels" 2017-01-09 14:59:50 +00:00
Charles He
31df867f7e Merge "Update SystemUpdatePolicy javadoc." 2017-01-09 11:09:58 +00:00
Jeff Sharkey
8d729e8c14 Merge "Initial API shape for storage statistics." 2017-01-07 16:18:38 +00:00
Dave Friedman
a873bf444e Docs: Updates Javadoc documentation. Bug: 32532540 am: 2a3ebadcbe am: e0fd4c8a3b am: a111e0f7f0 am: eedb695579 am: fb8676e50c
am: 5346355f4d

Change-Id: I67559350187089b64f0ce092c1f6ae8e7a52542e
2017-01-07 03:06:54 +00:00
Dave Friedman
5346355f4d Docs: Updates Javadoc documentation. Bug: 32532540 am: 2a3ebadcbe am: e0fd4c8a3b am: a111e0f7f0 am: eedb695579
am: fb8676e50c

Change-Id: I5b13dcbab3aed19c805473a6ab91eef197ded51d
2017-01-07 02:58:15 +00:00
Dave Friedman
fb8676e50c Docs: Updates Javadoc documentation. Bug: 32532540 am: 2a3ebadcbe am: e0fd4c8a3b am: a111e0f7f0
am: eedb695579

Change-Id: Ia5922ed50290cc8f47d07f1516bc5a21b0bec270
2017-01-07 02:50:18 +00:00
Dave Friedman
eedb695579 Docs: Updates Javadoc documentation. Bug: 32532540 am: 2a3ebadcbe am: e0fd4c8a3b
am: a111e0f7f0

Change-Id: Ic5d7e0ce01bd573e0882122d0709cbc2da56f448
2017-01-07 02:43:44 +00:00
Dave Friedman
a111e0f7f0 Docs: Updates Javadoc documentation. Bug: 32532540 am: 2a3ebadcbe
am: e0fd4c8a3b

Change-Id: I8f65ad71433efbe1121e0617c6d7575b7db3a051
2017-01-07 02:38:45 +00:00
Dave Friedman
e0fd4c8a3b Docs: Updates Javadoc documentation. Bug: 32532540
am: 2a3ebadcbe

Change-Id: Ibee55c5e73d9b51e5f5df24be01b0b797fa8a7a5
2017-01-07 02:30:45 +00:00
Dave Friedman
2a3ebadcbe Docs: Updates Javadoc documentation.
Bug: 32532540

Change-Id: Ia811d9a51812206b18b75a98f6c5a55b92627404
2017-01-06 16:41:19 -08:00
Geoffrey Pitsch
0353371529 API improvements for creating NotificationChannels
Remove listener for aysnchronous operation.
Allow multiple channel creation from a single call.
Silently no-op for creating existing channels.

Test: runtest systemui-notification
Change-Id: Ibc1340d21efa0c12d126bee437adcbb99141e86a
2017-01-06 16:13:04 -05:00
Julia Reynolds
aebfc4e7a3 Cannot have badge only channels
Test: runtest systemui-notification & cts
Change-Id: I256e35a79400c1d25b3d2f1c7c5f8c513242a2aa
2017-01-06 15:56:44 -05:00
Julia Reynolds
f35e3976e3 Allow apps to enable notification badging.
Test: runtest systemui-notification
Change-Id: Ia16d671d864d1eee902652e31f023e30dc6b7387
2017-01-06 10:57:51 -05:00
Jeff Sharkey
e8cece9f20 Initial API shape for storage statistics.
This API is designed to provide both UID-level stats and overall
summary data for a given storage device, as identified by UUID.

The use of UID-level granularity might appear a bit clunky, but it
matches other usage statistics (such as network and battery), and it
allows us to implement it using an extremely fast quota kernel
feature.

A future CL will wire up the implementation to installd.

Test: builds, boots
Bug: 32206268
Change-Id: I7b51877682d0370c2402c19346f57809f0e7ac53
2017-01-05 15:39:16 -07:00
Julia Reynolds
4b82f6ddb0 Wait 100 ms for assistant response before posting.
Test: make cts-verifier
Change-Id: Idf04c2d24f02a32634e2308da6d1599c9ea29bd4
2017-01-05 20:26:23 +00:00
Victor Chang
38cfd9c51a Add new system api to pass parameters from Oobconfig to ManagedProvisioning
- trying to remove the provisioning in Oobconfig
- Pass the provisioning information in ManagedProvisioning instead

Bug: 32760855
Test: update api successfully
Change-Id: Ic108856a7785574ee3f104f1156e155f2f2165b0
2017-01-05 17:08:57 +00:00
Jeff Schumacher
b8cadef3b0 Made ActivityManager.forceStopPackage a @SystemApi
This change exposes ActivityManager.forceStopPackage as a @SystemApi so the
Play Store can use it.

Test: Patched in the GTS tests in ag/1753727 and made sure they passed.
Bug: 33021637
Change-Id: I4891f96cde035228ce42aefb726c5fc3c1dd30b3
2017-01-04 11:33:53 -08:00