Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
石璀亮
/
turingos
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e77f3a74
authored
Aug 27, 2019
by
cuiliang.shi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG #50220 【图灵】退出小P时,提示小P已停止运行(附LOG和截图)
BUG #50225 【图灵】小P讲故事时来电,来电和通话声音与后台小P讲故事声音同时存在
1 parent
b05534a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
app/src/main/java/com/toscl/turingos/MainActivity.java
app/src/main/java/com/toscl/turingos/MainActivity.java
View file @
e77f3a7
...
...
@@ -962,7 +962,11 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
operateAll
();
}
});
mGlobalDialog
.
show
();
try
{
mGlobalDialog
.
show
();
}
catch
(
Exception
e
){
Log
.
d
(
TAG
,
e
.
toString
());
}
}
else
{
handleMyTips
(
getString
(
R
.
string
.
app_name
)
+
"没听清,请再说一遍吧"
);
...
...
@@ -1322,23 +1326,34 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
protected
void
onDestroy
()
{
Log
.
d
(
TAG
,
"onDestroy"
);
super
.
onDestroy
();
if
(
mLoginSuccess
)
{
//
if (mLoginSuccess) {
exitLogic
();
}
// }
}
@Override
protected
void
onPause
()
{
AsrManager
.
getInstance
().
stop
();
TTSManager
.
getInstance
().
stopTTS
();
playView
.
setChecked
(
false
);
TuringMusic
.
getInstance
().
stop
();
super
.
onPause
();
}
public
void
exitLogic
()
{
if
(
AsrManager
.
getInstance
()
!=
null
&&
AsrManager
.
getInstance
().
isRecording
())
{
//
if (AsrManager.getInstance() != null && AsrManager.getInstance().isRecording()) {
AsrManager
.
getInstance
().
cancel
();
}
if
(
TTSManager
.
getInstance
()
!=
null
&&
TTSManager
.
getInstance
().
isSpeaking
())
{
//
}
//
if (TTSManager.getInstance() != null && TTSManager.getInstance().isSpeaking()) {
TTSManager
.
getInstance
().
stopTTS
();
}
if
(
TuringMusic
.
getInstance
()
!=
null
&&
TuringMusic
.
getInstance
().
isPlaying
())
{
//
}
//
if (TuringMusic.getInstance() != null &&TuringMusic.getInstance().isPlaying()) {
playViewWrapper
.
setVisibility
(
View
.
GONE
);
playView
.
setChecked
(
false
);
TuringMusic
.
getInstance
().
stop
();
}
//
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment