Modify isShowing method in Dialog
The method isShowing in Dialog.java is to judge whether the dialog is currently showing, but it will return true when the dialog is hidden. Bug: 74416088 Test: modify testShow in DialogTest.java (see 639879) run cts -m CtsAppTestCases -t android.app.cts.DialogTest#testShow Change-Id: Ibf15e080678f414f8a66ff0841be17a2f9d2d652 Signed-off-by: tiansiming [田思明] <tiansiming@xiaomi.com>
This commit is contained in:
@@ -264,7 +264,7 @@ public class Dialog implements DialogInterface, Window.Callback,
|
||||
* @return Whether the dialog is currently showing.
|
||||
*/
|
||||
public boolean isShowing() {
|
||||
return mShowing;
|
||||
return mDecor == null ? false : mDecor.getVisibility() == View.VISIBLE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user