Loading src/com/cyanogenmod/setupwizard/FinishActivity.java +0 −43 Original line number Diff line number Diff line Loading @@ -65,28 +65,10 @@ public class FinishActivity extends BaseSetupWizardActivity { private volatile boolean mIsFinishing = false; private final static int EELO_SYNCHRONIZER_REQUEST_CODE = 0x01; private boolean hasError = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); hasError = false; try { Intent intent = new Intent("xxx.io.eelo.drive.LAUNCHER"); // TODO static intent.putExtra("EELO_SETTINGS_LAUNCHER", "SETUP_WIZARD"); startActivityForResult(intent, EELO_SYNCHRONIZER_REQUEST_CODE); } catch (android.content.ActivityNotFoundException err) { hasError = true; } mSetupWizardApp = (SetupWizardApp) getApplication(); //mSetupWizardApp.getSettingsBundle().putBoolean(KEY_SEND_METRICS, false); // /e/ do *not* send metrics by default. Loading @@ -97,31 +79,6 @@ public class FinishActivity extends BaseSetupWizardActivity { setNextText(R.string.start); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { //super must be called //super.onActivityResult(requestCode, resultCode, data); if (requestCode==EELO_SYNCHRONIZER_REQUEST_CODE) { //String message=data.getStringExtra("MESSAGE"); //alert(message); if (resultCode == RESULT_CANCELED) { //This is a BACK, or the Activity has not been found. if (!hasError) { // If the activity has not been found do *NOT* return back! (we will be in a (custom) loop) onBackPressed(); } } } } @Override protected int getTransition() { return TRANSITION_ID_SLIDE; Loading src/com/cyanogenmod/setupwizard/SetupWizardExitActivity.java +0 −19 Original line number Diff line number Diff line Loading @@ -51,7 +51,6 @@ public class SetupWizardExitActivity extends BaseSetupWizardActivity { SetupWizardUtils.enableCaptivePortalDetection(this); PhoneMonitor.onSetupFinished(); launchHome(); launchEeloSynchronizer(); finish(); applyForwardTransition(TRANSITION_ID_FADE); Intent i = new Intent(); Loading @@ -65,22 +64,4 @@ public class SetupWizardExitActivity extends BaseSetupWizardActivity { .addFlags(FLAG_ACTIVITY_NEW_TASK|FLAG_ACTIVITY_CLEAR_TASK)); } /* * Launch eelo synchronizer service */ private final void launchEeloSynchronizer() { try { IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_BOOT_COMPLETED); ComponentName receiver = new ComponentName("io.eelo.synchronizer", "io.eelo.synchronizer.triggers.BootCompleteReceiver"); PackageManager pm = getPackageManager(); pm.setComponentEnabledSetting(receiver, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, PackageManager.DONT_KILL_APP); } catch (java.lang.Throwable t) { //Toast.makeText(getApplicationContext(), getString(R.string.eelo_start_synchronizer_err), Toast.LENGTH_LONG).show(); } } } Loading
src/com/cyanogenmod/setupwizard/FinishActivity.java +0 −43 Original line number Diff line number Diff line Loading @@ -65,28 +65,10 @@ public class FinishActivity extends BaseSetupWizardActivity { private volatile boolean mIsFinishing = false; private final static int EELO_SYNCHRONIZER_REQUEST_CODE = 0x01; private boolean hasError = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); hasError = false; try { Intent intent = new Intent("xxx.io.eelo.drive.LAUNCHER"); // TODO static intent.putExtra("EELO_SETTINGS_LAUNCHER", "SETUP_WIZARD"); startActivityForResult(intent, EELO_SYNCHRONIZER_REQUEST_CODE); } catch (android.content.ActivityNotFoundException err) { hasError = true; } mSetupWizardApp = (SetupWizardApp) getApplication(); //mSetupWizardApp.getSettingsBundle().putBoolean(KEY_SEND_METRICS, false); // /e/ do *not* send metrics by default. Loading @@ -97,31 +79,6 @@ public class FinishActivity extends BaseSetupWizardActivity { setNextText(R.string.start); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { //super must be called //super.onActivityResult(requestCode, resultCode, data); if (requestCode==EELO_SYNCHRONIZER_REQUEST_CODE) { //String message=data.getStringExtra("MESSAGE"); //alert(message); if (resultCode == RESULT_CANCELED) { //This is a BACK, or the Activity has not been found. if (!hasError) { // If the activity has not been found do *NOT* return back! (we will be in a (custom) loop) onBackPressed(); } } } } @Override protected int getTransition() { return TRANSITION_ID_SLIDE; Loading
src/com/cyanogenmod/setupwizard/SetupWizardExitActivity.java +0 −19 Original line number Diff line number Diff line Loading @@ -51,7 +51,6 @@ public class SetupWizardExitActivity extends BaseSetupWizardActivity { SetupWizardUtils.enableCaptivePortalDetection(this); PhoneMonitor.onSetupFinished(); launchHome(); launchEeloSynchronizer(); finish(); applyForwardTransition(TRANSITION_ID_FADE); Intent i = new Intent(); Loading @@ -65,22 +64,4 @@ public class SetupWizardExitActivity extends BaseSetupWizardActivity { .addFlags(FLAG_ACTIVITY_NEW_TASK|FLAG_ACTIVITY_CLEAR_TASK)); } /* * Launch eelo synchronizer service */ private final void launchEeloSynchronizer() { try { IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_BOOT_COMPLETED); ComponentName receiver = new ComponentName("io.eelo.synchronizer", "io.eelo.synchronizer.triggers.BootCompleteReceiver"); PackageManager pm = getPackageManager(); pm.setComponentEnabledSetting(receiver, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, PackageManager.DONT_KILL_APP); } catch (java.lang.Throwable t) { //Toast.makeText(getApplicationContext(), getString(R.string.eelo_start_synchronizer_err), Toast.LENGTH_LONG).show(); } } }