DJHartley / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

Enhancement: getTypeCount in DexBackedDexFile #230

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In DexBackedDexFile, one can retrieve types using getType(n) where n is the 
index of the type to retrieve. At the moment, there is however no possibility 
to get the range, i.e. one does not know the highest valid type index. Inside 
the code of DexBackedDexFile, there is a range check that throws an exception 
if the index is higher than "typeCount" which is a private variable. If one 
wants to retrieve all types, one can thus currently only try all indices until 
an exception is thrown. It would thus be great to have a getter for "typeCount" 
to know when to stop.

Original issue reported on code.google.com by Steven.A...@googlemail.com on 20 Nov 2014 at 1:22

GoogleCodeExporter commented 9 years ago
Implemented in 
https://code.google.com/p/smali/source/detail?r=d15e31526fe157bb4baaa0b4bb3b27b7
39d1a2be

Original comment by jesusfreke@jesusfreke.com on 28 Dec 2014 at 8:27