Delete system cache on android 6.0
<p>I'm using method <code>freeStorageAndNotify()</code> with permission <code>android.permission.CLEAR_APP_CACHE</code> to delete system cache of all installed applications. But the method started throwing <code>InvocationTargetException</code> from the android marshmallow 6.0 version. 
After googling the issues I found the same issue as reported here:
<a href="https://stackoverflow.com/questions/31989637/android-m-reflection-method-freestorageandnotify-exception">Android M reflection method freeStorageAndNotify exception</a>
So here the conclusion was, <code>freeStorageAndNotify()</code> stopped working since google has raised the method's signature level now to signature|system.</p>

<p>But now the question is how other third-party apps like 'Clean master' are still able to delete system cache of all installed applications by taking accessibility permission from the user for 6.0 devices?</p>