Giter VIP home page Giter VIP logo

android-sdk's Issues

Facelet adapter not properly synchronized with backing list in InterfacesFragment

When the hICN stack stops (eg. because of inactivity), and the user is on the Interfaces tab displaying the list of faces, the application crashes.

This is due to a clear() on the backing list without notifying about a change in dataset in InterfacesFragment.java. Some propose to notify just after the change in dataset, but the alternative (and preferred here) solution is to directly call clear() on the adapter itself, in particular for uniformity with the rest of the code (add()).

I expect the call through the adapter would solve potential race conditions between the list update and the time when the adapter is notified, as the method could take care of running everything in the UI thread. However the current code is explicitely calling those methods in the UI thread, so for safety and until confirmed, the clear() has also been moved in the UI thread. This choice is further motivated by the last change.

By default, setNotifyOnChange is true, which means the adapter takes care of calling notifyDatasetChanged after any modification. The code was thus unnecessarily calling it after adding elements, since this was redundant, but likely inserted for optimization purposes. The setNotifyOnChange has thus been set to false, and the notification is explicitely in both clear() and add(). With such delayed operations, i doubt the code could ever be safe otherwise.

Additional note: this code never clears the list of facelets unless the face manager is found in a stopped state: this is okay as soon as facelets are never removed in the face manager, which is indeed the case. A comment has been added in the file to clarify this aspect.

Error: p2psecure_socket_consumer.h and p2psecure_socket_producer.h files not found

Create a unique build chain

The verify job in GH action and the build script should be the same to avoid different outputs.
Verify jobs becomes mandatory check for PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.