Add handling of tasks being removed.
Change-Id: I6141f17310e61dc6b86052ca81a17a51cc6a2193
This commit is contained in:
@@ -530,7 +530,7 @@
|
||||
|
||||
<!-- Service Samples -->
|
||||
|
||||
<service android:name=".app.LocalService" />
|
||||
<service android:name=".app.LocalService" android:stopWithTask="true" />
|
||||
|
||||
<activity android:name=".app.LocalServiceActivities$Controller"
|
||||
android:label="@string/activity_local_service_controller"
|
||||
|
||||
@@ -135,8 +135,13 @@ public class RemoteService extends Service {
|
||||
};
|
||||
// END_INCLUDE(exposing_a_service)
|
||||
|
||||
private static final int REPORT_MSG = 1;
|
||||
@Override
|
||||
public void onTaskRemoved(Intent rootIntent) {
|
||||
Toast.makeText(this, "Task removed: " + rootIntent, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
private static final int REPORT_MSG = 1;
|
||||
|
||||
/**
|
||||
* Our Handler used to execute operations on the main thread. This is used
|
||||
* to schedule increments of our value.
|
||||
|
||||
Reference in New Issue
Block a user