- Bugs fixed.
This commit is contained in:
An Bui 2026-06-15 13:48:59 +07:00
parent 3136199ce9
commit e360b2e3fc
8 changed files with 32 additions and 22 deletions

View file

@ -12,8 +12,8 @@ android {
applicationId "com.vectras.vm"
minSdk minApi
targetSdk targetApi
versionCode 130
versionName "4.2.6"
versionCode 131
versionName "4.2.7"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true

View file

@ -42,7 +42,8 @@ class FullBufferBitmapData extends AbstractBitmapData {
*/
@Override
public void draw(Canvas canvas) {
if (bitmapPixels == null) {
int[] pixels = bitmapPixels;
if (pixels == null) {
return;
}
@ -53,7 +54,7 @@ class FullBufferBitmapData extends AbstractBitmapData {
//XXX; Vectras: for Hardware accelerated surfaces we have to stop using the above deprecated method and use a bitmap-backed method
// this fixes the issue with Nougat Devices displaying black screen for 24bit color mode C24bit
Bitmap bitmapTmp = Bitmap.createBitmap(framebufferwidth, framebufferheight, Config.bitmapConfig);
bitmapTmp.setPixels(bitmapPixels, 0, data.framebufferwidth, 0, 0, framebufferwidth, framebufferheight);
bitmapTmp.setPixels(pixels, 0, data.framebufferwidth, 0, 0, framebufferwidth, framebufferheight);
if (vncCanvas.getScaleType() == ImageView.ScaleType.FIT_XY) {
canvas.drawBitmap(bitmapTmp, (float) vncCanvas.getWidth() / 2 + (float) framebufferwidth / -2, (float) vncCanvas.getHeight() / 2 - (float) framebufferheight / 2, null);
@ -85,7 +86,7 @@ class FullBufferBitmapData extends AbstractBitmapData {
//XXX; for Hardware accelerated surfaces we have to stop using the above deprecated method and use a bitmap-backed method
// this fixes the issue with Nougat Devices displaying black screen for 24bit color mode C24bit
Bitmap bitmapTmp = Bitmap.createBitmap(framebufferwidth, framebufferheight, Config.bitmapConfig);
bitmapTmp.setPixels(bitmapPixels, offset(xo, yo), data.framebufferwidth, 0, 0, drawWidth, drawHeight);
bitmapTmp.setPixels(pixels, offset(xo, yo), data.framebufferwidth, 0, 0, drawWidth, drawHeight);
canvas.drawBitmap(bitmapTmp, 0, 0, null);
/*

View file

@ -1237,6 +1237,9 @@ public class VncCanvas extends AppCompatImageView {
public void closeConnection() {
maintainConnection = false;
if (rfb != null) {
rfb.close();
}
}
public void sendMetaKey1(int key, int flags) {

View file

@ -542,14 +542,14 @@ public abstract class VncCanvasActivity extends AppCompatActivity {
remoteMouseStayPut(e);
// One
// Log.v("Double Click", "One");
vncCanvas.processPointerEvent(e, true, true);
vncCanvas.processPointerEvent(e, true, false);
try {
Thread.sleep(100);
} catch (InterruptedException ex) {
Logger.getLogger(VncCanvasActivity.class.getName()).log(Level.SEVERE, null, ex);
}
e.setAction(MotionEvent.ACTION_UP);
vncCanvas.processPointerEvent(e, false, true);
vncCanvas.processPointerEvent(e, false, false);
}
});
// t.setPriority(Thread.MAX_PRIORITY);

View file

@ -1208,7 +1208,7 @@ public class MainVNCActivity extends VncCanvasActivity {
try {
MotionEvent e = MotionEvent.obtain(1000, 1000, MotionEvent.ACTION_DOWN, vncCanvas.mouseX, vncCanvas.mouseY,
0);
((TouchpadInputHandler) VncCanvasActivity.inputHandler).rightClick(e);
((TouchpadInputHandler) inputHandler).rightClick(e);
} catch (Exception e) {
VMManager.sendRightMouseKey();
}
@ -1218,7 +1218,7 @@ public class MainVNCActivity extends VncCanvasActivity {
try {
MotionEvent e = MotionEvent.obtain(1000, 1000, MotionEvent.ACTION_DOWN, vncCanvas.mouseX, vncCanvas.mouseY,
0);
((TouchpadInputHandler) VncCanvasActivity.inputHandler).middleClick(e);
((TouchpadInputHandler) inputHandler).middleClick(e);
} catch (Exception e) {
VMManager.sendMiddleMouseKey();
VMManager.sendMiddleMouseKey();
@ -1229,7 +1229,7 @@ public class MainVNCActivity extends VncCanvasActivity {
try {
MotionEvent e = MotionEvent.obtain(1000, 1000, MotionEvent.ACTION_DOWN, vncCanvas.mouseX, vncCanvas.mouseY,
0);
((TouchpadInputHandler) VncCanvasActivity.inputHandler).leftClick(e);
((TouchpadInputHandler) inputHandler).leftClick(e);
} catch (Exception e) {
VMManager.sendLeftMouseKey();
}

View file

@ -684,13 +684,13 @@ public class MainActivity extends AppCompatActivity implements RomStoreFragment.
binding.lnSearchSuggestions.setVisibility(View.VISIBLE);
binding.lnSearchSuggestionsSearchEmpty.setVisibility(View.VISIBLE);
if (currentSearchMode == SEARCH_ROM_STORE) {
if (adapterRomStoreSearchSuggestions != null)
adapterRomStoreSearchSuggestions.submitList(getSearchSuggestionList());
} else {
if (adapterSoftwareStoreSearchSuggestions != null)
adapterSoftwareStoreSearchSuggestions.submitList(getSearchSuggestionList());
}
// if (currentSearchMode == SEARCH_ROM_STORE) {
// if (adapterRomStoreSearchSuggestions != null)
// adapterRomStoreSearchSuggestions.submitList(getSearchSuggestionList());
// } else {
// if (adapterSoftwareStoreSearchSuggestions != null)
// adapterSoftwareStoreSearchSuggestions.submitList(getSearchSuggestionList());
// }
}
binding.rvSearch.setVisibility(View.GONE);
} else if (binding.searchview.getEditText().getText().toString().isEmpty()) {

View file

@ -3,6 +3,7 @@ package com.vectras.vm.settings;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.widget.Toast;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
@ -57,7 +58,12 @@ public class NotificationSettingsActivity extends AppCompatActivity {
} else {
intent.putExtra("android.provider.extra.APP_PACKAGE", getPackageName());
}
startActivity(intent);
try {
startActivity(intent);
} catch (Exception e) {
Toast.makeText(getApplicationContext(), getString(R.string.unavailable), Toast.LENGTH_SHORT).show();
}
});
binding.swSuggestionsAndTips.setChecked(MainSettingsManager.getSuggestionsAndTipsNotification(this));

View file

@ -5,11 +5,11 @@
"url": "https://github.com/xoureldeen/Vectras-VM-Android/releases",
"Message": "<h2>4.1.0</h2>\nBugs fixed.",
"cancellable": true,
"versionCodeBeta":"130",
"versionNameBeta":"4.2.6",
"versionNameBetas":"4.0.1,4.0.2,4.0.3,4.0.4,4.0.5,4.0.6,4.0.7,4.0.8,4.0.9,4.1.1,4.1.2,4.1.3,4.1.4,4.1.5,4.1.6,4.1.7,4.1.8,4.1.9,4.2.0,4.2.1,4.2.2,4.2.3,4.2.4,4.2.5,4.2.6",
"versionCodeBeta":"131",
"versionNameBeta":"4.2.7",
"versionNameBetas":"4.0.1,4.0.2,4.0.3,4.0.4,4.0.5,4.0.6,4.0.7,4.0.8,4.0.9,4.1.1,4.1.2,4.1.3,4.1.4,4.1.5,4.1.6,4.1.7,4.1.8,4.1.9,4.2.0,4.2.1,4.2.2,4.2.3,4.2.4,4.2.5,4.2.6,4.2.7",
"sizeBeta": "45 MB",
"urlBeta": "https://github.com/AnBui2004/Vectras-VM-Emu-Android/releases",
"MessageBeta": "<h2>4.2.6</h2>Bugs fixed.",
"MessageBeta": "<h2>4.2.7</h2>Bugs fixed.",
"cancellableBeta": true
}