Merge "Delete some unused ChooserActivity code/symbols."

This commit is contained in:
TreeHugger Robot
2021-09-07 20:25:17 +00:00
committed by Android (Google) Code Review
3 changed files with 0 additions and 63 deletions

View File

@@ -234,11 +234,6 @@ public class ChooserActivity extends ResolverActivity implements
private static final float DIRECT_SHARE_EXPANSION_RATE = 0.78f;
// TODO(b/121287224): Re-evaluate this limit
private static final int SHARE_TARGET_QUERY_PACKAGE_LIMIT = 20;
private static final int QUERY_TARGET_SERVICE_LIMIT = 5;
private static final int DEFAULT_SALT_EXPIRATION_DAYS = 7;
private int mMaxHashSaltDays = DeviceConfig.getInt(DeviceConfig.NAMESPACE_SYSTEMUI,
SystemUiDeviceConfigFlags.HASH_SALT_MAX_DAYS,
@@ -258,8 +253,6 @@ public class ChooserActivity extends ResolverActivity implements
private long mQueriedSharingShortcutsTimeMs;
private int mChooserRowServiceSpacing;
private int mCurrAvailableWidth = 0;
private int mLastNumberOfChildren = -1;
@@ -658,9 +651,6 @@ public class ChooserActivity extends ResolverActivity implements
.addTaggedData(MetricsEvent.FIELD_SHARESHEET_MIMETYPE, target.getType())
.addTaggedData(MetricsEvent.FIELD_TIME_TO_APP_TARGETS, systemCost));
mChooserRowServiceSpacing = getResources()
.getDimensionPixelSize(R.dimen.chooser_service_spacing);
if (mResolverDrawerLayout != null) {
mResolverDrawerLayout.addOnLayoutChangeListener(this::handleLayoutChange);
@@ -2066,24 +2056,6 @@ public class ChooserActivity extends ResolverActivity implements
return chooserTargetList;
}
private String convertServiceName(String packageName, String serviceName) {
if (TextUtils.isEmpty(serviceName)) {
return null;
}
final String fullName;
if (serviceName.startsWith(".")) {
// Relative to the app package. Prepend the app package name.
fullName = packageName + serviceName;
} else if (serviceName.indexOf('.') >= 0) {
// Fully qualified package name.
fullName = serviceName;
} else {
fullName = null;
}
return fullName;
}
private void logDirectShareTargetReceived(int logCategory) {
final int apiLatency = (int) (System.currentTimeMillis() - mQueriedSharingShortcutsTimeMs);
getMetricsLogger().write(new LogMaker(logCategory).setSubtype(apiLatency));
@@ -2265,37 +2237,6 @@ public class ChooserActivity extends ResolverActivity implements
return false;
}
void filterServiceTargets(Context contextAsUser, String packageName,
List<ChooserTarget> targets) {
if (targets == null) {
return;
}
final PackageManager pm = contextAsUser.getPackageManager();
for (int i = targets.size() - 1; i >= 0; i--) {
final ChooserTarget target = targets.get(i);
final ComponentName targetName = target.getComponentName();
if (packageName != null && packageName.equals(targetName.getPackageName())) {
// Anything from the original target's package is fine.
continue;
}
boolean remove;
try {
final ActivityInfo ai = pm.getActivityInfo(targetName, 0);
remove = !ai.exported || ai.permission != null;
} catch (NameNotFoundException e) {
Log.e(TAG, "Target " + target + " returned by " + packageName
+ " component not found");
remove = true;
}
if (remove) {
targets.remove(i);
}
}
}
/**
* Sort intents alphabetically based on display label.
*/

View File

@@ -682,9 +682,6 @@
<dimen name="default_magnifier_horizontal_offset">0dp</dimen>
<item type="dimen" format="float" name="default_magnifier_zoom">1.25</item>
<!-- Spacing around the background change frome service to non-service -->
<dimen name="chooser_service_spacing">8dp</dimen>
<item type="dimen" name="aerr_padding_list_top">15dp</item>
<item type="dimen" name="aerr_padding_list_bottom">8dp</item>

View File

@@ -3687,7 +3687,6 @@
<java-symbol type="string" name="popup_window_default_title" />
<java-symbol type="bool" name="config_showAreaUpdateInfoSettings" />
<java-symbol type="layout" name="shutdown_dialog" />
<java-symbol type="dimen" name="chooser_service_spacing" />
<java-symbol type="bool" name="config_showSysuiShutdown" />
<java-symbol type="drawable" name="chooser_file_generic" />