APISonar


android.util.Log.wtf

> android > util > Log > wtf
android APIs util APIs Log APIs wtf APIs

Example 1
public static void wtf(String message){
        if (!isDebuggable())
            return;

        getMethodNames(new Throwable().getStackTrace());
        Log.wtf(className, createLog(message));
    }
Example 2
public static void wtf(Throwable tr) {
        if (!APP.isDebug()) return;
        String tag = generateTag();

        Log.wtf(tag, tr);
    }
Example 3
public static void wtf(String msg) {
        String logMsg = debugInfo() + msg;
        Log.wtf(TAG, logMsg);
        logCrashlytics(logMsg);
    }
Example 4
static String urlencode(String str) {
        try {
            return URLEncoder.encode(str, UTF8);
        } catch (UnsupportedEncodingException e) {
            Log.wtf("Countly", "No UTF-8 encoding? " + e);
            return "";
        }
    }
Example 5
public static void wtf(final String tag, final String text, final Throwable e) {
		if (BuildConfig.DEBUG) {
			Log.wtf(tag, text, e);
		}
	}
Example 6
public static void wtf(Object obj) {
        if (Log.ASSERT > DEBUG_LEVEL) {
            String tag = getClassName();
            String msg = obj != null ? obj.toString() : "obj == null";
            Log.wtf(tag, msg);
        }
    }
Example 7
public void wtf(String tag, String message) {
        if (APILevel.require(8))
            Log.wtf(tag, message);
        else
            Log.e(tag, message);
    }
Example 8
public static void f(String tag, String msg, Object... args) {
        if (sLevel > LEVEL_FATAL) {
            return;
        }
        if (args.length > 0) {
            msg = String.format(msg, args);
        }
        Log.wtf(tag, msg);
    }
Example 9
public void crash(final String message)
    {
        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.REBOOT, null);
        Thread t = new Thread("PowerManagerService.crash()") {
            public void run() { throw new RuntimeException(message); }
        };
        try {
            t.start();
            t.join();
        } catch (InterruptedException e) {
            Log.wtf(TAG, e);
        }
    }
Example 10
void startKeepalive(Context c) {
        if (mConfig.getNattKeepaliveInterval() != 0) {
            Log.wtf(TAG, "Keepalive not yet supported.");
        }
    }
Example 11
public void setQueueTitle(@Nullable CharSequence title) {
        try {
            mBinder.setQueueTitle(title);
        } catch (RemoteException e) {
            Log.wtf("Dead object in setQueueTitle.", e);
        }
    }
Example 12
private void setInterfaceQuota(String iface, long quotaBytes) {
        try {
            mNetworkManager.setInterfaceQuota(iface, quotaBytes);
        } catch (IllegalStateException e) {
            Log.wtf(TAG, "problem setting interface quota", e);
        } catch (RemoteException e) {
            // ignored; service lives in system_server
        }
    }
Example 13
public boolean shouldHideNotifications(String key) {
        if (mEntryManager == null) {
            Log.wtf(TAG, "mEntryManager was null!", new Throwable());
            return true;
        }
        return isLockscreenPublicMode(mCurrentUserId)
                && mEntryManager.getNotificationData().getVisibilityOverride(key) ==
                        Notification.VISIBILITY_SECRET;
    }
Example 14
private static void handleRemoteError(Throwable t) {
        if (WTF_CRASH) {
            // In development modes, we just want to crash.
            throw new AssertionError("unexpected remote error", t);
        } else {
            // Log to wtf which gets sent to dropbox, and in system_server this does not crash.
            Log.wtf(TAG, t);
        }
    }
Example 15
public void updateFolderInfoBrowsedPlayer(String stringUri) {
        Log.d(TAG, "MediaSession: updateFolderInfoBrowsedPlayer");

        try {
            mBinder.updateFolderInfoBrowsedPlayer(stringUri);
        } catch (RemoteException e) {
            Log.wtf(TAG, "Dead object in updateFolderInfoBrowsedPlayer.", e);
        }
    }
Example 16
private void handlePost(Thread self, Object lock) {
        List<Object> heldLocks = mHeldLocks.get();
        if (heldLocks.isEmpty()) {
            Log.wtf("LockCheckMine", "Empty thread list on post()");
            return;
        }
        int index = heldLocks.size() - 1;
        if (heldLocks.get(index) != lock) {
            Log.wtf("LockCheckMine", "post(" + Violation.describeLock(lock) + ") vs [..., "
                    + Violation.describeLock(heldLocks.get(index)) + "]");
            return;
        }
        heldLocks.remove(index);
    }
Example 17
private void reportWtf(String msg, Throwable e) {
        Slog.w(TAG, "***********************************************");
        Log.wtf(TAG, "BOOT FAILURE " + msg, e);
    }
Example 18
public void setQueue(@Nullable List<Track> queue) {
        try {
            mBinder.setQueue(new ParceledListSlice<Track>(queue));
        } catch (RemoteException e) {
            Log.wtf("Dead object in setQueue.", e);
        }
    }
Example 19
private SSLSocketFactory makeSocketFactory(
            KeyManager[] keyManagers, TrustManager[] trustManagers) {
        try {
            OpenSSLContextImpl sslContext = OpenSSLContextImpl.getPreferred();
            sslContext.engineInit(keyManagers, trustManagers, null);
            sslContext.engineGetClientSessionContext().setPersistentCache(mSessionCache);
            return sslContext.engineGetSocketFactory();
        } catch (KeyManagementException e) {
            Log.wtf(TAG, e);
            return (SSLSocketFactory) SSLSocketFactory.getDefault();  // Fallback
        }
    }
Example 20
public void setRouteOptions(List<RouteOptions> options) {
        try {
            mBinder.setRouteOptions(options);
        } catch (RemoteException e) {
            Log.wtf(TAG, "Error setting route options.", e);
        }
    }
Example 21
public void onClick(View v) {
		switch (v.getId()) {
		case R.id.start_button:
			Log.d(TAG, "Start");
			break;
		default:
			Log.wtf(TAG,  "Unexpected click source " + v.getId());
		}
	}
Example 22
private static InetAddress readInetAddressFromParcel(Parcel in) {
        String addrString = in.readString();
        if (addrString == null) {
            return null;
        }
        try {
            return InetAddress.getByName(addrString);
        } catch (UnknownHostException e) {
            Log.wtf(TAG, "Invalid IpAddress " + addrString);
            return null;
        }
    }
Example 23
public static void executePendingTransactionsSafe(@NonNull FragmentManager fragmentManager) {
        try {
            fragmentManager.executePendingTransactions();
        } catch (IllegalStateException e) {
            Log.wtf(TAG, e);
        }
    }
Example 24
private static int getAppVersion(Context context) {
	    try {
	        return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode;
	    } catch (NameNotFoundException e) {
	        // This is a "CANTHAPPEN", so why is it a checked exception?
	        final String mesg = "CANTHAPPEN: could not get my own package name!?!?: " + e;
	        Log.wtf(TAG, mesg);
			throw new RuntimeException(mesg);
	    }
	}
Example 25
private NetworkStats getNetworkStatsTethering() throws RemoteException {
        try {
            final String[] tetheredIfacePairs = mConnManager.getTetheredIfacePairs();
            return mNetworkManager.getNetworkStatsTethering(tetheredIfacePairs);
        } catch (IllegalStateException e) {
            Log.wtf(TAG, "problem reading network stats", e);
            return new NetworkStats(0L, 10);
        }
    }