I have some data in my Cloud Firestore Database. The collection's name is buses, and I have 2 documents (bus_id_1 and bus_id_2). I added a button so that when I click it, I get the data from the database in a TextView.
TextView busesText;
private Button btnViewData;
FirebaseFirestore db = FirebaseFirestore.getInstance();
private DocumentReference mDocRef = db.getInstance().document("buses/bus_id_1");
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FirebaseApp.initializeApp(this);
setContentView(R.layout.activity_main);
busesText = (TextView)findViewById(R.id.showData);
}
public void getData(View view){
mDocRef.get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
@Override
public void onSuccess(DocumentSnapshot documentSnapshot) {
if (documentSnapshot.exists()) {
Bus bus = documentSnapshot.toObject(Bus.class);
busesText.setText(bus.getLine());
}
}
});
}
When I click the button this is what I get in the console:
W/RenderThread: type=1400 audit(0.0:733273): avc: denied { read } for name="perf_ioctl" dev="proc" ino=4026533695 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0 V/FA: Inactivity, disconnecting from the service
What can be the reason?