/** * 发送通知广播 * * @param context * @param notice */ public static void sendBroadCast(Context context, Notice notice, String from) { // if (!((AppContext) context.getApplicationContext()).isLogin() // || notice == null) // return; if (notice == null || context == null) return; // AppContext.setNoticeAtMeCount(notice.getAtmeCount()); // AppContext.setNoticeMessageCount(notice.getMsgCount()); // AppContext.setNoticeReviewCount(notice.getReviewCount()); // AppContext.setNoticeNewFansCount(notice.getNewFansCount()); TLog.log( "NoticeReceiver", "发送通知广播 from:" + from + " atme:" + notice.getAtmeCount() + " review:" + notice.getReviewCount() + " msg:" + notice.getMsgCount() + " fans:" + notice.getNewFansCount()); Intent intent = new Intent(Constants.INTENT_ACTION_NOTICE); intent.putExtra("atmeCount", notice.getAtmeCount()); intent.putExtra("msgCount", notice.getMsgCount()); intent.putExtra("reviewCount", notice.getReviewCount()); intent.putExtra("newFansCount", notice.getNewFansCount()); intent.putExtra("from", from); context.sendBroadcast(intent); }
public void foo(int x) { System.out.println("** calling foo of C"); TLog.log("I am C.foo()"); }
public void foo(int x) { TLog.log("I am B2.foo()"); }