[Q] Why would this Smali have so many random getClass() calls?

I've been poking around the Service Mode app from my T-Mobile Note 4. Most of it's pretty straightforward, but I've found a bunch of places that have seemingly useless chunks of getClass() calls. Here's an example: .

It's a call that should always succeed, that should have no side effects (since the class will already have been loaded), and whose return value is being ignored. Oh, and is being called 5 times at the start of a line, if the debug info is to be trusted. I don't see any check-cast ops, and I can't think of any reason you'd want to try casting constant integers to a class, anyway.

Am I missing something here? Did Samsung write some really weird code? Or is this a side effect of something gone wrong with the deodexing or baksmali process?

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by gretchen65
17 minutes ago
Last post by tomas.wolff
51 minutes ago
Last post by dangelo13
4 hours ago
Last post by kris.douglas
4 hours ago