Loading services/core/java/com/android/server/timezonedetector/TimeZoneDetectorCallbackImpl.java +8 −5 Original line number Diff line number Diff line Loading @@ -117,12 +117,13 @@ public final class TimeZoneDetectorCallbackImpl implements TimeZoneDetectorStrat @Override public ConfigurationInternal getConfigurationInternal(@UserIdInt int userId) { boolean geoDetectionEnabled = mGeoDetectionFeatureEnabled && isGeoDetectionEnabled(userId); return new ConfigurationInternal.Builder(userId) .setUserConfigAllowed(isUserConfigAllowed(userId)) .setAutoDetectionSupported(isAutoDetectionSupported()) .setAutoDetectionEnabled(isAutoDetectionEnabled()) .setLocationEnabled(isLocationEnabled(userId)) .setGeoDetectionEnabled(isGeoDetectionEnabled(userId)) .setGeoDetectionEnabled(geoDetectionEnabled) .build(); } Loading Loading @@ -167,11 +168,13 @@ public final class TimeZoneDetectorCallbackImpl implements TimeZoneDetectorStrat final boolean autoDetectionEnabled = configuration.isAutoDetectionEnabled(); setAutoDetectionEnabled(autoDetectionEnabled); if (mGeoDetectionFeatureEnabled) { final int userId = configuration.getUserId(); final boolean geoTzDetectionEnabled = configuration.isGeoDetectionEnabled(); setGeoDetectionEnabled(userId, geoTzDetectionEnabled); } } } private boolean isUserConfigAllowed(@UserIdInt int userId) { UserHandle userHandle = UserHandle.of(userId); Loading Loading
services/core/java/com/android/server/timezonedetector/TimeZoneDetectorCallbackImpl.java +8 −5 Original line number Diff line number Diff line Loading @@ -117,12 +117,13 @@ public final class TimeZoneDetectorCallbackImpl implements TimeZoneDetectorStrat @Override public ConfigurationInternal getConfigurationInternal(@UserIdInt int userId) { boolean geoDetectionEnabled = mGeoDetectionFeatureEnabled && isGeoDetectionEnabled(userId); return new ConfigurationInternal.Builder(userId) .setUserConfigAllowed(isUserConfigAllowed(userId)) .setAutoDetectionSupported(isAutoDetectionSupported()) .setAutoDetectionEnabled(isAutoDetectionEnabled()) .setLocationEnabled(isLocationEnabled(userId)) .setGeoDetectionEnabled(isGeoDetectionEnabled(userId)) .setGeoDetectionEnabled(geoDetectionEnabled) .build(); } Loading Loading @@ -167,11 +168,13 @@ public final class TimeZoneDetectorCallbackImpl implements TimeZoneDetectorStrat final boolean autoDetectionEnabled = configuration.isAutoDetectionEnabled(); setAutoDetectionEnabled(autoDetectionEnabled); if (mGeoDetectionFeatureEnabled) { final int userId = configuration.getUserId(); final boolean geoTzDetectionEnabled = configuration.isGeoDetectionEnabled(); setGeoDetectionEnabled(userId, geoTzDetectionEnabled); } } } private boolean isUserConfigAllowed(@UserIdInt int userId) { UserHandle userHandle = UserHandle.of(userId); Loading