本文整理汇总了Java中com.android.ddmlib.FileListingService类的典型用法代码示例。如果您正苦于以下问题:Java FileListingService类的具体用法?Java FileListingService怎么用?Java FileListingService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FileListingService类属于com.android.ddmlib包,在下文中一共展示了FileListingService类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: switchDevice
import com.android.ddmlib.FileListingService; //导入依赖的package包/类
/**
* Sets the new device to explorer
*/
public void switchDevice(final IDevice device) {
if (device != mCurrentDevice) {
mCurrentDevice = device;
// now we change the input. but we need to do that in the
// ui thread.
if (mTree.isDisposed() == false) {
Display d = mTree.getDisplay();
d.asyncExec(new Runnable() {
@Override
public void run() {
if (mTree.isDisposed() == false) {
// new service
if (mCurrentDevice != null) {
FileListingService fls = mCurrentDevice.getFileListingService();
mContentProvider.setListingService(fls);
mTreeViewer.setInput(fls.getRoot());
}
}
}
});
}
}
}
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:27,代码来源:DeviceExplorer.java
示例2: getColumnImage
import com.android.ddmlib.FileListingService; //导入依赖的package包/类
@Override
public Image getColumnImage(Object element, int columnIndex) {
if (columnIndex == 0) {
if (element instanceof FileEntry) {
FileEntry entry = (FileEntry)element;
switch (entry.getType()) {
case FileListingService.TYPE_FILE:
case FileListingService.TYPE_LINK:
// get the name and extension
if (entry.isApplicationPackage()) {
return mPackageImage;
}
return mFileImage;
case FileListingService.TYPE_DIRECTORY:
case FileListingService.TYPE_DIRECTORY_LINK:
return mFolderImage;
}
}
// default case return a different image.
return mOtherImage;
}
return null;
}
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:25,代码来源:FileLabelProvider.java
示例3: hasChildren
import com.android.ddmlib.FileListingService; //导入依赖的package包/类
@Override
public boolean hasChildren(Object element) {
if (element instanceof FileEntry) {
FileEntry entry = (FileEntry)element;
return entry.getType() == FileListingService.TYPE_DIRECTORY;
}
return false;
}
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:10,代码来源:DeviceContentProvider.java
示例4: getFileListingService
import com.android.ddmlib.FileListingService; //导入依赖的package包/类
@Override
public FileListingService getFileListingService() {
// TODO Auto-generated method stub
return null;
}
开发者ID:MusalaSoft,项目名称:atmosphere-agent,代码行数:6,代码来源:ShellCommandExecutorTest.java
示例5: pull
import com.android.ddmlib.FileListingService; //导入依赖的package包/类
public void pull(FileListingService.FileEntry[] entries, String localPath)
throws AdbCommandRejectedException, IOException, TimeoutException, SyncException {
new File(localPath).mkdirs();
iDevice.getSyncService().pull(entries,localPath, getNullProgressMonitor());
}
开发者ID:apptik,项目名称:tarator,代码行数:6,代码来源:TaratorDevice.java
示例6: setListingService
import com.android.ddmlib.FileListingService; //导入依赖的package包/类
public void setListingService(FileListingService fls) {
mFileListingService = fls;
}
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:4,代码来源:DeviceContentProvider.java
示例7: run
import com.android.ddmlib.FileListingService; //导入依赖的package包/类
@Override
public void run(ISyncProgressMonitor monitor) throws SyncException,
TimeoutException, IOException {
try {
mSyncSvr = mCurDevice.getSyncService();
if ( mRemoteFullPath != null ) {
System.out.println("-->run:" + mRemoteFullPath);
System.out.println("-->run:" + mLocalName);
System.out.println("-->run:" + mFileSize);
SyncProgressMonitor syncMonitor = (SyncProgressMonitor) monitor;
MyProgessBar bar = (MyProgessBar) syncMonitor.getProgressMonitor();
bar.setMaximum(mFileSize);
mSyncSvr.pullFile(mRemoteFullPath, new File(mLocalName).getAbsolutePath(), monitor);
return;
}
String filePullName = null;
FileEntry singleEntry = null;
if (mRemoteFiles.length == 1) {
singleEntry = mRemoteFiles[0];
if (singleEntry.getType() == FileListingService.TYPE_FILE) {
filePullName = singleEntry.getName();
}
}
if (filePullName != null) {
mSyncSvr.pullFile(singleEntry,
new File(filePullName).getAbsolutePath(), monitor);
} else {
mSyncSvr.pull(mRemoteFiles, new File("./").getAbsolutePath(),
monitor);
}
} catch (AdbCommandRejectedException e) {
e.printStackTrace();
}
}
开发者ID:HoneyFish,项目名称:SmartTools,代码行数:46,代码来源:FileSyncHelper.java
示例8: getFileListingService
import com.android.ddmlib.FileListingService; //导入依赖的package包/类
@Override
public FileListingService getFileListingService() {
throw new UnsupportedOperationException();
}
开发者ID:saleehk,项目名称:buck-cutom,代码行数:5,代码来源:TestDevice.java
示例9: getFileListingService
import com.android.ddmlib.FileListingService; //导入依赖的package包/类
@Override
public FileListingService getFileListingService() {
// TODO Auto-generated method stub
return null;
}
开发者ID:oliver32767,项目名称:MonkeyBoard,代码行数:6,代码来源:DeviceController.java
示例10: setDeleteEnabledState
import com.android.ddmlib.FileListingService; //导入依赖的package包/类
/**
* Sets the enabled state based on a FileEntry properties
* @param element The selected FileEntry
*/
protected void setDeleteEnabledState(FileEntry element) {
mDeleteAction.setEnabled(element.getType() == FileListingService.TYPE_FILE);
}
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:8,代码来源:DeviceExplorer.java
注:本文中的com.android.ddmlib.FileListingService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论