* Keep track of the state of the finish process to ensure things happen
when expected and as expected. Helps with debugging.
* A little refactoring and additional comments.
Change-Id: Ia9a70cb2148c9870ccffc15f1de3dae927b2710d
* Luxemburgish (lb) was accidentially mapped to "lu" for all of the
non-AOSP projects.
* Since the next sync will download "lb" now, just remove "lu"
Change-Id: I1911df5cec057fd61126109ecacd70f198d0decf
If an activity is re-created, its result launchers that were registered
during instantiation are not available, so register those in onCreate
instead and unregister in onDestroy.
Change-Id: I7fd2a61ddbb056e0bf761b6918dc371db8ddbe33
Make sure the prior activity (NetworkSetupActivity) knows that back was
pressed - as it must have been - when the user returns to it. Otherwise,
the wizard gets stuck on a "Just a sec" page forever.
Change-Id: I35f7a78c4decc13b9dee267bfaf195fb2241395d
windowShowWallpaper behaves unexpectedly with transitions as of 14 QPR3.
As a result, the changes of "Revamp outro animation" were causing the
transition into the final page of the wizard to instantaneously have
a transparent wallpaper background, even before the animation finished.
This was jarring and odd, so now we use a regular theme until we are
ready to start our animation, at which point we recreate the activity
with the EdgeToEdgeWallpaperBackground (windowShowWallpaper) theme
before running the animation.
Change-Id: Ib19918d7d2a615aff44a48066b17ec9d2f04bac6
* Rename or eliminate methods that could be easily confused for AOSP
methods due to the reuse of AOSP names.
* Separate out the handling of results for subactivites and for the
next action (intent), each using its own activity launcher and
callback.
* Add a StartDecoratedActivityForResult contract to ease the launching
of activities without the caller needing to add SUW-related extras.
Change-Id: Iffaba4c51b2c90c42b8b243874a62cdea9e0c793
Check the availability of biometrics when we need to know, waiting until
then to decide the presence of ScreenLockActivity, rather than checking
once during initialization and permanently disabling pages of the setup
wizard. Otherwise, a race condition may cause the system to report that
the hardware is unavailable, even though it will be ready when needed.
Reorder pages such that biometrics comes first, allowing screen lock
to act as the fallback.
Issue: calyxos#2544
Change-Id: I654ce25569b983035f1df453623c7a4acd54931d
When exiting, all activities are finished and therefore no longer in recents. For the work profile, we want users to be able to come back to it
Issue: calyxos#2020
Change-Id: Id236c193e5822568dc445ea561fe18a4664e73cc
* Properly allow the user to go backwards to prior to the SIM Missing
page, if it had ever appeared and then a SIM became available.
* Ignore the activity result. Wizard remains on SIM Missing page until
user chooses to leave or returns to wizard with SIM present.
Change-Id: I3edac6cbb03d76c66b04673d6104e98189ce365c
Currently, we hardcode TRANSITION_FADE_THROUGH because it is the default
as of now and it is also what Settings uses. It appears to match stock's
transition animations, too.
Issue: calyxos#1743
Change-Id: Iffe19e5b4fd552aab6c5a93bc3788a27b5eba00b
This matches the behaviour prior to the Lineage suw revamp on 21.
Setupwraith hooks things in a completely different manner to the mobile
gms suw. The Lineage suw should not run at all when atv gms is present,
but the apk still needs to be available should the tvsetup intent hooks
get implemented.
Change-Id: Ic4943e8fd55d30fbd2856dc5eadc5a0ce6282f29
Extend the current Ethernet connectivity validation to check
if network is active (can receive and send data).
Change-Id: I1017df7740000774acc713a419c8572ee4ea588f
NetworkCapabilities#hasCapability tests for the presence of a
capability, not of a transport. Use the proper method to fix the
Ethernet connectivity validation.
Change-Id: I7e1828cca420e9a84080ede51807ab12ec9eedcb
Do not let SetupWizard crash in case the WiFi service is not available,
which can happen in case of devkits without built-in WiFi support.
Change-Id: Iba72e941b5e4995e865c70cb6c2b6be9a721addc
Devices with a hardware back button, such as atv remotes, can press back
on the welcome screen and trigger a transition to a waiting screen then
back to welcome. This should not be allowed.
Change-Id: I2273d0d74fb1ef018074d4facc8e3793e7470f6f
* Intentionally not touching this for secondary users
so that it doesn't look different from the main user.
* We don't explicitly support that, but let's also not
go out of our way to break something like this.
Change-Id: I374b45feb7d6dd17e5d03d0f7fbaf6d9e22f1d55
Mobile data during and after setupwizard can be controlled with:
ro.com.android.mobiledata
ro.com.android.prov_mobiledata
Change-Id: Ia4ef25f55ab32e8c13f9683b5db73438a29a192b
Seedvault backups can be restored from any OS that includes Seedvault,
they are not restricted to LineageOS.
Change-Id: Ie3d896d0377c8d2fe47558ae6a2bb54a0864498c
when a subactivity is missing the setup wizard crashes and puts the user back to the previous page
this patch allows the user to continue as if they skipped
Change-Id: Icb4937b1751d9612c32cb3012f9fc05de2640891
Use the wallpaper as part of the window background rather than trying
to replicate it with WallpaperManager. This allows us to perform a
circular hide to whatever the wallpaper currently looks like exactly,
rather than needing to obtain the wallpaper Bitmap or Drawable and
guess. Display the Finish activity edge-to-edge. Fade out rather
than slide out.
Change-Id: I1154043178a04ca0ced7e8365e338dc10f3377cb
Wait for the ACTION_FINISHED broadcast before finishing the Activity.
This prevents the Setup Wizard from being re-launched when it is still
set as the default home screen, which it continues to be until the
exit worker changes as part of its finishSetupWizard call.
Skip SetupWizardExitActivity during the normal finish process, moving
common exit operations to SetupWizardUtils.
Change-Id: I1c59553e7dcaf934fb81dce9bf901ec0f2bb7b59
Moved and refactored missingSim and its helper functions into
SetupWizardUtils, making them static. This was the only part of
PhoneMonitor that was used anymore.
Change-Id: I220e82e83bdb301206c4286b562f69c223de56e2
During restore, Settings which the user may have set earlier during setup may be overwritten. Avoid this by restoring before allowing the user to set new values
Change-Id: Id64378fb44e00da1c666cba7a737f03f9f0b88b8
Fix crash caused by attempting to unregister an unregistered broadcast receiver when the instance is registered but the broadcast receiver is not during setup finish
Change-Id: I0e85492fe5c3a273ed6a2d16fe41bdd7539ffb4b
It's missing the EUICC toggle and makes SUW crash. Just remove it since
it's the only landscape layout and not really required.
Change-Id: Ie6c8485a91a1b428d83cbb086be1bf19ec8411e2
The user won't see our location page, which ends up disabling AGPS
by default with no way to toggle it and without the user knowing,
leading to poor GPS performance.
Change-Id: I90de4a061a244c9da9eaca020e3b411c62da0e3e
Previously a call to mark user setup as completed for managed profiles
was removed from the device policy manager service to avoid exiting the
setup wizard while launching it after successfully provisioning.
If a the setup wizard did not finish correctly it had side effects
(e.g. work profile apps would not remain in recent activities).
Allow managed profiles to launch the setup wizard even if user setup
is marked as completed.
Issue: calyxos#1024
Issue: calyxos#1123
Change-Id: I940937dd02f2d4991677da886bb3a4f522661210
Captive portal, wi-fi and mobile data should not be modified for secondary users without user intervention
Issue: calyxos#1025
Change-Id: Ic24d18268d05b5a1535b3993bdd0a614055847f6
When setting up the finishing sequence, the navigation bar gets
hidden, resulting in the layout adjusting and moving.
Once the start button is pressed, pressing back on the navigation
bar is ignored.
Change-Id: Ibb961ab059c2b8be38e88db691d4293e180f3b1c
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
Instead of hardcoding the privacy policy uri, move it to a strings resource
which allows overlaying it.
Change-Id: Iff83ba6a7654f5c5e3f7fc8366f96fcec3517390
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
Mobile builds on devices with no touch panel are also getting these
settings applied, which is not intended.
Change-Id: Iab4e8deea1793ee1582b5e2f730bfc193cf05b41
* Checks if config.disable_bluetooth=true is set
* Some leanback devices do not have bluetooth chips
Change-Id: Id4d3445e24d9888e186b69a959dbaf54fc9bf31e
This reverts commit 7ffdf8d12c.
Reason for revert:
The code change was not changing the behaviour after all.
Change-Id: Ibe335a2b94d5120b9c3f1a247d8153a0d791b796
* Instead of showing an exception when exiting the SuW via the script,
check if we have to enable and run the Google SuW stuff and only do
it then
Change-Id: I628e1ee40a97db9af1975825f059227446a9ee18
* Hard to view on dark mode and it's redundant as
another SIM icon exists on the page. We can't really
have an "illustration" for a generic ROM as every
device is different and doesn't have SIM in the same
place.
Change-Id: I443360e5b75aded8645e83365cc64641e6c5638e
* Set the initial focus on a usable view instead of a whole layout.
* Set the next focus of the locale selector to next-button.
Change-Id: I4a16127c24e87b52e38892882e44b3a8d24b779b
* setupdesign now uses a layout-land
* Rearrange welcome activity
* Add a padding of 56dp for each activity based on
external/setupdesign/main/res/values/dimens.xml
´sud_glif_icon_margin_top´
Change-Id: I77ec3d1c3d62a66aeb76233eccafbea96804e701
Set description via getGlifLayout().setDescriptionText instead of
writing it in layout to display it properly in two columns when
in landscape. No visual change in portrait.
Change-Id: I7465a7fbc5819d429bb886a5582fb1f1d4db9a47
* Remove mobile data/choose data sim pages
* Rename Wi-Fi setup to network setup
* Switch to the new NetworkProviderSettings which contains
both Wi-Fi and mobile data setup.
Change-Id: I1c618d629628740e39dbed313d468d1efe971ed7
* Hide the layout with emergency call and accessibility options.
* Make the brand logo 80% of the view height to avoid scrolling.
Change-Id: I2d56129331c0ebb9d4b9273308ec2a0fa163f4b6
Targeting S+ (version 31 and above) requires that an explicit value
for android:exported be defined when intent filters are present
Change-Id: I2ce2b2cd1dcd69e343ae8577587483b19d825fdc
StatusBarManager uses tokens in binder connections to identify
disable records and queue each of them accordingly. New record creates
each time an application connects to StatusBarManager and tries to change
the state. New records don't activate until previous ones are destroyed.
Records can be destroyed either when app binder dies, or when the same
binder ticket reverts its previous changes.
To accomodate this behavior, StatusBarManager was moved to a static class
that initializes first when status bar gets disabled, and then gets destroyed
when status bar is re-enabled.
While we're at it, also fix race condition between main and exit activites
by moving status bar disabling code to the application class.
Change-Id: I3b33e628da1e1881181cbe665e6aaccee3dd19ef
Remove unused extras:
allowSkip: Removed in 2015
wifi_auto_finish_on_connect: Removed in 2016
Use WizardManagerHelper definitions when possible
Change-Id: I4e6a503ae030b85486921fcacfc4fe03e37c8698
ConnectivityManager.getCaptivePortalServerUrl now requires
NETWORK_SETTINGS instead of LOCAL_MAC_ADDRESS.
Change-Id: Idd9b7b683a48e49d97fca90bb62d81ee0629b672
* Currently we are storing a copy of timezones.xml ourselves and parsing
it manually
* Use ZoneGetter from SettingsLib instead to get the list of TimeZones
* That way we have less code to maintain and updates to the list are easier
as well
* Also simplify constructTimezoneAdapter -> we never sort by name
Change-Id: Ifd690ed28c6fbecaee895b4063137e86c059e314
* Right now, the user has to set the toggle on and off to actually get
the setting set to "off", since the underlying default value is "on"
* Make sure to send an "off" initially right at the beginning of SuW
Change-Id: Iec2fd05ea341351f3e6d4b195a1a385f9d88d4f7
* This is likely an artifact of the {cm,lineage}sdk
transition that included this lib
* Now the lib is only included in a separate library
to avoid unnecessary disk waste
Change-Id: Ib12acac080f4a2271a118470951a06cd014a91aa
* Add a new activity DeviceSpecificActivity which acts as a jumppad
into an activity using "org.lineageos.settings.device.SUW_SETTINGS"
* Handles navigation (back / next)
* Handles cases where the script contains the page but SUW_SETTINGS
don't exist
* In order to use this, devices need to provide an activity that:
* at least shows a back and continue button
* returns Activity.RESULT_OK and Activity.RESULT_CANCELLED for the
buttons
* does whatever you need to specifically have done in setup!
Change-Id: I4956c8f5f1ad13b9adf2e5604fd4a728e261336b
Just check if the package is installed before trying to disable it.
Test: Observe that the following exception is not longer shown.
Exception occurred while executing 'disable':
java.lang.IllegalArgumentException: Unknown package: com.android.provision
at com.android.server.pm.PackageManagerService.setEnabledSetting(PackageManagerService.java:21052)
at com.android.server.pm.PackageManagerService.setApplicationEnabledSetting(PackageManagerService.java:20910)
at com.android.server.pm.PackageManagerShellCommand.runSetEnabledSetting(PackageManagerShellCommand.java:2151)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:231)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21736)
at android.os.Binder.shellCommand(Binder.java:929)
at android.os.Binder.onTransact(Binder.java:813)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4621)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4361)
at android.os.Binder.execTransactInternal(Binder.java:1159)
at android.os.Binder.execTransact(Binder.java:1123)
Change-Id: I646f2803f95817d7d9f2b1dfe54a9c1f8c9988e7
* Generic, handles both face and fingerprint
* Works the same as before for fingerprint
* Works the same as fingerprint for face
* What else could one ask for?
Change-Id: I9ddd7b46548c8107239fdec457bbaae6b12876e6
We were using the SubBaseActivity class for two different kind of
activities:
(1) "Wrapper" activities, where we define an activity that on
start simply launches another one
(2) "Interactive" activities, where the user has to manually
trigger the start of the subactivity, or skip the step.
When the subactivity ends, only in case (1) we want to finish our
activity as well, since we wouldn't have anything to show.
Change-Id: I1a3ae51f6146ac32b5e7542d9a18b0b032efe144
Set slide animation by default and use it in all pages.
Fix wrong/missing slide animations on various transitions like WiFi
and the backup subpage.
Change-Id: I78c87f38eb615379d39c89b43a016ed2ffb98695
The current handling results in the followup activity to ignore it for
backtracks which means when going from Location -> LineageSettings -> Fingerprint
the move backwards from Fingerprint leads up in Location and not the expected
LineageSettings.
The custom handling is necessary to process the result in the Google SUW,
so it has been fixed to properly work now.
Change-Id: Ifae5dc8fda07b61bd0271da1d1589059ab40cd39
The google suw flow has changed a little bit in Android 11, so
this change syncs our scripts to google's so that they match.
Change-Id: I59e9643fad8c48c22a090a29e621e2761ef7e0d0
The captive_portal_server setting is deprecated, and hard-wiring it as a
string is also probably a bad idea. Since it's deprecated, this code
will miss an override via the modern settings. This also hard-wired a
slightly different fallback than ConnectivityService, and simply
adjusting it here wouldn't stop that from happening again. It's best to
just use the privileged API for obtaining the proper value. The choice
of LOCAL_MAC_ADDRESS as the permission for this is a bit strange, but
that's what is required, probably because a better fit didn't exist.
Change-Id: I78d07d5ff96598cebf6d4ed032fe1516791836fe
This sets the partner customization flag to allow adding hooks
later if necessary.
Change-Id: Ie8dcb0f2eae8916ef00f812ea85661c020dce53b
(cherry picked from commit 68b11675e1)
LOCATION_MODE_HIGH_ACCURACY, LOCATION_MODE_SENSORS_ONLY and
LOCATION_MODE_BATTERY_SAVING are deprecated.
Take one further step and refactor the entire logic to call
LocationManager#setLocationEnabledForUser(boolean, int) instead
of setting location mode and LocationManager#isLocationEnabled()
to check if location is enabled.
Change-Id: Ibe1930902f6bfff99eb2c2d852ab600620e25f08
Currently, devices that have a fingerprint prompt to add a fingerprint and
lockscreen via FingerprintActivity. However, since ScreenLockActivity is
always active, we end up with a second prompt for screen lock security.
This adds a check to see if a secure lockscreen has already been set, and
if so, just skip ScreenLockActivity.
Change-Id: I877835e8fa8628c01c96ab9732146720c1234f31
The material_light theme causes gms to crash with "Error inflating
class TextView" when attempting to do a device to device restore in
google suw. This change allows it to use the default glif_light.
Also removed the "Partner SUW Strings" comment, as the theme_type
was the only one.
Change-Id: I287f201799aba81c19869000e3aadb47ef67299b
The google suw flow has changed a little bit and added some new flow
choices in Pie, so our scripts need to be updated to match it. This
fixes the restore choice screen being shown twice.
Also reorganized the order of the wizard action results to move the
resultcode from the beginning to the end. This is a noop change that's
just to bring it inline with google's suw scripts.
Change-Id: Ia3ac9d1fdae62132c377e8ac2f767a795790d092
Google's suw handles the LOAD and NEXT actions, so this creates
duplicate tasks and crashes google suw when finish() is attempted.
Change-Id: Ifdbd9365fba7f299dc041e42ae27a91da071aa99
* Check if the value for the setting is already applied and do not
attempt to write it again. During the testing of SuW it was found out
that there can be an edgecase where softkeys don't show up neither
hardware keys work, even though the setting is applied (judging
by the status of the KeyDisabler switch).
Change-Id: I902f26fe131e508974116f7607fd0b88921395d9
* The only condition for "Use on screen navigation keys instead
of hardware keys" option to be shown is the availability
of KeyDisabler feature. There is really no need to check if the
device "needs" a software navbar (because it has no hardware keys).
Change-Id: Id716d766927f440292a6d18d8fa77bed76ad90b3
* Specify the user the broadcast will be sent to,
in order to avoid the warnings as seen in the logs:
W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1531 android.content.ContextWrapper.startService:664 org.lineageos.setupwizard.SetupWizardExitActivity.onCreate:53 android.app.Activity.performCreate:7136 android.app.Activity.performCreate:7127
Change-Id: I26a0b4ab2dc94bbe6eff065875901bf347aec85b
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.
Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.
Bug: 73535841
Change-Id: Iabb0556dc1c80c7fc7f6c76d61d5e441b03cdce0
* Common platform variant is no longer maintained.
Google advises to use common-gingerbread instead, so do it.
Change-Id: Icacb123c42a10f1813fc8189f3a6d01a86f0b0a1
* Remove unused imports
* Fix a few line length issues
* Convert a few anonymous classes to lambda expressions
* Convert a few global vars to locals
* Remove unused methods
* Add a small local method in MobileDataActivity to shorten repeated calls
Change-Id: Ia10be8b8c98ef3956949f913ddb6bddc185cf1a5
* Instead of resetting the wizard and relying on the call chain to disable
the SUW properly, call the finishSetupWizard method directly and step out
* Fixes: Upgrade 14.1 -> 15.1 without gapps looping
Change-Id: I1498a86b3c407aa32faa60c542003a1d596ce031
* We are currently passing a Boolean value while the
value should be a String ( null in our case )
Change-Id: I6bc69793485c44f2a65baeab62d7266934500038
Setupwraith from 8.0 no longer needs to be platform signed
This reverts commit e0605c03f4.
This reverts commit 092d0fa892.
Change-Id: Ic9801ee52d931e87b6568a1faa4de39b32c3629d
* Fixes:
W LineageSettings: Setting dev_force_show_navbar has moved from
LineageSettings.Secure to LineageSettings.Global, value is unchanged.
Change-Id: Id22886ea5767c6adf254618ecec84b338e11979b
Even though we disable this class when GMS is present, the
intent-filters are still active and cause an activity resolver
to be presented to the user. Disable export of this activity to
work around this.
Change-Id: I5888c71b5fdb95e59e15366b66f56e7968e51f1a
As we launch a new activity, the results are auto-cancelled.
- ActivityManager: Activity is launching as a new task, so cancelling activity result.
- SubBaseActivity: subactivity result {(5), RESULT_CANCELED(0), null}
Change-Id: I724832fc0fea8930136fbf9878ae6e2f82b909b3
* Use "ro.build.date.utc" as a base
* Fallback to beginning of 2017 if the date can't be determined for
whatever reason
Change-Id: I48cd9eb1928f5e3e3240a75508549712f5e53413
Returning false from onInterceptTouchEvent() or onTouchEvent() causes
getPointerCount() to never be greater than 1, therefore enabling the
accessibility services is currently impossible. Fix this and simplify
the code merging onInterceptTouchEvent() into onTouchEvent().
Change-Id: Ieadbb41f9f3f3fb62d11f5a29986630d35e7e8c4
* CMTE is not coming back in 14.1 anyway
* Instead of fixing stuff around it, just remove remainders of it
Change-Id: Ib0e3261d970779aa6dd30db5c8869a0f5198d2d3
* Accessing SparseArrays with zero-based indexes can fail due to non-used
indexes
* mCheckBoxes and mRows should always be accessed with the key they were
added
-> use keyAt(index) when iterating the SparseArray
-> use the simSlotIndex when iterating the subInfoRecords
BUGBASH-318
BUGBASH-610 (partially)
Change-Id: Ib831c3623dafa5bd7d0c95acfa69f4a686644be6
If com.google.android.gms is installed when
com.google.android.setupwizard is not,
our setup wizard crashes.
Fix this by checking Google's setupwizard exists,
and if not, not attempting to launch it.
Change-Id: I6120304dd13dddf07c2769245765a3e98dec51fc
We are working towards a totally new SetupWizard model, so a temp fix
here will get jettisoned when that merges
Change-Id: I01d5cde69515bb46b54e896a1005fe0ffcdb002c
The current version of GMS's SuW has the main activity return as
CANCELED when no network is available. This is the same result as
an actual cancellation (by pressing "Back"), and there's no extra
data to distinguish the two, so the user gets stuck in a loop between
the "no network" page and the one preceding it, unless connectivity
is somehow established. Making connectivity mandatory for OOBE isn't
acceptable, so skip GMS entirely if network is absent (and FRP
isn't enforcing). The only thing it was presenting was a "you
have no network" dialog anyway.
Change-Id: I2abadc79a0823e94da7d3a875ce6db8eae8f143b
(cherry picked from commit d82b2dc88a)
Altough uncommon, development boards and emulators don't have a wireless
interface. In those cases, don't show the wireless setup page.
Change-Id: I0017b2277defdccf7f0bd61cb9606254509f78cc
FRP is kind of pointless if the device is freely accessible. Suggest
setting up a secure lockscreen during setup.
Ref CYNGNOS-3252
Change-Id: Ia807142ab08f388d533b5ee45d1fcbe81071f6d1
- Created and added ModGuide panel.
- Added the ability to chnage navigation color.
- Added the ability to start an app after wizard completion.
Issue-Id: MSC-14
Change-Id: I8e17735d1a9edbd529339982981f8270cde83d96
Both waiting for radio and waiting for data used "is the progress
bar visible" as the "allow to continue" clause. If radio service
state changes arrived while the wait-for-data was ongoing, this'd
terminate the progress bar and make it wait forever.
Additionally, if wifi is connected, don't wait for data at all
Ref CYNGNOS-3126
Change-Id: I81792ac8be00c6a6746af88a62220c727cddc6d8
Instead of waiting for the telephony stack to catch up to the default,
take advantage of the fact that the intent already carries the ID as
an extra.
Also, we were using slotId and phoneId interchangeably, and they're not
the same thing. While it's likely they'll match on a freshly reset
phone, don't assume that. Index everything to subId for consistency.
Ref CYNGNOS-3126
Change-Id: Ibcd767d0124b05d669886190f5d9a98f1a6e5bd7
Handle the possibly thrown ActivityNotFoundException.Changed the generic catch block into a specific catch block to handle ActivityNotFoundException.
Change-Id: Ica1106bab3e569aaa7883898ce6adb3a1a2dd99f
Helps with an issue where qsb widget doesn't work when
running through oobe without network.
Also set the cm setup finished setting for test receiver.
CYNGNOS-2833
Change-Id: I83666deea5a27d74669691c4ab991b1b618edb0a
* Launches GMS TOS per documentation
* Filters out redundant location page if GMS present
* Uses setupwizardlib for some helper functions
* Hide notification icons
Issue-id: CYNGNOS-2599
Change-Id: I4b59592f0b84d0eb0eafe365eab3bad77c1f76ff
Android uses Settings.Global.DEVICE_PROVISIONED and
Settings.Secure.USER_SETUP_COMPLETE and the system responds to those
database entries, such as allowing the keyguard to be visible, or maybe
pulling the statusbar down.
Since we still depend on some of Google's setup wizard, it also keys off
the same table rows and it may decide that the device is now provisioned
when we still haven't finished our own setup wizard, so let's add
another key that we have control over to show the real state of OUR
setup wizard.
Ticket: CYNGNOS-2431
Change-Id: Ic21689625f6d80e209161762ace741918b972aba
Signed-off-by: Roman Birg <roman@cyngn.com>
People generally identify their SIMs by the emitting carrier, not
the network they attach to. In roaming or MVNO scenarios, these
are likely not to be the same, leading to confusion in SIM selection.
Ref CYNGNOS-2496
Change-Id: I0ecd8e7511fd4229d6ce7629b1f97aa83a1a6254
If a user goes through the gms flow, logging in, disabling
backup, getting kicked over to restore, and deciding to
set the device up as new, the existing logic would reprompt
since the flow causes the load action to happen again.
Now check for account existance, and skip the setup if true.
Change-Id: I3502294d54fcb4e202dca37ff7c6165da4401808
TICKET: CYNGNOS-2459
More expressive and specifically calls out two components most
likely to be included.
Change-Id: Ied32d53f308b3fa9fea65a77524c7e3729c52f06
Ticket: CYNGNOS-2085
If a user skips through google setup, make sure we're handling
the result correctly.
Change-Id: Ie2385dbd45c187dc1a90eab4a519094eae2caa72
TICKET: CYNGNOS-2258
If a device lacks NFC feature, pass an extra to googles
setup wizard to spress the device to device setup.
Change-Id: I05341f14c4a4753cb5a595734eb337eb10d505a4
TICKET: CYNGNOS-2258
If a user logs into Google's SetupWizard with their
gmail account, they need to be prompted with a restoration
picker -- otherwise, if they have a valid restoreToken
and restoreAccount, we can assume that they came from a
Tap & Go scenario and begin restoring as needed.
Change-Id: Ifa9ce978822f365996a509edeb3023001a07be84
TICKET: CYNGNOS-2233
Since the restore process (or any external setup wizard
process) can take a long time to finish execution, save
the current page and restore it on recreation when necessary.
Change-Id: I575cf58047eb307c95408a0955dd7e5b50a62107
TICKET: CYNGNOS-2233
Googles SetupWizard expects a specific flow for the restoration
process -- amend the intent for gms restore to abide.
Change-Id: Idf4c3b813676c5456770627067a42697ab756bb0
TICKET: CYNGNOS-2233
Since Marshmallow broke the ability to utilize complex
matrix queries against the SettingsProvider because it
is now backed by XML, rewrite the logic for the backup
enabled flag to work within the new constraints.
Change-Id: I8ad993564184fa14b5a3267689c69af2f7e8638e
TICKET: CYNGNOS-2233
If the sim is locked, or the setup wizard is not visible, don't
change the locale as it creates a unpleasant experience for the user.
CYNGNOS-1797
Change-Id: Ib696e83cfcdaef18bcf24ef649e6268b7142961a
Some sims such as T-Mobile return incorrect languages for their
PL(Preferred languages). Lookup the locale via the MccTable instead,
and fallback to trusting the sim.
Change-Id: I612d4952355ce4a42b35579e1f9aa879417c4cd4
Take scroll events into consideration when deciding whether to override
user locale with sim locale.
Also move locale fetching to be async so we don't cause any unecessary
blocking.
CYNGNOS-1521
Change-Id: I0c4c1b89dd227f661c1a1cdcce445349fe4a206f
Also ensure we only send stats event once and
only if the user actually changed the locale.
CYNGNOS-1521
CYNGNOS-1326
Change-Id: I7b0451137e6bf80bf71350da28fe391fc8c52ce8
In the event that the current time returns us epoch,
hard code the time so the user doesn't have to
scroll all the way to 2016 when setting the time.
CRACKLING-721
Change-Id: I7a4122320c80e941154b84f306565c0f9b452a7d
In case there's more than one setup wizard package, we can only grant
permissions to one by default. That is queried by the
Intent.CATEGORY_SETUP_WIZARD which needs to be declared so we are in the
line up to receive the permission.
Change-Id: Ia9bf7ef2dfdaedfc567f038cd860abafa0e2d657
Signed-off-by: Roman Birg <roman@cyngn.com>
If the package defined by cm_account_type (which can be overlayed)
exists, then add CyanogenSettingsPage. Otherwise, omit.
PS3: On the cyngn side, the account type and package name don't match. Added a new string to overlay.
Change-Id: I15e032e21281aaf51ca32ac9cc0861e033201f19
This reverts commit 070fbeaf5d.
We still need to show the fingerprint setup screen which allows
the user to skip setting up a fingerprint if they choose to do so.
Change-Id: Ifa49ad1ac0e5cf113290b973ac5e9cd8abdbed9a
* Remove usage of deprecated setLocationProviderEnabled and
isLocationProviderEnabled
* Use BroadcastReceiver to listen for changes to mode
* Replace GPS option with Battery Saving option (there is no longer a
mode available in Android which disables GPS)
TODO: Create CMStats entry for ENABLE_BATTERY_SAVING_LOCATION
Change-Id: I2efe69125518637ae9b7d0dce285c39dae654d4c
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
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
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
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
Introduced in Ia1a81c4443cfd5bc3c3e5fd84758ff0ba2a2a140, this causes
an NPE in some situations.
Change-Id: I13239eb92b69087fe2c91b46482ff76748ab1c19
Ticket: CYNGNOS-707
* 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
Fingerprint setup should occur after the user has setup any accounts
and before the customization page.
Change-Id: I1305d89e17da1f8d405c8bd5b8b8b5268a2ba38c
* 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
Change-Id: I83d80dc3ec026d7a5a5d4b8bf4cf577214a13da4
Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
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
TV devices like fugu don't have a default input method and expect to
be able to pair the bluetooth remote during setup without having to
manually initiate it with the bottom button on the device.
Change-Id: I88246fe9b28a85dc334c0108b818e78cb29491bb
Fugu has both com.android.settings and com.android.tv.settings so
currently it brings up a selector dialog for how to handle the wifi
intent, which leads to "Activity is launching as a new task, so
cancelling activity result." Fix this by passing the component name
in the intent if FEATURE_LEANBACK is present
Change-Id: I470590315d3f95a32b7796dd4a916a543392fcd6
SubscriptionController exists in the telephony process and cannot
be accessed by SetupWizard.
getInstance() will always return null.
Change-Id: I017682d3aad539e1954348664b1c1fec7f76009d
This patch is to mitigate theming problems with multiple users.
Once themes properly support multiple users we can revert this.
Change-Id: Idc89a273bc1563fc668ca2a5a591cf133e8d5406
(cherry picked from commit 836f867086)
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.