Commit Graph

118279 Commits

Author SHA1 Message Date
Zoey Chen
64330a235a [Settings] Apply the SettingsDataService to the SIM page, calls/smscontroller
Calls/SmsDefaultSubscriptionController

Bug: 257197354
Test: atest DefaultSubscriptionControllerTest
Change-Id: I67cb2d3aa5ef3c6751d90b96db27a062071c8113
2022-11-21 06:39:12 +00:00
ykhung
b2f363e5d4 Remove schedule by routine relative tests
Fix: 259866871
Test: make test DEBUG_ROBOLECTRIC=1 ROBOTEST_FILTER="com.android.settings.fuelgauge.batterysaver" RunSettingsRoboTests -j40
Change-Id: Icc402c678c4c4b365047c01c499b17f6d5ec3ada
2022-11-21 14:19:03 +08:00
Zaiyue Xue
52f9272cb9 b/259865144 Fix the failed unit test BatteryChartPreferenceControllerTest
Bug: 259865144
Fix: 259865144
Test: presubmit
Change-Id: Ie23fef16f4e21bba25f02bc2aa28986a5904188e
2022-11-21 14:05:26 +08:00
Chaohui Wang
5177d070e5 Calculate list type first in ManageApplications
Currently, list type is calculated in onCreate(), and will default to
LIST_TYPE_MAIN if the class name is not set to any special activity.

When adding new app list to onCreate(), but not changing
getSpaDestination() could led to issue when spa is on.

Calculate list type first in onAttach() as single source of truth could
solve this issue.

Bug: 235727273
Test: Manually with Settings with / without spa
Change-Id: If8a3d61cfd08d7d67e32253c3ac7266e5e9e7b4c
2022-11-21 13:02:12 +08:00
Chaohui Wang
7292c4a017 Merge "Use isEssentialPackage instead of isSystemPackage" 2022-11-21 04:45:16 +00:00
Zoey Chen
a0608e1e06 Merge "[Settings] Apply the SettingsDataService to the SIM page, roaming controller" 2022-11-21 03:22:21 +00:00
Jack Yu
063a51a7d7 Merge "Add getSubscriptionId API" 2022-11-21 01:49:01 +00:00
Jack Yu
f4982a080b Add getSubscriptionId API
The old getSubId or getSubscriptionIds return multiple sub ids
per slot index, which is not possible in today's implementation
because the slot index here refers to the logical slot index,
which is also known as phone id, or the logical modem index. In
today's telephony, one logical phone can only have one
subscription at one time, so does the modem.

