Commit Graph

7253 Commits

Author SHA1 Message Date
TreeHugger Robot
c1323664d4 Merge "Make the android.R.string.autofill public." 2017-06-28 01:55:57 +00:00
Phil Weaver
53a8e4370a Merge "Clean up popup window titles" 2017-06-27 00:39:30 +00:00
Phil Weaver
dd6978545f Clean up popup window titles
Removing the recently-added APIs to adjust the title for
the popup window, and moving setting the title to
preparePopup(), which is guaranteed to have a context.
(The bug is a crash because we didn't have a context.)

Apps wishing to specify their own title can still do so
in the LayoutParams without bothering with the get/set.

Bug: 62675086
Test: With TalkBack running, navigate to Settings->
Network & Internet. Select the more options button and
double-tap to select it. It now announces "Popup Window".

Change-Id: I9735ace42c24ef4977d3f4d5150f768d44aff351
2017-06-26 15:32:21 -07:00
Felipe Leme
555bcac6b2 Make the android.R.string.autofill public.
Fixes: 62444792
Test: manual verification with app that uses it the string
Test: CtsAutoFillServiceTestCases pass

Change-Id: Ic859a7a80ab25f6e240a308715b7c50708c497f3
2017-06-26 12:55:17 -07:00
Rob Carr
e8a3b7a162 Merge "ListPopupWindow: Wrap new bounds checking in targetSdk check." into oc-dev am: 82b41e460c am: 874b6402af
am: 9a8971fabb

Change-Id: Ida4fd8f112a7164fb79512d09eadd10da718c269
2017-06-22 22:41:39 +00:00
Rob Carr
9a8971fabb Merge "ListPopupWindow: Wrap new bounds checking in targetSdk check." into oc-dev am: 82b41e460c
am: 874b6402af

Change-Id: I3db14694bc27e9fed16b5efec6aba99570b89675
2017-06-22 22:32:07 +00:00
TreeHugger Robot
abc6fd57de Merge "Stop loading other package's font by default." 2017-06-22 22:28:10 +00:00
Robert Carr
c1fdd2aa32 ListPopupWindow: Wrap new bounds checking in targetSdk check.
While a negative height is pretty silly, crashing apps on
the new version of android makes them sad.

Test: Existing CTS passes.
Bug: 62434804
Change-Id: I5fc3fc50fb6ccfa9e96f38ded4fb8e338f263f09
2017-06-22 11:54:45 -07:00
Seigo Nonaka
6d6cd68660 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

Bug: 62813533
Bug: 62879353
Test: Manually done
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
2017-06-22 08:36:03 -07:00
Felipe Leme
49a38c6f1c Added BaseAdapter.setAutofillOptions()
Also changed ArrayAdapter to use it, when set.

Fixes: 37518906
Test: cts-tradefed run commandAndExit cts-dev -m CtsWidgetTestCases  -t android.widget.cts.BaseAdapterTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsWidgetTestCases  -t android.widget.cts.ArrayAdapterTest
Test: m update-api

Change-Id: I5e883555b0fb9d084b57b9239595bf0632fc41af
2017-06-21 13:36:56 -06:00
Yohei Yukawa
c9cd9db4bb Use TEXT_HANDLE_MOVE in TextView behind the flag
This CL enables TextView to trigger
HapticFeedbackConstants.TEXT_HANDLE_MOVE on devices that explicitly
enable this feature with resource overlay.  This CL should have no
behavior change and no performance impact by default.

Since the use case of HapticFeedbackConstants.TEXT_HANDLE_MOVE is
when the user is manually moving the text insertion/selection handle
on the touch screen, it is intentional that text handle move
triggered by hardware keyboard, mouse, TextView APIs, IME APIs, and
any other internal API calls do not trigger the haptic feedback
even if the feature is enabled with resource overlay.

Bug: 62454887
Test: Manually done as follows.
  * Not triggered on cursor move by mouse
  * Not triggered on cursor move by hardware keyboard
  * Not triggered on cursor move by IME
  * Triggered on cursor move by touch screen
Change-Id: I5e78aafb065378ca88ba39ec507b121c8baa3631
2017-06-19 18:27:34 -07:00
TreeHugger Robot
1c75b9c99f Merge "Hide IME when switching to Radial Time Picker" 2017-06-19 17:40:05 +00:00
Siyamed Sinir
4558068f63 Merge "Fix crash during TextView.onCreateContextMenu" into oc-dev am: 58df6ab93f am: 92d86d59c0
am: 4c6d3ba183

Change-Id: I06ed6fea1fe414e7a33694047b0e6e903b7816bb
2017-06-19 17:24:27 +00:00
Siyamed Sinir
4c6d3ba183 Merge "Fix crash during TextView.onCreateContextMenu" into oc-dev am: 58df6ab93f
am: 92d86d59c0

Change-Id: I690ebf4df8e22a57c5f7b2b5e0267a550db15945
2017-06-19 17:13:23 +00:00
Aurimas Liutikas
7334441d69 Hide IME when switching to Radial Time Picker
When switching back to the Radial Time Picker with an
IME visible, make sure to hide it.

Test: Set time from Settings. Switch to TextInputTimePicker.
      Enter text so IME appears.  Switch back to RadialTimePicker
      IME should be hidden again.

Change-Id: Ia0ed149d74333b2f643d50a324172b64aa5e223b
2017-06-17 00:14:11 +00:00
Siyamed Sinir
532f3c989e Fix crash during TextView.onCreateContextMenu
Test: bit CtsWidgetTestCases:TextViewTest

Bug:62450393
Change-Id: I162c28d253ca197eba9c4c148c76179c2880daa5
2017-06-16 19:32:41 +00:00
Alan Viverette
0a14ba56a7 Manually merge 23bb5bf262 to fix APIs
Also updates documentation for RemoteViews clone to reflect the ISE;
however, the implementation is still incorrect and the method should be
deprecated and replaced with a copy constructor.

Bug: 62576297
Test: make -j32
Change-Id: I72dea99fa45a838d22eb54190a0f26a15e8ba766
2017-06-14 17:33:49 -04:00
Daniel Sandler
0e6a5f8d7e Merge "Revert accidental API change to RemoteViews." into oc-dev 2017-06-14 20:12:38 +00:00
Daniel Sandler
23bb5bf262 Revert accidental API change to RemoteViews.
This reverts commit 7f09ce1a23 (but 
retains the bug fix)

Change-Id: Ib4700ada5aa0b5dab7e43f895b48eb7058308869
Fixes: 62543637
Bug: 62181033
2017-06-14 20:10:18 +00:00
Andrei Stingaceanu
02dba53fe7 Merge "DayPickerView - clamp date to min/max" into oc-dev am: 511c95a022 am: 37aa78bfab
am: 852f4b1fa7

Change-Id: I317b1c2891426225863711e4815a470d1902a9a2
2017-06-14 19:35:55 +00:00
Andrei Stingaceanu
37aa78bfab Merge "DayPickerView - clamp date to min/max" into oc-dev
am: 511c95a022

Change-Id: I1ede393b4a5ac44b9961a37e265b7663c88aaa5e
2017-06-14 17:47:03 +00:00
TreeHugger Robot
4cb3ae605c Merge "Add accessibility titles to PopupWindow" 2017-06-13 19:35:56 +00:00
Andrei Stingaceanu
e565e525fa DayPickerView - clamp date to min/max
Besides clamping @ setMinDate() and setMaxDate() also
clamp @ setDate().

Bug: 36636681
Bug: 62485314
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -t
      android.widget.cts.CalendarViewTest#testMinMaxRangeClampingMaterial

Change-Id: I455cd43e7228e10d58b5f886dcab8332bca72de7
2017-06-13 18:23:22 +01:00
Phil Weaver
5476da968f Add accessibility titles to PopupWindow
Adding a default title and a hidden API to customize
the title.

Bug: 30177642
Test: With TalkBack running, navigate to Settings->
Network & Internet. Select the more options button and
double-tap to select it. It now announces "Popup Window".

Change-Id: I38591a25be0fe1d5bf57c9edee29f09c92e258ea
2017-06-12 18:02:09 -07:00
Jeff Sharkey
9039636535 Revert "Hide APIs not intended to ship in DR."
This reverts commit 0c28d43fe1.
2017-06-12 16:26:53 -06:00
Jeff Sharkey
0c28d43fe1 Hide APIs not intended to ship in DR.
This CL will be reverted once it merges into the next release branch
to re-introduce the proposed APIs.

This CL also makes the following code changes to preserve API
compatibility:

-- It keeps the recently added RemoteViews.clone() synchronized logic
intact, but moves it inside the method to avoid changing the API
signature.

-- It reverts the RttCall.read() behavior to the oc-dev logic, since
we can't throw IOException until we get an API level bump.  (The
original logic returned null instead of throwing.)

Test: builds, boots
Bug: 62427252, 62431886, 62427329
Bug: 62468911, 62431162, 62428935, 62429096
Bug: 37290820, 37359238, 36886243
Bug: 30143923, 35761231, 62192626, 29829689
Change-Id: I83d723f598cb0ee1fe198e65debd86ef7fd0420c
2017-06-12 10:26:01 -06:00
Siyamed Sinir
f99e84e4dd Merge "Force Autofill in FloatingToolbar overflow menu" into oc-dev
am: bc626c6358

Change-Id: I4d3cff4bf6a0403f311011709c3074bca532de15
2017-06-09 21:56:09 +00:00
Siyamed Sinir
bc626c6358 Merge "Force Autofill in FloatingToolbar overflow menu" into oc-dev 2017-06-09 20:58:36 +00:00
Selim Cinek
f62145a41a Merge "Fixed a bug where systemui could crash while cloning" into oc-dev
am: b9eb205bd7

Change-Id: I6cd3b23a9adcb20a93b112204154f1e42a7a3c21
2017-06-09 04:30:47 +00:00
Selim Cinek
b9eb205bd7 Merge "Fixed a bug where systemui could crash while cloning" into oc-dev 2017-06-09 04:22:06 +00:00
Siyamed Sinir
484c2e2fbe Force Autofill in FloatingToolbar overflow menu
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
bit CtsWidgetTestCases:android.widget.cts.EditTextTest

