You can call Activity.getResources().getConfiguration()
which will get you current Configuration - see the doc, you can get most of the info you need from there (namely, you'll want orientation and screenLayout), for screen density you'll want Activity.getResources().getDisplayMetrics()
and the density field. There's no way to retrieve actual layout path that I know of.
UPD
Hmm, take a look at this: LayoutInflater.inflate() - this is how it's working internally, if you dig deeper - it calls through to a native method that does the actual inflation, so no luck there, but maybe if you poke around with the xml parser, you'll find a way to do that. From the top of my head, you can add a comment to every layout and put the file's name into it. And then use Activity.getResources().getLayout(your_layout_id) to get the xml parser, then use the parser to get your comment out - that way you'll know exactly what file you just accessed.