Loading src/com/android/settings/datetime/timezone/TimeZoneSettings.java +17 −7 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.content.Intent; import android.content.SharedPreferences; import android.icu.util.TimeZone; import android.os.Bundle; import android.provider.Settings; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; Loading Loading @@ -353,6 +354,7 @@ public class TimeZoneSettings extends DashboardFragment { * Find the a region associated with the specified time zone, based on the time zone data. * If there are multiple regions associated with the given time zone, the priority will be given * to the region the user last picked and the country in user's locale. * * @return null if no region associated with the time zone */ private String findRegionIdForTzId(String tzId) { Loading Loading @@ -392,5 +394,13 @@ public class TimeZoneSettings extends DashboardFragment { } public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = new BaseSearchIndexProvider(R.xml.time_zone_prefs); new BaseSearchIndexProvider(R.xml.time_zone_prefs) { @Override protected boolean isPageSearchEnabled(Context context) { // We can't enter this page if the auto time zone is enabled. final int autoTimeZone = Settings.Global.getInt(context.getContentResolver(), Settings.Global.AUTO_TIME_ZONE, 1); return autoTimeZone == 1 ? false : true; } }; } Loading
src/com/android/settings/datetime/timezone/TimeZoneSettings.java +17 −7 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.content.Intent; import android.content.SharedPreferences; import android.icu.util.TimeZone; import android.os.Bundle; import android.provider.Settings; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; Loading Loading @@ -353,6 +354,7 @@ public class TimeZoneSettings extends DashboardFragment { * Find the a region associated with the specified time zone, based on the time zone data. * If there are multiple regions associated with the given time zone, the priority will be given * to the region the user last picked and the country in user's locale. * * @return null if no region associated with the time zone */ private String findRegionIdForTzId(String tzId) { Loading Loading @@ -392,5 +394,13 @@ public class TimeZoneSettings extends DashboardFragment { } public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = new BaseSearchIndexProvider(R.xml.time_zone_prefs); new BaseSearchIndexProvider(R.xml.time_zone_prefs) { @Override protected boolean isPageSearchEnabled(Context context) { // We can't enter this page if the auto time zone is enabled. final int autoTimeZone = Settings.Global.getInt(context.getContentResolver(), Settings.Global.AUTO_TIME_ZONE, 1); return autoTimeZone == 1 ? false : true; } }; }