Loading android/app/tests/AndroidManifest.xml +2 −1 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.bluetooth.tests"> package="com.android.bluetooth.tests" android:sharedUserId="android.uid.bluetooth"> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE" /> Loading android/app/tests/src/com/android/bluetooth/core/FileSystemWriteTest.java 0 → 100644 +39 −0 Original line number Diff line number Diff line package com.android.bluetooth; import android.test.AndroidTestCase; import java.io.IOException; import java.io.File; // Test Bluetooth's ability to write to the different directories that it // is supposed to own public class FileSystemWriteTest extends AndroidTestCase { public void testBluetoothDirWrite() { try { File file = new File("/data/misc/bluetooth/test.file"); assertTrue("File not created", file.createNewFile()); file.delete(); } catch (IOException e) { fail("Exception creating file /data/misc/bluetooth/test.file: " + e); } } public void testBluedroidDirWrite() { try { File file = new File("/data/misc/bluedroid/test.file"); assertTrue("File not created", file.createNewFile()); file.delete(); } catch (IOException e) { fail("Exception creating file /data/misc/bluedroid/test.file: " + e); } } public void testBluetoothLogsDirWrite() { try { File file = new File("/data/misc/bluetooth/logs/test.file"); assertTrue("File not created", file.createNewFile()); file.delete(); } catch (IOException e) { fail("Exception creating file /data/misc/bluetooth/logs/test.file: " + e); } } } Loading
android/app/tests/AndroidManifest.xml +2 −1 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.bluetooth.tests"> package="com.android.bluetooth.tests" android:sharedUserId="android.uid.bluetooth"> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_SHARE" /> Loading
android/app/tests/src/com/android/bluetooth/core/FileSystemWriteTest.java 0 → 100644 +39 −0 Original line number Diff line number Diff line package com.android.bluetooth; import android.test.AndroidTestCase; import java.io.IOException; import java.io.File; // Test Bluetooth's ability to write to the different directories that it // is supposed to own public class FileSystemWriteTest extends AndroidTestCase { public void testBluetoothDirWrite() { try { File file = new File("/data/misc/bluetooth/test.file"); assertTrue("File not created", file.createNewFile()); file.delete(); } catch (IOException e) { fail("Exception creating file /data/misc/bluetooth/test.file: " + e); } } public void testBluedroidDirWrite() { try { File file = new File("/data/misc/bluedroid/test.file"); assertTrue("File not created", file.createNewFile()); file.delete(); } catch (IOException e) { fail("Exception creating file /data/misc/bluedroid/test.file: " + e); } } public void testBluetoothLogsDirWrite() { try { File file = new File("/data/misc/bluetooth/logs/test.file"); assertTrue("File not created", file.createNewFile()); file.delete(); } catch (IOException e) { fail("Exception creating file /data/misc/bluetooth/logs/test.file: " + e); } } }