Commit Graph

5242 Commits

Author SHA1 Message Date
Elliott Hughes
d14f7f12a1 am 095428d2: am d15958f6: am 64c8a073: Merge "Early return in RemoteViewsAdapter is too late"
* commit '095428d262f1cb0cf09d8722fdd9a53661d7513b':
  Early return in RemoteViewsAdapter is too late
2015-04-02 02:58:34 +00:00
Alan Viverette
0048b6e629 Merge "Scale month view for small screens, use verbatim span for AM/PM label" 2015-04-02 02:51:24 +00:00
Elliott Hughes
d15958f661 am 64c8a073: Merge "Early return in RemoteViewsAdapter is too late"
* commit '64c8a07345cb7cb01b3e98442b52c51d473fbf2d':
  Early return in RemoteViewsAdapter is too late
2015-04-02 01:13:09 +00:00
Alan Viverette
f63757b7a6 Scale month view for small screens, use verbatim span for AM/PM label
Also fixes initial day selection in DatePickerDialog.

Bug: 19933912
Bug: 19937345
Change-Id: I88264a192c087361dbf21b055e74e1facf2506bc
2015-04-01 17:14:45 -07:00
Elliott Hughes
64c8a07345 Merge "Early return in RemoteViewsAdapter is too late" 2015-04-01 23:34:25 +00:00
Raph Levien
39b4db73c3 Add breakStrategy attribute to TextView
This patch adds plumbing to TextView to control the strategy used
for breaking paragraphs into lines.

The default for TextView is "quality", while the default for EditText
is "simple", largely to avoid too much re-layout when editing.

StaticLayout now has a builder which provides access to more
functionality and is also cleaner than the old mechanism of having
lots of constructors with varying numbers of arguments. This patch
changes TextView to use that builder, and also contains cleanups
of the Builder within StaticLayout.

Change-Id: Iee3cf3a05a3e51ba0834554e4a3ec606e9cabca5
2015-04-01 11:01:41 -07:00
Clara Bayarri
7fc946eb5d Editor: Fix crash when selecting text on a non-editable TextView
We are querying the insertion controller, which is null on a
non-editable TextView.

Change-Id: Ie8428c6264385a1283310823c959ecdd63ef5a3f
2015-03-31 15:13:06 +01:00
Clara Bayarri
ea4f150c38 Editor: Provide the selection content rect to ActionMode.Callback2
This is necessary for the positioning of the floating toolbar.

Change-Id: I790c1f011a7e90c5e315aad77e96569b26b553af
2015-03-31 12:31:50 +01:00
Clara Bayarri
80d4bd84ed Merge "Editor: Reorder items in the text selection action mode." 2015-03-31 10:38:06 +00:00
Raph Levien
26d443aee4 Revert "Fix build: Revert "Record hyphens from Minikin and draw them""
This reverts commit 5a6eeb3cbe and
fixes the underlying issue (needed to @hide getHyphen() for subclasses
of Layout, not just the base class), and layoutlib changes for
checkbuild.

Change-Id: I7a2b5f20ae014ea8e224d8c4079cf9131e17e1c1
2015-03-30 15:13:50 -07:00
Alan Viverette
6199bffef2 Merge "Deprecate AnalogClock widget, Integer methods on TimePickerView" 2015-03-30 19:37:43 +00:00
Alan Viverette
60b674e07b Clean up date picker attributes, add carets
Bug: 19819283
Bug: 19431364
Change-Id: Idd66f4ceb99d598c0f256d85c43bff6e25ccdd8f
2015-03-30 12:15:25 -07:00
Alan Viverette
523fe91af4 Merge "Clean up time picker attributes and drawing code" 2015-03-30 17:27:03 +00:00
Clara Bayarri
ed2e391454 Editor: Reorder items in the text selection action mode.
Reorder elements to place "Select All" last, as otherwise when
we use a floating toolbar the first element is "Select All" and
takes up too much space, forcing Copy and Paste to the overflow.

Change-Id: I04cdd79915bd2a3abbd10969ce298b7b0f7f8cb0
2015-03-30 14:41:43 +01:00
Clara Bayarri
dff34599c2 Merge "Editor: Cleanup the unused ActionPopupWindow" 2015-03-30 08:59:11 +00:00
James Cook
ccce81cf44 Merge "Fix undo of text pasted into TextView with TextWatcher" 2015-03-26 17:15:31 +00:00
Alan Viverette
527b45376a am 3a79e434: am a0d3d003: am 5fc9b336: Merge "Consider RTL layout in DPAD navigation in Gallery"
* commit '3a79e434a6e840f47a47387743385a2cd5faab54':
  Consider RTL layout in DPAD navigation in Gallery
