Close keyguard user switcher on tap outside
Also closes when tapping the current user.
Also fixes a bug, where the background alpha was
not properly initialized. And while we're at it,
fixes a bug where the user switcher was closable
in simple mode by extending quick settings.
Bug: 17691134
Change-Id: I5444fe42a8a2887ab012ef6cbdcc57ba81a8c1c2
diff --git a/packages/SystemUI/res/layout/keyguard_user_switcher.xml b/packages/SystemUI/res/layout/keyguard_user_switcher.xml
index 3730bbe..773da9a 100644
--- a/packages/SystemUI/res/layout/keyguard_user_switcher.xml
+++ b/packages/SystemUI/res/layout/keyguard_user_switcher.xml
@@ -14,13 +14,18 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<com.android.keyguard.AlphaOptimizedLinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/keyguard_user_switcher"
- android:orientation="vertical"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:gravity="end"
- android:visibility="gone"
- android:paddingTop="4dp">
-</com.android.keyguard.AlphaOptimizedLinearLayout>
+<view xmlns:android="http://schemas.android.com/apk/res/android"
+ class="com.android.systemui.statusbar.policy.KeyguardUserSwitcher$Container"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent">
+ <com.android.keyguard.AlphaOptimizedLinearLayout
+ android:id="@+id/keyguard_user_switcher_inner"
+ android:orientation="vertical"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_marginTop="@dimen/status_bar_header_height_keyguard"
+ android:layout_gravity="end"
+ android:gravity="end"
+ android:paddingTop="4dp">
+ </com.android.keyguard.AlphaOptimizedLinearLayout>
+</view>
\ No newline at end of file