public ServiceStateAssert isAutomaticSelection() { isNotNull(); assertThat(actual.getIsManualSelection()) // .overridingErrorMessage("Expected to have automatic selection mode but had manual.") // .isFalse(); return this; }
public ServiceStateAssert isManualSelection() { isNotNull(); assertThat(actual.getIsManualSelection()) // .overridingErrorMessage("Expected to have manual selection mode but had automatic.") // .isTrue(); return this; }
public ServiceStateAssert isManualSelection() { isNotNull(); assertThat(actual.getIsManualSelection()) // .overridingErrorMessage("Expected to have manual selection mode but had automatic.") // .isTrue(); return this; }
public ServiceStateAssert isAutomaticSelection() { isNotNull(); assertThat(actual.getIsManualSelection()) // .overridingErrorMessage("Expected to have automatic selection mode but had manual.") // .isFalse(); return this; }
private void report(MessageWritable writer, ServiceState state) { Log.i(TAG, String.format("Phone state is %s; %s; %s", stateLabel(state.getState()), state.getIsManualSelection() ? "manual" : "automatic", state.getOperatorAlphaLong() == null ? "no operator" : "operator " + state.getOperatorAlphaLong() )); Wire.PhoneStateEvent.Builder message = Wire.PhoneStateEvent.newBuilder() .setState(stateLabel(state.getState())) .setManual(state.getIsManualSelection()); if (state.getOperatorAlphaLong() != null) { message.setOperator(state.getOperatorAlphaLong()); } writer.write(Wire.Envelope.newBuilder() .setType(Wire.MessageType.EVENT_PHONE_STATE) .setMessage(message.build().toByteString()) .build()); }