Java Code Examples for android.util.Log#wtf()
The following examples show how to use
android.util.Log#wtf() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ShellSAIPackageInstaller.java From SAI with GNU General Public License v3.0 | 6 votes |
@Override public void onReceive(Context context, Intent intent) { Log.d(TAG, intent.toString()); if (!mIsAwaitingBroadcast.get()) return; String installedPackage; try { installedPackage = intent.getDataString().replace("package:", ""); String installerPackage = getContext().getPackageManager().getInstallerPackageName(installedPackage); Log.d(TAG, "installerPackage=" + installerPackage); if (!BuildConfig.APPLICATION_ID.equals(installerPackage)) return; } catch (Exception e) { Log.wtf(TAG, e); return; } mIsAwaitingBroadcast.set(false); dispatchCurrentSessionUpdate(InstallationStatus.INSTALLATION_SUCCEED, installedPackage); installationCompleted(); }
Example 2
Source File: StabilizationService.java From aosp_screen_stabilization with Apache License 2.0 | 6 votes |
private void setSurfaceFlingerTranslate(int x, int y) { try { if (flinger == null) flinger = ServiceManager.getService("SurfaceFlinger"); if (flinger == null) { Log.wtf(TAG, "SurfaceFlinger is null"); return; } Parcel data = Parcel.obtain(); data.writeInterfaceToken("android.ui.ISurfaceComposer"); data.writeInt(x); data.writeInt(y); flinger.transact(2020, data, null, 0); data.recycle(); } catch(Exception e) { Log.e(TAG, "SurfaceFlinger error", e); } }
Example 3
Source File: NotificationUsageStats.java From android_9.0.0_r45 with Apache License 2.0 | 6 votes |
private void writeEvent(long eventTimeMs, int eventType, NotificationRecord r) { ContentValues cv = new ContentValues(); cv.put(COL_EVENT_USER_ID, r.sbn.getUser().getIdentifier()); cv.put(COL_EVENT_TIME, eventTimeMs); cv.put(COL_EVENT_TYPE, eventType); putNotificationIdentifiers(r, cv); if (eventType == EVENT_TYPE_POST) { putNotificationDetails(r, cv); } else { putPosttimeVisibility(r, cv); } SQLiteDatabase db = mHelper.getWritableDatabase(); if (db.insert(TAB_LOG, null, cv) < 0) { Log.wtf(TAG, "Error while trying to insert values: " + cv); } sNumWrites++; pruneIfNecessary(db); }
Example 4
Source File: LogPrintUtils.java From DevUtils with Apache License 2.0 | 5 votes |
/** * 最终打印日志方法 ( 全部调用此方法 ) * @param logType 日志类型 * @param tag 打印 Tag * @param message 日志信息 */ private static void printLog(final int logType, final String tag, final String message) { // 防止 null 处理 if (message == null) return; // 获取日志类型 switch (logType) { case Log.ERROR: Log.e(tag, message); break; case Log.INFO: Log.i(tag, message); break; case Log.VERBOSE: Log.v(tag, message); break; case Log.WARN: Log.w(tag, message); break; case Log.ASSERT: Log.wtf(tag, message); break; case Log.DEBUG: Log.d(tag, message); break; default: Log.d(tag, message); break; } }
Example 5
Source File: ArchiveExtractionTask.java From lrkFM with MIT License | 5 votes |
/** * Extracts the archive. * @param args the void args (unused) * @return true if successful. * @see ArchiveUtil#doExtractArchive(String, FMFile) */ @Override protected Boolean doInBackground(final Void... args) { try { return new ArchiveUtil().doExtractArchive(destinationPath, archive); } catch (BlockingStuffOnMainThreadException e) { Log.wtf(TAG, "This should not happen here!", e); return false; } }
Example 6
Source File: ShareRest.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
public ShareRest(Context context, OkHttpClient okHttpClient) { try { OkHttpClient httpClient = okHttpClient != null ? okHttpClient : getOkHttpClient(); if (httpClient == null) httpClient = getOkHttpClient(); // try again on failure // if fails second time we've got big problems sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); Gson gson = new GsonBuilder() .excludeFieldsWithoutExposeAnnotation() .create(); Retrofit retrofit = new Retrofit.Builder() .baseUrl(sharedPreferences.getBoolean("dex_share_us_acct", true) ? US_SHARE_BASE_URL : NON_US_SHARE_BASE_URL) .client(httpClient) .addConverterFactory(GsonConverterFactory.create(gson)) .build(); dexcomShareApi = retrofit.create(DexcomShare.class); sessionId = sharedPreferences.getString("dexcom_share_session_id", null); username = sharedPreferences.getString("dexcom_account_name", null); password = sharedPreferences.getString("dexcom_account_password", null); serialNumber = sharedPreferences.getString("share_key", null); if (sharedPreferences.getBoolean("engineering_mode", false)) { final String share_test_key = sharedPreferences.getString("share_test_key", "").trim(); if (share_test_key.length() > 4) serialNumber = share_test_key; } sharedPreferences.registerOnSharedPreferenceChangeListener(preferenceChangeListener); if ("".equals(sessionId)) // migrate previous empty sessionIds to null; sessionId = null; } catch (IllegalStateException e) { Log.wtf(TAG, "Illegal state exception: " + e); } }
Example 7
Source File: JoH.java From xDrip-plus with GNU General Public License v3.0 | 5 votes |
public static synchronized MediaPlayer playSoundUri(String soundUri) { try { JoH.getWakeLock("joh-playsound", 10000); final MediaPlayer player = MediaPlayer.create(xdrip.getAppContext(), Uri.parse(soundUri)); player.setLooping(false); player.start(); return player; } catch (Exception e) { Log.wtf(TAG, "Failed to play audio: " + soundUri + " exception:" + e); return null; } }
Example 8
Source File: JobService.java From firebase-jobdispatcher-android with Apache License 2.0 | 5 votes |
@Override @BinderThread public void start(Bundle invocationData, IJobCallback callback) { JobInvocation.Builder invocation = getJobCoder().decode(invocationData); if (invocation == null) { Log.wtf(TAG, "start: unknown invocation provided"); return; } JobService.this.handleStartJobRequest(invocation.build(), callback); }
Example 9
Source File: CL.java From VideoProcessor with Apache License 2.0 | 5 votes |
public static void wtf(String message, Object... args) { if(sLogEnable) { CL.TagInfo tagInfo = getMethodNames((new Throwable()).getStackTrace()); String msg = createLogWithoutFileName(tagInfo, message, args); Log.wtf(tagInfo.fileName, msg); } }
Example 10
Source File: FileBridge.java From container with GNU General Public License v3.0 | 5 votes |
@Override public void run() { final byte[] temp = new byte[8192]; try { while (read(mServer, temp, 0, MSG_LENGTH) == MSG_LENGTH) { final int cmd = FileUtils.peekInt(temp, 0, ByteOrder.BIG_ENDIAN); if (cmd == CMD_WRITE) { // Shuttle data into local file int len = FileUtils.peekInt(temp, 4, ByteOrder.BIG_ENDIAN); while (len > 0) { int n = read(mServer, temp, 0, Math.min(temp.length, len)); if (n == -1) { throw new IOException( "Unexpected EOF; still expected " + len + " bytes"); } write(mTarget, temp, 0, n); len -= n; } } else if (cmd == CMD_FSYNC) { // Sync and echo back to confirm Os.fsync(mTarget); write(mServer, temp, 0, MSG_LENGTH); } else if (cmd == CMD_CLOSE) { // Close and echo back to confirm Os.fsync(mTarget); Os.close(mTarget); mClosed = true; write(mServer, temp, 0, MSG_LENGTH); break; } } } catch (ErrnoException | IOException e) { Log.wtf(TAG, "Failed during bridge", e); } finally { forceClose(); } }
Example 11
Source File: VolleyLog.java From SaveVolley with Apache License 2.0 | 4 votes |
public static void wtf(Throwable tr, String format, Object... args) { Log.wtf(TAG, buildMessage(format, args), tr); }
Example 12
Source File: LogUtil.java From ParsingPlayer with GNU Lesser General Public License v2.1 | 4 votes |
public static void wtf(String tag, String msg) { if (BuildConfig.DEBUG) { Log.wtf(tag, msg); } }
Example 13
Source File: DEMImpl.java From pre-dem-android with MIT License | 4 votes |
public void wtf(String tag, Throwable tr) { Log.wtf(tag, tr); if (level < W) { PrintLogger.getInstance(context.get()).Log(tag, getStackTraceString("", tr)); } }
Example 14
Source File: AmplitudeLog.java From shinny-futures-android with GNU General Public License v3.0 | 4 votes |
int wtf(String tag, Throwable tr) { if (enableLogging && logLevel <= Log.ASSERT) return Log.wtf(tag, tr); return 0; }
Example 15
Source File: VolleyLog.java From pearl with Apache License 2.0 | 4 votes |
public static void wtf(String format, Object... args) { Log.wtf(TAG, buildMessage(format, args)); }
Example 16
Source File: AmplitudeLog.java From shinny-futures-android with GNU General Public License v3.0 | 4 votes |
int wtf(String tag, String msg) { if (enableLogging && logLevel <= Log.ASSERT) return Log.wtf(tag, msg); return 0; }
Example 17
Source File: LogUtils.java From USB-OTG-CH340-UART-interface with Apache License 2.0 | 4 votes |
public static void wtf(String TAG, String message) { if (mDebug) { Log.wtf(TAG, message); } }
Example 18
Source File: DebugLogger.java From Android-nRF-Beacon-for-Eddystone with BSD 3-Clause "New" or "Revised" License | 4 votes |
public static void wtf(String tag, String text) { if (BuildConfig.DEBUG) Log.wtf(tag, text); }
Example 19
Source File: LogUtil.java From httplite with Apache License 2.0 | 4 votes |
public static void wtf(String content, Throwable tr) { if (!isDebug) return; String tag = generateTag(); Log.wtf(tag, content, tr); }
Example 20
Source File: PtrCLog.java From android-Ultra-Pull-To-Refresh-With-Load-More-master with MIT License | 3 votes |
/** * Send a FATAL ERROR log message * * @param tag * @param msg * @param throwable */ public static void f(String tag, String msg, Throwable throwable) { if (sLevel > LEVEL_FATAL) { return; } Log.wtf(tag, msg, throwable); }