当用户取消需要用户确认的下载请求时,请求状态应该变为 CANCELED。但是,状态侦听器似乎没有收到该状态更改。下面是监听器的示例代码。任何想法?先感谢您!
switch(state.status()) {
case SplitInstallSessionStatus.REQUIRES_USER_CONFIRMATION:
try {
getContext().startIntentSender(
state.resolutionIntent().getIntentSender(),
null,
0,
0,
0);
} catch (Exception e) {
Log.e(TAG, "stats onStateUpdate: ", e);
}
break;
case SplitInstallSessionStatus.CANCELED:
Log.d(TAG, "onStateUpdate: canceled”);
//NEVER GET TO THIS LINE
break;
}