已合并
fix freeze #2031
liuqian创建于 6 天前
fix freeze #2031
已合并
共 2 个文件变更+6-2
| @@ -49,6 +49,7 @@ const RESULT_ERROR_UNKNOWN: number = 7; | |||
| 49 | const RESULT_SUCCESS_DISCONNECT: number = 9; | 49 | const RESULT_SUCCESS_DISCONNECT: number = 9; |
| 50 | 50 | ||
| 51 | const USER_CANCEL_REMOVE_NOTIFICATION: number = 1; | 51 | const USER_CANCEL_REMOVE_NOTIFICATION: number = 1; |
| 52 | +const SYSTEM_CANCEL_REMOVE_NOTIFICATION: number = 2; | ||
| 52 | const SYSTEM_CANCEL_NOT_USE_BLUETOOTH: number = 9; | 53 | const SYSTEM_CANCEL_NOT_USE_BLUETOOTH: number = 9; |
| 53 | 54 | ||
| 54 | const STATUS_PENDING: number = 0; | 55 | const STATUS_PENDING: number = 0; |
| @@ -140,7 +141,8 @@ export default class BluetoothReceiveUIAbility extends UIAbility { | |||
| 140 | this.oppProfile.setIncomingFileConfirmation(false, -1); | 141 | this.oppProfile.setIncomingFileConfirmation(false, -1); |
| 141 | this.oppProfile.cancelTransfer(); | 142 | this.oppProfile.cancelTransfer(); |
| 142 | this.handleTerminate(); | 143 | this.handleTerminate(); |
| 143 | - } else if (info.reason == SYSTEM_CANCEL_NOT_USE_BLUETOOTH) { | 144 | + } else if (info.reason == SYSTEM_CANCEL_NOT_USE_BLUETOOTH || |
| 145 | + info.reason == SYSTEM_CANCEL_REMOVE_NOTIFICATION) { | ||
| 144 | this.startContinuousTask(); | 146 | this.startContinuousTask(); |
| 145 | } | 147 | } |
| 146 | }); | 148 | }); |
| @@ -49,6 +49,7 @@ const RESULT_ERROR_UNKNOWN: number = 7; | |||
| 49 | const RESULT_SUCCESS_DISCONNECT: number = 9; | 49 | const RESULT_SUCCESS_DISCONNECT: number = 9; |
| 50 | 50 | ||
| 51 | const USER_CANCEL_REMOVE_NOTIFICATION: number = 1; | 51 | const USER_CANCEL_REMOVE_NOTIFICATION: number = 1; |
| 52 | +const SYSTEM_CANCEL_REMOVE_NOTIFICATION: number = 2; | ||
| 52 | const SYSTEM_CANCEL_NOT_USE_BLUETOOTH: number = 9; | 53 | const SYSTEM_CANCEL_NOT_USE_BLUETOOTH: number = 9; |
| 53 | 54 | ||
| 54 | const STATUS_PENDING: number = 0; | 55 | const STATUS_PENDING: number = 0; |
| @@ -141,7 +142,8 @@ export default class BluetoothReceiveUIAbility extends UIAbility { | |||
| 141 | this.oppProfile.setIncomingFileConfirmation(false, -1); | 142 | this.oppProfile.setIncomingFileConfirmation(false, -1); |
| 142 | this.oppProfile.cancelTransfer(); | 143 | this.oppProfile.cancelTransfer(); |
| 143 | this.handleTerminate(); | 144 | this.handleTerminate(); |
| 144 | - } else if (info.reason == SYSTEM_CANCEL_NOT_USE_BLUETOOTH) { | 145 | + } else if (info.reason == SYSTEM_CANCEL_NOT_USE_BLUETOOTH || |
| 146 | + info.reason == SYSTEM_CANCEL_REMOVE_NOTIFICATION) { | ||
| 145 | this.startContinuousTask(); | 147 | this.startContinuousTask(); |
| 146 | } | 148 | } |
| 147 | }); | 149 | }); |