Commit Graph

468 Commits

Author SHA1 Message Date
Lorenzo Blasa
1b2f875cc6 Scheduler
Summary:
Add a simple scheduler which operates in the following way.

There are two type of tasks: main, background.

The main task will run on the main thread whilst the background task will run on a background thread.

The main task will be executing at a fixed internal whereas the background task will get queued on demand but can effectively consume what was produced by the main task at its own rate.

Reviewed By: LukeDefeo

Differential Revision: D38975283

fbshipit-source-id: 0633385d2938705a16f5fc75a28cad067e4a8e55
2022-08-24 09:03:39 -07:00
Lorenzo Blasa
5aff69d1c9 traversal
Summary: This adds a simple traversal to the UI. As it stands, it will most likely be updated in future iterations.

Reviewed By: LukeDefeo

Differential Revision: D38907292

fbshipit-source-id: 98cea1f971a4ef37ba2d1c75b882dd44df29bb3a
2022-08-23 05:45:29 -07:00
Luke De Feo
f1e80b18b1 Basic desktop plugin
Summary:
Scaffolded desktop UI for UI debugger
I changed getroot from an rpc call to an event sent on connect. The root should never change as its the application object.

Reviewed By: lblasa

Differential Revision: D38866008

fbshipit-source-id: ca0f1908bedb643238f11ed796922e3359619167
2022-08-22 03:02:53 -07:00
Lorenzo Blasa
6adf1d666f Descriptors
Summary:
Introducing descriptors. Taken from the existing inspector, refreshed with a few things from Stetho, and translated to Kotlin.

Note: doesn't use FlipperObject or FlipperArray.

This is a very rough draft for them all, but can be used as basis for experimentation.

Reviewed By: LukeDefeo

Differential Revision: D38860763

fbshipit-source-id: 9f6bf4ad0e61fc40b0a773dfb8bfa80b1f397b3a
2022-08-19 08:47:58 -07:00
Lorenzo Blasa
b5bdd56d2c Application to instantiate Plugin
Summary:
Plugin needs both the Context and Application. Application is Context. Pass Application.

:)

Reviewed By: LukeDefeo

Differential Revision: D38831033

fbshipit-source-id: ff12a8ddc875fb54389e591a1c1c9febedb3aa37
2022-08-19 08:47:58 -07:00
Adam Ernst
0aa1f14536 Remove @scarf-generated from xplat/sonar
Summary: See D38829381.

Reviewed By: d16r

Differential Revision: D38837720

fbshipit-source-id: c576e16ebb5a0afd5e6dfc71adb3cf0c2361e9a3
2022-08-19 05:54:13 -07:00
Lorenzo Blasa
dc28e2ad45 ApplicationRef
Summary:
Introduce ApplicationRef which holds a reference to Application. It exposes a few utility methods to get view roots and activities.

ApplicationInspector has a few template methods for useful things which are not used in this diff and most likely will either be moved/deleted/changed on the final implementation.

Reviewed By: LukeDefeo

Differential Revision: D38829523

fbshipit-source-id: b8aeb133dceb3af42b5f7d6851ef531d35fc7d69
2022-08-19 05:08:49 -07:00
Lorenzo Blasa
769a1844b7 Common types
Summary:
EnumMapping and InspectableValue taken from the original 'inspector' plugin but translated to Kotlin.

Accumulator is just a Map<String, Any>

Reviewed By: LukeDefeo

Differential Revision: D38823678

fbshipit-source-id: 6af395cab2e3e6930575eb63d22d660dab962fde
2022-08-19 03:39:06 -07:00
Lorenzo Blasa
d1c06c9c46 Do not overload send as this causes issues with folly::dynamic
Summary:
folly::dynamic, std::string, implicit constructors and method overloading is not a good combination.

This renames the send method to sendRaw as to avoid issues with existing plugins currently sending string params.

Reviewed By: mweststrate

Differential Revision: D38827539

