| package test.pkg; |
| |
| import java.io.File; |
| import java.io.IOException; |
| import java.io.OutputStream; |
| import java.io.InputStream; |
| import java.io.FileNotFoundException; |
| import android.content.Context; |
| import android.content.SharedPreferences; |
| import android.app.Activity; |
| import android.os.Bundle; |
| |
| public class WorldWriteableFile { |
| File mFile; |
| Context mContext; |
| |
| public void foo() { |
| OutputStream out = null; |
| SharedPreferences prefs = null; |
| |
| boolean success = false; |
| try { |
| out = openFileOutput(mFile.getName()); // ok |
| out = openFileOutput(mFile.getName(), MODE_PRIVATE); // ok |
| out = openFileOutput(mFile.getName(), MODE_WORLD_WRITEABLE); |
| out = openFileOutput(mFile.getName(), MODE_WORLD_READABLE); |
| |
| prefs = getSharedPreferences(mContext, 0); // ok |
| prefs = getSharedPreferences(mContext, MODE_PRIVATE); // ok |
| prefs = getSharedPreferences(mContext, MODE_WORLD_WRITEABLE); |
| prefs = getSharedPreferences(mContext, MODE_WORLD_READABLE); |
| // Flickr.get().downloadPhoto(params[0], Flickr.PhotoSize.LARGE, |
| // out); |
| success = true; |
| } catch (FileNotFoundException e) { |
| } |
| } |
| } |