Bug: 62271937
Change-Id: Ib3447281f3bd1abc811a25fc55ad55e34e155bbb
2017-06-08 17:16:26 -07:00
Selim Cinek
7f09ce1a23 Fixed a bug where systemui could crash while cloning
Because cloning wasn't synchronized, the notification
could become a non-root temporarily which in turn could
lead to a crash.
1. We're now properly synchronizing the cloning, such that
this can't happen anymore
2. We're now only cloning the old statusbar notification lightly
instead of heavily to avoid this altogether

Test: manual, update decoratedcustomview notifications really fast
Change-Id: Ia6525eec64ad9a26956ca2198e20198f55b2173c
Fixes: 62181033
2017-06-08 13:31:26 -07:00
Andrei Stingaceanu
9a06d4bc77 Merge "Fix unexpected DatePicker validation" into oc-dev
am: cd603221e1

Change-Id: Iaa491c27aebc60be5fe16668dda7904e2b089f54
2017-06-08 14:44:20 +00:00
TreeHugger Robot
cd603221e1 Merge "Fix unexpected DatePicker validation" into oc-dev 2017-06-08 14:36:13 +00:00
Felipe Leme
c14129043f Merge "Don't show AUTOFILL menu when text is selected." into oc-dev am: 49231f183f
am: fc4604f719

Change-Id: I73c6181f7fdd4b2b4c38338c13d9bf439199617f
2017-06-07 00:48:54 +00:00
Andrei Stingaceanu
cf5a420ead Fix unexpected DatePicker validation
Remove throwing an error and instead clamp
the selected date to min/max when changing
ranges.

Bug: 36636681
Test: manually verified that the case in the
      bug does not happen again

Change-Id: If540f58d21375d2320df5215504d4569e5c2be2e
2017-06-06 17:34:42 +01:00
Selim Cinek
5d6ef8de1e Allow inline replying directly from the image
Test: runtest systemui
Fixes: 35853345
Change-Id: Id942392b8de5b24de6f4f5cf335fd7f28e48d49a
2017-06-02 17:13:03 -07:00
Felipe Leme
1c1626ec76 Don't show AUTOFILL menu when text is selected.
Fixes: 62271937
Test: manual verification
Test: existing CtsAutoFillServiceTestCases tests pass

Change-Id: I80902cb38633e41f50044f413b1b86904a60261e
2017-06-02 12:18:29 -07:00
Evan Rosky
a991d9943c Merge "Enabled (asymmetric) tab selection in GridView" into oc-dev am: 3653aed87b
am: f742df0ba1

Change-Id: I2d84da452136d2dda45d0f16034ecd35397179f7
2017-06-02 02:52:44 +00:00
Siyamed Sinir
1ab45ea573 Merge "AutoSize TextView - major fixes" into oc-dev am: b34c9d3a33
am: d549197c90

Change-Id: I605026459c929fc2aa7d82b376ebd059c5b95441
2017-06-02 02:49:26 +00:00
Evan Rosky
3653aed87b Merge "Enabled (asymmetric) tab selection in GridView" into oc-dev 2017-06-02 00:45:17 +00:00
Andrei Stingaceanu
b6eaf5b8ef AutoSize TextView - major fixes
* splits the auto-size setup part from the execution
  function:
** in TextView CTOR we only setup and we leave the
   actual auto-sizing execution to happen in the
   view||text layout  phase
** encapsulated the conditions needed to start
   applying auto-size in the execution function

* introduces a private way to set the text size
  without requesting a new layout pass; auto-size
  always uses this practically setting the text
  size on the paint object and creating a new
  layout

* calls execution autoSizeText() from within
  TextView#checkForRelayout() if not requestLayout()
  is needed => this makes sure that auto-size will be
  performed even if a view layout is not requested,
  but only a text layout

* fixes the calculation of the sizes available for
  auto-size when configured via granularity

Bug: 62050646
Bug: 38409622
Bug: 38440435
Bug: 62109627
Test: run cts --test android.widget.cts.TextViewTest -m \
      CtsWidgetTestCases
Test: manually tested the new behaviors in demo apps
Test: new test attached in topic

Change-Id: I4ccaa0a0afa3b5aa47213442d0029da2c74e7eb4
2017-06-01 15:40:40 +01:00
Anthony Chen
8f5f358f97 Allow progress bar dimensions to be configured.
Added a new dimension for the bottom margin after the notification
content if there is a progress bar. This value is needed to create a
larger space for the progress bar. If it is adjusted to be larger, than
the progress bar will appear to be further away from the notification
content.

Also add dimensions for the progress bar size. This value needs to also
override the max and min heights otherwise the max/min heights would
differ from the layout_height.

Test: booted on phone and Android Auto headunit
Bug: 33210494
Change-Id: I20011b3f79a0d3f81c6317e715d8d2310c5cd87b
2017-05-30 10:39:57 -07:00
Siyamed Sinir
42b2760525 Merge "Don’t try to autoSize if TextView is not measured" into oc-dev 2017-05-27 00:13:39 +00:00
TreeHugger Robot
759669988b Merge changes from topic 'highlight_fixed' into oc-dev
* changes:
  Check default focus highlight for ImageView.
  Check state_focus in foreground.
2017-05-27 00:11:10 +00:00
Sergey Vasilinets
bacaffa497 Merge "Don't show ripple effect on the element replacing "See All"" into oc-dev 2017-05-26 22:11:27 +00:00
Jiaquan He
1dd48d0b8f Check default focus highlight for ImageView.
This commit specially checks isDefaultFocusHighlightNeeded for
ImageView. We should also check with the content drawable of the
ImageView besides its foreground or background.

Bug: 62141891
Test: cts-tradefed run singleCommand cts --skip-device-info
--skip-preconditions --abi armeabi-v7a -m CtsViewTestCases -t
android.view.cts.View_DefaultFocusHighlightTest#testIsDefaultFocusHighlightNeeded

Change-Id: Iaf12a5863d7760d9361d0196a46de07a9ccda74e
2017-05-26 14:31:29 -07:00
Siyamed Sinir
cfc79a9e5f Don’t try to autoSize if TextView is not measured
This CL early returns from auto sizing text if the view is not measured
yet.

Test: run cts --test android.widget.cts.TextViewTest -m CtsWidgetTestCases
Test: Added cts.TextViewTest#testAutosizeWithMaxLines_shouldNotThrowException
Test: Manual test with sample app for the failing case.

Bug: 38440435
Change-Id: Ic03c991f33a2b7701623f00f44cba7fb6cdfce46
2017-05-26 12:00:51 -07:00
TreeHugger Robot
58f6f428fc Merge "SelectionActionModeHelper should use target view's thread" into oc-dev 2017-05-26 00:45:42 +00:00
sergeyv
e471a4e0f7 Don't show ripple effect on the element replacing "See All"
bug: 30247194
Test: manual
Change-Id: Icbe5baba62df7b2a107ecc00d52119cb557d3a6b
2017-05-25 15:49:40 -07:00