List of usage examples for android.mtp MtpDeviceInfo getModel
public final @NonNull String getModel()
From source file:com.android.gallery3d2.ingest.IngestService.java
private void setDevice(MtpDevice device) { if (mDevice == device) return;// w ww .j a v a2 s .c om mRedeliverImportFinish = false; mRedeliverObjectsNotImported = null; mRedeliverNotifyIndexChanged = false; mRedeliverIndexFinish = false; mDevice = device; mIndex.setDevice(mDevice); if (mDevice != null) { MtpDeviceInfo deviceInfo = mDevice.getDeviceInfo(); if (deviceInfo == null) { setDevice(null); return; } else { mDevicePrettyName = deviceInfo.getModel(); mNotificationBuilder.setContentTitle(mDevicePrettyName); new Thread(mIndex.getIndexRunnable()).start(); } } else { mDevicePrettyName = null; } if (mClientActivity != null) { mClientActivity.notifyIndexChanged(); } else { mRedeliverNotifyIndexChanged = true; } }
From source file:com.android.gallery3d.ingest.IngestService.java
private void setDevice(MtpDevice device) { if (mDevice == device) { return;//from ww w . j ava2 s .c om } mRedeliverImportFinish = false; mRedeliverObjectsNotImported = null; mRedeliverNotifyIndexChanged = false; mRedeliverIndexFinish = false; mDevice = device; mIndex.setDevice(mDevice); if (mDevice != null) { MtpDeviceInfo deviceInfo = mDevice.getDeviceInfo(); if (deviceInfo == null) { setDevice(null); return; } else { mDevicePrettyName = deviceInfo.getModel(); mNotificationBuilder.setContentTitle(mDevicePrettyName); new Thread(mIndex.getIndexRunnable()).start(); } } else { mDevicePrettyName = null; } if (mClientActivity != null) { mClientActivity.notifyIndexChanged(); } else { mRedeliverNotifyIndexChanged = true; } }