MCPcopy Index your code
hub / github.com/cSploit/android / onCreate

Method onCreate

cSploit/src/org/csploit/android/MainActivity.java:300–419  ·  view source on GitHub ↗
(Bundle savedInstanceState)

Source from the content-addressed store, hash-verified

298 }
299
300 @Override
301 public void onCreate(Bundle savedInstanceState) {
302 SharedPreferences themePrefs = getSharedPreferences("THEME", 0);
303 Boolean isDark = themePrefs.getBoolean("isDark", false);
304 boolean connectivityAvailable;
305
306 if (isDark)
307 setTheme(R.style.DarkTheme);
308 else
309 setTheme(R.style.AppTheme);
310 super.onCreate(savedInstanceState);
311 setContentView(R.layout.target_layout);
312
313 lv = (ListView) findViewById(R.id.android_list);
314 lv.setOnItemClickListener(new ListView.OnItemClickListener() {
315
316 @Override
317 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
318
319 if (mActionMode != null) {
320 ((TargetAdapter) lv.getAdapter()).toggleSelection(position);
321 return;
322 }
323
324 Target target = (Target) mTargetAdapter.getItem(position);
325 System.setCurrentTarget(target);
326
327 new Thread(new Runnable() {
328 @Override
329 public void run() {
330
331 startActivityForResult(new Intent(MainActivity.this,
332 ActionActivity.class), WIFI_CONNECTION_REQUEST);
333
334 overridePendingTransition(R.anim.fadeout, R.anim.fadein);
335
336 }
337 }).start();
338
339 Toast.makeText(MainActivity.this,
340 getString(R.string.selected_) + System.getCurrentTarget(),
341 Toast.LENGTH_SHORT).show();
342
343 }
344 });
345
346 isWifiAvailable = Network.isWifiConnected(this);
347 connectivityAvailable = isWifiAvailable || Network.isConnectivityAvailable(this);
348
349 // make sure system object was correctly initialized during application
350 // startup
351 if (!System.isInitialized()) {
352 // wifi available but system failed to initialize, this is a fatal
353 // :(
354 if (isWifiAvailable) {
355
356 // retry
357 try {

Callers 1

onActivityResultMethod · 0.95

Calls 15

isWifiConnectedMethod · 0.95
isInitializedMethod · 0.95
initMethod · 0.95
registerPluginMethod · 0.95
errorLoggingMethod · 0.95
onInitializationErrorMethod · 0.95
getLastErrorMethod · 0.95
reloadNetworkMappingMethod · 0.95
isCoreInstalledMethod · 0.95
isCoreInitializedMethod · 0.95
startCoreMethod · 0.95

Tested by

no test coverage detected