Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 923d2cc9 authored by phweiss's avatar phweiss
Browse files

DO NOT MERGE 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.

Cherry-picked from master.

Bug: 29748723
Bug: 33126577

(cherry-picked from commit a0cb251c)

Test: Manual, CTS-Verifier tests will be added later
Change-Id: I2bf517bd27ab23ad3f66270602dbf062efab8cbb
parent ff11122d
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -949,6 +949,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.
+1 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@
    <protected-broadcast android:name="android.app.action.BUGREPORT_SHARING_DECLINED" />
    <protected-broadcast android:name="android.app.action.BUGREPORT_FAILED" />
    <protected-broadcast android:name="android.app.action.BUGREPORT_SHARE" />
    <protected-broadcast android:name="android.app.action.SHOW_DEVICE_MONITORING_DIALOG" />

    <protected-broadcast android:name="android.appwidget.action.APPWIDGET_UPDATE_OPTIONS" />
    <protected-broadcast android:name="android.appwidget.action.APPWIDGET_DELETED" />
+29 −0
Original line number Diff line number Diff line
<!--
Copyright (C) 2016 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.
-->

<!-- STOPSHIP: Placeholder icon for network logging until the real icon is finalized-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="48dp"
        android:height="48dp"
        android:viewportWidth="24"
        android:viewportHeight="24"
        android:tint="#4DFFFFFF" >
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M2,24v-4h12v4H2z M2,16v-4h20v4H2z M5,7 12,0 19,7 14,7 14,15 10,15 10,7z"/>

</vector>
+7 −0
Original line number Diff line number Diff line
@@ -390,6 +390,13 @@
        This indicates that a work profile has been deleted. [CHAR LIMIT=NONE]-->
    <string name="work_profile_deleted_description_dpm_wipe">Your work profile is no longer available on this device.</string>

    <!-- Content title for a notification. This indicates that network logging was activated by
        a device owner. [CHAR LIMIT=NONE]-->
    <string name="network_logging_notification_title">Network traffic is being monitored</string>
    <!-- Content text for a notification. Tapping opens a dialog with more information on network
        logging. [CHAR LIMIT=NONE]-->
    <string name="network_logging_notification_text">Tap for more details</string>

    <!-- Factory reset warning dialog strings--> <skip />
    <!-- Shows up in the dialog's title to warn about an impeding factory reset. [CHAR LIMIT=NONE] -->
    <string name="factory_reset_warning">Your device will be erased</string>
+3 −0
Original line number Diff line number Diff line
@@ -1109,6 +1109,8 @@
  <java-symbol type="string" name="work_profile_deleted_description" />
  <java-symbol type="string" name="work_profile_deleted_details" />
  <java-symbol type="string" name="work_profile_deleted_description_dpm_wipe" />
  <java-symbol type="string" name="network_logging_notification_title" />
  <java-symbol type="string" name="network_logging_notification_text" />
  <java-symbol type="string" name="factory_reset_warning" />
  <java-symbol type="string" name="factory_reset_message" />
  <java-symbol type="string" name="lockscreen_transport_play_description" />
@@ -1221,6 +1223,7 @@
  <java-symbol type="drawable" name="ic_print" />
  <java-symbol type="drawable" name="ic_print_error" />
  <java-symbol type="drawable" name="ic_grayedout_printer" />
  <java-symbol type="drawable" name="ic_qs_network_logging" />
  <java-symbol type="drawable" name="jog_dial_arrow_long_left_green" />
  <java-symbol type="drawable" name="jog_dial_arrow_long_right_red" />
  <java-symbol type="drawable" name="jog_dial_arrow_short_left_and_right" />
Loading