Commit Graph

10933 Commits

Author SHA1 Message Date
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
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
Sunny Goyal
a31a74b993 Setting Session commited broadcast when an existing apk is enabled for
a different user

Test: Manual tests and CTS
Bug: 38204385
Change-Id: Ic3bddbc2e6070c11b11f0685077db7737f2b8849
2017-05-12 10:00:30 -07:00
Julia Reynolds
34bc4af810 Merge "Show misc channel with pre-upgrade fields" into oc-dev 2017-05-12 12:14:11 +00:00
TreeHugger Robot
33b4964874 Merge "Cleanup API that is already @removed" into oc-dev 2017-05-12 00:13:56 +00:00
Selim Cinek
a7679b6f3f Fixing the colorization of legacy media notifications
Previously the colorization wouldn't work if the notification
was not targeting N and above, since for those the
remoteviews would be built into the notification and we couldn't
colorize it.

Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/MediaNotificationProcessorTest.java
Fixes: 38147364
Fixes: 37743600
Change-Id: Iabad02a4515c42676c0660293e58cf62d5d8ff88
2017-05-11 16:08:44 -07:00
Eugene Susla
6fd0ce3616 Avoid activity leak via Companion callback
Test: invoke associate() API and ensure it still works
Change-Id: I9aedb043b4b1f0d77f076d8753cd60ff7c98a7d6
2017-05-11 13:58:28 -07:00
Julia Reynolds
6307ac52e5 Merge "Lock relevant fields on channel update" into oc-dev 2017-05-11 20:55:28 +00:00
TreeHugger Robot
e35e223a81 Merge "Relax the sharedpreference check to look at StorageManager.isUserKeyUnlocked" into oc-dev 2017-05-11 20:25:52 +00:00
Bryce Lee
e53243cb92 Merge "Allow for SDK 26 Activities to specify orientation when not fullscreen." into oc-dev 2017-05-11 20:06:24 +00:00
Dianne Hackborn
c3b938ca5e Merge "Fix issue #37360626: Apps can schedule alarms (and other things) with temp whitelist" into oc-dev 2017-05-11 18:28:46 +00:00
Julia Reynolds
17717f5a6d Show misc channel with pre-upgrade fields
- for apps that don't target O but use channges

- Rename misc channel if it already exists
- Add method so settings can tell if it needs to show legacy config

Bug: 38120923
Test: runtest systemui-notification
Change-Id: I5c7c077321f1792851b003b9d9e42505dddd50f0
2017-05-11 13:43:03 -04:00
Julia Reynolds
e0b2574626 Lock relevant fields on channel update
This is safe for O as all updates come from a trusted
source.

Change-Id: Iab8ec1e68f8f9f9e345ebf4d5e44718191cc49e6
Fixes: 37986254
Test: runtest systemui-notification
2017-05-11 13:37:46 -04:00
Bryce Lee
d1ac18c7c9 Allow for SDK 26 Activities to specify orientation when not fullscreen.
Change-Id: I9137a7ba7593dcd6031e1fcbcd6dcc0a287d707b
Fixes: 38221413
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests#testNonfullscreenAppOrientationRequests
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests#testLegacyNonFullscreenActivityPermitted
2017-05-11 08:23:54 -07:00