Commit Graph

253881 Commits

Author SHA1 Message Date
Andrii Kulian
6a4d45f796 DO NOT MERGE -- Fix finishing activity in non-focused stack am: 772c598f66
am: 35c3c8ee8d

Change-Id: I715699d15b312c5164d87827eb5a29e330f6f4d5
2016-08-29 21:25:05 +00:00
Chris Craik
2e8a8a2432 Cherry pick TextureView fixes
The following changes are in this commit:

Avoid destroying TextureView surfaces for onStop

bug:30238922

TextureViews will hold onto their backing surfaces, which will allow
them to resume gracefully when the app's surfaces are saved.

Now only resources that are destroyed for onStop are DisplayLists.

(cherry picked from commit 391d560402)

TextureView: destroy layer on destroyHardwareResources event

bug:30468770

(cherry picked from commit 1c16c37d86)

Fix NPE in TextureView

Bug: 30651595

(cherry picked from commit 3c2587f26e)

Fix NPE in TextureView

Bug: 30779663

(cherry picked from commit 7e237189c2)

Fix maps resume being blank

Bug: 30889568

Fixes an issue where mLayer didn't have
the mSurface set on it in certain resume
scenarios.

(cherry picked from commit 03df0834e6)
2016-08-29 14:22:13 -07:00
Andrii Kulian
2f1662f524 Merge "DO NOT MERGE -- Fix finishing activity in non-focused stack" into nyc-dev
am: c8417676ed

Change-Id: I74e1b45ce3eaf9edec6fb60394da3ad8a818d214
2016-08-29 21:17:02 +00:00
Andrii Kulian
35c3c8ee8d DO NOT MERGE -- Fix finishing activity in non-focused stack
am: 772c598f66

Change-Id: I890f3b460787682bbe0fdb4d8ce44364f1839dac
2016-08-29 21:16:59 +00:00
Jorim Jaggi
6626f54e65 Add animation when unoccluding windows (1/2)
Before there was a jump-cut when a window that was occluding Keyguard
was going away, leading to an ugly flicker. To fix this, we do the
following.

- Always show windows with FLAG_SHOW_WHEN_LOCKED above lockscreen, even
if they don't "match" the currently occluding app (which is null in the
animation case)
- Move wallpaper behind last window that is not hidden by policy, so the
window doesn't get occluded by the wallpaper.
- Add a flag in the setOccluded call whether to animate or not. SystemUI
then plays a nice animation when it's set.
- Override the animation to always be the animation that happens when we
exit a window which is revealing the wallpaper behind, to make it
consistent with the home screen case.

Fixes: 30829255
Change-Id: Ib3fe20fc9003a0f9f291c974740f044ed8707e75
2016-08-29 14:15:33 -07:00
TreeHugger Robot
c8417676ed Merge "DO NOT MERGE -- Fix finishing activity in non-focused stack" into nyc-dev 2016-08-29 21:10:34 +00:00
Ben Lin
86805aa3af Push delete notification when Bug reports are deleted.
Bug: 28768706
Change-Id: I6d3e91fe7d12be44918f97cef12c99d936401270
2016-08-29 14:08:32 -07:00
TreeHugger Robot
02405fb349 Merge "Fix flicker while booting" into nyc-mr1-dev 2016-08-29 19:51:31 +00:00
Tao Bao
40d926f4d4 Bump up the uncrypt timeout to 30 min. am: 8abcfed8a4 am: c5a17fc39f
am: 18f9533910

Change-Id: Ia41c67b41b9b89ac113f01e783edcbccae5a1cdc
2016-08-29 19:48:29 +00:00
Christopher Tate
c60da1edc1 Eliminate next-alarm-clock broadcast flapping
When multiple alarm clocks are scheduled at the same time, we would
flap among the alternatives for considering them the 'next upcoming
alarm clock', which in turn would generate [many] spurious broadcasts
about changes to the upcoming alarm situation.  This is now fixed;
once we have found the soonest upcoming alarm clock, we stick with
that one until it becomes unavailable, eliminating the spurious
broadcast traffic.

Bug 29501073

Change-Id: Ice1892490bb339e05fa8bd9d324fa1c6718b4942
(cherry picked from commit 76389c00d3)
2016-08-29 19:44:55 +00:00
Tao Bao
18f9533910 Bump up the uncrypt timeout to 30 min. am: 8abcfed8a4
am: c5a17fc39f

Change-Id: Ib637e1f00ddebbac5a3bea6ff31f08854a95b7ea
2016-08-29 19:34:23 +00:00
Jorim Jaggi
936aaeb878 Fix bug that apps are not unminimizing if recent tasks are empty
If an activity was launched in the docked stack and we weren't able
to retrace the launch back to an activity launch from the homescreen
in activity manager, nothing happened.

