Commit Graph

4478 Commits

Author SHA1 Message Date
Roozbeh Pournader
1062853800 Re-enable disabled emoji tests [DO NOT MERGE]
am: 8cd1b1ba80

Change-Id: I0cc4e1b30d8df95efea682d0b2ae4dc96822689b
2016-08-19 22:27:50 +00:00
Roozbeh Pournader
21e026bb7e Check defaults for Android default-emoji characters [DO NOT MERGE]
am: 84b1746130

Change-Id: Icadd25ab3dc99a2ce00220900a6b37cf0144d7d4
2016-08-19 22:26:11 +00:00
Adam Lesinski
26ae640c34 AAPT: Handle gaps in resources when building splits
Due to public ID assignment, gaps in resource type and entry
IDs can occur. This can lead to null pointer dereferencing
if not careful. This happened in ResourceTable::getDensityVaryingResources()
which is called when building Splits.

Bug:30879690
Change-Id: I588e4dcd2e042fccfcb2e87967b5cbd0d23b4497
(cherry picked from commit 081d1b4cf6)
2016-08-17 19:53:01 +00:00
Adam Lesinski
193ed74c2d AAPT: Fix use-after-free error
Re-order deletion of ResXMLTree and the Asset object
it iterates over.

Bug:30844391
Change-Id: Ied033d0a8f93343006228a2054c6d0f42bb4717a
2016-08-15 14:22:36 -07:00
TreeHugger Robot
59a91c04cc Merge "AAPT: Fix feature split generation of ID resources" into nyc-mr1-dev 2016-08-04 01:27:34 +00:00
Adam Lesinski
4d219da3c4 AAPT: Fix feature split generation of ID resources
ID resources that get generated on demand with the
notation @+id/name were previously not given the
appropriate type ID offset when being built as feature
splits.

This change declares an ID type ahead of time so that
the type ID offset is applied before IDs can be generated.

Bug:30607637
Change-Id: I122a9133cb01b35e9892103ec52fc228dc65bf1a
2016-08-03 16:54:15 -07:00
Adam Lesinski
ca955a4c3a AAPT: faketouch feature implied if no touchscreen feature requested.
This changes the default implied feature of 'android.hardware.touchscreen'
to 'android.hardware.faketouch' if no 'android.hardware.touchscreen'
feature is requested, required or otherwise.

Bug:30571641
Change-Id: I1e41242d4b1dc549cf69741d2a309baf476d084e
2016-08-01 17:20:28 -07:00
Roozbeh Pournader
84b1746130 Check defaults for Android default-emoji characters [DO NOT MERGE]
There are 12 characters that Android is defaulting to emoji,
differing from UTR #51 recommendation. This tests for their proper
support.

Bug: 30379358
Change-Id: Icd570510090ef29b3b7a3520bc368c5f77f99fa4
(cherry picked from commit 10ea8f7431)
2016-07-27 18:10:38 +00:00
Roozbeh Pournader
8cd1b1ba80 Re-enable disabled emoji tests [DO NOT MERGE]
Since I2e508ced90515409ff6882b3c98d8911094b9b86 updates the emoji
data to version 4.0 beta, we can now re-enable the disabled emoji
tests.

Also fix some style issues, update data file parsing method to handle
the new emoji format, add UN to unsupported flags, and do a little
refactoring.

Bug: 30379358
Bug: 26187231
Change-Id: I441fdfed68381d08e5e0b3af91e94bfae742eef6
2016-07-26 18:32:57 -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
Adam Lesinski
526d73be4a AAPT: Don't keep processing files that failed to be added
AAPT will continue ahead without reporting an error if a file
failed to be added to the ResourceTable. This would cause crashes
later when the file was assumed to be present.

Bug:30200166
Change-Id: Ieb2daf97ccf0345153b6f4598d130a38d108c937
2016-07-18 17:07:41 -07:00
Doug Felt
4970cdac7e Patch out part of the emoji tests.
This is temporary, until we have proper attribution for additional
emoji data.

Bug: 29939737
Change-Id: I5b97c8e055fa2ccf44b13bf801f681b860d47286
(cherry picked from commit f874a1949a)
2016-07-13 18:44:45 +00:00
Zak Cohen
3683fb1e1d Adds a screenshot wallpaper method to WallpaperManagerService.
Bug: 29963541

Change-Id: If0a574004f8bddf1ba170587a8187253fe045ef4
2016-07-12 17:18:36 +00:00
Sergio Giro
49c410bc48 Merge "Add bound checks to utf16_to_utf8" into nyc-mr1-dev 2016-07-11 12:11:31 +00:00
Sergio Giro
4781057e78 Add bound checks to utf16_to_utf8
Test: ran libaapt2_tests64
Bug: 29250543
Change-Id: I1ebc017af623b6514cf0c493e8cd8e1d59ea26c3
2016-07-02 17:46:20 +01: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
      152944f490
 [2]: Ica1ba3154795c1bf44e140dfe639b299f83cd8af
      adebb52588

Bug: 29450031
Change-Id: I2772889ca01f2ecb2cdeed4e04a9319bdf7bc5a6
2016-06-22 16:31:41 -07:00
Adam Lesinski
e0dc709ac8 Merge \"Fix build due to missing abstract method impl\" into nyc-dev
am: aeef7c4748

Change-Id: I38fc7c88e9c4ea5abf50a0bec5f2302c4622605f
2016-06-22 22:41:38 +00: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
Roozbeh Pournader
3f32c27ccf Don't match locales with different scripts in ResourceFilter
Previously, AAPT would match locales even if they had different
explicit scripts if the requested locale was just a languages. Now
we require explicit listing of the languages with different explicit
scripts in order for the locale to be included.

