@@ -58,13 +58,13 @@ static void copyStreams(InputStream is, FileOutputStream fos)
58
58
}
59
59
}
60
60
61
- public static void extractAssets (Context context , ExtractPolicy extractPolicy , boolean writableAssets )
61
+ public static void extractAssets (Context context , ExtractPolicy extractPolicy )
62
62
{
63
63
String appRoot = getAppRoot (context );
64
64
65
65
if (extractPolicy .extract (appRoot ))
66
66
{
67
- extractAssetsHelper (context , extractPolicy , writableAssets );
67
+ extractAssetsHelper (context , extractPolicy );
68
68
}
69
69
}
70
70
@@ -73,18 +73,13 @@ private static String getAppRoot(Context context)
73
73
return context .getFilesDir ().getPath ();
74
74
}
75
75
76
- private static void extractAssetsHelper (Context context , ExtractPolicy extractPolicy , boolean writableAssets )
76
+ private static void extractAssetsHelper (Context context , ExtractPolicy extractPolicy )
77
77
{
78
78
try
79
79
{
80
80
Runtime runtime = Runtime .getRuntime ();
81
81
String appRoot = getAppRoot (context );
82
82
83
- if (writableAssets )
84
- {
85
- runtime .exec ("chmod 777 " + appRoot );
86
- }
87
-
88
83
String packageCodePath = context .getPackageCodePath ();
89
84
Log .i (Platform .DEFAULT_LOG_TAG , "extractAssets: from " + packageCodePath );
90
85
File zipFile = new File (packageCodePath );
@@ -117,16 +112,6 @@ private static void extractAssetsHelper(Context context, ExtractPolicy extractPo
117
112
fos = new FileOutputStream (outputFile );
118
113
copyStreams (zip .getInputStream (entry ), fos );
119
114
Log ("Copied " + entry + " to " + appRoot + "/" + path );
120
- String curPath = outputFile .getAbsolutePath ();
121
- if (writableAssets )
122
- {
123
- do
124
- {
125
- runtime .exec ("chmod 777 " + curPath );
126
- curPath = new File (curPath ).getParent ();
127
- }
128
- while (!curPath .equals (appRoot ));
129
- }
130
115
}
131
116
finally
132
117
{
0 commit comments