Page MenuHomePhabricator

[native/Android] attach operations on `SecureStore` and `PlatformSpecificTools` to JVM
ClosedPublic

Authored by kamil on Jan 27 2023, 6:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 4:07 PM
Unknown Object (File)
Wed, Dec 18, 8:17 PM
Unknown Object (File)
Wed, Dec 18, 8:16 PM
Unknown Object (File)
Wed, Dec 18, 8:14 PM
Unknown Object (File)
Nov 1 2024, 5:34 AM
Unknown Object (File)
Oct 26 2024, 10:35 PM
Unknown Object (File)
Oct 26 2024, 10:35 PM
Unknown Object (File)
Oct 26 2024, 10:35 PM
Subscribers

Details

Summary

ENG-2787

  1. We should support attaching operations to JVM at very low level to make using Tools safe (without need to support this while using exact functions).
  2. There are cases in code where supporting this was omitted and could lead to problems (described in ENG-2787)

Helpful docs

Test Plan

Logout on Android app (emulator and device) and check whether works properly.
This change will not affect iOS.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jan 27 2023, 7:03 AM
kamil edited the test plan for this revision. (Show Details)
kamil added inline comments.
native/android/app/src/cpp/jniHelpers.h
32 ↗(On Diff #21462)

another option might be using inline function to shorten code, because this is simply one-line function, but looks like in codebase this pattern is preferred so sticking to this one

marcin added inline comments.
native/android/app/src/cpp/jniHelpers.h
32 ↗(On Diff #21462)

Let's name a class with a noun - not an adjective. Perhaps NativeAndroidAccessProvider could work, but up to you.

This revision is now accepted and ready to land.Jan 27 2023, 7:25 AM
This revision now requires review to proceed.Jan 27 2023, 7:27 AM
native/android/app/src/cpp/jniHelpers.h
32 ↗(On Diff #21462)

Regarding the inline, the docs https://en.cppreference.com/w/cpp/language/inline say

Since this meaning of the keyword inline is non-binding, compilers are free to use inline substitution for any function that's not marked inline, and are free to generate function calls to any function marked inline.

Additionally, for member functions https://isocpp.org/wiki/faq/inline-functions#inline-member-fns-more the inline keyword is implicit. I'm not sure how about struct.

This revision is now accepted and ready to land.Jan 31 2023, 6:03 AM

rename NativeAndroidAccessible -> NativeAndroidAccessProvider