Skip to content

Commit cd26642

Browse files
committed
Bugfix for where usage of an API > 16 method was introduced into the code with no checks.
1 parent f280298 commit cd26642

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

eclipse_projects/bVNC/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="com.iiordanov.bVNC" android:installLocation="auto"
4-
android:versionCode="3700" android:versionName="v3.7.0">
4+
android:versionCode="3710" android:versionName="v3.7.1">
55

66
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"></uses-sdk>
77
<uses-permission android:name="android.permission.INTERNET"></uses-permission>

eclipse_projects/bVNC/src/com/iiordanov/bVNC/RemoteCanvasActivity.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,20 @@ public void onClick(View v) {
314314
}
315315

316316

317+
@SuppressWarnings("deprecation")
317318
private void setKeyStowDrawableAndVisibility() {
318319
Drawable replacer = null;
319320
if (layoutKeys.getVisibility() == View.GONE)
320321
replacer = getResources().getDrawable(R.drawable.showkeys);
321322
else
322323
replacer = getResources().getDrawable(R.drawable.hidekeys);
323-
keyStow.setBackground(replacer);
324+
325+
int sdk = android.os.Build.VERSION.SDK_INT;
326+
if(sdk < android.os.Build.VERSION_CODES.JELLY_BEAN) {
327+
keyStow.setBackgroundDrawable(replacer);
328+
} else {
329+
keyStow.setBackground(replacer);
330+
}
324331

325332
if (connection.getExtraKeysToggleType() == Constants.EXTRA_KEYS_OFF)
326333
keyStow.setVisibility(View.GONE);

0 commit comments

Comments
 (0)