Commit Graph

46078 Commits

Author SHA1 Message Date
Ned Burns
f4e1d10cd3 Kill ActivityView's background thread when it's destroyed
We were leaking background threads for every new ActivityView.

Change-Id: I7ce190843265567984f6cda9c85fef478b0ead38
2015-09-23 20:19:16 -04:00
Zach Johnson
7bcb9597c8 Fix BluetoothSocket file descriptor leak
Sockets accepted on a server socket didn't populate
the mPfd field, which is used to close out the java
end of the native-and-java communication socket when
the overall rfcomm socket is closed. #badnewsbears

b/21398841

Change-Id: I3adb0a9965f83d0f3006fa4f79ea4abeab5c9a17
2015-07-13 22:50:13 -07:00
Filip Gruszczynski
c3d69a798e DO NOT MERGE - Fix NPE when requesting outsets for detached view.
Outsets are used during measure/layout pass, but this can be called on a
view that is not currently attached.


Bug: 21602590
Change-Id: I5860d5e7c20131e2650bdb8635e9659e76205fa1
(cherry picked from commit e660d4e96a)
2015-07-09 17:47:54 +00:00
Filip Gruszczynski
45eb3ea667 Revert "Fix NPE when requesting outsets for detached view."
This reverts commit b010291ace.

Change-Id: If86ce92daac9e80d5fc2e9f707d937e7c6e91a74
2015-07-09 01:06:40 +00:00
Filip Gruszczynski
b010291ace Fix NPE when requesting outsets for detached view.
Outsets are used during measure/layout pass, but this can be called on a
view that is not currently attached.

Bug: 21602590
Change-Id: I23e3acc45ca4bf7684d8913f839e29e8e9e94d78
(cherry picked from commit e660d4e96a)
2015-07-08 23:22:36 +00:00
Filip Gruszczynski
0385059195 Handle outsets when resized is called due to rotation.
Rotation might change while the wallpaper is displayed. If outsets are
present, this must trigger a resized callback and the wallpaper must
take these accounts immediately into account before requesting relayout.

Bug: 22209764

Change-Id: I97f2670f384ccac792e7c2727eb0ef017ec66188
2015-07-01 10:23:47 -07:00
Filip Gruszczynski
0ec1328f85 Calculate outset hint when adding window.
Outsets aren't dynamic so they are a great candidate for a hint when the
window is added through the window manager. Thanks to this during first
view hierarchy measure or wallpaper window layout they are immediately
available and don't require multiple measure/layout passes.

Bug: 21593814
Change-Id: I573c15ffbbe4fcd8a6ed9c5e4fcd6cfbbcd7434f
2015-06-30 12:42:17 -07:00
Anthony Hugh
001df9ca90 DO NOT MERGE: Introduce stem keycodes for Wear
Cherry-pick from master

This change adds four new stem keycodes for Android Wear. These
keycodes are intended to represent the various hardware buttons
around the watch.  There is one primary stem key that will be used
for power/settings and three generic stem keys that will be
customizable.

BUG: 21903503
Change-Id: I867cf79554c72d42c8acbb3ff8b1678e482d4fe2
2015-06-24 16:13:19 -07:00
Doris Liu
629ba0e2b3 DO NOT MERGE Use ArrayMap instead of HashMap for storing relavant nodes
This fix is to take advantage of ArrayMap, which is a key-value
mapping data structure that is more memory efficient than HashMap.

Bug: 11604254
Change-Id: I57006880de570a4d7f3899e274cf0a06355d116b
(cherry picked from commit d7444427d9)
2015-06-10 22:54:09 +00:00
Filip Gruszczynski
d88e4d50d6 Merge "ActivityView: set surface on a background thread." into cw-d-mr1-dev 2015-06-02 22:26:39 +00:00
Jeff Brown
eb4bd19ef0 Terminate loop properly when cursor window is full. DO NOT MERGE
The existing code exits the column-filling loop immediately but
may continue to try to fill rows.  Ordinarily this should fail
too but it's possible for the process to continue and then
blow up a little later.  Fixed this problem by exiting the row-
filling loop promptly.

Bug: 21406130
Change-Id: Ifab59188d5d1b40f3c1f5c97604dd48da71bf37b
(cherry picked from commit bb8c841e90)
2015-06-02 00:00:34 +00:00
Filip Gruszczynski
2df62bf0dd ActivityView: set surface on a background thread.
ActivityView shouldn't set the surface on the main thread, because it's
a binder call and causes jank. Instead it should delegate the call to a
background thread and let it do the work there.

