List of Strict Rules Violations

run adb logcat in shell, i see something like this

StrictMode policy violation; ~duration=337 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=23 violation=2

  • What does politics mean = 23?
  • What is a violation = 2?

I searched for the values ​​of these values, but I could not find any documentation whit the violation and the list of policies, or maybe I interpreted the results of my search poorly, but I would appreciate some explanation for this

+5
source share
1 answer

What does politics mean = 23?

StrictMode, , , ( , ,...). . " StrictMode" ( , Android, , , ):

public static final int DISALLOW_DISK_WRITE = 0x01;
public static final int DISALLOW_DISK_READ = 0x02;
public static final int DISALLOW_NETWORK = 0x04;
public static final int PASS_RESTRICTIONS_VIA_RPC = 0x08;
public static final int PENALTY_LOG = 0x10;
public static final int PENALTY_DIALOG = 0x20;
public static final int PENALTY_DEATH = 0x40;

, StrictMode DISK_READ, DISK_WRITE NETWORK .

= 2?

vialolation, int . , . getMessage(), StrictMode . StrictMode.java.

+8

All Articles