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


Java Log.w方法代码示例

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


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

示例1: onCreate

import android.util.Log; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    ButterKnife.bind(this);

    NetworkingUtility.registerListener(this);
    disablePlayButtons();

    mGoogleSignInClient = GoogleSignIn.getClient(this, GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN);

    if (!BaseGameUtils.verifySampleSetup(this, R.string.app_id)) {
        Log.w("SIGNIN", "*** Warning: setup problems detected. Sign in may not work!");
    }

    // start the sign-in flow
    Log.d("SIGNIN", "Sign-in button clicked");
    startActivityForResult(mGoogleSignInClient.getSignInIntent(), RC_SIGN_IN);

    LanguageManager.languageManagement(this);
}
 
开发者ID:Augugrumi,项目名称:SpaceRace,代码行数:23,代码来源:MainActivity.java

示例2: handleAnswerCall

import android.util.Log; //导入方法依赖的package包/类
private void handleAnswerCall(Intent intent) {
  if (callState != CallState.STATE_LOCAL_RINGING) {
    Log.w(TAG, "Can only answer from ringing!");
    return;
  }

  if (peerConnection == null || dataChannel == null || recipient == null || callId == null) {
    throw new AssertionError("assert");
  }

  DatabaseFactory.getSmsDatabase(this).insertReceivedCall(recipient.getNumber());

  this.peerConnection.setAudioEnabled(true);
  this.peerConnection.setVideoEnabled(true);
  this.dataChannel.send(new DataChannel.Buffer(ByteBuffer.wrap(Data.newBuilder().setConnected(Connected.newBuilder().setId(this.callId)).build().toByteArray()), false));

  intent.putExtra(EXTRA_CALL_ID, callId);
  intent.putExtra(EXTRA_REMOTE_NUMBER, recipient.getNumber());
  handleCallConnected(intent);
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:21,代码来源:WebRtcCallService.java

示例3: log

import android.util.Log; //导入方法依赖的package包/类
@Override
public void log(int level, String key, String value) {
    switch (level){
        case DEBUG:
            Log.d(key,value);
            break;
        case INFO:
            Log.i(key,value);
            break;
        case ERROR:
            Log.e(key,value);
            break;
        default:
            Log.w(key,value);
            break;
    }
}
 
开发者ID:aiyaapp,项目名称:AAVT,代码行数:18,代码来源:ConsoleLogger.java

示例4: onTouchEvent

import android.util.Log; //导入方法依赖的package包/类
@Override
public boolean onTouchEvent(MotionEvent event) 
{
	try
	{
		if ((mediaPlayer != null) && (mediaController != null) && (isPrepared == true))
		{
			mediaController.show();
			return true;
		}
		else
		{
			return false;
		}
	}
	catch (Exception e)
	{
		Log.w("Replayer", "onTouchEvent : " + getApplicationContext().getString(R.string.log_replayer_echec_touch_event) + " : " + e);
		databaseManager.insertLog(getApplicationContext(), "" + getApplicationContext().getString(R.string.log_replayer_echec_touch_event), new Date().getTime(), 2, false);
		return false;
	}
}
 
开发者ID:vassela,项目名称:AC2RD,代码行数:23,代码来源:Replayer.java

示例5: parseIntent

import android.util.Log; //导入方法依赖的package包/类
@Override
protected Intent parseIntent(XmlResourceParser parser) {
    String uri = null;
    try {
        uri = getAttributeValue(parser, ATTR_URI);
        return Intent.parseUri(uri, 0);
    } catch (URISyntaxException e) {
        Log.w(TAG, "Shortcut has malformed uri: " + uri);
        return null; // Oh well
    }
}
 
开发者ID:TeamBrainStorm,项目名称:SimpleUILauncher,代码行数:12,代码来源:DefaultLayoutParser.java

示例6: calculateInternal

import android.util.Log; //导入方法依赖的package包/类
private <T> T calculateInternal(final Function<IMainService, ? extends T> function) {
    if (mMainProcess) {
        return function.call(mMainApis);
    } else {
        if (mState == STATE_DISCONNECTED) {
            Log.w(TAG, HERMES_SERVICE_DISCONNECTED);
            return null;
        } else {
            return mRemoteApis.calculate(new Function<IMainService, T>() {
                @Override
                public T call(IMainService o) {
                    return function.call(o);
                }
            });
        }
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:HermesEventBus.java

示例7: open

import android.util.Log; //导入方法依赖的package包/类
/**
 * Opens a rear-facing camera with {@link Camera#open(int)}, if one exists, or opens camera 0.
 */
@Override
public Camera open() {
  
  int numCameras = Camera.getNumberOfCameras();
  if (numCameras == 0) {
    Log.w(TAG, "No cameras!");
    return null;
  }

  int index = 0;
  while (index < numCameras) {
    Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
    Camera.getCameraInfo(index, cameraInfo);
    if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK) {
      break;
    }
    index++;
  }
  
  Camera camera;
  if (index < numCameras) {
    Log.i(TAG, "Opening camera #" + index);
    camera = Camera.open(index);
  } else {
    Log.i(TAG, "No camera facing back; returning camera #0");
    camera = Camera.open(0);
  }

  return camera;
}
 
开发者ID:yun2win,项目名称:tvConnect_android,代码行数:34,代码来源:GingerbreadOpenCameraInterface.java

示例8: getUserInfo

import android.util.Log; //导入方法依赖的package包/类
/**
 * Returns the UserInfo object describing a specific user.
 * @param handle the user handle of the user whose information is being requested.
 * @return the UserInfo object for a specific user.
 * @hide
 */
public VUserInfo getUserInfo(int handle) {
    try {
        return mService.getUserInfo(handle);
    } catch (RemoteException re) {
        Log.w(TAG, "Could not get user info", re);
        return null;
    }
}
 
开发者ID:codehz,项目名称:container,代码行数:15,代码来源:VUserManager.java

示例9: onResume

import android.util.Log; //导入方法依赖的package包/类
@Override
public void onResume() {
  Log.w(TAG, "onResume()");
  super.onResume();
  if (!networkAccess.isCensored(this)) MessageRetrievalService.registerActivityStarted(this);
  initializeScreenshotSecurity();
  EventBus.getDefault().register(this);
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:9,代码来源:WebRtcCallActivity.java

示例10: onReceive

import android.util.Log; //导入方法依赖的package包/类
@Override
public synchronized void onReceive(Context context, Intent intent) {
  Log.w(TAG, "onReceive()");
  if (!action.equals(intent.getAction())) {
    Log.w(TAG, "received broadcast with unexpected action " + intent.getAction());
    return;
  }

  onResult(context, intent);

  resultAvailable = true;
  notifyAll();
}
 
开发者ID:CableIM,项目名称:Cable-Android,代码行数:14,代码来源:LollipopMmsConnection.java

示例11: w

import android.util.Log; //导入方法依赖的package包/类
/**
 * W.
 *
 * @param text the text
 */
public static void w(String text)
{
	if (W)
	{
		if ( UseExternalLogger ) 
		{
			//Microlog4android.info(text);
		}
		Log.w(TAG, text);
		
	}
}
 
开发者ID:NeoSmartpen,项目名称:AndroidSDK2.0,代码行数:18,代码来源:NLog.java

示例12: onBackPressedOnKeyboard

import android.util.Log; //导入方法依赖的package包/类
private void onBackPressedOnKeyboard() {
    Log.d("SoftKeyboardListener", "onBackPressedOnKeyboard");

    View focusedView = findFocusedView();
    if (focusedView == null) {
        Log.w("SoftKeyboardListener", "wut focusedView==null? how is this possible?");
        return;
    }

    setImeVisibility(false);
    mDefaultFocusView.requestFocus();
}
 
开发者ID:sqrt1764,项目名称:AndroidSoftKeyboardListener,代码行数:13,代码来源:SoftKeyboardListener.java

示例13: onResult

import android.util.Log; //导入方法依赖的package包/类
@TargetApi(VERSION_CODES.LOLLIPOP)
@Override
public synchronized void onResult(Context context, Intent intent) {
  if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP_MR1) {
    Log.w(TAG, "HTTP status: " + intent.getIntExtra(SmsManager.EXTRA_MMS_HTTP_STATUS, -1));
  }
  Log.w(TAG, "code: " + getResultCode() + ", result string: " + getResultData());
}
 
开发者ID:CableIM,项目名称:Cable-Android,代码行数:9,代码来源:IncomingLollipopMmsConnection.java

示例14: parseHeader

import android.util.Log; //导入方法依赖的package包/类
private boolean parseHeader() {
  // Note: see ISO/IEC 13818-1, section 2.4.3.6 for detailed information on the format of
  // the header.
  pesScratch.setPosition(0);
  int startCodePrefix = pesScratch.readBits(24);
  if (startCodePrefix != 0x000001) {
    Log.w(TAG, "Unexpected start code prefix: " + startCodePrefix);
    payloadSize = -1;
    return false;
  }

  pesScratch.skipBits(8); // stream_id.
  int packetLength = pesScratch.readBits(16);
  pesScratch.skipBits(5); // '10' (2), PES_scrambling_control (2), PES_priority (1)
  dataAlignmentIndicator = pesScratch.readBit();
  pesScratch.skipBits(2); // copyright (1), original_or_copy (1)
  ptsFlag = pesScratch.readBit();
  dtsFlag = pesScratch.readBit();
  // ESCR_flag (1), ES_rate_flag (1), DSM_trick_mode_flag (1),
  // additional_copy_info_flag (1), PES_CRC_flag (1), PES_extension_flag (1)
  pesScratch.skipBits(6);
  extendedHeaderLength = pesScratch.readBits(8);

  if (packetLength == 0) {
    payloadSize = -1;
  } else {
    payloadSize = packetLength + 6 /* packetLength does not include the first 6 bytes */
        - HEADER_SIZE - extendedHeaderLength;
  }
  return true;
}
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:32,代码来源:TsExtractor.java

示例15: onRun

import android.util.Log; //导入方法依赖的package包/类
@Override
public void onRun() {
  if (data == null) {
    Log.w(TAG, "Received NULL pdu, ignoring...");
    return;
  }

  PduParser  parser = new PduParser(data);
  GenericPdu pdu    = null;

  try {
    pdu = parser.parse();
  } catch (RuntimeException e) {
    Log.w(TAG, e);
  }

  if (isNotification(pdu) && !isBlocked(pdu)) {
    MmsDatabase database                = DatabaseFactory.getMmsDatabase(context);
    Pair<Long, Long> messageAndThreadId = database.insertMessageInbox((NotificationInd)pdu, subscriptionId);

    Log.w(TAG, "Inserted received MMS notification...");

    ApplicationContext.getInstance(context)
                      .getJobManager()
                      .add(new MmsDownloadJob(context,
                                              messageAndThreadId.first,
                                              messageAndThreadId.second,
                                              true));
  } else if (isNotification(pdu)) {
    Log.w(TAG, "*** Received blocked MMS, ignoring...");
  }
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:33,代码来源:MmsReceiveJob.java


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