Search in sources :

Example 1 with FileOutputStreamWithPath

use of com.android.server.pm.ShortcutService.FileOutputStreamWithPath in project android_frameworks_base by crdroidandroid.

the class ShortcutManagerTest1 method openIconFileForWriteAndGetPath.

protected File openIconFileForWriteAndGetPath(int userId, String packageName) throws IOException {
    // Shortcut IDs aren't used in the path, so just pass the same ID.
    final FileOutputStreamWithPath out = mService.openIconFileForWrite(userId, makePackageShortcut(packageName, "id"));
    out.close();
    return out.getFile();
}
Also used : FileOutputStreamWithPath(com.android.server.pm.ShortcutService.FileOutputStreamWithPath)

Example 2 with FileOutputStreamWithPath

use of com.android.server.pm.ShortcutService.FileOutputStreamWithPath in project platform_frameworks_base by android.

the class ShortcutManagerTest1 method openIconFileForWriteAndGetPath.

protected File openIconFileForWriteAndGetPath(int userId, String packageName) throws IOException {
    // Shortcut IDs aren't used in the path, so just pass the same ID.
    final FileOutputStreamWithPath out = mService.openIconFileForWrite(userId, makePackageShortcut(packageName, "id"));
    out.close();
    return out.getFile();
}
Also used : FileOutputStreamWithPath(com.android.server.pm.ShortcutService.FileOutputStreamWithPath)

Example 3 with FileOutputStreamWithPath

use of com.android.server.pm.ShortcutService.FileOutputStreamWithPath in project android_frameworks_base by DirtyUnicorns.

the class ShortcutManagerTest1 method openIconFileForWriteAndGetPath.

protected File openIconFileForWriteAndGetPath(int userId, String packageName) throws IOException {
    // Shortcut IDs aren't used in the path, so just pass the same ID.
    final FileOutputStreamWithPath out = mService.openIconFileForWrite(userId, makePackageShortcut(packageName, "id"));
    out.close();
    return out.getFile();
}
Also used : FileOutputStreamWithPath(com.android.server.pm.ShortcutService.FileOutputStreamWithPath)

Example 4 with FileOutputStreamWithPath

use of com.android.server.pm.ShortcutService.FileOutputStreamWithPath in project android_frameworks_base by ResurrectionRemix.

the class ShortcutManagerTest1 method openIconFileForWriteAndGetPath.

protected File openIconFileForWriteAndGetPath(int userId, String packageName) throws IOException {
    // Shortcut IDs aren't used in the path, so just pass the same ID.
    final FileOutputStreamWithPath out = mService.openIconFileForWrite(userId, makePackageShortcut(packageName, "id"));
    out.close();
    return out.getFile();
}
Also used : FileOutputStreamWithPath(com.android.server.pm.ShortcutService.FileOutputStreamWithPath)

Aggregations

FileOutputStreamWithPath (com.android.server.pm.ShortcutService.FileOutputStreamWithPath)4