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

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

Snap for 7041858 from 65929722 to rvc-qpr2-release

Change-Id: I537305e778e5264ca2c7080d46421490086fd932
parents 45727d2b 65929722
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ class AppPredictionServiceResolverComparator extends AbstractResolverComparator
        }
        Integer rank = mTargetRanks.get(name);
        if (rank == null) {
            Log.w(TAG, "Score requested for unknown component.");
            Log.w(TAG, "Score requested for unknown component. Did you call compute yet?");
            return 0f;
        }
        int consecutiveSumOfRanks = (mTargetRanks.size() - 1) * (mTargetRanks.size()) / 2;
+7 −35
Original line number Diff line number Diff line
@@ -826,8 +826,6 @@ public class ChooserActivity extends ResolverActivity implements
                queryDirectShareTargets(chooserListAdapter, true);
                return;
            }
            final List<DisplayResolveInfo> driList =
                    getDisplayResolveInfos(chooserListAdapter);
            final List<ShortcutManager.ShareShortcutInfo> shareShortcutInfos =
                    new ArrayList<>();

@@ -855,7 +853,7 @@ public class ChooserActivity extends ResolverActivity implements
                        new ComponentName(
                                appTarget.getPackageName(), appTarget.getClassName())));
            }
            sendShareShortcutInfoList(shareShortcutInfos, driList, resultList,
            sendShareShortcutInfoList(shareShortcutInfos, chooserListAdapter, resultList,
                    chooserListAdapter.getUserHandle());
        };
    }
@@ -1974,32 +1972,6 @@ public class ChooserActivity extends ResolverActivity implements
        }
    }

    private List<DisplayResolveInfo> getDisplayResolveInfos(ChooserListAdapter adapter) {
        // Need to keep the original DisplayResolveInfos to be able to reconstruct ServiceResultInfo
        // and use the old code path. This Ugliness should go away when Sharesheet is refactored.
        List<DisplayResolveInfo> driList = new ArrayList<>();
        int targetsToQuery = 0;
        for (int i = 0, n = adapter.getDisplayResolveInfoCount(); i < n; i++) {
            final DisplayResolveInfo dri = adapter.getDisplayResolveInfo(i);
            if (adapter.getScore(dri) == 0) {
                // A score of 0 means the app hasn't been used in some time;
                // don't query it as it's not likely to be relevant.
                continue;
            }
            driList.add(dri);
            targetsToQuery++;
            // TODO(b/121287224): Do we need this here? (similar to queryTargetServices)
            if (targetsToQuery >= SHARE_TARGET_QUERY_PACKAGE_LIMIT) {
                if (DEBUG) {
                    Log.d(TAG, "queryTargets hit query target limit "
                            + SHARE_TARGET_QUERY_PACKAGE_LIMIT);
                }
                break;
            }
        }
        return driList;
    }

    @VisibleForTesting
    protected void queryDirectShareTargets(
                ChooserListAdapter adapter, boolean skipAppPredictionService) {
@@ -2017,14 +1989,13 @@ public class ChooserActivity extends ResolverActivity implements
        if (filter == null) {
            return;
        }
        final List<DisplayResolveInfo> driList = getDisplayResolveInfos(adapter);

        AsyncTask.execute(() -> {
            Context selectedProfileContext = createContextAsUser(userHandle, 0 /* flags */);
            ShortcutManager sm = (ShortcutManager) selectedProfileContext
                    .getSystemService(Context.SHORTCUT_SERVICE);
            List<ShortcutManager.ShareShortcutInfo> resultList = sm.getShareTargets(filter);
            sendShareShortcutInfoList(resultList, driList, null, userHandle);
            sendShareShortcutInfoList(resultList, adapter, null, userHandle);
        });
    }

