Stale cache management to address a P1 bug # 3296131.
Change-Id: I593f35a91c4a14c055828f8989fe01b9e7790039
This commit is contained in:
@@ -77,8 +77,14 @@ public class ScriptC extends Script {
|
||||
|
||||
rs.nScriptCBegin();
|
||||
rs.nScriptCSetScript(pgm, 0, pgmLength);
|
||||
Log.v(TAG, "Create script for resource = " + resources.getResourceName(resourceID));
|
||||
|
||||
// E.g, /system/apps/Fountain.apk
|
||||
String packageName = rs.getApplicationContext().getPackageResourcePath();
|
||||
// For res/raw/fountain.bc, it wil be /com.android.fountain:raw/fountain
|
||||
String resName = resources.getResourceName(resourceID);
|
||||
String cacheDir = rs.getApplicationContext().getCacheDir().toString();
|
||||
return rs.nScriptCCreate(resources.getResourceName(resourceID), cacheDir);
|
||||
|
||||
Log.v(TAG, "Create script for resource = " + resName);
|
||||
return rs.nScriptCCreate(packageName, resName, cacheDir);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user