Commit Graph

7027 Commits

Author SHA1 Message Date
Derek Sollenberger
b2aea9dcbd Merge "Enable Picture w/ HW Accelerated Canvas." into mnc-dev 2015-06-22 15:38:11 +00:00
Derek Sollenberger
e109940d81 Enable Picture w/ HW Accelerated Canvas.
Bug: 20688645
Change-Id: I664f37d6dbb3e61b17206c82ebcc63f988cefc65
2015-06-22 13:18:29 +00:00
Abodunrinwa Toki
07e440b278 Merge "Fix FloatingToolbar flickers." into mnc-dev 2015-06-19 14:26:11 +00:00
Alan Viverette
49e11f805d Merge "Clear/restore calling identity in AccessibilityInteractionClient" into mnc-dev 2015-06-18 18:22:08 +00:00
Adam Powell
6690d018b9 Un-hide ViewGroup#onViewAdded/onViewRemoved
These methods are generally useful for writing custom views, and by
exposing them we make it easier for custom view authors to still allow
app developers to use an OnHierarchyChangedListener since it will not
be occupied by a custom view's implementation.

Also move the actual dispatch to package-scoped dispatch methods so
that a developer forgetting to call super won't stop a listener from
functioning.

Bug 21866523

Change-Id: Ie2bb5e241d7c5a02a5033f33ecdaeb40aceb20b5
2015-06-18 10:19:18 -07:00
Abodunrinwa Toki
972ab4f858 Fix FloatingToolbar flickers.
This is fixed by avoiding calling toolbar.show() in PhoneWindow.
FloatingActionMode coordinates whether or not the toolbar should be
visible. PhoneWindow differs to it.

This CL also adds a new API:
ActionMode#onWindowFocusChanged(boolean)

Bug: 21617792
Change-Id: Ic49ce1000ce9c782d0f9e17e3d024d462c7b758b
2015-06-18 03:16:21 +01:00
Alan Viverette
56bbeff99a Clear/restore calling identity in AccessibilityInteractionClient
To quote sendAccessibilityEvent(), "it is possible that this manager is
in the same process as the service but client using it is called through
Binder from another process."

Bug: 21737301
Change-Id: I8d4699a0ca8187a12235741ce420948061798f27
2015-06-17 15:33:54 -07:00
Yohei Yukawa
f4d225a4b5 Fix debug log for SpellCheckerSessionListenerImpl#TASK_CANCEL
This is a follow up CL for Ifd05565ac0c057c46ec88a3fb9094c04934041d.

SpellCheckerSessionListenerImpl.taskToString(TASK_CANCEL) has
somehow returned "STATE_WAIT_CONNECTION" probably because of
a copy-and-paste mistake.

With this CL, it now returns "TASK_CANCEL", which is observable
only in debug log anyway though.

Bug: 21319642
Change-Id: Ib0bf11494bd3f210e6e8192fc25a33c65f7d313d
2015-06-16 21:19:00 -07:00
Yohei Yukawa
e34f0984bb Merge "Fix a reference leak in SpellCheckerSessionListenerImpl." into mnc-dev 2015-06-17 02:54:08 +00:00
Maxim Bogatov
f399af3e5f fix CTS: AccessibilityEndToEndTest failing
ViewGroup overrides class name population to
AccessibilityEvent. So className is always ViewGroup
for any ViewGroup inherited classes

b/21369265

Change-Id: I46095c21e523e05066c7f6ee395171d4725983ac
2015-06-16 15:19:42 -07:00
Yohei Yukawa
f05ce728f9 Fix a reference leak in SpellCheckerSessionListenerImpl.
The primary goal of this CL is to address a reference leak
in SpellCheckerSession.SpellCheckerSessionListenerImpl if
the SpellCheckerSession is closed too early.  Here is the
minimum repro code.

  TextServicesManager tsm = (TextServicesManager)
          getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
  SpellCheckerSession session = tsm.newSpellCheckerSession(,
          Locale.ENGLISH, listener, false);
  session.close();

In order to make the state management reliable and easier to
debug, this CL replaces SpellCheckerSessionListenerImpl#mOpened
with an explicit state number so that we can tell three different
"not open" cases: 1) not connected yet and not closed yet, 2)
closed before establishing connection, and 3) closed after
establishing connection.

Bug: 21319642
Change-Id: Ifd05565ac0c057c46ec88a3fb9094c04934041d7
2015-06-16 00:29:28 -07:00
Vladislav Kaznacheev
0021d3fa13 Merge "Revert "Make VPA.setInterpolator(null) unset the interpolator."" into mnc-dev 2015-06-15 19:43:13 +00:00
Adam Powell
417018f21b Merge "Only read foreground attr for FrameLayouts for targetSdkVersion < M" into mnc-dev 2015-06-15 19:25:21 +00:00
Alan Viverette
2d4dc8db64 Merge "Obtain handler from context in CaptioningManager" into mnc-dev 2015-06-15 18:05:11 +00:00
Vladislav Kaznacheev
78f146f420 Revert "Make VPA.setInterpolator(null) unset the interpolator."
This reverts commit 8cebf3a098.

Bug: 21804709
Change-Id: I4b3c2c4721b8e7dd5cb38c806bdd078344b09799
2015-06-15 06:58:59 +00:00
Adam Powell
bbd3eeb9e5 Only read foreground attr for FrameLayouts for targetSdkVersion < M
Now that the android:foreground attribute is supported for all views
it turns out some existing apps were previously setting foreground or
applying styles with a foreground to unsupporting views even though
the values being set were not drawables. While this was silently
ignored before, now it results in app crashes.

The most expedient fix is to only support foreground on
non-FrameLayout views if the app sets targetSdkVersion to M or newer.

Bug 21646309

Change-Id: I8937f44988866e86e640555f4bbc5dd5b2e1cce1
2015-06-12 14:54:49 -07:00
Dianne Hackborn
8a435ced67 Merge "Fix APIs." into mnc-dev 2015-06-12 16:34:38 +00:00
Chet Haase
3dcb9945fd Remove View.getBackgroundColor()
This method was added earlier in M - removing it now based on API
Council feedback.

Issue #21572678  API Review: android.view.View.getBackgroundColor()

Change-Id: I04fad49c3c377218d0fb708dbeaea609aca46ce8
2015-06-12 13:25:27 +01:00
Dianne Hackborn
ece0f4f519 Fix APIs.
Issue #21039494: API Review: android.os.PowerManager.isDeviceIdleMode()
Issue #21347000: API Review: android.content.IntentFilter
Issue #20654534: API Review: android.app.assist

Also allow use of ActivityManager.setWatchHeapLimit on any platform
build as long as the calling app is debuggable.

Change-Id: Ic597e596fa772fcdf2553b64f444b3d9269e8b92
2015-06-11 18:07:43 -07:00
Adam Powell
d5dbf4b2a0 Check targetSdkVersion when passing size hints for UNSPECIFIED specs
As of MNC stock widgets will pass a size in UNSPECIFIED MeasureSpec
values as a hint of the container size. This lets things like list items
size themselves at 1/3 the size of their container.

This breaks assumptions in a few existing applications, so maintain the
old expectation of 0 size in UNSPECIFIED MeasureSpecs for apps targeting
older SDK versions.

Bug 20975083

Change-Id: Ic7318e88854e00d96852dde2c0e10376b42bf77f
2015-06-11 13:57:41 -07:00
Chris Craik
e22c59b291 Trace each stage of Choreographer driven frames
bug:21374535

Change-Id: I332dac216defbc4517441e2a9cdffdf71731f1e6
2015-06-11 19:51:38 +00:00
Chris Banes
dbdaa9b41e Merge "API council review feedback for ActionMenuView" into mnc-dev 2015-06-11 08:05:42 +00:00
Vladislav Kaznacheev
1955ee57b3 Merge "Make VPA.setInterpolator(null) unset the interpolator." into mnc-dev 2015-06-10 21:55:39 +00:00
John Reck
6fa9512e34 Set the right reportNextDraw
Bug: 8012229

mReportNextDraw is set by resized to have updateWindow() do
its thing. However if we are in updateWindow() and the
relayout() call to WindowManager wants us to report the draw
we should set reportNextDraw instead of mReportNextDraw
so that we report that frame instead of at the accidental next
invalidate.

Change-Id: If6c38d95599469831a0bd5e4d2b3f6c4f259e40c
2015-06-10 10:25:20 -07:00
Chris Banes
a41b78973d API council review feedback for ActionMenuView
Reverts "MenuItem, navigation and overflow icon tinting" CL,
and adds getter and setter for the overflow icon to ActionMenuView
and Toolbar.

BUG: 21571899

Change-Id: I591f43650356443fa3256e4d74e28b6ddd8c2b33
2015-06-10 11:39:01 +01:00
Chris Craik
751afe2040 Merge "Dont ignore layer paint alpha in software path" into mnc-dev 2015-06-09 22:23:36 +00:00
Chris Craik
f396f011ee Dont ignore layer paint alpha in software path
bug:19412691

Change-Id: Ie56b2cbc667a078eb4a7c5bfe7b8e8dd6b0fc24b
2015-06-09 13:50:01 -07:00
Yohei Yukawa
62974816a3 Merge "Do not accept an empty string in EditorInfo#packageName anymore." into mnc-dev 2015-06-09 20:30:56 +00:00
Yohei Yukawa
eae09d1ad7 Merge "Update JavaDoc of EditorInfo#packageName." into mnc-dev 2015-06-09 19:23:02 +00:00
Selim Cinek
78528b22c2 Fixed a RTL layouting bug with LinearLayout
When the RTL properties of a horizontal LinearLayout
changed, nobody enforced the view to be layouted anew,
even though its layout is dependent on the layout
direction. This could lead to stale layouts being
temporarily layouted the wrong way.

Bug: 20495301
Change-Id: I979c8d86ee711626b2901b65ebdf007c1eb1c0fa
2015-06-09 18:33:19 +00:00
Yohei Yukawa
d57ba675b1 Do not accept an empty string in EditorInfo#packageName anymore.
In the previous CL Ib871141e3381e45c2623c5f4d692da7a7e78fcc5,
a null or empty EditorInfo#packageName was still allowed in case
there might be applications that simply forgot to set it.

However, after checking the code again, it would be safe to say
that having a null or an empty string in EditorInfo#packageName
would never happen unless the application intentionally clears it
in View#onCreateInputConnection. If there were such applications,
probably we could ask developers to stop doing that.

With this CL the system no longer accepts such an empty package
name.  IME developers do not need to handle such an exceptional
case in their side.

Bug: 18931038
Change-Id: I10d579b48b59fa8ada796e92d58517c6cc5f2230
2015-06-08 17:06:03 -07:00
Yohei Yukawa
915e2c7731 Update JavaDoc of EditorInfo#packageName.
This CL does nothing but updates JavaDoc of EditorInfo#packageName
about the changes made in M.

Bug: 18931038
Change-Id: I8c94f6470d77e22daabb7caa0ea57e85e51b3ec5
2015-06-08 17:05:44 -07:00
Wale Ogunwale
d8b9b642fe Merge "Use DisplayAdjustments when creating display in ResourceManager" into mnc-dev 2015-06-08 20:17:23 +00:00
Tim Kilbourn
72285e5600 API review: Update hasMic to hasMicrophone.
Also make the SearchEvent constructor available for testing.

