diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 5007f7a81cb4f..45a2c80c0c1b3 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1331,6 +1331,12 @@
Example: com.google.android.myapp/.resolver.MyResolverActivity -->
+
+ com.android.systemui/com.android.systemui.usb.UsbDebuggingActivity
+
;com.android.settings;
@@ -1413,4 +1419,5 @@
1 - The device DOES have a permanent menu key; ignore autodetection.
2 - The device DOES NOT have a permanent menu key; ignore autodetection. -->
0
+
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 093eb3bd0a811..323494aa751e9 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1625,6 +1625,7 @@
+
diff --git a/services/usb/java/com/android/server/usb/UsbDebuggingManager.java b/services/usb/java/com/android/server/usb/UsbDebuggingManager.java
index ce953a4b134e7..f73d4259489ea 100644
--- a/services/usb/java/com/android/server/usb/UsbDebuggingManager.java
+++ b/services/usb/java/com/android/server/usb/UsbDebuggingManager.java
@@ -17,8 +17,10 @@
package com.android.server.usb;
import android.content.ActivityNotFoundException;
+import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.res.Resources;
import android.net.LocalSocket;
import android.net.LocalSocketAddress;
import android.os.Handler;
@@ -244,15 +246,18 @@ public class UsbDebuggingManager implements Runnable {
}
private void showConfirmationDialog(String key, String fingerprints) {
- Intent dialogIntent = new Intent();
+ Intent intent = new Intent();
- dialogIntent.setClassName("com.android.systemui",
- "com.android.systemui.usb.UsbDebuggingActivity");
- dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- dialogIntent.putExtra("key", key);
- dialogIntent.putExtra("fingerprints", fingerprints);
+ ComponentName componentName = ComponentName.unflattenFromString(
+ Resources.getSystem().getString(
+ com.android.internal.R.string.config_customAdbPublicKeyActivity));
+ intent.setClassName(componentName.getPackageName(),
+ componentName.getClassName());
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.putExtra("key", key);
+ intent.putExtra("fingerprints", fingerprints);
try {
- mContext.startActivity(dialogIntent);
+ mContext.startActivity(intent);
} catch (ActivityNotFoundException e) {
Slog.e(TAG, "unable to start UsbDebuggingActivity");
}