Merge "Revert "Reroute contactless payment fragments to nfc settings when"" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
08b25d04ff
@@ -38,7 +38,6 @@ import android.os.AsyncTask;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.os.UserManager;
|
import android.os.UserManager;
|
||||||
import android.permission.flags.Flags;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -829,29 +828,12 @@ public class SettingsActivity extends SettingsBaseActivity
|
|||||||
if (ai == null || ai.metaData == null) return;
|
if (ai == null || ai.metaData == null) return;
|
||||||
mFragmentClass = ai.metaData.getString(META_DATA_KEY_FRAGMENT_CLASS);
|
mFragmentClass = ai.metaData.getString(META_DATA_KEY_FRAGMENT_CLASS);
|
||||||
mHighlightMenuKey = ai.metaData.getString(META_DATA_KEY_HIGHLIGHT_MENU_KEY);
|
mHighlightMenuKey = ai.metaData.getString(META_DATA_KEY_HIGHLIGHT_MENU_KEY);
|
||||||
/* TODO(b/327036144) Once the Flags.walletRoleEnabled() is rolled out, we will replace
|
|
||||||
value for the fragment class within the com.android.settings.nfc.PaymentSettings
|
|
||||||
activity with com.android.settings.connecteddevice.NfcAndPaymentFragment so that this
|
|
||||||
code can be removed.
|
|
||||||
*/
|
|
||||||
if (shouldOverrideContactlessPaymentRouting()) {
|
|
||||||
overrideContactlessPaymentRouting();
|
|
||||||
}
|
|
||||||
} catch (NameNotFoundException nnfe) {
|
} catch (NameNotFoundException nnfe) {
|
||||||
// No recovery
|
// No recovery
|
||||||
Log.d(LOG_TAG, "Cannot get Metadata for: " + getComponentName().toString());
|
Log.d(LOG_TAG, "Cannot get Metadata for: " + getComponentName().toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldOverrideContactlessPaymentRouting() {
|
|
||||||
return Flags.walletRoleEnabled()
|
|
||||||
&& mFragmentClass.equals("com.android.settings.nfc.PaymentSettings");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void overrideContactlessPaymentRouting() {
|
|
||||||
mFragmentClass = "com.android.settings.connecteddevice.NfcAndPaymentFragment";
|
|
||||||
}
|
|
||||||
|
|
||||||
// give subclasses access to the Next button
|
// give subclasses access to the Next button
|
||||||
public boolean hasNextButton() {
|
public boolean hasNextButton() {
|
||||||
return mNextButton != null;
|
return mNextButton != null;
|
||||||
|
Reference in New Issue
Block a user