|
54 | 54 | import com.smartdevicelink.proxy.rpc.enums.PredefinedWindows; |
55 | 55 | import com.smartdevicelink.proxy.rpc.enums.RequestType; |
56 | 56 | import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener; |
57 | | -import com.smartdevicelink.util.AndroidTools; |
58 | 57 | import com.smartdevicelink.util.DebugTool; |
59 | 58 |
|
60 | | -import java.io.IOException; |
61 | 59 | import java.lang.ref.WeakReference; |
62 | 60 |
|
63 | 61 | /** |
@@ -235,8 +233,7 @@ public void onNotified(RPCNotification notification) { |
235 | 233 | if (msg.getRequestType() == RequestType.LOCK_SCREEN_ICON_URL && |
236 | 234 | msg.getUrl() != null) { |
237 | 235 | // send intent to activity to download icon from core |
238 | | - deviceIconUrl = msg.getUrl(); |
239 | | - deviceIconUrl = deviceIconUrl.replace("http://", "https://"); |
| 236 | + deviceIconUrl = msg.getUrl().replace("http://", "https://"); |
240 | 237 | downloadDeviceIcon(deviceIconUrl); |
241 | 238 | } |
242 | 239 | } |
@@ -384,22 +381,21 @@ public void run(){ |
384 | 381 | @Override |
385 | 382 | public void onImageRetrieved(Bitmap icon) { |
386 | 383 | deviceLogo = icon; |
| 384 | + if(deviceLogo != null) { |
| 385 | + Intent intent = new Intent(SDLLockScreenActivity.LOCKSCREEN_DEVICE_LOGO_DOWNLOADED); |
| 386 | + intent.putExtra(SDLLockScreenActivity.LOCKSCREEN_DEVICE_LOGO_EXTRA, deviceLogoEnabled); |
| 387 | + intent.putExtra(SDLLockScreenActivity.LOCKSCREEN_DEVICE_LOGO_BITMAP, deviceLogo); |
| 388 | + if (context.get() != null) { |
| 389 | + context.get().sendBroadcast(intent); |
| 390 | + } |
| 391 | + } |
387 | 392 | } |
388 | 393 |
|
389 | 394 | @Override |
390 | 395 | public void onError(String info) { |
391 | 396 | DebugTool.logError(info); |
392 | 397 | } |
393 | 398 | }); |
394 | | - if(deviceLogo != null) { |
395 | | - Intent intent = new Intent(SDLLockScreenActivity.LOCKSCREEN_DEVICE_LOGO_DOWNLOADED); |
396 | | - intent.putExtra(SDLLockScreenActivity.LOCKSCREEN_DEVICE_LOGO_EXTRA, deviceLogoEnabled); |
397 | | - intent.putExtra(SDLLockScreenActivity.LOCKSCREEN_DEVICE_LOGO_BITMAP, deviceLogo); |
398 | | - if (context.get() != null) { |
399 | | - context.get().sendBroadcast(intent); |
400 | | - } |
401 | | - } |
402 | | - |
403 | 399 | } |
404 | 400 | }).start(); |
405 | 401 | } |
|
0 commit comments