Now we try to do a better job by also checking some conditions when
the app transition is starting. Note that this might still be racy,
but in practice all activities are usually launched from the same
process so the app is done starting/finishing any activities when
the first frame is drawn, so we are able to catch the correct state
when we figure out that the app transition is starting.

In addition to that, we also need to not hide the docked stack while
lockscreen is showing. This doesn't make any sense anymore as we are
dismissing the docked stack when we show something above the lockscreen,
and this only lead to issues that triggered app visibility events
which triggered this special unnecessarily. This also fixes some flicker/
race-condition in the normal unlocking process I noticed a long time ago
but couldn't really reproduce.

Change-Id: I42683520ba9ee9fbd0c9920501387a573ac94655
Fixes: 30439313
2016-08-29 12:32:57 -07:00
Tao Bao
c5a17fc39f Bump up the uncrypt timeout to 30 min.
am: 8abcfed8a4

Change-Id: I35340614fe09f96f8c31cc53a99e366580294490
2016-08-29 19:26:43 +00:00
Andrii Kulian
199d4902e2 Merge "DO NOT MERGE -- Correctly finish activity in non-focused stack" into nyc-dev am: 128a4419e9
am: 934da4e400

Change-Id: I9b8c06e89ce182b4fb47a74aaea3d501267add84
2016-08-29 19:01:16 +00:00
Andrii Kulian
934da4e400 Merge "DO NOT MERGE -- Correctly finish activity in non-focused stack" into nyc-dev
am: 128a4419e9

Change-Id: I6c28db82c53af5a68c3d875ecca920b9a1364b32
2016-08-29 18:51:55 +00:00
Andrii Kulian
8428bfa6e5 DO NOT MERGE -- Correctly finish activity in non-focused stack am: 620040db3f -s ours
am: febd5c027c

Change-Id: I658d45b3149128876240e41bbd16ad35951c6dfa
2016-08-29 18:51:53 +00:00
Andrii Kulian
febd5c027c DO NOT MERGE -- Correctly finish activity in non-focused stack
am: 620040db3f  -s ours

Change-Id: I62703cc7f62bf42967021ce8defa30669e096ec2
2016-08-29 18:44:11 +00:00
Jason Monk
1a5a746fa3 Merge "Fix double status bar icons" into nyc-dev am: 2b4e612b10
am: db2d30e1b9

Change-Id: I707e1f8457e826d2d5b83ccc21668e5a786b28eb
2016-08-29 18:32:39 +00:00
Jason Monk
9570287870 Fix double status bar icons am: 12124d7eca
am: 447991c67a

Change-Id: Ic0a217f292dcf4a7d9b2b47c4d32438b436a77ad
2016-08-29 18:32:37 +00:00
Selim Cinek
df8c802677 Merge "Fixed a bug where notifications could reappear" into nyc-dev am: 4226dcef1e
am: c9c0bcf6a9

Change-Id: Ib517c495cd53a5ea0f14bb443b74d69d2efe8429
2016-08-29 18:32:35 +00:00
Selim Cinek
ed596e6836 Fixed a bug where notifications could reappear am: f3b64692a3
am: e90d6d682e

Change-Id: Ie08bd37033cd81ff0898a6766bd505e0f597d7fe
2016-08-29 18:32:33 +00:00
Selim Cinek
b35ae808c0 Fixed a bug where the headsup would be stuck disappearing am: a4155bb7c0
am: c52edb4f24

Change-Id: I94084878dec7952607572d3005a160cc74eb2a62
2016-08-29 18:32:31 +00:00
Andrii Kulian
772c598f66 DO NOT MERGE -- Fix finishing activity in non-focused stack
This CL explicitly checks if we're finishing activity in non-focused
stack as there are other cases except this one when we finish paused
activities in FINISH_AFTER_VISIBLE mode.

Bug: 29007436
Bug: 29458854
Change-Id: I67744d23cd72f2fe8861180008bfdd284a7b5e26
(cherry picked from commit 995fa2bd2d)
2016-08-29 18:30:46 +00:00
Andrii Kulian
128a4419e9 Merge "DO NOT MERGE -- Correctly finish activity in non-focused stack" into nyc-dev 2016-08-29 18:30:10 +00:00
Vineeta Srivastava
dd51fb20f3 Merge "whitelist sms code for TMO-DE and TMO-MK." into nyc-dr1-dev
am: 24b0486cdc

