This removes the Qt middle-man for requesting the camera permissions
and we just code this in our own Java class.
This solves the issue we observed where after the approval of the
user we didn't actually manage to start the camera on some phones.
This avoids using the Qt intermediate and just directly uses
the Android side, including some extra checks like "screen off".
Rework the various methods in a class.
This makes the various android support features be less hacky and instead
are based on a single class with Qt signals and slots.
We also remove the ping feature for checking online state, since Android
seems to throw a random exception (calling virtual method on null pointer
java.lang.String.size) somewhere in the OS libs when you call it the
second time.
This also implements the AIRPLANE_MODE_CHANGED listener to instantly turn
off internet the moment the user enables flight mode.
The power management turns off the network layer 90 seconds after
the application stops being in the foreground.
At least, that is what it is programmed to do. Unfortunately the
signals we listen to are not reliable across devices and many users
are reporting that this is triggered 90 seconds after start.
For now, turn off the saving feature in order to make sure that
the app operates normally for normal people.
In some locales the group separator is a unicode character that does not
fit in an 8 byte string, causing misrenderings.
We now assume that things fit in 16 bit characters which should fit all
living languages.
The Android system is so strict in its power management that a simple
request to have Pay run in the background at night for 20 seconds it is
required to completely turn off powermanagement for the app. An overkill
solution, but that is how it works now.
A nice history:
https://medium.com/its-tinkoff/android-background-restrictions-
b63e73fe508
Side-effect is that if the user granted the turning off of power
management we now have to add code to do it inside the app.
This commit checks when the app is hidden (screen turned off, other app
became front etc) then we wait for a timeout and then terminate
ourselves in order to avoid using more CPU.
When the user has had the screen locked long enough to make the app
lock, we just close the popup.
The unlock screen actually appears under popups (that's the concept of a
popup..) so this solves a leakage of data.
This is the only useful notification type we have today,
but at least it allows the user to explicitly go and request
notifications from the Android OS.
Use the new TextButton feature better for current setting
and make clear in the sub text which wallet this is for.
On the send tab the InstaPayConfigButton is directly next to the
default wallet, as such it may be assumed that the insta pay
text applied to the name mentioned there.
This lists the wallet here in order to make things clear and
now lists the actual limit on the right side for consistency.
This swaps the colors on the AccountHistory and ExploreModules
rounded rects in order to make the background universally the same
everywhere.
To make it work the 'light' color on the light theme had to remove
some of its contrast to the base color in order to not remove
contrast to the text.