Skip to content

refactor: platform-neutral API cleanup - rename Android-specific symbols and remove vendor path hardcoding - #154

Open
Vinayak Katoch (quic-vkatoch) wants to merge 4 commits into
qualcomm:developmentfrom
quic-vkatoch:code-cleanup
Open

refactor: platform-neutral API cleanup - rename Android-specific symbols and remove vendor path hardcoding#154
Vinayak Katoch (quic-vkatoch) wants to merge 4 commits into
qualcomm:developmentfrom
quic-vkatoch:code-cleanup

Conversation

@quic-vkatoch

@quic-vkatoch Vinayak Katoch (quic-vkatoch) commented Mar 18, 2025

Copy link
Copy Markdown
Contributor

Remove Android-specific naming, dead code, and hardcoded paths from the fastrpc library to make it platform-neutral.

  • Rename listener_android.h/c to listener.h/c and update all symbol references throughout the codebase.
  • Replace fastrpc_android.h/c with fastrpc_platform.h/c exposing a neutral two-function API; move Android internals to file-static scope and add an LE stub in the same file.
  • Fix off-by-one OOB bounds check in fastrpc_get_property_int/string (> to >=) for the FASTRPC_BUILD_TYPE property key.
  • Remove hardcoded /vendor/dsp/ fallback paths from open_shell(); these are already covered by DEFAULT_DSP_SEARCH_PATHS at build time.
  • Fix header guard FASTRPC_ANDROID_USER_H to FASTRPC_APPS_USER_H.
  • Remove dead #if 0 blocks, stale comments, and Android-specific arrays that are no longer reachable after the platform layer refactor.

Comment thread src/fastrpc_apps_user.c
Comment thread src/adspmsgd.c Outdated
Comment thread src/fastrpc_apps_user.c Outdated
Comment thread src/fastrpc_apps_user.c Outdated
@ekanshibu

Copy link
Copy Markdown
Contributor

Please check if you can break the change into multiple commits instead of a single commit.

Comment thread src/fastrpc_log.c Outdated
@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale due to 60 days of inactivity. To prevent automatic closure in 10 days, remove the stale label or add a comment. You can reopen a closed pull request at any time.

@github-actions github-actions Bot added the Stale label Jul 15, 2025
@ekanshibu

Copy link
Copy Markdown
Contributor

Vinayak Katoch (@quic-vkatoch), can you please rebase this PR?

@quic-vkatoch

Copy link
Copy Markdown
Contributor Author

Vinayak Katoch (@quic-vkatoch), can you please rebase this PR?

Done

Comment thread src/fastrpc_log.c
Comment thread inc/AEEStdErr.h
Comment thread inc/apps_std_internal.h
Comment thread inc/fastrpc_trace.h
Comment thread src/pl_list.c
Comment thread src/Makefile.am
Comment thread src/fastrpc_apps_user.c
Comment thread src/fastrpc_apps_user.c
Comment thread src/fastrpc_log.c
@quic-vkatoch

Copy link
Copy Markdown
Contributor Author

Dmitry Baryshkov (@lumag), could you please review this PR?

Comment thread src/fastrpc_android.c Outdated
Comment thread inc/fastrpc_android.h Outdated
Comment thread inc/fastrpc_apps_user.h Outdated
Comment thread inc/fastrpc_android.h Outdated
Comment thread src/fastrpc_android.c Outdated
@quic-vkatoch

Copy link
Copy Markdown
Contributor Author

Dmitry Baryshkov (@lumag), I have addressed the comments. Could you please review it again?

Comment thread inc/fastrpc_android.h Outdated
@github-actions

Copy link
Copy Markdown

qualcomm/fastrpc.triage This pull request has been marked as stale due to 30 days of inactivity.

@github-actions github-actions Bot added the Stale label Mar 11, 2026
@quic-vkatoch Vinayak Katoch (quic-vkatoch) changed the title Refactor: Generalize Code by Moving Vendor and Android-Specific Elements refactor: replace Android-specific naming with platform-neutral API Aug 11, 2026
Rename listener_android.h/c to listener.h/c and update all symbol
references (listener_android_* to listener_*), PL_DEFINE/PL_DEP/PL_ENTRY
entries, and Makefiles.

Signed-off-by: Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
Replace fastrpc_android.h/c with fastrpc_platform.h/c exposing two
neutral functions: fastrpc_platform_get_property_int/string. Android
internals (property name table, property_get stubs) moved to file-static
scope; LE stub added in the same file under #else. Update
fastrpc_apps_user.c to include the new header unconditionally, remove
Android-specific arrays and stubs, fix an off-by-one OOB bounds check
(> to >=) in the property key range check, and update Makefiles.

Signed-off-by: Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
Remove VENDOR_DSP_LOCATION and VENDOR_DOM_LOCATION defines and the
vendor path fallback logic in open_shell(). Inline the DSP_LIBS_LOCATION
search directly into open_shell() removing the try_open_shell_file()
helper which existed solely to abstract the vendor fallbacks. The
base-name retry (fastrpc_shell without domain suffix) is preserved.
Also update two vendor-specific comments in apps_std_imp.c and remove
a dead #if 0 block.

Signed-off-by: Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
Remove stale AEE_EINVHANDLE comment, fix header guard
FASTRPC_ANDROID_USER_H to FASTRPC_APPS_USER_H, remove dead Android TODO
include block in fastrpc_trace.h, remove #if 0 log priority function in
adspmsgd_printf.c, fix "buuid" typo in fastrpc_log.c, and collapse
3-way PROPERTY_VALUE_MAX #ifdef to a single #define in fastrpc_mem.c.

Signed-off-by: Vinayak Katoch <vinayak.katoch@oss.qualcomm.com>
@quic-vkatoch Vinayak Katoch (quic-vkatoch) changed the title refactor: replace Android-specific naming with platform-neutral API refactor: platform-neutral API cleanup — rename Android-specific symbols and remove vendor path hardcoding Aug 11, 2026
@quic-vkatoch Vinayak Katoch (quic-vkatoch) changed the title refactor: platform-neutral API cleanup — rename Android-specific symbols and remove vendor path hardcoding refactor: platform-neutral API cleanup - rename Android-specific symbols and remove vendor path hardcoding Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants