Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
xabber-android
Commits
7190a9b9
Commit
7190a9b9
authored
Jun 17, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New ShutDownReceiver. Should correctly exit app when phone shut down. Related to #471
parent
53daa1f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+9
-0
ShutDownReceiver.java
...in/java/com/xabber/android/receiver/ShutDownReceiver.java
+14
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
7190a9b9
...
...
@@ -403,6 +403,15 @@
<action
android:name=
"android.intent.action.BOOT_COMPLETED"
/>
</intent-filter>
</receiver>
<receiver
android:name=
"com.xabber.android.receiver.ShutDownReceiver"
>
<intent-filter>
<action
android:name=
"android.intent.action.ACTION_SHUTDOWN"
/>
<action
android:name=
"android.intent.action.QUICKBOOT_POWEROFF"
/>
</intent-filter>
</receiver>
<receiver
android:name=
"com.xabber.android.receiver.GoAwayReceiver"
/>
<receiver
android:name=
"com.xabber.android.receiver.GoXaReceiver"
/>
<receiver
android:name=
"com.xabber.android.receiver.ComposingPausedReceiver"
/>
...
...
app/src/main/java/com/xabber/android/receiver/ShutDownReceiver.java
0 → 100644
View file @
7190a9b9
package
com
.
xabber
.
android
.
receiver
;
import
android.content.BroadcastReceiver
;
import
android.content.Context
;
import
android.content.Intent
;
import
com.xabber.android.data.Application
;
public
class
ShutDownReceiver
extends
BroadcastReceiver
{
@Override
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
Application
.
getInstance
().
requestToClose
();
}
}
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