fbshipit-source-id: 653f62e41ebfbe93d1af25f39c81f6b05bf84cb4
2022-08-18 09:39:42 -07:00
Lorenzo Blasa
543ea489db Stetho-bits
Summary:
^
From: https://github.com/facebook/stetho

The copies used by the original plugin were located at: https://www.internalfb.com/code/fbsource/[a8a0c1be09a9]/xplat/sonar/android/src/main/java/com/facebook/flipper/plugins/inspector/descriptors/utils/stethocopies/

In addition, copies were translated to Kotlin, and adjusted accordingly.

Reviewed By: LukeDefeo

Differential Revision: D38783216

fbshipit-source-id: 2375bd94d333a2edb6156602b47dee32c83472ff
2022-08-18 05:16:38 -07:00
Lorenzo Blasa
ece57689e5 Move to public plugins location
Summary:
^

So far, we had the 'uidebugger' plugin as a meta-only plugin.

This change moves the plugin to OSS space as it will ultimately be its right place.

It will also make it easier to iterate on it.

The plugin itself is not ready for consumption but at no point we are documenting or integrating it with our samples.

Reviewed By: passy

Differential Revision: D38742336

fbshipit-source-id: 5cf124722fa7ba75ee9b998c507bfdfb2e4782c1
2022-08-18 05:16:38 -07:00
Lorenzo Blasa
c2ed2484d9 Expose a send method with a string params
Summary:
For C++, folly::dynamic is used throughout.

On iOS and Android though, Flipper goes through multiple conversions to get to a folly::dynamic only to ultimately obtain a JSON string from it.

Let's take a look at Android:

There are multiple types like FlipperObject, FlipperArray that wrap around a JSONObject.

When data needs to be sent:
1. The JSONObject is asked for its string representation.
2. The string representation is then parsed by folly to construct the folly::dynamic instance.
3. The step above involves an extra boundary cross through JNI.
4. Ultimately, a socket or ws connection does not understand folly::dynamic so we then get a JSON string representation from it.
5. Data is sent.

As described above, for big enough objects, this represents an issue.

So, the idea of this change, is to allow plugins to send a JSON string instead. This will remove a few serialisation/deserialisation steps from the process.

*Note: this API is not currently used by anything so there's no impact to existing plugins.*

Changelog: expose a send method that accept a string as params

Reviewed By: LukeDefeo

Differential Revision: D38741582