2015-03-25 21:08:51 +00:00
James Cook
2205425b94 Fix undo of text pasted into TextView with TextWatcher
Pasted text is directly inserted into the TextView buffer, so it looks
like a programmatic insert to the undo system. This is fine, but we
need to be sure that subsequent modification by a TextWatcher (for
example, to add spaces to a credit card number) is merged into the same
undo operation -- from the user's perspective, pasting in the text and
having spaces inserted are a single operation.

Also clean up mForceMerge flag in EditOperation -- we don't need to
store it across edits, just use it when a new edit comes in.

CTS test to follow.

Bug: 19332904
Change-Id: I7b3c97c08b83faebeab9f1708b0d6eac6d151d50
2015-03-25 14:04:01 -07:00
Alan Viverette
a0d3d003c8 am 5fc9b336: Merge "Consider RTL layout in DPAD navigation in Gallery"
* commit '5fc9b336ebb6fc224b3e77af388024dea029fbb3':
  Consider RTL layout in DPAD navigation in Gallery
2015-03-25 20:18:37 +00:00
Alan Viverette
f2525f6802 Clean up time picker attributes and drawing code
Change-Id: I16283d666f49885855a5f9bb3781cea07af058fd
2015-03-24 18:03:38 -07:00
Adam Powell
2b25e2eee0 Move foreground drawable down from FrameLayout into View
This will allow any View to include foreground drawables. This is
useful for cases where a foreground drawable is a more appropriate
place to put a state list to show focus or touch highlighting.

Also add View#onDrawForeground as a public API hook for drawing
decorations after primary view content and child views such as
scrollbars, foreground drawables and EdgeEffects.

Change-Id: If1e4700af69db6876970f8f4ad5e3eab11b8034c
2015-03-24 16:19:20 -07:00
Mady Mellor
a2e207a807 Merge "Text selection - Don't select vertical white space" 2015-03-24 20:16:29 +00:00
Clara Bayarri
08fe918753 Editor: Cleanup the unused ActionPopupWindow
This is unused since we removed the paste popup

Change-Id: Id609d43a9f9f9bc31b2f40286ca1fe88773ad1dd
2015-03-24 16:01:02 +00:00
Svetoslav
c6d1c345f4 Runtime permissions: per user permission tracking.
Before all permissions were granted at install time at once, so the user
was persented with an all or nothing choice. In the new runtime permissions
model all dangarous permissions (nomal are always granted and signature
one are granted if signatures match) are not granted at install time and
the app can request them as necessary at runtime.

Before, all granted permission to an app were identical for all users as
granting is performed at install time. However, the new runtime model
allows the same app running under two different users to have different
runtime permission grants. This change refactors the permissions book
keeping in the package manager to enable per user permission tracking.

The change also adds the app facing APIs for requesting runtime permissions.

Change-Id: Icbf2fc2ced15c42ca206c335996206bd1a4a4be5
2015-03-23 18:50:35 -07:00
Alan Viverette
835d798606 Docs nit
Change-Id: I390997826db6997f843cafc4136633937e185e82
2015-03-23 14:54:35 -07:00
Alan Viverette
167fa2fdb7 Merge "Clean up date picker" 2015-03-23 21:36:08 +00:00
Alan Viverette
452fe34984 Clean up date picker
Bug: 19758502
Change-Id: I11ed62245d15d155335f5652000b9dc81185e2f9
2015-03-23 14:26:09 -07:00
Alan Viverette
53796737eb Merge "Fix default width and height for PopupWindow's decor view" 2015-03-23 20:54:43 +00:00
Alan Viverette
0ef59ac0e5 Update DatePicker and CalendarView to latest Material spec
Bug: 19431364
Change-Id: If364a051a5208d170495de4182e46b32c7560e08
2015-03-23 13:13:25 -07:00
Mady Mellor
b9bbbb1d97 Text selection - Don't select vertical white space
This alters text selection so that you won't select a
whitespace line above or below your selection unless you select
a non-whitespace character past the line.

Change-Id: Ic93f77f6ccecb06be2acc83524ca9e9a627660ce
2015-03-23 11:50:46 -07:00
Alan Viverette
2a16460c7c Merge "Fix radial time picker for Explore by Touch and scroll actions" 2015-03-23 17:35:40 +00:00
Alan Viverette
4a6bd692d2 Fix radial time picker for Explore by Touch and scroll actions
Bug: 19889521
Change-Id: I4fa6b9e0459630ecdb4144f4640213415247735a
2015-03-23 10:34:23 -07:00
Alan Viverette
259c284069 Fix default width and height for PopupWindow's decor view
Fixes a regression whereby failing to explicitly set a width and height
would cause the popup window's decor view to be 0 width and height.

Also deprecates unnecessary method for setting window width and
height spec and replaces with less-confusing setters.

