title: E/libc: Access denied finding property "persist.vendor.sys.activitylog"
body: <p>I am not sure where is the problem. This app is a drawing app.</p>
  <p>The error came out is E/libc: Access denied finding property &quot;persist.vendor.sys.activitylog&quot; Codes are copied from Youtube. However, there are not many errors inside the codes. Esp the Button, showColordialog. The system asked me to debug the app; hope for a second opinion about this. Thank you :-)</p>
  <pre><code>package com.example.davincidrawingapp;
  
  import androidx.annotation.NonNull;
  import androidx.appcompat.app.AlertDialog;
  import androidx.appcompat.app.AppCompatActivity;
  import android.graphics.Bitmap;
  import android.graphics.Canvas;
  import android.graphics.Color;
  import android.graphics.Paint;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuInflater;
  import android.view.MenuItem;
  import android.view.View;
  import android.widget.Button;
  import android.widget.ImageView;
  import android.widget.SeekBar;
  import android.widget.Toast;
  
  import com.example.davincidrawingapp.view.PikassoView;
  
  public class MainActivity extends AppCompatActivity {
  
      private PikassoView pikassoView;
      private AlertDialog.Builder currentAlertDialog;
      private ImageView widthImageView;
      private AlertDialog dialogLineWidth;
      private AlertDialog colorDialog;
  
      private SeekBar alphaSeekbar1;
      private SeekBar redSeekBar;
      private SeekBar blueSeekBar;
      private SeekBar greenSeekBar;
      private View colorView;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          pikassoView = findViewById(R.id.view);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.menu.menu, menu);
  
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(@NonNull MenuItem item) {
  
          switch (item.getItemId())
          {
              case R.id.clearId:
                   pikassoView.clear();
                   break;
  
              case R.id.saveid:
                  break;
  
              case R.id.colorid:
                  showColorDialog();
                  break;
  
              case R.id.lineWidth:
                  showLineWidthDialog();
                  break;
  
              case R.id.eraseid:
                  break;
          }
  
          if (item.getItemId() == R.id.clearId) {
              pikassoView.clear();
          }
  
  
          return super.onOptionsItemSelected(item);
      }
  
      void showColorDialog()
      {
          currentAlertDialog = new AlertDialog.Builder(this);
          View view = getLayoutInflater().inflate(R.layout.color_dialog, null);
          alphaSeekbar1 = view.findViewById(R.id.alphaSeekbar1);
          redSeekBar= view.findViewById(R.id.redSeekbar);
          blueSeekBar= view.findViewById(R.id.blueSeekbar);
          greenSeekBar= view.findViewById(R.id.greenSeekbar);
          colorView = view.findViewById(R.id.colorView);
  
          //register Seekbar event listeners
          alphaSeekbar1.setOnSeekBarChangeListener(colorSeekBarChanged);
          redSeekBar.setOnSeekBarChangeListener(colorSeekBarChanged);
          blueSeekBar.setOnSeekBarChangeListener(colorSeekBarChanged);
          greenSeekBar.setOnSeekBarChangeListener(colorSeekBarChanged);
  
          int color = pikassoView.getDrawingColor();
          alphaSeekbar1.setProgress(Color.alpha(color));
          redSeekBar.setProgress(Color.red(color));
          greenSeekBar.setProgress(Color.green(color));
          blueSeekBar.setProgress(Color.blue(color));
  
          Button setColorButton = view.findViewById(R.id.setColorButton);
          setColorButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  pikassoView.setDrawingColor(Color.argb(
                          alphaSeekbar1.getProgress(),
                          redSeekBar.getProgress(),
                          greenSeekBar.getProgress(),
                          blueSeekBar.getProgress()
                  ));
               colorDialog.dismiss();
              }
          });
  
          currentAlertDialog.setView(view);
          currentAlertDialog.setTitle(&quot;Choose Color&quot;);
          colorDialog = currentAlertDialog.create();
          colorDialog.show();
      }
  
  
      private SeekBar.OnSeekBarChangeListener colorSeekBarChanged = new SeekBar.OnSeekBarChangeListener() {
          @Override
          public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
          pikassoView.setBackgroundColor(Color.argb(
                  alphaSeekbar1.getProgress(),
                  redSeekBar.getProgress(),
                  greenSeekBar.getProgress(),
                  blueSeekBar.getProgress()
          ));
              //display the current color
              colorView.setBackgroundColor(Color.argb(
                      alphaSeekbar1.getProgress(),
                      redSeekBar.getProgress(),
                      greenSeekBar.getProgress(),
                      blueSeekBar.getProgress()
              ));
  
          }
  
          @Override
          public void onStartTrackingTouch(SeekBar seekBar) {
  
          }
  
          @Override
          public void onStopTrackingTouch(SeekBar seekBar) {
  
          }
      };
  
      private SeekBar.OnSeekBarChangeListener widthSeekBarChange = new SeekBar.OnSeekBarChangeListener() {
          Bitmap bitmap = Bitmap.createBitmap(400,100, Bitmap.Config.ARGB_8888);
          Canvas canvas = new Canvas(bitmap);
  
          @Override
          public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
              Paint p = new Paint();
              p.setColor(pikassoView.getDrawingColor());
              p.setStrokeCap(Paint.Cap.ROUND);
              p.setStrokeWidth(progress);
  
              bitmap.eraseColor(Color.WHITE);
              canvas.drawLine(30,50, 370,50,p);
              widthImageView.setImageBitmap(bitmap);
          }
  
          @Override
          public void onStartTrackingTouch(SeekBar seekBar) {
  
          }
  
          @Override
          public void onStopTrackingTouch(SeekBar seekBar) {
  
          }
      };
  
      void showLineWidthDialog()
      {
          currentAlertDialog = new AlertDialog.Builder(this);
          View view = getLayoutInflater().inflate(R.layout.width_dialog,null);
          final SeekBar widthSeekbar = view.findViewById(R.id.widthseekBar);
          Button setLineWidthButton = view.findViewById(R.id.widthDialogButton);
          widthImageView = view.findViewById(R.id.imageViewid);
          setLineWidthButton.setOnClickListener(new View.OnClickListener()
                                                {
                                                    @Override
                                                    public void onClick(View view)
                                                    {
                                                        pikassoView.setLineWidth(widthSeekbar.getProgress());
                                                        dialogLineWidth.dismiss();
                                                        currentAlertDialog = null;
                                                    }
                                                }
          );
  
          widthSeekbar.setOnSeekBarChangeListener(widthSeekBarChange);
          currentAlertDialog.setView(view);
          dialogLineWidth = currentAlertDialog.create();
          dialogLineWidth.setTitle(&quot;Set Line Width&quot;);
          dialogLineWidth.show();
      }
  }
  </code></pre>