Snap for 7501202 from 93b716660e to sc-v2-release
Change-Id: I52395e782e1f3734c7bd36817b21c6428daaaff6
This commit is contained in:
@@ -140,7 +140,6 @@
|
||||
|
||||
<activity android:name=".network.telephony.MobileNetworkActivity"
|
||||
android:label="@string/network_settings_title"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter android:priority="1">
|
||||
@@ -181,7 +180,6 @@
|
||||
|
||||
<activity android:name=".Settings$CreateShortcutActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:label="@string/settings_shortcut">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.CREATE_SHORTCUT" />
|
||||
@@ -418,7 +416,6 @@
|
||||
android:label="@string/apn_settings"
|
||||
android:launchMode="singleTask"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize">
|
||||
<intent-filter android:priority="1">
|
||||
<action android:name="android.settings.APN_SETTINGS" />
|
||||
@@ -473,7 +470,6 @@
|
||||
|
||||
<activity android:name="Settings$FaceSettingsActivity"
|
||||
android:label="@string/security_settings_face_preference_title"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:exported="true"
|
||||
android:icon="@drawable/ic_face_header">
|
||||
<intent-filter>
|
||||
@@ -498,7 +494,6 @@
|
||||
|
||||
<activity android:name="Settings$CombinedBiometricSettingsActivity"
|
||||
android:label="@string/security_settings_biometric_preference_title"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:exported="false">
|
||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||
android:value="com.android.settings.biometrics.combination.CombinedBiometricSettings" />
|
||||
@@ -506,7 +501,6 @@
|
||||
|
||||
<activity android:name="Settings$CombinedBiometricProfileSettingsActivity"
|
||||
android:label="@string/security_settings_biometric_preference_title"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:exported="false">
|
||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||
android:value="com.android.settings.biometrics.combination.CombinedBiometricProfileSettings" />
|
||||
@@ -712,8 +706,7 @@
|
||||
<activity
|
||||
android:name="Settings$ManageAssistActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/assist_and_voice_input_title"
|
||||
android:theme="@style/Theme.SubSettings">
|
||||
android:label="@string/assist_and_voice_input_title">
|
||||
<intent-filter android:priority="1">
|
||||
<action android:name="android.settings.VOICE_INPUT_SETTINGS" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
@@ -1153,7 +1146,6 @@
|
||||
<activity
|
||||
android:name="Settings$ManageDomainUrlsActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:label="@string/domain_urls_title">
|
||||
<intent-filter>
|
||||
<action android:name="android.settings.MANAGE_DOMAIN_URLS" />
|
||||
@@ -1331,7 +1323,6 @@
|
||||
<activity
|
||||
android:name=".notification.history.NotificationHistoryActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:label="@string/notification_history_title">
|
||||
<intent-filter android:priority="1">
|
||||
<action android:name="android.settings.NOTIFICATION_HISTORY" />
|
||||
@@ -1494,7 +1485,6 @@
|
||||
</activity>
|
||||
|
||||
<activity android:name=".security.RequestManageCredentials"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.security.MANAGE_CREDENTIALS"/>
|
||||
@@ -1527,7 +1517,6 @@
|
||||
<activity android:name=".applications.specialaccess.deviceadmin.DeviceAdminAdd"
|
||||
android:label="@string/device_admin_add_title"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:clearTaskOnLaunch="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.app.action.ADD_DEVICE_ADMIN" />
|
||||
@@ -2087,7 +2076,6 @@
|
||||
<activity android:name="Settings$ApnEditorActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:label="@string/apn_edit">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
@@ -2458,7 +2446,6 @@
|
||||
|
||||
<activity
|
||||
android:name="com.android.settings.accounts.AddAccountSettings"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="true"
|
||||
android:label="@string/header_add_an_account">
|
||||
@@ -2472,7 +2459,6 @@
|
||||
|
||||
<activity android:name="Settings$ChooseAccountActivity"
|
||||
android:label="@string/header_add_an_account"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize">
|
||||
<meta-data android:name="com.android.settings.FRAGMENT_CLASS"
|
||||
android:value="com.android.settings.accounts.ChooseAccountFragment" />
|
||||
@@ -3033,7 +3019,6 @@
|
||||
<activity
|
||||
android:name="Settings$WifiCallingSettingsActivity"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:label="@string/wifi_calling_settings_title">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
@@ -3723,7 +3708,6 @@
|
||||
android:name="Settings$GestureNavigationSettingsActivity"
|
||||
android:label="@string/gesture_settings_activity_title"
|
||||
android:exported="true"
|
||||
android:theme="@style/Theme.SubSettings"
|
||||
android:enabled="true">
|
||||
<intent-filter android:priority="32">
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
@@ -3807,7 +3791,6 @@
|
||||
android:permission="android.permission.BIND_JOB_SERVICE" />
|
||||
|
||||
<activity android:name=".sim.smartForwarding.SmartForwardingActivity"
|
||||
android:theme="@style/Theme.SubSettings.Base"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask">
|
||||
</activity>
|
||||
|
||||
@@ -15,20 +15,19 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/container"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:foreground="@drawable/contextual_card_background"
|
||||
android:clickable="true"
|
||||
style="@style/ContextualCardStyle">
|
||||
|
||||
<include
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
style="@style/ContextualCardStyle">
|
||||
<include
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="-8dp"
|
||||
layout="@layout/settingslib_preference" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</FrameLayout>
|
||||
android:layout_marginStart="-8dp"
|
||||
layout="@layout/settingslib_preference"/>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
<item name="colorPrimary">@*android:color/primary_device_default_settings</item>
|
||||
<item name="colorPrimaryDark">@*android:color/primary_dark_device_default_settings</item>
|
||||
<item name="android:colorBackground">?android:attr/colorPrimaryDark</item>
|
||||
<!-- Homepage should follow device default design, the values is same as device default theme.-->
|
||||
<item name="android:navigationBarColor">@android:color/black</item>
|
||||
<item name="android:statusBarColor">?attr/colorPrimaryDark</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.SubSettings" parent="Theme.SubSettings.Base"/>
|
||||
|
||||
@@ -36,6 +36,10 @@
|
||||
<item name="face_layout_theme">@style/FaceLayoutTheme</item>
|
||||
<item name="ic_menu_moreoverflow">@*android:drawable/ic_menu_moreoverflow_holo_dark</item>
|
||||
|
||||
<!-- For edge-to-edge -->
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
|
||||
<!-- For wifi icon -->
|
||||
<item name="wifi_signal">@drawable/wifi_signal</item>
|
||||
<item name="wifi_signal_color">?android:attr/colorAccent</item>
|
||||
@@ -211,6 +215,9 @@
|
||||
<item name="colorPrimaryDark">@*android:color/primary_dark_device_default_settings_light</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:navigationBarDividerColor">@*android:color/ripple_material_light</item>
|
||||
<!-- Homepage should follow device default design, the values is same as device default theme.-->
|
||||
<item name="android:navigationBarColor">@android:color/white</item>
|
||||
<item name="android:statusBarColor">?attr/colorPrimaryDark</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.Settings.ContextualCard" parent="Theme.Settings.Home">
|
||||
|
||||
@@ -309,7 +309,6 @@ public class Settings extends SettingsActivity {
|
||||
public static class NetworkDashboardActivity extends SettingsActivity {}
|
||||
public static class ConnectedDeviceDashboardActivity extends SettingsActivity {}
|
||||
public static class PowerUsageSummaryActivity extends SettingsActivity { /* empty */ }
|
||||
public static class AppAndNotificationDashboardActivity extends SettingsActivity {}
|
||||
public static class StorageDashboardActivity extends SettingsActivity {}
|
||||
public static class AccountDashboardActivity extends SettingsActivity {}
|
||||
public static class SystemDashboardActivity extends SettingsActivity {}
|
||||
|
||||
@@ -158,6 +158,7 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder {
|
||||
void updateSwitch(View.OnClickListener listener, boolean enabled, boolean checked) {
|
||||
if (mSwitch != null && mWidgetContainer != null) {
|
||||
mWidgetContainer.setOnClickListener(listener);
|
||||
mWidgetContainer.setFocusable(false);
|
||||
mSwitch.setChecked(checked);
|
||||
mSwitch.setEnabled(enabled);
|
||||
}
|
||||
|
||||
@@ -320,7 +320,6 @@ public class SettingsGateway {
|
||||
// Home page
|
||||
Settings.NetworkDashboardActivity.class.getName(),
|
||||
Settings.ConnectedDeviceDashboardActivity.class.getName(),
|
||||
Settings.AppAndNotificationDashboardActivity.class.getName(),
|
||||
Settings.AppDashboardActivity.class.getName(),
|
||||
Settings.DisplaySettingsActivity.class.getName(),
|
||||
Settings.SoundSettingsActivity.class.getName(),
|
||||
|
||||
@@ -39,7 +39,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
/**
|
||||
* A listener for active subscription change
|
||||
*/
|
||||
public abstract class ActiveSubsciptionsListener
|
||||
public abstract class ActiveSubscriptionsListener
|
||||
extends SubscriptionManager.OnSubscriptionsChangedListener
|
||||
implements AutoCloseable {
|
||||
|
||||
@@ -73,7 +73,7 @@ public abstract class ActiveSubsciptionsListener
|
||||
* @param looper {@code Looper} of this listener
|
||||
* @param context {@code Context} of this listener
|
||||
*/
|
||||
public ActiveSubsciptionsListener(Looper looper, Context context) {
|
||||
public ActiveSubscriptionsListener(Looper looper, Context context) {
|
||||
this(looper, context, SubscriptionManager.INVALID_SUBSCRIPTION_ID);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public abstract class ActiveSubsciptionsListener
|
||||
* @param context {@code Context} of this listener
|
||||
* @param subscriptionId for subscription on this listener
|
||||
*/
|
||||
public ActiveSubsciptionsListener(Looper looper, Context context, int subscriptionId) {
|
||||
public ActiveSubscriptionsListener(Looper looper, Context context, int subscriptionId) {
|
||||
super(looper);
|
||||
mLooper = looper;
|
||||
mContext = context;
|
||||
@@ -77,7 +77,7 @@ public class ProxySubscriptionManager implements LifecycleObserver {
|
||||
mActiveSubscriptionsListeners =
|
||||
new ArrayList<OnActiveSubscriptionChangedListener>();
|
||||
|
||||
mSubscriptionMonitor = new ActiveSubsciptionsListener(looper, context) {
|
||||
mSubscriptionMonitor = new ActiveSubscriptionsListener(looper, context) {
|
||||
public void onChanged() {
|
||||
notifyAllListeners();
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class ProxySubscriptionManager implements LifecycleObserver {
|
||||
}
|
||||
|
||||
private Lifecycle mLifecycle;
|
||||
private ActiveSubsciptionsListener mSubscriptionMonitor;
|
||||
private ActiveSubscriptionsListener mSubscriptionMonitor;
|
||||
private GlobalSettingsChangeListener mAirplaneModeMonitor;
|
||||
|
||||
private List<OnActiveSubscriptionChangedListener> mActiveSubscriptionsListeners;
|
||||
|
||||
@@ -37,7 +37,7 @@ import androidx.preference.Preference;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.datausage.BillingCyclePreferenceController;
|
||||
import com.android.settings.datausage.DataUsageSummaryPreferenceController;
|
||||
import com.android.settings.network.ActiveSubsciptionsListener;
|
||||
import com.android.settings.network.ActiveSubscriptionsListener;
|
||||
import com.android.settings.network.CarrierWifiTogglePreferenceController;
|
||||
import com.android.settings.network.telephony.cdma.CdmaSubscriptionPreferenceController;
|
||||
import com.android.settings.network.telephony.cdma.CdmaSystemSelectPreferenceController;
|
||||
@@ -74,9 +74,9 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings {
|
||||
private UserManager mUserManager;
|
||||
private String mClickedPrefKey;
|
||||
|
||||
private ActiveSubsciptionsListener mActiveSubsciptionsListener;
|
||||
private ActiveSubscriptionsListener mActiveSubscriptionsListener;
|
||||
private boolean mDropFirstSubscriptionChangeNotify;
|
||||
private int mActiveSubsciptionsListenerCount;
|
||||
private int mActiveSubscriptionsListenerCount;
|
||||
|
||||
public MobileNetworkSettings() {
|
||||
super(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS);
|
||||
@@ -218,8 +218,8 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings {
|
||||
super.onResume();
|
||||
// TODO: remove log after fixing b/182326102
|
||||
Log.d(LOG_TAG, "onResume() subId=" + mSubId);
|
||||
if (mActiveSubsciptionsListener == null) {
|
||||
mActiveSubsciptionsListener = new ActiveSubsciptionsListener(
|
||||
if (mActiveSubscriptionsListener == null) {
|
||||
mActiveSubscriptionsListener = new ActiveSubscriptionsListener(
|
||||
getContext().getMainLooper(), getContext(), mSubId) {
|
||||
public void onChanged() {
|
||||
onSubscriptionDetailChanged();
|
||||
@@ -227,7 +227,7 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings {
|
||||
};
|
||||
mDropFirstSubscriptionChangeNotify = true;
|
||||
}
|
||||
mActiveSubsciptionsListener.start();
|
||||
mActiveSubscriptionsListener.start();
|
||||
}
|
||||
|
||||
private void onSubscriptionDetailChanged() {
|
||||
@@ -236,21 +236,21 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings {
|
||||
Log.d(LOG_TAG, "Callback during onResume()");
|
||||
return;
|
||||
}
|
||||
mActiveSubsciptionsListenerCount++;
|
||||
if (mActiveSubsciptionsListenerCount != 1) {
|
||||
mActiveSubscriptionsListenerCount++;
|
||||
if (mActiveSubscriptionsListenerCount != 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
ThreadUtils.postOnMainThread(() -> {
|
||||
mActiveSubsciptionsListenerCount = 0;
|
||||
mActiveSubscriptionsListenerCount = 0;
|
||||
redrawPreferenceControllers();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (mActiveSubsciptionsListener != null) {
|
||||
mActiveSubsciptionsListener.stop();
|
||||
if (mActiveSubscriptionsListener != null) {
|
||||
mActiveSubscriptionsListener.stop();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ActiveSubsciptionsListenerTest {
|
||||
public class ActiveSubscriptionsListenerTest {
|
||||
private static final int SUB_ID1 = 3;
|
||||
private static final int SUB_ID2 = 7;
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ActiveSubsciptionsListenerTest {
|
||||
private SubscriptionManager mSubscriptionManager;
|
||||
private List<SubscriptionInfo> mActiveSubscriptions;
|
||||
|
||||
private ActiveSubsciptionsListenerImpl mListener;
|
||||
private ActiveSubscriptionsListenerImpl mListener;
|
||||
private BroadcastReceiver mReceiver;
|
||||
|
||||
@Before
|
||||
@@ -83,7 +83,7 @@ public class ActiveSubsciptionsListenerTest {
|
||||
addMockSubscription(SUB_ID2);
|
||||
doReturn(mActiveSubscriptions).when(mSubscriptionManager).getActiveSubscriptionInfoList();
|
||||
|
||||
mListener = spy(new ActiveSubsciptionsListenerImpl(Looper.getMainLooper(), mContext));
|
||||
mListener = spy(new ActiveSubscriptionsListenerImpl(Looper.getMainLooper(), mContext));
|
||||
doReturn(mSubscriptionManager).when(mListener).getSubscriptionManager();
|
||||
mReceiver = mListener.getSubscriptionChangeReceiver();
|
||||
}
|
||||
@@ -99,8 +99,8 @@ public class ActiveSubsciptionsListenerTest {
|
||||
mListener.close();
|
||||
}
|
||||
|
||||
public class ActiveSubsciptionsListenerImpl extends ActiveSubsciptionsListener {
|
||||
public ActiveSubsciptionsListenerImpl(Looper looper, Context context) {
|
||||
public class ActiveSubscriptionsListenerImpl extends ActiveSubscriptionsListener {
|
||||
public ActiveSubscriptionsListenerImpl(Looper looper, Context context) {
|
||||
super(looper, context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user