本文整理汇总了Java中com.android.ddmlib.Client.CHANGE_NAME属性的典型用法代码示例。如果您正苦于以下问题:Java Client.CHANGE_NAME属性的具体用法?Java Client.CHANGE_NAME怎么用?Java Client.CHANGE_NAME使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.android.ddmlib.Client
的用法示例。
在下文中一共展示了Client.CHANGE_NAME属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clientChanged
@Override
public void clientChanged(Client client, int changeMask) {
DeviceLogSource deviceLogSource = getDeviceSource(client.getDevice());
if (deviceLogSource != null
&& deviceLogSource == selectedSource
&& ((changeMask & Client.CHANGE_NAME) != 0)) {
((DeviceLogDataProvider) deviceLogSource.getLogProvider()).updateProcessList();
}
}
示例2: clientChanged
@Override
public void clientChanged(Client client, int eventType) {
if (this.client.equals(client) && (eventType & (Client.CHANGE_INFO | Client.CHANGE_NAME)) != 0) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
updateInfo();
firePropertySetsChange(null, null);
}
});
}
}
示例3: clientChanged
@Override
public void clientChanged(Client client, int changeMask) {
if ((changeMask & Client.CHANGE_NAME) != 0) {
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
updateClientCombo();
}
});
}
}
示例4: setUpForReattachingDebugger
/**
* Wires up listeners to automatically reconnect the debugger for each test method. When you
* `blaze test` an android_test in debug mode, it kills the instrumentation process between each
* test method, disconnecting the debugger. We listen for the start of a new method waiting for a
* debugger, and reconnect. TODO: Support stopping Blaze from the UI. This is hard because we have
* no way to distinguish process handler termination/debug session ending initiated by the user.
*/
private void setUpForReattachingDebugger(
String targetPackage,
LaunchInfo launchInfo,
ProcessHandlerLaunchStatus launchStatus,
ProcessHandlerConsolePrinter printer) {
final AndroidDebugBridge.IClientChangeListener reattachingListener =
new AndroidDebugBridge.IClientChangeListener() {
// The target application can either
// 1. Match our target name, and become available for debugging.
// 2. Be available for debugging, and suddenly have its name changed to match.
static final int CHANGE_MASK = Client.CHANGE_DEBUGGER_STATUS | Client.CHANGE_NAME;
@Override
public void clientChanged(@NotNull Client client, int changeMask) {
ClientData data = client.getClientData();
String clientDescription = data.getClientDescription();
if (clientDescription != null
&& clientDescription.equals(targetPackage)
&& (changeMask & CHANGE_MASK) != 0
&& data.getDebuggerConnectionStatus().equals(ClientData.DebuggerStatus.WAITING)) {
reattachDebugger(launchInfo, client, launchStatus, printer);
}
}
};
AndroidDebugBridge.addClientChangeListener(reattachingListener);
runContext.addLaunchTaskCompleteListener(
() -> {
AndroidDebugBridge.removeClientChangeListener(reattachingListener);
launchStatus.terminateLaunch("Test run completed.\n");
});
}
示例5: constructClientChangeListener
private IClientChangeListener constructClientChangeListener() {
return new IClientChangeListener() {
@Override
public void clientChanged(Client client, int changeMask) {
if ((changeMask & Client.CHANGE_NAME) == Client.CHANGE_NAME) {
ClientData cd = client.getClientData();
updateClientName(cd);
}
}
};
}