Search in sources :

Example 26 with ShortcutInfo

use of android.content.pm.ShortcutInfo in project platform_frameworks_base by android.

the class ShortcutManagerTest1 method testPublishWithNoActivity.

public void testPublishWithNoActivity() {
    // If activity is not explicitly set, use the default one.
    mRunningUsers.put(USER_10, true);
    runWithCaller(CALLING_PACKAGE_2, USER_10, () -> {
        // s1 and s3 has no activities.
        final ShortcutInfo si1 = new ShortcutInfo.Builder(mClientContext, "si1").setShortLabel("label1").setIntent(new Intent("action1")).build();
        final ShortcutInfo si2 = new ShortcutInfo.Builder(mClientContext, "si2").setShortLabel("label2").setActivity(new ComponentName(getCallingPackage(), "abc")).setIntent(new Intent("action2")).build();
        final ShortcutInfo si3 = new ShortcutInfo.Builder(mClientContext, "si3").setShortLabel("label3").setIntent(new Intent("action3")).build();
        // Set test 1
        assertTrue(mManager.setDynamicShortcuts(list(si1)));
        assertWith(getCallerShortcuts()).haveIds("si1").forShortcutWithId("si1", si -> {
            assertEquals(new ComponentName(getCallingPackage(), MAIN_ACTIVITY_CLASS), si.getActivity());
        });
        // Set test 2
        assertTrue(mManager.setDynamicShortcuts(list(si2, si1)));
        assertWith(getCallerShortcuts()).haveIds("si1", "si2").forShortcutWithId("si1", si -> {
            assertEquals(new ComponentName(getCallingPackage(), MAIN_ACTIVITY_CLASS), si.getActivity());
        }).forShortcutWithId("si2", si -> {
            assertEquals(new ComponentName(getCallingPackage(), "abc"), si.getActivity());
        });
        // Set test 3
        assertTrue(mManager.setDynamicShortcuts(list(si3, si1)));
        assertWith(getCallerShortcuts()).haveIds("si1", "si3").forShortcutWithId("si1", si -> {
            assertEquals(new ComponentName(getCallingPackage(), MAIN_ACTIVITY_CLASS), si.getActivity());
        }).forShortcutWithId("si3", si -> {
            assertEquals(new ComponentName(getCallingPackage(), MAIN_ACTIVITY_CLASS), si.getActivity());
        });
        // reset throttling
        mInjectedCurrentTimeMillis += INTERVAL;
        // Add test 1
        mManager.removeAllDynamicShortcuts();
        assertTrue(mManager.addDynamicShortcuts(list(si1)));
        assertWith(getCallerShortcuts()).haveIds("si1").forShortcutWithId("si1", si -> {
            assertEquals(new ComponentName(getCallingPackage(), MAIN_ACTIVITY_CLASS), si.getActivity());
        });
        // Add test 2
        mManager.removeAllDynamicShortcuts();
        assertTrue(mManager.addDynamicShortcuts(list(si2, si1)));
        assertWith(getCallerShortcuts()).haveIds("si1", "si2").forShortcutWithId("si1", si -> {
            assertEquals(new ComponentName(getCallingPackage(), MAIN_ACTIVITY_CLASS), si.getActivity());
        }).forShortcutWithId("si2", si -> {
            assertEquals(new ComponentName(getCallingPackage(), "abc"), si.getActivity());
        });
        // Add test 3
        mManager.removeAllDynamicShortcuts();
        assertTrue(mManager.addDynamicShortcuts(list(si3, si1)));
        assertWith(getCallerShortcuts()).haveIds("si1", "si3").forShortcutWithId("si1", si -> {
            assertEquals(new ComponentName(getCallingPackage(), MAIN_ACTIVITY_CLASS), si.getActivity());
        }).forShortcutWithId("si3", si -> {
            assertEquals(new ComponentName(getCallingPackage(), MAIN_ACTIVITY_CLASS), si.getActivity());
        });
    });
}
Also used : ShortcutManagerTestUtils.filterByActivity(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.filterByActivity) ShortcutManagerTestUtils.assertAllManifest(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllManifest) Bundle(android.os.Bundle) Uri(android.net.Uri) ConfigConstants(com.android.server.pm.ShortcutService.ConfigConstants) Process(android.os.Process) ShortcutManagerTestUtils.assertAllHaveIntents(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllHaveIntents) ShortcutManagerTestUtils.set(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.set) ShortcutManagerTestUtils.assertWith(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertWith) Matchers.eq(org.mockito.Matchers.eq) Locale(java.util.Locale) ShortcutManagerTestUtils.assertAllDynamicOrPinned(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllDynamicOrPinned) Handler(android.os.Handler) Looper(android.os.Looper) Matchers.anyInt(org.mockito.Matchers.anyInt) R(com.android.frameworks.servicestests.R) ShortcutManagerTestUtils.assertAllDisabled(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllDisabled) Mockito.doReturn(org.mockito.Mockito.doReturn) ShortcutManagerTestUtils.assertAllNotManifest(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllNotManifest) Log(android.util.Log) ShortcutManagerTestUtils.assertAllEnabled(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllEnabled) ShortcutManagerTestUtils.assertAllNotHaveIntents(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllNotHaveIntents) ShortcutManagerTestUtils.assertCallbackNotReceived(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertCallbackNotReceived) FileOutputStreamWithPath(com.android.server.pm.ShortcutService.FileOutputStreamWithPath) ShortcutManagerTestUtils.waitOnMainThread(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.waitOnMainThread) Matchers.any(org.mockito.Matchers.any) LauncherApps(android.content.pm.LauncherApps) SparseArray(android.util.SparseArray) List(java.util.List) ShortcutManagerTestUtils.assertDynamicOnly(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertDynamicOnly) ShortcutManagerTestUtils.findShortcut(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.findShortcut) ActivityNotFoundException(android.content.ActivityNotFoundException) ShortcutQuery(android.content.pm.LauncherApps.ShortcutQuery) ShortcutManagerTestUtils.assertDynamicAndPinned(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertDynamicAndPinned) ApplicationInfo(android.content.pm.ApplicationInfo) ShortcutManagerTestUtils.assertAllUnique(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllUnique) Mockito.mock(org.mockito.Mockito.mock) ShortcutManagerTestUtils.assertForLauncherCallback(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertForLauncherCallback) ActivityManager(android.app.ActivityManager) SmallTest(android.test.suitebuilder.annotation.SmallTest) ShortcutManagerTestUtils.assertAllNotHaveTitle(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllNotHaveTitle) Intent(android.content.Intent) BitmapFactory(android.graphics.BitmapFactory) ShortcutManagerTestUtils.pfdToBitmap(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.pfdToBitmap) ShortcutManagerTestUtils.assertDynamicShortcutCountExceeded(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertDynamicShortcutCountExceeded) PackageWithUser(com.android.server.pm.ShortcutUser.PackageWithUser) ShortcutManagerTestUtils.assertEmpty(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertEmpty) Matchers.anyString(org.mockito.Matchers.anyString) ShortcutManagerTestUtils.assertExpectException(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertExpectException) ArgumentCaptor(org.mockito.ArgumentCaptor) ShortcutManagerTestUtils.assertBitmapSize(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertBitmapSize) UserHandle(android.os.UserHandle) ShortcutManagerTestUtils.assertAllDynamic(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllDynamic) ShortcutManagerTestUtils.assertCallbackReceived(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertCallbackReceived) ShortcutManagerTestUtils.resetAll(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.resetAll) Icon(android.graphics.drawable.Icon) ShortcutManagerTestUtils.assertAllImmutable(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllImmutable) ShortcutManagerTestUtils.assertShortcutIds(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertShortcutIds) ShortcutManagerTestUtils.assertAllHaveTitle(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllHaveTitle) ShortcutManagerTestUtils.list(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.list) ComponentName(android.content.ComponentName) ShortcutInfo(android.content.pm.ShortcutInfo) ShortcutManagerTestUtils.makeBundle(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makeBundle) Mockito.times(org.mockito.Mockito.times) IOException(java.io.IOException) ShortcutManagerTestUtils.assertAllNotKeyFieldsOnly(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllNotKeyFieldsOnly) File(java.io.File) Mockito.verify(org.mockito.Mockito.verify) ShortcutManagerTestUtils.assertBundleEmpty(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertBundleEmpty) ShortcutManagerTestUtils.assertAllPinned(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllPinned) ShortcutManagerTestUtils.hashSet(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.hashSet) ShortcutManagerTestUtils.assertCannotUpdateImmutable(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertCannotUpdateImmutable) Bitmap(android.graphics.Bitmap) CompressFormat(android.graphics.Bitmap.CompressFormat) Manifest.permission(android.Manifest.permission) ShortcutManagerTestUtils.assertAllKeyFieldsOnly(com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.assertAllKeyFieldsOnly) Mockito.reset(org.mockito.Mockito.reset) ShortcutInfo(android.content.pm.ShortcutInfo) Intent(android.content.Intent) ComponentName(android.content.ComponentName)

Example 27 with ShortcutInfo

use of android.content.pm.ShortcutInfo in project platform_frameworks_base by android.

the class ShortcutManagerTest1 method testManifestShortcuts_localeChange.

public void testManifestShortcuts_localeChange() throws InterruptedException {
    mService.handleUnlockUser(USER_0);
    // Package 1 updated, which has one valid manifest shortcut and one invalid.
    addManifestShortcutResource(new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()), R.xml.shortcut_2);
    updatePackageVersion(CALLING_PACKAGE_1, 1);
    mService.mPackageMonitor.onReceive(getTestContext(), genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
    runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
        mManager.setDynamicShortcuts(list(makeShortcutWithTitle("s1", "title")));
        assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(mManager.getManifestShortcuts()))), "ms1", "ms2");
        // check first shortcut.
        ShortcutInfo si = getCallerShortcut("ms1");
        assertEquals("ms1", si.getId());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_title1 + "/en", si.getTitle());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_text1 + "/en", si.getText());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_disabled_message1 + "/en", si.getDisabledMessage());
        assertEquals(START_TIME, si.getLastChangedTimestamp());
        // check another
        si = getCallerShortcut("ms2");
        assertEquals("ms2", si.getId());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_title2 + "/en", si.getTitle());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_text2 + "/en", si.getText());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_disabled_message2 + "/en", si.getDisabledMessage());
        assertEquals(START_TIME, si.getLastChangedTimestamp());
        // Check the dynamic one.
        si = getCallerShortcut("s1");
        assertEquals("s1", si.getId());
        assertEquals("title", si.getTitle());
        assertEquals(null, si.getText());
        assertEquals(null, si.getDisabledMessage());
        assertEquals(START_TIME, si.getLastChangedTimestamp());
    });
    mInjectedCurrentTimeMillis++;
    // Change the locale and send the broadcast, make sure the launcher gets a callback too.
    mInjectedLocale = Locale.JAPANESE;
    setCaller(LAUNCHER_1, USER_0);
    assertForLauncherCallback(mLauncherApps, () -> {
        mService.mReceiver.onReceive(mServiceContext, new Intent(Intent.ACTION_LOCALE_CHANGED));
    }).assertCallbackCalledForPackageAndUser(CALLING_PACKAGE_1, HANDLE_USER_0).haveIds("ms1", "ms2", "s1");
    runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
        // check first shortcut.
        ShortcutInfo si = getCallerShortcut("ms1");
        assertEquals("ms1", si.getId());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_title1 + "/ja", si.getTitle());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_text1 + "/ja", si.getText());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_disabled_message1 + "/ja", si.getDisabledMessage());
        assertEquals(START_TIME + 1, si.getLastChangedTimestamp());
        // check another
        si = getCallerShortcut("ms2");
        assertEquals("ms2", si.getId());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_title2 + "/ja", si.getTitle());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_text2 + "/ja", si.getText());
        assertEquals("string-com.android.test.1-user:0-res:" + R.string.shortcut_disabled_message2 + "/ja", si.getDisabledMessage());
        assertEquals(START_TIME + 1, si.getLastChangedTimestamp());
        // Check the dynamic one.  (locale change shouldn't affect.)
        si = getCallerShortcut("s1");
        assertEquals("s1", si.getId());
        assertEquals("title", si.getTitle());
        assertEquals(null, si.getText());
        assertEquals(null, si.getDisabledMessage());
        // Not changed.
        assertEquals(START_TIME, si.getLastChangedTimestamp());
    });
}
Also used : ShortcutInfo(android.content.pm.ShortcutInfo) ComponentName(android.content.ComponentName) Intent(android.content.Intent)

