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

Commit fbba25ce authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Setting "Plugger" as the top place for gallery share icon."

parents 30b4dfa2 e3078834
Loading
Loading
Loading
Loading
+24 −3
Original line number Diff line number Diff line
@@ -948,12 +948,29 @@ public class ActivityChooserModel extends DataSetObservable {
            componentNameToActivityMap.clear();

            final int activityCount = activities.size();
            ComponentName highPriComponentName = null;

            if (!TextUtils.isEmpty(mContext.getString(com.android.internal.R.
                    string.def_hipri_share_component_pkg))
                    && !TextUtils.isEmpty(mContext.getString(com.android.internal.R.
                    string.def_hipri_share_component_class))) {
                highPriComponentName = new ComponentName(
                        mContext.getString(com.android.internal.R.
                                string.def_hipri_share_component_pkg),
                        mContext.getString(com.android.internal.R.
                        string.def_hipri_share_component_class));
            }

            for (int i = 0; i < activityCount; i++) {
                ActivityResolveInfo activity = activities.get(i);
                activity.weight = 0.0f;
                ComponentName componentName = new ComponentName(
                        activity.resolveInfo.activityInfo.packageName,
                        activity.resolveInfo.activityInfo.name);

                if ((highPriComponentName != null) && highPriComponentName.equals(componentName)) {
                    activity.weight = Float.MAX_VALUE;
                }
                componentNameToActivityMap.put(componentName, activity);
            }

@@ -963,11 +980,15 @@ public class ActivityChooserModel extends DataSetObservable {
                HistoricalRecord historicalRecord = historicalRecords.get(i);
                ComponentName componentName = historicalRecord.activity;
                ActivityResolveInfo activity = componentNameToActivityMap.get(componentName);
                if ((highPriComponentName != null) && highPriComponentName.equals(componentName)) {
                    continue;
                } else {
                    if (activity != null) {
                        activity.weight += historicalRecord.weight * nextRecordWeight;
                        nextRecordWeight = nextRecordWeight * WEIGHT_DECAY_COEFFICIENT;
                    }
                }
            }

            Collections.sort(activities);

+2 −1
Original line number Diff line number Diff line
@@ -5219,5 +5219,6 @@
    <string name="data_conn_status_title"></string>
    <string name="user_authentication_failed"></string>
    <string name="service_not_subscribed"></string>

    <string name="def_hipri_share_component_pkg"></string>
    <string name="def_hipri_share_component_class"></string>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -2336,4 +2336,7 @@
  <java-symbol type="bool" name="config_LTE_eri_for_network_name" />
  <java-symbol type="bool" name="config_defaultInTouchMode" />
  <java-symbol type="bool" name="config_fdn_contact_search"/>
  <java-symbol type="string" name="def_hipri_share_component_pkg"/>
  <java-symbol type="string" name="def_hipri_share_component_class"/>

</resources>