File tree Expand file tree Collapse file tree
base/src/main/java/com/smartdevicelink/managers/screen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,18 +237,16 @@ public void setIcon(SdlArtwork icon) {
237237 }
238238
239239 public int getDefaultTimeout () {
240+ if (defaultTimeout < TIMEOUT_MIN ) {
241+ return TIMEOUT_MIN ;
242+ } else if (defaultTimeout > TIMEOUT_MAX ) {
243+ return TIMEOUT_MAX ;
244+ }
240245 return defaultTimeout ;
241246 }
242247
243248 public void setDefaultTimeout (int defaultTimeout ) {
244- if (defaultTimeout <= TIMEOUT_MIN ) {
245- AlertView .defaultTimeout = TIMEOUT_MIN ;
246- return ;
247- } else if (defaultTimeout >= TIMEOUT_MAX ) {
248- AlertView .defaultTimeout = TIMEOUT_MAX ;
249- return ;
250- }
251- AlertView .defaultTimeout = defaultTimeout ;
249+ this .defaultTimeout = defaultTimeout ;
252250 }
253251
254252 public void setTimeout (int timeout ) {
Original file line number Diff line number Diff line change @@ -322,6 +322,11 @@ public void setTimeout(Integer timeout) {
322322 }
323323
324324 public int getDefaultTimeout () {
325+ if (defaultTimeout < TIMEOUT_MIN ) {
326+ this .defaultTimeout = TIMEOUT_MIN ;
327+ } else if (defaultTimeout > TIMEOUT_MAX ) {
328+ this .defaultTimeout = TIMEOUT_MAX ;
329+ }
325330 return defaultTimeout ;
326331 }
327332
@@ -333,13 +338,6 @@ public int getDefaultTimeout() {
333338 * at 3 seconds. If this is set above the maximum, it will be capped at 10 seconds.
334339 */
335340 public void setDefaultTimeout (int defaultTimeout ) {
336- if (defaultTimeout <= TIMEOUT_MIN ) {
337- this .defaultTimeout = TIMEOUT_MIN ;
338- return ;
339- } else if (defaultTimeout >= TIMEOUT_MAX ) {
340- this .defaultTimeout = TIMEOUT_MAX ;
341- return ;
342- }
343341 this .defaultTimeout = defaultTimeout ;
344342 }
345343
You can’t perform that action at this time.
0 commit comments