当前位置: 首页>>代码示例>>Java>>正文


Java Log.i方法代码示例

本文整理汇总了Java中de.ub0r.android.logg0r.Log.i方法的典型用法代码示例。如果您正苦于以下问题:Java Log.i方法的具体用法?Java Log.i怎么用?Java Log.i使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在de.ub0r.android.logg0r.Log的用法示例。


在下文中一共展示了Log.i方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
/**
 * Create table in {@link SQLiteDatabase}.
 *
 * @param db {@link SQLiteDatabase}
 */
public static void onCreate(final SQLiteDatabase db) {
    Log.i(TAG, "create table: " + TABLE);
    db.execSQL("DROP TABLE IF EXISTS " + TABLE);
    db.execSQL("CREATE TABLE " + TABLE + " (" + ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
            + ORDER + " INTEGER," + NAME + " TEXT," + SHORTNAME + " TEXT," + TYPE
            + " TEXT, " + LIMIT_TYPE + " INTEGER," + LIMIT + " LONG," + BILLMODE + " TEXT,"
            + BILLDAY + " LONG," + BILLPERIOD + " INTEGER," + BILLPERIOD_ID + " LONG,"
            + COST_PER_ITEM + " FLOAT," + COST_PER_AMOUNT1 + " FLOAT," + COST_PER_AMOUNT2
            + " FLOAT," + COST_PER_ITEM_IN_LIMIT + " FLOAT," + COST_PER_AMOUNT_IN_LIMIT1
            + " FLOAT," + COST_PER_AMOUNT_IN_LIMIT2 + " FLOAT," + COST_PER_PLAN + " FLOAT,"
            + MIXED_UNITS_CALL + " INTEGER," + MIXED_UNITS_SMS + " INTEGER,"
            + MIXED_UNITS_MMS + " INTEGER," + MIXED_UNITS_DATA + " INTEGER," + NEXT_ALERT
            + " LONG," + STRIP_SECONDS + " INTEGER," + STRIP_PAST + " INTEGER,"
            + MERGED_PLANS + " TEXT" + ");");
    db.execSQL("CREATE INDEX " + TABLE + "_idx on " + TABLE + " (" + ID + "," + ORDER + ","
            + TYPE + ")");
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:23,代码来源:DataProvider.java

示例2: update

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
/**
 * Run {@link LogRunnerService}.
 *
 * @param action  original action sent to {@link LogRunnerReceiver}
 * @param context {@link Context}
 */
public static void update(final Context context, final String action) {
    Log.d(TAG, "update(", action, ")");
    long now = System.currentTimeMillis();
    if (inUpdate) {
        Log.i(TAG, "skip update(" + action + "): still updating");
    } else if ((action == null && lastAction != null)
            || (action != null && !action.equals(lastAction)) || lastUpdate == 0L
            || now > lastUpdate + MIN_DELAY) {
        context.startService(new Intent(action, null, context, LogRunnerService.class));
        lastAction = action;
        lastUpdate = now;
    } else {
        Log.i(TAG, "skip update(" + action + "): " + now + "<=" + (lastUpdate + MIN_DELAY));
    }
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:22,代码来源:LogRunnerService.java

示例3: checkSmsSimIdColumn

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
/**
 * Check, if there is dual sim support.
 */
public static boolean checkSmsSimIdColumn(final ContentResolver cr) {
    try {
        String where = BuildConfig.DEBUG_LOG ? null : "1=2";
        Cursor c = cr.query(URI_SMS, null, where, null, null);
        boolean check = false;
        if (c != null) {
            check = SimIdColumnFinder.getsInstance().getSimIdColumn(cr, URI_SMS, c) >= 0;
            c.close();
        }
        Log.i(TAG, "sim_id column found in sms database: " + check);
        return check;
    } catch (SQLiteException e) {
        Log.w(TAG, "sim_id check for sms failed", e);
        return false;
    }
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:20,代码来源:LogRunnerService.java

示例4: parseIntent

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
/**
 * Parse data pushed by {@link Intent}.
 *
 * @param intent {@link Intent}
 * @return true if message is ready to send
 */
private boolean parseIntent(final Intent intent) {
    Log.d(TAG, "parseIntent(", intent, ")");
    if (intent == null) {
        return false;
    }
    Log.d(TAG, "got action: ", intent.getAction());

    to = null;
    String u = intent.getDataString();
    try {
        if (!TextUtils.isEmpty(u) && u.contains(":")) {
            String t = u.split(":")[1];
            if (t.startsWith("+")) {
                to = "+" + URLDecoder.decode(t.substring(1));
            } else {
                to = URLDecoder.decode(t);
            }
        }
    } catch (IndexOutOfBoundsException e) {
        Log.w(TAG, "could not split at :", e);
    }

    CharSequence cstext = intent.getCharSequenceExtra(Intent.EXTRA_TEXT);
    text = null;
    if (cstext != null) {
        text = cstext.toString();
    }
    if (TextUtils.isEmpty(text)) {
        Log.i(TAG, "text missing");
        return false;
    }
    if (TextUtils.isEmpty(to)) {
        Log.i(TAG, "recipient missing");
        return false;
    }

    return true;
}
 
开发者ID:andrewxu10,项目名称:Upkeep,代码行数:45,代码来源:SenderActivity.java

示例5: startHttpd

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
private void startHttpd() {
    mContainer = ShareItemContainer.getInstance(this);
    if (!mContainer.hasActiveShares()) {
        Log.d(TAG, "no shares, exit");
        stopSelf();
        return;
    }

    if (!isWifiConnected()) {
        Log.d(TAG, "no wifi, exit");
        stopSelf();
        return;
    }

    // get wake lock
    if (mWakeLock == null) {
        PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE);
        mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
        mWakeLock.acquire();
        Log.d(TAG, "got WakeLock");
    }

    // start httpd
    if (mHttpd == null) {
        Log.i(TAG, "start httpd");
        mHttpd = new Httpd(getPort(this), this, mContainer);
        try {
            mHttpd.start();
        } catch (IOException e) {
            Toast.makeText(this, R.string.error_httpd, Toast.LENGTH_LONG).show();
            Log.e(TAG, "error starting httpd", e);
            mHttpd = null;
            stopSelf();
        }
    }
    showNotification();

    scheduleTermination();
}
 
开发者ID:felixb,项目名称:no-cloud-share,代码行数:40,代码来源:HttpService.java

示例6: stopHttpd

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
private void stopHttpd() {
    if (mHttpd != null) {
        Log.i(TAG, "stop httpd");
        mHttpd.stop();
        mHttpd = null;
    }

    if (mWakeLock != null) {
        mWakeLock.release();
        Log.d(TAG, "WakeLock released");
    }

    cancelNotification();
}
 
开发者ID:felixb,项目名称:no-cloud-share,代码行数:15,代码来源:HttpService.java

示例7: Httpd

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
public Httpd(final int port, final Context context, final ShareItemContainer container) {
    super(port);
    mContext = context;
    mContainer = container;
    mBaseUrl = HttpService.getBaseUrl(context);
    SharedPreferences p = PreferenceManager
            .getDefaultSharedPreferences(context);
    mShowIndex = p
            .getBoolean(SettingsActivity.PREFS_SHOW_INDEX, SettingsActivity.DEFAULT_SHOW_INDEX);
    Log.i(TAG, "httpd running");
    Log.d(TAG, "baseUrl: ", mBaseUrl);
    Log.d(TAG, "showIndex: ", mShowIndex);
}
 
开发者ID:felixb,项目名称:no-cloud-share,代码行数:14,代码来源:Httpd.java

示例8: updateViews

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
private void updateViews() {
    String url = mBaseUrl + mItem.getExternalPath();
    Log.i(TAG, "share url: ", url);
    String bcUrl = BARCODE_URL + Uri.encode(url);

    if (PreferenceManager.getDefaultSharedPreferences(getActivity()).getBoolean(
            SettingsActivity.PREFS_SHOW_INDEX, false)) {
        mUrlIndexTextView.setVisibility(View.VISIBLE);
    } else {
        mUrlIndexTextView.setVisibility(View.GONE);
    }

    mUrlIndexTextView.setText(mBaseUrl + "/");
    mUrlTextView.setText(url);
    mUrlImageView.setImageUrl(bcUrl, mLoader);

    Date creation = new Date(mItem.getCreation());
    mCreationTextView.setText(this.getString(R.string.creation_long_ts,
            mFormat.format(creation)));
    Date expiration = new Date(mItem.getExpiration());
    mExpirationTextView.setText(
            this.getString(R.string.expiration_long_ts, mFormat.format(expiration)));
    mExpirationTextView.setTextColor(this.getResources()
            .getColor(mItem.isExpired() ? R.color.text_expired : R.color.material_text_secondary));

    // start with desired animation state
    if (mState) {
        float scale = getImageScale();
        mUrlImageView.setScaleX(scale);
        mUrlImageView.setScaleY(scale);
        mShadeView.setAlpha(1f);
    } else {
        mUrlImageView.setScaleX(1f);
        mUrlImageView.setScaleY(1f);
        mShadeView.setAlpha(0f);
    }
}
 
开发者ID:felixb,项目名称:no-cloud-share,代码行数:38,代码来源:ShareFragment.java

示例9: getDevice

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
/**
 * @return single instance
 */
public static synchronized Device getDevice() {
    Log.d(TAG, "Device: ", Build.DEVICE);
    if (instance == null) {
        Log.d(TAG, "Device: ", Build.DEVICE);
        if (Build.PRODUCT.equals("sdk")) {
            instance = new EmulatorDevice();
        } else {
            instance = new FroyoDevice();
        }
        Log.i(TAG, "Device: " + Build.DEVICE + "/ Interface: " + instance.getCell());
    }
    return instance;
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:17,代码来源:Device.java

示例10: onProgressChanged

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void onProgressChanged(final SeekBar seekBar, final int progress,
        final boolean fromUser) {
    Log.d(TAG, "onProgressChanged(", progress, ")");
    final int tp = 255 - progress;
    int c = getBgColor();
    Log.d(TAG, "color: ", c);
    c = c & BITMASK_COLOR;
    Log.d(TAG, "color: ", c);
    Log.i(TAG, "transparency: " + Integer.toHexString(tp << BITSHIFT_TRANSPARENCY));
    c = c | tp << BITSHIFT_TRANSPARENCY;
    Log.d(TAG, "color: ", c);
    setBgColor(c, true);
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:18,代码来源:StatsAppWidgetConfigure.java

示例11: printColumnNames

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
/**
 * Print out column names.
 */
private void printColumnNames(final Cursor c) {
    Log.i(TAG, "table schema for cursor: ", c);
    int l = c.getColumnCount();
    Log.i(TAG, "column count: ", l);
    for (int i = 0; i < l; ++i) {
        Log.i(TAG, "column: ", c.getColumnName(i));
    }
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:12,代码来源:SimIdColumnFinder.java

示例12: printColumn

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
private static void printColumn(final Cursor c, int n) {
    Log.i(TAG, "---------- column - start ----: ", n);
    int l = c.getColumnCount();
    for (int i = 0; i < l; ++i) {
        Log.i(TAG, c.getColumnName(i), ": ", c.getString(i));
    }
    Log.i(TAG, "---------- column - end ------: ", n);
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:9,代码来源:LogRunnerService.java

示例13: deleteOldLogs

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
/**
 * Delete old logs to make this app fast.
 *
 * @param cr {@link ContentResolver}
 */
private static void deleteOldLogs(final ContentResolver cr) {
    Log.d(TAG, "delete old logs: date < ", deleteBefore);
    try {
        final int ret = cr.delete(DataProvider.Logs.CONTENT_URI, DataProvider.Logs.DATE
                + " < ?", new String[]{String.valueOf(deleteBefore)});
        Log.i(TAG, "deleted old logs from internal database: " + ret);
    } catch (IllegalStateException | IllegalArgumentException e) {
        Log.e(TAG, "WTF?", e);
    }
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:16,代码来源:LogRunnerService.java

示例14: onCreate

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
@Override
public void onCreate() {
    super.onCreate();
    handler = new Handler() {
        @Override
        public void handleMessage(final Message msg) {
            Log.i(TAG, "In handleMessage...");
        }
    };
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:11,代码来源:LogRunnerService.java

示例15: acquire

import de.ub0r.android.logg0r.Log; //导入方法依赖的package包/类
/**
 * Acquire {@link WakeLock} and init service.
 *
 * @param a action
 * @return {@link WakeLock}
 */
private WakeLock acquire(final String a) {
    final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
    final PowerManager.WakeLock wakelock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);
    wakelock.acquire();
    Log.i(TAG, "got wakelock");

    if (a != null
            && (a.equals(TelephonyManager.ACTION_PHONE_STATE_CHANGED) || a
            .equals(ACTION_SMS))) {
        Log.i(TAG, "sleep for " + WAIT_FOR_LOGS + "ms");
        try {
            Thread.sleep(WAIT_FOR_LOGS);
        } catch (InterruptedException e) {
            Log.e(TAG, "interrupted while waiting for logs", e);
        }
    }

    // update roaming info
    TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
    roaming = tm.isNetworkRoaming();
    Log.d(TAG, "roaming: ", roaming);
    mynumber = tm.getLine1Number();
    Log.d(TAG, "my number: ", mynumber);

    return wakelock;
}
 
开发者ID:felixb,项目名称:callmeter,代码行数:33,代码来源:LogRunnerService.java


注:本文中的de.ub0r.android.logg0r.Log.i方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。