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

Commit dc2058e9 authored by Neil Fuller's avatar Neil Fuller Committed by android-build-merger
Browse files

Merge "Switch settings to use TimeDetector" am: 5da65214 am: 72ed7e8f

am: 5f1c405f

Change-Id: Iaf7c3fb33f57ada39a8baef016fbc838f633be14
parents 1c405e35 5f1c405f
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -17,8 +17,9 @@
package com.android.settings.datetime.timezone;

import android.app.Activity;
import android.app.AlarmManager;
import android.app.settings.SettingsEnums;
import android.app.timezonedetector.ManualTimeZoneSuggestion;
import android.app.timezonedetector.TimeZoneDetector;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
@@ -270,7 +271,10 @@ public class TimeZoneSettings extends DashboardFragment {
            editor.putString(PREF_KEY_REGION, regionId);
        }
        editor.apply();
        getActivity().getSystemService(AlarmManager.class).setTimeZone(tzId);
        ManualTimeZoneSuggestion manualTimeZoneSuggestion =
                TimeZoneDetector.createManualTimeZoneSuggestion(tzId, "Settings: Set time zone");
        TimeZoneDetector timeZoneDetector = getActivity().getSystemService(TimeZoneDetector.class);
        timeZoneDetector.suggestManualTimeZone(manualTimeZoneSuggestion);
    }

    @Override