Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
system_bt
Commits
ea8acc97
Commit
ea8acc97
authored
11 years ago
by
Zhihai Xu
Committed by
Android (Google) Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "DO NOT MERGE fix a potential native crash during bluetooth sutdown" into klp-dev
parents
1e0849e9
5a79e080
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
btif/src/bluetooth.c
btif/src/bluetooth.c
+0
-1
btif/src/btif_core.c
btif/src/btif_core.c
+11
-0
No files found.
btif/src/bluetooth.c
View file @
ea8acc97
...
...
@@ -155,7 +155,6 @@ static void cleanup( void )
return
;
btif_shutdown_bluetooth
();
bt_utils_cleanup
();
/* hal callbacks reset upon shutdown complete callback */
...
...
This diff is collapsed.
Click to expand it.
btif/src/btif_core.c
View file @
ea8acc97
...
...
@@ -37,6 +37,7 @@
#define LOG_TAG "BTIF_CORE"
#include "btif_api.h"
#include "bt_utils.h"
#include "bta_api.h"
#include "gki.h"
#include "btu.h"
...
...
@@ -737,6 +738,14 @@ bt_status_t btif_shutdown_bluetooth(void)
{
BTIF_TRACE_DEBUG1
(
"%s"
,
__FUNCTION__
);
if
(
btif_core_state
==
BTIF_CORE_STATE_DISABLING
)
{
BTIF_TRACE_WARNING0
(
"shutdown during disabling"
);
/* shutdown called before disabling is done */
btif_shutdown_pending
=
1
;
return
BT_STATUS_NOT_READY
;
}
if
(
btif_is_enabled
())
{
BTIF_TRACE_WARNING0
(
"shutdown while still enabled, initiate disable"
);
...
...
@@ -765,6 +774,8 @@ bt_status_t btif_shutdown_bluetooth(void)
btif_dut_mode
=
0
;
bt_utils_cleanup
();
BTIF_TRACE_DEBUG1
(
"%s done"
,
__FUNCTION__
);
return
BT_STATUS_SUCCESS
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment