Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to gradle version 8.2.2 #1884

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
31dc161
Remove package from manifest and put in build.gradle
JulianKast Feb 7, 2024
79b0f79
Update gradle version to 8.2.2
JulianKast Feb 7, 2024
eeea601
Set new gradle properties
JulianKast Feb 7, 2024
5df8637
update maven plugin
JulianKast Feb 7, 2024
b1225b3
Update api level and java version for github ci test
JulianKast Feb 7, 2024
2c4a6ae
revert api level in andorid yml for ci
JulianKast Feb 7, 2024
685fc31
test ci check with api 34 adding target: [google_apis]
JulianKast Feb 7, 2024
677ebaf
remove brackets
JulianKast Feb 7, 2024
df8c49c
add arch: x86_64 to yml
JulianKast Feb 7, 2024
c1eb6de
test removing target: google_apis from yml
JulianKast Feb 7, 2024
fa4c739
testing arm
JulianKast Feb 7, 2024
91291fb
swap ARM for arm64-v8a
JulianKast Feb 7, 2024
1529305
try arm mac
JulianKast Feb 7, 2024
c70efa5
try macos-14
JulianKast Feb 7, 2024
e54ef72
remove arch to try on m1
JulianKast Feb 7, 2024
5dcff6a
Try arch: x86_64
JulianKast Feb 7, 2024
c23a385
try aarch64
JulianKast Feb 7, 2024
281d039
try canary channel
JulianKast Feb 7, 2024
843e23b
revert back to api level 29
JulianKast Feb 7, 2024
f45c3c1
Add build feature to gradle, AGP upgrade assistant recommends adding …
JulianKast Feb 8, 2024
e92f080
revert formatting change os to OS
JulianKast Feb 8, 2024
652b227
CI try api 33 with arch x86_64
JulianKast Feb 8, 2024
0da90bc
try mack os 13
JulianKast Feb 8, 2024
9accd57
add target google apis
JulianKast Feb 8, 2024
31df7f3
try with api 29 again
JulianKast Feb 8, 2024
563f063
remove arch type
JulianKast Feb 8, 2024
0ae6f3e
revert to mac os latest
JulianKast Feb 8, 2024
dd1e9b7
Update ReactiveCircus and api level
JulianKast Feb 8, 2024
d6d213a
add arch
JulianKast Feb 8, 2024
39295f5
try with api 33
JulianKast Feb 8, 2024
ab6d25a
ignore wifi socket test
JulianKast Feb 8, 2024
96d7748
Testing
JulianKast Feb 8, 2024
def20f3
test state_listen
JulianKast Feb 8, 2024
84fe609
Set api level back to 34, fix Bluetooth state test
JulianKast Feb 9, 2024
7fa2f67
Add target google api, remove logs, update unit test imports
JulianKast Feb 9, 2024
dfd10ba
Testing update sdk version for unit test,
JulianKast Feb 9, 2024
6af968d
test to find version code
JulianKast Feb 9, 2024
6dabf34
Add targetSDK version to test manifest
JulianKast Feb 9, 2024
c6b68a0
Change version code back after modifying for unit test in AudioStream…
JulianKast Feb 9, 2024
8539389
Revert bluetooth unit test change for troubleshooting
JulianKast Feb 9, 2024
8d759d0
Ignore AudioStreammanager test
JulianKast Feb 9, 2024
24b4d00
Update sleep calls
JulianKast Feb 9, 2024
f5f86fb
Fix AudioStreamManagerTest
JulianKast Feb 9, 2024
d8898d2
Revert losing for testing state transitions
JulianKast Feb 9, 2024
9eb79bf
Add dummy test to see if device is considered and emulator for ci ch…
JulianKast Feb 9, 2024
6a7346b
Fix added unit test
JulianKast Feb 9, 2024
b977bf5
Testing DeviceUtil.isEmulator()
JulianKast Feb 9, 2024
ac2fd42
Update device util check for unit test
JulianKast Feb 9, 2024
ec1976e
Increase sleep timers for unit test
JulianKast Feb 10, 2024
fb15340
Remove added logic for api check
JulianKast Feb 10, 2024
a145723
Ignore failing test
JulianKast Feb 10, 2024
6a50372
update sleep calls for unit test
JulianKast Feb 10, 2024
4267461
clean up, and make uniform
JulianKast Feb 10, 2024
506012c
Fix testing stateTransition
JulianKast Feb 12, 2024
e193237
Remove white space
JulianKast Feb 12, 2024
df454f2
Remove unused imports
JulianKast Feb 12, 2024
a0a516f
Remove ignore for failing transportManager test
JulianKast Feb 12, 2024
5e65642
remove whitespace
JulianKast Feb 12, 2024
1c9cf75
remove unused import
JulianKast Feb 12, 2024
c39b880
Add TestSdlReceiver and permission to unit test AndroidManifest to pa…
JulianKast Feb 12, 2024
574c464
Update comment
JulianKast Feb 12, 2024
6786336
fix wifiSocketFactoryTest
JulianKast Feb 12, 2024
14bece1
test beefing up emulator
JulianKast Feb 12, 2024
b4b7485
Remove updating cpu cores for ci
JulianKast Feb 12, 2024
a799873
use mac os 13 for ci
JulianKast Feb 12, 2024
1b81ab0
mac os 13, cores 4
JulianKast Feb 12, 2024
7b185c9
Gran. BLUETOOTH_CONNECT for MediaStreamingStatusTests
JulianKast Feb 12, 2024
fb9827f
Add sleep call to LockScreenDeviceIconManagerTests to give more time …
JulianKast Feb 12, 2024
19856ff
Add BluetoothConnect permission to TransportManagerTests
JulianKast Feb 12, 2024
8de2a1e
Revert giving emulator 4 cores
JulianKast Feb 12, 2024
66240cb
Retry arm emulator
JulianKast Feb 12, 2024
0301156
set avd name for ci actions
JulianKast Feb 12, 2024
a2c898b
setting channel: canary for avd ci actions
JulianKast Feb 12, 2024
6a34029
add more emulator options
JulianKast Feb 12, 2024
b39c355
Try known good m1 mac runner
JulianKast Feb 12, 2024
0d41d27
Revert back to not using arm
JulianKast Feb 12, 2024
22fd587
Beef up emulator
JulianKast Feb 13, 2024
f58888a
For transportBrokerTest
JulianKast Feb 13, 2024
67be5ca
Ignore transportbroker test
JulianKast Feb 13, 2024
1eaf6aa
Remove whitespace
JulianKast Feb 13, 2024
0b0f350
only grant permission for unit test if we are on a device that needs it
JulianKast Feb 13, 2024
80dcfa6
Fix permission rules to only apply at api level or above that it is n…
JulianKast Feb 13, 2024
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
12 changes: 8 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch]