Cleans up javadoc for modified methods.

Bug: 19538371
Change-Id: I20da3ff02ad12e99adf14c056edd1a890b5c322a
2015-03-22 17:39:39 -07:00
Johan Redestig
f989a412f0 Consider RTL layout in DPAD navigation in Gallery
Since the Gallery view changes direction the key events LEFT and
RIGHT should swap actions.

Change-Id: Iaeb9cce83e138f315f12ea188de142e67a60d574
2015-03-20 18:30:45 +00:00
Vladislav Kaznacheev
fca29e7d49 Merge "Start respecting View.DRAG_FLAG_GLOBAL flag." 2015-03-20 00:15:43 +00:00
Alan Viverette
eef3bcbbe4 Merge "Replace usages of deprecated Resources.getColor() and getColorStateList()" 2015-03-19 01:54:09 +00:00
Alan Viverette
4a357cd2e5 Replace usages of deprecated Resources.getColor() and getColorStateList()
Change-Id: I8f64fe6c4c44a92ff6d07250223ba590a1d691b0
2015-03-18 18:37:18 -07:00
Clara Bayarri
6820434edd Merge "Editor: Avoid the paste popup from coming up when a word is selected." 2015-03-19 00:04:37 +00:00
Andreas Gampe
870c4ba78a am 1eca7d66: am 2a247b36: Merge "Frameworks/base: Fix visibility flag in Editor"
* commit '1eca7d66ee3da87c622259544794b8fe998cdb92':
  Frameworks/base: Fix visibility flag in Editor
2015-03-18 23:50:35 +00:00
Vladislav Kaznacheev
c3debf29d6 Start respecting View.DRAG_FLAG_GLOBAL flag.
Respect flags passed to startDrag (they used to be ignored).
Allow global drag&drop for text views.

Bug: 19548858
Change-Id: I981cfd617ebc6f5f2d59ebded798c22dc4920d38
2015-03-18 16:32:21 -07:00
Clara Bayarri
6351e66014 Editor: Avoid the paste popup from coming up when a word is selected.
The existing code already fires the selection action mode, which
contains all the elements from the popup.

This is the last case remaining in which the popup is used, so also
clean up all popup related code.

Change-Id: I68b8b7bc8076279371955265b0088bfa0c22760b
2015-03-18 23:05:35 +00:00
Clara Bayarri
10ff56ec6d Merge "Editor: Make the Insertion handle start/finish the selection action mode on tap." 2015-03-18 23:02:58 +00:00
Clara Bayarri
452fa75207 Editor: Make the Insertion handle start/finish the selection action mode on tap.
The Insertion handle used to show/hide the paste popup, not that we are
unifying it with the selection action mode it should start/finish the mode.

There are no other use cases of the popup with the insertion handle, so that
code is cleaned up.

Change-Id: I40703bc8316f217edaf97aff72436935de60500c
2015-03-18 22:41:39 +00:00
Andreas Gampe
1eca7d66ee am 2a247b36: Merge "Frameworks/base: Fix visibility flag in Editor"
* commit '2a247b361089c0744202b604e22f9a79d239b92c':
  Frameworks/base: Fix visibility flag in Editor
2015-03-18 22:33:09 +00:00
James Cook
f2560e62cf Merge "Improve undo support for text entered with IME" 2015-03-18 21:39:03 +00:00
Chris Craik
43c410eaac Merge "Remove HardwareCanvas" 2015-03-18 21:36:56 +00:00
James Cook
d202668670 Improve undo support for text entered with IME
Use span properties to detect:
* Composing text - don't record undo operations
* Completing a composition - record an insert undo operation
* Canceling a composition - don't record

Save the composition state on parcel/unparcel.

Stop using begin/end batch edit to try to detect when a TextWatcher
is modifying the text. IMEs trigger multiple InputFilter passes in
a single batch edit. Use SpannableStringBuilder to determine when
we're in a TextWatcher callback because it is the authority on that
state.

Fix a bug in undo manager where it doesn't forget undos correctly if
there are more than one in the stack.

Bug: 19332904
Change-Id: Iaa9b0b2a7bf6683302cc85e7616e5d5fcc9fa202
2015-03-18 14:36:41 -07:00
Alan Viverette
646a0f8e0d Deprecate AnalogClock widget, Integer methods on TimePickerView
Bug: 19754178
Change-Id: Ic51c40995ce841040d745070243e483d4d97ce5c
2015-03-18 13:24:07 -07:00
Clara Bayarri
532c8e9b35 Merge "Editor: Fire the selection Action Mode when long pressing on an empty space" 2015-03-18 20:21:08 +00:00
Alan Viverette
8c9d897534 Merge "Remove unnecessary null check in FastScroller" 2015-03-18 19:36:53 +00:00