fbshipit-source-id: 78e0acd80fc8c97378ee986cbaf377078996ed60
2022-08-17 09:18:20 -07:00
Zac Sweers
64c32f62b1 Tag sockets in FlipperSocketImpl (#3928)
Summary:
Resolves https://github.com/facebook/flipper/issues/3926. Open to suggestions on the tag value, just sort of picked one that could be pointed to for anyone that wants to track these in their apps.

## Changelog

Tag sockets used by Flipper to fix strict mode warnings about untagged sockets.

Pull Request resolved: https://github.com/facebook/flipper/pull/3928

Test Plan:
Edit FlipperSampleApplication.java with the following:

```
public class FlipperSampleApplication extends Application {
  Override
  public void onCreate() {

    StrictMode.setThreadPolicy(
            new StrictMode.ThreadPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .build()
    );
    StrictMode.setVmPolicy(
            new StrictMode.VmPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .build()
    );
...
```

That will enable strict mode. Now build/launch the sample application.

Use adb logcat to inspect warnings:

```
 adb logcat -s StrictMode
```

Without tagging the socket, the following warning should be observed:

```
D/StrictMode: StrictMode policy violation: android.os.strictmode.UntaggedSocketViolation: Untagged socket detected; use TrafficStats.setTrafficStatsTag() to track all network usage
```

After applying the fix, that warning should go away.

Reviewed By: lblasa

Differential Revision: D38280819

Pulled By: passy

fbshipit-source-id: 0c841b13237cbcb0ff8b8226fb44655a74b775c6
2022-08-01 08:34:00 -07:00
Luke De Feo
f72406b06c Ensure that highlight always responds to prevent timeouts
Summary: In a previous diff D32278523 (8764da7c0b) The desktop request was changed from send to call. Call expects a response and not all code paths return a response. Most calls to set highlight are timing out.

Reviewed By: mweststrate

Differential Revision: D38074704

fbshipit-source-id: 6e85416d6b6470efaa177ad1b74420c8237366d5
2022-07-25 14:51:41 -07:00
Lorenzo Blasa
e44cad5e99 Partially remove dependency on folly async
Summary:
This change isolates the usage of folly async from Flipper. Is now self-contained in Flipper Folly schedulers.

Users of Flipper can decide not to use the types defined in that header and implement their own.

NOTE: changes are minimal, we are just replacing direct calls to folly event base with a scheduler which simply relays this on to folly.

Reviewed By: fabiomassimo

Differential Revision: D36626483

fbshipit-source-id: add0241caf4af0aa5c3b5c2e7efc2e725f5400ab
2022-05-25 15:58:05 -07:00
Michel Weststrate
18d64f9631 Fix NPE during search
Summary:
`getChilAt` can return `null` (see also line 671), probably when the UI changes during the inspection process. Added a null check that should protect against the failure reported in P501013941

Changelog: Fixed NPE during search in layout plugin (Android)

Reviewed By: lblasa

Differential Revision: D36369508

fbshipit-source-id: 1f066d1a73bdfe875d66f7200ded0d0776af8321
2022-05-13 07:08:52 -07:00
Billy Ng
3804ccf898 Revert D36052198: Partially remove dependency on folly async
Differential Revision:
D36052198 (ade685c621)

Original commit changeset: 170d64a324a1

Original Phabricator Diff: D36052198 (ade685c621)

fbshipit-source-id: 69d2b18e70a6267667432d6ed9dc1c5bc545b417
2022-05-12 18:47:41 -07:00
Lorenzo Blasa
ade685c621 Partially remove dependency on folly async
Summary:
This change isolates the usage of folly async from Flipper. Is now self-contained in Flipper Folly schedulers.

Users of Flipper can decide not to use the types defined in that header and implement their own.

NOTE: changes are minimal, we are just replacing direct calls to folly event base with a scheduler which simply relays this on to folly.

Reviewed By: fabiomassimo

Differential Revision: D36052198

fbshipit-source-id: 170d64a324a1f1f100224e2622a59cbac3c8b642
2022-05-12 17:56:17 -07:00
Yizhe Chen
bf988659cf allow getFlipperPortsPropValue to do disk read as it's a debug tool
Summary:
`AndroidFlipperClient.java` is a debug tool, and it has some strict mode violation.

We should exempt them to reduce noise on logcat.

- 1.

```
                         D  StrictMode policy violation; ~duration=43 ms: android.os.strictmode.DiskReadViolation
                         D      at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1596)
                         D      at libcore.io.BlockGuardOs.access(BlockGuardOs.java:71)
                         D      at libcore.io.ForwardingOs.access(ForwardingOs.java:72)
                         D      at android.app.ActivityThread$AndroidOs.access(ActivityThread.java:7578)
                         D      at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:281)
                         D      at java.io.File.exists(File.java:815)
                         D      at android.app.ContextImpl.ensurePrivateDirExists(ContextImpl.java:681)
                         D      at android.app.ContextImpl.ensurePrivateDirExists(ContextImpl.java:672)
                         D      at android.app.ContextImpl.getFilesDir(ContextImpl.java:717)
                         D      at android.content.ContextWrapper.getFilesDir(ContextWrapper.java:253)
                         D      at com.facebook.flipper.android.AndroidFlipperClient.getInstance(AndroidFlipperClient.java:55)
```

- 2.
```
                         D  StrictMode policy violation; ~duration=46 ms: android.os.strictmode.DiskReadViolation
                         D      at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1596)
                         D      at libcore.io.BlockGuardOs.read(BlockGuardOs.java:304)
                         D      at libcore.io.ForwardingOs.read(ForwardingOs.java:176)
                         D      at libcore.io.IoBridge.read(IoBridge.java:509)
                         D      at java.io.FileInputStream.read(FileInputStream.java:320)
                         D      at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
                         D      at java.io.BufferedInputStream.read(BufferedInputStream.java:347)
                         D      at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:291)
                         D      at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:355)
                         D      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:181)
                         D      at java.io.InputStreamReader.read(InputStreamReader.java:184)
                         D      at java.io.BufferedReader.fill(BufferedReader.java:172)
                         D      at java.io.BufferedReader.readLine(BufferedReader.java:335)
                         D      at java.io.BufferedReader.readLine(BufferedReader.java:400)
                         D      at com.facebook.flipper.android.FlipperProps.getFlipperPortsPropValue(FlipperProps.java:92)
                         D      at com.facebook.flipper.android.FlipperProps.getFlipperDefaultAltPortsPropValue(FlipperProps.java:76)
                         D      at com.facebook.flipper.android.FlipperProps.getAltInsecurePort(FlipperProps.java:37)
                         D      at com.facebook.flipper.android.AndroidFlipperClient.getInstance(AndroidFlipperClient.java:47)
```

Reviewed By: nikoant

Differential Revision: D35784406

fbshipit-source-id: b55ce458e04a44d98565972132707a392d71281c
2022-04-23 12:17:28 -07:00
Lorenzo Blasa
cfdb363ab4 UI preview of selected element
Summary:
This is a prototype for view preview within Flipper.
If enabled, a preview of the selected element is rendered in the attribute inspector.

Changelog: Add view preview/snapshot for the Layout plugin on Android.

Reviewed By: mweststrate

Differential Revision: D35009246

fbshipit-source-id: a442ff7f57093f463016811f0f451b52f579b448
2022-03-28 06:51:53 -07:00
Hoa Dinh
59db6c63b6 Make msys database available in Flipper Database plugin
Summary:
DefaultSqliteDatabaseProvider only list databases in the "files" folder & "databases" folder:
/data/user/0/com.facebook.wakizashi/files/
/data/user/0/com.facebook.wakizashi/databases/

On Messenger in Blue, msys database is located in the folder /data/data/com.facebook.wakizashi/app_mib_msys and therefore is not found automatically.

This patch makes the Database Flipper dolphin see the msys database by also listing the databases referred via extraDatabaseFiles.

Differential Revision: D35041276

fbshipit-source-id: e91b95fdc3bb31d414087cdea4a6825a98f3210a
2022-03-23 08:11:46 -07:00
Lorenzo Blasa
c2f3607d03 remove rsocket fallback for mobile clients
Summary:
^
Note: this is already a working case. The difference is that if we are unable to establish a socket connection, we will not attempt to create one using rsocket.

Changelog: Removes rsocket-fallback for mobile clients

Reviewed By: nikoant

Differential Revision: D33655430

fbshipit-source-id: cb6f752f2d1354ab46d011b1f19c89520e1e7dd3
2022-02-15 04:56:17 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Lorenzo Blasa
2d89c2f3eb Close resource as we cannot inline (#3125)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/3125

Better stream creation and disposal.

A report was generated with the following error:
StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.

Changelog: Close input stream after use which was causing strict mode policy violation crashes and possibly leaking resources.

Reviewed By: passy

Differential Revision: D32830690

fbshipit-source-id: de3ffaf1b600590c4060a381fae66e73e08745cb
2021-12-03 12:58:44 -08:00
Lorenzo Blasa
6a4a867f74 Enable WebSockets for Android
Summary: This change effectively prioritises WebSocket over RSocket connections for Android.

Reviewed By: passy

Differential Revision: D32490095

fbshipit-source-id: 836438970f0668521ca6e7fab6c106e77f951652
2021-12-02 02:28:50 -08:00
Lorenzo Blasa
60de2bc147 Addresses a few issues raised during tests
Summary:
This change addresses a warning and provides a safer way of resolving the connection promise.

Also, fixes an issue whereas the websocket connection was not being reestablished as the listener is not notified when we manually disconnect.

Reviewed By: passy

Differential Revision: D32591859

fbshipit-source-id: 78ce4eac5414a924217867f2f47b04829da3b705
2021-11-29 03:50:08 -08:00
Michel Weststrate
9d74728dfe Harden reflection
Summary:
Changelog: Fix theme reflection logging lot of errors if the APIs aren't accessible, see #1736

Harden theme reflection based on the comments in https://github.com/facebook/flipper/issues/1736

Reviewed By: jknoxville

Differential Revision: D32202434

fbshipit-source-id: 99178df56c91715f9eff1e4764ebc55b29ecb6f3
2021-11-10 04:34:43 -08:00
Michel Weststrate
750f26eaa3 Fix potential NPE in Layout Inspector
Summary: Fixed NPE linked by task. From the code, that stuff should never be null, unless there is some threading / concurrency issue, which there apparently is. In that case, failing with a warning is imho a bit more elegant than raising exceptions from a debugging tool

Reviewed By: lblasa

Differential Revision: D32278044

fbshipit-source-id: 710fcdcfe458f33bbb806d9f2f1b9352252eedec
2021-11-09 06:53:00 -08:00
Lorenzo Blasa
a935ab8a6c Android Web Socket (#2978)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/2978

Flipper Android WebSocket provider and socket implementation

Reviewed By: ldelgadoj

Differential Revision: D31683510

fbshipit-source-id: d553a7fdee9451da742e9ea3e6e5b6a2c9417579
2021-11-08 09:22:48 -08:00
Chaiwat Ekkaewnumchai
d5e4b0c360 Clear Activity after Being Destroyed
Summary:
[Reported in the support request](https://fb.workplace.com/groups/flippersupport/posts/1237466586733997/), Activity object is held by ObjectTracker even though the Activity is destroyed. This, in this case, caused strict mode in Portal app to forcibly terminate.

This diff tried to remove activities from the reference holder.

Reviewed By: passy

Differential Revision: D31828290

fbshipit-source-id: aad7e8d7ba14069f8dd7c654a3604d482d85e110
2021-10-26 03:39:41 -07:00
Artem Kholodnyi
11e7bbf9cf Fix the observer effect in Images Flipper plugin
Reviewed By: oprisnik, wizh

Differential Revision: D31379424

fbshipit-source-id: 96040dd0d37442d80a660814bd356571d075aa2c
2021-10-12 09:15:53 -07:00
kodak
b43dde8a6a Display AccessibilityNodeInfoCompat.isScreenReaderFocusable() property (fixes #1756) (#2925)
Summary:
Add screenreader-focusable property to AccessibilityUtil#getAccessibilityNodeInfoData

The accessibility hierarchy displays various AccessibilityNodeInfo properties. However, it was missing the screenreader-focusable property.

## Changelog
Display screenreader-focusable property in the accessibility hierarchy.

Pull Request resolved: https://github.com/facebook/flipper/pull/2925

Test Plan: Test suite passes and code lints.

Reviewed By: mweststrate

Differential Revision: D31312381

Pulled By: passy

fbshipit-source-id: c5044cef6aabe5bd2d2ce5e315f5aafd6990a137
2021-10-01 08:58:23 -07:00
Michel Weststrate
07199323d1 Remove Newsfeed Story Inspector and native plugin mechanism
Summary: Changelog: The 'nativeplugins' on Android are no longer supported

Reviewed By: jknoxville

Differential Revision: D29163281

fbshipit-source-id: fb4032f240fc306608fe57479f3124d4e7a3400f
2021-06-21 05:39:26 -07:00
Andrey Petrov
69ed3b0210 Add databases under /files to the list of databases visible by default in Flipper Database Plugin
Summary: Traverse recursively the /files directory and show all databases with .db extension in Flipper. Traversal depth is limited to 5 by default for performance reasons.

Reviewed By: mweststrate

Differential Revision: D28451609

fbshipit-source-id: de27c855fee220e0b79061c9b2df1eba6f5ef2af
2021-05-17 10:47:34 -07:00
bruce3x
c946309f6a Ignore null key in shared preferences (#2146)
Summary:
SharedPreferences plugin will crash when null key fields in shared preference on Android. Null keys should be ignored.

Fixes https://github.com/facebook/flipper/issues/2078

## Changelog

- Ignore null keys in shared preferences.

Pull Request resolved: https://github.com/facebook/flipper/pull/2146

Reviewed By: mweststrate

Differential Revision: D27522356

Pulled By: passy

fbshipit-source-id: b946cd9ba2a3131b3ffab65e8949fda20a3630fc
2021-04-07 05:14:56 -07:00
Hilal Alsibai
949545a2a7 Don't skip the first theme data retrieval
Summary: Was early returning on the first attempt to load theme data, this was left over from when the the theme feature was temporarily disabled.

Reviewed By: passy

Differential Revision: D27284040

fbshipit-source-id: bb641fbe4cd9c0ea6012e89dbda67e5dd10d59bd
2021-03-24 04:33:03 -07:00
generatedunixname89002005287564
bfad9c6214 Clean up xplat/sonar/android/src/main/java/com/facebook/flipper/plugins/inspector/InspectorFlipperPlugin.java
Reviewed By: passy

Differential Revision: D26908296

fbshipit-source-id: f8e0cd4cd1d57b6b43991f4a169f36d104a3a372
2021-03-09 13:41:54 -08:00
Joshua Selbo
340a29c1d5 Add inspector descriptor for ImageView
Summary:
- Made `EnumMapping` support generic value type -  `ImageView.ScaleType` is a Java enum; the scaleType api uses this instead of int types.
- Introduce descriptor for `ImageView` and allow getting/setting scaleType.

Reviewed By: mweststrate

Differential Revision: D26092725

fbshipit-source-id: ea3a4ee036b2b808f14277387d360318b7d25824
2021-02-01 10:21:26 -08:00
Ian Childs
c85942b6b1 Move sonar robolectric tests to use binary resources
Summary: Legacy resources are deprecated, this is what we should be using

Reviewed By: jselbo

Differential Revision: D25903962

fbshipit-source-id: ffa91a3aee8956591b7daab523bda2e59fec9932
2021-01-13 14:32:56 -08:00
Andres Suarez
731e39445f Apply clang-format update fixes
Reviewed By: igorsugak

Differential Revision: D25861849

fbshipit-source-id: 840dc1061e557717c7f9ffcccbc09c24b96b78e0
2021-01-10 10:07:30 -08:00
Amir Katz
eb475e7550 creating a flag to explicitly load flipper
Summary: This change will allow loading flipper not only internal build but also in builds that explicitly turn on LOAD_FLIPPER_EXPLICIT in build config

Reviewed By: timur-valiev

Differential Revision: D25369245

fbshipit-source-id: 9f8e5c7033aa4ded6ce7bc8cc5b5c252ba65692b
2020-12-15 03:21:08 -08:00
Paco Estevez Garcia
e9dc645423 Add Android support for Timeline detail view
Summary:
This diff adds the Java classes that serialize to the data expected by the new timeline widget. See D23865369 for the JS counterpart.

Currently the Flipper plugin uses `toString` to get the wire values. I'm not feeling like using a json library or dealing with JSONObject's nonsense, so these are rolled manually for now.

Reviewed By: astreet

Differential Revision: D24254377

fbshipit-source-id: b2fc00400c40b47ac29c9b83c0b66621c3677974
2020-10-19 06:01:14 -07:00
Joshua Selbo
0b2e5f6454 Upgrade Robolectric from 4.3.1 -> 4.4
Summary: Changelog: [Internal]

Reviewed By: jiawei-lyu

Differential Revision: D23718455

fbshipit-source-id: 39c684722db1269e2179cf9680cb728be1171afb
2020-09-29 18:41:20 -07:00
Pascal Hartig
ddc9c3e243 Back out "Back out "[flipper][PR] Use interface SupportSQLiteDatabase in Android Databases Plugin""
Summary: jknoxville helped me debug this. The underlying problem was that we didn't include a dependency which is transitive in gradle land. We swallowed the exception and just returned an empty list. I left an error log in there to make future debugging easier. For reference, this was the error:

Reviewed By: cekkaewnumchai

Differential Revision: D23759727

fbshipit-source-id: 244510d2765913bf4c89458e336889c3c6838fc4
2020-09-17 10:30:16 -07:00
Pascal Hartig
bb176577e9 Back out "Use interface SupportSQLiteDatabase in Android Databases Plugin"
Summary: This broke DB opening in FB apps. Will try to fix and reland this, but need to unblock people first.

Reviewed By: cekkaewnumchai

Differential Revision: D23705962

fbshipit-source-id: 3c9ff3a74e5a6d34e6cb2c75e7e2cec749b5a60e
2020-09-15 17:05:24 -07:00
a.artikov
7a7a88bfde Use interface SupportSQLiteDatabase in Android Databases Plugin (#1196)
Summary:
This change will allow to use various SQLiteDatabase implementations: standard Android implementation, [requery/sqlite-android](https://github.com/requery/sqlite-android) and so on. See issue https://github.com/facebook/flipper/issues/1183

## Changelog
Android Databases Plugin: `SqliteDatabaseConnectionProvider` returns `SupportSQLiteDatabase` instead of `SQLiteDatabase`.

Pull Request resolved: https://github.com/facebook/flipper/pull/1196

Test Plan: Check that Databases Plugin shows correct data on the sample Android application.

Reviewed By: mweststrate

Differential Revision: D23294272

Pulled By: passy

fbshipit-source-id: c07ebeb869ab01d41281f75541cbb3411f0ebae0
2020-09-09 04:26:07 -07:00
Paco Estevez Garcia
d4d2937c80 Fix setting layoutParams fromLayout Editor
Summary:
The function `setLayoutParams` expects the values to be set to be at array position 0+, and they were on position 1+ instead.

This effectively prevented users from setting LayoutParameters.

Reviewed By: muraziz

Differential Revision: D23538531

fbshipit-source-id: cc828363ee8d7408d1df29d98c37b09893826bb1
2020-09-06 12:58:24 -07:00
Paco Estevez Garcia
842fe6df5c Add picker for ViewDescriptor
Summary: This diff uses the new picker defined in EnumMapping for regular Android View properties.

Reviewed By: muraziz

Differential Revision: D23538532

fbshipit-source-id: be5b776453e7322fb13a5f9e6a66a1f8d1243e79
2020-09-06 12:58:24 -07:00
Paco Estevez Garcia
c78bac3d90 Add picker support for EnumMapping
Summary: This diff makes EnumMapping compatible with the new Layout widget "picker"

Reviewed By: muraziz

Differential Revision: D23538548

fbshipit-source-id: 7bdb01648c1ad5e2d0d7594c98df5ed89d893702
2020-09-06 12:58:24 -07:00
Dominik Wielgórski
5b4403b400 Splitting the 'OpenInIDE' API to 'resolvePath' and 'open' APIs
Summary: Detect if resolved path is properly computed and accordingly display a success or error notification within InAppErrorReporter.

Reviewed By: arpitratan

Differential Revision: D23425001

fbshipit-source-id: 4ca903a8b9e83dc0e11bb823537f56678dd85b76
2020-09-04 08:34:04 -07:00