public BoundedNumberEvaluator(String s, long l, long l1, long l2) { log = new DPLogger("BoundedNumberEvaluator"); mMin = l; mMax = l1; if (l2 < mMin) { log.verbose( "fieldName", "value", new Object[] { Long.valueOf(l2), "less than min value", Long.valueOf(mMin), "field name", "using min value" }); mValue = mMin; } else if (l2 > mMax) { log.verbose( "fieldName", "value", new Object[] { Long.valueOf(l2), "greater than max value", Long.valueOf(mMax), "using max value" }); mValue = mMax; } else { mValue = l2; } mFieldName = s; }
public String getSessionID() { if (mDeviceUtil.isDeviceSerialNumberAnonymous()) { log.verbose( "getSessionID", "Returning unique session id for non-anonymous metrics", new Object[0]); if (mCachedSessionID == null) { mCachedSessionID = getOrCreateUUIDSharedPref(mSharedPrefsSessionIDKey); } return mCachedSessionID; } else { return super.getSessionID(); } }
public static void afterExecute(Runnable runnable, Throwable throwable, Thread.UncaughtExceptionHandler uncaughtexceptionhandler) { Object obj; if (uncaughtexceptionhandler != null) { Thread.currentThread().setUncaughtExceptionHandler(uncaughtexceptionhandler); } obj = null; if (throwable != null) { break MISSING_BLOCK_LABEL_51; } throwable = obj; if (!(runnable instanceof Future)) { break MISSING_BLOCK_LABEL_51; } runnable = (Future)runnable; throwable = obj; if (!runnable.isDone()) { break MISSING_BLOCK_LABEL_51; } runnable.get(); throwable = obj; _L2: if (throwable != null) { log.error("afterExecute", "unexpected exception", new Object[] { "thread", Thread.currentThread().getName(), throwable }); if (uncaughtexceptionhandler != null) { uncaughtexceptionhandler.uncaughtException(Thread.currentThread(), throwable); } } return; runnable; log.debug("afterExecute", "hit CancellationException on this thread, this is expected if you canceled a task", new Object[] { "thread", Thread.currentThread().getName() }); throwable = obj; continue; /* Loop/switch isn't completed */ runnable; throwable = runnable.getCause(); continue; /* Loop/switch isn't completed */ runnable; log.verbose("afterExecute", "interrupted", new Object[0]); Thread.currentThread().interrupt(); throwable = obj; if (true) goto _L2; else goto _L1
protected String getDeviceSerialNumber() { if (mDeviceUtil.isDeviceSerialNumberAnonymous()) { log.verbose( "getDeviceSerialNumber", "Returning unique device id for non-anonymous metrics", new Object[0]); if (mCachedDSN == null) { mCachedDSN = getOrCreateUUIDSharedPref(mSharedPrefsDSNKey); } return mCachedDSN; } else { return super.getDeviceSerialNumber(); } }
private String getOrCreateUUIDSharedPref(String s) { String s2 = mSharedPrefs.getString(s, null); String s1 = s2; if (s2 == null) { log.verbose( "getOrCreateUUIDSharedPref", String.format("No existing id found for %s, generating a new UUID", new Object[] {s}), new Object[0]); s1 = UUID.randomUUID().toString(); android.content.SharedPreferences.Editor editor = mSharedPrefs.edit(); editor.putString(s, s1); editor.commit(); } return s1; }
public void onInsert(long l, long l1) { log.verbose("onInsert", "attempting transmission of batches", new Object[0]); transmitBatches(false); }