diff options
author | Lucas Dupin <dupin@google.com> | 2018-11-14 13:48:27 -0800 |
---|---|---|
committer | Lucas Dupin <dupin@google.com> | 2018-11-14 13:48:27 -0800 |
commit | 74d9dd8e4ef5aace2040a11786139f050cfd93f0 (patch) | |
tree | 59194a53e58c7aa84e10800452a336cfc4dcfa7d /packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java | |
parent | 9f557739e1e1533e187faee583a59fd15ef6b0b5 (diff) |
Remove legacy method
Test: make
Change-Id: I28630df52fc8f5dc939c2e232599d33ed70ec2c9
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java index 79966f78373c..c41ef0ede89e 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java @@ -243,46 +243,6 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe } } - /** - * Breaks a string in 2 lines where both have similar character count - * but first line is always longer. - * - * @param charSequence Original text. - * @return Optimal string. - */ - private static CharSequence findBestLineBreak(CharSequence charSequence) { - if (TextUtils.isEmpty(charSequence)) { - return charSequence; - } - - String source = charSequence.toString(); - // Ignore if there is only 1 word, - // or if line breaks were manually set. - if (source.contains("\n") || !source.contains(" ")) { - return source; - } - - final String[] words = source.split(" "); - final StringBuilder optimalString = new StringBuilder(source.length()); - int current = 0; - while (optimalString.length() < source.length() - optimalString.length()) { - optimalString.append(words[current]); - if (current < words.length - 1) { - optimalString.append(" "); - } - current++; - } - optimalString.append("\n"); - for (int i = current; i < words.length; i++) { - optimalString.append(words[i]); - if (current < words.length - 1) { - optimalString.append(" "); - } - } - - return optimalString.toString(); - } - public void setDarkAmount(float darkAmount) { mDarkAmount = darkAmount; mRow.setDarkAmount(darkAmount); |