2356 Commits

Author SHA1 Message Date
Colin Cross
80e86bae0e Use asm-5.2 prebuilt
Test: m -j checkbuild tests cts
Change-Id: I37d40cc2e0406679394012aacd49f7ca9e51e3f6
2017-02-13 12:54:10 -08:00
Neil Fuller
021e8ff2af Merge "Track BufferIterator changes in libcore" 2016-12-12 17:23:18 +00:00
Neil Fuller
5ba69e46ed Track BufferIterator changes in libcore
Addition of a new method pos().

Bug: 31008728
Test: make
Change-Id: Id5fcb13104a8580ffaa7d4f8d3c473fe14ac5ccd
2016-12-09 14:59:26 +00:00
Paul Duffin
6fc0c5ceca Merge "Use junit-host instead of junit"
am: 6063357ae6

Change-Id: I6522cedeb522fa01530d4f31b6505b4d4c265312
2016-11-29 15:12:46 +00:00
Paul Duffin
4a064d2010 Use junit-host instead of junit
Bug: 30188076
Test: make checkbuild
Change-Id: I3496b9d7e40abf7712a56ba633a2becd0aa17c06
2016-11-29 14:52:42 +00:00
Paul Duffin
bbb501281e Merge "Use junit-host instead of junit"
am: 7dda7e1e81

Change-Id: Ie070bf5329899f21e3fb65dae6db5fdd50e74ba9
2016-11-29 10:22:34 +00:00
Paul Duffin
21cf84f8b3 Use junit-host instead of junit
Bug: 30188076
Test: make checkbuild
Change-Id: I5d3efbfbe3245a631113674bff1b0aabdc9fe8be
2016-11-28 16:44:44 +00:00
Winson
ab216609f1 Removing private system ui flags from status bar flags logic.
- Prevent third party apps from inadvertently changing internal SystemUI
  flags through a call to setSystemUiVisibility().  These flags are only
  set in the individual SystemUI components and can be updated in WMS
  directly.

Bug: 29875297
Change-Id: I5ea238c8fb16a0eccd6e993d95a912acb359cee6
2016-09-19 18:39:25 -07:00
Alan Viverette
df3a7cab8f Change density for the correct user
Bug: 30839993
Change-Id: I5368accddfc4a03b8025a257b4155fcdc6197f11
2016-09-06 17:13:41 -04:00
Chong Zhang
813be138ae DO NOT MERGE -- Only use saved surface if started by launcher or moved to front
Restrict saved surface to launcher start (ACTION_MAIN&CATEGORY_
LAUNCHER), or there is no intent at all (eg. task being brought to
front). If the intent is something else, likely the app is going
to show some specific page or view, instead of what's left last time.

This solves problems like the launcher shortcuts on DeckClock,
each of them is a different intent and will show one specific
view regardless of last states. Another example is Chrome tab
opened directly by action VIEW to open some URL.

(Note that this doesn't solve the problem with Chrome homescreen
shortcuts, it will still start with saved surface (if Chrome
is already open). This is because the shortcut is a trampoline
activity that starts the real chrome tab activity, but when
the trampoline is started, the whole task is already brought
to front, and ChromeTab could become visible with the task
before we actually start it.)

bug: 31055479
bug: 27747315

Change-Id: Id3e61c61ef516b0edc1f174320f02661222f226b
(cherry picked from commit ad24f96def42016049de05220593aa049b136def)
2016-08-26 15:41:58 -07:00
Chong Zhang
45e6d2dc8b Clean up surfaces when app is resumed without being stopped.
When quickly toggling between two apps, app could be resumed while
it's stopping but not yet stopped. Upon resuming, it could have
surfaces that's marked mDestroying and waiting for the stopped
to be destroyed.

We need to dispose these surfaces properly. If the window is already
removed, we destroy them. Otherwise, clear mDestroying flag so that
the window is ready to be used again. Leaving mDestroying=true makes
the window ineligible for certain things such as receiving wallpaper.

bug: 30255354
Change-Id: Id881653550595ab8e702d6950949bf202ac5a0d9
2016-07-21 10:17:39 -07:00
Zak Cohen
3683fb1e1d Adds a screenshot wallpaper method to WallpaperManagerService.
Bug: 29963541

Change-Id: If0a574004f8bddf1ba170587a8187253fe045ef4
2016-07-12 17:18:36 +00:00
Robert Carr
fd10cd1989 Force CROSSFADE rotation when launching from double tap gesture.
When activity transition triggers a rotation change, the starting
window will normally be the top window at the time we try
to select the window animation. However, these layout params won't
have the apps rotation animation set (as the client code will set that
on the real window, not the starting window). Eventually we would
like to add API to specify rotation animation via manifest to solve
this problem cleanly. In the mean time, we can force a specific rotation
animation from the double tap gesture, and clean up some camera
ugliness. We accomplish this by attaching an animation hint to
ActivityOptions.

Bug: 28838855
Change-Id: If052cd8cbae76651da43f3b4c590cd9dcc1afc0f
2016-07-01 11:05:40 -07:00
Yohei Yukawa
dc42d7dd13 Merge "Add InputMethodService#exposeContent()" into nyc-mr1-dev 2016-06-23 01:25:39 +00:00
Yohei Yukawa
25e0813e6e Add InputMethodService#exposeContent()
This is a follow up CL to my previous CLs [1][2] that introduced
InputConnection#commitContent(InputContentInfo, Bundle) API to enable
IMEs to send a content to the target application.

With this CL, IME developers are able to temporarily expose
InputContentInfo object to the target package without permanently
granting URI permission.  Although calling IMS#exposeContent() is
allowed only for the IME that is currently selected, the client is able
to request a temporary read-only access even after the current IME is
switched to any other IME as long as the client keeps InputContentInfo
object.

Here is a sample code snippet about how to use this mechanism.

  [IME]
  InputContentInfo contentInfo = new InputContentInfo(
          contentUri,
          new ClipDescription(description, new String[]{mimeType}),
          linkUrl);
  exposeContent(contentInfo, getCurrentInputEditorInfo());
  getCurrentInputConnection().commitContent(inputContentInfo, null);

  [App]
  try {
      contentInfo.requestPermission();
      // Load inputContentInfo.getContentUri() here.
  } finally {
      contentInfo.releasePermission();
  }

 [1]: Iaadf934a997ffcd6000a516cc3c1873db56e60ad
      152944f4909c47917473293b258d266435c6ab35
 [2]: Ica1ba3154795c1bf44e140dfe639b299f83cd8af
      adebb52588b098a1af678d4e33a234ef1ce783b2

Bug: 29450031
Change-Id: I2772889ca01f2ecb2cdeed4e04a9319bdf7bc5a6
2016-06-22 16:31:41 -07:00
Adam Lesinski
0f5caab576 Fix build due to missing abstract method impl
getDisplay() was added to Context, which needs to be implemented
for BridgeContext.

Bug:28388969
Change-Id: I7b0ffcbbe252403e35f08d3fa40d6b0e4dbf0daa
2016-06-22 13:11:40 -07:00
Yorke Lee
0e85247195 Limit global drags to apps targeting SDK 24 and above
Bug: 29127791

Change-Id: Ib5f85a207bdb79eeac0418fda78e452d225761bc
2016-06-16 09:35:40 -07:00
Diego Perez
790e5f6c1c Workaround to display menus for AppCompat themes
Layoutlib currently does not implement menus for the support Toolbar.
When it detects that an AppCompat theme is being used, it will try to
use by default the support Toolbar which breaks the display of menus.
This works around the problem by forcing layoutlib
to use the framework toolbar in menu previews (regular activities
won't display the menu if they use AppCompat).

Bug: http://b.android.com/210946
Change-Id: Ic1d162c6d74119ef42895776c3bc3851a9549120
2016-05-24 18:27:35 +01:00
TreeHugger Robot
b406dd20ee Merge "Fixed bugs with starting windows when displayng forcedResized activity" into nyc-dev 2016-05-17 00:51:41 +00:00
Wale Ogunwale
3b23239d6e Fixed bugs with starting windows when displayng forcedResized activity
- Added ActivityOption to mark a starting activity as a taskOverlay
activity. That is the activity will always be the top activity of the
task and doesn't cause the task to be moved to the front when it is added.
- Only set the starting window state of the ActivityRecord to shown if
window manager actually showed the starting window for the activity.
Avoids incorrectly trying to remove starting window for an activity that
didn't show any.
- When starting additional activity in a task, transfer the starting
window from the top most activity with a starting window. It is possible
the top most window does have a starting window like in the case of the
forcedResized activity.
- Only ensure visiblity of an activity we are starting in a task whose top
activity is a task overlay. They need to start in the visible-paused state
and not the resumed state which just causes extra churn in the system.
- Always add additional starting activities in a task with an overlay
activity below the overlay activity.

Bug: 28751186
Change-Id: I3624a4313ae9c406d42c67a3537f67ad685791af
2016-05-16 16:27:01 -07:00
Yohei Yukawa
833bdcedce Make IMS#clearInsetOfPreviousIme() reliable.
This is a follow-up to my previous CL [1] for Bug 15922840 so that we
can clear the following variables in a more reliable way.
 - PhoneWindowManager#mLastInputMethodWindow
 - PhoneWindowManager#mLastInputMethodTargetWindow

The idea behind CL [2] is that when InputMethodManagerService (IMMS) is
switching from an IME to another IME, IMMS can send a signal to
WindowManagerService (WMS) to remember the current IME's inset so that
the system can continue using it to reduce jank until the new inset is
specified by the next IME.  As summarized in Bug 28781358, however, if
the next IME does not show the window after the IME switch, WMS (or
PhoneWindowManager to be precise) keeps using the previous IME's inset
unexpectedly until the new IME shows its window.  All we have seen in
Bug 15922840 and Bug 26663589 fall into this category.

The idea of this CL is just adding a hidden API to InputMethodManager so
that InputMethodService#clearInsetOfPreviousIme() can surely terminate
the IME transition state managed in PhoneWindowManager, rather than
relying on a hack of calling SoftInputWindow#show() and
SoftInputWindow#hide(), which actually does not work for Bug 26663589.

 [1]: Ib04967f39b2529251e4835c42e9f99dba2cf43f2
      2977eb7b6ce82309a1bb1ba4ab698f503cb0388a
 [2]: I5723f627ce323b0d12bd7b93f5b35fc4d342b50c
      792faa2c16d319e874a1d633f964a78266d5f3f2

Note that addressing all the corner cases in [2] still requires lots of
non-trivial change.  Hence this CL focuses only on Bug 26663589 (and
the case we handled in Bug 15922840).

Bug: 26663589
Change-Id: Ib567daa009c1139858dccadcfc6a04465ebecf36
2016-05-15 20:05:56 -07:00
Diego Perez
5ca21e4cec Fix VectorDrawable_Delegate and DrawerLayout
Modify the nDraw call that has been changed in the framework to return
an int with the number of pixels allocated.
Modify the animation initialization render call to use the actual
measured size (instead of 0,0) so the DrawerLayout is setup
correctly.

Change-Id: I198de05206382c6489056f7c3d9a1d328864321c
2016-05-10 15:21:38 +01:00
TreeHugger Robot
ea162c3c79 Merge "Prepare to replace windows across recreate()." into nyc-dev 2016-05-05 19:38:17 +00:00
Diego Perez
e37ecbdede Merge "Add missing delegate in Bitmap_Delegate" into nyc-dev 2016-05-05 12:21:35 +00:00
Robert Carr
77bdfb512f Prepare to replace windows across recreate().
When the activity locally recreates itself, nothing
on the server side is able to prepare preserving windows,
or replacing windows. The activity was trying to defer
removing the old window, but it was just waiting
until the new one was created, not until it was drawn,
thus resulting in a flicker. It's easy to backpack on the
existing replacement infrastructure.

Bug: 28221875
Change-Id: I55fc4ca78e9e11809473fedd8b30b6a6350cf852
2016-05-04 12:40:39 -07:00
Deepanshu Gupta
4c5e7a740a Merge "Add namespace before attr name in defPropMap" into nyc-dev 2016-04-29 20:06:01 +00:00
Deepanshu Gupta
2385e2184a Merge "Revert "Switch LayoutLib to Java 8"" into nyc-dev 2016-04-29 20:05:39 +00:00
Deepanshu Gupta
a43c4fa09f Add namespace before attr name in defPropMap
Change-Id: I36d094fb69d5f5ce0aebde04960ffcd19c27a2eb
2016-04-26 15:19:31 -07:00
Svetoslav Ganov
5a91b61523 Merge "Disallow disable of the system shared libs." into nyc-dev 2016-04-22 21:03:30 +00:00
Diego Perez
d7d2119fe3 Add missing delegate in Bitmap_Delegate
New nativeCopyAshmemConfig

Change-Id: I8aedb0df827ac8d8091a9457bc341c1047b5a539
2016-04-22 19:00:39 +01:00
Diego Perez
39e540caff Separate measure so it can only run inflate if needed
This allows to only do inflate + measure and not to render.

Change-Id: I4be08513728b656f699e9115e14cf618d95b538a
2016-04-15 11:38:19 +01:00
Deepanshu Gupta
e70464e116 Merge "Return complete properties map instead of per view" into nyc-dev 2016-04-14 19:42:16 +00:00
Deepanshu Gupta
eaf1853b98 Return complete properties map instead of per view
Change-Id: Ib7c71606d1bf43bbaa80f5601a8508d7aa49d953
2016-04-14 12:38:23 -07:00
Svetoslav Ganov
a9c2500a68 Disallow disable of the system shared libs.
bug:28173410

Change-Id: If731f2d90312a083bb940f83431ba3eccf213947
2016-04-13 19:31:40 -07:00
Jerome Gaillard
8c0ab16494 Change method name in VectorDrawable_Delegate
Following change in VectorDrawable from commit cdedc9a80d.

Change-Id: I5d17b2e77c9600fe3da981c77a3e39dcd4df1d1f
2016-04-13 11:48:28 +01:00
Diego Perez
49a54366c1 Merge "Synchronize access to the main looper" into nyc-dev 2016-04-13 08:14:57 +00:00
TreeHugger Robot
0a6a6dbe91 Merge "Added api to delete cache files for a given user" into nyc-dev 2016-04-13 03:13:49 +00:00
Suprabh Shukla
78c9eb8947 Added api to delete cache files for a given user
Added an api to delete application cache files for a specific user. This
allows settings to clear cache files for work profile apps as well.

Bug: b/25338468
Change-Id: I52d4944a7a03b6d63ad44dd6bb868aec62815eab
2016-04-12 18:23:56 -07:00
Deepanshu Gupta
79c59fe4a8 Add post resolve property values
Change-Id: Ia86b7dfc479cc5313cce36b6b3066fbb1d00c292
2016-04-12 12:46:09 -07:00
Diego Perez
8d25697bf0 Synchronize access to the main looper
Change-Id: I4b9375d07c4191393c04f8b40905e63742b3baad
2016-04-12 18:27:31 +01:00
Diego Perez
a0a51b6fb6 Fix broken delegates for FontFamily and PathParser
The theme editor is throwing an exception with the last embedded
layoutlib because a missing method. Added also another missing method in
FontFamily.

Change-Id: I710ba7618df6444a3185b581cdc5dc8400f7c604
2016-04-12 17:21:00 +01:00
Diego Perez
2155ad8204 Merge "Fix NPE when runnin testActivity" into nyc-dev 2016-04-07 19:02:34 +00:00
Diego Perez
8cdf61a02e Fix NPE when runnin testActivity
Change-Id: I7ac81cb286b8d5593ae7f5fedb99bfd0fda791c5
2016-04-07 18:00:17 +01:00
Diego Perez
8d35506e51 Merge "Fix rect shadow detection" into nyc-dev 2016-04-07 16:27:00 +00:00
Deepanshu Gupta
5b758bf272 Merge "Add missing setAccessible to Choreographer's threadInstance" into nyc-dev 2016-04-06 19:32:02 +00:00
Deepanshu Gupta
42c8bd1b4a Add missing setAccessible to Choreographer's threadInstance
Change-Id: I753660cf68ba5a9c375942222e32059d952739bb
2016-04-06 12:29:55 -07:00
Deepanshu Gupta
39f1311b54 Merge "Clear ThreadLocal storage from Choreographer" into nyc-dev 2016-04-06 19:04:00 +00:00
Deepanshu Gupta
61ccc9198a Clear ThreadLocal storage from Choreographer
Change-Id: I5abb5c68a635e7808b0a036ba4d9971cd0139aa3
2016-04-06 11:32:36 -07:00
Diego Perez
a4d7ad8663 Fix rect shadow detection
ViewGroup_Delegate was trying to use a rect shadow even in cases where
we needed to use a path. This caused that using a ToggleButton would
throw an exception with radius < 0.
Also, changed the tests so we can detect certain render errors and
ignore other (like known fidelity warnings).

Change-Id: I900d45f9efa892ad0aebc8f4ef73fc9f21ab9d92
2016-04-06 12:33:26 +01:00
Deepanshu Gupta
bad02b0ec9 Merge "Add properties from textAppearance to property map" into nyc-dev 2016-04-05 23:59:02 +00:00