Bug 886627 - Add AndroidBridge directory API; r=rbarker
This commit is contained in:
@@ -2135,3 +2135,14 @@ nsresult AndroidBridge::InputStreamRead(jobject obj, char *aBuf, uint32_t aCount
|
||||
*aRead = read;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult AndroidBridge::GetExternalPublicDirectory(const nsAString& aType, nsAString& aPath) {
|
||||
AutoLocalJNIFrame frame(1);
|
||||
const jstring path = GeckoAppShell::GetExternalPublicDirectory(aType);
|
||||
if (!path) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
nsJNIString pathStr(path, frame.GetEnv());
|
||||
aPath.Assign(pathStr);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user