Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public class AcquireTokenFragment extends Fragment {
private Button mAddNgcMfaClaimButton;
private Switch mEnablePII;
private Switch mForceRefresh;
private Switch mEnableNewBrokerDiscovery;
private Switch mAllowSignInFromOtherDevice;

private Button mClearActiveBrokerDiscoveryCache;
Expand Down Expand Up @@ -203,19 +202,9 @@ public void onClick(View v) {
AndroidPlatformComponentsFactory.createFromContext(getContext()).getStorageSupplier()
);

mEnableNewBrokerDiscovery = view.findViewById(R.id.enableBrokerDiscovery);
mCachedActiveBrokerName = view.findViewById(R.id.cachedActiveBrokerName);
mClearActiveBrokerDiscoveryCache = view.findViewById(R.id.clearActiveBrokerDiscoveryCache);

mEnableNewBrokerDiscovery.setChecked(BrokerDiscoveryClientFactory.isNewBrokerDiscoveryEnabled());
mEnableNewBrokerDiscovery.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton v, boolean value) {
BrokerDiscoveryClientFactory.setNewBrokerDiscoveryEnabled(value);
setActiveBrokerTextFromCache();
}
});

mClearActiveBrokerDiscoveryCache.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand Down
38 changes: 9 additions & 29 deletions testapps/testapp/src/main/res/layout/fragment_acquire.xml
Original file line number Diff line number Diff line change
Expand Up @@ -435,33 +435,6 @@
android:layout_weight="1"/>
</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:weightSum="16">

<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:text="@string/enable_new_broker_discovery" />

<Switch
android:id="@+id/enableBrokerDiscovery"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center_vertical" />

<Button
android:id="@+id/clearActiveBrokerDiscoveryCache"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="8"
android:text="@string/clear_active_broker_cache" />

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -472,17 +445,24 @@
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:layout_weight="3"
android:text="@string/current_cached_active_broker" />

<TextView
android:id="@+id/cachedActiveBrokerName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="10"
android:layout_weight="8"
android:layout_marginLeft="10dp"
android:text="@string/none"/>

<Button
android:id="@+id/clearActiveBrokerDiscoveryCache"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="4"
android:text="@string/clear_active_broker_cache" />

</LinearLayout>

<LinearLayout
Expand Down
2 changes: 1 addition & 1 deletion testapps/testapp/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<string name="pop_client_claims">PoP client claims</string>
<string name="trust_debug_broker">DebugBroker?</string>
<string name="enable_new_broker_discovery">Enable New Broker Discovery</string>
<string name="clear_active_broker_cache">Clear Active Broker Cache</string>
<string name="clear_active_broker_cache">Clear</string>
<string name="current_cached_active_broker">Cached Active Broker</string>
<string name="none">None</string>

Expand Down
Loading