use of com.android.gallery3d.ingest.data.MtpClient in project android_packages_apps_Gallery2 by LineageOS.
the class IngestService method onCreate.
@Override
public void onCreate() {
super.onCreate();
mScannerClient = new ScannerClient(this);
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
mNotificationBuilder = new NotificationCompat.Builder(this);
// TODO(georgescu): Use a better drawable for the notificaton?
mNotificationBuilder.setSmallIcon(android.R.drawable.stat_notify_sync).setContentIntent(PendingIntent.getActivity(this, 0, new Intent(this, IngestActivity.class), 0));
mIndex = MtpDeviceIndex.getInstance();
mIndex.setProgressListener(this);
mClient = new MtpClient(getApplicationContext());
List<MtpDevice> devices = mClient.getDeviceList();
if (!devices.isEmpty()) {
setDevice(devices.get(0));
}
mClient.addListener(this);
}
Aggregations