23 lines
495 B
Plaintext
23 lines
495 B
Plaintext
![]() |
include::../description.adoc[]
|
||
|
|
||
|
include::../ask-yourself.adoc[]
|
||
|
|
||
|
include::../recommended.adoc[]
|
||
|
|
||
|
== Sensitive Code Example
|
||
|
|
||
|
----
|
||
|
import android.content.Context;
|
||
|
import android.os.Environment;
|
||
|
|
||
|
public class AccessExternalFiles {
|
||
|
|
||
|
public void accessFiles(Context context) {
|
||
|
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); // Sensitive
|
||
|
context.getExternalFilesDir(Environment.DIRECTORY_PICTURES); // Sensitive
|
||
|
}
|
||
|
}
|
||
|
----
|
||
|
|
||
|
include::../see.adoc[]
|