Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 1 addition & 2 deletions app/res/layout/fragment_recovery_code.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
android:layout_marginStart="16dp"
android:layout_gravity="center"
android:layout_marginEnd="16dp"
android:text="@string/welcome_back_msg"
android:textColor="@color/connect_dark_blue_color"
android:textSize="18sp" />
</LinearLayout>
Expand Down Expand Up @@ -76,7 +75,7 @@
android:textSize="12sp" />

<LinearLayout
android:id="@+id/name_layout"
android:id="@+id/backup_code_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public ConnectUserRecord() {
connectTokenExpiration = new Date();
secondaryPhoneVerified = true;
verifySecondaryPhoneByDate = new Date();
alternatePhone = "";
}

public ConnectUserRecord(String primaryPhone, String userId, String password, String name, String pin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public class AddOrVerifyNameParser implements PersonalIdApiResponseParser {
@Override
public void parse(JSONObject json, PersonalIdSessionData sessionData) throws JSONException {
sessionData.setAccountExists(json.optBoolean("account_exists", false));
sessionData.setToken(JsonExtensions.optStringSafe(json, "photo", null));
sessionData.setPhotoBase64(JsonExtensions.optStringSafe(json, "photo", null));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,18 @@ public void onDestroyView() {
private void configureUiByMode() {
if (isRecovery) {
titleId = R.string.connect_backup_code_title_confirm;
binding.confirmCodeLayout.setVisibility(View.GONE);
binding.recoveryCodeTilte.setText(R.string.connect_backup_code_message_title);
binding.backupCodeSubtitle.setText(R.string.connect_backup_code_message);
binding.nameLayout.setVisibility(View.VISIBLE);
binding.backupCodeLayout.setVisibility(View.VISIBLE);
binding.confirmCodeLayout.setVisibility(View.GONE);
binding.notMeButton.setVisibility(View.VISIBLE);
setUserNameAndPhoto();
} else {
titleId = R.string.connect_backup_code_title_set;
binding.backupCodeLayout.setVisibility(View.VISIBLE);
binding.confirmCodeLayout.setVisibility(View.VISIBLE);
binding.notMeButton.setVisibility(View.GONE);
binding.nameLayout.setVisibility(View.GONE);
binding.welcomeBackLayout.setVisibility(View.GONE);
}
}
Comment on lines 70 to 86
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify all layout references have been updated consistently.

The configureUiByMode method has been updated to use the renamed layout IDs. Please ensure that no other references to the old name_layout ID exist in the codebase.


🏁 Script executed:

#!/bin/bash
# Description: Search for any remaining references to the old 'name_layout' ID
# Expected: No results should be found

echo "Searching for old 'name_layout' references..."
rg -i "name_layout" --type java --type xml
echo ""
echo "Searching for R.id.nameLayout references..."
rg "R\.id\.nameLayout" --type java

Length of output: 386


Fix remaining name_layout reference in layout file

Verification uncovered one leftover reference:

  • app/res/layout/screen_personalid_name.xml:
    android:id="@+id/name_layout"

Please rename this ID to the new identifier (and update any related bindings or code) so that all name_layout occurrences are removed.

🤖 Prompt for AI Agents
In app/src/org/commcare/fragments/personalId/PersonalIdBackupCodeFragment.java
lines 70 to 86, the configureUiByMode method uses updated layout IDs, but there
is still a leftover reference to the old 'name_layout' ID in the layout file
app/res/layout/screen_personalid_name.xml. To fix this, rename the
android:id="@+id/name_layout" in that XML file to the new identifier consistent
with the updated naming convention, then update any related view bindings or
code references accordingly to remove all occurrences of 'name_layout'.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down Expand Up @@ -195,6 +196,8 @@ private void startConfigurationRequest() {

private void makeStartConfigurationCall(@Nullable String integrityToken, String requestHash,
HashMap<String, String> body) {
Log.d("Integrity", "Token: " + integrityToken);
Log.d("Integrity", "Hash: " + requestHash);
new PersonalIdApiHandler() {
@Override
protected void onSuccess(PersonalIdSessionData sessionData) {
Expand Down
Loading