fixed NPE while initializing controllers by commenting out the failure
one for temporal fix Added @Nullable in parameters of buildPreferenceControllers() to prevent using nullable parameter to functions requires non-nullable. Bug: 315330037 Test: see developer options preferences show/hide based on the controllers isAvailable() Change-Id: If42faea900a2220d9b1f5e38e1befbd5a555e78a
This commit is contained in:
@@ -49,6 +49,7 @@ import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
@@ -606,8 +607,9 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
|
||||
}
|
||||
|
||||
private static List<AbstractPreferenceController> buildPreferenceControllers(Context context,
|
||||
Activity activity, Lifecycle lifecycle, DevelopmentSettingsDashboardFragment fragment,
|
||||
BluetoothA2dpConfigStore bluetoothA2dpConfigStore) {
|
||||
@Nullable Activity activity, @Nullable Lifecycle lifecycle,
|
||||
@Nullable DevelopmentSettingsDashboardFragment fragment,
|
||||
@Nullable BluetoothA2dpConfigStore bluetoothA2dpConfigStore) {
|
||||
final List<AbstractPreferenceController> controllers = new ArrayList<>();
|
||||
controllers.add(new MemoryUsagePreferenceController(context));
|
||||
controllers.add(new BugReportPreferenceController(context));
|
||||
@@ -735,7 +737,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
|
||||
controllers.add(new OverlaySettingsPreferenceController(context));
|
||||
controllers.add(new StylusHandwritingPreferenceController(context));
|
||||
controllers.add(new IngressRateLimitPreferenceController((context)));
|
||||
controllers.add(new BackAnimationPreferenceController(context, fragment));
|
||||
// controllers.add(new BackAnimationPreferenceController(context, fragment));
|
||||
controllers.add(new PhantomProcessPreferenceController(context));
|
||||
controllers.add(new ContrastPreferenceController(
|
||||
context, context.getSystemService(UiModeManager.class)));
|
||||
|
Reference in New Issue
Block a user