Improve scan time for some cases

When the path being matched has a sqlite wildcard character in it, a "like"
match will be quite slow. Unfortunately this is fairly common, since "_"
is a wildcard character. However, because in most cases the case of the path
in the database will match the case on disk, an "=" match will work, so it
is worthwhile to try an "=" match first, before trying a "like".

If there are no wildcard characters, the "like" will be as fast as the "=",
because of the case-insensitive index on the _data column, so there is no
need to try "=" first in that case.

b/6751354

Change-Id: I1cd4efbd56a37886cb44a86acb73eb9a3c9f303d
WiredAccessoryObserver: Headset detection for sony msm7x27a

Sony's headset driver uses the nonstandard headset_sensor switch
while other drivers (eg power button driver) still use the h2w
switch, so simply renaming back to h2w is not simple. This looks
for the headset_sensor switch, and if it's not present falls
back to the standard h2w switch.

Change-Id: Ibfd39edf80e2e3a2f4c084960908d1e24808df54
Merge "Improve scan time for some cases" into jellybean
Merge "WiredAccessoryObserver: Headset detection for sony msm7x27a" into jellybean
Fix mdpi layout issues on statusbar

This fix some layout issues on the header of statusbar that makes the data to not show properly when clear button is there, so add specific mdpi layout to fix them.

Before: goo.gl/r0BZa
After: goo.gl/AU4mC

Change-Id: I24eacbdeb4db7ca0839648540b0b480903906d0d
Merge remote-tracking branch 'cm-orig/jellybean' into jellybean