Skip to content

Commit 1831f2e

Browse files
committed
PR Changes requested
1 parent 40f79a0 commit 1831f2e

2 files changed

Lines changed: 10 additions & 15 deletions

File tree

android/sdl_android/src/androidTest/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
android:targetPackage="com.smartdevicelink.test" />
1313
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
1414

15-
<application
16-
android:debuggable="true">
15+
<application android:debuggable="true">
1716
<uses-library android:name="android.test.runner" />
1817
</application>
1918

android/sdl_android/src/main/java/com/smartdevicelink/managers/lockscreen/LockScreenManager.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,8 @@
5454
import com.smartdevicelink.proxy.rpc.enums.PredefinedWindows;
5555
import com.smartdevicelink.proxy.rpc.enums.RequestType;
5656
import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener;
57-
import com.smartdevicelink.util.AndroidTools;
5857
import com.smartdevicelink.util.DebugTool;
5958

60-
import java.io.IOException;
6159
import java.lang.ref.WeakReference;
6260

6361
/**
@@ -235,8 +233,7 @@ public void onNotified(RPCNotification notification) {
235233
if (msg.getRequestType() == RequestType.LOCK_SCREEN_ICON_URL &&
236234
msg.getUrl() != null) {
237235
// 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://");
240237
downloadDeviceIcon(deviceIconUrl);
241238
}
242239
}
@@ -384,22 +381,21 @@ public void run(){
384381
@Override
385382
public void onImageRetrieved(Bitmap icon) {
386383
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+
}
387392
}
388393

389394
@Override
390395
public void onError(String info) {
391396
DebugTool.logError(info);
392397
}
393398
});
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-
403399
}
404400
}).start();
405401
}

0 commit comments

Comments
 (0)