Skip to content

Commit 97c50d9

Browse files
committed
android/activity: dont reimplement hashCode and equals, to prevent facing OverflowError again. Ref kivy/pyjnius#146
1 parent 70593e3 commit 97c50d9

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

recipes/android/src/android/activity.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ def __init__(self, callback, **kwargs):
1818
def onNewIntent(self, intent):
1919
self.callback(intent)
2020

21-
@java_method('(Ljava/lang/Object;)Z')
22-
def equals(self, obj):
23-
return obj.hashCode() == self.hashCode()
24-
25-
@java_method('()I')
26-
def hashCode(self):
27-
return id(self)
28-
2921

3022
class ActivityResultListener(PythonJavaClass):
3123
__javainterfaces__ = ['org/renpy/android/PythonActivity$ActivityResultListener']
@@ -39,14 +31,6 @@ def __init__(self, callback):
3931
def onActivityResult(self, requestCode, resultCode, intent):
4032
self.callback(requestCode, resultCode, intent)
4133

42-
@java_method('(Ljava/lang/Object;)Z')
43-
def equals(self, obj):
44-
return obj.hashCode() == self.hashCode()
45-
46-
@java_method('()I')
47-
def hashCode(self):
48-
return id(self)
49-
5034

5135
def bind(**kwargs):
5236
for event, callback in kwargs.items():

0 commit comments

Comments
 (0)