The default bug view has changed. See this FAQ.

anp_system_getApplicationDataDirectory() is just plain wrong

RESOLVED FIXED

Status

()

Core
Plug-ins
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: blassey, Assigned: snorp)

Tracking

Trunk
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

this function should return a directory where the plugin can store data. Currently this can return a directory that doesn't exist (it just uses the MOZ_APP_NAME to construct the path) and if it does exist it is the top of our data dir, which is probably bad
It looks like stock browser might use /data/data/<package>/app_plugins/<plugin_package>, so I'll try to make that work.
Created attachment 574477 [details] [diff] [review]
Give Flash a valid application directory
Attachment #574477 - Flags: review?(blassey.bugs)
Comment on attachment 574477 [details] [diff] [review]
Give Flash a valid application directory

Review of attachment 574477 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/plugins/base/android/ANPSystem.cpp
@@ +58,5 @@
> +    dir = getenv("ANDROID_PLUGIN_DATADIR");
> +  }
> +
> +  LOG("getApplicationDataDirectory return %s", dir);
> +  return dir;

this should be <pluginDir>/<plugin-package>
Attachment #574477 - Flags: review?(blassey.bugs) → review-
(In reply to Brad Lassey [:blassey] from comment #3)
> Comment on attachment 574477 [details] [diff] [review] [diff] [details] [review]
> Give Flash a valid application directory
> 
> Review of attachment 574477 [details] [diff] [review] [diff] [details] [review]:
> -----------------------------------------------------------------
> 
> ::: dom/plugins/base/android/ANPSystem.cpp
> @@ +58,5 @@
> > +    dir = getenv("ANDROID_PLUGIN_DATADIR");
> > +  }
> > +
> > +  LOG("getApplicationDataDirectory return %s", dir);
> > +  return dir;
> 
> this should be <pluginDir>/<plugin-package>

As discussed on IRC, this function takes no arguments so I think it's working as designed. There is nothing to tie it to an instance, so the toplevel path is all we can return (and WebKit does basically the same thing).
Comment on attachment 574477 [details] [diff] [review]
Give Flash a valid application directory

after talking to snorp on irc, the flash plugin is creating its own subdir with its package name.
Attachment #574477 - Flags: review- → review+
https://hg.mozilla.org/projects/birch/rev/151de04e6bd6
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.