Skip to content

Commit

Permalink
fix(android): allow WebView.setData() to decrypt assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Mathews committed Oct 31, 2019
1 parent 5b23802 commit c66c739
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
import android.webkit.WebSettings;
import android.webkit.WebView;

import javax.crypto.CipherInputStream;

@SuppressWarnings("deprecation")
public class TiUIWebView extends TiUIView
{
Expand Down Expand Up @@ -878,7 +880,7 @@ public void setData(TiBlob blob)
getWebView().getSettings().setLoadWithOverviewMode(true);
}

if (blob.getType() == TiBlob.TYPE_FILE) {
if (blob.getType() == TiBlob.TYPE_FILE && !(blob.getInputStream() instanceof CipherInputStream)) {
String fullPath = blob.getNativePath();
if (fullPath != null) {
setUrl(fullPath);
Expand Down

0 comments on commit c66c739

Please sign in to comment.