summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Todd Poynor <toddpoynor@google.com> 2017-08-15 23:25:36 -0700
committer Todd Poynor <toddpoynor@google.com> 2017-08-16 08:01:12 +0000
commit6d5ce9e234868df79bb9e676c5e1bec3b64cc0c7 (patch)
tree92a067d36cb296165cb32f638eb6402c0c647737
parent84540a1656c115b806bbde2e29a72f39b55839ed (diff)
thermalservice: future-proofing fixup to Temperature constructor
Change the default constructor to leverage the constructor with params specified, to avoid future code duplication if more logic is added to constructors in the future. Test: manual: marlin with temporary java thermal event listener Bug: 30982366 Change-Id: I0be55fe2561f606ddf1bcebb98ae7e1120ff8d2d
-rw-r--r--core/java/android/os/Temperature.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/os/Temperature.java b/core/java/android/os/Temperature.java
index 3e48493a7a81..8767731e748a 100644
--- a/core/java/android/os/Temperature.java
+++ b/core/java/android/os/Temperature.java
@@ -30,8 +30,8 @@ public class Temperature implements Parcelable {
private int mType;
public Temperature() {
- mType = Integer.MIN_VALUE;
- mValue = HardwarePropertiesManager.UNDEFINED_TEMPERATURE;
+ this(HardwarePropertiesManager.UNDEFINED_TEMPERATURE,
+ Integer.MIN_VALUE);
}
public Temperature(float value, int type) {