avc: denied { read } Error when trying to get to another activity

  android-studio

So I’m making an app for a school project and I need a bottom nav bar. Since bottom nav bar didn’t work I tried to use ImageButton, but it seems like they won’t work neither. So I used a simple button, here’s the code.

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_targa);

    TextView targaa = findViewById(R.id.targa);
    TextView benvenuto = findViewById(R.id.textBenvenuto);
    Button button_pagamento = findViewById(R.id.buttonPagamento);
    Button button_posizione = findViewById(R.id.buttonPosizione);
    Button button_trasporto = findViewById(R.id.buttonTrasporto);
    Button button_uscita = findViewById(R.id.buttonUscita);
    SessionManager sessionManager = new SessionManager(this, null);
    HashMap<String, String> usersDetails = sessionManager.getUsersDetailFromSession();

    String fullName = usersDetails.get(SessionManager.KEY_FULLNAME);
    final String targa = usersDetails.get(SessionManager.KEY_TARGA);

    targaa.setText(targa);
    benvenuto.setText("Benvenuto su Efficient Parking, " + fullName);
    button_uscita.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View view) {
            FirebaseDatabase rootNode = FirebaseDatabase.getInstance();
            DatabaseReference reference = rootNode.getReference("users");
            reference.child(targa).child("uscita").setValue("0");
        }
    });

    button_pagamento.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent intent = new Intent(TargaActivity.this, PagActivity.class);
            startActivity(intent);
        }
    });
    button_posizione.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent intent1 = new Intent(TargaActivity.this, PosActivity.class);
            startActivity(intent1);
        }
    });
    button_trasporto.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent intent2 = new Intent(TargaActivity.this, TraspActivity.class);
            startActivity(intent2);
        }
    });

As soon as I press the button to get to any activity, I see on the logcat this error and the phone goes back to login activity.

2021-02-06 13:14:31.809 15101-15101/com.example.efficientparking E/libc: Access denied finding property "ro.vendor.df.effect.conflict"
2021-02-06 13:14:31.796 15101-15101/com.example.efficientparking W/fficientparking: type=1400 audit(0.0:7956): avc: denied { read } for name="u:object_r:vendor_displayfeature_prop:s0" dev="tmpfs" ino=17577 scontext=u:r:untrusted_app:s0:c161,c257,c512,c768 tcontext=u:object_r:vendor_displayfeature_prop:s0 tclass=file permissive=0
2021-02-06 13:14:31.814 15101-15136/com.example.efficientparking E/Perf: Fail to get file list com.example.efficientparking
2021-02-06 13:14:31.814 15101-15136/com.example.efficientparking E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
2021-02-06 13:14:31.814 15101-15136/com.example.efficientparking E/Perf: Fail to get file list com.example.efficientparking

How may I get this working?

Source: Android Studio Questions

LEAVE A COMMENT