Bug: 15752100

Change-Id: I6f2764c93dfb8f3e00d79f0e97d4a6688b6fdd8f
2015-06-01 13:24:12 -07:00
Filip Gruszczynski
06756f352d Dismiss or cancel in SwipeDismissLayout on screen off.
Fix for situation where you palm the device while swiping away an
ambiactive activity (or rather, when you swipe slightly an ambiactive
activity during palm gesture). This would make the activity stay in half
dismissed state. Instead when the screen goes off, we either dismiss or
cancel the dismissal.

Change-Id: I82e699c00c25bc97dd95bc6473a17e5817f7667a
2015-06-01 10:09:45 -07:00
Filip Gruszczynski
3e11bf33a6 Support for devices with a chin.
Information about the chin is now part of the config.xml instead of the
theme. It is retrieved by WindowManagerService and passed to the clients
as insets. Clients can adjust their behavior in a way that makes it
invisible to the user, that part of the surface doesn't actually exist.

Bug: 19908853

Change-Id: Iedf57bf3c848201b854f91ffeb3b59187d375c1f
2015-05-20 14:20:30 -07:00
John Reck
951f23478d am d955dceb: am 862540cd: Merge "Revert "DO NOT MERGE Backport of limited jank-tracking metrics"" into lmp-mr1-dev
* commit 'd955dceb4f38f214e62024e808b2b1a21be41940':
  Revert "DO NOT MERGE Backport of limited jank-tracking metrics"
2015-05-14 01:05:47 +00:00
John Reck
d955dceb4f am 862540cd: Merge "Revert "DO NOT MERGE Backport of limited jank-tracking metrics"" into lmp-mr1-dev
* commit '862540cdb11a7128ae1fd670136f398645b4af7b':
  Revert "DO NOT MERGE Backport of limited jank-tracking metrics"
2015-05-14 00:51:07 +00:00
John Reck
862540cdb1 Merge "Revert "DO NOT MERGE Backport of limited jank-tracking metrics"" into lmp-mr1-dev 2015-05-14 00:40:45 +00:00
John Reck
e869835d6a am a5b28b92: am 69355eaa: Merge "DO NOT MERGE Backport of limited jank-tracking metrics" into lmp-mr1-dev
* commit 'a5b28b92b14d0949d43be6198fedc31872ad07f6':
  DO NOT MERGE Backport of limited jank-tracking metrics
2015-05-13 22:07:15 +00:00
John Reck
a5b28b92b1 am 69355eaa: Merge "DO NOT MERGE Backport of limited jank-tracking metrics" into lmp-mr1-dev
* commit '69355eaa1c1f4bfc961d5dd9fdb0f3817d36d5f0':
  DO NOT MERGE Backport of limited jank-tracking metrics
2015-05-13 21:52:50 +00:00
John Reck
25607a6642 Revert "DO NOT MERGE Backport of limited jank-tracking metrics"
This reverts commit 2614bd225f.

Change-Id: I344b4cbaa0bb0caf50bceb806d1446ee27ea52d8
2015-05-13 21:42:28 +00:00
John Reck
69355eaa1c Merge "DO NOT MERGE Backport of limited jank-tracking metrics" into lmp-mr1-dev 2015-05-13 21:42:13 +00:00
Christopher Ferris
808a8d9c30 Temporarily increase saved tombstone size. DO NOT MERGE
Bug: 20829534
Change-Id: I2af16d342196da1acda43b0f6d7341413ef51820
2015-05-07 10:31:17 -07:00
Gus Prevas
026e204ee4 Fixes velocity tracking bug in SwipeDismissLayout.
This is the framework version of ag/682710.
Original change description:
This change adds a missing call to offsetLocation() when tracking
swipe velocities on a SwipeDismissLayout.  This bug was causing
incorrect velocities to be measured which often resulted in an
incorrectly interpreted leftward swipe cancelling the dismiss
gesture.

Bug: 20350515
Change-Id: I4f3e3668a1f9aab963fdfa9095a43f4c5344703f
2015-04-30 11:14:14 -04:00
Mark Renouf
55555a3dab Fixes rejected dismiss gestures (framework version of ag/677161)
Gus's original change description:

This change modifies the logic in SwipeDismissLayout which determines
whether or not a gesture should be interpreted as a dismiss
gesture.

Previously, on the first touch move event, the gesture was classified
as a dismiss gesture if the X movement exceeded the touch slop
and the Y movement did not.  At this point the gesture was not
intercepted and the underlying widget (in the case of the cue
card, the GridViewPager) received all subsequent move events.

