Only display single line for title

When a malicious device admin app’s name includes
a bunch of CRLF characters, it will cause incorrect shows
and selection confusion in Settings Device admin apps listView.

Test: Built the apk and saw single line title.
Bug: 169936038
Change-Id: I98d9a93bfdc792017124dda52a59d25a6462079e
This commit is contained in:
Tsung-Mao Fang
2021-04-01 13:44:26 +08:00
parent 123422c99c
commit 4f6caf2941

View File

@@ -207,6 +207,7 @@ public class DeviceAdminListPreferenceController extends BasePreferenceControlle
return true;
});
pref.setOnPreferenceChangeListener((preference, newValue) -> false);
pref.setSingleLineTitle(true);
}
/**