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

Commit e92f5df3 authored by Alex Johnston's avatar Alex Johnston
Browse files

Update CA certificate warning to material next spec

* Fix colour extraction
* Update landscape mode
* Update logo

Screenshots:
* https://screenshot.googleplex.com/5mwbKLJeFVecrpi
* https://screenshot.googleplex.com/9z62Sw26NX5Zfwu

Bug: 191845997
Test: Manual testing with Settings
Change-Id: Id9988dbce9eabc2b69dba4bd20ca7a6729601147
parent 88c518b2
Loading
Loading
Loading
Loading
−603 B
Loading image diff...
+31 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2021 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"
    android:width="24dp"
    android:height="24dp"
    android:tint="?android:attr/colorError"
    android:viewportHeight="24.0"
    android:viewportWidth="24.0">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M21.26,18L13.73,4.99c-0.77,-1.33 -2.69,-1.33 -3.46,0L2.74,18c-0.77,1.33 0.19,3 1.73,3h15.06C21.07,21 22.03,19.33 21.26,18zM4.47,19L12,5.99L19.53,19H4.47z" />
    <path
        android:fillColor="@android:color/white"
        android:pathData="M11,11v2c0,0.55 0.45,1 1,1c0.55,0 1,-0.45 1,-1v-2c0,-0.55 -0.45,-1 -1,-1C11.45,10 11,10.45 11,11z" />
    <path
        android:fillColor="@android:color/white"
        android:pathData="M12,17m-1,0a1,1 0,1 1,2 0a1,1 0,1 1,-2 0" />
</vector>
+7 −20
Original line number Diff line number Diff line
@@ -18,37 +18,24 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/setup_wizard_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    android:layout_height="match_parent"
    android:icon="@drawable/ic_alert_red">

    <LinearLayout
        style="@style/SudContentFrame"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:gravity="center_horizontal">

        <ImageView
            android:id="@+id/sud_layout_icon"
            style="@style/SudGlifIcon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:src="@drawable/ic_warning_googred_48dp"/>

        <TextView
            android:id="@+id/sud_layout_title"
            style="@style/SudGlifHeaderTitle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/ca_certificate_warning_title"/>
        android:orientation="vertical">

        <TextView
            android:id="@+id/sud_layout_description"
            style="@style/SudDescription.Glif"
            android:layout_marginTop="16dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="16dp"
            android:textSize="18sp"
            android:alpha="0.7"
            android:text="@string/ca_certificate_warning_description"/>

    </LinearLayout>
+5 −0
Original line number Diff line number Diff line
@@ -25,10 +25,12 @@ import android.view.View;
import android.widget.Toast;

import com.android.settings.R;
import com.android.settings.SetupWizardUtils;

import com.google.android.setupcompat.template.FooterBarMixin;
import com.google.android.setupcompat.template.FooterButton;
import com.google.android.setupdesign.GlifLayout;
import com.google.android.setupdesign.util.ThemeHelper;

/**
 * Creates a warning dialog explaining the consequences of installing a CA certificate
@@ -40,8 +42,11 @@ public class InstallCaCertificateWarning extends Activity {
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setTheme(SetupWizardUtils.getTheme(this, getIntent()));
        ThemeHelper.trySetDynamicColor(this);
        setContentView(R.layout.ca_certificate_warning_dialog);
        final GlifLayout layout = findViewById(R.id.setup_wizard_layout);
        layout.setHeaderText(R.string.ca_certificate_warning_title);

        final FooterBarMixin mixin = layout.getMixin(FooterBarMixin.class);
        mixin.setSecondaryButton(
+1 −1

File changed.

Contains only whitespace changes.