Advertisement
Guest User

Untitled

a guest
Oct 30th, 2010
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.56 KB | None | 0 0
  1.         private boolean isrootallowed(File bp)
  2.         {
  3.                 ArrayList<File> l = new ArrayList<File>();
  4.  
  5.                 l.add( new File("/"));
  6.                 l.add( new File("/sdcard"));
  7.                 l.add( new File("/mnt/sdcard"));
  8.  
  9.                 l.addAll( Arrays.asList( new File("/").listFiles()) );
  10.  
  11.                 for (int i = 0; i < l.size(); i++) {
  12.  
  13.                         if (l.get(i).equals(bp)) {
  14.                                 return false;
  15.                         }
  16.                 }
  17.  
  18.                 return true;
  19.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement