yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] llrraa2010:
relayoutWindow

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub
implements Watchdog.Monitor {
......

public int relayoutWindow(Session session, IWindow client,
WindowManager.LayoutParams attrs, int requestedWidth,
int requestedHeight, int viewVisibility, boolean insetsPending,
Rect outFrame, Rect outContentInsets, Rect outVisibleInsets,
Configuration outConfig, Surface outSurface) {
boolean displayed = false;
......

synchronized(mWindowMap) {
WindowState win = windowForClientLocked(session, client, false);
......

int attrChanges = 0;
......
if (attrs != null) {
......
attrChanges = win.mAttrs.copyFrom(attrs);
}
......

boolean wallpaperMayMove = win.mViewVisibility != viewVisibility
&& (win.mAttrs.flags & FLAG_SHOW_WALLPAPER) != 0;
......

if (viewVisibility == View.VISIBLE &&
(win.mAppToken == null || !win.mAppToken.clientHidden)) {
displayed = !win.isVisibleLw();
......

if ((attrChanges&WindowManager.LayoutParams.FORMAT_CHANGED) != 0) {
// To change the format, we need to re-build the surface.
win.destroySurfaceLocked();
displayed = true;
}
......
}
......

boolean assignLayers = false;
......

if (wallpaperMayMove) {
if ((adjustWallpaperWindowsLocked()&ADJUST_WALLPAPER_LAYERS_CHANGED) != 0) {
assignLayers = true;
}
}
......

if (assignLayers) {
assignLayersLocked();
}
......

performLayoutAndPlaceSurfacesLocked();
if (displayed && win.mIsWallpaper) {
updateWallpaperOffsetLocked(win, mDisplay.getWidth(),
mDisplay.getHeight(), false);
}
......

}

......

return (inTouchMode ? WindowManagerImpl.RELAYOUT_IN_TOUCH_MODE : 0)
| (displayed ? WindowManagerImpl.RELAYOUT_FIRST_TIME : 0);
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
public class WindowManagerService extends IWindowManager.Stub

implements Watchdog.Monitor {

......

float mLastWallpaperX = -1;

float mLastWallpaperY = -1;

float mLastWallpaperXStep = -1;

float mLastWallpaperYStep = -1;

......

private final class WindowState implements WindowManagerPolicy.WindowState {

......

// If a window showing a wallpaper: the requested offset for the

// wallpaper; if a wallpaper window: the currently applied offset.

float mWallpaperX = -1;

float mWallpaperY = -1;

// If a window showing a wallpaper: what fraction of the offset

// range corresponds to a full virtual screen.

float mWallpaperXStep = -1;

float mWallpaperYStep = -1;

// Wallpaper windows: pixels offset based on above variables.

int mXOffset;

int mYOffset;

......

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
setWindowWallpaperPositionLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub
implements Watchdog.Monitor {
......

private final class Session extends IWindowSession.Stub
implements IBinder.DeathRecipient {
......

public void setWallpaperPosition(IBinder window, float x, float y, float xStep, float yStep) {
synchronized(mWindowMap) {
long ident = Binder.clearCallingIdentity();
try {
setWindowWallpaperPositionLocked(
windowForClientLocked(this, window, true),
x, y, xStep, yStep);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}

......
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
setWindowWallpaperPositionLocked

frameworks/base/services/java/com/android/server/WindowManagerService.java

public class WindowManagerService extends IWindowManager.Stub
implements Watchdog.Monitor {
......

public void setWindowWallpaperPositionLocked(WindowState window, float x, float y,
float xStep, float yStep) {
if (window.mWallpaperX != x || window.mWallpaperY != y) {
window.mWallpaperX = x;
window.mWallpaperY = y;
window.mWallpaperXStep = xStep;
window.mWallpaperYStep = yStep;
if (updateWallpaperOffsetLocked(window, true)) {
performLayoutAndPlaceSurfacesLocked();
}
}
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
public class WindowManagerService extends IWindowManager.Stub
implements Watchdog.Monitor {
......

final ArrayList<WindowToken> mWallpaperTokens = new ArrayList<WindowToken>();

// If non-null, this is the currently visible window that is associated
// with the wallpaper.
WindowState mWallpaperTarget = null;
......

boolean updateWallpaperOffsetLocked(WindowState changingTarget, boolean sync) {
final int dw = mDisplay.getWidth();
final int dh = mDisplay.getHeight();

boolean changed = false;

WindowState target = mWallpaperTarget;
if (target != null) {
if (target.mWallpaperX >= 0) {
mLastWallpaperX = target.mWallpaperX;
} else if (changingTarget.mWallpaperX >= 0) {
mLastWallpaperX = changingTarget.mWallpaperX;
}
if (target.mWallpaperY >= 0) {
mLastWallpaperY = target.mWallpaperY;
} else if (changingTarget.mWallpaperY >= 0) {
mLastWallpaperY = changingTarget.mWallpaperY;
}
}

int curTokenIndex = mWallpaperTokens.size();
while (curTokenIndex > 0) {
curTokenIndex--;
WindowToken token = mWallpaperTokens.get(curTokenIndex);
int curWallpaperIndex = token.windows.size();
while (curWallpaperIndex > 0) {
curWallpaperIndex--;
WindowState wallpaper = token.windows.get(curWallpaperIndex);
if (updateWallpaperOffsetLocked(wallpaper, dw, dh, sync)) {
wallpaper.computeShownFrameLocked();
changed = true;
// We only want to be synchronous with one wallpaper.
sync = false;
}
}
}

return changed;
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
public class WindowManagerService extends IWindowManager.Stub
implements Watchdog.Monitor {
......

boolean updateWallpaperOffsetLocked(WindowState wallpaperWin, int dw, int dh,
boolean sync) {
boolean changed = false;
boolean rawChanged = false;
float wpx = mLastWallpaperX >= 0 ? mLastWallpaperX : 0.5f;
float wpxs = mLastWallpaperXStep >= 0 ? mLastWallpaperXStep : -1.0f;
int availw = wallpaperWin.mFrame.right-wallpaperWin.mFrame.left-dw;
int offset = availw > 0 ? -(int)(availw*wpx+.5f) : 0;
changed = wallpaperWin.mXOffset != offset;
if (changed) {
......
wallpaperWin.mXOffset = offset;
}
if (wallpaperWin.mWallpaperX != wpx || wallpaperWin.mWallpaperXStep != wpxs) {
wallpaperWin.mWallpaperX = wpx;
wallpaperWin.mWallpaperXStep = wpxs;
rawChanged = true;
}

float wpy = mLastWallpaperY >= 0 ? mLastWallpaperY : 0.5f;
float wpys = mLastWallpaperYStep >= 0 ? mLastWallpaperYStep : -1.0f;
int availh = wallpaperWin.mFrame.bottom-wallpaperWin.mFrame.top-dh;
offset = availh > 0 ? -(int)(availh*wpy+.5f) : 0;
if (wallpaperWin.mYOffset != offset) {
......
changed = true;
wallpaperWin.mYOffset = offset;
}
if (wallpaperWin.mWallpaperY != wpy || wallpaperWin.mWallpaperYStep != wpys) {
wallpaperWin.mWallpaperY = wpy;
wallpaperWin.mWallpaperYStep = wpys;
rawChanged = true;
}

if (rawChanged) {
try {
......
if (sync) {
mWaitingOnWallpaper = wallpaperWin;
}
wallpaperWin.mClient.dispatchWallpaperOffsets(
wallpaperWin.mWallpaperX, wallpaperWin.mWallpaperY,
wallpaperWin.mWallpaperXStep, wallpaperWin.mWallpaperYStep, sync);
if (sync) {
if (mWaitingOnWallpaper != null) {
long start = SystemClock.uptimeMillis();
if ((mLastWallpaperTimeoutTime+WALLPAPER_TIMEOUT_RECOVERY)
< start) {
try {
......
mWindowMap.wait(WALLPAPER_TIMEOUT);
} catch (InterruptedException e) {
}
......
if ((start+WALLPAPER_TIMEOUT)
< SystemClock.uptimeMillis()) {
......
mLastWallpaperTimeoutTime = start;
}
}
mWaitingOnWallpaper = null;
}
}
} catch (RemoteException e) {
}
}

return changed;
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
while (i > 0) {
i--;
w = localmWindows.get(i);
if ((w.mAttrs.type == WindowManager.LayoutParams.TYPE_WALLPAPER)) {
if (topCurW == null) {
topCurW = w;
topCurI = i;
}
continue;
}
topCurW = null;
if (w.mAppToken != null) {
// If this window's app token is hidden and not animating,
// it is of no interest to us.
if (w.mAppToken.hidden && w.mAppToken.animation == null) {
......
topCurW = null;
continue;
}
}

......

if ((w.mAttrs.flags&FLAG_SHOW_WALLPAPER) != 0 && w.isReadyForDisplay()
&& (mWallpaperTarget == w
|| (!w.mDrawPending && !w.mCommitDrawPending))) {
......

foundW = w;
foundI = i;
if (w == mWallpaperTarget && ((w.mAppToken != null
&& w.mAppToken.animation != null)
|| w.mAnimation != null)) {
// The current wallpaper target is animating, so we'll
// look behind it for another possible target and figure
// out what is going on below.
......
continue;
}
break;
}
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
if (mNextAppTransition != WindowManagerPolicy.TRANSIT_UNSET) {
// If we are currently waiting for an app transition, and either
// the current target or the next target are involved with it,
// then hold off on doing anything with the wallpaper.
// Note that we are checking here for just whether the target
// is part of an app token... which is potentially overly aggressive
// (the app token may not be involved in the transition), but good
// enough (we'll just wait until whatever transition is pending
// executes).
if (mWallpaperTarget != null && mWallpaperTarget.mAppToken != null) {
......
return 0;
}
if (foundW != null && foundW.mAppToken != null) {
......
return 0;
}
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
if (foundAnim && oldAnim) {
int oldI = localmWindows.indexOf(oldW);
......

if (oldI >= 0) {
......

// Set the new target correctly.
if (foundW.mAppToken != null && foundW.mAppToken.hiddenRequested) {
......
mWallpaperTarget = oldW;
}

// Now set the upper and lower wallpaper targets
// correctly, and make sure that we are positioning
// the wallpaper below the lower.
if (foundI > oldI) {
// The new target is on top of the old one.
......
mUpperWallpaperTarget = foundW;
mLowerWallpaperTarget = oldW;
foundW = oldW;
foundI = oldI;
} else {
// The new target is below the old one.
......
mUpperWallpaperTarget = oldW;
mLowerWallpaperTarget = foundW;
}
}
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
start of Activity--start of MainActivity--Step 31

Step 31.*ActivityThread.queueOrSendMessage

frameworks/base/core/java/android/app/ActivityThread.java

public final class ActivityThread {

......

private final class ApplicationThread extends ApplicationThreadNative {

......

// if the thread hasn't started yet, we don't have the handler, so just
// save the messages until we're ready.
private final void queueOrSendMessage(int what, Object obj) {
queueOrSendMessage(what, obj, 0, 0);
}

......

private final void queueOrSendMessage(int what, Object obj, int arg1, int arg2) {
synchronized (this) {
......
Message msg = Message.obtain();
msg.what = what;
msg.obj = obj;
msg.arg1 = arg1;
msg.arg2 = arg2;
mH.sendMessage(msg);
}
}

......

}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 32. H.handleMessage

frameworks/base/core/java/android/app/ActivityThread.java

public final class ActivityThread {

......

private final class H extends Handler {

......

public void handleMessage(Message msg) {
......
switch (msg.what) {
case LAUNCH_ACTIVITY: {
ActivityClientRecord r = (ActivityClientRecord)msg.obj;

r.packageInfo = getPackageInfoNoCheck(
r.activityInfo.applicationInfo);
handleLaunchActivity(r, null);
} break;
......
}

......

}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 33.*ActivityThread.handleLaunchActivity

frameworks/base/core/java/android/app/ActivityThread.java

public final class ActivityThread {

......

private final void handleLaunchActivity(ActivityClientRecord r, Intent customIntent) {
......

Activity a = performLaunchActivity(r, customIntent);

if (a != null) {
r.createdConfig = new Configuration(mConfiguration);
Bundle oldState = r.state;
handleResumeActivity(r.token, false, r.isForward);

......
} else {
......
}
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 34.*ActivityThread.performLaunchActivity

frameworks/base/core/java/android/app/ActivityThread.java

public final class ActivityThread {

......

private final Activity performLaunchActivity(ActivityClientRecord r, Intent customIntent) {

ActivityInfo aInfo = r.activityInfo;
if (r.packageInfo == null) {
r.packageInfo = getPackageInfo(aInfo.applicationInfo,
Context.CONTEXT_INCLUDE_CODE);
}

ComponentName component = r.intent.getComponent();
if (component == null) {
component = r.intent.resolveActivity(
mInitialApplication.getPackageManager());
r.intent.setComponent(component);
}

if (r.activityInfo.targetActivity != null) {
component = new ComponentName(r.activityInfo.packageName,
r.activityInfo.targetActivity);
}

Activity activity = null;
try {
java.lang.ClassLoader cl = r.packageInfo.getClassLoader();
activity = mInstrumentation.newActivity(
cl, component.getClassName(), r.intent);
r.intent.setExtrasClassLoader(cl);
if (r.state != null) {
r.state.setClassLoader(cl);
}
} catch (Exception e) {
......
}

try {
Application app = r.packageInfo.makeApplication(false, mInstrumentation);

......

if (activity != null) {
ContextImpl appContext = new ContextImpl();
appContext.init(r.packageInfo, r.token, this);
appContext.setOuterContext(activity);
CharSequence title = r.activityInfo.loadLabel(appContext.getPackageManager());
Configuration config = new Configuration(mConfiguration);
......
activity.attach(appContext, this, getInstrumentation(), r.token,
r.ident, app, r.intent, r.activityInfo, title, r.parent,
r.embeddedID, r.lastNonConfigurationInstance,
r.lastNonConfigurationChildInstances, config);

if (customIntent != null) {
activity.mIntent = customIntent;
}
r.lastNonConfigurationInstance = null;
r.lastNonConfigurationChildInstances = null;
activity.mStartedActivity = false;
int theme = r.activityInfo.getThemeResource();
if (theme != 0) {
activity.setTheme(theme);
}

activity.mCalled = false;
mInstrumentation.callActivityOnCreate(activity, r.state);
......
r.activity = activity;
r.stopped = true;
if (!r.activity.mFinished) {
activity.performStart();
r.stopped = false;
}
if (!r.activity.mFinished) {
if (r.state != null) {
mInstrumentation.callActivityOnRestoreInstanceState(activity, r.state);
}
}
if (!r.activity.mFinished) {
activity.mCalled = false;
mInstrumentation.callActivityOnPostCreate(activity, r.state);
if (!activity.mCalled) {
throw new SuperNotCalledException(
"Activity " + r.intent.getComponent().toShortString() +
" did not call through to super.onPostCreate()");
}
}
}
r.paused = true;

mActivities.put(r.token, r);

} catch (SuperNotCalledException e) {
......

} catch (Exception e) {
......
}

return activity;
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 35. MainActivity.onCreate

packages/experimental/Activity/src/shy/luo/activity/MainActivity.java

public class MainActivity extends Activity implements OnClickListener {

......

@Override
public void onCreate(Bundle savedInstanceState) {
......

Log.i(LOG_TAG, "Main Activity Created.");
}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
registerReceiver
[Android Software/Hacking General [Developers Only]] llrraa2010:
public class MainActivity extends Activity implements OnClickListener {
......

@Override
public void onResume() {
super.onResume();

IntentFilter counterActionFilter = new IntentFilter(CounterService.BROADCAST_COUNTER_ACTION);
registerReceiver(counterActionReceiver, counterActionFilter);
}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 1. ContextWrapper.registerReceiver

frameworks/base/core/java/android/content/ContextWrapper.java

public class ContextWrapper extends Context {
Context mBase;
......

[MENTION=439709]override[/MENTION]
public Intent registerReceiver(
BroadcastReceiver receiver, IntentFilter filter) {
return mBase.registerReceiver(receiver, filter);
}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 2. ContextImpl.registerReceiver

frameworks/base/core/java/android/app/ContextImpl.java

class ContextImpl extends Context {
......

[MENTION=439709]override[/MENTION]
public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
return registerReceiver(receiver, filter, null, null);
}

[MENTION=439709]override[/MENTION]
public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter,
String broadcastPermission, Handler scheduler) {
return registerReceiverInternal(receiver, filter, broadcastPermission,
scheduler, getOuterContext());
}

private Intent registerReceiverInternal(BroadcastReceiver receiver,
IntentFilter filter, String broadcastPermission,
Handler scheduler, Context context) {
IIntentReceiver rd = null;
if (receiver != null) {
if (mPackageInfo != null && context != null) {
if (scheduler == null) {
scheduler = mMainThread.getHandler();
}
rd = mPackageInfo.getReceiverDispatcher(
receiver, context, scheduler,
mMainThread.getInstrumentation(), true);
} else {
......
}
}
try {
return ActivityManagerNative.getDefault().registerReceiver(
mMainThread.getApplicationThread(),
rd, filter, broadcastPermission);
} catch (RemoteException e) {
return null;
}
}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 3. ActivityThread.getHandler

frameworks/base/core/java/android/app/ActivityThread.java

public final class ActivityThread {
......

final H mH = new H();

private final class H extends Handler {
......

public void handleMessage(Message msg) {
......

switch (msg.what) {
......
}

......
}

......

}

......

final Handler getHandler() {
return mH;
}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 4. LoadedApk.getReceiverDispatcher

frameworks/base/core/java/android/app/LoadedApk.java

final class LoadedApk {
......

public IIntentReceiver getReceiverDispatcher(BroadcastReceiver r,
Context context, Handler handler,
Instrumentation instrumentation, boolean registered) {
synchronized (mReceivers) {
LoadedApk.ReceiverDispatcher rd = null;
HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher> map = null;
if (registered) {
map = mReceivers.get(context);
if (map != null) {
rd = map.get(r);
}
}
if (rd == null) {
rd = new ReceiverDispatcher(r, context, handler,
instrumentation, registered);
if (registered) {
if (map == null) {
map = new HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>();
mReceivers.put(context, map);
}
map.put(r, rd);
}
} else {
rd.validate(context, handler);
}
return rd.getIIntentReceiver();
}
}

......

static final class ReceiverDispatcher {

final static class InnerReceiver extends IIntentReceiver.Stub {
final WeakReference<LoadedApk.ReceiverDispatcher> mDispatcher;
......

InnerReceiver(LoadedApk.ReceiverDispatcher rd, boolean strong) {
mDispatcher = new WeakReference<LoadedApk.ReceiverDispatcher>(rd);
......
}

......
}

......

final IIntentReceiver.Stub mIIntentReceiver;
final Handler mActivityThread;

......

ReceiverDispatcher(BroadcastReceiver receiver, Context context,
Handler activityThread, Instrumentation instrumentation,
boolean registered) {
......

mIIntentReceiver = new InnerReceiver(this, !registered);
mActivityThread = activityThread;

......
}

......

IIntentReceiver getIIntentReceiver() {
return mIIntentReceiver;
}

}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 5. ActivityManagerProxy.registerReceiver

frameworks/base/core/java/android/app/ActivityManagerNative.java

class ActivityManagerProxy implements IActivityManager
{
......

public Intent registerReceiver(IApplicationThread caller,
IIntentReceiver receiver,
IntentFilter filter, String perm) throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(caller != null ? caller.asBinder() : null);
data.writeStrongBinder(receiver != null ? receiver.asBinder() : null);
filter.writeToParcel(data, 0);
data.writeString(perm);
mRemote.transact(REGISTER_RECEIVER_TRANSACTION, data, reply, 0);
reply.readException();
Intent intent = null;
int haveIntent = reply.readInt();
if (haveIntent != 0) {
intent = Intent.CREATOR.createFromParcel(reply);
}
reply.recycle();
data.recycle();
return intent;
}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 6. ActivityManagerService.registerReceiver

frameworks/base/services/java/com/android/server/am/ActivityManagerService.java

public final class ActivityManagerService extends ActivityManagerNative
implements Watchdog.Monitor, BatteryStatsImpl.BatteryCallback {
......

public Intent registerReceiver(IApplicationThread caller,
IIntentReceiver receiver, IntentFilter filter, String permission) {
synchronized(this) {
ProcessRecord callerApp = null;
if (caller != null) {
callerApp = getRecordForAppLocked(caller);
if (callerApp == null) {
......
}
}

List allSticky = null;

// Look for any matching sticky broadcasts...
Iterator actions = filter.actionsIterator();
if (actions != null) {
while (actions.hasNext()) {
String action = (String)actions.next();
allSticky = getStickiesLocked(action, filter, allSticky);
}
} else {
......
}

// The first sticky in the list is returned directly back to
// the client.
Intent sticky = allSticky != null ? (Intent)allSticky.get(0) : null;

......

if (receiver == null) {
return sticky;
}

ReceiverList rl
= (ReceiverList)mRegisteredReceivers.get(receiver.asBinder());
if (rl == null) {
rl = new ReceiverList(this, callerApp,
Binder.getCallingPid(),
Binder.getCallingUid(), receiver);

if (rl.app != null) {
rl.app.receivers.add(rl);
} else {
......
}
mRegisteredReceivers.put(receiver.asBinder(), rl);
}

BroadcastFilter bf = new BroadcastFilter(filter, rl, permission);
rl.add(bf);
......
mReceiverResolver.addFilter(bf);

// Enqueue broadcasts for all existing stickies that match
// this filter.
if (allSticky != null) {
......
}

return sticky;
}
}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
9.3　sendBroadcast

public class CounterService extends Service implements ICounterService {
......

public void startCounter(int initVal) {
AsyncTask<Integer, Integer, Integer> task = new AsyncTask<Integer, Integer, Integer>() {
@Override
protected Integer doInBackground(Integer... vals) {
......
}

@Override
protected void onProgressUpdate(Integer... values) {
super.onProgressUpdate(values);

int counter = values[0];

Intent intent = new Intent(BROADCAST_COUNTER_ACTION);
intent.putExtra(COUNTER_VALUE, counter);

sendBroadcast(intent);
}

@Override
protected void onPostExecute(Integer val) {
......
}

};

task.execute(0);
}

......
}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 1. ContextWrapper.sendBroadcast

frameworks/base/core/java/android/content/ContextWrapper.java

public class ContextWrapper extends Context {
Context mBase;

......

[MENTION=439709]override[/MENTION]
public void sendBroadcast(Intent intent) {
mBase.sendBroadcast(intent);
}

......

}
[Android Software/Hacking General [Developers Only]] llrraa2010:
Step 2.*ContextImpl.sendBroadcast

frameworks/base/core/java/android/app/ContextImpl.java

class ContextImpl extends Context {
......

[MENTION=439709]override[/MENTION]
public void sendBroadcast(Intent intent) {
String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
try {
ActivityManagerNative.getDefault().broadcastIntent(
mMainThread.getApplicationThread(), intent, resolvedType, null,
Activity.RESULT_OK, null, null, null, false, false);
} catch (RemoteException e) {
}
}

......

}