diff options
| author | Dianne Hackborn <hackbod@google.com> | 2009-08-17 23:33:56 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2009-08-18 13:59:27 -0700 |
| commit | d8a43f61680bacf0d4b52a03ff3c7a07307377fc (patch) | |
| tree | 298808433ea17b6842b87424629fa1869478ed94 /api | |
| parent | 30c0b83490d856c1cd82441c8e2d800a88927237 (diff) | |
| download | frameworks_base-d8a43f61680bacf0d4b52a03ff3c7a07307377fc.zip frameworks_base-d8a43f61680bacf0d4b52a03ff3c7a07307377fc.tar.gz frameworks_base-d8a43f61680bacf0d4b52a03ff3c7a07307377fc.tar.bz2 | |
Fix issue #2047139: Remove Service.setForeground()
This API is becoming seriously abused, so now it is deprecated and has
become a no-op.
As an alternative, there is now a new API that allows you to make a service
be in the foreground but requires providing a persistent notification to
go along with this state, allowing the user to know about and control it.
Diffstat (limited to 'api')
| -rw-r--r-- | api/current.xml | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/api/current.xml b/api/current.xml index 000f5d9..e9082bc 100644 --- a/api/current.xml +++ b/api/current.xml @@ -22200,6 +22200,17 @@ visibility="public" > </field> +<field name="FLAG_FOREGROUND_SERVICE" + type="int" + transient="false" + volatile="false" + value="64" + static="true" + final="true" + deprecated="not deprecated" + visibility="public" +> +</field> <field name="FLAG_INSISTENT" type="int" transient="false" @@ -23760,12 +23771,40 @@ synchronized="false" static="false" final="true" - deprecated="not deprecated" + deprecated="deprecated" visibility="public" > <parameter name="isForeground" type="boolean"> </parameter> </method> +<method name="startForeground" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="true" + deprecated="not deprecated" + visibility="public" +> +<parameter name="id" type="int"> +</parameter> +<parameter name="notification" type="android.app.Notification"> +</parameter> +</method> +<method name="stopForeground" + return="void" + abstract="false" + native="false" + synchronized="false" + static="false" + final="true" + deprecated="not deprecated" + visibility="public" +> +<parameter name="removeNotification" type="boolean"> +</parameter> +</method> <method name="stopSelf" return="void" abstract="false" |
