Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Check() {
- String bootanimation = "bootanimation.zip";
- String system = "/system/media/";
- String data = "/data/local/";
- File sd = Environment.getExternalStorageDirectory();
- File systemfile = new File(system, bootanimation);
- File datafile = new File(data, bootanimation);
- File sdfile = new File(sd, bootanimation);
- Context context = getApplicationContext();
- if (systemfile.exists()) {
- Toast.makeText(context, bootanimation + " " + "located in /system", 0).show();
- systemfile.renameTo(sdfile);
- if (sdfile.exists()){
- Toast.makeText(context, bootanimation + " " + "moved to sdcard.", 0).show();
- }
- }
- if (datafile.exists()){
- Toast.makeText(context, bootanimation + " " + "located in /data", 0).show();
- datafile.renameTo(sdfile);
- if (sdfile.exists()){
- Toast.makeText(context, bootanimation + " " + "moved to sdcard.", 0).show();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement