Compare commits

..

38 Commits

Author SHA1 Message Date
blinky@build01
3d7ff01666 Automatic translation import
Change-Id: Ic2b7786bf3d0940d5334cc858e72dec0d0d5ad72
Ticket: RM-154
2016-06-17 15:49:31 -07:00
black
6c4bd3b155 SetupWizard: Fix translatability
In case that there are 2 or more "%s" strings within a line, the order can't be changed.

RM-154

Change-Id: I8f68d0ed6b6e5b9ac07316e7c6295df0fa1c4e74
(cherry picked from commit 1125b8dd34)
2016-06-17 11:30:03 -07:00
Abhisek Devkota
e544afbfa9 Automatic translation import
Change-Id: I5e32548d5ddecd139b7727154db74dbec5110b11
Ticket: RM-154
2016-06-13 23:18:35 +02:00
Roman Birg
9dd652049a SetupWizard: GMS page controls the next step
Ticket: CYNGNOS-2533
Change-Id: Icf7dc1de653d18ac60ddfa52dddbe9412dbc8eda
Signed-off-by: Roman Birg <roman@cyngn.com>
(cherry picked from commit 8684e9d4bb)
2016-04-25 09:02:23 -07:00
cretin45
5c06225dae SetupWizard: RIP Whisperpush
WISP-41
Change-Id: I20363cc80dbb1481bd66abb4bd4202212ff37028
(cherry picked from commit 962f9a89d4)
(cherry picked from commit ae793899df)
2016-02-01 15:55:13 -08:00
cretin45
0fbf2cb2e7 SetupWizard: Don't disable packages on main thread
Issue-id: YAM-69

Change-Id: I81ea039a7444d3db5d97b1d798bffe9a6b8ec498
(cherry picked from commit 15b7c92faa)
2016-01-12 16:28:53 -08:00
Jessica Wagantall
1a3fc6f18b res/values: Catch up with mainline on translation values
RM-190

Change-Id: Ibfe379b8465a8b0119c17e5c4b8cedd4aab1055f
2015-12-07 15:16:28 -08:00
d34d
91239dd54a Remove use of mCanceled
It is possible for mCanceled to be set to true even though it
was canceled without ever playing back the cancelation message.
This can end up putting us in an incorrect state where the user
must release both fingers so ACTION_UP finally sets mCanceled to
false.

The cancel() method was still being called and since it does the
proper checks for removing/sending messages, the use of mCanceled
is unneccessary.

Change-Id: I38679d3bf65157a9ba5ca3d898c5c8d55e5df9f5
REF: LETTUCE-293
(cherry picked from commit a726a3d990)
(cherry picked from commit 8bcb714b05)
2015-10-06 12:07:09 -07:00
Roman Birg
a391c52dba SetupWizard: fix stats permission
Ref: CYNGNOS-1144

Change-Id: I3c9ed01b883134c2c10b1be64ae7e1d319c3df9e
Signed-off-by: Roman Birg <roman@cyngn.com>
(cherry picked from commit 5780dade7e)
2015-09-28 16:58:16 -07:00
cretin45
a30464c17a SetupWizard: Handle xfinity captival portal
Addresses CYNGNOS-691 and CYNGNOS-963

Change-Id: I62ef349da48ffd3e9b148e68e946fe550cea2ff7
2015-09-17 13:09:15 -07:00
Brandon McAnsh
293505a62d WifiSetup: Pass the correct componentName and data for captivePortal
* CaptivePortal expects the networkid, which was not being passed on via the intent
* Also use the correct componentName to bring up the sign in page

Addresses CYNGNOS-963

Change-Id: I83d80dc3ec026d7a5a5d4b8bf4cf577214a13da4
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
2015-09-17 13:05:41 -07:00
Danesh M
162dbbda28 Revert "Bump HOME intent priority"
Breaks sim unlock

issue-id: CYNGNOS-1015

This reverts commit e3894884b2.

Change-Id: Iaa9d267521e9e9ecc2d3e18b091680680c0356e0
2015-09-15 09:16:51 -07:00
Raj Yengisetty
e3894884b2 Bump HOME intent priority
Other applications have a higher priority causing some poor
behavior during OOBE (e.g. CryptKeeper). Bumping this to get rid of
some jank during first boot.

