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 /cmds/requestsync | |
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 'cmds/requestsync')
-rw-r--r-- | cmds/requestsync/src/com/android/commands/requestsync/RequestSync.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmds/requestsync/src/com/android/commands/requestsync/RequestSync.java b/cmds/requestsync/src/com/android/commands/requestsync/RequestSync.java index 808618f28666..50ee56455b48 100644 --- a/cmds/requestsync/src/com/android/commands/requestsync/RequestSync.java +++ b/cmds/requestsync/src/com/android/commands/requestsync/RequestSync.java @@ -128,15 +128,15 @@ public class RequestSync { } else if (opt.equals("--el") || opt.equals("--extra-long")) { final String key = nextArgRequired(); final String value = nextArgRequired(); - mExtras.putLong(key, Long.valueOf(value)); + mExtras.putLong(key, Long.parseLong(value)); } else if (opt.equals("--ef") || opt.equals("--extra-float")) { final String key = nextArgRequired(); final String value = nextArgRequired(); - mExtras.putFloat(key, Long.valueOf(value)); + mExtras.putFloat(key, Long.parseLong(value)); } else if (opt.equals("--ed") || opt.equals("--extra-double")) { final String key = nextArgRequired(); final String value = nextArgRequired(); - mExtras.putFloat(key, Long.valueOf(value)); + mExtras.putFloat(key, Long.parseLong(value)); } else if (opt.equals("--ez") || opt.equals("--extra-bool")) { final String key = nextArgRequired(); final String value = nextArgRequired(); |