The best option I found and the less intrusive, is to set a tag param in your xml, like
PHONE XML LAYOUT
TABLET XML LAYOUT
...
and then call this in your activity class:
View viewPager = findViewById(R.id.pager);
Log.d(getClass().getSimpleName(), String.valueOf(viewPager.getTag()));
Hope it works for u.