fileinfo 实现Serializable接口
if (fileIntent != null) {
Bundle bundle = fileIntent.getExtras();if (bundle != null) {
folderPath = (String) bundle.get("folderPath");
mFileNameList = (List<FileInfo>) bundle
.getSerializable("files");
Log.i(TAG, folderPath);
Log.i(TAG, mFileNameList.size() + "");
if (folderPath != null) {
initView();
return;
}
}
}
protected void start() {
PackageManager packageManager = this.getPackageManager();
Intent intent = new Intent();
try {
intent = packageManager
.getLaunchIntentForPackage("com.example.aurorawallerpaper");
Bundle bundle = new Bundle();
Log.i(TAG, getFolderPath());
bundle.putString("folderPath", getFolderPath());
Log.i(TAG, mFileNameList.size() + "");
bundle.putSerializable("files", (Serializable) mFileNameList);
intent.putExtras(bundle);
startActivity(intent);
super.finish();
} catch (Exception e) {
Log.i(TAG, e.getMessage());
}
}