Files
John Andrew CamuandGoooler be8bb75d95 Introduce Lawnchair Advance Search (#3785)
* Introduce Lawnchair Device Search

Initial Implementation device search in Lawnchair:
Enables search functionality across Files, Contacts, and Suggestions on the Startpage.

* Apply reviewed suggestions by @Gooler

- Use retrofit for fetching suggestions

* use kotlinxJson

* Separate suggestion

* Apply changes code refine @Goooler

* Fix styling

* Implement MIME Type Compat

* Apply suggestion changes by @suphon-t

* Apply suggestion changes by @SuperDragonXD

* Cleanup

* Remodel FileInfo

* Private retrofit

* Clean up SearchRequest

* Add FileExtensions

* Optimize file search method

* Fix style

* Rename

* Optimize file opening

* Add type checkers

* Reformat AVDs

* Fixed crash java.lang.ClassCastException

error logs : https://katb.in/abahivihaqu

* More fixes

* Surround try catch to give proper error logs

java.lang.NullPointerException
	at app.lawnchair.search.data.SearchRequestKt$findContactsByName$2.invokeSuspend(SearchRequest.kt:124)
	at app.lawnchair.search.data.SearchRequestKt$findContactsByName$2.invoke(Unknown Source:8)
	at app.lawnchair.search.data.SearchRequestKt$findContactsByName$2.invoke(Unknown Source:4)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
	at app.lawnchair.search.data.SearchRequestKt.findContactsByName(SearchRequest.kt:68)
	at app.lawnchair.search.LawnchairSearchAlgorithm$performDeviceWideSearch$2.invokeSuspend(LawnchairSearchAlgorithm.kt:152)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

* Fixed opened file instead of just redirect to file manager

* Fixed crash opening folder

* Initial implementation callback

* Add max results option for files, suggestion and people

* Add initial settings entry

* Properly use folder mimetype

* Fixed target icon styling

* Cleanups

* Revert

* Fixes

* Apply suggestions by @Goooler

* Fixed crash on external storage directory

* Implement history keyword using built-in SearchRecentSuggestionsProvider

* misc fixes

* Add timeout 3 seconds

- As we don't how long gonna take to receive response in startpage

* Misc fixes

* Misc fixes

---------

Co-authored-by: Goooler <wangzongler@gmail.com>
2023-12-09 08:13:28 +08:00

12 lines
3.1 KiB
XML

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:tint="?android:attr/textColorPrimary"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#000000"
android:pathData="M13,3L13.707,2.293C13.52,2.105 13.265,2 13,2V3ZM19,9H20C20,8.735 19.895,8.48 19.707,8.293L19,9ZM13.109,8.454L14,8V8L13.109,8.454ZM13.546,8.891L14,8L13.546,8.891ZM10,13C10,12.448 9.552,12 9,12C8.448,12 8,12.448 8,13H10ZM8,16C8,16.552 8.448,17 9,17C9.552,17 10,16.552 10,16H8ZM8.5,9C7.948,9 7.5,9.448 7.5,10C7.5,10.552 7.948,11 8.5,11V9ZM9.5,11C10.052,11 10.5,10.552 10.5,10C10.5,9.448 10.052,9 9.5,9V11ZM8.5,6C7.948,6 7.5,6.448 7.5,7C7.5,7.552 7.948,8 8.5,8V6ZM9.5,8C10.052,8 10.5,7.552 10.5,7C10.5,6.448 10.052,6 9.5,6V8ZM17.908,20.782L17.454,19.891L17.454,19.891L17.908,20.782ZM18.782,19.908L19.673,20.362L18.782,19.908ZM5.218,19.908L4.327,20.362H4.327L5.218,19.908ZM6.092,20.782L6.546,19.891L6.546,19.891L6.092,20.782ZM6.092,3.218L5.638,2.327L5.638,2.327L6.092,3.218ZM5.218,4.092L4.327,3.638L4.327,3.638L5.218,4.092ZM12,3V7.4H14V3H12ZM14.6,10H19V8H14.6V10ZM12,7.4C12,7.664 11.999,7.921 12.017,8.138C12.036,8.367 12.08,8.637 12.218,8.908L14,8C14.029,8.058 14.019,8.08 14.01,7.975C14.001,7.859 14,7.697 14,7.4H12ZM14.6,8C14.304,8 14.141,7.999 14.025,7.99C13.92,7.981 13.943,7.971 14,8L13.092,9.782C13.363,9.92 13.633,9.964 13.862,9.983C14.079,10.001 14.337,10 14.6,10V8ZM12.218,8.908C12.41,9.284 12.716,9.59 13.092,9.782L14,8V8L12.218,8.908ZM8,13V16H10V13H8ZM8.5,11H9.5V9H8.5V11ZM8.5,8H9.5V6H8.5V8ZM13,2H8.2V4H13V2ZM4,6.2V17.8H6V6.2H4ZM8.2,22H15.8V20H8.2V22ZM20,17.8V9H18V17.8H20ZM19.707,8.293L13.707,2.293L12.293,3.707L18.293,9.707L19.707,8.293ZM15.8,22C16.344,22 16.811,22.001 17.195,21.969C17.59,21.937 17.984,21.866 18.362,21.673L17.454,19.891C17.404,19.916 17.304,19.954 17.032,19.976C16.749,19.999 16.377,20 15.8,20V22ZM18,17.8C18,18.377 17.999,18.749 17.976,19.032C17.954,19.304 17.916,19.404 17.891,19.454L19.673,20.362C19.866,19.984 19.937,19.59 19.969,19.195C20.001,18.811 20,18.344 20,17.8H18ZM18.362,21.673C18.927,21.385 19.385,20.927 19.673,20.362L17.891,19.454C17.795,19.642 17.642,19.795 17.454,19.891L18.362,21.673ZM4,17.8C4,18.344 3.999,18.811 4.031,19.195C4.063,19.59 4.134,19.984 4.327,20.362L6.109,19.454C6.084,19.404 6.046,19.304 6.024,19.032C6.001,18.749 6,18.377 6,17.8H4ZM8.2,20C7.623,20 7.251,19.999 6.968,19.976C6.696,19.954 6.595,19.916 6.546,19.891L5.638,21.673C6.016,21.866 6.41,21.937 6.805,21.969C7.189,22.001 7.656,22 8.2,22V20ZM4.327,20.362C4.615,20.927 5.074,21.385 5.638,21.673L6.546,19.891C6.358,19.795 6.205,19.642 6.109,19.454L4.327,20.362ZM8.2,2C7.656,2 7.189,1.999 6.805,2.031C6.41,2.063 6.016,2.134 5.638,2.327L6.546,4.109C6.595,4.084 6.696,4.046 6.968,4.024C7.251,4.001 7.623,4 8.2,4V2ZM6,6.2C6,5.623 6.001,5.251 6.024,4.968C6.046,4.696 6.084,4.595 6.109,4.546L4.327,3.638C4.134,4.016 4.063,4.41 4.031,4.805C3.999,5.189 4,5.656 4,6.2H6ZM5.638,2.327C5.074,2.615 4.615,3.074 4.327,3.638L6.109,4.546C6.205,4.358 6.358,4.205 6.546,4.109L5.638,2.327Z" />
</vector>