APISonar


android.util.Log.e

> android > util > Log > e
android APIs util APIs Log APIs e APIs

Example 1
protected String getFileSignature(File f)
    {
        String signature = "";
        try
        {
            signature = getStreamSignature(new FileInputStream(f));
        }
        catch (FileNotFoundException ex)
        {
            Log.e(LOG_TAG, ex.toString());
        }
        return signature;
    }
Example 2
public static void e(Throwable tr) {

		if (mDebuggable >= LEVEL_ERROR) {

			Log.e(mTag, "", tr);

		}

	}
Example 3
public void onProgressUpdate(Integer... values) {
    	super.onProgressUpdate(values);
    	switch(values[0]) {
    	case 0:
    		try {
    			mAppWidgetManager.updateAppWidget(currentAppWidgetId, views);
    		} catch (Exception e) {
    			Log.e("DEBUG", ">>>exception");
    			e.printStackTrace();
    		}

    		break;
    	}
    	
    }
Example 4
public static String e(String msg) {
        try {
            try {
                Log.e("fqrouter", msg);
                writeLogFile("ERROR", msg);
            } catch (Exception e) {
                System.out.println(msg);
            }
            return msg;
        } catch (Exception e) {
            // ignore
            return msg;
        }
    }
Example 5
void doGarbageCollection(final String tag) {
        System.gc();
        try {
            Thread.sleep(GC_INTERVAL);
        } catch (InterruptedException e) {
            Log.e(tag, "Sleep was interrupted.");
        }
    }
Example 6
public void uncaughtException(Thread thread, Throwable ex) {
        ex.printStackTrace();
        if (!handleException(ex) && mDefaultHandler != null) {
            mDefaultHandler.uncaughtException(thread, ex);
        } else {
            try {
                Thread.sleep(3000);
            } catch (InterruptedException e) {
                Log.e("error : ", e.getMessage());
            }
            System.exit(0);
        }
    }
Example 7
void setAnimatedValue(Object target) {
        if (mProperty != null) {
            mProperty.set(target, getAnimatedValue());
        }
        if (mSetter != null) {
            try {
                mTmpValueArray[0] = getAnimatedValue();
                mSetter.invoke(target, mTmpValueArray);
            } catch (InvocationTargetException e) {
                Log.e("PropertyValuesHolder", e.toString());
            } catch (IllegalAccessException e) {
                Log.e("PropertyValuesHolder", e.toString());
            }
        }
    }
Example 8
private InputStream getPropertyFileAsStream(String fileName) throws IOException {
        InputStream stream = null;
        try {

            stream = this.context.getResources().getAssets().open(fileName);

        }
        catch (Exception exception) {
            Log.e("TestProperties", "Property file: '" + fileName + "' not found");
        }

        return stream;
    }
Example 9
public void requestLayoutOnUIThread(final View view) {
        try {
            runTestOnUiThread(new Runnable() {
                @Override
                public void run() {
                    view.requestLayout();
                }
            });
        } catch (Throwable throwable) {
            Log.e(TAG, "", throwable);
        }
    }
Example 10
private void copyImageToMemory(File outFile) {
		try {

			BufferedOutputStream os = new BufferedOutputStream(
					new FileOutputStream(outFile));

			BufferedInputStream is = new BufferedInputStream(getResources()
					.openRawResource(R.raw.painter));

			copy(is, os);

		} catch (FileNotFoundException e) {
			Log.e(TAG, "FileNotFoundException");
		}
	}
Example 11
public static String[] getTestChildren(Context c, String className) {
        try {
            Class clazz = c.getClassLoader().loadClass(className);

            if (mJUnitClass.isAssignableFrom(clazz)) {
                return getTestChildren(clazz);
            }
        } catch (ClassNotFoundException e) {
            Log.e("TestHarness", "No class found", e);
        }
        return null;
    }
Example 12
public static void e(Exception e) {
        if (!allowE) return;
        StackTraceElement caller = getCallerStackTraceElement();
        String tag = generateTag(caller);

        if (customLogger != null) {
            customLogger.e(tag, e.getMessage(), e);
        } else {
            Log.e(tag, e.getMessage(), e);
        }
    }
