Commit Graph

12 Commits

Author SHA1 Message Date
Jason Chiu
071dfe8691 [Safer intents] Applications
To avoid implicit intents, make intents launch explicitly.

Test: build, robotest
Bug: 323061508
Change-Id: I9bf4eb102550f4afd8d14a6799940d37fc0ab9a7
2024-03-28 04:13:47 +00:00
Chaohui Wang
778c2dc3d5 Remove context from applicationFeatureProvider
ApplicationFeatureProvider is created by using application context,
no need pass context in when get.

Bug: 286764889
Test: m Settings
Change-Id: I7f8dfe5716b7b55e0ff984f7603875d7896e2313
2023-07-03 13:54:26 +08:00
Tsung-Mao Fang
05de9819e9 Disable setting items in App details page
Prior to this cl, we allow user to tap on those
setting items which belong to another user profile app.
However, we already observed some functional broken cases now.
Such as, device can't get the storage data/screen time/mobile data
battery, notification for those apps from another user profile.
Therefore, we decide to grey out those setting items,
and we don't allow user to tap on unsupported setting items.

Test: Download apk in different user profile, and see setting items
is disabled/enabled correctly. and run robo test.
Fix: 230303570

Change-Id: I1bb6b1d8b52f6a00088b2f0e4279b896d568f8a6
2022-05-09 22:04:45 +08:00
Sunny Shao
6d60248053 Enable some settings pages to use paralleled-loading method
- Here these pages include AppInfoDashboardFragment, ConnectedDeviceDashboardFragment,
  DevelopmentSettingsDashboardFragment, NetworkDashboardFragment, ConfigureNotificationSettings.
- The TimeSpentInAppPreferenceController use the LiveDataController.

Fixes: 135299529
Bug: 137558156
Test: compilation
Change-Id: I455a16536c9966184f1b2bd81d1f1217f3e09f9d
2020-05-04 10:34:23 +08:00
Fan Zhang
eb2e8dd22c Add an interface that returns time spent text for app.
Bug: 129266977
Test: robotest
Change-Id: Iaa5b4c5504eccbe0290b1014bd8e25aa3d4c3dd8
2019-04-29 11:09:58 -07:00
Vadim Tryshev
27a76c3988 Using intent action for DWB properties exposed as an API
The intent opens digital wellbeing properties for an app.

Bug: 118319143
Test: Building Android
Change-Id: I0921ba5e8a6cb357ba12a08cafcab64503417dc9
2018-10-26 10:45:40 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Matthew Fritze
f87a1f3f41 Establish permanently unavailable settings
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.

The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.

Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.

Bug: 78910582
Bug: 79245656
Test: robotests
Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
2018-05-09 08:36:59 -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
Fan Zhang
b803a23031 Check time-spent-in-app intent must come from system app.
Change-Id: Ie73aacdaf919b336d99a296328c2fbb4f75036b0
Fixes: 74580195
Test: robotests
2018-03-28 18:15:58 -07:00
Fan Zhang
64a8f70a7f Add preference controller to launch app-time-spent UI.
Bug: 74580195
Test: robotests
Change-Id: Iba9338f04cc037a134ef9445ce97cbbe21f53833
2018-03-23 14:13:57 -07:00