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

Commit 6ad6b169 authored by Anna Bauza's avatar Anna Bauza
Browse files

Fix system server crash when AvatarPickerActivity started without file authority

Bug: 263287827
Change-Id: I2c4346f5565cbb6a9844e83bd3d79491a96b9eec
Test: manually
parent 0bab1185
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -138,7 +139,8 @@ public class AvatarPickerActivity extends Activity {
    private String getFileAuthority() {
        String authority = getIntent().getStringExtra(EXTRA_FILE_AUTHORITY);
        if (authority == null) {
            throw new IllegalStateException("File authority must be provided");
            Log.e(this.getClass().getName(), "File authority must be provided");
            finish();
        }
        return authority;
    }