List of usage examples for android.content.pm ShortcutInfo getPackage
@NonNull
public String getPackage()
From source file:org.deviceconnect.android.deviceplugin.demo.DemoSettingFragment.java
private boolean isCreatedShortcut() { if (DEBUG) {/*from w w w . j a v a 2 s . c o m*/ Log.d(TAG, "DemoPageSetting: isCreatedShortcut"); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) { ShortcutManager shortcutManager = mShortcutManager; List<ShortcutInfo> infoList = shortcutManager.getPinnedShortcuts(); if (DEBUG) { Log.d(TAG, "DemoPageSetting: isCreatedShortcut: PinnedShortcuts=" + infoList.size()); Log.d(TAG, "DemoPageSetting: isCreatedShortcut: DynamicShortcuts=" + shortcutManager.getDynamicShortcuts()); } for (ShortcutInfo info : infoList) { if (DEBUG) { Log.d(TAG, "DemoPageSetting: isCreatedShortcut: info=" + info.getPackage()); } if (info.getId().equals(CAMERA_DEMO_SHORTCUT_ID)) { return true; } } return false; } else { return false; } }