@@ -2061,7 +2032,7 @@ public class ChooserActivity extends ResolverActivity implements

    private void sendShareShortcutInfoList(
                List<ShortcutManager.ShareShortcutInfo> resultList,
                List<DisplayResolveInfo> driList,
                ChooserListAdapter chooserListAdapter,
                @Nullable List<AppTarget> appTargets, UserHandle userHandle) {
        if (appTargets != null && appTargets.size() != resultList.size()) {
            throw new RuntimeException("resultList and appTargets must have the same size."
@@ -2087,10 +2058,10 @@ public class ChooserActivity extends ResolverActivity implements
        // for direct share targets. After ShareSheet is refactored we should use the
        // ShareShortcutInfos directly.
        boolean resultMessageSent = false;
        for (int i = 0; i < driList.size(); i++) {
        for (int i = 0; i < chooserListAdapter.getDisplayResolveInfoCount(); i++) {
            List<ShortcutManager.ShareShortcutInfo> matchingShortcuts = new ArrayList<>();
            for (int j = 0; j < resultList.size(); j++) {
                if (driList.get(i).getResolvedComponentName().equals(
                if (chooserListAdapter.getDisplayResolveInfo(i).getResolvedComponentName().equals(
                            resultList.get(j).getTargetComponent())) {
                    matchingShortcuts.add(resultList.get(j));
                }
@@ -2105,7 +2076,8 @@ public class ChooserActivity extends ResolverActivity implements

            final Message msg = Message.obtain();
            msg.what = ChooserHandler.SHORTCUT_MANAGER_SHARE_TARGET_RESULT;
            msg.obj = new ServiceResultInfo(driList.get(i), chooserTargets, null, userHandle);
            msg.obj = new ServiceResultInfo(chooserListAdapter.getDisplayResolveInfo(i),
                    chooserTargets, null, userHandle);
            msg.arg1 = shortcutType;
            mChooserHandler.sendMessage(msg);
            resultMessageSent = true;
+1 −0
Original line number Diff line number Diff line
@@ -377,6 +377,7 @@
    <protected-broadcast android:name="android.net.wifi.action.PASSPOINT_OSU_PROVIDERS_LIST" />
    <protected-broadcast android:name="android.net.wifi.action.PASSPOINT_SUBSCRIPTION_REMEDIATION" />
    <protected-broadcast android:name="android.net.wifi.action.PASSPOINT_LAUNCH_OSU_VIEW" />
    <protected-broadcast android:name="android.net.wifi.action.REFRESH_USER_PROVISIONING" />
    <protected-broadcast android:name="android.net.wifi.action.WIFI_NETWORK_SUGGESTION_POST_CONNECTION" />
    <protected-broadcast android:name="android.net.wifi.action.WIFI_SCAN_AVAILABILITY_CHANGED" />
    <protected-broadcast android:name="android.net.wifi.supplicant.CONNECTION_CHANGE" />
+5 −5
Original line number Diff line number Diff line
@@ -20,12 +20,12 @@

<resources xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="byteShort" msgid="202579285008794431">"B"</string>
    <string name="byteShort" msgid="202579285008794431">""</string>
    <string name="kilobyteShort" msgid="2214285521564195803">"ኪባ"</string>
    <string name="megabyteShort" msgid="6649361267635823443">"MB"</string>
    <string name="gigabyteShort" msgid="7515809460261287991">"GB"</string>
    <string name="terabyteShort" msgid="1822367128583886496">"TB"</string>
    <string name="petabyteShort" msgid="5651571254228534832">"PB"</string>
    <string name="megabyteShort" msgid="6649361267635823443">"ሜባ"</string>
    <string name="gigabyteShort" msgid="7515809460261287991">"ጊባ"</string>
    <string name="terabyteShort" msgid="1822367128583886496">"ቴባ"</string>
    <string name="petabyteShort" msgid="5651571254228534832">"ፔባ"</string>
    <string name="fileSizeSuffix" msgid="4233671691980131257">"<xliff:g id="NUMBER">%1$s</xliff:g> <xliff:g id="UNIT">%2$s</xliff:g>"</string>
    <string name="untitled" msgid="3381766946944136678">"&lt;ርዕስ አልባ&gt;"</string>
    <string name="emptyPhoneNumber" msgid="5812172618020360048">"(ምንም ስልክ ቁጥር የለም)"</string>
+1 −1
Original line number Diff line number Diff line
@@ -823,7 +823,7 @@
    <string name="keyguard_password_enter_pin_password_code" msgid="7792964196473964340">"Introduce el código PIN para desbloquear."</string>
    <string name="keyguard_password_wrong_pin_code" msgid="8583732939138432793">"Código PIN incorrecto"</string>
    <string name="keyguard_label_text" msgid="3841953694564168384">"Para desbloquear el teléfono, pulsa la tecla de menú y, a continuación, pulsa 0."</string>
    <string name="emergency_call_dialog_number_for_display" msgid="2978165477085612673">"Llamada de emergencia"</string>
    <string name="emergency_call_dialog_number_for_display" msgid="2978165477085612673">"Número de emergencia"</string>
    <string name="lockscreen_carrier_default" msgid="6192313772955399160">"Sin servicio"</string>
    <string name="lockscreen_screen_locked" msgid="7364905540516041817">"Pantalla bloqueada"</string>
    <string name="lockscreen_instructions_when_pattern_enabled" msgid="7982445492532123308">"Pulsa la tecla de menú para desbloquear el teléfono o realizar una llamada de emergencia."</string>
Loading