Merge "Tidy up changes for TimeZoneDetectorStrategy"
am: c5725ad0a7
Change-Id: I96d8e84c8f0c6d378b8f25027eb2429e9a377652
This commit is contained in:
@@ -385,7 +385,7 @@ public class TimeZoneDetectorStrategy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isOriginAutomatic(@Origin int origin) {
|
private static boolean isOriginAutomatic(@Origin int origin) {
|
||||||
return origin == ORIGIN_PHONE;
|
return origin != ORIGIN_MANUAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@GuardedBy("this")
|
@GuardedBy("this")
|
||||||
@@ -456,15 +456,17 @@ public class TimeZoneDetectorStrategy {
|
|||||||
* Dumps internal state such as field values.
|
* Dumps internal state such as field values.
|
||||||
*/
|
*/
|
||||||
public synchronized void dumpState(PrintWriter pw, String[] args) {
|
public synchronized void dumpState(PrintWriter pw, String[] args) {
|
||||||
pw.println("TimeZoneDetectorStrategy:");
|
IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " ");
|
||||||
pw.println("mCallback.isTimeZoneDetectionEnabled()="
|
ipw.println("TimeZoneDetectorStrategy:");
|
||||||
|
|
||||||
|
ipw.increaseIndent(); // level 1
|
||||||
|
ipw.println("mCallback.isTimeZoneDetectionEnabled()="
|
||||||
+ mCallback.isAutoTimeZoneDetectionEnabled());
|
+ mCallback.isAutoTimeZoneDetectionEnabled());
|
||||||
pw.println("mCallback.isDeviceTimeZoneInitialized()="
|
ipw.println("mCallback.isDeviceTimeZoneInitialized()="
|
||||||
+ mCallback.isDeviceTimeZoneInitialized());
|
+ mCallback.isDeviceTimeZoneInitialized());
|
||||||
pw.println("mCallback.getDeviceTimeZone()="
|
ipw.println("mCallback.getDeviceTimeZone()="
|
||||||
+ mCallback.getDeviceTimeZone());
|
+ mCallback.getDeviceTimeZone());
|
||||||
|
|
||||||
IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " ");
|
|
||||||
ipw.println("Time zone change log:");
|
ipw.println("Time zone change log:");
|
||||||
ipw.increaseIndent(); // level 2
|
ipw.increaseIndent(); // level 2
|
||||||
mTimeZoneChangesLog.dump(ipw);
|
mTimeZoneChangesLog.dump(ipw);
|
||||||
@@ -485,8 +487,6 @@ public class TimeZoneDetectorStrategy {
|
|||||||
ipw.decreaseIndent(); // level 2
|
ipw.decreaseIndent(); // level 2
|
||||||
ipw.decreaseIndent(); // level 1
|
ipw.decreaseIndent(); // level 1
|
||||||
ipw.flush();
|
ipw.flush();
|
||||||
|
|
||||||
pw.flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user