Introduce folder name type (auto vs manual).

Bug: 147769158

- Use both InputConnectionWrapper and TextWatcher to detect
manual input
- Also fix a bug in FolderNameProvider

Change-Id: I7bc0f380c6641481d934a53e9feb77caa19c674a
This commit is contained in:
Hyunyoung Song
2020-01-12 00:41:06 -08:00
parent 01f0964129
commit 48e6489871
6 changed files with 151 additions and 30 deletions

View File

@@ -109,11 +109,14 @@ public class FolderNameProvider {
if (contains(candidatesOut, candidate)) {
return;
}
for (int i = 0; i < candidate.length(); i++) {
if (TextUtils.isEmpty(candidatesOut[i])) {
candidatesOut[i] = candidate;
return;
}
}
candidatesOut[candidate.length() - 1] = candidate;
}
private boolean contains(CharSequence[] list, CharSequence key) {