Example 13
private void log(String message, Throwable e) {
		if (e != null) {
			Log.e(TAG, message, e);
			
		} else {
			Log.i(TAG, message);			
		}
		
		if (mLog != null)
		{
			try {
				mLog.println(message);
			} catch (IOException ex) {}
		}		
	}
Example 14
public FileInputStream getStream(String key) {
        File file = new File(getCachePath(key));
        if (!file.exists())
            return null;
        try {
            FileInputStream inputStream = new FileInputStream(file);
            return inputStream;
        } catch (FileNotFoundException e) {
            Log.e("getStream", "FileNotFoundException");
            e.printStackTrace();
        }
        return null;
    }
Example 15
private X509Certificate[] getSystemCertificates() {
    try {
      TrustManagerFactory otmf = TrustManagerFactory.getInstance(
        TrustManagerFactory.getDefaultAlgorithm());
      otmf.init((KeyStore) null);
      X509TrustManager otm = (X509TrustManager) otmf.getTrustManagers()[0];
      return otm.getAcceptedIssuers();
    } catch (Exception e) {
      Log.e(LOG_TAG, "Getting System Certificates", e);
      return new X509Certificate[0];
    }
  }
Example 16
public void setButtonText(CharSequence buttonText) {

        if (mType != Type.BUTTON) {

            Log.e(TAG, "setButtonText()" + ERROR_NOTBUTTONTYPE);

        }

        if (mButton != null) {

            mButton.setText(buttonText);

        }

    }
Example 17
private void closeWriter(Writer exportWriter) {
        if (exportWriter != null) {
            try {
                exportWriter.close();
            } catch (IOException e) {
                Log.e(LOG_TAG, "error closing file", e);
            }
        }
    }
Example 18
public void onFileNotFoundException(FileNotFoundException e,
                                        final Object state) {
        Log.e("Facebook", e.getMessage());
        e.printStackTrace();
    }
Example 19
static synchronized void load(final Context context) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    read(context);
                } catch (Throwable t) {
                    Log.e(TAG, "Cannot load emojis", t);
                }
            }
        }).run();
    }
Example 20
private float getLocationMinDistance() {
        try {
            String disString = getPreferences().getString(MIN_DIS_PREF, "0");
            return Float.parseFloat(disString);
        }
        catch (NumberFormatException e) {
            Log.e(LOG_TAG, "Invalid preference for location min distance", e);
        }
        return 0;
    }
Example 21
public static Method getPropertyMethod(Object target, String fieldName) {
    Class<?> clazz = target.getClass();
    try {
      Method method = findMethod(clazz, fieldName);
      return method;
    } catch (NoSuchMethodException e) {
      e.printStackTrace();
      Log.e("REBOUND_OBJECT_ANIM", "Could not find property: " + fieldName);
    }
    return null;
  }
Example 22
protected void finalize() throws Throwable {
        Inflater inflater = mInflater;

        if (inflater != null) {
            try {
                inflater.end();
            } catch (Exception e) {
                Log.e(TAG, "inflater.end failed", e);
            }
        }

        super.finalize();
    }
Example 23
public void disconnect(final View view) {
        try {
            mqttManager.disconnect();
        } catch (Exception e) {
            Log.e(LOG_TAG, "Disconnect error.", e);
        }
    }
Example 24
public static void closeInputStream(InputStream inputStream) {
        try {
            if (inputStream != null) {
                inputStream.close();
            }
        } catch (IOException e) {
            Log.e(LOG_TAG, "Couldn't close stream!", e);
        }
    }
Example 25
public void testReflectionForSelectionChanged() {
    try {
      Class noparams[] = {};
      s_pSelectionChangedMethod.invoke(this, noparams);
    } catch (Exception e) {
      Log.e("Custom spinner, reflection bug: ", e.getMessage());
      e.printStackTrace();
    }
  }