Example 28 with ShortcutInfo

use of android.content.pm.ShortcutInfo in project platform_frameworks_base by android.

the class ShortcutManagerTest1 method testManifestShortcuts_updateAndDisabled_pinned.

public void testManifestShortcuts_updateAndDisabled_pinned() {
    mService.handleUnlockUser(USER_0);
    // First, just publish a manifest shortcut.
    addManifestShortcutResource(new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()), R.xml.shortcut_1);
    updatePackageVersion(CALLING_PACKAGE_1, 1);
    mService.mPackageMonitor.onReceive(getTestContext(), genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
    // Only the valid one is published.
    runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
        assertShortcutIds(assertAllManifest(assertAllImmutable(assertAllEnabled(mManager.getManifestShortcuts()))), "ms1");
        assertEmpty(mManager.getPinnedShortcuts());
        // Make sure there's no other dangling shortcuts.
        assertShortcutIds(getCallerShortcuts(), "ms1");
    });
    runWithCaller(LAUNCHER_1, USER_0, () -> {
        mLauncherApps.pinShortcuts(CALLING_PACKAGE_1, list("ms1"), HANDLE_USER_0);
    });
    // Now upgrade, the manifest shortcut is disabled now.
    addManifestShortcutResource(new ComponentName(CALLING_PACKAGE_1, ShortcutActivity.class.getName()), R.xml.shortcut_1_disable);
    updatePackageVersion(CALLING_PACKAGE_1, 1);
    mService.mPackageMonitor.onReceive(getTestContext(), genPackageAddIntent(CALLING_PACKAGE_1, USER_0));
    // Because shortcut 1 was pinned, it'll still exist as pinned, but disabled.
    runWithCaller(CALLING_PACKAGE_1, USER_0, () -> {
        assertEmpty(mManager.getManifestShortcuts());
        assertShortcutIds(assertAllNotManifest(assertAllImmutable(assertAllDisabled(mManager.getPinnedShortcuts()))), "ms1");
        // Make sure the fields are updated.
        ShortcutInfo si = getCallerShortcut("ms1");
        assertEquals("ms1", si.getId());
        assertEquals(R.drawable.icon2, si.getIconResourceId());
        assertEquals(R.string.shortcut_title2, si.getTitleResId());
        assertEquals(R.string.shortcut_text2, si.getTextResId());
        assertEquals(R.string.shortcut_disabled_message2, si.getDisabledMessageResourceId());
        assertEquals(Intent.ACTION_VIEW, si.getIntent().getAction());
        // Make sure there's no other dangling shortcuts.
        assertShortcutIds(getCallerShortcuts(), "ms1");
    });
}
Also used : ShortcutInfo(android.content.pm.ShortcutInfo) ComponentName(android.content.ComponentName)

