Remove replicated page of Satellite SOS.
Flag: EXEMPT bug fix. Bug: b/370509415 Test: make pass Change-Id: Iff96dd09f8c0876a32064853629f64b0db173099
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
<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>
|
@@ -1,9 +0,0 @@
|
||||
<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>
|
@@ -1,9 +0,0 @@
|
||||
<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>
|
File diff suppressed because one or more lines are too long
@@ -1,32 +0,0 @@
|
||||
<?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>
|
@@ -12377,38 +12377,6 @@
|
||||
<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>
|
||||
<!-- Footer link to support page for Satellite SOS [CHAR LIMIT=NONE] -->
|
||||
<string name="satellite_sos_learn_more_link">https://support.google.com/pixelphone/answer/15254448</string>
|
||||
|
||||
|
||||
<!-- Title for Apn settings in mobile network settings [CHAR LIMIT=60] -->
|
||||
|
@@ -223,7 +223,6 @@
|
||||
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"
|
||||
settings:controller=
|
||||
"com.android.settings.network.telephony.SatelliteSettingSosPreferenceController"/>
|
||||
|
||||
|
@@ -1,83 +0,0 @@
|
||||
<?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"
|
||||
settings:controller="com.android.settings.network.telephony.SatelliteSettingsSosFooterPreferenceController"/>
|
||||
/>
|
||||
</androidx.preference.PreferenceScreen>
|
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* 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) {
|
||||
}
|
||||
}
|
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* 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.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settingslib.HelpUtils;
|
||||
import com.android.settingslib.widget.FooterPreference;
|
||||
|
||||
/** Footer for Satellite SOS. */
|
||||
public class SatelliteSettingsSosFooterPreferenceController extends BasePreferenceController {
|
||||
private static final String TAG = "SatelliteSettingsSosFooterPrefCtrl";
|
||||
|
||||
public SatelliteSettingsSosFooterPreferenceController(Context context,
|
||||
String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
if (preference == null || !preference.getKey().equals(getPreferenceKey())) {
|
||||
Log.d(TAG, "Wrong key for footer");
|
||||
return;
|
||||
}
|
||||
FooterPreference footerPreference = (FooterPreference) preference;
|
||||
footerPreference.setLearnMoreAction(v -> openSatelliteSosLearnMoreLink());
|
||||
}
|
||||
|
||||
private void openSatelliteSosLearnMoreLink() {
|
||||
mContext.startActivity(
|
||||
HelpUtils.getHelpIntent(
|
||||
mContext,
|
||||
mContext.getString(R.string.satellite_sos_learn_more_link),
|
||||
/*backupContext=*/""));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return AVAILABLE;
|
||||
}
|
||||
}
|
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* 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.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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.satellite_setting_sos;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLogTag() {
|
||||
return "";
|
||||
}
|
||||
}
|
@@ -1,70 +0,0 @@
|
||||
/*
|
||||
* 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 static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Looper;
|
||||
|
||||
import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import com.android.settingslib.widget.FooterPreference;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
import org.mockito.junit.MockitoRule;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class SatelliteSettingsSosFooterPreferenceControllerTest {
|
||||
private static final String KEY = "key_satellite_sos_footer";
|
||||
|
||||
@Rule
|
||||
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
|
||||
|
||||
@Mock
|
||||
private FooterPreference mFooterPreference;
|
||||
|
||||
private Context mContext = null;
|
||||
private SatelliteSettingsSosFooterPreferenceController mController;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
if (Looper.myLooper() == null) {
|
||||
Looper.prepare();
|
||||
}
|
||||
mContext = spy(ApplicationProvider.getApplicationContext());
|
||||
when(mFooterPreference.getKey()).thenReturn(KEY);
|
||||
mController = new SatelliteSettingsSosFooterPreferenceController(mContext, KEY);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateState_setLearnMoreAction_success() {
|
||||
|
||||
mController.updateState(mFooterPreference);
|
||||
|
||||
verify(mFooterPreference).setLearnMoreAction(any());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user