Clean up protected apps code (1/2)

- Work with actual ComponentNames instead of converting them between
  String and ComponentName all the time
- Name protection state parameter in methods 'state' instead of
  'protect', as a value of true actually means it's not protected. Also
  consistently use the respective constants for its values.
- Some misc. cleanup

Change-Id: I2855978c8aef3cfa14249e3398039c7cdd145ede
Settings: Don't match action bar parent for search on tablets.

Also adjust IME flags to
a) show the search icon as action key and
b) to not appear fullscreen in landscape

Change-Id: I9bc9851d39aa4d6dbed40df63dd4ea8df6f4c3f9
Settings : Scroll to preference on search and highlight

Change-Id: I93c4106d022b416205cc33cf5dbdf5d7635a002a
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
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
Settings: Disable search item in some fragments.

Change-Id: I17ed6945f34f2fe7bb18674124f8a8989145b8c1
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

Conflicts:
	AndroidManifest.xml
Settings : Add tap/pay help url

Change-Id: I41f37dff0fa2eb547f84aaf776950f0f42e6e36f
Settings: LT translations

Typos fixed, other small corrections.

Change-Id: I058905c5e833cf1dfd3d35353bafb17fedd2ac2e
Settings: Update strings
Hover switch (2/2)

Inspired from @Der-Schubi stuff

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

Change-Id: I6deb3bdf9a4099c67a63c4afb7909eff24ec574b
Signed-off-by: Roman Birg <roman@cyngn.com>
[2/2] SystemUI: Add time-context headers to the notification header

Based on this commit: https://github.com/omnirom/android_packages_apps_OmniGears/commit/e24175e99602adb52d079fd882386fc274653f91
Credit to @xplodwild

Change-Id: Ic0b2d8bd20868936ebecf5ee15e245d101699019
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>
Automatic translation import

Change-Id: I174cb4b02fa7fd9730c080d8224b04df53627b50

Conflicts:
	res/values-ar/cm_arrays.xml
	res/values-de/cm_arrays.xml
	res/values-el/cm_arrays.xml
	res/values-in/cm_arrays.xml
	res/values-iw/cm_arrays.xml
	res/values-ja/cm_arrays.xml
	res/values-nb/cm_arrays.xml
	res/values-si/cm_arrays.xml
	res/values-sr/cm_arrays.xml
	res/values-th/cm_strings.xml
	res/values-tr/cm_arrays.xml
	res/values-uk/cm_arrays.xml
	res/values-zh-rCN/cm_arrays.xml
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