Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6e8a46b authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5713174 from 7887f34d to qt-release

Change-Id: If4999b72522e0cf17653457e6512c2dda5c43d7d
parents 5c82b756 7887f34d
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.packageinstaller.role.service;
import android.content.Context;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.os.Binder;
import android.provider.SearchIndexablesContract;
import android.util.ArrayMap;

@@ -50,9 +51,14 @@ public class RoleSearchIndexablesProvider extends BaseSearchIndexablesProvider {
        for (int i = 0; i < rolesSize; i++) {
            Role role = roles.valueAt(i);

            long token = Binder.clearCallingIdentity();
            try {
                if (!role.isAvailable(context) || !role.isVisible(context)) {
                    continue;
                }
            } finally {
                Binder.restoreCallingIdentity(token);
            }

            String label = context.getString(role.getLabelResource());
            boolean isExclusive = role.isExclusive();