issue-id: CYNGNOS-983

Change-Id: I272d1541e22933aa3abd86d2e73c7140eaa4df91
(cherry picked from commit 4fb57dc022)
2015-09-11 12:56:12 -07:00
Tom Powell
576e44a2fe Automatic translation import
Change-Id: Ibdd3f4c2b7fcd45add1d855f72f61f67de93ea6f
CYNGNOS-264
2015-08-22 09:55:17 -07:00
Tom Powell
e4a5c6d9a0 Automatic translation import
Change-Id: Id4e0ec397f0fb74bc7adf0490ab43be933cd3830
CYNGNOS-264
2015-08-22 09:55:01 -07:00
Michael Bestas
fcabaa355d Automatic translation import
Change-Id: Ia4c3c61a0f9e3d5741319ba5d8451283f7ec0089
CYNGNOS-264
2015-08-22 09:54:47 -07:00
Tom Powell
8ad9f4d205 Automatic translation import
Change-Id: I6067047c137f92974969558373e25356ee1e5996
CYNGNOS-264
2015-08-22 09:54:32 -07:00
Tom Powell
905f3c2d28 Automatic translation import
Change-Id: Ie68bf98b4eac46b5584b34fd117712d51524f7c8
CYNGNOS-264
2015-08-22 09:54:18 -07:00
Tom Powell
f9b22ada59 Automatic translation import
Change-Id: I8d9db21a4c4287b8da9c9d247fa949469c9b52fb
CYNGNOS-264
2015-08-22 09:53:45 -07:00
Michael Bestas
a12fdbfdb4 Automatic translation import
Change-Id: Ie00039c8ccea2c1aecdcef5f4fb1a9d37ca78b02
CYNGNOS-264
2015-08-22 09:53:21 -07:00
Ricardo Cerqueira
06af11c5e3 SetupWizard: Don't wait for data connection to present the data toggle
We can proceed to the data enablement screen as soon as the device
confirms the requested slot is active. Waiting for an actual data
connection kinda breaks the point of that screen :)

Addresses CYNGNOS-660 and CRACKLING-503

Change-Id: I975508852b37c0e4b112612ac10aacb71ded97b3
2015-08-20 09:43:22 -07:00
cretin45
b3e9593465 SetupWizard: Improve wait for data sim change logic
Invalid sims and bad connections causes huge delays when switching. This disallows switching to invalid sims. It also fixes a bug were the next button would get enabled while waiting on a switch.

CRACKLING-503

Change-Id: I6cf7391910cc23554bb418c3083e736a3f06e037
(cherry picked from commit 4ef509ac48)
2015-08-19 17:07:53 -07:00
cretin45
67ad7c8d22 SetupWizard: Wait for data sim change
When changing the default data sim for msim, disable the next action until the operation completes.
This PS also refactors how the wait for radio logic a bit.

CRACKLING-503

Change-Id: I38ba3ea00f63d3e42c260e5b0e8558c3bc9d347f
(cherry picked from commit 62db452188)
2015-08-18 16:44:52 -07:00
Brint E. Kriebel
b9d3610779 SetupWizard: remove crash-inducing debug line
Introduced in Ia1a81c4443cfd5bc3c3e5fd84758ff0ba2a2a140, this causes
an NPE in some situations.

Change-Id: I13239eb92b69087fe2c91b46482ff76748ab1c19
Ticket: CYNGNOS-707
(cherry picked from commit 4ea986255f)
2015-08-10 17:00:52 -07:00
Ricardo Cerqueira
3e84ea8acf SetupWizard: Adjust FRP-enforcing logic
* Always pass ALLOW_SKIP to GMS, it's smart enough to know when it
   can't be applied.
 * Don't bring up the authentication screen if no-network and canSkip

Still CYNGNOS-707

