diff options
| author | Alan Viverette <alanv@google.com> | 2013-12-11 15:59:53 -0800 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2013-12-11 15:59:53 -0800 |
| commit | f34ef74eb2b72dd945e6903a748932c1f90f3daa (patch) | |
| tree | 43d571e4db761c9df95584cb3639d02a285aa4f7 /core/java/android/app/AlertDialog.java | |
| parent | f51021c32c1998456e1d8f6b0effc0297c2fff05 (diff) | |
Replace auto-create in findViewById() with explicit create() API
Change-Id: Ib833cc23f4ae39b5d729db3d425faa7dfd5b3c4c
Diffstat (limited to 'core/java/android/app/AlertDialog.java')
| -rw-r--r-- | core/java/android/app/AlertDialog.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/core/java/android/app/AlertDialog.java b/core/java/android/app/AlertDialog.java index b963ff2400e2..ab148a961308 100644 --- a/core/java/android/app/AlertDialog.java +++ b/core/java/android/app/AlertDialog.java @@ -147,12 +147,8 @@ public class AlertDialog extends Dialog implements DialogInterface { /** * Gets one of the buttons used in the dialog. Returns null if the specified - * button does not exist in the dialog. - * <p> - * Prior to API 20, this function could only be called after the dialog was - * shown. In later versions, this function may be called at any time; - * however, calling this function locks in various attributes including - * buttons and icons. + * button does not exist or the dialog has not yet been fully created (for + * example, via {@link #show()} or {@link #create()}). * * @param whichButton The identifier of the button that should be returned. * For example, this can be @@ -160,8 +156,6 @@ public class AlertDialog extends Dialog implements DialogInterface { * @return The button from the dialog, or null if a button does not exist. */ public Button getButton(int whichButton) { - // Superclass handles re-entrance and multiple calls. - dispatchOnCreate(null); return mAlert.getButton(whichButton); } |
