Commit Graph

43 Commits

Author SHA1 Message Date
Christoffer Adamsen
bc97628dd5 Explicitly keep default constructor in rules without members
R8 implicitly keeps the default constructor when no member rules are specified. Future versions of R8 will require apps to explicitly keep the default constructors that are required for the build to work.

This conservatively changes all keep rules that currently keep the default constructor to explicitly keep the default constructor.

Future work will attempt to tighten up the rules that do not require the default constructor to be kept.

Bug: 373579455
Test: existing
Change-Id: I58cf6b4286f696ea38290d888f20c8dcf18b9ede
2025-01-08 00:15:31 -08:00
Kyle Zhang
7dbe6517ec Keep FakeFeatureFlagsImpl
* Keep FakeFeatureFlagsImpl.
* Use EnableFlags and DisableFlags annotation
* Switch back from `assumeTrue` to `assert` when flag is enabled or disabled.
* Remove flag rollback test.

Bug: 342830919
Change-Id: Ic9b3438f3f0e31e64d5405ed81903b352195714a
2024-06-27 08:46:17 +00:00
Jared Duke
4c8bae742b Refine Settings proguard rules
Avoid keeping unused library classes and remove several redundant rules.
This saves ~700KB dex and a modest amount of Jetpack resources that are
no longer referenced.

Bug: 248580093
Test: m + presubmit + atest SettingsUnitTests
Change-Id: Ic2398345a35117ccab433d2fd1c31c0f453ed77c
2022-10-06 09:10:38 -07:00
Tsung-Mao Fang
18ad0c49a8 Import the window extension libary in the Settings app
Test: Rebuilt apk and run apk successfully.
Bug: 196939216
Change-Id: If9040ae9a1c72097e4964c8d40ea9785cf2f01dc
2021-08-19 17:23:11 +08:00
Beverly Tai
aaa52b4c90 Revert "Update proguard"
This reverts commit dbd48da49a.

Reason for revert: was only hiding aware settings for beta 1
Bug: 123532083
Change-Id: I7d07f9ec62a3bd6f81838da1e2639102d501e1c4
2019-02-06 15:44:40 +00:00
Beverly
dbd48da49a Update proguard
Test: manual
Bug: 118388808
Bug: 123532083
Change-Id: Ie3140755817989f567b2ea0674ebe601062aae21
2019-01-31 14:40:59 +00:00
Jason Chiu
a68f81540e Enforce all the SliceBackgroundWorkers being singletons at syntax level
- Create workers via reflection in SliceBackgroundWorker
- Store the workers in a static container and release then at shutdown()

Fixes: 118228009
Test: robolectric
Change-Id: I564277d3a12b2d7d3b50cef091bdfedb3397c145
2018-11-05 21:41:30 +00:00
Mill Chen
fb4992111b Add a rule to keep classes that implements CustomSliceable
Bug: 115862774
Test: visual, SliceViewer
Change-Id: Iff52a61423ef6822430a1f269a897b46d46f5253
2018-09-17 22:06:05 +08:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Jason Monk
8a485f0ada Merge "Updates to match prebuilts drop" into pi-dev am: b299122e08
am: 8e51db884e

Change-Id: I790d275e30bccd446a00615149a90440d172e163
2018-04-04 16:45:09 -07:00
Jason Monk
20210122bd Updates to match prebuilts drop
Test: build
Bug: 77482321
Change-Id: I65a2cffb0a921ef6acb58ff500a7da8a8f870e76
2018-04-04 16:08:17 -04:00
Søren Gjesse
d9ce79763a Enable R8 for settings
Keep constructor which is only used directly from test.

Update Proguard configuration to include information on checked
exceptions for Mockity to mock thorwn exception.

Bug: 74756073
Test: atest
com.android.settings.deviceinfo.storage.StorageAsyncLoaderTest#testRemovedPackageDoesNotCrash
Utf8ByteLengthFilterTest
Change-Id: Iae87e6647b28ee69d38bd8891df46239779c459c
2018-03-22 21:05:11 +01:00
Fan Zhang
917f101899 Instantiate pref controllers from xml if it's defined.
- If a <preference> tag also defines a controller, we will try to
  instantiate it before displaying the UI. The same logic is shared by
  BaseSearchIndexProvider so it also drives search suppression.

- If user also defines a list of controllers programatically, the
  programatically created ones takes precedence.

