Always call out to KeyguardHostView when something in our state changes.

KeyguardHostView already takes care to not add or remove the transport
control twice.
This should hopefully fix some conditions where the transport control
was still being shown although the media player already abandoned audio
focus.

Change-Id: Ib4577cdbfcea0a89efbbd0df70646afe8e677e0d
Fix occasionally flickering music control widget.

The problem was seemingly related to the player abandoning audio focus
while the playback state was still set to 'playing'. In that case, the
transport control was removed from the keyguard host because it had no
listener anymore, but later was re-added due to isMusicPlaying() still
returning true. Re-adding it lead to it re-registering with audio
service, which cleared the display due to nothing being connected, which
lead to the detachment listener being called again, which in turned
closed the loop.

While this may be a sign of a buggy player app (it should stop its
playback prior to abandoning audio focus), this situation still should
be handled gracefully. Fix the problem by simply reporting no music
being played while no remote control client is connected.

Change-Id: Id6834d38bc6faa3b6455ac66b413443f85606785
Avoid IllegalArgumentException in Preference.java compareTo()

In some situations the collection.sort() algoritm fails in compareTo()
with a: java.lang.IllegalArgumentException: Comparison method violates
its general contract!, due to a more strict validation of the compare
contract.
This strict validation was introduced in java 1.7.
See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6804124
This fix should prevent the sorting from crashing.

Change-Id: I64230e7f62f83c99d7a6274964bb2988ae843826
Expose PreferenceManager constructor / Preference#performClick

Expose PreferenceManager constructor and Preference#performClick so they can be
used by other UIs beyond the standard PreferenceActivity. Marked @hide so public
API is not affected.

Change-Id: Ieb4aecba5f86e40ff70f2b252458602e6b9ad1ee
make lockscreen rotation optionable

Change-Id: Idece27bc7348ad42d3ac2c5e2a2c606013c225f8