1
0
mirror of https://github.com/vector-im/riotX-android synced 2025-10-06 08:12:46 +02:00

Compare commits

...

278 Commits

Author SHA1 Message Date
Adam Brown
739a513f89 moving external library modules to an external directory 2022-09-16 15:15:32 +01:00
Adam Brown
e83fa9c81f removing dialpad reliance on the legacy support library 2022-09-16 15:15:32 +01:00
Adam Brown
abd70d953b disabling lint for the pulled in module 2022-09-16 15:15:32 +01:00
Adam Brown
5058f942af manually including the im.dlg:android-dialer:1.2.5
- avoids using appcompat
- avoids using an artifact without a source repository
2022-09-16 15:15:32 +01:00
Adam Brown
8bfe7b68c3 Merge pull request #7140 from vector-im/feature/adm/legacy-support-library-usages
Excluding legacy support library annotation usages
2022-09-16 15:14:46 +01:00
Adam Brown
11e6ca1784 moving the jitsi exclude directly to the dependency so that other modules also get the exclusion
- also excludes the support dependency from the barcode scanner
2022-09-16 12:16:03 +01:00
Adam Brown
ae50f5a006 adding changelog entry 2022-09-16 11:37:39 +01:00
Adam Brown
be9c9f1640 formatting 2022-09-16 11:37:39 +01:00
Adam Brown
1d8b4ce63b excluding support annotations from jsonviewer module dependency 2022-09-16 11:37:39 +01:00
Adam Brown
4e99217164 excluding jitsi's android-scalablevideoview fork's support library
- The library exports a jetified artifact but doesn't remove the support library dependency /home/adam/dev/element/element-android/vector/build.gradle
2022-09-16 11:37:39 +01:00
Adam Brown
c61df899b4 removing unused dependency 2022-09-16 11:37:39 +01:00
Adam Brown
ca92ad267d excluding compile time legacy support annotations from dependencies 2022-09-16 11:37:38 +01:00
Adam Brown
b05d52bb6d Merge pull request #6788 from vector-im/feature/adm/app-level-variant-v2
`:vector-app` level variants
2022-09-16 10:36:58 +01:00
Benoit Marty
ad16130a94 Merge pull request #7147 from vector-im/dependabot/gradle/appDistribution-16.0.0-beta04
Bump appDistribution from 16.0.0-beta03 to 16.0.0-beta04
2022-09-16 09:58:02 +02:00
dependabot[bot]
e86b72b8db Bump appDistribution from 16.0.0-beta03 to 16.0.0-beta04
Bumps `appDistribution` from 16.0.0-beta03 to 16.0.0-beta04.

Updates `firebase-appdistribution-api-ktx` from 16.0.0-beta03 to 16.0.0-beta04

Updates `firebase-appdistribution` from 16.0.0-beta03 to 16.0.0-beta04

