-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdonate.patch
More file actions
207 lines (199 loc) · 9.02 KB
/
Copy pathdonate.patch
File metadata and controls
207 lines (199 loc) · 9.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
Index: android/jni/include/org_exobel_routerkeygen_ThomsonKeygen.h
===================================================================
--- android/jni/include/org_exobel_routerkeygen_ThomsonKeygen.h (revision 253)
+++ android/jni/include/org_exobel_routerkeygen_ThomsonKeygen.h (working copy)
@@ -1,24 +1,24 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
-/* Header for class org_exobel_routerkeygen_ThomsonKeygen */
+/* Header for class org_exobel_routerkeygen_donate_ThomsonKeygen */
-#ifndef _Included_org_exobel_routerkeygen_ThomsonKeygen
-#define _Included_org_exobel_routerkeygen_ThomsonKeygen
+#ifndef _Included_org_exobel_routerkeygen_donate_ThomsonKeygen
+#define _Included_org_exobel_routerkeygen_donate_ThomsonKeygen
#ifdef __cplusplus
extern "C" {
#endif
-#undef org_exobel_routerkeygen_ThomsonKeygen_MIN_PRIORITY
-#define org_exobel_routerkeygen_ThomsonKeygen_MIN_PRIORITY 1L
-#undef org_exobel_routerkeygen_ThomsonKeygen_NORM_PRIORITY
-#define org_exobel_routerkeygen_ThomsonKeygen_NORM_PRIORITY 5L
-#undef org_exobel_routerkeygen_ThomsonKeygen_MAX_PRIORITY
-#define org_exobel_routerkeygen_ThomsonKeygen_MAX_PRIORITY 10L
+#undef org_exobel_routerkeygen_ThomsonKeygen_donate_MIN_PRIORITY
+#define org_exobel_routerkeygen_ThomsonKeygen_donate_MIN_PRIORITY 1L
+#undef org_exobel_routerkeygen_ThomsonKeygen_donate_NORM_PRIORITY
+#define org_exobel_routerkeygen_ThomsonKeygen_donate_NORM_PRIORITY 5L
+#undef org_exobel_routerkeygen_ThomsonKeygen_donate_MAX_PRIORITY
+#define org_exobel_routerkeygen_ThomsonKeygen_donate_MAX_PRIORITY 10L
/*
* Class: org_exobel_routerkeygen_ThomsonKeygen
* Method: thirdDicNative
* Signature: ([B[B)[Ljava/lang/String;
*/
-JNIEXPORT jobjectArray JNICALL Java_org_exobel_routerkeygen_ThomsonKeygen_thirdDicNative
+JNIEXPORT jobjectArray JNICALL Java_org_exobel_routerkeygen_donate_ThomsonKeygen_thirdDicNative
(JNIEnv *, jobject, jbyteArray, jbyteArray, jint);
#ifdef __cplusplus
Index: android/jni/include/org_exobel_routerkeygen_NativeThomson.h
===================================================================
--- android/jni/include/org_exobel_routerkeygen_NativeThomson.h (revision 253)
+++ android/jni/include/org_exobel_routerkeygen_NativeThomson.h (working copy)
@@ -1,24 +1,24 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
-/* Header for class org_exobel_routerkeygen_NativeThomson */
+/* Header for class org_exobel_routerkeygen_donate_NativeThomson */
-#ifndef _Included_org_exobel_routerkeygen_NativeThomson
-#define _Included_org_exobel_routerkeygen_NativeThomson
+#ifndef _Included_org_exobel_routerkeygen_donate_NativeThomson
+#define _Included_org_exobel_routerkeygen_donate_NativeThomson
#ifdef __cplusplus
extern "C" {
#endif
-#undef org_exobel_routerkeygen_NativeThomson_MIN_PRIORITY
-#define org_exobel_routerkeygen_NativeThomson_MIN_PRIORITY 1L
-#undef org_exobel_routerkeygen_NativeThomson_NORM_PRIORITY
-#define org_exobel_routerkeygen_NativeThomson_NORM_PRIORITY 5L
-#undef org_exobel_routerkeygen_NativeThomson_MAX_PRIORITY
-#define org_exobel_routerkeygen_NativeThomson_MAX_PRIORITY 10L
+#undef org_exobel_routerkeygen_NativeThomson_donate_MIN_PRIORITY
+#define org_exobel_routerkeygen_NativeThomson_donate_MIN_PRIORITY 1L
+#undef org_exobel_routerkeygen_NativeThomson_donate_NORM_PRIORITY
+#define org_exobel_routerkeygen_NativeThomson_donate_NORM_PRIORITY 5L
+#undef org_exobel_routerkeygen_NativeThomson_donate_MAX_PRIORITY
+#define org_exobel_routerkeygen_NativeThomson_donate_MAX_PRIORITY 10L
/*
* Class: org_exobel_routerkeygen_NativeThomson
* Method: thomson
* Signature: ([BI)[Ljava/lang/String;
*/
-JNIEXPORT jobjectArray JNICALL Java_org_exobel_routerkeygen_NativeThomson_thomson
+JNIEXPORT jobjectArray JNICALL Java_org_exobel_routerkeygen_donate_NativeThomson_thomson
(JNIEnv *, jobject, jbyteArray);
#ifdef __cplusplus
Index: android/jni/thomson.c
===================================================================
--- android/jni/thomson.c (revision 253)
+++ android/jni/thomson.c (working copy)
@@ -1,4 +1,4 @@
-#include "org_exobel_routerkeygen_NativeThomson.h"
+#include "org_exobel_routerkeygen_donate_NativeThomson.h"
#include <ctype.h>
#include <string.h>
#include "sha.h"
@@ -8,7 +8,7 @@
#include <stdint.h>
#include <android/log.h>
-JNIEXPORT jobjectArray JNICALL Java_org_exobel_routerkeygen_NativeThomson_thomson
+JNIEXPORT jobjectArray JNICALL Java_org_exobel_routerkeygen_donate_NativeThomson_thomson
(JNIEnv * env, jobject obj, jbyteArray ess )
{
int n = sizeof(dic)/sizeof("AAA");
Index: android/jni/thomsonDic.c
===================================================================
--- android/jni/thomsonDic.c (revision 253)
+++ android/jni/thomsonDic.c (working copy)
@@ -1,4 +1,4 @@
-#include "org_exobel_routerkeygen_ThomsonKeygen.h"
+#include "org_exobel_routerkeygen_donate_ThomsonKeygen.h"
#include <ctype.h>
#include <string.h>
#include "sha.h"
@@ -26,7 +26,7 @@
'5','6','7','8','9','A',
};
-JNIEXPORT jobjectArray JNICALL Java_org_exobel_routerkeygen_ThomsonKeygen_thirdDicNative
+JNIEXPORT jobjectArray JNICALL Java_org_exobel_routerkeygen_donate_ThomsonKeygen_thirdDicNative
(JNIEnv * env, jobject obj , jbyteArray ess , jbyteArray ent, jint size)
{
int year = 4;
Index: android/AndroidManifest.xml
===================================================================
--- android/AndroidManifest.xml (revision 253)
+++ android/AndroidManifest.xml (working copy)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="org.exobel.routerkeygen"
+ package="org.exobel.routerkeygen.donate"
android:versionCode="15" android:versionName="2.8.1">
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="11"/>
<application
Index: android/src/org/exobel/routerkeygen/Preferences.java
===================================================================
--- android/src/org/exobel/routerkeygen/Preferences.java (revision 253)
+++ android/src/org/exobel/routerkeygen/Preferences.java (working copy)
@@ -19,16 +19,13 @@
import android.app.Dialog;
import android.app.AlertDialog.Builder;
import android.app.ProgressDialog;
-import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnDismissListener;
-import android.content.Intent;
import android.content.SharedPreferences;
import android.content.DialogInterface.OnClickListener;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
-import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Environment;
@@ -59,9 +56,7 @@
byte[] dicVersion = new byte [2];
static byte[] cfvTable = new byte[18];
-
- private static final String PUB_DONATE =
- "market://details?id=org.exobel.routerkeygen.donate";
+
public static final String PUB_DOWNLOAD =
"http://android-thomson-key-solver.googlecode.com/files/RKDictionary.dic";
private static final String PUB_DIC_CFV =
@@ -92,18 +87,6 @@
return true;
}
});
- findPreference("donate").setOnPreferenceClickListener(
- new OnPreferenceClickListener() {
- public boolean onPreferenceClick(Preference preference) {
- Intent intent = new Intent(Intent.ACTION_VIEW);
- intent.setData(Uri.parse(PUB_DONATE));
- try {
- Preferences.this.startActivity(intent);
- } catch (ActivityNotFoundException anfe) {}
- return true;
- }
- });
-
findPreference("about").setOnPreferenceClickListener(
new OnPreferenceClickListener() {
public boolean onPreferenceClick(Preference preference) {
Index: android/src/org/exobel/routerkeygen/RouterKeygen.java
===================================================================
--- android/src/org/exobel/routerkeygen/RouterKeygen.java (revision 253)
+++ android/src/org/exobel/routerkeygen/RouterKeygen.java (working copy)
@@ -83,7 +83,7 @@
if (!welcomeScreenShown) {
String whatsNewTitle = getString(R.string.msg_welcome_title);
- String whatsNewText = getString(R.string.msg_welcome_text);
+ String whatsNewText = getString(R.string.msg_welcome_text_donate);
new AlertDialog.Builder(this).setIcon(android.R.drawable.ic_dialog_alert).setTitle(whatsNewTitle).setMessage(whatsNewText).setPositiveButton(
R.string.bt_ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Index: android/res/layout/preferences.xml
===================================================================
--- android/res/layout/preferences.xml (revision 253)
+++ android/res/layout/preferences.xml (working copy)
@@ -42,10 +42,6 @@
<PreferenceCategory
android:title="@string/pref_2section">
<Preference
- android:title="@string/pref_donate"
- android:summary="@string/pref_donate_why"
- android:key="donate" />
- <Preference
android:title="@string/pref_about"
android:key="about" />
</PreferenceCategory>