Skip to content

Commit

Permalink
Merge pull request #207 from SecUSo/development
Browse files Browse the repository at this point in the history
Update to version 4.5.7
  • Loading branch information
udenr authored Jan 17, 2024
2 parents eb01be5 + 7311539 commit ec78397
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 55 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
compileSdk 34
targetSdkVersion 34
multiDexEnabled true
versionCode 31
versionName "4.5.0"
versionCode 38
versionName "4.5.7"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
buildFeatures.dataBinding = true
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.os.Parcel;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;
Expand All @@ -28,6 +29,7 @@ public class HistoryItem {
private Bitmap image;
@NonNull
private String text = "";
@Nullable
private byte[] rawBytes;
private int numBits;
private ResultPoint[] resultPoints;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

public class TelEnterActivity extends AppCompatActivity {

private static final int REQUEST_SELECT_PHONE = 1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -55,43 +53,5 @@ public void onClick(View v) {
}

});

findViewById(R.id.selectContactButton).setOnClickListener(view -> selectPhoneNumber());

}

private void selectPhoneNumber() {
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);
if (intent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(intent, REQUEST_SELECT_PHONE);
}
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);

if (requestCode == REQUEST_SELECT_PHONE && resultCode == RESULT_OK) {
Uri contactUri = data.getData();
String[] projection =
{
ContactsContract.CommonDataKinds.Phone._ID,
ContactsContract.CommonDataKinds.Phone.NUMBER,
ContactsContract.CommonDataKinds.Phone.TYPE,
ContactsContract.CommonDataKinds.Phone.LABEL
};
try {
Cursor cursor = getContentResolver().query(contactUri, projection, null, null, null);
if (cursor.moveToFirst()) {
int phoneNoIdx = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);
String phoneNo = cursor.getString(phoneNoIdx);
((EditText) findViewById(R.id.editPhone)).setText(phoneNo);
}
cursor.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
13 changes: 0 additions & 13 deletions app/src/main/res/layout/activity_tel_enter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,6 @@
android:minHeight="48dp" />
</com.google.android.material.textfield.TextInputLayout>

<Button
android:id="@+id/selectContactButton"
style="@style/Widget.MaterialComponents.Button.OutlinedButton.Icon"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/import_from_contacts"
app:icon="@drawable/ic_person_accent_24dp"
app:layout_constraintEnd_toEndOf="@+id/textInputLayout"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="@+id/textInputLayout"
app:layout_constraintTop_toBottomOf="@+id/textInputLayout" />


<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@id/btnGenerate"
Expand Down

0 comments on commit ec78397

Please sign in to comment.