Bug: 29412034
Change-Id: Ia118a5a7f9aec49f6c3c53b9195a0ae1a57f53fd
2016-06-21 15:03:51 -07:00
Yorke Lee
599cf6bc4a Merge \"Limit global drags to apps targeting SDK 24 and above\" into nyc-dev
am: f33af2285b

Change-Id: If4d9abfb81929f8366fc9acc7978816d55117fbc
2016-06-16 21:21:57 +00: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
Adam Lesinski
fee32d4d5f Allow uses-library under <application>
Bug:29106952
Change-Id: I2e780323d86e7050038d34426a30e66a4bbfcc23
2016-06-02 23:57:55 +00:00
Diego Perez
6cc7426439 Merge "Workaround to display menus for AppCompat themes" into nyc-dev
am: 36cd747bb6

* commit '36cd747bb6030c9c19dbab6bdfd85b2106017973':
  Workaround to display menus for AppCompat themes

Change-Id: I65ce3798aa3fc2d851126d88b3dc1834d05b5393
2016-05-25 16:47:14 +00: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
Wale Ogunwale
273d6e8f56 Merge "Fixed bugs with starting windows when displayng forcedResized activity" into nyc-dev
am: b406dd20ee

* commit 'b406dd20eee28eedb8e9f330a0459d630c026515':
  Fixed bugs with starting windows when displayng forcedResized activity

Change-Id: I81250af945c186fbb687bc15ec03a85a019bd6e3
2016-05-17 00:59:36 +00: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
6b078fef33 Merge "Make IMS#clearInsetOfPreviousIme() reliable." into nyc-dev
am: cef3337cb5

* commit 'cef3337cb5e27d4f571fb350be055c26d339833d':
  Make IMS#clearInsetOfPreviousIme() reliable.

Change-Id: Ie654d6bccd6d4425e0dbefe2833424abdfe52a4d
2016-05-16 15:31:03 +00:00
Yohei Yukawa
cef3337cb5 Merge "Make IMS#clearInsetOfPreviousIme() reliable." into nyc-dev 2016-05-16 15:22:21 +00:00
Michael Wright
365eaeef5f Merge "Stop emitting javadoc for @removed attributes." into nyc-dev
am: c4033e7c66

* commit 'c4033e7c668abc1e671a130f70f58f885c63b176':
  Stop emitting javadoc for @removed attributes.

Change-Id: If48d0299c6d4d7179a366d902f23ada17315e42c
2016-05-16 13:26:58 +00:00
TreeHugger Robot
c4033e7c66 Merge "Stop emitting javadoc for @removed attributes." into nyc-dev 2016-05-16 13:21:10 +00: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
      2977eb7b6c
 [2]: I5723f627ce323b0d12bd7b93f5b35fc4d342b50c
      792faa2c16

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
0e5358105d Merge "Fix VectorDrawable_Delegate and DrawerLayout" into nyc-dev
am: 8fc7ca05e5

* commit '8fc7ca05e5ce3a8774be2abb0742b993431bff63':
  Fix VectorDrawable_Delegate and DrawerLayout

Change-Id: I481fbd2510729ad481030c33918b9b52ad508576
2016-05-11 15:59:03 +00:00
Diego Perez
8fc7ca05e5 Merge "Fix VectorDrawable_Delegate and DrawerLayout" into nyc-dev 2016-05-11 15:53:15 +00:00
Adam Lesinski
1a1461058e Merge "AAPT2: Add diff command" into nyc-mr1-dev 2016-05-11 00:03:19 +00:00
Doug Felt
3a64f8140c Remove rifle (1F946) from emoji font.
Bug: 28678310
Change-Id: I60097cd78f28764d83abe0d12b53e2a7e6c974dc
2016-05-10 12:50:25 -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
Michael Wright
feaf99fa1b Stop emitting javadoc for @removed attributes.
We need the attributes to remain public because people might still be
linking against them, but we don't want them showing up in the
documentation any more. Them showing up in the documentation also had
the side effect that it would accidentally mark the parent class of
attributes as @removed, which was not intended.

Bug: 28663748

Change-Id: I2f6eb09455fddf1086e6b24bc3bea5292e8e32b7
2016-05-09 14:51:41 +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
Adam Lesinski
458b877488 AAPT2: Add diff command
Adds the diff command and various small fixes to issues
discovered when diffing old AAPT built APKs with new AAPT2
built APKS.

Bug:22775504
Change-Id: I682a7fe1cf4b3efa7cbd5d18b333cf2d1046fe1b
2016-04-30 01:36:12 +00:00
Raph Levien
398342f9b6 Merge "Patch fontchain_lint to exclude modern_pentathlon." into nyc-dev 2016-04-29 21:25:20 +00:00
Doug Felt
ce51db00ec Patch fontchain_lint to exclude modern_pentathlon.
Fix build breakage.
Bug: 28426800

Change-Id: Idcc8f1b66014b25758c163d908d34f06011d9927
2016-04-29 14:17:57 -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
Rohit Agrawal
ab45664130 Merge "AAPT: ProGuard config for components in main dex." into nyc-dev 2016-04-29 01:19:08 +00:00
Adam Lesinski
28d6c1e493 Merge "AAPT2: Accept a file with arguments when argument list is too long" into nyc-dev 2016-04-28 19:34:31 +00:00