There might be edge cases of devices that have no power button
and no way to control externally connected displays. In such cases,
if display has touch support, DT2S shouldn't be allowed at all.
Change-Id: I3976f138d02f0b6ddf8ce239cb8c3a19ab737b67
The migration happened in lineage 15.1,
we only support direct upgrades from 17.1.
This partially reverts commit e7008a222e.
Change-Id: Ic2acd93565e21475ea6f896941107230d880e890
Do not save the target time unless setting deadline succeeds,
effectively allowing it to be retried later.
Change-Id: I572b935b088170d56623a33c5efd2292b1a67126
It is only possible to upgrade from 17.1 to 20.0 directly,
let's just drop all the old migration steps.
Change-Id: I04ec638f3b7c75d53629c8fec5523a0ccc7eabb5
* We usually shouldn't touch existing migrations,
they would have already ran for most (if not all) users,
and don't run for existing users since they start at
the latest version.
* However, we've recently discovered many issues with these
migrations, and past reported issues are now starting to make
sense (they can be explained by migration running over and over again)
* As such, let's fix this once and for all to make things clearer.
* We also tend to copy older migrations when writing soemthing new so it
should help having these done :)
Change-Id: Ic45efc823da7ea8a137e79b3769a9ca53c2f8667
Add new private methods readSetting, readIntegerSetting,
readLongSetting, writeSetting, and writeSettingIfNotPresent
to reduce boilerplate and potential for code errors.
Change-Id: I9872cc50db86056cdc1588741600b66ee9d40f9f
There is no need to use database transactions to simply read settings.
We also were not setting the transaction as successful, which was
causing the outer transaction for the whole onUpgrade operation to be
rolled back, meaning that some devices would be stuck at old db
versions and perform repeated migration attempts on every boot.
Issue: calyxos#1290
Change-Id: Icefe994379152f9a3aa6c0c5b447cc55d5c4cf46
* Really shouldn't have touched an existing migration before
* Anywho, let's change it back to what it was but make it compile
* Then, let's migrate that old setting to the new AOSP setting,
but flip it since it works differently.
Change-Id: I342d8c78aa8faeda5dcaafe9199deb51c570efd0
Instead of relying on catching the exception later on, check if
ChargingControl is actually supported before checking if a specific
mode is
Change-Id: Icaf8d333842c9847bea00bedb4b302b7acd49bb3
This will let us use it without bothering to handle RuntimeException
from HealthInterface contructor.
Change-Id: I768c250d1e527b6fd8e49a40452b98404062cc18
A new setting NETWORK_TRAFFIC_POSITION decides, if the traffic display
is at the traditional center position or right or left.
Change-Id: I768259696be1186cb1dd4630c2b35540529a7f67
The aar target not only is broken, but it has become useless
since there's no resource in the sdk/res/res path.
A working aar would be no different than the jar produced
by the "org.lineageos.platform.sdk" target.
Change-Id: I06c482c5cacab035cd1dad96a7760d4d6cf24ebf
SSIDs can contain ampersands, e.g., "V6 Cafe & Gift Shop". The & and
possibly other special chars need to be escaped when writing
profiles.xml.
Change-Id: Iffef33de22c37d8cb4b5048b92c9ef9c77e18819
* Calling forceStopPackage with USER_CURRENT won't kill the app when
started e.g. via "Shelter" work profile
* Find the uid of the current foreground app and pass that one
instead of UserHandle.USER_CURRENT
* Note: UserHandle.USER_ALL would also kill the app, but all instances
of it - which we don't want
Test:
- Go to Settings->System->Buttons and enable "Kill foreground app"
as action for "Long edge swipe" - test it for PlayStore
- Install Shelter and setup your profile
- Open PlayStore from work profile
- Long swipe the edge:
- Before: Toast appears, app stays open
- After: Toast appears, app is actually closed
- Additionally: Open PlayStore from Work and Non-Work profile
- Long swipe edge for just work profile one and switch to own profile
instance: App is not killed (expected, we just killed work instance)
Change-Id: I82154a6c021527013269f7ee2d1c46fedc14bf7c