Research Article
Selecting Critical Data Flows in Android Applications for Abnormal Behavior Detection
Box 1
Android location leak example.
() void onCreate() | () locationManager = (LocationManager) | getSystemService(Context.LOCATION_SERVICE); | () Location location = locationManager | .getLastKnownLocation(LocationManager.GPS_PROVIDER); | () String content = “Longitude:” + location.getLongitude() | + “Latitude:” + location.getLatitude(); | () String file = this.getFilesDir() + “/privacyfile.txt”; | () FileUtils.stringToFile(file,content); | () |
|