/**@class android.os.StrictMode
@extends java.lang.Object

 StrictMode is a developer tool which detects things you might be doing by accident and brings
 them to your attention so you can fix them.

 <p>StrictMode is most commonly used to catch accidental disk or network access on the
 application's main thread, where UI operations are received and animations take place. Keeping
 disk and network operations off the main thread makes for much smoother, more responsive
 applications. By keeping your application's main thread responsive, you also prevent <a
 href="{@docRoot}guide/practices/design/responsiveness.html">ANR dialogs</a> from being shown to
 users.

 <p class="note">Note that even though an Android device's disk is often on flash memory, many
 devices run a filesystem on top of that memory with very limited concurrency. It's often the case
 that almost all disk accesses are fast, but may in individual cases be dramatically slower when
 certain I/O is happening in the background from other processes. If possible, it's best to assume
 that such things are not fast.

 <p>Example code to enable from early in your {@link android.app.Application}, {@link android.app.Activity}, or other application component's {@link android.app.Application#onCreate}
 method:

 <pre>
 public void onCreate() {
     if (DEVELOPER_MODE) {
         StrictMode.setThreadPolicy(new {@link android.os.StrictMode.ThreadPolicy.Builder StrictMode.android.os.StrictMode.ThreadPolicy.Builder}()
                 .detectDiskReads()
                 .detectDiskWrites()
                 .detectNetwork()   // or .detectAll() for all detectable problems
                 .penaltyLog()
                 .build());
         StrictMode.setVmPolicy(new {@link android.os.StrictMode.VmPolicy.Builder StrictMode.android.os.StrictMode.VmPolicy.Builder}()
                 .detectLeakedSqlLiteObjects()
                 .detectLeakedClosableObjects()
                 .penaltyLog()
                 .penaltyDeath()
                 .build());
     }
     super.onCreate();
 }
 </pre>

 <p>You can decide what should happen when a violation is detected. For example, using {@link android.os.StrictMode.ThreadPolicy.Builder#penaltyLog} you can watch the output of <code>adb logcat</code> while you
 use your application to see the violations as they happen.

 <p>If you find violations that you feel are problematic, there are a variety of tools to help
 solve them: threads, {@link android.os.Handler}, {@link android.os.AsyncTask}, {@link android.app.IntentService}, etc. But don't feel compelled to fix everything that StrictMode
 finds. In particular, many cases of disk access are often necessary during the normal activity
 lifecycle. Use StrictMode to find things you did by accident. Network requests on the UI thread
 are almost always a problem, though.

 <p class="note">StrictMode is not a security mechanism and is not guaranteed to find all disk or
 network accesses. While it does propagate its state across process boundaries when doing {@link android.os.Binder} calls, it's still ultimately a best effort mechanism. Notably, disk or network
 access from JNI calls won't necessarily trigger it. Future versions of Android may catch more (or
 fewer) operations, so you should never leave StrictMode enabled in applications distributed on
 Google Play.
*/
var StrictMode = {

/** Boolean system property to disable strict mode checks outright. Set this to 'true' to force
 disable; 'false' has no effect on other enable/disable policy.

 @hide
*/
DISABLE_PROPERTY : "persist.sys.strictmode.disable",
/** The boolean system property to control screen flashes on violations.

 @hide
*/
VISUAL_PROPERTY : "persist.sys.strictmode.visual",
/** Non-public penalty mode which overrides all the other penalty bits and signals that we're in
 a Binder call and we should ignore the other penalty bits and instead serialize back all our
 offending stack traces to the caller to ultimately handle in the originating process.

 <p>This must be kept in sync with the constant in libs/binder/Parcel.cpp

 @hide
*/
PENALTY_GATHER : "-2147483648",
/**{@hide} */
PENALTY_LOG : "1073741824",
/**{@hide} */
PENALTY_DIALOG : "536870912",
/**{@hide} */
PENALTY_DEATH : "268435456",
/**{@hide} */
PENALTY_FLASH : "134217728",
/**{@hide} */
PENALTY_DROPBOX : "67108864",
/**{@hide} */
PENALTY_DEATH_ON_NETWORK : "33554432",
/**{@hide} */
PENALTY_DEATH_ON_CLEARTEXT_NETWORK : "16777216",
/**{@hide} */
PENALTY_DEATH_ON_FILE_URI_EXPOSURE : "8388608",
/**@hide */
PENALTY_ALL : "-65536",
/**{@hide} */
NETWORK_POLICY_ACCEPT : "0",
/**{@hide} */
NETWORK_POLICY_LOG : "1",
/**{@hide} */
NETWORK_POLICY_REJECT : "2",
/**{@hide}
*/
setViolationLogger : function(  ) {},

/**Sets the policy for what actions on the current thread should be detected, as well as the
 penalty if such actions occur.

 <p>Internally this sets a thread-local variable which is propagated across cross-process IPC
 calls, meaning you can catch violations when a system service or another process accesses the
 disk or network on your behalf.
@param {Object {StrictMode.ThreadPolicy}} policy the policy to put into place
*/
setThreadPolicy : function(  ) {},

/**
@hide 
*/
setThreadPolicyMask : function(  ) {},

/**Returns the bitmask of the current thread's policy.
@return {Number} the bitmask of all the DETECT_* and PENALTY_* bits currently enabled
@hide 
*/
getThreadPolicyMask : function(  ) {},

/**Returns the current thread's policy.
*/
getThreadPolicy : function(  ) {},

/**A convenience wrapper that takes the current {@link android.os.StrictMode.ThreadPolicy} from {@link #getThreadPolicy}, modifies it to permit both disk reads &amp; writes, and sets the new
 policy with {@link #setThreadPolicy}, returning the old policy so you can restore it at the
 end of a block.
@return {Object {android.os.StrictMode.ThreadPolicy}} the old policy, to be passed to {@link #setThreadPolicy} to restore the policy at the
     end of a block
*/
allowThreadDiskWrites : function(  ) {},

/**
@hide 
*/
allowThreadDiskWritesMask : function(  ) {},

/**A convenience wrapper that takes the current {@link android.os.StrictMode.ThreadPolicy} from {@link #getThreadPolicy}, modifies it to permit disk reads, and sets the new policy with {@link #setThreadPolicy}, returning the old policy so you can restore it at the end of a block.
@return {Object {android.os.StrictMode.ThreadPolicy}} the old policy, to be passed to setThreadPolicy to restore the policy.
*/
allowThreadDiskReads : function(  ) {},

/**
@hide 
*/
allowThreadDiskReadsMask : function(  ) {},

/**
@hide 
*/
allowThreadViolations : function(  ) {},

/**
@hide 
*/
allowVmViolations : function(  ) {},

/**Determine if the given app is "bundled" as part of the system image. These bundled apps are
 developed in lock-step with the OS, and they aren't updated outside of an OTA, so we want to
 chase any {@link android.os.StrictMode} regressions by enabling detection when running on {@link android.os.Build#IS_USERDEBUG} or {@link android.os.Build#IS_ENG} builds.

 <p>Unbundled apps included in the system image are expected to detect and triage their own
 {@link android.os.StrictMode} issues separate from the OS release process, which is why we don't enable
 them here.
@hide 
*/
isBundledSystemApp : function(  ) {},

/**Initialize default {@link android.os.StrictMode.ThreadPolicy} for the current thread.
@hide 
*/
initThreadDefaults : function(  ) {},

/**Initialize default {@link android.os.StrictMode.VmPolicy} for the current VM.
@hide 
*/
initVmDefaults : function(  ) {},

/**Used by the framework to make file usage a fatal error.
@hide 
*/
enableDeathOnFileUriExposure : function(  ) {},

/**Used by lame internal apps that haven't done the hard work to get themselves off file:// Uris
 yet.
@hide 
*/
disableDeathOnFileUriExposure : function(  ) {},

/**
@hide 
*/
conditionallyCheckInstanceCounts : function(  ) {},

/**Sets the policy for what actions in the VM process (on any thread) should be detected, as
 well as the penalty if such actions occur.
@param {Object {StrictMode.VmPolicy}} policy the policy to put into place
*/
setVmPolicy : function(  ) {},

/**Gets the current VM policy.
*/
getVmPolicy : function(  ) {},

/**Enable the recommended StrictMode defaults, with violations just being logged.

 <p>This catches disk and network access on the main thread, as well as leaked SQLite cursors
 and unclosed resources. This is simply a wrapper around {@link #setVmPolicy} and {@link #setThreadPolicy}.
*/
enableDefaults : function(  ) {},

/**
@hide 
*/
vmSqliteObjectLeaksEnabled : function(  ) {},

/**
@hide 
*/
vmClosableObjectLeaksEnabled : function(  ) {},

/**
@hide 
*/
vmRegistrationLeaksEnabled : function(  ) {},

/**
@hide 
*/
vmFileUriExposureEnabled : function(  ) {},

/**
@hide 
*/
vmCleartextNetworkEnabled : function(  ) {},

/**
@hide 
*/
vmContentUriWithoutPermissionEnabled : function(  ) {},

/**
@hide 
*/
vmUntaggedSocketEnabled : function(  ) {},

/**
@hide 
*/
vmImplicitDirectBootEnabled : function(  ) {},

/**
@hide 
*/
vmCredentialProtectedWhileLockedEnabled : function(  ) {},

/**
@hide 
*/
onSqliteObjectLeaked : function(  ) {},

/**
@hide 
*/
onWebViewMethodCalledOnWrongThread : function(  ) {},

/**
@hide 
*/
onIntentReceiverLeaked : function(  ) {},

/**
@hide 
*/
onServiceConnectionLeaked : function(  ) {},

/**
@hide 
*/
onFileUriExposed : function(  ) {},

/**
@hide 
*/
onContentUriWithoutPermission : function(  ) {},

/**
@hide 
*/
onCleartextNetworkDetected : function(  ) {},

/**
@hide 
*/
onUntaggedSocket : function(  ) {},

/**
@hide 
*/
onImplicitDirectBoot : function(  ) {},

/**
@hide 
*/
onVmPolicyViolation : function(  ) {},

/**
@hide 
*/
onVmPolicyViolation : function(  ) {},

/**Enter a named critical span (e.g. an animation)

 <p>The name is an arbitary label (or tag) that will be applied to any strictmode violation
 that happens while this span is active. You must call finish() on the span when done.

 <p>This will never return null, but on devices without debugging enabled, this may return a
 dummy object on which the finish() method is a no-op.

 <p>TODO: add CloseGuard to this, verifying callers call finish.
@hide 
*/
enterCriticalSpan : function(  ) {},

/**For code to note that it's slow. This is a no-op unless the current thread's {@link android.os.StrictMode.ThreadPolicy} has {@link android.os.StrictMode.ThreadPolicy.Builder#detectCustomSlowCalls} enabled.
@param {String} name a short string for the exception stack trace that's built if when this fires.
*/
noteSlowCall : function(  ) {},

/**For code to note that a resource was obtained using a type other than its defined type. This
 is a no-op unless the current thread's {@link android.os.StrictMode.ThreadPolicy} has {@link android.os.StrictMode.ThreadPolicy.Builder#detectResourceMismatches()} enabled.
@param {Object {Object}} tag an object for the exception stack trace that's built if when this fires.
@hide 
*/
noteResourceMismatch : function(  ) {},

/**
@hide 
*/
noteUnbufferedIO : function(  ) {},

/**
@hide 
*/
noteDiskRead : function(  ) {},

/**
@hide 
*/
noteDiskWrite : function(  ) {},

/**Returns an object that is used to track instances of activites. The activity should store a
 reference to the tracker object in one of its fields.
@hide 
*/
trackActivity : function(  ) {},

/**
@hide 
*/
incrementExpectedActivityCount : function(  ) {},

/**
@hide 
*/
decrementExpectedActivityCount : function(  ) {},


};