python-audio-autotest-3.10 1.5.12rc3__py3-none-any.whl → 1.6rc1__py3-none-any.whl

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.
pyaatlibs/__init__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import platform
3
3
 
4
- __version__ = "1.5.12rc3"
4
+ __version__ = "1.6rc1"
5
5
  __author__ = "Hao-Wei Lee"
6
6
  if platform.system() == "Windows":
7
7
  SEP = "\\"
Binary file
pyaatlibs/audioworker.py CHANGED
@@ -3,6 +3,7 @@ import subprocess
3
3
  import json
4
4
  import datetime
5
5
  import time
6
+ import re
6
7
  from enum import IntEnum, auto
7
8
 
8
9
  from pyaatlibs import ROOT_DIR
@@ -99,9 +100,7 @@ class AudioWorkerApp(AppInterface):
99
100
  PACKAGE = "com.google.audioworker"
100
101
  MAINACTIVITY = ".activities.MainActivity"
101
102
 
102
- DATA_FOLDER = (
103
- "/storage/emulated/0/Android/data/com.google.audioworker/files/Google-AudioWorker-data"
104
- )
103
+ DATA_FOLDER = "/sdcard/Google-AudioWorker-data"
105
104
 
106
105
  @staticmethod
107
106
  def get_apk_path():
@@ -117,7 +116,7 @@ class AudioWorkerApp(AppInterface):
117
116
  for line in out.splitlines():
118
117
  if "python-audio-autotest" not in line:
119
118
  continue
120
- return line.strip().replace("%", "")
119
+ return line.strip()[1:]
121
120
  return None
122
121
 
123
122
  @staticmethod
@@ -145,12 +144,31 @@ class AudioWorkerApp(AppInterface):
145
144
  @classmethod
146
145
  def install(child, grant=False, serialno=None, tolog=True):
147
146
  super().install(grant=grant, serialno=serialno, tolog=tolog)
147
+ if not child.installed(serialno=serialno, tolog=tolog):
148
+ __class__.log("install: it was not installed, something was wrong.")
149
+ return
150
+
151
+ if grant:
152
+ __class__.grant_special_permissions(serialno=serialno)
153
+
148
154
  __class__.log(
149
155
  "install: the installed version is '{}'".format(
150
156
  __class__.get_version_from_device(serialno=serialno)
151
157
  )
152
158
  )
153
159
 
160
+ @classmethod
161
+ def grant_permissions(child, serialno=None, tolog=True, warning=True):
162
+ super().grant_permissions(serialno=serialno, tolog=tolog, warning=warning)
163
+ __class__.grant_special_permissions(serialno=serialno)
164
+
165
+ @staticmethod
166
+ def grant_special_permissions(serialno=None):
167
+ Adb.execute(
168
+ ["shell", f"appops set {__class__.PACKAGE} MANAGE_EXTERNAL_STORAGE allow"],
169
+ serialno=serialno,
170
+ )
171
+
154
172
  @staticmethod
155
173
  def get_launch_component():
156
174
  return "{}/{}".format(__class__.PACKAGE, __class__.MAINACTIVITY)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-audio-autotest-3.10
3
- Version: 1.5.12rc3
3
+ Version: 1.6rc1
4
4
  Summary: This is a auto-testing framework of audio functions for Android devices.
5
5
  Home-page: https://github.com/HW-Lee/AudioAutoTest
6
6
  Author: Hao-Wei Lee
@@ -1,4 +1,4 @@
1
- pyaatlibs/__init__.py,sha256=6O7_2pCTMDQLWrIYgX_OUdidlsN20l0VWkZMAE4kkWM,359
1
+ pyaatlibs/__init__.py,sha256=By_CosEomAzNav7q3l_vcYuXK33CruaOcU8uNkzjmu4,356
2
2
  pyaatlibs/aatapp.py,sha256=VdytLjApP8BHMudhQOs_nhhC44RhPeDAzeNUy_3SK_k,9644
3
3
  pyaatlibs/activitystatemachine.py,sha256=q2AEkToQmVVcvOGt4jGWq0ryWqSGYGUELSVCECAU5Pk,323
4
4
  pyaatlibs/adbutils.py,sha256=M7N-4uxIzs6krWwb7GhPvld2gPZPGAKWsRMRpgvzXX0,16002
