Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16258e3e authored by Erin Yan's avatar Erin Yan
Browse files

Create dialog to show detecting Batmobile device & unlocking

Bug: 136049501
Test: Manually on IHU
Change-Id: I47b55e3032c814623aa5bf5c5c3ec1899c03e98e
parent c7487391
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -21,4 +21,8 @@
        coreApp="true">
    <!-- This permission is required to monitor car power state. -->
    <uses-permission android:name="android.car.permission.CAR_POWER" />
    <!-- This permission is required to get the trusted device list of a user. -->
    <uses-permission android:name="android.car.permission.CAR_ENROLL_TRUST"/>
    <!-- This permission is required to get bluetooth broadcast. -->
    <uses-permission android:name="android.permission.BLUETOOTH" />
</manifest>
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2019 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
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
  <solid android:color="@color/unlock_dialog_background_color"/>
  <padding
      android:bottom="@*android:dimen/car_padding_2"
      android:left="@*android:dimen/car_padding_2"
      android:right="@*android:dimen/car_padding_2"
      android:top="@*android:dimen/car_padding_2"/>
  <corners
      android:radius="@dimen/unlock_dialog_radius"/>
</shape>
 No newline at end of file
+72 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2019 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
  -->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">

    <LinearLayout
        android:layout_width="@dimen/unlock_dialog_width"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:layout_gravity="center"
        android:orientation="vertical"
        android:background="@drawable/unlock_dialog_background"
        android:padding="@*android:dimen/car_padding_2">
        <FrameLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">
            <ProgressBar
                android:layout_gravity="center"
                android:layout_width="@dimen/unlock_dialog_progress_bar_size"
                android:layout_height="@dimen/unlock_dialog_progress_bar_size" />
            <ImageView
                android:id="@+id/avatar"
                android:layout_gravity="center"
                android:layout_width="@dimen/unlock_dialog_avatar_size"
                android:layout_height="@dimen/unlock_dialog_avatar_size"
                android:scaleType="fitCenter"/>
        </FrameLayout>

        <TextView
            android:id="@+id/user_name"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="@string/unlock_dialog_default_user_name"
            android:textSize="@*android:dimen/car_body1_size"
            android:textColor="@android:color/white"/>

        <TextView
            android:id="@+id/unlocking_text"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:layout_marginTop="@*android:dimen/car_padding_1"
            android:text="@string/unlock_dialog_message_default"
            android:textSize="@*android:dimen/car_body4_size"
            android:textColor="@color/unlock_dialog_message_text_default"/>

        <Button
            android:id="@+id/enter_pin_button"
            android:layout_marginTop="@*android:dimen/car_padding_1"
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="@string/unlock_dialog_button_text_pin"
            style="@style/UnlockDialogButton"/>
    </LinearLayout>
</FrameLayout>
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -26,4 +26,9 @@
    <color name="car_user_switcher_add_user_background_color">@*android:color/car_dark_blue_grey_600</color>
    <color name="car_user_switcher_add_user_add_sign_color">@*android:color/car_body1_light</color>

    <!-- colors for unlock dialog -->
    <color name="unlock_dialog_background_color">#ff282a2d</color>
    <color name="unlock_dialog_message_text_default">@*android:color/car_grey_400</color>
    <color name="unlock_dialog_enter_pin_text_color">#ff66b5ff</color>

</resources>
+6 −0
Original line number Diff line number Diff line
@@ -43,4 +43,10 @@
    <!-- This must be the negative of car_user_switcher_container_height for the animation. -->
    <dimen name="car_user_switcher_container_anim_height">-420dp</dimen>

    <!-- dimensions for the unlock dialog -->
    <dimen name="unlock_dialog_width">500dp</dimen>
    <dimen name="unlock_dialog_radius">16dp</dimen>
    <dimen name="unlock_dialog_avatar_size">100dp</dimen>
    <dimen name="unlock_dialog_progress_bar_size">140dp</dimen>

</resources>
Loading