Bug: 21572283
Bug: 21572676
Change-Id: I35cfd88b45aeb97b6ccf83aeb46b0ecc4bbc0947
2015-06-08 16:52:36 +00:00
Mady Mellor
e1f3214e72 Merge "Change stylus button press to context click in View - API review feedback" into mnc-dev 2015-06-08 15:11:32 +00:00
Mady Mellor
a54a8626ed Merge "Change stylus button press to context click in GD - API review feedback" into mnc-dev 2015-06-08 15:11:10 +00:00
George Mount
7c79c82b97 Merge "Don't cause requestLayout when transition changes Visibility." into mnc-dev 2015-06-08 14:18:13 +00:00
Abodunrinwa Toki
7d3b8833df Merge "Fix ActionMode.snooze API" into mnc-dev 2015-06-08 11:36:19 +00:00
Wale Ogunwale
26698514fb Use DisplayAdjustments when creating display in ResourceManager
We were previous only taking the Configuration into account when
creating Display objects in the ResourceManager. This led to the
Display object not containing critical CompatibilityInfo. We now
take the entire DisplayAdjustment into account.

Bug: 21637615
Change-Id: Ide5ff49bfa12791ad17993764f312836216b1dd8
2015-06-06 11:26:33 -07:00
George Mount
e5a93aa81c Don't cause requestLayout when transition changes Visibility.
Bug 21400515

When a Visibility transition temporarily changes a View's
visibility, it should not cause a requestLayout or any other
action, such as focus change. This adds a hidden method to
View to allow it to tweak the visibility without causing
other side-effects.

Change-Id: I5a06149983051319080130e5b5e7cc7edda8dd3e
2015-06-05 17:21:40 -07:00
Alan Viverette
727dcc7e6b Obtain handler from context in CaptioningManager
Rather than the current thread, which prevented us from loading the
CaptionManager in a CTS test.

Bug: 15389946
Change-Id: Ic0037cc2ecfcab57545088ab63ed5cb9742206a7
2015-06-05 17:13:19 -07:00
Mady Mellor
015020eb3a Change stylus button press to context click in GD - API review feedback
Based on API review feedback we should use onContextClick instead of
onStylusButtonPress. This CL updates associated methods and usage
in GestureDetector.

Additionally listens for mouse right clicks and calls the
onContextClick method for these as well.

Bug: 21572278
Change-Id: I4fa01997bff7265d5d2713353a93e07417a148e5
2015-06-05 14:41:22 -07:00
Mady Mellor
e860891b1a Change stylus button press to context click in View - API review feedback
Updates all references in View's onStylusButtonPress to onContextClick
as per API review feedback.

Additionally listens for mouse right clicks and calls the onContextClick
method for these as well for the stylus button press.

Bug: 21572278
Change-Id: I5c1ee8c8f23a77d7c677b86356e89d0e4fc40056
2015-06-05 09:02:55 -07:00
Mady Mellor
0f2f9f7a51 Merge "Stylus scale - API review feedback" into mnc-dev 2015-06-05 15:50:52 +00:00
Chet Haase
e790c97787 Hide View.getBackgroundColor() prior to removal
Issue #21572678  API Review: android.view.View.getBackgroundColor()

Change-Id: Ia4fa9e207db3af6e076581bf23747eba6e56bb69
2015-06-05 14:41:51 +00:00
Abodunrinwa Toki
9e211282d3 Fix ActionMode.snooze API
Bug: 21572677
Change-Id: If9fdb8ace3773b983418b0148082712644fd1fa5
2015-06-05 03:35:15 +01:00
Mady Mellor
d9ff4df850 Stylus scale - API review feedback
Fixed typo and javadoc error.

Bug: 21572278
Change-Id: Ia710971f1f4a97df7ed8e898d972f617465900b9
2015-06-04 18:03:49 -07:00
Yohei Yukawa
4493017abb Merge "Report EditorInfo#packageName based on the actual uid." into mnc-dev 2015-06-04 23:12:45 +00:00
Adam Powell
05e967820d Make WindowInsets#hasInsets check for stable insets as well
Bug 20091509

Change-Id: Ia7dda5ab94a0904277c1078f3f73a59a735860d8
2015-06-04 12:38:13 -07:00
Dianne Hackborn
b0a5e78fc0 Merge "More API changes." into mnc-dev 2015-06-04 16:56:52 +00:00