APISonar


android.util.Log.d

> android > util > Log > d
android APIs util APIs Log APIs d APIs

Example 1
public void testNewApiSdkLint_usingStreamsApi_shouldFail() {
    Arrays.asList(1, 2, 3)
        .stream()
        .forEach(
            new Consumer<Integer>() {
              @Override
              public void accept(Integer num) {
                Log.d("TAG", "number is: " + String.valueOf(num));
              }
            });
  }
Example 2
public ArrayList<View> getViews(View parent) {
		try {
			if(config.commandLogging){
				Log.d(config.commandLoggingTag, "getViews()");
			}
			
			return viewFetcher.getViews(parent, false);
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
Example 3
public Object[] unpackerFunction(String paramFilePath, Class[] classTypes) {

        Object[] objects = new Object[2];
        try {
            Unpacker unpacker = read_parameters_MessagePack_Init(paramFilePath);
            objects[0] = unpacker.read(classTypes[0]);
            objects[1] = unpacker.read(classTypes[1]);
            unpacker.close();
            unpacker = null;
        } catch (Exception e) {
            Log.d("MessagePack Exception:", e.getMessage());
            return null;
        }
        return objects;
    }
Example 4
private String streamReader(InputStream inputStream) throws IOException {
        BufferedReader bufferedReader = new BufferedReader(
                new InputStreamReader(inputStream));
        String line = "";
        String result = "";
        while ((line = bufferedReader.readLine()) != null)
            result += line;

        inputStream.close();
        Log.d("streamReader", result);
        return result;
    }
Example 5
public void testObservableApi() {
        mTimerSupport.getTickObservable(2, false).subscribe(new Consumer<Long>() {

            long start = System.currentTimeMillis();

            @Override
            public void accept(Long aLong) throws Exception {
                long end = System.currentTimeMillis();
                long time = (end - start);
                Log.d("RxTimerSupportTest", "testObservableApi " + time);
                assertTrue(Math.abs(time - 2 * 1000) < 50);
                start = end;
            }
        });
    }
Example 6
private void sleepDelay() throws IOException {
        final Long delay = calculateDelayMs();
        if (delay > 0) {
            try {
                Log.d("NetworkQuality", "Applying delay of $delay ms");
                Thread.sleep(delay);
            } catch (InterruptedException ie) {
                throw new IOException("Delay interrupted");
            }

        }
    }
Example 7
public boolean _reflectiveClassExists(String cls) {
        try {
            Class.forName(cls);
            return true;
        } catch (ClassNotFoundException e) {
            Log.d("Countly", "Class " + cls + " not found");
            return false;
        }
    }
Example 8
public static String readStringFromFile(Context context, String name) throws IOException{
		File file = context.getFileStreamPath(name);
		Log.d("utility", "readStringFromFile: "+ file.getAbsoluteFile());
		InputStream is = new FileInputStream(file);

		byte b[] = new byte[(int) file.length()];

		is.read(b);
		is.close();

		String string = new String(b);

		return string;
	}
Example 9
public static void store(Object msg) {

        String msgStr = object2Msg(msg);

        _TRACE_BUILDER.append(msgStr).append("\n");

        if (LOG_OUTPUT) {
            Log.d("PluginMgr-Trace", msgStr);
        }
    }
Example 10
void showLog(String message)
    {
        Log.d("order_detail",message);
    }
Example 11
private void print(String message, Object... objects) {
        String s = "";
        for (Object o : objects) {
            s += o.toString();
        }
        Log.d("danmu", message + "\n" + s);
    }
Example 12
public void assertCurrentActivity(String message, @SuppressWarnings("rawtypes") Class activityClass)
	{
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "assertCurrentActivity("+message+", "+activityClass+")");
		}
		
		asserter.assertCurrentActivity(message, activityClass);

	}
Example 13
void toc (final String info) {
		final float time = (System.nanoTime() - start) / 1000000000.0f;

		tv.post(new Runnable() {

			@Override
			public void run () {
				StringBuilder buff = new StringBuilder(tv.getText());
				buff.append(info).append(", ").append(time).append(" secs\n");
				tv.setText(buff.toString());
			}
		});

		Log.d("MicroBenchmarks", info + ", " + time);
	}
Example 14
public static File create(String folder, String fileName){
        File file = new File(
                address(folder, fileName));
        Log.d("---------------------------------------", "Create file address: " + address(folder, fileName));
        try {
            file.createNewFile();
        } catch (IOException e) {
            e.printStackTrace();
        }

        return file;
    }
Example 15
public void clickOnButton(String text) {
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "clickOnButton(\""+text+"\")");
		}
			
		clicker.clickOn(Button.class, text);

	}
Example 16
public static void d(String message){
        if (!isDebuggable())
            return;

        getMethodNames(new Throwable().getStackTrace());
        Log.d(className, createLog(message));
    }
Example 17
public void show() {
        Log.d("TUT", "SHOW");
        for (Integer integer : state) {
            String led = integer == 0 ? " " : "x";
            Log.d("TUT", "|" + led + "|");
        }
    }
Example 18
public View getView(String id){
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "getView(\""+id+"\")");
		}
		
		return getView(id, 0);
	}
Example 19
public View getView(Object tag){
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "getView("+tag+")");
		}
		
		return getView(tag, 0);
	}
Example 20
private void unbindLocked() {
        String pkg;
        pkg = mPackageName;
        mPackageName = null;
        mVersion = Integer.MIN_VALUE;
        if (pkg != null) {
            if (D) Log.d(mTag, "unbinding " + pkg);
            mContext.unbindService(this);
        }
    }
Example 21
private static void send(String message) {
        try {
            if (checkBufferSize()) {
                String fileDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ").format(new Date());
                buffer.insert(0, "\n").insert(0, message).insert(0, fileDateFormat);
            }
            Log.d("Daedalus", message);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
Example 22
public void showDropInUI(final View view) {
        Log.d(TAG, "showDropInUI: ");
        auth.showSignIn(this, new Callback<UserStateDetails>() {
            @Override
            public void onResult(UserStateDetails result) {

            }

            @Override
            public void onError(Exception e) {

            }
        });
    }
Example 23
public void resetGlobal(String key){
        try {
            this.global.remove(key);
        } catch (Exception e) {
            Log.d("Warning", e.getStackTrace()[0].getMethodName() + " : " + e.toString());
        }
    }
Example 24
protected void onProgressUpdate(String... progress) {
            if(mShowWaitDiaglog) {
                Log.d("ANDRO_ASYNC", progress[0]);
                mProgressDialog.setProgress(Integer.parseInt(progress[0]));
            }
        }
Example 25
public void dump() {
        Map<String, ?> keys = m_prefs.getAll();

        for (Map.Entry<String, ?> entry : keys.entrySet()) {
            Log.d("map values", entry.getKey() + ": "
                    + entry.getValue().toString());
        }
    }