In the case of a very fast gesture at a slight vertical angle, it was
easy for the total Y movement to exceed the touch slop.
This change only rejects the gesture if the Y movement exceeds
the X movement, which is consistent with how GridViewPager
distinguishes horizontal vs. vertical swipes.
This change also cancels the dismissal if the end of the gesture
is a leftwards flight.

BUG: 20542762

(Same as b/20350515 but for Activity dismissal at the system level.)

Change-Id: I6e3fb646c42dda0d1c1f5552d91b27c6374fc08c
2015-04-24 11:47:27 -04:00
Svet Ganov
d24cc19343 am db672b6c: am 00e91901: Merge "DO NOT MERGE Don\'t take flags when creating app widget config activity." into lmp-mr1-dev
* commit 'db672b6cde256e27c1188c7e99f23e5a65252ba4':
  DO NOT MERGE Don't take flags when creating app widget config activity.
2015-04-23 15:30:43 +00:00
Svet Ganov
db672b6cde am 00e91901: Merge "DO NOT MERGE Don\'t take flags when creating app widget config activity." into lmp-mr1-dev
* commit '00e91901fd1dd007de196ada04e3fc2f79e1be73':
  DO NOT MERGE Don't take flags when creating app widget config activity.
2015-04-23 15:18:10 +00:00
Justin Koh
2aa3905cb0 Merge "DO NOT MERGE: The ValueAnimator's state need to be totally reset during clone." into lmp-mr1-modular-dev 2015-04-22 00:31:00 +00:00
ztenghui
612e5cdec6 DO NOT MERGE: The ValueAnimator's state need to be totally reset during clone.
b/20119270

Change-Id: I26365b38e4a9712227aaec6f08f32025dab82ac7
(cherry picked from commit 26e9a19900)
2015-04-21 21:26:53 +00:00
ztenghui
2360659824 DO NOT MERGE: Reset the Node status when clone.
b/20457797

Change-Id: I5f1b0e2238fdc4a69a9c09c1e6e0272f7ede3685
2015-04-21 20:31:58 +00:00
Svet Ganov
68e6b5055b DO NOT MERGE Don't take flags when creating app widget config activity.
bug:19618745

Change-Id: I7973ebfc67ebf52f14890dda9eb891a7b8a5a095
2015-04-20 17:16:38 +00:00
Filip Gruszczynski
4544b927d7 Hold a wake lock while dozing when wallpaper draws.
This mimics what ViewRootImpl does before drawing.

Bug: 20242788
Change-Id: If85ad17113636f74267aedb3af04d0281b57ac0e
2015-04-16 15:00:58 -07:00
Quddus Chong
0c5752be40 am c736e8cf: am f0ab39c1: Merge "Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873" into lmp-mr1-dev
* commit 'c736e8cf41445e7a32721da617d6d7eacd189703':
  Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873
2015-04-08 18:11:55 +00:00
Quddus Chong
c736e8cf41 am f0ab39c1: Merge "Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873" into lmp-mr1-dev
* commit 'f0ab39c10b614514ba4a600aa6fd4354253cde73':
  Fixed broken link in UiAutomation.setRunAsMonkey() method description. bug: 19711873
2015-04-08 17:53:44 +00:00
Quddus Chong
a9f6a9b769 Fixed broken link in UiAutomation.setRunAsMonkey() method description.
bug: 19711873

Change-Id: I4ebb50e03e6e979486ebd3a7c15f21358734574e
2015-04-07 13:04:39 -07:00
Kenny Root
4999b175e9 Merge "Revert "Track change to Conscrypt" DO NOT MERGE ANYWHERE" into lmp-mr1-modular-dev 2015-03-31 19:10:50 +00:00
Svetoslav
13d8e41d3a am c6be7545: am 37661db7: AccessibilityNodeInfo refresh returns a stale state. - DO NOT MERGE
* commit 'c6be7545b4106b9ba586e365f2d2ab911cafea93':
  AccessibilityNodeInfo refresh returns a stale state. - DO NOT MERGE
2015-03-31 16:41:00 +00:00
Svetoslav
c6be7545b4 am 37661db7: AccessibilityNodeInfo refresh returns a stale state. - DO NOT MERGE
* commit '37661db7fa58c0559ef2b73b6f8c38124e3acd4a':
  AccessibilityNodeInfo refresh returns a stale state. - DO NOT MERGE
2015-03-31 16:33:21 +00:00
Kenny Root
9a7c1a3549 Revert "Track change to Conscrypt" DO NOT MERGE ANYWHERE
This reverts commit 693ea60e9e.

