OSDN Git Service

Fix crash in settings robo test.
authorjackqdyulei <jackqdyulei@google.com>
Mon, 6 Nov 2017 18:59:21 +0000 (10:59 -0800)
committerjackqdyulei <jackqdyulei@google.com>
Mon, 6 Nov 2017 19:16:36 +0000 (11:16 -0800)
commit65370d21fd2d80d95d50f4c33d28ed96b03638a9
tree13a1eb13a360e0945491cc93ce3da3f024c8d108
parente717a5fdd1af0c80cc5bbd2a7eaa7d7acba26e71
Fix crash in settings robo test.

This is a regression from ag/3120176. In AnomalyDialogFragment when
creating the real dialog, it creates the RuntimePermissionPresenter
which causes the stub error.

In this cl we shadow the RuntimePermissionPresenter since in this
test we only focus on that created dialog has the correct message
(dialog title, dialog message)

Bug: 68941201
Test: RunSettingsRoboTests
Change-Id: I9c09922453f7797f375d0f61b9d8eba660bfbfef
tests/robotests/src/com/android/settings/fuelgauge/anomaly/AnomalyDialogFragmentTest.java
tests/robotests/src/com/android/settings/testutils/shadow/ShadowRuntimePermissionPresenter.java [new file with mode: 0644]