Change-Id: Id291ae046845660231be5b42473ef9b839055035
2016-08-29 18:26:02 +00:00
Jason Monk
db2d30e1b9 Merge "Fix double status bar icons" into nyc-dev
am: 2b4e612b10

Change-Id: Ib0d9e51d289215d96525b68d0432b959e9b58f2f
2016-08-29 18:26:00 +00:00
Vineeta Srivastava
f4be3d2927 whitelist sms code for TMO-DE and TMO-MK.
am: 6af315af94

Change-Id: Ib31807ae28fa798e6d359054d70f9adeaf2872a4
2016-08-29 18:26:00 +00:00
Jason Monk
447991c67a Fix double status bar icons
am: 12124d7eca

Change-Id: Ief00496f19d2e249129023a03cd9f53d76fa7bf8
2016-08-29 18:25:57 +00:00
Selim Cinek
c9c0bcf6a9 Merge "Fixed a bug where notifications could reappear" into nyc-dev
am: 4226dcef1e

Change-Id: I7c3c46bf360899387a0d2d33d4beb83a3b096aa0
2016-08-29 18:25:54 +00:00
Selim Cinek
e90d6d682e Fixed a bug where notifications could reappear
am: f3b64692a3

Change-Id: I19719fc6112e82d9600b4196570f571f87291530
2016-08-29 18:25:51 +00:00
Selim Cinek
c52edb4f24 Fixed a bug where the headsup would be stuck disappearing
am: a4155bb7c0

Change-Id: Ic82cbac42cf17427ca5d6675a63d6f914a87f6cb
2016-08-29 18:25:47 +00:00
Yohei Yukawa
8eb07090a4 Make sure IME focus is synced to View focus
This CL fixes an edge case that my previous CL [1] forgot to handle.

The goal of my previous CL was to avoid InputMethodManager from getting
confused by a false focus-in event from temporarily detached Views.
However, my CL forgot to take care of the case where the temporarily
detached View is still focused even after the temporary detach mode is
done.

The bad news is that such a situation is relatively easy to trigger by
having a ListView that has EditText as follows, which seems to be
known to be a common technique in Android developer community to put an
EditText in a ListView.
  ListView#listView.addHeaderView(new EditText(context), null, true);

If the ListView is initialized as above, and the EditText has input
focus, View focus and IME focus start to disagree immediatelly after the
ListView's layout is re-evaluated.  This is really easy to trigger, for
example just by dismissing the IME window.

In summary, the root cause is that InputMethodManager#focusIn(View) is
now always ignored as long as the View is temporarily detached, under an
assumption that IMM#focusIn(View) will be called back again with a View
that is not temporarily detached when everything is stable.  Hence the
fix is to do so by hooking up View#dispatchFinishTemporaryDetach() to
call IMM#focusIn(View) again when the View is actually focused in the
final state.

 [1]: Ia79bbd8468f768d546354382b47b39dd31ef7bb5
      a4ed0cfcb6

Bug: 30022872
Bug: 30578745
Bug: 30706985
Change-Id: Iecbdb00dcef8c72e4f7b31035c9bf0f4a40a578f
(cherry picked from commit dd228fbb4d)
2016-08-29 18:24:31 +00:00
Vineeta Srivastava
24b0486cdc Merge "whitelist sms code for TMO-DE and TMO-MK." into nyc-dr1-dev 2016-08-29 18:18:20 +00:00
Philip P. Moltmann
cb1926afba Size print destination to support font sizing
Fixes: 31152374
Change-Id: I1560d6d300174ec0665157fa4f2c485d64f871ad
2016-08-29 18:03:19 +00:00
Jason Monk
2b4e612b10 Merge "Fix double status bar icons" into nyc-dev 2016-08-29 18:00:02 +00:00
TreeHugger Robot
4226dcef1e Merge "Fixed a bug where notifications could reappear" into nyc-dev 2016-08-29 17:58:31 +00:00
Sudheer Shanka
234d1afd79 Allow apps with CREATE_USERS permission to create demo users.
Bug: 31092477
Test: adb shell am create-user --ephemeral --demo <user-name>
Change-Id: Ia08a50ec4371466c62cdc9f5391e298a666b5081
2016-08-29 10:49:03 -07:00
Greg Kaiser
40e6194148 Merge "ContextHubService: Allow cancelling load/unload" into nyc-mr1-dev 2016-08-29 17:48:48 +00:00
Greg Kaiser
143aaa6d05 Merge "ContextHubService: Hack in Google vendor value" into nyc-mr1-dev 2016-08-29 17:43:31 +00:00
Amith Yamasani
81f876e795 Merge "Add logging to CursorWindow JNI code to track #31046363" into nyc-mr1-dev 2016-08-29 17:42:40 +00:00
Pablo Ceballos
23784fd6d9 Merge "Fail createVirtualDisplay with single-buffered Surface" into nyc-mr1-dev 2016-08-29 17:42:00 +00:00
Greg Kaiser
29e868071d ContextHubService: Allow cancelling load/unload
As a minimal risk improvement for Android N, we allow a new
load/unload transaction request to cancel a currently pending
one if enough time has passed since starting the current
transaction.

