Crash immediately so that we can track down the cause. If we let it
through, we'll hit an ISE later in dispatchVsync() and never know why.
Bug: 21948478
Change-Id: I84edf93cdf09d755419e18a7606b7b6cbd059956
"Default" packed colors are indicated by zero alpha and non-zero
red/blue. The cached alpha value used by Settings is stored in green.
Bug: 21602597
Change-Id: I1465210fda854ee979aa3a6b398ae60b41d10711
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
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
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
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
ViewGroup overrides class name population to
AccessibilityEvent. So className is always ViewGroup
for any ViewGroup inherited classes
b/21369265
Change-Id: I46095c21e523e05066c7f6ee395171d4725983ac
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
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
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
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
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
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
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
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
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
This CL does nothing but updates JavaDoc of EditorInfo#packageName
about the changes made in M.
Bug: 18931038
Change-Id: I8c94f6470d77e22daabb7caa0ea57e85e51b3ec5