Commit ff9e0bc9 authored by vince-bourgmayer's avatar vince-bourgmayer
Browse files

port commit 62f81106 from eelo-0.1 branch to branch eelo-0.2

parent 405b7547
<!--
Copyright (c) 2018 e.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector android:height="24dp" android:viewportHeight="1024.0"
android:viewportWidth="1024.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M536.3,663.5c-2.2,-5.4 -5.4,-10.4 -9.6,-14.7c-4.1,-4.2 -8.9,-7.4 -14.2,-9.7c-5.3,-2.2 -10.9,-3.4 -16.8,-3.4c-5.9,0 -11.5,1.1 -16.8,3.4c-5.3,2.2 -10.1,5.5 -14.2,9.7c-4.2,4.5 -7.5,9.5 -9.7,14.9c-2.2,5.4 -3.3,11.2 -3.3,17.2c0,6 1.1,11.7 3.3,17.2c2.2,5.4 5.5,10.4 9.7,14.8c4.1,4.2 8.9,7.5 14.2,9.7c5.3,2.2 10.9,3.3 16.8,3.3c5.8,0 11.5,-1.1 16.8,-3.3c3.4,-1.4 6.7,-3.3 9.7,-5.7l1.5,-1.2l-9.5,-4.9l-0.6,0.4c-5.2,3.5 -11.2,5.3 -17.9,5.3c-9.4,0 -17.5,-3.5 -24,-10.4c-5.4,-5.7 -8.6,-12.6 -9.6,-20.4h77.1l0.1,-1.2c0.1,-1.3 0.2,-2.5 0.2,-3.7C539.6,674.8 538.5,669 536.3,663.5L536.3,663.5zM529.1,676h-66.9c0.9,-8 4.1,-14.9 9.6,-20.7c6.5,-6.9 14.6,-10.4 24,-10.4c9.3,0 17.4,3.5 23.8,10.3C525,661 528.3,668 529.1,676z"/>
......
......@@ -3,7 +3,7 @@
<!--
Copyright (c) 2014 Google Inc.
Copyright (C) 2017 The LineageOS Project
Copyright (C) 2018 e.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
......
......@@ -2,7 +2,8 @@
<!--
Copyright (c) 2014 Google Inc.
Copyright (C) 2018 e.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
......
......@@ -2,7 +2,8 @@
<!--
Copyright (C) 2013-2015 The CyanogenMod Project
Copyright (C) 2017 The LineageOS Project
Copyright (C) 2018 e.foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
......@@ -103,5 +104,6 @@
<string name="lockscreen_setup_title">Protect your phone</string>
<string name="lockscreen_setup_summary"><b>Protect this device</b> and require a PIN, pattern, or password to unlock the screen</string>
<string name="lockscreen_setup_screen_lock_setup">Set up</string>
<!-- eelo -->
<string name="eelo_start_synchronizer_err">Cannot start eelo synchronizer</string>
</resources>
/*
* Copyright (C) 2016 The CyanogenMod Project
* Copyright (C) 2017 The LineageOS Project
* Copyright (C) 2018 eelo
* Copyright (C) 2018 e.foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......@@ -62,7 +62,7 @@ public class FinishActivity extends BaseSetupWizardActivity {
private final static int EELO_SYNCHRONIZER_REQUEST_CODE = 0x01;
private boolean hasError = false;
private boolean hasError = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -71,7 +71,7 @@ public class FinishActivity extends BaseSetupWizardActivity {
hasError = false;
try {
Intent intent = new Intent("io.eelo.synchronizer.LAUNCHER"); // TODO static
Intent intent = new Intent("io.eelo.drive.LAUNCHER"); // TODO static
intent.putExtra("EELO_SETTINGS_LAUNCHER", "SETUP_WIZARD");
startActivityForResult(intent, EELO_SYNCHRONIZER_REQUEST_CODE);
......@@ -82,6 +82,9 @@ public class FinishActivity extends BaseSetupWizardActivity {
}
mSetupWizardApp = (SetupWizardApp) getApplication();
mSetupWizardApp.getSettingsBundle().putBoolean(KEY_SEND_METRICS, false); // /e/ do *not* send metrics by default.
mReveal = (ImageView) findViewById(R.id.reveal);
mEnableAccessibilityController =
EnableAccessibilityController.getInstance(getApplicationContext());
......@@ -94,7 +97,7 @@ public class FinishActivity extends BaseSetupWizardActivity {
//super must be called
//super.onActivityResult(requestCode, resultCode, data);
if(requestCode==EELO_SYNCHRONIZER_REQUEST_CODE ) {
if (requestCode==EELO_SYNCHRONIZER_REQUEST_CODE) {
//String message=data.getStringExtra("MESSAGE");
//alert(message);
......@@ -105,7 +108,12 @@ public class FinishActivity extends BaseSetupWizardActivity {
onBackPressed();
}
}
}
}
}
@Override
......@@ -133,7 +141,18 @@ public class FinishActivity extends BaseSetupWizardActivity {
private void finishSetup() {
if (!mIsFinishing) {
mIsFinishing = true;
setupRevealImage();
//setupRevealImage();// eelo remove
// eelo 20180527 - fp - end animation cannot be displayed smoothly on some devices (like zerofltexx)
// Thus byass animation process.
// eelo add
mHandler.post(new Runnable() {
@Override
public void run() {
completeSetup();
}
});
// eelo
}
}
......
/*
* Copyright (C) 2016 The CyanogenMod Project
* Copyright (C) 2017 The LineageOS Project
* Copyright (C) 2018 e.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
/*
* Copyright (C) 2017 The LineageOS Project
* Copyright (C) 2018 e.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -23,8 +24,13 @@ import static org.lineageos.setupwizard.SetupWizardApp.LOGV;
import android.annotation.Nullable;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ComponentName;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import com.android.setupwizardlib.util.SystemBarHelper;
......@@ -46,6 +52,7 @@ public class SetupWizardExitActivity extends BaseSetupWizardActivity {
SetupWizardUtils.enableCaptivePortalDetection(this);
PhoneMonitor.onSetupFinished();
launchHome();
launchEeloSynchronizer();
finish();
applyForwardTransition(TRANSITION_ID_FADE);
Intent i = new Intent();
......@@ -59,4 +66,21 @@ 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();
}
}
}
\ No newline at end of file
  • Everything that linked to io.eelo.synchroniser is outdated and can't work. No need to check that it works

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment