summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/precall/impl
AgeCommit message (Collapse)Author
2017-11-29Prevent PreCallActivity from showing in lockscreen if it is not started in ↵twyen
the lockscreen Bug: 69812359 Test: PreCallActivityTest PiperOrigin-RevId: 177193665 Change-Id: Ic61819b8456ee22c01228d6be2255b3f2c1e418a
2017-11-29Adjust strings for select SIM dialogtwyen
Test: N/A PiperOrigin-RevId: 177075957 Change-Id: Idf4546c57aba72470e07614d2a20d828da8ee08d
2017-11-29Add impressions for dual sim featurestwyen
Bug: 69618691 Test: CallingAccountSelectorTest PiperOrigin-RevId: 177062349 Change-Id: I4bc9098d06c541b607cca293269cf3489077b6c2
2017-11-22Prevent SIM selection and change SIM from showing when there are active callstwyen
Most devices are DSDS (dual SIM dual standby) which only one SIM can have active calls at a time. Telecom will ignore the phone account handle and use the current active SIM. The SIM selection dialog has no effect, and the change SIM button will just redial with the same SIM. Bug: 69417430 Test: CallingAccountSelectorTest, CallButtonPresenterTest PiperOrigin-RevId: 176718021 Change-Id: I231cfeaa5ff77c29cdaf8e0865d096c85cfb7fc4
2017-11-22Fix showing CallingAccountSelector in lock screentwyen
FLAG_SHOW_WHEN_LOCKED is added to PreCallActivity so it can be launched in lockscreen. PreCallCoordinator now grabs new instances of PreCallActions onResume so the state can be flushed. If it is reused states like PendingAction might be used after it is discarded. Added null check before discarding fragment because it might not be created yet due to background query. Bug: 69570769 Test: CallingAccountSelectorTest PiperOrigin-RevId: 176714225 Change-Id: I8b09441bd1cdb8df835978a1d82b53a3d3d056e0
2017-11-22Automated rollback of changelist 176587256twyen
Bug: 69570769 Test: CallingAccountSelectorTest PiperOrigin-RevId: 176706378 Change-Id: I50da0d2dd40a83ae6c1189fed2693368369849d3
2017-11-22Check Contacts support for preferred SIMtwyen
Preferred SIM can only be enabled when both dialer and the system contact app supports it. This CL checks if the app for ACTION_QUICK_CONTACT has the metadata supports_per_number_preferred_account. Also added a flag to disable the whole preferred SIM feature. Bug: 69638458 Test: CallingAccountSelectorTest PiperOrigin-RevId: 176687062 Change-Id: Id00debe2393068a422907a9eff2ac4ef0fcf6f8e
2017-11-22Fix showing CallingAccountSelector in lock screentwyen
android:showWhenLocked and FLAG_SHOW_WHEN_LOCKED is added to PreCallActivity so it can be launched in lockscreen. PreCallCoordinator now grabs new instances of PreCallActions onResume so the state can be flushed. If it is reused states like PendingAction might be used after it is discarded. Added null check before discarding fragment because it might not be created yet due to background query. Bug: 69570769 Test: CallingAccountSelectorTest PiperOrigin-RevId: 176587256 Change-Id: Iaa7145e860136e9177f568e2c84461ed5efa12a1
2017-11-21Require N for preferred SIM querytwyen
PhoneLookup.DATA_ID is only available after N. The fallback database should address this in a future CL. Bug: 69420158 Test: CallingAccountSelectorTest PiperOrigin-RevId: 176534281 Change-Id: I51ae1705fce6d7d4138b41fbd00d131447e49786
2017-11-20Implement SIM selection dialogtwyen
Bug: 64216442,64214592,64213352 Test: N/A PiperOrigin-RevId: 176424724 Change-Id: I1709156098a14ac3bd35d98b913e7b881fcd9b2b
2017-11-20Clear pendingAction when pausing PreCallCoordinatortwyen
When resumed runNextAction() will assert that pendingAction is null so if there's any it won't be interrupted. When the coordinator is paused all dialogs and pending actions must be discarded. If the pending action is not properly discarded it will still assert when trying to call finish(). Bug: 69069675 Test: PreCallCoordinatorImplTest PiperOrigin-RevId: 176420108 Change-Id: Ie89bda3621371a105dc58ff02d83812194a1ea0b
2017-11-20Add config flag for CallingAccountSelectortwyen
Since CallingAccountSelector is currently the only action that requires a UI, disabling it will effectively revert the PreCall behavior back to pre-PreCall era, sending intents to telecom directly. Bug: 68953196 Test: CallingAccountSelectorTest PiperOrigin-RevId: 176398440 Change-Id: I612a56bc66f32cf72779bd7c507de6a0784f1298
2017-11-18Implement suggested SIMtwyen
This CL adds a module that can query providers to aid users choosing which SIM to call with. Bug: 64214592 Test: MotoSuggestionProviderTest PiperOrigin-RevId: 176129303 Change-Id: Idb6314ad7f5a1bcd20b5b9173d3bfd873383cc84
2017-11-18Implement headless PreCalltwyen
If no actions require an activity, instead of launching the PreCallActivity, all actions will be performed immediately, and the call intent will be sent to telecom directly. This reduces the latency & risk when mutli SIM is not supported. Bug: 68953196 Test: PreCallImplTest, HeadlessPreCallCoordinatorTest PiperOrigin-RevId: 176032790 Change-Id: I03258e8643f18c65a8e5b1a84b18b71b30638044
2017-11-18Implement preferred SIMtwyen
Before prompting the user to select the SIM, CallingAccountSelector will lookup the fallback preferred SIM database to see if a preferred SIM is already set and bypass the selection. If the number is in contacts the user will also have the option to store the selected SIM as preferred. Bug: 64213352 Test: CallingAccountSelectorTest PiperOrigin-RevId: 175592732 Change-Id: I6a5a8ad8772eccfb4a119c529dcd3945b9dc0b1e
2017-11-11Hook up pre-call actionstwyen
This CL replaces all instance of CallIntentBuilder.build() with PreCall.getIntent(), which when run as an activity, will finish building the intent with user interaction. Bug: 64216442 Test: manual PiperOrigin-RevId: 174924323 Change-Id: If41868df4c7ed078d03bd3431fa85b8947056a01
2017-11-11Implement CallingAccountSelector and AssistedDialActionZachary Heidepriem
CallingAccountSelector examines the CallIntentBuilder, and if the PhoneAccountHandle is missing on a multi-SIM device while the default is not set, it will show a dialog to let the user select it. This step used to be after the in call UI is launched and telecom wants dialer to disambiguate. This step is moved to pre call as dialer need more control, like voicemail calls should always prompt, or the preferred SIM info might be available. This also allows telecom to send the selected PhoneAccountHandle to other apps so they have more information on how to rewrite numbers. AssistedDialAction replaces the step previously in CallIntentBuilder.build(), and rewrites the URI. Pre-call actions are not hooked up for dialing in this CL yet, assisted dialing will still be broken. Bug: 64216442 Test: CallingAccountSelectorTest, AssistedDialActionTest PiperOrigin-RevId: 174917321 Change-Id: Iba2e9092f83c036b402d4044a48ff5c44e806210
2017-11-11Implement PreCallCoordinatortwyen
When the user makes a call, the PreCallCoordinator will get a list of actions to perform from PreCallActionProviderComponent and apply them to the pending CallIntentBuilder, before sending the built intent to telecom Bug: 64216442 Test: PreCallExecutorImplTest PiperOrigin-RevId: 174911537 Change-Id: Ide5ec431d4e6e7879fcdfdbbbd7ea5eed9963b2c