Fix missing controller key and remove onCreatePreferences
1) A missing controller key for CellularSecurityEncryptionDividerController was causing the corresponding UI element's getAvailabilityStatus to not be called. 2) The inclusion of onCreatePreferences in CellularSecuritySettingsFragment was causing other UI element's controllers to not be called correctly. Bug: b/373942609 Test: atest CellularSecurityPreferenceControllerTest Test: atest CellularSecurityEncryptionDividerControllerTest Flag: EXEMPT bugfix Change-Id: Ic01a609311d7bd84ee835ffbede793fe2d7756ae
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
"com.android.settings.network.telephony.CellularSecurityNotificationsPreferenceController"/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:key="cellular_security_encryption_divider"
|
||||
android:title="@string/cellular_security_settings_encryption_title"
|
||||
settings:controller="com.android.settings.network.telephony.CellularSecurityEncryptionDividerController">
|
||||
<SwitchPreferenceCompat
|
||||
|
@@ -16,7 +16,6 @@
|
||||
package com.android.settings.network.telephony;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
@@ -44,10 +43,4 @@ public class CellularSecuritySettingsFragment extends DashboardFragment {
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.cellular_security;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle bundle, String rootKey) {
|
||||
super.onCreatePreferences(bundle, rootKey);
|
||||
setPreferencesFromResource(R.xml.cellular_security, rootKey);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user