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

Commit 3350b5e0 authored by Neil Fuller's avatar Neil Fuller
Browse files

Fix some errorprone warnings

This fixes various error prone warnings. All appear to be minor /
changes that won't affect functionality.

Test: build only
Change-Id: I693e0fcff489a522860bf90fd745f8c182699241
parent 8e8eaa86
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -84,6 +84,7 @@ public final class TimeDetectorService extends ITimeDetectorService.Stub {
        contentResolver.registerContentObserver(
        contentResolver.registerContentObserver(
                Settings.Global.getUriFor(Settings.Global.AUTO_TIME), true,
                Settings.Global.getUriFor(Settings.Global.AUTO_TIME), true,
                new ContentObserver(handler) {
                new ContentObserver(handler) {
                    @Override
                    public void onChange(boolean selfChange) {
                    public void onChange(boolean selfChange) {
                        timeDetectorService.handleAutoTimeDetectionChanged();
                        timeDetectorService.handleAutoTimeDetectionChanged();
                    }
                    }
+2 −2
Original line number Original line Diff line number Diff line
@@ -572,7 +572,7 @@ public final class TimeDetectorStrategyImpl implements TimeDetectorStrategy {
     */
     */
    @VisibleForTesting
    @VisibleForTesting
    @Nullable
    @Nullable
    public NetworkTimeSuggestion findLatestValidNetworkSuggestionForTests() {
    public synchronized NetworkTimeSuggestion findLatestValidNetworkSuggestionForTests() {
        return findLatestValidNetworkSuggestion();
        return findLatestValidNetworkSuggestion();
    }
    }


@@ -590,7 +590,7 @@ public final class TimeDetectorStrategyImpl implements TimeDetectorStrategy {
     */
     */
    @VisibleForTesting
    @VisibleForTesting
    @Nullable
    @Nullable
    public NetworkTimeSuggestion getLatestNetworkSuggestion() {
    public synchronized NetworkTimeSuggestion getLatestNetworkSuggestion() {
        return mLastNetworkSuggestion.get();
        return mLastNetworkSuggestion.get();
    }
    }


+2 −0
Original line number Original line Diff line number Diff line
@@ -87,6 +87,7 @@ public final class TimeZoneDetectorCallbackImpl implements TimeZoneDetectorStrat
        contentResolver.registerContentObserver(
        contentResolver.registerContentObserver(
                Settings.Global.getUriFor(Settings.Global.AUTO_TIME_ZONE), true,
                Settings.Global.getUriFor(Settings.Global.AUTO_TIME_ZONE), true,
                new ContentObserver(mHandler) {
                new ContentObserver(mHandler) {
                    @Override
                    public void onChange(boolean selfChange) {
                    public void onChange(boolean selfChange) {
                        handleConfigChangeOnHandlerThread();
                        handleConfigChangeOnHandlerThread();
                    }
                    }
@@ -97,6 +98,7 @@ public final class TimeZoneDetectorCallbackImpl implements TimeZoneDetectorStrat
                Settings.Secure.getUriFor(Settings.Secure.LOCATION_TIME_ZONE_DETECTION_ENABLED),
                Settings.Secure.getUriFor(Settings.Secure.LOCATION_TIME_ZONE_DETECTION_ENABLED),
                true,
                true,
                new ContentObserver(mHandler) {
                new ContentObserver(mHandler) {
                    @Override
                    public void onChange(boolean selfChange) {
                    public void onChange(boolean selfChange) {
                        handleConfigChangeOnHandlerThread();
                        handleConfigChangeOnHandlerThread();
                    }
                    }
+1 −1
Original line number Original line Diff line number Diff line
@@ -333,7 +333,7 @@ public final class TimeZoneDetectorService extends ITimeZoneDetectorService.Stub
    public void onShellCommand(FileDescriptor in, FileDescriptor out,
    public void onShellCommand(FileDescriptor in, FileDescriptor out,
            FileDescriptor err, String[] args, ShellCallback callback,
            FileDescriptor err, String[] args, ShellCallback callback,
            ResultReceiver resultReceiver) {
            ResultReceiver resultReceiver) {
        (new TimeZoneDetectorShellCommand(this)).exec(
        new TimeZoneDetectorShellCommand(this).exec(
                this, in, out, err, args, callback, resultReceiver);
                this, in, out, err, args, callback, resultReceiver);
    }
    }
}
}
+2 −2
Original line number Original line Diff line number Diff line
@@ -644,7 +644,7 @@ public final class TimeZoneDetectorStrategyImpl implements TimeZoneDetectorStrat
     * A method used to inspect strategy state during tests. Not intended for general use.
     * A method used to inspect strategy state during tests. Not intended for general use.
     */
     */
    @VisibleForTesting
    @VisibleForTesting
    public GeolocationTimeZoneSuggestion getLatestGeolocationSuggestion() {
    public synchronized GeolocationTimeZoneSuggestion getLatestGeolocationSuggestion() {
        return mLatestGeoLocationSuggestion.get();
        return mLatestGeoLocationSuggestion.get();
    }
    }


@@ -652,7 +652,7 @@ public final class TimeZoneDetectorStrategyImpl implements TimeZoneDetectorStrat
     * A {@link TelephonyTimeZoneSuggestion} with additional qualifying metadata.
     * A {@link TelephonyTimeZoneSuggestion} with additional qualifying metadata.
     */
     */
    @VisibleForTesting
    @VisibleForTesting
    public static class QualifiedTelephonyTimeZoneSuggestion {
    public static final class QualifiedTelephonyTimeZoneSuggestion {


        @VisibleForTesting
        @VisibleForTesting
        public final TelephonyTimeZoneSuggestion suggestion;
        public final TelephonyTimeZoneSuggestion suggestion;