io.appium.settings 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apks/settings_apk-debug.apk +0 -0
- package/package.json +2 -8
- package/app/build.gradle +0 -38
- package/app/src/main/AndroidManifest.xml +0 -149
- package/app/src/main/java/io/appium/settings/AppiumIME.java +0 -153
- package/app/src/main/java/io/appium/settings/ForegroundService.java +0 -70
- package/app/src/main/java/io/appium/settings/LocationService.java +0 -215
- package/app/src/main/java/io/appium/settings/LocationTracker.java +0 -313
- package/app/src/main/java/io/appium/settings/NLService.java +0 -134
- package/app/src/main/java/io/appium/settings/Settings.java +0 -260
- package/app/src/main/java/io/appium/settings/UnicodeIME.java +0 -187
- package/app/src/main/java/io/appium/settings/Unlock.java +0 -75
- package/app/src/main/java/io/appium/settings/handlers/AbstractSettingHandler.java +0 -64
- package/app/src/main/java/io/appium/settings/handlers/AnimationSettingHandler.java +0 -66
- package/app/src/main/java/io/appium/settings/handlers/BluetoothConnectionSettingHandler.java +0 -42
- package/app/src/main/java/io/appium/settings/handlers/DataConnectionSettingHandler.java +0 -134
- package/app/src/main/java/io/appium/settings/handlers/LocaleSettingHandler.java +0 -86
- package/app/src/main/java/io/appium/settings/handlers/WiFiConnectionSettingHandler.java +0 -40
- package/app/src/main/java/io/appium/settings/helpers/NotificationHelpers.java +0 -67
- package/app/src/main/java/io/appium/settings/helpers/PlayServicesHelpers.java +0 -30
- package/app/src/main/java/io/appium/settings/helpers/Utils.java +0 -29
- package/app/src/main/java/io/appium/settings/location/FusedLocationProvider.java +0 -99
- package/app/src/main/java/io/appium/settings/location/LocationBuilder.java +0 -80
- package/app/src/main/java/io/appium/settings/location/LocationManagerProvider.java +0 -97
- package/app/src/main/java/io/appium/settings/location/MockLocationProvider.java +0 -31
- package/app/src/main/java/io/appium/settings/notifications/StoredNotification.java +0 -103
- package/app/src/main/java/io/appium/settings/notifications/StoredNotifications.java +0 -50
- package/app/src/main/java/io/appium/settings/receivers/AbstractSettingReceiver.java +0 -62
- package/app/src/main/java/io/appium/settings/receivers/AnimationSettingReceiver.java +0 -40
- package/app/src/main/java/io/appium/settings/receivers/BluetoothConnectionSettingReceiver.java +0 -49
- package/app/src/main/java/io/appium/settings/receivers/ClipboardReceiver.java +0 -91
- package/app/src/main/java/io/appium/settings/receivers/DataConnectionSettingReceiver.java +0 -40
- package/app/src/main/java/io/appium/settings/receivers/HasAction.java +0 -21
- package/app/src/main/java/io/appium/settings/receivers/LocaleSettingReceiver.java +0 -127
- package/app/src/main/java/io/appium/settings/receivers/LocationInfoReceiver.java +0 -67
- package/app/src/main/java/io/appium/settings/receivers/MediaScannerReceiver.java +0 -91
- package/app/src/main/java/io/appium/settings/receivers/NotificationsReceiver.java +0 -100
- package/app/src/main/java/io/appium/settings/receivers/SmsReader.java +0 -113
- package/app/src/main/java/io/appium/settings/receivers/UnpairBluetoothDevicesReceiver.java +0 -84
- package/app/src/main/java/io/appium/settings/receivers/WiFiConnectionSettingReceiver.java +0 -39
- package/app/src/main/java/io/appium/settings/recorder/RecorderConstant.java +0 -94
- package/app/src/main/java/io/appium/settings/recorder/RecorderService.java +0 -202
- package/app/src/main/java/io/appium/settings/recorder/RecorderThread.java +0 -459
- package/app/src/main/java/io/appium/settings/recorder/RecorderUtil.java +0 -298
- package/app/src/main/res/drawable-hdpi/ic_launcher.png +0 -0
- package/app/src/main/res/drawable-ldpi/ic_launcher.png +0 -0
- package/app/src/main/res/drawable-mdpi/ic_launcher.png +0 -0
- package/app/src/main/res/drawable-xhdpi/ic_launcher.png +0 -0
- package/app/src/main/res/drawable-xxhdpi/ic_launcher.png +0 -0
- package/app/src/main/res/drawable-xxxhdpi/ic_launcher.png +0 -0
- package/app/src/main/res/layout/main.xml +0 -29
- package/app/src/main/res/values/dimens.xml +0 -7
- package/app/src/main/res/values/strings.xml +0 -9
- package/app/src/main/res/xml/method.xml +0 -3
- package/build.gradle +0 -17
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/gradle.properties +0 -15
- package/gradlew +0 -160
- package/gradlew.bat +0 -90
- package/settings.gradle +0 -1
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2012-present Appium Committers
|
|
3
|
-
<p>
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
<p>
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
<p>
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
package io.appium.settings.recorder;
|
|
18
|
-
|
|
19
|
-
import android.Manifest;
|
|
20
|
-
import android.app.AppOpsManager;
|
|
21
|
-
import android.content.Context;
|
|
22
|
-
import android.content.Intent;
|
|
23
|
-
import android.content.pm.ApplicationInfo;
|
|
24
|
-
import android.content.pm.PackageManager;
|
|
25
|
-
import android.media.MediaCodec;
|
|
26
|
-
import android.media.MediaCodecInfo;
|
|
27
|
-
import android.os.Build;
|
|
28
|
-
import android.util.Log;
|
|
29
|
-
import android.util.Size;
|
|
30
|
-
import android.view.Display;
|
|
31
|
-
import android.view.Surface;
|
|
32
|
-
import android.view.WindowManager;
|
|
33
|
-
|
|
34
|
-
import java.io.IOException;
|
|
35
|
-
|
|
36
|
-
import androidx.annotation.RequiresApi;
|
|
37
|
-
import androidx.core.app.ActivityCompat;
|
|
38
|
-
|
|
39
|
-
import static android.content.Context.WINDOW_SERVICE;
|
|
40
|
-
import static io.appium.settings.recorder.RecorderConstant.ACTION_RECORDING_MAX_DURATION;
|
|
41
|
-
import static io.appium.settings.recorder.RecorderConstant.ACTION_RECORDING_PRIORITY;
|
|
42
|
-
import static io.appium.settings.recorder.RecorderConstant.ACTION_RECORDING_RESOLUTION;
|
|
43
|
-
import static io.appium.settings.recorder.RecorderConstant.NO_RESOLUTION_MODE_SET;
|
|
44
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_DEFAULT_VIDEO_MIME_TYPE;
|
|
45
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_MAX_DURATION_DEFAULT_MS;
|
|
46
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_PRIORITY_DEFAULT;
|
|
47
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_PRIORITY_MAX;
|
|
48
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_PRIORITY_MIN;
|
|
49
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_PRIORITY_NORM;
|
|
50
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_RESOLUTION_480P;
|
|
51
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_RESOLUTION_DEFAULT;
|
|
52
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_RESOLUTION_FULL_HD;
|
|
53
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_RESOLUTION_HD;
|
|
54
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_RESOLUTION_LIST;
|
|
55
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_RESOLUTION_QCIF;
|
|
56
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_RESOLUTION_QVGA;
|
|
57
|
-
import static io.appium.settings.recorder.RecorderConstant.RECORDING_ROTATION_DEFAULT_DEGREE;
|
|
58
|
-
|
|
59
|
-
public class RecorderUtil {
|
|
60
|
-
private static final String TAG = "RecorderUtil";
|
|
61
|
-
|
|
62
|
-
public static boolean isLowerThanQ() {
|
|
63
|
-
return Build.VERSION.SDK_INT < Build.VERSION_CODES.Q;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@RequiresApi(api = Build.VERSION_CODES.Q)
|
|
67
|
-
public static boolean areRecordingPermissionsGranted(Context context) {
|
|
68
|
-
// Check if we have required permission
|
|
69
|
-
int permissionAudio = ActivityCompat.checkSelfPermission(context,
|
|
70
|
-
Manifest.permission.RECORD_AUDIO);
|
|
71
|
-
|
|
72
|
-
return permissionAudio == PackageManager.PERMISSION_GRANTED
|
|
73
|
-
&& isMediaProjectionPermissionGranted(context);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
@RequiresApi(api = Build.VERSION_CODES.Q)
|
|
77
|
-
public static boolean isMediaProjectionPermissionGranted(Context context) {
|
|
78
|
-
try {
|
|
79
|
-
PackageManager packageManager = context.getPackageManager();
|
|
80
|
-
ApplicationInfo applicationInfo =
|
|
81
|
-
packageManager.getApplicationInfo(context.getPackageName(), 0);
|
|
82
|
-
AppOpsManager appOpsManager =
|
|
83
|
-
(AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
|
|
84
|
-
// AppOpsManager.OPSTR_PROJECT_MEDIA == "android:project_media" is a hidden field value,
|
|
85
|
-
// so directly taken from https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/app/AppOpsManager.java#1532
|
|
86
|
-
int mode = appOpsManager.unsafeCheckOpNoThrow("android:project_media",
|
|
87
|
-
applicationInfo.uid, applicationInfo.packageName);
|
|
88
|
-
return (mode == AppOpsManager.MODE_ALLOWED);
|
|
89
|
-
} catch (PackageManager.NameNotFoundException e) {
|
|
90
|
-
Log.e(TAG, "Exception while checking media projection permission", e);
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
public static boolean isValidFileName(String filename) {
|
|
96
|
-
if (filename == null || filename.isEmpty() || !filename.endsWith(".mp4")) {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
if (filename.length() >= 255) {
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
for (char c : filename.toCharArray()) {
|
|
103
|
-
if (!isValidFilenameChar(c)){
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// taken from https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/os/FileUtils.java#995
|
|
111
|
-
private static boolean isValidFilenameChar(char c) {
|
|
112
|
-
switch (c) {
|
|
113
|
-
case '"':
|
|
114
|
-
case '*':
|
|
115
|
-
case '/':
|
|
116
|
-
case ':':
|
|
117
|
-
case '<':
|
|
118
|
-
case '>':
|
|
119
|
-
case '?':
|
|
120
|
-
case '\\':
|
|
121
|
-
case '|':
|
|
122
|
-
case '\0':
|
|
123
|
-
return false;
|
|
124
|
-
default:
|
|
125
|
-
return true;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
public static int getDeviceRotationInDegree(Context context) {
|
|
130
|
-
WindowManager wm = (WindowManager) context.getSystemService(WINDOW_SERVICE);
|
|
131
|
-
if (wm == null) {
|
|
132
|
-
return RECORDING_ROTATION_DEFAULT_DEGREE;
|
|
133
|
-
}
|
|
134
|
-
Display display = wm.getDefaultDisplay();
|
|
135
|
-
if (display == null) {
|
|
136
|
-
return RECORDING_ROTATION_DEFAULT_DEGREE;
|
|
137
|
-
}
|
|
138
|
-
int deviceRotation = display.getRotation();
|
|
139
|
-
|
|
140
|
-
switch(deviceRotation) {
|
|
141
|
-
case Surface.ROTATION_0:
|
|
142
|
-
// portrait
|
|
143
|
-
return 0;
|
|
144
|
-
case Surface.ROTATION_90:
|
|
145
|
-
// landscape left
|
|
146
|
-
return 90;
|
|
147
|
-
case Surface.ROTATION_180:
|
|
148
|
-
// flipped portrait
|
|
149
|
-
return 180;
|
|
150
|
-
case Surface.ROTATION_270:
|
|
151
|
-
// landscape right
|
|
152
|
-
return 270;
|
|
153
|
-
default:
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
return RECORDING_ROTATION_DEFAULT_DEGREE;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
public static int getRecordingPriority(Intent intent) {
|
|
160
|
-
if (intent.hasExtra(ACTION_RECORDING_PRIORITY)) {
|
|
161
|
-
String userRequestedRecordingPriority =
|
|
162
|
-
intent.getStringExtra(ACTION_RECORDING_PRIORITY);
|
|
163
|
-
|
|
164
|
-
if (userRequestedRecordingPriority == null) {
|
|
165
|
-
Log.e(TAG, "Unable to retrieve recording priority from intent extras");
|
|
166
|
-
return RECORDING_PRIORITY_DEFAULT;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
switch(userRequestedRecordingPriority) {
|
|
170
|
-
case RECORDING_PRIORITY_MAX:
|
|
171
|
-
return Thread.MAX_PRIORITY;
|
|
172
|
-
case RECORDING_PRIORITY_MIN:
|
|
173
|
-
return Thread.MIN_PRIORITY;
|
|
174
|
-
case RECORDING_PRIORITY_NORM:
|
|
175
|
-
return Thread.NORM_PRIORITY;
|
|
176
|
-
default:
|
|
177
|
-
Log.e(TAG, "Invalid recording priority passed by user");
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
} else {
|
|
181
|
-
Log.e(TAG, "Unable to retrieve recording priority from intent");
|
|
182
|
-
}
|
|
183
|
-
return RECORDING_PRIORITY_DEFAULT;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
public static int getRecordingMaxDuration(Intent intent) {
|
|
187
|
-
if (intent.hasExtra(ACTION_RECORDING_MAX_DURATION)) {
|
|
188
|
-
try {
|
|
189
|
-
int userRequestedMaxDurationInSecond =
|
|
190
|
-
Integer.parseInt(intent.getStringExtra(ACTION_RECORDING_MAX_DURATION));
|
|
191
|
-
if (userRequestedMaxDurationInSecond <= 0) {
|
|
192
|
-
Log.e(TAG, "Maximum recording duration must be greater than 0 second");
|
|
193
|
-
return RECORDING_MAX_DURATION_DEFAULT_MS;
|
|
194
|
-
}
|
|
195
|
-
// Convert it to millisecond and return
|
|
196
|
-
return userRequestedMaxDurationInSecond * 1000;
|
|
197
|
-
} catch (NumberFormatException e) {
|
|
198
|
-
Log.e(TAG, "Exception while retrieving recording max duration", e);
|
|
199
|
-
}
|
|
200
|
-
} else {
|
|
201
|
-
Log.e(TAG, "Unable to retrieve recording max duration");
|
|
202
|
-
}
|
|
203
|
-
return RECORDING_MAX_DURATION_DEFAULT_MS;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
public static String getRecordingResolutionMode(Intent intent) {
|
|
207
|
-
if (intent.hasExtra(ACTION_RECORDING_RESOLUTION)) {
|
|
208
|
-
String userRequestedResolutionMode =
|
|
209
|
-
intent.getStringExtra(ACTION_RECORDING_RESOLUTION);
|
|
210
|
-
if (userRequestedResolutionMode == null) {
|
|
211
|
-
Log.e(TAG, "Unable to retrieve resolution mode from intent extras, " +
|
|
212
|
-
"using max supported resolution");
|
|
213
|
-
return NO_RESOLUTION_MODE_SET;
|
|
214
|
-
}
|
|
215
|
-
return userRequestedResolutionMode;
|
|
216
|
-
} else {
|
|
217
|
-
Log.v(TAG, "Unable to retrieve resolution mode from intent, " +
|
|
218
|
-
"using max supported resolution");
|
|
219
|
-
}
|
|
220
|
-
return NO_RESOLUTION_MODE_SET;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
|
224
|
-
public static Size getRecordingResolution(String userRequestedResolutionMode) {
|
|
225
|
-
if (userRequestedResolutionMode == null) {
|
|
226
|
-
Log.e(TAG, "Unable to retrieve resolution mode, " +
|
|
227
|
-
"using max supported resolution");
|
|
228
|
-
return getSupportedMaxResolution();
|
|
229
|
-
}
|
|
230
|
-
if (userRequestedResolutionMode.isEmpty()) {
|
|
231
|
-
Log.v(TAG, "Unable to retrieve resolution mode, " +
|
|
232
|
-
"using max supported resolution");
|
|
233
|
-
return getSupportedMaxResolution();
|
|
234
|
-
}
|
|
235
|
-
// Split resolution mode (e.g 1920x1080) to it's width and height values,
|
|
236
|
-
// lowercase 'x' or uppercase 'X' are both accepted/valid separator
|
|
237
|
-
String[] resolutionWidthHeight = userRequestedResolutionMode
|
|
238
|
-
.toLowerCase()
|
|
239
|
-
.split("x");
|
|
240
|
-
if (resolutionWidthHeight.length != 2) {
|
|
241
|
-
Log.e(TAG, "Invalid resolution mode passed by user, " +
|
|
242
|
-
"using max supported resolution");
|
|
243
|
-
return getSupportedMaxResolution();
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
try {
|
|
247
|
-
int requestedResolutionWidth =
|
|
248
|
-
Integer.parseInt(resolutionWidthHeight[0]);
|
|
249
|
-
int requestedResolutionHeight =
|
|
250
|
-
Integer.parseInt(resolutionWidthHeight[1]);
|
|
251
|
-
|
|
252
|
-
Size requestedResolution =
|
|
253
|
-
new Size(requestedResolutionWidth, requestedResolutionHeight);
|
|
254
|
-
|
|
255
|
-
// android.util.Size's equality check (equals(Object) method) also accounts width/height equality
|
|
256
|
-
if (requestedResolution.equals(RECORDING_RESOLUTION_FULL_HD)) {
|
|
257
|
-
return RECORDING_RESOLUTION_FULL_HD;
|
|
258
|
-
} else if (requestedResolution.equals(RECORDING_RESOLUTION_HD)) {
|
|
259
|
-
return RECORDING_RESOLUTION_HD;
|
|
260
|
-
} else if (requestedResolution.equals(RECORDING_RESOLUTION_480P)) {
|
|
261
|
-
return RECORDING_RESOLUTION_480P;
|
|
262
|
-
} else if (requestedResolution.equals(RECORDING_RESOLUTION_QVGA)) {
|
|
263
|
-
return RECORDING_RESOLUTION_QVGA;
|
|
264
|
-
} else if (requestedResolution.equals(RECORDING_RESOLUTION_QCIF)) {
|
|
265
|
-
return RECORDING_RESOLUTION_QCIF;
|
|
266
|
-
} else {
|
|
267
|
-
Log.e(TAG, "Invalid resolution mode passed by user, " +
|
|
268
|
-
"using max supported resolution");
|
|
269
|
-
}
|
|
270
|
-
} catch (NumberFormatException e) {
|
|
271
|
-
Log.e(TAG, "Exception while parsing resolution mode argument, " +
|
|
272
|
-
"using max supported resolution", e);
|
|
273
|
-
}
|
|
274
|
-
return getSupportedMaxResolution();
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
|
278
|
-
public static Size getSupportedMaxResolution() {
|
|
279
|
-
try {
|
|
280
|
-
MediaCodec videoEncoder =
|
|
281
|
-
MediaCodec.createEncoderByType(RECORDING_DEFAULT_VIDEO_MIME_TYPE);
|
|
282
|
-
MediaCodecInfo.VideoCapabilities videoEncoderCapabilities = videoEncoder
|
|
283
|
-
.getCodecInfo().getCapabilitiesForType(RECORDING_DEFAULT_VIDEO_MIME_TYPE)
|
|
284
|
-
.getVideoCapabilities();
|
|
285
|
-
|
|
286
|
-
for(Size resolution: RECORDING_RESOLUTION_LIST) {
|
|
287
|
-
if (videoEncoderCapabilities.isSizeSupported(
|
|
288
|
-
resolution.getWidth(), resolution.getHeight())) {
|
|
289
|
-
return resolution;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
} catch (IOException e) {
|
|
293
|
-
Log.e(TAG, "Exception while retrieving default supported recording resolution", e);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
return RECORDING_RESOLUTION_DEFAULT;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<RelativeLayout xmlns:tools="http://schemas.android.com/tools"
|
|
2
|
-
android:layout_width="match_parent"
|
|
3
|
-
android:layout_height="match_parent"
|
|
4
|
-
android:paddingBottom="@dimen/activity_vertical_margin"
|
|
5
|
-
android:paddingLeft="@dimen/activity_horizontal_margin"
|
|
6
|
-
android:paddingRight="@dimen/activity_horizontal_margin"
|
|
7
|
-
android:paddingTop="@dimen/activity_vertical_margin"
|
|
8
|
-
tools:context=".Settings" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
9
|
-
<LinearLayout
|
|
10
|
-
android:layout_width="match_parent"
|
|
11
|
-
android:layout_height="wrap_content"
|
|
12
|
-
android:orientation="vertical" >
|
|
13
|
-
<TextView
|
|
14
|
-
android:id="@+id/notice_0"
|
|
15
|
-
android:layout_width="match_parent"
|
|
16
|
-
android:layout_height="wrap_content"
|
|
17
|
-
android:layout_marginBottom="20dp"
|
|
18
|
-
android:text="@string/placeholder"
|
|
19
|
-
android:textSize="20dp" >
|
|
20
|
-
</TextView>
|
|
21
|
-
<TextView
|
|
22
|
-
android:id="@+id/notice_1"
|
|
23
|
-
android:layout_width="match_parent"
|
|
24
|
-
android:layout_height="wrap_content"
|
|
25
|
-
android:layout_marginBottom="20dp"
|
|
26
|
-
android:text="@string/placeholder"
|
|
27
|
-
android:textSize="20dp" />
|
|
28
|
-
</LinearLayout>
|
|
29
|
-
</RelativeLayout>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<resources>
|
|
3
|
-
<string name="app_name">Appium Settings</string>
|
|
4
|
-
<string name="placeholder"></string>
|
|
5
|
-
<string name="data_on">Enabling data service.</string>
|
|
6
|
-
<string name="data_off">Disabling data service.</string>
|
|
7
|
-
<string name="wifi_on">Enabling wifi service.</string>
|
|
8
|
-
<string name="wifi_off">Disabling wifi service.</string>
|
|
9
|
-
</resources>
|
package/build.gradle
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
2
|
-
buildscript {
|
|
3
|
-
repositories {
|
|
4
|
-
google()
|
|
5
|
-
mavenCentral()
|
|
6
|
-
}
|
|
7
|
-
dependencies {
|
|
8
|
-
classpath 'com.android.tools.build:gradle:7.2.0'
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
allprojects {
|
|
13
|
-
repositories {
|
|
14
|
-
google()
|
|
15
|
-
mavenCentral()
|
|
16
|
-
}
|
|
17
|
-
}
|
|
Binary file
|
package/gradle.properties
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
## For more details on how to configure your build environment visit
|
|
2
|
-
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
3
|
-
#
|
|
4
|
-
# Specifies the JVM arguments used for the daemon process.
|
|
5
|
-
# The setting is particularly useful for tweaking memory settings.
|
|
6
|
-
# Default value: -Xmx1024m -XX:MaxPermSize=256m
|
|
7
|
-
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
|
8
|
-
#
|
|
9
|
-
# When configured, Gradle will run in incubating parallel mode.
|
|
10
|
-
# This option should only be used with decoupled projects. More details, visit
|
|
11
|
-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
12
|
-
# org.gradle.parallel=true
|
|
13
|
-
#Fri Dec 17 09:25:55 CET 2021
|
|
14
|
-
android.useAndroidX=true
|
|
15
|
-
android.enableJetifier=true
|
package/gradlew
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
##############################################################################
|
|
4
|
-
##
|
|
5
|
-
## Gradle start up script for UN*X
|
|
6
|
-
##
|
|
7
|
-
##############################################################################
|
|
8
|
-
|
|
9
|
-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
10
|
-
DEFAULT_JVM_OPTS=""
|
|
11
|
-
|
|
12
|
-
APP_NAME="Gradle"
|
|
13
|
-
APP_BASE_NAME=`basename "$0"`
|
|
14
|
-
|
|
15
|
-
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
16
|
-
MAX_FD="maximum"
|
|
17
|
-
|
|
18
|
-
warn ( ) {
|
|
19
|
-
echo "$*"
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
die ( ) {
|
|
23
|
-
echo
|
|
24
|
-
echo "$*"
|
|
25
|
-
echo
|
|
26
|
-
exit 1
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
# OS specific support (must be 'true' or 'false').
|
|
30
|
-
cygwin=false
|
|
31
|
-
msys=false
|
|
32
|
-
darwin=false
|
|
33
|
-
case "`uname`" in
|
|
34
|
-
CYGWIN* )
|
|
35
|
-
cygwin=true
|
|
36
|
-
;;
|
|
37
|
-
Darwin* )
|
|
38
|
-
darwin=true
|
|
39
|
-
;;
|
|
40
|
-
MINGW* )
|
|
41
|
-
msys=true
|
|
42
|
-
;;
|
|
43
|
-
esac
|
|
44
|
-
|
|
45
|
-
# Attempt to set APP_HOME
|
|
46
|
-
# Resolve links: $0 may be a link
|
|
47
|
-
PRG="$0"
|
|
48
|
-
# Need this for relative symlinks.
|
|
49
|
-
while [ -h "$PRG" ] ; do
|
|
50
|
-
ls=`ls -ld "$PRG"`
|
|
51
|
-
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
52
|
-
if expr "$link" : '/.*' > /dev/null; then
|
|
53
|
-
PRG="$link"
|
|
54
|
-
else
|
|
55
|
-
PRG=`dirname "$PRG"`"/$link"
|
|
56
|
-
fi
|
|
57
|
-
done
|
|
58
|
-
SAVED="`pwd`"
|
|
59
|
-
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
60
|
-
APP_HOME="`pwd -P`"
|
|
61
|
-
cd "$SAVED" >/dev/null
|
|
62
|
-
|
|
63
|
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
64
|
-
|
|
65
|
-
# Determine the Java command to use to start the JVM.
|
|
66
|
-
if [ -n "$JAVA_HOME" ] ; then
|
|
67
|
-
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
|
68
|
-
# IBM's JDK on AIX uses strange locations for the executables
|
|
69
|
-
JAVACMD="$JAVA_HOME/jre/sh/java"
|
|
70
|
-
else
|
|
71
|
-
JAVACMD="$JAVA_HOME/bin/java"
|
|
72
|
-
fi
|
|
73
|
-
if [ ! -x "$JAVACMD" ] ; then
|
|
74
|
-
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
|
75
|
-
|
|
76
|
-
Please set the JAVA_HOME variable in your environment to match the
|
|
77
|
-
location of your Java installation."
|
|
78
|
-
fi
|
|
79
|
-
else
|
|
80
|
-
JAVACMD="java"
|
|
81
|
-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
82
|
-
|
|
83
|
-
Please set the JAVA_HOME variable in your environment to match the
|
|
84
|
-
location of your Java installation."
|
|
85
|
-
fi
|
|
86
|
-
|
|
87
|
-
# Increase the maximum file descriptors if we can.
|
|
88
|
-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
|
89
|
-
MAX_FD_LIMIT=`ulimit -H -n`
|
|
90
|
-
if [ $? -eq 0 ] ; then
|
|
91
|
-
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
|
92
|
-
MAX_FD="$MAX_FD_LIMIT"
|
|
93
|
-
fi
|
|
94
|
-
ulimit -n $MAX_FD
|
|
95
|
-
if [ $? -ne 0 ] ; then
|
|
96
|
-
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
|
97
|
-
fi
|
|
98
|
-
else
|
|
99
|
-
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
|
100
|
-
fi
|
|
101
|
-
fi
|
|
102
|
-
|
|
103
|
-
# For Darwin, add options to specify how the application appears in the dock
|
|
104
|
-
if $darwin; then
|
|
105
|
-
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
|
106
|
-
fi
|
|
107
|
-
|
|
108
|
-
# For Cygwin, switch paths to Windows format before running java
|
|
109
|
-
if $cygwin ; then
|
|
110
|
-
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
111
|
-
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
112
|
-
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
113
|
-
|
|
114
|
-
# We build the pattern for arguments to be converted via cygpath
|
|
115
|
-
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
116
|
-
SEP=""
|
|
117
|
-
for dir in $ROOTDIRSRAW ; do
|
|
118
|
-
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
119
|
-
SEP="|"
|
|
120
|
-
done
|
|
121
|
-
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
122
|
-
# Add a user-defined pattern to the cygpath arguments
|
|
123
|
-
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
124
|
-
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
125
|
-
fi
|
|
126
|
-
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
127
|
-
i=0
|
|
128
|
-
for arg in "$@" ; do
|
|
129
|
-
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
|
130
|
-
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
|
131
|
-
|
|
132
|
-
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
|
133
|
-
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
|
134
|
-
else
|
|
135
|
-
eval `echo args$i`="\"$arg\""
|
|
136
|
-
fi
|
|
137
|
-
i=$((i+1))
|
|
138
|
-
done
|
|
139
|
-
case $i in
|
|
140
|
-
(0) set -- ;;
|
|
141
|
-
(1) set -- "$args0" ;;
|
|
142
|
-
(2) set -- "$args0" "$args1" ;;
|
|
143
|
-
(3) set -- "$args0" "$args1" "$args2" ;;
|
|
144
|
-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
145
|
-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
146
|
-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
147
|
-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
148
|
-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
149
|
-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
150
|
-
esac
|
|
151
|
-
fi
|
|
152
|
-
|
|
153
|
-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
|
154
|
-
function splitJvmOpts() {
|
|
155
|
-
JVM_OPTS=("$@")
|
|
156
|
-
}
|
|
157
|
-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
|
158
|
-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
|
159
|
-
|
|
160
|
-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
package/gradlew.bat
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
@if "%DEBUG%" == "" @echo off
|
|
2
|
-
@rem ##########################################################################
|
|
3
|
-
@rem
|
|
4
|
-
@rem Gradle startup script for Windows
|
|
5
|
-
@rem
|
|
6
|
-
@rem ##########################################################################
|
|
7
|
-
|
|
8
|
-
@rem Set local scope for the variables with windows NT shell
|
|
9
|
-
if "%OS%"=="Windows_NT" setlocal
|
|
10
|
-
|
|
11
|
-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
12
|
-
set DEFAULT_JVM_OPTS=
|
|
13
|
-
|
|
14
|
-
set DIRNAME=%~dp0
|
|
15
|
-
if "%DIRNAME%" == "" set DIRNAME=.
|
|
16
|
-
set APP_BASE_NAME=%~n0
|
|
17
|
-
set APP_HOME=%DIRNAME%
|
|
18
|
-
|
|
19
|
-
@rem Find java.exe
|
|
20
|
-
if defined JAVA_HOME goto findJavaFromJavaHome
|
|
21
|
-
|
|
22
|
-
set JAVA_EXE=java.exe
|
|
23
|
-
%JAVA_EXE% -version >NUL 2>&1
|
|
24
|
-
if "%ERRORLEVEL%" == "0" goto init
|
|
25
|
-
|
|
26
|
-
echo.
|
|
27
|
-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
28
|
-
echo.
|
|
29
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
30
|
-
echo location of your Java installation.
|
|
31
|
-
|
|
32
|
-
goto fail
|
|
33
|
-
|
|
34
|
-
:findJavaFromJavaHome
|
|
35
|
-
set JAVA_HOME=%JAVA_HOME:"=%
|
|
36
|
-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|
37
|
-
|
|
38
|
-
if exist "%JAVA_EXE%" goto init
|
|
39
|
-
|
|
40
|
-
echo.
|
|
41
|
-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
|
42
|
-
echo.
|
|
43
|
-
echo Please set the JAVA_HOME variable in your environment to match the
|
|
44
|
-
echo location of your Java installation.
|
|
45
|
-
|
|
46
|
-
goto fail
|
|
47
|
-
|
|
48
|
-
:init
|
|
49
|
-
@rem Get command-line arguments, handling Windowz variants
|
|
50
|
-
|
|
51
|
-
if not "%OS%" == "Windows_NT" goto win9xME_args
|
|
52
|
-
if "%@eval[2+2]" == "4" goto 4NT_args
|
|
53
|
-
|
|
54
|
-
:win9xME_args
|
|
55
|
-
@rem Slurp the command line arguments.
|
|
56
|
-
set CMD_LINE_ARGS=
|
|
57
|
-
set _SKIP=2
|
|
58
|
-
|
|
59
|
-
:win9xME_args_slurp
|
|
60
|
-
if "x%~1" == "x" goto execute
|
|
61
|
-
|
|
62
|
-
set CMD_LINE_ARGS=%*
|
|
63
|
-
goto execute
|
|
64
|
-
|
|
65
|
-
:4NT_args
|
|
66
|
-
@rem Get arguments from the 4NT Shell from JP Software
|
|
67
|
-
set CMD_LINE_ARGS=%$
|
|
68
|
-
|
|
69
|
-
:execute
|
|
70
|
-
@rem Setup the command line
|
|
71
|
-
|
|
72
|
-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|
73
|
-
|
|
74
|
-
@rem Execute Gradle
|
|
75
|
-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
|
76
|
-
|
|
77
|
-
:end
|
|
78
|
-
@rem End local scope for the variables with windows NT shell
|
|
79
|
-
if "%ERRORLEVEL%"=="0" goto mainEnd
|
|
80
|
-
|
|
81
|
-
:fail
|
|
82
|
-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
|
83
|
-
rem the _cmd.exe /c_ return code!
|
|
84
|
-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
|
85
|
-
exit /b 1
|
|
86
|
-
|
|
87
|
-
:mainEnd
|
|
88
|
-
if "%OS%"=="Windows_NT" endlocal
|
|
89
|
-
|
|
90
|
-
:omega
|
package/settings.gradle
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
include ':app'
|