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

Commit 3a739ad2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: AppOps: always show "USB connection" when usb connected"

parents 02a2fd1a 39cf4099
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1349,6 +1349,7 @@
    <string name="usb_ptp_notification_title" msgid="1960817192216064833">"作为相机连接"</string>
    <string name="usb_cd_installer_notification_title" msgid="6774712827892090754">"作为安装程序连接"</string>
    <string name="usb_accessory_notification_title" msgid="7848236974087653666">"已连接到USB配件"</string>
    <string name="usb_choose_notification_title">触摸选择USB连接模式</string>
    <string name="usb_notification_message" msgid="2290859399983720271">"触摸可显示其他USB选项。"</string>
    <string name="extmedia_format_title" product="nosdcard" msgid="9020092196061007262">"格式化USB存储设备吗?"</string>
    <string name="extmedia_format_title" product="default" msgid="3648415921526526069">"要格式化SD卡吗?"</string>
+2 −0
Original line number Diff line number Diff line
@@ -3776,6 +3776,8 @@
    <string name="usb_cd_installer_notification_title">Connected as an installer</string>
    <!-- USB_PREFERENCES: Notification for when a USB accessory is attached.  This is the title -->
    <string name="usb_accessory_notification_title">Connected to a USB accessory</string>
    <!-- USB_PREFERENCES: Notification for when no USB options chosen.  This is the title -->
    <string name="usb_choose_notification_title">Touch for choose USB options.</string>
    <!-- See USB_PREFERENCES. This is the message. -->
    <string name="usb_notification_message">Touch for other USB options.</string>

+1 −0
Original line number Diff line number Diff line
@@ -1765,6 +1765,7 @@
  <java-symbol type="string" name="usb_accessory_notification_title" />
  <java-symbol type="string" name="usb_cd_installer_notification_title" />
  <java-symbol type="string" name="usb_mtp_notification_title" />
  <java-symbol type="string" name="usb_choose_notification_title" />
  <java-symbol type="string" name="usb_notification_message" />
  <java-symbol type="string" name="use_physical_keyboard" />
  <java-symbol type="string" name="usb_ptp_notification_title" />
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@

package com.android.server.usb;

import android.app.AppOpsManager;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
@@ -707,6 +708,9 @@ public class UsbDeviceManager {
                } else if (containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_ACCESSORY)) {
                    id = com.android.internal.R.string.usb_accessory_notification_title;
                } else {
                    if (AppOpsManager.isStrictEnable()) {
                        id = com.android.internal.R.string.usb_choose_notification_title;
                    }
                    // There is a different notification for USB tethering so we don't need one here
                    //if (!containsFunction(mCurrentFunctions, UsbManager.USB_FUNCTION_RNDIS)) {
                    //    Slog.e(TAG, "No known USB function in updateUsbNotification");