use of android.app.ActivityThread in project android_frameworks_base by ParanoidAndroid.
the class ActivityManagerService method main.
public static final Context main(int factoryTest) {
AThread thr = new AThread();
thr.start();
synchronized (thr) {
while (thr.mService == null) {
try {
thr.wait();
} catch (InterruptedException e) {
}
}
}
ActivityManagerService m = thr.mService;
mSelf = m;
ActivityThread at = ActivityThread.systemMain();
mSystemThread = at;
Context context = at.getSystemContext();
context.setTheme(android.R.style.Theme_Holo);
m.mContext = context;
m.mFactoryTest = factoryTest;
m.mMainStack = new ActivityStack(m, context, true, thr.mLooper);
m.mIntentFirewall = new IntentFirewall(m.new IntentFirewallInterface());
m.mBatteryStatsService.publish(context);
m.mUsageStatsService.publish(context);
m.mAppOpsService.publish(context);
synchronized (thr) {
thr.mReady = true;
thr.notifyAll();
}
m.startRunning(null, null, null, null);
return context;
}
use of android.app.ActivityThread in project android_frameworks_base by ResurrectionRemix.
the class SystemServer method createSystemContext.
private void createSystemContext() {
ActivityThread activityThread = ActivityThread.systemMain();
mSystemContext = activityThread.getSystemContext();
mSystemContext.setTheme(DEFAULT_SYSTEM_THEME);
}
use of android.app.ActivityThread in project platform_frameworks_base by android.
the class SystemServer method createSystemContext.
private void createSystemContext() {
ActivityThread activityThread = ActivityThread.systemMain();
mSystemContext = activityThread.getSystemContext();
mSystemContext.setTheme(DEFAULT_SYSTEM_THEME);
}
use of android.app.ActivityThread in project cornerstone by Onskreen.
the class ActivityManagerService method main.
public static final Context main(int factoryTest) {
AThread thr = new AThread();
thr.start();
synchronized (thr) {
while (thr.mService == null) {
try {
thr.wait();
} catch (InterruptedException e) {
}
}
}
ActivityManagerService m = thr.mService;
mSelf = m;
ActivityThread at = ActivityThread.systemMain();
mSystemThread = at;
Context context = at.getSystemContext();
context.setTheme(android.R.style.Theme_Holo);
m.mContext = context;
m.mFactoryTest = factoryTest;
/**
* Author: Onskreen
* Date: 19/02/2011
*
* Instantiate the stacks with cornerstone flags
*/
//m.mMainStack = new ActivityStack(m, context, true);
m.mMainStack = new ActivityStack(m, context, true, false, -1);
/**
* Author: Onskreen
* Date: 12/01/2011
*
* Instantiate the stacks for cornerstone
*/
m.mCornerstoneStack = new ActivityStack(m, context, false, false, -1);
for (int i = 0; i < m.mMaxNumCornerstonePanels; i++) {
ActivityStack panelStack = new ActivityStack(m, context, false, true, i);
m.mCornerstonePanelStacks.add(panelStack);
}
/**
* Author: Onskreen
* Date: 20/07/2011
*
* populate the mCornerstoneAppPackageName, mCornerstoneLauncherAppPackageName and
* mCornerstoneLauncherClassName from the cornerstone.xml
*/
XmlResourceParser xpp = null;
try {
Resources res = context.getResources();
xpp = res.getXml(com.android.internal.R.xml.cornerstone);
xpp.next();
int eventType = xpp.getEventType();
String tag;
while (eventType != XmlPullParser.END_DOCUMENT) {
if (eventType == XmlPullParser.START_DOCUMENT) {
} else if (eventType == XmlPullParser.START_TAG) {
tag = xpp.getName();
if (tag.equals("pkg")) {
xpp.next();
m.mCornerstoneAppPackageName = xpp.getText();
} else if (tag.equals("launcher")) {
xpp.next();
tag = xpp.getName();
if (tag.equals("pkg")) {
xpp.next();
m.mCornerstoneLauncherAppPackageName = xpp.getText();
xpp.next();
}
xpp.next();
tag = xpp.getName();
if (tag.equals("class")) {
xpp.next();
m.mCornerstoneLauncherClassName = xpp.getText();
xpp.next();
}
break;
}
}
eventType = xpp.next();
}
xpp.close();
} catch (XmlPullParserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
xpp.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
xpp.close();
}
m.mBatteryStatsService.publish(context);
m.mUsageStatsService.publish(context);
synchronized (thr) {
thr.mReady = true;
thr.notifyAll();
}
m.startRunning(null, null, null, null);
return context;
}
use of android.app.ActivityThread in project android_frameworks_base by DirtyUnicorns.
the class SystemServer method createSystemContext.
private void createSystemContext() {
ActivityThread activityThread = ActivityThread.systemMain();
mSystemContext = activityThread.getSystemContext();
mSystemContext.setTheme(DEFAULT_SYSTEM_THEME);
}
Aggregations