soul-browser/app/smali_classes4/com
KaKi87 cc7300c16e
Add download and share buttons to PDF preview (#77)
* Add download and share buttons to in-app PDF preview.

Show share and download controls in ImageViewPdf (type 2), copying cached
preview files to the user download folder or sharing via the system sheet.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix PDF preview share/download button layout overlap.

Move share and download into the top toolbar with distinct margins so they
no longer cover the list button or sit behind the bottom page panel.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix PDF preview actions with a floating overlay toolbar.

The toolbar button approach overlapped the list control and hid download
behind the bottom panel. Attach share and download as a top-right overlay
from ImageViewPdf so they work in every viewer mode.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Insert PDF share/download into the viewer toolbar row.

Add buttons at the start of ImageViewControl's top icon bar so existing
controls shift left instead of being covered by a floating overlay.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix PDF toolbar buttons by hooking setIconType after control init.

Attach ran before ImageViewControl.s() built the toolbar, so nothing
appeared. Reuse the top-row share and download slots and shift list,
bookmark, and crop left when the PDF icon type is applied.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Put PDF share/download on the icon toolbar row, not the title bar.

Insert into ImageViewControl's rotate/brightness/crop row so existing
icons shift left while the title-row list and bookmark stay unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Place PDF share/download at the end of the icon toolbar row.

Append after rotate/brightness/crop/settings so share and download sit
on the right instead of leading the row.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Consolidate PDF preview toolbar into a single classes3 helper.

Merge PdfPreviewActions into PdfPreviewToolbar so the feature is one
hook from setIconType(2) and no classes4 additions remain.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Pass original PDF filename through preview intent for download.

Derive EXTRA_NAME from the source URL when caching network PDFs, and
ignore preview_* cache filenames when saving to the download folder.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove obsolete PdfPreviewActions.java source file.

Logic now lives in PdfPreviewToolbar after the classes4 consolidation.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Use EXTRA_NAME for PDF preview title when opening from cache path.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Keep EXTRA_NAME for PDF preview title after async path lookup.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Skip Android Emulator install in CI SDK setup.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix inverted title guards and apply EXTRA_NAME in PDF toolbar.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Prefer EXTRA_NAME in viewer title refresh for PDF previews.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Drop redundant PDF title fixes now covered by T() EXTRA_NAME.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Escape apostrophes in synced i18n strings for aapt.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Revert sync-time apostrophe escaping now fixed upstream.

The soul-browser-i18n repo quotes Bengali strings correctly and validates
resources in CI, so sync-i18n no longer needs to rewrite apostrophes.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Share PDF previews under the original filename.

Copy preview cache files to a cache path named via resolveName before
sharing, so receiving apps see the real PDF name instead of preview_*.pdf.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add PDF preview controls timeout setting.

Expose a dropdown in PDF preview settings with Disabled and the default 3-second auto-hide, persisted via PrefImage and applied through PdfPreviewToolbar.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix PDF preview settings crash by adding R$string fields.

New string resources were in strings.xml but missing from R$string.smali, causing NoSuchFieldError at runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix inverted PDF preview settings list branch.

SettingImage.D0() now shows the controls-timeout item when EXTRA_PDF_PREVIEW is set instead of the full image settings list.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Show all image settings plus controls timeout in PDF preview.

Append the PDF controls-timeout dropdown to the normal settings list when opened from PDF preview instead of replacing the list.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix PDF controls timeout dropdown not opening on tap.

Use the row anchor view when ViewHolder.D is unset and correct the inverted null check that blocked the popup menu.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix inverted anchor check for PDF controls timeout popup.

The dropdown handler exited when a valid anchor was found and passed a null ViewHolder.D to MyPopupMenu instead of the resolved anchor view.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Use bottom-only rounding on PDF controls timeout row.

The item sits below screen-off in the same section, so top corners should stay square.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Shrink controls-timeout diff by dropping compile noise.

Restore apktool-style PrefImage.smali with a minimal J pref patch, remove the debug popup anchor fallback, and stop the compile script from rewriting the whole pref class.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix PDF controls timeout dropdown after anchor cleanup regression.

Restore the u fallback anchor and correct if-eqz bail-out; the prior shrink commit used if-nez and skipped popup creation when D was set.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Reorder PDF toolbar actions to share, download, then settings.

Insert share and download before the settings icon instead of appending them after it.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 03:09:40 +02:00
..
google/mlkit/vision/common/internal Fix PDF translation stuck on "Updating the text module" (#22) 2026-08-12 16:53:38 +02:00
mycompany/app Add download and share buttons to PDF preview (#77) 2026-08-29 03:09:40 +02:00