[AA+] Skip title logging when search result type is PEOPLE.
Bug: 178562918 Test: Manual Change-Id: Ia2fb8018efcdfb6ad947c590d559094cb460ce83
This commit is contained in:
1 parent
f3b8797f77
commit
b8bb677616
1 file changed
+12
-5
@@ -42,12 +42,15 @@ public class SearchActionItemInfo extends ItemInfoWithIcon {
|
||||
private int mFlags = 0;
|
||||
private final Icon mIcon;
|
||||
|
||||
// If true title does not contain any personal info and eligible for logging.
|
||||
private final boolean mIsPersonalTitle;
|
||||
private Intent mIntent;
|
||||
|
||||
private PendingIntent mPendingIntent;
|
||||
|
||||
public SearchActionItemInfo(Icon icon, String packageName, UserHandle user,
|
||||
CharSequence title) {
|
||||
CharSequence title, boolean isPersonalTitle) {
|
||||
mIsPersonalTitle = isPersonalTitle;
|
||||
this.user = user == null ? Process.myUserHandle() : user;
|
||||
this.title = title;
|
||||
this.container = EXTENDED_CONTAINERS;
|
||||
@@ -62,6 +65,7 @@ public class SearchActionItemInfo extends ItemInfoWithIcon {
|
||||
mFlags = info.mFlags;
|
||||
title = info.title;
|
||||
this.container = EXTENDED_CONTAINERS;
|
||||
this.mIsPersonalTitle = info.mIsPersonalTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,11 +122,14 @@ public class SearchActionItemInfo extends ItemInfoWithIcon {
|
||||
|
||||
@Override
|
||||
public ItemInfo buildProto(FolderInfo fInfo) {
|
||||
SearchActionItem.Builder itemBuilder = SearchActionItem.newBuilder()
|
||||
.setPackageName(mFallbackPackageName);
|
||||
|
||||
if (!mIsPersonalTitle) {
|
||||
itemBuilder.setTitle(title.toString());
|
||||
}
|
||||
return getDefaultItemInfoBuilder()
|
||||
.setSearchActionItem(
|
||||
SearchActionItem.newBuilder()
|
||||
.setTitle(title.toString())
|
||||
.setPackageName(mFallbackPackageName))
|
||||
.setSearchActionItem(itemBuilder)
|
||||
.setContainerInfo(getContainerInfo())
|
||||
.build();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user