Commit de9adf3
Disable Load Model button until settings change (#132)
* Initial plan
* Disable Load Model button until settings change in SettingsActivity
- Added fields to track initial values of Backend, Model, Tokenizer, Data Path, and Model Type
- Set Load Model button to disabled by default
- Added storeInitialSettings() to capture initial values on activity load
- Added hasSettingsChanged() to detect if any settings field changed
- Added updateLoadModelButtonState() to update button state based on changes
- Updated all selector dialogs (Backend, Model, Tokenizer, Data Path, Model Type) to call updateLoadModelButtonState()
- Button now only enables when user changes any of the tracked settings
Co-authored-by: psiddh <2467117+psiddh@users.noreply.github.com>
* Fix null pointer issue in hasSettingsChanged method
- Handle null values properly when comparing current and initial settings
- Convert null values to empty strings before comparison to avoid NullPointerException
Co-authored-by: psiddh <2467117+psiddh@users.noreply.github.com>
* Use Objects.equals for enum comparison to handle nulls safely
- Replace reference equality (!=) with Objects.equals() for enum comparisons
- This handles null values properly and ensures correct equality checking
- Addresses code review feedback
Co-authored-by: psiddh <2467117+psiddh@users.noreply.github.com>
* Complete implementation - all checks passed
- Code review completed and addressed
- Security scan completed with no alerts
- Implementation is ready for testing
Co-authored-by: psiddh <2467117+psiddh@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: psiddh <2467117+psiddh@users.noreply.github.com>1 parent edef966 commit de9adf3
2 files changed
Lines changed: 43 additions & 4 deletions
File tree
- cifar/android/CifarETTrainingDemo/gradle/wrapper
- llm/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo
Binary file not shown.
Lines changed: 43 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| |||
162 | 169 | | |
163 | 170 | | |
164 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
165 | 175 | | |
166 | 176 | | |
167 | 177 | | |
| |||
170 | 180 | | |
171 | 181 | | |
172 | 182 | | |
173 | | - | |
| 183 | + | |
| 184 | + | |
174 | 185 | | |
175 | 186 | | |
176 | 187 | | |
| |||
361 | 372 | | |
362 | 373 | | |
363 | 374 | | |
| 375 | + | |
364 | 376 | | |
365 | 377 | | |
366 | 378 | | |
| |||
378 | 390 | | |
379 | 391 | | |
380 | 392 | | |
381 | | - | |
| 393 | + | |
382 | 394 | | |
383 | 395 | | |
384 | 396 | | |
| |||
406 | 418 | | |
407 | 419 | | |
408 | 420 | | |
409 | | - | |
| 421 | + | |
410 | 422 | | |
411 | 423 | | |
412 | 424 | | |
| |||
449 | 461 | | |
450 | 462 | | |
451 | 463 | | |
| 464 | + | |
452 | 465 | | |
453 | 466 | | |
454 | 467 | | |
| |||
466 | 479 | | |
467 | 480 | | |
468 | 481 | | |
469 | | - | |
| 482 | + | |
470 | 483 | | |
471 | 484 | | |
472 | 485 | | |
| |||
484 | 497 | | |
485 | 498 | | |
486 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
487 | 526 | | |
488 | 527 | | |
489 | 528 | | |
| |||
0 commit comments