Repository navigation
Dead code: remove unused entries (5 commits) - #3
Open
Avithegod2010 wants to merge 5 commits into
Open
Avithegod2010 wants to merge 5 commits into
Avithegod2010 wants to merge 5 commits into
Conversation
FloatingMenuCard and rememberHapticLongPress in ui/components/Common.kt had exactly one case-sensitive hit across all tracked files - their own declaration. rememberHapticClick (the live sibling) and LockerCard cover both use cases. No import became orphaned; all imports remain used by other declarations in the file.
launchCamera, cameraLauncher (TakePicture), and the pendingCameraFile/pendingCameraUri state had zero callers: the Add menu navigates to Routes.CAMERA, which opens SecureCameraScreen instead. Removed the now-unused Uri, FileProvider, File, Formatting, rememberLauncherForActivityResult and ActivityResultContracts imports. Proven by case-sensitive git grep across all tracked files (one hit at each definition).
LockerApp now handles duress by switching to the decoy space (producing UnlockResult.DuressUnlocked itself), so SessionManager's onDuressWipe, onDecoyReady, hasDuressPassword, setDuressPassword, clearDuressPassword and performDuressUnlock are never assigned/called; LockerApp.hasHiddenPassword is likewise replaced by the local hiddenConfigured flag. Callbacks onVaultCreated and UnlockResult.DuressUnlocked stay - both still have live producers/consumers. Proven with case-sensitive git grep over all tracked files and source review.
BiometricKeyStore.hasKey, DisguiseManager.iconFor, SavedSearches.setPinned, TransferCodec.maxCharacters, EncryptedFileStore.cachedFileExists/ cachedThumbnailPathExists and VaultRepository.findItem/allTags/setTags/ setCollectionLock each had a single case-sensitive hit repo-wide - the declaration itself. Collection locks are written via addCollection/updateCollection (EditorShared) and tags via updateItem/renameTag; ImportedFile, TrialSample, SavedSearch.pinned and the test-only audit helpers remain (they are read/used). Proof: git grep -F over every tracked file, plus a whole-repo declaration scan.
…image @string/file_provider_authority, @color/brand_blue, @color/icon_blue and the root workflow-overview.png had zero references. Callers hardcode the FileProvider authority and the icon colors as literals; git history (2089fbb added the image, 6fbd73f removed its README reference) shows it was superseded by locker-hero. Verified with case-sensitive git grep across Kotlin/XML/manifest/gradle/docs and an R.type.name / @type/name reference scan for every remaining resource.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dead-code removal found by a per-repo audit thread (free model) and verified against this repo's own checks.
Commits:
Per-repo report (removed / kept-with-reason / verification):
FloatingMenuCardandrememberHapticLongPress(ui/components/Common.kt); the orphaned inline camera path inui/screens/home/HomeScreen.kt(launchCamera,cameraLauncher,pendingCameraFile,pendingCameraUri, plus six imports that became unused) - the Add menu navigates toRoutes.CAMERA/SecureCameraScreeninstead; the orphaned duress-unlock path incore/SessionManager.kt(onDuressWipe,onDecoyReady,hasDuressPassword,setDuressPassword,clearDuressPassword,performDuressUnlock) andLockerApp.hasHiddenPassword- LockerApp's coordinator now producesUnlockResult.DuressUnlockedand uses localduressConfigured/hiddenConfiguredflags; unreferenced helpersBiometricKeyStore.hasKey,DisguiseManager.iconFor,SavedSearches.setPinned,TransferCodec.maxCharacters,EncryptedFileStore.cachedFileExists/cachedThumbnailPathExists,VaultRepository.findItem/allTags/setTags/setCollectionLock; Android resources@string/file_provider_authority,@color/brand_blue,@color/icon_blue; and the orphanedworkflow-overview.png(its README reference was removed in 6fbd73f when locker-hero replaced it). Five commits oncode-audit/locker:faed1c3,712fbfa,f119823,d28e170,2bed9db. 254 deletions, zero additions.LegacyScreenplusLegacyCard/LegacyEditorDialog(reachable fromLockerNavHostviaRoutes.LEGACY, whichLockerDrawernavigates to);UnlockResult.DuressUnlocked(still produced in LockerApp:289,364 and matched in LockScreen);SessionManager.onVaultCreated(still wired at LockerApp:109); framework callbacksPageAnalyzer.analyze(CameraXImageAnalysis.Analyzer),VaultDb.onConfigure/onUpgrade(SQLiteOpenHelper),LockerAutofillService.onFillRequest/onSaveRequest,LockerApp.onStart/onStop/onDisplayAdded/onDisplayChanged/onDisplayRemoved,ThumbnailCache.sizeOf(LruCache),AudioDetail.onIsPlayingChanged(Media3 listener); all JUnit test classes and@Testmethods (runner entry points); types used only via inference (ImportedFile,TrialSample); test-only membersPageQuad.longestEdge,PasswordAudit.expiredCount/expiringSoonCount; backup-format fieldsBackupPreview.legacyCount,BackupSummary.replaced(serialized in BackupManager);SavedSearch.pinned(read in HomeScreen:160 and CollectionsScreen:107);rememberHapticClick(many callers);importingin HomeScreen (still read by the progress indicator, so not zero-reference);proguard-rules.pro(named in build.gradle.kts while R8 is off);scripts/build-tests.ps1E: fallback (runtime filesystem check, not a constant dead branch);DEV_BUILDbuild-variant branches; all Android manifest components (system entry points) and all other resources (R.type.name/@type/namereferences verified); no commented-out block over ~10 lines and no constant-guarded dead branch found.git grep -F/git grep -wover