• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

Revisão887e8f4bfd29f6b6668a831f6d81e775ad2a17db (tree)
Hora2019-04-03 06:41:26
AutorJosh Gao <jmgao@goog...>
Commiterandroid-build-merger

Mensagem de Log

Merge "adbd: demote CHECKs to warning logs."
am: 16f4a033c3

Change-Id: I15d430f0296231c56bd8e2a9826e2ede962145c6

Mudança Sumário

Diff

--- a/adb/daemon/usb.cpp
+++ b/adb/daemon/usb.cpp
@@ -304,33 +304,57 @@ struct UsbFfsConnection : public Connection {
304304
305305 switch (event.type) {
306306 case FUNCTIONFS_BIND:
307- CHECK(!bound) << "received FUNCTIONFS_BIND while already bound?";
308- CHECK(!enabled) << "received FUNCTIONFS_BIND while already enabled?";
309- bound = true;
307+ if (bound) {
308+ LOG(WARNING) << "received FUNCTIONFS_BIND while already bound?";
309+ running = false;
310+ }
311+
312+ if (enabled) {
313+ LOG(WARNING) << "received FUNCTIONFS_BIND while already enabled?";
314+ running = false;
315+ }
310316
317+ bound = true;
311318 break;
312319
313320 case FUNCTIONFS_ENABLE:
314- CHECK(bound) << "received FUNCTIONFS_ENABLE while not bound?";
315- CHECK(!enabled) << "received FUNCTIONFS_ENABLE while already enabled?";
316- enabled = true;
321+ if (!bound) {
322+ LOG(WARNING) << "received FUNCTIONFS_ENABLE while not bound?";
323+ running = false;
324+ }
325+
326+ if (enabled) {
327+ LOG(WARNING) << "received FUNCTIONFS_ENABLE while already enabled?";
328+ running = false;
329+ }
317330
331+ enabled = true;
318332 StartWorker();
319333 break;
320334
321335 case FUNCTIONFS_DISABLE:
322- CHECK(bound) << "received FUNCTIONFS_DISABLE while not bound?";
323- CHECK(enabled) << "received FUNCTIONFS_DISABLE while not enabled?";
324- enabled = false;
336+ if (!bound) {
337+ LOG(WARNING) << "received FUNCTIONFS_DISABLE while not bound?";
338+ }
339+
340+ if (!enabled) {
341+ LOG(WARNING) << "received FUNCTIONFS_DISABLE while not enabled?";
342+ }
325343
344+ enabled = false;
326345 running = false;
327346 break;
328347
329348 case FUNCTIONFS_UNBIND:
330- CHECK(!enabled) << "received FUNCTIONFS_UNBIND while still enabled?";
331- CHECK(bound) << "received FUNCTIONFS_UNBIND when not bound?";
332- bound = false;
349+ if (enabled) {
350+ LOG(WARNING) << "received FUNCTIONFS_UNBIND while still enabled?";
351+ }
352+
353+ if (!bound) {
354+ LOG(WARNING) << "received FUNCTIONFS_UNBIND when not bound?";
355+ }
333356
357+ bound = false;
334358 running = false;
335359 break;
336360 }