summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java5
-rw-r--r--packages/SystemUI/res/drawable-hdpi/ic_qs_default_user.pngbin5533 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/ic_qs_default_user.pngbin3699 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/ic_qs_default_user.pngbin7546 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-xxhdpi/ic_qs_default_user.pngbin7494 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable/ic_account_circle.xml28
-rw-r--r--packages/SystemUI/res/drawable/notification_header_bg.xml2
-rw-r--r--packages/SystemUI/res/drawable/qs_panel_background.xml13
-rw-r--r--packages/SystemUI/res/layout/qs_panel.xml5
-rw-r--r--packages/SystemUI/res/layout/status_bar_expanded.xml6
-rw-r--r--packages/SystemUI/res/layout/status_bar_expanded_header.xml4
-rw-r--r--packages/SystemUI/res/values/dimens.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java75
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ObservableScrollView.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java35
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoController.java2
20 files changed, 145 insertions, 60 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java
index a9206e7..48b7be9 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java
@@ -237,11 +237,6 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa
if (DEBUG) Log.d(TAG, "screen on, instance " + Integer.toHexString(hashCode()));
mSecurityContainer.showPrimarySecurityScreen(false);
mSecurityContainer.onResume(KeyguardSecurityView.SCREEN_ON);
-
- // This is a an attempt to fix bug 7137389 where the device comes back on but the entire
- // layout is blank but forcing a layout causes it to reappear (e.g. with with
- // hierarchyviewer).
- requestLayout();
requestFocus();
}
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_default_user.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_default_user.png
deleted file mode 100644
index 18257e0..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_qs_default_user.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_default_user.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_default_user.png
deleted file mode 100644
index a35c30d..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_qs_default_user.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_default_user.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_default_user.png
deleted file mode 100644
index d14a67f..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_default_user.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_default_user.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_default_user.png
deleted file mode 100644
index 07f16c3..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_default_user.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_account_circle.xml b/packages/SystemUI/res/drawable/ic_account_circle.xml
new file mode 100644
index 0000000..a7e8514
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_account_circle.xml
@@ -0,0 +1,28 @@
+<!--
+Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android" >
+ <size
+ android:width="24dp"
+ android:height="24dp"/>
+
+ <viewport
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0"/>
+
+ <path
+ android:fill="#FFFFFFFF"
+ android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,5.0c1.7,0.0 3.0,1.3 3.0,3.0c0.0,1.7 -1.3,3.0 -3.0,3.0c-1.7,0.0 -3.0,-1.3 -3.0,-3.0C9.0,6.3 10.3,5.0 12.0,5.0zM12.0,19.2c-2.5,0.0 -4.7,-1.3 -6.0,-3.2c0.0,-2.0 4.0,-3.1 6.0,-3.1c2.0,0.0 6.0,1.1 6.0,3.1C16.7,17.9 14.5,19.2 12.0,19.2z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/notification_header_bg.xml b/packages/SystemUI/res/drawable/notification_header_bg.xml
index 09d0d7d..5daec20 100644
--- a/packages/SystemUI/res/drawable/notification_header_bg.xml
+++ b/packages/SystemUI/res/drawable/notification_header_bg.xml
@@ -19,13 +19,11 @@
<item android:state_pressed="true">
<shape>
<solid android:color="@color/background_color_1_press" />
- <corners android:radius="@*android:dimen/notification_quantum_rounded_rect_radius" />
</shape>
</item>
<item>
<shape>
<solid android:color="@color/background_color_1" />
- <corners android:radius="@*android:dimen/notification_quantum_rounded_rect_radius" />
</shape>
</item>
</selector> \ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/qs_panel_background.xml b/packages/SystemUI/res/drawable/qs_panel_background.xml
index c324976..a1a5362 100644
--- a/packages/SystemUI/res/drawable/qs_panel_background.xml
+++ b/packages/SystemUI/res/drawable/qs_panel_background.xml
@@ -13,11 +13,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<inset xmlns:android="http://schemas.android.com/apk/res/android"
- android:insetLeft="@dimen/notification_side_padding"
- android:insetRight="@dimen/notification_side_padding">
- <shape>
- <solid android:color="@color/system_primary_color" />
- <corners android:radius="@*android:dimen/notification_quantum_rounded_rect_radius" />
- </shape>
-</inset>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <solid android:color="@color/system_primary_color" />
+ <corners
+ android:radius="@*android:dimen/notification_quantum_rounded_rect_radius"/>
+</shape>
diff --git a/packages/SystemUI/res/layout/qs_panel.xml b/packages/SystemUI/res/layout/qs_panel.xml
index 85de645..398787f 100644
--- a/packages/SystemUI/res/layout/qs_panel.xml
+++ b/packages/SystemUI/res/layout/qs_panel.xml
@@ -16,11 +16,10 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/quick_settings_container"
- android:paddingLeft="@dimen/notification_side_padding"
- android:paddingRight="@dimen/notification_side_padding"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/qs_panel_background" >
+ android:background="@drawable/qs_panel_background"
+ android:elevation="2dp">
<com.android.systemui.qs.QSPanel
android:id="@+id/quick_settings_panel"
android:background="#0000"
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index d683162..cde83bf 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -59,7 +59,6 @@
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:visibility="invisible"
android:scrollbars="none"
android:overScrollMode="never"
android:fillViewport="true">
@@ -71,7 +70,9 @@
layout="@layout/qs_panel"
android:layout_marginTop="@dimen/status_bar_header_height_expanded"
android:layout_width="match_parent"
- android:layout_height="wrap_content"/>
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="@dimen/notification_side_padding"
+ android:layout_marginRight="@dimen/notification_side_padding"/>
<!-- A view to reserve space for the collapsed stack -->
<View
@@ -80,7 +81,6 @@
</LinearLayout>
</com.android.systemui.statusbar.phone.ObservableScrollView>
-
<com.android.systemui.statusbar.stack.NotificationStackScrollLayout
android:id="@+id/notification_stack_scroller"
android:layout_width="match_parent"
diff --git a/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
index 3b43445..dfc3b22 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
@@ -25,7 +25,7 @@
android:paddingStart="@dimen/notification_side_padding"
android:paddingEnd="@dimen/notification_side_padding"
android:baselineAligned="false"
- android:elevation="10dp"
+ android:elevation="4dp"
>
<View
@@ -71,7 +71,7 @@
android:layout_alignParentEnd="true"
android:background="@null"
android:scaleType="centerInside"
- android:padding="6dp"
+ android:padding="8dp"
/>
<ImageButton android:id="@+id/settings_button"
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index e9dcea2..bf0cb68 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -196,6 +196,9 @@
<dimen name="qs_dual_tile_height">109dp</dimen>
<dimen name="qs_dual_tile_padding">12dp</dimen>
+ <!-- How far the expanded QS panel peeks from the header in collapsed state. -->
+ <dimen name="qs_peek_height">8dp</dimen>
+
<!-- used by DessertCase -->
<dimen name="dessert_case_cell_size">192dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java
index a2f8991..a84daef 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java
@@ -103,7 +103,11 @@ public class SpeedBumpView extends ExpandableView implements View.OnClickListene
@Override
public int getIntrinsicHeight() {
- return getActualHeight();
+ if (mCurrentAnimator != null) {
+ // expand animation is running
+ return getActualHeight();
+ }
+ return mIsExpanded ? getHeight() : mCollapsedHeight;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
index 9138867..2fa2a00 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -65,7 +65,6 @@ public class KeyguardBouncer {
// Keyguard. If we need to authenticate, show the bouncer.
if (!mKeyguardView.dismiss()) {
mRoot.setVisibility(View.VISIBLE);
- mKeyguardView.requestFocus();
mKeyguardView.onResume();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 2f2a5df..f5252a3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -21,9 +21,7 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Context;
-import android.graphics.Path;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
@@ -32,7 +30,6 @@ import android.view.ViewTreeObserver;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
-import android.view.animation.PathInterpolator;
import android.widget.LinearLayout;
import com.android.systemui.R;
@@ -50,6 +47,7 @@ public class NotificationPanelView extends PanelView implements
PhoneStatusBar mStatusBar;
private StatusBarHeaderView mHeader;
private View mQsContainer;
+ private View mQsPanel;
private View mKeyguardStatusView;
private ObservableScrollView mScrollView;
private View mStackScrollerContainer;
@@ -68,6 +66,7 @@ public class NotificationPanelView extends PanelView implements
*/
private boolean mIntercepting;
private boolean mQsExpanded;
+ private boolean mKeyguardShowing;
private float mInitialHeightOnTouch;
private float mInitialTouchX;
private float mInitialTouchY;
@@ -77,6 +76,7 @@ public class NotificationPanelView extends PanelView implements
private int mQsMinExpansionHeight;
private int mQsMaxExpansionHeight;
private int mMinStackHeight;
+ private int mQsPeekHeight;
private float mNotificationTranslation;
private int mStackScrollerIntrinsicPadding;
private boolean mQsExpansionEnabled = true;
@@ -121,6 +121,7 @@ public class NotificationPanelView extends PanelView implements
mKeyguardStatusView = findViewById(R.id.keyguard_status_view);
mStackScrollerContainer = findViewById(R.id.notification_container_parent);
mQsContainer = findViewById(R.id.quick_settings_container);
+ mQsPanel = findViewById(R.id.quick_settings_panel);
mScrollView = (ObservableScrollView) findViewById(R.id.scroll_view);
mScrollView.setListener(this);
mNotificationStackScroller = (NotificationStackScrollLayout)
@@ -139,22 +140,21 @@ public class NotificationPanelView extends PanelView implements
mFlingAnimationUtils = new FlingAnimationUtils(getContext(), 0.4f);
mStatusBarMinHeight = getResources().getDimensionPixelSize(
com.android.internal.R.dimen.status_bar_height);
+ mQsPeekHeight = getResources().getDimensionPixelSize(R.dimen.qs_peek_height);
mClockPositionAlgorithm.loadDimens(getResources());
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
- if (!mQsExpanded) {
- positionClockAndNotifications();
- mNotificationStackScroller.setStackHeight(getExpandedHeight());
- }
// Calculate quick setting heights.
- mQsMinExpansionHeight = mHeader.getCollapsedHeight();
+ mQsMinExpansionHeight = mHeader.getCollapsedHeight() + mQsPeekHeight;
mQsMaxExpansionHeight = mHeader.getExpandedHeight() + mQsContainer.getHeight();
- if (mQsExpansionHeight == 0) {
- mQsExpansionHeight = mQsMinExpansionHeight;
+ if (!mQsExpanded) {
+ setQsExpansion(mQsMinExpansionHeight);
+ positionClockAndNotifications();
+ mNotificationStackScroller.setStackHeight(getExpandedHeight());
}
}
@@ -165,7 +165,8 @@ public class NotificationPanelView extends PanelView implements
private void positionClockAndNotifications() {
boolean animateClock = mNotificationStackScroller.isAddOrRemoveAnimationPending();
if (mStatusBar.getBarState() != StatusBarState.KEYGUARD) {
- mStackScrollerIntrinsicPadding = mHeader.getBottom() + mNotificationTopPadding;
+ mStackScrollerIntrinsicPadding = mHeader.getBottom() + mQsPeekHeight
+ + mNotificationTopPadding;
mTopPaddingAdjustment = 0;
} else {
mClockPositionAlgorithm.setup(
@@ -455,29 +456,38 @@ public class NotificationPanelView extends PanelView implements
setQsExpansion(height);
}
- private void expandQs() {
- mHeader.setExpanded(true);
- mNotificationStackScroller.setEnabled(false);
- mScrollView.setVisibility(View.VISIBLE);
- mQsExpanded = true;
+ private void setQsExpanded(boolean expanded) {
+ boolean changed = mQsExpanded != expanded;
+ if (changed) {
+ mQsExpanded = expanded;
+ updateQsState();
+ }
}
- private void collapseQs() {
- mHeader.setExpanded(false);
- mNotificationStackScroller.setEnabled(true);
- mScrollView.setVisibility(View.INVISIBLE);
- mQsExpanded = false;
+ public void setKeyguardShowing(boolean keyguardShowing) {
+ mKeyguardShowing = keyguardShowing;
+ updateQsState();
+ }
+
+ private void updateQsState() {
+ mHeader.setExpanded(mQsExpanded);
+ mNotificationStackScroller.setEnabled(!mQsExpanded);
+ mQsPanel.setVisibility(mQsExpanded ? View.VISIBLE : View.INVISIBLE);
+ mQsContainer.setVisibility(mKeyguardShowing && !mQsExpanded
+ ? View.INVISIBLE
+ : View.VISIBLE);
+ mScrollView.setTouchEnabled(mQsExpanded);
}
private void setQsExpansion(float height) {
height = Math.min(Math.max(height, mQsMinExpansionHeight), mQsMaxExpansionHeight);
if (height > mQsMinExpansionHeight && !mQsExpanded) {
- expandQs();
+ setQsExpanded(true);
} else if (height <= mQsMinExpansionHeight && mQsExpanded) {
- collapseQs();
+ setQsExpanded(false);
}
mQsExpansionHeight = height;
- mHeader.setExpansion(height);
+ mHeader.setExpansion(height - mQsPeekHeight);
setQsTranslation(height);
setQsStackScrollerPadding(height);
mStatusBar.userActivity();
@@ -646,6 +656,23 @@ public class NotificationPanelView extends PanelView implements
}
@Override
+ protected void onOverExpansionChanged(float overExpansion) {
+ float currentOverScroll = mNotificationStackScroller.getCurrentOverScrolledPixels(true);
+ mNotificationStackScroller.setOverScrolledPixels(currentOverScroll + overExpansion
+ - mOverExpansion, true /* onTop */, false /* animate */);
+ super.onOverExpansionChanged(overExpansion);
+ }
+
+ @Override
+ protected void onTrackingStopped() {
+ super.onTrackingStopped();
+ mOverExpansion = 0.0f;
+ mNotificationStackScroller.setOverScrolledPixels(0.0f, true /* onTop */,
+ true /* animate */);
+ }
+
+
+ @Override
public void onHeightChanged(ExpandableView view) {
requestPanelHeightUpdate();
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ObservableScrollView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ObservableScrollView.java
index c4e61d0..ea5b309 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ObservableScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ObservableScrollView.java
@@ -30,6 +30,7 @@ public class ObservableScrollView extends ScrollView {
private Listener mListener;
private int mLastOverscrollAmount;
private boolean mDispatchingTouchEvent;
+ private boolean mTouchEnabled = true;
public ObservableScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -39,6 +40,10 @@ public class ObservableScrollView extends ScrollView {
mListener = listener;
}
+ public void setTouchEnabled(boolean touchEnabled) {
+ mTouchEnabled = touchEnabled;
+ }
+
public boolean isScrolledToBottom() {
return getScrollY() == getMaxScrollY();
}
@@ -59,6 +64,9 @@ public class ObservableScrollView extends ScrollView {
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
+ if (!mTouchEnabled) {
+ return false;
+ }
mDispatchingTouchEvent = true;
boolean result = super.dispatchTouchEvent(ev);
mDispatchingTouchEvent = false;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 8631e3a..7c1f2cf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -38,6 +38,7 @@ import java.io.PrintWriter;
public class PanelView extends FrameLayout {
public static final boolean DEBUG = PanelBar.DEBUG;
public static final String TAG = PanelView.class.getSimpleName();
+ protected float mOverExpansion;
private final void logf(String fmt, Object... args) {
Log.v(TAG, (mViewName != null ? (mViewName + ": ") : "") + String.format(fmt, args));
@@ -403,6 +404,11 @@ public class PanelView extends FrameLayout {
public void setExpandedHeightInternal(float h) {
float fh = getMaxPanelHeight();
mExpandedHeight = Math.min(fh, h);
+ float overExpansion = h - fh;
+ overExpansion = Math.max(0, overExpansion);
+ if (overExpansion != mOverExpansion) {
+ onOverExpansionChanged(overExpansion);
+ }
if (DEBUG) {
logf("setExpansion: height=%.1f fh=%.1f tracking=%s", h, fh, mTracking ? "T" : "f");
@@ -412,6 +418,10 @@ public class PanelView extends FrameLayout {
mExpandedFraction = Math.min(1f, (fh == 0) ? 0 : h / fh);
}
+ protected void onOverExpansionChanged(float overExpansion) {
+ mOverExpansion = overExpansion;
+ }
+
protected void onHeightUpdated(float expandedHeight) {
requestLayout();
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 0922abd..28367d0e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -2770,9 +2770,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
if (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) {
mKeyguardBottomArea.setVisibility(View.VISIBLE);
mHeader.setKeyguardShowing(true);
+ mNotificationPanel.setKeyguardShowing(true);
} else {
mKeyguardBottomArea.setVisibility(View.GONE);
mHeader.setKeyguardShowing(false);
+ mNotificationPanel.setKeyguardShowing(false);
}
updateStackScrollerState();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
index 389e725..3245f1a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
@@ -38,6 +38,11 @@ import com.android.systemui.statusbar.policy.UserInfoController;
*/
public class StatusBarHeaderView extends RelativeLayout implements View.OnClickListener {
+ /**
+ * How much the header expansion gets rubberbanded while expanding the panel.
+ */
+ private static final float EXPANSION_RUBBERBAND_FACTOR = 0.35f;
+
private boolean mExpanded;
private boolean mKeyguardShowing;
@@ -128,6 +133,8 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
updateVisibilities();
updateSystemIconsLayoutParams();
updateBrightnessControllerState();
+ updateZTranslation();
+ updateClickTargets();
if (mQSPanel != null) {
mQSPanel.setExpanded(expanded);
}
@@ -202,18 +209,30 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
}
}
+ private void updateClickTargets() {
+ mDateTime.setClickable(mExpanded);
+ mMultiUserSwitch.setClickable(mExpanded);
+ }
+
+ private void updateZTranslation() {
+
+ // If we are on the Keyguard, we need to set our z position to zero, so we don't get
+ // shadows.
+ if (mKeyguardShowing && !mExpanded) {
+ setZ(0);
+ } else {
+ setTranslationZ(0);
+ }
+ }
+
public void setExpansion(float height) {
+ height = (height - mCollapsedHeight) * EXPANSION_RUBBERBAND_FACTOR + mCollapsedHeight;
if (height < mCollapsedHeight) {
height = mCollapsedHeight;
}
if (height > mExpandedHeight) {
height = mExpandedHeight;
}
- if (mExpanded) {
- mBackground.setTranslationY(-(mExpandedHeight - height));
- } else {
- mBackground.setTranslationY(0);
- }
setClipping(height);
}
@@ -247,14 +266,10 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
public void setKeyguardShowing(boolean keyguardShowing) {
mKeyguardShowing = keyguardShowing;
- if (keyguardShowing) {
- setZ(0);
- } else {
- setTranslationZ(0);
- }
updateHeights();
updateWidth();
updateVisibilities();
+ updateZTranslation();
}
public void setUserInfoController(UserInfoController userInfoController) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoController.java
index 173af40..3ce6905 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserInfoController.java
@@ -166,7 +166,7 @@ public final class UserInfoController {
if (rawAvatar != null) {
avatar = new BitmapDrawable(mContext.getResources(), circularClip(rawAvatar));
} else {
- avatar = mContext.getResources().getDrawable(R.drawable.ic_qs_default_user);
+ avatar = mContext.getResources().getDrawable(R.drawable.ic_account_circle);
mUseDefaultAvatar = true;
}