赞
踩
去掉USB读写权限受权对话框:
要受权 ES文件浏览器 访问您 *** 上的数据 (包括照片和视频)吗?java
修改:android
--- a/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/OpenExternalDirectoryActivity.java
+++ b/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/OpenExternalDirectoryActivity.java
@@ -454,6 +454,17 @@ public class OpenExternalDirectoryActivity extends Activity {
mActivity.finish();
}
};
+ // Auto granted
+ String pkgName = mActivity.getCallingPackage();
+ android.util.Log.i("AZ", "GRANT.CallingPackage=" + pkgName);
+ if("com.dachen.openlive".equals(pkgName)
+ || "com.dachen.openmeeting".equals(pkgName)
+ || "com.estrongs.android.pop".equals(pkgName)){
+ Intent intent = createGrantedUriPermissionsIntent(mActivity, mActivity.getExternalStorageClient(), mFile);
+ logValidScopedAccessRequest(mActivity, directory, SCOPED_DIRECTORY_ACCESS_GRANTED);
+ mActivity.setResult(RESULT_OK, intent);
+ mActivity.finish();
+ }
@SuppressLint("InflateParams")
// It's ok pass null ViewRoot on AlertDialogs.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。