Dianne Hackborn 3d1933c45f Implement some control over ALLOW_WHILE_IDLE alarms.
Since these alarms allow you to bypass the idle restrictions,
we don't want them to be so open-ended like other alarms.  This
implements a policy where the alarm manager will only deliver these
types of alarms every X minutes to each application.  For this
initial implementation, X is 1 minute under normal operation and
15 minutes when in idle mode.

To do this, I needed to introduce a new internal allow-while-idle
flag for system alarms, which applications can't get, and doesn't
have these new restrictions.

Also tweaked how the alarm manager handles the alarm window, so it
doesn't change if the alarm gets rescheduld; the window is now always
what as computed based on the time when the alarm was first
given to it.

Finally, fix TimeUtils to be able to correctly print times that
are > 999 days.

Change-Id: Ibad8c6a7c14b0624b54e82267be23224b4c31e84
2015-06-12 12:37:35 -07:00

82 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.test.activity">
<uses-permission android:name="android.permission.REAL_GET_TASKS" />
<uses-permission android:name="android.permission.REORDER_TASKS" />
<uses-permission android:name="android.permission.REMOVE_TASKS" />
<uses-permission android:name="android.permission.READ_FRAME_BUFFER" />
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
<uses-permission android:name="android.permission.MANAGE_USERS" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<application android:label="ActivityTest">
<activity android:name="ActivityTestMain">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="www.angryredplanet.com"
android:pathPrefix="" />
</intent-filter>
<preferred>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="www.angryredplanet.com"
android:pathPrefix="" />
</preferred>
</activity>
<activity android:name="SpamActivity" android:label="Spam!"
android:documentLaunchMode="always">
</activity>
<activity android:name="DocActivity" android:label="Some doc">
</activity>
<service android:name="SingleUserService"
android:singleUser="true" android:exported="true">
</service>
<service android:name="ServiceUserTarget">
</service>
<receiver android:name="UserTarget">
</receiver>
<service android:name="IsolatedService" android:isolatedProcess="true">
</service>
<receiver android:name="StartEmpty" android:exported="true">
<intent-filter>
<action android:name="com.example.START_EMPTY" />
</intent-filter>
</receiver>
<service android:name="EmptyService" android:exported="true">
<intent-filter>
<action android:name="com.example.START_EMPTY" />
</intent-filter>
</service>
<receiver android:name="SingleUserReceiver"
android:singleUser="true" android:exported="true" >
</receiver>
<provider android:name="SingleUserProvider"
android:authorities="com.google.android.test.activity.single_user"
android:singleUser="true" android:exported="true" />
<receiver android:name="TrackTimeReceiver" />
<receiver android:name="AlarmSpamReceiver" />
</application>
</manifest>