Change-Id: Ia1a81c4443cfd5bc3c3e5fd84758ff0ba2a2a140
(cherry picked from commit 649a5ec162)
2015-08-10 05:40:37 -07:00
Roman Birg
12ebb2939b SetupWizard: don't allow skipping FRP
Fixes CYNGNOS-707
Change-Id: I7532c0c68418458b921a98e556ee3172b2cf1af3
Signed-off-by: Roman Birg <roman@cyngn.com>
(cherry picked from commit d587f56e2e)
2015-08-07 15:59:05 -07:00
Roman Birg
f38055d366 SetupWizard: add Kiev timezone to match Settings
Ref: CYNGNOS-453

Change-Id: Ide11d2be1c97806a674035a322cf32b1014fd8ac
Signed-off-by: Roman Birg <roman@cyngn.com>
(cherry picked from commit 1d26db14eb)
2015-07-29 17:10:43 -07:00
Michael Bestas
ce34270108 Automatic translation import
CYNGNOS-264
Change-Id: I736deda8d6c87196050022ac0e7b6bf8b56dbba2
(cherry picked from commit c7a58bcc60)
2015-07-28 23:24:30 -07:00
Michael Bestas
ab39b28a82 Automatic translation import
CYNGNOS-264
Change-Id: Id3f47c59d6fa731a38b9459096aedfffc1433091
(cherry picked from commit c10e45a55c)
2015-07-28 22:49:01 -07:00
Michael Bestas
215edbfc47 Automatic translation import
CYNGNOS-264
Change-Id: I557f278a00d76536615ee4b6fbc0ff006c5be140
(cherry picked from commit 79f63d23c1)
2015-07-28 22:14:04 -07:00
Michael Bestas
8db048cd96 Automatic translation import
CYNGNOS-264
Change-Id: I6ac0b00fea1c482c3f87ae10600a1c913afcc8af
(cherry picked from commit a1c8217e77)
2015-07-28 21:28:48 -07:00
Michael Bestas
51a04e081c Automatic translation import
CYNGNOS-264
Change-Id: I0b037995358cde955daf940e5f0bfaf9beec5431
(cherry picked from commit e8ae2d7cdf)
2015-07-28 12:21:24 -07:00
emancebo
f3316e9912 SetupWizard: check if mobile data is enabled from telephony API
System property ro.com.android.mobiledata is no longer used

issue-id: JALEBI-135
Change-Id: Iac088d50dc50227e805b58b537c38082b6797291
(cherry picked from commit c92c4b6a3a)
2015-07-21 10:12:52 -07:00
d34d
9e2b283e06 Move fingerprint setup to end of OOBE
Fingerprint setup should occur after the user has setup any accounts
and before the customization page.

Change-Id: I1305d89e17da1f8d405c8bd5b8b8b5268a2ba38c
(cherry picked from commit 6d93813829)
Ticket: SAMBAR-189
2015-07-14 18:33:55 -07:00
d34d
2b3440aeb5 Reword strings on FingerprintSetupPage
Change-Id: Iacfeb3f4c7324df825ab9c3a67d5bfa225fbdf1c
(cherry picked from commit c78801e2e7)
Ticket: SAMBAR-197
2015-07-14 18:26:34 -07:00
d34d
98a5906b20 Merge Squashed Fingerprint Patches Into Stable [4/4]
See also
  frameworks/base
  libhardware
  Settings

Enroll fingerprint via SetupWizard [2/2]
Squashed-Id: Ieabfb0f3b789b02ddd1e17aba1eadfda52b21384

Change-Id: I456b54e4946dba9448757d9fa75e13e9b8fa1270
2015-07-12 19:18:18 -07:00
Matt Garnes
616db63139 Fix incorrect retrieval of SIM Network Operator.
We were incorrectly passing the phone ID to TelephonyManager instead of
the subscription ID. Pass the correct identifier to retrieve the network
operator name.

Change-Id: I266d2ce39c72db6e97eff5a36c5fec6242d516cc
(cherry picked from commit b31cb54361)
2015-06-29 13:05:36 -07:00
Raj Yengisetty
497ddd6b71 SetupWizard: protect against IllegalStateExceptions in telephony
Telephony throws this exception in some cases when retrieving SIM state

Change-Id: I87e14aaa328d46ebba4990559f6531de4e961d68
(cherry picked from commit b72e820a96)
2015-06-19 01:04:59 +00:00
8 changed files with 21 additions and 68 deletions

