Completed basic UI of Satellite SOS
Flag: com.android.settings.flags.satellite_oem_settings_ux_migration Bug: b/378408877 Test: Manual test Change-Id: Iadef197b3da1008abedb88864f17087502ab7d36
This commit is contained in:
139
res/drawable-night/satellite_sos_illustration.xml
Normal file
139
res/drawable-night/satellite_sos_illustration.xml
Normal file
File diff suppressed because one or more lines are too long
9
res/drawable/account_circle_24dp.xml
Normal file
9
res/drawable/account_circle_24dp.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:pathData="M234,684q51,-39 114,-61.5T480,600q69,0 132,22.5T726,684q35,-41 54.5,-93T800,480q0,-133 -93.5,-226.5T480,160q-133,0 -226.5,93.5T160,480q0,59 19.5,111t54.5,93ZM480,520q-59,0 -99.5,-40.5T340,380q0,-59 40.5,-99.5T480,240q59,0 99.5,40.5T620,380q0,59 -40.5,99.5T480,520ZM480,880q-83,0 -156,-31.5T197,763q-54,-54 -85.5,-127T80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q83,0 156,31.5T763,197q54,54 85.5,127T880,480q0,83 -31.5,156T763,763q-54,54 -127,85.5T480,880ZM480,800q53,0 100,-15.5t86,-44.5q-39,-29 -86,-44.5T480,680q-53,0 -100,15.5T294,740q39,29 86,44.5T480,800ZM480,440q26,0 43,-17t17,-43q0,-26 -17,-43t-43,-17q-26,0 -43,17t-17,43q0,26 17,43t43,17ZM480,380ZM480,740Z"
|
||||
android:fillColor="#e8eaed"/>
|
||||
</vector>
|
9
res/drawable/contact_emergency_24dp.xml
Normal file
9
res/drawable/contact_emergency_24dp.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:pathData="M690,480h60v-68l59,34 30,-52 -59,-34 59,-34 -30,-52 -59,34v-68h-60v68l-59,-34 -30,52 59,34 -59,34 30,52 59,-34v68ZM80,840q-33,0 -56.5,-23.5T0,760v-560q0,-33 23.5,-56.5T80,120h800q33,0 56.5,23.5T960,200v560q0,33 -23.5,56.5T880,840L80,840ZM636,760h244v-560L80,200v560h4q42,-75 116,-117.5T360,600q86,0 160,42.5T636,760ZM360,560q50,0 85,-35t35,-85q0,-50 -35,-85t-85,-35q-50,0 -85,35t-35,85q0,50 35,85t85,35ZM182,760h356q-34,-38 -80.5,-59T360,680q-51,0 -97,21t-81,59ZM360,480q-17,0 -28.5,-11.5T320,440q0,-17 11.5,-28.5T360,400q17,0 28.5,11.5T400,440q0,17 -11.5,28.5T360,480ZM480,480Z"
|
||||
android:fillColor="#e8eaed"/>
|
||||
</vector>
|
9
res/drawable/satellite_sos_counter_1.xml
Normal file
9
res/drawable/satellite_sos_counter_1.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:pathData="M480,880q-83,0 -156,-31.5T197,763q-54,-54 -85.5,-127T80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q83,0 156,31.5T763,197q54,54 85.5,127T880,480q0,83 -31.5,156T763,763q-54,54 -127,85.5T480,880ZM480,800q134,0 227,-93t93,-227q0,-134 -93,-227t-227,-93q-134,0 -227,93t-93,227q0,134 93,227t227,93ZM480,480ZM460,680h80v-400L380,280v80h80v320Z"
|
||||
android:fillColor="#e8eaed"/>
|
||||
</vector>
|
9
res/drawable/satellite_sos_counter_2.xml
Normal file
9
res/drawable/satellite_sos_counter_2.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:pathData="M480,880q-83,0 -156,-31.5T197,763q-54,-54 -85.5,-127T80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q83,0 156,31.5T763,197q54,54 85.5,127T880,480q0,83 -31.5,156T763,763q-54,54 -127,85.5T480,880ZM480,800q134,0 227,-93t93,-227q0,-134 -93,-227t-227,-93q-134,0 -227,93t-93,227q0,134 93,227t227,93ZM480,480ZM360,680h240v-80L440,600v-80h80q33,0 56.5,-23.5T600,440v-80q0,-33 -23.5,-56.5T520,280L360,280v80h160v80h-80q-33,0 -56.5,23.5T360,520v160Z"
|
||||
android:fillColor="#e8eaed"/>
|
||||
</vector>
|
9
res/drawable/satellite_sos_counter_3.xml
Normal file
9
res/drawable/satellite_sos_counter_3.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960">
|
||||
<path
|
||||
android:pathData="M480,880q-83,0 -156,-31.5T197,763q-54,-54 -85.5,-127T80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q83,0 156,31.5T763,197q54,54 85.5,127T880,480q0,83 -31.5,156T763,763q-54,54 -127,85.5T480,880ZM480,800q134,0 227,-93t93,-227q0,-134 -93,-227t-227,-93q-134,0 -227,93t-93,227q0,134 93,227t227,93ZM480,480ZM360,680h160q33,0 56.5,-23.5T600,600v-60q0,-26 -17,-43t-43,-17q26,0 43,-17t17,-43v-60q0,-33 -23.5,-56.5T520,280L360,280v80h160v80h-80v80h80v80L360,600v80Z"
|
||||
android:fillColor="#e8eaed"/>
|
||||
</vector>
|
136
res/drawable/satellite_sos_illustration.xml
Normal file
136
res/drawable/satellite_sos_illustration.xml
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (C) 2024 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="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M4.81,6.31l1.69,-0.81l-1.69,-0.81l-0.81,-1.69l-0.81,1.69l-1.69,0.81l1.69,0.81l0.81,1.69z"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M16,12.05l-0.97,-2.03l-0.98,2.03l-2.02,0.97l2.02,0.98l0.98,2.02l0.97,-2.02l2.03,-0.98z"/>
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M8.89,16c-0.28,0 -0.55,-0.12 -0.74,-0.33l-3.17,-3.53l0.56,-0.42L8,13.37c0,0 0,-1.18 0,-7.87C8,5.22 8.22,5 8.5,5S9,5.22 9,5.5C9,5.98 9,10 9,10h1c0,0 0,-0.24 0,-4.5v-1C10,4.22 10.22,4 10.5,4S11,4.22 11,4.5v1c0,0.48 0,-0.29 0,4.5h1c0,-1.14 0,-0.24 0,-4.5C12,5.22 12.22,5 12.5,5S13,5.22 13,5.5v1c0,0.35 0,3.5 0,3.5h1c0,0 0,-0.45 0,-3.5C14,6.22 14.22,6 14.5,6S15,6.22 15,6.5V9h1V6.5C16,5.67 15.33,5 14.5,5c-0.2,0 -0.39,0.04 -0.56,0.11C13.77,4.47 13.19,4 12.5,4c-0.2,0 -0.39,0.04 -0.56,0.11C11.77,3.47 11.19,3 10.5,3S9.23,3.47 9.06,4.11C8.89,4.04 8.7,4 8.5,4C7.67,4 7,4.67 7,5.5V9v2.5l-0.91,-0.61c-0.01,-0.01 -0.58,-0.4 -1.15,0.03L3.5,12l3.9,4.34C7.78,16.76 8.32,17 8.89,17H13l-1,-1H8.89z"/>
|
||||
</vector>
|
@@ -12329,12 +12329,41 @@
|
||||
<!-- Title for notifying user's account be able to use data transmission of Satellite" [CHAR_LIMIT=NONE] -->
|
||||
<string name="title_have_satellite_data_plan">Use of data is included with your account</string>
|
||||
<!-- Title for the entry of Satellite SOS [CHAR_LIMIT=NONE] -->
|
||||
<string name="title_for_satellite_sos_entry">Satellite SOS</string>
|
||||
<string name="title_for_satellite_sos">Satellite SOS</string>
|
||||
<!-- Summary for the entry of Satellite SOS [CHAR_LIMIT=NONE] -->
|
||||
<string name="summary_for_satellite_sos_entry">Message with emergency services when you can\u2019t connect to a mobile or Wi\u2011Fi network</string>
|
||||
<!-- Keywords for the entry of Satellite SOS [CHAR_LIMIT=NONE] -->
|
||||
<string name="keywords_satellite_sos">satellite sos, sos</string>
|
||||
|
||||
<!-- Category title of Satellite SOS [CHAR_LIMIT=60] -->
|
||||
<string name="category_title_about_satellite_sos">About Satellite SOS</string>
|
||||
<!-- Desrciption of introduction for Satellite SOS [CHAR_LIMIT=60] -->
|
||||
<string name="satellite_sos_introduction">You can message with emergency services and share your location when you can’t connect to a mobile or Wi-Fi network. This service may not be available at all times in all locations or circumstances.</string>
|
||||
<!-- Description of how it works step 1 for Satellite SOS. [CHAR_LIMIT=200] -->
|
||||
<string name="satellite_sos_how_it_works_step_1">Call or text emergency services</string>
|
||||
<!-- Description of how it works step 2 for Satellite SOS. [CHAR_LIMIT=200] -->
|
||||
<string name="satellite_sos_how_it_works_step_2">Answer questions about the emergency</string>
|
||||
<!-- Description of how it works step 3 for Satellite SOS. [CHAR_LIMIT=200] -->
|
||||
<string name="satellite_sos_how_it_works_step_3">Follow steps to connect to the satellite</string>
|
||||
<!-- Summary of how it works step 1 for Satellite SOS. [CHAR_LIMIT=NONE] -->
|
||||
<string name="satellite_sos_how_it_works_summary_1">If you don’t have a mobile network, you’ll see an option to use Satellite SOS</string>
|
||||
<!-- Summary of how it works step 2 for Satellite SOS. [CHAR_LIMIT=NONE] -->
|
||||
<string name="satellite_sos_how_it_works_summary_2">Send answers to emergency services to get you the right kind of help</string>
|
||||
<!-- Summary of how it works step 3 for Satellite SOS. [CHAR_LIMIT=NONE] -->
|
||||
<string name="satellite_sos_how_it_works_summary_3">Once you’re connected, you can message with emergency services</string>
|
||||
<!-- Title of button to request Satellite SOS demo-->
|
||||
<string name="satellite_sos_try_demo">Try a demo</string>
|
||||
<!-- Description of Footer text for Satellite SOS settings. [CHAR_LIMIT=NONE] -->
|
||||
<string name="satellite_sos_footer_text">When you connect with emergency services by satellite, your name, email, phone number, location, device information (IMEI, language, model, battery level), and emergency contact information are shared with emergency services and satellite service providers.
|
||||
\n\nTo use Satellite SOS, Google Messages must be your default SMS app.
|
||||
\n\nIf automatic network selection is off, it will be turned on, and your device will automatically connect to any network.</string>
|
||||
<!-- Category title of Sharing preferences for Satellite SOS. [CHAR_LIMIT=40] -->
|
||||
<string name="satellite_sos_sharing_preferences_subheader_title">Sharing preferences</string>
|
||||
<!-- Title of emergency contacts for Satellite SOS. [CHAR_LIMIT=200] -->
|
||||
<string name="satellite_sos_sharing_preferences_step_1">Emergency contacts</string>
|
||||
<!-- Title of viewing google contacts for Satellite SOS. [CHAR_LIMIT=200] -->
|
||||
<string name="satellite_sos_sharing_preferences_step_2">Your Google Account</string>
|
||||
<!-- Description of sharing preference for Satellite SOS. [CHAR_LIMIT=200] -->
|
||||
<string name="satellite_sos_sharing_preferences_description">Review or update info that will be shared with emergency services</string>
|
||||
|
||||
|
||||
<!-- Title for Apn settings in mobile network settings [CHAR LIMIT=60] -->
|
||||
|
@@ -220,7 +220,7 @@
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
android:key="telephony_satellite_setting_sos_key"
|
||||
android:persistent="false"
|
||||
android:title="@string/title_for_satellite_sos_entry"
|
||||
android:title="@string/title_for_satellite_sos"
|
||||
android:summary="@string/summary_for_satellite_sos_entry"
|
||||
settings:keywords="@string/keywords_satellite_setting"
|
||||
settings:fragment="com.android.settings.network.telephony.SatelliteSettingsSosFragment"
|
||||
|
82
res/xml/satellite_setting_sos.xml
Normal file
82
res/xml/satellite_setting_sos.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2024 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.
|
||||
-->
|
||||
|
||||
<androidx.preference.PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="satellite_sos"
|
||||
android:title="@string/title_for_satellite_sos">
|
||||
|
||||
<com.android.settingslib.widget.IllustrationPreference
|
||||
android:key="key_satellite_sos_illustration"
|
||||
android:selectable="false"
|
||||
settings:lottie_rawRes="@drawable/satellite_sos_illustration"
|
||||
settings:searchable="false" />
|
||||
|
||||
<androidx.preference.PreferenceCategory
|
||||
android:title="@string/category_title_about_satellite_sos">
|
||||
<com.android.settingslib.widget.TopIntroPreference
|
||||
android:key="key_satellite_sos_top_intro"
|
||||
android:title="@string/satellite_sos_introduction" />
|
||||
</androidx.preference.PreferenceCategory>
|
||||
|
||||
<androidx.preference.PreferenceCategory
|
||||
android:title="@string/category_title_about_satellite_sos">
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:title="@string/satellite_sos_how_it_works_step_1"
|
||||
android:summary="@string/satellite_sos_how_it_works_summary_1"
|
||||
android:icon="@drawable/satellite_sos_counter_1"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:title="@string/satellite_sos_how_it_works_step_2"
|
||||
android:summary="@string/satellite_sos_how_it_works_summary_2"
|
||||
android:icon="@drawable/satellite_sos_counter_2"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:title="@string/satellite_sos_how_it_works_step_3"
|
||||
android:summary="@string/satellite_sos_how_it_works_summary_3"
|
||||
android:icon="@drawable/satellite_sos_counter_3"/>
|
||||
|
||||
</androidx.preference.PreferenceCategory>
|
||||
|
||||
<com.android.settingslib.widget.ButtonPreference
|
||||
android:title="try a demo"
|
||||
android:icon="@drawable/satellite_sos_quantum_gm_ic_hand_gesture_vd_20"/>
|
||||
|
||||
<androidx.preference.PreferenceCategory
|
||||
android:title="@string/satellite_sos_sharing_preferences_subheader_title">
|
||||
<com.android.settingslib.widget.TopIntroPreference
|
||||
android:title="@string/satellite_sos_sharing_preferences_description"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:title="@string/satellite_sos_sharing_preferences_step_1"
|
||||
android:icon="@drawable/contact_emergency_24dp"/>
|
||||
|
||||
<androidx.preference.Preference
|
||||
android:title="@string/satellite_sos_sharing_preferences_step_2"
|
||||
android:icon="@drawable/account_circle_24dp"/>
|
||||
|
||||
</androidx.preference.PreferenceCategory>
|
||||
|
||||
<com.android.settingslib.widget.FooterPreference
|
||||
android:key="key_satellite_sos_footer"
|
||||
android:title="@string/satellite_sos_footer_text"
|
||||
android:selectable="false"
|
||||
settings:searchable="false"/>
|
||||
/>
|
||||
</androidx.preference.PreferenceScreen>
|
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2024 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.
|
||||
*/
|
||||
|
||||
package com.android.settings.network.telephony;
|
||||
|
||||
import android.app.Fragment;
|
||||
|
||||
public class SatelliteSettingsSosController {
|
||||
|
||||
public SatelliteSettingsSosController(Fragment fragment) {
|
||||
}
|
||||
}
|
@@ -16,11 +16,30 @@
|
||||
|
||||
package com.android.settings.network.telephony;
|
||||
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import android.os.UserManager;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.RestrictedDashboardFragment;
|
||||
|
||||
public class SatelliteSettingsSosFragment extends RestrictedDashboardFragment {
|
||||
|
||||
|
||||
public SatelliteSettingsSosFragment() {
|
||||
super(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS);
|
||||
}
|
||||
|
||||
public class SatelliteSettingsSosFragment extends SettingsPreferenceFragment {
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.satellite_setting_sos;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLogTag() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user