Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<linker>
<assembly fullname="Mono.Android">
<type fullname="Android.Runtime.AnnotationAttribute" />
<type fullname="Android.Runtime.AndroidEnvironment">
<method name="NotifyTimeZoneChanged" />
</type>
<type fullname="Android.Runtime.IJavaObject" />
<type fullname="Android.Runtime.InputStreamAdapter" preserve="methods" />
<type fullname="Android.Runtime.InputStreamInvoker" preserve="methods" />
Expand Down
18 changes: 0 additions & 18 deletions src/Mono.Android/Android.Runtime/AndroidEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,24 +218,6 @@ static Java.Security.Cert.X509Certificate ConvertCertificate (Java.Security.Cert
.JavaCast<Java.Security.Cert.X509Certificate>()!;
}

// This is invoked by libmonodroid.so.
// DO NOT REMOVE
static void NotifyTimeZoneChanged ()
{
var thread = Thread.CurrentThread;
var timeZoneClearInfo = new[]{
new { Description = "Thread.CurrentCulture.ClearCachedData()", Method = (Action) thread.CurrentCulture.ClearCachedData },
new { Description = "Thread.CurrentUICulture.ClearCachedData()", Method = (Action) thread.CurrentUICulture.ClearCachedData },
};
foreach (var clearInfo in timeZoneClearInfo) {
try {
clearInfo.Method ();
} catch (Exception e) {
Logger.Log (LogLevel.Warn, "MonoAndroid", FormattableString.Invariant ($"Ignoring exception from {clearInfo.Description}: {e}"));
}
}
}

static void DetectCPUAndArchitecture (out ushort builtForCPU, out ushort runningOnCPU, out bool is64bit)
{
ushort built_for_cpu = 0;
Expand Down
5 changes: 0 additions & 5 deletions src/java-runtime/java/mono/android/MonoPackageManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public static void LoadApplication (Context context)
ApplicationRegistration.Context = context;
}
if (!initialized) {
android.content.IntentFilter timezoneChangedFilter = new android.content.IntentFilter (
android.content.Intent.ACTION_TIMEZONE_CHANGED
);
context.registerReceiver (new mono.android.app.NotifyTimeZoneChanges (), timezoneChangedFilter);

Locale locale = Locale.getDefault ();
String language = locale.getLanguage () + "-" + locale.getCountry ();
String filesDir = context.getFilesDir ().getAbsolutePath ();
Expand Down
1 change: 0 additions & 1 deletion src/java-runtime/java/mono/android/Runtime.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static native void initInternal (
);
public static native void register (String managedType, java.lang.Class nativeClass, String methods);
public static native void registerNatives (java.lang.Class nativeClass);
public static native void notifyTimeZoneChanged ();
public static native int createNewContext (String[] runtimeApks, String[] assemblies, ClassLoader loader);
public static native int createNewContextWithData (String[] runtimeApks, String[] assemblies, byte[][] assembliesBytes, String[] assembliesPaths, ClassLoader loader, boolean forcePreloadAssemblies);
public static native void switchToContext (int contextID);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public static void LoadApplication (Context context)
ApplicationRegistration.Context = context;
}
if (!initialized) {
android.content.IntentFilter timezoneChangedFilter = new android.content.IntentFilter (
android.content.Intent.ACTION_TIMEZONE_CHANGED
);
context.registerReceiver (new mono.android.app.NotifyTimeZoneChanges (), timezoneChangedFilter);

Locale locale = Locale.getDefault ();
String language = locale.getLanguage () + "-" + locale.getCountry ();
String filesDir = context.getFilesDir ().getAbsolutePath ();
Expand Down
6 changes: 0 additions & 6 deletions src/native/clr/host/host-jni.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,3 @@ JNICALL Java_mono_android_Runtime_propagateUncaughtException (JNIEnv *env, [[may
{
Host::propagate_uncaught_exception (env, javaThread, javaException);
}

JNIEXPORT void
JNICALL Java_mono_android_Runtime_notifyTimeZoneChanged ([[maybe_unused]] JNIEnv *env, [[maybe_unused]] jclass klass)
{
// TODO: implement or remove
}
7 changes: 0 additions & 7 deletions src/native/clr/include/host/host-jni.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ extern "C" {
*/
JNIEXPORT void JNICALL Java_mono_android_Runtime_initInternal (JNIEnv *, jclass, jstring, jobjectArray, jstring, jobjectArray, jint, jobject, jobjectArray, jboolean, jboolean);

/*
* Class: mono_android_Runtime
* Method: notifyTimeZoneChanged
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_mono_android_Runtime_notifyTimeZoneChanged (JNIEnv *, jclass);

/*
* Class: mono_android_Runtime
* Method: propagateUncaughtException
Expand Down
1 change: 0 additions & 1 deletion src/native/clr/libnet-android.map.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ LIBNET_ANDROID {
JNI_OnLoad;
Java_mono_android_Runtime_dumpTimingData;
Java_mono_android_Runtime_initInternal;
Java_mono_android_Runtime_notifyTimeZoneChanged;
Java_mono_android_Runtime_propagateUncaughtException;
Java_mono_android_Runtime_register;

Expand Down
1 change: 0 additions & 1 deletion src/native/mono/libmono-android.map.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ LIBMONO_ANDROID {
Java_mono_android_Runtime_dumpTimingData;
Java_mono_android_Runtime_init;
Java_mono_android_Runtime_initInternal;
Java_mono_android_Runtime_notifyTimeZoneChanged;
Java_mono_android_Runtime_propagateUncaughtException;
Java_mono_android_Runtime_register;

Expand Down
1 change: 0 additions & 1 deletion src/native/mono/monodroid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ set(XAMARIN_MONODROID_SOURCES
osbridge.cc
runtime-environment.cc
runtime-util.cc
timezones.cc
)

list(APPEND LOCAL_CLANG_CHECK_SOURCES
Expand Down
8 changes: 0 additions & 8 deletions src/native/mono/monodroid/mono_android_Runtime.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 0 additions & 68 deletions src/native/mono/monodroid/timezones.cc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ protected override void OnCreate(Bundle bundle)
// [Test] Post
Android.Util.Log.Info(TAG, HttpClientTest.Post ());

// [Test] MethodsArePreserved
Android.Util.Log.Info (TAG, PreserveTest.MethodsArePreserved ());

// [Test] TextChanged
Android.Util.Log.Info (TAG, MaterialTextChanged.TextChanged (this));

Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1230,9 +1230,6 @@ public class LinkModeFullClass {
new BuildItem.Source ("LocalTestServers.cs") {
TextContent = () => File.ReadAllText (Path.Combine (XABuildPaths.TopDirectory, "tests", "Mono.Android-Tests", "Mono.Android-Tests", "Xamarin.Android.Net", "LocalTestServers.cs"))
},
new BuildItem.Source ("PreserveTest.cs") {
TextContent = () => getResource("PreserveTest")
},
},
};
lib2.SetRuntime (runtime);
Expand Down
Loading