Bug: 73668763
Test: WIP
Change-Id: I7aecec270bcd3af261e012ef1f6995d2a523cfa1
2018-02-23 14:08:51 -08:00
TreeHugger Robot
81bd85ab80 Merge "Depend settings on slices in the support library" 2017-12-08 00:51:19 +00:00
Matthew Fritze
b277557991 Depend settings on slices in the support library
Test: make
Bug: 67996923
Change-Id: Ifcb544424df27f3faa8872e6266de286cc706d59
2017-12-06 08:19:07 -08:00
Tony Mantler
d2faf1b6a2 Remove proguard rules that are imported via aapt2
Bug: 69350851
Bug: 69257739
Test: Tap build number and ensure toasts show up
Change-Id: I7b3ebd1e4040d2c29cabf03932acd03d1fc8b521
2017-11-29 15:02:15 -08:00
Tony Mantler
bd6fcdbd2b Copy proguard rules needed for Lifecycle support
Bug: 69350851
Test: Manual, sadly
Change-Id: Ice2b2697ec269e3ed0d3ca81940948189357cefb
2017-11-15 11:20:57 -08:00
Justin Klaassen
ab7041107f Keep classes/fields only used via reflection
Bug: 30355720
Change-Id: I9c8325a0b42cda5beeb8dfe76bde46afd2bec727
2016-08-01 23:47:53 +00:00
Justin Klaassen
d770c05f6e Ensure classes used via XML are kept by proguard
Bug: 29795762

- Keep MenuItem onClick methods.
- Keep View subclasses and animatable properties.

Change-Id: I4449c8d6caee1d499d8816e62ffc482661df6bea
2016-07-06 12:19:10 +00:00
Justin Klaassen
478b5a8cbe Cleanup proguard.flags
Bug: 29574900

Proguard flags no longer specify specific packages or classes which
means they should not need to be updated everytime a new package or
class is added.

Change-Id: I2c2b501e904133d517d2467bd9f47c9577d9b446
2016-06-22 19:10:53 +00:00
Andrew Sapperstein
867bb9c07a Create feature factory interface & initial impl.
Creates the abstract class FeatureFactory and an AOSP implementation
called Factory.

Also creates a static library for generating logtags since we need to use the code generated
by the logtags in multiple packages now.

BUG: 27751878
Change-Id: I88d826333642d3efc252134c4facb7b1ca014f32
2016-04-13 13:02:38 -07:00
Anna Galusza
16d58e78df Add Tron Logging to portion of A11y SUW that lives in Settings.
Bug: 27777706

Change-Id: I0c0f0f1c30ba5b1d40bc4e74faadacbdb93dbc51
2016-04-01 14:34:17 -07:00
Udam Saini
8ef4c62003 Reworks lock screen flows.
This also adds frp warning dialogs in case the user skips lock
screen setup initially.

bug:26880444
Change-Id: I732b6a806e139fb6c1c1b334b8d1608c229f217c
2016-02-09 11:58:12 -08:00
Jason Monk
764f45db91 Add data saver to settings
Bug: 22817899

Change-Id: Ic3055aa6a5baae1653db350313366f180c049cc7
2016-01-25 15:24:29 -05:00
Stuart Scott
be90341c80 Add option to reset network settings to factory
bug:16161518
Change-Id: I7c0cc58d5385352c6c9af2b27af23a744b5df977
2015-03-09 13:18:50 -07:00
John Spurlock
81bef1d745 VolumeZen: Sound & Notifications settings.
- Add sound settings under the newly combined Sound & Notifications
  top-level settings page.
- New slider preferences for setting audio stream volumes.
- Migrate checkbox prefs to switch prefs.
- New settings subpage for touch sounds.
- New settings subpage for "Showing notifications"
- New setting pref for displaying intercepted notifications in zen mode.
- New tri-state lockscreen notifications pref.
- Add priority + sensitivity options to app notification dialog.
- Remove badges on app notifications row, migrate to subtitle text.
- Migrate strings to common spot in strings.xml
- Remove heads up setting.
- Remove tweaks category (unused).
- Clean up notification settings, separate out into a code section per option.
- Clean up _settings.xml files, prefix each pref with option name.
- Add appropriate indexing data to each settings page.

Depends on f/b change Ic30aa575ae07650cee62c8c1d83b6bc69395cf0d

Change-Id: If700385a7d0057f6c4c4bcf6e648dcf88b8ebff2
2014-05-18 15:37:09 -04:00
Martijn Coenen
26515da087 NFC payment settings.
First version, pending final UX.

Change-Id: I357e900c3f2012b35814ae197c49a8c9b97b7148
2013-08-06 19:16:54 -07:00
Daniel Sandler
ff8ce275f4 Proguard fix: include notification settings fragment.
#proguaaaaaaaaard

Change-Id: Ifdc7370f93dc4bbdfedc7be35534d5f2ccda3bad
2013-02-22 13:17:39 -05:00
Amith Yamasani
b810a0ddf9 User management screens
Customized Settings for restricted users
- Only some top-level settings panels available

User management
- Primary user can add and remove users
- User details screen to change name and list of enabled apps

Change-Id: Ia6beb991b427197a4ec2724ca3c9222073f6cf7d
2012-03-27 12:06:29 -07:00
Jean Chalard
0824d31aea Add the cancel button handler
Step 3

Bug: 5306641
Change-Id: Ida4ccf181942714799576fde0ac55596ce043434
2011-12-07 12:05:58 +09:00
Amith Yamasani
1909901875 Add PowerUsageSummary to proguard list.
Bug: 4975279
Change-Id: I8e36dd6ce6f0e6a7859af00e7980e636933140fb
2011-06-29 17:24:14 -07:00
Amith Yamasani
43c697854c Move Account & sync settings into Settings app.
Fragmentized some of the activities and moved buttons into the menu area.

Bug: 3148844
2010-12-01 15:14:09 -08:00
Amith Yamasani
b14e1e0493 Fragmentize "Factory reset" setting screen.
Split the screen into 2 fragments.

Bug: 3148480
2010-11-03 12:04:16 -07:00
satok
0417e40947 Move classes related to input method to com.android.settings.inputmethod
- Updated proguard.flags

Change-Id: I198761b0f0ad5288c8c807a7a3c2e965731fcee5
2010-11-01 19:07:44 +09:00
Dianne Hackborn
f4eb85bc3c Start fragmentizing Manage Applications.
Change-Id: I0c3d6a358d0236893aba7257537ec32bfad4170d
2010-10-29 17:48:26 -07:00
Amith Yamasani
6257bf8675 Fix proguard flags to retain FindNearby class.
Bug: 3140836
2010-10-28 09:50:32 -07:00
Daisuke Miyakawa
6ebf8619d7 Fragmentize BluetoothSettings.
Add UserLeaveHintListener.java, so that the settings won't use
its implementation around Activity#onUserLeaveHint().

Also fragmentize bluetooth tethering screen.

Change-Id: Id06ae3161fbdb5854ddb7a257f464fb16ea9b089
2010-09-13 16:18:05 -07:00
Daisuke Miyakawa
d36699282c Add Wifi Setup screen for Setup Wizard with XL size screen.
* Add WifiSettingsForSetupWizardXL as a new Activity
The activity has WifiSettings fragment in it. It also contains
several buttons, texts around the fragment.

* Making configuration UI part of Preference list.
In Wifi Setup for Setup Wizard XL, WifiSettings fragment lets
a UI for configuring access points shown inside a
PregerenceCategory object, while it has been shown as Dialog.

To achieve this action, WifiDialog is decomposed into two parts:
- WifiConfigUiBase (Mainly UI part)
- WifiConfigController (Mainly Wifi controller part)

All codes for wifi configuration in WifiDialog is now in
WifiConfigController, which is reused from
WifiConfigPreference.

* Misc stuff
- Remove AccessPoint#compareTo(). Instead,
  AccessPoint.AccessPointComparater should be used when needed.

Change-Id: I520d690d3301837d32f91dad54a973a379ce1989
2010-09-01 16:17:51 -07:00
Daisuke Miyakawa
0cc35e444b Make LocalePicker Fragment.
The logic calling selectFirst() is removed as
- There's no comment why it is needed.
- Actually SetupWizard gets stack as that forces users to see
  WirelessSettings in SetupWizard.

The other changes:
- Move back LocalePickerFragment to LocalePicker.
- Make <activity> for LocalePicker in AndroidManifest <activity-alias>
- Add a short comment about how getComponent(), which should be a key
  for understanding how top-level settings work.
- Modify LanguageSettings so that it corectly points LocalePicker as
  a fragment.

Change-Id: I78d356e40af896ba1aab72fba12c90467371c7b0
2010-08-29 19:54:59 -07:00
Daisuke Miyakawa
9c8bde576a Fragmentize WifiSettings.
- Add button bar feature toward SettingsPreferenceFragment,
  which has existed in PreferenceActivity and has been used
  (probably) only by Settings app.
- super.onActivityCreated() is not called at the beggining of
  WifiSettings#onActivityCreated(), the parent method assumes
  the child should have prepared PreferenceScreen, while
  WifiSettings cannot do until the parent Activity is ready.
- Call SetHasOptionMenu() should be called AFTER the parent
  Activity is ready. It is not documented, so it would be better
  to file another bug.
- Add exception to proguard...

Change-Id: Iebd27f0cb0abdbee9b4b1cc9b00f4bf127f7815d
2010-08-25 16:03:33 -07:00
Amith Yamasani
7385d65817 Fix proguard flags for settings.
Bug: 2933151
2010-08-19 10:26:40 -07:00
Daisuke Miyakawa
c81adf598f Create LocalePickerFragment for fragmentizing LocalePicker Activity.
Need to add proguard.flag, as the Activity crashes without it.

Change-Id: Icbc75be4a4183920ed472ac64cc509115260f865
2010-08-13 13:36:51 -07:00