Skip to content

Commit

Permalink
show git hash on first screen when starting up
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Jan 6, 2025
1 parent d983850 commit 647d619
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class SetPasswordActivity extends AppCompatActivity
private check_user_password_criteria mAuthTask = null;

// UI references.
private TextView githash_text;
private EditText mPasswordView1;
private EditText mPasswordView2;
private View mProgressView;
Expand All @@ -68,6 +69,8 @@ protected void onCreate(Bundle savedInstanceState)

settings = PreferenceManager.getDefaultSharedPreferences(this);

githash_text = findViewById(R.id.githash_text);

mPasswordView1 = (EditText) findViewById(R.id.password_1);
mPasswordView1.setOnEditorActionListener(new TextView.OnEditorActionListener()
{
Expand Down Expand Up @@ -116,6 +119,24 @@ public void onClick(View view)

mLoginFormView = findViewById(R.id.login_form);
mProgressView = findViewById(R.id.login_progress);

try
{
githash_text.setText("build: ????????");
}
catch(Exception e)
{

}

try
{
githash_text.setText("build: " + BuildConfig.GitHash);
}
catch(Exception e)
{

}
}

void auto_create_password()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,25 @@
android:layout_height="60dp"
android:src="@drawable/web_hi_res_512" />

<TextView
style="?android:textAppearanceSmall"
android:id="@+id/githash_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginBottom="0dp"
android:gravity="center"
android:textSize="14sp"
android:paddingLeft="2dp"
android:paddingRight="2dp"
android:text="build: ????????"
android:textColor="@color/md_grey_900" />

<TextView
style="?android:textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="10dp"
android:gravity="center"
android:paddingLeft="10dp"
Expand Down

0 comments on commit 647d619

Please sign in to comment.