diff options
author | Tobias Thierer <tobiast@google.com> | 2016-04-21 14:52:10 +0100 |
---|---|---|
committer | Tobias Thierer <tobiast@google.com> | 2016-04-22 13:36:53 +0100 |
commit | 28532d00267c73b8e0fa5235169fa72c414e1cd0 (patch) | |
tree | 1a861369c0c84e0738a31645fe9964f4be334a41 /tests/LocationTracker | |
parent | 28b1df3b8abffc25fe0b04391e2ce4d0f8ece966 (diff) |
frameworks/base: Avoid Long object allocations in Long.valueOf()
Replace usages where the Long is immediately unboxed or thrown
away with Long.parseLong().
In TaskRecord.java, I also fixed up similar uses of
{Boolean,Integer}.valueOf()
Tested: built frameworks/base successfully.
Bug: 28289401
(cherry picked from commit 4bd017d6a5437f153b2b0a149a5dde0b85bf6907)
Change-Id: Icfa4708946e774f4a1bacf185c3fd11a7087017e
Diffstat (limited to 'tests/LocationTracker')
-rw-r--r-- | tests/LocationTracker/src/com/android/locationtracker/TrackerService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/LocationTracker/src/com/android/locationtracker/TrackerService.java b/tests/LocationTracker/src/com/android/locationtracker/TrackerService.java index e2332bfe4b8a..e4d21558b8f9 100644 --- a/tests/LocationTracker/src/com/android/locationtracker/TrackerService.java +++ b/tests/LocationTracker/src/com/android/locationtracker/TrackerService.java @@ -214,7 +214,7 @@ public class TrackerService extends Service { private long getLocationUpdateTime() { try { String timeString = getPreferences().getString(MIN_TIME_PREF, "0"); - long secondsTime = Long.valueOf(timeString); + long secondsTime = Long.parseLong(timeString); return secondsTime * 1000; } catch (NumberFormatException e) { |