Java Code Examples for com.orhanobut.logger.Logger#wtf()
The following examples show how to use
com.orhanobut.logger.Logger#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: BluetoothLoader.java From Easer with GNU General Public License v3.0 | 6 votes |
@Override public void _load(@ValidData @NonNull BluetoothOperationData data, @NonNull OnResultCallback callback) { Boolean state = data.get(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { BluetoothManager bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE); BluetoothAdapter adapter = bluetoothManager.getAdapter(); if (adapter == null) { Logger.w("no BluetoothAdapter"); callback.onResult(true); return; } if (state) { callback.onResult(adapter.enable()); return; } else { callback.onResult(adapter.disable()); return; } } // TODO: Support lower versions or set compatibility check Logger.wtf("System version lower than min requirement"); callback.onResult(false); }
Example 2
Source File: SkeletonTracker.java From Easer with GNU General Public License v3.0 | 6 votes |
protected final void newSatisfiedState(Boolean newState) { lck_satisfied.lock(); try { if (satisfied == newState) { return; } satisfied = newState; if (satisfied == null) return; PendingIntent pendingIntent = satisfied ? event_positive : event_negative; try { pendingIntent.send(); } catch (PendingIntent.CanceledException e) { Logger.wtf("PendingIntent for notify in SkeletonTracker cancelled before sending???"); e.printStackTrace(); } } finally { lck_satisfied.unlock(); } }
Example 3
Source File: SettingsActivity.java From Easer with GNU General Public License v3.0 | 6 votes |
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { switch (requestCode) { case REQCODE_PERM_STORAGE: case REQCODE_PERM_EXPORT: case REQCODE_PERM_IMPORT: if (grantResults.length == 0) { Logger.wtf("Request permission result with ZERO length!!!"); return; } if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { Logger.i("Request for permission <%s> granted", permissions[0]); } else { Logger.i("Request for permission <%s> denied", permissions[0]); } break; } }
Example 4
Source File: UiModeLoader.java From Easer with GNU General Public License v3.0 | 5 votes |
@Override public void _load(@ValidData @NonNull UiModeOperationData data, @NonNull OnResultCallback callback) { UiModeManager uiModeManager = (UiModeManager) context.getSystemService(Context.UI_MODE_SERVICE); if (uiModeManager == null) { Logger.wtf("Can't get UiModeManager???"); callback.onResult(false); return; } if (data.ui_mode == UiModeOperationData.UiMode.car) { uiModeManager.enableCarMode(0); } else { // if (data.ui_mode == UiModeOperationData.UiMode.normal) { uiModeManager.disableCarMode(0); } callback.onResult(true); }
Example 5
Source File: WifiTracker.java From Easer with GNU General Public License v3.0 | 5 votes |
WifiTracker(Context context, WifiUSourceData data, @NonNull PendingIntent event_positive, @NonNull PendingIntent event_negative) { super(context, data, event_positive, event_negative); WifiManager wifiManager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE); if (wifiManager == null) { Logger.wtf("[WifiTracker] WifiManager is null"); return; } if (wifiManager.isWifiEnabled()) { WifiInfo wifiInfo = wifiManager.getConnectionInfo(); compareAndSignal(wifiInfo); } }
Example 6
Source File: ProfileLoaderService.java From Easer with GNU General Public License v3.0 | 5 votes |
@Override public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); if (ACTION_LOAD_PROFILE.equals(action)) { final String name = intent.getStringExtra(EXTRA_PROFILE_NAME); final String event = intent.getStringExtra(EXTRA_SCRIPT_NAME); if (intent.getExtras() == null) { Logger.wtf("ProfileLoaderIntent has null extras???"); throw new IllegalStateException("ProfileLoaderIntent has null extras???"); } handleActionLoadProfile(name, event, intent.getExtras()); } else { Logger.wtf("ProfileLoaderService got unknown Intent action <%s>", action); } }
Example 7
Source File: LogUtils.java From youqu_master with Apache License 2.0 | 4 votes |
public static void logwtf(String message, Object... args) { if (DEBUG_ENABLE) { Logger.wtf(message, args); } }