Example 29 with ShortcutInfo

use of android.content.pm.ShortcutInfo in project platform_frameworks_base by android.

the class ShortcutManagerTest2 method testShortcutInfoSaveAndLoad.

public void testShortcutInfoSaveAndLoad() throws InterruptedException {
    mRunningUsers.put(USER_10, true);
    setCaller(CALLING_PACKAGE_1, USER_10);
    final Icon bmp32x32 = Icon.createWithBitmap(BitmapFactory.decodeResource(getTestContext().getResources(), R.drawable.black_32x32));
    PersistableBundle pb = new PersistableBundle();
    pb.putInt("k", 1);
    ShortcutInfo sorig = new ShortcutInfo.Builder(mClientContext).setId("id").setActivity(new ComponentName(mClientContext, ShortcutActivity2.class)).setIcon(bmp32x32).setTitle("title").setText("text").setDisabledMessage("dismes").setCategories(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz")).setIntent(makeIntent("action", ShortcutActivity.class, "key", "val")).setRank(123).setExtras(pb).build();
    sorig.setTimestamp(mInjectedCurrentTimeMillis);
    ShortcutInfo sorig2 = new ShortcutInfo.Builder(mClientContext).setId("id2").setTitle("x").setActivity(new ComponentName(mClientContext, ShortcutActivity2.class)).setIntent(makeIntent("action", ShortcutActivity.class, "key", "val")).setRank(456).build();
    sorig2.setTimestamp(mInjectedCurrentTimeMillis);
    mManager.addDynamicShortcuts(list(sorig, sorig2));
    mInjectedCurrentTimeMillis += 1;
    final long now = mInjectedCurrentTimeMillis;
    mInjectedCurrentTimeMillis += 1;
    dumpsysOnLogcat("before save");
    // Save and load.
    mService.saveDirtyInfo();
    initService();
    mService.handleUnlockUser(USER_10);
    dumpUserFile(USER_10);
    dumpsysOnLogcat("after load");
    ShortcutInfo si;
    si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id", USER_10);
    assertEquals(USER_10, si.getUserId());
    assertEquals(HANDLE_USER_10, si.getUserHandle());
    assertEquals(CALLING_PACKAGE_1, si.getPackage());
    assertEquals("id", si.getId());
    assertEquals(ShortcutActivity2.class.getName(), si.getActivity().getClassName());
    assertEquals(null, si.getIcon());
    assertEquals("title", si.getTitle());
    assertEquals("text", si.getText());
    assertEquals("dismes", si.getDisabledMessage());
    assertEquals(set(ShortcutInfo.SHORTCUT_CATEGORY_CONVERSATION, "xyz"), si.getCategories());
    assertEquals("action", si.getIntent().getAction());
    assertEquals("val", si.getIntent().getStringExtra("key"));
    assertEquals(0, si.getRank());
    assertEquals(1, si.getExtras().getInt("k"));
    assertEquals(ShortcutInfo.FLAG_DYNAMIC | ShortcutInfo.FLAG_HAS_ICON_FILE | ShortcutInfo.FLAG_STRINGS_RESOLVED, si.getFlags());
    // Something should be set.
    assertNotNull(si.getBitmapPath());
    assertEquals(0, si.getIconResourceId());
    assertTrue(si.getLastChangedTimestamp() < now);
    // Make sure ranks are saved too.  Because of the auto-adjusting, we need two shortcuts
    // to test it.
    si = mService.getPackageShortcutForTest(CALLING_PACKAGE_1, "id2", USER_10);
    assertEquals(1, si.getRank());
    dumpUserFile(USER_10);
}
Also used : PersistableBundle(android.os.PersistableBundle) ShortcutInfo(android.content.pm.ShortcutInfo) ComponentName(android.content.ComponentName) Icon(android.graphics.drawable.Icon)

Example 30 with ShortcutInfo

use of android.content.pm.ShortcutInfo in project platform_frameworks_base by android.

the class BaseShortcutManagerTest method assertAllHaveIconFile.

public static List<ShortcutInfo> assertAllHaveIconFile(List<ShortcutInfo> actualShortcuts) {
    for (ShortcutInfo s : actualShortcuts) {
        assertFalse("ID " + s.getId() + " shouldn't have icon res ID", s.hasIconResource());
        assertTrue("ID " + s.getId() + " not have icon FD", s.hasIconFile());
    }
    return actualShortcuts;
}
Also used : ShortcutInfo(android.content.pm.ShortcutInfo)

Aggregations

ShortcutInfo (android.content.pm.ShortcutInfo)324 ComponentName (android.content.ComponentName)144 PersistableBundle (android.os.PersistableBundle)48 ArrayList (java.util.ArrayList)46 Intent (android.content.Intent)44 Icon (android.graphics.drawable.Icon)32 List (java.util.List)17 Matchers.anyString (org.mockito.Matchers.anyString)16 LocaleList (android.os.LocaleList)12 File (java.io.File)12 Nullable (android.annotation.Nullable)8 ShortcutQuery (android.content.pm.LauncherApps.ShortcutQuery)8 Resources (android.content.res.Resources)8 Bundle (android.os.Bundle)8 ArrayMap (android.util.ArrayMap)8 PackageWithUser (com.android.server.pm.ShortcutUser.PackageWithUser)8 ShortcutManagerTestUtils.makeBundle (com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.makeBundle)8 IOException (java.io.IOException)8 ArraySet (android.util.ArraySet)5 Manifest.permission (android.Manifest.permission)4