From 0c5001d776d56bae02a5cc2663286a125d99bc5e Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 12 Apr 2011 18:16:08 -0700 Subject: Add APIs to remove tasks. You can remove sub-tasks inside of a task, or an entire task. When removing an entire task, you can have its process killed as well. When the process is killed, any running services will get an onTaskRemoved() callback for them to do cleanup before their process is killed (and the service possibly restarted). Or they can set a new android:stopWithTask attribute to just have the service automatically (cleanly) stopped at this point. Change-Id: I1891bc2da006fa53b99c52f9040f1145650e6808 --- api/current.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'api') diff --git a/api/current.txt b/api/current.txt index e946c06..4d3f8c6 100644 --- a/api/current.txt +++ b/api/current.txt @@ -87,6 +87,7 @@ package android { field public static final java.lang.String RECEIVE_SMS = "android.permission.RECEIVE_SMS"; field public static final java.lang.String RECEIVE_WAP_PUSH = "android.permission.RECEIVE_WAP_PUSH"; field public static final java.lang.String RECORD_AUDIO = "android.permission.RECORD_AUDIO"; + field public static final java.lang.String REMOVE_TASKS = "android.permission.REMOVE_TASKS"; field public static final java.lang.String REORDER_TASKS = "android.permission.REORDER_TASKS"; field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES"; field public static final java.lang.String SEND_SMS = "android.permission.SEND_SMS"; @@ -855,6 +856,7 @@ package android { field public static final int state_window_focused = 16842909; // 0x101009d field public static final int staticWallpaperPreview = 16843569; // 0x1010331 field public static final int stepSize = 16843078; // 0x1010146 + field public static final int stopWithTask = 16843623; // 0x1010367 field public static final int streamType = 16843273; // 0x1010209 field public static final int stretchColumns = 16843081; // 0x1010149 field public static final int stretchMode = 16843030; // 0x1010116 @@ -929,9 +931,9 @@ package android { field public static final int textEditPasteWindowLayout = 16843540; // 0x1010314 field public static final int textEditSideNoPasteWindowLayout = 16843615; // 0x101035f field public static final int textEditSidePasteWindowLayout = 16843614; // 0x101035e - field public static final int textEditSuggestionItemLayout = 16843626; // 0x101036a - field public static final int textEditSuggestionsBottomWindowLayout = 16843624; // 0x1010368 - field public static final int textEditSuggestionsTopWindowLayout = 16843625; // 0x1010369 + field public static final int textEditSuggestionItemLayout = 16843627; // 0x101036b + field public static final int textEditSuggestionsBottomWindowLayout = 16843625; // 0x1010369 + field public static final int textEditSuggestionsTopWindowLayout = 16843626; // 0x101036a field public static final int textFilterEnabled = 16843007; // 0x10100ff field public static final int textIsSelectable = 16843542; // 0x1010316 field public static final int textOff = 16843045; // 0x1010125 @@ -943,7 +945,7 @@ package android { field public static final int textSelectHandleWindowStyle = 16843464; // 0x10102c8 field public static final int textSize = 16842901; // 0x1010095 field public static final int textStyle = 16842903; // 0x1010097 - field public static final int textSuggestionsWindowStyle = 16843623; // 0x1010367 + field public static final int textSuggestionsWindowStyle = 16843624; // 0x1010368 field public static final int textViewStyle = 16842884; // 0x1010084 field public static final int theme = 16842752; // 0x1010000 field public static final int thickness = 16843360; // 0x1010260 @@ -3384,6 +3386,7 @@ package android.app { method public void onRebind(android.content.Intent); method public deprecated void onStart(android.content.Intent, int); method public int onStartCommand(android.content.Intent, int, int); + method public void onTaskRemoved(android.content.Intent); method public boolean onUnbind(android.content.Intent); method public final void startForeground(int, android.app.Notification); method public final void stopForeground(boolean); @@ -5840,6 +5843,8 @@ package android.content.pm { method public int describeContents(); method public void dump(android.util.Printer, java.lang.String); field public static final android.os.Parcelable.Creator CREATOR; + field public static final int FLAG_STOP_WITH_TASK = 1; // 0x1 + field public int flags; field public java.lang.String permission; } -- cgit v1.1