Bug: 239607619
Test: Manual
Change-Id: I0a43d33daf523e6f0bea054c8965281bafbbcaa4
2022-11-20 12:21:05 -08:00
Bill Yi
d8a6a837ad [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-mainline-prod am: 63a3777a98 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20493535

Change-Id: I55b02eab4056719efd98a87ffff956cb82db0f76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-20 02:46:00 +00:00
Arc Wang
bc736f3861 Merge "Should not show loading animation after size loading complete" 2022-11-20 02:25:40 +00:00
Bill Yi
63a3777a98 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-mainline-prod 2022-11-20 02:11:35 +00:00
Bill Yi
8c04fd454b Merge changes from topic "tc_change_22111610_27"
* changes:
  [automerged blank] Import translations. DO NOT MERGE ANYWHERE 2p: 214458021a
  Import translations. DO NOT MERGE ANYWHERE
2022-11-20 02:11:35 +00:00
Cole Faust
37cfdc7536 Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Merged-In: I21aa58ebc02327849ed2161dbbafcdc806c007f2
Change-Id: I2fbc9701a4ad1caa264e0b22e02fd0dab310eabd
2022-11-19 22:42:42 +00:00
Yanting Yang
dc6f8fd7ed Merge "Invoke close() method for BatteryUsageStats to close cursor window" into tm-qpr-dev am: 06125115a0 am: 8c5a1d4ab2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20514510

Change-Id: Ifdd4d18e801912f850bb21e9ee6540e59c172ef1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-19 19:49:57 +00:00
Yi-Ling Chuang
a7850f59a4 [automerger skipped] Remove BatteryFixSlice as it's not used am: 2f80e073d0 am: 2dd4058e37 -s ours
am skip reason: Merged-In I517cab71a32613d5cb5fcd3beb991a24926a2902 with SHA-1 e3fcf1f082 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20514509

Change-Id: Ie7d6666fbc11547f0c905846b0d3cad881f33056
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-19 19:49:53 +00:00
Yanting Yang
8c5a1d4ab2 Merge "Invoke close() method for BatteryUsageStats to close cursor window" into tm-qpr-dev am: 06125115a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20514510

Change-Id: If667eaba37c2bf6417053a9477187009ce809efa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-19 19:16:40 +00:00
Yi-Ling Chuang
2dd4058e37 Remove BatteryFixSlice as it's not used am: 2f80e073d0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20514509

Change-Id: I536b1e852ddcf5154c8aeb64ae755156330aa9ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-19 19:16:34 +00:00
Yanting Yang
06125115a0 Merge "Invoke close() method for BatteryUsageStats to close cursor window" into tm-qpr-dev 2022-11-19 18:33:05 +00:00
Bonian Chen
c3028291ed [Settings] Code Refactor
Adjust code structure for maintainance.

Bug: 259611847
Test: auto test
Change-Id: I1fab8d0347f64c01ee768e4bb9ea838a9e7ad4fc
2022-11-19 13:14:07 +00:00
TreeHugger Robot
e1322d0a54 Merge "Update AnomalyJobServiceTests." 2022-11-19 10:52:54 +00:00
Grace Cheng
b81cc1e3c6 Merge "Removes duplicate SFPS string and updates references" 2022-11-18 22:55:34 +00:00
Menghan Li
e6cccc1c1c Merge "Fix unbundled accessibility features settings crash when launched" 2022-11-18 22:19:46 +00:00
menghanli
f76e31fe48 Fix unbundled accessibility features settings crash when launched
Root cause: The ag/19938064 introduces Settings Core change preference value changed metrics log format. It tries to lookupMetricsCategory() at Fragment#instantiate() stage. It has not onAttach() to activity by FragmentManager#add() or #replace(). The features were added by ag/15824482.
Solution: PutInt new MATRICS_CATEGORY extra in previous class to avoid giving context for FeatureFactory.getFactory to custom 1P accessibility services for SettingsGoogle overlay.

Bug: 259355675
Test: manual test
Change-Id: Ic37d41be6a54fe388f211c1c397d0b9b87b5fb56
2022-11-18 22:18:27 +00:00
Hao Dong
8c5d8e694a Use the internal max faces number to check enrolled.
Test: manually tested on device
Test: robotest for FaceEnrollIntroductionTest
Bug: 243759589
Change-Id: I193c7b7c49f884541bd5d8282d15bf69e46f3392
Merged-In: I193c7b7c49f884541bd5d8282d15bf69e46f3392
(cherry picked from commit b4000fb226)
2022-11-18 20:43:38 +00:00
Hao Dong
90ece439ec Merge "Use the internal max faces number to check enrolled." 2022-11-18 20:06:25 +00:00
Zoey Chen
7dfd3be886 [Settings] Apply the SettingsDataService to the SIM page, roaming
controller

Implement it in 0RoamingPreferenceController
Launch MobileNetworkSettings in SettingsApp by SubSettingLauncher
Launch MobileNetworkSettings by intent

Bug: 257197354
Test: atest RoamingPreferenceControllerTest
Change-Id: Ia2df51ad3a9b2b72bdada05de480e0b05d2d4f43
2022-11-18 20:01:36 +00:00
Grace Cheng
9d6a869ebe Removes duplicate SFPS string and updates references
Removes duplicate security_settings_fingerprint_v2_home_screen_text string and replaces references with security_settings_fingerprint_enroll_finish_v2_message

Test: Open fingerprint settings on SFPS device where fingerprints are enrolled, observe correct string
Fixes: 259316600
Change-Id: I259669a09f5535f3a776793659e5bc6bdb90a44c
2022-11-18 19:43:40 +00:00
Bill Yi
4e69ff6a12 [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-mainline-prod am: abe4436354 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20493432

Change-Id: Ia19d83061d3e14889b12400a32cc277ac82dabdd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 18:49:11 +00:00
Bill Yi
abe4436354 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-mainline-prod 2022-11-18 18:22:49 +00:00
Bill Yi
8829ebe00f Merge changes from topic "tc_change_22111610_29"
* changes:
  [automerged blank] Import translations. DO NOT MERGE ANYWHERE 2p: cfc5674c1d
  Import translations. DO NOT MERGE ANYWHERE
2022-11-18 18:22:49 +00:00
Hao Dong
b4000fb226 Use the internal max faces number to check enrolled.
Test: manually tested on device
Test: robotest for FaceEnrollIntroductionTest
Bug: 243759589
Change-Id: I193c7b7c49f884541bd5d8282d15bf69e46f3392
2022-11-18 17:42:39 +00:00
TreeHugger Robot
62f0b933f1 Merge "Add a new special app access screen for long background tasks." 2022-11-18 17:16:52 +00:00
Florian Mayer
fb8537f03b [MTE] disable dev option if security setting is on
Test: make RunSettingsRoboTests
      check dev settings manually
Bug: 245624194
Change-Id: I3d9c9b89cd5483eee9800077943b1c30738e4c16
2022-11-18 09:09:28 -08:00
Florian Mayer
77ba214b1e Merge "Add separate system property to control user toggle" 2022-11-18 16:22:51 +00:00
TreeHugger Robot
5f6413db2c Merge "[Settings] Add NPE protection" 2022-11-18 14:19:58 +00:00
Sandeep Jawalkar
e3ab7cbf61 [automerger skipped] Merge "[Android U][eSIM] Modify esim and sim card strings as part of esim primary" am: 5a34a5b3de am: 38d97f7882 am: dce53c2f80 -s ours
am skip reason: Merged-In I984d56e724dbd906e48358a31c6a7cb1e5db4fdf with SHA-1 ecdfe28bd2 is already in history

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2301705

Change-Id: I8a22f672e617328c058f942f1a6cc731b772ddbd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 13:55:51 +00:00
Sandeep Jawalkar
dce53c2f80 Merge "[Android U][eSIM] Modify esim and sim card strings as part of esim primary" am: 5a34a5b3de am: 38d97f7882
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2301705

Change-Id: I55f13a8ae5bc858e5a42f400550329025cc17254
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 13:23:23 +00:00
Bonian Chen
eb6eb053e8 Merge "[Settings] Code Refactor" am: bafd49d604 am: c31caafb5a am: 81e86e8d5d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2308239

Change-Id: Ib0d6763f9994c3a8094472b5967ad304e11dcc66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 13:03:29 +00:00
Sandeep Jawalkar
38d97f7882 Merge "[Android U][eSIM] Modify esim and sim card strings as part of esim primary" am: 5a34a5b3de
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2301705

Change-Id: I66171e26c9b3dd44db9206dc15c286d0d404d54d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 12:58:56 +00:00
Sandeep Jawalkar
5a34a5b3de Merge "[Android U][eSIM] Modify esim and sim card strings as part of esim primary" 2022-11-18 12:32:01 +00:00
Bonian Chen
81e86e8d5d Merge "[Settings] Code Refactor" am: bafd49d604 am: c31caafb5a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2308239

Change-Id: I8dbda9c6b40fb8207b81b30e89e464eea87a06bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 12:31:54 +00:00
Bonian Chen
c31caafb5a Merge "[Settings] Code Refactor" am: bafd49d604
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2308239

Change-Id: Iad870d2df6f9ecb2ff207b8753288da6446e218a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-18 12:06:39 +00:00
TreeHugger Robot
39111bb0f5 Merge "Fingerprint Unlock doesn't handle feature flag" 2022-11-18 12:02:07 +00:00
Bonian Chen
bafd49d604 Merge "[Settings] Code Refactor" 2022-11-18 11:46:43 +00:00
Yi-Ling Chuang
2f80e073d0 Remove BatteryFixSlice as it's not used
The BatteryFixSlice hasn't been used for a while, and it's introducing
memory leaks due to a design change at the framework's end. Hence,
remove it.

Bug: 245385410
Test: robotests
Change-Id: I517cab71a32613d5cb5fcd3beb991a24926a2902
Merged-In: I517cab71a32613d5cb5fcd3beb991a24926a2902
(cherry picked from commit e3fcf1f082)
2022-11-18 10:58:42 +00:00
Wesley Wang
9a539a46d1 Invoke close() method for BatteryUsageStats to close cursor window
- Invoke close() method for BatteryUsageStats to close cursor window,
   avoid OOM.

Bug: 245385410
Test: make SettingsRoboTests
Change-Id: I68f36a42a33d2546cb191cec88f5431e24dd5b84
(cherry picked from commit f164be387e)
2022-11-18 10:19:07 +00:00
Arc Wang
ccf4fa052a Should not show loading animation after size loading complete
SettingsPreferenceFragment#setLoading(boolean loading, boolean animate)
shows loading animation when 'animate' parameter is true.

This change sets 'animate' parameter false to fix this issue.

Bug: 254003456
Test: manual visual
      Settings -> Storage -> Free up space -> back
      then see if loading animation shows.
Change-Id: Ic804bcf950a9c57297ccefd6e942edea0b792a3b
2022-11-18 17:34:00 +08:00
Jason Chang
764a786547 Merge "Add pad animation for STAGE_CENTER & STAGE_GUIDED" 2022-11-18 09:06:48 +00:00
Bonian Chen
e1f641a130 [Settings] Code Refactor
Adjust code structure for maintainance.

Bug: 259611847
Test: auto test
Change-Id: I6710aa814441c0858c712f416ffddde44081d4d1
2022-11-18 08:36:53 +00:00
Milton Wu
0a7fce7bb7 Fingerprint Unlock doesn't handle feature flag
When user click `Fingerprint Unlock`, FingerprintStatusUtils shall also
check feature flag of SETTINGS_BIOMETRICS2_ENROLLMENT to determine final
class name

Bug: 259639962
Test: manully enable flag and test activity
Change-Id: I421dc8325ff2a28386081645318488a5e291e7f4
2022-11-18 16:32:27 +08:00