Try harder to make webview localStorage work on different versions. I suspect that's what #73 is about.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 7m43s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 7m43s
This commit is contained in:
parent
95d036e34a
commit
ae096b2c9c
@ -165,6 +165,8 @@ public class TildeFriendsActivity extends Activity {
|
|||||||
web_view.getSettings().setDatabaseEnabled(true);
|
web_view.getSettings().setDatabaseEnabled(true);
|
||||||
web_view.getSettings().setDomStorageEnabled(true);
|
web_view.getSettings().setDomStorageEnabled(true);
|
||||||
|
|
||||||
|
set_database_path();
|
||||||
|
|
||||||
web_view.setDownloadListener(new DownloadListener() {
|
web_view.setDownloadListener(new DownloadListener() {
|
||||||
public void onDownloadStart(String url, String userAgent, String content_disposition, String mime_type, long content_length) {
|
public void onDownloadStart(String url, String userAgent, String content_disposition, String mime_type, long content_length) {
|
||||||
Log.w("tildefriends", "Let's download: " + url + " (" + content_disposition + ")");
|
Log.w("tildefriends", "Let's download: " + url + " (" + content_disposition + ")");
|
||||||
@ -458,4 +460,12 @@ public class TildeFriendsActivity extends Activity {
|
|||||||
s_activity.service_connection = null;
|
s_activity.service_connection = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
private void set_database_path()
|
||||||
|
{
|
||||||
|
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.KITKAT) {
|
||||||
|
web_view.getSettings().setDatabasePath(getDatabasePath("webview").getPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user