Bug: 30111539
Change-Id: Ide958c2454b88529305443fb789b8ae5af18c642
2016-08-29 10:16:27 -07:00
Jason Monk
12124d7eca Fix double status bar icons
Don't allow the status bar icon slot list to be changed because
it confuses the relationship between StatusBarIconList and
StatusBarIconController.  Set it in the constructor to enforce
this.

Change-Id: Ieeea0a9efad88179d1cccc0e5702899333de2e72
Fixes: 28524184
(cherry picked from commit c6fe61c59c)
2016-08-29 13:26:18 +00:00
Narayan Kamath
b334c33d65 Fix clang build breakage (-Werror -Wformat).
Use %zd for size_t. Note that this will break only on (-plus-)aosp because
clang is disabled on the N development branches.

bug: 30963384
Change-Id: I4b5ba7caf15bc2ebf5bb3395d82170ec786ed50c
2016-08-29 12:35:05 +01:00
Narayan Kamath
c5f27a7cb2 Reopen whitelisted zygote file descriptors after a fork.
We don't want these descriptors to be shared post-fork, so we'll
have to close and reopen them when the zygote forks. The set of
open descriptors is checked against a whitelist and it is a fatal
error if a non whitelisted FD is opened. It is also a fatal error
if anything other than a regular file / character device or socket
is opened at the time of forking.

This work is done in two stages :
- An initial list of FDs is constructed and cached prior to the
  first zygote fork.

- On each subsequent fork, we check whether the list of open FDs
  has changed. We are currently tolerant of changes, but in the
  longer term, it should be a fatal error if the set of open file
  descriptors in the zygote changes.

- Post fork, we traverse the list of open descriptors and reopen
  them if necessary.

bug: 30963384
Change-Id: Icfd45c96c660491b554d146a9d70d97dbcc712bc
2016-08-29 08:40:00 +00:00
Lorenzo Colitti
c2e10bb074 Don't notify on network switch if source network is validated.
Sometimes we switch away from a network to another (e.g., wifi to
cell data) not because the old network is unvalidated, but
because the score is lowered by a low signal strength.

In this case, don't notify the user of a network switch.

Bug: 31132499
Change-Id: I996a6e00096f8cb864fa9b00b36921725a4edb53
2016-08-29 16:30:21 +09:00
Felipe Leme
a4defc17c7 Removed screen on/off callbacks from NPMS.
am: b79f06a476

Change-Id: If17367db296e3f8c90dddd9dce445a7068320a14
2016-08-28 22:27:12 +00:00
Felipe Leme
b79f06a476 Removed screen on/off callbacks from NPMS.
NetworkPolicyManagerService (NPMS) used to depend on screen on/off
changes to determine if a foreground activity should have network
restrictions, but such check is now redundant since ActivityManager
already changes the proper UID state (like going from TOP to
TOP_SLEEPING) when the screen status is changed.

Removing such code decreases the NPMS lock contention when the screen is
turned on in about 3-5ms.

Change-Id: I2853443efedbf14961ae9a5b2e72689d4d1a646c
BUG: 30785671
(cherry picked from commit 88f40ad9a7)
(cherry picked from commit f8dd7b4e8d)
2016-08-28 02:24:42 +00:00
Adam Powell
00c4f7ba65 Force AlertDialogLayout to have gravity start|top
AlertDialogLayout overrides LinearLayout#onMeasure but not onLayout,
meaning that some state initialized for the handling of gravity may
not be valid in LinearLayout#onLayout. As this is an internal class
never used directly by apps, explicitly specify the default gravity of
start|top in @layout/alert_dialog_material to avoid this bug. Apps
that do things like set gravity in their theme (for whatever reason)
could otherwise change its behavior.

Bug 30494039

Change-Id: I71a8be1829a7fe24cf7714a3bd5ed732f85eb887
(cherry picked from commit 39e0bf23f5)
2016-08-27 16:44:10 +00:00
Tao Bao
8abcfed8a4 Bump up the uncrypt timeout to 30 min.
Bug: 30490464
Change-Id: I9b65afb10134d79b2f5b5275a6d81065a04e91b9
2016-08-26 20:52:41 -07:00