File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed
library/src/main/java/hotchemi/android/rate Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import android .view .View ;
4
4
5
- import java .lang .ref .WeakReference ;
6
-
7
5
final class DialogOptions {
8
6
9
7
private boolean showNeutralButton = true ;
@@ -20,9 +18,9 @@ final class DialogOptions {
20
18
21
19
private int textNegativeResId = R .string .rate_dialog_no ;
22
20
23
- private WeakReference < View > view ;
21
+ private View view ;
24
22
25
- private WeakReference < OnClickButtonListener > listener ;
23
+ private OnClickButtonListener listener ;
26
24
27
25
public boolean shouldShowNeutralButton () {
28
26
return showNeutralButton ;
@@ -81,25 +79,19 @@ public void setTextNegativeResId(int textNegativeResId) {
81
79
}
82
80
83
81
public View getView () {
84
- if (view == null ) {
85
- return null ;
86
- }
87
- return view .get ();
82
+ return view ;
88
83
}
89
84
90
85
public void setView (View view ) {
91
- this .view = new WeakReference <>( view ) ;
86
+ this .view = view ;
92
87
}
93
88
94
89
public OnClickButtonListener getListener () {
95
- if (listener == null ) {
96
- return null ;
97
- }
98
- return listener .get ();
90
+ return listener ;
99
91
}
100
92
101
93
public void setListener (OnClickButtonListener listener ) {
102
- this .listener = new WeakReference <>( listener ) ;
94
+ this .listener = listener ;
103
95
}
104
96
105
97
}
You can’t perform that action at this time.
0 commit comments