INNER CODE UNIT · Java
onReceive
google/bundletool · src/main/dex_src/com/google/android/archive/UpdateBroadcastReceiver.java:28
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_MY_PACKAGE_REPLACED)) {
deleteDir(context.getCacheDir());
}
}
private static void deleteDir(File dir) {
File[] contents = dir.listFiles();
if (contents != null) {
for (File file : contents) {
deleteDir(file);
}
}
dir.delete();
}
}