Compare commits

...

2 Commits

Author SHA1 Message Date
Romain Vimont
6b4e8e8e59 Bump version to 3.3.2 2025-09-06 14:33:49 +02:00
Romain Vimont
876e42de9b Workaround clipboard issue on Samsung
Fixes #6224 <https://github.com/Genymobile/scrcpy/issues/6224>

Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
2025-09-06 14:32:34 +02:00
5 changed files with 14 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ BEGIN
VALUE "LegalCopyright", "Romain Vimont, Genymobile"
VALUE "OriginalFilename", "scrcpy.exe"
VALUE "ProductName", "scrcpy"
VALUE "ProductVersion", "3.3.1"
VALUE "ProductVersion", "3.3.2"
END
END
BLOCK "VarFileInfo"

View File

@@ -1,5 +1,5 @@
project('scrcpy', 'c',
version: '3.3.1',
version: '3.3.2',
meson_version: '>= 0.49',
default_options: [
'c_std=c11',

View File

@@ -7,8 +7,8 @@ android {
applicationId "com.genymobile.scrcpy"
minSdkVersion 21
targetSdkVersion 35
versionCode 30301
versionName "3.3.1"
versionCode 30302
versionName "3.3.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {

View File

@@ -12,7 +12,7 @@
set -e
SCRCPY_DEBUG=false
SCRCPY_VERSION_NAME=3.3.1
SCRCPY_VERSION_NAME=3.3.2
PLATFORM=${ANDROID_PLATFORM:-35}
BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-35.0.0}

View File

@@ -5,7 +5,6 @@ import com.genymobile.scrcpy.wrappers.ServiceManager;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.AttributionSource;
import android.content.ClipboardManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.ContextWrapper;
@@ -91,6 +90,11 @@ public final class FakeContext extends ContextWrapper {
return this;
}
@Override
public Context createPackageContext(String packageName, int flags) {
return this;
}
@Override
public ContentResolver getContentResolver() {
return contentResolver;
@@ -104,9 +108,11 @@ public final class FakeContext extends ContextWrapper {
return null;
}
if (Context.CLIPBOARD_SERVICE.equals(name)) {
// "semclipboard" is a Samsung-internal service
// See <https://github.com/Genymobile/scrcpy/issues/6224>
if (Context.CLIPBOARD_SERVICE.equals(name) || "semclipboard".equals(name)) {
try {
Field field = ClipboardManager.class.getDeclaredField("mContext");
Field field = service.getClass().getDeclaredField("mContext");
field.setAccessible(true);
field.set(service, this);
} catch (ReflectiveOperationException e) {