jobs:
test_Android:
runs-on: macOS-latest
runs-on: macos-13
steps:

- name: Checkout
Expand All @@ -15,13 +15,17 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Sdl Android Tests
# For more info, please check out: https://github.com/marketplace/actions/android-emulator-runner
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
api-level: 34
cores: 3
ram-size: 6000M
heap-size: 4000M
arch: x86_64
script: ./android/gradlew -p ./android :sdl_android:connectedCheck

- name: Hello Sdl Android Tests
Expand All @@ -33,7 +37,7 @@ jobs:
yml: ./codecov.yml

test_Java:
runs-on: macOS-latest
runs-on: macos-13
steps:

- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.2.2'


// NOTE: Do not place your application dependencies here; they belong
Expand Down
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
1 change: 1 addition & 0 deletions android/hello_sdl_android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ android {
lintOptions {
disable 'GoogleAppIndexingWarning'
}
namespace 'com.sdl.hellosdlandroid'
}


Expand Down
3 changes: 1 addition & 2 deletions android/hello_sdl_android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.sdl.hellosdlandroid">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"
Expand Down
15 changes: 11 additions & 4 deletions android/sdl_android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ android {
main.java.srcDirs += '../../base/src/main/java'
androidTest.assets.srcDirs += '../../generator/rpc_spec/'
}

buildFeatures {
aidl true
}

namespace 'com.smartdevicelink'
testNamespace 'com.smartdevicelink.test'
}

ext { VERSION_NAME = "$project.android.defaultConfig.versionName" }
Expand All @@ -49,12 +56,12 @@ dependencies {
api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
api 'androidx.annotation:annotation:1.1.0'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.2.0'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:rules:1.5.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.7.0'
androidTestImplementation 'org.mockito:mockito-core:5.7.0'
androidTestImplementation 'org.mockito:mockito-android:5.7.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.5.1'
}
Expand All @@ -65,7 +72,7 @@ buildscript {
}
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.13.0'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.27.0'
}
}

Expand Down
26 changes: 24 additions & 2 deletions android/sdl_android/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest package="com.smartdevicelink.test"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-sdk android:minSdkVersion="16" />
<uses-permission android:name="android.permission.BLUETOOTH" />
Expand All @@ -8,6 +7,19 @@
<uses-permission android:name="android.permission.INTERNET" />
<!-- Required to check if WiFi is enabled -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />

<queries>
<intent>
<action android:name="com.smartdevicelink.router.service" />
</intent>
<intent>
<action android:name="sdl.router.startservice" />
</intent>
</queries>

<instrumentation
android:name="android.test.InstrumentationTestRunner"
Expand All @@ -17,6 +29,16 @@
<application android:debuggable="true">
<uses-library android:name="android.test.runner" />
<activity android:name="com.smartdevicelink.managers.lockscreen.SDLLockScreenActivity" />
<receiver
android:name=".TestSdlReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.smartdevicelink.USB_ACCESSORY_ATTACHED" /> <!--For AOA -->
<action android:name="android.bluetooth.device.action.ACL_CONNECTED" />
<action android:name="sdl.router.startservice" />
</intent-filter>
</receiver>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.smartdevicelink;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
* Added so we pass IntegrationValidator when running unit test.
*/
public class TestSdlReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,99 +134,131 @@ public void onComplete(boolean success) {
}

