本文整理汇总了Java中android.os.RemoteException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java RemoteException.printStackTrace方法的具体用法?Java RemoteException.printStackTrace怎么用?Java RemoteException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.os.RemoteException
的用法示例。
在下文中一共展示了RemoteException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateProgress
import android.os.RemoteException; //导入方法依赖的package包/类
private void updateProgress() {
int progress;
int duration = (int) currentSong.getDuration();
final float phoneWidth = Utils.getMetrics(activity).widthPixels;
try {
progress = mControl.getProgress();
int width = (int) (phoneWidth * (progress / (float) duration));
FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) mProgress.getLayoutParams();
params.width = width;
mProgress.setLayoutParams(params);
mProgress.invalidate();
} catch (RemoteException e) {
e.printStackTrace();
}
}
示例2: notifyAppInstalled
import android.os.RemoteException; //导入方法依赖的package包/类
private void notifyAppInstalled(PackageSetting setting, int userId) {
final String pkg = setting.packageName;
int N = mRemoteCallbackList.beginBroadcast();
while (N-- > 0) {
try {
if (userId == -1) {
sendInstalledBroadcast(pkg);
mRemoteCallbackList.getBroadcastItem(N).onPackageInstalled(pkg);
mRemoteCallbackList.getBroadcastItem(N).onPackageInstalledAsUser(0, pkg);
} else {
mRemoteCallbackList.getBroadcastItem(N).onPackageInstalledAsUser(userId, pkg);
}
} catch (RemoteException e) {
e.printStackTrace();
}
}
mRemoteCallbackList.finishBroadcast();
VAccountManagerService.get().refreshAuthenticatorCache(null);
}
示例3: getIconsID
import android.os.RemoteException; //导入方法依赖的package包/类
private int[] getIconsID() {
int[] res = {
R.drawable.ic_create_new_folder_black_24dp,
R.drawable.ic_art_track_black_24dp,
R.drawable.ic_delete_forever_black_24dp,
R.drawable.ic_clear_black_24dp
};
try {
int sheetID = control.getPlayListId();
int[] ids;
if (sheetID < 0) {
ids = Arrays.copyOf(res, 3);
} else {
ids = res;
}
return ids;
} catch (RemoteException e) {
e.printStackTrace();
}
return res;
}
示例4: sendCancelQueue
import android.os.RemoteException; //导入方法依赖的package包/类
/**
* 取消排队
*/
public void sendCancelQueue() {
try {
mMessageManager.sendEventMessage(SocketParams.getCancelQueueParams(), new IPCCallBack.Stub() {
@Override
public void onResult(int code, String result) throws RemoteException {
getMvpView().cancelQueue(code);
}
});
} catch (RemoteException e) {
e.printStackTrace();
}
}
示例5: sendMsgToForeService
import android.os.RemoteException; //导入方法依赖的package包/类
private void sendMsgToForeService(Message msg){
if(mServiceMessager == null){
return;
}
try {
mServiceMessager.send(msg);
} catch (RemoteException e) {
e.printStackTrace();
}
}
示例6: onConnected
import android.os.RemoteException; //导入方法依赖的package包/类
@Override
public void onConnected() {
super.onConnected();
Log.d(TAG, "on connected");
try {
connectToSession(mMediaBrowser.getSessionToken());
} catch (RemoteException e) {
e.printStackTrace();
Log.d(TAG, "can not connect to media controller");
}
}
示例7: confirmCredentials
import android.os.RemoteException; //导入方法依赖的package包/类
public void confirmCredentials(IAccountManagerResponse response, Account account, Bundle options, boolean expectActivityLaunch) {
try {
getRemote().confirmCredentials(VUserHandle.myUserId(), response, account, options, expectActivityLaunch);
} catch (RemoteException e) {
e.printStackTrace();
}
}
示例8: updateFavorite
import android.os.RemoteException; //导入方法依赖的package包/类
public void updateFavorite() {
try {
Song song = control.currentSong();
if (song != null) {
DBSongInfo info = dbMusicoco.getSongInfo(song);
boolean isFavorite = info != null && info.favorite;
songOption.updateCurrentFavorite(isFavorite, false);
}
} catch (RemoteException e) {
e.printStackTrace();
}
}
示例9: isReadyRemote
import android.os.RemoteException; //导入方法依赖的package包/类
/**
* 检查所有的服务是否已经就位(已经添加到{@link ServiceManagerThread})
* @return
*/
private boolean isReadyRemote(){
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
try {
mRemoteServiceManager.transact(ServiceContext.READY_REMOTE, data, reply, 0);
int result = reply.readInt();
if(result == ServiceContext.SUCCESS) {
log("remote service manager ready");
return true;
}
log("remote service manager not ready");
return false;
} catch (RemoteException e) {
e.printStackTrace();
log("getService exception");
return false;
} finally {
data.recycle();
reply.recycle();
}
}
示例10: invalidateAuthToken
import android.os.RemoteException; //导入方法依赖的package包/类
public void invalidateAuthToken(String accountType, String authToken) {
try {
getRemote().invalidateAuthToken(VUserHandle.myUserId(), accountType, authToken);
} catch (RemoteException e) {
e.printStackTrace();
}
}
示例11: onDestroy
import android.os.RemoteException; //导入方法依赖的package包/类
@Override
protected void onDestroy() {
//解绑Service
if (mBound && mService != null) {
try {
mService.send(Message.obtain(null, MsgService.MSG_UNREGISTER));
} catch (RemoteException e) {
e.printStackTrace();
}
mService =null;
unbindService(mConnection);
mBound = false;
}
super.onDestroy();
}
示例12: processRestarted
import android.os.RemoteException; //导入方法依赖的package包/类
public void processRestarted(String packageName, String processName, int userId) {
try {
getService().processRestarted(packageName, processName, userId);
} catch (RemoteException e) {
e.printStackTrace();
}
}
示例13: handleApplicationCrash
import android.os.RemoteException; //导入方法依赖的package包/类
public void handleApplicationCrash() {
try {
getService().handleApplicationCrash();
} catch (RemoteException e) {
e.printStackTrace();
}
}
示例14: sendMessageWithDevice
import android.os.RemoteException; //导入方法依赖的package包/类
private void sendMessageWithDevice(int what) {
if (mHealthService == null) {
Log.d(TAG, "Health Service not connected.");
return;
}
try {
mHealthService.send(Message.obtain(null, what, mDevice));
} catch (RemoteException e) {
Log.w(TAG, "Unable to reach service.");
e.printStackTrace();
}
}
示例15: addAccount
import android.os.RemoteException; //导入方法依赖的package包/类
public void addAccount(IAccountManagerResponse response, String accountType, String authTokenType, String[] requiredFeatures, boolean expectActivityLaunch, Bundle optionsIn) {
try {
getRemote().addAccount(VUserHandle.myUserId(), response, accountType, authTokenType, requiredFeatures, expectActivityLaunch, optionsIn);
} catch (RemoteException e) {
e.printStackTrace();
}
}