So, actually, you need to find out not a package name, but apt-file in file system, which contains loaded class, don't you? In that case it's deal of ClassLoader. It loads first class that can be found in classpath, and it only knows where file is located.
I'm not familiar with android framework, and you have to investigate yourself whether its classLoader stores this information or not. In case it doesn't you would have to implement some kind of workaround... or replace system classLoader with your implementation.