View File

@@ -15,8 +15,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-v4 \
android-support-v13 \
play \
libphonenumber \
org.cyanogenmod.platform.sdk
libphonenumber
# Include res dir from chips
google_play_dir := ../../../external/google/google_play_services/libproject/google-play-services_lib/res

View File

@@ -42,13 +42,12 @@
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_THEME_MANAGER"/>
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" />
<uses-permission android:name="cyanogenmod.permission.HARDWARE_ABSTRACTION_ACCESS" />
<uses-permission android:name="android.permission.HARDWARE_ABSTRACTION_ACCESS" />
<uses-permission android:name="android.permission.BACKUP" />
<uses-permission android:name="cyanogenmod.permission.FINISH_SETUP" />
<uses-permission android:name="cyanogenmod.permission.LEGALESE" />
<uses-permission android:name="com.cyngn.stats.SEND_ANALYTICS" />
<uses-permission android:name="com.cyanogen.permission.REQUEST_KILL_SWITCH_OP" />
<uses-permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE" />
<permission
android:name="cyanogenmod.permission.PROTECTED_APP"

View File

@@ -21,5 +21,4 @@
0=default sim image, 1=sim on side, 2=sim on back-->
<integer name="sim_image_type">0</integer>
<bool name="check_custom_theme_by_default">true</bool>
<string name="default_custom_lockscreen_component"></string>
</resources>

View File

