I stumbled on the same problem. On Samsung S5 Lollipop usage stats did not work with the following code:
Intent intent = new Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
However usage stats actually exist. With the following code one can open the security settings:
Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
intent.setComponent(new ComponentName("com.android.settings","com.android.settings.Settings$SecuritySettingsActivity"));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
An the scroll to the bottom and there is usage stats. I also inspeced logs and by pressing usage stats, you are directed to SubActivity which contains UsageStats fragment. I tried the following code:
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.settings", "com.android.settings.SubSettings"));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
But got security exception. The problem is that they didnt mark SubActivity as exported, so as far as I know its not possible to directly start SubActivity (usage stats window). The only solution is to take user to Securiy settings and them tell him to manually go to usage stats view and enable app.
If someone finds better solution it would be great!