Bug: 19894176
Change-Id: I1514e8c55f541afb0c653afa57cd16034d1b167b
2015-03-31 09:15:40 -07:00
Svetoslav
37661db7fa AccessibilityNodeInfo refresh returns a stale state. - DO NOT MERGE
AccessibilityNodeInfo refresh was getting the latest cached
state but this is not good enough as an accessibility service
can execute an action on the node and then refresh it to get
the new state.

bug:16954787

Change-Id: I004b4987b8dc423a2ab7031a4fbfe64365ddd7fe
(cherry picked from commit 5738fec00d)
2015-03-31 01:25:35 +00:00
Filip Gruszczynski
9001f14b20 Merge "Don't use windowOutsetBottom for insets, depend on display padding only." into lmp-mr1-modular-dev 2015-03-25 22:37:38 +00:00
Bryce Lee
c831b97823 Merge "Add isScreenBrightnessBoosted and a broadcast when underlying value changes." into lmp-mr1-modular-dev 2015-03-25 16:06:17 +00:00
Gus Prevas
3e7bebf35c Changes callback to a WeakReference in ActivityContainerCallback.
This change prevents the Runnable posted by ActivityContainerCallback
from retaining the ActivityView's callback if it is never cleared out
from ViewRootImpl.sRunQueues.

Bug: 19872883
Bug: 19654978
Change-Id: I6dce4381b96c8c77afcd38a55bfe474f13dfbfba
2015-03-24 17:30:34 -04:00
Filip Gruszczynski
d66ba06a87 Don't use windowOutsetBottom for insets, depend on display padding only.
I am not sure if this is the correct approach to the problem. Right now
we are reporting double chin (60 vs 30). The reason for this is that
we setDisplayPadding from Clockwork Home activity (bottom=30) and add
windowOutsetBottom.

We use display padding to set surface frame size (320x320) and both
outset bottom and display padding for inset. I think we should use only
one of these. I decided to go with display padding, because that's
what was suggested to me the last time I visited this. I removed
the dependency on windowOutsetBottom altogether.

However, I don't feel confident this is the correct way to do this.
We depend on Home activity to send the display padding now to get
the correct result, so wallpapers behind other activities will not
work correctly.

Maybe instead of setting display padding from the outside, the
windowOutsetBottom should be added to display padding bottom for the
purpose of calculating surface frame and generating insets.

Advice on what is the right approach here would be greatly appreciated.

Bug: 19881056
Change-Id: Ifb655528d8f85ef01d942bf1e64e8b08475689ca
2015-03-23 13:08:56 -07:00
Griff Hazen
0b42ff7916 Merge "Allow emulator to select a window outset bottom" into lmp-mr1-modular-dev 2015-03-21 23:59:46 +00:00
John Reck
2614bd225f DO NOT MERGE Backport of limited jank-tracking metrics
Bug: 19821830

Cherry-pick of ba6adf66d3
Cherry-pick of e70c5754d0

Change-Id: Id342fa0ab345f204bec58acf45ce72f6de950cfb
2015-03-18 14:22:01 -07:00
Kenny Root
fb9ff42d74 am fbd8805c: Merge "Track change to Conscrypt" into lmp-mr1-ub-dev
* commit 'fbd8805cd783e34aebf521913aeab6cfd483b7b2':
  Track change to Conscrypt
2015-03-18 16:54:29 +00:00
Kenny Root
693ea60e9e Track change to Conscrypt
Change way in which an outside caller can get the preferred SSLContext.

(cherry picked from commit 8a97063720)

Bug: 19798387
Bug: 17136008
Change-Id: Ide578664bcb605304322bfddd2e640a63042fa09
2015-03-17 21:27:05 +00:00
Bryce Lee
84d6c0fbf6 Add isScreenBrightnessBoosted and a broadcast when underlying
value changes.

Bug: 18334219
Change-Id: I20051e97633017711574a063b8061f95c3b616c5
2015-03-17 10:43:08 -07:00
Filip Gruszczynski
9779e128d6 Option for going home when going to sleep for devices without physical button.
Bug: 19623388
Change-Id: Iec16f83c64646ded12ec97d4b540510b7f9dfd47
2015-03-16 08:57:17 -07:00
Griff Hazen
a093802171 Allow emulator to select a window outset bottom
And clean up some copied around code.

Bug: 17440607

Change-Id: I5cf9c58b49110c4be1a77dc9c410fedc6b99aef3
2015-03-13 10:01:41 -07:00