Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e34c995 authored by Neil Fuller's avatar Neil Fuller Committed by Android (Google) Code Review
Browse files

Merge "Fix a crash due to absence of no-arg fragment init" into udc-dev

parents db7e7d09 7ddbef73
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ public class LocationTimeZoneDetectionPreferenceController
        boolean isLocationEnabled =
                timeZoneCapabilitiesAndConfig.getCapabilities().isUseLocationEnabled();
        if (isChecked && !isLocationEnabled) {
            new LocationToggleDisabledDialogFragment(mContext)
            new LocationToggleDisabledDialogFragment()
                    .show(mFragment.getFragmentManager(), TAG);
            // Toggle status is not updated.
            return false;
+2 −7
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.settings.datetime;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
@@ -32,11 +31,7 @@ import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
 */
public class LocationToggleDisabledDialogFragment extends InstrumentedDialogFragment {

    private final Context mContext;

    public LocationToggleDisabledDialogFragment(Context context) {
        mContext = context;
    }
    public LocationToggleDisabledDialogFragment() {}

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
@@ -48,7 +43,7 @@ public class LocationToggleDisabledDialogFragment extends InstrumentedDialogFrag
                        R.string.location_time_zone_detection_location_is_off_dialog_ok_button,
                        (dialog, which) -> {
                            Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
                            mContext.startActivity(intent);
                            getContext().startActivity(intent);
                        })
                .setNegativeButton(
                        R.string.location_time_zone_detection_location_is_off_dialog_cancel_button,