Skip to content

Add POST NOTIFY +fix 3 deprecated libraries

  • Added LeakCanary to Debug builds (only). SEE COMMENTS
  • Add POST NOTIFICATION permission
  • Use ContextCompat to supports "getColor" both backwards and forwards.
  • Use "ViewmodelProvider" over "ViewModelProviders" to support backwards and forwards.
  • Use "Dequeue" over "Stack" which is deprecated.
  • Fix several static option causing a memory leak, READ COMMENT for more.
  • Fix various memory heap and performance related stuff
  • Update "progress-dialog" library
  • Update "joda-time" library

This PR fixes many of the deprecated, old libraries but the biggest challenge is a head, Changing the "AsyncTask" with e.g "Executor".

[There are several reason that Deque is better than stack for implementation:

Deque is an interface and stack is a class: In class creation it is better to implement an interface than extend a class because after extending you cannot extend another class, you can only implement an interface in the other hand when you implement an interface you can extend a class and also implement another interfaces.

Synchronization: Because stack class is a subclass of the vector class which is asynchronized therefor stack is too But Deque is not. So if there is no need for synchronization then for better performance we should use Deque.

Deque‘s iterator works the way we expect for a stack: iteration in a stack is bottom to top (FIFO (First In First Out)). But iteration in a Deque is top to bottom (LIFO (Last In First Out)).

Stack isn't truly LIFO: We know that stack is a subclass of the vector class so we can access to elements by their indexes which is against LIFO contract.]

Edited by Christian Bremvåg

Merge request reports