Commit Graph

10945 Commits

Author SHA1 Message Date
Winson Chung
aa7fa01353 DO NOT MERGE Updating AnimationSpec and related internal APIs to use GraphicBuffer.
- This reduces the copy of the hardware bitmap when it is
  parceled/unparceled.

Bug: 38507414
Bug: 62021436
Test: Launch Overview to/from app, ensure that the header bar shows
Test: go/wm-smoke

Change-Id: I85a9a59a0a3699d1642158061d10fddef34393c3
Signed-off-by: Winson Chung <winsonc@google.com>
2017-05-31 16:23:24 +00:00
Julia Reynolds
8bc45cb78f Merge "Suppress HUNs according to group alert behavior" into oc-dev 2017-05-30 16:43:39 +00:00
Julia Reynolds
745c15477b Properly read vibration setting on boot.
Test: runtest systemui-notification
Change-Id: I400bc3df441524abe4973d4d6bccc7ef30a2e1c7
Fixes: 37865035
2017-05-26 20:35:16 +00:00
Julia Reynolds
30203159f9 Suppress HUNs according to group alert behavior
Test: runtest systemui, systemui-notification
Change-Id: I9f987bc0ba22f2d48b02585fd722880bb5c2a9b5
Fixes: 62126386
2017-05-26 20:35:07 +00:00
Adam Lesinski
24c18af14a Merge "Add ResourceId validation helper method" into oc-dev 2017-05-26 18:45:28 +00:00
TreeHugger Robot
25ae29dfd5 Merge "Removed deprecated setAutofill() method for virtual children." into oc-dev 2017-05-26 15:08:20 +00:00
Julia Reynolds
3a2ac3e11b Merge "Allow some system notifications to be blocked." into oc-dev 2017-05-26 14:39:30 +00:00
TreeHugger Robot
8d902a9e28 Merge "Remove the old version of setAffiliationIds" into oc-dev 2017-05-26 13:00:40 +00:00
Julia Reynolds
f732159cf8 Allow some system notifications to be blocked.
- Happens at a channel level, and system services have to opt in

Bug: 38428796
Test: runtest systemui-notification, manual
Change-Id: I5592b4e32c177844583aee25379390199eef0a58
2017-05-25 20:42:59 +00:00
Felipe Leme
5f3dbb30fc Removed deprecated setAutofill() method for virtual children.
Test: CtsAutoFillServiceTestCases pass

Bug: 37563972

Change-Id: Icbffb89d86ee65831b7c78effd2522ac7891e1be
2017-05-25 11:51:50 -07:00
Adam Lesinski
9553fb3240 Add ResourceId validation helper method
An invalid, 'null' resource ID is defined as 0. Apps often use -1.

Add a helper method that makes checking valid IDs easy and more
centralized.

Eventually make it public API.

Bug: 38393777
Test: manual
Change-Id: I969ec4a45e86bdab3d7f57d357d475b77c7f8a78
2017-05-24 15:39:23 -07:00
Sergey Vasilinets
ce8a4b89c8 Merge "Correctly save retained fragments in the backstack" into oc-dev 2017-05-24 21:05:38 +00:00
TreeHugger Robot
6c6d37d416 Merge "Don't keep a reference to Service object" into oc-dev 2017-05-24 00:31:40 +00:00
TreeHugger Robot
eee1dd26fa Merge "Hide Autofill UI when non-savable id is gone." into oc-dev 2017-05-23 23:28:38 +00:00
sergeyv
be6f50424a Correctly save retained fragments in the backstack
Test: FragmentLifecycleTest#retainedFragmentsInBackstack
bug:62027280
Change-Id: I4ba20c5138f957107422c46d67095c7c8db2c608
2017-05-23 15:24:37 -07:00
Bryce Lee
367b880c02 Merge "Revert "Disallow starting activities without new task from non-activity context."" into oc-dev 2017-05-23 19:50:24 +00:00
Bryce Lee
25ae100cb0 Revert "Disallow starting activities without new task from non-activity context."
This reverts commit 8b49a5c0aa.

