Skip to content

Commit

Permalink
Changed the way to retrieve profile manager on A13, switched from Asy…
Browse files Browse the repository at this point in the history
…nc to sync to try to fix TC52x/57x bug (profile manager async does not return the expected object)
  • Loading branch information
ltrudu committed Oct 10, 2023
1 parent 56d9b48 commit fa1d803
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DeviceIdentifiersWrapper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 33
versionCode 10
versionName "0.9.1"
versionCode 11
versionName "0.9.2"

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import android.util.Xml;
Expand Down Expand Up @@ -190,7 +191,20 @@ private void onEMDKManagerRetrieved(EMDKManager emdkManager)
{
try {
logMessage("Requesting profile manager.", EMessageType.DEBUG);
emdkManager.getInstanceAsync(EMDKManager.FEATURE_TYPE.PROFILE, mStatusListener);
logMessage("Current API version: " + android.os.Build.VERSION.SDK_INT, EMessageType.VERBOSE);
if(android.os.Build.VERSION.SDK_INT < 33) {
logMessage("Requesting profile manager Asynchonously", EMessageType.DEBUG);
emdkManager.getInstanceAsync(EMDKManager.FEATURE_TYPE.PROFILE, mStatusListener);
}
else
{
logMessage("Requesting profile manager synchronized", EMessageType.DEBUG);
ProfileManager profileManager = (ProfileManager) emdkManager.getInstance(EMDKManager.FEATURE_TYPE.PROFILE);
if(profileManager != null)
{
onProfileManagerInitialized(profileManager);
}
}
} catch (EMDKException e) {
logMessage("Error when trying to retrieve profile manager: " + e.getMessage(), EMessageType.ERROR);
}
Expand Down

0 comments on commit fa1d803

Please sign in to comment.