Loading core/res/res/values/bools.xml +2 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ --> <resources> <!-- Whether to popup usb computer connection option--> <bool name="always_popup_usb_computer_connection_option">false</bool> <bool name="kg_enable_camera_default_widget">true</bool> <bool name="kg_center_small_widgets_vertically">false</bool> <bool name="kg_top_align_page_shrink_on_bouncer_visible">true</bool> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -252,6 +252,7 @@ <java-symbol type="bool" name="action_bar_embed_tabs_pre_jb" /> <java-symbol type="bool" name="action_bar_expanded_action_views_exclusive" /> <java-symbol type="bool" name="config_avoidGfxAccel" /> <java-symbol type="bool" name="always_popup_usb_computer_connection_option" /> <java-symbol type="bool" name="config_allowActionMenuItemTextWithIcon" /> <java-symbol type="bool" name="config_bluetooth_address_validation" /> <java-symbol type="bool" name="config_bluetooth_sco_off_call" /> Loading services/usb/java/com/android/server/usb/UsbDeviceManager.java +20 −1 Original line number Diff line number Diff line Loading @@ -661,6 +661,10 @@ public class UsbDeviceManager { if (mDebuggingManager != null) { mDebuggingManager.setAdbEnabled(mAdbEnabled); } if (mContext.getResources().getBoolean(com.android.internal. R.bool.always_popup_usb_computer_connection_option)) { updateState(bootState(mConnected, mConfigured)); } break; case MSG_USER_SWITCHED: { UserManager userManager = Loading @@ -687,6 +691,18 @@ public class UsbDeviceManager { } } private String bootState(boolean isConnected, boolean isConfigured) { String bootState = "CONNECTED"; if (!isConnected && !isConfigured) { bootState = "DISCONNECTED"; } else if (isConnected && !isConfigured) { bootState = "CONNECTED"; } else if (isConnected && isConfigured) { bootState = "CONFIGURED"; } return bootState; } public UsbAccessory getCurrentAccessory() { return mCurrentAccessory; } Loading Loading @@ -717,7 +733,7 @@ public class UsbDeviceManager { //} } } if (id != mUsbNotificationId) { if (id != mUsbNotificationId && mBootCompleted) { // clear notification if title needs changing if (mUsbNotificationId != 0) { mNotificationManager.cancelAsUser(null, mUsbNotificationId, Loading Loading @@ -751,6 +767,9 @@ public class UsbDeviceManager { mNotificationManager.notifyAsUser(null, id, notification, UserHandle.ALL); mUsbNotificationId = id; if (r.getBoolean(com.android.internal.R.bool. always_popup_usb_computer_connection_option)) mContext.startActivity(intent); } } } Loading Loading
core/res/res/values/bools.xml +2 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ --> <resources> <!-- Whether to popup usb computer connection option--> <bool name="always_popup_usb_computer_connection_option">false</bool> <bool name="kg_enable_camera_default_widget">true</bool> <bool name="kg_center_small_widgets_vertically">false</bool> <bool name="kg_top_align_page_shrink_on_bouncer_visible">true</bool> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -252,6 +252,7 @@ <java-symbol type="bool" name="action_bar_embed_tabs_pre_jb" /> <java-symbol type="bool" name="action_bar_expanded_action_views_exclusive" /> <java-symbol type="bool" name="config_avoidGfxAccel" /> <java-symbol type="bool" name="always_popup_usb_computer_connection_option" /> <java-symbol type="bool" name="config_allowActionMenuItemTextWithIcon" /> <java-symbol type="bool" name="config_bluetooth_address_validation" /> <java-symbol type="bool" name="config_bluetooth_sco_off_call" /> Loading
services/usb/java/com/android/server/usb/UsbDeviceManager.java +20 −1 Original line number Diff line number Diff line Loading @@ -661,6 +661,10 @@ public class UsbDeviceManager { if (mDebuggingManager != null) { mDebuggingManager.setAdbEnabled(mAdbEnabled); } if (mContext.getResources().getBoolean(com.android.internal. R.bool.always_popup_usb_computer_connection_option)) { updateState(bootState(mConnected, mConfigured)); } break; case MSG_USER_SWITCHED: { UserManager userManager = Loading @@ -687,6 +691,18 @@ public class UsbDeviceManager { } } private String bootState(boolean isConnected, boolean isConfigured) { String bootState = "CONNECTED"; if (!isConnected && !isConfigured) { bootState = "DISCONNECTED"; } else if (isConnected && !isConfigured) { bootState = "CONNECTED"; } else if (isConnected && isConfigured) { bootState = "CONFIGURED"; } return bootState; } public UsbAccessory getCurrentAccessory() { return mCurrentAccessory; } Loading Loading @@ -717,7 +733,7 @@ public class UsbDeviceManager { //} } } if (id != mUsbNotificationId) { if (id != mUsbNotificationId && mBootCompleted) { // clear notification if title needs changing if (mUsbNotificationId != 0) { mNotificationManager.cancelAsUser(null, mUsbNotificationId, Loading Loading @@ -751,6 +767,9 @@ public class UsbDeviceManager { mNotificationManager.notifyAsUser(null, id, notification, UserHandle.ALL); mUsbNotificationId = id; if (r.getBoolean(com.android.internal.R.bool. always_popup_usb_computer_connection_option)) mContext.startActivity(intent); } } } Loading