Show notification when network logging is enabled

A notification is shown after network logging is enabled
and after the next three reboots that are at least one day apart.

Clicking it sends an intent to quick settings to shown its device monitoring
dialog.

Bug: 29748723
Bug: 33126577

Test: Manual, CTS-Verifier tests will be added later
Change-Id: I2bf517bd27ab23ad3f66270602dbf062efab8cbb
This commit is contained in:
phweiss
2016-12-14 21:37:48 +01:00
parent bcdc5d748e
commit a0cb251ca6
9 changed files with 121 additions and 1 deletions

View File

@@ -1059,6 +1059,15 @@ public class DevicePolicyManager {
public static final String ACTION_SET_NEW_PARENT_PROFILE_PASSWORD
= "android.app.action.SET_NEW_PARENT_PROFILE_PASSWORD";
/**
* Broadcast action: Tell the status bar to open the device monitoring dialog, e.g. when
* Network logging was enabled and the user tapped the notification.
* <p class="note">This is a protected intent that can only be sent by the system.</p>
* @hide
*/
public static final String ACTION_SHOW_DEVICE_MONITORING_DIALOG
= "android.app.action.SHOW_DEVICE_MONITORING_DIALOG";
/**
* Flag used by {@link #addCrossProfileIntentFilter} to allow activities in
* the parent profile to access intents sent from the managed profile.