Skip to content

Commit 39de2b0

Browse files
Jim MillerAndroid (Google) Code Review
authored andcommitted
Merge "Music in keyguard improvements - fix overscroll issue with workaround described in bug 7137941 - ignore noisy signals from music player that sometimes hide it" into jb-mr1-dev
2 parents 4be2975 + 6fba0a0 commit 39de2b0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

core/res/res/layout/keyguard_transport_control_view.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
android:layout_width="wrap_content"
2121
android:layout_height="wrap_content"
2222
android:gravity="center_horizontal"
23+
android:layerType="hardware"
2324
android:id="@+id/keyguard_transport_control">
2425

2526
<!-- FrameLayout used as scrim to show between album art and buttons -->

policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,11 @@ protected void onFinishInflate() {
142142
(KeyguardTransportControlView) findViewById(R.id.keyguard_transport_control);
143143
if (mTransportControl != null) {
144144
mTransportControl.setKeyguardCallback(new TransportCallback() {
145+
boolean mSticky = false;
145146
@Override
146147
public void hide() {
147148
int page = getWidgetPosition(R.id.keyguard_transport_control);
148-
if (page != -1) {
149+
if (page != -1 && !mSticky) {
149150
if (page == mAppWidgetContainer.getCurrentPage()) {
150151
// Switch back to clock view if music was showing.
151152
mAppWidgetContainer
@@ -166,6 +167,8 @@ public void show() {
166167
mAppWidgetContainer.addView(mTransportControl,
167168
getWidgetPosition(R.id.keyguard_status_view) + 1);
168169
mTransportControl.setVisibility(View.VISIBLE);
170+
// Once shown, leave it showing
171+
mSticky = true;
169172
}
170173
}
171174
});

0 commit comments

Comments
 (0)