OSDN Git Service

Applying finalized strings for remote bugreports
authorMichal Karpinski <mkarpinski@google.com>
Tue, 15 Dec 2015 10:09:00 +0000 (10:09 +0000)
committerMichal Karpinski <mkarpinski@google.com>
Mon, 18 Jan 2016 11:08:29 +0000 (11:08 +0000)
Bug: 26226230
Change-Id: I0764a2d8c67a5d14d91c3e3162f407c74adb7bf8

core/res/res/values/strings.xml
core/res/res/values/symbols.xml
services/devicepolicy/java/com/android/server/devicepolicy/RemoteBugreportUtils.java

index 4ad36f5..f5e9126 100644 (file)
     <!-- Message of notification shown when ADB is actively connected to the phone. -->
     <string name="adb_active_notification_message">Touch to disable USB debugging.</string>
 
-    <!-- Title of notification shown to ask for user consent for sharing a bugreport that was requested remotely by the IT administrator. STOPSHIP: this is not final -->
-    <string name="share_remote_bugreport_notification_title">Remote bugreport request</string>
-    <!-- Ticker of notification shown to ask for user consent for sharing a bugreport that was requested remotely by the IT administrator. STOPSHIP: this is not final -->
-    <string name="share_remote_bugreport_notification_ticker">Remote bugreport request</string>
-    <!-- Message of notification shown to ask for user consent for sharing a bugreport that was requested remotely by the IT administrator. STOPSHIP: this is not final -->
-    <string name="share_remote_bugreport_notification_message">Your IT admin requested remote bugreport to carry out incident investigation</string>
-    <!-- Title of notification shown for remote bugreport progress. STOPSHIP: this is not final -->
-    <string name="remote_bugreport_progress_notification_title">Remote bugreport</string>
-    <!-- Ticker of notification shown for remote bugreport progress. STOPSHIP: this is not final -->
-    <string name="remote_bugreport_progress_notification_ticker">Remote bugreport collection in progress</string>
-    <!-- Message of notification shown for remote bugreport progress. User can cancel the bugreport STOPSHIP: this is not final -->
-    <string name="remote_bugreport_progress_notification_message_can_cancel">Remote bugreport in progress. Touch to cancel.</string>
-    <!-- Message of notification shown for remote bugreport progress. User cannot cancel the bugreport STOPSHIP: this is not final -->
-    <string name="remote_bugreport_progress_notification_message_cannot_cancel">Remote bugreport in progress.</string>
-    <!-- Acceptance label of notification shown to ask for user consent for sharing the remote bugreport. STOPSHIP: this is not final -->
+    <!-- Title of notification shown to ask for user consent for sharing a bugreport that was requested remotely by the IT administrator. -->
+    <string name="share_remote_bugreport_notification_title">Share bug report with admin?</string>
+    <!-- Message of notification shown to ask for user consent for sharing a bugreport that was requested remotely by the IT administrator. -->
+    <string name="share_remote_bugreport_notification_message">Your IT admin requested a bug report to help troubleshoot</string>
+    <!-- Acceptance label of notification shown to ask for user consent for sharing the remote bugreport. -->
     <string name="share_remote_bugreport_notification_accept">ACCEPT</string>
-    <!-- Decline label of notification shown to ask for user consent for sharing the remote bugreport. STOPSHIP: this is not final -->
+    <!-- Decline label of notification shown to ask for user consent for sharing the remote bugreport. -->
     <string name="share_remote_bugreport_notification_decline">DECLINE</string>
+    <!-- Title of notification shown for remote bugreport progress. -->
+    <string name="remote_bugreport_progress_notification_title">Taking bug report\u2026</string>
+    <!-- Message of notification shown for remote bugreport progress. User can cancel the bugreport -->
+    <string name="remote_bugreport_progress_notification_message_can_cancel">Touch to cancel</string>
 
     <!-- Used to replace %s in urls retreived from the signin server with locales.  For Some        -->
     <!-- devices we don't support all the locales we ship to and need to replace the '%s' with a    -->
index b4cb664..f3bc0d8 100644 (file)
   <java-symbol type="string" name="adb_active_notification_message" />
   <java-symbol type="string" name="adb_active_notification_title" />
   <java-symbol type="string" name="share_remote_bugreport_notification_title" />
-  <java-symbol type="string" name="share_remote_bugreport_notification_ticker" />
   <java-symbol type="string" name="share_remote_bugreport_notification_message" />
-  <java-symbol type="string" name="remote_bugreport_progress_notification_title" />
-  <java-symbol type="string" name="remote_bugreport_progress_notification_ticker" />
-  <java-symbol type="string" name="remote_bugreport_progress_notification_message_can_cancel" />
-  <java-symbol type="string" name="remote_bugreport_progress_notification_message_cannot_cancel" />
   <java-symbol type="string" name="share_remote_bugreport_notification_accept" />
   <java-symbol type="string" name="share_remote_bugreport_notification_decline" />
+  <java-symbol type="string" name="remote_bugreport_progress_notification_title" />
+  <java-symbol type="string" name="remote_bugreport_progress_notification_message_can_cancel" />
   <java-symbol type="string" name="aerr_application" />
   <java-symbol type="string" name="aerr_process" />
   <java-symbol type="string" name="aerr_process_silence" />
index 806a7d9..3e1fbc7 100644 (file)
@@ -61,7 +61,7 @@ class RemoteBugreportUtils {
                 .setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
                 .setContentTitle(context.getString(
                         R.string.share_remote_bugreport_notification_title))
-                .setTicker(context.getString(R.string.share_remote_bugreport_notification_ticker))
+                .setTicker(context.getString(R.string.share_remote_bugreport_notification_title))
                 .setContentText(context.getString(
                         R.string.share_remote_bugreport_notification_message))
                 .setStyle(new Notification.BigTextStyle().bigText(context.getString(
@@ -88,29 +88,25 @@ class RemoteBugreportUtils {
                 .setContentTitle(context.getString(
                         R.string.remote_bugreport_progress_notification_title))
                 .setTicker(context.getString(
-                        R.string.remote_bugreport_progress_notification_ticker))
+                        R.string.remote_bugreport_progress_notification_title))
                 .setOngoing(true)
                 .setLocalOnly(true)
                 .setColor(context.getColor(
                         com.android.internal.R.color.system_notification_accent_color))
                 .setPriority(Notification.PRIORITY_HIGH);
 
-        String message = null;
         if (canCancelBugreport) {
             PendingIntent pendingIntentCancel = PendingIntent.getBroadcast(context,
                     REMOTE_BUGREPORT_IN_PROGRESS_NOTIFICATION_ID,
                     new Intent(ACTION_REMOTE_BUGREPORT_SHARING_DECLINED),
                     PendingIntent.FLAG_CANCEL_CURRENT);
-            message = context.getString(
+            String message = context.getString(
                     R.string.remote_bugreport_progress_notification_message_can_cancel);
-            builder.setContentIntent(pendingIntentCancel);
-        } else {
-            message = context.getString(
-                    R.string.remote_bugreport_progress_notification_message_cannot_cancel);
+            builder.setContentText(message)
+                    .setContentIntent(pendingIntentCancel)
+                    .setStyle(new Notification.BigTextStyle().bigText(message));
         }
-        return builder.setContentText(message)
-                .setStyle(new Notification.BigTextStyle().bigText(message))
-                .build();
+        return builder.build();
     }
 }