Skip to content

Commit aba68cb

Browse files
committed
LIBcc10420
1 parent d6b1922 commit aba68cb

8 files changed

Lines changed: 205 additions & 267 deletions

File tree

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

library/src/main/java/com/vorlonsoft/android/rate/AppRate.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,11 @@ public void showRateDialog(Activity activity) {
273273
@SuppressWarnings("WeakerAccess")
274274
public boolean shouldShowRateDialog() {
275275
return getIsAgreeShowDialog(context) &&
276-
isOverLaunchTimes() &&
277-
isOverRemindLaunchTimes() &&
278-
isOverInstallDate() &&
279-
isOverRemindDate() &&
280-
isOverCustomEventRequirements();
276+
isOverLaunchTimes() &&
277+
isOverRemindLaunchTimes() &&
278+
isOverInstallDate() &&
279+
isOverRemindDate() &&
280+
isOverCustomEventRequirements();
281281
}
282282

283283
private boolean isOverLaunchTimes() {

library/src/main/java/com/vorlonsoft/android/rate/DefaultDialogManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public DefaultDialogManager(final Context context, final DialogOptions options)
150150
this.listener = options.getListener();
151151
}
152152

153+
@Override
153154
public Dialog createDialog() {
154155
AlertDialog.Builder builder = getDialogBuilder(context, options.getThemeResId());
155156
builder.setMessage(options.getMessageText(context));

library/src/main/java/com/vorlonsoft/android/rate/DialogOptions.java

Lines changed: 40 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -55,68 +55,56 @@ final class DialogOptions {
5555

5656
private Reference<OnClickButtonListener> listener = null;
5757

58-
@SuppressWarnings("WeakerAccess")
59-
public boolean shouldShowNeutralButton() {
58+
boolean shouldShowNeutralButton() {
6059
return showNeutralButton;
6160
}
6261

63-
@SuppressWarnings("WeakerAccess")
64-
public void setShowNeutralButton(boolean showNeutralButton) {
62+
void setShowNeutralButton(boolean showNeutralButton) {
6563
this.showNeutralButton = showNeutralButton;
6664
}
6765

68-
@SuppressWarnings("WeakerAccess")
69-
public boolean shouldShowNegativeButton() {
66+
boolean shouldShowNegativeButton() {
7067
return showNegativeButton;
7168
}
7269

73-
@SuppressWarnings("WeakerAccess")
74-
public void setShowNegativeButton(boolean showNegativeButton) {
70+
void setShowNegativeButton(boolean showNegativeButton) {
7571
this.showNegativeButton = showNegativeButton;
7672
}
7773

78-
@SuppressWarnings("WeakerAccess")
79-
public boolean shouldShowTitle() {
74+
boolean shouldShowTitle() {
8075
return showTitle;
8176
}
8277

83-
@SuppressWarnings("WeakerAccess")
84-
public void setShowTitle(boolean showTitle) {
78+
void setShowTitle(boolean showTitle) {
8579
this.showTitle = showTitle;
8680
}
8781

88-
@SuppressWarnings("WeakerAccess")
89-
public boolean getCancelable() {
82+
boolean getCancelable() {
9083
return cancelable;
9184
}
9285

93-
@SuppressWarnings("WeakerAccess")
94-
public void setCancelable(boolean cancelable) {
86+
void setCancelable(boolean cancelable) {
9587
this.cancelable = cancelable;
9688
}
9789

98-
@SuppressWarnings("WeakerAccess")
99-
public StoreType getStoreType() {
90+
StoreType getStoreType() {
10091
return storeType;
10192
}
10293

103-
@SuppressWarnings("WeakerAccess")
104-
public String getBlackBerryWorldApplicationId() {
94+
String getBlackBerryWorldApplicationId() {
10595
return blackBerryWorldApplicationId;
10696
}
10797

108-
@SuppressWarnings("WeakerAccess")
109-
public Uri getOtherStoreUri() {
98+
Uri getOtherStoreUri() {
11099
return otherStoreUri;
111100
}
112101

113-
@SuppressWarnings("WeakerAccess, unused")
114-
public void setStoreType(StoreType appStore) {
102+
@SuppressWarnings("unused")
103+
void setStoreType(StoreType appStore) {
115104
setStoreType(appStore, null);
116105
}
117106

118-
@SuppressWarnings("WeakerAccess")
119-
public void setStoreType(StoreType appStore, String param) {
107+
void setStoreType(StoreType appStore, String param) {
120108
storeType = appStore;
121109
if (appStore == StoreType.BLACKBERRY) {
122110
if (param == null) {
@@ -134,146 +122,125 @@ public void setStoreType(StoreType appStore, String param) {
134122
}
135123

136124
@SuppressWarnings("unused")
137-
public int getTitleResId() {
125+
int getTitleResId() {
138126
return textTitleResId;
139127
}
140128

141-
@SuppressWarnings("WeakerAccess")
142-
public void setTitleResId(int textTitleResId) {
129+
void setTitleResId(int textTitleResId) {
143130
this.textTitleResId = textTitleResId;
144131
}
145132

146133
@SuppressWarnings("unused")
147-
public int getMessageResId() {
134+
int getMessageResId() {
148135
return textMessageResId;
149136
}
150137

151-
@SuppressWarnings("WeakerAccess")
152-
public void setMessageResId(int textMessageResId) {
138+
void setMessageResId(int textMessageResId) {
153139
this.textMessageResId = textMessageResId;
154140
}
155141

156142
@SuppressWarnings("unused")
157-
public int getTextPositiveResId() {
143+
int getTextPositiveResId() {
158144
return textPositiveResId;
159145
}
160146

161-
@SuppressWarnings("WeakerAccess")
162-
public void setTextPositiveResId(int textPositiveResId) {
147+
void setTextPositiveResId(int textPositiveResId) {
163148
this.textPositiveResId = textPositiveResId;
164149
}
165150

166151
@SuppressWarnings("unused")
167-
public int getTextNeutralResId() {
152+
int getTextNeutralResId() {
168153
return textNeutralResId;
169154
}
170-
@SuppressWarnings("WeakerAccess")
171-
public void setTextNeutralResId(int textNeutralResId) {
155+
void setTextNeutralResId(int textNeutralResId) {
172156
this.textNeutralResId = textNeutralResId;
173157
}
174158

175159
@SuppressWarnings("unused")
176-
public int getTextNegativeResId() {
160+
int getTextNegativeResId() {
177161
return textNegativeResId;
178162
}
179163

180-
@SuppressWarnings("WeakerAccess")
181-
public void setTextNegativeResId(int textNegativeResId) {
164+
void setTextNegativeResId(int textNegativeResId) {
182165
this.textNegativeResId = textNegativeResId;
183166
}
184167

185-
@SuppressWarnings("WeakerAccess")
186-
public View getView() {
168+
View getView() {
187169
return view;
188170
}
189171

190-
@SuppressWarnings("WeakerAccess")
191-
public void setView(View view) {
172+
void setView(View view) {
192173
this.view = view;
193174
}
194175

195-
@SuppressWarnings("WeakerAccess")
196-
public OnClickButtonListener getListener() {
176+
OnClickButtonListener getListener() {
197177
return listener != null ? listener.get() : null;
198178
}
199179

200-
@SuppressWarnings("WeakerAccess")
201-
public void setListener(OnClickButtonListener listener) {
180+
void setListener(OnClickButtonListener listener) {
202181
this.listener = new WeakReference<>(listener);
203182
}
204183

205-
@SuppressWarnings("WeakerAccess")
206-
public String getTitleText(Context context) {
184+
String getTitleText(Context context) {
207185
if (titleText == null) {
208186
return context.getString(textTitleResId);
209187
}
210188
return titleText;
211189
}
212190

213-
@SuppressWarnings("WeakerAccess")
214-
public void setTitleText(String titleText) {
191+
void setTitleText(String titleText) {
215192
this.titleText = titleText;
216193
}
217194

218-
@SuppressWarnings("WeakerAccess")
219-
public String getMessageText(Context context) {
195+
String getMessageText(Context context) {
220196
if (messageText == null) {
221197
return context.getString(textMessageResId);
222198
}
223199
return messageText;
224200
}
225201

226-
@SuppressWarnings("WeakerAccess")
227-
public void setMessageText(String messageText) {
202+
void setMessageText(String messageText) {
228203
this.messageText = messageText;
229204
}
230205

231-
@SuppressWarnings("WeakerAccess")
232-
public String getPositiveText(Context context) {
206+
String getPositiveText(Context context) {
233207
if (positiveText == null) {
234208
return context.getString(textPositiveResId);
235209
}
236210
return positiveText;
237211
}
238212

239-
@SuppressWarnings("WeakerAccess")
240-
public void setPositiveText(String positiveText) {
213+
void setPositiveText(String positiveText) {
241214
this.positiveText = positiveText;
242215
}
243216

244-
@SuppressWarnings("WeakerAccess")
245-
public String getNeutralText(Context context) {
217+
String getNeutralText(Context context) {
246218
if (neutralText == null) {
247219
return context.getString(textNeutralResId);
248220
}
249221
return neutralText;
250222
}
251223

252-
@SuppressWarnings("WeakerAccess")
253-
public void setNeutralText(String neutralText) {
224+
void setNeutralText(String neutralText) {
254225
this.neutralText = neutralText;
255226
}
256227

257-
@SuppressWarnings("WeakerAccess")
258-
public String getNegativeText(Context context) {
228+
String getNegativeText(Context context) {
259229
if (negativeText == null) {
260230
return context.getString(textNegativeResId);
261231
}
262232
return negativeText;
263233
}
264234

265-
@SuppressWarnings("WeakerAccess")
266-
public void setNegativeText(String negativeText) {
235+
void setNegativeText(String negativeText) {
267236
this.negativeText = negativeText;
268237
}
269238

270-
@SuppressWarnings("WeakerAccess")
271-
public int getThemeResId() {
239+
int getThemeResId() {
272240
return themeResId;
273241
}
274242

275-
@SuppressWarnings("WeakerAccess")
276-
public void setThemeResId(int themeResId) {
243+
void setThemeResId(int themeResId) {
277244
this.themeResId = themeResId;
278245
}
279246
}

0 commit comments

Comments
 (0)