---
updated-dependencies:
- dependency-name: com.google.firebase:firebase-appdistribution-api-ktx
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.firebase:firebase-appdistribution
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-15 23:11:49 +00:00
Florian Renaud
0ce72057dc Merge pull request #7123 from vector-im/bugfix/fre/start_dm_room_list_glitch
Start DM - Fix glitch in the room list
2022-09-15 16:55:47 +02:00
Adam Brown
60b164a447 using fully qualified path to test activity, fixes missing reference 2022-09-15 15:17:11 +01:00
Eric Decanini
01e1d74c72 Merge pull request #7103 from vector-im/bugfix/eric/landscape-bottom-sheet-peek
[New Layout] Adds peek height (min height) to new layout bottom sheets
2022-09-15 10:03:11 -04:00
Adam Brown
e9d15b46d8 lifting the activity alias entry to the application module
- fixes the androidTests expecting a shortcuts xml
2022-09-15 14:50:08 +01:00
Adam Brown
619ea819ed using debug variant for the vector CA tests, gplay only exists at the root level 2022-09-15 14:50:08 +01:00
Adam Brown
68da403f2f using the top level debug unit test task when executing tests for coverage to avoid needing to specify every module 2022-09-15 14:50:08 +01:00
Adam Brown
e9e29603de adding missing nightly source inclusions 2022-09-15 14:50:08 +01:00
Adam Brown
9e5f07a855 suppressing lint warning for constant that delegates to the correct value 2022-09-15 14:50:08 +01:00
Adam Brown
1d50bbdbda fixing manifest imports and giving androidTest its own dedicated manifest 2022-09-15 14:50:08 +01:00
Adam Brown
0c469ae079 removing extra application id declaration 2022-09-15 14:50:08 +01:00
Adam Brown
32a15bee04 adding changelog entry 2022-09-15 14:50:08 +01:00
Adam Brown
0691046601 enabling build caching by default to improve build times 2022-09-15 14:50:08 +01:00
Adam Brown
3a38898961 lifting fdroid and gplay variants to the application module 2022-09-15 14:50:08 +01:00
Adam Brown
373a0ca4fb split commit to make debug changes to avoid files being seen as new! 2022-09-15 14:50:08 +01:00
Adam Brown
5d533d4ec9 lifting debug build type to the application module 2022-09-15 14:50:08 +01:00
Adam Brown
a947a53e14 lifting the release build type to the application module 2022-09-15 14:50:08 +01:00
Adam Brown
b72a174edf lifting nightly to the application module 2022-09-15 14:50:08 +01:00
Adam Brown
e53972cf2d adding changelog entry 2022-09-15 14:42:56 +01:00
Florian Renaud
6c9ae331e3 transform list to iterable 2022-09-15 15:16:51 +02:00
Nikita Fedrunov
1d3c191153 scroll recents carouse to start when item added/moved to start (#7120) 2022-09-14 22:55:01 +02:00
Nikita Fedrunov
7631c7ac9f room leaving prompt dialog now waits user to confirm leaving before do so (#7124) 2022-09-14 22:54:40 +02:00
Florian Renaud
e792228879 Changelog 2022-09-14 16:41:09 +02:00
Florian Renaud
3b1599763c Start DM - Fix glitch by not showing the local rooms in the room list 2022-09-14 16:41:09 +02:00
ericdecanini
50b042ee98 Merge remote-tracking branch 'origin/develop' into bugfix/eric/landscape-bottom-sheet-peek
# Conflicts:
#	vector/src/main/java/im/vector/app/features/home/room/list/home/NewChatBottomSheet.kt
2022-09-14 09:46:43 -04:00
ericdecanini
f4b5cfc71f Makes bottom sheets inherit VectorBaseBottomSheetDialogFragment 2022-09-14 09:46:00 -04:00
ericdecanini
e0f327e8f6 Removes unneeded code in BottomSheetDialog.kt 2022-09-14 09:37:42 -04:00
Maxime NATUREL
7982f4be00 Merge pull request #7084 from vector-im/feature/mna/dm-session-details
[Device management] Session details screen (PSG-686)
2022-09-14 13:11:22 +02:00
Maxime NATUREL
fb3fdf097c Reusing some existing strings 2022-09-14 10:31:22 +02:00
Maxime NATUREL
a1bdfd1a5c Using shouldBeNull() method in unit tests 2022-09-14 10:31:22 +02:00
Maxime NATUREL
279820224c Long press on the whole content item 2022-09-14 10:31:22 +02:00
Maxime NATUREL
6cd0fbb614 Unit tests for the ViewModel 2022-09-14 10:31:22 +02:00
Maxime NATUREL
c1dfa925c0 Unit tests for use cases to check visibility of sections 2022-09-14 10:31:22 +02:00
Maxime NATUREL
4205b4a777 Unit tests for session overview navigator 2022-09-14 10:31:22 +02:00
Maxime NATUREL
4cd81f194c Copy content to clipboard on long click on an item 2022-09-14 10:31:22 +02:00
Maxime NATUREL
ecb7d77582 Hiding the last content item divider 2022-09-14 10:31:22 +02:00
Maxime NATUREL
30effb781b Fixing margins in list items 2022-09-14 10:31:22 +02:00
Maxime NATUREL
92888b666c Adding extra top margin between sections 2022-09-14 10:31:22 +02:00
Maxime NATUREL
bf88c16c9d Show basic details info 2022-09-14 10:31:21 +02:00
Maxime NATUREL
94d1649ec9 Creation of header and content items 2022-09-14 10:31:21 +02:00
Maxime NATUREL
c7099f53c1 Using camelCase syntax for view ids 2022-09-14 10:31:21 +02:00
Maxime NATUREL
51fba85a3a Using buildString{} inline method to improve readability 2022-09-14 10:31:21 +02:00
Maxime NATUREL
3970c2ec31 Using setTextOrHide() extension method inside SessionInfoView 2022-09-14 10:31:21 +02:00
Maxime NATUREL
15cf8b63a0 Using unwrap() extension method 2022-09-14 10:31:21 +02:00
Maxime NATUREL
9553fe0648 Using a ScrollView for the Session overview screen 2022-09-14 10:31:21 +02:00
Maxime NATUREL
a661f9c3fb Navigation from session overview to session details 2022-09-14 10:31:21 +02:00
Maxime NATUREL
4a89fcea14 Adding basic structure for the new screen 2022-09-14 10:31:21 +02:00
Maxime NATUREL
583cc29472 Adding changelog entry 2022-09-14 10:31:21 +02:00
Benoit Marty
8dbfafb324 Merge pull request #7102 from vector-im/feature/eric/double-space-click-fix
Fixes Crash On Double Click Of Space FABs
2022-09-14 10:15:08 +02:00
ericdecanini
34303c4a62 Removes inject constructor in NewChatBottomSheet 2022-09-13 16:27:29 -04:00
ericdecanini
85f16e8dfa Adds API 30 compatible method 2022-09-13 16:21:36 -04:00
Maxime NATUREL
147dac8ebf Merge pull request #7104 from vector-im/dependabot/gradle/flipper-0.164.0
Bump flipper from 0.163.0 to 0.164.0
2022-09-13 14:03:45 +02:00
dependabot[bot]
125339a164 Bump flipper from 0.163.0 to 0.164.0
Bumps `flipper` from 0.163.0 to 0.164.0.

Updates `flipper` from 0.163.0 to 0.164.0
- [Release notes](https://github.com/facebook/flipper/releases)
- [Commits](https://github.com/facebook/flipper/compare/v0.163.0...v0.164.0)

Updates `flipper-network-plugin` from 0.163.0 to 0.164.0
- [Release notes](https://github.com/facebook/flipper/releases)
- [Commits](https://github.com/facebook/flipper/compare/v0.163.0...v0.164.0)

---
updated-dependencies:
- dependency-name: com.facebook.flipper:flipper
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.facebook.flipper:flipper-network-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 23:10:32 +00:00
ericdecanini
55c60c9a40 Adds changelog file 2022-09-12 17:49:06 -04:00
ericdecanini
8fc201121d Adds min height to new chat 2022-09-12 17:44:59 -04:00
ericdecanini
662d77cb7e Adds min height to space sheet 2022-09-12 17:40:22 -04:00
ericdecanini
db83099dc3 Adds changelog file 2022-09-12 12:29:33 -04:00
ericdecanini
8177d9777c Fixes crash on double click of space fabs 2022-09-12 12:26:57 -04:00
Benoit Marty
2a59533818 Merge pull request #7082 from vector-im/dependabot/gradle/com.googlecode.libphonenumber-libphonenumber-8.12.55
Bump libphonenumber from 8.12.54 to 8.12.55
2022-09-12 17:29:44 +02:00
Benoit Marty
7f766eef2a Merge pull request #7092 from pt2121/pt/5424-qr
Fix add by QR code layout (#5424)
2022-09-12 17:28:17 +02:00
Benoit Marty
6ac4d58636 Merge pull request #7098 from vector-im/sync-emojis
Sync Emojis
2022-09-12 17:24:58 +02:00
Benoit Marty
ec0770434d Merge pull request #7035 from vector-im/feature/bma/space_response_model
Space response model
2022-09-12 17:24:10 +02:00
Nikita Fedrunov
da83a85f74 new app layout's room list overhaul (#7101) 2022-09-12 16:47:32 +02:00
bmarty
0c4707c315 Sync Emojis 2022-09-12 00:06:34 +00:00
Prat T
73eb63a35e Fix add by QR code layout (#5424)
Signed-off-by: Prat T <pt2121@users.noreply.github.com>
2022-09-10 10:53:34 -07:00
Benoit Marty
e37344a059 Version++ 2022-09-10 08:15:31 +02:00
Benoit Marty
5d035314b4 Merge branch 'release/1.4.36' into develop 2022-09-10 08:13:58 +02:00
Benoit Marty
59d3ff1671 fastlane 2022-09-10 08:13:43 +02:00
Benoit Marty
58b94aef2d Manually improve CHANGES.md 2022-09-10 08:11:58 +02:00
Benoit Marty
4de62d84b4 towncrier 2022-09-10 08:04:20 +02:00
Benoit Marty
4b63f4b9bf Merge pull request #7085 from vector-im/feature/bma/fix_push
Feature/bma/fix push
2022-09-09 18:03:10 +02:00
Benoit Marty
8c884f45fb Ignore Instantiatable class warning 2022-09-09 16:50:55 +02:00
Benoit Marty
e19647f6ca Firebase provides Map<String, String?> 2022-09-09 16:33:57 +02:00
Benoit Marty
ca2805fb7f Merge pull request #7083 from vector-im/dependabot/gradle/flipper-0.163.0
Bump flipper from 0.162.0 to 0.163.0
2022-09-09 16:05:56 +02:00
Benoit Marty
bdff23a74d update doc 2022-09-09 15:59:34 +02:00
Benoit Marty
d9ad9859ec Format 2022-09-09 15:59:34 +02:00
Benoit Marty
7c4527fba6 Fix test - no need to use Moshi to parse FCM Push data. 2022-09-09 15:59:34 +02:00
Maxime NATUREL
b501770fa9 Merge pull request #7058 from vector-im/fix/mna/run-sonar-only-when-token-available
CI: only run sonarqube task when token is known
2022-09-09 11:41:06 +02:00
Benoit Marty
f88039b7fd Merge pull request #7068 from p1gp1g/fix/fcm-push2
Use firebaseReceiver with FCM
2022-09-09 09:46:06 +02:00
Maxime NATUREL
ff9add5a0c Re-adding env variables section inside the sonarqube job 2022-09-09 09:25:36 +02:00
Maxime NATUREL
b60c279c06 Re-adding "always()" expression in the condition 2022-09-09 09:25:36 +02:00
Maxime NATUREL
41f75eed50 Adding changelog entry 2022-09-09 09:25:36 +02:00
Maxime NATUREL
398f9427df Only run sonarqube task if tokens are not empty to avoid failure 2022-09-09 09:25:36 +02:00
dependabot[bot]
b4d72d2219 Bump flipper from 0.162.0 to 0.163.0
Bumps `flipper` from 0.162.0 to 0.163.0.

Updates `flipper` from 0.162.0 to 0.163.0
- [Release notes](https://github.com/facebook/flipper/releases)
- [Commits](https://github.com/facebook/flipper/compare/v0.162.0...v0.163.0)

Updates `flipper-network-plugin` from 0.162.0 to 0.163.0
- [Release notes](https://github.com/facebook/flipper/releases)
- [Commits](https://github.com/facebook/flipper/compare/v0.162.0...v0.163.0)

---
updated-dependencies:
- dependency-name: com.facebook.flipper:flipper
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.facebook.flipper:flipper-network-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-08 23:09:02 +00:00
dependabot[bot]
b66c405430 Bump libphonenumber from 8.12.54 to 8.12.55
Bumps [libphonenumber](https://github.com/google/libphonenumber) from 8.12.54 to 8.12.55.
- [Release notes](https://github.com/google/libphonenumber/releases)
- [Changelog](https://github.com/google/libphonenumber/blob/master/making-metadata-changes.md)
- [Commits](https://github.com/google/libphonenumber/compare/v8.12.54...v8.12.55)

---
updated-dependencies:
- dependency-name: com.googlecode.libphonenumber:libphonenumber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-08 23:08:41 +00:00
sim
a17a4fe4b1 Add logs for invalid push data 2022-09-08 17:16:55 +02:00
Benoit Marty
614383c08d Merge pull request #7081 from vector-im/bugfix/nfe/app_layout_feature_flag_restart
restart HomeActivity when app layout flag is changed
2022-09-08 16:54:08 +02:00
sim
3e12907b26 Parse pushData in the push receiver 2022-09-08 16:25:48 +02:00
NIkita Fedrunov
4222c7c7c4 changed to only restart home activity when resumed with different app layout flag state 2022-09-08 16:24:34 +02:00
NIkita Fedrunov
cb36ef766c restart app when app layout flag is changed 2022-09-08 16:14:57 +02:00
sim
bc5309b5d7 Rename VectorMessagingReceiver to VectorUnifiedPushMessagingReceiver 2022-09-08 15:40:06 +02:00
sim
dbea1726ec Rename VectorMessagingHelper to VectorPushHandler 2022-09-08 15:38:52 +02:00
sim
2527dbbeb2 Rename FirebaseReceiver to VectorFirebaseMessagingService 2022-09-08 15:37:18 +02:00
Benoit Marty
de17c47a7d Merge pull request #7038 from vector-im/feature/eric/new-layout-labs
New Layout - Labs Flag (to replace feature flag)
2022-09-08 14:35:38 +02:00
NIkita Fedrunov
2ab0343e4f sanity test now reads properties value to determine app layout feature status + small fix for tests 2022-09-08 12:37:25 +02:00
sim
65654e7e8a Lint 2022-09-08 12:21:11 +02:00
NIkita Fedrunov
6badbe738d robots are not checking feature flag for newAppLayout 2022-09-08 12:09:33 +02:00
sim
f65074b3c5 Update pusher with FCM new token only if using FCM 2022-09-08 11:46:34 +02:00
Maxime NATUREL
62dbab907d Merge pull request #7044 from vector-im/feature/mna/clean-vm-for-dm-v2
[Devices Management] Refactor some code to improve testability (PSG-701)
2022-09-08 11:44:56 +02:00
sim
48498020a0 Ensure FCM always have the good gateway 2022-09-08 11:23:15 +02:00
sim
3267cbbf78 Lint 2022-09-08 11:15:41 +02:00
sim
94e2a0a3e3 Ensure FCM token is always retrieved 2022-09-08 10:58:08 +02:00
Benoit Marty
5dd26a43dd Merge pull request #7059 from vector-im/bugfix/eric/new-layout-open-invite
New Layout - Allows you to open an invite by clicking its cell
2022-09-08 10:51:19 +02:00
Benoit Marty
a743cf28c6 Merge pull request #7061 from vector-im/feature/bma/no_ReleaseNotesActivity_on_login
Fix ReleaseNotesActivity displayed after login.
2022-09-08 10:50:50 +02:00
sim
7bdcacf489 Merge branch 'misc/refactor-uphelper' into fix/fcm-push2 2022-09-08 10:49:53 +02:00
sim
6ba963b552 Fix gateway 2022-09-08 10:49:49 +02:00
sim
0b9b8251f9 Do not intent to VectorMessagingReceiver from FirebaseReceiver
Use VectorMessagingHelper to directly call onMessage
2022-09-08 10:34:56 +02:00
Maxime NATUREL
45b138e53d Using orFalse() extension method on nullable boolean 2022-09-08 09:48:45 +02:00
Maxime NATUREL
c45f536855 RefreshDevicesOnCryptoDevicesChangeUseCase unit tests 2022-09-08 09:48:45 +02:00
Maxime NATUREL
f2891b74c5 Adding changelog entry 2022-09-08 09:48:45 +02:00
Maxime NATUREL
047384c08c Fix some coding style issues 2022-09-08 09:48:45 +02:00
Maxime NATUREL
3566b10e3c DevicesViewModel unit tests 2022-09-08 09:48:45 +02:00
Maxime NATUREL
438f302787 GetDeviceFullInfoListUseCase unit tests 2022-09-08 09:48:45 +02:00
Maxime NATUREL
07d9e35842 GetCurrentSessionCrossSigningInfoUseCase unit tests 2022-09-08 09:48:45 +02:00
Maxime NATUREL
27031ab267 RefreshDevicesUseCase unit tests 2022-09-08 09:48:45 +02:00
Maxime NATUREL
06d447247a Updating existing unit tests 2022-09-08 09:48:45 +02:00
Maxime NATUREL
0eae1bd505 Listen verification + refresh devices use cases 2022-09-08 09:48:45 +02:00
Maxime NATUREL
39a0b3b1ba Moving recently created use cases inside v2 package 2022-09-08 09:48:45 +02:00
Maxime NATUREL
712d39b9dd Inject new ViewModel in the fragment V2 + add use cases 2022-09-08 09:48:43 +02:00
Maxime NATUREL
4a6a39b3c4 Declare MarkAsManuallyVerified action 2022-09-08 09:48:03 +02:00
Maxime NATUREL
e3c41a07e5 Empty ViewModel V2 2022-09-08 09:48:03 +02:00
Maxime NATUREL
6c2bf35d60 Merge pull request #7005 from vector-im/feature/mna/session-overview-screen
[Devices Management] Session overview screen (PSG-691, PSG-693)
2022-09-08 09:18:31 +02:00
Benoit Marty
418a48de18 Deleting translations of 2 strings. They will have to be translated again due to the addition of %s in the original strings. 2022-09-07 18:24:13 +02:00
sim
00a04b807e Lint 2022-09-07 18:22:34 +02:00
Benoit Marty
f13c34b2a0 Merge pull request #7060 from RiotTranslateBot/weblate-element-android-element-app
Translations update from Weblate
2022-09-07 18:22:03 +02:00
sim
5b46c803b2 Add changelog detail
Signed-off-by: sim <git@sgougeon.fr>
2022-09-07 18:19:06 +02:00
sim
9cf6dd7a88 Use firebaseReceiver with FCM 2022-09-07 18:02:26 +02:00
Benoit Marty
5143ef9deb Merge pull request #6727 from anoadragon453/patch-2
Clarify that setting up a FCM Rewrite Proxy is not necessary for use of the UnifiedPush FCM distributor.
2022-09-07 15:51:04 +02:00
Benoit Marty
59e6fa98c9 Merge pull request #7000 from pt2121/pt/6529-room
Suggest @room when @channel, @everyone, or @here is typed in composer
2022-09-07 15:49:18 +02:00
Benoit Marty
a5046d43c8 Fix ReleaseNotesActivity displayed after login.
Ensure the state is up to date, when we will request it later with withState{}
2022-09-07 14:51:37 +02:00
Weblate
d1776a04c0 Merge branch 'origin/develop' into Weblate. 2022-09-07 12:12:04 +00:00
Przemysław Romanik
13dd87dd85 Translated using Weblate (Polish)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/pl/
2022-09-07 12:11:56 +00:00
Przemysław Romanik
36ba1c5491 Translated using Weblate (Polish)
Currently translated at 99.8% (2358 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pl/
2022-09-07 12:11:54 +00:00
ericdecanini
3b2fa0d563 Merge remote-tracking branch 'origin/develop' into bugfix/eric/new-layout-open-invite 2022-09-07 14:03:54 +02:00
ericdecanini
4a31dc403f Removes unused import 2022-09-07 14:03:48 +02:00
ericdecanini
37b216393e Merge remote-tracking branch 'origin/develop' into feature/eric/new-layout-labs 2022-09-07 14:02:10 +02:00
Benoit Marty
bdfbbbb2e6 Merge pull request #7020 from vector-im/feature/nfe/app_layout_all_screens_test
fixed allscreens sanity test for enabled app layout flag
2022-09-07 13:57:17 +02:00
ericdecanini
3c6efd673e Allows you to open an invite by clicking the invite cell 2022-09-07 11:58:47 +02:00
Benoit Marty
c408621bd5 Merge pull request #7054 from vector-im/feature/bma/fix_invite_to_room_in_space
Fix invite to room in space
2022-09-07 11:53:34 +02:00
Benoit Marty
8c32b08505 Changelog 2022-09-07 11:06:49 +02:00
Benoit Marty
9b5d8c2d01 Merge pull request #6935 from vector-im/dependabot/gradle/com.autonomousapps.dependency-analysis-1.13.1
Bump com.autonomousapps.dependency-analysis from 1.12.0 to 1.13.1
2022-09-07 11:03:43 +02:00
Benoit Marty
80507dac00 Merge pull request #7024 from vector-im/bugfix/eric/new-layout-recents-padding
New Layout - Fixes padding of recents item selectable background
2022-09-07 11:00:36 +02:00
Benoit Marty
199195dcbd Merge pull request #7039 from vector-im/feature/eric/new-layout-update-icons
New Layout - Replace space icon (and release notes image)
2022-09-07 10:57:23 +02:00
Benoit Marty
608c4bacec Merge pull request #7055 from vector-im/kittykat-patch-1
Update automation to match renamed coloumns
2022-09-07 10:49:37 +02:00
Kat Gerasimova
39f366a4a2 Update automation to match renamed coloumns
App team's column names have been updated
2022-09-07 09:36:59 +01:00
ericdecanini
64c8789ef2 Merge remote-tracking branch 'origin/develop' into feature/eric/new-layout-labs 2022-09-07 10:35:44 +02:00
Eric Decanini
da88b37ec7 Merge pull request #7040 from vector-im/bugfix/eric/new-layout-missing-header
New Layout - Adds missing space list header
2022-09-07 10:31:31 +02:00
Maxime NATUREL
669beb1156 Fix missing mapper in CryptoStoreHelper for tests 2022-09-07 10:27:19 +02:00
Benoit Marty
2ba00b3845 If we need the FragmentManager, let's require to have a FragmentActivity. 2022-09-07 10:14:29 +02:00
Benoit Marty
fe484e84f4 Fix clicking on invite does not work. Fix #7053
We need the FragmentManager to display a bottom sheet.
2022-09-07 10:01:31 +02:00
Benoit Marty
c5d3eaffb9 Merge pull request #7041 from vector-im/feature/bma/debug_release_note
Debug release note
2022-09-07 09:40:48 +02:00
Maxime NATUREL
682905df25 Fix unused string warning 2022-09-07 09:32:48 +02:00
Maxime NATUREL
2148270773 Update unit tests 2022-09-07 09:32:48 +02:00
Maxime NATUREL
6e9b2baf6f Rendering inactive status in SessionInfoView 2022-09-07 09:32:48 +02:00
Maxime NATUREL
0b105e2a7a Adding comment with examples of some parametrized strings 2022-09-07 09:32:48 +02:00
Maxime NATUREL
52d05b373c Fix post rebase 2022-09-07 09:32:47 +02:00
Maxime NATUREL
fb8d4668d8 Fixing wrong copyright title 2022-09-07 09:32:47 +02:00
Maxime NATUREL
1ad585e154 Adding last seen details + fix observation of wrong deviceId in ViewModel 2022-09-07 09:32:47 +02:00
Maxime NATUREL
d12bb09273 Adding learn more link in verification status details 2022-09-07 09:32:47 +02:00
Maxime NATUREL
fde7072bc7 Unit tests for computing trust level of device 2022-09-07 09:32:47 +02:00
Maxime NATUREL
38a04c3655 Unit tests for GetCurrentSessionCrossSigningInfoUseCase 2022-09-07 09:32:47 +02:00
Maxime NATUREL
3f30cf0bee Updating existing unit tests 2022-09-07 09:32:47 +02:00
Maxime NATUREL
78c2b10b89 Navigation from other session item 2022-09-07 09:32:47 +02:00
Maxime NATUREL
f4865df50c Show info in overview screen 2022-09-07 09:32:47 +02:00
Maxime NATUREL
52006c1bb4 Renaming CurrentSessionView into SessionInfoView to be more generic 2022-09-07 09:32:47 +02:00
Maxime NATUREL
a5ee4faef4 Introducing some reusable usecases 2022-09-07 09:32:47 +02:00
Maxime NATUREL
b995f798f9 Adding unit tests for viewModel 2022-09-07 09:32:47 +02:00
Maxime NATUREL
611749c08f Adding unit tests for mapper 2022-09-07 09:32:47 +02:00
Maxime NATUREL
0c3310dd16 Adding unit tests for the new use case 2022-09-07 09:32:47 +02:00
Maxime NATUREL
68f106efac Adding use case to get full device info for a given device id 2022-09-07 09:32:47 +02:00
Maxime NATUREL
e542dc4aac Adding a method to retrieve livedata of crypto device info for a given device id 2022-09-07 09:32:47 +02:00
Maxime NATUREL
f74a0b0901 Adding a method to retrieve livedata of device info for a given device id 2022-09-07 09:32:47 +02:00
Maxime NATUREL
2a599d9760 Small renamings/reorganization in CryptoService 2022-09-07 09:32:47 +02:00
Maxime NATUREL
3eb29b4661 Renaming view state 2022-09-07 09:32:47 +02:00
Maxime NATUREL
26dbd31717 Unit tests for navigator 2022-09-07 09:32:47 +02:00
Maxime NATUREL
ebf707dca9 Navigation from current session 2022-09-07 09:32:45 +02:00
Maxime NATUREL
969663786b Renaming header list view to be consistent 2022-09-07 09:32:09 +02:00
Maxime NATUREL
e2aa66e4c2 Adding changelog entry 2022-09-07 09:32:09 +02:00
ericdecanini
afbb76f341 Fixes lint error 2022-09-07 08:36:52 +02:00
Jorge Martín
273999ee88 Fix voice recording tests 2022-09-06 20:08:29 +02:00
ericdecanini
6c2363471d Unlocks the drawer layout when not new layout 2022-09-06 18:01:36 +02:00
ericdecanini
9564c8f144 Changes some preferences to be enabled or disabled by labs flag 2022-09-06 17:32:08 +02:00
ericdecanini
d77ce27953 Fixes wrong use of feature flag instead of labs flag 2022-09-06 17:31:52 +02:00
Benoit Marty
b4fcffbdf9 Add missing points. 2022-09-06 17:11:25 +02:00
Benoit Marty
22f8ace4c4 Merge pull request #6957 from vector-im/sync-analytics-plan
Sync analytics plan
2022-09-06 17:09:52 +02:00
ericdecanini
b7efd6384c Changes vector feature preference key and function name for clarity 2022-09-06 16:07:12 +02:00
ericdecanini
ef17aac981 Adds changelog file 2022-09-06 15:52:37 +02:00
Benoit Marty
f54979ce13 Add some debug tools about ReleaseNotesActivity.
- reset the show status
- display this Activity
2022-09-06 15:50:48 +02:00
ericdecanini
593a04ea25 Adds missing space list header 2022-09-06 15:41:30 +02:00
ericdecanini
31a3552e26 Merge remote-tracking branch 'origin/develop' into feature/eric/new-layout-labs
# Conflicts:
#	vector/src/main/java/im/vector/app/features/settings/VectorSettingsLabsFragment.kt
2022-09-06 15:32:00 +02:00
ericdecanini
468c7b600c Re-adds feature flag 2022-09-06 15:30:19 +02:00
Benoit Marty
16fad63e49 Better to call setAppLayoutOnboardingShown when we are sure the Activity has been run. 2022-09-06 15:15:59 +02:00
Benoit Marty
f604b1d384 Private val is better. 2022-09-06 15:00:55 +02:00
Benoit Marty
b3eac52e3f Merge pull request #7022 from vector-im/feature/nfe/app_layout_hide_filters_for_space
hide favourites and dms filters for a selected space, if they are empty
2022-09-06 14:56:53 +02:00
Benoit Marty
1c35e5ae9c Merge pull request #6986 from vector-im/feature/nfe/invites_empty_state
empty state for new invites screen
2022-09-06 14:56:06 +02:00
Benoit Marty
4e0735c759 Merge pull request #7021 from vector-im/feature/nfe/app_layout_settings_update
obsolete settings are hidden when app layout flag is enabled
2022-09-06 14:53:51 +02:00
NIkita Fedrunov
4dc01fcfa6 changes according to CR 2022-09-06 14:51:11 +02:00
ericdecanini
91b4918526 Merge remote-tracking branch 'origin/feature/nfe/app_layout_hide_filters_for_space' into feature/eric/new-layout-labs 2022-09-06 14:46:12 +02:00
ericdecanini
5e0d84bb25 Uses referenced default value for new layout labs flag 2022-09-06 14:42:54 +02:00
ericdecanini
73d4492bf5 Adds changelog file 2022-09-06 14:40:47 +02:00
ericdecanini
707ff27371 Replaces spaces icon (and corresponding release notes image) 2022-09-06 14:34:42 +02:00
phardyle
250633ec67 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.7% (2356 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2022-09-06 11:32:54 +00:00
Anonimas
fea0c27bdd Translated using Weblate (Lithuanian)
Currently translated at 25.0% (592 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/lt/
2022-09-06 11:32:53 +00:00
waclaw66
59f8753c6a Translated using Weblate (Czech)
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/cs/
2022-09-06 11:32:43 +00:00
ericdecanini
a851b0aa96 Fixes lint error 2022-09-06 13:31:57 +02:00
ericdecanini
fbe5918f30 Adds changelog file 2022-09-06 12:52:48 +02:00
ericdecanini
24509543b9 Replaces feature flag with labs flag 2022-09-06 12:48:03 +02:00
Benoit Marty
97a010cbc5 Update doc. 2022-09-06 12:15:20 +02:00
Benoit Marty
8f69c5e0bc Split long lines and improve readability. 2022-09-06 12:10:21 +02:00
Benoit Marty
bfc89242fe Changelog 2022-09-06 11:45:05 +02:00
Benoit Marty
3c7889c95d Some cleanup 2022-09-06 11:36:44 +02:00
Benoit Marty
9347bc8cf4 Use a dedicated model for rooms/{roomId}/hierarchy endpoint result.
`rooms.children_state` is now a list of `SpaceChildSummaryEvent` instead of a list of `Event`.
2022-09-06 11:36:28 +02:00
Nikita Fedrunov
7cc7444bd5 applayout release experience (#7003) 2022-09-06 11:32:11 +02:00
Benoit Marty
6a3bef591c Merge pull request #6994 from vector-im/dependabot/gradle/com.github.UnifiedPush-android-embedded_fcm_distributor-2.1.3
Bump android-embedded_fcm_distributor from 2.1.2 to 2.1.3
2022-09-06 11:16:14 +02:00
NIkita Fedrunov
e0c455a476 update according to code review 2022-09-06 10:08:32 +02:00
Germain
36a221adf1 Merge pull request #6998 from vector-im/gsouquet-threads-automation 2022-09-06 08:51:12 +01:00
NIkita Fedrunov
ee300cf11d hide favourites and dms filters for a selected space, if they are empty 2022-09-06 07:54:16 +02:00
NIkita Fedrunov
891173c04a compilation error fixed 2022-09-06 07:18:45 +02:00
NIkita Fedrunov
1b651f2aa5 fixed lint 2022-09-06 06:59:10 +02:00
NIkita Fedrunov
9a29c79233 obsolete settings are hidden when app layout flag is enabled 2022-09-06 00:41:58 +02:00
NIkita Fedrunov
67b7bc3d83 fixed allscreens sanity test for enabled app layout flag 2022-09-06 00:00:35 +02:00
NIkita Fedrunov
61cf3c3125 review changes 2022-09-05 18:56:43 +02:00
NIkita Fedrunov
ecd1776085 removed obsolete cast 2022-09-05 16:51:38 +02:00
NIkita Fedrunov
8314eb71c0 Merge branch 'develop' into feature/nfe/invites_empty_state 2022-09-05 12:32:01 +02:00
bmarty
0f4deb7067 Sync analytics plan 2022-09-05 00:03:36 +00:00
Linerly
00f1c06504 Translated using Weblate (Indonesian)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/id/
2022-09-04 14:33:04 +00:00
Danial Behzadi
82868dd6b7 Translated using Weblate (Persian)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/fa/
2022-09-04 14:33:02 +00:00
random
df25b1a419 Translated using Weblate (Italian)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/it/
2022-09-04 14:33:00 +00:00
Jozef Gaal
0973a20fe4 Translated using Weblate (Slovak)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/sk/
2022-09-04 14:32:59 +00:00
lvre
abca70f6f9 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/pt_BR/
2022-09-04 14:32:57 +00:00
Emese Tóth
e4a1495f36 Translated using Weblate (Hungarian)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/hu/
2022-09-04 14:32:55 +00:00
Glandos
8727912052 Translated using Weblate (French)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/fr/
2022-09-04 14:32:53 +00:00
Vri
bb6cb597d1 Translated using Weblate (German)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/de/
2022-09-04 14:32:52 +00:00
Jozef Gaal
511c6a2ae1 Translated using Weblate (Slovak)
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sk/
2022-09-04 14:32:50 +00:00
lvre
a147d8623b Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2022-09-04 14:32:49 +00:00
random
34a424678d Translated using Weblate (Italian)
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/it/
2022-09-04 14:32:48 +00:00
Linerly
b13546b096 Translated using Weblate (Indonesian)
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/id/
2022-09-04 14:32:47 +00:00
Emese Tóth
db29ebb93d Translated using Weblate (Hungarian)
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/hu/
2022-09-04 14:32:46 +00:00
Glandos
287e890f60 Translated using Weblate (French)
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/
2022-09-04 14:32:43 +00:00
Danial Behzadi
c3bac2f0cf Translated using Weblate (Persian)
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2022-09-04 14:32:42 +00:00
Vri
054802c02b Translated using Weblate (German)
Currently translated at 99.3% (2346 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2022-09-04 14:32:41 +00:00
Prat T
6917e97f49 Suggest @room when @channel, @everyone, or @here is typed in composer (#6529)
Signed-off-by: Prat T <pt2121@users.noreply.github.com>
2022-09-03 17:26:45 -07:00
Germain
ad360074bf Remove threads board automation
The threads board has been closed and is now replaced by the Delight board
2022-09-02 15:54:08 +01:00
Jeff Huang
9616cd4186 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hant/
2022-09-02 08:38:07 +00:00
Priit Jõerüüt
c302438b37 Translated using Weblate (Estonian)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/et/
2022-09-02 08:38:05 +00:00
Ihor Hordiichuk
3c53a579a9 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/uk/
2022-09-02 08:38:03 +00:00
Jeff Huang
e0e9fbc820 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hant/
2022-09-02 08:38:01 +00:00
phardyle
ec260fac16 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.7% (2356 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2022-09-02 08:38:00 +00:00
Ihor Hordiichuk
cad23d1477 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2022-09-02 08:37:59 +00:00
Priit Jõerüüt
578ff6bd44 Translated using Weblate (Estonian)
Currently translated at 99.6% (2353 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/et/
2022-09-02 08:37:57 +00:00
Auri B. P
8535e30937 Translated using Weblate (Catalan)
Currently translated at 100.0% (2361 of 2361 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ca/
2022-09-02 08:37:56 +00:00
dependabot[bot]
da73550493 Bump android-embedded_fcm_distributor from 2.1.2 to 2.1.3
Bumps android-embedded_fcm_distributor from 2.1.2 to 2.1.3.

---
updated-dependencies:
- dependency-name: com.github.UnifiedPush:android-embedded_fcm_distributor
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 23:10:39 +00:00
Weblate
3e6f406ad4 Merge branch 'origin/develop' into Weblate. 2022-09-01 15:12:18 +00:00
waclaw66
deaf6984c1 Translated using Weblate (Czech)
Currently translated at 100.0% (75 of 75 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/cs/
2022-09-01 15:12:18 +00:00
NIkita Fedrunov
5003459962 empty state for new invites screen 2022-09-01 14:39:13 +02:00
sim
f7ae377874 Add changelog
Signed-off-by: sim <git@sgougeon.fr>
2022-08-25 09:33:26 +02:00
sim
e2646c3243 Remove never-matched if 2022-08-25 09:05:57 +02:00
sim
42c580c249 Add comments 2022-08-25 09:05:57 +02:00
sim
a4dd08ddb3 Always use register to open the distributor dialog
The forced unregistration always happens in register
function
2022-08-25 09:05:57 +02:00
sim
02d54878c3 Set distributor dialog always cancelable
ATM, it uses the default fallback if cancelled
2022-08-25 09:05:57 +02:00
Adam Brown
cda50dca8c trigger CI 2022-08-25 09:05:57 +02:00
dependabot[bot]
d130dd5e1b Bump com.autonomousapps.dependency-analysis from 1.12.0 to 1.13.1
Bumps com.autonomousapps.dependency-analysis from 1.12.0 to 1.13.1.

---
updated-dependencies:
- dependency-name: com.autonomousapps.dependency-analysis
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 23:09:05 +00:00
Andrew Morgan
e00a9a10fb changelog 2022-08-18 11:24:02 +01:00
Andrew Morgan
d52f3ab586 Clarify that an FCM Rewrite Proxy is not necessary 2022-08-18 11:24:02 +01:00
954 changed files with 10025 additions and 1502 deletions

View File

@@ -1,9 +1,9 @@
name: Test
on:
pull_request: {}
pull_request: { }
push:
branches: [main, develop]
branches: [ main, develop ]
# Enrich gradle.properties for CI/CD
env:
@@ -48,12 +48,12 @@ jobs:
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
emulator-build: 7425822
script: |
script: |
./gradlew gatherGplayDebugStringTemplates $CI_GRADLE_ARG_PROPERTIES
./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES
# NB: continue-on-error marks steps.tests.conclusion = 'success' but leaves stes.tests.outcome = 'failure'
# NB: continue-on-error marks steps.tests.conclusion = 'success' but leaves stes.tests.outcome = 'failure'
- name: Run all the codecoverage tests at once (retry if emulator failed)
uses: reactivecircus/android-emulator-runner@v2
if: always() && steps.tests.outcome == 'failure' # don't run if previous step succeeded.
@@ -70,12 +70,15 @@ jobs:
./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES
- run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
if: always() # we may have failed a previous step and retried, that's OK
# we may have failed a previous step and retried, that's OK
- name: Publish results to Sonar
env:
GITHUB_TOKEN: ${{ secrets.SONARQUBE_GITHUB_API_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
if: ${{ always() && env.GITHUB_TOKEN != '' && env.SONAR_TOKEN != '' && env.ORG_GRADLE_PROJECT_SONAR_LOGIN != '' }}
run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
- name: Format unit test results
if: always()

View File

@@ -142,32 +142,6 @@ jobs:
env:
PROJECT_ID: "PN_kwDOAM0swc2KCw"
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
move_threads_issues:
name: A-Threads to Thread board
runs-on: ubuntu-latest
# Skip in forks
if: >
github.repository == 'vector-im/element-android' &&
contains(github.event.issue.labels.*.name, 'A-Threads')
steps:
- uses: octokit/graphql-action@v2.x
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation add_to_project($projectid:ID!,$contentid:ID!) {
addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
projectNextItem {
id
}
}
}
projectid: ${{ env.PROJECT_ID }}
contentid: ${{ github.event.issue.node_id }}
env:
PROJECT_ID: "PN_kwDOAM0swc0rRA"
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
move_message_bubbles_issues:
name: A-Message-Bubbles to Message bubbles board
runs-on: ubuntu-latest

View File

@@ -27,7 +27,7 @@ jobs:
- uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488
with:
project: Android App Team
column: P1
column: Important Issues & Topics (P1)
repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
P1_issues_to_crypto_team_workboard:

View File

@@ -1,3 +1,69 @@
Changes in Element v1.4.36 (2022-09-10)
=======================================
New App Layout can be enabled in the Labs settings. Please give it a try!
Features ✨
----------
- Adds New App Layout into Labs ([#7038](https://github.com/vector-im/element-android/issues/7038))
- Try to detect devices that lack Opus encoder support, use bundled libopus library for those. ([#7010](https://github.com/vector-im/element-android/issues/7010))
- Suggest @room when @channel, @everyone, or @here is typed in composer ([#6529](https://github.com/vector-im/element-android/issues/6529))
Bugfixes 🐛
----------
- Fix long incremental sync. ([#6917](https://github.com/vector-im/element-android/issues/6917))
- Fix push with FCM ([#7068](https://github.com/vector-im/element-android/issues/7068))
- FTUE - Fixes optional email registration step always being mandatory ([#6969](https://github.com/vector-im/element-android/issues/6969))
- Fixes /addToSpace and /joinSpace commands showing invalid syntax warnings ([#6844](https://github.com/vector-im/element-android/issues/6844))
- Fix low occurrence crashes. ([#6967](https://github.com/vector-im/element-android/issues/6967))
- Fix crash when opening an unknown room ([#6978](https://github.com/vector-im/element-android/issues/6978))
- Fix crash on PIN code settings screen. ([#6979](https://github.com/vector-im/element-android/issues/6979))
- Fix autoplayed animated stickers ([#6982](https://github.com/vector-im/element-android/issues/6982))
- Catch race condition crash in voice recording ([#6989](https://github.com/vector-im/element-android/issues/6989))
- Fix invite to room when in a space buttons not working. ([#7054](https://github.com/vector-im/element-android/issues/7054))
In development 🚧
----------------
- Create DM room only on first message - Create the DM and navigate to the new room after sending an event ([#5525](https://github.com/vector-im/element-android/issues/5525))
- [App Layout] New empty states for home screen ([#6835](https://github.com/vector-im/element-android/issues/6835))
- [App Layout] Bottom navigation tabs are removed for new home screen ([#6565](https://github.com/vector-im/element-android/issues/6565))
- [App Layout] fixed space switching dialog measured with wrong height sometimes ([#6750](https://github.com/vector-im/element-android/issues/6750))
- [App Layout] Fabs doesn't go off screen anymore ([#6765](https://github.com/vector-im/element-android/issues/6765))
- [New Layout] Adds back navigation through spaces ([#6877](https://github.com/vector-im/element-android/issues/6877))
- [App Layout] new room invites screen ([#6889](https://github.com/vector-im/element-android/issues/6889))
- [App Layout] - Invites now show empty screen after you reject last invite ([#6876](https://github.com/vector-im/element-android/issues/6876))
- [App Layout] - space switcher now has empty state ([#6754](https://github.com/vector-im/element-android/issues/6754))
- [App Layout] - Improves Developer Mode Debug Button UX and adds it to New App Layout ([#6871](https://github.com/vector-im/element-android/issues/6871))
- [New Layout] Changes space sheet to accordion-style with expandable subspaces ([#6907](https://github.com/vector-im/element-android/issues/6907))
- [New Layout] Adds space invites ([#6924](https://github.com/vector-im/element-android/issues/6924))
- [App Layout] fixed invites count badge bottom margin on a home screen ([#6947](https://github.com/vector-im/element-android/issues/6947))
- [New Layout] Improves talkback accessibility ([#7016](https://github.com/vector-im/element-android/issues/7016))
- [New Layout] Changes space icon in fab and in release notes screen ([#7039](https://github.com/vector-im/element-android/issues/7039))
- [New Layout] Adds header to spaces bottom sheet ([#7040](https://github.com/vector-im/element-android/issues/7040))
- [App Layout] New App Layout is enabled by default (Edit: has to be enabled in Labs) ([#6958](https://github.com/vector-im/element-android/issues/6958))
- [App Layout] Obsolete settings are not shown when App Layout flag is enabled ([#6646](https://github.com/vector-im/element-android/issues/6646))
- [Devices Management] Session overview screen ([#6961](https://github.com/vector-im/element-android/issues/6961))
- [Devices Management] Refactor some code to improve testability ([#7043](https://github.com/vector-im/element-android/issues/7043))
- [Device Manager] Current Session Section ([#6902](https://github.com/vector-im/element-android/issues/6902))
- [Device Manager] Other Sessions Section ([#6945](https://github.com/vector-im/element-android/issues/6945))
- [Device Manager] Render Security Recommendations ([#6964](https://github.com/vector-im/element-android/issues/6964))
Improved Documentation 📚
------------------------
- Clarify that setting up a FCM Rewrite Proxy is not necessary for use of the UnifiedPush FCM distributor. ([#6727](https://github.com/vector-im/element-android/issues/6727))
Other changes
-------------
- Increase sticker size ([#6982](https://github.com/vector-im/element-android/issues/6982))
- Focus input field when editing homeserver address to speed up login and registration. ([#6926](https://github.com/vector-im/element-android/issues/6926))
- Log basic Http information in production. ([#6925](https://github.com/vector-im/element-android/issues/6925))
- Converts the vector module to a library with a parent vector-app application module ([#6407](https://github.com/vector-im/element-android/issues/6407))
- Creates a dedicated strings module ([#3955](https://github.com/vector-im/element-android/issues/3955))
- Remove FragmentModule and the Fragment factory. No need to Inject the constructor on your Fragment, just add @AndroidEntryPoint annotation and @Inject class members. ([#6894](https://github.com/vector-im/element-android/issues/6894))
- Small refactor of UnifiedPushHelper ([#6936](https://github.com/vector-im/element-android/issues/6936))
- CI: only run sonarqube task when token is known ([#7057](https://github.com/vector-im/element-android/issues/7057))
Changes in Element v1.4.34 (2022-08-23)
=======================================

View File

@@ -45,7 +45,7 @@ plugins {
id "io.gitlab.arturbosch.detekt" version "1.21.0"
// Dependency Analysis
id 'com.autonomousapps.dependency-analysis' version "1.12.0"
id 'com.autonomousapps.dependency-analysis' version "1.13.1"
}
// https://github.com/jeremylong/DependencyCheck
@@ -216,7 +216,7 @@ project(":vector") {
}
}
project(":library:diff-match-patch") {
project(":library:external:diff-match-patch") {
sonarqube {
skipProject = true
}

View File

@@ -1 +0,0 @@
Creates a dedicated strings module

1
changelog.d/5424.bugfix Normal file
View File

@@ -0,0 +1 @@
Fix text margin in QR code view when no display name is set

View File

@@ -1 +0,0 @@
Create DM room only on first message - Create the DM and navigate to the new room after sending an event

View File

@@ -1 +0,0 @@
Converts the vector module to a library with a parent vector-app application module

View File

@@ -1 +0,0 @@
[App Layout] Bottom navigation tabs are removed for new home screen

View File

@@ -1 +0,0 @@
[App Layout] fixed space switching dialog measured with wrong height sometimes

View File

@@ -1 +0,0 @@
[App Layout] - space switcher now has empty state

View File

@@ -1 +0,0 @@
[App Layout] Fabs doesn't go off screen anymore

1
changelog.d/6776.bugfix Normal file
View File

@@ -0,0 +1 @@
[App Layout] Recents carousel now scrolled to first position when new item added to or moved to this position

1
changelog.d/6779.misc Normal file
View File

@@ -0,0 +1 @@
[Modules] Lifts the application variants to the app module

View File

@@ -1 +0,0 @@
[App Layout] New empty states for home screen

View File

@@ -1 +0,0 @@
Fixes /addToSpace and /joinSpace commands showing invalid syntax warnings

View File

@@ -1 +0,0 @@
Improves Developer Mode Debug Button UX and adds it to New App Layout

View File

@@ -1 +0,0 @@
[New Layout] Adds back navigation through spaces

View File

@@ -1 +0,0 @@
[App Layout] new room invites screen

View File

@@ -1 +0,0 @@
Remove FragmentModule and the Fragment factory. No need to Inject the constructor on your Fragment, just add @AndroidEntryPoint annotation and @Inject class members.

View File

@@ -1 +0,0 @@
[Device Manager] Current Session Section

View File

@@ -1 +0,0 @@
[New Layout] Changes space sheet to accordion-style with expandable subspaces

View File

@@ -1 +0,0 @@
Fix long incremental sync.

View File

@@ -1 +0,0 @@
[New Layout] Adds space invites

View File

@@ -1 +0,0 @@
Log basic Http information in production.

View File

@@ -1 +0,0 @@
Focus input field when editing homeserver address to speed up login and registration.

View File

@@ -1 +0,0 @@
[Device Manager] Other Sessions Section

View File

@@ -1 +0,0 @@
[App Layout] fixed invites count badge bottom margin on a home screen

View File

@@ -1 +0,0 @@
[App Layout] New App Layout is enabled by default

View File

@@ -1 +0,0 @@
[Device Manager] Render Security Recommendations

View File

@@ -1 +0,0 @@
Fix low occurrence crashes.

View File

@@ -1 +0,0 @@
FTUE - Fixes optional email registration step always being mandatory

View File

@@ -1 +0,0 @@
Fix crash when opening an unknown room

View File

@@ -1 +0,0 @@
Fix crash on PIN code settings screen.

View File

@@ -1,2 +0,0 @@
Fix autoplayed animated stickers
Increase sticker size

View File

@@ -1 +0,0 @@
Catch race condition crash in voice recording

View File

@@ -1 +0,0 @@
Try to detect devices that lack Opus encoder support, use bundled libopus library for those.

View File

@@ -1 +0,0 @@
[New Layout] Improves talkback accessibility

1
changelog.d/7035.misc Normal file
View File

@@ -0,0 +1 @@
Ensure that we do not expect all the Event fields when requesting `rooms/{roomId}/hierarchy` endpoint.

1
changelog.d/7077.wip Normal file
View File

@@ -0,0 +1 @@
[Device management] Session details screen

1
changelog.d/7102.bugfix Normal file
View File

@@ -0,0 +1 @@
Fixes crash when quickly double clicking FABs in the new app layout

1
changelog.d/7103.bugfix Normal file
View File

@@ -0,0 +1 @@
Fixes space list and new chat bottom sheets showing too small in New App Layout (especially evident in landscape)

1
changelog.d/7121.wip Normal file
View File

@@ -0,0 +1 @@
Create DM room only on first message - Fix glitch in the room list

1
changelog.d/7122.bugfix Normal file
View File

@@ -0,0 +1 @@
[App Layout] Room leaving prompt dialog now waits user to confirm leaving before do so

1
changelog.d/7140.misc Normal file
View File

@@ -0,0 +1 @@
Exclude legacy android support annotation library

1
changelog.d/7142.misc Normal file
View File

@@ -0,0 +1 @@
Pulling no longer hosted im.dlg:android-dialer directly into the repository and removing legacy support library usages

View File

@@ -81,11 +81,11 @@ task generateCoverageReport(type: JacocoReport) {
task unitTestsWithCoverage(type: GradleBuild) {
// the 7.1.3 android gradle plugin has a bug where enableTestCoverage generates invalid coverage
startParameter.projectProperties.coverage = [enableTestCoverage: false]
tasks = [':vector:testGplayDebugUnitTest', ':matrix-sdk-android:testDebugUnitTest']
tasks = ['testDebugUnitTest']
}
task instrumentationTestsWithCoverage(type: GradleBuild) {
startParameter.projectProperties.coverage = [enableTestCoverage: true]
startParameter.projectProperties['android.testInstrumentationRunnerArguments.notPackage'] = 'im.vector.app.ui'
tasks = [':vector-app:connectedGplayDebugAndroidTest', ':vector:connectedGplayDebugAndroidTest', 'matrix-sdk-android:connectedDebugAndroidTest']
tasks = [':vector-app:connectedGplayDebugAndroidTest', ':vector:connectedDebugAndroidTest', 'matrix-sdk-android:connectedDebugAndroidTest']
}

View File

@@ -15,14 +15,14 @@ def gradle = "7.1.3"
def kotlin = "1.6.21"
def kotlinCoroutines = "1.6.4"
def dagger = "2.42"
def appDistribution = "16.0.0-beta03"
def appDistribution = "16.0.0-beta04"
def retrofit = "2.9.0"
def arrow = "0.8.2"
def markwon = "4.6.2"
def moshi = "1.13.0"
def lifecycle = "2.5.1"
def flowBinding = "1.2.0"
def flipper = "0.162.0"
def flipper = "0.164.0"
def epoxy = "4.6.2"
def mavericks = "2.7.0"
def glide = "4.13.2"
@@ -86,7 +86,7 @@ ext.libs = [
'appdistributionApi' : "com.google.firebase:firebase-appdistribution-api-ktx:$appDistribution",
'appdistribution' : "com.google.firebase:firebase-appdistribution:$appDistribution",
// Phone number https://github.com/google/libphonenumber
'phonenumber' : "com.googlecode.libphonenumber:libphonenumber:8.12.54"
'phonenumber' : "com.googlecode.libphonenumber:libphonenumber:8.12.55"
],
dagger : [
'dagger' : "com.google.dagger:dagger:$dagger",

View File

@@ -69,8 +69,6 @@ ext.groups = [
'com.gabrielittner.threetenbp',
'com.getkeepsafe.relinker',
'com.github.bumptech.glide',
'com.github.filippudak',
'com.github.filippudak.progresspieview',
'com.github.javaparser',
'com.github.piasy',
'com.github.shyiko.klob',

View File

@@ -47,7 +47,7 @@ git checkout develop
mv towncrier.toml towncrier.toml.bak
sed 's/CHANGES\.md/CHANGES_NIGHTLY\.md/' towncrier.toml.bak > towncrier.toml
rm towncrier.toml.bak
yes n | towncrier --version nightly
yes n | towncrier build --version nightly
./gradlew assembleGplayNightly appDistributionUploadGplayNightly $CI_GRADLE_ARG_PROPERTIES
```

View File

@@ -18,7 +18,7 @@ The recently started UnifiedPush project is an Android protocol and library for
The *F-Droid* and *Gplay* flavors of Element Android support UnifiedPush, so the user can use any distributor installed on their devices. This would make it possible to have push notifications without depending on Google services or libraries. Currently, the main distributors are [ntfy](https://ntfy.sh) which does not require any setup (like manual registration) to use the public server and [NextPush](https://github.com/UP-NextPush/android), available as a nextcloud application.
The *Gplay* variant uses a UnifiedPush library which basically embed a FCM distributor built into the application (so a user doesn't need to do anything other than install the app to get FCM notifications). This variant uses Google Services to receive notifications if the user has not installed any distributor.
The *Gplay* variant uses a UnifiedPush library which basically embed a FCM distributor built into the application (so a user doesn't need to do anything other than install the app to get FCM notifications). This variant uses Google Services to receive notifications if the user has not installed any distributor. A [FCM Rewrite Proxy](https://unifiedpush.org/developers/embedded_fcm/#fcm-rewrite-proxy) is not required for Element Android's implementation of the FCM distributor - it will work with an existing Matrix push provider, such as [Sygnal](https://github.com/matrix-org/sygnal).
The *F-Droid* variant does not use this library to avoid any proprietary blob. It will use a polling service if the user has not installed any distributor.

View File

@@ -0,0 +1,2 @@
Hlavní změny v této verzi: Opravy různých chyb a vylepšení stability.
Úplný seznam změn: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Die wichtigsten Änderungen in dieser Version: Verschiedene Fehlerbehebungen und Stabilitätsverbesserungen.
Vollständiges Änderungsprotokoll: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,3 @@
New App Layout can be enabled in the Labs settings. Please give it a try!
Fix issues about missing notification, and long incremental sync.
Full changelog: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Põhilised muutused selles versioonis: erinevate vigade parandused ja stabiilsust edendavad kohendused.
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
تغییرات عمده در این نگارش: رفع اشکال‌های مختلف و بهبودهای پایداری.
گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Principaux changements pour cette version : Plusieurs corrections de bogues et daméliorations de stabilité.
Intégralité des changements : https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Görgetés a hangüzenetben. Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Lehetővé teszi a felhasználók számára, hogy offline jelenjenek meg, és audio lejátszót ad hozzá a hangmellékletekhez.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Lehetővé teszi a felhasználók számára, hogy offline jelenjenek meg, és audio lejátszót ad hozzá a hangmellékletekhez.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: A figyelmen kívül hagyott felhasználók kezelésének javítása. Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: A titkosított üzenetek jobb kezelése. Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: UnifiedPush használata, és lehetővé teszi a felhasználó számára, hogy FCM nélkül tolja.
Teljes változásnapló: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Lehetővé teszi a továbbfejlesztett bejelentkezési és regisztrációs utakat.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Lehetővé teszi a továbbfejlesztett bejelentkezési és regisztrációs utakat.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Főbb változások ebben a verzióban: Különböző hibajavítások és stabilitásjavítások.
Teljes változásjegyzék: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Perubahan utama dalam versi ini: Banyak perbaikan kutu dan perbaikan stabilitas.
Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Modifiche principali in questa versione: varie correzioni di errori e miglioramenti della stabilità.
Cronologia completa: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Główne zmiany w tej wersji: Rozmaite poprawki błędów i usprawnienia stabilności.
Pełna lista zmian: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Principais mudanças nesta versão: Vários consertos de bugs e melhorias de estabilidade.
Changelog completo: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Hlavné zmeny v tejto verzii: Rôzne opravy chýb a vylepšenia stability.
Úplný zoznam zmien: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
Основні зміни в цій версії: Усунуто різні вади й поліпшено стабільність.
Перелік усіх змін: https://github.com/vector-im/element-android/releases

View File

@@ -0,0 +1,2 @@
此版本中的主要變動:多個臭蟲修復與穩定性改善。
完整的變更紀錄https://github.com/vector-im/element-android/releases

View File

@@ -12,6 +12,7 @@ org.gradle.jvmargs=-Xmx4g -Xms512M -XX:MaxPermSize=2048m -XX:MaxMetaspaceSize=1g
org.gradle.configureondemand=true
org.gradle.parallel=true
org.gradle.vfs.watch=true
org.gradle.caching=true
# Android Settings
android.enableJetifier=true

26
library/external/dialpad/build.gradle vendored Normal file
View File

@@ -0,0 +1,26 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdk versions.compileSdk
defaultConfig {
minSdk versions.minSdk
targetSdk versions.targetSdk
}
compileOptions {
sourceCompatibility versions.sourceCompat
targetCompatibility versions.targetCompat
}
kotlinOptions {
jvmTarget = "11"
}
}
afterEvaluate {
tasks.findAll { it.name.startsWith("lint") }.each {
it.enabled = false
}
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.android.dialer.dialpadview" />

View File

@@ -0,0 +1,26 @@
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
package com.android.dialer.animation;
import android.view.animation.Interpolator;
import com.android.dialer.compat.PathInterpolatorCompat;
public class AnimUtils {
public static final Interpolator EASE_OUT_EASE_IN =
PathInterpolatorCompat.create(0.4f, 0, 0.2f, 1);
}

View File

@@ -0,0 +1,120 @@
/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
package com.android.dialer.compat;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.os.Build;
import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;
public class PathInterpolatorCompat {
public static Interpolator create(
float controlX1, float controlY1, float controlX2, float controlY2) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
return new PathInterpolator(controlX1, controlY1, controlX2, controlY2);
}
return new PathInterpolatorBase(controlX1, controlY1, controlX2, controlY2);
}
private static class PathInterpolatorBase implements Interpolator {
/** Governs the accuracy of the approximation of the {@link Path}. */
private static final float PRECISION = 0.002f;
private final float[] mX;
private final float[] mY;
public PathInterpolatorBase(Path path) {
final PathMeasure pathMeasure = new PathMeasure(path, false /* forceClosed */);
final float pathLength = pathMeasure.getLength();
final int numPoints = (int) (pathLength / PRECISION) + 1;
mX = new float[numPoints];
mY = new float[numPoints];
final float[] position = new float[2];
for (int i = 0; i < numPoints; ++i) {
final float distance = (i * pathLength) / (numPoints - 1);
pathMeasure.getPosTan(distance, position, null /* tangent */);
mX[i] = position[0];
mY[i] = position[1];
}
}
public PathInterpolatorBase(float controlX, float controlY) {
this(createQuad(controlX, controlY));
}
public PathInterpolatorBase(
float controlX1, float controlY1, float controlX2, float controlY2) {
this(createCubic(controlX1, controlY1, controlX2, controlY2));
}
private static Path createQuad(float controlX, float controlY) {
final Path path = new Path();
path.moveTo(0.0f, 0.0f);
path.quadTo(controlX, controlY, 1.0f, 1.0f);
return path;
}
private static Path createCubic(
float controlX1, float controlY1, float controlX2, float controlY2) {
final Path path = new Path();
path.moveTo(0.0f, 0.0f);
path.cubicTo(controlX1, controlY1, controlX2, controlY2, 1.0f, 1.0f);
return path;
}
@Override
public float getInterpolation(float t) {
if (t <= 0.0f) {
return 0.0f;
} else if (t >= 1.0f) {
return 1.0f;
}
// Do a binary search for the correct x to interpolate between.
int startIndex = 0;
int endIndex = mX.length - 1;
while (endIndex - startIndex > 1) {
int midIndex = (startIndex + endIndex) / 2;
if (t < mX[midIndex]) {
endIndex = midIndex;
} else {
startIndex = midIndex;
}
}
final float xRange = mX[endIndex] - mX[startIndex];
if (xRange == 0) {
return mY[startIndex];
}
final float tInRange = t - mX[startIndex];
final float fraction = tInRange / xRange;
final float startY = mY[startIndex];
final float endY = mY[endIndex];
return startY + (fraction * (endY - startY));
}
}
}

View File

@@ -0,0 +1,231 @@
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.dialer.dialpadview;
import android.content.Context;
import android.graphics.RectF;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.FrameLayout;
/**
* Custom class for dialpad buttons.
*
* <p>When touch exploration mode is enabled for accessibility, this class implements the
* lift-to-type interaction model:
*
* <ul>
* <li>Hovering over the button will cause it to gain accessibility focus
* <li>Removing the hover pointer while inside the bounds of the button will perform a click action
* <li>If long-click is supported, hovering over the button for a longer period of time will switch
* to the long-click action
* <li>Moving the hover pointer outside of the bounds of the button will restore to the normal click
* action
* </ul>
*/
public class DialpadKeyButton extends FrameLayout {
/** Timeout before switching to long-click accessibility mode. */
private static final int LONG_HOVER_TIMEOUT = ViewConfiguration.getLongPressTimeout() * 2;
/** Accessibility manager instance used to check touch exploration state. */
private AccessibilityManager mAccessibilityManager;
/** Bounds used to filter HOVER_EXIT events. */
private RectF mHoverBounds = new RectF();
/** Whether this view is currently in the long-hover state. */
private boolean mLongHovered;
/** Alternate content description for long-hover state. */
private CharSequence mLongHoverContentDesc;
/** Backup of standard content description. Used for accessibility. */
private CharSequence mBackupContentDesc;
/** Backup of clickable property. Used for accessibility. */
private boolean mWasClickable;
/** Backup of long-clickable property. Used for accessibility. */
private boolean mWasLongClickable;
/** Runnable used to trigger long-click mode for accessibility. */
private Runnable mLongHoverRunnable;
private OnPressedListener mOnPressedListener;
public DialpadKeyButton(Context context, AttributeSet attrs) {
super(context, attrs);
initForAccessibility(context);
}
public DialpadKeyButton(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
initForAccessibility(context);
}
public void setOnPressedListener(OnPressedListener onPressedListener) {
mOnPressedListener = onPressedListener;
}
private void initForAccessibility(Context context) {
mAccessibilityManager =
(AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);
}
public void setLongHoverContentDescription(CharSequence contentDescription) {
mLongHoverContentDesc = contentDescription;
if (mLongHovered) {
super.setContentDescription(mLongHoverContentDesc);
}
}
@Override
public void setContentDescription(CharSequence contentDescription) {
if (mLongHovered) {
mBackupContentDesc = contentDescription;
} else {
super.setContentDescription(contentDescription);
}
}
@Override
public void setPressed(boolean pressed) {
super.setPressed(pressed);
if (mOnPressedListener != null) {
mOnPressedListener.onPressed(this, pressed);
}
}
@Override
public void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mHoverBounds.left = getPaddingLeft();
mHoverBounds.right = w - getPaddingRight();
mHoverBounds.top = getPaddingTop();
mHoverBounds.bottom = h - getPaddingBottom();
}
@Override
public boolean performAccessibilityAction(int action, Bundle arguments) {
if (action == AccessibilityNodeInfo.ACTION_CLICK) {
simulateClickForAccessibility();
return true;
}
return super.performAccessibilityAction(action, arguments);
}
@Override
public boolean onHoverEvent(MotionEvent event) {
// When touch exploration is turned on, lifting a finger while inside
// the button's hover target bounds should perform a click action.
if (mAccessibilityManager.isEnabled() && mAccessibilityManager.isTouchExplorationEnabled()) {
switch (event.getActionMasked()) {
case MotionEvent.ACTION_HOVER_ENTER:
// Lift-to-type temporarily disables double-tap activation.
mWasClickable = isClickable();
mWasLongClickable = isLongClickable();
if (mWasLongClickable && mLongHoverContentDesc != null) {
if (mLongHoverRunnable == null) {
mLongHoverRunnable =
new Runnable() {
@Override
public void run() {
setLongHovered(true);
announceForAccessibility(mLongHoverContentDesc);
}
};
}
postDelayed(mLongHoverRunnable, LONG_HOVER_TIMEOUT);
}
setClickable(false);
setLongClickable(false);
break;
case MotionEvent.ACTION_HOVER_EXIT:
if (mHoverBounds.contains(event.getX(), event.getY())) {
if (mLongHovered) {
performLongClick();
} else {
simulateClickForAccessibility();
}
}
cancelLongHover();
setClickable(mWasClickable);
setLongClickable(mWasLongClickable);
break;
}
}
return super.onHoverEvent(event);
}
/**
* When accessibility is on, simulate press and release to preserve the semantic meaning of
* performClick(). Required for Braille support.
*/
private void simulateClickForAccessibility() {
// Checking the press state prevents double activation.
if (isPressed()) {
return;
}
setPressed(true);
// Stay consistent with performClick() by sending the event after
// setting the pressed state but before performing the action.
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
setPressed(false);
}
private void setLongHovered(boolean enabled) {
if (mLongHovered != enabled) {
mLongHovered = enabled;
// Switch between normal and alternate description, if available.
if (enabled) {
mBackupContentDesc = getContentDescription();
super.setContentDescription(mLongHoverContentDesc);
} else {
super.setContentDescription(mBackupContentDesc);
}
}
}
private void cancelLongHover() {
if (mLongHoverRunnable != null) {
removeCallbacks(mLongHoverRunnable);
}
setLongHovered(false);
}
public interface OnPressedListener {
void onPressed(View view, boolean pressed);
}
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
package com.android.dialer.dialpadview;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.widget.TextView;
/**
* This is a custom text view intended only for rendering the numerals (and star and pound) on the
* dialpad. TextView has built in top/bottom padding to help account for ascenders/descenders.
*
* <p>Since vertical space is at a premium on the dialpad, particularly if the font size is scaled
* to a larger default, for the dialpad we use this class to more precisely render characters
* according to the precise amount of space they need.
*/
public class DialpadTextView extends TextView {
private Rect mTextBounds = new Rect();
private String mTextStr;
public DialpadTextView(Context context, AttributeSet attrs) {
super(context, attrs);
}
/** Draw the text to fit within the height/width which have been specified during measurement. */
@Override
public void draw(Canvas canvas) {
Paint paint = getPaint();
// Without this, the draw does not respect the style's specified text color.
paint.setColor(getCurrentTextColor());
// The text bounds values are relative and can be negative,, so rather than specifying a
// standard origin such as 0, 0, we need to use negative of the left/top bounds.
// For example, the bounds may be: Left: 11, Right: 37, Top: -77, Bottom: 0
canvas.drawText(mTextStr, -mTextBounds.left, -mTextBounds.top, paint);
}
/**
* Calculate the pixel-accurate bounds of the text when rendered, and use that to specify the
* height and width.
*/
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
mTextStr = getText().toString();
getPaint().getTextBounds(mTextStr, 0, mTextStr.length(), mTextBounds);
int width = resolveSize(mTextBounds.width(), widthMeasureSpec);
int height = resolveSize(mTextBounds.height(), heightMeasureSpec);
setMeasuredDimension(width, height);
}
}

View File

@@ -0,0 +1,455 @@
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.dialer.dialpadview;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.Spannable;
import android.text.TextUtils;
import android.text.style.TtsSpan;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewPropertyAnimator;
import android.view.accessibility.AccessibilityManager;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.dialer.animation.AnimUtils;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Locale;
/** View that displays a twelve-key phone dialpad. */
public class DialpadView extends LinearLayout {
private static final String TAG = DialpadView.class.getSimpleName();
private static final double DELAY_MULTIPLIER = 0.66;
private static final double DURATION_MULTIPLIER = 0.8;
// For animation.
private static final int KEY_FRAME_DURATION = 33;
/** {@code True} if the dialpad is in landscape orientation. */
private final boolean mIsLandscape;
/** {@code True} if the dialpad is showing in a right-to-left locale. */
private final boolean mIsRtl;
private final int[] mButtonIds =
new int[] {
R.id.zero,
R.id.one,
R.id.two,
R.id.three,
R.id.four,
R.id.five,
R.id.six,
R.id.seven,
R.id.eight,
R.id.nine,
R.id.star,
R.id.pound
};
private EditText mDigits;
private ImageButton mDelete;
private View mOverflowMenuButton;
private ViewGroup mRateContainer;
private TextView mIldCountry;
private TextView mIldRate;
private boolean mCanDigitsBeEdited;
private int mTranslateDistance;
public DialpadView(Context context) {
this(context, null);
}
public DialpadView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public DialpadView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
mTranslateDistance =
getResources().getDimensionPixelSize(R.dimen.dialpad_key_button_translate_y);
mIsLandscape =
getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
mIsRtl = Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 &&
TextUtils.getLayoutDirectionFromLocale(Locale.getDefault()) == View.LAYOUT_DIRECTION_RTL;
}
@Override
protected void onFinishInflate() {
setupKeypad();
mDigits = (EditText) findViewById(R.id.digits);
mDelete = (ImageButton) findViewById(R.id.deleteButton);
mOverflowMenuButton = findViewById(R.id.dialpad_overflow);
mRateContainer = (ViewGroup) findViewById(R.id.rate_container);
mIldCountry = (TextView) mRateContainer.findViewById(R.id.ild_country);
mIldRate = (TextView) mRateContainer.findViewById(R.id.ild_rate);
AccessibilityManager accessibilityManager =
(AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
if (accessibilityManager.isEnabled()) {
// The text view must be selected to send accessibility events.
mDigits.setSelected(true);
}
}
private void setupKeypad() {
final int[] letterIds =
new int[] {
R.string.dialpad_0_letters,
R.string.dialpad_1_letters,
R.string.dialpad_2_letters,
R.string.dialpad_3_letters,
R.string.dialpad_4_letters,
R.string.dialpad_5_letters,
R.string.dialpad_6_letters,
R.string.dialpad_7_letters,
R.string.dialpad_8_letters,
R.string.dialpad_9_letters,
R.string.dialpad_star_letters,
R.string.dialpad_pound_letters
};
final Resources resources = getContext().getResources();
DialpadKeyButton dialpadKey;
TextView numberView;
TextView lettersView;
final Locale currentLocale = resources.getConfiguration().locale;
final NumberFormat nf;
// We translate dialpad numbers only for "fa" and not any other locale
// ("ar" anybody ?).
if ("fa".equals(currentLocale.getLanguage())) {
nf = DecimalFormat.getInstance(resources.getConfiguration().locale);
} else {
nf = DecimalFormat.getInstance(Locale.ENGLISH);
}
for (int i = 0; i < mButtonIds.length; i++) {
dialpadKey = (DialpadKeyButton) findViewById(mButtonIds[i]);
numberView = (TextView) dialpadKey.findViewById(R.id.dialpad_key_number);
lettersView = (TextView) dialpadKey.findViewById(R.id.dialpad_key_letters);
final String numberString;
final CharSequence numberContentDescription;
if (mButtonIds[i] == R.id.pound) {
numberString = resources.getString(R.string.dialpad_pound_number);
numberContentDescription = numberString;
} else if (mButtonIds[i] == R.id.star) {
numberString = resources.getString(R.string.dialpad_star_number);
numberContentDescription = numberString;
} else {
numberString = nf.format(i);
// The content description is used for Talkback key presses. The number is
// separated by a "," to introduce a slight delay. Convert letters into a verbatim
// span so that they are read as letters instead of as one word.
String letters = resources.getString(letterIds[i]);
Spannable spannable =
Spannable.Factory.getInstance().newSpannable(numberString + "," + letters);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
spannable.setSpan(
(new TtsSpan.VerbatimBuilder(letters)).build(),
numberString.length() + 1,
numberString.length() + 1 + letters.length(),
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
}
numberContentDescription = spannable;
}
numberView.setText(numberString);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
numberView.setElegantTextHeight(false);
}
dialpadKey.setContentDescription(numberContentDescription);
if (lettersView != null) {
lettersView.setText(resources.getString(letterIds[i]));
}
}
final DialpadKeyButton one = (DialpadKeyButton) findViewById(R.id.one);
one.setLongHoverContentDescription(resources.getText(R.string.description_voicemail_button));
final DialpadKeyButton zero = (DialpadKeyButton) findViewById(R.id.zero);
zero.setLongHoverContentDescription(resources.getText(R.string.description_image_button_plus));
}
private Drawable getDrawableCompat(Context context, int id) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
return context.getDrawable(id);
} else {
return context.getResources().getDrawable(id);
}
}
public void setShowVoicemailButton(boolean show) {
View view = findViewById(R.id.dialpad_key_voicemail);
if (view != null) {
view.setVisibility(show ? View.VISIBLE : View.INVISIBLE);
}
}
/**
* Whether or not the digits above the dialer can be edited.
*
* @param canBeEdited If true, the backspace button will be shown and the digits EditText will be
* configured to allow text manipulation.
*/
public void setCanDigitsBeEdited(boolean canBeEdited) {
// View deleteButton = findViewById(R.id.deleteButton);
// deleteButton.setVisibility(canBeEdited ? View.VISIBLE : View.INVISIBLE);
// View overflowMenuButton = findViewById(R.id.dialpad_overflow);
// overflowMenuButton.setVisibility(canBeEdited ? View.VISIBLE : View.GONE);
// EditText digits = (EditText) findViewById(R.id.digits);
// digits.setClickable(canBeEdited);
// digits.setLongClickable(canBeEdited);
// digits.setFocusableInTouchMode(canBeEdited);
// digits.setCursorVisible(false);
mCanDigitsBeEdited = canBeEdited;
}
public void setCallRateInformation(String countryName, String displayRate) {
if (TextUtils.isEmpty(countryName) && TextUtils.isEmpty(displayRate)) {
mRateContainer.setVisibility(View.GONE);
return;
}
mRateContainer.setVisibility(View.VISIBLE);
mIldCountry.setText(countryName);
mIldRate.setText(displayRate);
}
public boolean canDigitsBeEdited() {
return mCanDigitsBeEdited;
}
/**
* Always returns true for onHoverEvent callbacks, to fix problems with accessibility due to the
* dialpad overlaying other fragments.
*/
@Override
public boolean onHoverEvent(MotionEvent event) {
return true;
}
public void animateShow() {
// This is a hack; without this, the setTranslationY is delayed in being applied, and the
// numbers appear at their original position (0) momentarily before animating.
final AnimatorListenerAdapter showListener = new AnimatorListenerAdapter() {};
for (int i = 0; i < mButtonIds.length; i++) {
int delay = (int) (getKeyButtonAnimationDelay(mButtonIds[i]) * DELAY_MULTIPLIER);
int duration = (int) (getKeyButtonAnimationDuration(mButtonIds[i]) * DURATION_MULTIPLIER);
final DialpadKeyButton dialpadKey = (DialpadKeyButton) findViewById(mButtonIds[i]);
ViewPropertyAnimator animator = dialpadKey.animate();
if (mIsLandscape) {
// Landscape orientation requires translation along the X axis.
// For RTL locales, ensure we translate negative on the X axis.
dialpadKey.setTranslationX((mIsRtl ? -1 : 1) * mTranslateDistance);
animator.translationX(0);
} else {
// Portrait orientation requires translation along the Y axis.
dialpadKey.setTranslationY(mTranslateDistance);
animator.translationY(0);
}
animator
.setInterpolator(AnimUtils.EASE_OUT_EASE_IN)
.setStartDelay(delay)
.setDuration(duration)
.setListener(showListener)
.start();
}
}
public EditText getDigits() {
return mDigits;
}
public ImageButton getDeleteButton() {
return mDelete;
}
public View getOverflowMenuButton() {
return mOverflowMenuButton;
}
/**
* Get the animation delay for the buttons, taking into account whether the dialpad is in
* landscape left-to-right, landscape right-to-left, or portrait.
*
* @param buttonId The button ID.
* @return The animation delay.
*/
private int getKeyButtonAnimationDelay(int buttonId) {
if (mIsLandscape) {
if (mIsRtl) {
if (buttonId == R.id.three) {
return KEY_FRAME_DURATION * 1;
} else if (buttonId == R.id.six) {
return KEY_FRAME_DURATION * 2;
} else if (buttonId == R.id.nine) {
return KEY_FRAME_DURATION * 3;
} else if (buttonId == R.id.pound) {
return KEY_FRAME_DURATION * 4;
} else if (buttonId == R.id.two) {
return KEY_FRAME_DURATION * 5;
} else if (buttonId == R.id.five) {
return KEY_FRAME_DURATION * 6;
} else if (buttonId == R.id.eight) {
return KEY_FRAME_DURATION * 7;
} else if (buttonId == R.id.zero) {
return KEY_FRAME_DURATION * 8;
} else if (buttonId == R.id.one) {
return KEY_FRAME_DURATION * 9;
} else if (buttonId == R.id.four) {
return KEY_FRAME_DURATION * 10;
} else if (buttonId == R.id.seven || buttonId == R.id.star) {
return KEY_FRAME_DURATION * 11;
}
} else {
if (buttonId == R.id.one) {
return KEY_FRAME_DURATION * 1;
} else if (buttonId == R.id.four) {
return KEY_FRAME_DURATION * 2;
} else if (buttonId == R.id.seven) {
return KEY_FRAME_DURATION * 3;
} else if (buttonId == R.id.star) {
return KEY_FRAME_DURATION * 4;
} else if (buttonId == R.id.two) {
return KEY_FRAME_DURATION * 5;
} else if (buttonId == R.id.five) {
return KEY_FRAME_DURATION * 6;
} else if (buttonId == R.id.eight) {
return KEY_FRAME_DURATION * 7;
} else if (buttonId == R.id.zero) {
return KEY_FRAME_DURATION * 8;
} else if (buttonId == R.id.three) {
return KEY_FRAME_DURATION * 9;
} else if (buttonId == R.id.six) {
return KEY_FRAME_DURATION * 10;
} else if (buttonId == R.id.nine || buttonId == R.id.pound) {
return KEY_FRAME_DURATION * 11;
}
}
} else {
if (buttonId == R.id.one) {
return KEY_FRAME_DURATION * 1;
} else if (buttonId == R.id.two) {
return KEY_FRAME_DURATION * 2;
} else if (buttonId == R.id.three) {
return KEY_FRAME_DURATION * 3;
} else if (buttonId == R.id.four) {
return KEY_FRAME_DURATION * 4;
} else if (buttonId == R.id.five) {
return KEY_FRAME_DURATION * 5;
} else if (buttonId == R.id.six) {
return KEY_FRAME_DURATION * 6;
} else if (buttonId == R.id.seven) {
return KEY_FRAME_DURATION * 7;
} else if (buttonId == R.id.eight) {
return KEY_FRAME_DURATION * 8;
} else if (buttonId == R.id.nine) {
return KEY_FRAME_DURATION * 9;
} else if (buttonId == R.id.star) {
return KEY_FRAME_DURATION * 10;
} else if (buttonId == R.id.zero || buttonId == R.id.pound) {
return KEY_FRAME_DURATION * 11;
}
}
Log.wtf(TAG, "Attempted to get animation delay for invalid key button id.");
return 0;
}
/**
* Get the button animation duration, taking into account whether the dialpad is in landscape
* left-to-right, landscape right-to-left, or portrait.
*
* @param buttonId The button ID.
* @return The animation duration.
*/
private int getKeyButtonAnimationDuration(int buttonId) {
if (mIsLandscape) {
if (mIsRtl) {
if (buttonId == R.id.one
|| buttonId == R.id.four
|| buttonId == R.id.seven
|| buttonId == R.id.star) {
return KEY_FRAME_DURATION * 8;
} else if (buttonId == R.id.two
|| buttonId == R.id.five
|| buttonId == R.id.eight
|| buttonId == R.id.zero) {
return KEY_FRAME_DURATION * 9;
} else if (buttonId == R.id.three
|| buttonId == R.id.six
|| buttonId == R.id.nine
|| buttonId == R.id.pound) {
return KEY_FRAME_DURATION * 10;
}
} else {
if (buttonId == R.id.one
|| buttonId == R.id.four
|| buttonId == R.id.seven
|| buttonId == R.id.star) {
return KEY_FRAME_DURATION * 10;
} else if (buttonId == R.id.two
|| buttonId == R.id.five
|| buttonId == R.id.eight
|| buttonId == R.id.zero) {
return KEY_FRAME_DURATION * 9;
} else if (buttonId == R.id.three
|| buttonId == R.id.six
|| buttonId == R.id.nine
|| buttonId == R.id.pound) {
return KEY_FRAME_DURATION * 8;
}
}
} else {
if (buttonId == R.id.one
|| buttonId == R.id.two
|| buttonId == R.id.three
|| buttonId == R.id.four
|| buttonId == R.id.five
|| buttonId == R.id.six) {
return KEY_FRAME_DURATION * 10;
} else if (buttonId == R.id.seven || buttonId == R.id.eight || buttonId == R.id.nine) {
return KEY_FRAME_DURATION * 9;
} else if (buttonId == R.id.star || buttonId == R.id.zero || buttonId == R.id.pound) {
return KEY_FRAME_DURATION * 8;
}
}
Log.wtf(TAG, "Attempted to get animation duration for invalid key button id.");
return 0;
}
}

View File

@@ -0,0 +1,84 @@
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.dialer.dialpadview;
import android.content.Context;
import android.graphics.Rect;
import android.text.InputType;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.inputmethod.InputMethodManager;
import com.android.dialer.widget.ResizingTextEditText;
/** EditText which suppresses IME show up. */
public class DigitsEditText extends ResizingTextEditText {
private OnTextContextMenuClickListener mOnTextContextMenuClickListener;
public DigitsEditText(Context context, AttributeSet attrs) {
super(context, attrs);
setInputType(getInputType() | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
setShowSoftInputOnFocus(false);
}
@Override
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
super.onFocusChanged(focused, direction, previouslyFocusedRect);
final InputMethodManager imm =
((InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE));
if (imm != null && imm.isActive(this)) {
imm.hideSoftInputFromWindow(getApplicationWindowToken(), 0);
}
}
@Override
public boolean onTouchEvent(MotionEvent event) {
final boolean ret = super.onTouchEvent(event);
// Must be done after super.onTouchEvent()
final InputMethodManager imm =
((InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE));
if (imm != null && imm.isActive(this)) {
imm.hideSoftInputFromWindow(getApplicationWindowToken(), 0);
}
return ret;
}
@Override
protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
super.onTextChanged(text, start, lengthBefore, lengthAfter);
if (isCursorVisible()) {
setSelection(getText().length());
}
}
@Override
public boolean onTextContextMenuItem(int id) {
boolean value = super.onTextContextMenuItem(id);
if (mOnTextContextMenuClickListener != null) {
mOnTextContextMenuClickListener.onTextContextMenuClickListener(id);
}
return value;
}
public interface OnTextContextMenuClickListener {
void onTextContextMenuClickListener(int id);
}
public void setOnTextContextMenuClickListener(OnTextContextMenuClickListener listener) {
this.mOnTextContextMenuClickListener = listener;
}
}

View File

@@ -0,0 +1,41 @@
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.dialer.util;
import android.graphics.Paint;
import android.util.TypedValue;
import android.widget.TextView;
/** Provides static functions to work with views */
public class ViewUtil {
private ViewUtil() {}
public static void resizeText(TextView textView, int originalTextSize, int minTextSize) {
final Paint paint = textView.getPaint();
final int width = textView.getWidth();
if (width == 0) {
return;
}
textView.setTextSize(TypedValue.COMPLEX_UNIT_PX, originalTextSize);
float ratio = width / paint.measureText(textView.getText().toString());
if (ratio <= 1.0f) {
textView.setTextSize(
TypedValue.COMPLEX_UNIT_PX, Math.max(minTextSize, originalTextSize * ratio));
}
}
}

View File

@@ -0,0 +1,52 @@
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.dialer.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.EditText;
import com.android.dialer.dialpadview.R;
import com.android.dialer.util.ViewUtil;
/** EditText which resizes dynamically with respect to text length. */
public class ResizingTextEditText extends EditText {
private final int mOriginalTextSize;
private final int mMinTextSize;
public ResizingTextEditText(Context context, AttributeSet attrs) {
super(context, attrs);
mOriginalTextSize = (int) getTextSize();
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ResizingText);
mMinTextSize =
(int) a.getDimension(R.styleable.ResizingText_resizing_text_min_size, mOriginalTextSize);
a.recycle();
}
@Override
protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
super.onTextChanged(text, start, lengthBefore, lengthAfter);
ViewUtil.resizeText(this, mOriginalTextSize, mMinTextSize);
}
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
ViewUtil.resizeText(this, mOriginalTextSize, mMinTextSize);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Some files were not shown because too many files have changed in this diff Show More