@@ -124,14 +124,10 @@ public class CMSetupWizardData extends AbstractSetupData {
private void showHideSimMissingPage() {
SimCardMissingPage simCardMissingPage =
(SimCardMissingPage) getPage(SimCardMissingPage.TAG);
if (simCardMissingPage != null) {
if (isSimInserted()) {
simCardMissingPage.setHidden(true);
if (isCurrentPage(simCardMissingPage)) {
onNextPage();
}
} else {
simCardMissingPage.setHidden(false);
if (simCardMissingPage != null && isSimInserted()) {
simCardMissingPage.setHidden(true);
if (isCurrentPage(simCardMissingPage)) {
onNextPage();
}
}
}
@@ -187,8 +183,7 @@ public class CMSetupWizardData extends AbstractSetupData {
continue;
}
if (state != TelephonyManager.SIM_STATE_ABSENT
&& state != TelephonyManager.SIM_STATE_UNKNOWN
&& state != TelephonyManager.SIM_STATE_NOT_READY) {
&& state != TelephonyManager.SIM_STATE_UNKNOWN) {
return true;
}
}

View File

@@ -27,6 +27,7 @@ import android.content.pm.PackageManager;
import android.content.pm.ThemeUtils;
import android.content.res.ThemeConfig;
import android.content.res.ThemeManager;
import android.hardware.CmHardwareManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.RemoteException;
@@ -36,20 +37,16 @@ import android.text.Spannable;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.util.Log;
import android.view.IWindowManager;
import android.view.View;
import android.view.WindowManagerGlobal;
import android.view.WindowManagerPolicyControl;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import com.android.internal.widget.LockPatternUtils;
import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp;
import com.cyanogenmod.setupwizard.cmstats.SetupStats;
@@ -61,8 +58,6 @@ import com.cyanogenmod.setupwizard.util.WhisperPushUtils;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import cyanogenmod.hardware.CMHardwareManager;
public class CyanogenSettingsPage extends SetupPage {
public static final String TAG = "CyanogenSettingsPage";
@@ -108,8 +103,9 @@ public class CyanogenSettingsPage extends SetupPage {
Settings.Secure.putInt(context.getContentResolver(),
Settings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0);
final CMHardwareManager hardware = CMHardwareManager.getInstance(context);
hardware.set(CMHardwareManager.FEATURE_KEY_DISABLE, enabled);
final CmHardwareManager cmHardwareManager =
(CmHardwareManager) context.getSystemService(Context.CMHW_SERVICE);
cmHardwareManager.set(CmHardwareManager.FEATURE_KEY_DISABLE, enabled);
/* Save/restore button timeouts to disable them in softkey mode */
SharedPreferences.Editor editor = prefs.edit();
@@ -149,7 +145,6 @@ public class CyanogenSettingsPage extends SetupPage {
});
handleEnableMetrics();
handleDefaultThemeSetup();
handleDefaultLockscreenSetup();
}
private void handleEnableMetrics() {
@@ -178,41 +173,16 @@ public class CyanogenSettingsPage extends SetupPage {
}
}
private void handleDefaultLockscreenSetup() {
String defaultLockscreenComponent = mContext.getResources().getString(
R.string.default_custom_lockscreen_component);
if (!TextUtils.isEmpty(defaultLockscreenComponent)) {
ComponentName cn =
ComponentName.unflattenFromString(defaultLockscreenComponent);
if (cn != null) {
try {
Log.i(TAG, "Applying default lockscreen");
LockPatternUtils util = new LockPatternUtils(mContext);
util.setThirdPartyKeyguard(cn);
disableImmersivePromptForLockscreen(cn);
} catch (PackageManager.NameNotFoundException | SecurityException e) {
Log.w(TAG, "Error setting default lockscreen: " + cn, e);
}
}
}
}
private void disableImmersivePromptForLockscreen(ComponentName cn) {
// prevents the immersive screen hint for the lockscreen
WindowManagerPolicyControl policy = new WindowManagerPolicyControl();
policy.reloadFromSetting(mContext);
policy.addToPreconfirmWhiteList(cn.getPackageName());
policy.saveToSettings(mContext);
}
private static boolean hideKeyDisabler(Context ctx) {
final CMHardwareManager hardware = CMHardwareManager.getInstance(ctx);
return !hardware.isSupported(CMHardwareManager.FEATURE_KEY_DISABLE);
final CmHardwareManager cmHardwareManager =
(CmHardwareManager) ctx.getSystemService(Context.CMHW_SERVICE);
return !cmHardwareManager.isSupported(CmHardwareManager.FEATURE_KEY_DISABLE);
}
private static boolean isKeyDisablerActive(Context ctx) {
final CMHardwareManager hardware = CMHardwareManager.getInstance(ctx);
return hardware.get(CMHardwareManager.FEATURE_KEY_DISABLE);
final CmHardwareManager cmHardwareManager =
(CmHardwareManager) ctx.getSystemService(Context.CMHW_SERVICE);
return cmHardwareManager.get(CmHardwareManager.FEATURE_KEY_DISABLE);
}
private static boolean hideThemeSwitch(Context context) {

View File

@@ -13,7 +13,7 @@ public class FinishSetupReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (SetupWizardUtils.isDeviceLocked() || SetupWizardUtils.frpEnabled(context)) {
if (SetupWizardUtils.isDeviceLocked()) {
return;
}
Settings.Global.putInt(context.getContentResolver(), Settings.Global.DEVICE_PROVISIONED, 1);

View File

@@ -144,9 +144,9 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
mRootView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
boolean consumeIntercept = mEnableAccessibilityController.onInterceptTouchEvent(event);
boolean consumeTouch = mEnableAccessibilityController.onTouchEvent(event);
return consumeIntercept && consumeTouch;
return
mEnableAccessibilityController.onInterceptTouchEvent(event) &
mEnableAccessibilityController.onTouchEvent(event);
}
});
registerReceiver(mSetupData, mSetupData.getIntentFilter());

View File

@@ -30,7 +30,6 @@ import android.os.IBinder;
import android.os.ServiceManager;
import android.os.UserHandle;
import android.os.UserManager;
import android.service.persistentdata.PersistentDataBlockManager;
import android.telephony.ServiceState;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
@@ -143,14 +142,6 @@ public class SetupWizardUtils {
return false;
}
public static boolean frpEnabled(Context context) {
final PersistentDataBlockManager pdbManager = (PersistentDataBlockManager)
context.getSystemService(Context.PERSISTENT_DATA_BLOCK_SERVICE);
return pdbManager != null
&& pdbManager.getDataBlockSize() > 0
&& !pdbManager.getOemUnlockEnabled();
}
public static boolean hasKillSwitch() {
IBinder b = ServiceManager.getService(Context.KILLSWITCH_SERVICE);
IKillSwitchService service = IKillSwitchService.Stub.asInterface(b);