@@ -7,7 +7,7 @@ pyaatlibs/argutils.py,sha256=CnAREKQeXIgHc4iQC6YSm5cLhRc3UaB5uhxYYYFq4NU,453
7
7
  pyaatlibs/audiofunction.py,sha256=k9OovKKhmo0MLtfpK201mPoaRJk6WYOgK1yGcNWS_zs,9987
8
8
  pyaatlibs/audiosignalframelogger.py,sha256=UYn-AqFAk4NqKGKkMmaWTRTc43R0Gqch2eEKQA0b4ng,1400
9
9
  pyaatlibs/audiothread.py,sha256=tv18eHCiuLzekCjCzHZWjKFv5OzpQh647RSw8hlEvUU,6498
10
- pyaatlibs/audioworker.py,sha256=CfIBDq3UuyR6iofiiIsQk_O2B35t0YeaxHyHBMBZn40,30052
10
+ pyaatlibs/audioworker.py,sha256=jfsEMawKuhXpi93uwLhvNDXUmFOBxO-QHGKuIIRi6yI,30688
11
11
  pyaatlibs/logcatlistener.py,sha256=NIIRaMW85A1NwoNUN92zWBsxA3Fd9ByeXNnNB2Jdonk,6296
12
12
  pyaatlibs/logger.py,sha256=j5xkDbKxCSc99tCita_YDafHO9gR4cH_k5b0x6gi7yI,5305
13
13
  pyaatlibs/signalanalyzer.py,sha256=yjgky6_HmHv_NfoTc7yWP2y5u9hiEU6zSj1raxSK3Ws,310
@@ -15,11 +15,11 @@ pyaatlibs/signalmatcher.py,sha256=Zj8Kq4Iz5UNDFp9s6xffHVg_Rk6QkOuTEzt-dZm6gIA,19
15
15
  pyaatlibs/timeutils.py,sha256=PifZ1kmmTmfJB9VyhMyGHVKjuys0asQqF16RSWcYHkA,2651
16
16
  pyaatlibs/trials.py,sha256=sksmFIU-FT787ztfyT1Rl7HW_j6ltd4pV56pyV9gR3g,2492
17
17
  pyaatlibs/apk/audiofunctionsdemo.apk,sha256=GG06POXrPOphMNsm5pD4XPfzVF8FXQ1ruupJFO2V8iQ,3205247
18
- pyaatlibs/apk/audioworker.apk,sha256=khA2mXJEATmxV0DhNJOjxyaqF6bnKvFjCPve9xUR9-Q,28895000
18
+ pyaatlibs/apk/audioworker.apk,sha256=0bvzI6e3q2sfQZdmLNQKUP5lEKyvooMr_ylx5uzQ54s,28904464
19
19
  pyaatlibs/tests/audioworker_test.py,sha256=Gvadajd1jW8Ob2zZ1kRFQf3WRe4WBeBKjc6e3EoQEHM,20865
20
20
  pyaatlibs/tests/conftest.py,sha256=Ng_ClpNsY-62bo8O0zCl702jy9AcwdteakJ1vhlOCTk,293
21
- python_audio_autotest_3_10-1.5.12rc3.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
22
- python_audio_autotest_3_10-1.5.12rc3.dist-info/METADATA,sha256=GCLfUL4MSRe6jK2oVBgUpaEAiYvvpkENJ9xSYySTqh0,5242
23
- python_audio_autotest_3_10-1.5.12rc3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
24
- python_audio_autotest_3_10-1.5.12rc3.dist-info/top_level.txt,sha256=MyCr1MMMQB2sjxyhlZSJPG4Fx10ya00APmhY7r1fSoQ,10
25
- python_audio_autotest_3_10-1.5.12rc3.dist-info/RECORD,,
21
+ python_audio_autotest_3_10-1.6rc1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
22
+ python_audio_autotest_3_10-1.6rc1.dist-info/METADATA,sha256=qWxa6sYZqluNeYP0KgFxZo2Ppa_Xe-s4neBZWTuBY-0,5239
23
+ python_audio_autotest_3_10-1.6rc1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
24
+ python_audio_autotest_3_10-1.6rc1.dist-info/top_level.txt,sha256=MyCr1MMMQB2sjxyhlZSJPG4Fx10ya00APmhY7r1fSoQ,10
25
+ python_audio_autotest_3_10-1.6rc1.dist-info/RECORD,,