Make Editor.SuggestionsPopupWindow private again

Editor.SuggestionsPopupWindow was originally introduced as a private
class [1], then we made it public [2] so that a test class can access
it, but that test was later updated [3] and now doesn't have any
direct dependency on Editor.SuggestionsPopupWindow.

In short, we can make Editor.SuggestionsPopupWindow a private class
again without losing anything.  This actually addresses the following
warning from doclava.

   Public class android.widget.Editor.SuggestionsPopupWindow
   extends private class android.widget.Editor.PinnedPopupWindow

There should be no behavior change.

 [1]: If863107681ce82a1639f21315878f830c2991fb7
      6934044fd7
 [2]: Idf166cbecb3e33be213e4104cf1afd827906f2ad
      a60160b30b
 [3]: I12e522436a83fa264cd22176d054877eec411708
      31eb74fb2b

Fix: 117519592
Test: No doclava warning regarding SuggestionsPopupWindow during full build
Change-Id: Ie722156d3819d05d3cd479527abb8b4750b332f7
This commit is contained in:
Yohei Yukawa
2019-02-01 23:38:30 -08:00
parent a5130a6ed9
commit ca9376cc4b

View File

@@ -3531,8 +3531,8 @@ public class Editor {
}
}
@VisibleForTesting
public class SuggestionsPopupWindow extends PinnedPopupWindow implements OnItemClickListener {
private final class SuggestionsPopupWindow extends PinnedPopupWindow
implements OnItemClickListener {
private static final int MAX_NUMBER_SUGGESTIONS = SuggestionSpan.SUGGESTIONS_MAX_SIZE;
// Key of intent extras for inserting new word into user dictionary.
@@ -3734,11 +3734,6 @@ public class Editor {
}
}
@VisibleForTesting
public ViewGroup getContentViewForTesting() {
return mContentView;
}
@Override
public void show() {
if (!(mTextView.getText() instanceof Editable)) return;
@@ -6460,11 +6455,6 @@ public class Editor {
return 0 <= start && start <= end && end <= text.length();
}
@VisibleForTesting
public SuggestionsPopupWindow getSuggestionsPopupWindowForTesting() {
return mSuggestionsPopupWindow;
}
/**
* An InputFilter that monitors text input to maintain undo history. It does not modify the
* text being typed (and hence always returns null from the filter() method).