Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1e899dc1 authored by Gary Mai's avatar Gary Mai
Browse files

Handle revoked permissions when resuming the app (1/2)

The activities that create these fragments will request permissions
but if these fragments were created and the permissions were revoked
then Activity's super.onCreate() will recreate these fragments before
the permission activity is started, which causes a bunch of issues
since the original activity never finishes it's onCreate method so
many things aren't initialized for the fragments.
So in activities that maybe start the permission activity and have
visisble fragments, instead of returning, continue initializing
everything.
In the case of editor, not being able to select a raw contact delta
is a legit case so it should have been handled as a failure and in
general we shouldn't be attempting to bind the editors if we don't
have the permissions.

Test: Manually verified removing permissions and going back to the
app from the recent apps screen doesn't crash while viewing:
  * main list
  * groups view
  * first level suggestions
  * duplicates view
  * account view
  * editor
  * settings
  * pick group member to add view
  * pick phone numbers to send to from group
  * pick emails to send to from group

The behavior is permissions get requested and will go back to the
original activity (PeopleActivity with main list loaded or the
editor activity).

Bug: 34741297
Change-Id: Ie234b1f44e83372b9c0ad9658fa4a2e9b40572b0
parent 7826cb2f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment