Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. private void Check() {
  2. String bootanimation = "bootanimation.zip";
  3. String system = "/system/media/";
  4. String data = "/data/local/";
  5. File sd = Environment.getExternalStorageDirectory();
  6. File systemfile = new File(system, bootanimation);
  7. File datafile = new File(data, bootanimation);
  8. File sdfile = new File(sd, bootanimation);
  9. Context context = getApplicationContext();
  10. if (systemfile.exists()) {
  11. Toast.makeText(context, bootanimation + " " + "located in /system", 0).show();
  12. systemfile.renameTo(sdfile);
  13. if (sdfile.exists()){
  14. Toast.makeText(context, bootanimation + " " + "moved to sdcard.", 0).show();
  15. }
  16. }
  17. if (datafile.exists()){
  18. Toast.makeText(context, bootanimation + " " + "located in /data", 0).show();
  19. datafile.renameTo(sdfile);
  20. if (sdfile.exists()){
  21. Toast.makeText(context, bootanimation + " " + "moved to sdcard.", 0).show();
  22. }
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement