OpenGrok
Home
Sort by relevance
Sort by last modified time
Full Search
Definition
Symbol
File Path
History
|
|
Help
Searched
refs:mRestrictionChecker
(Results
1 - 5
of
5
) sorted by null
/packages/apps/Settings/src/com/android/settings/network/
NetworkResetPreferenceController.java
25
private final NetworkResetRestrictionChecker
mRestrictionChecker
;
29
mRestrictionChecker
= new NetworkResetRestrictionChecker(context);
34
return !
mRestrictionChecker
.hasUserRestriction();
NetworkResetActionMenuController.java
32
private final NetworkResetRestrictionChecker
mRestrictionChecker
;
36
mRestrictionChecker
= new NetworkResetRestrictionChecker(context);
56
return !
mRestrictionChecker
.hasRestriction();
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/
NetworkResetRestrictionCheckerTest.java
46
private NetworkResetRestrictionChecker
mRestrictionChecker
;
52
mRestrictionChecker
= spy(new NetworkResetRestrictionChecker(mContext));
61
assertThat(
mRestrictionChecker
.hasRestriction()).isTrue();
67
doReturn(true).when(
mRestrictionChecker
).hasUserBaseRestriction();
68
doReturn(false).when(
mRestrictionChecker
).isRestrictionEnforcedByAdmin();
70
assertThat(
mRestrictionChecker
.hasRestriction()).isTrue();
76
doReturn(false).when(
mRestrictionChecker
).hasUserBaseRestriction();
77
doReturn(true).when(
mRestrictionChecker
).isRestrictionEnforcedByAdmin();
79
assertThat(
mRestrictionChecker
.hasRestriction()).isTrue();
85
doReturn(false).when(
mRestrictionChecker
).hasUserBaseRestriction()
[
all
...]
NetworkResetPreferenceControllerTest.java
44
private NetworkResetRestrictionChecker
mRestrictionChecker
;
53
ReflectionHelpers.setField(mController, "
mRestrictionChecker
",
mRestrictionChecker
);
58
when(
mRestrictionChecker
.isRestrictionEnforcedByAdmin()).thenReturn(true);
60
when(
mRestrictionChecker
.hasUserRestriction()).thenReturn(true);
64
when(
mRestrictionChecker
.hasUserRestriction()).thenReturn(false);
67
verify(
mRestrictionChecker
, never()).isRestrictionEnforcedByAdmin();
NetworkResetActionMenuControllerTest.java
53
private NetworkResetRestrictionChecker
mRestrictionChecker
;
60
ReflectionHelpers.setField(mController, "
mRestrictionChecker
",
mRestrictionChecker
);
66
when(
mRestrictionChecker
.hasRestriction()).thenReturn(false);
75
when(
mRestrictionChecker
.hasRestriction()).thenReturn(true);
Completed in 297 milliseconds