Change-Id: I7d2da4ac72ca578942b38fccf8b151f3a2ed081f
2017-05-23 19:46:59 +00:00
Felipe Leme
27e202208b Hide Autofill UI when non-savable id is gone.
AutofillManager keeps track of which views the AutofillServiec is interested to
save, so when these views are gone, the session is finished.

But when the AutofillService returns a dataset whose views it can not save,
the FillUi for these views are not hiding when the views are gone. This CL
fixes this issue by:

- Keeping track which non-savable views should be tracked.
- Pass the view (instead of it's id) when the UI on such views should be hid.

This CL also optimized some AIDL and internal calls by avoiding the creating of
unnecessary Lists.

Test: manual verification with Snapchat
Test: existing CtsAutoFillServiceTestCases pass
Test: new tests on MultipleFragmentLoginTest pass

Fixes: 38199452
Change-Id: I78fa357962dbc6667146d8e08cd6bacb63e0f337
2017-05-23 10:46:24 -07:00
Amith Yamasani
7592825084 Don't keep a reference to Service object
This is a potential fix for a global reference leak in the
system process by a JobService in an app.

Bug: 38467796
Test: manual
Change-Id: I8756c39ac77bead068c88fce750c4024f9ac1c03
2017-05-23 10:37:09 -07:00
Dianne Hackborn
ad6dde65ff Merge "Fix issue #38393543: Not allowed to start service Intent" into oc-dev 2017-05-22 20:03:33 +00:00
Bryce Lee
3ebe54b3e6 Merge "Disallow starting activities without new task from non-activity context." into oc-dev 2017-05-22 14:31:07 +00:00
Dianne Hackborn
3e6e3855ea Fix issue #38393543: Not allowed to start service Intent
Turns out there was another path in to the activity manager
to trigger a PendingIntent, which needs to be modified to
now also pass in the whitelist token of that pending intent.

Test: manual
Change-Id: I755ff87db1b782fa6974d404dcb490786053c5e0
2017-05-19 16:12:08 -07:00
Dianne Hackborn
e4f484915f Merge "Work on issue #36891897: Need to ensure foreground services..." into oc-dev 2017-05-18 17:35:15 +00:00
Tony Mak
8c6969b69b Remove the old version of setAffiliationIds
Test: Can build

Build: 37622682

Change-Id: I07e630e96f5aed5d450652c465e00ffed13a2a2c
2017-05-17 15:20:04 +00:00
Dianne Hackborn
fb5d4b598c Work on issue #36891897: Need to ensure foreground services...
...can't hide themselves

Propagate to notification manager the apps that are causing
the "running in background" notification to be shown.

Also hopefully this time fix the problem with the notification
being stuck.  (We were mixing elapsed time in the state management
with uptime in the message scheduling.)

Test: manual

Change-Id: I9e38bff5fe69fa75b418e34c84d4e704ef70f460
2017-05-16 17:05:02 -07:00
Winson Chung
0553cbcf36 Merge "Updating Overview to work with PiP" into oc-dev 2017-05-16 23:41:17 +00:00
TreeHugger Robot
f38a1d3d2a Merge "Restrict access to instant app data in usage stats" into oc-dev 2017-05-16 21:56:15 +00:00
Jorim Jaggi
cb414be017 Merge "Optimize hot launching recents" into oc-dev 2017-05-16 19:34:52 +00:00
Makoto Onuki
ad623015a1 Restrict access to instant app data in usage stats
- Events are obfuscated based on whether the app was instant or not at
the time each event was logged.

- UsageStats are obfuscated based on whether each app is instant or
not at the moment.

Bug 38202133
Test: Manual test using UsageStatsTest and instant apps

Change-Id: I3c74309196b88d010d317cb0dd6749bf4624e876
2017-05-16 12:33:43 -07:00
Jorim Jaggi
34795e3197 Optimize hot launching recents
Rearrange how we generate the transition specs, which involves
creating a thumbnail on the mainthread (about 10ms on large
devices): First, we put launching the activity onto a handler
thread (with default priority), to free up the main thread. Then,
we immediately start generating the thumbnail such that when the
future calls us we have the generated spec already handy.

For that we need to be able to supply a specs future into
ActivityOptions, to avoid race conditions. Furthermore we need to
make sure not to call into WM while creating specs, to avoid WM
lock contention.

Test: App -> Recents -> Same app, inspect app transition logs
Test: Double tap recents for quick switching

Bug: 32668632
Change-Id: I6001e29145f8e56deb9c4ead46c53c87c9191436
Merged-In: Ic6ec65c2560f67cade3b5ddde9f79ee13e9ba32c
2017-05-16 17:28:40 +02:00
TreeHugger Robot
ce50eb2d17 Merge "Fix back stack problems due to postponed transitions" into oc-dev 2017-05-16 14:22:08 +00:00
TreeHugger Robot
e04765998e Merge "Support recursive static shared lib dependency" into oc-dev 2017-05-15 23:49:07 +00:00
Rob Carr
f5b6818009 Merge "Preserve non-floating state when entering pinned stack." into oc-dev 2017-05-15 23:17:33 +00:00
Svet Ganov
58c99f0207 Support recursive static shared lib dependency
Test: Updated the static shared lib CTS tests to verify that
      All static shared lib CTS tests pass

bug:35359862

Change-Id: Id4a0dabbc9d8e98962e92b6f537f6ffffa63b585
2017-05-15 14:43:17 -07:00
George Mount
c972092e76 Fix back stack problems due to postponed transitions
Bug 38277003

The back stack was being moved while executing operations and
then again when the postponed transaction was executed. It should
only be done once.

Test: Ie47e1f2f158325b9cfd6edb5c40c65d764ff9056
Support Lib Change: I3159c2345a7b77fa82f1c602f4639f51b5a47980

Change-Id: I3b7a032e7e8a9aec565157d42dcaa7232b256ae8
2017-05-15 13:46:46 -07:00
Felipe Leme
7f33cd350b Start a new session on manual request after session is "gone".
When the autofill service returns a null FillResponse, the session is marked
"gone" because the service cannot autofill it. But there might be cases where
the view structure change and it's now autofillable, so need to allow users
to manually request autofill again in such cases.

Fixes: 38205945
Test: CtsAutoFillServiceTestCases pass
Test: LoginActivityTest.testAutofillManuallyAfterServiceReturnedNoDatasets()
Test: LoginActivityTest.testAutofillManuallyAndSaveAfterServiceReturnedNoDatasets()

Change-Id: I9b23c255e563dd0646bf266d31ddb10dcc4f7f6d
2017-05-14 00:31:45 -07:00
TreeHugger Robot
7bd1d3e48b Merge "Don't print sensitive data on AssistStructure.dump()" into oc-dev 2017-05-14 03:45:26 +00:00
Felipe Leme
bc561eb06e Don't print sensitive data on AssistStructure.dump()
Test: manual verification

Bug: 38205945
Change-Id: Ic184ee6da313a2c0f8e0dd11979f6985d8023140
2017-05-13 18:20:51 -07:00
Dianne Hackborn
c75bd416e9 Merge "Fix issue #38210653: Few more tweaks of job scheduler" into oc-dev 2017-05-13 20:08:25 +00:00
Bryce Lee
b3d265caaa Merge "Introduce result ranges for activity start return results." into oc-dev 2017-05-13 01:41:36 +00:00
Dianne Hackborn
bfc2331f2f Fix issue #38210653: Few more tweaks of job scheduler
- Now keep track of the time a job was enqueued, and order
  the pending list by that.
- Added configuration constants for rescheduling: maximum
  times to reschedule, minimum backoff times.
- Fixed printing of active jobs -- the method to get the current
  JobStatus was old and didn't require the caller to hold a
  lock, so made a copy, which didn't contain all the data we were
  interested in.  Now with our simple locking, we can just make
  that require the caller hold a lock and return the real
  JobStatus object.
- Include oom_adj and procstate when printing information about
  processes being killed.
- Expanded documentation of BroadcastReceiver.goAsync().

Test: bit CtsJobSchedulerTestCases:*

Change-Id: I2e45f181e45be9836c74cbff1b844ffdf6e93019
2017-05-12 17:29:04 -07:00
Selim Cinek
0ac4b7d108 Merge "Fixed an issue where the media notification wouldn't have contrast" into oc-dev 2017-05-12 23:42:49 +00:00
Bryce Lee
7f9368637c Introduce result ranges for activity start return results.
The return result from starting activity actually represents two
pieces of information. First, it conveys whether the activity
started. Secondly, it conveys whether there was a fatal error if
the activity did not start. Many parts of the code assume that a
value greater than or equal to the defined success means that the
activity successfully started. This is not the case as there are a
number of results greater than success where the activity does not
start.

This change addresses the issue by introducing three distinct
result ranges. The first represents results where the activity
could not start due to a fatal error. The second represents results
where the activity did not start due to a non-fatal error. The last
range represents successful activity starts. Two convenience methods
have been added to ActivityManager to return whether the result
represents a fatal error and whether the result was successful.

Change-Id: Ifaf844c353641a28b03b3c2d7b6be053fd9b8b44
Fixes: 38021882
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
2017-05-12 16:02:23 -07:00
Sunny Goyal
fc157e702f Merge "Setting Session commited broadcast when an existing apk is enabled for a different user" into oc-dev 2017-05-12 21:09:08 +00:00
TreeHugger Robot
6c97781468 Merge "Avoid activity leak via Companion callback" into oc-dev 2017-05-12 20:14:09 +00:00
TreeHugger Robot
4b91fe8699 Merge "Removed deprecated APIs." into oc-dev 2017-05-12 20:13:15 +00:00
Selim Cinek
0b84204185 Merge "Fixing the colorization of legacy media notifications" into oc-dev 2017-05-12 18:35:23 +00:00
Winson Chung
b502690e2d Updating Overview to work with PiP
- Ensure that an activity that is auto-entering PiP when hitting Overview
  does not show up in Overview. This is done by listening for the
  onActivityPinned() callback from the system, and remove the pinned task.
- Ensure that we show the PiP task in Overview after it is dismissed, while
  Overview is open. This is done by listening for the onActivityUnpinned()
  callback from the system and refreshing the task list similar to when
  the multi-window mode changes.
- When launching from a PiP activity, or launching back into Overview where
  the next task should be PiP, then ensure that we scroll the stack to the
  front so that the first task is fully visible.
- Fix two lingering Overview issues, when there are no handlers (ie. with
  dynamically registered handlers), ensure that we call pre/post dispatch
  callbacks (otherwise it could cause animated events not to work correctly).
  Also, ensure that we don't update the dummy stack view TaskStack without
  clearing the stack first, since we may be modifying the same stack
  that the activity consumed when starting.

Bug: 34185886
Bug: 38207296
Test: Launch PIP activity from hitting Overview in the various ways
      described above
Change-Id: I699e655106e6ed7206e163f9d3c15477bbfd52ef
2017-05-12 11:01:36 -07:00
Felipe Leme
73fedacfeb Removed deprecated APIs.
Test: CtsAutoFillServiceTestCases pass
Test: manual verification with existing service

Bug: 37563972

Change-Id: Ibea2810f9230f06e59d2d81e4ba853de54987956
2017-05-12 10:32:45 -07:00
Selim Cinek
389edcd7c5 Fixed an issue where the media notification wouldn't have contrast
Because we were relying on the output to go in the right direction
already, this could be wrong. We're now only following the given
lightness direction if it is even possible to satisfy contrast.

Test: runtest -x core/tests/coretests/src/android/app/NotificationTest.java
Change-Id: I06d934a6b5c328ebbf0cf707030b0d707ccb5ab4
Fixes: 38182819
2017-05-12 10:06:41 -07:00