1package com.android.bluetooth; 2 3import android.test.AndroidTestCase; 4import java.io.IOException; 5import java.io.File; 6 7// Test Bluetooth's ability to write to the different directories that it 8// is supposed to own 9public class FileSystemWriteTest extends AndroidTestCase { 10 public void testBluetoothDirWrite() { 11 try { 12 File file = new File("/data/misc/bluetooth/test.file"); 13 assertTrue("File not created", file.createNewFile()); 14 file.delete(); 15 } catch (IOException e) { 16 fail("Exception creating file /data/misc/bluetooth/test.file: " + e); 17 } 18 } 19 20 public void testBluedroidDirWrite() { 21 try { 22 File file = new File("/data/misc/bluedroid/test.file"); 23 assertTrue("File not created", file.createNewFile()); 24 file.delete(); 25 } catch (IOException e) { 26 fail("Exception creating file /data/misc/bluedroid/test.file: " + e); 27 } 28 } 29 30 public void testBluetoothLogsDirWrite() { 31 try { 32 File file = new File("/data/misc/bluetooth/logs/test.file"); 33 assertTrue("File not created", file.createNewFile()); 34 file.delete(); 35 } catch (IOException e) { 36 fail("Exception creating file /data/misc/bluetooth/logs/test.file: " + e); 37 } 38 } 39} 40