DivestOS/Patches/LineageOS-20.0/android_packages_apps_Dialer/0001-Not_Private_Banner.patch
Tad 964877bbf6
20.0: September ASB picks
wget b96ee4a2d1.patch -O telephony-01.patch
wget c16e6e78c1.patch -O media-01.patch
wget d5771450d7.patch -O media-02.patch
wget a1370bd00c.patch -O nn-01.patch
wget ce2776f4ca.patch -O bt-01.patch
wget 585f583ef5.patch -O bt-02.patch
wget c9905e7968.patch -O bt-03.patch
wget c93ec045f5.patch -O bt-04.patch
wget 89fb17d172.patch -O bt-05.patch
wget 14aed2455e.patch -O bt-06.patch
wget cd438ebc52.patch -O bt-07.patch
wget 27e7cdc4e5.patch -O nfc-01.patch
wget dfeb4270b8.patch -O launcher-01.patch
wget b1993f6cec.patch -O native-01.patch
wget df4a9362cd.patch -O fwb-01.patch
wget b55563bb9d.patch -O fwb-02.patch
wget a80971a281.patch -O fwb-03.patch
wget 7e173b4383.patch -O fwb-04.patch
wget 44191b1c6b.patch -O fwb-05.patch
wget 8dc8dfe572.patch -O fwb-06.patch
wget 00a4224100.patch -O av-01.patch
wget 21623d1f43.patch -O settings-01.patch
wget fa5ec443d9.patch -O settings-02.patch
wget ba4da9c7b3.patch -O settings-03.patch

Signed-off-by: Tad <tad@spotco.us>
2023-09-06 15:42:52 -04:00

186 lines
8.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Torsten Grote <t@grobox.de>
Date: Thu, 18 Jun 2020 13:15:16 -0300
Subject: [PATCH] Show privacy warning on in-call screen
Includes:
Author: Chirayu Desai <chirayudesai1@gmail.com>
Date: Tue Jul 28 02:23:37 2020 +0530
Move the incall warning back to the center
* Instead of left/started aligned.
Change-Id: Ic9b18c110481df7042ca1daa36182e0999fe948f
---
.../res/drawable/ic_baseline_warning.xml | 9 +++++
.../dialer/theme/common/res/values/colors.xml | 1 +
.../res/layout/fragment_incoming_call.xml | 7 +++-
.../contactgrid/res/layout/incall_header.xml | 39 +++++++++++++++++++
.../impl/res/layout/frag_incall_voice.xml | 7 ++++
.../android/incallui/res/values/strings.xml | 3 ++
.../incallui/theme/res/values/styles.xml | 4 +-
7 files changed, 67 insertions(+), 3 deletions(-)
create mode 100644 java/com/android/dialer/common/res/drawable/ic_baseline_warning.xml
create mode 100644 java/com/android/incallui/contactgrid/res/layout/incall_header.xml
diff --git a/java/com/android/dialer/common/res/drawable/ic_baseline_warning.xml b/java/com/android/dialer/common/res/drawable/ic_baseline_warning.xml
new file mode 100644
index 000000000..c2baa9bdb
--- /dev/null
+++ b/java/com/android/dialer/common/res/drawable/ic_baseline_warning.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="16dp"
+ android:width="16dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+ <path android:fillColor="?attr/colorControlNormal"
+ android:pathData="M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"/>
+</vector>
\ No newline at end of file
diff --git a/java/com/android/dialer/theme/common/res/values/colors.xml b/java/com/android/dialer/theme/common/res/values/colors.xml
index 08255f32f..8995aa868 100644
--- a/java/com/android/dialer/theme/common/res/values/colors.xml
+++ b/java/com/android/dialer/theme/common/res/values/colors.xml
@@ -22,6 +22,7 @@
<color name="dialer_link_color">#2A56C6</color>
<color name="dialer_snackbar_action_text_color">@*android:color/system_accent1_600</color>
<color name="dialer_call_icon_color">@android:color/white</color>
+ <color name="incall_header_background">#f3b514</color>
<!-- Colors for the notification actions -->
<color name="notification_action_accept">#097138</color>
diff --git a/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml b/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml
index 0927b4d89..99a742225 100644
--- a/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml
+++ b/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml
@@ -78,18 +78,23 @@
android:id="@+id/incall_contact_grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginTop="24dp"
android:clipChildren="false"
android:clipToPadding="false"
android:focusable="true"
android:gravity="top|center_horizontal"
android:orientation="vertical">
+ <include
+ layout="@layout/incall_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"/>
+
<include
android:id="@id/contactgrid_top_row"
layout="@layout/incall_contactgrid_top_row"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginTop="24dp"
android:layout_marginBottom="8dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"/>
diff --git a/java/com/android/incallui/contactgrid/res/layout/incall_header.xml b/java/com/android/incallui/contactgrid/res/layout/incall_header.xml
new file mode 100644
index 000000000..7e8e90e5d
--- /dev/null
+++ b/java/com/android/incallui/contactgrid/res/layout/incall_header.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Calyx Institute
+ ~
+ ~ 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
+ -->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/incall_header_background"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:padding="8dp"
+ android:fitsSystemWindows="true">
+
+ <TextView
+ android:id="@+id/incall_privacy_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?android:attr/textColorPrimaryInverse"
+ android:drawableStart="@drawable/ic_baseline_warning"
+ android:drawablePadding="8dp"
+ android:drawableTint="?android:attr/textColorPrimaryInverse"
+ android:gravity="center"
+ android:padding="4dp"
+ android:text="@string/incall_screen_privacy_data_collection"/>
+
+</LinearLayout>
diff --git a/java/com/android/incallui/incall/impl/res/layout/frag_incall_voice.xml b/java/com/android/incallui/incall/impl/res/layout/frag_incall_voice.xml
index 45870f307..b61f6be65 100644
--- a/java/com/android/incallui/incall/impl/res/layout/frag_incall_voice.xml
+++ b/java/com/android/incallui/incall/impl/res/layout/frag_incall_voice.xml
@@ -29,11 +29,18 @@
android:clipToPadding="false"
android:fitsSystemWindows="true">
+ <include
+ layout="@layout/incall_header"
+ android:id="@+id/incall_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"/>
+
<LinearLayout
android:id="@id/incall_contact_grid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
+ android:layout_below="@+id/incall_header"
android:gravity="center_horizontal"
android:orientation="vertical">
diff --git a/java/com/android/incallui/res/values/strings.xml b/java/com/android/incallui/res/values/strings.xml
index 687ae142b..c7e81b197 100644
--- a/java/com/android/incallui/res/values/strings.xml
+++ b/java/com/android/incallui/res/values/strings.xml
@@ -174,4 +174,7 @@
<!-- Text for button to accept RTT request. [CHAR LIMIT=20] -->
<string name="rtt_button_accept_request">Join RTT</string>
+ <!-- Text for call not private banner. -->
+ <string name="incall_screen_privacy_data_collection">The location and audio of this call are not private.</string>
+
</resources>
diff --git a/java/com/android/incallui/theme/res/values/styles.xml b/java/com/android/incallui/theme/res/values/styles.xml
index a0d5caf10..e2f789cd4 100644
--- a/java/com/android/incallui/theme/res/values/styles.xml
+++ b/java/com/android/incallui/theme/res/values/styles.xml
@@ -19,7 +19,7 @@
<style name="Theme.InCallScreen" parent="@style/Dialer.Dark.ThemeBase.NoActionBar">
<item name="android:textColorPrimary">@android:color/white</item>
<item name="android:textColorSecondary">#DDFFFFFF</item>
- <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:statusBarColor">@color/incall_header_background</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
@@ -59,7 +59,7 @@
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowActivityTransitions">false</item>
- <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:statusBarColor">@color/incall_header_background</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>