|
@@ -4,6 +4,7 @@ import android.graphics.Canvas;
|
4
|
4
|
import android.graphics.Color;
|
5
|
5
|
import android.os.Bundle;
|
6
|
6
|
import android.os.Environment;
|
|
7
|
+import android.content.Context;
|
7
|
8
|
import android.view.LayoutInflater;
|
8
|
9
|
import android.view.MotionEvent;
|
9
|
10
|
import android.view.View;
|
|
@@ -35,8 +36,9 @@ public class ConsentFragment extends Fragment {
|
35
|
36
|
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
36
|
37
|
View view = inflater.inflate(R.layout.fragment_consent, container, false);
|
37
|
38
|
|
|
39
|
+ Context context = getContext();
|
38
|
40
|
this.pdfView = view.findViewById(R.id.pdf_viewer);
|
39
|
|
- File consentFile = new File(Environment.getExternalStorageDirectory().getPath() + getString(R.string.consentFileName));
|
|
41
|
+ File consentFile = new File(context.getExternalFilesDir(null).getPath() + getString(R.string.consentFileName));
|
40
|
42
|
this.pdfView.fromFile(consentFile)
|
41
|
43
|
.password(null)
|
42
|
44
|
.defaultPage(0)
|