Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42b1a100 authored by Unknown's avatar Unknown
Browse files

Remove drive launcher

parent 4da98b21
Loading
Loading
Loading
Loading
+0 −43
Original line number Original line Diff line number Diff line
@@ -65,28 +65,10 @@ public class FinishActivity extends BaseSetupWizardActivity {


    private volatile boolean mIsFinishing = false;
    private volatile boolean mIsFinishing = false;
    
    
    private final static int EELO_SYNCHRONIZER_REQUEST_CODE = 0x01;
    
    private boolean hasError    = false;
    
    @Override
    @Override
    protected void onCreate(Bundle savedInstanceState) {
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(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 = (SetupWizardApp) getApplication();


		//mSetupWizardApp.getSettingsBundle().putBoolean(KEY_SEND_METRICS, false);  // /e/ do *not* send metrics by default.
		//mSetupWizardApp.getSettingsBundle().putBoolean(KEY_SEND_METRICS, false);  // /e/ do *not* send metrics by default.
@@ -97,31 +79,6 @@ public class FinishActivity extends BaseSetupWizardActivity {
        setNextText(R.string.start);
        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
    @Override
    protected int getTransition() {
    protected int getTransition() {
        return TRANSITION_ID_SLIDE;
        return TRANSITION_ID_SLIDE;
+0 −19
Original line number Original line Diff line number Diff line
@@ -51,7 +51,6 @@ public class SetupWizardExitActivity extends BaseSetupWizardActivity {
        SetupWizardUtils.enableCaptivePortalDetection(this);
        SetupWizardUtils.enableCaptivePortalDetection(this);
        PhoneMonitor.onSetupFinished();
        PhoneMonitor.onSetupFinished();
		launchHome();
		launchHome();
		launchEeloSynchronizer();
		finish();
		finish();
        applyForwardTransition(TRANSITION_ID_FADE);
        applyForwardTransition(TRANSITION_ID_FADE);
        Intent i = new Intent();
        Intent i = new Intent();
@@ -65,22 +64,4 @@ public class SetupWizardExitActivity extends BaseSetupWizardActivity {
                .addFlags(FLAG_ACTIVITY_NEW_TASK|FLAG_ACTIVITY_CLEAR_TASK));
                .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();
        }
    }
    
}
}