-
Notifications
You must be signed in to change notification settings - Fork 0
Feature implementation from commits f091d61..4014bd2 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature-base-branch-1
Are you sure you want to change the base?
Conversation
Reduce library size
…opment Fix query & class not found error
|
|
||
| public Cursor getData(int id) { | ||
| SQLiteDatabase db = this.getReadableDatabase(); | ||
| Cursor res = db.rawQuery("select * from cars where id=" + id + "", null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security Issue
SQL Injection Vulnerability.
Direct concatenation of user input into SQL query creates a critical security vulnerability allowing attackers to execute arbitrary SQL commands.
Current Code (Diff):
- Cursor res = db.rawQuery("select * from cars where id=" + id + "", null);
+ Cursor res = db.rawQuery("select * from cars where id=?", new String[]{String.valueOf(id)});📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| Cursor res = db.rawQuery("select * from cars where id=" + id + "", null); | |
| Cursor res = db.rawQuery("select * from cars where id=?", new String[]{String.valueOf(id)}); |
| Cursor res = db.rawQuery("select * from cars", null); | ||
| res.moveToFirst(); | ||
|
|
||
| while (!res.isAfterLast()) { | ||
| arrayList.add(res.getString(res.getColumnIndex(CARS_COLUMN_NAME))); | ||
| res.moveToNext(); | ||
| } | ||
| return arrayList; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Resource Leak - Unclosed Cursor.
The Cursor object in getAllCars() is never closed, which will cause memory leaks and potentially crash the application.
Current Code (Diff):
- Cursor res = db.rawQuery("select * from cars", null);
- res.moveToFirst();
-
- while (!res.isAfterLast()) {
- arrayList.add(res.getString(res.getColumnIndex(CARS_COLUMN_NAME)));
- res.moveToNext();
- }
- return arrayList;
+ Cursor res = db.rawQuery("select * from cars", null);
+ res.moveToFirst();
+
+ while (!res.isAfterLast()) {
+ arrayList.add(res.getString(res.getColumnIndex(CARS_COLUMN_NAME)));
+ res.moveToNext();
+ }
+ res.close();
+ return arrayList;📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| Cursor res = db.rawQuery("select * from cars", null); | |
| res.moveToFirst(); | |
| while (!res.isAfterLast()) { | |
| arrayList.add(res.getString(res.getColumnIndex(CARS_COLUMN_NAME))); | |
| res.moveToNext(); | |
| } | |
| return arrayList; | |
| Cursor res = db.rawQuery("select * from cars", null); | |
| res.moveToFirst(); | |
| while (!res.isAfterLast()) { | |
| arrayList.add(res.getString(res.getColumnIndex(CARS_COLUMN_NAME))); | |
| res.moveToNext(); | |
| } | |
| res.close(); | |
| return arrayList; |
| Cursor cursor = db.rawQuery("select * from cars", null); | ||
| if (cursor != null && cursor.getCount() > 0) { | ||
| cursor.moveToFirst(); | ||
| return cursor.getInt(0); | ||
| } else { | ||
| return 0; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Resource Leak - Unclosed Cursor.
The Cursor object in count() is never closed, which will cause memory leaks and potentially crash the application.
Current Code (Diff):
- Cursor cursor = db.rawQuery("select * from cars", null);
- if (cursor != null && cursor.getCount() > 0) {
- cursor.moveToFirst();
- return cursor.getInt(0);
- } else {
- return 0;
- }
+ Cursor cursor = db.rawQuery("select * from cars", null);
+ try {
+ if (cursor != null && cursor.getCount() > 0) {
+ cursor.moveToFirst();
+ return cursor.getInt(0);
+ } else {
+ return 0;
+ }
+ } finally {
+ if (cursor != null) cursor.close();
+ }📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| Cursor cursor = db.rawQuery("select * from cars", null); | |
| if (cursor != null && cursor.getCount() > 0) { | |
| cursor.moveToFirst(); | |
| return cursor.getInt(0); | |
| } else { | |
| return 0; | |
| } | |
| Cursor cursor = db.rawQuery("select * from cars", null); | |
| try { | |
| if (cursor != null && cursor.getCount() > 0) { | |
| cursor.moveToFirst(); | |
| return cursor.getInt(0); | |
| } else { | |
| return 0; | |
| } | |
| } finally { | |
| if (cursor != null) cursor.close(); | |
| } |
| Cursor cursor = db.rawQuery("select * from cars", null); | ||
| if (cursor != null && cursor.getCount() > 0) { | ||
| cursor.moveToFirst(); | ||
| return cursor.getInt(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Logic Error in count() Method.
The count() method incorrectly returns the first column value (id) instead of the actual count of rows, causing incorrect data to be returned.
Current Code (Diff):
- return cursor.getInt(0);
+ return cursor.getCount();📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| return cursor.getInt(0); | |
| return cursor.getCount(); |
| "(id integer primary key, name text, color text, mileage real)" | ||
| ); | ||
|
|
||
| db.execSQL("create table [transaction] (id integer primary key, name text)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Using SQL Reserved Keyword as Table Name.
Using 'transaction' as a table name is problematic as it's a SQL reserved keyword, which could cause unexpected behavior or errors.
Current Code (Diff):
- db.execSQL("create table [transaction] (id integer primary key, name text)");
+ db.execSQL("create table transactions (id integer primary key, name text)");📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| db.execSQL("create table [transaction] (id integer primary key, name text)"); | |
| db.execSQL("create table transactions (id integer primary key, name text)"); |
🔄 Dependencies Affected
src/main/java/com/sample/encrypt/database/CarDBHelper.java
Function: CarDBHelper.onCreate
Issue: The insert statements also need to be updated to match the new table name
Suggestion: Update insert statements to use the new table name
Current Code (Diff):
- db.execSQL("insert into [transaction] (name) values ('hello');");
+ db.execSQL("insert into transactions (name) values ('hello');");|
|
||
| public Cursor getData(int id) { | ||
| SQLiteDatabase db = this.getReadableDatabase(); | ||
| Cursor res = db.rawQuery("select * from contacts where id=" + id + "", null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security Issue
SQL Injection Vulnerability.
Direct string concatenation in SQL query creates a critical SQL injection vulnerability that could allow attackers to execute malicious database operations.
Current Code (Diff):
- Cursor res = db.rawQuery("select * from contacts where id=" + id + "", null);
+ Cursor res = db.rawQuery("select * from contacts where id=?", new String[]{String.valueOf(id)});📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| Cursor res = db.rawQuery("select * from contacts where id=" + id + "", null); | |
| Cursor res = db.rawQuery("select * from contacts where id=?", new String[]{String.valueOf(id)}); |
| public ArrayList<String> getAllCotacts() { | ||
| ArrayList<String> arrayList = new ArrayList<>(); | ||
|
|
||
| //hp = new HashMap(); | ||
| SQLiteDatabase db = this.getReadableDatabase(); | ||
| Cursor res = db.rawQuery("select * from contacts", null); | ||
| res.moveToFirst(); | ||
|
|
||
| while (!res.isAfterLast()) { | ||
| arrayList.add(res.getString(res.getColumnIndex(CONTACTS_COLUMN_NAME))); | ||
| res.moveToNext(); | ||
| } | ||
| return arrayList; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Resource Leak: Unclosed Cursor.
The getAllCotacts() method doesn't close the database cursor, which will lead to memory leaks and potential app crashes with extended use.
Current Code (Diff):
- public ArrayList<String> getAllCotacts() {
- ArrayList<String> arrayList = new ArrayList<>();
-
- //hp = new HashMap();
- SQLiteDatabase db = this.getReadableDatabase();
- Cursor res = db.rawQuery("select * from contacts", null);
- res.moveToFirst();
-
- while (!res.isAfterLast()) {
- arrayList.add(res.getString(res.getColumnIndex(CONTACTS_COLUMN_NAME)));
- res.moveToNext();
- }
- return arrayList;
+ public ArrayList<String> getAllCotacts() {
+ ArrayList<String> arrayList = new ArrayList<>();
+
+ //hp = new HashMap();
+ SQLiteDatabase db = this.getReadableDatabase();
+ Cursor res = db.rawQuery("select * from contacts", null);
+ res.moveToFirst();
+
+ try {
+ while (!res.isAfterLast()) {
+ arrayList.add(res.getString(res.getColumnIndex(CONTACTS_COLUMN_NAME)));
+ res.moveToNext();
+ }
+ return arrayList;
+ } finally {
+ if (res != null && !res.isClosed()) {
+ res.close();
+ }
+ }📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| public ArrayList<String> getAllCotacts() { | |
| ArrayList<String> arrayList = new ArrayList<>(); | |
| //hp = new HashMap(); | |
| SQLiteDatabase db = this.getReadableDatabase(); | |
| Cursor res = db.rawQuery("select * from contacts", null); | |
| res.moveToFirst(); | |
| while (!res.isAfterLast()) { | |
| arrayList.add(res.getString(res.getColumnIndex(CONTACTS_COLUMN_NAME))); | |
| res.moveToNext(); | |
| } | |
| return arrayList; | |
| public ArrayList<String> getAllCotacts() { | |
| ArrayList<String> arrayList = new ArrayList<>(); | |
| //hp = new HashMap(); | |
| SQLiteDatabase db = this.getReadableDatabase(); | |
| Cursor res = db.rawQuery("select * from contacts", null); | |
| res.moveToFirst(); | |
| try { | |
| while (!res.isAfterLast()) { | |
| arrayList.add(res.getString(res.getColumnIndex(CONTACTS_COLUMN_NAME))); | |
| res.moveToNext(); | |
| } | |
| return arrayList; | |
| } finally { | |
| if (res != null && !res.isClosed()) { | |
| res.close(); | |
| } | |
| } |
| public int count() { | ||
| SQLiteDatabase db = getReadableDatabase(); | ||
| Cursor cursor = db.rawQuery("select * from contacts", null); | ||
| if (cursor != null && cursor.getCount() > 0) { | ||
| cursor.moveToFirst(); | ||
| return cursor.getInt(0); | ||
| } else { | ||
| return 0; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Critical Logic Error in count() Method.
The count() method returns the value of the first column instead of the actual row count, which will return incorrect data and cause application logic failures.
Current Code (Diff):
- public int count() {
- SQLiteDatabase db = getReadableDatabase();
- Cursor cursor = db.rawQuery("select * from contacts", null);
- if (cursor != null && cursor.getCount() > 0) {
- cursor.moveToFirst();
- return cursor.getInt(0);
- } else {
- return 0;
- }
- }
+ public int count() {
+ SQLiteDatabase db = getReadableDatabase();
+ Cursor cursor = db.rawQuery("select * from contacts", null);
+ try {
+ return cursor != null ? cursor.getCount() : 0;
+ } finally {
+ if (cursor != null && !cursor.isClosed()) {
+ cursor.close();
+ }
+ }
+ }📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| public int count() { | |
| SQLiteDatabase db = getReadableDatabase(); | |
| Cursor cursor = db.rawQuery("select * from contacts", null); | |
| if (cursor != null && cursor.getCount() > 0) { | |
| cursor.moveToFirst(); | |
| return cursor.getInt(0); | |
| } else { | |
| return 0; | |
| } | |
| public int count() { | |
| SQLiteDatabase db = getReadableDatabase(); | |
| Cursor cursor = db.rawQuery("select * from contacts", null); | |
| try { | |
| return cursor != null ? cursor.getCount() : 0; | |
| } finally { | |
| if (cursor != null && !cursor.isClosed()) { | |
| cursor.close(); | |
| } | |
| } |
| Cursor cursor = db.rawQuery("select COUNT(*) from " + TEST_TABLE_NAME, null); | ||
| if (cursor != null && cursor.getCount() > 0) { | ||
| cursor.moveToFirst(); | ||
| return cursor.getInt(0); | ||
| } else { | ||
| return 0; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Resource Leak: Cursor is never closed.
The cursor in count() method is never closed, which will lead to memory leaks and resource exhaustion in production environments.
Current Code (Diff):
- Cursor cursor = db.rawQuery("select COUNT(*) from " + TEST_TABLE_NAME, null);
- if (cursor != null && cursor.getCount() > 0) {
- cursor.moveToFirst();
- return cursor.getInt(0);
- } else {
- return 0;
- }
+ Cursor cursor = db.rawQuery("select COUNT(*) from " + TEST_TABLE_NAME, null);
+ try {
+ if (cursor != null && cursor.getCount() > 0) {
+ cursor.moveToFirst();
+ return cursor.getInt(0);
+ } else {
+ return 0;
+ }
+ } finally {
+ if (cursor != null) {
+ cursor.close();
+ }
+ }📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| Cursor cursor = db.rawQuery("select COUNT(*) from " + TEST_TABLE_NAME, null); | |
| if (cursor != null && cursor.getCount() > 0) { | |
| cursor.moveToFirst(); | |
| return cursor.getInt(0); | |
| } else { | |
| return 0; | |
| } | |
| Cursor cursor = db.rawQuery("select COUNT(*) from " + TEST_TABLE_NAME, null); | |
| try { | |
| if (cursor != null && cursor.getCount() > 0) { | |
| cursor.moveToFirst(); | |
| return cursor.getInt(0); | |
| } else { | |
| return 0; | |
| } | |
| } finally { | |
| if (cursor != null) { | |
| cursor.close(); | |
| } | |
| } |
| @Override | ||
| public File getDatabasePath(String name) { | ||
| File databaseDir = new File(String.format("%s/%s", getFilesDir(), ExtTestDBHelper.DIR_NAME)); | ||
| databaseDir.mkdirs(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Critical Directory Creation: Missing error handling for mkdirs().
The code doesn't check if mkdirs() succeeded, which could lead to database failures or application crashes if directories can't be created.
Current Code (Diff):
- databaseDir.mkdirs();
+ boolean dirCreated = databaseDir.mkdirs();
+ if (!dirCreated && !databaseDir.exists()) {
+ throw new IllegalStateException("Unable to create database directory");
+ }📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| databaseDir.mkdirs(); | |
| boolean dirCreated = databaseDir.mkdirs(); | |
| if (!dirCreated && !databaseDir.exists()) { | |
| throw new IllegalStateException("Unable to create database directory"); | |
| } |
|
|
||
| import android.arch.persistence.room.Database; | ||
| import android.arch.persistence.room.RoomDatabase; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Missing User class import.
The code references User.class but doesn't import it, which will cause a compilation failure.
Current Code (Diff):
- import android.arch.persistence.room.RoomDatabase;
+ import android.arch.persistence.room.RoomDatabase;
+ import com.sample.encrypt.database.room.User;📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| import android.arch.persistence.room.RoomDatabase; | |
| import com.sample.encrypt.database.room.User; |
|
|
||
| import android.arch.persistence.room.Database; | ||
| import android.arch.persistence.room.RoomDatabase; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Missing UserDao interface import.
The method returns UserDao but there's no import for this type, which will cause a compilation failure.
Current Code (Diff):
- import android.arch.persistence.room.RoomDatabase;
+ import android.arch.persistence.room.RoomDatabase;
+ import com.sample.encrypt.database.room.UserDao;📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| import android.arch.persistence.room.RoomDatabase; | |
| import com.sample.encrypt.database.room.UserDao; |
|
|
||
| public UserDBHelper(Context context) { | ||
| appDatabase = Room.databaseBuilder(context, AppDatabase.class, "User.db") | ||
| .allowMainThreadQueries() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚡ Performance Issue
UI Thread Blocking Database Operations.
Using allowMainThreadQueries() permits database operations on the main UI thread which will cause ANRs (Application Not Responding) when accessing large datasets.
Current Code (Diff):
- .allowMainThreadQueries()
.build();📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| .allowMainThreadQueries() | |
| .build(); |
| .allowMainThreadQueries() | ||
| .build(); | ||
| inMemoryAppDatabase = Room.inMemoryDatabaseBuilder(context, AppDatabase.class) | ||
| .allowMainThreadQueries() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚡ Performance Issue
UI Thread Blocking Database Operations.
Using allowMainThreadQueries() permits database operations on the main UI thread which will cause ANRs (Application Not Responding) when accessing large datasets.
Current Code (Diff):
- .allowMainThreadQueries()
.build();📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| .allowMainThreadQueries() | |
| .build(); |
| } | ||
|
|
||
| public int count() { | ||
| return appDatabase.userDao().loadAll().size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚡ Performance Issue
Inefficient Database Count Operation.
Loading all records into memory just to count them will cause excessive memory usage and potential OOM errors with large datasets.
Current Code (Diff):
- return appDatabase.userDao().loadAll().size();
+ return appDatabase.userDao().count();📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| return appDatabase.userDao().loadAll().size(); | |
| return appDatabase.userDao().count(); |
| } | ||
|
|
||
| public int countInMemory() { | ||
| return inMemoryAppDatabase.userDao().loadAll().size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚡ Performance Issue
Inefficient Database Count Operation.
Loading all records into memory just to count them will cause excessive memory usage and potential OOM errors with large datasets.
Current Code (Diff):
- return inMemoryAppDatabase.userDao().loadAll().size();
+ return inMemoryAppDatabase.userDao().count();📝 Committable suggestion
‼️ IMPORTANT
Trust, but verify! 🕵️ Please review this suggestion with the care of a code archaeologist - check that it perfectly replaces the highlighted code, preserves all lines, maintains proper indentation, and won't break anything in production. Your future self will thank you! 🚀
| return inMemoryAppDatabase.userDao().loadAll().size(); | |
| return inMemoryAppDatabase.userDao().count(); |
| } | ||
|
|
||
| public SupportSQLiteDatabase getInMemoryDatabase() { | ||
| return inMemoryAppDatabase.getOpenHelper().getWritableDatabase(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 Correctness Issue
Exposing Raw SQLite Database.
Providing direct access to the underlying SQLiteDatabase breaks Room's abstraction layer and may lead to database corruption if misused.
PR Summary
Database Management Implementation
Overview
Implementation of database management functionality using both SQLite and Room persistence frameworks, providing CRUD operations for various data types including cars, contacts, and users.
Change Types
Affected Modules
src/main/java/com/sample/encrypt/database/CarDBHelper.javasrc/main/java/com/sample/encrypt/database/ContactDBHelper.javasrc/main/java/com/sample/encrypt/database/ExtTestDBHelper.javasrc/main/java/com/sample/encrypt/database/room/AppDatabase.javasrc/main/java/com/sample/encrypt/database/room/UserDBHelper.javasrc/main/java/com/sample/MainActivity.javaNotes for Reviewers