在api级别19应用程序在计算垃圾文件时发出此异常... 我知道它有一些迭代问题,但是如何克服它
protected Void doInBackground(Void... params)
{
m_oNotificationManager =(NotificationManager)oContext.getSystemService(Context.NOTIFICATION_SERVICE);
m_o_globalClass = (GlobalClass) oContext.getApplicationContext();
StorageDetect.prepareStorageList(oContext);
if(m_o_globalClass != null)
{
m_o_globalClass.getJunkManager().initReclaimable((byte) (JunkManager.m_kEmpty | JunkManager.m_kLog | JunkManager.m_kTemp));
for (Storage obj : m_o_globalClass.getStorageList())
{
// sz_storage contain the path(mountpoint) of the the storage.
String sz_storage = obj.m_sz_path;
File o_file = new File(sz_storage);
//here condition checking for usb.if mount point will contain the below keyword than it will not find the file for this mount point.
if (o_file.toString().toLowerCase().contains("usb") || o_file.toString().toLowerCase().contains("usbdisk") || o_file.toString().toLowerCase().contains("usbcard") || o_file.toString().equals(Environment.getDataDirectory().getPath()))
{
continue;
}
getEmptyFolder(o_file);
getLogFile(o_file);
getTempFile(o_file);
}
}
return null;
}