OSDN Git Service

Fix getTempContainerId()
authorKenny Root <kroot@google.com>
Tue, 27 Jul 2010 22:18:38 +0000 (15:18 -0700)
committerKenny Root <kroot@google.com>
Wed, 28 Jul 2010 21:45:14 +0000 (14:45 -0700)
commitc78a8079740bfcad2e4439ccd74da52f6dc7fae2
tree32980045a8a1e809f407a9c7c9ba51d283bfd004
parent7feab3470156c7864fe159115d575c16f0974493
Fix getTempContainerId()

getTempContainerId() would always return "smdl2tmp1" unless you had
MAX_CONTAINERS number of SD card SDKs, because of an array sort that put
all the zeros at the beginning.

Switch from trying to find a hole in the series of numbers to just
getting a number that's one larger than the previous. This reduces the
algorithmic complexity and the memory requirements.

Bug: 2832580
Change-Id: I32dc75ef5a6645f594ea47b032d7402e8860ebcd
services/java/com/android/server/PackageManagerService.java