public void testWithSquareSampleAudio16BitAnd8KhzApi16() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 16);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._8KHZ, BitsPerSample._16_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(8000, SampleType.SIGNED_16_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio16BitAnd16KhzApi16() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 16);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._16KHZ, BitsPerSample._16_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(16000, SampleType.SIGNED_16_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio16BitAnd22KhzApi16() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 16);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._22KHZ, BitsPerSample._16_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(22050, SampleType.SIGNED_16_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio16BitAnd44KhzApi16() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 16);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._44KHZ, BitsPerSample._16_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(44100, SampleType.SIGNED_16_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio8BitAnd8KhzApi16() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 16);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._8KHZ, BitsPerSample._8_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(8000, SampleType.UNSIGNED_8_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio8BitAnd16KhzApi16() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 16);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._16KHZ, BitsPerSample._8_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(16000, SampleType.UNSIGNED_8_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio8BitAnd22KhzApi16() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 16);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._22KHZ, BitsPerSample._8_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(22050, SampleType.UNSIGNED_8_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio8BitAnd44KhzApi16() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 16);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._44KHZ, BitsPerSample._8_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(44100, SampleType.UNSIGNED_8_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio16BitAnd8KhzApi21() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 21);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._8KHZ, BitsPerSample._16_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(8000, SampleType.SIGNED_16_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio16BitAnd16KhzApi21() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 21);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._16KHZ, BitsPerSample._16_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(16000, SampleType.SIGNED_16_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio16BitAnd22KhzApi21() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 21);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._22KHZ, BitsPerSample._16_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(22050, SampleType.SIGNED_16_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio16BitAnd44KhzApi21() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 21);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._44KHZ, BitsPerSample._16_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(44100, SampleType.SIGNED_16_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio8BitAnd8KhzApi21() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 21);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._8KHZ, BitsPerSample._8_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(8000, SampleType.UNSIGNED_8_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio8BitAnd16KhzApi21() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 21);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._16KHZ, BitsPerSample._8_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(16000, SampleType.UNSIGNED_8_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio8BitAnd22KhzApi21() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 21);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._22KHZ, BitsPerSample._8_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(22050, SampleType.UNSIGNED_8_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

public void testWithSquareSampleAudio8BitAnd44KhzApi21() throws Exception {
int versionCode = Build.VERSION.SDK_INT;
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), 21);
AudioPassThruCapabilities audioPassThruCapabilities = new AudioPassThruCapabilities(SamplingRate._44KHZ, BitsPerSample._8_BIT, AudioType.PCM);
runFullAudioManagerDecodeFlowWithSquareSampleAudio(44100, SampleType.UNSIGNED_8_BIT, audioPassThruCapabilities);
setFinalStatic(Build.VERSION.class.getField("SDK_INT"), versionCode);
}

private int testFullAudioManagerDecodeFlowCorrectCounter = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public void testRetrieveIconShouldCallOnErrorTwiceWhenGivenURLThatCannotDownload

lockScreenDeviceIconManager = new LockScreenDeviceIconManager(context);
lockScreenDeviceIconManager.retrieveIcon("", listener);
sleep();
verify(listener, times(2)).onError(anyString());
}

Expand All @@ -52,6 +53,7 @@ public void testRetrieveIconShouldCallOnImageOnImageRetrievedWithIconWhenIconUpd

lockScreenDeviceIconManager = new LockScreenDeviceIconManager(context);
lockScreenDeviceIconManager.retrieveIcon(ICON_URL, listener);
sleep();
verify(listener, times(1)).onImageRetrieved((Bitmap) any());
}

Expand All @@ -66,6 +68,7 @@ public void testRetrieveIconShouldCallOnImageOnImageRetrievedWithIconWhenCachedI

lockScreenDeviceIconManager = new LockScreenDeviceIconManager(context);
lockScreenDeviceIconManager.retrieveIcon(ICON_URL, listener);
sleep();
verify(listener, times(1)).onImageRetrieved((Bitmap) any());
}

Expand All @@ -83,6 +86,7 @@ public void testRetrieveIconShouldCallOnImageRetrievedWithIconWhenCachedIconIsUp

lockScreenDeviceIconManager = new LockScreenDeviceIconManager(context);
lockScreenDeviceIconManager.retrieveIcon(ICON_URL, listener);
sleep();
verify(listener, times(1)).onImageRetrieved((Bitmap) any());
}

Expand All @@ -91,4 +95,12 @@ private String daysToMillisecondsAsString(int days) {
long previousDay = System.currentTimeMillis() - milliSeconds;
return String.valueOf(previousDay);
}

private void sleep() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public Void answer(InvocationOnMock invocation) {

private void sleep() {
try {
Thread.sleep(100);
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public void testSetSelectedCellWithId() {

private void sleep() {
try {
Thread.sleep(100);
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void testGetPerformInteraction() {

private void sleep() {
try {
Thread.sleep(100);
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ private List<MenuCell> filterMenuCellsWithStatusList(List<MenuCell> menuCells, L

private void sleep() {
try {
Thread.sleep(250);
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Expand Down
Loading
Loading