Undefind behavior in Async Service Helper fixed.
This commit is contained in:
parent
76bcf72ded
commit
4f0f6686d1
@ -118,7 +118,7 @@ class AsyncServiceHelper
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Log.d(TAG, "Wating current installation process");
|
Log.d(TAG, "Waiting current installation process");
|
||||||
InstallCallbackInterface WaitQuery = new InstallCallbackInterface() {
|
InstallCallbackInterface WaitQuery = new InstallCallbackInterface() {
|
||||||
private LoaderCallbackInterface mUserAppCallback = Callback;
|
private LoaderCallbackInterface mUserAppCallback = Callback;
|
||||||
public String getPackageName()
|
public String getPackageName()
|
||||||
@ -268,17 +268,21 @@ class AsyncServiceHelper
|
|||||||
{
|
{
|
||||||
Log.d(TAG, "OpenCV package was not installed!");
|
Log.d(TAG, "OpenCV package was not installed!");
|
||||||
mStatus = LoaderCallbackInterface.MARKET_ERROR;
|
mStatus = LoaderCallbackInterface.MARKET_ERROR;
|
||||||
|
Log.d(TAG, "Init finished with status " + mStatus);
|
||||||
|
Log.d(TAG, "Unbind from service");
|
||||||
|
mAppContext.unbindService(mServiceConnection);
|
||||||
|
Log.d(TAG, "Calling using callback");
|
||||||
|
mUserAppCallback.onManagerConnected(mStatus);
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
mStatus = LoaderCallbackInterface.INIT_FAILED;
|
mStatus = LoaderCallbackInterface.INIT_FAILED;
|
||||||
|
Log.d(TAG, "Init finished with status " + mStatus);
|
||||||
|
Log.d(TAG, "Unbind from service");
|
||||||
|
mAppContext.unbindService(mServiceConnection);
|
||||||
|
Log.d(TAG, "Calling using callback");
|
||||||
|
mUserAppCallback.onManagerConnected(mStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.d(TAG, "Init finished with status " + mStatus);
|
|
||||||
Log.d(TAG, "Unbind from service");
|
|
||||||
mAppContext.unbindService(mServiceConnection);
|
|
||||||
Log.d(TAG, "Calling using callback");
|
|
||||||
mUserAppCallback.onManagerConnected(mStatus);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ public abstract class BaseLoaderCallback implements LoaderCallbackInterface {
|
|||||||
/** OpenCV loader can not start Google Play Market. **/
|
/** OpenCV loader can not start Google Play Market. **/
|
||||||
case LoaderCallbackInterface.MARKET_ERROR:
|
case LoaderCallbackInterface.MARKET_ERROR:
|
||||||
{
|
{
|
||||||
Log.d(TAG, "Google Play service is not installed! You can get it here");
|
Log.e(TAG, "Package installation failed!");
|
||||||
AlertDialog MarketErrorMessage = new AlertDialog.Builder(mAppContext).create();
|
AlertDialog MarketErrorMessage = new AlertDialog.Builder(mAppContext).create();
|
||||||
MarketErrorMessage.setTitle("OpenCV Manager");
|
MarketErrorMessage.setTitle("OpenCV Manager");
|
||||||
MarketErrorMessage.setMessage("Package installation failed!");
|
MarketErrorMessage.setMessage("Package installation failed!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user