am 1482b053: Merge "Update QS tile states after unlocking" into lmp-mr1-dev

* commit '1482b0535e1708fbf9914946abe59c36f39633e7':
  Update QS tile states after unlocking
This commit is contained in:
Jorim Jaggi
2014-11-04 14:37:38 +00:00
committed by Android Git Automerger
3 changed files with 10 additions and 2 deletions

View File

@@ -203,7 +203,7 @@ public class QSPanel extends ViewGroup {
} }
} }
private void refreshAllTiles() { public void refreshAllTiles() {
for (TileRecord r : mRecords) { for (TileRecord r : mRecords) {
r.tile.refreshState(); r.tile.refreshState();
} }

View File

@@ -3600,6 +3600,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
instantCollapseNotificationPanel(); instantCollapseNotificationPanel();
} }
updateKeyguardState(staying, false /* fromShadeLocked */); updateKeyguardState(staying, false /* fromShadeLocked */);
// Keyguard state has changed, but QS is not listening anymore. Make sure to update the tile
// visibilities so next time we open the panel we know the correct height already.
if (mQSPanel != null) {
mQSPanel.refreshAllTiles();
}
return staying; return staying;
} }

View File

@@ -21,6 +21,7 @@ import android.content.Intent;
import android.content.res.Resources; import android.content.res.Resources;
import android.database.ContentObserver; import android.database.ContentObserver;
import android.net.Uri; import android.net.Uri;
import android.os.Process;
import android.os.Handler; import android.os.Handler;
import android.os.HandlerThread; import android.os.HandlerThread;
import android.os.Looper; import android.os.Looper;
@@ -108,7 +109,8 @@ public class QSTileHost implements QSTile.Host {
mKeyguard = keyguard; mKeyguard = keyguard;
mSecurity = security; mSecurity = security;
final HandlerThread ht = new HandlerThread(QSTileHost.class.getSimpleName()); final HandlerThread ht = new HandlerThread(QSTileHost.class.getSimpleName(),
Process.THREAD_PRIORITY_BACKGROUND);
ht.start(); ht.start();
mLooper = ht.getLooper(); mLooper = ht.getLooper();