Settings: Bump SettingsSearch db version.

Change-Id: I0ba3be71f61fcae9c2fe67064b5f890fdd0abb2c
DisplayColor: Properly handle a minValue

* Previously setting anything as a minValue would cause the
  percentages to get out of whack. For instance, setting it to 35
  would cause the maximum percentage to climb above 100% as well
  as still allowing the value to be set lower than the min.
* This makes the maximum for the slider the max value minus the min
  (so we get the proper spread for min to max) and then adds the min
  back on before setting so we can't possibly go below the min.

Change-Id: I8dcdc422f54847940351fae10c74af6301d1e1be
Revert "Improve search performance."

This reverts commit d1a1d430d8743f20142349e20e70689306c45aef.
Highlight search string match.

Change-Id: I72c0380512028674c91f287325f221a686a4821d
Improve search performance.

The normalization regex is slow (5-10ms per entry on mako), so better
pre-cache it. Also cache the icons, as the number of icons is vastly
smaller than the number of potential search results, so they'll be
reused very often.

The regex change alone brings the duration of a single filter run down
to ~20ms from ~1200ms on mako.

Change-Id: Ia0fa9c554d0d585a52c8a2b87eecbf045388c961
Improve search UX prior to load being finished.

Show a informative hint in that case.
Also clean up code somewhat.

Change-Id: I57f37bc60fbaef2ea0db0b0c3227df125b0e4ab9
Check locale when populating DB instead of using separate receiver.

This makes reloading the search data race condition free. Previously,
when invoking search directly after the locale change, one would get the
results for the old or the new locale depending on timing between the
broadcast being delivered and the activity restart.

Change-Id: I35bc11a7f68e655e00fe53b829deea613da74f69
Settings: For the sake of search, don't split security settings.

    - There's also no good reason for having separate xml's for these.

Change-Id: I0216a2be10b801769eef7783f6c52a2b18b06aef
Settings: Remove security preferences from lockscreen options.

    - Since we merged all security xml's, the container is now populated
    with preferences that we don't need within lockscreen security options.
    This patch removes the preferences.

Change-Id: I590df9293f293aa9048ce4c58813f449d88867b4
Settings : Add tap/pay help url

Change-Id: I41f37dff0fa2eb547f84aaf776950f0f42e6e36f
Settings: LT translations

Typos fixed, other small corrections.

Change-Id: I058905c5e833cf1dfd3d35353bafb17fedd2ac2e
Settings: Update strings

Change-Id: Ia48ea0db5fe590f90d69114c0e1acddb5f9ab21a
Settings: update default expanded desktop style

Change-Id: I6deb3bdf9a4099c67a63c4afb7909eff24ec574b
Signed-off-by: Roman Birg <roman@cyngn.com>
Settings: persist double tap to wake state

After disabling double tap to wake and rebooting, the state would be
persisted in the device, but it would display incorrect checkbox state.

Fixes JIRA bug BACON-92

Change-Id: Ie99e59872778dcdc3028e1770d97507fd831f515
Signed-off-by: Roman Birg <roman@cyngn.com>
(cherry picked from commit a86af288fbb840042cba372c4cd32026325fb5ac)
Automatic translation import

Change-Id: I174cb4b02fa7fd9730c080d8224b04df53627b50
Settings: Modify AOSP JA translation

Only revision.

Change-Id: Ieaed602f879acaa54dc77fe501b3cef8b72ef2ce
settings: properly count preferences in group

When the first preference in a settings preference fragment is a caterory, this method cannot
find the first preference of the group, returning an incorrect position.
xe: Lockscreen Settings -> Screen settings

Reason for that is that there's no way to differentiate 0 from -0. Fix
that by avoiding overloading integer semantics and clearly splitting the
result count from the 'was stopAt found' flag.

Change-Id: I68cfde27b9860246b1cc3671dfb35320c4ff3ea8
settings: prevent multiple highlights in settings search

xe: Developer Options -> Launch Tools. The Process Stats is highlighted along
with Launch Tools, because the view of the latter is reused for the former and the
latter later gets a new view. Fix that by making sure to cancel old
highlights when triggering a new one.

Change-Id: Ibf2068628e5024d61495d4f9968811c77e120918
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Apply match spans synchronously to avoid a race condition

Using the match start/end positions from both the main thread (when
updating UI) and the filter thread (when the filter constraint changed)
at the same time can lead into exceptions. Make sure to update the positions used by
the UI thread only from there.

07-11 03:26:18.845: E/AndroidRuntime(12765): Process: com.android.settings, PID: 12765
07-11 03:26:18.845: E/AndroidRuntime(12765): java.lang.IndexOutOfBoundsException: setSpan (-1 ... -1) starts before 0
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1021)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:592)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:588)
07-11 03:26:18.845: E/AndroidRuntime(12765): at com.android.settings.search.SettingsSearchFilterAdapter.getView(SettingsSearchFilterAdapter.java:216)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.widget.AbsListView.obtainView(AbsListView.java:2255)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.widget.ListPopupWindow.obtainView(ListPopupWindow.java:1585)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.widget.ListView.measureHeightOfChildren(ListView.java:1263)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.widget.ListPopupWindow.buildDropDown(ListPopupWindow.java:1167)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.widget.ListPopupWindow.show(ListPopupWindow.java:554)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.widget.AutoCompleteTextView.showDropDown(AutoCompleteTextView.java:1096)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.widget.AutoCompleteTextView.updateDropDownForFilter(AutoCompleteTextView.java:971)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.widget.AutoCompleteTextView.access00(AutoCompleteTextView.java:91)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.widget.AutoCompleteTextView.run(AutoCompleteTextView.java:1268)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.os.Handler.handleCallback(Handler.java:733)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.os.Handler.dispatchMessage(Handler.java:95)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.os.Looper.loop(Looper.java:136)
07-11 03:26:18.845: E/AndroidRuntime(12765): at android.app.ActivityThread.main(ActivityThread.java:5140)
07-11 03:26:18.845: E/AndroidRuntime(12765): at java.lang.reflect.Method.invokeNative(Native Method)
07-11 03:26:18.845: E/AndroidRuntime(12765): at java.lang.reflect.Method.invoke(Method.java:515)
07-11 03:26:18.845: E/AndroidRuntime(12765): at com.android.internal.os.ZygoteInit.run(ZygoteInit.java:795)
07-11 03:26:18.845: E/AndroidRuntime(12765): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
07-11 03:26:18.845: E/AndroidRuntime(12765): at dalvik.system.NativeStart.main(Native Method)

Change-Id: I60cff301d3bfb15ea2bbf63fcae524af0ae0b8a6
Settings: Always show search on multipane devices.

    - Disable in more fragments for clean up.

Change-Id: Ia82f89ca8394e9d3dcf7dc80d2dfccdbe6fa9bc7