summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/ActivityManager.java3
-rw-r--r--core/java/android/app/ActivityManagerNative.java29
-rw-r--r--core/java/android/app/ActivityThread.java101
-rw-r--r--core/java/android/app/ApplicationErrorReport.java8
-rw-r--r--core/java/android/app/ApplicationPackageManager.java8
-rw-r--r--core/java/android/app/ApplicationThreadNative.java18
-rw-r--r--core/java/android/app/Fragment.java9
-rw-r--r--core/java/android/app/FragmentManager.java4
-rw-r--r--core/java/android/app/FragmentTransaction.java2
-rw-r--r--core/java/android/app/IActivityManager.java7
-rw-r--r--core/java/android/app/IApplicationThread.java2
-rw-r--r--core/java/android/app/LoadedApk.java14
-rw-r--r--core/java/android/app/Notification.java1
-rw-r--r--core/java/android/app/SearchManager.java9
-rw-r--r--core/java/android/app/backup/BackupAgent.java2
-rw-r--r--core/java/android/bluetooth/BluetoothA2dp.java3
-rw-r--r--core/java/android/bluetooth/IBluetooth.aidl4
-rw-r--r--core/java/android/content/BroadcastReceiver.java10
-rw-r--r--core/java/android/content/SharedPreferences.java4
-rw-r--r--core/java/android/content/UriMatcher.java5
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java117
-rw-r--r--core/java/android/content/pm/IPackageManager.aidl2
-rw-r--r--core/java/android/content/pm/PackageParser.java73
-rw-r--r--core/java/android/content/res/AssetManager.java16
-rw-r--r--core/java/android/content/res/StringBlock.java10
-rw-r--r--core/java/android/database/sqlite/SQLiteConnection.java17
-rw-r--r--core/java/android/gesture/GestureOverlayView.java2
-rw-r--r--core/java/android/gesture/GestureStroke.java3
-rw-r--r--core/java/android/gesture/GestureUtils.java8
-rw-r--r--core/java/android/hardware/GeomagneticField.java2
-rw-r--r--core/java/android/hardware/camera2/CameraDevice.java2
-rw-r--r--core/java/android/hardware/camera2/CameraManager.java6
-rw-r--r--core/java/android/hardware/camera2/DngCreator.java2
-rw-r--r--core/java/android/hardware/location/GeofenceHardwareImpl.java2
-rw-r--r--core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java2
-rw-r--r--core/java/android/inputmethodservice/ExtractEditLayout.java2
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java1
-rw-r--r--core/java/android/net/BaseNetworkStateTracker.java205
-rw-r--r--core/java/android/net/ConnectivityManager.java33
-rw-r--r--core/java/android/net/IConnectivityManager.aidl4
-rw-r--r--core/java/android/net/IpPrefix.java15
-rw-r--r--core/java/android/net/LocalSocket.java2
-rw-r--r--core/java/android/net/MobileDataStateTracker.java909
-rw-r--r--core/java/android/net/Network.java37
-rw-r--r--core/java/android/net/NetworkStateTracker.java250
-rw-r--r--core/java/android/net/Proxy.java29
-rw-r--r--core/java/android/net/ProxyDataTracker.java207
-rw-r--r--core/java/android/net/RouteInfo.java8
-rw-r--r--core/java/android/net/SSLCertificateSocketFactory.java2
-rw-r--r--core/java/android/net/SamplingDataTracker.java300
-rw-r--r--core/java/android/net/StaticIpConfiguration.java2
-rw-r--r--core/java/android/net/Uri.java5
-rw-r--r--core/java/android/net/http/CharArrayBuffers.java89
-rw-r--r--core/java/android/net/http/Connection.java57
-rw-r--r--core/java/android/net/http/Headers.java59
-rw-r--r--core/java/android/net/http/HttpResponseCache.java90
-rw-r--r--core/java/android/net/http/HttpsConnection.java2
-rw-r--r--core/java/android/net/http/X509TrustManagerExtensions.java3
-rw-r--r--core/java/android/nfc/IAppCallback.aidl4
-rw-r--r--core/java/android/nfc/NfcActivityManager.java15
-rw-r--r--core/java/android/nfc/NfcEvent.java9
-rw-r--r--core/java/android/nfc/cardemulation/ApduServiceInfo.java15
-rw-r--r--core/java/android/nfc/tech/Ndef.java2
-rw-r--r--core/java/android/os/Build.java3
-rw-r--r--core/java/android/os/Debug.java92
-rw-r--r--core/java/android/os/INetworkManagementService.aidl2
-rw-r--r--core/java/android/os/IProcessInfoService.aidl29
-rw-r--r--core/java/android/os/Process.java7
-rw-r--r--core/java/android/os/SELinux.java28
-rw-r--r--core/java/android/os/StrictMode.java209
-rw-r--r--core/java/android/os/UEventObserver.java8
-rw-r--r--core/java/android/preference/Preference.java2
-rw-r--r--core/java/android/print/PrintDocumentInfo.java2
-rw-r--r--core/java/android/printservice/PrintService.java8
-rw-r--r--core/java/android/provider/DocumentsProvider.java2
-rw-r--r--core/java/android/provider/Settings.java9
-rw-r--r--core/java/android/security/IKeystoreService.aidl78
-rw-r--r--core/java/android/security/IKeystoreService.java662
-rw-r--r--core/java/android/security/KeystoreArguments.aidl20
-rw-r--r--core/java/android/security/KeystoreArguments.java76
-rw-r--r--core/java/android/security/NetworkSecurityPolicy.java77
-rw-r--r--core/java/android/security/keymaster/ExportResult.aidl20
-rw-r--r--core/java/android/security/keymaster/ExportResult.java56
-rw-r--r--core/java/android/security/keymaster/KeyCharacteristics.aidl20
-rw-r--r--core/java/android/security/keymaster/KeyCharacteristics.java116
-rw-r--r--core/java/android/security/keymaster/KeymasterArgument.java82
-rw-r--r--core/java/android/security/keymaster/KeymasterArguments.aidl20
-rw-r--r--core/java/android/security/keymaster/KeymasterArguments.java219
-rw-r--r--core/java/android/security/keymaster/KeymasterBlob.aidl20
-rw-r--r--core/java/android/security/keymaster/KeymasterBlob.java55
-rw-r--r--core/java/android/security/keymaster/KeymasterBlobArgument.java49
-rw-r--r--core/java/android/security/keymaster/KeymasterBooleanArgument.java48
-rw-r--r--core/java/android/security/keymaster/KeymasterDateArgument.java50
-rw-r--r--core/java/android/security/keymaster/KeymasterDefs.java252
-rw-r--r--core/java/android/security/keymaster/KeymasterIntArgument.java51
-rw-r--r--core/java/android/security/keymaster/KeymasterLongArgument.java49
-rw-r--r--core/java/android/security/keymaster/OperationResult.aidl20
-rw-r--r--core/java/android/security/keymaster/OperationResult.java69
-rw-r--r--core/java/android/service/voice/VoiceInteractionSession.java6
-rw-r--r--core/java/android/text/BoringLayout.java5
-rw-r--r--core/java/android/text/Html.java2
-rw-r--r--core/java/android/text/SpanSet.java13
-rwxr-xr-xcore/java/android/text/format/DateFormat.java75
-rw-r--r--core/java/android/text/format/DateUtils.java154
-rw-r--r--core/java/android/text/format/Time.java33
-rw-r--r--core/java/android/text/style/URLSpan.java8
-rw-r--r--core/java/android/text/util/Linkify.java4
-rw-r--r--core/java/android/transition/ArcMotion.java3
-rw-r--r--core/java/android/transition/CircularPropagation.java15
-rw-r--r--core/java/android/transition/Explode.java24
-rw-r--r--core/java/android/transition/PatternPathMotion.java12
-rw-r--r--core/java/android/transition/SidePropagation.java1
-rw-r--r--core/java/android/util/ArraySet.java20
-rw-r--r--core/java/android/util/FloatMath.java43
-rw-r--r--core/java/android/util/MathUtils.java4
-rw-r--r--core/java/android/util/NtpTrustedTime.java3
-rw-r--r--core/java/android/util/PathParser.java2
-rw-r--r--core/java/android/util/Spline.java2
-rw-r--r--core/java/android/view/ScaleGestureDetector.java3
-rw-r--r--core/java/android/view/ViewDebug.java46
-rw-r--r--core/java/android/view/ViewGroup.java8
-rw-r--r--core/java/android/view/WindowManager.java3
-rw-r--r--core/java/android/view/accessibility/AccessibilityWindowInfo.java2
-rw-r--r--core/java/android/view/inputmethod/InputMethodManager.java28
-rw-r--r--core/java/android/webkit/LegacyErrorStrings.java (renamed from core/java/android/net/http/ErrorStrings.java)11
-rw-r--r--core/java/android/webkit/WebSettings.java8
-rw-r--r--core/java/android/webkit/WebView.java2
-rw-r--r--core/java/android/webkit/WebViewDelegate.java3
-rw-r--r--core/java/android/widget/AbsListView.java4
-rw-r--r--core/java/android/widget/AbsSeekBar.java21
-rwxr-xr-x[-rw-r--r--]core/java/android/widget/DatePickerCalendarDelegate.java4
-rw-r--r--core/java/android/widget/DateTimeView.java21
-rw-r--r--core/java/android/widget/EdgeEffect.java5
-rw-r--r--core/java/android/widget/Editor.java2
-rw-r--r--core/java/android/widget/Gallery.java20
-rw-r--r--core/java/android/widget/ListView.java19
-rw-r--r--core/java/android/widget/OverScroller.java5
-rw-r--r--core/java/android/widget/PopupWindow.java6
-rw-r--r--core/java/android/widget/ProgressBar.java4
-rw-r--r--core/java/android/widget/RemoteViewsAdapter.java6
-rw-r--r--core/java/android/widget/Scroller.java5
-rw-r--r--core/java/android/widget/StackView.java6
-rw-r--r--core/java/android/widget/TextClock.java8
-rw-r--r--core/java/android/widget/TextView.java33
-rw-r--r--core/java/android/widget/VideoView.java11
-rw-r--r--core/java/com/android/internal/app/ExternalMediaFormatActivity.java5
-rw-r--r--core/java/com/android/internal/content/NativeLibraryHelper.java31
-rw-r--r--core/java/com/android/internal/os/InstallerConnection.java30
-rw-r--r--core/java/com/android/internal/os/PowerProfile.java2
-rw-r--r--core/java/com/android/internal/os/RuntimeInit.java5
-rw-r--r--core/java/com/android/internal/os/WrapperInit.java19
-rw-r--r--core/java/com/android/internal/os/Zygote.java26
-rw-r--r--core/java/com/android/internal/os/ZygoteConnection.java328
-rw-r--r--core/java/com/android/internal/os/ZygoteInit.java318
-rw-r--r--core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java2
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java37
-rw-r--r--core/java/com/android/internal/widget/multiwaveview/GlowPadView.java2
-rw-r--r--core/java/com/android/internal/widget/multiwaveview/PointCloud.java27
-rw-r--r--core/jni/Android.mk466
-rw-r--r--core/jni/AndroidRuntime.cpp462
-rw-r--r--core/jni/android/graphics/AutoDecodeCancel.h6
-rwxr-xr-xcore/jni/android/graphics/Bitmap.cpp21
-rw-r--r--core/jni/android/graphics/BitmapFactory.cpp90
-rw-r--r--core/jni/android/graphics/BitmapFactory.h6
-rw-r--r--core/jni/android/graphics/BitmapRegionDecoder.cpp16
-rw-r--r--core/jni/android/graphics/Camera.cpp18
-rw-r--r--core/jni/android/graphics/CanvasProperty.cpp22
-rw-r--r--core/jni/android/graphics/ColorFilter.cpp21
-rw-r--r--core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp1
-rw-r--r--core/jni/android/graphics/CreateJavaOutputStreamAdaptor.h7
-rw-r--r--core/jni/android/graphics/DrawFilter.cpp15
-rw-r--r--core/jni/android/graphics/FontFamily.cpp7
-rw-r--r--core/jni/android/graphics/Graphics.cpp7
-rw-r--r--core/jni/android/graphics/GraphicsJNI.h9
-rw-r--r--core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp8
-rw-r--r--core/jni/android/graphics/HarfBuzzNGFaceSkia.h6
-rw-r--r--core/jni/android/graphics/Interpolator.cpp8
-rw-r--r--core/jni/android/graphics/MaskFilter.cpp22
-rw-r--r--core/jni/android/graphics/Matrix.cpp9
-rw-r--r--core/jni/android/graphics/Matrix.h6
-rw-r--r--core/jni/android/graphics/MinikinSkia.h6
-rw-r--r--core/jni/android/graphics/MinikinUtils.cpp12
-rw-r--r--core/jni/android/graphics/MinikinUtils.h6
-rw-r--r--core/jni/android/graphics/Movie.cpp26
-rw-r--r--core/jni/android/graphics/NinePatch.cpp7
-rw-r--r--core/jni/android/graphics/NinePatchImpl.cpp79
-rw-r--r--core/jni/android/graphics/NinePatchPeeker.h6
-rw-r--r--core/jni/android/graphics/Paint.cpp49
-rw-r--r--core/jni/android/graphics/Paint.h6
-rw-r--r--core/jni/android/graphics/Path.cpp6
-rw-r--r--core/jni/android/graphics/PathEffect.cpp32
-rw-r--r--core/jni/android/graphics/PathMeasure.cpp6
-rw-r--r--core/jni/android/graphics/Picture.h6
-rw-r--r--core/jni/android/graphics/PorterDuff.cpp7
-rw-r--r--core/jni/android/graphics/Rasterizer.cpp14
-rw-r--r--core/jni/android/graphics/Region.cpp18
-rw-r--r--core/jni/android/graphics/Region.h6
-rw-r--r--core/jni/android/graphics/RtlProperties.h12
-rw-r--r--core/jni/android/graphics/Shader.cpp40
-rw-r--r--core/jni/android/graphics/SurfaceTexture.cpp8
-rw-r--r--core/jni/android/graphics/Typeface.cpp8
-rw-r--r--core/jni/android/graphics/TypefaceImpl.h6
-rw-r--r--core/jni/android/graphics/Utils.h6
-rw-r--r--core/jni/android/graphics/Xfermode.cpp22
-rw-r--r--core/jni/android/graphics/YuvToJpegEncoder.cpp11
-rw-r--r--core/jni/android/graphics/YuvToJpegEncoder.h20
-rw-r--r--core/jni/android/graphics/pdf/PdfDocument.cpp5
-rw-r--r--core/jni/android/graphics/pdf/PdfEditor.cpp39
-rw-r--r--core/jni/android/graphics/pdf/PdfRenderer.cpp23
-rw-r--r--core/jni/android/opengl/poly_clip.cpp1
-rw-r--r--core/jni/android/opengl/util.cpp61
-rw-r--r--core/jni/android_animation_PropertyValuesHolder.cpp5
-rw-r--r--core/jni/android_app_NativeActivity.cpp124
-rw-r--r--core/jni/android_app_backup_FullBackup.cpp14
-rw-r--r--core/jni/android_backup_BackupDataInput.cpp19
-rw-r--r--core/jni/android_backup_BackupDataOutput.cpp5
-rw-r--r--core/jni/android_backup_BackupHelperDispatcher.cpp19
-rw-r--r--core/jni/android_backup_FileBackupHelperBase.cpp4
-rw-r--r--core/jni/android_content_res_Configuration.cpp60
-rw-r--r--core/jni/android_content_res_ObbScanner.cpp33
-rw-r--r--core/jni/android_database_CursorWindow.cpp27
-rw-r--r--core/jni/android_database_SQLiteConnection.cpp39
-rw-r--r--core/jni/android_database_SQLiteDebug.cpp22
-rw-r--r--core/jni/android_database_SQLiteGlobal.cpp7
-rw-r--r--core/jni/android_ddm_DdmHandleNativeHeap.cpp7
-rw-r--r--core/jni/android_emoji_EmojiFactory.cpp8
-rw-r--r--core/jni/android_graphics_Canvas.cpp40
-rw-r--r--core/jni/android_graphics_Picture.cpp4
-rw-r--r--core/jni/android_hardware_Camera.cpp67
-rw-r--r--core/jni/android_hardware_SensorManager.cpp28
-rw-r--r--core/jni/android_hardware_SerialPort.cpp16
-rw-r--r--core/jni/android_hardware_SoundTrigger.cpp182
-rw-r--r--core/jni/android_hardware_UsbDevice.cpp4
-rw-r--r--core/jni/android_hardware_UsbDeviceConnection.cpp16
-rw-r--r--core/jni/android_hardware_UsbRequest.cpp4
-rw-r--r--core/jni/android_hardware_camera2_CameraMetadata.cpp37
-rw-r--r--core/jni/android_hardware_camera2_DngCreator.cpp77
-rw-r--r--core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp10
-rw-r--r--core/jni/android_hardware_camera2_legacy_PerfMeasurement.cpp4
-rw-r--r--core/jni/android_hardware_location_ActivityRecognitionHardware.cpp2
-rw-r--r--core/jni/android_media_AudioRecord.cpp61
-rw-r--r--core/jni/android_media_AudioSystem.cpp218
-rw-r--r--core/jni/android_media_AudioTrack.cpp74
-rw-r--r--core/jni/android_media_JetPlayer.cpp32
-rw-r--r--core/jni/android_media_RemoteDisplay.cpp22
-rw-r--r--core/jni/android_media_ToneGenerator.cpp19
-rw-r--r--core/jni/android_net_LocalSocketImpl.cpp52
-rw-r--r--core/jni/android_net_NetUtils.cpp44
-rw-r--r--core/jni/android_net_TrafficStats.cpp5
-rw-r--r--core/jni/android_nfc.h63
-rw-r--r--core/jni/android_nio_utils.cpp38
-rw-r--r--core/jni/android_nio_utils.h11
-rw-r--r--core/jni/android_opengl_EGL14.cpp7
-rw-r--r--core/jni/android_opengl_EGLExt.cpp20
-rw-r--r--core/jni/android_opengl_GLES10.cpp4
-rw-r--r--core/jni/android_opengl_GLES10Ext.cpp4
-rw-r--r--core/jni/android_opengl_GLES11.cpp4
-rw-r--r--core/jni/android_opengl_GLES11Ext.cpp4
-rw-r--r--core/jni/android_opengl_GLES20.cpp4
-rw-r--r--core/jni/android_opengl_GLES30.cpp12
-rw-r--r--core/jni/android_opengl_GLES31.cpp8
-rw-r--r--core/jni/android_opengl_GLES31Ext.cpp4
-rw-r--r--core/jni/android_os_Debug.cpp13
-rw-r--r--core/jni/android_os_MemoryFile.cpp6
-rw-r--r--core/jni/android_os_MessageQueue.cpp29
-rw-r--r--core/jni/android_os_Parcel.cpp38
-rw-r--r--core/jni/android_os_SELinux.cpp114
-rw-r--r--core/jni/android_os_SystemClock.cpp19
-rw-r--r--core/jni/android_os_SystemProperties.cpp7
-rw-r--r--core/jni/android_os_Trace.cpp17
-rw-r--r--core/jni/android_os_UEventObserver.cpp13
-rw-r--r--core/jni/android_server_FingerprintManager.cpp38
-rw-r--r--core/jni/android_server_NetworkManagementSocketTagger.cpp4
-rw-r--r--core/jni/android_server_Watchdog.cpp5
-rw-r--r--core/jni/android_text_AndroidBidi.cpp8
-rw-r--r--core/jni/android_text_AndroidCharacter.cpp5
-rw-r--r--core/jni/android_text_StaticLayout.cpp15
-rw-r--r--core/jni/android_util_AssetManager.cpp373
-rw-r--r--core/jni/android_util_Binder.cpp190
-rw-r--r--core/jni/android_util_EventLog.cpp30
-rw-r--r--core/jni/android_util_FileObserver.cpp72
-rw-r--r--core/jni/android_util_FloatMath.cpp61
-rw-r--r--core/jni/android_util_Log.cpp25
-rw-r--r--core/jni/android_util_Process.cpp80
-rw-r--r--core/jni/android_util_StringBlock.cpp4
-rw-r--r--core/jni/android_util_XmlBlock.cpp13
-rw-r--r--core/jni/android_view_DisplayEventReceiver.cpp39
-rw-r--r--core/jni/android_view_GLES20Canvas.cpp91
-rw-r--r--core/jni/android_view_GraphicBuffer.cpp64
-rw-r--r--core/jni/android_view_HardwareLayer.cpp4
-rw-r--r--core/jni/android_view_InputChannel.cpp34
-rw-r--r--core/jni/android_view_InputDevice.cpp19
-rw-r--r--core/jni/android_view_InputEventReceiver.cpp117
-rw-r--r--core/jni/android_view_InputEventSender.cpp84
-rw-r--r--core/jni/android_view_InputQueue.cpp24
-rw-r--r--core/jni/android_view_KeyCharacterMap.cpp45
-rw-r--r--core/jni/android_view_KeyEvent.cpp68
-rw-r--r--core/jni/android_view_MotionEvent.cpp87
-rw-r--r--core/jni/android_view_PointerIcon.cpp34
-rw-r--r--core/jni/android_view_RenderNode.cpp17
-rw-r--r--core/jni/android_view_RenderNodeAnimator.cpp27
-rw-r--r--core/jni/android_view_Surface.cpp42
-rw-r--r--core/jni/android_view_SurfaceControl.cpp65
-rw-r--r--core/jni/android_view_TextureView.cpp41
-rw-r--r--core/jni/android_view_ThreadedRenderer.cpp4
-rw-r--r--core/jni/android_view_VelocityTracker.cpp34
-rw-r--r--core/jni/com_android_internal_content_NativeLibraryHelper.cpp55
-rw-r--r--core/jni/com_android_internal_net_NetworkStatsFactory.cpp48
-rw-r--r--core/jni/com_android_internal_os_Zygote.cpp81
-rw-r--r--core/jni/com_android_internal_os_ZygoteInit.cpp265
-rw-r--r--core/jni/com_android_internal_util_VirtualRefBasePtr.cpp4
-rw-r--r--core/jni/com_android_internal_view_animation_NativeInterpolatorFactoryHelper.cpp4
-rw-r--r--core/jni/com_google_android_gles_jni_GLImpl.cpp4
-rw-r--r--core/jni/core_jni_helpers.h77
-rw-r--r--core/res/AndroidManifest.xml4
-rw-r--r--core/res/res/drawable/pointer_arrow_icon.xml4
-rwxr-xr-xcore/res/res/values-af/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-af/strings.xml64
-rwxr-xr-xcore/res/res/values-am/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-am/strings.xml64
-rwxr-xr-xcore/res/res/values-ar-rEG/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-ar/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-ar/strings.xml64
-rw-r--r--core/res/res/values-az-rAZ/strings.xml64
-rwxr-xr-xcore/res/res/values-bg/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-bg/strings.xml64
-rw-r--r--core/res/res/values-bn-rBD/strings.xml64
-rwxr-xr-xcore/res/res/values-ca/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-ca/strings.xml64
-rwxr-xr-xcore/res/res/values-cs/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-cs/strings.xml64
-rwxr-xr-xcore/res/res/values-da/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-da/strings.xml64
-rwxr-xr-xcore/res/res/values-de/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-de/strings.xml64
-rwxr-xr-xcore/res/res/values-el/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-el/strings.xml64
-rwxr-xr-xcore/res/res/values-en-rAU/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-en-rAU/strings.xml64
-rwxr-xr-xcore/res/res/values-en-rCA/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-en-rGB/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-en-rGB/strings.xml64
-rwxr-xr-xcore/res/res/values-en-rIE/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-en-rIN/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-en-rIN/strings.xml64
-rwxr-xr-xcore/res/res/values-en-rNZ/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-en-rSG/strings.xml16
-rwxr-xr-xcore/res/res/values-en-rUS/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-en-rUS/strings.xml16
-rwxr-xr-xcore/res/res/values-en-rZA/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-es-rUS/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-es-rUS/strings.xml64
-rwxr-xr-xcore/res/res/values-es/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-es/strings.xml64
-rw-r--r--core/res/res/values-et-rEE/strings.xml64
-rw-r--r--core/res/res/values-eu-rES/strings.xml64
-rwxr-xr-xcore/res/res/values-fa/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-fa/strings.xml64
-rwxr-xr-xcore/res/res/values-fi-rFI/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-fi/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-fi/strings.xml64
-rw-r--r--core/res/res/values-fr-rCA/strings.xml64
-rwxr-xr-xcore/res/res/values-fr/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-fr/strings.xml64
-rw-r--r--core/res/res/values-gl-rES/strings.xml64
-rwxr-xr-xcore/res/res/values-hi-rIN/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-hi/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-hi/strings.xml64
-rwxr-xr-xcore/res/res/values-hr-rHR/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-hr/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-hr/strings.xml64
-rwxr-xr-xcore/res/res/values-hu-rHU/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-hu/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-hu/strings.xml64
-rw-r--r--core/res/res/values-hy-rAM/strings.xml64
-rwxr-xr-xcore/res/res/values-in-rID/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-in/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-in/strings.xml64
-rw-r--r--core/res/res/values-is-rIS/strings.xml64
-rwxr-xr-xcore/res/res/values-it/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-it/strings.xml64
-rwxr-xr-xcore/res/res/values-iw/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-iw/strings.xml64
-rwxr-xr-xcore/res/res/values-ja/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-ja/strings.xml64
-rw-r--r--core/res/res/values-ka-rGE/strings.xml64
-rw-r--r--core/res/res/values-kk-rKZ/strings.xml64
-rw-r--r--core/res/res/values-km-rKH/strings.xml64
-rw-r--r--core/res/res/values-kn-rIN/strings.xml64
-rwxr-xr-xcore/res/res/values-ko/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-ko/strings.xml64
-rw-r--r--core/res/res/values-ky-rKG/strings.xml32
-rw-r--r--core/res/res/values-lo-rLA/strings.xml64
-rwxr-xr-xcore/res/res/values-lt-rLT/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-lt/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-lt/strings.xml64
-rwxr-xr-xcore/res/res/values-lv-rLV/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-lv/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-lv/strings.xml64
-rw-r--r--core/res/res/values-mcc259-mnc05/config.xml35
-rw-r--r--core/res/res/values-mk-rMK/strings.xml64
-rw-r--r--core/res/res/values-ml-rIN/strings.xml64
-rw-r--r--core/res/res/values-mn-rMN/strings.xml64
-rw-r--r--core/res/res/values-mr-rIN/strings.xml64
-rw-r--r--core/res/res/values-ms-rMY/strings.xml64
-rw-r--r--core/res/res/values-my-rMM/strings.xml64
-rwxr-xr-xcore/res/res/values-nb/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-nb/strings.xml64
-rw-r--r--core/res/res/values-ne-rNP/strings.xml64
-rwxr-xr-xcore/res/res/values-nl/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-nl/strings.xml64
-rwxr-xr-xcore/res/res/values-pl/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-pl/strings.xml64
-rwxr-xr-xcore/res/res/values-pt-rPT/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-pt-rPT/strings.xml64
-rwxr-xr-xcore/res/res/values-pt/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-pt/strings.xml64
-rwxr-xr-xcore/res/res/values-ro-rRO/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-ro/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-ro/strings.xml64
-rwxr-xr-xcore/res/res/values-ru/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-ru/strings.xml64
-rw-r--r--core/res/res/values-si-rLK/strings.xml64
-rwxr-xr-xcore/res/res/values-sk-rSK/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-sk/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-sk/strings.xml68
-rwxr-xr-xcore/res/res/values-sl-rSI/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-sl/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-sl/strings.xml64
-rwxr-xr-xcore/res/res/values-sr-rRS/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-sr/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-sr/strings.xml64
-rwxr-xr-xcore/res/res/values-sv/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-sv/strings.xml66
-rwxr-xr-xcore/res/res/values-sw/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-sw/strings.xml64
-rw-r--r--core/res/res/values-ta-rIN/strings.xml64
-rw-r--r--core/res/res/values-te-rIN/strings.xml64
-rwxr-xr-xcore/res/res/values-th-rTH/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-th/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-th/strings.xml64
-rwxr-xr-xcore/res/res/values-tl/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-tl/strings.xml64
-rwxr-xr-xcore/res/res/values-tr/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-tr/strings.xml64
-rwxr-xr-xcore/res/res/values-uk-rUA/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-uk/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-uk/strings.xml64
-rw-r--r--core/res/res/values-ur-rPK/strings.xml64
-rw-r--r--core/res/res/values-uz-rUZ/strings.xml64
-rwxr-xr-xcore/res/res/values-vi-rVN/donottranslate-cldr.xml1
-rwxr-xr-xcore/res/res/values-vi/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-vi/strings.xml64
-rwxr-xr-xcore/res/res/values-zh-rCN/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-zh-rCN/strings.xml64
-rw-r--r--core/res/res/values-zh-rHK/strings.xml64
-rwxr-xr-xcore/res/res/values-zh-rTW/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-zh-rTW/strings.xml64
-rwxr-xr-xcore/res/res/values-zu/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values-zu/strings.xml64
-rw-r--r--core/res/res/values/attrs_manifest.xml23
-rwxr-xr-xcore/res/res/values/config.xml20
-rwxr-xr-xcore/res/res/values/donottranslate-cldr.xml1
-rw-r--r--core/res/res/values/public.xml1
-rw-r--r--core/res/res/values/strings.xml96
-rwxr-xr-xcore/res/res/values/symbols.xml17
-rw-r--r--core/res/res/xml/sms_short_codes.xml2
-rw-r--r--core/tests/benchmarks/src/android/util/FloatMathBenchmark.java116
-rw-r--r--core/tests/coretests/apks/install_bad_dex/Android.mk5
-rw-r--r--core/tests/coretests/apks/install_jni_lib/Android.mk8
-rw-r--r--core/tests/coretests/apks/install_jni_lib/com_android_frameworks_coretests_JNITest.cpp6
-rw-r--r--core/tests/coretests/apks/install_jni_lib_open_from_apk/Android.mk10
-rw-r--r--core/tests/coretests/apks/install_jni_lib_open_from_apk/AndroidManifest.xml28
-rw-r--r--core/tests/coretests/apks/install_jni_lib_open_from_apk/res/values/strings.xml19
-rw-r--r--core/tests/coretests/apks/install_jni_lib_open_from_apk/src/com/android/frameworks/coretests/JNITests.java26
-rw-r--r--core/tests/coretests/apks/install_jni_lib_open_from_apk/src/com/android/frameworks/coretests/OpenFromApkActivity.java (renamed from core/java/android/net/http/Timer.java)35
-rw-r--r--core/tests/coretests/src/android/content/pm/PackageManagerTests.java11
-rw-r--r--core/tests/coretests/src/android/net/IpPrefixTest.java32
-rw-r--r--core/tests/coretests/src/android/net/RouteInfoTest.java1
-rw-r--r--core/tests/coretests/src/android/net/StaticIpConfigurationTest.java225
-rw-r--r--core/tests/coretests/src/android/net/UriTest.java52
-rw-r--r--core/tests/coretests/src/android/net/http/HttpResponseCacheTest.java135
-rw-r--r--core/tests/coretests/src/android/os/SELinuxTest.java45
-rw-r--r--core/tests/coretests/src/android/text/TextUtilsTest.java1
-rw-r--r--core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/Test.java17
-rw-r--r--core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated.java26
-rw-r--r--core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated2.java25
-rw-r--r--core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated3.java27
-rw-r--r--core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/AnnotationValue.java23
-rw-r--r--core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation.java25
-rw-r--r--core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation2.java25
-rw-r--r--core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation3.java31
-rw-r--r--core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java8
-rwxr-xr-xcore/tests/overlaytests/testrunner.py16
494 files changed, 6170 insertions, 12786 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 7a636db..c6ffef6 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -256,6 +256,9 @@ public class ActivityManager {
/** @hide User operation call: given user id is the current user, can't be stopped. */
public static final int USER_OP_IS_CURRENT = -2;
+ /** @hide Process does not exist. */
+ public static final int PROCESS_STATE_NONEXISTENT = -1;
+
/** @hide Process is a persistent system process. */
public static final int PROCESS_STATE_PERSISTENT = 0;
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 8c57169..e94cdae 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -465,8 +465,9 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
String resultData = data.readString();
Bundle resultExtras = data.readBundle();
boolean resultAbort = data.readInt() != 0;
+ int intentFlags = data.readInt();
if (who != null) {
- finishReceiver(who, resultCode, resultData, resultExtras, resultAbort);
+ finishReceiver(who, resultCode, resultData, resultExtras, resultAbort, intentFlags);
}
reply.writeNoException();
return true;
@@ -2364,6 +2365,15 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
reply.writeNoException();
return true;
}
+
+ case NOTIFY_CLEARTEXT_NETWORK_TRANSACTION: {
+ data.enforceInterface(IActivityManager.descriptor);
+ final int uid = data.readInt();
+ final byte[] firstPacket = data.createByteArray();
+ notifyCleartextNetwork(uid, firstPacket);
+ reply.writeNoException();
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
@@ -2842,7 +2852,8 @@ class ActivityManagerProxy implements IActivityManager
data.recycle();
reply.recycle();
}
- public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map, boolean abortBroadcast) throws RemoteException
+ public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map,
+ boolean abortBroadcast, int flags) throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
@@ -2852,6 +2863,7 @@ class ActivityManagerProxy implements IActivityManager
data.writeString(resultData);
data.writeBundle(map);
data.writeInt(abortBroadcast ? 1 : 0);
+ data.writeInt(flags);
mRemote.transact(FINISH_RECEIVER_TRANSACTION, data, reply, IBinder.FLAG_ONEWAY);
reply.readException();
data.recycle();
@@ -5465,5 +5477,18 @@ class ActivityManagerProxy implements IActivityManager
reply.recycle();
}
+ @Override
+ public void notifyCleartextNetwork(int uid, byte[] firstPacket) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ Parcel reply = Parcel.obtain();
+ data.writeInterfaceToken(IActivityManager.descriptor);
+ data.writeInt(uid);
+ data.writeByteArray(firstPacket);
+ mRemote.transact(NOTIFY_CLEARTEXT_NETWORK_TRANSACTION, data, reply, 0);
+ reply.readException();
+ data.recycle();
+ reply.recycle();
+ }
+
private IBinder mRemote;
}
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 8353d54..850bc1f 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -75,6 +75,7 @@ import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
import android.provider.Settings;
+import android.security.NetworkSecurityPolicy;
import android.util.AndroidRuntimeException;
import android.util.ArrayMap;
import android.util.DisplayMetrics;
@@ -96,7 +97,7 @@ import android.view.ViewRootImpl;
import android.view.Window;
import android.view.WindowManager;
import android.view.WindowManagerGlobal;
-import android.renderscript.RenderScript;
+import android.renderscript.RenderScriptCacheDir;
import android.security.AndroidKeyStoreProvider;
import com.android.internal.app.IVoiceInteractor;
@@ -124,7 +125,6 @@ import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.TimeZone;
-import java.util.regex.Pattern;
import libcore.io.DropBox;
import libcore.io.EventLogger;
@@ -163,7 +163,6 @@ public final class ActivityThread {
private static final boolean DEBUG_MEMORY_TRIM = false;
private static final boolean DEBUG_PROVIDER = false;
private static final long MIN_TIME_BETWEEN_GCS = 5*1000;
- private static final Pattern PATTERN_SEMICOLON = Pattern.compile(";");
private static final int SQLITE_MEM_RELEASED_EVENT_LOG_TAG = 75003;
private static final int LOG_ON_PAUSE_CALLED = 30021;
private static final int LOG_ON_RESUME_CALLED = 30022;
@@ -374,7 +373,7 @@ public final class ActivityThread {
public ReceiverData(Intent intent, int resultCode, String resultData, Bundle resultExtras,
boolean ordered, boolean sticky, IBinder token, int sendingUser) {
super(resultCode, resultData, resultExtras, TYPE_COMPONENT, ordered, sticky,
- token, sendingUser);
+ token, sendingUser, intent.getFlags());
this.intent = intent;
}
@@ -1086,8 +1085,7 @@ public final class ActivityThread {
WindowManagerGlobal.getInstance().dumpGfxInfo(fd);
}
- @Override
- public void dumpDbInfo(FileDescriptor fd, String[] args) {
+ private void dumpDatabaseInfo(FileDescriptor fd, String[] args) {
PrintWriter pw = new FastPrintWriter(new FileOutputStream(fd));
PrintWriterPrinter printer = new PrintWriterPrinter(pw);
SQLiteDebug.dump(printer, args);
@@ -1095,6 +1093,22 @@ public final class ActivityThread {
}
@Override
+ public void dumpDbInfo(final FileDescriptor fd, final String[] args) {
+ if (mSystemThread) {
+ // Ensure this invocation is asynchronous to prevent
+ // writer waiting due to buffer cannot be consumed.
+ AsyncTask.THREAD_POOL_EXECUTOR.execute(new Runnable() {
+ @Override
+ public void run() {
+ dumpDatabaseInfo(fd, args);
+ }
+ });
+ } else {
+ dumpDatabaseInfo(fd, args);
+ }
+ }
+
+ @Override
public void unstableProviderDied(IBinder provider) {
sendMessage(H.UNSTABLE_PROVIDER_DIED, provider);
}
@@ -1178,9 +1192,17 @@ public final class ActivityThread {
sendMessage(H.BACKGROUND_VISIBLE_BEHIND_CHANGED, token, visible ? 1 : 0);
}
+ @Override
public void scheduleEnterAnimationComplete(IBinder token) {
sendMessage(H.ENTER_ANIMATION_COMPLETE, token);
}
+
+ @Override
+ public void notifyCleartextNetwork(byte[] firstPacket) {
+ if (StrictMode.vmCleartextNetworkEnabled()) {
+ StrictMode.onCleartextNetworkDetected(firstPacket);
+ }
+ }
}
private class H extends Handler {
@@ -3159,7 +3181,7 @@ public final class ActivityThread {
if (cv == null) {
mThumbnailCanvas = cv = new Canvas();
}
-
+
cv.setBitmap(thumbnail);
if (!r.activity.onCreateThumbnail(thumbnail, cv)) {
mAvailThumbnailBitmap = thumbnail;
@@ -3457,12 +3479,12 @@ public final class ActivityThread {
private void handleWindowVisibility(IBinder token, boolean show) {
ActivityClientRecord r = mActivities.get(token);
-
+
if (r == null) {
Log.w(TAG, "handleWindowVisibility: no activity for token " + token);
return;
}
-
+
if (!show && !r.stopped) {
performStopActivityInner(r, null, show, false);
} else if (show && r.stopped) {
@@ -3890,10 +3912,10 @@ public final class ActivityThread {
}
}
}
-
+
if (DEBUG_CONFIGURATION) Slog.v(TAG, "Relaunching activity "
+ tmp.token + ": changedConfig=" + changedConfig);
-
+
// If there was a pending configuration change, execute it first.
if (changedConfig != null) {
mCurDefaultDisplayDpi = changedConfig.densityDpi;
@@ -4090,7 +4112,7 @@ public final class ActivityThread {
if (config == null) {
return;
}
-
+
if (DEBUG_CONFIGURATION) Slog.v(TAG, "Handle configuration changed: "
+ config);
@@ -4138,7 +4160,7 @@ public final class ActivityThread {
if (DEBUG_CONFIGURATION) Slog.v(TAG, "Handle activity config changed: "
+ r.activityInfo.name);
-
+
performConfigurationChanged(r.activity, mCompatConfiguration);
freeTextLayoutCachesIfNeeded(r.activity.mCurrentConfig.diff(mCompatConfiguration));
@@ -4196,28 +4218,30 @@ public final class ActivityThread {
final void handleDispatchPackageBroadcast(int cmd, String[] packages) {
boolean hasPkgInfo = false;
if (packages != null) {
- for (int i=packages.length-1; i>=0; i--) {
- //Slog.i(TAG, "Cleaning old package: " + packages[i]);
- if (!hasPkgInfo) {
- WeakReference<LoadedApk> ref;
- ref = mPackages.get(packages[i]);
- if (ref != null && ref.get() != null) {
- hasPkgInfo = true;
- } else {
- ref = mResourcePackages.get(packages[i]);
+ synchronized (mResourcesManager) {
+ for (int i=packages.length-1; i>=0; i--) {
+ //Slog.i(TAG, "Cleaning old package: " + packages[i]);
+ if (!hasPkgInfo) {
+ WeakReference<LoadedApk> ref;
+ ref = mPackages.get(packages[i]);
if (ref != null && ref.get() != null) {
hasPkgInfo = true;
+ } else {
+ ref = mResourcePackages.get(packages[i]);
+ if (ref != null && ref.get() != null) {
+ hasPkgInfo = true;
+ }
}
}
+ mPackages.remove(packages[i]);
+ mResourcePackages.remove(packages[i]);
}
- mPackages.remove(packages[i]);
- mResourcePackages.remove(packages[i]);
}
}
ApplicationPackageManager.handlePackageBroadcast(cmd, packages,
hasPkgInfo);
}
-
+
final void handleLowMemory() {
ArrayList<ComponentCallbacks2> callbacks = collectComponentCallbacks(true, null);
@@ -4264,10 +4288,10 @@ public final class ActivityThread {
String[] packages = getPackageManager().getPackagesForUid(uid);
// If there are several packages in this application we won't
- // initialize the graphics disk caches
+ // initialize the graphics disk caches
if (packages != null && packages.length == 1) {
HardwareRenderer.setupDiskCache(cacheDir);
- RenderScript.setupDiskCache(cacheDir);
+ RenderScriptCacheDir.setupDiskCache(cacheDir);
}
} catch (RemoteException e) {
// Ignore
@@ -4368,10 +4392,16 @@ public final class ActivityThread {
if (cacheDir != null) {
// Provide a usable directory for temporary files
System.setProperty("java.io.tmpdir", cacheDir.getAbsolutePath());
-
- setupGraphicsSupport(data.info, cacheDir);
} else {
- Log.e(TAG, "Unable to setupGraphicsSupport due to missing cache directory");
+ Log.v(TAG, "Unable to initialize \"java.io.tmpdir\" property due to missing cache directory");
+ }
+
+ // Use codeCacheDir to store generated/compiled graphics code
+ final File codeCacheDir = appContext.getCodeCacheDir();
+ if (codeCacheDir != null) {
+ setupGraphicsSupport(data.info, codeCacheDir);
+ } else {
+ Log.e(TAG, "Unable to setupGraphicsSupport due to missing code-cache directory");
}
}
@@ -4403,6 +4433,9 @@ public final class ActivityThread {
StrictMode.enableDeathOnNetwork();
}
+ NetworkSecurityPolicy.getInstance().setCleartextTrafficPermitted(
+ (data.appInfo.flags & ApplicationInfo.FLAG_USES_CLEARTEXT_TRAFFIC) != 0);
+
if (data.debugMode != IApplicationThread.DEBUG_OFF) {
// XXX should have option to change the port.
Debug.changeDebugPort(8100);
@@ -4514,6 +4547,10 @@ public final class ActivityThread {
if ((data.appInfo.flags&ApplicationInfo.FLAG_LARGE_HEAP) != 0) {
dalvik.system.VMRuntime.getRuntime().clearGrowthLimit();
+ } else {
+ // Small heap, clamp to the current growth limit and let the heap release
+ // pages after the growth limit to the non growth limit capacity. b/18387825
+ dalvik.system.VMRuntime.getRuntime().clampGrowthLimit();
}
// Allow disk access during application and provider setup. This could
@@ -4918,7 +4955,7 @@ public final class ActivityThread {
private ProviderClientRecord installProviderAuthoritiesLocked(IContentProvider provider,
ContentProvider localProvider, IActivityManager.ContentProviderHolder holder) {
- final String auths[] = PATTERN_SEMICOLON.split(holder.info.authority);
+ final String auths[] = holder.info.authority.split(";");
final int userId = UserHandle.getUserId(holder.info.applicationInfo.uid);
final ProviderClientRecord pcr = new ProviderClientRecord(
@@ -5146,7 +5183,7 @@ public final class ActivityThread {
if (mPendingConfiguration == null ||
mPendingConfiguration.isOtherSeqNewer(newConfig)) {
mPendingConfiguration = newConfig;
-
+
sendMessage(H.CONFIGURATION_CHANGED, newConfig);
}
}
diff --git a/core/java/android/app/ApplicationErrorReport.java b/core/java/android/app/ApplicationErrorReport.java
index 6c2511e..8692336 100644
--- a/core/java/android/app/ApplicationErrorReport.java
+++ b/core/java/android/app/ApplicationErrorReport.java
@@ -235,10 +235,13 @@ public class ApplicationErrorReport implements Parcelable {
dest.writeString(processName);
dest.writeLong(time);
dest.writeInt(systemApp ? 1 : 0);
+ dest.writeInt(crashInfo != null ? 1 : 0);
switch (type) {
case TYPE_CRASH:
- crashInfo.writeToParcel(dest, flags);
+ if (crashInfo != null) {
+ crashInfo.writeToParcel(dest, flags);
+ }
break;
case TYPE_ANR:
anrInfo.writeToParcel(dest, flags);
@@ -259,10 +262,11 @@ public class ApplicationErrorReport implements Parcelable {
processName = in.readString();
time = in.readLong();
systemApp = in.readInt() == 1;
+ boolean hasCrashInfo = in.readInt() == 1;
switch (type) {
case TYPE_CRASH:
- crashInfo = new CrashInfo(in);
+ crashInfo = hasCrashInfo ? new CrashInfo(in) : null;
anrInfo = null;
batteryInfo = null;
runningServiceInfo = null;
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 967e97e..d808c8b 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -63,6 +63,7 @@ import android.os.UserManager;
import android.util.ArrayMap;
import android.util.Log;
import android.view.Display;
+import android.os.SystemProperties;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.Preconditions;
@@ -287,7 +288,12 @@ final class ApplicationPackageManager extends PackageManager {
// depending on what the current runtime's instruction set is.
if (info.primaryCpuAbi != null && info.secondaryCpuAbi != null) {
final String runtimeIsa = VMRuntime.getRuntime().vmInstructionSet();
- final String secondaryIsa = VMRuntime.getInstructionSet(info.secondaryCpuAbi);
+
+ // Get the instruction set that the libraries of secondary Abi is supported.
+ // In presence of a native bridge this might be different than the one secondary Abi used.
+ String secondaryIsa = VMRuntime.getInstructionSet(info.secondaryCpuAbi);
+ final String secondaryDexCodeIsa = SystemProperties.get("ro.dalvik.vm.isa." + secondaryIsa);
+ secondaryIsa = secondaryDexCodeIsa.isEmpty() ? secondaryIsa : secondaryDexCodeIsa;
// If the runtimeIsa is the same as the primary isa, then we do nothing.
// Everything will be set up correctly because info.nativeLibraryDir will
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index d1b77b9..eb3ddb2 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -670,6 +670,15 @@ public abstract class ApplicationThreadNative extends Binder
reply.writeNoException();
return true;
}
+
+ case NOTIFY_CLEARTEXT_NETWORK_TRANSACTION:
+ {
+ data.enforceInterface(IApplicationThread.descriptor);
+ final byte[] firstPacket = data.createByteArray();
+ notifyCleartextNetwork(firstPacket);
+ reply.writeNoException();
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
@@ -1350,4 +1359,13 @@ class ApplicationThreadProxy implements IApplicationThread {
mRemote.transact(ENTER_ANIMATION_COMPLETE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
data.recycle();
}
+
+ @Override
+ public void notifyCleartextNetwork(byte[] firstPacket) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ data.writeInterfaceToken(IApplicationThread.descriptor);
+ data.writeByteArray(firstPacket);
+ mRemote.transact(NOTIFY_CLEARTEXT_NETWORK_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
+ data.recycle();
+ }
}
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index af45731..ab28d95 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -219,8 +219,8 @@ final class FragmentState implements Parcelable {
* state of its view hierarchy has been restored.
* <li> {@link #onStart} makes the fragment visible to the user (based on its
* containing activity being started).
- * <li> {@link #onResume} makes the fragment interacting with the user (based on its
- * containing activity being resumed).
+ * <li> {@link #onResume} makes the fragment begin interacting with the user
+ * (based on its containing activity being resumed).
* </ol>
*
* <p>As a fragment is no longer being used, it goes through a reverse
@@ -564,7 +564,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
* and later retrieved by the Fragment with {@link #getArguments}.
*
* <p>Applications should generally not implement a constructor. The
- * first place application code an run where the fragment is ready to
+ * first place application code can run where the fragment is ready to
* be used is in {@link #onAttach(Activity)}, the point where the fragment
* is actually associated with its activity. Some applications may also
* want to implement {@link #onInflate} to retrieve attributes from a
@@ -720,8 +720,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene
}
/**
- * Return the arguments supplied when the fragment was instantiated,
- * if any.
+ * Return the arguments supplied to {@link #setArguments}, if any.
*/
final public Bundle getArguments() {
return mArguments;
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index fc761fe..ccceef4 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -70,7 +70,7 @@ public abstract class FragmentManager {
* with {@link FragmentTransaction#addToBackStack(String)
* FragmentTransaction.addToBackStack()}. Entries can later be
* retrieved with {@link FragmentManager#getBackStackEntryAt(int)
- * FragmentManager.getBackStackEntry()}.
+ * FragmentManager.getBackStackEntryAt()}.
*
* <p>Note that you should never hold on to a BackStackEntry object;
* the identifier as returned by {@link #getId} is the only thing that
@@ -260,7 +260,7 @@ public abstract class FragmentManager {
/**
* Return the BackStackEntry at index <var>index</var> in the back stack;
- * entries start index 0 being the bottom of the stack.
+ * where the item on the bottom of the stack has index 0.
*/
public abstract BackStackEntry getBackStackEntryAt(int index);
diff --git a/core/java/android/app/FragmentTransaction.java b/core/java/android/app/FragmentTransaction.java
index 25cd3cc..dc7075c 100644
--- a/core/java/android/app/FragmentTransaction.java
+++ b/core/java/android/app/FragmentTransaction.java
@@ -26,7 +26,7 @@ public abstract class FragmentTransaction {
/**
* Add a fragment to the activity state. This fragment may optionally
* also have its view (if {@link Fragment#onCreateView Fragment.onCreateView}
- * returns non-null) into a container view of the activity.
+ * returns non-null) inserted into a container view of the activity.
*
* @param containerViewId Optional identifier of the container this fragment is
* to be placed in. If 0, it will not be placed in a container.
diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java
index dd3a38b..a138dbb 100644
--- a/core/java/android/app/IActivityManager.java
+++ b/core/java/android/app/IActivityManager.java
@@ -106,7 +106,8 @@ public interface IActivityManager extends IInterface {
String resultData, Bundle map, String requiredPermission,
int appOp, boolean serialized, boolean sticky, int userId) throws RemoteException;
public void unbroadcastIntent(IApplicationThread caller, Intent intent, int userId) throws RemoteException;
- public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map, boolean abortBroadcast) throws RemoteException;
+ public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map,
+ boolean abortBroadcast, int flags) throws RemoteException;
public void attachApplication(IApplicationThread app) throws RemoteException;
public void activityResumed(IBinder token) throws RemoteException;
public void activityIdle(IBinder token, Configuration config,
@@ -469,6 +470,7 @@ public interface IActivityManager extends IInterface {
public void notifyEnterAnimationComplete(IBinder token) throws RemoteException;
public void systemBackupRestored() throws RemoteException;
+ public void notifyCleartextNetwork(int uid, byte[] firstPacket) throws RemoteException;
/*
* Private non-Binder interfaces
@@ -792,4 +794,7 @@ public interface IActivityManager extends IInterface {
int CHECK_PERMISSION_WITH_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+241;
int REGISTER_TASK_STACK_LISTENER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+242;
int SYSTEM_BACKUP_RESTORED = IBinder.FIRST_CALL_TRANSACTION+243;
+
+ // Start of M transactions
+ int NOTIFY_CLEARTEXT_NETWORK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+280;
}
diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java
index 42acbc6..8bf8cd7 100644
--- a/core/java/android/app/IApplicationThread.java
+++ b/core/java/android/app/IApplicationThread.java
@@ -147,6 +147,7 @@ public interface IApplicationThread extends IInterface {
void scheduleCancelVisibleBehind(IBinder token) throws RemoteException;
void scheduleBackgroundVisibleBehindChanged(IBinder token, boolean enabled) throws RemoteException;
void scheduleEnterAnimationComplete(IBinder token) throws RemoteException;
+ void notifyCleartextNetwork(byte[] firstPacket) throws RemoteException;
String descriptor = "android.app.IApplicationThread";
@@ -204,4 +205,5 @@ public interface IApplicationThread extends IInterface {
int CANCEL_VISIBLE_BEHIND_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+52;
int BACKGROUND_VISIBLE_BEHIND_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+53;
int ENTER_ANIMATION_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+54;
+ int NOTIFY_CLEARTEXT_NETWORK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+55;
}
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index ece2a33..83c6c2b 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -45,6 +45,7 @@ import android.util.Slog;
import android.util.SparseArray;
import android.view.DisplayAdjustments;
import android.view.Display;
+import android.os.SystemProperties;
import dalvik.system.VMRuntime;
import java.io.File;
@@ -156,7 +157,12 @@ public final class LoadedApk {
// depending on what the current runtime's instruction set is.
if (info.primaryCpuAbi != null && info.secondaryCpuAbi != null) {
final String runtimeIsa = VMRuntime.getRuntime().vmInstructionSet();
- final String secondaryIsa = VMRuntime.getInstructionSet(info.secondaryCpuAbi);
+
+ // Get the instruction set that the libraries of secondary Abi is supported.
+ // In presence of a native bridge this might be different than the one secondary Abi used.
+ String secondaryIsa = VMRuntime.getInstructionSet(info.secondaryCpuAbi);
+ final String secondaryDexCodeIsa = SystemProperties.get("ro.dalvik.vm.isa." + secondaryIsa);
+ secondaryIsa = secondaryDexCodeIsa.isEmpty() ? secondaryIsa : secondaryDexCodeIsa;
// If the runtimeIsa is the same as the primary isa, then we do nothing.
// Everything will be set up correctly because info.nativeLibraryDir will
@@ -801,7 +807,7 @@ public final class LoadedApk {
if (extras != null) {
extras.setAllowFds(false);
}
- mgr.finishReceiver(this, resultCode, data, extras, false);
+ mgr.finishReceiver(this, resultCode, data, extras, false, intent.getFlags());
} catch (RemoteException e) {
Slog.w(ActivityThread.TAG, "Couldn't finish broadcast to unregistered receiver");
}
@@ -826,8 +832,8 @@ public final class LoadedApk {
public Args(Intent intent, int resultCode, String resultData, Bundle resultExtras,
boolean ordered, boolean sticky, int sendingUser) {
super(resultCode, resultData, resultExtras,
- mRegistered ? TYPE_REGISTERED : TYPE_UNREGISTERED,
- ordered, sticky, mIIntentReceiver.asBinder(), sendingUser);
+ mRegistered ? TYPE_REGISTERED : TYPE_UNREGISTERED, ordered,
+ sticky, mIIntentReceiver.asBinder(), sendingUser, intent.getFlags());
mCurIntent = intent;
mOrdered = ordered;
}
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 80b57b7..860b9cc 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -1736,6 +1736,7 @@ public class Notification implements Parcelable
builder.setSound(this.sound, this.audioStreamType);
builder.setDefaults(this.defaults);
builder.setVibrate(this.vibrate);
+ builder.setDeleteIntent(this.deleteIntent);
// now apply the latestEventInfo fields
if (contentTitle != null) {
diff --git a/core/java/android/app/SearchManager.java b/core/java/android/app/SearchManager.java
index a40b29a..d7c4467 100644
--- a/core/java/android/app/SearchManager.java
+++ b/core/java/android/app/SearchManager.java
@@ -540,11 +540,6 @@ public class SearchManager
private final Context mContext;
- /**
- * The package associated with this seach manager.
- */
- private String mAssociatedPackage;
-
// package private since they are used by the inner class SearchManagerCallback
/* package */ final Handler mHandler;
/* package */ OnDismissListener mDismissListener = null;
@@ -742,10 +737,6 @@ public class SearchManager
public void triggerSearch(String query,
ComponentName launchActivity,
Bundle appSearchData) {
- if (!mAssociatedPackage.equals(launchActivity.getPackageName())) {
- throw new IllegalArgumentException("invoking app search on a different package " +
- "not associated with this search manager");
- }
if (query == null || TextUtils.getTrimmedLength(query) == 0) {
Log.w(TAG, "triggerSearch called with empty query, ignoring.");
return;
diff --git a/core/java/android/app/backup/BackupAgent.java b/core/java/android/app/backup/BackupAgent.java
index 87d785a..1b1e600 100644
--- a/core/java/android/app/backup/BackupAgent.java
+++ b/core/java/android/app/backup/BackupAgent.java
@@ -105,7 +105,7 @@ import java.util.concurrent.CountDownLatch;
*/
public abstract class BackupAgent extends ContextWrapper {
private static final String TAG = "BackupAgent";
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
/** @hide */
public static final int TYPE_EOF = 0;
diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java
index 5175490..0450150 100644
--- a/core/java/android/bluetooth/BluetoothA2dp.java
+++ b/core/java/android/bluetooth/BluetoothA2dp.java
@@ -199,7 +199,8 @@ public final class BluetoothA2dp implements BluetoothProfile {
}
public void finalize() {
- close();
+ // The empty finalize needs to be kept or the
+ // cts signature tests would fail.
}
/**
* Initiate connection to a profile of the remote bluetooth device.
diff --git a/core/java/android/bluetooth/IBluetooth.aidl b/core/java/android/bluetooth/IBluetooth.aidl
index c6f238e..dabb1ce 100644
--- a/core/java/android/bluetooth/IBluetooth.aidl
+++ b/core/java/android/bluetooth/IBluetooth.aidl
@@ -99,6 +99,6 @@ interface IBluetooth
void getActivityEnergyInfoFromController();
BluetoothActivityEnergyInfo reportActivityInfo();
- // For dumpsys support
- void dump(in ParcelFileDescriptor fd);
+ // for dumpsys support
+ String dump();
}
diff --git a/core/java/android/content/BroadcastReceiver.java b/core/java/android/content/BroadcastReceiver.java
index 9a32fdf..af74e73 100644
--- a/core/java/android/content/BroadcastReceiver.java
+++ b/core/java/android/content/BroadcastReceiver.java
@@ -238,6 +238,7 @@ public abstract class BroadcastReceiver {
final boolean mInitialStickyHint;
final IBinder mToken;
final int mSendingUser;
+ final int mFlags;
int mResultCode;
String mResultData;
@@ -246,8 +247,8 @@ public abstract class BroadcastReceiver {
boolean mFinished;
/** @hide */
- public PendingResult(int resultCode, String resultData, Bundle resultExtras,
- int type, boolean ordered, boolean sticky, IBinder token, int userId) {
+ public PendingResult(int resultCode, String resultData, Bundle resultExtras, int type,
+ boolean ordered, boolean sticky, IBinder token, int userId, int flags) {
mResultCode = resultCode;
mResultData = resultData;
mResultExtras = resultExtras;
@@ -256,6 +257,7 @@ public abstract class BroadcastReceiver {
mInitialStickyHint = sticky;
mToken = token;
mSendingUser = userId;
+ mFlags = flags;
}
/**
@@ -417,11 +419,11 @@ public abstract class BroadcastReceiver {
}
if (mOrderedHint) {
am.finishReceiver(mToken, mResultCode, mResultData, mResultExtras,
- mAbortBroadcast);
+ mAbortBroadcast, mFlags);
} else {
// This broadcast was sent to a component; it is not ordered,
// but we still need to tell the activity manager we are done.
- am.finishReceiver(mToken, 0, null, null, false);
+ am.finishReceiver(mToken, 0, null, null, false, mFlags);
}
} catch (RemoteException ex) {
}
diff --git a/core/java/android/content/SharedPreferences.java b/core/java/android/content/SharedPreferences.java
index 46c9234..462f473 100644
--- a/core/java/android/content/SharedPreferences.java
+++ b/core/java/android/content/SharedPreferences.java
@@ -71,9 +71,7 @@ public interface SharedPreferences {
* {@link #commit} or {@link #apply} are called.
*
* @param key The name of the preference to modify.
- * @param value The new value for the preference. Supplying {@code null}
- * as the value is equivalent to calling {@link #remove(String)} with
- * this key.
+ * @param value The new value for the preference.
*
* @return Returns a reference to the same Editor object, so you can
* chain put calls together.
diff --git a/core/java/android/content/UriMatcher.java b/core/java/android/content/UriMatcher.java
index 8487dae..71a035e 100644
--- a/core/java/android/content/UriMatcher.java
+++ b/core/java/android/content/UriMatcher.java
@@ -20,7 +20,6 @@ import android.net.Uri;
import java.util.ArrayList;
import java.util.List;
-import java.util.regex.Pattern;
/**
Utility class to aid in matching URIs in content providers.
@@ -171,7 +170,7 @@ public class UriMatcher
if (path.length() > 0 && path.charAt(0) == '/') {
newPath = path.substring(1);
}
- tokens = PATH_SPLIT_PATTERN.split(newPath);
+ tokens = newPath.split("/");
}
int numTokens = tokens != null ? tokens.length : 0;
@@ -207,8 +206,6 @@ public class UriMatcher
node.mCode = code;
}
- static final Pattern PATH_SPLIT_PATTERN = Pattern.compile("/");
-
/**
* Try to match against the path in a url.
*
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index e07edba..4a087da 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -334,42 +334,21 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
public static final int FLAG_FULL_BACKUP_ONLY = 1<<26;
/**
- * Value for {@link #flags}: true if the application is hidden via restrictions and for
- * most purposes is considered as not installed.
- * {@hide}
- */
- public static final int FLAG_HIDDEN = 1<<27;
-
- /**
- * Value for {@link #flags}: set to <code>true</code> if the application
- * has reported that it is heavy-weight, and thus can not participate in
- * the normal application lifecycle.
+ * Value for {@link #flags}: {@code true} if the application may use cleartext network traffic
+ * (e.g., HTTP rather than HTTPS; WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP
+ * without STARTTLS or TLS). If {@code false}, the app declares that it does not intend to use
+ * cleartext network traffic, in which case platform components (e.g., HTTP stacks,
+ * {@code WebView}, {@code MediaPlayer}) will refuse app's requests to use cleartext traffic.
+ * Third-party libraries are encouraged to honor this flag as well.
*
- * <p>Comes from the
- * android.R.styleable#AndroidManifestApplication_cantSaveState
- * attribute of the &lt;application&gt; tag.
- *
- * {@hide}
- */
- public static final int FLAG_CANT_SAVE_STATE = 1<<28;
-
- /**
- * Value for {@link #flags}: Set to true if the application has been
- * installed using the forward lock option.
- *
- * NOTE: DO NOT CHANGE THIS VALUE! It is saved in packages.xml.
- *
- * {@hide}
+ * @hide
*/
- public static final int FLAG_FORWARD_LOCK = 1<<29;
+ public static final int FLAG_USES_CLEARTEXT_TRAFFIC = 1<<27;
/**
- * Value for {@link #flags}: set to {@code true} if the application
- * is permitted to hold privileged permissions.
- *
- * {@hide}
+ * When set installer extracts native libs from .apk files.
*/
- public static final int FLAG_PRIVILEGED = 1<<30;
+ public static final int FLAG_EXTRACT_NATIVE_LIBS = 1<<28;
/**
* Value for {@link #flags}: true if code from this application will need to be
@@ -395,11 +374,60 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
* {@link #FLAG_SUPPORTS_LARGE_SCREENS}, {@link #FLAG_SUPPORTS_XLARGE_SCREENS},
* {@link #FLAG_RESIZEABLE_FOR_SCREENS},
* {@link #FLAG_SUPPORTS_SCREEN_DENSITIES}, {@link #FLAG_VM_SAFE_MODE},
- * {@link #FLAG_INSTALLED}, {@link #FLAG_IS_GAME}.
+ * {@link #FLAG_ALLOW_BACKUP}, {@link #FLAG_KILL_AFTER_RESTORE},
+ * {@link #FLAG_RESTORE_ANY_VERSION}, {@link #FLAG_EXTERNAL_STORAGE},
+ * {@link #FLAG_LARGE_HEAP}, {@link #FLAG_STOPPED},
+ * {@link #FLAG_SUPPORTS_RTL}, {@link #FLAG_INSTALLED},
+ * {@link #FLAG_IS_DATA_ONLY}, {@link #FLAG_IS_GAME},
+ * {@link #FLAG_FULL_BACKUP_ONLY}, {@link #FLAG_MULTIARCH}.
*/
public int flags = 0;
/**
+ * Value for {@link #privateFlags}: true if the application is hidden via restrictions and for
+ * most purposes is considered as not installed.
+ * {@hide}
+ */
+ public static final int PRIVATE_FLAG_HIDDEN = 1<<0;
+
+ /**
+ * Value for {@link #privateFlags}: set to <code>true</code> if the application
+ * has reported that it is heavy-weight, and thus can not participate in
+ * the normal application lifecycle.
+ *
+ * <p>Comes from the
+ * android.R.styleable#AndroidManifestApplication_cantSaveState
+ * attribute of the &lt;application&gt; tag.
+ *
+ * {@hide}
+ */
+ public static final int PRIVATE_FLAG_CANT_SAVE_STATE = 1<<1;
+
+ /**
+ * Value for {@link #privateFlags}: Set to true if the application has been
+ * installed using the forward lock option.
+ *
+ * NOTE: DO NOT CHANGE THIS VALUE! It is saved in packages.xml.
+ *
+ * {@hide}
+ */
+ public static final int PRIVATE_FLAG_FORWARD_LOCK = 1<<2;
+
+ /**
+ * Value for {@link #privateFlags}: set to {@code true} if the application
+ * is permitted to hold privileged permissions.
+ *
+ * {@hide}
+ */
+ public static final int PRIVATE_FLAG_PRIVILEGED = 1<<3;
+
+ /**
+ * Private/hidden flags. See {@code PRIVATE_FLAG_...} constants.
+ * {@hide}
+ */
+ public int privateFlags;
+
+ /**
* The required smallest screen width the application can run on. If 0,
* nothing has been specified. Comes from
* {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp
@@ -598,6 +626,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
pw.println(prefix + "processName=" + processName);
pw.println(prefix + "taskAffinity=" + taskAffinity);
pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags)
+ + " privateFlags=0x" + Integer.toHexString(privateFlags)
+ " theme=0x" + Integer.toHexString(theme));
pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp
+ " compatibleWidthLimitDp=" + compatibleWidthLimitDp
@@ -680,6 +709,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
className = orig.className;
theme = orig.theme;
flags = orig.flags;
+ privateFlags = orig.privateFlags;
requiresSmallestWidthDp = orig.requiresSmallestWidthDp;
compatibleWidthLimitDp = orig.compatibleWidthLimitDp;
largestWidthLimitDp = orig.largestWidthLimitDp;
@@ -730,6 +760,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
dest.writeString(className);
dest.writeInt(theme);
dest.writeInt(flags);
+ dest.writeInt(privateFlags);
dest.writeInt(requiresSmallestWidthDp);
dest.writeInt(compatibleWidthLimitDp);
dest.writeInt(largestWidthLimitDp);
@@ -779,6 +810,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
className = source.readString();
theme = source.readInt();
flags = source.readInt();
+ privateFlags = source.readInt();
requiresSmallestWidthDp = source.readInt();
compatibleWidthLimitDp = source.readInt();
largestWidthLimitDp = source.readInt();
@@ -866,6 +898,27 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
/**
* @hide
*/
+ public boolean isForwardLocked() {
+ return (privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0;
+ }
+
+ /**
+ * @hide
+ */
+ public boolean isSystemApp() {
+ return (flags & ApplicationInfo.FLAG_SYSTEM) != 0;
+ }
+
+ /**
+ * @hide
+ */
+ public boolean isUpdatedSystemApp() {
+ return (flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
+ }
+
+ /**
+ * @hide
+ */
@Override protected ApplicationInfo getApplicationInfo() {
return this;
}
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 0dc86ad..b518498 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -111,6 +111,8 @@ interface IPackageManager {
int getFlagsForUid(int uid);
+ int getPrivateFlagsForUid(int uid);
+
boolean isUidPrivileged(int uid);
String[] getAppOpPermissionPackages(String permissionName);
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index d7d9e8b..53aa6ff 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -268,6 +268,7 @@ public class PackageParser {
public final boolean coreApp;
public final boolean multiArch;
+ public final boolean extractNativeLibs;
public PackageLite(String codePath, ApkLite baseApk, String[] splitNames,
String[] splitCodePaths, int[] splitRevisionCodes) {
@@ -283,6 +284,7 @@ public class PackageParser {
this.splitRevisionCodes = splitRevisionCodes;
this.coreApp = baseApk.coreApp;
this.multiArch = baseApk.multiArch;
+ this.extractNativeLibs = baseApk.extractNativeLibs;
}
public List<String> getAllCodePaths() {
@@ -309,10 +311,12 @@ public class PackageParser {
public final Signature[] signatures;
public final boolean coreApp;
public final boolean multiArch;
+ public final boolean extractNativeLibs;
public ApkLite(String codePath, String packageName, String splitName, int versionCode,
int revisionCode, int installLocation, List<VerifierInfo> verifiers,
- Signature[] signatures, boolean coreApp, boolean multiArch) {
+ Signature[] signatures, boolean coreApp, boolean multiArch,
+ boolean extractNativeLibs) {
this.codePath = codePath;
this.packageName = packageName;
this.splitName = splitName;
@@ -323,6 +327,7 @@ public class PackageParser {
this.signatures = signatures;
this.coreApp = coreApp;
this.multiArch = multiArch;
+ this.extractNativeLibs = extractNativeLibs;
}
}
@@ -799,6 +804,7 @@ public class PackageParser {
pkg.splitCodePaths = lite.splitCodePaths;
pkg.splitRevisionCodes = lite.splitRevisionCodes;
pkg.splitFlags = new int[num];
+ pkg.splitPrivateFlags = new int[num];
for (int i = 0; i < num; i++) {
parseSplitApk(pkg, i, assets, flags);
@@ -1268,6 +1274,7 @@ public class PackageParser {
int revisionCode = 0;
boolean coreApp = false;
boolean multiArch = false;
+ boolean extractNativeLibs = true;
for (int i = 0; i < attrs.getAttributeCount(); i++) {
final String attr = attrs.getAttributeName(i);
@@ -1306,14 +1313,17 @@ public class PackageParser {
final String attr = attrs.getAttributeName(i);
if ("multiArch".equals(attr)) {
multiArch = attrs.getAttributeBooleanValue(i, false);
- break;
+ }
+ if ("extractNativeLibs".equals(attr)) {
+ extractNativeLibs = attrs.getAttributeBooleanValue(i, true);
}
}
}
}
return new ApkLite(codePath, packageSplit.first, packageSplit.second, versionCode,
- revisionCode, installLocation, verifiers, signatures, coreApp, multiArch);
+ revisionCode, installLocation, verifiers, signatures, coreApp, multiArch,
+ extractNativeLibs);
}
/**
@@ -1404,7 +1414,7 @@ public class PackageParser {
/* Set the global "forward lock" flag */
if ((flags & PARSE_FORWARD_LOCK) != 0) {
- pkg.applicationInfo.flags |= ApplicationInfo.FLAG_FORWARD_LOCK;
+ pkg.applicationInfo.privateFlags |= ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK;
}
/* Set the global "on SD card" flag */
@@ -2549,6 +2559,12 @@ public class PackageParser {
}
if (sa.getBoolean(
+ com.android.internal.R.styleable.AndroidManifestApplication_usesCleartextTraffic,
+ true)) {
+ ai.flags |= ApplicationInfo.FLAG_USES_CLEARTEXT_TRAFFIC;
+ }
+
+ if (sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestApplication_supportsRtl,
false /* default is no RTL support*/)) {
ai.flags |= ApplicationInfo.FLAG_SUPPORTS_RTL;
@@ -2560,6 +2576,12 @@ public class PackageParser {
ai.flags |= ApplicationInfo.FLAG_MULTIARCH;
}
+ if (sa.getBoolean(
+ com.android.internal.R.styleable.AndroidManifestApplication_extractNativeLibs,
+ true)) {
+ ai.flags |= ApplicationInfo.FLAG_EXTRACT_NATIVE_LIBS;
+ }
+
String str;
str = sa.getNonConfigurationString(
com.android.internal.R.styleable.AndroidManifestApplication_permission, 0);
@@ -2607,7 +2629,7 @@ public class PackageParser {
if (sa.getBoolean(
com.android.internal.R.styleable.AndroidManifestApplication_cantSaveState,
false)) {
- ai.flags |= ApplicationInfo.FLAG_CANT_SAVE_STATE;
+ ai.privateFlags |= ApplicationInfo.PRIVATE_FLAG_CANT_SAVE_STATE;
// A heavy-weight application can not be in a custom process.
// We can do direct compare because we intern all strings.
@@ -3162,7 +3184,8 @@ public class PackageParser {
sa.recycle();
- if (receiver && (owner.applicationInfo.flags&ApplicationInfo.FLAG_CANT_SAVE_STATE) != 0) {
+ if (receiver && (owner.applicationInfo.privateFlags
+ &ApplicationInfo.PRIVATE_FLAG_CANT_SAVE_STATE) != 0) {
// A heavy-weight application can not have receives in its main process
// We can do direct compare because we intern all strings.
if (a.info.processName == owner.packageName) {
@@ -3515,7 +3538,8 @@ public class PackageParser {
sa.recycle();
- if ((owner.applicationInfo.flags&ApplicationInfo.FLAG_CANT_SAVE_STATE) != 0) {
+ if ((owner.applicationInfo.privateFlags&ApplicationInfo.PRIVATE_FLAG_CANT_SAVE_STATE)
+ != 0) {
// A heavy-weight application can not have providers in its main process
// We can do direct compare because we intern all strings.
if (p.info.processName == owner.packageName) {
@@ -3794,7 +3818,8 @@ public class PackageParser {
sa.recycle();
- if ((owner.applicationInfo.flags&ApplicationInfo.FLAG_CANT_SAVE_STATE) != 0) {
+ if ((owner.applicationInfo.privateFlags&ApplicationInfo.PRIVATE_FLAG_CANT_SAVE_STATE)
+ != 0) {
// A heavy-weight application can not have services in its main process
// We can do direct compare because we intern all strings.
if (s.info.processName == owner.packageName) {
@@ -4212,6 +4237,13 @@ public class PackageParser {
/** Flags of any split APKs; ordered by parsed splitName */
public int[] splitFlags;
+ /**
+ * Private flags of any split APKs; ordered by parsed splitName.
+ *
+ * {@hide}
+ */
+ public int[] splitPrivateFlags;
+
public boolean baseHardwareAccelerated;
// For now we only support one application per package.
@@ -4420,6 +4452,27 @@ public class PackageParser {
return false;
}
+ /**
+ * @hide
+ */
+ public boolean isForwardLocked() {
+ return applicationInfo.isForwardLocked();
+ }
+
+ /**
+ * @hide
+ */
+ public boolean isSystemApp() {
+ return applicationInfo.isSystemApp();
+ }
+
+ /**
+ * @hide
+ */
+ public boolean isUpdatedSystemApp() {
+ return applicationInfo.isUpdatedSystemApp();
+ }
+
public String toString() {
return "Package{"
+ Integer.toHexString(System.identityHashCode(this))
@@ -4647,9 +4700,9 @@ public class PackageParser {
ai.flags &= ~ApplicationInfo.FLAG_INSTALLED;
}
if (state.hidden) {
- ai.flags |= ApplicationInfo.FLAG_HIDDEN;
+ ai.privateFlags |= ApplicationInfo.PRIVATE_FLAG_HIDDEN;
} else {
- ai.flags &= ~ApplicationInfo.FLAG_HIDDEN;
+ ai.privateFlags &= ~ApplicationInfo.PRIVATE_FLAG_HIDDEN;
}
if (state.enabled == PackageManager.COMPONENT_ENABLED_STATE_ENABLED) {
ai.enabled = true;
diff --git a/core/java/android/content/res/AssetManager.java b/core/java/android/content/res/AssetManager.java
index ecae52c..a176593 100644
--- a/core/java/android/content/res/AssetManager.java
+++ b/core/java/android/content/res/AssetManager.java
@@ -627,7 +627,21 @@ public final class AssetManager implements AutoCloseable {
*
* {@hide}
*/
- public native final int addOverlayPath(String idmapPath);
+
+ public final int addOverlayPath(String idmapPath) {
+ synchronized (this) {
+ int res = addOverlayPathNative(idmapPath);
+ makeStringBlocks(mStringBlocks);
+ return res;
+ }
+ }
+
+ /**
+ * See addOverlayPath.
+ *
+ * {@hide}
+ */
+ public native final int addOverlayPathNative(String idmapPath);
/**
* Add multiple sets of assets to the asset manager at once. See
diff --git a/core/java/android/content/res/StringBlock.java b/core/java/android/content/res/StringBlock.java
index 77b8a33..9652db7 100644
--- a/core/java/android/content/res/StringBlock.java
+++ b/core/java/android/content/res/StringBlock.java
@@ -311,13 +311,13 @@ final class StringBlock {
* the color black is returned instead.
*
* @param color The color as a string. Can be a resource reference,
- * HTML hexadecimal, octal or a name
+ * hexadecimal, octal or a name
* @param foreground True if the color will be used as the foreground color,
* false otherwise
*
* @return A CharacterStyle
*
- * @see Color#getHtmlColor(String)
+ * @see Color#parseColor(String)
*/
private static CharacterStyle getColor(String color, boolean foreground) {
int c = 0xff000000;
@@ -336,7 +336,11 @@ final class StringBlock {
}
}
} else {
- c = Color.getHtmlColor(color);
+ try {
+ c = Color.parseColor(color);
+ } catch (IllegalArgumentException e) {
+ c = Color.BLACK;
+ }
}
}
diff --git a/core/java/android/database/sqlite/SQLiteConnection.java b/core/java/android/database/sqlite/SQLiteConnection.java
index 24a7d33..3cda39a 100644
--- a/core/java/android/database/sqlite/SQLiteConnection.java
+++ b/core/java/android/database/sqlite/SQLiteConnection.java
@@ -91,8 +91,6 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
private static final String[] EMPTY_STRING_ARRAY = new String[0];
private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
- private static final Pattern TRIM_SQL_PATTERN = Pattern.compile("[\\s]*\\n+[\\s]*");
-
private final CloseGuard mCloseGuard = CloseGuard.get();
private final SQLiteConnectionPool mPool;
@@ -1203,7 +1201,11 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
}
private static String trimSqlForDisplay(String sql) {
- return TRIM_SQL_PATTERN.matcher(sql).replaceAll(" ");
+ // Note: Creating and caching a regular expression is expensive at preload-time
+ // and stops compile-time initialization. This pattern is only used when
+ // dumping the connection, which is a rare (mainly error) case. So:
+ // DO NOT CACHE.
+ return sql.replaceAll("[\\s]*\\n+[\\s]*", " ");
}
/**
@@ -1437,9 +1439,6 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
}
private static final class Operation {
- private static final SimpleDateFormat sDateFormat =
- new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
-
public long mStartTime;
public long mEndTime;
public String mKind;
@@ -1494,7 +1493,11 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen
}
private String getFormattedStartTime() {
- return sDateFormat.format(new Date(mStartTime));
+ // Note: SimpleDateFormat is not thread-safe, cannot be compile-time created, and is
+ // relatively expensive to create during preloading. This method is only used
+ // when dumping a connection, which is a rare (mainly error) case. So:
+ // DO NOT CACHE.
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date(mStartTime));
}
}
}
diff --git a/core/java/android/gesture/GestureOverlayView.java b/core/java/android/gesture/GestureOverlayView.java
index 6e3a00f..e1a2a25 100644
--- a/core/java/android/gesture/GestureOverlayView.java
+++ b/core/java/android/gesture/GestureOverlayView.java
@@ -640,7 +640,7 @@ public class GestureOverlayView extends FrameLayout {
mStrokeBuffer.add(new GesturePoint(x, y, event.getEventTime()));
if (mHandleGestureActions && !mIsGesturing) {
- mTotalLength += (float) Math.sqrt(dx * dx + dy * dy);
+ mTotalLength += (float) Math.hypot(dx, dy);
if (mTotalLength > mGestureStrokeLengthThreshold) {
final OrientedBoundingBox box =
diff --git a/core/java/android/gesture/GestureStroke.java b/core/java/android/gesture/GestureStroke.java
index 1d0f0fe..4a324f9 100644
--- a/core/java/android/gesture/GestureStroke.java
+++ b/core/java/android/gesture/GestureStroke.java
@@ -69,8 +69,7 @@ public class GestureStroke {
bx.bottom = p.y;
len = 0;
} else {
- len += Math.sqrt(Math.pow(p.x - tmpPoints[(i - 1) * 2], 2)
- + Math.pow(p.y - tmpPoints[(i -1 ) * 2 + 1], 2));
+ len += Math.hypot(p.x - tmpPoints[(i - 1) * 2], p.y - tmpPoints[(i -1) * 2 + 1]);
bx.union(p.x, p.y);
}
index++;
diff --git a/core/java/android/gesture/GestureUtils.java b/core/java/android/gesture/GestureUtils.java
index dd221fc..416279e 100644
--- a/core/java/android/gesture/GestureUtils.java
+++ b/core/java/android/gesture/GestureUtils.java
@@ -293,7 +293,7 @@ public final class GestureUtils {
}
float deltaX = currentPointX - lstPointX;
float deltaY = currentPointY - lstPointY;
- float distance = (float) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
+ float distance = (float) Math.hypot(deltaX, deltaY);
if (distanceSoFar + distance >= increment) {
float ratio = (increment - distanceSoFar) / distance;
float nx = lstPointX + ratio * deltaX;
@@ -379,7 +379,7 @@ public final class GestureUtils {
for (int i = 0; i < count; i += 2) {
float dx = points[i + 2] - points[i];
float dy = points[i + 3] - points[i + 1];
- sum += Math.sqrt(dx * dx + dy * dy);
+ sum += Math.hypot(dx, dy);
}
return sum;
}
@@ -388,13 +388,13 @@ public final class GestureUtils {
float totalLen = computeTotalLength(points);
float dx = points[2] - points[0];
float dy = points[3] - points[1];
- return (float) Math.sqrt(dx * dx + dy * dy) / totalLen;
+ return (float) Math.hypot(dx, dy) / totalLen;
}
static float computeStraightness(float[] points, float totalLen) {
float dx = points[2] - points[0];
float dy = points[3] - points[1];
- return (float) Math.sqrt(dx * dx + dy * dy) / totalLen;
+ return (float) Math.hypot(dx, dy) / totalLen;
}
/**
diff --git a/core/java/android/hardware/GeomagneticField.java b/core/java/android/hardware/GeomagneticField.java
index ef05732..eb26ee5 100644
--- a/core/java/android/hardware/GeomagneticField.java
+++ b/core/java/android/hardware/GeomagneticField.java
@@ -281,7 +281,7 @@ public class GeomagneticField {
* @return Horizontal component of the field strength in nonoteslas.
*/
public float getHorizontalStrength() {
- return (float) Math.sqrt(mX * mX + mY * mY);
+ return (float) Math.hypot(mX, mY);
}
/**
diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java
index 482b1f0..bec9489 100644
--- a/core/java/android/hardware/camera2/CameraDevice.java
+++ b/core/java/android/hardware/camera2/CameraDevice.java
@@ -183,7 +183,7 @@ public abstract class CameraDevice implements AutoCloseable {
* Then obtain the Surface with
* {@link android.renderscript.Allocation#getSurface}.</li>
*
- * <li>For access to raw, uncompressed JPEG data in the application: Create an
+ * <li>For access to RAW, uncompressed YUV, or compressed JPEG data in the application: Create an
* {@link android.media.ImageReader} object with one of the supported output formats given by
* {@link StreamConfigurationMap#getOutputFormats()}, setting its size to one of the
* corresponding supported sizes by passing the chosen output format into
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index b6bb33b..a25b94a 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -774,10 +774,10 @@ public final class CameraManager {
if (DEBUG) {
Log.v(TAG,
String.format(
- "Device status was previously available (%d), " +
- " and is now again available (%d)" +
+ "Device status was previously available (%b), " +
+ " and is now again available (%b)" +
"so no new client visible update will be sent",
- isAvailable(status), isAvailable(status)));
+ isAvailable(oldStatus), isAvailable(status)));
}
return;
}
diff --git a/core/java/android/hardware/camera2/DngCreator.java b/core/java/android/hardware/camera2/DngCreator.java
index 33d539c..f16d650 100644
--- a/core/java/android/hardware/camera2/DngCreator.java
+++ b/core/java/android/hardware/camera2/DngCreator.java
@@ -453,7 +453,7 @@ public final class DngCreator implements AutoCloseable {
height + ") passed to write");
}
long capacity = pixels.capacity();
- long totalSize = rowStride * height + offset;
+ long totalSize = ((long) rowStride) * height + offset;
if (capacity < totalSize) {
throw new IllegalArgumentException("Image size " + capacity +
" is too small (must be larger than " + totalSize + ")");
diff --git a/core/java/android/hardware/location/GeofenceHardwareImpl.java b/core/java/android/hardware/location/GeofenceHardwareImpl.java
index 6e5d064..4696b2a 100644
--- a/core/java/android/hardware/location/GeofenceHardwareImpl.java
+++ b/core/java/android/hardware/location/GeofenceHardwareImpl.java
@@ -436,7 +436,7 @@ public final class GeofenceHardwareImpl {
int monitoringType,
int sourcesUsed) {
if(location == null) {
- Log.e(TAG, String.format("Invalid Geofence Transition: location=%p", location));
+ Log.e(TAG, String.format("Invalid Geofence Transition: location=null"));
return;
}
if(DEBUG) {
diff --git a/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java b/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java
index 518a874..cc018e9 100644
--- a/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java
+++ b/core/java/android/hardware/soundtrigger/KeyphraseEnrollmentInfo.java
@@ -104,7 +104,7 @@ public class KeyphraseEnrollmentInfo {
try {
ai = pm.getApplicationInfo(
ri.activityInfo.packageName, PackageManager.GET_META_DATA);
- if ((ai.flags & ApplicationInfo.FLAG_PRIVILEGED) == 0) {
+ if ((ai.privateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) == 0) {
// The application isn't privileged (/system/priv-app).
// The enrollment application needs to be a privileged system app.
Slog.w(TAG, ai.packageName + "is not a privileged system app");
diff --git a/core/java/android/inputmethodservice/ExtractEditLayout.java b/core/java/android/inputmethodservice/ExtractEditLayout.java
index 5696839..e902443 100644
--- a/core/java/android/inputmethodservice/ExtractEditLayout.java
+++ b/core/java/android/inputmethodservice/ExtractEditLayout.java
@@ -163,6 +163,8 @@ public class ExtractEditLayout extends LinearLayout {
mCallback.onDestroyActionMode(this);
mCallback = null;
+ mMenu.close();
+
mExtractActionButton.setVisibility(VISIBLE);
mEditButton.setVisibility(INVISIBLE);
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 2eb42a7..f218b65 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -708,6 +708,7 @@ public class InputMethodService extends AbstractInputMethodService {
mRootView.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
mWindow.setContentView(mRootView);
+ mRootView.getViewTreeObserver().removeOnComputeInternalInsetsListener(mInsetsComputer);
mRootView.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsComputer);
if (Settings.Global.getInt(getContentResolver(),
Settings.Global.FANCY_IME_ANIMATIONS, 0) != 0) {
diff --git a/core/java/android/net/BaseNetworkStateTracker.java b/core/java/android/net/BaseNetworkStateTracker.java
deleted file mode 100644
index e4e5b1e..0000000
--- a/core/java/android/net/BaseNetworkStateTracker.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * 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 android.net;
-
-import android.content.Context;
-import android.os.Handler;
-import android.os.Messenger;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import com.android.internal.util.Preconditions;
-
-/**
- * Interface to control and observe state of a specific network, hiding
- * network-specific details from {@link ConnectivityManager}. Surfaces events
- * through the registered {@link Handler} to enable {@link ConnectivityManager}
- * to respond to state changes over time.
- *
- * @hide
- */
-public abstract class BaseNetworkStateTracker implements NetworkStateTracker {
- // TODO: better document threading expectations
- // TODO: migrate to make NetworkStateTracker abstract class
-
- public static final String PROP_TCP_BUFFER_UNKNOWN = "net.tcp.buffersize.unknown";
- public static final String PROP_TCP_BUFFER_WIFI = "net.tcp.buffersize.wifi";
-
- protected Context mContext;
- private Handler mTarget;
-
- protected NetworkInfo mNetworkInfo;
- protected LinkProperties mLinkProperties;
- protected NetworkCapabilities mNetworkCapabilities;
- protected Network mNetwork = new Network(ConnectivityManager.NETID_UNSET);
-
- private AtomicBoolean mTeardownRequested = new AtomicBoolean(false);
- private AtomicBoolean mPrivateDnsRouteSet = new AtomicBoolean(false);
- private AtomicBoolean mDefaultRouteSet = new AtomicBoolean(false);
-
- public BaseNetworkStateTracker(int networkType) {
- mNetworkInfo = new NetworkInfo(
- networkType, -1, ConnectivityManager.getNetworkTypeName(networkType), null);
- mLinkProperties = new LinkProperties();
- mNetworkCapabilities = new NetworkCapabilities();
- }
-
- protected BaseNetworkStateTracker() {
- // By default, let the sub classes construct everything
- }
-
- @Deprecated
- protected Handler getTargetHandler() {
- return mTarget;
- }
-
- protected final void dispatchStateChanged() {
- // TODO: include snapshot of other fields when sending
- mTarget.obtainMessage(EVENT_STATE_CHANGED, getNetworkInfo()).sendToTarget();
- }
-
- protected final void dispatchConfigurationChanged() {
- // TODO: include snapshot of other fields when sending
- mTarget.obtainMessage(EVENT_CONFIGURATION_CHANGED, getNetworkInfo()).sendToTarget();
- }
-
- @Override
- public void startMonitoring(Context context, Handler target) {
- mContext = Preconditions.checkNotNull(context);
- mTarget = Preconditions.checkNotNull(target);
- startMonitoringInternal();
- }
-
- protected void startMonitoringInternal() {
-
- }
-
- @Override
- public NetworkInfo getNetworkInfo() {
- return new NetworkInfo(mNetworkInfo);
- }
-
- @Override
- public LinkProperties getLinkProperties() {
- return new LinkProperties(mLinkProperties);
- }
-
- @Override
- public NetworkCapabilities getNetworkCapabilities() {
- return new NetworkCapabilities(mNetworkCapabilities);
- }
-
- @Override
- public LinkQualityInfo getLinkQualityInfo() {
- return null;
- }
-
- @Override
- public void captivePortalCheckCompleted(boolean isCaptivePortal) {
- // not implemented
- }
-
- @Override
- public boolean setRadio(boolean turnOn) {
- // Base tracker doesn't handle radios
- return true;
- }
-
- @Override
- public boolean isAvailable() {
- return mNetworkInfo.isAvailable();
- }
-
- @Override
- public void setUserDataEnable(boolean enabled) {
- // Base tracker doesn't handle enabled flags
- }
-
- @Override
- public void setPolicyDataEnable(boolean enabled) {
- // Base tracker doesn't handle enabled flags
- }
-
- @Override
- public boolean isPrivateDnsRouteSet() {
- return mPrivateDnsRouteSet.get();
- }
-
- @Override
- public void privateDnsRouteSet(boolean enabled) {
- mPrivateDnsRouteSet.set(enabled);
- }
-
- @Override
- public boolean isDefaultRouteSet() {
- return mDefaultRouteSet.get();
- }
-
- @Override
- public void defaultRouteSet(boolean enabled) {
- mDefaultRouteSet.set(enabled);
- }
-
- @Override
- public boolean isTeardownRequested() {
- return mTeardownRequested.get();
- }
-
- @Override
- public void setTeardownRequested(boolean isRequested) {
- mTeardownRequested.set(isRequested);
- }
-
- @Override
- public void setDependencyMet(boolean met) {
- // Base tracker doesn't handle dependencies
- }
-
- @Override
- public void supplyMessenger(Messenger messenger) {
- // not supported on this network
- }
-
- @Override
- public String getNetworkInterfaceName() {
- if (mLinkProperties != null) {
- return mLinkProperties.getInterfaceName();
- } else {
- return null;
- }
- }
-
- @Override
- public void startSampling(SamplingDataTracker.SamplingSnapshot s) {
- // nothing to do
- }
-
- @Override
- public void stopSampling(SamplingDataTracker.SamplingSnapshot s) {
- // nothing to do
- }
-
- @Override
- public void setNetId(int netId) {
- mNetwork = new Network(netId);
- }
-
- @Override
- public Network getNetwork() {
- return mNetwork;
- }
-}
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index eb2df0b..0832d81 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -1793,25 +1793,6 @@ public class ConnectivityManager {
}
/**
- * Sets a secondary requirement bit for the given networkType.
- * This requirement bit is generally under the control of the carrier
- * or its agents and is not directly controlled by the user.
- *
- * @param networkType The network who's dependence has changed
- * @param met Boolean - true if network use is OK, false if not
- *
- * <p>This method requires the call to hold the permission
- * {@link android.Manifest.permission#CONNECTIVITY_INTERNAL}.
- * {@hide}
- */
- public void setDataDependency(int networkType, boolean met) {
- try {
- mService.setDataDependency(networkType, met);
- } catch (RemoteException e) {
- }
- }
-
- /**
* Returns true if the hardware supports the given network type
* else it returns false. This doesn't indicate we have coverage
* or are authorized onto a network, just whether or not the
@@ -1892,20 +1873,6 @@ public class ConnectivityManager {
}
/**
- * Supply the backend messenger for a network tracker
- *
- * @param networkType NetworkType to set
- * @param messenger {@link Messenger}
- * {@hide}
- */
- public void supplyMessenger(int networkType, Messenger messenger) {
- try {
- mService.supplyMessenger(networkType, messenger);
- } catch (RemoteException e) {
- }
- }
-
- /**
* Check mobile provisioning.
*
* @param suggestedTimeOutMs, timeout in milliseconds
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index 46af112..d8852f8 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -102,8 +102,6 @@ interface IConnectivityManager
ProxyInfo getDefaultProxy();
- void setDataDependency(int networkType, boolean met);
-
boolean prepareVpn(String oldPackage, String newPackage);
void setVpnPackageAuthorization(boolean authorized);
@@ -120,8 +118,6 @@ interface IConnectivityManager
void captivePortalCheckCompleted(in NetworkInfo info, boolean isCaptivePortal);
- void supplyMessenger(int networkType, in Messenger messenger);
-
int findConnectionTypeForIface(in String iface);
int checkMobileProvisioning(int suggestedTimeOutMs);
diff --git a/core/java/android/net/IpPrefix.java b/core/java/android/net/IpPrefix.java
index b268986..6b4f2d5 100644
--- a/core/java/android/net/IpPrefix.java
+++ b/core/java/android/net/IpPrefix.java
@@ -170,6 +170,21 @@ public final class IpPrefix implements Parcelable {
}
/**
+ * Determines whether the prefix contains the specified address.
+ *
+ * @param address An {@link InetAddress} to test.
+ * @return {@code true} if the prefix covers the given address.
+ */
+ public boolean contains(InetAddress address) {
+ byte[] addrBytes = (address == null) ? null : address.getAddress();
+ if (addrBytes == null || addrBytes.length != this.address.length) {
+ return false;
+ }
+ NetworkUtils.maskRawAddress(addrBytes, prefixLength);
+ return Arrays.equals(this.address, addrBytes);
+ }
+
+ /**
* Returns a string representation of this {@code IpPrefix}.
*
* @return a string such as {@code "192.0.2.0/24"} or {@code "2001:db8:1:2::/64"}.
diff --git a/core/java/android/net/LocalSocket.java b/core/java/android/net/LocalSocket.java
index 31bc20b..a374a86 100644
--- a/core/java/android/net/LocalSocket.java
+++ b/core/java/android/net/LocalSocket.java
@@ -29,7 +29,7 @@ import java.net.SocketOptions;
*/
public class LocalSocket implements Closeable {
- private LocalSocketImpl impl;
+ private final LocalSocketImpl impl;
private volatile boolean implCreated;
private LocalSocketAddress localAddress;
private boolean isBound;
diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java
deleted file mode 100644
index 40b7e06..0000000
--- a/core/java/android/net/MobileDataStateTracker.java
+++ /dev/null
@@ -1,909 +0,0 @@
-/*
- * Copyright (C) 2008 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 android.net;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.net.NetworkInfo.DetailedState;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.os.Messenger;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.telephony.PhoneStateListener;
-import android.telephony.SignalStrength;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-import android.util.Slog;
-
-import com.android.internal.telephony.DctConstants;
-import com.android.internal.telephony.ITelephony;
-import com.android.internal.telephony.PhoneConstants;
-import com.android.internal.telephony.TelephonyIntents;
-import com.android.internal.util.AsyncChannel;
-
-import java.io.CharArrayWriter;
-import java.io.PrintWriter;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-/**
- * Track the state of mobile data connectivity. This is done by
- * receiving broadcast intents from the Phone process whenever
- * the state of data connectivity changes.
- *
- * {@hide}
- */
-public class MobileDataStateTracker extends BaseNetworkStateTracker {
-
- private static final String TAG = "MobileDataStateTracker";
- private static final boolean DBG = false;
- private static final boolean VDBG = false;
-
- private PhoneConstants.DataState mMobileDataState;
- private ITelephony mPhoneService;
-
- private String mApnType;
- private NetworkInfo mNetworkInfo;
- private boolean mTeardownRequested = false;
- private Handler mTarget;
- private Context mContext;
- private LinkProperties mLinkProperties;
- private boolean mPrivateDnsRouteSet = false;
- private boolean mDefaultRouteSet = false;
-
- // NOTE: these are only kept for debugging output; actual values are
- // maintained in DataConnectionTracker.
- protected boolean mUserDataEnabled = true;
- protected boolean mPolicyDataEnabled = true;
-
- private Handler mHandler;
- private AsyncChannel mDataConnectionTrackerAc;
-
- private AtomicBoolean mIsCaptivePortal = new AtomicBoolean(false);
-
- private SignalStrength mSignalStrength;
-
- private SamplingDataTracker mSamplingDataTracker = new SamplingDataTracker();
-
- private static final int UNKNOWN = LinkQualityInfo.UNKNOWN_INT;
-
- /**
- * Create a new MobileDataStateTracker
- * @param netType the ConnectivityManager network type
- * @param tag the name of this network
- */
- public MobileDataStateTracker(int netType, String tag) {
- mNetworkInfo = new NetworkInfo(netType,
- TelephonyManager.getDefault().getNetworkType(), tag,
- TelephonyManager.getDefault().getNetworkTypeName());
- mApnType = networkTypeToApnType(netType);
- }
-
- /**
- * Begin monitoring data connectivity.
- *
- * @param context is the current Android context
- * @param target is the Hander to which to return the events.
- */
- public void startMonitoring(Context context, Handler target) {
- mTarget = target;
- mContext = context;
-
- mHandler = new MdstHandler(target.getLooper(), this);
-
- IntentFilter filter = new IntentFilter();
- filter.addAction(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED);
- filter.addAction(TelephonyIntents.ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN);
- filter.addAction(TelephonyIntents.ACTION_DATA_CONNECTION_FAILED);
-
- mContext.registerReceiver(new MobileDataStateReceiver(), filter);
- mMobileDataState = PhoneConstants.DataState.DISCONNECTED;
-
- TelephonyManager tm = (TelephonyManager)mContext.getSystemService(
- Context.TELEPHONY_SERVICE);
- tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS);
- }
-
- private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
- @Override
- public void onSignalStrengthsChanged(SignalStrength signalStrength) {
- mSignalStrength = signalStrength;
- }
- };
-
- static class MdstHandler extends Handler {
- private MobileDataStateTracker mMdst;
-
- MdstHandler(Looper looper, MobileDataStateTracker mdst) {
- super(looper);
- mMdst = mdst;
- }
-
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case AsyncChannel.CMD_CHANNEL_HALF_CONNECTED:
- if (msg.arg1 == AsyncChannel.STATUS_SUCCESSFUL) {
- if (VDBG) {
- mMdst.log("MdstHandler connected");
- }
- mMdst.mDataConnectionTrackerAc = (AsyncChannel) msg.obj;
- } else {
- if (VDBG) {
- mMdst.log("MdstHandler %s NOT connected error=" + msg.arg1);
- }
- }
- break;
- case AsyncChannel.CMD_CHANNEL_DISCONNECTED:
- if (VDBG) mMdst.log("Disconnected from DataStateTracker");
- mMdst.mDataConnectionTrackerAc = null;
- break;
- default: {
- if (VDBG) mMdst.log("Ignorning unknown message=" + msg);
- break;
- }
- }
- }
- }
-
- public boolean isPrivateDnsRouteSet() {
- return mPrivateDnsRouteSet;
- }
-
- public void privateDnsRouteSet(boolean enabled) {
- mPrivateDnsRouteSet = enabled;
- }
-
- public NetworkInfo getNetworkInfo() {
- return mNetworkInfo;
- }
-
- public boolean isDefaultRouteSet() {
- return mDefaultRouteSet;
- }
-
- public void defaultRouteSet(boolean enabled) {
- mDefaultRouteSet = enabled;
- }
-
- /**
- * This is not implemented.
- */
- public void releaseWakeLock() {
- }
-
- private void updateLinkProperitesAndCapatilities(Intent intent) {
- mLinkProperties = intent.getParcelableExtra(
- PhoneConstants.DATA_LINK_PROPERTIES_KEY);
- if (mLinkProperties == null) {
- loge("CONNECTED event did not supply link properties.");
- mLinkProperties = new LinkProperties();
- }
- mLinkProperties.setMtu(mContext.getResources().getInteger(
- com.android.internal.R.integer.config_mobile_mtu));
- mNetworkCapabilities = intent.getParcelableExtra(
- PhoneConstants.DATA_NETWORK_CAPABILITIES_KEY);
- if (mNetworkCapabilities == null) {
- loge("CONNECTED event did not supply network capabilities.");
- mNetworkCapabilities = new NetworkCapabilities();
- }
- }
-
- private class MobileDataStateReceiver extends BroadcastReceiver {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (intent.getAction().equals(TelephonyIntents.
- ACTION_DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN)) {
- String apnName = intent.getStringExtra(PhoneConstants.DATA_APN_KEY);
- String apnType = intent.getStringExtra(PhoneConstants.DATA_APN_TYPE_KEY);
- if (!TextUtils.equals(mApnType, apnType)) {
- return;
- }
- if (DBG) {
- log("Broadcast received: " + intent.getAction() + " apnType=" + apnType
- + " apnName=" + apnName);
- }
-
- // Make us in the connecting state until we make a new TYPE_MOBILE_PROVISIONING
- mMobileDataState = PhoneConstants.DataState.CONNECTING;
- updateLinkProperitesAndCapatilities(intent);
- mNetworkInfo.setIsConnectedToProvisioningNetwork(true);
-
- // Change state to SUSPENDED so setDetailedState
- // sends EVENT_STATE_CHANGED to connectivityService
- setDetailedState(DetailedState.SUSPENDED, "", apnName);
- } else if (intent.getAction().equals(TelephonyIntents.
- ACTION_ANY_DATA_CONNECTION_STATE_CHANGED)) {
- String apnType = intent.getStringExtra(PhoneConstants.DATA_APN_TYPE_KEY);
- if (VDBG) {
- log(String.format("Broadcast received: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED"
- + "mApnType=%s %s received apnType=%s", mApnType,
- TextUtils.equals(apnType, mApnType) ? "==" : "!=", apnType));
- }
- if (!TextUtils.equals(apnType, mApnType)) {
- return;
- }
- // Assume this isn't a provisioning network.
- mNetworkInfo.setIsConnectedToProvisioningNetwork(false);
- if (DBG) {
- log("Broadcast received: " + intent.getAction() + " apnType=" + apnType);
- }
-
- int oldSubtype = mNetworkInfo.getSubtype();
- int newSubType = TelephonyManager.getDefault().getNetworkType();
- String subTypeName = TelephonyManager.getDefault().getNetworkTypeName();
- mNetworkInfo.setSubtype(newSubType, subTypeName);
- if (newSubType != oldSubtype && mNetworkInfo.isConnected()) {
- Message msg = mTarget.obtainMessage(EVENT_NETWORK_SUBTYPE_CHANGED,
- oldSubtype, 0, mNetworkInfo);
- msg.sendToTarget();
- }
-
- PhoneConstants.DataState state = Enum.valueOf(PhoneConstants.DataState.class,
- intent.getStringExtra(PhoneConstants.STATE_KEY));
- String reason = intent.getStringExtra(PhoneConstants.STATE_CHANGE_REASON_KEY);
- String apnName = intent.getStringExtra(PhoneConstants.DATA_APN_KEY);
- mNetworkInfo.setRoaming(intent.getBooleanExtra(
- PhoneConstants.DATA_NETWORK_ROAMING_KEY, false));
- if (VDBG) {
- log(mApnType + " setting isAvailable to " +
- intent.getBooleanExtra(PhoneConstants.NETWORK_UNAVAILABLE_KEY,false));
- }
- mNetworkInfo.setIsAvailable(!intent.getBooleanExtra(
- PhoneConstants.NETWORK_UNAVAILABLE_KEY, false));
-
- if (DBG) {
- log("Received state=" + state + ", old=" + mMobileDataState +
- ", reason=" + (reason == null ? "(unspecified)" : reason));
- }
- if (mMobileDataState != state) {
- mMobileDataState = state;
- switch (state) {
- case DISCONNECTED:
- if(isTeardownRequested()) {
- setTeardownRequested(false);
- }
-
- setDetailedState(DetailedState.DISCONNECTED, reason, apnName);
- // can't do this here - ConnectivityService needs it to clear stuff
- // it's ok though - just leave it to be refreshed next time
- // we connect.
- //if (DBG) log("clearing mInterfaceName for "+ mApnType +
- // " as it DISCONNECTED");
- //mInterfaceName = null;
- break;
- case CONNECTING:
- setDetailedState(DetailedState.CONNECTING, reason, apnName);
- break;
- case SUSPENDED:
- setDetailedState(DetailedState.SUSPENDED, reason, apnName);
- break;
- case CONNECTED:
- updateLinkProperitesAndCapatilities(intent);
- setDetailedState(DetailedState.CONNECTED, reason, apnName);
- break;
- }
-
- if (VDBG) {
- Slog.d(TAG, "TelephonyMgr.DataConnectionStateChanged");
- if (mNetworkInfo != null) {
- Slog.d(TAG, "NetworkInfo = " + mNetworkInfo);
- Slog.d(TAG, "subType = " + mNetworkInfo.getSubtype());
- Slog.d(TAG, "subType = " + mNetworkInfo.getSubtypeName());
- }
- if (mLinkProperties != null) {
- Slog.d(TAG, "LinkProperties = " + mLinkProperties);
- } else {
- Slog.d(TAG, "LinkProperties = " );
- }
-
- if (mNetworkCapabilities != null) {
- Slog.d(TAG, mNetworkCapabilities.toString());
- } else {
- Slog.d(TAG, "NetworkCapabilities = " );
- }
- }
-
-
- /* lets not sample traffic data across state changes */
- mSamplingDataTracker.resetSamplingData();
- } else {
- // There was no state change. Check if LinkProperties has been updated.
- if (TextUtils.equals(reason, PhoneConstants.REASON_LINK_PROPERTIES_CHANGED)) {
- mLinkProperties = intent.getParcelableExtra(
- PhoneConstants.DATA_LINK_PROPERTIES_KEY);
- if (mLinkProperties == null) {
- loge("No link property in LINK_PROPERTIES change event.");
- mLinkProperties = new LinkProperties();
- }
- // Just update reason field in this NetworkInfo
- mNetworkInfo.setDetailedState(mNetworkInfo.getDetailedState(), reason,
- mNetworkInfo.getExtraInfo());
- Message msg = mTarget.obtainMessage(EVENT_CONFIGURATION_CHANGED,
- mNetworkInfo);
- msg.sendToTarget();
- }
- }
- } else if (intent.getAction().
- equals(TelephonyIntents.ACTION_DATA_CONNECTION_FAILED)) {
- String apnType = intent.getStringExtra(PhoneConstants.DATA_APN_TYPE_KEY);
- if (!TextUtils.equals(apnType, mApnType)) {
- if (DBG) {
- log(String.format(
- "Broadcast received: ACTION_ANY_DATA_CONNECTION_FAILED ignore, " +
- "mApnType=%s != received apnType=%s", mApnType, apnType));
- }
- return;
- }
- // Assume this isn't a provisioning network.
- mNetworkInfo.setIsConnectedToProvisioningNetwork(false);
- String reason = intent.getStringExtra(PhoneConstants.FAILURE_REASON_KEY);
- String apnName = intent.getStringExtra(PhoneConstants.DATA_APN_KEY);
- if (DBG) {
- log("Broadcast received: " + intent.getAction() +
- " reason=" + reason == null ? "null" : reason);
- }
- setDetailedState(DetailedState.FAILED, reason, apnName);
- } else {
- if (DBG) log("Broadcast received: ignore " + intent.getAction());
- }
- }
- }
-
- private void getPhoneService(boolean forceRefresh) {
- if ((mPhoneService == null) || forceRefresh) {
- mPhoneService = ITelephony.Stub.asInterface(ServiceManager.getService("phone"));
- }
- }
-
- /**
- * Report whether data connectivity is possible.
- */
- public boolean isAvailable() {
- return mNetworkInfo.isAvailable();
- }
-
- /**
- * Return the system properties name associated with the tcp buffer sizes
- * for this network.
- */
- public String getTcpBufferSizesPropName() {
- String networkTypeStr = "unknown";
- TelephonyManager tm = new TelephonyManager(mContext);
- //TODO We have to edit the parameter for getNetworkType regarding CDMA
- switch(tm.getNetworkType()) {
- case TelephonyManager.NETWORK_TYPE_GPRS:
- networkTypeStr = "gprs";
- break;
- case TelephonyManager.NETWORK_TYPE_EDGE:
- networkTypeStr = "edge";
- break;
- case TelephonyManager.NETWORK_TYPE_UMTS:
- networkTypeStr = "umts";
- break;
- case TelephonyManager.NETWORK_TYPE_HSDPA:
- networkTypeStr = "hsdpa";
- break;
- case TelephonyManager.NETWORK_TYPE_HSUPA:
- networkTypeStr = "hsupa";
- break;
- case TelephonyManager.NETWORK_TYPE_HSPA:
- networkTypeStr = "hspa";
- break;
- case TelephonyManager.NETWORK_TYPE_HSPAP:
- networkTypeStr = "hspap";
- break;
- case TelephonyManager.NETWORK_TYPE_CDMA:
- networkTypeStr = "cdma";
- break;
- case TelephonyManager.NETWORK_TYPE_1xRTT:
- networkTypeStr = "1xrtt";
- break;
- case TelephonyManager.NETWORK_TYPE_EVDO_0:
- networkTypeStr = "evdo";
- break;
- case TelephonyManager.NETWORK_TYPE_EVDO_A:
- networkTypeStr = "evdo";
- break;
- case TelephonyManager.NETWORK_TYPE_EVDO_B:
- networkTypeStr = "evdo";
- break;
- case TelephonyManager.NETWORK_TYPE_IDEN:
- networkTypeStr = "iden";
- break;
- case TelephonyManager.NETWORK_TYPE_LTE:
- networkTypeStr = "lte";
- break;
- case TelephonyManager.NETWORK_TYPE_EHRPD:
- networkTypeStr = "ehrpd";
- break;
- default:
- loge("unknown network type: " + tm.getNetworkType());
- }
- return "net.tcp.buffersize." + networkTypeStr;
- }
-
- /**
- * Tear down mobile data connectivity, i.e., disable the ability to create
- * mobile data connections.
- * TODO - make async and return nothing?
- */
- public boolean teardown() {
- setTeardownRequested(true);
- return (setEnableApn(mApnType, false) != PhoneConstants.APN_REQUEST_FAILED);
- }
-
- /**
- * @return true if this is ready to operate
- */
- public boolean isReady() {
- return mDataConnectionTrackerAc != null;
- }
-
- @Override
- public void captivePortalCheckCompleted(boolean isCaptivePortal) {
- if (mIsCaptivePortal.getAndSet(isCaptivePortal) != isCaptivePortal) {
- // Captive portal change enable/disable failing fast
- setEnableFailFastMobileData(
- isCaptivePortal ? DctConstants.ENABLED : DctConstants.DISABLED);
- }
- }
-
- /**
- * Record the detailed state of a network, and if it is a
- * change from the previous state, send a notification to
- * any listeners.
- * @param state the new {@code DetailedState}
- * @param reason a {@code String} indicating a reason for the state change,
- * if one was supplied. May be {@code null}.
- * @param extraInfo optional {@code String} providing extra information about the state change
- */
- private void setDetailedState(NetworkInfo.DetailedState state, String reason,
- String extraInfo) {
- if (DBG) log("setDetailed state, old ="
- + mNetworkInfo.getDetailedState() + " and new state=" + state);
- if (state != mNetworkInfo.getDetailedState()) {
- boolean wasConnecting = (mNetworkInfo.getState() == NetworkInfo.State.CONNECTING);
- String lastReason = mNetworkInfo.getReason();
- /*
- * If a reason was supplied when the CONNECTING state was entered, and no
- * reason was supplied for entering the CONNECTED state, then retain the
- * reason that was supplied when going to CONNECTING.
- */
- if (wasConnecting && state == NetworkInfo.DetailedState.CONNECTED && reason == null
- && lastReason != null)
- reason = lastReason;
- mNetworkInfo.setDetailedState(state, reason, extraInfo);
- Message msg = mTarget.obtainMessage(EVENT_STATE_CHANGED, new NetworkInfo(mNetworkInfo));
- msg.sendToTarget();
- }
- }
-
- public void setTeardownRequested(boolean isRequested) {
- mTeardownRequested = isRequested;
- }
-
- public boolean isTeardownRequested() {
- return mTeardownRequested;
- }
-
- /**
- * Re-enable mobile data connectivity after a {@link #teardown()}.
- * TODO - make async and always get a notification?
- */
- public boolean reconnect() {
- boolean retValue = false; //connected or expect to be?
- setTeardownRequested(false);
- switch (setEnableApn(mApnType, true)) {
- case PhoneConstants.APN_ALREADY_ACTIVE:
- // need to set self to CONNECTING so the below message is handled.
- retValue = true;
- break;
- case PhoneConstants.APN_REQUEST_STARTED:
- // set IDLE here , avoid the following second FAILED not sent out
- mNetworkInfo.setDetailedState(DetailedState.IDLE, null, null);
- retValue = true;
- break;
- case PhoneConstants.APN_REQUEST_FAILED:
- case PhoneConstants.APN_TYPE_NOT_AVAILABLE:
- break;
- default:
- loge("Error in reconnect - unexpected response.");
- break;
- }
- return retValue;
- }
-
- /**
- * Turn on or off the mobile radio. No connectivity will be possible while the
- * radio is off. The operation is a no-op if the radio is already in the desired state.
- * @param turnOn {@code true} if the radio should be turned on, {@code false} if
- */
- public boolean setRadio(boolean turnOn) {
- getPhoneService(false);
- /*
- * If the phone process has crashed in the past, we'll get a
- * RemoteException and need to re-reference the service.
- */
- for (int retry = 0; retry < 2; retry++) {
- if (mPhoneService == null) {
- loge("Ignoring mobile radio request because could not acquire PhoneService");
- break;
- }
-
- try {
- return mPhoneService.setRadio(turnOn);
- } catch (RemoteException e) {
- if (retry == 0) getPhoneService(true);
- }
- }
-
- loge("Could not set radio power to " + (turnOn ? "on" : "off"));
- return false;
- }
-
-
- public void setInternalDataEnable(boolean enabled) {
- if (DBG) log("setInternalDataEnable: E enabled=" + enabled);
- final AsyncChannel channel = mDataConnectionTrackerAc;
- if (channel != null) {
- channel.sendMessage(DctConstants.EVENT_SET_INTERNAL_DATA_ENABLE,
- enabled ? DctConstants.ENABLED : DctConstants.DISABLED);
- }
- if (VDBG) log("setInternalDataEnable: X enabled=" + enabled);
- }
-
- @Override
- public void setUserDataEnable(boolean enabled) {
- if (DBG) log("setUserDataEnable: E enabled=" + enabled);
- final AsyncChannel channel = mDataConnectionTrackerAc;
- if (channel != null) {
- channel.sendMessage(DctConstants.CMD_SET_USER_DATA_ENABLE,
- enabled ? DctConstants.ENABLED : DctConstants.DISABLED);
- mUserDataEnabled = enabled;
- }
- if (VDBG) log("setUserDataEnable: X enabled=" + enabled);
- }
-
- @Override
- public void setPolicyDataEnable(boolean enabled) {
- if (DBG) log("setPolicyDataEnable(enabled=" + enabled + ")");
- final AsyncChannel channel = mDataConnectionTrackerAc;
- if (channel != null) {
- channel.sendMessage(DctConstants.CMD_SET_POLICY_DATA_ENABLE,
- enabled ? DctConstants.ENABLED : DctConstants.DISABLED);
- mPolicyDataEnabled = enabled;
- }
- }
-
- /**
- * Eanble/disable FailFast
- *
- * @param enabled is DctConstants.ENABLED/DISABLED
- */
- public void setEnableFailFastMobileData(int enabled) {
- if (DBG) log("setEnableFailFastMobileData(enabled=" + enabled + ")");
- final AsyncChannel channel = mDataConnectionTrackerAc;
- if (channel != null) {
- channel.sendMessage(DctConstants.CMD_SET_ENABLE_FAIL_FAST_MOBILE_DATA, enabled);
- }
- }
-
- /**
- * carrier dependency is met/unmet
- * @param met
- */
- public void setDependencyMet(boolean met) {
- Bundle bundle = Bundle.forPair(DctConstants.APN_TYPE_KEY, mApnType);
- try {
- if (DBG) log("setDependencyMet: E met=" + met);
- Message msg = Message.obtain();
- msg.what = DctConstants.CMD_SET_DEPENDENCY_MET;
- msg.arg1 = (met ? DctConstants.ENABLED : DctConstants.DISABLED);
- msg.setData(bundle);
- mDataConnectionTrackerAc.sendMessage(msg);
- if (VDBG) log("setDependencyMet: X met=" + met);
- } catch (NullPointerException e) {
- loge("setDependencyMet: X mAc was null" + e);
- }
- }
-
- /**
- * Inform DCT mobile provisioning has started, it ends when provisioning completes.
- */
- public void enableMobileProvisioning(String url) {
- if (DBG) log("enableMobileProvisioning(url=" + url + ")");
- final AsyncChannel channel = mDataConnectionTrackerAc;
- if (channel != null) {
- Message msg = Message.obtain();
- msg.what = DctConstants.CMD_ENABLE_MOBILE_PROVISIONING;
- msg.setData(Bundle.forPair(DctConstants.PROVISIONING_URL_KEY, url));
- channel.sendMessage(msg);
- }
- }
-
- /**
- * Return if this network is the provisioning network. Valid only if connected.
- * @param met
- */
- public boolean isProvisioningNetwork() {
- boolean retVal;
- try {
- Message msg = Message.obtain();
- msg.what = DctConstants.CMD_IS_PROVISIONING_APN;
- msg.setData(Bundle.forPair(DctConstants.APN_TYPE_KEY, mApnType));
- Message result = mDataConnectionTrackerAc.sendMessageSynchronously(msg);
- retVal = result.arg1 == DctConstants.ENABLED;
- } catch (NullPointerException e) {
- loge("isProvisioningNetwork: X " + e);
- retVal = false;
- }
- if (DBG) log("isProvisioningNetwork: retVal=" + retVal);
- return retVal;
- }
-
- @Override
- public String toString() {
- final CharArrayWriter writer = new CharArrayWriter();
- final PrintWriter pw = new PrintWriter(writer);
- pw.print("Mobile data state: "); pw.println(mMobileDataState);
- pw.print("Data enabled: user="); pw.print(mUserDataEnabled);
- pw.print(", policy="); pw.println(mPolicyDataEnabled);
- return writer.toString();
- }
-
- /**
- * Internal method supporting the ENABLE_MMS feature.
- * @param apnType the type of APN to be enabled or disabled (e.g., mms)
- * @param enable {@code true} to enable the specified APN type,
- * {@code false} to disable it.
- * @return an integer value representing the outcome of the request.
- */
- private int setEnableApn(String apnType, boolean enable) {
- getPhoneService(false);
- /*
- * If the phone process has crashed in the past, we'll get a
- * RemoteException and need to re-reference the service.
- */
- for (int retry = 0; retry < 2; retry++) {
- if (mPhoneService == null) {
- loge("Ignoring feature request because could not acquire PhoneService");
- break;
- }
-
-// try {
-// if (enable) {
-// return mPhoneService.enableApnType(apnType);
-// } else {
-// return mPhoneService.disableApnType(apnType);
-// }
-// } catch (RemoteException e) {
-// if (retry == 0) getPhoneService(true);
-// }
- }
-
- loge("Could not " + (enable ? "enable" : "disable") + " APN type \"" + apnType + "\"");
- return PhoneConstants.APN_REQUEST_FAILED;
- }
-
- public static String networkTypeToApnType(int netType) {
- switch(netType) {
- case ConnectivityManager.TYPE_MOBILE:
- return PhoneConstants.APN_TYPE_DEFAULT; // TODO - use just one of these
- case ConnectivityManager.TYPE_MOBILE_MMS:
- return PhoneConstants.APN_TYPE_MMS;
- case ConnectivityManager.TYPE_MOBILE_SUPL:
- return PhoneConstants.APN_TYPE_SUPL;
- case ConnectivityManager.TYPE_MOBILE_DUN:
- return PhoneConstants.APN_TYPE_DUN;
- case ConnectivityManager.TYPE_MOBILE_HIPRI:
- return PhoneConstants.APN_TYPE_HIPRI;
- case ConnectivityManager.TYPE_MOBILE_FOTA:
- return PhoneConstants.APN_TYPE_FOTA;
- case ConnectivityManager.TYPE_MOBILE_IMS:
- return PhoneConstants.APN_TYPE_IMS;
- case ConnectivityManager.TYPE_MOBILE_CBS:
- return PhoneConstants.APN_TYPE_CBS;
- case ConnectivityManager.TYPE_MOBILE_IA:
- return PhoneConstants.APN_TYPE_IA;
- case ConnectivityManager.TYPE_MOBILE_EMERGENCY:
- return PhoneConstants.APN_TYPE_EMERGENCY;
- default:
- sloge("Error mapping networkType " + netType + " to apnType.");
- return null;
- }
- }
-
-
- /**
- * @see android.net.NetworkStateTracker#getLinkProperties()
- */
- @Override
- public LinkProperties getLinkProperties() {
- return new LinkProperties(mLinkProperties);
- }
-
- public void supplyMessenger(Messenger messenger) {
- if (VDBG) log(mApnType + " got supplyMessenger");
- AsyncChannel ac = new AsyncChannel();
- ac.connect(mContext, MobileDataStateTracker.this.mHandler, messenger);
- }
-
- private void log(String s) {
- Slog.d(TAG, mApnType + ": " + s);
- }
-
- private void loge(String s) {
- Slog.e(TAG, mApnType + ": " + s);
- }
-
- static private void sloge(String s) {
- Slog.e(TAG, s);
- }
-
- @Override
- public LinkQualityInfo getLinkQualityInfo() {
- if (mNetworkInfo == null || mNetworkInfo.getType() == ConnectivityManager.TYPE_NONE) {
- // no data available yet; just return
- return null;
- }
-
- MobileLinkQualityInfo li = new MobileLinkQualityInfo();
-
- li.setNetworkType(mNetworkInfo.getType());
-
- mSamplingDataTracker.setCommonLinkQualityInfoFields(li);
-
- if (mNetworkInfo.getSubtype() != TelephonyManager.NETWORK_TYPE_UNKNOWN) {
- li.setMobileNetworkType(mNetworkInfo.getSubtype());
-
- NetworkDataEntry entry = getNetworkDataEntry(mNetworkInfo.getSubtype());
- if (entry != null) {
- li.setTheoreticalRxBandwidth(entry.downloadBandwidth);
- li.setTheoreticalRxBandwidth(entry.uploadBandwidth);
- li.setTheoreticalLatency(entry.latency);
- }
-
- if (mSignalStrength != null) {
- li.setNormalizedSignalStrength(getNormalizedSignalStrength(
- li.getMobileNetworkType(), mSignalStrength));
- }
- }
-
- SignalStrength ss = mSignalStrength;
- if (ss != null) {
-
- li.setRssi(ss.getGsmSignalStrength());
- li.setGsmErrorRate(ss.getGsmBitErrorRate());
- li.setCdmaDbm(ss.getCdmaDbm());
- li.setCdmaEcio(ss.getCdmaEcio());
- li.setEvdoDbm(ss.getEvdoDbm());
- li.setEvdoEcio(ss.getEvdoEcio());
- li.setEvdoSnr(ss.getEvdoSnr());
- li.setLteSignalStrength(ss.getLteSignalStrength());
- li.setLteRsrp(ss.getLteRsrp());
- li.setLteRsrq(ss.getLteRsrq());
- li.setLteRssnr(ss.getLteRssnr());
- li.setLteCqi(ss.getLteCqi());
- }
-
- if (VDBG) {
- Slog.d(TAG, "Returning LinkQualityInfo with"
- + " MobileNetworkType = " + String.valueOf(li.getMobileNetworkType())
- + " Theoretical Rx BW = " + String.valueOf(li.getTheoreticalRxBandwidth())
- + " gsm Signal Strength = " + String.valueOf(li.getRssi())
- + " cdma Signal Strength = " + String.valueOf(li.getCdmaDbm())
- + " evdo Signal Strength = " + String.valueOf(li.getEvdoDbm())
- + " Lte Signal Strength = " + String.valueOf(li.getLteSignalStrength()));
- }
-
- return li;
- }
-
- static class NetworkDataEntry {
- public int networkType;
- public int downloadBandwidth; // in kbps
- public int uploadBandwidth; // in kbps
- public int latency; // in millisecond
-
- NetworkDataEntry(int i1, int i2, int i3, int i4) {
- networkType = i1;
- downloadBandwidth = i2;
- uploadBandwidth = i3;
- latency = i4;
- }
- }
-
- private static NetworkDataEntry [] mTheoreticalBWTable = new NetworkDataEntry[] {
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_EDGE, 237, 118, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_GPRS, 48, 40, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_UMTS, 384, 64, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_HSDPA, 14400, UNKNOWN, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_HSUPA, 14400, 5760, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_HSPA, 14400, 5760, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_HSPAP, 21000, 5760, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_CDMA, UNKNOWN, UNKNOWN, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_1xRTT, UNKNOWN, UNKNOWN, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_EVDO_0, 2468, 153, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_EVDO_A, 3072, 1800, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_EVDO_B, 14700, 1800, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_IDEN, UNKNOWN, UNKNOWN, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_LTE, 100000, 50000, UNKNOWN),
- new NetworkDataEntry(TelephonyManager.NETWORK_TYPE_EHRPD, UNKNOWN, UNKNOWN, UNKNOWN),
- };
-
- private static NetworkDataEntry getNetworkDataEntry(int networkType) {
- for (NetworkDataEntry entry : mTheoreticalBWTable) {
- if (entry.networkType == networkType) {
- return entry;
- }
- }
-
- Slog.e(TAG, "Could not find Theoretical BW entry for " + String.valueOf(networkType));
- return null;
- }
-
- private static int getNormalizedSignalStrength(int networkType, SignalStrength ss) {
-
- int level;
-
- switch(networkType) {
- case TelephonyManager.NETWORK_TYPE_EDGE:
- case TelephonyManager.NETWORK_TYPE_GPRS:
- case TelephonyManager.NETWORK_TYPE_UMTS:
- case TelephonyManager.NETWORK_TYPE_HSDPA:
- case TelephonyManager.NETWORK_TYPE_HSUPA:
- case TelephonyManager.NETWORK_TYPE_HSPA:
- case TelephonyManager.NETWORK_TYPE_HSPAP:
- level = ss.getGsmLevel();
- break;
- case TelephonyManager.NETWORK_TYPE_CDMA:
- case TelephonyManager.NETWORK_TYPE_1xRTT:
- level = ss.getCdmaLevel();
- break;
- case TelephonyManager.NETWORK_TYPE_EVDO_0:
- case TelephonyManager.NETWORK_TYPE_EVDO_A:
- case TelephonyManager.NETWORK_TYPE_EVDO_B:
- level = ss.getEvdoLevel();
- break;
- case TelephonyManager.NETWORK_TYPE_LTE:
- level = ss.getLteLevel();
- break;
- case TelephonyManager.NETWORK_TYPE_IDEN:
- case TelephonyManager.NETWORK_TYPE_EHRPD:
- default:
- return UNKNOWN;
- }
-
- return (level * LinkQualityInfo.NORMALIZED_SIGNAL_STRENGTH_RANGE) /
- SignalStrength.NUM_SIGNAL_STRENGTH_BINS;
- }
-
- @Override
- public void startSampling(SamplingDataTracker.SamplingSnapshot s) {
- mSamplingDataTracker.startSampling(s);
- }
-
- @Override
- public void stopSampling(SamplingDataTracker.SamplingSnapshot s) {
- mSamplingDataTracker.stopSampling(s);
- }
-}
diff --git a/core/java/android/net/Network.java b/core/java/android/net/Network.java
index 5c12696..dfe2413 100644
--- a/core/java/android/net/Network.java
+++ b/core/java/android/net/Network.java
@@ -16,7 +16,6 @@
package android.net;
-import android.net.NetworkUtils;
import android.os.Parcelable;
import android.os.Parcel;
import android.system.ErrnoException;
@@ -34,15 +33,14 @@ import java.net.SocketException;
import java.net.UnknownHostException;
import java.net.URL;
import java.net.URLConnection;
-import java.net.URLStreamHandler;
-import java.util.concurrent.atomic.AtomicReference;
import javax.net.SocketFactory;
import com.android.okhttp.ConnectionPool;
-import com.android.okhttp.HostResolver;
import com.android.okhttp.HttpHandler;
import com.android.okhttp.HttpsHandler;
import com.android.okhttp.OkHttpClient;
+import com.android.okhttp.OkUrlFactory;
+import com.android.okhttp.internal.Internal;
/**
* Identifies a {@code Network}. This is supplied to applications via
@@ -63,10 +61,10 @@ public class Network implements Parcelable {
// Objects used to perform per-network operations such as getSocketFactory
// and openConnection, and a lock to protect access to them.
private volatile NetworkBoundSocketFactory mNetworkBoundSocketFactory = null;
- // mLock should be used to control write access to mConnectionPool and mHostResolver.
+ // mLock should be used to control write access to mConnectionPool and mNetwork.
// maybeInitHttpClient() must be called prior to reading either variable.
private volatile ConnectionPool mConnectionPool = null;
- private volatile HostResolver mHostResolver = null;
+ private volatile com.android.okhttp.internal.Network mNetwork = null;
private Object mLock = new Object();
// Default connection pool values. These are evaluated at startup, just
@@ -220,10 +218,10 @@ public class Network implements Parcelable {
// out) ConnectionPools.
private void maybeInitHttpClient() {
synchronized (mLock) {
- if (mHostResolver == null) {
- mHostResolver = new HostResolver() {
+ if (mNetwork == null) {
+ mNetwork = new com.android.okhttp.internal.Network() {
@Override
- public InetAddress[] getAllByName(String host) throws UnknownHostException {
+ public InetAddress[] resolveInetAddresses(String host) throws UnknownHostException {
return Network.this.getAllByName(host);
}
};
@@ -278,22 +276,25 @@ public class Network implements Parcelable {
if (proxy == null) throw new IllegalArgumentException("proxy is null");
maybeInitHttpClient();
String protocol = url.getProtocol();
- OkHttpClient client;
- // TODO: HttpHandler creates OkHttpClients that share the default ResponseCache.
+ OkUrlFactory okUrlFactory;
+ // TODO: HttpHandler creates OkUrlFactory instances that share the default ResponseCache.
// Could this cause unexpected behavior?
if (protocol.equals("http")) {
- client = HttpHandler.createHttpOkHttpClient(proxy);
+ okUrlFactory = HttpHandler.createHttpOkUrlFactory(proxy);
} else if (protocol.equals("https")) {
- client = HttpsHandler.createHttpsOkHttpClient(proxy);
+ okUrlFactory = HttpsHandler.createHttpsOkUrlFactory(proxy);
} else {
- // OkHttpClient only supports HTTP and HTTPS and returns a null URLStreamHandler if
+ // OkHttp only supports HTTP and HTTPS and returns a null URLStreamHandler if
// passed another protocol.
throw new MalformedURLException("Invalid URL or unrecognized protocol " + protocol);
}
- return client.setSocketFactory(getSocketFactory())
- .setHostResolver(mHostResolver)
- .setConnectionPool(mConnectionPool)
- .open(url);
+ OkHttpClient client = okUrlFactory.client();
+ client.setSocketFactory(getSocketFactory()).setConnectionPool(mConnectionPool);
+
+ // Use internal APIs to change the Network.
+ Internal.instance.setNetwork(client, mNetwork);
+
+ return okUrlFactory.open(url);
}
/**
diff --git a/core/java/android/net/NetworkStateTracker.java b/core/java/android/net/NetworkStateTracker.java
deleted file mode 100644
index c80782c..0000000
--- a/core/java/android/net/NetworkStateTracker.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (C) 2008 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 android.net;
-
-import android.content.Context;
-import android.os.Handler;
-import android.os.Messenger;
-
-import static com.android.internal.util.Protocol.BASE_NETWORK_STATE_TRACKER;
-
-/**
- * Interface provides the {@link com.android.server.ConnectivityService}
- * with three services. Events to the ConnectivityService when
- * changes occur, an API for controlling the network and storage
- * for network specific information.
- *
- * The Connectivity will call startMonitoring before any other
- * method is called.
- *
- * {@hide}
- */
-public interface NetworkStateTracker {
-
- /**
- * -------------------------------------------------------------
- * Event Interface back to ConnectivityService.
- *
- * The events that are to be sent back to the Handler passed
- * to startMonitoring when the particular event occurs.
- * -------------------------------------------------------------
- */
-
- /**
- * The network state has changed and the NetworkInfo object
- * contains the new state.
- *
- * msg.what = EVENT_STATE_CHANGED
- * msg.obj = NetworkInfo object
- */
- public static final int EVENT_STATE_CHANGED = BASE_NETWORK_STATE_TRACKER;
-
- /**
- * msg.what = EVENT_CONFIGURATION_CHANGED
- * msg.obj = NetworkInfo object
- */
- public static final int EVENT_CONFIGURATION_CHANGED = BASE_NETWORK_STATE_TRACKER + 1;
-
- /**
- * msg.what = EVENT_RESTORE_DEFAULT_NETWORK
- * msg.obj = FeatureUser object
- */
- public static final int EVENT_RESTORE_DEFAULT_NETWORK = BASE_NETWORK_STATE_TRACKER + 2;
-
- /**
- * msg.what = EVENT_NETWORK_SUBTYPE_CHANGED
- * msg.obj = NetworkInfo object
- */
- public static final int EVENT_NETWORK_SUBTYPE_CHANGED = BASE_NETWORK_STATE_TRACKER + 3;
-
- /**
- * msg.what = EVENT_NETWORK_CONNECTED
- * msg.obj = LinkProperties object
- */
- public static final int EVENT_NETWORK_CONNECTED = BASE_NETWORK_STATE_TRACKER + 4;
-
- /**
- * msg.what = EVENT_NETWORK_CONNECTION_DISCONNECTED
- * msg.obj = LinkProperties object, same iface name
- */
- public static final int EVENT_NETWORK_DISCONNECTED = BASE_NETWORK_STATE_TRACKER + 5;
-
- /**
- * -------------------------------------------------------------
- * Control Interface
- * -------------------------------------------------------------
- */
- /**
- * Begin monitoring data connectivity.
- *
- * This is the first method called when this interface is used.
- *
- * @param context is the current Android context
- * @param target is the Hander to which to return the events.
- */
- public void startMonitoring(Context context, Handler target);
-
- /**
- * Fetch NetworkInfo for the network
- */
- public NetworkInfo getNetworkInfo();
-
- /**
- * Return the LinkProperties for the connection.
- *
- * @return a copy of the LinkProperties, is never null.
- */
- public LinkProperties getLinkProperties();
-
- /**
- * @return a copy of this connections capabilities, may be empty but never null.
- */
- public NetworkCapabilities getNetworkCapabilities();
-
- /**
- * Get interesting information about this network link
- * @return a copy of link information, null if not available
- */
- public LinkQualityInfo getLinkQualityInfo();
-
- /**
- * Return the system properties name associated with the tcp buffer sizes
- * for this network.
- */
- public String getTcpBufferSizesPropName();
-
- /**
- * Disable connectivity to a network
- * @return {@code true} if a teardown occurred, {@code false} if the
- * teardown did not occur.
- */
- public boolean teardown();
-
- /**
- * Reenable connectivity to a network after a {@link #teardown()}.
- * @return {@code true} if we're connected or expect to be connected
- */
- public boolean reconnect();
-
- /**
- * Captive portal check has completed
- */
- public void captivePortalCheckCompleted(boolean isCaptive);
-
- /**
- * Turn the wireless radio off for a network.
- * @param turnOn {@code true} to turn the radio on, {@code false}
- */
- public boolean setRadio(boolean turnOn);
-
- /**
- * Returns an indication of whether this network is available for
- * connections. A value of {@code false} means that some quasi-permanent
- * condition prevents connectivity to this network.
- *
- * NOTE that this is broken on multi-connection devices. Should be fixed in J release
- * TODO - fix on multi-pdp devices
- */
- public boolean isAvailable();
-
- /**
- * User control of data connection through this network, typically persisted
- * internally.
- */
- public void setUserDataEnable(boolean enabled);
-
- /**
- * Policy control of data connection through this network, typically not
- * persisted internally. Usually used when {@link NetworkPolicy#limitBytes}
- * is passed.
- */
- public void setPolicyDataEnable(boolean enabled);
-
- /**
- * -------------------------------------------------------------
- * Storage API used by ConnectivityService for saving
- * Network specific information.
- * -------------------------------------------------------------
- */
-
- /**
- * Check if private DNS route is set for the network
- */
- public boolean isPrivateDnsRouteSet();
-
- /**
- * Set a flag indicating private DNS route is set
- */
- public void privateDnsRouteSet(boolean enabled);
-
- /**
- * Check if default route is set
- */
- public boolean isDefaultRouteSet();
-
- /**
- * Set a flag indicating default route is set for the network
- */
- public void defaultRouteSet(boolean enabled);
-
- /**
- * Check if tear down was requested
- */
- public boolean isTeardownRequested();
-
- /**
- * Indicate tear down requested from connectivity
- */
- public void setTeardownRequested(boolean isRequested);
-
- /**
- * An external dependency has been met/unmet
- */
- public void setDependencyMet(boolean met);
-
- /*
- * Called once to setup async channel between this and
- * the underlying network specific code.
- */
- public void supplyMessenger(Messenger messenger);
-
- /*
- * Network interface name that we'll lookup for sampling data
- */
- public String getNetworkInterfaceName();
-
- /*
- * Save the starting sample
- */
- public void startSampling(SamplingDataTracker.SamplingSnapshot s);
-
- /*
- * Save the ending sample
- */
- public void stopSampling(SamplingDataTracker.SamplingSnapshot s);
-
- /*
- * Record the current netId
- */
- public void setNetId(int netId);
-
- /*
- * ?
- */
- public Network getNetwork();
-
-}
diff --git a/core/java/android/net/Proxy.java b/core/java/android/net/Proxy.java
index 3477b02..17a84a7 100644
--- a/core/java/android/net/Proxy.java
+++ b/core/java/android/net/Proxy.java
@@ -22,8 +22,6 @@ import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
-import org.apache.http.HttpHost;
-
import java.net.InetSocketAddress;
import java.net.ProxySelector;
import java.net.URI;
@@ -37,8 +35,6 @@ import java.util.regex.Pattern;
*/
public final class Proxy {
- // Set to true to enable extra debugging.
- private static final boolean DEBUG = false;
private static final String TAG = "Proxy";
private static final ProxySelector sDefaultProxySelector;
@@ -192,31 +188,6 @@ public final class Proxy {
}
}
- /**
- * Returns the preferred proxy to be used by clients. This is a wrapper
- * around {@link android.net.Proxy#getHost()}.
- *
- * @param context the context which will be passed to
- * {@link android.net.Proxy#getHost()}
- * @param url the target URL for the request
- * @note Calling this method requires permission
- * android.permission.ACCESS_NETWORK_STATE
- * @return The preferred proxy to be used by clients, or null if there
- * is no proxy.
- * {@hide}
- */
- // TODO: Get rid of this method. It's used only in tests.
- public static final HttpHost getPreferredHttpHost(Context context,
- String url) {
- java.net.Proxy prefProxy = getProxy(context, url);
- if (prefProxy.equals(java.net.Proxy.NO_PROXY)) {
- return null;
- } else {
- InetSocketAddress sa = (InetSocketAddress)prefProxy.address();
- return new HttpHost(sa.getHostName(), sa.getPort(), "http");
- }
- }
-
private static final boolean isLocalHost(String host) {
if (host == null) {
return false;
diff --git a/core/java/android/net/ProxyDataTracker.java b/core/java/android/net/ProxyDataTracker.java
deleted file mode 100644
index 7d23125..0000000
--- a/core/java/android/net/ProxyDataTracker.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * 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 android.net;
-
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.Message;
-import android.os.Messenger;
-import android.os.RemoteException;
-import android.os.UserHandle;
-import android.util.Log;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * A data tracker responsible for bringing up and tearing down the system proxy server.
- *
- * {@hide}
- */
-public class ProxyDataTracker extends BaseNetworkStateTracker {
- private static final String TAG = "ProxyDataTracker";
- private static final String NETWORK_TYPE = "PROXY";
-
- // TODO: investigate how to get these DNS addresses from the system.
- private static final String DNS1 = "8.8.8.8";
- private static final String DNS2 = "8.8.4.4";
- private static final String INTERFACE_NAME = "ifb0";
- private static final String REASON_ENABLED = "enabled";
- private static final String REASON_DISABLED = "disabled";
- private static final String REASON_PROXY_DOWN = "proxy_down";
-
- private static final int MSG_TEAR_DOWN_REQUEST = 1;
- private static final int MSG_SETUP_REQUEST = 2;
-
- private static final String PERMISSION_PROXY_STATUS_SENDER =
- "android.permission.ACCESS_NETWORK_CONDITIONS";
- private static final String ACTION_PROXY_STATUS_CHANGE =
- "com.android.net.PROXY_STATUS_CHANGE";
- private static final String KEY_IS_PROXY_AVAILABLE = "is_proxy_available";
- private static final String KEY_REPLY_TO_MESSENGER_BINDER = "reply_to_messenger_binder";
- private static final String KEY_REPLY_TO_MESSENGER_BINDER_BUNDLE =
- "reply_to_messenger_binder_bundle";
-
- private Handler mTarget;
- private Messenger mProxyStatusService;
- private AtomicBoolean mReconnectRequested = new AtomicBoolean(false);
- private AtomicBoolean mIsProxyAvailable = new AtomicBoolean(false);
- private final AtomicInteger mDefaultGatewayAddr = new AtomicInteger(0);
-
- private final BroadcastReceiver mProxyStatusServiceListener = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (intent.getAction().equals(ACTION_PROXY_STATUS_CHANGE)) {
- mIsProxyAvailable.set(intent.getBooleanExtra(KEY_IS_PROXY_AVAILABLE, false));
- if (mIsProxyAvailable.get()) {
- Bundle bundle = intent.getBundleExtra(KEY_REPLY_TO_MESSENGER_BINDER_BUNDLE);
- if (bundle == null || bundle.getBinder(KEY_REPLY_TO_MESSENGER_BINDER) == null) {
- Log.e(TAG, "no messenger binder in the intent to send future requests");
- mIsProxyAvailable.set(false);
- return;
- }
- mProxyStatusService =
- new Messenger(bundle.getBinder(KEY_REPLY_TO_MESSENGER_BINDER));
- // If there is a pending reconnect request, do it now.
- if (mReconnectRequested.get()) {
- reconnect();
- }
- } else {
- setDetailedState(NetworkInfo.DetailedState.DISCONNECTED,
- REASON_PROXY_DOWN, null);
- }
- } else {
- Log.d(TAG, "Unrecognized broadcast intent");
- }
- }
- };
-
- /**
- * Create a new ProxyDataTracker
- */
- public ProxyDataTracker() {
- mNetworkInfo = new NetworkInfo(ConnectivityManager.TYPE_PROXY, 0, NETWORK_TYPE, "");
- mLinkProperties = new LinkProperties();
- mNetworkCapabilities = new NetworkCapabilities();
- mNetworkInfo.setIsAvailable(true);
- try {
- mLinkProperties.addDnsServer(InetAddress.getByName(DNS1));
- mLinkProperties.addDnsServer(InetAddress.getByName(DNS2));
- mLinkProperties.setInterfaceName(INTERFACE_NAME);
- } catch (UnknownHostException e) {
- Log.e(TAG, "Could not add DNS address", e);
- }
- }
-
- @Override
- public Object clone() throws CloneNotSupportedException {
- throw new CloneNotSupportedException();
- }
-
- @Override
- public void startMonitoring(Context context, Handler target) {
- mContext = context;
- mTarget = target;
- mContext.registerReceiver(mProxyStatusServiceListener,
- new IntentFilter(ACTION_PROXY_STATUS_CHANGE),
- PERMISSION_PROXY_STATUS_SENDER,
- null);
- }
-
- /**
- * Disable connectivity to the network.
- */
- public boolean teardown() {
- setTeardownRequested(true);
- mReconnectRequested.set(false);
- try {
- if (mIsProxyAvailable.get() && mProxyStatusService != null) {
- mProxyStatusService.send(Message.obtain(null, MSG_TEAR_DOWN_REQUEST));
- }
- } catch (RemoteException e) {
- Log.e(TAG, "Unable to connect to proxy status service", e);
- return false;
- }
- setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, REASON_DISABLED, null);
- return true;
- }
-
- /**
- * Re-enable proxy data connectivity after a {@link #teardown()}.
- */
- public boolean reconnect() {
- mReconnectRequested.set(true);
- setTeardownRequested(false);
- if (!mIsProxyAvailable.get()) {
- Log.w(TAG, "Reconnect requested even though proxy service is not up. Bailing.");
- return false;
- }
- setDetailedState(NetworkInfo.DetailedState.CONNECTING, REASON_ENABLED, null);
-
- try {
- mProxyStatusService.send(Message.obtain(null, MSG_SETUP_REQUEST));
- } catch (RemoteException e) {
- Log.e(TAG, "Unable to connect to proxy status service", e);
- setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, REASON_PROXY_DOWN, null);
- return false;
- }
- // We'll assume proxy is set up successfully. If not, a status change broadcast will be
- // received afterwards to indicate any failure.
- setDetailedState(NetworkInfo.DetailedState.CONNECTED, REASON_ENABLED, null);
- return true;
- }
-
- /**
- * Fetch default gateway address for the network
- */
- public int getDefaultGatewayAddr() {
- return mDefaultGatewayAddr.get();
- }
-
- /**
- * Return the system properties name associated with the tcp buffer sizes
- * for this network.
- */
- public String getTcpBufferSizesPropName() {
- return "net.tcp.buffersize.wifi";
- }
-
- /**
- * Record the detailed state of a network, and if it is a
- * change from the previous state, send a notification to
- * any listeners.
- * @param state the new @{code DetailedState}
- * @param reason a {@code String} indicating a reason for the state change,
- * if one was supplied. May be {@code null}.
- * @param extraInfo optional {@code String} providing extra information about the state change
- */
- private void setDetailedState(NetworkInfo.DetailedState state, String reason,
- String extraInfo) {
- mNetworkInfo.setDetailedState(state, reason, extraInfo);
- Message msg = mTarget.obtainMessage(EVENT_STATE_CHANGED, mNetworkInfo);
- msg.sendToTarget();
- }
-}
diff --git a/core/java/android/net/RouteInfo.java b/core/java/android/net/RouteInfo.java
index cfd20a0..90a2460 100644
--- a/core/java/android/net/RouteInfo.java
+++ b/core/java/android/net/RouteInfo.java
@@ -367,13 +367,7 @@ public final class RouteInfo implements Parcelable {
* @return {@code true} if the destination and prefix length cover the given address.
*/
public boolean matches(InetAddress destination) {
- if (destination == null) return false;
-
- // match the route destination and destination with prefix length
- InetAddress dstNet = NetworkUtils.getNetworkPart(destination,
- mDestination.getPrefixLength());
-
- return mDestination.getAddress().equals(dstNet);
+ return mDestination.contains(destination);
}
/**
diff --git a/core/java/android/net/SSLCertificateSocketFactory.java b/core/java/android/net/SSLCertificateSocketFactory.java
index c15e6e5..6654577 100644
--- a/core/java/android/net/SSLCertificateSocketFactory.java
+++ b/core/java/android/net/SSLCertificateSocketFactory.java
@@ -208,7 +208,7 @@ public class SSLCertificateSocketFactory extends SSLSocketFactory {
private SSLSocketFactory makeSocketFactory(
KeyManager[] keyManagers, TrustManager[] trustManagers) {
try {
- OpenSSLContextImpl sslContext = new OpenSSLContextImpl();
+ OpenSSLContextImpl sslContext = OpenSSLContextImpl.getPreferred();
sslContext.engineInit(keyManagers, trustManagers, null);
sslContext.engineGetClientSessionContext().setPersistentCache(mSessionCache);
return sslContext.engineGetSocketFactory();
diff --git a/core/java/android/net/SamplingDataTracker.java b/core/java/android/net/SamplingDataTracker.java
deleted file mode 100644
index acd56f2..0000000
--- a/core/java/android/net/SamplingDataTracker.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Copyright (C) 2013 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 android.net;
-
-
-import android.os.SystemClock;
-import android.util.Slog;
-
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * @hide
- */
-public class SamplingDataTracker
-{
- private static final boolean DBG = false;
- private static final String TAG = "SamplingDataTracker";
-
- public static class SamplingSnapshot
- {
- public long mTxByteCount;
- public long mRxByteCount;
- public long mTxPacketCount;
- public long mRxPacketCount;
- public long mTxPacketErrorCount;
- public long mRxPacketErrorCount;
- public long mTimestamp;
- }
-
- public static void getSamplingSnapshots(Map<String, SamplingSnapshot> mapIfaceToSample) {
-
- BufferedReader reader = null;
- try {
- reader = new BufferedReader(new FileReader("/proc/net/dev"));
-
- // Skip over the line bearing column titles (there are 2 lines)
- String line;
- reader.readLine();
- reader.readLine();
-
- while ((line = reader.readLine()) != null) {
-
- // remove leading whitespace
- line = line.trim();
-
- String[] tokens = line.split("[ ]+");
- if (tokens.length < 17) {
- continue;
- }
-
- /* column format is
- * Interface (Recv)bytes packets errs drop fifo frame compressed multicast \
- * (Transmit)bytes packets errs drop fifo colls carrier compress
- */
-
- String currentIface = tokens[0].split(":")[0];
- if (DBG) Slog.d(TAG, "Found data for interface " + currentIface);
- if (mapIfaceToSample.containsKey(currentIface)) {
-
- try {
- SamplingSnapshot ss = new SamplingSnapshot();
-
- ss.mTxByteCount = Long.parseLong(tokens[1]);
- ss.mTxPacketCount = Long.parseLong(tokens[2]);
- ss.mTxPacketErrorCount = Long.parseLong(tokens[3]);
- ss.mRxByteCount = Long.parseLong(tokens[9]);
- ss.mRxPacketCount = Long.parseLong(tokens[10]);
- ss.mRxPacketErrorCount = Long.parseLong(tokens[11]);
-
- ss.mTimestamp = SystemClock.elapsedRealtime();
-
- if (DBG) {
- Slog.d(TAG, "Interface = " + currentIface);
- Slog.d(TAG, "ByteCount = " + String.valueOf(ss.mTxByteCount));
- Slog.d(TAG, "TxPacketCount = " + String.valueOf(ss.mTxPacketCount));
- Slog.d(TAG, "TxPacketErrorCount = "
- + String.valueOf(ss.mTxPacketErrorCount));
- Slog.d(TAG, "RxByteCount = " + String.valueOf(ss.mRxByteCount));
- Slog.d(TAG, "RxPacketCount = " + String.valueOf(ss.mRxPacketCount));
- Slog.d(TAG, "RxPacketErrorCount = "
- + String.valueOf(ss.mRxPacketErrorCount));
- Slog.d(TAG, "Timestamp = " + String.valueOf(ss.mTimestamp));
- Slog.d(TAG, "---------------------------");
- }
-
- mapIfaceToSample.put(currentIface, ss);
-
- } catch (NumberFormatException e) {
- // just ignore this data point
- }
- }
- }
-
- if (DBG) {
- Iterator it = mapIfaceToSample.entrySet().iterator();
- while (it.hasNext()) {
- Map.Entry kvpair = (Map.Entry)it.next();
- if (kvpair.getValue() == null) {
- Slog.d(TAG, "could not find snapshot for interface " + kvpair.getKey());
- }
- }
- }
- } catch(FileNotFoundException e) {
- Slog.e(TAG, "could not find /proc/net/dev");
- } catch (IOException e) {
- Slog.e(TAG, "could not read /proc/net/dev");
- } finally {
- try {
- if (reader != null) {
- reader.close();
- }
- } catch (IOException e) {
- Slog.e(TAG, "could not close /proc/net/dev");
- }
- }
- }
-
- // Snapshots from previous sampling interval
- private SamplingSnapshot mBeginningSample;
- private SamplingSnapshot mEndingSample;
-
- // Starting snapshot of current interval
- private SamplingSnapshot mLastSample;
-
- // Protects sampling data from concurrent access
- public final Object mSamplingDataLock = new Object();
-
- // We need long enough time for a good sample
- private final int MINIMUM_SAMPLING_INTERVAL = 15 * 1000;
-
- // statistics is useless unless we have enough data
- private final int MINIMUM_SAMPLED_PACKETS = 30;
-
- public void startSampling(SamplingSnapshot s) {
- synchronized(mSamplingDataLock) {
- mLastSample = s;
- }
- }
-
- public void stopSampling(SamplingSnapshot s) {
- synchronized(mSamplingDataLock) {
- if (mLastSample != null) {
- if (s.mTimestamp - mLastSample.mTimestamp > MINIMUM_SAMPLING_INTERVAL
- && getSampledPacketCount(mLastSample, s) > MINIMUM_SAMPLED_PACKETS) {
- mBeginningSample = mLastSample;
- mEndingSample = s;
- mLastSample = null;
- } else {
- if (DBG) Slog.d(TAG, "Throwing current sample away because it is too small");
- }
- }
- }
- }
-
- public void resetSamplingData() {
- if (DBG) Slog.d(TAG, "Resetting sampled network data");
- synchronized(mSamplingDataLock) {
-
- // We could just take another sample here and treat it as an
- // 'ending sample' effectively shortening sampling interval, but that
- // requires extra work (specifically, reading the sample needs to be
- // done asynchronously)
-
- mLastSample = null;
- }
- }
-
- public long getSampledTxByteCount() {
- synchronized(mSamplingDataLock) {
- if (mBeginningSample != null && mEndingSample != null) {
- return mEndingSample.mTxByteCount - mBeginningSample.mTxByteCount;
- } else {
- return LinkQualityInfo.UNKNOWN_LONG;
- }
- }
- }
-
- public long getSampledTxPacketCount() {
- synchronized(mSamplingDataLock) {
- if (mBeginningSample != null && mEndingSample != null) {
- return mEndingSample.mTxPacketCount - mBeginningSample.mTxPacketCount;
- } else {
- return LinkQualityInfo.UNKNOWN_LONG;
- }
- }
- }
-
- public long getSampledTxPacketErrorCount() {
- synchronized(mSamplingDataLock) {
- if (mBeginningSample != null && mEndingSample != null) {
- return mEndingSample.mTxPacketErrorCount - mBeginningSample.mTxPacketErrorCount;
- } else {
- return LinkQualityInfo.UNKNOWN_LONG;
- }
- }
- }
-
- public long getSampledRxByteCount() {
- synchronized(mSamplingDataLock) {
- if (mBeginningSample != null && mEndingSample != null) {
- return mEndingSample.mRxByteCount - mBeginningSample.mRxByteCount;
- } else {
- return LinkQualityInfo.UNKNOWN_LONG;
- }
- }
- }
-
- public long getSampledRxPacketCount() {
- synchronized(mSamplingDataLock) {
- if (mBeginningSample != null && mEndingSample != null) {
- return mEndingSample.mRxPacketCount - mBeginningSample.mRxPacketCount;
- } else {
- return LinkQualityInfo.UNKNOWN_LONG;
- }
- }
- }
-
- public long getSampledPacketCount() {
- return getSampledPacketCount(mBeginningSample, mEndingSample);
- }
-
- public long getSampledPacketCount(SamplingSnapshot begin, SamplingSnapshot end) {
- if (begin != null && end != null) {
- long rxPacketCount = end.mRxPacketCount - begin.mRxPacketCount;
- long txPacketCount = end.mTxPacketCount - begin.mTxPacketCount;
- return rxPacketCount + txPacketCount;
- } else {
- return LinkQualityInfo.UNKNOWN_LONG;
- }
- }
-
- public long getSampledPacketErrorCount() {
- if (mBeginningSample != null && mEndingSample != null) {
- long rxPacketErrorCount = getSampledRxPacketErrorCount();
- long txPacketErrorCount = getSampledTxPacketErrorCount();
- return rxPacketErrorCount + txPacketErrorCount;
- } else {
- return LinkQualityInfo.UNKNOWN_LONG;
- }
- }
-
- public long getSampledRxPacketErrorCount() {
- synchronized(mSamplingDataLock) {
- if (mBeginningSample != null && mEndingSample != null) {
- return mEndingSample.mRxPacketErrorCount - mBeginningSample.mRxPacketErrorCount;
- } else {
- return LinkQualityInfo.UNKNOWN_LONG;
- }
- }
- }
-
- public long getSampleTimestamp() {
- synchronized(mSamplingDataLock) {
- if (mEndingSample != null) {
- return mEndingSample.mTimestamp;
- } else {
- return LinkQualityInfo.UNKNOWN_LONG;
- }
- }
- }
-
- public int getSampleDuration() {
- synchronized(mSamplingDataLock) {
- if (mBeginningSample != null && mEndingSample != null) {
- return (int) (mEndingSample.mTimestamp - mBeginningSample.mTimestamp);
- } else {
- return LinkQualityInfo.UNKNOWN_INT;
- }
- }
- }
-
- public void setCommonLinkQualityInfoFields(LinkQualityInfo li) {
- synchronized(mSamplingDataLock) {
- li.setLastDataSampleTime(getSampleTimestamp());
- li.setDataSampleDuration(getSampleDuration());
- li.setPacketCount(getSampledPacketCount());
- li.setPacketErrorCount(getSampledPacketErrorCount());
- }
- }
-}
-
diff --git a/core/java/android/net/StaticIpConfiguration.java b/core/java/android/net/StaticIpConfiguration.java
index 365f2b6..37ee961 100644
--- a/core/java/android/net/StaticIpConfiguration.java
+++ b/core/java/android/net/StaticIpConfiguration.java
@@ -188,6 +188,7 @@ public class StaticIpConfiguration implements Parcelable {
for (InetAddress dnsServer : dnsServers) {
NetworkUtils.parcelInetAddress(dest, dnsServer, flags);
}
+ dest.writeString(domains);
}
protected static void readFromParcel(StaticIpConfiguration s, Parcel in) {
@@ -198,5 +199,6 @@ public class StaticIpConfiguration implements Parcelable {
for (int i = 0; i < size; i++) {
s.dnsServers.add(NetworkUtils.unparcelInetAddress(in));
}
+ s.domains = in.readString();
}
}
diff --git a/core/java/android/net/Uri.java b/core/java/android/net/Uri.java
index 2099c3f..fb2f445 100644
--- a/core/java/android/net/Uri.java
+++ b/core/java/android/net/Uri.java
@@ -384,6 +384,11 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
}
}
return builder.toString();
+ } else if (scheme.equalsIgnoreCase("http") || scheme.equalsIgnoreCase("https")
+ || scheme.equalsIgnoreCase("ftp")) {
+ ssp = "//" + ((getHost() != null) ? getHost() : "")
+ + ((getPort() != -1) ? (":" + getPort()) : "")
+ + "/...";
}
}
// Not a sensitive scheme, but let's still be conservative about
diff --git a/core/java/android/net/http/CharArrayBuffers.java b/core/java/android/net/http/CharArrayBuffers.java
deleted file mode 100644
index 77d45f6..0000000
--- a/core/java/android/net/http/CharArrayBuffers.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2008 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 android.net.http;
-
-import org.apache.http.util.CharArrayBuffer;
-import org.apache.http.protocol.HTTP;
-
-/**
- * Utility methods for working on CharArrayBuffers.
- *
- * {@hide}
- */
-class CharArrayBuffers {
-
- static final char uppercaseAddon = 'a' - 'A';
-
- /**
- * Returns true if the buffer contains the given string. Ignores leading
- * whitespace and case.
- *
- * @param buffer to search
- * @param beginIndex index at which we should start
- * @param str to search for
- */
- static boolean containsIgnoreCaseTrimmed(CharArrayBuffer buffer,
- int beginIndex, final String str) {
- int len = buffer.length();
- char[] chars = buffer.buffer();
- while (beginIndex < len && HTTP.isWhitespace(chars[beginIndex])) {
- beginIndex++;
- }
- int size = str.length();
- boolean ok = len >= beginIndex + size;
- for (int j=0; ok && (j<size); j++) {
- char a = chars[beginIndex+j];
- char b = str.charAt(j);
- if (a != b) {
- a = toLower(a);
- b = toLower(b);
- ok = a == b;
- }
- }
- return ok;
- }
-
- /**
- * Returns index of first occurence ch. Lower cases characters leading up
- * to first occurrence of ch.
- */
- static int setLowercaseIndexOf(CharArrayBuffer buffer, final int ch) {
-
- int beginIndex = 0;
- int endIndex = buffer.length();
- char[] chars = buffer.buffer();
-
- for (int i = beginIndex; i < endIndex; i++) {
- char current = chars[i];
- if (current == ch) {
- return i;
- } else if (current >= 'A' && current <= 'Z'){
- // make lower case
- current += uppercaseAddon;
- chars[i] = current;
- }
- }
- return -1;
- }
-
- private static char toLower(char c) {
- if (c >= 'A' && c <= 'Z'){
- c += uppercaseAddon;
- }
- return c;
- }
-}
diff --git a/core/java/android/net/http/Connection.java b/core/java/android/net/http/Connection.java
index 834ad69..831bd0e 100644
--- a/core/java/android/net/http/Connection.java
+++ b/core/java/android/net/http/Connection.java
@@ -436,7 +436,7 @@ abstract class Connection {
ret = false;
String error;
if (errorId < 0) {
- error = ErrorStrings.getString(errorId, mContext);
+ error = getEventHandlerErrorString(errorId);
} else {
Throwable cause = e.getCause();
error = cause != null ? cause.toString() : e.getMessage();
@@ -451,6 +451,61 @@ abstract class Connection {
return ret;
}
+ private static String getEventHandlerErrorString(int errorId) {
+ switch (errorId) {
+ case EventHandler.OK:
+ return "OK";
+
+ case EventHandler.ERROR:
+ return "ERROR";
+
+ case EventHandler.ERROR_LOOKUP:
+ return "ERROR_LOOKUP";
+
+ case EventHandler.ERROR_UNSUPPORTED_AUTH_SCHEME:
+ return "ERROR_UNSUPPORTED_AUTH_SCHEME";
+
+ case EventHandler.ERROR_AUTH:
+ return "ERROR_AUTH";
+
+ case EventHandler.ERROR_PROXYAUTH:
+ return "ERROR_PROXYAUTH";
+
+ case EventHandler.ERROR_CONNECT:
+ return "ERROR_CONNECT";
+
+ case EventHandler.ERROR_IO:
+ return "ERROR_IO";
+
+ case EventHandler.ERROR_TIMEOUT:
+ return "ERROR_TIMEOUT";
+
+ case EventHandler.ERROR_REDIRECT_LOOP:
+ return "ERROR_REDIRECT_LOOP";
+
+ case EventHandler.ERROR_UNSUPPORTED_SCHEME:
+ return "ERROR_UNSUPPORTED_SCHEME";
+
+ case EventHandler.ERROR_FAILED_SSL_HANDSHAKE:
+ return "ERROR_FAILED_SSL_HANDSHAKE";
+
+ case EventHandler.ERROR_BAD_URL:
+ return "ERROR_BAD_URL";
+
+ case EventHandler.FILE_ERROR:
+ return "FILE_ERROR";
+
+ case EventHandler.FILE_NOT_FOUND_ERROR:
+ return "FILE_NOT_FOUND_ERROR";
+
+ case EventHandler.TOO_MANY_REQUESTS_ERROR:
+ return "TOO_MANY_REQUESTS_ERROR";
+
+ default:
+ return "UNKNOWN_ERROR";
+ }
+ }
+
HttpContext getHttpContext() {
return mHttpContext;
}
diff --git a/core/java/android/net/http/Headers.java b/core/java/android/net/http/Headers.java
index 657e071..0f8b105 100644
--- a/core/java/android/net/http/Headers.java
+++ b/core/java/android/net/http/Headers.java
@@ -158,7 +158,7 @@ public final class Headers {
}
public void parseHeader(CharArrayBuffer buffer) {
- int pos = CharArrayBuffers.setLowercaseIndexOf(buffer, ':');
+ int pos = setLowercaseIndexOf(buffer, ':');
if (pos == -1) {
return;
}
@@ -459,12 +459,63 @@ public final class Headers {
}
private void setConnectionType(CharArrayBuffer buffer, int pos) {
- if (CharArrayBuffers.containsIgnoreCaseTrimmed(
- buffer, pos, HTTP.CONN_CLOSE)) {
+ if (containsIgnoreCaseTrimmed(buffer, pos, HTTP.CONN_CLOSE)) {
connectionType = CONN_CLOSE;
- } else if (CharArrayBuffers.containsIgnoreCaseTrimmed(
+ } else if (containsIgnoreCaseTrimmed(
buffer, pos, HTTP.CONN_KEEP_ALIVE)) {
connectionType = CONN_KEEP_ALIVE;
}
}
+
+
+ /**
+ * Returns true if the buffer contains the given string. Ignores leading
+ * whitespace and case.
+ *
+ * @param buffer to search
+ * @param beginIndex index at which we should start
+ * @param str to search for
+ */
+ static boolean containsIgnoreCaseTrimmed(CharArrayBuffer buffer,
+ int beginIndex, final String str) {
+ int len = buffer.length();
+ char[] chars = buffer.buffer();
+ while (beginIndex < len && HTTP.isWhitespace(chars[beginIndex])) {
+ beginIndex++;
+ }
+ int size = str.length();
+ boolean ok = len >= (beginIndex + size);
+ for (int j=0; ok && (j < size); j++) {
+ char a = chars[beginIndex + j];
+ char b = str.charAt(j);
+ if (a != b) {
+ a = Character.toLowerCase(a);
+ b = Character.toLowerCase(b);
+ ok = a == b;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Returns index of first occurence ch. Lower cases characters leading up
+ * to first occurrence of ch.
+ */
+ static int setLowercaseIndexOf(CharArrayBuffer buffer, final int ch) {
+
+ int beginIndex = 0;
+ int endIndex = buffer.length();
+ char[] chars = buffer.buffer();
+
+ for (int i = beginIndex; i < endIndex; i++) {
+ char current = chars[i];
+ if (current == ch) {
+ return i;
+ } else {
+ chars[i] = Character.toLowerCase(current);
+ }
+ }
+ return -1;
+ }
}
diff --git a/core/java/android/net/http/HttpResponseCache.java b/core/java/android/net/http/HttpResponseCache.java
index 2785a15..c6c22e7 100644
--- a/core/java/android/net/http/HttpResponseCache.java
+++ b/core/java/android/net/http/HttpResponseCache.java
@@ -16,32 +16,33 @@
package android.net.http;
-import android.content.Context;
+import com.android.okhttp.Cache;
+import com.android.okhttp.AndroidShimResponseCache;
+import com.android.okhttp.OkCacheContainer;
+
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.net.CacheRequest;
import java.net.CacheResponse;
-import java.net.HttpURLConnection;
import java.net.ResponseCache;
import java.net.URI;
import java.net.URLConnection;
import java.util.List;
import java.util.Map;
-import javax.net.ssl.HttpsURLConnection;
-import org.apache.http.impl.client.DefaultHttpClient;
/**
* Caches HTTP and HTTPS responses to the filesystem so they may be reused,
- * saving time and bandwidth. This class supports {@link HttpURLConnection} and
- * {@link HttpsURLConnection}; there is no platform-provided cache for {@link
- * DefaultHttpClient} or {@link AndroidHttpClient}.
+ * saving time and bandwidth. This class supports {@link
+ * java.net.HttpURLConnection} and {@link javax.net.ssl.HttpsURLConnection};
+ * there is no platform-provided cache for {@link
+ * org.apache.http.impl.client.DefaultHttpClient} or {@link AndroidHttpClient}.
*
* <h3>Installing an HTTP response cache</h3>
* Enable caching of all of your application's HTTP requests by installing the
* cache at application startup. For example, this code installs a 10 MiB cache
- * in the {@link Context#getCacheDir() application-specific cache directory} of
- * the filesystem}: <pre> {@code
+ * in the {@link android.content.Context#getCacheDir() application-specific
+ * cache directory} of the filesystem}: <pre> {@code
* protected void onCreate(Bundle savedInstanceState) {
* ...
*
@@ -73,10 +74,10 @@ import org.apache.http.impl.client.DefaultHttpClient;
* contain private data.</strong> Although it often has more free space,
* external storage is optional and&#8212;even if available&#8212;can disappear
* during use. Retrieve the external cache directory using {@link
- * Context#getExternalCacheDir()}. If this method returns null, your application
- * should fall back to either not caching or caching on non-external storage. If
- * the external storage is removed during use, the cache hit rate will drop to
- * zero and ongoing cache reads will fail.
+ * android.content.Context#getExternalCacheDir()}. If this method returns null,
+ * your application should fall back to either not caching or caching on
+ * non-external storage. If the external storage is removed during use, the
+ * cache hit rate will drop to zero and ongoing cache reads will fail.
*
* <p>Flushing the cache forces its data to the filesystem. This ensures that
* all responses written to the cache will be readable the next time the
@@ -147,11 +148,11 @@ import org.apache.http.impl.client.DefaultHttpClient;
* } catch (Exception httpResponseCacheNotAvailable) {
* }}</pre>
*/
-public final class HttpResponseCache extends ResponseCache implements Closeable {
+public final class HttpResponseCache extends ResponseCache implements Closeable, OkCacheContainer {
- private final com.android.okhttp.HttpResponseCache delegate;
+ private final AndroidShimResponseCache delegate;
- private HttpResponseCache(com.android.okhttp.HttpResponseCache delegate) {
+ private HttpResponseCache(AndroidShimResponseCache delegate) {
this.delegate = delegate;
}
@@ -161,17 +162,14 @@ public final class HttpResponseCache extends ResponseCache implements Closeable
*/
public static HttpResponseCache getInstalled() {
ResponseCache installed = ResponseCache.getDefault();
- if (installed instanceof com.android.okhttp.HttpResponseCache) {
- return new HttpResponseCache(
- (com.android.okhttp.HttpResponseCache) installed);
+ if (installed instanceof HttpResponseCache) {
+ return (HttpResponseCache) installed;
}
-
return null;
}
/**
- * Creates a new HTTP response cache and {@link ResponseCache#setDefault
- * sets it} as the system default cache.
+ * Creates a new HTTP response cache and sets it as the system default cache.
*
* @param directory the directory to hold cache data.
* @param maxSize the maximum size of the cache in bytes.
@@ -180,26 +178,26 @@ public final class HttpResponseCache extends ResponseCache implements Closeable
* Most applications should respond to this exception by logging a
* warning.
*/
- public static HttpResponseCache install(File directory, long maxSize) throws IOException {
+ public static synchronized HttpResponseCache install(File directory, long maxSize)
+ throws IOException {
ResponseCache installed = ResponseCache.getDefault();
- if (installed instanceof com.android.okhttp.HttpResponseCache) {
- com.android.okhttp.HttpResponseCache installedCache =
- (com.android.okhttp.HttpResponseCache) installed;
+ if (installed instanceof HttpResponseCache) {
+ HttpResponseCache installedResponseCache = (HttpResponseCache) installed;
// don't close and reopen if an equivalent cache is already installed
- if (installedCache.getDirectory().equals(directory)
- && installedCache.getMaxSize() == maxSize
- && !installedCache.isClosed()) {
- return new HttpResponseCache(installedCache);
+ AndroidShimResponseCache trueResponseCache = installedResponseCache.delegate;
+ if (trueResponseCache.isEquivalent(directory, maxSize)) {
+ return installedResponseCache;
} else {
// The HttpResponseCache that owns this object is about to be replaced.
- installedCache.close();
+ trueResponseCache.close();
}
}
- com.android.okhttp.HttpResponseCache responseCache =
- new com.android.okhttp.HttpResponseCache(directory, maxSize);
- ResponseCache.setDefault(responseCache);
- return new HttpResponseCache(responseCache);
+ AndroidShimResponseCache trueResponseCache =
+ AndroidShimResponseCache.create(directory, maxSize);
+ HttpResponseCache newResponseCache = new HttpResponseCache(trueResponseCache);
+ ResponseCache.setDefault(newResponseCache);
+ return newResponseCache;
}
@Override public CacheResponse get(URI uri, String requestMethod,
@@ -214,10 +212,15 @@ public final class HttpResponseCache extends ResponseCache implements Closeable
/**
* Returns the number of bytes currently being used to store the values in
* this cache. This may be greater than the {@link #maxSize} if a background
- * deletion is pending.
+ * deletion is pending. {@code -1} is returned if the size cannot be determined.
*/
public long size() {
- return delegate.getSize();
+ try {
+ return delegate.size();
+ } catch (IOException e) {
+ // This can occur if the cache failed to lazily initialize.
+ return -1;
+ }
}
/**
@@ -225,7 +228,7 @@ public final class HttpResponseCache extends ResponseCache implements Closeable
* its data.
*/
public long maxSize() {
- return delegate.getMaxSize();
+ return delegate.maxSize();
}
/**
@@ -271,7 +274,7 @@ public final class HttpResponseCache extends ResponseCache implements Closeable
* will remain on the filesystem.
*/
@Override public void close() throws IOException {
- if (ResponseCache.getDefault() == this.delegate) {
+ if (ResponseCache.getDefault() == this) {
ResponseCache.setDefault(null);
}
delegate.close();
@@ -281,9 +284,16 @@ public final class HttpResponseCache extends ResponseCache implements Closeable
* Uninstalls the cache and deletes all of its stored contents.
*/
public void delete() throws IOException {
- if (ResponseCache.getDefault() == this.delegate) {
+ if (ResponseCache.getDefault() == this) {
ResponseCache.setDefault(null);
}
delegate.delete();
}
+
+ /** @hide Needed for OkHttp integration. */
+ @Override
+ public Cache getCache() {
+ return delegate.getCache();
+ }
+
}
diff --git a/core/java/android/net/http/HttpsConnection.java b/core/java/android/net/http/HttpsConnection.java
index 6bf01e2..a8674de 100644
--- a/core/java/android/net/http/HttpsConnection.java
+++ b/core/java/android/net/http/HttpsConnection.java
@@ -79,7 +79,7 @@ public class HttpsConnection extends Connection {
cache = FileClientSessionCache.usingDirectory(sessionDir);
}
- OpenSSLContextImpl sslContext = new OpenSSLContextImpl();
+ OpenSSLContextImpl sslContext = OpenSSLContextImpl.getPreferred();
// here, trust managers is a single trust-all manager
TrustManager[] trustManagers = new TrustManager[] {
diff --git a/core/java/android/net/http/X509TrustManagerExtensions.java b/core/java/android/net/http/X509TrustManagerExtensions.java
index 6a63a0c..bb36c20 100644
--- a/core/java/android/net/http/X509TrustManagerExtensions.java
+++ b/core/java/android/net/http/X509TrustManagerExtensions.java
@@ -36,7 +36,7 @@ import javax.net.ssl.X509TrustManager;
*/
public class X509TrustManagerExtensions {
- TrustManagerImpl mDelegate;
+ final TrustManagerImpl mDelegate;
/**
* Constructs a new X509TrustManagerExtensions wrapper.
@@ -48,6 +48,7 @@ public class X509TrustManagerExtensions {
if (tm instanceof TrustManagerImpl) {
mDelegate = (TrustManagerImpl) tm;
} else {
+ mDelegate = null;
throw new IllegalArgumentException("tm is an instance of " + tm.getClass().getName() +
" which is not a supported type of X509TrustManager");
}
diff --git a/core/java/android/nfc/IAppCallback.aidl b/core/java/android/nfc/IAppCallback.aidl
index 9599308..c027d54 100644
--- a/core/java/android/nfc/IAppCallback.aidl
+++ b/core/java/android/nfc/IAppCallback.aidl
@@ -24,7 +24,7 @@ import android.nfc.Tag;
*/
interface IAppCallback
{
- BeamShareData createBeamShareData();
- void onNdefPushComplete();
+ BeamShareData createBeamShareData(byte peerLlcpVersion);
+ void onNdefPushComplete(byte peerLlcpVersion);
void onTagDiscovered(in Tag tag);
}
diff --git a/core/java/android/nfc/NfcActivityManager.java b/core/java/android/nfc/NfcActivityManager.java
index d009295..76bd0ec 100644
--- a/core/java/android/nfc/NfcActivityManager.java
+++ b/core/java/android/nfc/NfcActivityManager.java
@@ -46,7 +46,6 @@ public final class NfcActivityManager extends IAppCallback.Stub
static final Boolean DBG = false;
final NfcAdapter mAdapter;
- final NfcEvent mDefaultEvent; // cached NfcEvent (its currently always the same)
// All objects in the lists are protected by this
final List<NfcApplicationState> mApps; // Application(s) that have NFC state. Usually one
@@ -200,7 +199,6 @@ public final class NfcActivityManager extends IAppCallback.Stub
mAdapter = adapter;
mActivities = new LinkedList<NfcActivityState>();
mApps = new ArrayList<NfcApplicationState>(1); // Android VM usually has 1 app
- mDefaultEvent = new NfcEvent(mAdapter);
}
public void enableReaderMode(Activity activity, ReaderCallback callback, int flags,
@@ -354,13 +352,14 @@ public final class NfcActivityManager extends IAppCallback.Stub
/** Callback from NFC service, usually on binder thread */
@Override
- public BeamShareData createBeamShareData() {
+ public BeamShareData createBeamShareData(byte peerLlcpVersion) {
NfcAdapter.CreateNdefMessageCallback ndefCallback;
NfcAdapter.CreateBeamUrisCallback urisCallback;
NdefMessage message;
Activity activity;
Uri[] uris;
int flags;
+ NfcEvent event = new NfcEvent(mAdapter, peerLlcpVersion);
synchronized (NfcActivityManager.this) {
NfcActivityState state = findResumedActivityState();
if (state == null) return null;
@@ -375,10 +374,10 @@ public final class NfcActivityManager extends IAppCallback.Stub
// Make callbacks without lock
if (ndefCallback != null) {
- message = ndefCallback.createNdefMessage(mDefaultEvent);
+ message = ndefCallback.createNdefMessage(event);
}
if (urisCallback != null) {
- uris = urisCallback.createBeamUris(mDefaultEvent);
+ uris = urisCallback.createBeamUris(event);
if (uris != null) {
ArrayList<Uri> validUris = new ArrayList<Uri>();
for (Uri uri : uris) {
@@ -412,7 +411,7 @@ public final class NfcActivityManager extends IAppCallback.Stub
/** Callback from NFC service, usually on binder thread */
@Override
- public void onNdefPushComplete() {
+ public void onNdefPushComplete(byte peerLlcpVersion) {
NfcAdapter.OnNdefPushCompleteCallback callback;
synchronized (NfcActivityManager.this) {
NfcActivityState state = findResumedActivityState();
@@ -420,10 +419,10 @@ public final class NfcActivityManager extends IAppCallback.Stub
callback = state.onNdefPushCompleteCallback;
}
-
+ NfcEvent event = new NfcEvent(mAdapter, peerLlcpVersion);
// Make callback without lock
if (callback != null) {
- callback.onNdefPushComplete(mDefaultEvent);
+ callback.onNdefPushComplete(event);
}
}
diff --git a/core/java/android/nfc/NfcEvent.java b/core/java/android/nfc/NfcEvent.java
index 860700a..cf1d71a 100644
--- a/core/java/android/nfc/NfcEvent.java
+++ b/core/java/android/nfc/NfcEvent.java
@@ -38,7 +38,14 @@ public final class NfcEvent {
*/
public final NfcAdapter nfcAdapter;
- NfcEvent(NfcAdapter nfcAdapter) {
+ /**
+ * The LLCP version of the peer associated with the NFC event.
+ * The major version is in the top nibble, the minor version is in the bottom nibble.
+ */
+ public final byte peerLlcpVersion;
+
+ NfcEvent(NfcAdapter nfcAdapter, byte peerLlcpVersion) {
this.nfcAdapter = nfcAdapter;
+ this.peerLlcpVersion = peerLlcpVersion;
}
}
diff --git a/core/java/android/nfc/cardemulation/ApduServiceInfo.java b/core/java/android/nfc/cardemulation/ApduServiceInfo.java
index 00b2ee3..f10e530 100644
--- a/core/java/android/nfc/cardemulation/ApduServiceInfo.java
+++ b/core/java/android/nfc/cardemulation/ApduServiceInfo.java
@@ -40,6 +40,7 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -262,7 +263,7 @@ public final class ApduServiceInfo implements Parcelable {
* for that category.
* @return List of AIDs registered by the service
*/
- public ArrayList<String> getAids() {
+ public List<String> getAids() {
final ArrayList<String> aids = new ArrayList<String>();
for (AidGroup group : getAidGroups()) {
aids.addAll(group.aids);
@@ -270,6 +271,18 @@ public final class ApduServiceInfo implements Parcelable {
return aids;
}
+ public List<String> getPrefixAids() {
+ final ArrayList<String> prefixAids = new ArrayList<String>();
+ for (AidGroup group : getAidGroups()) {
+ for (String aid : group.aids) {
+ if (aid.endsWith("*")) {
+ prefixAids.add(aid);
+ }
+ }
+ }
+ return prefixAids;
+ }
+
/**
* Returns the registered AID group for this category.
*/
diff --git a/core/java/android/nfc/tech/Ndef.java b/core/java/android/nfc/tech/Ndef.java
index 5852ce4..fdccaae 100644
--- a/core/java/android/nfc/tech/Ndef.java
+++ b/core/java/android/nfc/tech/Ndef.java
@@ -51,7 +51,7 @@ import java.io.IOException;
* {@link Ndef} on NFC Forum Tag Types 1-4, and implement all NDEF operations
* as defined in this class.
*
- * <p>Some vendors have there own well defined specifications for storing NDEF data
+ * <p>Some vendors have their own well defined specifications for storing NDEF data
* on tags that do not fall into the above categories. Android devices with NFC
* should enumerate and implement {@link Ndef} under these vendor specifications
* where possible, but it is not mandatory. {@link #getType} returns a String
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 4b0cef6..b209690 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -518,7 +518,8 @@ public class Build {
* <p>Applications targeting this or a later release will get these
* new changes in behavior:</p>
* <ul>
- * <li> The default result of {android.preference.PreferenceActivity#isValidFragment
+ * <li> The default result of
+ * {@link android.preference.PreferenceActivity#isValidFragment(String)
* PreferenceActivity.isValueFragment} becomes false instead of true.</li>
* <li> In {@link android.webkit.WebView}, apps targeting earlier versions will have
* JS URLs evaluated directly and any result of the evaluation will not replace
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java
index b8178b4..2a60b4d 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -34,6 +34,7 @@ import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.Map;
import org.apache.harmony.dalvik.ddmc.Chunk;
import org.apache.harmony.dalvik.ddmc.ChunkHandler;
@@ -104,7 +105,7 @@ public final class Debug
/**
* This class is used to retrieved various statistics about the memory mappings for this
- * process. The returns info broken down by dalvik, native, and other. All results are in kB.
+ * process. The returned info is broken down by dalvik, native, and other. All results are in kB.
*/
public static class MemoryInfo implements Parcelable {
/** The proportional set size for dalvik heap. (Doesn't include other Dalvik overhead.) */
@@ -1035,6 +1036,95 @@ href="{@docRoot}guide/developing/tools/traceview.html">Traceview: A Graphical Lo
}
/**
+ * Returns the value of a particular runtime statistic or {@code null} if no
+ * such runtime statistic exists.
+ *
+ * <p>The following table lists the runtime statistics that the runtime supports.
+ * Note runtime statistics may be added or removed in a future API level.</p>
+ *
+ * <table>
+ * <thead>
+ * <tr>
+ * <th>Runtime statistic name</th>
+ * <th>Meaning</th>
+ * <th>Example</th>
+ * <th>Supported (API Levels)</th>
+ * </tr>
+ * </thead>
+ * <tbody>
+ * <tr>
+ * <td>art.gc.gc-count</td>
+ * <td>The number of garbage collection runs.</td>
+ * <td>{@code 164}</td>
+ * <td>23</td>
+ * </tr>
+ * <tr>
+ * <td>art.gc.gc-time</td>
+ * <td>The total duration of garbage collection runs in ms.</td>
+ * <td>{@code 62364}</td>
+ * <td>23</td>
+ * </tr>
+ * <tr>
+ * <td>art.gc.bytes-allocated</td>
+ * <td>The total number of bytes that the application allocated.</td>
+ * <td>{@code 1463948408}</td>
+ * <td>23</td>
+ * </tr>
+ * <tr>
+ * <td>art.gc.bytes-freed</td>
+ * <td>The total number of bytes that garbage collection reclaimed.</td>
+ * <td>{@code 1313493084}</td>
+ * <td>23</td>
+ * </tr>
+ * <tr>
+ * <td>art.gc.blocking-gc-count</td>
+ * <td>The number of blocking garbage collection runs.</td>
+ * <td>{@code 2}</td>
+ * <td>23</td>
+ * </tr>
+ * <tr>
+ * <td>art.gc.blocking-gc-time</td>
+ * <td>The total duration of blocking garbage collection runs in ms.</td>
+ * <td>{@code 804}</td>
+ * <td>23</td>
+ * </tr>
+ * <tr>
+ * <td>art.gc.gc-count-rate-histogram</td>
+ * <td>The histogram of the number of garbage collection runs per 10 seconds.</td>
+ * <td>{@code 0:34503,1:45350,2:11281,3:8088,4:43,5:8}</td>
+ * <td>23</td>
+ * </tr>
+ * <tr>
+ * <td>art.gc.blocking-gc-count-rate-histogram</td>
+ * <td>The histogram of the number of garbage collection runs per 10 seconds.</td>
+ * <td>{@code 0:99269,1:1,2:1}</td>
+ * <td>23</td>
+ * </tr>
+ * </tbody>
+ * </table>
+ *
+ * @param statName
+ * the name of the runtime statistic to look up.
+ * @return the value of the specified runtime statistic or {@code null} if the
+ * runtime statistic doesn't exist.
+ * @hide
+ */
+ public static String getRuntimeStat(String statName) {
+ return VMDebug.getRuntimeStat(statName);
+ }
+
+ /**
+ * Returns a map of the names/values of the runtime statistics
+ * that {@link #getRuntimeStat(String)} supports.
+ *
+ * @return a map of the names/values of the supported runtime statistics.
+ * @hide
+ */
+ public static Map<String, String> getRuntimeStats() {
+ return VMDebug.getRuntimeStats();
+ }
+
+ /**
* Returns the size of the native heap.
* @return The size of the native heap in bytes.
*/
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index 5d5d2b3..f0660eb 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -289,6 +289,8 @@ interface INetworkManagementService
*/
void setUidNetworkRules(int uid, boolean rejectOnQuotaInterfaces);
+ void setUidCleartextNetworkPolicy(int uid, int policy);
+
/**
* Return status of bandwidth control module.
*/
diff --git a/core/java/android/os/IProcessInfoService.aidl b/core/java/android/os/IProcessInfoService.aidl
new file mode 100644
index 0000000..c98daa2
--- /dev/null
+++ b/core/java/android/os/IProcessInfoService.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright 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 android.os;
+
+/** {@hide} */
+interface IProcessInfoService
+{
+ /**
+ * For each PID in the given input array, write the current process state
+ * for that process into the output array, or ActivityManager.PROCESS_STATE_NONEXISTENT
+ * to indicate that no process with the given PID exists.
+ */
+ void getProcessStatesFromPids(in int[] pids, out int[] states);
+}
+
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index 21a9904..0de9c70 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -614,9 +614,9 @@ public class Process {
synchronized(Process.class) {
ArrayList<String> argsForZygote = new ArrayList<String>();
- // --runtime-init, --setuid=, --setgid=,
+ // --runtime-args, --setuid=, --setgid=,
// and --setgroups= must go first
- argsForZygote.add("--runtime-init");
+ argsForZygote.add("--runtime-args");
argsForZygote.add("--setuid=" + uid);
argsForZygote.add("--setgid=" + gid);
if ((debugFlags & Zygote.DEBUG_ENABLE_JNI_LOGGING) != 0) {
@@ -631,6 +631,9 @@ public class Process {
if ((debugFlags & Zygote.DEBUG_ENABLE_CHECKJNI) != 0) {
argsForZygote.add("--enable-checkjni");
}
+ if ((debugFlags & Zygote.DEBUG_ENABLE_JIT) != 0) {
+ argsForZygote.add("--enable-jit");
+ }
if ((debugFlags & Zygote.DEBUG_ENABLE_ASSERT) != 0) {
argsForZygote.add("--enable-assert");
}
diff --git a/core/java/android/os/SELinux.java b/core/java/android/os/SELinux.java
index 84aa427..2773da5 100644
--- a/core/java/android/os/SELinux.java
+++ b/core/java/android/os/SELinux.java
@@ -50,13 +50,6 @@ public class SELinux {
public static final native boolean isSELinuxEnforced();
/**
- * Set whether SELinux is permissive or enforcing.
- * @param value representing whether to set SELinux to enforcing
- * @return a boolean representing whether the desired mode was set
- */
- public static final native boolean setSELinuxEnforce(boolean value);
-
- /**
* Sets the security context for newly created file objects.
* @param context a security context given as a String.
* @return a boolean indicating whether the operation succeeded.
@@ -99,27 +92,6 @@ public class SELinux {
public static final native String getPidContext(int pid);
/**
- * Gets a list of the SELinux boolean names.
- * @return an array of strings containing the SELinux boolean names.
- */
- public static final native String[] getBooleanNames();
-
- /**
- * Gets the value for the given SELinux boolean name.
- * @param name The name of the SELinux boolean.
- * @return a boolean indicating whether the SELinux boolean is set.
- */
- public static final native boolean getBooleanValue(String name);
-
- /**
- * Sets the value for the given SELinux boolean name.
- * @param name The name of the SELinux boolean.
- * @param value The new value of the SELinux boolean.
- * @return a boolean indicating whether or not the operation succeeded.
- */
- public static final native boolean setBooleanValue(String name, boolean value);
-
- /**
* Check permissions between two security contexts.
* @param scon The source or subject security context.
* @param tcon The target or object security context.
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
index 6db5f67..5018711 100644
--- a/core/java/android/os/StrictMode.java
+++ b/core/java/android/os/StrictMode.java
@@ -32,14 +32,17 @@ import android.util.Slog;
import android.view.IWindowManager;
import com.android.internal.os.RuntimeInit;
-
import com.android.internal.util.FastPrintWriter;
+import com.android.internal.util.HexDump;
+
import dalvik.system.BlockGuard;
import dalvik.system.CloseGuard;
import dalvik.system.VMDebug;
import java.io.PrintWriter;
import java.io.StringWriter;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -137,6 +140,13 @@ public final class StrictMode {
*/
public static final String VISUAL_PROPERTY = "persist.sys.strictmode.visual";
+ /**
+ * Temporary property used to include {@link #DETECT_VM_CLEARTEXT_NETWORK}
+ * in {@link VmPolicy.Builder#detectAll()}. Apps can still always opt-into
+ * detection using {@link VmPolicy.Builder#detectCleartextNetwork()}.
+ */
+ private static final String CLEARTEXT_PROPERTY = "persist.sys.strictmode.nonssl";
+
// Only log a duplicate stack trace to the logs every second.
private static final long MIN_LOG_INTERVAL_MS = 1000;
@@ -150,7 +160,7 @@ public final class StrictMode {
// of the Looper.
private static final int MAX_OFFENSES_PER_LOOP = 10;
- // Thread-policy:
+ // Byte 1: Thread-policy
/**
* @hide
@@ -177,83 +187,91 @@ public final class StrictMode {
private static final int ALL_THREAD_DETECT_BITS =
DETECT_DISK_WRITE | DETECT_DISK_READ | DETECT_NETWORK | DETECT_CUSTOM;
- // Process-policy:
+ // Byte 2: Process-policy
/**
* Note, a "VM_" bit, not thread.
* @hide
*/
- public static final int DETECT_VM_CURSOR_LEAKS = 0x200; // for VmPolicy
+ public static final int DETECT_VM_CURSOR_LEAKS = 0x01 << 8; // for VmPolicy
/**
* Note, a "VM_" bit, not thread.
* @hide
*/
- public static final int DETECT_VM_CLOSABLE_LEAKS = 0x400; // for VmPolicy
+ public static final int DETECT_VM_CLOSABLE_LEAKS = 0x02 << 8; // for VmPolicy
/**
* Note, a "VM_" bit, not thread.
* @hide
*/
- public static final int DETECT_VM_ACTIVITY_LEAKS = 0x800; // for VmPolicy
+ public static final int DETECT_VM_ACTIVITY_LEAKS = 0x04 << 8; // for VmPolicy
+
+ /**
+ * @hide
+ */
+ private static final int DETECT_VM_INSTANCE_LEAKS = 0x08 << 8; // for VmPolicy
/**
* @hide
*/
- private static final int DETECT_VM_INSTANCE_LEAKS = 0x1000; // for VmPolicy
+ public static final int DETECT_VM_REGISTRATION_LEAKS = 0x10 << 8; // for VmPolicy
/**
* @hide
*/
- public static final int DETECT_VM_REGISTRATION_LEAKS = 0x2000; // for VmPolicy
+ private static final int DETECT_VM_FILE_URI_EXPOSURE = 0x20 << 8; // for VmPolicy
/**
* @hide
*/
- private static final int DETECT_VM_FILE_URI_EXPOSURE = 0x4000; // for VmPolicy
+ private static final int DETECT_VM_CLEARTEXT_NETWORK = 0x40 << 8; // for VmPolicy
private static final int ALL_VM_DETECT_BITS =
DETECT_VM_CURSOR_LEAKS | DETECT_VM_CLOSABLE_LEAKS |
DETECT_VM_ACTIVITY_LEAKS | DETECT_VM_INSTANCE_LEAKS |
- DETECT_VM_REGISTRATION_LEAKS | DETECT_VM_FILE_URI_EXPOSURE;
+ DETECT_VM_REGISTRATION_LEAKS | DETECT_VM_FILE_URI_EXPOSURE |
+ DETECT_VM_CLEARTEXT_NETWORK;
+
+ // Byte 3: Penalty
/**
* @hide
*/
- public static final int PENALTY_LOG = 0x10; // normal android.util.Log
+ public static final int PENALTY_LOG = 0x01 << 16; // normal android.util.Log
// Used for both process and thread policy:
/**
* @hide
*/
- public static final int PENALTY_DIALOG = 0x20;
+ public static final int PENALTY_DIALOG = 0x02 << 16;
/**
* Death on any detected violation.
*
* @hide
*/
- public static final int PENALTY_DEATH = 0x40;
+ public static final int PENALTY_DEATH = 0x04 << 16;
/**
* Death just for detected network usage.
*
* @hide
*/
- public static final int PENALTY_DEATH_ON_NETWORK = 0x200;
+ public static final int PENALTY_DEATH_ON_NETWORK = 0x08 << 16;
/**
* Flash the screen during violations.
*
* @hide
*/
- public static final int PENALTY_FLASH = 0x800;
+ public static final int PENALTY_FLASH = 0x10 << 16;
/**
* @hide
*/
- public static final int PENALTY_DROPBOX = 0x80;
+ public static final int PENALTY_DROPBOX = 0x20 << 16;
/**
* Non-public penalty mode which overrides all the other penalty
@@ -266,7 +284,14 @@ public final class StrictMode {
*
* @hide
*/
- public static final int PENALTY_GATHER = 0x100;
+ public static final int PENALTY_GATHER = 0x40 << 16;
+
+ /**
+ * Death when cleartext network traffic is detected.
+ *
+ * @hide
+ */
+ public static final int PENALTY_DEATH_ON_CLEARTEXT_NETWORK = 0x80 << 16;
/**
* Mask of all the penalty bits valid for thread policies.
@@ -275,13 +300,18 @@ public final class StrictMode {
PENALTY_LOG | PENALTY_DIALOG | PENALTY_DEATH | PENALTY_DROPBOX | PENALTY_GATHER |
PENALTY_DEATH_ON_NETWORK | PENALTY_FLASH;
-
/**
* Mask of all the penalty bits valid for VM policies.
*/
- private static final int VM_PENALTY_MASK =
- PENALTY_LOG | PENALTY_DEATH | PENALTY_DROPBOX;
+ private static final int VM_PENALTY_MASK = PENALTY_LOG | PENALTY_DEATH | PENALTY_DROPBOX
+ | PENALTY_DEATH_ON_CLEARTEXT_NETWORK;
+ /** {@hide} */
+ public static final int NETWORK_POLICY_ACCEPT = 0;
+ /** {@hide} */
+ public static final int NETWORK_POLICY_LOG = 1;
+ /** {@hide} */
+ public static final int NETWORK_POLICY_REJECT = 2;
// TODO: wrap in some ImmutableHashMap thing.
// Note: must be before static initialization of sVmPolicy.
@@ -636,9 +666,17 @@ public final class StrictMode {
* but will likely expand in future releases.
*/
public Builder detectAll() {
- return enable(DETECT_VM_ACTIVITY_LEAKS | DETECT_VM_CURSOR_LEAKS
+ int flags = DETECT_VM_ACTIVITY_LEAKS | DETECT_VM_CURSOR_LEAKS
| DETECT_VM_CLOSABLE_LEAKS | DETECT_VM_REGISTRATION_LEAKS
- | DETECT_VM_FILE_URI_EXPOSURE);
+ | DETECT_VM_FILE_URI_EXPOSURE;
+
+ // TODO: always add DETECT_VM_CLEARTEXT_NETWORK once we have facility
+ // for apps to mark sockets that should be ignored
+ if (SystemProperties.getBoolean(CLEARTEXT_PROPERTY, false)) {
+ flags |= DETECT_VM_CLEARTEXT_NETWORK;
+ }
+
+ return enable(flags);
}
/**
@@ -686,15 +724,49 @@ public final class StrictMode {
}
/**
- * Crashes the whole process on violation. This penalty runs at
- * the end of all enabled penalties so yo you'll still get
- * your logging or other violations before the process dies.
+ * Detect any network traffic from the calling app which is not
+ * wrapped in SSL/TLS. This can help you detect places that your app
+ * is inadvertently sending cleartext data across the network.
+ * <p>
+ * Using {@link #penaltyDeath()} or
+ * {@link #penaltyDeathOnCleartextNetwork()} will block further
+ * traffic on that socket to prevent accidental data leakage, in
+ * addition to crashing your process.
+ * <p>
+ * Using {@link #penaltyDropBox()} will log the raw contents of the
+ * packet that triggered the violation.
+ * <p>
+ * This inspects both IPv4/IPv6 and TCP/UDP network traffic, but it
+ * may be subject to false positives, such as when STARTTLS
+ * protocols or HTTP proxies are used.
+ *
+ * @hide
+ */
+ public Builder detectCleartextNetwork() {
+ return enable(DETECT_VM_CLEARTEXT_NETWORK);
+ }
+
+ /**
+ * Crashes the whole process on violation. This penalty runs at the
+ * end of all enabled penalties so you'll still get your logging or
+ * other violations before the process dies.
*/
public Builder penaltyDeath() {
return enable(PENALTY_DEATH);
}
/**
+ * Crashes the whole process when cleartext network traffic is
+ * detected.
+ *
+ * @see #detectCleartextNetwork()
+ * @hide
+ */
+ public Builder penaltyDeathOnCleartextNetwork() {
+ return enable(PENALTY_DEATH_ON_CLEARTEXT_NETWORK);
+ }
+
+ /**
* Log detected violations to the system log.
*/
public Builder penaltyLog() {
@@ -1422,7 +1494,7 @@ public final class StrictMode {
}
private static class AndroidCloseGuardReporter implements CloseGuard.Reporter {
- public void report (String message, Throwable allocationSite) {
+ public void report(String message, Throwable allocationSite) {
onVmPolicyViolation(message, allocationSite);
}
}
@@ -1508,6 +1580,27 @@ public final class StrictMode {
sIsIdlerRegistered = true;
}
}
+
+ int networkPolicy = NETWORK_POLICY_ACCEPT;
+ if ((sVmPolicyMask & DETECT_VM_CLEARTEXT_NETWORK) != 0) {
+ if ((sVmPolicyMask & PENALTY_DEATH) != 0
+ || (sVmPolicyMask & PENALTY_DEATH_ON_CLEARTEXT_NETWORK) != 0) {
+ networkPolicy = NETWORK_POLICY_REJECT;
+ } else {
+ networkPolicy = NETWORK_POLICY_LOG;
+ }
+ }
+
+ final INetworkManagementService netd = INetworkManagementService.Stub.asInterface(
+ ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE));
+ if (netd != null) {
+ try {
+ netd.setUidCleartextNetworkPolicy(android.os.Process.myUid(), networkPolicy);
+ } catch (RemoteException ignored) {
+ }
+ } else if (networkPolicy != NETWORK_POLICY_ACCEPT) {
+ Log.w(TAG, "Dropping requested network policy due to missing service!");
+ }
}
}
@@ -1570,6 +1663,13 @@ public final class StrictMode {
/**
* @hide
*/
+ public static boolean vmCleartextNetworkEnabled() {
+ return (sVmPolicyMask & DETECT_VM_CLEARTEXT_NETWORK) != 0;
+ }
+
+ /**
+ * @hide
+ */
public static void onSqliteObjectLeaked(String message, Throwable originStack) {
onVmPolicyViolation(message, originStack);
}
@@ -1600,7 +1700,39 @@ public final class StrictMode {
*/
public static void onFileUriExposed(String location) {
final String message = "file:// Uri exposed through " + location;
- onVmPolicyViolation(message, new Throwable(message));
+ onVmPolicyViolation(null, new Throwable(message));
+ }
+
+ /**
+ * @hide
+ */
+ public static void onCleartextNetworkDetected(byte[] firstPacket) {
+ byte[] rawAddr = null;
+ if (firstPacket != null) {
+ if (firstPacket.length >= 20 && (firstPacket[0] & 0xf0) == 0x40) {
+ // IPv4
+ rawAddr = new byte[4];
+ System.arraycopy(firstPacket, 16, rawAddr, 0, 4);
+ } else if (firstPacket.length >= 40 && (firstPacket[0] & 0xf0) == 0x60) {
+ // IPv6
+ rawAddr = new byte[16];
+ System.arraycopy(firstPacket, 24, rawAddr, 0, 16);
+ }
+ }
+
+ final int uid = android.os.Process.myUid();
+ String msg = "Detected cleartext network traffic from UID " + uid;
+ if (rawAddr != null) {
+ try {
+ msg = "Detected cleartext network traffic from UID " + uid + " to "
+ + InetAddress.getByAddress(rawAddr);
+ } catch (UnknownHostException ignored) {
+ }
+ }
+
+ final boolean forceDeath = (sVmPolicyMask & PENALTY_DEATH_ON_CLEARTEXT_NETWORK) != 0;
+ onVmPolicyViolation(HexDump.dumpHexString(firstPacket).trim(), new Throwable(msg),
+ forceDeath);
}
// Map from VM violation fingerprint to uptime millis.
@@ -1610,10 +1742,18 @@ public final class StrictMode {
* @hide
*/
public static void onVmPolicyViolation(String message, Throwable originStack) {
+ onVmPolicyViolation(message, originStack, false);
+ }
+
+ /**
+ * @hide
+ */
+ public static void onVmPolicyViolation(String message, Throwable originStack,
+ boolean forceDeath) {
final boolean penaltyDropbox = (sVmPolicyMask & PENALTY_DROPBOX) != 0;
- final boolean penaltyDeath = (sVmPolicyMask & PENALTY_DEATH) != 0;
+ final boolean penaltyDeath = ((sVmPolicyMask & PENALTY_DEATH) != 0) || forceDeath;
final boolean penaltyLog = (sVmPolicyMask & PENALTY_LOG) != 0;
- final ViolationInfo info = new ViolationInfo(originStack, sVmPolicyMask);
+ final ViolationInfo info = new ViolationInfo(message, originStack, sVmPolicyMask);
// Erase stuff not relevant for process-wide violations
info.numAnimationsRunning = 0;
@@ -2057,6 +2197,8 @@ public final class StrictMode {
* @hide
*/
public static class ViolationInfo {
+ public String message;
+
/**
* Stack and other stuff info.
*/
@@ -2118,10 +2260,15 @@ public final class StrictMode {
policy = 0;
}
+ public ViolationInfo(Throwable tr, int policy) {
+ this(null, tr, policy);
+ }
+
/**
* Create an instance of ViolationInfo initialized from an exception.
*/
- public ViolationInfo(Throwable tr, int policy) {
+ public ViolationInfo(String message, Throwable tr, int policy) {
+ this.message = message;
crashInfo = new ApplicationErrorReport.CrashInfo(tr);
violationUptimeMillis = SystemClock.uptimeMillis();
this.policy = policy;
@@ -2184,6 +2331,7 @@ public final class StrictMode {
* and the gathering penalty should be removed.
*/
public ViolationInfo(Parcel in, boolean unsetGatheringBit) {
+ message = in.readString();
crashInfo = new ApplicationErrorReport.CrashInfo(in);
int rawPolicy = in.readInt();
if (unsetGatheringBit) {
@@ -2204,6 +2352,7 @@ public final class StrictMode {
* Save a ViolationInfo instance to a parcel.
*/
public void writeToParcel(Parcel dest, int flags) {
+ dest.writeString(message);
crashInfo.writeToParcel(dest, flags);
int start = dest.dataPosition();
dest.writeInt(policy);
diff --git a/core/java/android/os/UEventObserver.java b/core/java/android/os/UEventObserver.java
index 9dbfd50..5c80ca6 100644
--- a/core/java/android/os/UEventObserver.java
+++ b/core/java/android/os/UEventObserver.java
@@ -22,13 +22,13 @@ import java.util.ArrayList;
import java.util.HashMap;
/**
- * UEventObserver is an abstract class that receives UEvent's from the kernel.<p>
+ * UEventObserver is an abstract class that receives UEvents from the kernel.<p>
*
* Subclass UEventObserver, implementing onUEvent(UEvent event), then call
* startObserving() with a match string. The UEvent thread will then call your
* onUEvent() method when a UEvent occurs that contains your match string.<p>
*
- * Call stopObserving() to stop receiving UEvent's.<p>
+ * Call stopObserving() to stop receiving UEvents.<p>
*
* There is only one UEvent thread per process, even if that process has
* multiple UEventObserver subclass instances. The UEvent thread starts when
@@ -78,7 +78,7 @@ public abstract class UEventObserver {
}
/**
- * Begin observation of UEvent's.<p>
+ * Begin observation of UEvents.<p>
* This method will cause the UEvent thread to start if this is the first
* invocation of startObserving in this process.<p>
* Once called, the UEvent thread will call onUEvent() when an incoming
@@ -103,7 +103,7 @@ public abstract class UEventObserver {
}
/**
- * End observation of UEvent's.<p>
+ * End observation of UEvents.<p>
* This process's UEvent thread will never call onUEvent() on this
* UEventObserver after this call. Repeated calls have no effect.
*/
diff --git a/core/java/android/preference/Preference.java b/core/java/android/preference/Preference.java
index 0224c73..d989cd1 100644
--- a/core/java/android/preference/Preference.java
+++ b/core/java/android/preference/Preference.java
@@ -1426,7 +1426,7 @@ public class Preference implements Comparable<Preference> {
protected boolean persistString(String value) {
if (shouldPersist()) {
// Shouldn't store null
- if (value == getPersistedString(null)) {
+ if (TextUtils.equals(value, getPersistedString(null))) {
// It's already there, so the same as persisting
return true;
}
diff --git a/core/java/android/print/PrintDocumentInfo.java b/core/java/android/print/PrintDocumentInfo.java
index e4e753e..44e6410 100644
--- a/core/java/android/print/PrintDocumentInfo.java
+++ b/core/java/android/print/PrintDocumentInfo.java
@@ -212,7 +212,7 @@ public final class PrintDocumentInfo implements Parcelable {
result = prime * result + mContentType;
result = prime * result + mPageCount;
result = prime * result + (int) mDataSize;
- result = prime * result + (int) mDataSize >> 32;
+ result = prime * result + (int) (mDataSize >> 32);
return result;
}
diff --git a/core/java/android/printservice/PrintService.java b/core/java/android/printservice/PrintService.java
index c5aee7b..ae95854 100644
--- a/core/java/android/printservice/PrintService.java
+++ b/core/java/android/printservice/PrintService.java
@@ -386,7 +386,7 @@ public abstract class PrintService extends Service {
@Override
public void setClient(IPrintServiceClient client) {
- mHandler.obtainMessage(ServiceHandler.MSG_SET_CLEINT, client)
+ mHandler.obtainMessage(ServiceHandler.MSG_SET_CLIENT, client)
.sendToTarget();
}
@@ -414,7 +414,7 @@ public abstract class PrintService extends Service {
public static final int MSG_STOP_PRINTER_STATE_TRACKING = 7;
public static final int MSG_ON_PRINTJOB_QUEUED = 8;
public static final int MSG_ON_REQUEST_CANCEL_PRINTJOB = 9;
- public static final int MSG_SET_CLEINT = 10;
+ public static final int MSG_SET_CLIENT = 10;
public ServiceHandler(Looper looper) {
super(looper, null, true);
@@ -528,9 +528,9 @@ public abstract class PrintService extends Service {
onPrintJobQueued(new PrintJob(printJobInfo, mClient));
} break;
- case MSG_SET_CLEINT: {
+ case MSG_SET_CLIENT: {
if (DEBUG) {
- Log.i(LOG_TAG, "MSG_SET_CLEINT "
+ Log.i(LOG_TAG, "MSG_SET_CLIENT "
+ getPackageName());
}
mClient = (IPrintServiceClient) message.obj;
diff --git a/core/java/android/provider/DocumentsProvider.java b/core/java/android/provider/DocumentsProvider.java
index 4135e8b..1316471 100644
--- a/core/java/android/provider/DocumentsProvider.java
+++ b/core/java/android/provider/DocumentsProvider.java
@@ -355,7 +355,7 @@ public abstract class DocumentsProvider extends ContentProvider {
}
/**
- * Return documents that that match the given query under the requested
+ * Return documents that match the given query under the requested
* root. The returned documents should be sorted by relevance in descending
* order. How documents are matched against the query string is an
* implementation detail left to each provider, but it's suggested that at
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 92349338..ef0f72f 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -6379,14 +6379,7 @@ public final class Settings {
public static final String CALL_AUTO_RETRY = "call_auto_retry";
/**
- * The preferred network mode 7 = Global
- * 6 = EvDo only
- * 5 = CDMA w/o EvDo
- * 4 = CDMA / EvDo auto
- * 3 = GSM / WCDMA auto
- * 2 = WCDMA only
- * 1 = GSM only
- * 0 = GSM / WCDMA preferred
+ * See RIL_PreferredNetworkType in ril.h
* @hide
*/
public static final String PREFERRED_NETWORK_MODE =
diff --git a/core/java/android/security/IKeystoreService.aidl b/core/java/android/security/IKeystoreService.aidl
new file mode 100644
index 0000000..579cdbe
--- /dev/null
+++ b/core/java/android/security/IKeystoreService.aidl
@@ -0,0 +1,78 @@
+/**
+ * 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 android.security;
+
+import android.security.keymaster.ExportResult;
+import android.security.keymaster.KeyCharacteristics;
+import android.security.keymaster.KeymasterArguments;
+import android.security.keymaster.KeymasterBlob;
+import android.security.keymaster.OperationResult;
+import android.security.KeystoreArguments;
+
+/**
+ * This must be kept manually in sync with system/security/keystore until AIDL
+ * can generate both Java and C++ bindings.
+ *
+ * @hide
+ */
+interface IKeystoreService {
+ int test();
+ byte[] get(String name);
+ int insert(String name, in byte[] item, int uid, int flags);
+ int del(String name, int uid);
+ int exist(String name, int uid);
+ String[] saw(String namePrefix, int uid);
+ int reset();
+ int password(String password);
+ int lock();
+ int unlock(String password);
+ int zero();
+ int generate(String name, int uid, int keyType, int keySize, int flags,
+ in KeystoreArguments args);
+ int import_key(String name, in byte[] data, int uid, int flags);
+ byte[] sign(String name, in byte[] data);
+ int verify(String name, in byte[] data, in byte[] signature);
+ byte[] get_pubkey(String name);
+ int del_key(String name, int uid);
+ int grant(String name, int granteeUid);
+ int ungrant(String name, int granteeUid);
+ long getmtime(String name);
+ int duplicate(String srcKey, int srcUid, String destKey, int destUid);
+ int is_hardware_backed(String string);
+ int clear_uid(long uid);
+ int reset_uid(int uid);
+ int sync_uid(int sourceUid, int targetUid);
+ int password_uid(String password, int uid);
+
+ // Keymaster 0.4 methods
+ int addRngEntropy(in byte[] data);
+ int generateKey(String alias, in KeymasterArguments arguments, in byte[] entropy, int uid,
+ int flags, out KeyCharacteristics characteristics);
+ int getKeyCharacteristics(String alias, in KeymasterBlob clientId, in KeymasterBlob appId,
+ out KeyCharacteristics characteristics);
+ int importKey(String alias, in KeymasterArguments arguments, int format,
+ in byte[] keyData, int uid, int flags, out KeyCharacteristics characteristics);
+ ExportResult exportKey(String alias, int format, in KeymasterBlob clientId,
+ in KeymasterBlob appId);
+ OperationResult begin(IBinder appToken, String alias, int purpose, boolean pruneable,
+ in KeymasterArguments params, in byte[] entropy, out KeymasterArguments operationParams);
+ OperationResult update(IBinder token, in KeymasterArguments params, in byte[] input);
+ OperationResult finish(IBinder token, in KeymasterArguments params, in byte[] signature);
+ int abort(IBinder handle);
+ boolean isOperationAuthorized(IBinder token);
+ int addAuthToken(in byte[] authToken);
+}
diff --git a/core/java/android/security/IKeystoreService.java b/core/java/android/security/IKeystoreService.java
deleted file mode 100644
index 7e9aba0..0000000
--- a/core/java/android/security/IKeystoreService.java
+++ /dev/null
@@ -1,662 +0,0 @@
-/*
- * 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 android.security;
-
-import android.os.Binder;
-import android.os.IBinder;
-import android.os.IInterface;
-import android.os.Parcel;
-import android.os.RemoteException;
-
-/**
- * This must be kept manually in sync with system/security/keystore until AIDL
- * can generate both Java and C++ bindings.
- *
- * @hide
- */
-public interface IKeystoreService extends IInterface {
- public static abstract class Stub extends Binder implements IKeystoreService {
- private static class Proxy implements IKeystoreService {
- private final IBinder mRemote;
-
- Proxy(IBinder remote) {
- mRemote = remote;
- }
-
- public IBinder asBinder() {
- return mRemote;
- }
-
- public String getInterfaceDescriptor() {
- return DESCRIPTOR;
- }
-
- public int test() throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- mRemote.transact(Stub.TRANSACTION_test, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public byte[] get(String name) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- byte[] _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- mRemote.transact(Stub.TRANSACTION_get, _data, _reply, 0);
- _reply.readException();
- _result = _reply.createByteArray();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int insert(String name, byte[] item, int uid, int flags) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeByteArray(item);
- _data.writeInt(uid);
- _data.writeInt(flags);
- mRemote.transact(Stub.TRANSACTION_insert, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int del(String name, int uid) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeInt(uid);
- mRemote.transact(Stub.TRANSACTION_del, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int exist(String name, int uid) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeInt(uid);
- mRemote.transact(Stub.TRANSACTION_exist, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public String[] saw(String name, int uid) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- String[] _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeInt(uid);
- mRemote.transact(Stub.TRANSACTION_saw, _data, _reply, 0);
- _reply.readException();
- int size = _reply.readInt();
- _result = new String[size];
- for (int i = 0; i < size; i++) {
- _result[i] = _reply.readString();
- }
- int _ret = _reply.readInt();
- if (_ret != 1) {
- return null;
- }
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- @Override
- public int reset() throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- mRemote.transact(Stub.TRANSACTION_reset, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int password(String password) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(password);
- mRemote.transact(Stub.TRANSACTION_password, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int lock() throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- mRemote.transact(Stub.TRANSACTION_lock, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int unlock(String password) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(password);
- mRemote.transact(Stub.TRANSACTION_unlock, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- @Override
- public int zero() throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- mRemote.transact(Stub.TRANSACTION_zero, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int generate(String name, int uid, int keyType, int keySize, int flags,
- byte[][] args) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeInt(uid);
- _data.writeInt(keyType);
- _data.writeInt(keySize);
- _data.writeInt(flags);
- if (args == null) {
- _data.writeInt(0);
- } else {
- _data.writeInt(args.length);
- for (int i = 0; i < args.length; i++) {
- _data.writeByteArray(args[i]);
- }
- }
- mRemote.transact(Stub.TRANSACTION_generate, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int import_key(String name, byte[] data, int uid, int flags)
- throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeByteArray(data);
- _data.writeInt(uid);
- _data.writeInt(flags);
- mRemote.transact(Stub.TRANSACTION_import, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public byte[] sign(String name, byte[] data) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- byte[] _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeByteArray(data);
- mRemote.transact(Stub.TRANSACTION_sign, _data, _reply, 0);
- _reply.readException();
- _result = _reply.createByteArray();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int verify(String name, byte[] data, byte[] signature) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeByteArray(data);
- _data.writeByteArray(signature);
- mRemote.transact(Stub.TRANSACTION_verify, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public byte[] get_pubkey(String name) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- byte[] _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- mRemote.transact(Stub.TRANSACTION_get_pubkey, _data, _reply, 0);
- _reply.readException();
- _result = _reply.createByteArray();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int del_key(String name, int uid) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeInt(uid);
- mRemote.transact(Stub.TRANSACTION_del_key, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int grant(String name, int granteeUid) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeInt(granteeUid);
- mRemote.transact(Stub.TRANSACTION_grant, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int ungrant(String name, int granteeUid) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- _data.writeInt(granteeUid);
- mRemote.transact(Stub.TRANSACTION_ungrant, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- @Override
- public long getmtime(String name) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- long _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(name);
- mRemote.transact(Stub.TRANSACTION_getmtime, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readLong();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- @Override
- public int duplicate(String srcKey, int srcUid, String destKey, int destUid)
- throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(srcKey);
- _data.writeInt(srcUid);
- _data.writeString(destKey);
- _data.writeInt(destUid);
- mRemote.transact(Stub.TRANSACTION_duplicate, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- @Override
- public int is_hardware_backed(String keyType) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(keyType);
- mRemote.transact(Stub.TRANSACTION_is_hardware_backed, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- @Override
- public int clear_uid(long uid) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeLong(uid);
- mRemote.transact(Stub.TRANSACTION_clear_uid, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int reset_uid(int uid) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeInt(uid);
- mRemote.transact(Stub.TRANSACTION_reset_uid, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int sync_uid(int srcUid, int dstUid) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeInt(srcUid);
- _data.writeInt(dstUid);
- mRemote.transact(Stub.TRANSACTION_sync_uid, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
-
- public int password_uid(String password, int uid) throws RemoteException {
- Parcel _data = Parcel.obtain();
- Parcel _reply = Parcel.obtain();
- int _result;
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeString(password);
- _data.writeInt(uid);
- mRemote.transact(Stub.TRANSACTION_password_uid, _data, _reply, 0);
- _reply.readException();
- _result = _reply.readInt();
- } finally {
- _reply.recycle();
- _data.recycle();
- }
- return _result;
- }
- }
-
- private static final String DESCRIPTOR = "android.security.keystore";
-
- static final int TRANSACTION_test = IBinder.FIRST_CALL_TRANSACTION + 0;
- static final int TRANSACTION_get = IBinder.FIRST_CALL_TRANSACTION + 1;
- static final int TRANSACTION_insert = IBinder.FIRST_CALL_TRANSACTION + 2;
- static final int TRANSACTION_del = IBinder.FIRST_CALL_TRANSACTION + 3;
- static final int TRANSACTION_exist = IBinder.FIRST_CALL_TRANSACTION + 4;
- static final int TRANSACTION_saw = IBinder.FIRST_CALL_TRANSACTION + 5;
- static final int TRANSACTION_reset = IBinder.FIRST_CALL_TRANSACTION + 6;
- static final int TRANSACTION_password = IBinder.FIRST_CALL_TRANSACTION + 7;
- static final int TRANSACTION_lock = IBinder.FIRST_CALL_TRANSACTION + 8;
- static final int TRANSACTION_unlock = IBinder.FIRST_CALL_TRANSACTION + 9;
- static final int TRANSACTION_zero = IBinder.FIRST_CALL_TRANSACTION + 10;
- static final int TRANSACTION_generate = IBinder.FIRST_CALL_TRANSACTION + 11;
- static final int TRANSACTION_import = IBinder.FIRST_CALL_TRANSACTION + 12;
- static final int TRANSACTION_sign = IBinder.FIRST_CALL_TRANSACTION + 13;
- static final int TRANSACTION_verify = IBinder.FIRST_CALL_TRANSACTION + 14;
- static final int TRANSACTION_get_pubkey = IBinder.FIRST_CALL_TRANSACTION + 15;
- static final int TRANSACTION_del_key = IBinder.FIRST_CALL_TRANSACTION + 16;
- static final int TRANSACTION_grant = IBinder.FIRST_CALL_TRANSACTION + 17;
- static final int TRANSACTION_ungrant = IBinder.FIRST_CALL_TRANSACTION + 18;
- static final int TRANSACTION_getmtime = IBinder.FIRST_CALL_TRANSACTION + 19;
- static final int TRANSACTION_duplicate = IBinder.FIRST_CALL_TRANSACTION + 20;
- static final int TRANSACTION_is_hardware_backed = IBinder.FIRST_CALL_TRANSACTION + 21;
- static final int TRANSACTION_clear_uid = IBinder.FIRST_CALL_TRANSACTION + 22;
- static final int TRANSACTION_reset_uid = IBinder.FIRST_CALL_TRANSACTION + 23;
- static final int TRANSACTION_sync_uid = IBinder.FIRST_CALL_TRANSACTION + 24;
- static final int TRANSACTION_password_uid = IBinder.FIRST_CALL_TRANSACTION + 25;
-
- /**
- * Cast an IBinder object into an IKeystoreService interface, generating
- * a proxy if needed.
- */
- public static IKeystoreService asInterface(IBinder obj) {
- if (obj == null) {
- return null;
- }
- IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
- if (iin != null && iin instanceof IKeystoreService) {
- return (IKeystoreService) iin;
- }
- return new IKeystoreService.Stub.Proxy(obj);
- }
-
- /** Construct the stub at attach it to the interface. */
- public Stub() {
- attachInterface(this, DESCRIPTOR);
- }
-
- public IBinder asBinder() {
- return this;
- }
-
- @Override
- public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
- throws RemoteException {
- switch (code) {
- case INTERFACE_TRANSACTION: {
- reply.writeString(DESCRIPTOR);
- return true;
- }
- case TRANSACTION_test: {
- data.enforceInterface(DESCRIPTOR);
- int resultCode = test();
- reply.writeNoException();
- reply.writeInt(resultCode);
- return true;
- }
- }
- return super.onTransact(code, data, reply, flags);
- }
- }
-
- public int test() throws RemoteException;
-
- public byte[] get(String name) throws RemoteException;
-
- public int insert(String name, byte[] item, int uid, int flags) throws RemoteException;
-
- public int del(String name, int uid) throws RemoteException;
-
- public int exist(String name, int uid) throws RemoteException;
-
- public String[] saw(String name, int uid) throws RemoteException;
-
- public int reset() throws RemoteException;
-
- public int password(String password) throws RemoteException;
-
- public int lock() throws RemoteException;
-
- public int unlock(String password) throws RemoteException;
-
- public int zero() throws RemoteException;
-
- public int generate(String name, int uid, int keyType, int keySize, int flags, byte[][] args)
- throws RemoteException;
-
- public int import_key(String name, byte[] data, int uid, int flags) throws RemoteException;
-
- public byte[] sign(String name, byte[] data) throws RemoteException;
-
- public int verify(String name, byte[] data, byte[] signature) throws RemoteException;
-
- public byte[] get_pubkey(String name) throws RemoteException;
-
- public int del_key(String name, int uid) throws RemoteException;
-
- public int grant(String name, int granteeUid) throws RemoteException;
-
- public int ungrant(String name, int granteeUid) throws RemoteException;
-
- public long getmtime(String name) throws RemoteException;
-
- public int duplicate(String srcKey, int srcUid, String destKey, int destUid)
- throws RemoteException;
-
- public int is_hardware_backed(String string) throws RemoteException;
-
- public int clear_uid(long uid) throws RemoteException;
-
- public int reset_uid(int uid) throws RemoteException;
-
- public int sync_uid(int sourceUid, int targetUid) throws RemoteException;
-
- public int password_uid(String password, int uid) throws RemoteException;
-}
diff --git a/core/java/android/security/KeystoreArguments.aidl b/core/java/android/security/KeystoreArguments.aidl
new file mode 100644
index 0000000..d636414
--- /dev/null
+++ b/core/java/android/security/KeystoreArguments.aidl
@@ -0,0 +1,20 @@
+/**
+ * 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 android.security;
+
+/* @hide */
+parcelable KeystoreArguments;
diff --git a/core/java/android/security/KeystoreArguments.java b/core/java/android/security/KeystoreArguments.java
new file mode 100644
index 0000000..16054e5
--- /dev/null
+++ b/core/java/android/security/KeystoreArguments.java
@@ -0,0 +1,76 @@
+/**
+ * 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 android.security;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Class for handling the additional arguments to some keystore binder calls.
+ * This must be kept in sync with the deserialization code in system/security/keystore.
+ * @hide
+ */
+public class KeystoreArguments implements Parcelable {
+ public byte[][] args;
+
+ public static final Parcelable.Creator<KeystoreArguments> CREATOR = new
+ Parcelable.Creator<KeystoreArguments>() {
+ public KeystoreArguments createFromParcel(Parcel in) {
+ return new KeystoreArguments(in);
+ }
+ public KeystoreArguments[] newArray(int size) {
+ return new KeystoreArguments[size];
+ }
+ };
+
+ public KeystoreArguments() {
+ args = null;
+ }
+
+ public KeystoreArguments(byte[][] args) {
+ this.args = args;
+ }
+
+ private KeystoreArguments(Parcel in) {
+ readFromParcel(in);
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ if (args == null) {
+ out.writeInt(0);
+ } else {
+ out.writeInt(args.length);
+ for (byte[] arg : args) {
+ out.writeByteArray(arg);
+ }
+ }
+ }
+
+ private void readFromParcel(Parcel in) {
+ int length = in.readInt();
+ args = new byte[length][];
+ for (int i = 0; i < length; i++) {
+ args[i] = in.createByteArray();
+ }
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+}
diff --git a/core/java/android/security/NetworkSecurityPolicy.java b/core/java/android/security/NetworkSecurityPolicy.java
new file mode 100644
index 0000000..0626bbc
--- /dev/null
+++ b/core/java/android/security/NetworkSecurityPolicy.java
@@ -0,0 +1,77 @@
+/**
+ * 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 android.security;
+
+/**
+ * Network security policy.
+ *
+ * <p>Network stacks/components should honor this policy to make it possible to centrally control
+ * the relevant aspects of network security behavior.
+ *
+ * <p>The policy currently consists of a single flag: whether cleartext network traffic is
+ * permitted. See {@link #isCleartextTrafficPermitted()}.
+ *
+ * @hide
+ */
+public class NetworkSecurityPolicy {
+
+ private static final NetworkSecurityPolicy INSTANCE = new NetworkSecurityPolicy();
+
+ private NetworkSecurityPolicy() {}
+
+ /**
+ * Gets the policy for this process.
+ *
+ * <p>It's fine to cache this reference. Any changes to the policy will be immediately visible
+ * through the reference.
+ */
+ public static NetworkSecurityPolicy getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Returns whether cleartext network traffic (e.g. HTTP, FTP, WebSockets, XMPP, IMAP, SMTP --
+ * without TLS or STARTTLS) is permitted for this process.
+ *
+ * <p>When cleartext network traffic is not permitted, the platform's components (e.g. HTTP and
+ * FTP stacks, {@code WebView}, {@code MediaPlayer}) will refuse this process's requests to use
+ * cleartext traffic. Third-party libraries are strongly encouraged to honor this setting as
+ * well.
+ *
+ * <p>This flag is honored on a best effort basis because it's impossible to prevent all
+ * cleartext traffic from Android applications given the level of access provided to them. For
+ * example, there's no expectation that the {@link java.net.Socket} API will honor this flag
+ * because it cannot determine whether its traffic is in cleartext. However, most network
+ * traffic from applications is handled by higher-level network stacks/components which can
+ * honor this aspect of the policy.
+ */
+ public boolean isCleartextTrafficPermitted() {
+ return libcore.net.NetworkSecurityPolicy.isCleartextTrafficPermitted();
+ }
+
+ /**
+ * Sets whether cleartext network traffic is permitted for this process.
+ *
+ * <p>This method is used by the platform early on in the application's initialization to set
+ * the policy.
+ *
+ * @hide
+ */
+ public void setCleartextTrafficPermitted(boolean permitted) {
+ libcore.net.NetworkSecurityPolicy.setCleartextTrafficPermitted(permitted);
+ }
+}
diff --git a/core/java/android/security/keymaster/ExportResult.aidl b/core/java/android/security/keymaster/ExportResult.aidl
new file mode 100644
index 0000000..f522355
--- /dev/null
+++ b/core/java/android/security/keymaster/ExportResult.aidl
@@ -0,0 +1,20 @@
+/**
+ * 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 android.security.keymaster;
+
+/* @hide */
+parcelable ExportResult;
diff --git a/core/java/android/security/keymaster/ExportResult.java b/core/java/android/security/keymaster/ExportResult.java
new file mode 100644
index 0000000..bb44c03
--- /dev/null
+++ b/core/java/android/security/keymaster/ExportResult.java
@@ -0,0 +1,56 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Class for handling parceling the return values from keymaster's export operation.
+ * @hide
+ */
+public class ExportResult implements Parcelable {
+ public final int resultCode;
+ public final byte[] exportData;
+
+ public static final Parcelable.Creator<ExportResult> CREATOR = new
+ Parcelable.Creator<ExportResult>() {
+ public ExportResult createFromParcel(Parcel in) {
+ return new ExportResult(in);
+ }
+
+ public ExportResult[] newArray(int length) {
+ return new ExportResult[length];
+ }
+ };
+
+ protected ExportResult(Parcel in) {
+ resultCode = in.readInt();
+ exportData = in.createByteArray();
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(resultCode);
+ out.writeByteArray(exportData);
+ }
+};
diff --git a/core/java/android/security/keymaster/KeyCharacteristics.aidl b/core/java/android/security/keymaster/KeyCharacteristics.aidl
new file mode 100644
index 0000000..15014b1
--- /dev/null
+++ b/core/java/android/security/keymaster/KeyCharacteristics.aidl
@@ -0,0 +1,20 @@
+/**
+ * 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 android.security.keymaster;
+
+/* @hide */
+parcelable KeyCharacteristics;
diff --git a/core/java/android/security/keymaster/KeyCharacteristics.java b/core/java/android/security/keymaster/KeyCharacteristics.java
new file mode 100644
index 0000000..b3a3aad
--- /dev/null
+++ b/core/java/android/security/keymaster/KeyCharacteristics.java
@@ -0,0 +1,116 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @hide
+ */
+public class KeyCharacteristics implements Parcelable {
+ public KeymasterArguments swEnforced;
+ public KeymasterArguments hwEnforced;
+
+ public static final Parcelable.Creator<KeyCharacteristics> CREATOR = new
+ Parcelable.Creator<KeyCharacteristics>() {
+ @Override
+ public KeyCharacteristics createFromParcel(Parcel in) {
+ return new KeyCharacteristics(in);
+ }
+
+ @Override
+ public KeyCharacteristics[] newArray(int length) {
+ return new KeyCharacteristics[length];
+ }
+ };
+
+ public KeyCharacteristics() {}
+
+ protected KeyCharacteristics(Parcel in) {
+ readFromParcel(in);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ swEnforced.writeToParcel(out, flags);
+ hwEnforced.writeToParcel(out, flags);
+ }
+
+ public void readFromParcel(Parcel in) {
+ swEnforced = KeymasterArguments.CREATOR.createFromParcel(in);
+ hwEnforced = KeymasterArguments.CREATOR.createFromParcel(in);
+ }
+
+ public Integer getInteger(int tag) {
+ if (hwEnforced.containsTag(tag)) {
+ return hwEnforced.getInt(tag, -1);
+ } else if (swEnforced.containsTag(tag)) {
+ return swEnforced.getInt(tag, -1);
+ } else {
+ return null;
+ }
+ }
+
+ public int getInt(int tag, int defaultValue) {
+ Integer result = getInteger(tag);
+ return (result != null) ? result : defaultValue;
+ }
+
+ public List<Integer> getInts(int tag) {
+ List<Integer> result = new ArrayList<Integer>();
+ result.addAll(hwEnforced.getInts(tag));
+ result.addAll(swEnforced.getInts(tag));
+ return result;
+ }
+
+ public Date getDate(int tag) {
+ Date result = hwEnforced.getDate(tag, null);
+ if (result == null) {
+ result = swEnforced.getDate(tag, null);
+ }
+ return result;
+ }
+
+ public Date getDate(int tag, Date defaultValue) {
+ if (hwEnforced.containsTag(tag)) {
+ return hwEnforced.getDate(tag, null);
+ } else if (hwEnforced.containsTag(tag)) {
+ return swEnforced.getDate(tag, null);
+ } else {
+ return defaultValue;
+ }
+ }
+
+ public boolean getBoolean(KeyCharacteristics keyCharacteristics, int tag) {
+ if (keyCharacteristics.hwEnforced.containsTag(tag)) {
+ return keyCharacteristics.hwEnforced.getBoolean(tag, false);
+ } else {
+ return keyCharacteristics.swEnforced.getBoolean(tag, false);
+ }
+ }
+}
+
diff --git a/core/java/android/security/keymaster/KeymasterArgument.java b/core/java/android/security/keymaster/KeymasterArgument.java
new file mode 100644
index 0000000..9adde35
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterArgument.java
@@ -0,0 +1,82 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.ParcelFormatException;
+
+/**
+ * Base class for the Java side of a Keymaster tagged argument.
+ * <p>
+ * Serialization code for this and subclasses must be kept in sync with system/security/keystore
+ * and with hardware/libhardware/include/hardware/keymaster_defs.h
+ * @hide
+ */
+abstract class KeymasterArgument implements Parcelable {
+ public final int tag;
+
+ public static final Parcelable.Creator<KeymasterArgument> CREATOR = new
+ Parcelable.Creator<KeymasterArgument>() {
+ public KeymasterArgument createFromParcel(Parcel in) {
+ final int pos = in.dataPosition();
+ final int tag = in.readInt();
+ switch (KeymasterDefs.getTagType(tag)) {
+ case KeymasterDefs.KM_ENUM:
+ case KeymasterDefs.KM_ENUM_REP:
+ case KeymasterDefs.KM_INT:
+ case KeymasterDefs.KM_INT_REP:
+ return new KeymasterIntArgument(tag, in);
+ case KeymasterDefs.KM_LONG:
+ case KeymasterDefs.KM_LONG_REP:
+ return new KeymasterLongArgument(tag, in);
+ case KeymasterDefs.KM_DATE:
+ return new KeymasterDateArgument(tag, in);
+ case KeymasterDefs.KM_BYTES:
+ case KeymasterDefs.KM_BIGNUM:
+ return new KeymasterBlobArgument(tag, in);
+ case KeymasterDefs.KM_BOOL:
+ return new KeymasterBooleanArgument(tag, in);
+ default:
+ throw new ParcelFormatException("Bad tag: " + tag + " at " + pos);
+ }
+ }
+ public KeymasterArgument[] newArray(int size) {
+ return new KeymasterArgument[size];
+ }
+ };
+
+ protected KeymasterArgument(int tag) {
+ this.tag = tag;
+ }
+
+ /**
+ * Writes the value of this argument, if any, to the provided parcel.
+ */
+ public abstract void writeValue(Parcel out);
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(tag);
+ writeValue(out);
+ }
+}
diff --git a/core/java/android/security/keymaster/KeymasterArguments.aidl b/core/java/android/security/keymaster/KeymasterArguments.aidl
new file mode 100644
index 0000000..7aef5a6
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterArguments.aidl
@@ -0,0 +1,20 @@
+/**
+ * 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 android.security.keymaster;
+
+/* @hide */
+parcelable KeymasterArguments;
diff --git a/core/java/android/security/keymaster/KeymasterArguments.java b/core/java/android/security/keymaster/KeymasterArguments.java
new file mode 100644
index 0000000..82f65c7
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterArguments.java
@@ -0,0 +1,219 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Utility class for the java side of user specified Keymaster arguments.
+ * <p>
+ * Serialization code for this and subclasses must be kept in sync with system/security/keystore
+ * @hide
+ */
+public class KeymasterArguments implements Parcelable {
+ List<KeymasterArgument> mArguments;
+
+ public static final Parcelable.Creator<KeymasterArguments> CREATOR = new
+ Parcelable.Creator<KeymasterArguments>() {
+ @Override
+ public KeymasterArguments createFromParcel(Parcel in) {
+ return new KeymasterArguments(in);
+ }
+
+ @Override
+ public KeymasterArguments[] newArray(int size) {
+ return new KeymasterArguments[size];
+ }
+ };
+
+ public KeymasterArguments() {
+ mArguments = new ArrayList<KeymasterArgument>();
+ }
+
+ private KeymasterArguments(Parcel in) {
+ mArguments = in.createTypedArrayList(KeymasterArgument.CREATOR);
+ }
+
+ public void addInt(int tag, int value) {
+ mArguments.add(new KeymasterIntArgument(tag, value));
+ }
+
+ public void addInts(int tag, int... values) {
+ for (int value : values) {
+ addInt(tag, value);
+ }
+ }
+
+ public void addLongs(int tag, long... values) {
+ for (long value : values) {
+ addLong(tag, value);
+ }
+ }
+
+ public void addBoolean(int tag) {
+ mArguments.add(new KeymasterBooleanArgument(tag));
+ }
+
+ public void addLong(int tag, long value) {
+ mArguments.add(new KeymasterLongArgument(tag, value));
+ }
+
+ public void addBlob(int tag, byte[] value) {
+ mArguments.add(new KeymasterBlobArgument(tag, value));
+ }
+
+ public void addDate(int tag, Date value) {
+ mArguments.add(new KeymasterDateArgument(tag, value));
+ }
+
+ private KeymasterArgument getArgumentByTag(int tag) {
+ for (KeymasterArgument arg : mArguments) {
+ if (arg.tag == tag) {
+ return arg;
+ }
+ }
+ return null;
+ }
+
+ public boolean containsTag(int tag) {
+ return getArgumentByTag(tag) != null;
+ }
+
+ public int getInt(int tag, int defaultValue) {
+ switch (KeymasterDefs.getTagType(tag)) {
+ case KeymasterDefs.KM_ENUM:
+ case KeymasterDefs.KM_INT:
+ break; // Accepted types
+ case KeymasterDefs.KM_INT_REP:
+ case KeymasterDefs.KM_ENUM_REP:
+ throw new IllegalArgumentException("Repeatable tags must use getInts: " + tag);
+ default:
+ throw new IllegalArgumentException("Tag is not an int type: " + tag);
+ }
+ KeymasterArgument arg = getArgumentByTag(tag);
+ if (arg == null) {
+ return defaultValue;
+ }
+ return ((KeymasterIntArgument) arg).value;
+ }
+
+ public long getLong(int tag, long defaultValue) {
+ switch (KeymasterDefs.getTagType(tag)) {
+ case KeymasterDefs.KM_LONG:
+ break; // Accepted type
+ case KeymasterDefs.KM_LONG_REP:
+ throw new IllegalArgumentException("Repeatable tags must use getLongs: " + tag);
+ default:
+ throw new IllegalArgumentException("Tag is not a long type: " + tag);
+ }
+ KeymasterArgument arg = getArgumentByTag(tag);
+ if (arg == null) {
+ return defaultValue;
+ }
+ return ((KeymasterLongArgument) arg).value;
+ }
+
+ public Date getDate(int tag, Date defaultValue) {
+ if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_DATE) {
+ throw new IllegalArgumentException("Tag is not a date type: " + tag);
+ }
+ KeymasterArgument arg = getArgumentByTag(tag);
+ if (arg == null) {
+ return defaultValue;
+ }
+ return ((KeymasterDateArgument) arg).date;
+ }
+
+ public boolean getBoolean(int tag, boolean defaultValue) {
+ if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BOOL) {
+ throw new IllegalArgumentException("Tag is not a boolean type: " + tag);
+ }
+ KeymasterArgument arg = getArgumentByTag(tag);
+ if (arg == null) {
+ return defaultValue;
+ }
+ return true;
+ }
+
+ public byte[] getBlob(int tag, byte[] defaultValue) {
+ switch (KeymasterDefs.getTagType(tag)) {
+ case KeymasterDefs.KM_BYTES:
+ case KeymasterDefs.KM_BIGNUM:
+ break; // Allowed types.
+ default:
+ throw new IllegalArgumentException("Tag is not a blob type: " + tag);
+ }
+ KeymasterArgument arg = getArgumentByTag(tag);
+ if (arg == null) {
+ return defaultValue;
+ }
+ return ((KeymasterBlobArgument) arg).blob;
+ }
+
+ public List<Integer> getInts(int tag) {
+ switch (KeymasterDefs.getTagType(tag)) {
+ case KeymasterDefs.KM_INT_REP:
+ case KeymasterDefs.KM_ENUM_REP:
+ break; // Allowed types.
+ default:
+ throw new IllegalArgumentException("Tag is not a repeating type: " + tag);
+ }
+ List<Integer> values = new ArrayList<Integer>();
+ for (KeymasterArgument arg : mArguments) {
+ if (arg.tag == tag) {
+ values.add(((KeymasterIntArgument) arg).value);
+ }
+ }
+ return values;
+ }
+
+ public List<Long> getLongs(int tag) {
+ if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_LONG_REP) {
+ throw new IllegalArgumentException("Tag is not a repeating long: " + tag);
+ }
+ List<Long> values = new ArrayList<Long>();
+ for (KeymasterArgument arg : mArguments) {
+ if (arg.tag == tag) {
+ values.add(((KeymasterLongArgument) arg).value);
+ }
+ }
+ return values;
+ }
+
+ public int size() {
+ return mArguments.size();
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeTypedList(mArguments);
+ }
+
+ public void readFromParcel(Parcel in) {
+ in.readTypedList(mArguments, KeymasterArgument.CREATOR);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+}
diff --git a/core/java/android/security/keymaster/KeymasterBlob.aidl b/core/java/android/security/keymaster/KeymasterBlob.aidl
new file mode 100644
index 0000000..8f70f7c
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterBlob.aidl
@@ -0,0 +1,20 @@
+/**
+ * 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 android.security.keymaster;
+
+/* @hide */
+parcelable KeymasterBlob;
diff --git a/core/java/android/security/keymaster/KeymasterBlob.java b/core/java/android/security/keymaster/KeymasterBlob.java
new file mode 100644
index 0000000..cb95604
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterBlob.java
@@ -0,0 +1,55 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * @hide
+ */
+public class KeymasterBlob implements Parcelable {
+ public byte[] blob;
+
+ public KeymasterBlob(byte[] blob) {
+ this.blob = blob;
+ }
+ public static final Parcelable.Creator<KeymasterBlob> CREATOR = new
+ Parcelable.Creator<KeymasterBlob>() {
+ public KeymasterBlob createFromParcel(Parcel in) {
+ return new KeymasterBlob(in);
+ }
+
+ public KeymasterBlob[] newArray(int length) {
+ return new KeymasterBlob[length];
+ }
+ };
+
+ protected KeymasterBlob(Parcel in) {
+ blob = in.createByteArray();
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeByteArray(blob);
+ }
+}
diff --git a/core/java/android/security/keymaster/KeymasterBlobArgument.java b/core/java/android/security/keymaster/KeymasterBlobArgument.java
new file mode 100644
index 0000000..a9085c4
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterBlobArgument.java
@@ -0,0 +1,49 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * @hide
+ */
+class KeymasterBlobArgument extends KeymasterArgument {
+ public final byte[] blob;
+
+ public KeymasterBlobArgument(int tag, byte[] blob) {
+ super(tag);
+ switch (KeymasterDefs.getTagType(tag)) {
+ case KeymasterDefs.KM_BIGNUM:
+ case KeymasterDefs.KM_BYTES:
+ break; // OK.
+ default:
+ throw new IllegalArgumentException("Bad blob tag " + tag);
+ }
+ this.blob = blob;
+ }
+
+ public KeymasterBlobArgument(int tag, Parcel in) {
+ super(tag);
+ blob = in.createByteArray();
+ }
+
+ @Override
+ public void writeValue(Parcel out) {
+ out.writeByteArray(blob);
+ }
+}
diff --git a/core/java/android/security/keymaster/KeymasterBooleanArgument.java b/core/java/android/security/keymaster/KeymasterBooleanArgument.java
new file mode 100644
index 0000000..cc04bb6
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterBooleanArgument.java
@@ -0,0 +1,48 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * @hide
+ */
+class KeymasterBooleanArgument extends KeymasterArgument {
+
+ // Boolean arguments are always true if they exist and false if they don't.
+ public final boolean value = true;
+
+ public KeymasterBooleanArgument(int tag) {
+ super(tag);
+ switch (KeymasterDefs.getTagType(tag)) {
+ case KeymasterDefs.KM_BOOL:
+ break; // OK.
+ default:
+ throw new IllegalArgumentException("Bad bool tag " + tag);
+ }
+ }
+
+ public KeymasterBooleanArgument(int tag, Parcel in) {
+ super(tag);
+ }
+
+ @Override
+ public void writeValue(Parcel out) {
+ // Do nothing, value is implicit.
+ }
+}
diff --git a/core/java/android/security/keymaster/KeymasterDateArgument.java b/core/java/android/security/keymaster/KeymasterDateArgument.java
new file mode 100644
index 0000000..47db6ea
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterDateArgument.java
@@ -0,0 +1,50 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Date;
+
+/**
+ * @hide
+ */
+class KeymasterDateArgument extends KeymasterArgument {
+ public final Date date;
+
+ public KeymasterDateArgument(int tag, Date date) {
+ super(tag);
+ switch (KeymasterDefs.getTagType(tag)) {
+ case KeymasterDefs.KM_DATE:
+ break; // OK.
+ default:
+ throw new IllegalArgumentException("Bad date tag " + tag);
+ }
+ this.date = date;
+ }
+
+ public KeymasterDateArgument(int tag, Parcel in) {
+ super(tag);
+ date = new Date(in.readLong());
+ }
+
+ @Override
+ public void writeValue(Parcel out) {
+ out.writeLong(date.getTime());
+ }
+}
diff --git a/core/java/android/security/keymaster/KeymasterDefs.java b/core/java/android/security/keymaster/KeymasterDefs.java
new file mode 100644
index 0000000..25ebe75
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterDefs.java
@@ -0,0 +1,252 @@
+/**
+ * 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 android.security.keymaster;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Class tracking all the keymaster enum values needed for the binder API to keystore.
+ * This must be kept in sync with hardware/libhardware/include/hardware/keymaster_defs.h
+ * See keymaster_defs.h for detailed descriptions of each constant.
+ * @hide
+ */
+public final class KeymasterDefs {
+
+ private KeymasterDefs() {}
+
+ // Tag types.
+ public static final int KM_INVALID = 0 << 28;
+ public static final int KM_ENUM = 1 << 28;
+ public static final int KM_ENUM_REP = 2 << 28;
+ public static final int KM_INT = 3 << 28;
+ public static final int KM_INT_REP = 4 << 28;
+ public static final int KM_LONG = 5 << 28;
+ public static final int KM_DATE = 6 << 28;
+ public static final int KM_BOOL = 7 << 28;
+ public static final int KM_BIGNUM = 8 << 28;
+ public static final int KM_BYTES = 9 << 28;
+ public static final int KM_LONG_REP = 10 << 28;
+
+ // Tag values.
+ public static final int KM_TAG_INVALID = KM_INVALID | 0;
+ public static final int KM_TAG_PURPOSE = KM_ENUM_REP | 1;
+ public static final int KM_TAG_ALGORITHM = KM_ENUM | 2;
+ public static final int KM_TAG_KEY_SIZE = KM_INT | 3;
+ public static final int KM_TAG_BLOCK_MODE = KM_ENUM_REP | 4;
+ public static final int KM_TAG_DIGEST = KM_ENUM_REP | 5;
+ public static final int KM_TAG_PADDING = KM_ENUM_REP | 6;
+ public static final int KM_TAG_RETURN_UNAUTHED = KM_BOOL | 7;
+ public static final int KM_TAG_CALLER_NONCE = KM_BOOL | 8;
+
+ public static final int KM_TAG_RESCOPING_ADD = KM_ENUM_REP | 101;
+ public static final int KM_TAG_RESCOPING_DEL = KM_ENUM_REP | 102;
+ public static final int KM_TAG_BLOB_USAGE_REQUIREMENTS = KM_ENUM | 705;
+
+ public static final int KM_TAG_RSA_PUBLIC_EXPONENT = KM_LONG | 200;
+ public static final int KM_TAG_ACTIVE_DATETIME = KM_DATE | 400;
+ public static final int KM_TAG_ORIGINATION_EXPIRE_DATETIME = KM_DATE | 401;
+ public static final int KM_TAG_USAGE_EXPIRE_DATETIME = KM_DATE | 402;
+ public static final int KM_TAG_MIN_SECONDS_BETWEEN_OPS = KM_INT | 403;
+ public static final int KM_TAG_MAX_USES_PER_BOOT = KM_INT | 404;
+
+ public static final int KM_TAG_ALL_USERS = KM_BOOL | 500;
+ public static final int KM_TAG_USER_ID = KM_INT | 501;
+ public static final int KM_TAG_USER_SECURE_ID = KM_LONG_REP | 502;
+ public static final int KM_TAG_NO_AUTH_REQUIRED = KM_BOOL | 503;
+ public static final int KM_TAG_USER_AUTH_TYPE = KM_ENUM | 504;
+ public static final int KM_TAG_AUTH_TIMEOUT = KM_INT | 505;
+
+ public static final int KM_TAG_ALL_APPLICATIONS = KM_BOOL | 600;
+ public static final int KM_TAG_APPLICATION_ID = KM_BYTES | 601;
+
+ public static final int KM_TAG_APPLICATION_DATA = KM_BYTES | 700;
+ public static final int KM_TAG_CREATION_DATETIME = KM_DATE | 701;
+ public static final int KM_TAG_ORIGIN = KM_ENUM | 702;
+ public static final int KM_TAG_ROLLBACK_RESISTANT = KM_BOOL | 703;
+ public static final int KM_TAG_ROOT_OF_TRUST = KM_BYTES | 704;
+
+ public static final int KM_TAG_ASSOCIATED_DATA = KM_BYTES | 1000;
+ public static final int KM_TAG_NONCE = KM_BYTES | 1001;
+ public static final int KM_TAG_CHUNK_LENGTH = KM_INT | 1002;
+ public static final int KM_TAG_AUTH_TOKEN = KM_BYTES | 1003;
+ public static final int KM_TAG_MAC_LENGTH = KM_INT | 1004;
+
+ // Algorithm values.
+ public static final int KM_ALGORITHM_RSA = 1;
+ public static final int KM_ALGORITHM_EC = 3;
+ public static final int KM_ALGORITHM_AES = 32;
+ public static final int KM_ALGORITHM_HMAC = 128;
+
+ // Block modes.
+ public static final int KM_MODE_FIRST_UNAUTHENTICATED = 1;
+ public static final int KM_MODE_ECB = KM_MODE_FIRST_UNAUTHENTICATED;
+ public static final int KM_MODE_CBC = 2;
+ public static final int KM_MODE_CTR = 4;
+ public static final int KM_MODE_FIRST_AUTHENTICATED = 32;
+ public static final int KM_MODE_GCM = KM_MODE_FIRST_AUTHENTICATED;
+
+ // Padding modes.
+ public static final int KM_PAD_NONE = 1;
+ public static final int KM_PAD_RSA_OAEP = 2;
+ public static final int KM_PAD_RSA_PSS = 3;
+ public static final int KM_PAD_RSA_PKCS1_1_5_ENCRYPT = 4;
+ public static final int KM_PAD_RSA_PKCS1_1_5_SIGN = 5;
+ public static final int KM_PAD_PKCS7 = 64;
+
+ // Digest modes.
+ public static final int KM_DIGEST_NONE = 0;
+ public static final int KM_DIGEST_MD5 = 1;
+ public static final int KM_DIGEST_SHA1 = 2;
+ public static final int KM_DIGEST_SHA_2_224 = 3;
+ public static final int KM_DIGEST_SHA_2_256 = 4;
+ public static final int KM_DIGEST_SHA_2_384 = 5;
+ public static final int KM_DIGEST_SHA_2_512 = 6;
+
+ // Key origins.
+ public static final int KM_ORIGIN_GENERATED = 0;
+ public static final int KM_ORIGIN_IMPORTED = 2;
+ public static final int KM_ORIGIN_UNKNOWN = 3;
+
+ // Key usability requirements.
+ public static final int KM_BLOB_STANDALONE = 0;
+ public static final int KM_BLOB_REQUIRES_FILE_SYSTEM = 1;
+
+ // Operation Purposes.
+ public static final int KM_PURPOSE_ENCRYPT = 0;
+ public static final int KM_PURPOSE_DECRYPT = 1;
+ public static final int KM_PURPOSE_SIGN = 2;
+ public static final int KM_PURPOSE_VERIFY = 3;
+
+ // Key formats.
+ public static final int KM_KEY_FORMAT_X509 = 0;
+ public static final int KM_KEY_FORMAT_PKCS8 = 1;
+ public static final int KM_KEY_FORMAT_RAW = 3;
+
+ // User authenticators.
+ public static final int HW_AUTH_PASSWORD = 1 << 0;
+
+ // Error codes.
+ public static final int KM_ERROR_OK = 0;
+ public static final int KM_ERROR_ROOT_OF_TRUST_ALREADY_SET = -1;
+ public static final int KM_ERROR_UNSUPPORTED_PURPOSE = -2;
+ public static final int KM_ERROR_INCOMPATIBLE_PURPOSE = -3;
+ public static final int KM_ERROR_UNSUPPORTED_ALGORITHM = -4;
+ public static final int KM_ERROR_INCOMPATIBLE_ALGORITHM = -5;
+ public static final int KM_ERROR_UNSUPPORTED_KEY_SIZE = -6;
+ public static final int KM_ERROR_UNSUPPORTED_BLOCK_MODE = -7;
+ public static final int KM_ERROR_INCOMPATIBLE_BLOCK_MODE = -8;
+ public static final int KM_ERROR_UNSUPPORTED_MAC_LENGTH = -9;
+ public static final int KM_ERROR_UNSUPPORTED_PADDING_MODE = -10;
+ public static final int KM_ERROR_INCOMPATIBLE_PADDING_MODE = -11;
+ public static final int KM_ERROR_UNSUPPORTED_DIGEST = -12;
+ public static final int KM_ERROR_INCOMPATIBLE_DIGEST = -13;
+ public static final int KM_ERROR_INVALID_EXPIRATION_TIME = -14;
+ public static final int KM_ERROR_INVALID_USER_ID = -15;
+ public static final int KM_ERROR_INVALID_AUTHORIZATION_TIMEOUT = -16;
+ public static final int KM_ERROR_UNSUPPORTED_KEY_FORMAT = -17;
+ public static final int KM_ERROR_INCOMPATIBLE_KEY_FORMAT = -18;
+ public static final int KM_ERROR_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM = -19;
+ public static final int KM_ERROR_UNSUPPORTED_KEY_VERIFICATION_ALGORITHM = -20;
+ public static final int KM_ERROR_INVALID_INPUT_LENGTH = -21;
+ public static final int KM_ERROR_KEY_EXPORT_OPTIONS_INVALID = -22;
+ public static final int KM_ERROR_DELEGATION_NOT_ALLOWED = -23;
+ public static final int KM_ERROR_KEY_NOT_YET_VALID = -24;
+ public static final int KM_ERROR_KEY_EXPIRED = -25;
+ public static final int KM_ERROR_KEY_USER_NOT_AUTHENTICATED = -26;
+ public static final int KM_ERROR_OUTPUT_PARAMETER_NULL = -27;
+ public static final int KM_ERROR_INVALID_OPERATION_HANDLE = -28;
+ public static final int KM_ERROR_INSUFFICIENT_BUFFER_SPACE = -29;
+ public static final int KM_ERROR_VERIFICATION_FAILED = -30;
+ public static final int KM_ERROR_TOO_MANY_OPERATIONS = -31;
+ public static final int KM_ERROR_UNEXPECTED_NULL_POINTER = -32;
+ public static final int KM_ERROR_INVALID_KEY_BLOB = -33;
+ public static final int KM_ERROR_IMPORTED_KEY_NOT_ENCRYPTED = -34;
+ public static final int KM_ERROR_IMPORTED_KEY_DECRYPTION_FAILED = -35;
+ public static final int KM_ERROR_IMPORTED_KEY_NOT_SIGNED = -36;
+ public static final int KM_ERROR_IMPORTED_KEY_VERIFICATION_FAILED = -37;
+ public static final int KM_ERROR_INVALID_ARGUMENT = -38;
+ public static final int KM_ERROR_UNSUPPORTED_TAG = -39;
+ public static final int KM_ERROR_INVALID_TAG = -40;
+ public static final int KM_ERROR_MEMORY_ALLOCATION_FAILED = -41;
+ public static final int KM_ERROR_INVALID_RESCOPING = -42;
+ public static final int KM_ERROR_IMPORT_PARAMETER_MISMATCH = -44;
+ public static final int KM_ERROR_SECURE_HW_ACCESS_DENIED = -45;
+ public static final int KM_ERROR_OPERATION_CANCELLED = -46;
+ public static final int KM_ERROR_CONCURRENT_ACCESS_CONFLICT = -47;
+ public static final int KM_ERROR_SECURE_HW_BUSY = -48;
+ public static final int KM_ERROR_SECURE_HW_COMMUNICATION_FAILED = -49;
+ public static final int KM_ERROR_UNSUPPORTED_EC_FIELD = -50;
+ public static final int KM_ERROR_MISSING_NONCE = -51;
+ public static final int KM_ERROR_INVALID_NONCE = -52;
+ public static final int KM_ERROR_UNIMPLEMENTED = -100;
+ public static final int KM_ERROR_VERSION_MISMATCH = -101;
+ public static final int KM_ERROR_UNKNOWN_ERROR = -1000;
+
+ public static final Map<Integer, String> sErrorCodeToString = new HashMap<Integer, String>();
+ static {
+ sErrorCodeToString.put(KM_ERROR_OK, "OK");
+ sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_PURPOSE, "Unsupported purpose");
+ sErrorCodeToString.put(KM_ERROR_INCOMPATIBLE_PURPOSE, "Incompatible purpose");
+ sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_ALGORITHM, "Unsupported algorithm");
+ sErrorCodeToString.put(KM_ERROR_INCOMPATIBLE_ALGORITHM, "Incompatible algorithm");
+ sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_KEY_SIZE, "Unsupported key size");
+ sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_BLOCK_MODE, "Unsupported block mode");
+ sErrorCodeToString.put(KM_ERROR_INCOMPATIBLE_BLOCK_MODE, "Incompatible block mode");
+ sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_MAC_LENGTH,
+ "Unsupported MAC or authentication tag length");
+ sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_PADDING_MODE, "Unsupported padding mode");
+ sErrorCodeToString.put(KM_ERROR_INCOMPATIBLE_PADDING_MODE, "Incompatible padding mode");
+ sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_DIGEST, "Unsupported digest");
+ sErrorCodeToString.put(KM_ERROR_INCOMPATIBLE_DIGEST, "Incompatible digest");
+ sErrorCodeToString.put(KM_ERROR_INVALID_EXPIRATION_TIME, "Invalid expiration time");
+ sErrorCodeToString.put(KM_ERROR_INVALID_USER_ID, "Invalid user ID");
+ sErrorCodeToString.put(KM_ERROR_INVALID_AUTHORIZATION_TIMEOUT,
+ "Invalid user authorization timeout");
+ sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_KEY_FORMAT, "Unsupported key format");
+ sErrorCodeToString.put(KM_ERROR_INCOMPATIBLE_KEY_FORMAT, "Incompatible key format");
+ sErrorCodeToString.put(KM_ERROR_INVALID_INPUT_LENGTH, "Invalid input length");
+ sErrorCodeToString.put(KM_ERROR_KEY_NOT_YET_VALID, "Key not yet valid");
+ sErrorCodeToString.put(KM_ERROR_KEY_EXPIRED, "Key expired");
+ sErrorCodeToString.put(KM_ERROR_KEY_USER_NOT_AUTHENTICATED, "Key user not authenticated");
+ sErrorCodeToString.put(KM_ERROR_INVALID_OPERATION_HANDLE, "Invalid operation handle");
+ sErrorCodeToString.put(KM_ERROR_VERIFICATION_FAILED, "Signature/MAC verification failed");
+ sErrorCodeToString.put(KM_ERROR_TOO_MANY_OPERATIONS, "Too many operations");
+ sErrorCodeToString.put(KM_ERROR_INVALID_KEY_BLOB, "Invalid key blob");
+ sErrorCodeToString.put(KM_ERROR_INVALID_ARGUMENT, "Invalid argument");
+ sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_TAG, "Unsupported tag");
+ sErrorCodeToString.put(KM_ERROR_INVALID_TAG, "Invalid tag");
+ sErrorCodeToString.put(KM_ERROR_MEMORY_ALLOCATION_FAILED, "Memory allocation failed");
+ sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_EC_FIELD, "Unsupported EC field");
+ sErrorCodeToString.put(KM_ERROR_MISSING_NONCE, "Required IV missing");
+ sErrorCodeToString.put(KM_ERROR_INVALID_NONCE, "Invalid IV");
+ sErrorCodeToString.put(KM_ERROR_UNIMPLEMENTED, "Not implemented");
+ sErrorCodeToString.put(KM_ERROR_UNKNOWN_ERROR, "Unknown error");
+ }
+
+ public static int getTagType(int tag) {
+ return tag & (0xF << 28);
+ }
+
+ public static String getErrorMessage(int errorCode) {
+ String result = sErrorCodeToString.get(errorCode);
+ if (result != null) {
+ return result;
+ }
+ return String.valueOf(errorCode);
+ }
+}
diff --git a/core/java/android/security/keymaster/KeymasterIntArgument.java b/core/java/android/security/keymaster/KeymasterIntArgument.java
new file mode 100644
index 0000000..94ff87e
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterIntArgument.java
@@ -0,0 +1,51 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * @hide
+ */
+class KeymasterIntArgument extends KeymasterArgument {
+ public final int value;
+
+ public KeymasterIntArgument(int tag, int value) {
+ super(tag);
+ switch (KeymasterDefs.getTagType(tag)) {
+ case KeymasterDefs.KM_INT:
+ case KeymasterDefs.KM_INT_REP:
+ case KeymasterDefs.KM_ENUM:
+ case KeymasterDefs.KM_ENUM_REP:
+ break; // OK.
+ default:
+ throw new IllegalArgumentException("Bad int tag " + tag);
+ }
+ this.value = value;
+ }
+
+ public KeymasterIntArgument(int tag, Parcel in) {
+ super(tag);
+ value = in.readInt();
+ }
+
+ @Override
+ public void writeValue(Parcel out) {
+ out.writeInt(value);
+ }
+}
diff --git a/core/java/android/security/keymaster/KeymasterLongArgument.java b/core/java/android/security/keymaster/KeymasterLongArgument.java
new file mode 100644
index 0000000..e04ce5d
--- /dev/null
+++ b/core/java/android/security/keymaster/KeymasterLongArgument.java
@@ -0,0 +1,49 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * @hide
+ */
+class KeymasterLongArgument extends KeymasterArgument {
+ public final long value;
+
+ public KeymasterLongArgument(int tag, long value) {
+ super(tag);
+ switch (KeymasterDefs.getTagType(tag)) {
+ case KeymasterDefs.KM_LONG:
+ case KeymasterDefs.KM_LONG_REP:
+ break; // OK.
+ default:
+ throw new IllegalArgumentException("Bad long tag " + tag);
+ }
+ this.value = value;
+ }
+
+ public KeymasterLongArgument(int tag, Parcel in) {
+ super(tag);
+ value = in.readLong();
+ }
+
+ @Override
+ public void writeValue(Parcel out) {
+ out.writeLong(value);
+ }
+}
diff --git a/core/java/android/security/keymaster/OperationResult.aidl b/core/java/android/security/keymaster/OperationResult.aidl
new file mode 100644
index 0000000..699e8d0
--- /dev/null
+++ b/core/java/android/security/keymaster/OperationResult.aidl
@@ -0,0 +1,20 @@
+/**
+ * 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 android.security.keymaster;
+
+/* @hide */
+parcelable OperationResult;
diff --git a/core/java/android/security/keymaster/OperationResult.java b/core/java/android/security/keymaster/OperationResult.java
new file mode 100644
index 0000000..7cc43d3
--- /dev/null
+++ b/core/java/android/security/keymaster/OperationResult.java
@@ -0,0 +1,69 @@
+/**
+ * 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 android.security.keymaster;
+
+import android.os.IBinder;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.List;
+
+/**
+ * Class for handling the parceling of return values from keymaster crypto operations
+ * (begin/update/finish).
+ * @hide
+ */
+public class OperationResult implements Parcelable {
+ public final int resultCode;
+ public final IBinder token;
+ public final long operationHandle;
+ public final int inputConsumed;
+ public final byte[] output;
+
+ public static final Parcelable.Creator<OperationResult> CREATOR = new
+ Parcelable.Creator<OperationResult>() {
+ public OperationResult createFromParcel(Parcel in) {
+ return new OperationResult(in);
+ }
+
+ public OperationResult[] newArray(int length) {
+ return new OperationResult[length];
+ }
+ };
+
+ protected OperationResult(Parcel in) {
+ resultCode = in.readInt();
+ token = in.readStrongBinder();
+ operationHandle = in.readLong();
+ inputConsumed = in.readInt();
+ output = in.createByteArray();
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel out, int flags) {
+ out.writeInt(resultCode);
+ out.writeStrongBinder(token);
+ out.writeLong(operationHandle);
+ out.writeInt(inputConsumed);
+ out.writeByteArray(output);
+ }
+}
diff --git a/core/java/android/service/voice/VoiceInteractionSession.java b/core/java/android/service/voice/VoiceInteractionSession.java
index 749f813..d751266 100644
--- a/core/java/android/service/voice/VoiceInteractionSession.java
+++ b/core/java/android/service/voice/VoiceInteractionSession.java
@@ -436,11 +436,7 @@ public abstract class VoiceInteractionSession implements KeyEvent.Callback {
Request removeRequest(IBinder reqInterface) {
synchronized (this) {
- Request req = mActiveRequests.get(reqInterface);
- if (req != null) {
- mActiveRequests.remove(req);
- }
- return req;
+ return mActiveRequests.remove(reqInterface);
}
}
diff --git a/core/java/android/text/BoringLayout.java b/core/java/android/text/BoringLayout.java
index 6f00707..e78cf8f 100644
--- a/core/java/android/text/BoringLayout.java
+++ b/core/java/android/text/BoringLayout.java
@@ -20,7 +20,6 @@ import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.text.style.ParagraphStyle;
-import android.util.FloatMath;
/**
* A BoringLayout is a very simple Layout implementation for text that
@@ -207,7 +206,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
TextLine line = TextLine.obtain();
line.set(paint, source, 0, source.length(), Layout.DIR_LEFT_TO_RIGHT,
Layout.DIRS_ALL_LEFT_TO_RIGHT, false, null);
- mMax = (int) FloatMath.ceil(line.metrics(null));
+ mMax = (int) Math.ceil(line.metrics(null));
TextLine.recycle(line);
}
@@ -301,7 +300,7 @@ public class BoringLayout extends Layout implements TextUtils.EllipsizeCallback
TextLine line = TextLine.obtain();
line.set(paint, text, 0, length, Layout.DIR_LEFT_TO_RIGHT,
Layout.DIRS_ALL_LEFT_TO_RIGHT, false, null);
- fm.width = (int) FloatMath.ceil(line.metrics(fm));
+ fm.width = (int) Math.ceil(line.metrics(fm));
TextLine.recycle(line);
return fm;
diff --git a/core/java/android/text/Html.java b/core/java/android/text/Html.java
index 2fcc597..dc93bc2 100644
--- a/core/java/android/text/Html.java
+++ b/core/java/android/text/Html.java
@@ -61,7 +61,7 @@ public class Html {
*/
public static interface ImageGetter {
/**
- * This methos is called when the HTML parser encounters an
+ * This method is called when the HTML parser encounters an
* &lt;img&gt; tag. The <code>source</code> argument is the
* string from the "src" attribute; the return value should be
* a Drawable representation of the image or <code>null</code>
diff --git a/core/java/android/text/SpanSet.java b/core/java/android/text/SpanSet.java
index 3ca6033..00f1493 100644
--- a/core/java/android/text/SpanSet.java
+++ b/core/java/android/text/SpanSet.java
@@ -17,6 +17,7 @@
package android.text;
import java.lang.reflect.Array;
+import java.util.Arrays;
/**
* A cached set of spans. Caches the result of {@link Spanned#getSpans(int, int, Class)} and then
@@ -54,6 +55,7 @@ public class SpanSet<E> {
spanFlags = new int[length];
}
+ int prevNumberOfSpans = numberOfSpans;
numberOfSpans = 0;
for (int i = 0; i < length; i++) {
final E span = allSpans[i];
@@ -71,6 +73,12 @@ public class SpanSet<E> {
numberOfSpans++;
}
+
+ // cleanup extra spans left over from previous init() call
+ if (numberOfSpans < prevNumberOfSpans) {
+ // prevNumberofSpans was > 0, therefore spans != null
+ Arrays.fill(spans, numberOfSpans, prevNumberOfSpans, null);
+ }
}
/**
@@ -103,9 +111,8 @@ public class SpanSet<E> {
* Removes all internal references to the spans to avoid memory leaks.
*/
public void recycle() {
- // The spans array is guaranteed to be not null when numberOfSpans is > 0
- for (int i = 0; i < numberOfSpans; i++) {
- spans[i] = null; // prevent a leak: no reference kept when TextLine is recycled
+ if (spans != null) {
+ Arrays.fill(spans, 0, numberOfSpans, null);
}
}
}
diff --git a/core/java/android/text/format/DateFormat.java b/core/java/android/text/format/DateFormat.java
index 72bbb2b..c03f7a6 100755
--- a/core/java/android/text/format/DateFormat.java
+++ b/core/java/android/text/format/DateFormat.java
@@ -278,73 +278,18 @@ public class DateFormat {
*/
public static String getTimeFormatString(Context context, int userHandle) {
LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale);
- return is24HourFormat(context, userHandle) ? d.timeFormat24 : d.timeFormat12;
+ return is24HourFormat(context, userHandle) ? d.timeFormat_Hm : d.timeFormat_hm;
}
/**
* Returns a {@link java.text.DateFormat} object that can format the date
- * in short form (such as 12/31/1999) according
- * to the current locale and the user's date-order preference.
+ * in short form according to the current locale.
+ *
* @param context the application context
* @return the {@link java.text.DateFormat} object that properly formats the date.
*/
public static java.text.DateFormat getDateFormat(Context context) {
- String value = Settings.System.getString(context.getContentResolver(),
- Settings.System.DATE_FORMAT);
-
- return getDateFormatForSetting(context, value);
- }
-
- /**
- * Returns a {@link java.text.DateFormat} object to format the date
- * as if the date format setting were set to <code>value</code>,
- * including null to use the locale's default format.
- * @param context the application context
- * @param value the date format setting string to interpret for
- * the current locale
- * @hide
- */
- public static java.text.DateFormat getDateFormatForSetting(Context context,
- String value) {
- String format = getDateFormatStringForSetting(context, value);
- return new java.text.SimpleDateFormat(format);
- }
-
- private static String getDateFormatStringForSetting(Context context, String value) {
- if (value != null) {
- int month = value.indexOf('M');
- int day = value.indexOf('d');
- int year = value.indexOf('y');
-
- if (month >= 0 && day >= 0 && year >= 0) {
- String template = context.getString(R.string.numeric_date_template);
- if (year < month && year < day) {
- if (month < day) {
- value = String.format(template, "yyyy", "MM", "dd");
- } else {
- value = String.format(template, "yyyy", "dd", "MM");
- }
- } else if (month < day) {
- if (day < year) {
- value = String.format(template, "MM", "dd", "yyyy");
- } else { // unlikely
- value = String.format(template, "MM", "yyyy", "dd");
- }
- } else { // day < month
- if (month < year) {
- value = String.format(template, "dd", "MM", "yyyy");
- } else { // unlikely
- value = String.format(template, "dd", "yyyy", "MM");
- }
- }
-
- return value;
- }
- }
-
- // The setting is not set; use the locale's default.
- LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale);
- return d.shortDateFormat4;
+ return java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT);
}
/**
@@ -377,14 +322,16 @@ public class DateFormat {
* order returned here.
*/
public static char[] getDateFormatOrder(Context context) {
- return ICU.getDateFormatOrder(getDateFormatString(context));
+ return ICU.getDateFormatOrder(getDateFormatString());
}
- private static String getDateFormatString(Context context) {
- String value = Settings.System.getString(context.getContentResolver(),
- Settings.System.DATE_FORMAT);
+ private static String getDateFormatString() {
+ java.text.DateFormat df = java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT);
+ if (df instanceof SimpleDateFormat) {
+ return ((SimpleDateFormat) df).toPattern();
+ }
- return getDateFormatStringForSetting(context, value);
+ throw new AssertionError("!(df instanceof SimpleDateFormat)");
}
/**
diff --git a/core/java/android/text/format/DateUtils.java b/core/java/android/text/format/DateUtils.java
index d0ed871..ac98e8a 100644
--- a/core/java/android/text/format/DateUtils.java
+++ b/core/java/android/text/format/DateUtils.java
@@ -28,9 +28,11 @@ import java.util.Date;
import java.util.Formatter;
import java.util.GregorianCalendar;
import java.util.Locale;
+import java.util.TimeZone;
import libcore.icu.DateIntervalFormat;
import libcore.icu.LocaleData;
+import libcore.icu.RelativeDateTimeFormatter;
/**
* This class contains various date-related utilities for creating text for things like
@@ -242,6 +244,8 @@ public class DateUtils
/**
* Returns a string describing the elapsed time since startTime.
+ * <p>
+ * The minimum timespan to report is set to {@link #MINUTE_IN_MILLIS}.
* @param startTime some time in the past.
* @return a String object containing the elapsed time.
* @see #getRelativeTimeSpanString(long, long, long)
@@ -289,69 +293,8 @@ public class DateUtils
*/
public static CharSequence getRelativeTimeSpanString(long time, long now, long minResolution,
int flags) {
- Resources r = Resources.getSystem();
- boolean abbrevRelative = (flags & (FORMAT_ABBREV_RELATIVE | FORMAT_ABBREV_ALL)) != 0;
-
- boolean past = (now >= time);
- long duration = Math.abs(now - time);
-
- int resId;
- long count;
- if (duration < MINUTE_IN_MILLIS && minResolution < MINUTE_IN_MILLIS) {
- count = duration / SECOND_IN_MILLIS;
- if (past) {
- if (abbrevRelative) {
- resId = com.android.internal.R.plurals.abbrev_num_seconds_ago;
- } else {
- resId = com.android.internal.R.plurals.num_seconds_ago;
- }
- } else {
- if (abbrevRelative) {
- resId = com.android.internal.R.plurals.abbrev_in_num_seconds;
- } else {
- resId = com.android.internal.R.plurals.in_num_seconds;
- }
- }
- } else if (duration < HOUR_IN_MILLIS && minResolution < HOUR_IN_MILLIS) {
- count = duration / MINUTE_IN_MILLIS;
- if (past) {
- if (abbrevRelative) {
- resId = com.android.internal.R.plurals.abbrev_num_minutes_ago;
- } else {
- resId = com.android.internal.R.plurals.num_minutes_ago;
- }
- } else {
- if (abbrevRelative) {
- resId = com.android.internal.R.plurals.abbrev_in_num_minutes;
- } else {
- resId = com.android.internal.R.plurals.in_num_minutes;
- }
- }
- } else if (duration < DAY_IN_MILLIS && minResolution < DAY_IN_MILLIS) {
- count = duration / HOUR_IN_MILLIS;
- if (past) {
- if (abbrevRelative) {
- resId = com.android.internal.R.plurals.abbrev_num_hours_ago;
- } else {
- resId = com.android.internal.R.plurals.num_hours_ago;
- }
- } else {
- if (abbrevRelative) {
- resId = com.android.internal.R.plurals.abbrev_in_num_hours;
- } else {
- resId = com.android.internal.R.plurals.in_num_hours;
- }
- }
- } else if (duration < WEEK_IN_MILLIS && minResolution < WEEK_IN_MILLIS) {
- return getRelativeDayString(r, time, now);
- } else {
- // We know that we won't be showing the time, so it is safe to pass
- // in a null context.
- return formatDateRange(null, time, time, flags);
- }
-
- String format = r.getQuantityString(resId, (int) count);
- return String.format(format, count);
+ return RelativeDateTimeFormatter.getRelativeTimeSpanString(Locale.getDefault(),
+ TimeZone.getDefault(), time, now, minResolution, flags);
}
/**
@@ -360,8 +303,8 @@ public class DateUtils
* <p>
* Example output strings for the US date format.
* <ul>
- * <li>3 mins ago, 10:15 AM</li>
- * <li>yesterday, 12:20 PM</li>
+ * <li>3 min. ago, 10:15 AM</li>
+ * <li>Yesterday, 12:20 PM</li>
* <li>Dec 12, 4:12 AM</li>
* <li>11/14/2007, 8:20 AM</li>
* </ul>
@@ -374,86 +317,19 @@ public class DateUtils
* @param transitionResolution the elapsed time (in milliseconds) at which
* to stop reporting relative measurements. Elapsed times greater
* than this resolution will default to normal date formatting.
- * For example, will transition from "6 days ago" to "Dec 12"
+ * For example, will transition from "7 days ago" to "Dec 12"
* when using {@link #WEEK_IN_MILLIS}.
*/
public static CharSequence getRelativeDateTimeString(Context c, long time, long minResolution,
long transitionResolution, int flags) {
- Resources r = Resources.getSystem();
-
- long now = System.currentTimeMillis();
- long duration = Math.abs(now - time);
-
- // getRelativeTimeSpanString() doesn't correctly format relative dates
- // above a week or exact dates below a day, so clamp
- // transitionResolution as needed.
- if (transitionResolution > WEEK_IN_MILLIS) {
- transitionResolution = WEEK_IN_MILLIS;
- } else if (transitionResolution < DAY_IN_MILLIS) {
- transitionResolution = DAY_IN_MILLIS;
- }
-
- CharSequence timeClause = formatDateRange(c, time, time, FORMAT_SHOW_TIME);
-
- String result;
- if (duration < transitionResolution) {
- CharSequence relativeClause = getRelativeTimeSpanString(time, now, minResolution, flags);
- result = r.getString(com.android.internal.R.string.relative_time, relativeClause, timeClause);
- } else {
- CharSequence dateClause = getRelativeTimeSpanString(c, time, false);
- result = r.getString(com.android.internal.R.string.date_time, dateClause, timeClause);
- }
-
- return result;
- }
-
- /**
- * Returns a string describing a day relative to the current day. For example if the day is
- * today this function returns "Today", if the day was a week ago it returns "7 days ago", and
- * if the day is in 2 weeks it returns "in 14 days".
- *
- * @param r the resources
- * @param day the relative day to describe in UTC milliseconds
- * @param today the current time in UTC milliseconds
- */
- private static final String getRelativeDayString(Resources r, long day, long today) {
- Locale locale = r.getConfiguration().locale;
- if (locale == null) {
- locale = Locale.getDefault();
- }
-
- // TODO: use TimeZone.getOffset instead.
- Time startTime = new Time();
- startTime.set(day);
- int startDay = Time.getJulianDay(day, startTime.gmtoff);
-
- Time currentTime = new Time();
- currentTime.set(today);
- int currentDay = Time.getJulianDay(today, currentTime.gmtoff);
-
- int days = Math.abs(currentDay - startDay);
- boolean past = (today > day);
-
- // TODO: some locales name other days too, such as de_DE's "Vorgestern" (today - 2).
- if (days == 1) {
- if (past) {
- return LocaleData.get(locale).yesterday;
- } else {
- return LocaleData.get(locale).tomorrow;
- }
- } else if (days == 0) {
- return LocaleData.get(locale).today;
- }
-
- int resId;
- if (past) {
- resId = com.android.internal.R.plurals.num_days_ago;
- } else {
- resId = com.android.internal.R.plurals.in_num_days;
+ // Same reason as in formatDateRange() to explicitly indicate 12- or 24-hour format.
+ if ((flags & (FORMAT_SHOW_TIME | FORMAT_12HOUR | FORMAT_24HOUR)) == FORMAT_SHOW_TIME) {
+ flags |= DateFormat.is24HourFormat(c) ? FORMAT_24HOUR : FORMAT_12HOUR;
}
- String format = r.getQuantityString(resId, days);
- return String.format(format, days);
+ return RelativeDateTimeFormatter.getRelativeDateTimeString(Locale.getDefault(),
+ TimeZone.getDefault(), time, System.currentTimeMillis(), minResolution,
+ transitionResolution, flags);
}
private static void initFormatStrings() {
diff --git a/core/java/android/text/format/Time.java b/core/java/android/text/format/Time.java
index 1e04eb4..0c66709 100644
--- a/core/java/android/text/format/Time.java
+++ b/core/java/android/text/format/Time.java
@@ -215,13 +215,15 @@ public class Time {
* <p>
* If "ignoreDst" is true, then this method sets the "isDst" field to -1
* (the "unknown" value) before normalizing. It then computes the
- * correct value for "isDst".
+ * time in milliseconds and sets the correct value for "isDst" if the
+ * fields resolve to a valid date / time.
*
* <p>
* See {@link #toMillis(boolean)} for more information about when to
- * use <tt>true</tt> or <tt>false</tt> for "ignoreDst".
+ * use <tt>true</tt> or <tt>false</tt> for "ignoreDst" and when {@code -1}
+ * might be returned.
*
- * @return the UTC milliseconds since the epoch
+ * @return the UTC milliseconds since the epoch, or {@code -1}
*/
public long normalize(boolean ignoreDst) {
calculator.copyFieldsFromTime(this);
@@ -317,6 +319,11 @@ public class Time {
* a} is less than {@code b}, a positive number if {@code a} is greater than
* {@code b}, or 0 if they are equal.
*
+ * <p>
+ * This method can return an incorrect answer when the date / time fields of
+ * either {@code Time} have been set to a local time that contradicts the
+ * available timezone information.
+ *
* @param a first {@code Time} instance to compare
* @param b second {@code Time} instance to compare
* @throws NullPointerException if either argument is {@code null}
@@ -730,6 +737,14 @@ public class Time {
* <p>
* You should also use <tt>toMillis(false)</tt> if you want
* to read back the same milliseconds that you set with {@link #set(long)}
+ *
+ * <p>
+ * This method can return {@code -1} when the date / time fields have been
+ * set to a local time that conflicts with available timezone information.
+ * For example, when daylight savings transitions cause an hour to be
+ * skipped: times within that hour will return {@code -1} if isDst =
+ * {@code -1}.
+ *
* or {@link #set(Time)} or after parsing a date string.
*/
public long toMillis(boolean ignoreDst) {
@@ -825,6 +840,10 @@ public class Time {
* Returns true if the time represented by this Time object occurs before
* the given time.
*
+ * <p>
+ * Equivalent to {@code Time.compare(this, that) &lt; 0}. See
+ * {@link #compare(Time, Time)} for details.
+ *
* @param that a given Time object to compare against
* @return true if this time is less than the given time
*/
@@ -837,6 +856,10 @@ public class Time {
* Returns true if the time represented by this Time object occurs after
* the given time.
*
+ * <p>
+ * Equivalent to {@code Time.compare(this, that) &gt; 0}. See
+ * {@link #compare(Time, Time)} for details.
+ *
* @param that a given Time object to compare against
* @return true if this time is greater than the given time
*/
@@ -917,6 +940,10 @@ public class Time {
* Returns true if the day of the given time is the epoch on the Julian Calendar
* (January 1, 1970 on the Gregorian calendar).
*
+ * <p>
+ * This method can return an incorrect answer when the date / time fields have
+ * been set to a local time that contradicts the available timezone information.
+ *
* @param time the time to test
* @return true if epoch.
*/
diff --git a/core/java/android/text/style/URLSpan.java b/core/java/android/text/style/URLSpan.java
index d29bfb6..0669b6f 100644
--- a/core/java/android/text/style/URLSpan.java
+++ b/core/java/android/text/style/URLSpan.java
@@ -16,6 +16,7 @@
package android.text.style;
+import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
@@ -23,6 +24,7 @@ import android.os.Parcel;
import android.provider.Browser;
import android.text.ParcelableSpan;
import android.text.TextUtils;
+import android.util.Log;
import android.view.View;
public class URLSpan extends ClickableSpan implements ParcelableSpan {
@@ -59,6 +61,10 @@ public class URLSpan extends ClickableSpan implements ParcelableSpan {
Context context = widget.getContext();
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName());
- context.startActivity(intent);
+ try {
+ context.startActivity(intent);
+ } catch (ActivityNotFoundException e) {
+ Log.w("URLSpan", "Actvity was not found for intent, " + intent.toString());
+ }
}
}
diff --git a/core/java/android/text/util/Linkify.java b/core/java/android/text/util/Linkify.java
index c1341e1..0f401a4 100644
--- a/core/java/android/text/util/Linkify.java
+++ b/core/java/android/text/util/Linkify.java
@@ -522,10 +522,6 @@ public class Linkify {
return 0;
}
-
- public final boolean equals(Object o) {
- return false;
- }
};
Collections.sort(links, c);
diff --git a/core/java/android/transition/ArcMotion.java b/core/java/android/transition/ArcMotion.java
index f95fb49..70dfe7f 100644
--- a/core/java/android/transition/ArcMotion.java
+++ b/core/java/android/transition/ArcMotion.java
@@ -21,7 +21,6 @@ import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Path;
import android.util.AttributeSet;
-import android.util.FloatMath;
/**
* A PathMotion that generates a curved path along an arc on an imaginary circle containing
@@ -257,7 +256,7 @@ public class ArcMotion extends PathMotion {
}
if (newArcDistance2 != 0) {
float ratio2 = newArcDistance2 / arcDist2;
- float ratio = FloatMath.sqrt(ratio2);
+ float ratio = (float) Math.sqrt(ratio2);
ex = dx + (ratio * (ex - dx));
ey = dy + (ratio * (ey - dy));
}
diff --git a/core/java/android/transition/CircularPropagation.java b/core/java/android/transition/CircularPropagation.java
index 51beb51..1e44cfa 100644
--- a/core/java/android/transition/CircularPropagation.java
+++ b/core/java/android/transition/CircularPropagation.java
@@ -16,7 +16,6 @@
package android.transition;
import android.graphics.Rect;
-import android.util.FloatMath;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
@@ -87,9 +86,9 @@ public class CircularPropagation extends VisibilityPropagation {
epicenterY = Math.round(loc[1] + (sceneRoot.getHeight() / 2)
+ sceneRoot.getTranslationY());
}
- float distance = distance(viewCenterX, viewCenterY, epicenterX, epicenterY);
- float maxDistance = distance(0, 0, sceneRoot.getWidth(), sceneRoot.getHeight());
- float distanceFraction = distance/maxDistance;
+ double distance = distance(viewCenterX, viewCenterY, epicenterX, epicenterY);
+ double maxDistance = distance(0, 0, sceneRoot.getWidth(), sceneRoot.getHeight());
+ double distanceFraction = distance/maxDistance;
long duration = transition.getDuration();
if (duration < 0) {
@@ -99,9 +98,9 @@ public class CircularPropagation extends VisibilityPropagation {
return Math.round(duration * directionMultiplier / mPropagationSpeed * distanceFraction);
}
- private static float distance(float x1, float y1, float x2, float y2) {
- float x = x2 - x1;
- float y = y2 - y1;
- return FloatMath.sqrt((x * x) + (y * y));
+ private static double distance(float x1, float y1, float x2, float y2) {
+ double x = x2 - x1;
+ double y = y2 - y1;
+ return Math.hypot(x, y);
}
}
diff --git a/core/java/android/transition/Explode.java b/core/java/android/transition/Explode.java
index 0ccdf15..788676a 100644
--- a/core/java/android/transition/Explode.java
+++ b/core/java/android/transition/Explode.java
@@ -22,7 +22,6 @@ import android.animation.TimeInterpolator;
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
-import android.util.FloatMath;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AccelerateInterpolator;
@@ -143,32 +142,29 @@ public class Explode extends Visibility {
int centerX = bounds.centerX();
int centerY = bounds.centerY();
- float xVector = centerX - focalX;
- float yVector = centerY - focalY;
+ double xVector = centerX - focalX;
+ double yVector = centerY - focalY;
if (xVector == 0 && yVector == 0) {
// Random direction when View is centered on focal View.
- xVector = (float) (Math.random() * 2) - 1;
- yVector = (float) (Math.random() * 2) - 1;
+ xVector = (Math.random() * 2) - 1;
+ yVector = (Math.random() * 2) - 1;
}
- float vectorSize = calculateDistance(xVector, yVector);
+ double vectorSize = Math.hypot(xVector, yVector);
xVector /= vectorSize;
yVector /= vectorSize;
- float maxDistance =
+ double maxDistance =
calculateMaxDistance(sceneRoot, focalX - sceneRootX, focalY - sceneRootY);
- outVector[0] = Math.round(maxDistance * xVector);
- outVector[1] = Math.round(maxDistance * yVector);
+ outVector[0] = (int) Math.round(maxDistance * xVector);
+ outVector[1] = (int) Math.round(maxDistance * yVector);
}
- private static float calculateMaxDistance(View sceneRoot, int focalX, int focalY) {
+ private static double calculateMaxDistance(View sceneRoot, int focalX, int focalY) {
int maxX = Math.max(focalX, sceneRoot.getWidth() - focalX);
int maxY = Math.max(focalY, sceneRoot.getHeight() - focalY);
- return calculateDistance(maxX, maxY);
+ return Math.hypot(maxX, maxY);
}
- private static float calculateDistance(float x, float y) {
- return FloatMath.sqrt((x * x) + (y * y));
- }
}
diff --git a/core/java/android/transition/PatternPathMotion.java b/core/java/android/transition/PatternPathMotion.java
index a609df6..773c387 100644
--- a/core/java/android/transition/PatternPathMotion.java
+++ b/core/java/android/transition/PatternPathMotion.java
@@ -23,7 +23,6 @@ import android.graphics.Matrix;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.util.AttributeSet;
-import android.util.FloatMath;
import android.util.PathParser;
/**
@@ -119,7 +118,7 @@ public class PatternPathMotion extends PathMotion {
mTempMatrix.setTranslate(-startX, -startY);
float dx = endX - startX;
float dy = endY - startY;
- float distance = distance(dx, dy);
+ float distance = (float) Math.hypot(dx, dy);
float scale = 1 / distance;
mTempMatrix.postScale(scale, scale);
double angle = Math.atan2(dy, dx);
@@ -130,9 +129,9 @@ public class PatternPathMotion extends PathMotion {
@Override
public Path getPath(float startX, float startY, float endX, float endY) {
- float dx = endX - startX;
- float dy = endY - startY;
- float length = distance(dx, dy);
+ double dx = endX - startX;
+ double dy = endY - startY;
+ float length = (float) Math.hypot(dx, dy);
double angle = Math.atan2(dy, dx);
mTempMatrix.setScale(length, length);
@@ -143,7 +142,4 @@ public class PatternPathMotion extends PathMotion {
return path;
}
- private static float distance(float x, float y) {
- return FloatMath.sqrt((x * x) + (y * y));
- }
}
diff --git a/core/java/android/transition/SidePropagation.java b/core/java/android/transition/SidePropagation.java
index ad6c2dd..5dd1fff 100644
--- a/core/java/android/transition/SidePropagation.java
+++ b/core/java/android/transition/SidePropagation.java
@@ -16,7 +16,6 @@
package android.transition;
import android.graphics.Rect;
-import android.util.FloatMath;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
diff --git a/core/java/android/util/ArraySet.java b/core/java/android/util/ArraySet.java
index 68f725e..7da3941 100644
--- a/core/java/android/util/ArraySet.java
+++ b/core/java/android/util/ArraySet.java
@@ -475,6 +475,26 @@ public final class ArraySet<E> implements Collection<E>, Set<E> {
}
/**
+ * Perform a {@link #remove(Object)} of all values in <var>array</var>
+ * @param array The array whose contents are to be removed.
+ */
+ public boolean removeAll(ArraySet<? extends E> array) {
+ // TODO: If array is sufficiently large, a marking approach might be beneficial. In a first
+ // pass, use the property that the sets are sorted by hash to make this linear passes
+ // (except for hash collisions, which means worst case still n*m), then do one
+ // collection pass into a new array. This avoids binary searches and excessive memcpy.
+ final int N = array.mSize;
+
+ // Note: ArraySet does not make thread-safety guarantees. So instead of OR-ing together all
+ // the single results, compare size before and after.
+ final int originalSize = mSize;
+ for (int i = 0; i < N; i++) {
+ remove(array.valueAt(i));
+ }
+ return originalSize != mSize;
+ }
+
+ /**
* Return the number of items in this array map.
*/
@Override
diff --git a/core/java/android/util/FloatMath.java b/core/java/android/util/FloatMath.java
index bdcf5ca..8f488af 100644
--- a/core/java/android/util/FloatMath.java
+++ b/core/java/android/util/FloatMath.java
@@ -17,10 +17,13 @@
package android.util;
/**
- * Math routines similar to those found in {@link java.lang.Math}. On
- * versions of Android with a JIT, these are significantly slower than
- * the equivalent {@code Math} functions, which should be used in preference
- * to these.
+ * Math routines similar to those found in {@link java.lang.Math}.
+ *
+ * <p>Historically these methods were faster than the equivalent double-based
+ * {@link java.lang.Math} methods. On versions of Android with a JIT they
+ * became slower and have since been re-implemented to wrap calls to
+ * {@link java.lang.Math}. {@link java.lang.Math} should be used in
+ * preference.
*
* @deprecated Use {@link java.lang.Math} instead.
*/
@@ -37,7 +40,9 @@ public class FloatMath {
* @param value to be converted
* @return the floor of value
*/
- public static native float floor(float value);
+ public static float floor(float value) {
+ return (float) Math.floor(value);
+ }
/**
* Returns the float conversion of the most negative (i.e. closest to
@@ -46,7 +51,9 @@ public class FloatMath {
* @param value to be converted
* @return the ceiling of value
*/
- public static native float ceil(float value);
+ public static float ceil(float value) {
+ return (float) Math.ceil(value);
+ }
/**
* Returns the closest float approximation of the sine of the argument.
@@ -54,7 +61,9 @@ public class FloatMath {
* @param angle to compute the cosine of, in radians
* @return the sine of angle
*/
- public static native float sin(float angle);
+ public static float sin(float angle) {
+ return (float) Math.sin(angle);
+ }
/**
* Returns the closest float approximation of the cosine of the argument.
@@ -62,7 +71,9 @@ public class FloatMath {
* @param angle to compute the cosine of, in radians
* @return the cosine of angle
*/
- public static native float cos(float angle);
+ public static float cos(float angle) {
+ return (float) Math.cos(angle);
+ }
/**
* Returns the closest float approximation of the square root of the
@@ -71,7 +82,9 @@ public class FloatMath {
* @param value to compute sqrt of
* @return the square root of value
*/
- public static native float sqrt(float value);
+ public static float sqrt(float value) {
+ return (float) Math.sqrt(value);
+ }
/**
* Returns the closest float approximation of the raising "e" to the power
@@ -80,7 +93,9 @@ public class FloatMath {
* @param value to compute the exponential of
* @return the exponential of value
*/
- public static native float exp(float value);
+ public static float exp(float value) {
+ return (float) Math.exp(value);
+ }
/**
* Returns the closest float approximation of the result of raising {@code
@@ -90,7 +105,9 @@ public class FloatMath {
* @param y the exponent of the operation.
* @return {@code x} to the power of {@code y}.
*/
- public static native float pow(float x, float y);
+ public static float pow(float x, float y) {
+ return (float) Math.pow(x, y);
+ }
/**
* Returns {@code sqrt(}<i>{@code x}</i><sup>{@code 2}</sup>{@code +} <i>
@@ -100,5 +117,7 @@ public class FloatMath {
* @param y a float number
* @return the hypotenuse
*/
- public static native float hypot(float x, float y);
+ public static float hypot(float x, float y) {
+ return (float) Math.hypot(x, y);
+ }
}
diff --git a/core/java/android/util/MathUtils.java b/core/java/android/util/MathUtils.java
index 13a692e..36d5b50 100644
--- a/core/java/android/util/MathUtils.java
+++ b/core/java/android/util/MathUtils.java
@@ -94,7 +94,7 @@ public final class MathUtils {
public static float dist(float x1, float y1, float x2, float y2) {
final float x = (x2 - x1);
final float y = (y2 - y1);
- return (float) Math.sqrt(x * x + y * y);
+ return (float) Math.hypot(x, y);
}
public static float dist(float x1, float y1, float z1, float x2, float y2, float z2) {
@@ -105,7 +105,7 @@ public final class MathUtils {
}
public static float mag(float a, float b) {
- return (float) Math.sqrt(a * a + b * b);
+ return (float) Math.hypot(a, b);
}
public static float mag(float a, float b, float c) {
diff --git a/core/java/android/util/NtpTrustedTime.java b/core/java/android/util/NtpTrustedTime.java
index 8ebcacd..ed2d3c6 100644
--- a/core/java/android/util/NtpTrustedTime.java
+++ b/core/java/android/util/NtpTrustedTime.java
@@ -24,6 +24,7 @@ import android.net.NetworkInfo;
import android.net.SntpClient;
import android.os.SystemClock;
import android.provider.Settings;
+import android.text.TextUtils;
/**
* {@link TrustedTime} that connects with a remote NTP server as its trusted
@@ -79,7 +80,7 @@ public class NtpTrustedTime implements TrustedTime {
@Override
public boolean forceRefresh() {
- if (mServer == null) {
+ if (TextUtils.isEmpty(mServer)) {
// missing server, so no trusted time available
return false;
}
diff --git a/core/java/android/util/PathParser.java b/core/java/android/util/PathParser.java
index 92b19be..18dc262 100644
--- a/core/java/android/util/PathParser.java
+++ b/core/java/android/util/PathParser.java
@@ -164,7 +164,7 @@ public class PathParser {
* @return array of floats
*/
private static float[] getFloats(String s) {
- if (s.charAt(0) == 'z' | s.charAt(0) == 'Z') {
+ if (s.charAt(0) == 'z' || s.charAt(0) == 'Z') {
return new float[0];
}
try {
diff --git a/core/java/android/util/Spline.java b/core/java/android/util/Spline.java
index 41a2e5d..bed3a60 100644
--- a/core/java/android/util/Spline.java
+++ b/core/java/android/util/Spline.java
@@ -165,7 +165,7 @@ public abstract class Spline {
throw new IllegalArgumentException("The control points must have "
+ "monotonic Y values.");
}
- float h = FloatMath.hypot(a, b);
+ float h = (float) Math.hypot(a, b);
if (h > 9f) {
float t = 3f / h;
m[i] = t * a * d[i];
diff --git a/core/java/android/view/ScaleGestureDetector.java b/core/java/android/view/ScaleGestureDetector.java
index 42a58a8..6508cca 100644
--- a/core/java/android/view/ScaleGestureDetector.java
+++ b/core/java/android/view/ScaleGestureDetector.java
@@ -21,7 +21,6 @@ import android.content.res.Resources;
import android.os.Build;
import android.os.Handler;
import android.os.SystemClock;
-import android.util.FloatMath;
/**
* Detects scaling transformation gestures using the supplied {@link MotionEvent}s.
@@ -394,7 +393,7 @@ public class ScaleGestureDetector {
if (inDoubleTapMode()) {
span = spanY;
} else {
- span = FloatMath.sqrt(spanX * spanX + spanY * spanY);
+ span = (float) Math.hypot(spanX, spanY);
}
// Dispatch begin/end events as needed.
diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java
index 50e64c6..27304f5 100644
--- a/core/java/android/view/ViewDebug.java
+++ b/core/java/android/view/ViewDebug.java
@@ -1005,31 +1005,23 @@ public class ViewDebug {
return fields;
}
- final ArrayList<Field> declaredFields = new ArrayList();
- klass.getDeclaredFieldsUnchecked(false, declaredFields);
-
- final ArrayList<Field> foundFields = new ArrayList<Field>();
- final int count = declaredFields.size();
- for (int i = 0; i < count; i++) {
- final Field field = declaredFields.get(i);
-
- // Ensure the field type can be resolved.
- try {
- field.getType();
- } catch (NoClassDefFoundError e) {
- continue;
- }
-
- if (field.isAnnotationPresent(ExportedProperty.class)) {
- field.setAccessible(true);
- foundFields.add(field);
- sAnnotations.put(field, field.getAnnotation(ExportedProperty.class));
+ try {
+ final Field[] declaredFields = klass.getDeclaredFieldsUnchecked(false);
+ final ArrayList<Field> foundFields = new ArrayList<Field>();
+ for (final Field field : declaredFields) {
+ // Fields which can't be resolved have a null type.
+ if (field.getType() != null && field.isAnnotationPresent(ExportedProperty.class)) {
+ field.setAccessible(true);
+ foundFields.add(field);
+ sAnnotations.put(field, field.getAnnotation(ExportedProperty.class));
+ }
}
+ fields = foundFields.toArray(new Field[foundFields.size()]);
+ map.put(klass, fields);
+ } catch (NoClassDefFoundError e) {
+ throw new AssertionError(e);
}
- fields = foundFields.toArray(new Field[foundFields.size()]);
- map.put(klass, fields);
-
return fields;
}
@@ -1048,14 +1040,10 @@ public class ViewDebug {
return methods;
}
- final ArrayList<Method> declaredMethods = new ArrayList();
- klass.getDeclaredMethodsUnchecked(false, declaredMethods);
+ methods = klass.getDeclaredMethodsUnchecked(false);
final ArrayList<Method> foundMethods = new ArrayList<Method>();
- final int count = declaredMethods.size();
- for (int i = 0; i < count; i++) {
- final Method method = declaredMethods.get(i);
-
+ for (final Method method : methods) {
// Ensure the method return and parameter types can be resolved.
try {
method.getReturnType();
@@ -1651,4 +1639,4 @@ public class ViewDebug {
}
});
}
-} \ No newline at end of file
+}
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index c4b689f..f8026d1 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -6377,8 +6377,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
/**
* Information about how wide the view wants to be. Can be one of the
- * constants FILL_PARENT (replaced by MATCH_PARENT ,
- * in API Level 8) or WRAP_CONTENT. or an exact size.
+ * constants FILL_PARENT (replaced by MATCH_PARENT
+ * in API Level 8) or WRAP_CONTENT, or an exact size.
*/
@ViewDebug.ExportedProperty(category = "layout", mapping = {
@ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"),
@@ -6388,8 +6388,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
/**
* Information about how tall the view wants to be. Can be one of the
- * constants FILL_PARENT (replaced by MATCH_PARENT ,
- * in API Level 8) or WRAP_CONTENT. or an exact size.
+ * constants FILL_PARENT (replaced by MATCH_PARENT
+ * in API Level 8) or WRAP_CONTENT, or an exact size.
*/
@ViewDebug.ExportedProperty(category = "layout", mapping = {
@ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"),
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 84434f7..d26bcd3 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -1979,7 +1979,8 @@ public interface WindowManager extends ViewManager {
if (userActivityTimeout >= 0) {
sb.append(" userActivityTimeout=").append(userActivityTimeout);
}
- if (!surfaceInsets.equals(Insets.NONE)) {
+ if (surfaceInsets.left != 0 || surfaceInsets.top != 0 || surfaceInsets.right != 0 ||
+ surfaceInsets.bottom != 0) {
sb.append(" surfaceInsets=").append(surfaceInsets);
}
if (needsMenuKey != NEEDS_MENU_UNSET) {
diff --git a/core/java/android/view/accessibility/AccessibilityWindowInfo.java b/core/java/android/view/accessibility/AccessibilityWindowInfo.java
index e1942be..a75e8a7 100644
--- a/core/java/android/view/accessibility/AccessibilityWindowInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityWindowInfo.java
@@ -573,7 +573,7 @@ public final class AccessibilityWindowInfo implements Parcelable {
if (other.mType != mType) {
throw new IllegalArgumentException("Not same type.");
}
- if (!mBoundsInScreen.equals(mBoundsInScreen)) {
+ if (!mBoundsInScreen.equals(other.mBoundsInScreen)) {
return true;
}
if (mLayer != other.mLayer) {
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index b56378f..1416e1b 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -494,19 +494,17 @@ public final class InputMethodManager {
mIInputContext.finishComposingText();
} catch (RemoteException e) {
}
- // Check focus again in case that "onWindowFocus" is called before
- // handling this message.
- if (mServedView != null && mServedView.hasWindowFocus()) {
- // "finishComposingText" has been already called above. So we
- // should not call mServedInputConnection.finishComposingText here.
- // Also, please note that this handler thread could be different
- // from a thread that created mServedView. That could happen
- // the current activity is running in the system process.
- // In that case, we really should not call
- // mServedInputConnection.finishComposingText.
- if (checkFocusNoStartInput(mHasBeenInactive, false)) {
- startInputInner(null, 0, 0, 0);
- }
+ }
+ // Check focus again in case that "onWindowFocus" is called before
+ // handling this message.
+ if (mServedView != null && mServedView.hasWindowFocus()) {
+ // Please note that this handler thread could be different
+ // from a thread that created mServedView. That could happen
+ // the current activity is running in the system process.
+ // In that case, we really should not call
+ // mServedInputConnection.finishComposingText.
+ if (checkFocusNoStartInput(mHasBeenInactive, false)) {
+ startInputInner(null, 0, 0, 0);
}
}
}
@@ -1995,8 +1993,8 @@ public final class InputMethodManager {
List<Object> info = mService.getShortcutInputMethodsAndSubtypes();
// "info" has imi1, subtype1, subtype2, imi2, subtype2, imi3, subtype3..in the list
ArrayList<InputMethodSubtype> subtypes = null;
- final int N = info.size();
- if (info != null && N > 0) {
+ if (info != null && !info.isEmpty()) {
+ final int N = info.size();
for (int i = 0; i < N; ++i) {
Object o = info.get(i);
if (o instanceof InputMethodInfo) {
diff --git a/core/java/android/net/http/ErrorStrings.java b/core/java/android/webkit/LegacyErrorStrings.java
index 8383681..11fc05d 100644
--- a/core/java/android/net/http/ErrorStrings.java
+++ b/core/java/android/webkit/LegacyErrorStrings.java
@@ -14,9 +14,10 @@
* limitations under the License.
*/
-package android.net.http;
+package android.webkit;
import android.content.Context;
+import android.net.http.EventHandler;
import android.util.Log;
/**
@@ -24,8 +25,8 @@ import android.util.Log;
*
* {@hide}
*/
-public class ErrorStrings {
- private ErrorStrings() { /* Utility class, don't instantiate. */ }
+class LegacyErrorStrings {
+ private LegacyErrorStrings() { /* Utility class, don't instantiate. */ }
private static final String LOGTAG = "Http";
@@ -33,7 +34,7 @@ public class ErrorStrings {
* Get the localized error message resource for the given error code.
* If the code is unknown, we'll return a generic error message.
*/
- public static String getString(int errorCode, Context context) {
+ static String getString(int errorCode, Context context) {
return context.getText(getResource(errorCode)).toString();
}
@@ -41,7 +42,7 @@ public class ErrorStrings {
* Get the localized error message resource for the given error code.
* If the code is unknown, we'll return a generic error message.
*/
- public static int getResource(int errorCode) {
+ private static int getResource(int errorCode) {
switch(errorCode) {
case EventHandler.OK:
return com.android.internal.R.string.httpErrorOk;
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 1d2c311..ef9aaf1 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -900,7 +900,9 @@ public abstract class WebSettings {
* and therefore secure policy, this setting should be disabled.
* Note that this setting affects only JavaScript access to file scheme
* resources. Other access to such resources, for example, from image HTML
- * elements, is unaffected.
+ * elements, is unaffected. To prevent possible violation of same domain policy
+ * on {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH} and earlier
+ * devices, you should explicitly set this value to {@code false}.
* <p>
* The default value is true for API level
* {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and below,
@@ -920,7 +922,9 @@ public abstract class WebSettings {
* the value of {@link #getAllowUniversalAccessFromFileURLs} is true.
* Note too, that this setting affects only JavaScript access to file scheme
* resources. Other access to such resources, for example, from image HTML
- * elements, is unaffected.
+ * elements, is unaffected. To prevent possible violation of same domain policy
+ * on {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH} and earlier
+ * devices, you should explicitly set this value to {@code false}.
* <p>
* The default value is true for API level
* {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH_MR1} and below,
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 48712bb..bab1f3b 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -2152,7 +2152,7 @@ public class WebView extends AbsoluteLayout
/**
* In addition to the FindListener that the user may set via the WebView.setFindListener
* API, FindActionModeCallback will register it's own FindListener. We keep them separate
- * via this class so that that the two FindListeners can potentially exist at once.
+ * via this class so that the two FindListeners can potentially exist at once.
*/
private class FindListenerDistributor implements FindListener {
private FindListener mFindDialogFindListener;
diff --git a/core/java/android/webkit/WebViewDelegate.java b/core/java/android/webkit/WebViewDelegate.java
index e03445e..ac360fa 100644
--- a/core/java/android/webkit/WebViewDelegate.java
+++ b/core/java/android/webkit/WebViewDelegate.java
@@ -22,7 +22,6 @@ import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
-import android.net.http.ErrorStrings;
import android.os.SystemProperties;
import android.os.Trace;
import android.util.SparseArray;
@@ -150,7 +149,7 @@ public final class WebViewDelegate {
* Returns the error string for the given {@code errorCode}.
*/
public String getErrorString(Context context, int errorCode) {
- return ErrorStrings.getString(errorCode, context);
+ return LegacyErrorStrings.getString(errorCode, context);
}
/**
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 523f970..1e269a3 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -2395,7 +2395,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
lp.itemId = mAdapter.getItemId(position);
}
lp.viewType = mAdapter.getItemViewType(position);
- child.setLayoutParams(lp);
+ if (lp != vlp) {
+ child.setLayoutParams(lp);
+ }
}
class ListItemAccessibilityDelegate extends AccessibilityDelegate {
diff --git a/core/java/android/widget/AbsSeekBar.java b/core/java/android/widget/AbsSeekBar.java
index 4800c7f..a3ce808 100644
--- a/core/java/android/widget/AbsSeekBar.java
+++ b/core/java/android/widget/AbsSeekBar.java
@@ -695,19 +695,20 @@ public abstract class AbsSeekBar extends ProgressBar {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (isEnabled()) {
- int progress = getProgress();
+ int increment = mKeyProgressIncrement;
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_LEFT:
- if (progress <= 0) break;
- setProgress(progress - mKeyProgressIncrement, true);
- onKeyChange();
- return true;
-
+ increment = -increment;
+ // fallthrough
case KeyEvent.KEYCODE_DPAD_RIGHT:
- if (progress >= getMax()) break;
- setProgress(progress + mKeyProgressIncrement, true);
- onKeyChange();
- return true;
+ increment = isLayoutRtl() ? -increment : increment;
+ int progress = getProgress() + increment;
+ if (progress > 0 && progress < getMax()) {
+ setProgress(progress, true);
+ onKeyChange();
+ return true;
+ }
+ break;
}
}
diff --git a/core/java/android/widget/DatePickerCalendarDelegate.java b/core/java/android/widget/DatePickerCalendarDelegate.java
index 61547f6..1d50eb2 100644..100755
--- a/core/java/android/widget/DatePickerCalendarDelegate.java
+++ b/core/java/android/widget/DatePickerCalendarDelegate.java
@@ -112,8 +112,8 @@ class DatePickerCalendarDelegate extends DatePicker.AbstractDatePickerDelegate i
mTempDate = getCalendarForLocale(mMaxDate, locale);
mCurrentDate = getCalendarForLocale(mCurrentDate, locale);
- mMinDate.set(DEFAULT_START_YEAR, 1, 1);
- mMaxDate.set(DEFAULT_END_YEAR, 12, 31);
+ mMinDate.set(DEFAULT_START_YEAR, Calendar.JANUARY, 1);
+ mMaxDate.set(DEFAULT_END_YEAR, Calendar.DECEMBER, 31);
final Resources res = mDelegator.getResources();
final TypedArray a = mContext.obtainStyledAttributes(attrs,
diff --git a/core/java/android/widget/DateTimeView.java b/core/java/android/widget/DateTimeView.java
index 443884a..db17df7 100644
--- a/core/java/android/widget/DateTimeView.java
+++ b/core/java/android/widget/DateTimeView.java
@@ -156,7 +156,7 @@ public class DateTimeView extends TextView {
format = getTimeFormat();
break;
case SHOW_MONTH_DAY_YEAR:
- format = getDateFormat();
+ format = DateFormat.getDateInstance(DateFormat.SHORT);
break;
default:
throw new RuntimeException("unknown display value: " + display);
@@ -196,21 +196,6 @@ public class DateTimeView extends TextView {
return android.text.format.DateFormat.getTimeFormat(getContext());
}
- private DateFormat getDateFormat() {
- String format = Settings.System.getString(getContext().getContentResolver(),
- Settings.System.DATE_FORMAT);
- if (format == null || "".equals(format)) {
- return DateFormat.getDateInstance(DateFormat.SHORT);
- } else {
- try {
- return new SimpleDateFormat(format);
- } catch (IllegalArgumentException e) {
- // If we tried to use a bad format string, fall back to a default.
- return DateFormat.getDateInstance(DateFormat.SHORT);
- }
- }
- }
-
void clearFormatAndUpdate() {
mLastFormat = null;
update();
@@ -283,14 +268,10 @@ public class DateTimeView extends TextView {
filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
context.registerReceiver(mReceiver, filter);
-
- final Uri uri = Settings.System.getUriFor(Settings.System.DATE_FORMAT);
- context.getContentResolver().registerContentObserver(uri, true, mObserver);
}
void unregister(Context context) {
context.unregisterReceiver(mReceiver);
- context.getContentResolver().unregisterContentObserver(mObserver);
}
}
}
diff --git a/core/java/android/widget/EdgeEffect.java b/core/java/android/widget/EdgeEffect.java
index 6925756..391347e 100644
--- a/core/java/android/widget/EdgeEffect.java
+++ b/core/java/android/widget/EdgeEffect.java
@@ -24,7 +24,6 @@ import android.graphics.Rect;
import android.content.Context;
import android.graphics.Canvas;
-import android.util.FloatMath;
import android.view.animation.AnimationUtils;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
@@ -220,8 +219,8 @@ public class EdgeEffect {
if (mPullDistance == 0) {
mGlowScaleY = mGlowScaleYStart = 0;
} else {
- final float scale = Math.max(0, 1 - 1 /
- FloatMath.sqrt(Math.abs(mPullDistance) * mBounds.height()) - 0.3f) / 0.7f;
+ final float scale = (float) (Math.max(0, 1 - 1 /
+ Math.sqrt(Math.abs(mPullDistance) * mBounds.height()) - 0.3d) / 0.7d);
mGlowScaleY = mGlowScaleYStart = scale;
}
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 936da32..2aaad7a 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -3110,7 +3110,7 @@ public class Editor {
if (isTopLeftVisible || isBottomRightVisible) {
characterBoundsFlags |= CursorAnchorInfo.FLAG_HAS_VISIBLE_REGION;
}
- if (!isTopLeftVisible || !isTopLeftVisible) {
+ if (!isTopLeftVisible || !isBottomRightVisible) {
characterBoundsFlags |= CursorAnchorInfo.FLAG_HAS_INVISIBLE_REGION;
}
if (isRtl) {
diff --git a/core/java/android/widget/Gallery.java b/core/java/android/widget/Gallery.java
index f7c839f..b4a003a 100644
--- a/core/java/android/widget/Gallery.java
+++ b/core/java/android/widget/Gallery.java
@@ -1210,13 +1210,13 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_LEFT:
- if (movePrevious()) {
+ if (moveDirection(-1)) {
playSoundEffect(SoundEffectConstants.NAVIGATION_LEFT);
return true;
}
break;
case KeyEvent.KEYCODE_DPAD_RIGHT:
- if (moveNext()) {
+ if (moveDirection(1)) {
playSoundEffect(SoundEffectConstants.NAVIGATION_RIGHT);
return true;
}
@@ -1256,18 +1256,12 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList
return super.onKeyUp(keyCode, event);
}
- boolean movePrevious() {
- if (mItemCount > 0 && mSelectedPosition > 0) {
- scrollToChild(mSelectedPosition - mFirstPosition - 1);
- return true;
- } else {
- return false;
- }
- }
+ boolean moveDirection(int direction) {
+ direction = isLayoutRtl() ? -direction : direction;
+ int targetPosition = mSelectedPosition + direction;
- boolean moveNext() {
- if (mItemCount > 0 && mSelectedPosition < mItemCount - 1) {
- scrollToChild(mSelectedPosition - mFirstPosition + 1);
+ if (mItemCount > 0 && targetPosition >= 0 && targetPosition < mItemCount) {
+ scrollToChild(targetPosition - mFirstPosition);
return true;
} else {
return false;
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index 2e9858c..ba6f061 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -2420,10 +2420,15 @@ public class ListView extends AbsListView {
(ViewGroup) selectedView, currentFocus, direction);
if (nextFocus != null) {
// do the math to get interesting rect in next focus' coordinates
- currentFocus.getFocusedRect(mTempRect);
- offsetDescendantRectToMyCoords(currentFocus, mTempRect);
- offsetRectIntoDescendantCoords(nextFocus, mTempRect);
- if (nextFocus.requestFocus(direction, mTempRect)) {
+ Rect focusedRect = mTempRect;
+ if (currentFocus != null) {
+ currentFocus.getFocusedRect(focusedRect);
+ offsetDescendantRectToMyCoords(currentFocus, focusedRect);
+ offsetRectIntoDescendantCoords(nextFocus, focusedRect);
+ } else {
+ focusedRect = null;
+ }
+ if (nextFocus.requestFocus(direction, focusedRect)) {
return true;
}
}
@@ -2556,8 +2561,10 @@ public class ListView extends AbsListView {
if (mItemsCanFocus && (focusResult == null)
&& selectedView != null && selectedView.hasFocus()) {
final View focused = selectedView.findFocus();
- if (!isViewAncestorOf(focused, this) || distanceToView(focused) > 0) {
- focused.clearFocus();
+ if (focused != null) {
+ if (!isViewAncestorOf(focused, this) || distanceToView(focused) > 0) {
+ focused.clearFocus();
+ }
}
}
diff --git a/core/java/android/widget/OverScroller.java b/core/java/android/widget/OverScroller.java
index a40d4f8..451e493 100644
--- a/core/java/android/widget/OverScroller.java
+++ b/core/java/android/widget/OverScroller.java
@@ -18,7 +18,6 @@ package android.widget;
import android.content.Context;
import android.hardware.SensorManager;
-import android.util.FloatMath;
import android.util.Log;
import android.view.ViewConfiguration;
import android.view.animation.AnimationUtils;
@@ -181,9 +180,7 @@ public class OverScroller {
* @return The original velocity less the deceleration, norm of the X and Y velocity vector.
*/
public float getCurrVelocity() {
- float squaredNorm = mScrollerX.mCurrVelocity * mScrollerX.mCurrVelocity;
- squaredNorm += mScrollerY.mCurrVelocity * mScrollerY.mCurrVelocity;
- return FloatMath.sqrt(squaredNorm);
+ return (float) Math.hypot(mScrollerX.mCurrVelocity, mScrollerY.mCurrVelocity);
}
/**
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 396c0b9..5419ab6 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -378,10 +378,10 @@ public class PopupWindow {
}
/**
- * Set the flag on popup to ignore cheek press event; by default this flag
+ * Set the flag on popup to ignore cheek press events; by default this flag
* is set to false
- * which means the pop wont ignore cheek press dispatch events.
- *
+ * which means the popup will not ignore cheek press dispatch events.
+ *
* <p>If the popup is showing, calling this method will take effect only
* the next time the popup is shown or through a manual call to one of
* the {@link #update()} methods.</p>
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index de1bbc7..358dbde 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -1812,9 +1812,7 @@ public class ProgressBar extends View {
}
if (mRefreshProgressRunnable != null) {
removeCallbacks(mRefreshProgressRunnable);
- }
- if (mRefreshProgressRunnable != null && mRefreshIsPosted) {
- removeCallbacks(mRefreshProgressRunnable);
+ mRefreshIsPosted = false;
}
if (mAccessibilityEventSender != null) {
removeCallbacks(mAccessibilityEventSender);
diff --git a/core/java/android/widget/RemoteViewsAdapter.java b/core/java/android/widget/RemoteViewsAdapter.java
index 56bdb9b..5eaf20c 100644
--- a/core/java/android/widget/RemoteViewsAdapter.java
+++ b/core/java/android/widget/RemoteViewsAdapter.java
@@ -817,12 +817,12 @@ public class RemoteViewsAdapter extends BaseAdapter implements Handler.Callback
mContext = context;
mIntent = intent;
- mAppWidgetId = intent.getIntExtra(RemoteViews.EXTRA_REMOTEADAPTER_APPWIDGET_ID, -1);
-
- mLayoutInflater = LayoutInflater.from(context);
if (mIntent == null) {
throw new IllegalArgumentException("Non-null Intent must be specified.");
}
+
+ mAppWidgetId = intent.getIntExtra(RemoteViews.EXTRA_REMOTEADAPTER_APPWIDGET_ID, -1);
+ mLayoutInflater = LayoutInflater.from(context);
mRequestedViews = new RemoteViewsFrameLayoutRefSet();
// Strip the previously injected app widget id from service intent
diff --git a/core/java/android/widget/Scroller.java b/core/java/android/widget/Scroller.java
index 5e88a96..357c9c3 100644
--- a/core/java/android/widget/Scroller.java
+++ b/core/java/android/widget/Scroller.java
@@ -19,7 +19,6 @@ package android.widget;
import android.content.Context;
import android.hardware.SensorManager;
import android.os.Build;
-import android.util.FloatMath;
import android.view.ViewConfiguration;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
@@ -425,7 +424,7 @@ public class Scroller {
float dx = (float) (mFinalX - mStartX);
float dy = (float) (mFinalY - mStartY);
- float hyp = FloatMath.sqrt(dx * dx + dy * dy);
+ float hyp = (float) Math.hypot(dx, dy);
float ndx = dx / hyp;
float ndy = dy / hyp;
@@ -442,7 +441,7 @@ public class Scroller {
mMode = FLING_MODE;
mFinished = false;
- float velocity = FloatMath.sqrt(velocityX * velocityX + velocityY * velocityY);
+ float velocity = (float) Math.hypot(velocityX, velocityY);
mVelocity = velocity;
mDuration = getSplineFlingDuration(velocity);
diff --git a/core/java/android/widget/StackView.java b/core/java/android/widget/StackView.java
index d2e718c..9e168b8 100644
--- a/core/java/android/widget/StackView.java
+++ b/core/java/android/widget/StackView.java
@@ -1050,10 +1050,8 @@ public class StackView extends AdapterViewAnimator {
if (mView != null) {
final LayoutParams viewLp = (LayoutParams) mView.getLayoutParams();
- float d = (float) Math.sqrt(Math.pow(viewLp.horizontalOffset, 2) +
- Math.pow(viewLp.verticalOffset, 2));
- float maxd = (float) Math.sqrt(Math.pow(mSlideAmount, 2) +
- Math.pow(0.4f * mSlideAmount, 2));
+ float d = (float) Math.hypot(viewLp.horizontalOffset, viewLp.verticalOffset);
+ float maxd = (float) Math.hypot(mSlideAmount, 0.4f * mSlideAmount);
if (velocity == 0) {
return (invert ? (1 - d / maxd) : d / maxd) * DEFAULT_ANIMATION_DURATION;
diff --git a/core/java/android/widget/TextClock.java b/core/java/android/widget/TextClock.java
index a98d272..e2acaac 100644
--- a/core/java/android/widget/TextClock.java
+++ b/core/java/android/widget/TextClock.java
@@ -230,10 +230,10 @@ public class TextClock extends TextView {
if (mFormat12 == null || mFormat24 == null) {
LocaleData ld = LocaleData.get(getContext().getResources().getConfiguration().locale);
if (mFormat12 == null) {
- mFormat12 = ld.timeFormat12;
+ mFormat12 = ld.timeFormat_hm;
}
if (mFormat24 == null) {
- mFormat24 = ld.timeFormat24;
+ mFormat24 = ld.timeFormat_Hm;
}
}
@@ -457,9 +457,9 @@ public class TextClock extends TextView {
LocaleData ld = LocaleData.get(getContext().getResources().getConfiguration().locale);
if (format24Requested) {
- mFormat = abc(mFormat24, mFormat12, ld.timeFormat24);
+ mFormat = abc(mFormat24, mFormat12, ld.timeFormat_Hm);
} else {
- mFormat = abc(mFormat12, mFormat24, ld.timeFormat12);
+ mFormat = abc(mFormat12, mFormat24, ld.timeFormat_hm);
}
boolean hadSeconds = mHasSeconds;
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 7dc64bd..dd8280b 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -93,7 +93,6 @@ import android.text.style.URLSpan;
import android.text.style.UpdateAppearance;
import android.text.util.Linkify;
import android.util.AttributeSet;
-import android.util.FloatMath;
import android.util.Log;
import android.util.TypedValue;
import android.view.AccessibilityIterators.TextSegmentIterator;
@@ -3820,7 +3819,9 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// Display the error later, after the first layout pass
post(new Runnable() {
public void run() {
- setError(error);
+ if (mEditor == null || !mEditor.mErrorWasChanged) {
+ setError(error);
+ }
}
});
}
@@ -4800,7 +4801,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* make sure the entire cursor gets invalidated instead of
* sometimes missing half a pixel.
*/
- float thick = FloatMath.ceil(mTextPaint.getStrokeWidth());
+ float thick = (float) Math.ceil(mTextPaint.getStrokeWidth());
if (thick < 1.0f) {
thick = 1.0f;
}
@@ -4810,10 +4811,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// mHighlightPath is guaranteed to be non null at that point.
mHighlightPath.computeBounds(TEMP_RECTF, false);
- invalidate((int) FloatMath.floor(horizontalPadding + TEMP_RECTF.left - thick),
- (int) FloatMath.floor(verticalPadding + TEMP_RECTF.top - thick),
- (int) FloatMath.ceil(horizontalPadding + TEMP_RECTF.right + thick),
- (int) FloatMath.ceil(verticalPadding + TEMP_RECTF.bottom + thick));
+ invalidate((int) Math.floor(horizontalPadding + TEMP_RECTF.left - thick),
+ (int) Math.floor(verticalPadding + TEMP_RECTF.top - thick),
+ (int) Math.ceil(horizontalPadding + TEMP_RECTF.right + thick),
+ (int) Math.ceil(verticalPadding + TEMP_RECTF.bottom + thick));
}
} else {
for (int i = 0; i < mEditor.mCursorCount; i++) {
@@ -6507,7 +6508,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
max = Math.max(max, layout.getLineWidth(i));
}
- return (int) FloatMath.ceil(max);
+ return (int) Math.ceil(max);
}
/**
@@ -6584,7 +6585,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
if (boring == null || boring == UNKNOWN_BORING) {
if (des < 0) {
- des = (int) FloatMath.ceil(Layout.getDesiredWidth(mTransformed, mTextPaint));
+ des = (int) Math.ceil(Layout.getDesiredWidth(mTransformed, mTextPaint));
}
width = des;
} else {
@@ -6614,7 +6615,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
if (hintBoring == null || hintBoring == UNKNOWN_BORING) {
if (hintDes < 0) {
- hintDes = (int) FloatMath.ceil(Layout.getDesiredWidth(mHint, mTextPaint));
+ hintDes = (int) Math.ceil(Layout.getDesiredWidth(mHint, mTextPaint));
}
hintWidth = hintDes;
} else {
@@ -6920,8 +6921,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* keep leading edge in view.
*/
- int left = (int) FloatMath.floor(layout.getLineLeft(line));
- int right = (int) FloatMath.ceil(layout.getLineRight(line));
+ int left = (int) Math.floor(layout.getLineLeft(line));
+ int right = (int) Math.ceil(layout.getLineRight(line));
if (right - left < hspace) {
scrollx = (right + left) / 2 - hspace / 2;
@@ -6933,10 +6934,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
}
} else if (a == Layout.Alignment.ALIGN_RIGHT) {
- int right = (int) FloatMath.ceil(layout.getLineRight(line));
+ int right = (int) Math.ceil(layout.getLineRight(line));
scrollx = right - hspace;
} else { // a == Layout.Alignment.ALIGN_LEFT (will also be the default)
- scrollx = (int) FloatMath.floor(layout.getLineLeft(line));
+ scrollx = (int) Math.floor(layout.getLineLeft(line));
}
if (ht < vspace) {
@@ -7011,8 +7012,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
final int top = layout.getLineTop(line);
final int bottom = layout.getLineTop(line + 1);
- int left = (int) FloatMath.floor(layout.getLineLeft(line));
- int right = (int) FloatMath.ceil(layout.getLineRight(line));
+ int left = (int) Math.floor(layout.getLineLeft(line));
+ int right = (int) Math.ceil(layout.getLineRight(line));
int ht = layout.getHeight();
int hspace = mRight - mLeft - getCompoundPaddingLeft() - getCompoundPaddingRight();
diff --git a/core/java/android/widget/VideoView.java b/core/java/android/widget/VideoView.java
index 572cca2..47644f9 100644
--- a/core/java/android/widget/VideoView.java
+++ b/core/java/android/widget/VideoView.java
@@ -311,6 +311,8 @@ public class VideoView extends SurfaceView
mMediaPlayer = null;
mCurrentState = STATE_IDLE;
mTargetState = STATE_IDLE;
+ AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
+ am.abandonAudioFocus(null);
}
}
@@ -319,12 +321,13 @@ public class VideoView extends SurfaceView
// not ready for playback just yet, will try again later
return;
}
- AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
- am.requestAudioFocus(null, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
-
// we shouldn't clear the target state, because somebody might have
// called start() previously
release(false);
+
+ AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
+ am.requestAudioFocus(null, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
+
try {
mMediaPlayer = new MediaPlayer();
// TODO: create SubtitleController in MediaPlayer, but we need
@@ -650,6 +653,8 @@ public class VideoView extends SurfaceView
if (cleartargetstate) {
mTargetState = STATE_IDLE;
}
+ AudioManager am = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
+ am.abandonAudioFocus(null);
}
}
diff --git a/core/java/com/android/internal/app/ExternalMediaFormatActivity.java b/core/java/com/android/internal/app/ExternalMediaFormatActivity.java
index 6ed3bdc..fc213c5 100644
--- a/core/java/com/android/internal/app/ExternalMediaFormatActivity.java
+++ b/core/java/com/android/internal/app/ExternalMediaFormatActivity.java
@@ -25,6 +25,7 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
+import android.os.storage.StorageVolume;
import android.util.Log;
/**
@@ -94,6 +95,10 @@ public class ExternalMediaFormatActivity extends AlertActivity implements Dialog
if (which == POSITIVE_BUTTON) {
Intent intent = new Intent(ExternalStorageFormatter.FORMAT_ONLY);
intent.setComponent(ExternalStorageFormatter.COMPONENT_NAME);
+ // Transfer the storage volume to the new intent
+ final StorageVolume storageVolume = getIntent().getParcelableExtra(
+ StorageVolume.EXTRA_STORAGE_VOLUME);
+ intent.putExtra(StorageVolume.EXTRA_STORAGE_VOLUME, storageVolume);
startService(intent);
}
diff --git a/core/java/com/android/internal/content/NativeLibraryHelper.java b/core/java/com/android/internal/content/NativeLibraryHelper.java
index 02f675c..f479f4f 100644
--- a/core/java/com/android/internal/content/NativeLibraryHelper.java
+++ b/core/java/com/android/internal/content/NativeLibraryHelper.java
@@ -33,6 +33,7 @@ import android.content.pm.PackageParser.PackageLite;
import android.content.pm.PackageParser.PackageParserException;
import android.os.Build;
import android.os.SELinux;
+import android.os.SystemProperties;
import android.system.ErrnoException;
import android.system.Os;
import android.util.Slog;
@@ -74,6 +75,7 @@ public class NativeLibraryHelper {
final long[] apkHandles;
final boolean multiArch;
+ final boolean extractNativeLibs;
public static Handle create(File packageFile) throws IOException {
try {
@@ -86,14 +88,16 @@ public class NativeLibraryHelper {
public static Handle create(Package pkg) throws IOException {
return create(pkg.getAllCodePaths(),
- (pkg.applicationInfo.flags & ApplicationInfo.FLAG_MULTIARCH) != 0);
+ (pkg.applicationInfo.flags & ApplicationInfo.FLAG_MULTIARCH) != 0,
+ (pkg.applicationInfo.flags & ApplicationInfo.FLAG_EXTRACT_NATIVE_LIBS) != 0);
}
public static Handle create(PackageLite lite) throws IOException {
- return create(lite.getAllCodePaths(), lite.multiArch);
+ return create(lite.getAllCodePaths(), lite.multiArch, lite.extractNativeLibs);
}
- private static Handle create(List<String> codePaths, boolean multiArch) throws IOException {
+ private static Handle create(List<String> codePaths, boolean multiArch,
+ boolean extractNativeLibs) throws IOException {
final int size = codePaths.size();
final long[] apkHandles = new long[size];
for (int i = 0; i < size; i++) {
@@ -108,12 +112,13 @@ public class NativeLibraryHelper {
}
}
- return new Handle(apkHandles, multiArch);
+ return new Handle(apkHandles, multiArch, extractNativeLibs);
}
- Handle(long[] apkHandles, boolean multiArch) {
+ Handle(long[] apkHandles, boolean multiArch, boolean extractNativeLibs) {
this.apkHandles = apkHandles;
this.multiArch = multiArch;
+ this.extractNativeLibs = extractNativeLibs;
mGuard.open("close");
}
@@ -146,8 +151,8 @@ public class NativeLibraryHelper {
private static native long nativeSumNativeBinaries(long handle, String cpuAbi);
- private native static int nativeCopyNativeBinaries(long handle,
- String sharedLibraryPath, String abiToCopy);
+ private native static int nativeCopyNativeBinaries(long handle, String sharedLibraryPath,
+ String abiToCopy, boolean extractNativeLibs, boolean hasNativeBridge);
private static long sumNativeBinaries(Handle handle, String abi) {
long sum = 0;
@@ -167,7 +172,8 @@ public class NativeLibraryHelper {
*/
public static int copyNativeBinaries(Handle handle, File sharedLibraryDir, String abi) {
for (long apkHandle : handle.apkHandles) {
- int res = nativeCopyNativeBinaries(apkHandle, sharedLibraryDir.getPath(), abi);
+ int res = nativeCopyNativeBinaries(apkHandle, sharedLibraryDir.getPath(), abi,
+ handle.extractNativeLibs, HAS_NATIVE_BRIDGE);
if (res != INSTALL_SUCCEEDED) {
return res;
}
@@ -218,7 +224,8 @@ public class NativeLibraryHelper {
/**
* Remove the native binaries of a given package. This deletes the files
*/
- public static void removeNativeBinariesFromDirLI(File nativeLibraryRoot, boolean deleteRootDir) {
+ public static void removeNativeBinariesFromDirLI(File nativeLibraryRoot,
+ boolean deleteRootDir) {
if (DEBUG_NATIVE) {
Slog.w(TAG, "Deleting native binaries from: " + nativeLibraryRoot.getPath());
}
@@ -247,7 +254,8 @@ public class NativeLibraryHelper {
// asked to or this will prevent installation of future updates.
if (deleteRootDir) {
if (!nativeLibraryRoot.delete()) {
- Slog.w(TAG, "Could not delete native binary directory: " + nativeLibraryRoot.getPath());
+ Slog.w(TAG, "Could not delete native binary directory: " +
+ nativeLibraryRoot.getPath());
}
}
}
@@ -416,6 +424,9 @@ public class NativeLibraryHelper {
// We don't care about the other return values for now.
private static final int BITCODE_PRESENT = 1;
+ private static final boolean HAS_NATIVE_BRIDGE =
+ !"0".equals(SystemProperties.get("ro.dalvik.vm.native.bridge", "0"));
+
private static native int hasRenderscriptBitcode(long apkHandle);
public static boolean hasRenderscriptBitcode(Handle handle) throws IOException {
diff --git a/core/java/com/android/internal/os/InstallerConnection.java b/core/java/com/android/internal/os/InstallerConnection.java
index 2f30ebc..671bf24 100644
--- a/core/java/com/android/internal/os/InstallerConnection.java
+++ b/core/java/com/android/internal/os/InstallerConnection.java
@@ -90,12 +90,15 @@ public class InstallerConnection {
}
}
- public int dexopt(String apkPath, int uid, boolean isPublic, String instructionSet) {
- return dexopt(apkPath, uid, isPublic, "*", instructionSet, false);
+ public int dexopt(String apkPath, int uid, boolean isPublic,
+ String instructionSet, int dexoptNeeded) {
+ return dexopt(apkPath, uid, isPublic, "*", instructionSet, dexoptNeeded,
+ false, false, null);
}
public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName,
- String instructionSet, boolean vmSafeMode) {
+ String instructionSet, int dexoptNeeded, boolean vmSafeMode,
+ boolean debuggable, String outputPath) {
StringBuilder builder = new StringBuilder("dexopt");
builder.append(' ');
builder.append(apkPath);
@@ -107,26 +110,11 @@ public class InstallerConnection {
builder.append(' ');
builder.append(instructionSet);
builder.append(' ');
+ builder.append(dexoptNeeded);
builder.append(vmSafeMode ? " 1" : " 0");
- return execute(builder.toString());
- }
-
- public int patchoat(String apkPath, int uid, boolean isPublic, String instructionSet) {
- return patchoat(apkPath, uid, isPublic, "*", instructionSet);
- }
-
- public int patchoat(String apkPath, int uid, boolean isPublic, String pkgName,
- String instructionSet) {
- StringBuilder builder = new StringBuilder("patchoat");
- builder.append(' ');
- builder.append(apkPath);
+ builder.append(debuggable ? " 1" : " 0");
builder.append(' ');
- builder.append(uid);
- builder.append(isPublic ? " 1" : " 0");
- builder.append(' ');
- builder.append(pkgName);
- builder.append(' ');
- builder.append(instructionSet);
+ builder.append(outputPath != null ? outputPath : "!");
return execute(builder.toString());
}
diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java
index b3bafa1..1038acf 100644
--- a/core/java/com/android/internal/os/PowerProfile.java
+++ b/core/java/com/android/internal/os/PowerProfile.java
@@ -256,7 +256,7 @@ public class PowerProfile {
final Double[] values = (Double[]) data;
if (values.length > level && level >= 0) {
return values[level];
- } else if (level < 0) {
+ } else if (level < 0 || values.length == 0) {
return 0;
} else {
return values[values.length - 1];
diff --git a/core/java/com/android/internal/os/RuntimeInit.java b/core/java/com/android/internal/os/RuntimeInit.java
index 29ccb6a..2539a35 100644
--- a/core/java/com/android/internal/os/RuntimeInit.java
+++ b/core/java/com/android/internal/os/RuntimeInit.java
@@ -233,6 +233,7 @@ public class RuntimeInit {
}
public static final void main(String[] argv) {
+ enableDdms();
if (argv.length == 2 && argv[1].equals("application")) {
if (DEBUG) Slog.d(TAG, "RuntimeInit: Starting application");
redirectLogStreams();
@@ -365,9 +366,9 @@ public class RuntimeInit {
}
/**
- * Enable debugging features.
+ * Enable DDMS.
*/
- static {
+ static final void enableDdms() {
// Register handlers for DDM messages.
android.ddm.DdmRegister.registerHandlers();
}
diff --git a/core/java/com/android/internal/os/WrapperInit.java b/core/java/com/android/internal/os/WrapperInit.java
index 3301cbe..34ae58a 100644
--- a/core/java/com/android/internal/os/WrapperInit.java
+++ b/core/java/com/android/internal/os/WrapperInit.java
@@ -19,6 +19,7 @@ package com.android.internal.os;
import android.os.Process;
import android.util.Slog;
+import dalvik.system.VMRuntime;
import java.io.DataOutputStream;
import java.io.FileDescriptor;
import java.io.FileOutputStream;
@@ -62,7 +63,8 @@ public class WrapperInit {
// wrapper that it directly forked).
if (fdNum != 0) {
try {
- FileDescriptor fd = ZygoteInit.createFileDescriptor(fdNum);
+ FileDescriptor fd = new FileDescriptor();
+ fd.setInt$(fdNum);
DataOutputStream os = new DataOutputStream(new FileOutputStream(fd));
os.writeInt(Process.myPid());
os.close();
@@ -95,9 +97,20 @@ public class WrapperInit {
* @param args Arguments for {@link RuntimeInit#main}.
*/
public static void execApplication(String invokeWith, String niceName,
- int targetSdkVersion, FileDescriptor pipeFd, String[] args) {
+ int targetSdkVersion, String instructionSet, FileDescriptor pipeFd,
+ String[] args) {
StringBuilder command = new StringBuilder(invokeWith);
- command.append(" /system/bin/app_process /system/bin --application");
+
+ final String appProcess;
+ if (VMRuntime.is64BitInstructionSet(instructionSet)) {
+ appProcess = "/system/bin/app_process64";
+ } else {
+ appProcess = "/system/bin/app_process32";
+ }
+ command.append(' ');
+ command.append(appProcess);
+
+ command.append(" /system/bin --application");
if (niceName != null) {
command.append(" '--nice-name=").append(niceName).append("'");
}
diff --git a/core/java/com/android/internal/os/Zygote.java b/core/java/com/android/internal/os/Zygote.java
index cca340c..8674a21 100644
--- a/core/java/com/android/internal/os/Zygote.java
+++ b/core/java/com/android/internal/os/Zygote.java
@@ -20,12 +20,9 @@ package com.android.internal.os;
import dalvik.system.ZygoteHooks;
import android.system.ErrnoException;
import android.system.Os;
-import android.os.SystemClock;
-import android.util.Slog;
/** @hide */
public final class Zygote {
- private static final String TAG = "Zygote";
/*
* Bit values for "debugFlags" argument. The definitions are duplicated
* in the native code.
@@ -37,10 +34,13 @@ public final class Zygote {
public static final int DEBUG_ENABLE_CHECKJNI = 1 << 1;
/** enable Java programming language "assert" statements */
public static final int DEBUG_ENABLE_ASSERT = 1 << 2;
- /** disable the JIT compiler */
+ /** disable the AOT compiler and JIT */
public static final int DEBUG_ENABLE_SAFEMODE = 1 << 3;
/** Enable logging of third-party JNI activity. */
public static final int DEBUG_ENABLE_JNI_LOGGING = 1 << 4;
+ /** enable the JIT compiler */
+ public static final int DEBUG_ENABLE_JIT = 1 << 5;
+
/** No external storage should be mounted. */
public static final int MOUNT_EXTERNAL_NONE = 0;
@@ -87,15 +87,11 @@ public final class Zygote {
public static int forkAndSpecialize(int uid, int gid, int[] gids, int debugFlags,
int[][] rlimits, int mountExternal, String seInfo, String niceName, int[] fdsToClose,
String instructionSet, String appDataDir) {
- long startTime = SystemClock.elapsedRealtime();
VM_HOOKS.preFork();
- checkTime(startTime, "Zygote.preFork");
int pid = nativeForkAndSpecialize(
uid, gid, gids, debugFlags, rlimits, mountExternal, seInfo, niceName, fdsToClose,
instructionSet, appDataDir);
- checkTime(startTime, "Zygote.nativeForkAndSpecialize");
VM_HOOKS.postForkCommon();
- checkTime(startTime, "Zygote.postForkCommon");
return pid;
}
@@ -104,18 +100,6 @@ public final class Zygote {
String instructionSet, String appDataDir);
/**
- * Temporary hack: check time since start time and log if over a fixed threshold.
- *
- */
- private static void checkTime(long startTime, String where) {
- long now = SystemClock.elapsedRealtime();
- if ((now-startTime) > 1000) {
- // If we are taking more than a second, log about it.
- Slog.w(TAG, "Slow operation: " + (now-startTime) + "ms so far, now at " + where);
- }
- }
-
- /**
* Special method to start the system server process. In addition to the
* common actions performed in forkAndSpecialize, the pid of the child
* process is recorded such that the death of the child process will cause
@@ -151,9 +135,7 @@ public final class Zygote {
int[][] rlimits, long permittedCapabilities, long effectiveCapabilities);
private static void callPostForkChildHooks(int debugFlags, String instructionSet) {
- long startTime = SystemClock.elapsedRealtime();
VM_HOOKS.postForkChild(debugFlags, instructionSet);
- checkTime(startTime, "Zygote.callPostForkChildHooks");
}
diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java
index 4548221..0dc242d 100644
--- a/core/java/com/android/internal/os/ZygoteConnection.java
+++ b/core/java/com/android/internal/os/ZygoteConnection.java
@@ -16,6 +16,12 @@
package com.android.internal.os;
+import static android.system.OsConstants.F_SETFD;
+import static android.system.OsConstants.O_CLOEXEC;
+import static android.system.OsConstants.STDERR_FILENO;
+import static android.system.OsConstants.STDIN_FILENO;
+import static android.system.OsConstants.STDOUT_FILENO;
+
import android.net.Credentials;
import android.net.LocalSocket;
import android.os.Process;
@@ -25,6 +31,7 @@ import android.system.ErrnoException;
import android.system.Os;
import android.util.Log;
import dalvik.system.PathClassLoader;
+import dalvik.system.VMRuntime;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
@@ -37,8 +44,6 @@ import java.io.PrintStream;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import libcore.io.IoUtils;
-import android.os.SystemClock;
-import android.util.Slog;
/**
* A connection that can make spawn requests.
@@ -72,7 +77,6 @@ class ZygoteConnection {
private final DataOutputStream mSocketOutStream;
private final BufferedReader mSocketReader;
private final Credentials peer;
- private final String peerSecurityContext;
private final String abiList;
/**
@@ -100,20 +104,6 @@ class ZygoteConnection {
Log.e(TAG, "Cannot read peer credentials", ex);
throw ex;
}
-
- peerSecurityContext = SELinux.getPeerContext(mSocket.getFileDescriptor());
- }
-
- /**
- * Temporary hack: check time since start time and log if over a fixed threshold.
- *
- */
- private void checkTime(long startTime, String where) {
- long now = SystemClock.elapsedRealtime();
- if ((now-startTime) > 1000) {
- // If we are taking more than a second, log about it.
- Slog.w(TAG, "Slow operation: " + (now-startTime) + "ms so far, now at " + where);
- }
}
/**
@@ -121,7 +111,7 @@ class ZygoteConnection {
*
* @return null-ok; file descriptor
*/
- FileDescriptor getFileDescriptor() {
+ FileDescriptor getFileDesciptor() {
return mSocket.getFileDescriptor();
}
@@ -145,8 +135,6 @@ class ZygoteConnection {
Arguments parsedArgs = null;
FileDescriptor[] descriptors;
- long startTime = SystemClock.elapsedRealtime();
-
try {
args = readArgumentList();
descriptors = mSocket.getAncillaryFileDescriptors();
@@ -156,7 +144,6 @@ class ZygoteConnection {
return true;
}
- checkTime(startTime, "zygoteConnection.runOnce: readArgumentList");
if (args == null) {
// EOF reached.
closeSocket();
@@ -188,30 +175,23 @@ class ZygoteConnection {
", effective=0x" + Long.toHexString(parsedArgs.effectiveCapabilities));
}
-
- applyUidSecurityPolicy(parsedArgs, peer, peerSecurityContext);
- applyRlimitSecurityPolicy(parsedArgs, peer, peerSecurityContext);
- applyInvokeWithSecurityPolicy(parsedArgs, peer, peerSecurityContext);
- applyseInfoSecurityPolicy(parsedArgs, peer, peerSecurityContext);
-
- checkTime(startTime, "zygoteConnection.runOnce: apply security policies");
+ applyUidSecurityPolicy(parsedArgs, peer);
+ applyInvokeWithSecurityPolicy(parsedArgs, peer);
applyDebuggerSystemProperty(parsedArgs);
applyInvokeWithSystemProperty(parsedArgs);
- checkTime(startTime, "zygoteConnection.runOnce: apply security policies");
-
int[][] rlimits = null;
if (parsedArgs.rlimits != null) {
rlimits = parsedArgs.rlimits.toArray(intArray2d);
}
- if (parsedArgs.runtimeInit && parsedArgs.invokeWith != null) {
- FileDescriptor[] pipeFds = Os.pipe();
+ if (parsedArgs.invokeWith != null) {
+ FileDescriptor[] pipeFds = Os.pipe2(O_CLOEXEC);
childPipeFd = pipeFds[1];
serverPipeFd = pipeFds[0];
- ZygoteInit.setCloseOnExec(serverPipeFd, true);
+ Os.fcntlInt(childPipeFd, F_SETFD, 0);
}
/**
@@ -242,14 +222,10 @@ class ZygoteConnection {
fd = null;
- checkTime(startTime, "zygoteConnection.runOnce: preForkAndSpecialize");
pid = Zygote.forkAndSpecialize(parsedArgs.uid, parsedArgs.gid, parsedArgs.gids,
parsedArgs.debugFlags, rlimits, parsedArgs.mountExternal, parsedArgs.seInfo,
parsedArgs.niceName, fdsToClose, parsedArgs.instructionSet,
parsedArgs.appDataDir);
- checkTime(startTime, "zygoteConnection.runOnce: postForkAndSpecialize");
- } catch (IOException ex) {
- logAndPrintError(newStderr, "Exception creating pipe", ex);
} catch (ErrnoException ex) {
logAndPrintError(newStderr, "Exception creating pipe", ex);
} catch (IllegalArgumentException ex) {
@@ -323,20 +299,13 @@ class ZygoteConnection {
* <li> --rlimit=r,c,m<i>tuple of values for setrlimit() call.
* <code>r</code> is the resource, <code>c</code> and <code>m</code>
* are the settings for current and max value.</i>
- * <li> --classpath=<i>colon-separated classpath</i> indicates
- * that the specified class (which must b first non-flag argument) should
- * be loaded from jar files in the specified classpath. Incompatible with
- * --runtime-init
- * <li> --runtime-init indicates that the remaining arg list should
+ * <li> --instruction-set=<i>instruction-set-string</i> which instruction set to use/emulate.
+ * <li> --nice-name=<i>nice name to appear in ps</i>
+ * <li> --runtime-args indicates that the remaining arg list should
* be handed off to com.android.internal.os.RuntimeInit, rather than
- * processed directly
+ * processed directly.
* Android runtime startup (eg, Binder initialization) is also eschewed.
- * <li> --nice-name=<i>nice name to appear in ps</i>
- * <li> If <code>--runtime-init</code> is present:
- * [--] &lt;args for RuntimeInit &gt;
- * <li> If <code>--runtime-init</code> is absent:
- * [--] &lt;classname&gt; [args...]
- * <li> --instruction-set=<i>instruction-set-string</i> which instruction set to use/emulate.
+ * <li> [--] &lt;args for RuntimeInit &gt;
* </ul>
*/
static class Arguments {
@@ -353,7 +322,7 @@ class ZygoteConnection {
/**
* From --enable-debugger, --enable-checkjni, --enable-assert,
- * --enable-safemode, and --enable-jni-logging.
+ * --enable-safemode, --enable-jit, and --enable-jni-logging.
*/
int debugFlags;
@@ -364,12 +333,6 @@ class ZygoteConnection {
int targetSdkVersion;
boolean targetSdkVersionSpecified;
- /** from --classpath */
- String classpath;
-
- /** from --runtime-init */
- boolean runtimeInit;
-
/** from --nice-name */
String niceName;
@@ -431,6 +394,8 @@ class ZygoteConnection {
throws IllegalArgumentException {
int curArg = 0;
+ boolean seenRuntimeArgs = false;
+
for ( /* curArg */ ; curArg < args.length; curArg++) {
String arg = args[curArg];
@@ -467,12 +432,14 @@ class ZygoteConnection {
debugFlags |= Zygote.DEBUG_ENABLE_SAFEMODE;
} else if (arg.equals("--enable-checkjni")) {
debugFlags |= Zygote.DEBUG_ENABLE_CHECKJNI;
+ } else if (arg.equals("--enable-jit")) {
+ debugFlags |= Zygote.DEBUG_ENABLE_JIT;
} else if (arg.equals("--enable-jni-logging")) {
debugFlags |= Zygote.DEBUG_ENABLE_JNI_LOGGING;
} else if (arg.equals("--enable-assert")) {
debugFlags |= Zygote.DEBUG_ENABLE_ASSERT;
- } else if (arg.equals("--runtime-init")) {
- runtimeInit = true;
+ } else if (arg.equals("--runtime-args")) {
+ seenRuntimeArgs = true;
} else if (arg.startsWith("--seinfo=")) {
if (seInfoSpecified) {
throw new IllegalArgumentException(
@@ -517,17 +484,6 @@ class ZygoteConnection {
}
rlimits.add(rlimitTuple);
- } else if (arg.equals("-classpath")) {
- if (classpath != null) {
- throw new IllegalArgumentException(
- "Duplicate arg specified");
- }
- try {
- classpath = args[++curArg];
- } catch (IndexOutOfBoundsException ex) {
- throw new IllegalArgumentException(
- "-classpath requires argument");
- }
} else if (arg.startsWith("--setgroups=")) {
if (gids != null) {
throw new IllegalArgumentException(
@@ -574,15 +530,18 @@ class ZygoteConnection {
}
}
- if (runtimeInit && classpath != null) {
- throw new IllegalArgumentException(
- "--runtime-init and -classpath are incompatible");
- }
-
- remainingArgs = new String[args.length - curArg];
+ if (abiListQuery) {
+ if (args.length - curArg > 0) {
+ throw new IllegalArgumentException("Unexpected arguments after --query-abi-list.");
+ }
+ } else {
+ if (!seenRuntimeArgs) {
+ throw new IllegalArgumentException("Unexpected argument : " + args[curArg]);
+ }
- System.arraycopy(args, curArg, remainingArgs, 0,
- remainingArgs.length);
+ remainingArgs = new String[args.length - curArg];
+ System.arraycopy(args, curArg, remainingArgs, 0, remainingArgs.length);
+ }
}
}
@@ -637,63 +596,30 @@ class ZygoteConnection {
}
/**
- * Applies zygote security policy per bugs #875058 and #1082165.
- * Based on the credentials of the process issuing a zygote command:
- * <ol>
- * <li> uid 0 (root) may specify any uid, gid, and setgroups() list
- * <li> uid 1000 (Process.SYSTEM_UID) may specify any uid &gt; 1000 in normal
+ * uid 1000 (Process.SYSTEM_UID) may specify any uid &gt; 1000 in normal
* operation. It may also specify any gid and setgroups() list it chooses.
* In factory test mode, it may specify any UID.
- * <li> Any other uid may not specify any uid, gid, or setgroups list. The
- * uid and gid will be inherited from the requesting process.
- * </ul>
*
* @param args non-null; zygote spawner arguments
* @param peer non-null; peer credentials
* @throws ZygoteSecurityException
*/
- private static void applyUidSecurityPolicy(Arguments args, Credentials peer,
- String peerSecurityContext)
+ private static void applyUidSecurityPolicy(Arguments args, Credentials peer)
throws ZygoteSecurityException {
- int peerUid = peer.getUid();
-
- if (peerUid == 0) {
- // Root can do what it wants
- } else if (peerUid == Process.SYSTEM_UID ) {
- // System UID is restricted, except in factory test mode
+ if (peer.getUid() == Process.SYSTEM_UID) {
String factoryTest = SystemProperties.get("ro.factorytest");
boolean uidRestricted;
/* In normal operation, SYSTEM_UID can only specify a restricted
* set of UIDs. In factory test mode, SYSTEM_UID may specify any uid.
*/
- uidRestricted
- = !(factoryTest.equals("1") || factoryTest.equals("2"));
+ uidRestricted = !(factoryTest.equals("1") || factoryTest.equals("2"));
- if (uidRestricted
- && args.uidSpecified && (args.uid < Process.SYSTEM_UID)) {
+ if (uidRestricted && args.uidSpecified && (args.uid < Process.SYSTEM_UID)) {
throw new ZygoteSecurityException(
"System UID may not launch process with UID < "
- + Process.SYSTEM_UID);
- }
- } else {
- // Everything else
- if (args.uidSpecified || args.gidSpecified
- || args.gids != null) {
- throw new ZygoteSecurityException(
- "App UIDs may not specify uid's or gid's");
- }
- }
-
- if (args.uidSpecified || args.gidSpecified || args.gids != null) {
- boolean allowed = SELinux.checkSELinuxAccess(peerSecurityContext,
- peerSecurityContext,
- "zygote",
- "specifyids");
- if (!allowed) {
- throw new ZygoteSecurityException(
- "Peer may not specify uid's or gid's");
+ + Process.SYSTEM_UID);
}
}
@@ -708,7 +634,6 @@ class ZygoteConnection {
}
}
-
/**
* Applies debugger system properties to the zygote arguments.
*
@@ -725,44 +650,6 @@ class ZygoteConnection {
}
/**
- * Applies zygote security policy per bug #1042973. Based on the credentials
- * of the process issuing a zygote command:
- * <ol>
- * <li> peers of uid 0 (root) and uid 1000 (Process.SYSTEM_UID)
- * may specify any rlimits.
- * <li> All other uids may not specify rlimits.
- * </ul>
- * @param args non-null; zygote spawner arguments
- * @param peer non-null; peer credentials
- * @throws ZygoteSecurityException
- */
- private static void applyRlimitSecurityPolicy(
- Arguments args, Credentials peer, String peerSecurityContext)
- throws ZygoteSecurityException {
-
- int peerUid = peer.getUid();
-
- if (!(peerUid == 0 || peerUid == Process.SYSTEM_UID)) {
- // All peers with UID other than root or SYSTEM_UID
- if (args.rlimits != null) {
- throw new ZygoteSecurityException(
- "This UID may not specify rlimits.");
- }
- }
-
- if (args.rlimits != null) {
- boolean allowed = SELinux.checkSELinuxAccess(peerSecurityContext,
- peerSecurityContext,
- "zygote",
- "specifyrlimits");
- if (!allowed) {
- throw new ZygoteSecurityException(
- "Peer may not specify rlimits");
- }
- }
- }
-
- /**
* Applies zygote security policy.
* Based on the credentials of the process issuing a zygote command:
* <ol>
@@ -775,8 +662,7 @@ class ZygoteConnection {
* @param peer non-null; peer credentials
* @throws ZygoteSecurityException
*/
- private static void applyInvokeWithSecurityPolicy(Arguments args, Credentials peer,
- String peerSecurityContext)
+ private static void applyInvokeWithSecurityPolicy(Arguments args, Credentials peer)
throws ZygoteSecurityException {
int peerUid = peer.getUid();
@@ -784,52 +670,6 @@ class ZygoteConnection {
throw new ZygoteSecurityException("Peer is not permitted to specify "
+ "an explicit invoke-with wrapper command");
}
-
- if (args.invokeWith != null) {
- boolean allowed = SELinux.checkSELinuxAccess(peerSecurityContext,
- peerSecurityContext,
- "zygote",
- "specifyinvokewith");
- if (!allowed) {
- throw new ZygoteSecurityException("Peer is not permitted to specify "
- + "an explicit invoke-with wrapper command");
- }
- }
- }
-
- /**
- * Applies zygote security policy for SELinux information.
- *
- * @param args non-null; zygote spawner arguments
- * @param peer non-null; peer credentials
- * @throws ZygoteSecurityException
- */
- private static void applyseInfoSecurityPolicy(
- Arguments args, Credentials peer, String peerSecurityContext)
- throws ZygoteSecurityException {
- int peerUid = peer.getUid();
-
- if (args.seInfo == null) {
- // nothing to check
- return;
- }
-
- if (!(peerUid == 0 || peerUid == Process.SYSTEM_UID)) {
- // All peers with UID other than root or SYSTEM_UID
- throw new ZygoteSecurityException(
- "This UID may not specify SELinux info.");
- }
-
- boolean allowed = SELinux.checkSELinuxAccess(peerSecurityContext,
- peerSecurityContext,
- "zygote",
- "specifyseinfo");
- if (!allowed) {
- throw new ZygoteSecurityException(
- "Peer may not specify SELinux info");
- }
-
- return;
}
/**
@@ -839,21 +679,19 @@ class ZygoteConnection {
*/
public static void applyInvokeWithSystemProperty(Arguments args) {
if (args.invokeWith == null && args.niceName != null) {
- if (args.niceName != null) {
- String property = "wrap." + args.niceName;
- if (property.length() > 31) {
- // Avoid creating an illegal property name when truncating.
- if (property.charAt(30) != '.') {
- property = property.substring(0, 31);
- } else {
- property = property.substring(0, 30);
- }
- }
- args.invokeWith = SystemProperties.get(property);
- if (args.invokeWith != null && args.invokeWith.length() == 0) {
- args.invokeWith = null;
+ String property = "wrap." + args.niceName;
+ if (property.length() > 31) {
+ // Properties with a trailing "." are illegal.
+ if (property.charAt(30) != '.') {
+ property = property.substring(0, 31);
+ } else {
+ property = property.substring(0, 30);
}
}
+ args.invokeWith = SystemProperties.get(property);
+ if (args.invokeWith != null && args.invokeWith.length() == 0) {
+ args.invokeWith = null;
+ }
}
}
@@ -886,14 +724,15 @@ class ZygoteConnection {
if (descriptors != null) {
try {
- ZygoteInit.reopenStdio(descriptors[0],
- descriptors[1], descriptors[2]);
+ Os.dup2(descriptors[0], STDIN_FILENO);
+ Os.dup2(descriptors[1], STDOUT_FILENO);
+ Os.dup2(descriptors[2], STDERR_FILENO);
for (FileDescriptor fd: descriptors) {
IoUtils.closeQuietly(fd);
}
newStderr = System.err;
- } catch (IOException ex) {
+ } catch (ErrnoException ex) {
Log.e(TAG, "Error reopening stdio", ex);
}
}
@@ -902,47 +741,14 @@ class ZygoteConnection {
Process.setArgV0(parsedArgs.niceName);
}
- if (parsedArgs.runtimeInit) {
- if (parsedArgs.invokeWith != null) {
- WrapperInit.execApplication(parsedArgs.invokeWith,
- parsedArgs.niceName, parsedArgs.targetSdkVersion,
- pipeFd, parsedArgs.remainingArgs);
- } else {
- RuntimeInit.zygoteInit(parsedArgs.targetSdkVersion,
- parsedArgs.remainingArgs, null /* classLoader */);
- }
+ if (parsedArgs.invokeWith != null) {
+ WrapperInit.execApplication(parsedArgs.invokeWith,
+ parsedArgs.niceName, parsedArgs.targetSdkVersion,
+ VMRuntime.getCurrentInstructionSet(),
+ pipeFd, parsedArgs.remainingArgs);
} else {
- String className;
- try {
- className = parsedArgs.remainingArgs[0];
- } catch (ArrayIndexOutOfBoundsException ex) {
- logAndPrintError(newStderr,
- "Missing required class name argument", null);
- return;
- }
-
- String[] mainArgs = new String[parsedArgs.remainingArgs.length - 1];
- System.arraycopy(parsedArgs.remainingArgs, 1,
- mainArgs, 0, mainArgs.length);
-
- if (parsedArgs.invokeWith != null) {
- WrapperInit.execStandalone(parsedArgs.invokeWith,
- parsedArgs.classpath, className, mainArgs);
- } else {
- ClassLoader cloader;
- if (parsedArgs.classpath != null) {
- cloader = new PathClassLoader(parsedArgs.classpath,
- ClassLoader.getSystemClassLoader());
- } else {
- cloader = ClassLoader.getSystemClassLoader();
- }
-
- try {
- ZygoteInit.invokeStaticMain(cloader, className, mainArgs);
- } catch (RuntimeException ex) {
- logAndPrintError(newStderr, "Error starting.", ex);
- }
- }
+ RuntimeInit.zygoteInit(parsedArgs.targetSdkVersion,
+ parsedArgs.remainingArgs, null /* classLoader */);
}
}
@@ -1019,8 +825,8 @@ class ZygoteConnection {
private void setChildPgid(int pid) {
// Try to move the new child into the peer's process group.
try {
- ZygoteInit.setpgid(pid, ZygoteInit.getpgid(peer.getPid()));
- } catch (IOException ex) {
+ Os.setpgid(pid, Os.getpgid(peer.getPid()));
+ } catch (ErrnoException ex) {
// This exception is expected in the case where
// the peer is not in our session
// TODO get rid of this log message in the case where
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index d95cf71..d44959b 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -16,6 +16,7 @@
package com.android.internal.os;
+import static android.system.OsConstants.POLLIN;
import static android.system.OsConstants.S_IRWXG;
import static android.system.OsConstants.S_IRWXO;
@@ -32,6 +33,7 @@ import android.os.Trace;
import android.system.ErrnoException;
import android.system.Os;
import android.system.OsConstants;
+import android.system.StructPollfd;
import android.util.EventLog;
import android.util.Log;
import android.util.Slog;
@@ -93,12 +95,6 @@ public class ZygoteInit {
private static Resources mResources;
/**
- * The number of times that the main Zygote loop
- * should run before calling gc() again.
- */
- static final int GC_LOOP_COUNT = 10;
-
- /**
* The path of a file that contains classes to preload.
*/
private static final String PRELOADED_CLASSES = "/system/etc/preloaded-classes";
@@ -107,54 +103,6 @@ public class ZygoteInit {
private static final boolean PRELOAD_RESOURCES = true;
/**
- * Invokes a static "main(argv[]) method on class "className".
- * Converts various failing exceptions into RuntimeExceptions, with
- * the assumption that they will then cause the VM instance to exit.
- *
- * @param loader class loader to use
- * @param className Fully-qualified class name
- * @param argv Argument vector for main()
- */
- static void invokeStaticMain(ClassLoader loader,
- String className, String[] argv)
- throws ZygoteInit.MethodAndArgsCaller {
- Class<?> cl;
-
- try {
- cl = loader.loadClass(className);
- } catch (ClassNotFoundException ex) {
- throw new RuntimeException(
- "Missing class when invoking static main " + className,
- ex);
- }
-
- Method m;
- try {
- m = cl.getMethod("main", new Class[] { String[].class });
- } catch (NoSuchMethodException ex) {
- throw new RuntimeException(
- "Missing static main on " + className, ex);
- } catch (SecurityException ex) {
- throw new RuntimeException(
- "Problem getting static main on " + className, ex);
- }
-
- int modifiers = m.getModifiers();
- if (! (Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers))) {
- throw new RuntimeException(
- "Main method is not public and static on " + className);
- }
-
- /*
- * This throw gets caught in ZygoteInit.main(), which responds
- * by invoking the exception's run() method. This arrangement
- * clears up all the stack frames that were required in setting
- * up the process.
- */
- throw new ZygoteInit.MethodAndArgsCaller(m, argv);
- }
-
- /**
* Registers a server socket for zygote command connections
*
* @throws RuntimeException when open fails
@@ -171,8 +119,9 @@ public class ZygoteInit {
}
try {
- sServerSocket = new LocalServerSocket(
- createFileDescriptor(fileDesc));
+ FileDescriptor fd = new FileDescriptor();
+ fd.setInt$(fileDesc);
+ sServerSocket = new LocalServerSocket(fd);
} catch (IOException ex) {
throw new RuntimeException(
"Error binding to local socket '" + fileDesc + "'", ex);
@@ -231,26 +180,6 @@ public class ZygoteInit {
private static final int ROOT_UID = 0;
private static final int ROOT_GID = 0;
- /**
- * Sets effective user ID.
- */
- private static void setEffectiveUser(int uid) {
- int errno = setreuid(ROOT_UID, uid);
- if (errno != 0) {
- Log.e(TAG, "setreuid() failed. errno: " + errno);
- }
- }
-
- /**
- * Sets effective group ID.
- */
- private static void setEffectiveGroup(int gid) {
- int errno = setregid(ROOT_GID, gid);
- if (errno != 0) {
- Log.e(TAG, "setregid() failed. errno: " + errno);
- }
- }
-
static void preload() {
Log.d(TAG, "begin preload");
preloadClasses();
@@ -298,19 +227,29 @@ public class ZygoteInit {
long startTime = SystemClock.uptimeMillis();
// Drop root perms while running static initializers.
- setEffectiveGroup(UNPRIVILEGED_GID);
- setEffectiveUser(UNPRIVILEGED_UID);
+ final int reuid = Os.getuid();
+ final int regid = Os.getgid();
+
+ // We need to drop root perms only if we're already root. In the case of "wrapped"
+ // processes (see WrapperInit), this function is called from an unprivileged uid
+ // and gid.
+ boolean droppedPriviliges = false;
+ if (reuid == ROOT_UID && regid == ROOT_GID) {
+ try {
+ Os.setregid(ROOT_GID, UNPRIVILEGED_GID);
+ Os.setreuid(ROOT_UID, UNPRIVILEGED_UID);
+ } catch (ErrnoException ex) {
+ throw new RuntimeException("Failed to drop root", ex);
+ }
+
+ droppedPriviliges = true;
+ }
// Alter the target heap utilization. With explicit GCs this
// is not likely to have any effect.
float defaultUtilization = runtime.getTargetHeapUtilization();
runtime.setTargetHeapUtilization(0.8f);
- // Start with a clean slate.
- System.gc();
- runtime.runFinalizationSync();
- Debug.startAllocCounting();
-
try {
BufferedReader br
= new BufferedReader(new InputStreamReader(is), 256);
@@ -328,16 +267,12 @@ public class ZygoteInit {
if (false) {
Log.v(TAG, "Preloading " + line + "...");
}
- Class.forName(line);
- if (Debug.getGlobalAllocSize() > PRELOAD_GC_THRESHOLD) {
- if (false) {
- Log.v(TAG,
- " GC at " + Debug.getGlobalAllocSize());
- }
- System.gc();
- runtime.runFinalizationSync();
- Debug.resetGlobalAllocSize();
- }
+ // Load and explicitly initialize the given class. Use
+ // Class.forName(String, boolean, ClassLoader) to avoid repeated stack lookups
+ // (to derive the caller's class-loader). Use true to force initialization, and
+ // null for the boot classpath class-loader (could as well cache the
+ // class-loader of this class in a variable).
+ Class.forName(line, true, null);
count++;
} catch (ClassNotFoundException e) {
Log.w(TAG, "Class not found for preloading: " + line);
@@ -367,11 +302,15 @@ public class ZygoteInit {
// Fill in dex caches with classes, fields, and methods brought in by preloading.
runtime.preloadDexCaches();
- Debug.stopAllocCounting();
-
- // Bring back root. We'll need it later.
- setEffectiveUser(ROOT_UID);
- setEffectiveGroup(ROOT_GID);
+ // Bring back root. We'll need it later if we're in the zygote.
+ if (droppedPriviliges) {
+ try {
+ Os.setreuid(ROOT_UID, ROOT_UID);
+ Os.setregid(ROOT_GID, ROOT_GID);
+ } catch (ErrnoException ex) {
+ throw new RuntimeException("Failed to restore root", ex);
+ }
+ }
}
}
@@ -385,10 +324,7 @@ public class ZygoteInit {
private static void preloadResources() {
final VMRuntime runtime = VMRuntime.getRuntime();
- Debug.startAllocCounting();
try {
- System.gc();
- runtime.runFinalizationSync();
mResources = Resources.getSystem();
mResources.startPreloading();
if (PRELOAD_RESOURCES) {
@@ -413,22 +349,12 @@ public class ZygoteInit {
mResources.finishPreloading();
} catch (RuntimeException e) {
Log.w(TAG, "Failure preloading resources", e);
- } finally {
- Debug.stopAllocCounting();
}
}
private static int preloadColorStateLists(VMRuntime runtime, TypedArray ar) {
int N = ar.length();
for (int i=0; i<N; i++) {
- if (Debug.getGlobalAllocSize() > PRELOAD_GC_THRESHOLD) {
- if (false) {
- Log.v(TAG, " GC at " + Debug.getGlobalAllocSize());
- }
- System.gc();
- runtime.runFinalizationSync();
- Debug.resetGlobalAllocSize();
- }
int id = ar.getResourceId(i, 0);
if (false) {
Log.v(TAG, "Preloading resource #" + Integer.toHexString(id));
@@ -449,14 +375,6 @@ public class ZygoteInit {
private static int preloadDrawables(VMRuntime runtime, TypedArray ar) {
int N = ar.length();
for (int i=0; i<N; i++) {
- if (Debug.getGlobalAllocSize() > PRELOAD_GC_THRESHOLD) {
- if (false) {
- Log.v(TAG, " GC at " + Debug.getGlobalAllocSize());
- }
- System.gc();
- runtime.runFinalizationSync();
- Debug.resetGlobalAllocSize();
- }
int id = ar.getResourceId(i, 0);
if (false) {
Log.v(TAG, "Preloading resource #" + Integer.toHexString(id));
@@ -478,7 +396,7 @@ public class ZygoteInit {
* softly- and final-reachable objects, along with any other garbage.
* This is only useful just before a fork().
*/
- /*package*/ static void gc() {
+ /*package*/ static void gcAndFinalize() {
final VMRuntime runtime = VMRuntime.getRuntime();
/* runFinalizationSync() lets finalizers be called in Zygote,
@@ -487,9 +405,6 @@ public class ZygoteInit {
System.gc();
runtime.runFinalizationSync();
System.gc();
- runtime.runFinalizationSync();
- System.gc();
- runtime.runFinalizationSync();
}
/**
@@ -527,7 +442,7 @@ public class ZygoteInit {
WrapperInit.execApplication(parsedArgs.invokeWith,
parsedArgs.niceName, parsedArgs.targetSdkVersion,
- null, args);
+ VMRuntime.getCurrentInstructionSet(), null, args);
} else {
ClassLoader cl = null;
if (systemServerClasspath != null) {
@@ -555,12 +470,11 @@ public class ZygoteInit {
try {
for (String classPathElement : classPathElements) {
- final byte dexopt = DexFile.isDexOptNeededInternal(classPathElement, "*", instructionSet,
- false /* defer */);
- if (dexopt == DexFile.DEXOPT_NEEDED) {
- installer.dexopt(classPathElement, Process.SYSTEM_UID, false, instructionSet);
- } else if (dexopt == DexFile.PATCHOAT_NEEDED) {
- installer.patchoat(classPathElement, Process.SYSTEM_UID, false, instructionSet);
+ final int dexoptNeeded = DexFile.getDexOptNeeded(
+ classPathElement, "*", instructionSet, false /* defer */);
+ if (dexoptNeeded != DexFile.NO_DEXOPT_NEEDED) {
+ installer.dexopt(classPathElement, Process.SYSTEM_UID, false,
+ instructionSet, dexoptNeeded);
}
}
} catch (IOException ioe) {
@@ -594,8 +508,8 @@ public class ZygoteInit {
"--setgid=1000",
"--setgroups=1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1018,1032,3001,3002,3003,3006,3007",
"--capabilities=" + capabilities + "," + capabilities,
- "--runtime-init",
"--nice-name=system_server",
+ "--runtime-args",
"com.android.server.SystemServer",
};
ZygoteConnection.Arguments parsedArgs = null;
@@ -647,6 +561,7 @@ public class ZygoteInit {
public static void main(String argv[]) {
try {
+ RuntimeInit.enableDdms();
// Start profiling the zygote initialization.
SamplingProfilerIntegration.start();
@@ -680,7 +595,7 @@ public class ZygoteInit {
SamplingProfilerIntegration.writeZygoteSnapshot();
// Do an initial gc to clean up after startup
- gc();
+ gcAndFinalize();
// Disable tracing so that forked processes do not inherit stale tracing tags from
// Zygote.
@@ -744,137 +659,42 @@ public class ZygoteInit {
private static void runSelectLoop(String abiList) throws MethodAndArgsCaller {
ArrayList<FileDescriptor> fds = new ArrayList<FileDescriptor>();
ArrayList<ZygoteConnection> peers = new ArrayList<ZygoteConnection>();
- FileDescriptor[] fdArray = new FileDescriptor[4];
fds.add(sServerSocket.getFileDescriptor());
peers.add(null);
- int loopCount = GC_LOOP_COUNT;
while (true) {
- int index;
-
- /*
- * Call gc() before we block in select().
- * It's work that has to be done anyway, and it's better
- * to avoid making every child do it. It will also
- * madvise() any free memory as a side-effect.
- *
- * Don't call it every time, because walking the entire
- * heap is a lot of overhead to free a few hundred bytes.
- */
- if (loopCount <= 0) {
- gc();
- loopCount = GC_LOOP_COUNT;
- } else {
- loopCount--;
+ StructPollfd[] pollFds = new StructPollfd[fds.size()];
+ for (int i = 0; i < pollFds.length; ++i) {
+ pollFds[i] = new StructPollfd();
+ pollFds[i].fd = fds.get(i);
+ pollFds[i].events = (short) POLLIN;
}
-
-
try {
- fdArray = fds.toArray(fdArray);
- index = selectReadable(fdArray);
- } catch (IOException ex) {
- throw new RuntimeException("Error in select()", ex);
+ Os.poll(pollFds, -1);
+ } catch (ErrnoException ex) {
+ throw new RuntimeException("poll failed", ex);
}
-
- if (index < 0) {
- throw new RuntimeException("Error in select()");
- } else if (index == 0) {
- ZygoteConnection newPeer = acceptCommandPeer(abiList);
- peers.add(newPeer);
- fds.add(newPeer.getFileDescriptor());
- } else {
- boolean done;
- done = peers.get(index).runOnce();
-
- if (done) {
- peers.remove(index);
- fds.remove(index);
+ for (int i = pollFds.length - 1; i >= 0; --i) {
+ if ((pollFds[i].revents & POLLIN) == 0) {
+ continue;
+ }
+ if (i == 0) {
+ ZygoteConnection newPeer = acceptCommandPeer(abiList);
+ peers.add(newPeer);
+ fds.add(newPeer.getFileDesciptor());
+ } else {
+ boolean done = peers.get(i).runOnce();
+ if (done) {
+ peers.remove(i);
+ fds.remove(i);
+ }
}
}
}
}
/**
- * The Linux syscall "setreuid()"
- * @param ruid real uid
- * @param euid effective uid
- * @return 0 on success, non-zero errno on fail
- */
- static native int setreuid(int ruid, int euid);
-
- /**
- * The Linux syscall "setregid()"
- * @param rgid real gid
- * @param egid effective gid
- * @return 0 on success, non-zero errno on fail
- */
- static native int setregid(int rgid, int egid);
-
- /**
- * Invokes the linux syscall "setpgid"
- *
- * @param pid pid to change
- * @param pgid new process group of pid
- * @return 0 on success or non-zero errno on fail
- */
- static native int setpgid(int pid, int pgid);
-
- /**
- * Invokes the linux syscall "getpgid"
- *
- * @param pid pid to query
- * @return pgid of pid in question
- * @throws IOException on error
- */
- static native int getpgid(int pid) throws IOException;
-
- /**
- * Invokes the syscall dup2() to copy the specified descriptors into
- * stdin, stdout, and stderr. The existing stdio descriptors will be
- * closed and errors during close will be ignored. The specified
- * descriptors will also remain open at their original descriptor numbers,
- * so the caller may want to close the original descriptors.
- *
- * @param in new stdin
- * @param out new stdout
- * @param err new stderr
- * @throws IOException
- */
- static native void reopenStdio(FileDescriptor in,
- FileDescriptor out, FileDescriptor err) throws IOException;
-
- /**
- * Toggles the close-on-exec flag for the specified file descriptor.
- *
- * @param fd non-null; file descriptor
- * @param flag desired close-on-exec flag state
- * @throws IOException
- */
- static native void setCloseOnExec(FileDescriptor fd, boolean flag)
- throws IOException;
-
- /**
- * Invokes select() on the provider array of file descriptors (selecting
- * for readability only). Array elements of null are ignored.
- *
- * @param fds non-null; array of readable file descriptors
- * @return index of descriptor that is now readable or -1 for empty array.
- * @throws IOException if an error occurs
- */
- static native int selectReadable(FileDescriptor[] fds) throws IOException;
-
- /**
- * Creates a file descriptor from an int fd.
- *
- * @param fd integer OS file descriptor
- * @return non-null; FileDescriptor instance
- * @throws IOException if fd is invalid
- */
- static native FileDescriptor createFileDescriptor(int fd)
- throws IOException;
-
- /**
* Class not instantiable.
*/
private ZygoteInit() {
diff --git a/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java b/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java
index 06838c9..526e2ae 100644
--- a/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java
+++ b/core/java/com/android/internal/view/animation/FallbackLUTInterpolator.java
@@ -45,7 +45,7 @@ public class FallbackLUTInterpolator implements NativeInterpolatorFactory, TimeI
private static float[] createLUT(TimeInterpolator interpolator, long duration) {
long frameIntervalNanos = Choreographer.getInstance().getFrameIntervalNanos();
int animIntervalMs = (int) (frameIntervalNanos / TimeUtils.NANOS_PER_MS);
- int numAnimFrames = (int) Math.ceil(duration / animIntervalMs);
+ int numAnimFrames = (int) Math.ceil(((double) duration) / animIntervalMs);
float values[] = new float[numAnimFrames];
float lastFrame = numAnimFrames - 1;
for (int i = 0; i < numAnimFrames; i++) {
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index f6c42af..0afc651 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -48,6 +48,9 @@ import android.widget.Button;
import com.android.internal.R;
import com.google.android.collect.Lists;
+import java.io.ByteArrayOutputStream;
+import java.nio.charset.StandardCharsets;
+import libcore.util.HexEncoding;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -357,7 +360,7 @@ public class LockPatternUtils {
*/
public boolean checkPasswordHistory(String password) {
String passwordHashString = new String(
- passwordToHash(password, getCurrentOrCallingUserId()));
+ passwordToHash(password, getCurrentOrCallingUserId()), StandardCharsets.UTF_8);
String passwordHistory = getString(PASSWORD_HISTORY_KEY);
if (passwordHistory == null) {
return false;
@@ -889,7 +892,7 @@ public class LockPatternUtils {
passwordHistory = "";
} else {
byte[] hash = passwordToHash(password, userHandle);
- passwordHistory = new String(hash) + "," + passwordHistory;
+ passwordHistory = new String(hash, StandardCharsets.UTF_8) + "," + passwordHistory;
// Cut it to contain passwordHistoryLength hashes
// and passwordHistoryLength -1 commas.
passwordHistory = passwordHistory.substring(0, Math.min(hash.length
@@ -1076,34 +1079,30 @@ public class LockPatternUtils {
* Generate a hash for the given password. To avoid brute force attacks, we use a salted hash.
* Not the most secure, but it is at least a second level of protection. First level is that
* the file is in a location only readable by the system process.
+ *
* @param password the gesture pattern.
+ *
* @return the hash of the pattern in a byte array.
*/
public byte[] passwordToHash(String password, int userId) {
if (password == null) {
return null;
}
- String algo = null;
- byte[] hashed = null;
+
try {
byte[] saltedPassword = (password + getSalt(userId)).getBytes();
- byte[] sha1 = MessageDigest.getInstance(algo = "SHA-1").digest(saltedPassword);
- byte[] md5 = MessageDigest.getInstance(algo = "MD5").digest(saltedPassword);
- hashed = (toHex(sha1) + toHex(md5)).getBytes();
- } catch (NoSuchAlgorithmException e) {
- Log.w(TAG, "Failed to encode string because of missing algorithm: " + algo);
- }
- return hashed;
- }
+ byte[] sha1 = MessageDigest.getInstance("SHA-1").digest(saltedPassword);
+ byte[] md5 = MessageDigest.getInstance("MD5").digest(saltedPassword);
- private static String toHex(byte[] ary) {
- final String hex = "0123456789ABCDEF";
- String ret = "";
- for (int i = 0; i < ary.length; i++) {
- ret += hex.charAt((ary[i] >> 4) & 0xf);
- ret += hex.charAt(ary[i] & 0xf);
+ byte[] combined = new byte[sha1.length + md5.length];
+ System.arraycopy(sha1, 0, combined, 0, sha1.length);
+ System.arraycopy(md5, 0, combined, sha1.length, md5.length);
+
+ final char[] hexEncoded = HexEncoding.encode(combined);
+ return new String(hexEncoded).getBytes(StandardCharsets.UTF_8);
+ } catch (NoSuchAlgorithmException e) {
+ throw new AssertionError("Missing digest algorithm: ", e);
}
- return ret;
}
/**
diff --git a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
index b680fab..11ac19e 100644
--- a/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
+++ b/core/java/com/android/internal/widget/multiwaveview/GlowPadView.java
@@ -863,7 +863,7 @@ public class GlowPadView extends View {
// tx and ty are relative to wave center
float tx = eventX - mWaveCenterX;
float ty = eventY - mWaveCenterY;
- float touchRadius = (float) Math.sqrt(dist2(tx, ty));
+ float touchRadius = (float) Math.hypot(tx, ty);
final float scale = touchRadius > mOuterRadius ? mOuterRadius / touchRadius : 1.0f;
float limitX = tx * scale;
float limitY = ty * scale;
diff --git a/core/java/com/android/internal/widget/multiwaveview/PointCloud.java b/core/java/com/android/internal/widget/multiwaveview/PointCloud.java
index f299935..6f26b99 100644
--- a/core/java/com/android/internal/widget/multiwaveview/PointCloud.java
+++ b/core/java/com/android/internal/widget/multiwaveview/PointCloud.java
@@ -22,7 +22,6 @@ import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
-import android.util.FloatMath;
import android.util.Log;
public class PointCloud {
@@ -151,8 +150,8 @@ public class PointCloud {
float eta = PI/2.0f;
float dEta = 2.0f * PI / pointsInBand;
for (int i = 0; i < pointsInBand; i++) {
- float x = r * FloatMath.cos(eta);
- float y = r * FloatMath.sin(eta);
+ float x = r * (float) Math.cos(eta);
+ float y = r * (float) Math.sin(eta);
eta += dEta;
mPointCloud.add(new Point(x, y, r));
}
@@ -167,32 +166,24 @@ public class PointCloud {
return mScale;
}
- private static float hypot(float x, float y) {
- return FloatMath.sqrt(x*x + y*y);
- }
-
- private static float max(float a, float b) {
- return a > b ? a : b;
- }
-
public int getAlphaForPoint(Point point) {
// Contribution from positional glow
- float glowDistance = hypot(glowManager.x - point.x, glowManager.y - point.y);
+ float glowDistance = (float) Math.hypot(glowManager.x - point.x, glowManager.y - point.y);
float glowAlpha = 0.0f;
if (glowDistance < glowManager.radius) {
- float cosf = FloatMath.cos(PI * 0.25f * glowDistance / glowManager.radius);
- glowAlpha = glowManager.alpha * max(0.0f, (float) Math.pow(cosf, 10.0f));
+ float cosf = (float) Math.cos(PI * 0.25f * glowDistance / glowManager.radius);
+ glowAlpha = glowManager.alpha * Math.max(0.0f, (float) Math.pow(cosf, 10.0f));
}
// Compute contribution from Wave
- float radius = hypot(point.x, point.y);
+ float radius = (float) Math.hypot(point.x, point.y);
float waveAlpha = 0.0f;
if (radius < waveManager.radius * 2) {
float distanceToWaveRing = (radius - waveManager.radius);
- float cosf = FloatMath.cos(PI * 0.5f * distanceToWaveRing / waveManager.radius);
- waveAlpha = waveManager.alpha * max(0.0f, (float) Math.pow(cosf, 6.0f));
+ float cosf = (float) Math.cos(PI * 0.5f * distanceToWaveRing / waveManager.radius);
+ waveAlpha = waveManager.alpha * Math.max(0.0f, (float) Math.pow(cosf, 6.0f));
}
- return (int) (max(glowAlpha, waveAlpha) * 255);
+ return (int) (Math.max(glowAlpha, waveAlpha) * 255);
}
private float interp(float min, float max, float f) {
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index dbaa4b8..45dce2c 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -1,271 +1,271 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_CFLAGS += -DHAVE_CONFIG_H -DKHTML_NO_EXCEPTIONS -DGKWQ_NO_JAVA
LOCAL_CFLAGS += -DNO_SUPPORT_JS_BINDING -DQT_NO_WHEELEVENT -DKHTML_NO_XBL
LOCAL_CFLAGS += -U__APPLE__
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast
+LOCAL_CFLAGS += -Wno-unused-parameter
LOCAL_CFLAGS += -Wno-non-virtual-dtor
LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses
LOCAL_CPPFLAGS += -Wno-conversion-null
ifeq ($(TARGET_ARCH), arm)
- LOCAL_CFLAGS += -DPACKED="__attribute__ ((packed))"
+ LOCAL_CFLAGS += -DPACKED="__attribute__ ((packed))"
else
- LOCAL_CFLAGS += -DPACKED=""
+ LOCAL_CFLAGS += -DPACKED=""
endif
ifeq ($(USE_OPENGL_RENDERER),true)
- LOCAL_CFLAGS += -DUSE_OPENGL_RENDERER
+ LOCAL_CFLAGS += -DUSE_OPENGL_RENDERER
endif
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
+LOCAL_CFLAGS += -DU_USING_ICU_NAMESPACE=0
+
LOCAL_SRC_FILES:= \
- AndroidRuntime.cpp \
- com_android_internal_content_NativeLibraryHelper.cpp \
- com_google_android_gles_jni_EGLImpl.cpp \
- com_google_android_gles_jni_GLImpl.cpp.arm \
- android_app_NativeActivity.cpp \
- android_opengl_EGL14.cpp \
- android_opengl_EGLExt.cpp \
- android_opengl_GLES10.cpp \
- android_opengl_GLES10Ext.cpp \
- android_opengl_GLES11.cpp \
- android_opengl_GLES11Ext.cpp \
- android_opengl_GLES20.cpp \
- android_opengl_GLES30.cpp \
- android_opengl_GLES31.cpp \
- android_opengl_GLES31Ext.cpp \
- android_database_CursorWindow.cpp \
- android_database_SQLiteCommon.cpp \
- android_database_SQLiteConnection.cpp \
- android_database_SQLiteGlobal.cpp \
- android_database_SQLiteDebug.cpp \
- android_emoji_EmojiFactory.cpp \
- android_view_DisplayEventReceiver.cpp \
- android_view_Surface.cpp \
- android_view_SurfaceControl.cpp \
- android_view_SurfaceSession.cpp \
- android_view_TextureView.cpp \
- android_view_InputChannel.cpp \
- android_view_InputDevice.cpp \
- android_view_InputEventReceiver.cpp \
- android_view_InputEventSender.cpp \
- android_view_InputQueue.cpp \
- android_view_KeyEvent.cpp \
- android_view_KeyCharacterMap.cpp \
- android_view_GraphicBuffer.cpp \
- android_view_GLES20Canvas.cpp \
- android_view_HardwareLayer.cpp \
- android_view_ThreadedRenderer.cpp \
- android_view_MotionEvent.cpp \
- android_view_PointerIcon.cpp \
- android_view_RenderNode.cpp \
- android_view_RenderNodeAnimator.cpp \
- android_view_VelocityTracker.cpp \
- android_text_AndroidCharacter.cpp \
- android_text_AndroidBidi.cpp \
- android_text_StaticLayout.cpp \
- android_os_Debug.cpp \
- android_os_MemoryFile.cpp \
- android_os_MessageQueue.cpp \
- android_os_Parcel.cpp \
- android_os_SELinux.cpp \
- android_os_SystemClock.cpp \
- android_os_SystemProperties.cpp \
- android_os_Trace.cpp \
- android_os_UEventObserver.cpp \
- android_net_LocalSocketImpl.cpp \
- android_net_NetUtils.cpp \
- android_net_TrafficStats.cpp \
- android_nio_utils.cpp \
- android_util_AssetManager.cpp \
- android_util_Binder.cpp \
- android_util_EventLog.cpp \
- android_util_Log.cpp \
- android_util_FloatMath.cpp \
- android_util_Process.cpp \
- android_util_StringBlock.cpp \
- android_util_XmlBlock.cpp \
- android_graphics_Canvas.cpp \
- android_graphics_Picture.cpp \
- android/graphics/AutoDecodeCancel.cpp \
- android/graphics/Bitmap.cpp \
- android/graphics/BitmapFactory.cpp \
- android/graphics/Camera.cpp \
- android/graphics/CanvasProperty.cpp \
- android/graphics/ColorFilter.cpp \
- android/graphics/DrawFilter.cpp \
- android/graphics/FontFamily.cpp \
- android/graphics/CreateJavaOutputStreamAdaptor.cpp \
- android/graphics/Graphics.cpp \
- android/graphics/HarfBuzzNGFaceSkia.cpp \
- android/graphics/Interpolator.cpp \
- android/graphics/MaskFilter.cpp \
- android/graphics/Matrix.cpp \
- android/graphics/MinikinSkia.cpp \
- android/graphics/MinikinUtils.cpp \
- android/graphics/Movie.cpp \
- android/graphics/NinePatch.cpp \
- android/graphics/NinePatchImpl.cpp \
- android/graphics/NinePatchPeeker.cpp \
- android/graphics/Paint.cpp \
- android/graphics/PaintImpl.cpp \
- android/graphics/Path.cpp \
- android/graphics/PathMeasure.cpp \
- android/graphics/PathEffect.cpp \
- android/graphics/Picture.cpp \
- android/graphics/PorterDuff.cpp \
- android/graphics/BitmapRegionDecoder.cpp \
- android/graphics/Rasterizer.cpp \
- android/graphics/Region.cpp \
- android/graphics/Shader.cpp \
- android/graphics/SkiaCanvas.cpp \
- android/graphics/SurfaceTexture.cpp \
- android/graphics/Typeface.cpp \
- android/graphics/TypefaceImpl.cpp \
- android/graphics/Utils.cpp \
- android/graphics/Xfermode.cpp \
- android/graphics/YuvToJpegEncoder.cpp \
- android/graphics/pdf/PdfDocument.cpp \
- android/graphics/pdf/PdfEditor.cpp \
- android/graphics/pdf/PdfRenderer.cpp \
- android_media_AudioRecord.cpp \
- android_media_AudioSystem.cpp \
- android_media_AudioTrack.cpp \
- android_media_JetPlayer.cpp \
- android_media_RemoteDisplay.cpp \
- android_media_ToneGenerator.cpp \
- android_hardware_Camera.cpp \
- android_hardware_camera2_CameraMetadata.cpp \
- android_hardware_camera2_legacy_LegacyCameraDevice.cpp \
- android_hardware_camera2_legacy_PerfMeasurement.cpp \
- android_hardware_camera2_DngCreator.cpp \
- android_hardware_SensorManager.cpp \
- android_hardware_SerialPort.cpp \
- android_hardware_SoundTrigger.cpp \
- android_hardware_UsbDevice.cpp \
- android_hardware_UsbDeviceConnection.cpp \
- android_hardware_UsbRequest.cpp \
- android_hardware_location_ActivityRecognitionHardware.cpp \
- android_util_FileObserver.cpp \
- android/opengl/poly_clip.cpp.arm \
- android/opengl/util.cpp.arm \
- android_server_FingerprintManager.cpp \
- android_server_NetworkManagementSocketTagger.cpp \
- android_server_Watchdog.cpp \
- android_ddm_DdmHandleNativeHeap.cpp \
- com_android_internal_os_ZygoteInit.cpp \
- android_backup_BackupDataInput.cpp \
- android_backup_BackupDataOutput.cpp \
- android_backup_FileBackupHelperBase.cpp \
- android_backup_BackupHelperDispatcher.cpp \
- android_app_backup_FullBackup.cpp \
- android_content_res_ObbScanner.cpp \
- android_content_res_Configuration.cpp \
- android_animation_PropertyValuesHolder.cpp \
- com_android_internal_net_NetworkStatsFactory.cpp \
- com_android_internal_os_Zygote.cpp \
- com_android_internal_util_VirtualRefBasePtr.cpp \
- com_android_internal_view_animation_NativeInterpolatorFactoryHelper.cpp
+ AndroidRuntime.cpp \
+ com_android_internal_content_NativeLibraryHelper.cpp \
+ com_google_android_gles_jni_EGLImpl.cpp \
+ com_google_android_gles_jni_GLImpl.cpp.arm \
+ android_app_NativeActivity.cpp \
+ android_opengl_EGL14.cpp \
+ android_opengl_EGLExt.cpp \
+ android_opengl_GLES10.cpp \
+ android_opengl_GLES10Ext.cpp \
+ android_opengl_GLES11.cpp \
+ android_opengl_GLES11Ext.cpp \
+ android_opengl_GLES20.cpp \
+ android_opengl_GLES30.cpp \
+ android_opengl_GLES31.cpp \
+ android_opengl_GLES31Ext.cpp \
+ android_database_CursorWindow.cpp \
+ android_database_SQLiteCommon.cpp \
+ android_database_SQLiteConnection.cpp \
+ android_database_SQLiteGlobal.cpp \
+ android_database_SQLiteDebug.cpp \
+ android_emoji_EmojiFactory.cpp \
+ android_view_DisplayEventReceiver.cpp \
+ android_view_Surface.cpp \
+ android_view_SurfaceControl.cpp \
+ android_view_SurfaceSession.cpp \
+ android_view_TextureView.cpp \
+ android_view_InputChannel.cpp \
+ android_view_InputDevice.cpp \
+ android_view_InputEventReceiver.cpp \
+ android_view_InputEventSender.cpp \
+ android_view_InputQueue.cpp \
+ android_view_KeyEvent.cpp \
+ android_view_KeyCharacterMap.cpp \
+ android_view_GraphicBuffer.cpp \
+ android_view_GLES20Canvas.cpp \
+ android_view_HardwareLayer.cpp \
+ android_view_ThreadedRenderer.cpp \
+ android_view_MotionEvent.cpp \
+ android_view_PointerIcon.cpp \
+ android_view_RenderNode.cpp \
+ android_view_RenderNodeAnimator.cpp \
+ android_view_VelocityTracker.cpp \
+ android_text_AndroidCharacter.cpp \
+ android_text_AndroidBidi.cpp \
+ android_text_StaticLayout.cpp \
+ android_os_Debug.cpp \
+ android_os_MemoryFile.cpp \
+ android_os_MessageQueue.cpp \
+ android_os_Parcel.cpp \
+ android_os_SELinux.cpp \
+ android_os_SystemClock.cpp \
+ android_os_SystemProperties.cpp \
+ android_os_Trace.cpp \
+ android_os_UEventObserver.cpp \
+ android_net_LocalSocketImpl.cpp \
+ android_net_NetUtils.cpp \
+ android_net_TrafficStats.cpp \
+ android_nio_utils.cpp \
+ android_util_AssetManager.cpp \
+ android_util_Binder.cpp \
+ android_util_EventLog.cpp \
+ android_util_Log.cpp \
+ android_util_Process.cpp \
+ android_util_StringBlock.cpp \
+ android_util_XmlBlock.cpp \
+ android_graphics_Canvas.cpp \
+ android_graphics_Picture.cpp \
+ android/graphics/AutoDecodeCancel.cpp \
+ android/graphics/Bitmap.cpp \
+ android/graphics/BitmapFactory.cpp \
+ android/graphics/Camera.cpp \
+ android/graphics/CanvasProperty.cpp \
+ android/graphics/ColorFilter.cpp \
+ android/graphics/DrawFilter.cpp \
+ android/graphics/FontFamily.cpp \
+ android/graphics/CreateJavaOutputStreamAdaptor.cpp \
+ android/graphics/Graphics.cpp \
+ android/graphics/HarfBuzzNGFaceSkia.cpp \
+ android/graphics/Interpolator.cpp \
+ android/graphics/MaskFilter.cpp \
+ android/graphics/Matrix.cpp \
+ android/graphics/MinikinSkia.cpp \
+ android/graphics/MinikinUtils.cpp \
+ android/graphics/Movie.cpp \
+ android/graphics/NinePatch.cpp \
+ android/graphics/NinePatchImpl.cpp \
+ android/graphics/NinePatchPeeker.cpp \
+ android/graphics/Paint.cpp \
+ android/graphics/PaintImpl.cpp \
+ android/graphics/Path.cpp \
+ android/graphics/PathMeasure.cpp \
+ android/graphics/PathEffect.cpp \
+ android/graphics/Picture.cpp \
+ android/graphics/PorterDuff.cpp \
+ android/graphics/BitmapRegionDecoder.cpp \
+ android/graphics/Rasterizer.cpp \
+ android/graphics/Region.cpp \
+ android/graphics/Shader.cpp \
+ android/graphics/SkiaCanvas.cpp \
+ android/graphics/SurfaceTexture.cpp \
+ android/graphics/Typeface.cpp \
+ android/graphics/TypefaceImpl.cpp \
+ android/graphics/Utils.cpp \
+ android/graphics/Xfermode.cpp \
+ android/graphics/YuvToJpegEncoder.cpp \
+ android/graphics/pdf/PdfDocument.cpp \
+ android/graphics/pdf/PdfEditor.cpp \
+ android/graphics/pdf/PdfRenderer.cpp \
+ android_media_AudioRecord.cpp \
+ android_media_AudioSystem.cpp \
+ android_media_AudioTrack.cpp \
+ android_media_JetPlayer.cpp \
+ android_media_RemoteDisplay.cpp \
+ android_media_ToneGenerator.cpp \
+ android_hardware_Camera.cpp \
+ android_hardware_camera2_CameraMetadata.cpp \
+ android_hardware_camera2_legacy_LegacyCameraDevice.cpp \
+ android_hardware_camera2_legacy_PerfMeasurement.cpp \
+ android_hardware_camera2_DngCreator.cpp \
+ android_hardware_SensorManager.cpp \
+ android_hardware_SerialPort.cpp \
+ android_hardware_SoundTrigger.cpp \
+ android_hardware_UsbDevice.cpp \
+ android_hardware_UsbDeviceConnection.cpp \
+ android_hardware_UsbRequest.cpp \
+ android_hardware_location_ActivityRecognitionHardware.cpp \
+ android_util_FileObserver.cpp \
+ android/opengl/poly_clip.cpp.arm \
+ android/opengl/util.cpp.arm \
+ android_server_FingerprintManager.cpp \
+ android_server_NetworkManagementSocketTagger.cpp \
+ android_server_Watchdog.cpp \
+ android_ddm_DdmHandleNativeHeap.cpp \
+ android_backup_BackupDataInput.cpp \
+ android_backup_BackupDataOutput.cpp \
+ android_backup_FileBackupHelperBase.cpp \
+ android_backup_BackupHelperDispatcher.cpp \
+ android_app_backup_FullBackup.cpp \
+ android_content_res_ObbScanner.cpp \
+ android_content_res_Configuration.cpp \
+ android_animation_PropertyValuesHolder.cpp \
+ com_android_internal_net_NetworkStatsFactory.cpp \
+ com_android_internal_os_Zygote.cpp \
+ com_android_internal_util_VirtualRefBasePtr.cpp \
+ com_android_internal_view_animation_NativeInterpolatorFactoryHelper.cpp
LOCAL_C_INCLUDES += \
- $(JNI_H_INCLUDE) \
- $(LOCAL_PATH)/android/graphics \
- $(LOCAL_PATH)/../../libs/hwui \
- $(LOCAL_PATH)/../../../native/opengl/libs \
- $(call include-path-for, bluedroid) \
- $(call include-path-for, libhardware)/hardware \
- $(call include-path-for, libhardware_legacy)/hardware_legacy \
- $(TOP)/bionic/libc/dns/include \
- $(TOP)/frameworks/av/include \
- $(TOP)/system/media/camera/include \
- $(TOP)/system/netd/include \
- external/icu/icu4c/source/common \
- external/pdfium/core/include/fpdfapi \
- external/pdfium/core/include/fpdfdoc \
- external/pdfium/fpdfsdk/include \
- external/skia/src/core \
- external/skia/src/effects \
- external/skia/src/images \
- external/sqlite/dist \
- external/sqlite/android \
- external/expat/lib \
- external/openssl/include \
- external/tremor/Tremor \
- external/jpeg \
- external/harfbuzz_ng/src \
- external/zlib \
- frameworks/opt/emoji \
- libcore/include \
- $(call include-path-for, audio-utils) \
- frameworks/minikin/include \
- external/freetype/include
+ $(JNI_H_INCLUDE) \
+ $(LOCAL_PATH)/android/graphics \
+ $(LOCAL_PATH)/../../libs/hwui \
+ $(LOCAL_PATH)/../../../native/opengl/libs \
+ $(call include-path-for, bluedroid) \
+ $(call include-path-for, libhardware)/hardware \
+ $(call include-path-for, libhardware_legacy)/hardware_legacy \
+ $(TOP)/frameworks/av/include \
+ $(TOP)/system/media/camera/include \
+ $(TOP)/system/netd/include \
+ external/pdfium/core/include/fpdfapi \
+ external/pdfium/core/include/fpdfdoc \
+ external/pdfium/fpdfsdk/include \
+ external/skia/src/core \
+ external/skia/src/effects \
+ external/skia/src/images \
+ external/sqlite/dist \
+ external/sqlite/android \
+ external/expat/lib \
+ external/tremor/Tremor \
+ external/jpeg \
+ external/harfbuzz_ng/src \
+ frameworks/opt/emoji \
+ libcore/include \
+ $(call include-path-for, audio-utils) \
+ frameworks/minikin/include \
+ external/freetype/include
# TODO: clean up Minikin so it doesn't need the freetype include
LOCAL_SHARED_LIBRARIES := \
- libmemtrack \
- libandroidfw \
- libexpat \
- libnativehelper \
- liblog \
- libcutils \
- libutils \
- libbinder \
- libnetutils \
- libui \
- libgui \
- libinput \
- libinputflinger \
- libcamera_client \
- libcamera_metadata \
- libskia \
- libsqlite \
- libEGL \
- libGLESv1_CM \
- libGLESv2 \
- libETC1 \
- libhardware \
- libhardware_legacy \
- libselinux \
- libsonivox \
- libcrypto \
- libssl \
- libicuuc \
- libicui18n \
- libmedia \
- libjpeg \
- libusbhost \
- libharfbuzz_ng \
- libz \
- libaudioutils \
- libpdfium \
- libimg_utils \
- libnetd_client \
- libsoundtrigger \
- libminikin \
- libstlport \
- libprocessgroup \
- libnativebridge \
+ libmemtrack \
+ libandroidfw \
+ libexpat \
+ libnativehelper \
+ liblog \
+ libcutils \
+ libutils \
+ libbinder \
+ libnetutils \
+ libui \
+ libgui \
+ libinput \
+ libinputflinger \
+ libcamera_client \
+ libcamera_metadata \
+ libskia \
+ libsqlite \
+ libEGL \
+ libGLESv1_CM \
+ libGLESv2 \
+ libETC1 \
+ libhardware \
+ libhardware_legacy \
+ libselinux \
+ libsonivox \
+ libcrypto \
+ libssl \
+ libicuuc \
+ libicui18n \
+ libmedia \
+ libjpeg \
+ libusbhost \
+ libharfbuzz_ng \
+ libz \
+ libaudioutils \
+ libpdfium \
+ libimg_utils \
+ libnetd_client \
+ libsoundtrigger \
+ libminikin \
+ libprocessgroup \
+ libnativebridge
ifeq ($(USE_OPENGL_RENDERER),true)
- LOCAL_SHARED_LIBRARIES += libhwui
+ LOCAL_SHARED_LIBRARIES += libhwui
endif
LOCAL_SHARED_LIBRARIES += \
- libdl
+ libdl
+
# we need to access the private Bionic header
# <bionic_tls.h> in com_google_android_gles_jni_GLImpl.cpp
-LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../../../bionic/libc/private
-
-ifeq ($(WITH_MALLOC_LEAK_CHECK),true)
- LOCAL_CFLAGS += -DMALLOC_LEAK_CHECK
-endif
+LOCAL_C_INCLUDES += bionic/libc/private
LOCAL_MODULE:= libandroid_runtime
-include external/stlport/libstlport.mk
+# -Wno-unknown-pragmas: necessary for Clang as the GL bindings need to turn
+# off a GCC warning that Clang doesn't know.
+LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code -Wno-unknown-pragmas
+
+# -Wno-c++11-extensions: Clang warns about Skia using the C++11 override keyword, but this project
+# is not being compiled with that level. Remove once this has changed.
+LOCAL_CFLAGS += -Wno-c++11-extensions
+
include $(BUILD_SHARED_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 8dd447c..0bfc0c9 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -95,8 +95,6 @@ extern int register_android_media_AudioTrack(JNIEnv *env);
extern int register_android_media_JetPlayer(JNIEnv *env);
extern int register_android_media_ToneGenerator(JNIEnv *env);
-extern int register_android_util_FloatMath(JNIEnv* env);
-
namespace android {
/*
@@ -164,7 +162,6 @@ extern int register_android_text_AndroidBidi(JNIEnv *env);
extern int register_android_opengl_classes(JNIEnv *env);
extern int register_android_ddm_DdmHandleNativeHeap(JNIEnv *env);
extern int register_android_server_NetworkManagementSocketTagger(JNIEnv* env);
-extern int register_com_android_internal_os_ZygoteInit(JNIEnv* env);
extern int register_android_backup_BackupDataInput(JNIEnv *env);
extern int register_android_backup_BackupDataOutput(JNIEnv *env);
extern int register_android_backup_FileBackupHelperBase(JNIEnv *env);
@@ -193,12 +190,6 @@ extern int register_com_android_internal_util_VirtualRefBasePtr(JNIEnv *env);
static AndroidRuntime* gCurRuntime = NULL;
-static void doThrow(JNIEnv* env, const char* exc, const char* msg = NULL)
-{
- if (jniThrowException(env, exc, msg) != 0)
- assert(false);
-}
-
/*
* Code written in the Java Programming Language calls here from main().
*/
@@ -366,22 +357,37 @@ static bool hasFile(const char* file) {
}
/*
- * Read the persistent locale.
+ * Read the persistent locale. Attempts to read to persist.sys.locale
+ * and falls back to the default locale (ro.product.locale) if
+ * persist.sys.locale is empty.
*/
-static void readLocale(char* language, char* region)
+static void readLocale(char* locale)
{
- char propLang[PROPERTY_VALUE_MAX], propRegn[PROPERTY_VALUE_MAX];
-
- property_get("persist.sys.language", propLang, "");
- property_get("persist.sys.country", propRegn, "");
- if (*propLang == 0 && *propRegn == 0) {
- /* Set to ro properties, default is en_US */
- property_get("ro.product.locale.language", propLang, "en");
- property_get("ro.product.locale.region", propRegn, "US");
+ // Allocate 4 extra bytes because we might read a property into
+ // this array at offset 4.
+ char propLocale[PROPERTY_VALUE_MAX + 4];
+
+ property_get("persist.sys.locale", propLocale, "");
+ if (propLocale[0] == 0) {
+ property_get("ro.product.locale", propLocale, "");
+
+ if (propLocale[0] == 0) {
+ // If persist.sys.locale and ro.product.locale are missing,
+ // construct a locale value from the individual locale components.
+ property_get("ro.product.locale.language", propLocale, "en");
+
+ // The language code is either two or three chars in length. If it
+ // isn't 2 chars long, assume three. Anything else is an error
+ // anyway.
+ const int offset = (propLocale[2] == 0) ? 2 : 3;
+ propLocale[offset] = '-';
+
+ property_get("ro.product.locale.region", propLocale + offset + 1, "US");
+ }
}
- strncat(language, propLang, 3);
- strncat(region, propRegn, 3);
- //ALOGD("language=%s region=%s\n", language, region);
+
+ strncat(locale, propLocale, PROPERTY_VALUE_MAX);
+ // ALOGD("[DEBUG] locale=%s", locale);
}
void AndroidRuntime::addOption(const char* optionString, void* extraInfo)
@@ -530,23 +536,22 @@ bool AndroidRuntime::parseCompilerRuntimeOption(const char* property,
*/
int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
{
- int result = -1;
JavaVMInitArgs initArgs;
char propBuf[PROPERTY_VALUE_MAX];
char stackTraceFileBuf[sizeof("-Xstacktracefile:")-1 + PROPERTY_VALUE_MAX];
- char dexoptFlagsBuf[PROPERTY_VALUE_MAX];
- char enableAssertBuf[sizeof("-ea:")-1 + PROPERTY_VALUE_MAX];
char jniOptsBuf[sizeof("-Xjniopts:")-1 + PROPERTY_VALUE_MAX];
char heapstartsizeOptsBuf[sizeof("-Xms")-1 + PROPERTY_VALUE_MAX];
char heapsizeOptsBuf[sizeof("-Xmx")-1 + PROPERTY_VALUE_MAX];
char heapgrowthlimitOptsBuf[sizeof("-XX:HeapGrowthLimit=")-1 + PROPERTY_VALUE_MAX];
char heapminfreeOptsBuf[sizeof("-XX:HeapMinFree=")-1 + PROPERTY_VALUE_MAX];
char heapmaxfreeOptsBuf[sizeof("-XX:HeapMaxFree=")-1 + PROPERTY_VALUE_MAX];
+ char usejitOptsBuf[sizeof("-Xusejit:")-1 + PROPERTY_VALUE_MAX];
+ char jitcodecachesizeOptsBuf[sizeof("-Xjitcodecachesize:")-1 + PROPERTY_VALUE_MAX];
+ char jitthresholdOptsBuf[sizeof("-Xjitthreshold:")-1 + PROPERTY_VALUE_MAX];
char gctypeOptsBuf[sizeof("-Xgc:")-1 + PROPERTY_VALUE_MAX];
char backgroundgcOptsBuf[sizeof("-XX:BackgroundGC=")-1 + PROPERTY_VALUE_MAX];
char heaptargetutilizationOptsBuf[sizeof("-XX:HeapTargetUtilization=")-1 + PROPERTY_VALUE_MAX];
- char jitcodecachesizeOptsBuf[sizeof("-Xjitcodecachesize:")-1 + PROPERTY_VALUE_MAX];
- char dalvikVmLibBuf[PROPERTY_VALUE_MAX];
+ char cachePruneBuf[sizeof("-Xzygote-max-boot-retry=")-1 + PROPERTY_VALUE_MAX];
char dex2oatXmsImageFlagsBuf[sizeof("-Xms")-1 + PROPERTY_VALUE_MAX];
char dex2oatXmxImageFlagsBuf[sizeof("-Xmx")-1 + PROPERTY_VALUE_MAX];
char dex2oatXmsFlagsBuf[sizeof("-Xms")-1 + PROPERTY_VALUE_MAX];
@@ -555,6 +560,10 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
char dex2oatImageCompilerFilterBuf[sizeof("--compiler-filter=")-1 + PROPERTY_VALUE_MAX];
char dex2oatThreadsBuf[sizeof("-j")-1 + PROPERTY_VALUE_MAX];
char dex2oatThreadsImageBuf[sizeof("-j")-1 + PROPERTY_VALUE_MAX];
+ char dex2oat_isa_variant_key[PROPERTY_KEY_MAX];
+ char dex2oat_isa_variant[sizeof("--instruction-set-variant=") -1 + PROPERTY_VALUE_MAX];
+ char dex2oat_isa_features_key[PROPERTY_KEY_MAX];
+ char dex2oat_isa_features[sizeof("--instruction-set-features=") -1 + PROPERTY_VALUE_MAX];
char dex2oatFlagsBuf[PROPERTY_VALUE_MAX];
char dex2oatImageFlagsBuf[PROPERTY_VALUE_MAX];
char extraOptsBuf[PROPERTY_VALUE_MAX];
@@ -574,12 +583,10 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
PROPERTY_VALUE_MAX];
char profileType[sizeof("-Xprofile-type:")-1 + PROPERTY_VALUE_MAX];
char profileMaxStackDepth[sizeof("-Xprofile-max-stack-depth:")-1 + PROPERTY_VALUE_MAX];
- char langOption[sizeof("-Duser.language=") + 3];
- char regionOption[sizeof("-Duser.region=") + 3];
+ char localeOption[sizeof("-Duser.locale=") + PROPERTY_VALUE_MAX];
char lockProfThresholdBuf[sizeof("-Xlockprofthreshold:")-1 + PROPERTY_VALUE_MAX];
- char jitOpBuf[sizeof("-Xjitop:")-1 + PROPERTY_VALUE_MAX];
- char jitMethodBuf[sizeof("-Xjitmethod:")-1 + PROPERTY_VALUE_MAX];
char nativeBridgeLibrary[sizeof("-XX:NativeBridge=") + PROPERTY_VALUE_MAX];
+ char cpuAbiListBuf[sizeof("--cpu-abilist=") + PROPERTY_VALUE_MAX];
bool checkJni = false;
property_get("dalvik.vm.checkjni", propBuf, "");
@@ -597,9 +604,6 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
/* extended JNI checking */
addOption("-Xcheck:jni");
- /* set a cap on JNI global references */
- addOption("-Xjnigreflimit:2000");
-
/* with -Xcheck:jni, this provides a JNI function call trace */
//addOption("-verbose:jni");
}
@@ -615,30 +619,6 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
parseRuntimeOption("dalvik.vm.stack-trace-file", stackTraceFileBuf, "-Xstacktracefile:");
- property_get("dalvik.vm.check-dex-sum", propBuf, "");
- if (strcmp(propBuf, "true") == 0) {
- /* perform additional DEX checksum tests */
- addOption("-Xcheckdexsum");
- }
-
- property_get("log.redirect-stdio", propBuf, "");
- if (strcmp(propBuf, "true") == 0) {
- /* convert stdout/stderr to log messages */
- addOption("-Xlog-stdio");
- }
-
- strcpy(enableAssertBuf, "-ea:");
- property_get("dalvik.vm.enableassertions", enableAssertBuf+sizeof("-ea:")-1, "");
- if (enableAssertBuf[sizeof("-ea:")-1] != '\0') {
- /* accept "all" to mean "all classes and packages" */
- if (strcmp(enableAssertBuf+sizeof("-ea:")-1, "all") == 0)
- enableAssertBuf[3] = '\0'; // truncate to "-ea"
- ALOGI("Assertions enabled: '%s'\n", enableAssertBuf);
- addOption(enableAssertBuf);
- } else {
- ALOGV("Assertions disabled\n");
- }
-
strcpy(jniOptsBuf, "-Xjniopts:");
if (parseRuntimeOption("dalvik.vm.jniopts", jniOptsBuf, "-Xjniopts:")) {
ALOGI("JNI options: '%s'\n", jniOptsBuf);
@@ -665,14 +645,6 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
parseRuntimeOption("dalvik.vm.heapstartsize", heapstartsizeOptsBuf, "-Xms", "4m");
parseRuntimeOption("dalvik.vm.heapsize", heapsizeOptsBuf, "-Xmx", "16m");
- // Increase the main thread's interpreter stack size for bug 6315322.
- addOption("-XX:mainThreadStackSize=24K");
-
- // Set the max jit code cache size. Note: size of 0 will disable the JIT.
- parseRuntimeOption("dalvik.vm.jit.codecachesize",
- jitcodecachesizeOptsBuf,
- "-Xjitcodecachesize:");
-
parseRuntimeOption("dalvik.vm.heapgrowthlimit", heapgrowthlimitOptsBuf, "-XX:HeapGrowthLimit=");
parseRuntimeOption("dalvik.vm.heapminfree", heapminfreeOptsBuf, "-XX:HeapMinFree=");
parseRuntimeOption("dalvik.vm.heapmaxfree", heapmaxfreeOptsBuf, "-XX:HeapMaxFree=");
@@ -680,6 +652,13 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
heaptargetutilizationOptsBuf,
"-XX:HeapTargetUtilization=");
+ /*
+ * JIT related options.
+ */
+ parseRuntimeOption("dalvik.vm.usejit", usejitOptsBuf, "-Xusejit:");
+ parseRuntimeOption("dalvik.vm.jitcodecachesize", jitcodecachesizeOptsBuf, "-Xjitcodecachesize:");
+ parseRuntimeOption("dalvik.vm.jitthreshold", jitthresholdOptsBuf, "-Xjitthreshold:");
+
property_get("ro.config.low_ram", propBuf, "");
if (strcmp(propBuf, "true") == 0) {
addOption("-XX:LowMemoryMode");
@@ -688,53 +667,6 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
parseRuntimeOption("dalvik.vm.gctype", gctypeOptsBuf, "-Xgc:");
parseRuntimeOption("dalvik.vm.backgroundgctype", backgroundgcOptsBuf, "-XX:BackgroundGC=");
- /*
- * Enable or disable dexopt features, such as bytecode verification and
- * calculation of register maps for precise GC.
- */
- property_get("dalvik.vm.dexopt-flags", dexoptFlagsBuf, "");
- if (dexoptFlagsBuf[0] != '\0') {
- const char* opc;
- const char* val;
-
- opc = strstr(dexoptFlagsBuf, "v="); /* verification */
- if (opc != NULL) {
- switch (*(opc+2)) {
- case 'n': val = "-Xverify:none"; break;
- case 'r': val = "-Xverify:remote"; break;
- case 'a': val = "-Xverify:all"; break;
- default: val = NULL; break;
- }
-
- if (val != NULL) {
- addOption(val);
- }
- }
-
- opc = strstr(dexoptFlagsBuf, "o="); /* optimization */
- if (opc != NULL) {
- switch (*(opc+2)) {
- case 'n': val = "-Xdexopt:none"; break;
- case 'v': val = "-Xdexopt:verified"; break;
- case 'a': val = "-Xdexopt:all"; break;
- case 'f': val = "-Xdexopt:full"; break;
- default: val = NULL; break;
- }
-
- if (val != NULL) {
- addOption(val);
- }
- }
-
- opc = strstr(dexoptFlagsBuf, "m=y"); /* register map */
- if (opc != NULL) {
- addOption("-Xgenregmap");
-
- /* turn on precise GC while we're at it */
- addOption("-Xgc:precise");
- }
- }
-
/* enable debugging; set suspend=y to pause during VM init */
/* use android ADB transport */
addOption("-agentlib:jdwp=transport=dt_android_adb,suspend=n,server=y");
@@ -743,12 +675,6 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
lockProfThresholdBuf,
"-Xlockprofthreshold:");
- /* Force interpreter-only mode for selected opcodes. Eg "1-0a,3c,f1-ff" */
- parseRuntimeOption("dalvik.vm.jit.op", jitOpBuf, "-Xjitop:");
-
- /* Force interpreter-only mode for selected methods */
- parseRuntimeOption("dalvik.vm.jit.method", jitMethodBuf, "-Xjitmethod:");
-
if (executionMode == kEMIntPortable) {
addOption("-Xint:portable");
} else if (executionMode == kEMIntFast) {
@@ -757,145 +683,195 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
addOption("-Xint:jit");
}
- // libart tolerates libdvm flags, but not vice versa, so only pass some options if libart.
- property_get("persist.sys.dalvik.vm.lib.2", dalvikVmLibBuf, "libart.so");
- bool libart = (strncmp(dalvikVmLibBuf, "libart", 6) == 0);
-
- if (libart) {
- // If we booting without the real /data, don't spend time compiling.
- property_get("vold.decrypt", voldDecryptBuf, "");
- bool skip_compilation = ((strcmp(voldDecryptBuf, "trigger_restart_min_framework") == 0) ||
- (strcmp(voldDecryptBuf, "1") == 0));
-
- // Extra options for boot.art/boot.oat image generation.
- parseCompilerRuntimeOption("dalvik.vm.image-dex2oat-Xms", dex2oatXmsImageFlagsBuf,
- "-Xms", "-Ximage-compiler-option");
- parseCompilerRuntimeOption("dalvik.vm.image-dex2oat-Xmx", dex2oatXmxImageFlagsBuf,
- "-Xmx", "-Ximage-compiler-option");
- if (skip_compilation) {
- addOption("-Ximage-compiler-option");
- addOption("--compiler-filter=verify-none");
- } else {
- parseCompilerOption("dalvik.vm.image-dex2oat-filter", dex2oatImageCompilerFilterBuf,
- "--compiler-filter=", "-Ximage-compiler-option");
- }
-
- // Make sure there is a preloaded-classes file.
- if (!hasFile("/system/etc/preloaded-classes")) {
- ALOGE("Missing preloaded-classes file, /system/etc/preloaded-classes not found: %s\n",
- strerror(errno));
- goto bail;
- }
+ // If we are booting without the real /data, don't spend time compiling.
+ property_get("vold.decrypt", voldDecryptBuf, "");
+ bool skip_compilation = ((strcmp(voldDecryptBuf, "trigger_restart_min_framework") == 0) ||
+ (strcmp(voldDecryptBuf, "1") == 0));
+
+ // Extra options for boot.art/boot.oat image generation.
+ parseCompilerRuntimeOption("dalvik.vm.image-dex2oat-Xms", dex2oatXmsImageFlagsBuf,
+ "-Xms", "-Ximage-compiler-option");
+ parseCompilerRuntimeOption("dalvik.vm.image-dex2oat-Xmx", dex2oatXmxImageFlagsBuf,
+ "-Xmx", "-Ximage-compiler-option");
+ if (skip_compilation) {
addOption("-Ximage-compiler-option");
- addOption("--image-classes=/system/etc/preloaded-classes");
+ addOption("--compiler-filter=verify-none");
+ } else {
+ parseCompilerOption("dalvik.vm.image-dex2oat-filter", dex2oatImageCompilerFilterBuf,
+ "--compiler-filter=", "-Ximage-compiler-option");
+ }
- // If there is a compiled-classes file, push it.
- if (hasFile("/system/etc/compiled-classes")) {
- addOption("-Ximage-compiler-option");
- addOption("--compiled-classes=/system/etc/compiled-classes");
- }
+ // Make sure there is a preloaded-classes file.
+ if (!hasFile("/system/etc/preloaded-classes")) {
+ ALOGE("Missing preloaded-classes file, /system/etc/preloaded-classes not found: %s\n",
+ strerror(errno));
+ return -1;
+ }
+ addOption("-Ximage-compiler-option");
+ addOption("--image-classes=/system/etc/preloaded-classes");
- property_get("dalvik.vm.image-dex2oat-flags", dex2oatImageFlagsBuf, "");
- parseExtraOpts(dex2oatImageFlagsBuf, "-Ximage-compiler-option");
-
- // Extra options for DexClassLoader.
- parseCompilerRuntimeOption("dalvik.vm.dex2oat-Xms", dex2oatXmsFlagsBuf,
- "-Xms", "-Xcompiler-option");
- parseCompilerRuntimeOption("dalvik.vm.dex2oat-Xmx", dex2oatXmxFlagsBuf,
- "-Xmx", "-Xcompiler-option");
- if (skip_compilation) {
- addOption("-Xcompiler-option");
- addOption("--compiler-filter=verify-none");
- } else {
- parseCompilerOption("dalvik.vm.dex2oat-filter", dex2oatCompilerFilterBuf,
- "--compiler-filter=", "-Xcompiler-option");
- }
- property_get("dalvik.vm.dex2oat-flags", dex2oatFlagsBuf, "");
- parseExtraOpts(dex2oatFlagsBuf, "-Xcompiler-option");
+ // If there is a compiled-classes file, push it.
+ if (hasFile("/system/etc/compiled-classes")) {
+ addOption("-Ximage-compiler-option");
+ addOption("--compiled-classes=/system/etc/compiled-classes");
+ }
+ property_get("dalvik.vm.image-dex2oat-flags", dex2oatImageFlagsBuf, "");
+ parseExtraOpts(dex2oatImageFlagsBuf, "-Ximage-compiler-option");
+
+ // Extra options for DexClassLoader.
+ parseCompilerRuntimeOption("dalvik.vm.dex2oat-Xms", dex2oatXmsFlagsBuf,
+ "-Xms", "-Xcompiler-option");
+ parseCompilerRuntimeOption("dalvik.vm.dex2oat-Xmx", dex2oatXmxFlagsBuf,
+ "-Xmx", "-Xcompiler-option");
+ if (skip_compilation) {
+ addOption("-Xcompiler-option");
+ addOption("--compiler-filter=verify-none");
+
+ // We skip compilation when a minimal runtime is brought up for decryption. In that case
+ // /data is temporarily backed by a tmpfs, which is usually small.
+ // If the system image contains prebuilts, they will be relocated into the tmpfs. In this
+ // specific situation it is acceptable to *not* relocate and run out of the prebuilts
+ // directly instead.
+ addOption("--runtime-arg");
+ addOption("-Xnorelocate");
+ } else {
+ parseCompilerOption("dalvik.vm.dex2oat-filter", dex2oatCompilerFilterBuf,
+ "--compiler-filter=", "-Xcompiler-option");
}
parseCompilerOption("dalvik.vm.dex2oat-threads", dex2oatThreadsBuf, "-j", "-Xcompiler-option");
parseCompilerOption("dalvik.vm.image-dex2oat-threads", dex2oatThreadsImageBuf, "-j",
"-Ximage-compiler-option");
+ // The runtime will compile a boot image, when necessary, not using installd. Thus, we need to
+ // pass the instruction-set-features/variant as an image-compiler-option.
+ // TODO: Find a better way for the instruction-set.
+#if defined(__arm__)
+ constexpr const char* instruction_set = "arm";
+#elif defined(__aarch64__)
+ constexpr const char* instruction_set = "arm64";
+#elif defined(__mips__) && !defined(__LP64__)
+ constexpr const char* instruction_set = "mips";
+#elif defined(__mips__) && defined(__LP64__)
+ constexpr const char* instruction_set = "mips64";
+#elif defined(__i386__)
+ constexpr const char* instruction_set = "x86";
+#elif defined(__x86_64__)
+ constexpr const char* instruction_set = "x86_64";
+#else
+ constexpr const char* instruction_set = "unknown";
+#endif
+ // Note: it is OK to reuse the buffer, as the values are exactly the same between
+ // * compiler-option, used for runtime compilation (DexClassLoader)
+ // * image-compiler-option, used for boot-image compilation on device
+
+ // Copy the variant.
+ sprintf(dex2oat_isa_variant_key, "dalvik.vm.isa.%s.variant", instruction_set);
+ parseCompilerOption(dex2oat_isa_variant_key, dex2oat_isa_variant,
+ "--instruction-set-variant=", "-Ximage-compiler-option");
+ parseCompilerOption(dex2oat_isa_variant_key, dex2oat_isa_variant,
+ "--instruction-set-variant=", "-Xcompiler-option");
+ // Copy the features.
+ sprintf(dex2oat_isa_features_key, "dalvik.vm.isa.%s.features", instruction_set);
+ parseCompilerOption(dex2oat_isa_features_key, dex2oat_isa_features,
+ "--instruction-set-features=", "-Ximage-compiler-option");
+ parseCompilerOption(dex2oat_isa_features_key, dex2oat_isa_features,
+ "--instruction-set-features=", "-Xcompiler-option");
+
+
+ property_get("dalvik.vm.dex2oat-flags", dex2oatFlagsBuf, "");
+ parseExtraOpts(dex2oatFlagsBuf, "-Xcompiler-option");
+
/* extra options; parse this late so it overrides others */
property_get("dalvik.vm.extra-opts", extraOptsBuf, "");
parseExtraOpts(extraOptsBuf, NULL);
/* Set the properties for locale */
{
- strcpy(langOption, "-Duser.language=");
- strcpy(regionOption, "-Duser.region=");
- readLocale(langOption, regionOption);
- addOption(langOption);
- addOption(regionOption);
+ strcpy(localeOption, "-Duser.locale=");
+ readLocale(localeOption);
+ addOption(localeOption);
}
/*
* Set profiler options
*/
- if (libart) {
- // Whether or not the profiler should be enabled.
- property_get("dalvik.vm.profiler", propBuf, "0");
- if (propBuf[0] == '1') {
- addOption("-Xenable-profiler");
- }
+ // Whether or not the profiler should be enabled.
+ property_get("dalvik.vm.profiler", propBuf, "0");
+ if (propBuf[0] == '1') {
+ addOption("-Xenable-profiler");
+ }
- // Whether the profile should start upon app startup or be delayed by some random offset
- // (in seconds) that is bound between 0 and a fixed value.
- property_get("dalvik.vm.profile.start-immed", propBuf, "0");
- if (propBuf[0] == '1') {
- addOption("-Xprofile-start-immediately");
- }
+ // Whether the profile should start upon app startup or be delayed by some random offset
+ // (in seconds) that is bound between 0 and a fixed value.
+ property_get("dalvik.vm.profile.start-immed", propBuf, "0");
+ if (propBuf[0] == '1') {
+ addOption("-Xprofile-start-immediately");
+ }
- // Number of seconds during profile runs.
- parseRuntimeOption("dalvik.vm.profile.period-secs", profilePeriod, "-Xprofile-period:");
-
- // Length of each profile run (seconds).
- parseRuntimeOption("dalvik.vm.profile.duration-secs",
- profileDuration,
- "-Xprofile-duration:");
-
- // Polling interval during profile run (microseconds).
- parseRuntimeOption("dalvik.vm.profile.interval-us", profileInterval, "-Xprofile-interval:");
-
- // Coefficient for period backoff. The the period is multiplied
- // by this value after each profile run.
- parseRuntimeOption("dalvik.vm.profile.backoff-coeff", profileBackoff, "-Xprofile-backoff:");
-
- // Top K% of samples that are considered relevant when
- // deciding if the app should be recompiled.
- parseRuntimeOption("dalvik.vm.profile.top-k-thr",
- profileTopKThreshold,
- "-Xprofile-top-k-threshold:");
-
- // The threshold after which a change in the structure of the
- // top K% profiled samples becomes significant and triggers
- // recompilation. A change in profile is considered
- // significant if X% (top-k-change-threshold) of the top K%
- // (top-k-threshold property) samples has changed.
- parseRuntimeOption("dalvik.vm.profile.top-k-ch-thr",
- profileTopKChangeThreshold,
- "-Xprofile-top-k-change-threshold:");
-
- // Type of profile data.
- parseRuntimeOption("dalvik.vm.profiler.type", profileType, "-Xprofile-type:");
-
- // Depth of bounded stack data
- parseRuntimeOption("dalvik.vm.profile.stack-depth",
- profileMaxStackDepth,
- "-Xprofile-max-stack-depth:");
-
- // Native bridge library. "0" means that native bridge is disabled.
- property_get("ro.dalvik.vm.native.bridge", propBuf, "");
- if (propBuf[0] == '\0') {
- ALOGW("ro.dalvik.vm.native.bridge is not expected to be empty");
- } else if (strcmp(propBuf, "0") != 0) {
- snprintf(nativeBridgeLibrary, sizeof("-XX:NativeBridge=") + PROPERTY_VALUE_MAX,
- "-XX:NativeBridge=%s", propBuf);
- addOption(nativeBridgeLibrary);
- }
+ // Number of seconds during profile runs.
+ parseRuntimeOption("dalvik.vm.profile.period-secs", profilePeriod, "-Xprofile-period:");
+
+ // Length of each profile run (seconds).
+ parseRuntimeOption("dalvik.vm.profile.duration-secs",
+ profileDuration,
+ "-Xprofile-duration:");
+
+ // Polling interval during profile run (microseconds).
+ parseRuntimeOption("dalvik.vm.profile.interval-us", profileInterval, "-Xprofile-interval:");
+
+ // Coefficient for period backoff. The the period is multiplied
+ // by this value after each profile run.
+ parseRuntimeOption("dalvik.vm.profile.backoff-coeff", profileBackoff, "-Xprofile-backoff:");
+
+ // Top K% of samples that are considered relevant when
+ // deciding if the app should be recompiled.
+ parseRuntimeOption("dalvik.vm.profile.top-k-thr",
+ profileTopKThreshold,
+ "-Xprofile-top-k-threshold:");
+
+ // The threshold after which a change in the structure of the
+ // top K% profiled samples becomes significant and triggers
+ // recompilation. A change in profile is considered
+ // significant if X% (top-k-change-threshold) of the top K%
+ // (top-k-threshold property) samples has changed.
+ parseRuntimeOption("dalvik.vm.profile.top-k-ch-thr",
+ profileTopKChangeThreshold,
+ "-Xprofile-top-k-change-threshold:");
+
+ // Type of profile data.
+ parseRuntimeOption("dalvik.vm.profiler.type", profileType, "-Xprofile-type:");
+
+ // Depth of bounded stack data
+ parseRuntimeOption("dalvik.vm.profile.stack-depth",
+ profileMaxStackDepth,
+ "-Xprofile-max-stack-depth:");
+
+ // Native bridge library. "0" means that native bridge is disabled.
+ property_get("ro.dalvik.vm.native.bridge", propBuf, "");
+ if (propBuf[0] == '\0') {
+ ALOGW("ro.dalvik.vm.native.bridge is not expected to be empty");
+ } else if (strcmp(propBuf, "0") != 0) {
+ snprintf(nativeBridgeLibrary, sizeof("-XX:NativeBridge=") + PROPERTY_VALUE_MAX,
+ "-XX:NativeBridge=%s", propBuf);
+ addOption(nativeBridgeLibrary);
+ }
+
+ // Dalvik-cache pruning counter.
+ parseRuntimeOption("dalvik.vm.zygote.max-boot-retry", cachePruneBuf,
+ "-Xzygote-max-boot-retry=");
+#if defined(__LP64__)
+ const char* cpu_abilist_property_name = "ro.product.cpu.abilist64";
+#else
+ const char* cpu_abilist_property_name = "ro.product.cpu.abilist32";
+#endif // defined(__LP64__)
+ property_get(cpu_abilist_property_name, propBuf, "");
+ if (propBuf[0] == '\0') {
+ ALOGE("%s is not expected to be empty", cpu_abilist_property_name);
+ return -1;
}
+ snprintf(cpuAbiListBuf, sizeof(cpuAbiListBuf), "--cpu-abilist=%s", propBuf);
+ addOption(cpuAbiListBuf);
initArgs.version = JNI_VERSION_1_4;
initArgs.options = mOptions.editArray();
@@ -911,13 +887,10 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
*/
if (JNI_CreateJavaVM(pJavaVM, pEnv, &initArgs) < 0) {
ALOGE("JNI_CreateJavaVM failed\n");
- goto bail;
+ return -1;
}
- result = 0;
-
-bail:
- return result;
+ return 0;
}
char* AndroidRuntime::toSlashClassName(const char* className)
@@ -1242,19 +1215,11 @@ static int register_jni_procs(const RegJNIRec array[], size_t count, JNIEnv* env
return 0;
}
-static void register_jam_procs(const RegJAMProc array[], size_t count)
-{
- for (size_t i = 0; i < count; i++) {
- array[i]();
- }
-}
-
static const RegJNIRec gRegJNI[] = {
REG_JNI(register_com_android_internal_os_RuntimeInit),
REG_JNI(register_android_os_SystemClock),
REG_JNI(register_android_util_EventLog),
REG_JNI(register_android_util_Log),
- REG_JNI(register_android_util_FloatMath),
REG_JNI(register_android_content_AssetManager),
REG_JNI(register_android_content_StringBlock),
REG_JNI(register_android_content_XmlBlock),
@@ -1342,7 +1307,6 @@ static const RegJNIRec gRegJNI[] = {
REG_JNI(register_android_net_NetworkUtils),
REG_JNI(register_android_net_TrafficStats),
REG_JNI(register_android_os_MemoryFile),
- REG_JNI(register_com_android_internal_os_ZygoteInit),
REG_JNI(register_com_android_internal_os_Zygote),
REG_JNI(register_com_android_internal_util_VirtualRefBasePtr),
REG_JNI(register_android_hardware_Camera),
diff --git a/core/jni/android/graphics/AutoDecodeCancel.h b/core/jni/android/graphics/AutoDecodeCancel.h
index 37b86f9..dd6a0d4 100644
--- a/core/jni/android/graphics/AutoDecodeCancel.h
+++ b/core/jni/android/graphics/AutoDecodeCancel.h
@@ -1,5 +1,5 @@
-#ifndef AutoDecodeCancel_DEFINED
-#define AutoDecodeCancel_DEFINED
+#ifndef _ANDROID_GRAPHICS_AUTO_DECODE_CANCEL_H_
+#define _ANDROID_GRAPHICS_AUTO_DECODE_CANCEL_H_
#include <jni.h>
#include "SkImageDecoder.h"
@@ -24,4 +24,4 @@ private:
#endif
};
-#endif
+#endif // _ANDROID_GRAPHICS_AUTO_DECODE_CANCEL_H_
diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp
index 3079218..610bdc8 100755
--- a/core/jni/android/graphics/Bitmap.cpp
+++ b/core/jni/android/graphics/Bitmap.cpp
@@ -15,16 +15,12 @@
#include "android_nio_utils.h"
#include "CreateJavaOutputStreamAdaptor.h"
+#include "core_jni_helpers.h"
+
#include <jni.h>
#include <ResourceCache.h>
-#if 0
- #define TRACE_BITMAP(code) code
-#else
- #define TRACE_BITMAP(code)
-#endif
-
///////////////////////////////////////////////////////////////////////////////
// Conversions to/from SkColor, for get/setPixels, and the create method, which
// is basically like setPixels
@@ -43,8 +39,11 @@ static void FromColor_D32(void* dst, const SkColor src[], int width,
static void FromColor_D32_Raw(void* dst, const SkColor src[], int width,
int, int) {
+ // Needed to thwart the unreachable code detection from clang.
+ static const bool sk_color_ne_zero = SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER;
+
// SkColor's ordering may be different from SkPMColor
- if (SK_COLOR_MATCHES_PMCOLOR_BYTE_ORDER) {
+ if (sk_color_ne_zero) {
memcpy(dst, src, width * sizeof(SkColor));
return;
}
@@ -881,8 +880,6 @@ static void Bitmap_prepareToDraw(JNIEnv* env, jobject, jlong bitmapHandle) {
///////////////////////////////////////////////////////////////////////////////
-#include <android_runtime/AndroidRuntime.h>
-
static JNINativeMethod gBitmapMethods[] = {
{ "nativeCreate", "([IIIIIIZ)Landroid/graphics/Bitmap;",
(void*)Bitmap_creator },
@@ -922,10 +919,8 @@ static JNINativeMethod gBitmapMethods[] = {
{ "nativePrepareToDraw", "(J)V", (void*)Bitmap_prepareToDraw },
};
-#define kClassPathName "android/graphics/Bitmap"
-
int register_android_graphics_Bitmap(JNIEnv* env)
{
- return android::AndroidRuntime::registerNativeMethods(env, kClassPathName,
- gBitmapMethods, SK_ARRAY_COUNT(gBitmapMethods));
+ return android::RegisterMethodsOrDie(env, "android/graphics/Bitmap", gBitmapMethods,
+ NELEM(gBitmapMethods));
}
diff --git a/core/jni/android/graphics/BitmapFactory.cpp b/core/jni/android/graphics/BitmapFactory.cpp
index 49577cf..e346fc3 100644
--- a/core/jni/android/graphics/BitmapFactory.cpp
+++ b/core/jni/android/graphics/BitmapFactory.cpp
@@ -15,7 +15,7 @@
#include "JNIHelp.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <androidfw/Asset.h>
#include <androidfw/ResourceTypes.h>
#include <cutils/compiler.h>
@@ -49,12 +49,6 @@ jmethodID gInsetStruct_constructorMethodID;
using namespace android;
-static inline int32_t validOrNeg1(bool isValid, int32_t value) {
-// return isValid ? value : -1;
- SkASSERT((int)isValid == 0 || (int)isValid == 1);
- return ((int32_t)isValid - 1) | value;
-}
-
jstring getMimeTypeString(JNIEnv* env, SkImageDecoder::Format format) {
static const struct {
SkImageDecoder::Format fFormat;
@@ -69,7 +63,7 @@ jstring getMimeTypeString(JNIEnv* env, SkImageDecoder::Format format) {
{ SkImageDecoder::kWBMP_Format, "image/vnd.wap.wbmp" }
};
- const char* cstr = NULL;
+ const char* cstr = nullptr;
for (size_t i = 0; i < SK_ARRAY_COUNT(gMimeTypes); i++) {
if (gMimeTypes[i].fFormat == format) {
cstr = gMimeTypes[i].fMimeType;
@@ -77,10 +71,10 @@ jstring getMimeTypeString(JNIEnv* env, SkImageDecoder::Format format) {
}
}
- jstring jstr = NULL;
- if (cstr != NULL) {
+ jstring jstr = nullptr;
+ if (cstr != nullptr) {
// NOTE: Caller should env->ExceptionCheck() for OOM
- // (can't check for NULL as it's a valid return value)
+ // (can't check for nullptr as it's a valid return value)
jstr = env->NewStringUTF(cstr);
}
return jstr;
@@ -187,8 +181,8 @@ public:
const size_t size = sk_64_asS32(size64);
if (size > mSize) {
- ALOGW("bitmap marked for reuse (%d bytes) can't fit new bitmap (%d bytes)",
- mSize, size);
+ ALOGW("bitmap marked for reuse (%u bytes) can't fit new bitmap "
+ "(%zu bytes)", mSize, size);
return false;
}
@@ -585,52 +579,40 @@ static JNINativeMethod gOptionsMethods[] = {
{ "requestCancel", "()V", (void*)nativeRequestCancel }
};
-static jfieldID getFieldIDCheck(JNIEnv* env, jclass clazz,
- const char fieldname[], const char type[]) {
- jfieldID id = env->GetFieldID(clazz, fieldname, type);
- SkASSERT(id);
- return id;
-}
-
int register_android_graphics_BitmapFactory(JNIEnv* env) {
- jclass options_class = env->FindClass("android/graphics/BitmapFactory$Options");
- SkASSERT(options_class);
- gOptions_bitmapFieldID = getFieldIDCheck(env, options_class, "inBitmap",
+ jclass options_class = FindClassOrDie(env, "android/graphics/BitmapFactory$Options");
+ gOptions_bitmapFieldID = GetFieldIDOrDie(env, options_class, "inBitmap",
"Landroid/graphics/Bitmap;");
- gOptions_justBoundsFieldID = getFieldIDCheck(env, options_class, "inJustDecodeBounds", "Z");
- gOptions_sampleSizeFieldID = getFieldIDCheck(env, options_class, "inSampleSize", "I");
- gOptions_configFieldID = getFieldIDCheck(env, options_class, "inPreferredConfig",
+ gOptions_justBoundsFieldID = GetFieldIDOrDie(env, options_class, "inJustDecodeBounds", "Z");
+ gOptions_sampleSizeFieldID = GetFieldIDOrDie(env, options_class, "inSampleSize", "I");
+ gOptions_configFieldID = GetFieldIDOrDie(env, options_class, "inPreferredConfig",
"Landroid/graphics/Bitmap$Config;");
- gOptions_premultipliedFieldID = getFieldIDCheck(env, options_class, "inPremultiplied", "Z");
- gOptions_mutableFieldID = getFieldIDCheck(env, options_class, "inMutable", "Z");
- gOptions_ditherFieldID = getFieldIDCheck(env, options_class, "inDither", "Z");
- gOptions_preferQualityOverSpeedFieldID = getFieldIDCheck(env, options_class,
+ gOptions_premultipliedFieldID = GetFieldIDOrDie(env, options_class, "inPremultiplied", "Z");
+ gOptions_mutableFieldID = GetFieldIDOrDie(env, options_class, "inMutable", "Z");
+ gOptions_ditherFieldID = GetFieldIDOrDie(env, options_class, "inDither", "Z");
+ gOptions_preferQualityOverSpeedFieldID = GetFieldIDOrDie(env, options_class,
"inPreferQualityOverSpeed", "Z");
- gOptions_scaledFieldID = getFieldIDCheck(env, options_class, "inScaled", "Z");
- gOptions_densityFieldID = getFieldIDCheck(env, options_class, "inDensity", "I");
- gOptions_screenDensityFieldID = getFieldIDCheck(env, options_class, "inScreenDensity", "I");
- gOptions_targetDensityFieldID = getFieldIDCheck(env, options_class, "inTargetDensity", "I");
- gOptions_widthFieldID = getFieldIDCheck(env, options_class, "outWidth", "I");
- gOptions_heightFieldID = getFieldIDCheck(env, options_class, "outHeight", "I");
- gOptions_mimeFieldID = getFieldIDCheck(env, options_class, "outMimeType", "Ljava/lang/String;");
- gOptions_mCancelID = getFieldIDCheck(env, options_class, "mCancel", "Z");
-
- jclass bitmap_class = env->FindClass("android/graphics/Bitmap");
- SkASSERT(bitmap_class);
- gBitmap_nativeBitmapFieldID = getFieldIDCheck(env, bitmap_class, "mNativeBitmap", "J");
- gBitmap_ninePatchInsetsFieldID = getFieldIDCheck(env, bitmap_class, "mNinePatchInsets",
+ gOptions_scaledFieldID = GetFieldIDOrDie(env, options_class, "inScaled", "Z");
+ gOptions_densityFieldID = GetFieldIDOrDie(env, options_class, "inDensity", "I");
+ gOptions_screenDensityFieldID = GetFieldIDOrDie(env, options_class, "inScreenDensity", "I");
+ gOptions_targetDensityFieldID = GetFieldIDOrDie(env, options_class, "inTargetDensity", "I");
+ gOptions_widthFieldID = GetFieldIDOrDie(env, options_class, "outWidth", "I");
+ gOptions_heightFieldID = GetFieldIDOrDie(env, options_class, "outHeight", "I");
+ gOptions_mimeFieldID = GetFieldIDOrDie(env, options_class, "outMimeType", "Ljava/lang/String;");
+ gOptions_mCancelID = GetFieldIDOrDie(env, options_class, "mCancel", "Z");
+
+ jclass bitmap_class = FindClassOrDie(env, "android/graphics/Bitmap");
+ gBitmap_nativeBitmapFieldID = GetFieldIDOrDie(env, bitmap_class, "mNativeBitmap", "J");
+ gBitmap_ninePatchInsetsFieldID = GetFieldIDOrDie(env, bitmap_class, "mNinePatchInsets",
"Landroid/graphics/NinePatch$InsetStruct;");
- gInsetStruct_class = (jclass) env->NewGlobalRef(env->FindClass("android/graphics/NinePatch$InsetStruct"));
- gInsetStruct_constructorMethodID = env->GetMethodID(gInsetStruct_class, "<init>", "(IIIIIIIIFIF)V");
+ gInsetStruct_class = MakeGlobalRefOrDie(env, FindClassOrDie(env,
+ "android/graphics/NinePatch$InsetStruct"));
+ gInsetStruct_constructorMethodID = GetMethodIDOrDie(env, gInsetStruct_class, "<init>",
+ "(IIIIIIIIFIF)V");
- int ret = AndroidRuntime::registerNativeMethods(env,
- "android/graphics/BitmapFactory$Options",
- gOptionsMethods,
- SK_ARRAY_COUNT(gOptionsMethods));
- if (ret) {
- return ret;
- }
- return android::AndroidRuntime::registerNativeMethods(env, "android/graphics/BitmapFactory",
- gMethods, SK_ARRAY_COUNT(gMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/BitmapFactory$Options",
+ gOptionsMethods, NELEM(gOptionsMethods));
+ return android::RegisterMethodsOrDie(env, "android/graphics/BitmapFactory",
+ gMethods, NELEM(gMethods));
}
diff --git a/core/jni/android/graphics/BitmapFactory.h b/core/jni/android/graphics/BitmapFactory.h
index 97dcc6d..a54da43 100644
--- a/core/jni/android/graphics/BitmapFactory.h
+++ b/core/jni/android/graphics/BitmapFactory.h
@@ -1,5 +1,5 @@
-#ifndef BitmapFactory_DEFINE
-#define BitmapFactory_DEFINE
+#ifndef _ANDROID_GRAPHICS_BITMAP_FACTORY_H_
+#define _ANDROID_GRAPHICS_BITMAP_FACTORY_H_
#include "GraphicsJNI.h"
@@ -21,4 +21,4 @@ extern jfieldID gOptions_bitmapFieldID;
jstring getMimeTypeString(JNIEnv* env, SkImageDecoder::Format format);
-#endif
+#endif // _ANDROID_GRAPHICS_BITMAP_FACTORY_H_
diff --git a/core/jni/android/graphics/BitmapRegionDecoder.cpp b/core/jni/android/graphics/BitmapRegionDecoder.cpp
index 6633261..90a7f69 100644
--- a/core/jni/android/graphics/BitmapRegionDecoder.cpp
+++ b/core/jni/android/graphics/BitmapRegionDecoder.cpp
@@ -30,7 +30,7 @@
#include "Utils.h"
#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "android_util_Binder.h"
#include "android_nio_utils.h"
#include "CreateJavaOutputStreamAdaptor.h"
@@ -40,12 +40,6 @@
#include <androidfw/Asset.h>
#include <sys/stat.h>
-#if 0
- #define TRACE_BITMAP(code) code
-#else
- #define TRACE_BITMAP(code)
-#endif
-
using namespace android;
class SkBitmapRegionDecoder {
@@ -274,8 +268,6 @@ static void nativeClean(JNIEnv* env, jobject, jlong brdHandle) {
///////////////////////////////////////////////////////////////////////////////
-#include <android_runtime/AndroidRuntime.h>
-
static JNINativeMethod gBitmapRegionDecoderMethods[] = {
{ "nativeDecodeRegion",
"(JIIIILandroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;",
@@ -308,10 +300,8 @@ static JNINativeMethod gBitmapRegionDecoderMethods[] = {
},
};
-#define kClassPathName "android/graphics/BitmapRegionDecoder"
-
int register_android_graphics_BitmapRegionDecoder(JNIEnv* env)
{
- return android::AndroidRuntime::registerNativeMethods(env, kClassPathName,
- gBitmapRegionDecoderMethods, SK_ARRAY_COUNT(gBitmapRegionDecoderMethods));
+ return android::RegisterMethodsOrDie(env, "android/graphics/BitmapRegionDecoder",
+ gBitmapRegionDecoderMethods, NELEM(gBitmapRegionDecoderMethods));
}
diff --git a/core/jni/android/graphics/Camera.cpp b/core/jni/android/graphics/Camera.cpp
index 9f832b0..b572604 100644
--- a/core/jni/android/graphics/Camera.cpp
+++ b/core/jni/android/graphics/Camera.cpp
@@ -1,5 +1,5 @@
#include "jni.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "SkCamera.h"
@@ -137,16 +137,8 @@ static JNINativeMethod gCameraMethods[] = {
};
int register_android_graphics_Camera(JNIEnv* env) {
- jclass clazz = env->FindClass("android/graphics/Camera");
- if (clazz == 0) {
- return -1;
- }
- gNativeInstanceFieldID = env->GetFieldID(clazz, "native_instance", "J");
- if (gNativeInstanceFieldID == 0) {
- return -1;
- }
- return android::AndroidRuntime::registerNativeMethods(env,
- "android/graphics/Camera",
- gCameraMethods,
- SK_ARRAY_COUNT(gCameraMethods));
+ jclass clazz = android::FindClassOrDie(env, "android/graphics/Camera");
+ gNativeInstanceFieldID = android::GetFieldIDOrDie(env, clazz, "native_instance", "J");
+ return android::RegisterMethodsOrDie(env, "android/graphics/Camera", gCameraMethods,
+ NELEM(gCameraMethods));
}
diff --git a/core/jni/android/graphics/CanvasProperty.cpp b/core/jni/android/graphics/CanvasProperty.cpp
index e63c5fa..a69a457 100644
--- a/core/jni/android/graphics/CanvasProperty.cpp
+++ b/core/jni/android/graphics/CanvasProperty.cpp
@@ -17,16 +17,20 @@
#include "jni.h"
#include "GraphicsJNI.h"
#include "Paint.h"
-#include <android_runtime/AndroidRuntime.h>
+#include <core_jni_helpers.h>
#include <utils/RefBase.h>
#include <CanvasProperty.h>
namespace android {
-using namespace uirenderer;
-
#ifdef USE_OPENGL_RENDERER
+static const bool kUseOpenGLRenderer = true;
+#else
+static const bool kUseOpenGLRenderer = false;
+#endif
+
+using namespace uirenderer;
static jlong createFloat(JNIEnv* env, jobject clazz, jfloat initialValue) {
return reinterpret_cast<jlong>(new CanvasPropertyPrimitive(initialValue));
@@ -37,23 +41,21 @@ static jlong createPaint(JNIEnv* env, jobject clazz, jlong paintPtr) {
return reinterpret_cast<jlong>(new CanvasPropertyPaint(*paint));
}
-#endif
-
// ----------------------------------------------------------------------------
// JNI Glue
// ----------------------------------------------------------------------------
-const char* const kClassPathName = "android/graphics/CanvasProperty";
-
static JNINativeMethod gMethods[] = {
-#ifdef USE_OPENGL_RENDERER
{ "nCreateFloat", "(F)J", (void*) createFloat },
{ "nCreatePaint", "(J)J", (void*) createPaint },
-#endif
};
int register_android_graphics_CanvasProperty(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ if (kUseOpenGLRenderer) {
+ return RegisterMethodsOrDie(env, "android/graphics/CanvasProperty", gMethods,
+ NELEM(gMethods));
+ }
+ return 0;
}
}; // namespace android
diff --git a/core/jni/android/graphics/ColorFilter.cpp b/core/jni/android/graphics/ColorFilter.cpp
index c66c844..026cbee 100644
--- a/core/jni/android/graphics/ColorFilter.cpp
+++ b/core/jni/android/graphics/ColorFilter.cpp
@@ -17,7 +17,7 @@
#include "jni.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "SkColorFilter.h"
#include "SkColorMatrixFilter.h"
@@ -74,18 +74,15 @@ static JNINativeMethod colormatrix_methods[] = {
{ "nativeColorMatrixFilter", "([F)J", (void*) SkColorFilterGlue::CreateColorMatrixFilter },
};
-#define REG(env, name, array) \
- result = android::AndroidRuntime::registerNativeMethods(env, name, array, \
- SK_ARRAY_COUNT(array)); \
- if (result < 0) return result
-
int register_android_graphics_ColorFilter(JNIEnv* env) {
- int result;
-
- REG(env, "android/graphics/ColorFilter", colorfilter_methods);
- REG(env, "android/graphics/PorterDuffColorFilter", porterduff_methods);
- REG(env, "android/graphics/LightingColorFilter", lighting_methods);
- REG(env, "android/graphics/ColorMatrixColorFilter", colormatrix_methods);
+ android::RegisterMethodsOrDie(env, "android/graphics/ColorFilter", colorfilter_methods,
+ NELEM(colorfilter_methods));
+ android::RegisterMethodsOrDie(env, "android/graphics/PorterDuffColorFilter", porterduff_methods,
+ NELEM(porterduff_methods));
+ android::RegisterMethodsOrDie(env, "android/graphics/LightingColorFilter", lighting_methods,
+ NELEM(lighting_methods));
+ android::RegisterMethodsOrDie(env, "android/graphics/ColorMatrixColorFilter",
+ colormatrix_methods, NELEM(colormatrix_methods));
return 0;
}
diff --git a/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp b/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp
index a67740c..7937941 100644
--- a/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp
+++ b/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.cpp
@@ -24,7 +24,6 @@ public:
}
virtual size_t read(void* buffer, size_t size) {
- JNIEnv* env = fEnv;
if (NULL == buffer) {
if (0 == size) {
return 0;
diff --git a/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.h b/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.h
index ecd270f..56cba51 100644
--- a/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.h
+++ b/core/jni/android/graphics/CreateJavaOutputStreamAdaptor.h
@@ -1,5 +1,5 @@
-#ifndef CreateJavaOutputStream_DEFINED
-#define CreateJavaOutputStream_DEFINED
+#ifndef _ANDROID_GRAPHICS_CREATE_JAVA_OUTPUT_STREAM_ADAPTOR_H_
+#define _ANDROID_GRAPHICS_CREATE_JAVA_OUTPUT_STREAM_ADAPTOR_H_
//#include <android_runtime/AndroidRuntime.h>
#include "jni.h"
@@ -38,4 +38,5 @@ SkStreamRewindable* CopyJavaInputStream(JNIEnv* env, jobject stream,
SkWStream* CreateJavaOutputStreamAdaptor(JNIEnv* env, jobject stream,
jbyteArray storage);
-#endif
+
+#endif // _ANDROID_GRAPHICS_CREATE_JAVA_OUTPUT_STREAM_ADAPTOR_H_
diff --git a/core/jni/android/graphics/DrawFilter.cpp b/core/jni/android/graphics/DrawFilter.cpp
index 3275875..bac124f 100644
--- a/core/jni/android/graphics/DrawFilter.cpp
+++ b/core/jni/android/graphics/DrawFilter.cpp
@@ -24,6 +24,8 @@
#include "GraphicsJNI.h"
#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
+
#include "SkDrawFilter.h"
#include "SkPaintFlagsDrawFilter.h"
#include "SkPaint.h"
@@ -103,16 +105,11 @@ static JNINativeMethod paintflags_methods[] = {
{"nativeConstructor","(II)J", (void*) SkDrawFilterGlue::CreatePaintFlagsDF}
};
-#define REG(env, name, array) \
- result = android::AndroidRuntime::registerNativeMethods(env, name, array, SK_ARRAY_COUNT(array)); \
- if (result < 0) return result
-
-
int register_android_graphics_DrawFilter(JNIEnv* env) {
- int result;
-
- REG(env, "android/graphics/DrawFilter", drawfilter_methods);
- REG(env, "android/graphics/PaintFlagsDrawFilter", paintflags_methods);
+ int result = RegisterMethodsOrDie(env, "android/graphics/DrawFilter", drawfilter_methods,
+ NELEM(drawfilter_methods));
+ result |= RegisterMethodsOrDie(env, "android/graphics/PaintFlagsDrawFilter", paintflags_methods,
+ NELEM(paintflags_methods));
return 0;
}
diff --git a/core/jni/android/graphics/FontFamily.cpp b/core/jni/android/graphics/FontFamily.cpp
index bfb30b7..8a85d62 100644
--- a/core/jni/android/graphics/FontFamily.cpp
+++ b/core/jni/android/graphics/FontFamily.cpp
@@ -17,7 +17,7 @@
#define LOG_TAG "Minikin"
#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
+#include <core_jni_helpers.h>
#include "SkTypeface.h"
#include "GraphicsJNI.h"
@@ -125,9 +125,8 @@ static JNINativeMethod gFontFamilyMethods[] = {
int register_android_graphics_FontFamily(JNIEnv* env)
{
- return android::AndroidRuntime::registerNativeMethods(env,
- "android/graphics/FontFamily",
- gFontFamilyMethods, NELEM(gFontFamilyMethods));
+ return RegisterMethodsOrDie(env, "android/graphics/FontFamily", gFontFamilyMethods,
+ NELEM(gFontFamilyMethods));
}
}
diff --git a/core/jni/android/graphics/Graphics.cpp b/core/jni/android/graphics/Graphics.cpp
index 3ea9b58..a51af40 100644
--- a/core/jni/android/graphics/Graphics.cpp
+++ b/core/jni/android/graphics/Graphics.cpp
@@ -536,12 +536,7 @@ jbyteArray GraphicsJNI::allocateJavaPixelRef(JNIEnv* env, SkBitmap* bitmap,
return NULL;
}
- const int64_t size64 = bitmap->computeSize64();
- if (!sk_64_isS32(size64)) {
- doThrowIAE(env, "bitmap size exceeds 32 bits");
- return NULL;
- }
- const size_t size = sk_64_asS32(size64);
+ const size_t size = bitmap->getSize();
jbyteArray arrayObj = (jbyteArray) env->CallObjectMethod(gVMRuntime,
gVMRuntime_newNonMovableArray,
gByte_class, size);
diff --git a/core/jni/android/graphics/GraphicsJNI.h b/core/jni/android/graphics/GraphicsJNI.h
index 42973ba..a48b764 100644
--- a/core/jni/android/graphics/GraphicsJNI.h
+++ b/core/jni/android/graphics/GraphicsJNI.h
@@ -1,5 +1,5 @@
-#ifndef GraphicsJNI_DEFINED
-#define GraphicsJNI_DEFINED
+#ifndef _ANDROID_GRAPHICS_GRAPHICS_JNI_H_
+#define _ANDROID_GRAPHICS_GRAPHICS_JNI_H_
#include "SkBitmap.h"
#include "SkDevice.h"
@@ -15,7 +15,7 @@ class SkCanvas;
namespace android {
class Paint;
-class TypefaceImpl;
+struct TypefaceImpl;
}
class GraphicsJNI {
@@ -160,7 +160,6 @@ public:
private:
JavaVM* fVM;
- bool fAllocateInJavaHeap;
jbyteArray fStorageObj;
int fAllocCount;
};
@@ -248,4 +247,4 @@ void doThrowIOE(JNIEnv* env, const char* msg = NULL); // IO Exception
#define NPE_CHECK_RETURN_VOID(env, object) \
do { if (NULL == (object)) { doThrowNPE(env); return; } } while (0)
-#endif
+#endif // _ANDROID_GRAPHICS_GRAPHICS_JNI_H_
diff --git a/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp b/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp
index a75efcf..ca3a42f 100644
--- a/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp
+++ b/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp
@@ -44,6 +44,8 @@
namespace android {
+static const bool kDebugGlyphs = false;
+
// Our implementation of the callbacks which Harfbuzz requires by using Skia
// calls. See the Harfbuzz source for references about what these callbacks do.
@@ -62,9 +64,9 @@ static void SkiaGetGlyphWidthAndExtents(SkPaint* paint, hb_codepoint_t codepoint
uint16_t glyph = codepoint;
paint->getTextWidths(&glyph, sizeof(glyph), &skWidth, &skBounds);
-#if DEBUG_GLYPHS
- ALOGD("returned glyph for %i: width = %f", codepoint, skWidth);
-#endif
+ if (kDebugGlyphs) {
+ ALOGD("returned glyph for %i: width = %f", codepoint, skWidth);
+ }
if (width)
*width = SkScalarToHBFixed(skWidth);
if (extents) {
diff --git a/core/jni/android/graphics/HarfBuzzNGFaceSkia.h b/core/jni/android/graphics/HarfBuzzNGFaceSkia.h
index 7b71ecc..3308d5d 100644
--- a/core/jni/android/graphics/HarfBuzzNGFaceSkia.h
+++ b/core/jni/android/graphics/HarfBuzzNGFaceSkia.h
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HarfBuzzNGFaceSkia_h
-#define HarfBuzzNGFaceSkia_h
+#ifndef _ANDROID_GRAPHICS_HARF_BUZZ_NG_FACE_SKIA_H_
+#define _ANDROID_GRAPHICS_HARF_BUZZ_NG_FACE_SKIA_H_
#include <SkScalar.h>
#include <SkPaint.h>
@@ -56,4 +56,4 @@ hb_font_t* createFont(hb_face_t* face, SkPaint* paint, float sizeX, float sizeY)
} // namespace android
-#endif
+#endif // _ANDROID_GRAPHICS_HARF_BUZZ_NG_FACE_SKIA_H_
diff --git a/core/jni/android/graphics/Interpolator.cpp b/core/jni/android/graphics/Interpolator.cpp
index 455f867..f7f3511 100644
--- a/core/jni/android/graphics/Interpolator.cpp
+++ b/core/jni/android/graphics/Interpolator.cpp
@@ -1,5 +1,5 @@
#include "jni.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "GraphicsJNI.h"
#include "SkInterpolator.h"
@@ -83,8 +83,6 @@ static JNINativeMethod gInterpolatorMethods[] = {
int register_android_graphics_Interpolator(JNIEnv* env)
{
- return android::AndroidRuntime::registerNativeMethods(env,
- "android/graphics/Interpolator",
- gInterpolatorMethods,
- SK_ARRAY_COUNT(gInterpolatorMethods));
+ return android::RegisterMethodsOrDie(env, "android/graphics/Interpolator",
+ gInterpolatorMethods, NELEM(gInterpolatorMethods));
}
diff --git a/core/jni/android/graphics/MaskFilter.cpp b/core/jni/android/graphics/MaskFilter.cpp
index b394905..d658643 100644
--- a/core/jni/android/graphics/MaskFilter.cpp
+++ b/core/jni/android/graphics/MaskFilter.cpp
@@ -4,6 +4,8 @@
#include "SkBlurMaskFilter.h"
#include "SkTableMaskFilter.h"
+#include "core_jni_helpers.h"
+
#include <jni.h>
static void ThrowIAE_IfNull(JNIEnv* env, void* ptr) {
@@ -77,20 +79,16 @@ static JNINativeMethod gTableMaskFilterMethods[] = {
{ "nativeNewGamma", "(F)J", (void*)SkMaskFilterGlue::createGammaTable }
};
-#include <android_runtime/AndroidRuntime.h>
-
-#define REG(env, name, array) \
- result = android::AndroidRuntime::registerNativeMethods(env, name, array, SK_ARRAY_COUNT(array)); \
- if (result < 0) return result
-
int register_android_graphics_MaskFilter(JNIEnv* env)
{
- int result;
-
- REG(env, "android/graphics/MaskFilter", gMaskFilterMethods);
- REG(env, "android/graphics/BlurMaskFilter", gBlurMaskFilterMethods);
- REG(env, "android/graphics/EmbossMaskFilter", gEmbossMaskFilterMethods);
- REG(env, "android/graphics/TableMaskFilter", gTableMaskFilterMethods);
+ android::RegisterMethodsOrDie(env, "android/graphics/MaskFilter", gMaskFilterMethods,
+ NELEM(gMaskFilterMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/BlurMaskFilter", gBlurMaskFilterMethods,
+ NELEM(gBlurMaskFilterMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/EmbossMaskFilter",
+ gEmbossMaskFilterMethods, NELEM(gEmbossMaskFilterMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/TableMaskFilter", gTableMaskFilterMethods,
+ NELEM(gTableMaskFilterMethods));
return 0;
}
diff --git a/core/jni/android/graphics/Matrix.cpp b/core/jni/android/graphics/Matrix.cpp
index 01ab699..0ff7c78 100644
--- a/core/jni/android/graphics/Matrix.cpp
+++ b/core/jni/android/graphics/Matrix.cpp
@@ -17,7 +17,7 @@
#include "jni.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include <core_jni_helpers.h>
#include "SkMatrix.h"
#include "SkTemplates.h"
@@ -354,11 +354,10 @@ static JNINativeMethod methods[] = {
static jfieldID sNativeInstanceField;
int register_android_graphics_Matrix(JNIEnv* env) {
- int result = AndroidRuntime::registerNativeMethods(env, "android/graphics/Matrix", methods,
- sizeof(methods) / sizeof(methods[0]));
+ int result = RegisterMethodsOrDie(env, "android/graphics/Matrix", methods, NELEM(methods));
- jclass clazz = env->FindClass("android/graphics/Matrix");
- sNativeInstanceField = env->GetFieldID(clazz, "native_instance", "J");
+ jclass clazz = FindClassOrDie(env, "android/graphics/Matrix");
+ sNativeInstanceField = GetFieldIDOrDie(env, clazz, "native_instance", "J");
return result;
}
diff --git a/core/jni/android/graphics/Matrix.h b/core/jni/android/graphics/Matrix.h
index 31edf88..11c9e72 100644
--- a/core/jni/android/graphics/Matrix.h
+++ b/core/jni/android/graphics/Matrix.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef _ANDROID_GRAPHICS_MATRIX_H
-#define _ANDROID_GRAPHICS_MATRIX_H
+#ifndef _ANDROID_GRAPHICS_MATRIX_H_
+#define _ANDROID_GRAPHICS_MATRIX_H_
#include "jni.h"
#include "SkMatrix.h"
@@ -27,4 +27,4 @@ extern SkMatrix* android_graphics_Matrix_getSkMatrix(JNIEnv* env, jobject matrix
} // namespace android
-#endif // _ANDROID_GRAPHICS_MATRIX_H
+#endif // _ANDROID_GRAPHICS_MATRIX_H_
diff --git a/core/jni/android/graphics/MinikinSkia.h b/core/jni/android/graphics/MinikinSkia.h
index 255617e..a06428d 100644
--- a/core/jni/android/graphics/MinikinSkia.h
+++ b/core/jni/android/graphics/MinikinSkia.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_MINIKIN_SKIA_H
-#define ANDROID_MINIKIN_SKIA_H
+#ifndef _ANDROID_GRAPHICS_MINIKIN_SKIA_H_
+#define _ANDROID_GRAPHICS_MINIKIN_SKIA_H_
#include <minikin/MinikinFont.h>
@@ -54,4 +54,4 @@ private:
} // namespace android
-#endif // ANDROID_MINIKIN_SKIA_H \ No newline at end of file
+#endif // _ANDROID_GRAPHICS_MINIKIN_SKIA_H_ \ No newline at end of file
diff --git a/core/jni/android/graphics/MinikinUtils.cpp b/core/jni/android/graphics/MinikinUtils.cpp
index f64ad7d..7dabf6b 100644
--- a/core/jni/android/graphics/MinikinUtils.cpp
+++ b/core/jni/android/graphics/MinikinUtils.cpp
@@ -26,18 +26,6 @@
namespace android {
-// Do an sprintf starting at offset n, abort on overflow
-static int snprintfcat(char* buf, int off, int size, const char* format, ...)
- __attribute__((__format__(__printf__, 4, 5)));
-static int snprintfcat(char* buf, int off, int size, const char* format, ...) {
- va_list args;
- va_start(args, format);
- int n = vsnprintf(buf + off, size - off, format, args);
- LOG_ALWAYS_FATAL_IF(n >= size - off, "String overflow in setting layout properties");
- va_end(args);
- return off + n;
-}
-
void MinikinUtils::doLayout(Layout* layout, const Paint* paint, int bidiFlags, TypefaceImpl* typeface,
const uint16_t* buf, size_t start, size_t count, size_t bufSize) {
TypefaceImpl* resolvedFace = TypefaceImpl_resolveDefault(typeface);
diff --git a/core/jni/android/graphics/MinikinUtils.h b/core/jni/android/graphics/MinikinUtils.h
index 3646c1a..236f1fd 100644
--- a/core/jni/android/graphics/MinikinUtils.h
+++ b/core/jni/android/graphics/MinikinUtils.h
@@ -21,8 +21,8 @@
// TODO: does this really need to be separate from MinikinSkia?
-#ifndef ANDROID_MINIKIN_UTILS_H
-#define ANDROID_MINIKIN_UTILS_H
+#ifndef _ANDROID_GRAPHICS_MINIKIN_UTILS_H_
+#define _ANDROID_GRAPHICS_MINIKIN_UTILS_H_
#include <minikin/Layout.h>
#include "Paint.h"
@@ -81,4 +81,4 @@ public:
} // namespace android
-#endif // ANDROID_MINIKIN_UTILS_H
+#endif // _ANDROID_GRAPHICS_MINIKIN_UTILS_H_
diff --git a/core/jni/android/graphics/Movie.cpp b/core/jni/android/graphics/Movie.cpp
index 226f83e..b25fa84 100644
--- a/core/jni/android/graphics/Movie.cpp
+++ b/core/jni/android/graphics/Movie.cpp
@@ -13,11 +13,7 @@
#include <androidfw/ResourceTypes.h>
#include <netinet/in.h>
-#if 0
- #define TRACE_BITMAP(code) code
-#else
- #define TRACE_BITMAP(code)
-#endif
+#include "core_jni_helpers.h"
static jclass gMovie_class;
static jmethodID gMovie_constructorMethodID;
@@ -138,8 +134,6 @@ static void movie_destructor(JNIEnv* env, jobject, jlong movieHandle) {
//////////////////////////////////////////////////////////////////////////////////////////////
-#include <android_runtime/AndroidRuntime.h>
-
static JNINativeMethod gMethods[] = {
{ "width", "()I", (void*)movie_width },
{ "height", "()I", (void*)movie_height },
@@ -157,22 +151,14 @@ static JNINativeMethod gMethods[] = {
(void*)movie_decodeByteArray },
};
-#define kClassPathName "android/graphics/Movie"
-
-#define RETURN_ERR_IF_NULL(value) do { if (!(value)) { assert(0); return -1; } } while (false)
-
int register_android_graphics_Movie(JNIEnv* env)
{
- gMovie_class = env->FindClass(kClassPathName);
- RETURN_ERR_IF_NULL(gMovie_class);
- gMovie_class = (jclass)env->NewGlobalRef(gMovie_class);
+ gMovie_class = android::FindClassOrDie(env, "android/graphics/Movie");
+ gMovie_class = android::MakeGlobalRefOrDie(env, gMovie_class);
- gMovie_constructorMethodID = env->GetMethodID(gMovie_class, "<init>", "(J)V");
- RETURN_ERR_IF_NULL(gMovie_constructorMethodID);
+ gMovie_constructorMethodID = android::GetMethodIDOrDie(env, gMovie_class, "<init>", "(J)V");
- gMovie_nativeInstanceID = env->GetFieldID(gMovie_class, "mNativeMovie", "J");
- RETURN_ERR_IF_NULL(gMovie_nativeInstanceID);
+ gMovie_nativeInstanceID = android::GetFieldIDOrDie(env, gMovie_class, "mNativeMovie", "J");
- return android::AndroidRuntime::registerNativeMethods(env, kClassPathName,
- gMethods, SK_ARRAY_COUNT(gMethods));
+ return android::RegisterMethodsOrDie(env, "android/graphics/Movie", gMethods, NELEM(gMethods));
}
diff --git a/core/jni/android/graphics/NinePatch.cpp b/core/jni/android/graphics/NinePatch.cpp
index be62fdd..d868f28 100644
--- a/core/jni/android/graphics/NinePatch.cpp
+++ b/core/jni/android/graphics/NinePatch.cpp
@@ -30,6 +30,7 @@
#include "GraphicsJNI.h"
#include "JNIHelp.h"
+#include "core_jni_helpers.h"
extern void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds, const SkBitmap& bitmap,
const android::Res_png_9patch& chunk, const SkPaint* paint, SkRegion** outRegion);
@@ -176,8 +177,6 @@ public:
/////////////////////////////////////////////////////////////////////////////////////////
-#include <android_runtime/AndroidRuntime.h>
-
static JNINativeMethod gNinePatchMethods[] = {
{ "isNinePatchChunk", "([B)Z", (void*) SkNinePatchGlue::isNinePatchChunk },
{ "validateNinePatchChunk", "(J[B)J", (void*) SkNinePatchGlue::validateNinePatchChunk },
@@ -189,6 +188,6 @@ static JNINativeMethod gNinePatchMethods[] = {
};
int register_android_graphics_NinePatch(JNIEnv* env) {
- return android::AndroidRuntime::registerNativeMethods(env,
- "android/graphics/NinePatch", gNinePatchMethods, SK_ARRAY_COUNT(gNinePatchMethods));
+ return android::RegisterMethodsOrDie(env,
+ "android/graphics/NinePatch", gNinePatchMethods, NELEM(gNinePatchMethods));
}
diff --git a/core/jni/android/graphics/NinePatchImpl.cpp b/core/jni/android/graphics/NinePatchImpl.cpp
index c162c48..26ce967 100644
--- a/core/jni/android/graphics/NinePatchImpl.cpp
+++ b/core/jni/android/graphics/NinePatchImpl.cpp
@@ -23,20 +23,16 @@
#include "SkBitmap.h"
#include "SkCanvas.h"
+#include "SkColorPriv.h"
#include "SkNinePatch.h"
#include "SkPaint.h"
#include "SkUnPreMultiply.h"
-#define USE_TRACE
-
-#ifdef USE_TRACE
- static bool gTrace;
-#endif
-
-#include "SkColorPriv.h"
-
#include <utils/Log.h>
+static const bool kUseTrace = true;
+static bool gTrace = false;
+
static bool getColor(const SkBitmap& bitmap, int x, int y, SkColor* c) {
switch (bitmap.colorType()) {
case kN32_SkColorType:
@@ -120,7 +116,7 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,
const int32_t* yDivs = chunk.getYDivs();
// if our SkCanvas were back by GL we should enable this and draw this as
// a mesh, which will be faster in most cases.
- if (false) {
+ if ((false)) {
SkNinePatch::DrawMesh(canvas, bounds, bitmap,
xDivs, chunk.numXDivs,
yDivs, chunk.numYDivs,
@@ -128,37 +124,34 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,
return;
}
-#ifdef USE_TRACE
- gTrace = true;
-#endif
+ if (kUseTrace) {
+ gTrace = true;
+ }
SkASSERT(canvas || outRegion);
-#ifdef USE_TRACE
- if (canvas) {
- const SkMatrix& m = canvas->getTotalMatrix();
- ALOGV("ninepatch [%g %g %g] [%g %g %g]\n",
- SkScalarToFloat(m[0]), SkScalarToFloat(m[1]), SkScalarToFloat(m[2]),
- SkScalarToFloat(m[3]), SkScalarToFloat(m[4]), SkScalarToFloat(m[5]));
- }
-#endif
+ if (kUseTrace) {
+ if (canvas) {
+ const SkMatrix& m = canvas->getTotalMatrix();
+ ALOGV("ninepatch [%g %g %g] [%g %g %g]\n",
+ SkScalarToFloat(m[0]), SkScalarToFloat(m[1]), SkScalarToFloat(m[2]),
+ SkScalarToFloat(m[3]), SkScalarToFloat(m[4]), SkScalarToFloat(m[5]));
+ }
-#ifdef USE_TRACE
- if (gTrace) {
- ALOGV("======== ninepatch bounds [%g %g]\n", SkScalarToFloat(bounds.width()), SkScalarToFloat(bounds.height()));
+ ALOGV("======== ninepatch bounds [%g %g]\n", SkScalarToFloat(bounds.width()),
+ SkScalarToFloat(bounds.height()));
ALOGV("======== ninepatch paint bm [%d,%d]\n", bitmap.width(), bitmap.height());
ALOGV("======== ninepatch xDivs [%d,%d]\n", xDivs[0], xDivs[1]);
ALOGV("======== ninepatch yDivs [%d,%d]\n", yDivs[0], yDivs[1]);
}
-#endif
if (bounds.isEmpty() ||
bitmap.width() == 0 || bitmap.height() == 0 ||
(paint && paint->getXfermode() == NULL && paint->getAlpha() == 0))
{
-#ifdef USE_TRACE
- if (gTrace) ALOGV("======== abort ninepatch draw\n");
-#endif
+ if (kUseTrace) {
+ ALOGV("======== abort ninepatch draw\n");
+ }
return;
}
@@ -202,18 +195,18 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,
}
int numFixedYPixelsRemaining = bitmapHeight - numStretchyYPixelsRemaining;
-#ifdef USE_TRACE
- ALOGV("NinePatch [%d %d] bounds [%g %g %g %g] divs [%d %d]\n",
- bitmap.width(), bitmap.height(),
- SkScalarToFloat(bounds.fLeft), SkScalarToFloat(bounds.fTop),
- SkScalarToFloat(bounds.width()), SkScalarToFloat(bounds.height()),
- numXDivs, numYDivs);
-#endif
+ if (kUseTrace) {
+ ALOGV("NinePatch [%d %d] bounds [%g %g %g %g] divs [%d %d]\n",
+ bitmap.width(), bitmap.height(),
+ SkScalarToFloat(bounds.fLeft), SkScalarToFloat(bounds.fTop),
+ SkScalarToFloat(bounds.width()), SkScalarToFloat(bounds.height()),
+ numXDivs, numYDivs);
+ }
src.fTop = 0;
dst.fTop = bounds.fTop;
// The first row always starts with the top being at y=0 and the bottom
- // being either yDivs[1] (if yDivs[0]=0) of yDivs[0]. In the former case
+ // being either yDivs[1] (if yDivs[0]=0) or yDivs[0]. In the former case
// the first row is stretchable along the Y axis, otherwise it is fixed.
// The last row always ends with the bottom being bitmap.height and the top
// being either yDivs[numYDivs-2] (if yDivs[numYDivs-1]=bitmap.height) or
@@ -307,15 +300,15 @@ void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,
goto nextDiv;
}
if (canvas) {
-#ifdef USE_TRACE
- ALOGV("-- src [%d %d %d %d] dst [%g %g %g %g]\n",
- src.fLeft, src.fTop, src.width(), src.height(),
- SkScalarToFloat(dst.fLeft), SkScalarToFloat(dst.fTop),
- SkScalarToFloat(dst.width()), SkScalarToFloat(dst.height()));
- if (2 == src.width() && SkIntToScalar(5) == dst.width()) {
- ALOGV("--- skip patch\n");
+ if (kUseTrace) {
+ ALOGV("-- src [%d %d %d %d] dst [%g %g %g %g]\n",
+ src.fLeft, src.fTop, src.width(), src.height(),
+ SkScalarToFloat(dst.fLeft), SkScalarToFloat(dst.fTop),
+ SkScalarToFloat(dst.width()), SkScalarToFloat(dst.height()));
+ if (2 == src.width() && SkIntToScalar(5) == dst.width()) {
+ ALOGV("--- skip patch\n");
+ }
}
-#endif
drawStretchyPatch(canvas, src, dst, bitmap, *paint, initColor,
color, hasXfer);
}
diff --git a/core/jni/android/graphics/NinePatchPeeker.h b/core/jni/android/graphics/NinePatchPeeker.h
index 7c18b2d..2d49b38 100644
--- a/core/jni/android/graphics/NinePatchPeeker.h
+++ b/core/jni/android/graphics/NinePatchPeeker.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef NinePatchPeeker_h
-#define NinePatchPeeker_h
+#ifndef _ANDROID_GRAPHICS_NINE_PATCH_PEEKER_H_
+#define _ANDROID_GRAPHICS_NINE_PATCH_PEEKER_H_
#include "SkImageDecoder.h"
#include <androidfw/ResourceTypes.h>
@@ -53,4 +53,4 @@ public:
uint8_t mOutlineAlpha;
};
-#endif // NinePatchPeeker_h
+#endif // _ANDROID_GRAPHICS_NINE_PATCH_PEEKER_H_
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp
index 6b02326..2cd2db7 100644
--- a/core/jni/android/graphics/Paint.cpp
+++ b/core/jni/android/graphics/Paint.cpp
@@ -21,7 +21,7 @@
#include "jni.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <ScopedUtfChars.h>
#include "SkBlurDrawLooper.h"
@@ -1021,35 +1021,26 @@ static JNINativeMethod methods[] = {
{"native_hasShadowLayer", "!(J)Z", (void*)PaintGlue::hasShadowLayer}
};
-static jfieldID req_fieldID(jfieldID id) {
- SkASSERT(id);
- return id;
-}
-
int register_android_graphics_Paint(JNIEnv* env) {
- gFontMetrics_class = env->FindClass("android/graphics/Paint$FontMetrics");
- SkASSERT(gFontMetrics_class);
- gFontMetrics_class = (jclass)env->NewGlobalRef(gFontMetrics_class);
-
- gFontMetrics_fieldID.top = req_fieldID(env->GetFieldID(gFontMetrics_class, "top", "F"));
- gFontMetrics_fieldID.ascent = req_fieldID(env->GetFieldID(gFontMetrics_class, "ascent", "F"));
- gFontMetrics_fieldID.descent = req_fieldID(env->GetFieldID(gFontMetrics_class, "descent", "F"));
- gFontMetrics_fieldID.bottom = req_fieldID(env->GetFieldID(gFontMetrics_class, "bottom", "F"));
- gFontMetrics_fieldID.leading = req_fieldID(env->GetFieldID(gFontMetrics_class, "leading", "F"));
-
- gFontMetricsInt_class = env->FindClass("android/graphics/Paint$FontMetricsInt");
- SkASSERT(gFontMetricsInt_class);
- gFontMetricsInt_class = (jclass)env->NewGlobalRef(gFontMetricsInt_class);
-
- gFontMetricsInt_fieldID.top = req_fieldID(env->GetFieldID(gFontMetricsInt_class, "top", "I"));
- gFontMetricsInt_fieldID.ascent = req_fieldID(env->GetFieldID(gFontMetricsInt_class, "ascent", "I"));
- gFontMetricsInt_fieldID.descent = req_fieldID(env->GetFieldID(gFontMetricsInt_class, "descent", "I"));
- gFontMetricsInt_fieldID.bottom = req_fieldID(env->GetFieldID(gFontMetricsInt_class, "bottom", "I"));
- gFontMetricsInt_fieldID.leading = req_fieldID(env->GetFieldID(gFontMetricsInt_class, "leading", "I"));
-
- int result = AndroidRuntime::registerNativeMethods(env, "android/graphics/Paint", methods,
- sizeof(methods) / sizeof(methods[0]));
- return result;
+ gFontMetrics_class = FindClassOrDie(env, "android/graphics/Paint$FontMetrics");
+ gFontMetrics_class = MakeGlobalRefOrDie(env, gFontMetrics_class);
+
+ gFontMetrics_fieldID.top = GetFieldIDOrDie(env, gFontMetrics_class, "top", "F");
+ gFontMetrics_fieldID.ascent = GetFieldIDOrDie(env, gFontMetrics_class, "ascent", "F");
+ gFontMetrics_fieldID.descent = GetFieldIDOrDie(env, gFontMetrics_class, "descent", "F");
+ gFontMetrics_fieldID.bottom = GetFieldIDOrDie(env, gFontMetrics_class, "bottom", "F");
+ gFontMetrics_fieldID.leading = GetFieldIDOrDie(env, gFontMetrics_class, "leading", "F");
+
+ gFontMetricsInt_class = FindClassOrDie(env, "android/graphics/Paint$FontMetricsInt");
+ gFontMetricsInt_class = MakeGlobalRefOrDie(env, gFontMetricsInt_class);
+
+ gFontMetricsInt_fieldID.top = GetFieldIDOrDie(env, gFontMetricsInt_class, "top", "I");
+ gFontMetricsInt_fieldID.ascent = GetFieldIDOrDie(env, gFontMetricsInt_class, "ascent", "I");
+ gFontMetricsInt_fieldID.descent = GetFieldIDOrDie(env, gFontMetricsInt_class, "descent", "I");
+ gFontMetricsInt_fieldID.bottom = GetFieldIDOrDie(env, gFontMetricsInt_class, "bottom", "I");
+ gFontMetricsInt_fieldID.leading = GetFieldIDOrDie(env, gFontMetricsInt_class, "leading", "I");
+
+ return RegisterMethodsOrDie(env, "android/graphics/Paint", methods, NELEM(methods));
}
}
diff --git a/core/jni/android/graphics/Paint.h b/core/jni/android/graphics/Paint.h
index a20bb4b..fa539f5 100644
--- a/core/jni/android/graphics/Paint.h
+++ b/core/jni/android/graphics/Paint.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_GRAPHICS_PAINT_H
-#define ANDROID_GRAPHICS_PAINT_H
+#ifndef ANDROID_GRAPHICS_PAINT_H_
+#define ANDROID_GRAPHICS_PAINT_H_
#include <SkPaint.h>
#include <string>
@@ -78,4 +78,4 @@ private:
} // namespace android
-#endif // ANDROID_GRAPHICS_PAINT_H
+#endif // ANDROID_GRAPHICS_PAINT_H_
diff --git a/core/jni/android/graphics/Path.cpp b/core/jni/android/graphics/Path.cpp
index 30ce58d..1e4eb75 100644
--- a/core/jni/android/graphics/Path.cpp
+++ b/core/jni/android/graphics/Path.cpp
@@ -22,7 +22,7 @@
#include "jni.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "SkPath.h"
#include "SkPathOps.h"
@@ -520,9 +520,7 @@ static JNINativeMethod methods[] = {
};
int register_android_graphics_Path(JNIEnv* env) {
- int result = AndroidRuntime::registerNativeMethods(env, "android/graphics/Path", methods,
- sizeof(methods) / sizeof(methods[0]));
- return result;
+ return RegisterMethodsOrDie(env, "android/graphics/Path", methods, NELEM(methods));
}
}
diff --git a/core/jni/android/graphics/PathEffect.cpp b/core/jni/android/graphics/PathEffect.cpp
index 28d881d..9d0f0ad 100644
--- a/core/jni/android/graphics/PathEffect.cpp
+++ b/core/jni/android/graphics/PathEffect.cpp
@@ -1,6 +1,8 @@
#include <jni.h>
#include "GraphicsJNI.h"
+#include "core_jni_helpers.h"
+
#include "SkPathEffect.h"
#include "SkCornerPathEffect.h"
#include "SkDashPathEffect.h"
@@ -97,24 +99,22 @@ static JNINativeMethod gDiscretePathEffectMethods[] = {
{ "nativeCreate", "(FF)J", (void*)SkPathEffectGlue::Discrete_constructor }
};
-#include <android_runtime/AndroidRuntime.h>
-
-#define REG(env, name, array) \
- result = android::AndroidRuntime::registerNativeMethods(env, name, array, \
- SK_ARRAY_COUNT(array)); \
- if (result < 0) return result
-
int register_android_graphics_PathEffect(JNIEnv* env)
{
- int result;
-
- REG(env, "android/graphics/PathEffect", gPathEffectMethods);
- REG(env, "android/graphics/ComposePathEffect", gComposePathEffectMethods);
- REG(env, "android/graphics/SumPathEffect", gSumPathEffectMethods);
- REG(env, "android/graphics/DashPathEffect", gDashPathEffectMethods);
- REG(env, "android/graphics/PathDashPathEffect", gPathDashPathEffectMethods);
- REG(env, "android/graphics/CornerPathEffect", gCornerPathEffectMethods);
- REG(env, "android/graphics/DiscretePathEffect", gDiscretePathEffectMethods);
+ android::RegisterMethodsOrDie(env, "android/graphics/PathEffect", gPathEffectMethods,
+ NELEM(gPathEffectMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/ComposePathEffect",
+ gComposePathEffectMethods, NELEM(gComposePathEffectMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/SumPathEffect", gSumPathEffectMethods,
+ NELEM(gSumPathEffectMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/DashPathEffect", gDashPathEffectMethods,
+ NELEM(gDashPathEffectMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/PathDashPathEffect",
+ gPathDashPathEffectMethods, NELEM(gPathDashPathEffectMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/CornerPathEffect",
+ gCornerPathEffectMethods, NELEM(gCornerPathEffectMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/DiscretePathEffect",
+ gDiscretePathEffectMethods, NELEM(gDiscretePathEffectMethods));
return 0;
}
diff --git a/core/jni/android/graphics/PathMeasure.cpp b/core/jni/android/graphics/PathMeasure.cpp
index 13f68a9..fec5d9d 100644
--- a/core/jni/android/graphics/PathMeasure.cpp
+++ b/core/jni/android/graphics/PathMeasure.cpp
@@ -17,7 +17,7 @@
#include "jni.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include <core_jni_helpers.h>
#include "SkPathMeasure.h"
@@ -156,9 +156,7 @@ static JNINativeMethod methods[] = {
};
int register_android_graphics_PathMeasure(JNIEnv* env) {
- int result = AndroidRuntime::registerNativeMethods(env, "android/graphics/PathMeasure", methods,
- sizeof(methods) / sizeof(methods[0]));
- return result;
+ return RegisterMethodsOrDie(env, "android/graphics/PathMeasure", methods, NELEM(methods));
}
}
diff --git a/core/jni/android/graphics/Picture.h b/core/jni/android/graphics/Picture.h
index a2e5d4a..4db923d 100644
--- a/core/jni/android/graphics/Picture.h
+++ b/core/jni/android/graphics/Picture.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_GRAPHICS_PICTURE_H
-#define ANDROID_GRAPHICS_PICTURE_H
+#ifndef ANDROID_GRAPHICS_PICTURE_H_
+#define ANDROID_GRAPHICS_PICTURE_H_
#include "SkPicture.h"
#include "SkPictureRecorder.h"
@@ -63,4 +63,4 @@ private:
};
}; // namespace android
-#endif // ANDROID_GRAPHICS_PICTURE_H
+#endif // ANDROID_GRAPHICS_PICTURE_H_
diff --git a/core/jni/android/graphics/PorterDuff.cpp b/core/jni/android/graphics/PorterDuff.cpp
index 8a49eb5..73b1691 100644
--- a/core/jni/android/graphics/PorterDuff.cpp
+++ b/core/jni/android/graphics/PorterDuff.cpp
@@ -22,7 +22,7 @@
#include "jni.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "SkPorterDuff.h"
@@ -43,10 +43,7 @@ static JNINativeMethod methods[] = {
};
int register_android_graphics_PorterDuff(JNIEnv* env) {
- int result = AndroidRuntime::registerNativeMethods(env,
- "android/graphics/PorterDuffXfermode", methods,
- sizeof(methods) / sizeof(methods[0]));
- return result;
+ return RegisterMethodsOrDie(env, "android/graphics/PorterDuffXfermode", methods, NELEM(methods));
}
}
diff --git a/core/jni/android/graphics/Rasterizer.cpp b/core/jni/android/graphics/Rasterizer.cpp
index 2b1aca1..cfc23ac8 100644
--- a/core/jni/android/graphics/Rasterizer.cpp
+++ b/core/jni/android/graphics/Rasterizer.cpp
@@ -24,7 +24,7 @@
#include "GraphicsJNI.h"
#include "Paint.h"
#include "SkLayerRasterizer.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
// Rasterizer.java holds a pointer (jlong) to this guy
class NativeRasterizer {
@@ -59,7 +59,6 @@ public:
static void finalizer(JNIEnv* env, jobject clazz, jlong objHandle) {
delete reinterpret_cast<NativeRasterizer *>(objHandle);
}
-
};
static JNINativeMethod gRasterizerMethods[] = {
@@ -67,9 +66,8 @@ static JNINativeMethod gRasterizerMethods[] = {
};
int register_android_graphics_Rasterizer(JNIEnv* env) {
- int result = AndroidRuntime::registerNativeMethods(env, "android/graphics/Rasterizer", gRasterizerMethods,
- sizeof(gRasterizerMethods) / sizeof(gRasterizerMethods[0]));
- return result;
+ return RegisterMethodsOrDie(env, "android/graphics/Rasterizer", gRasterizerMethods,
+ NELEM(gRasterizerMethods));
}
class SkLayerRasterizerGlue {
@@ -94,10 +92,8 @@ static JNINativeMethod gLayerRasterizerMethods[] = {
int register_android_graphics_LayerRasterizer(JNIEnv* env)
{
- return android::AndroidRuntime::registerNativeMethods(env,
- "android/graphics/LayerRasterizer",
- gLayerRasterizerMethods,
- SK_ARRAY_COUNT(gLayerRasterizerMethods));
+ return RegisterMethodsOrDie(env, "android/graphics/LayerRasterizer",
+ gLayerRasterizerMethods, NELEM(gLayerRasterizerMethods));
}
}
diff --git a/core/jni/android/graphics/Region.cpp b/core/jni/android/graphics/Region.cpp
index 912968a..90a020e 100644
--- a/core/jni/android/graphics/Region.cpp
+++ b/core/jni/android/graphics/Region.cpp
@@ -23,7 +23,7 @@
#include "android_util_Binder.h"
#include <jni.h>
-#include <android_runtime/AndroidRuntime.h>
+#include <core_jni_helpers.h>
namespace android {
@@ -325,19 +325,13 @@ static JNINativeMethod gRegionMethods[] = {
int register_android_graphics_Region(JNIEnv* env)
{
- jclass clazz = env->FindClass("android/graphics/Region");
- SkASSERT(clazz);
+ jclass clazz = FindClassOrDie(env, "android/graphics/Region");
- gRegion_nativeInstanceFieldID = env->GetFieldID(clazz, "mNativeRegion", "J");
- SkASSERT(gRegion_nativeInstanceFieldID);
+ gRegion_nativeInstanceFieldID = GetFieldIDOrDie(env, clazz, "mNativeRegion", "J");
- int result = android::AndroidRuntime::registerNativeMethods(env, "android/graphics/Region",
- gRegionMethods, SK_ARRAY_COUNT(gRegionMethods));
- if (result < 0)
- return result;
-
- return android::AndroidRuntime::registerNativeMethods(env, "android/graphics/RegionIterator",
- gRegionIterMethods, SK_ARRAY_COUNT(gRegionIterMethods));
+ RegisterMethodsOrDie(env, "android/graphics/Region", gRegionMethods, NELEM(gRegionMethods));
+ return RegisterMethodsOrDie(env, "android/graphics/RegionIterator", gRegionIterMethods,
+ NELEM(gRegionIterMethods));
}
SkRegion* android_graphics_Region_getSkRegion(JNIEnv* env, jobject regionObj) {
diff --git a/core/jni/android/graphics/Region.h b/core/jni/android/graphics/Region.h
index c15f06e..2e8e109 100644
--- a/core/jni/android/graphics/Region.h
+++ b/core/jni/android/graphics/Region.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef _ANDROID_GRAPHICS_REGION_H
-#define _ANDROID_GRAPHICS_REGION_H
+#ifndef _ANDROID_GRAPHICS_REGION_H_
+#define _ANDROID_GRAPHICS_REGION_H_
#include "jni.h"
#include "SkRegion.h"
@@ -27,4 +27,4 @@ extern SkRegion* android_graphics_Region_getSkRegion(JNIEnv* env, jobject region
} // namespace android
-#endif // _ANDROID_GRAPHICS_REGION_H
+#endif // _ANDROID_GRAPHICS_REGION_H_
diff --git a/core/jni/android/graphics/RtlProperties.h b/core/jni/android/graphics/RtlProperties.h
index d43745f..907dd59 100644
--- a/core/jni/android/graphics/RtlProperties.h
+++ b/core/jni/android/graphics/RtlProperties.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ANDROID_RTL_PROPERTIES_H
-#define ANDROID_RTL_PROPERTIES_H
+#ifndef _ANDROID_GRAPHICS_RTL_PROPERTIES_H_
+#define _ANDROID_GRAPHICS_RTL_PROPERTIES_H_
#include <cutils/properties.h>
#include <stdlib.h>
@@ -45,11 +45,5 @@ static RtlDebugLevel readRtlDebugLevel() {
return kRtlDebugDisabled;
}
-// Define if we want (1) to have Advances debug values or not (0)
-#define DEBUG_ADVANCES 0
-
-// Define if we want (1) to have Glyphs debug values or not (0)
-#define DEBUG_GLYPHS 0
-
} // namespace android
-#endif // ANDROID_RTL_PROPERTIES_H
+#endif // _ANDROID_GRAPHICS_RTL_PROPERTIES_H_
diff --git a/core/jni/android/graphics/Shader.cpp b/core/jni/android/graphics/Shader.cpp
index 6146fff..9ec9c58 100644
--- a/core/jni/android/graphics/Shader.cpp
+++ b/core/jni/android/graphics/Shader.cpp
@@ -11,12 +11,9 @@
#include <SkiaShader.h>
#include <Caches.h>
-using namespace android::uirenderer;
+#include "core_jni_helpers.h"
-static struct {
- jclass clazz;
- jfieldID shader;
-} gShaderClassInfo;
+using namespace android::uirenderer;
static void ThrowIAE_IfNull(JNIEnv* env, void* ptr) {
if (NULL == ptr) {
@@ -265,23 +262,22 @@ static JNINativeMethod gComposeShaderMethods[] = {
{ "nativeCreate2", "(JJI)J", (void*)ComposeShader_create2 },
};
-#include <android_runtime/AndroidRuntime.h>
-
-#define REG(env, name, array) \
- result = android::AndroidRuntime::registerNativeMethods(env, name, array, SK_ARRAY_COUNT(array)); \
- if (result < 0) return result
-
int register_android_graphics_Shader(JNIEnv* env)
{
- int result;
-
- REG(env, "android/graphics/Color", gColorMethods);
- REG(env, "android/graphics/Shader", gShaderMethods);
- REG(env, "android/graphics/BitmapShader", gBitmapShaderMethods);
- REG(env, "android/graphics/LinearGradient", gLinearGradientMethods);
- REG(env, "android/graphics/RadialGradient", gRadialGradientMethods);
- REG(env, "android/graphics/SweepGradient", gSweepGradientMethods);
- REG(env, "android/graphics/ComposeShader", gComposeShaderMethods);
-
- return result;
+ android::RegisterMethodsOrDie(env, "android/graphics/Color", gColorMethods,
+ NELEM(gColorMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/Shader", gShaderMethods,
+ NELEM(gShaderMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/BitmapShader", gBitmapShaderMethods,
+ NELEM(gBitmapShaderMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/LinearGradient", gLinearGradientMethods,
+ NELEM(gLinearGradientMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/RadialGradient", gRadialGradientMethods,
+ NELEM(gRadialGradientMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/SweepGradient", gSweepGradientMethods,
+ NELEM(gSweepGradientMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/ComposeShader", gComposeShaderMethods,
+ NELEM(gComposeShaderMethods));
+
+ return 0;
}
diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp
index eaca6d2..35d69fe 100644
--- a/core/jni/android/graphics/SurfaceTexture.cpp
+++ b/core/jni/android/graphics/SurfaceTexture.cpp
@@ -24,7 +24,7 @@
#include <gui/GLConsumer.h>
#include <gui/Surface.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <utils/Log.h>
#include <utils/misc.h>
@@ -359,10 +359,8 @@ static JNINativeMethod gSurfaceTextureMethods[] = {
int register_android_graphics_SurfaceTexture(JNIEnv* env)
{
- int err = 0;
- err = AndroidRuntime::registerNativeMethods(env, kSurfaceTextureClassPathName,
- gSurfaceTextureMethods, NELEM(gSurfaceTextureMethods));
- return err;
+ return RegisterMethodsOrDie(env, kSurfaceTextureClassPathName, gSurfaceTextureMethods,
+ NELEM(gSurfaceTextureMethods));
}
} // namespace android
diff --git a/core/jni/android/graphics/Typeface.cpp b/core/jni/android/graphics/Typeface.cpp
index 2029658..808ae2c 100644
--- a/core/jni/android/graphics/Typeface.cpp
+++ b/core/jni/android/graphics/Typeface.cpp
@@ -15,7 +15,7 @@
*/
#include "jni.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "GraphicsJNI.h"
#include <ScopedPrimitiveArray.h>
@@ -81,8 +81,6 @@ static JNINativeMethod gTypefaceMethods[] = {
int register_android_graphics_Typeface(JNIEnv* env)
{
- return android::AndroidRuntime::registerNativeMethods(env,
- "android/graphics/Typeface",
- gTypefaceMethods,
- SK_ARRAY_COUNT(gTypefaceMethods));
+ return RegisterMethodsOrDie(env, "android/graphics/Typeface", gTypefaceMethods,
+ NELEM(gTypefaceMethods));
}
diff --git a/core/jni/android/graphics/TypefaceImpl.h b/core/jni/android/graphics/TypefaceImpl.h
index d129f62..d36f83a 100644
--- a/core/jni/android/graphics/TypefaceImpl.h
+++ b/core/jni/android/graphics/TypefaceImpl.h
@@ -15,8 +15,8 @@
*/
-#ifndef ANDROID_TYPEFACE_IMPL_H
-#define ANDROID_TYPEFACE_IMPL_H
+#ifndef _ANDROID_GRAPHICS_TYPEFACE_IMPL_H_
+#define _ANDROID_GRAPHICS_TYPEFACE_IMPL_H_
#include "jni.h" // for jlong, eventually remove
#include "SkTypeface.h"
@@ -62,4 +62,4 @@ void TypefaceImpl_setDefault(TypefaceImpl* face);
}
-#endif // ANDROID_TYPEFACE_IMPL_H \ No newline at end of file
+#endif // _ANDROID_GRAPHICS_TYPEFACE_IMPL_H_ \ No newline at end of file
diff --git a/core/jni/android/graphics/Utils.h b/core/jni/android/graphics/Utils.h
index b90593c..bde87f0 100644
--- a/core/jni/android/graphics/Utils.h
+++ b/core/jni/android/graphics/Utils.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef UTILS_DEFINED
-#define UTILS_DEFINED
+#ifndef _ANDROID_GRAPHICS_UTILS_H_
+#define _ANDROID_GRAPHICS_UTILS_H_
#include "SkStream.h"
@@ -89,4 +89,4 @@ jobject nullObjectReturn(const char msg[]);
}; // namespace android
-#endif
+#endif // _ANDROID_GRAPHICS_UTILS_H_
diff --git a/core/jni/android/graphics/Xfermode.cpp b/core/jni/android/graphics/Xfermode.cpp
index 6bf6f8a..5a3883a 100644
--- a/core/jni/android/graphics/Xfermode.cpp
+++ b/core/jni/android/graphics/Xfermode.cpp
@@ -16,7 +16,7 @@
#include "jni.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "SkAvoidXfermode.h"
#include "SkPixelXorXfermode.h"
@@ -59,19 +59,15 @@ static JNINativeMethod gPixelXorMethods[] = {
{"nativeCreate", "(I)J", (void*) SkXfermodeGlue::pixelxor_create}
};
-#include <android_runtime/AndroidRuntime.h>
-
-#define REG(env, name, array) \
- result = android::AndroidRuntime::registerNativeMethods(env, name, array, \
- SK_ARRAY_COUNT(array)); \
- if (result < 0) return result
-
int register_android_graphics_Xfermode(JNIEnv* env) {
- int result;
-
- REG(env, "android/graphics/Xfermode", gXfermodeMethods);
- REG(env, "android/graphics/AvoidXfermode", gAvoidMethods);
- REG(env, "android/graphics/PixelXorXfermode", gPixelXorMethods);
+ android::RegisterMethodsOrDie(env, "android/graphics/Xfermode", gXfermodeMethods,
+ NELEM(gXfermodeMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/Xfermode", gXfermodeMethods,
+ NELEM(gXfermodeMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/AvoidXfermode", gAvoidMethods,
+ NELEM(gAvoidMethods));
+ android::RegisterMethodsOrDie(env, "android/graphics/PixelXorXfermode", gPixelXorMethods,
+ NELEM(gPixelXorMethods));
return 0;
}
diff --git a/core/jni/android/graphics/YuvToJpegEncoder.cpp b/core/jni/android/graphics/YuvToJpegEncoder.cpp
index 6591d60..5eede2a 100644
--- a/core/jni/android/graphics/YuvToJpegEncoder.cpp
+++ b/core/jni/android/graphics/YuvToJpegEncoder.cpp
@@ -4,6 +4,8 @@
#include <ui/PixelFormat.h>
#include <hardware/hardware.h>
+#include "core_jni_helpers.h"
+
#include <jni.h>
YuvToJpegEncoder* YuvToJpegEncoder::create(int format, int* strides) {
@@ -236,21 +238,18 @@ static jboolean YuvImage_compressToJpeg(JNIEnv* env, jobject, jbyteArray inYuv,
env->ReleaseByteArrayElements(inYuv, yuv, 0);
env->ReleaseIntArrayElements(offsets, imgOffsets, 0);
env->ReleaseIntArrayElements(strides, imgStrides, 0);
+ delete strm;
return result;
}
///////////////////////////////////////////////////////////////////////////////
-#include <android_runtime/AndroidRuntime.h>
-
static JNINativeMethod gYuvImageMethods[] = {
{ "nativeCompressToJpeg", "([BIII[I[IILjava/io/OutputStream;[B)Z",
(void*)YuvImage_compressToJpeg }
};
-#define kClassPathName "android/graphics/YuvImage"
-
int register_android_graphics_YuvImage(JNIEnv* env)
{
- return android::AndroidRuntime::registerNativeMethods(env, kClassPathName,
- gYuvImageMethods, SK_ARRAY_COUNT(gYuvImageMethods));
+ return android::RegisterMethodsOrDie(env, "android/graphics/YuvImage", gYuvImageMethods,
+ NELEM(gYuvImageMethods));
}
diff --git a/core/jni/android/graphics/YuvToJpegEncoder.h b/core/jni/android/graphics/YuvToJpegEncoder.h
index 0d418ed..1ea844a 100644
--- a/core/jni/android/graphics/YuvToJpegEncoder.h
+++ b/core/jni/android/graphics/YuvToJpegEncoder.h
@@ -1,5 +1,5 @@
-#ifndef YuvToJpegEncoder_DEFINED
-#define YuvToJpegEncoder_DEFINED
+#ifndef _ANDROID_GRAPHICS_YUV_TO_JPEG_ENCODER_H_
+#define _ANDROID_GRAPHICS_YUV_TO_JPEG_ENCODER_H_
#include "SkTypes.h"
#include "SkStream.h"
@@ -47,16 +47,16 @@ protected:
class Yuv420SpToJpegEncoder : public YuvToJpegEncoder {
public:
- Yuv420SpToJpegEncoder(int* strides);
- virtual ~Yuv420SpToJpegEncoder() {}
+ Yuv420SpToJpegEncoder(int* strides);
+ virtual ~Yuv420SpToJpegEncoder() {}
private:
- void configSamplingFactors(jpeg_compress_struct* cinfo);
- void deinterleaveYuv(uint8_t* yuv, int width, int height,
+ void configSamplingFactors(jpeg_compress_struct* cinfo);
+ void deinterleaveYuv(uint8_t* yuv, int width, int height,
uint8_t*& yPlanar, uint8_t*& uPlanar, uint8_t*& vPlanar);
- void deinterleave(uint8_t* vuPlanar, uint8_t* uRows, uint8_t* vRows,
- int rowIndex, int width, int height);
- void compress(jpeg_compress_struct* cinfo, uint8_t* yuv, int* offsets);
+ void deinterleave(uint8_t* vuPlanar, uint8_t* uRows, uint8_t* vRows,
+ int rowIndex, int width, int height);
+ void compress(jpeg_compress_struct* cinfo, uint8_t* yuv, int* offsets);
};
class Yuv422IToJpegEncoder : public YuvToJpegEncoder {
@@ -71,4 +71,4 @@ private:
uint8_t* vRows, int rowIndex, int width, int height);
};
-#endif
+#endif // _ANDROID_GRAPHICS_YUV_TO_JPEG_ENCODER_H_
diff --git a/core/jni/android/graphics/pdf/PdfDocument.cpp b/core/jni/android/graphics/pdf/PdfDocument.cpp
index 9436a47..be90612 100644
--- a/core/jni/android/graphics/pdf/PdfDocument.cpp
+++ b/core/jni/android/graphics/pdf/PdfDocument.cpp
@@ -16,7 +16,7 @@
#include "jni.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <vector>
#include "Canvas.h"
@@ -164,10 +164,9 @@ static JNINativeMethod gPdfDocument_Methods[] = {
};
int register_android_graphics_pdf_PdfDocument(JNIEnv* env) {
- int result = android::AndroidRuntime::registerNativeMethods(
+ return RegisterMethodsOrDie(
env, "android/graphics/pdf/PdfDocument", gPdfDocument_Methods,
NELEM(gPdfDocument_Methods));
- return result;
}
};
diff --git a/core/jni/android/graphics/pdf/PdfEditor.cpp b/core/jni/android/graphics/pdf/PdfEditor.cpp
index ed6f1d6..cb228f2 100644
--- a/core/jni/android/graphics/pdf/PdfEditor.cpp
+++ b/core/jni/android/graphics/pdf/PdfEditor.cpp
@@ -16,14 +16,19 @@
#include "jni.h"
#include "JNIHelp.h"
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
#include "fpdfview.h"
#include "fpdfedit.h"
#include "fpdfsave.h"
#include "fsdk_rendercontext.h"
#include "fpdf_transformpage.h"
+#pragma GCC diagnostic pop
+
#include "SkMatrix.h"
-#include <android_runtime/AndroidRuntime.h>
+#include <core_jni_helpers.h>
#include <vector>
#include <utils/Log.h>
#include <unistd.h>
@@ -92,12 +97,12 @@ static jlong nativeOpen(JNIEnv* env, jclass thiz, jint fd, jlong size) {
switch (error) {
case FPDF_ERR_PASSWORD:
case FPDF_ERR_SECURITY: {
- jniThrowException(env, "java/lang/SecurityException",
- "cannot create document. Error:" + error);
+ jniThrowExceptionFmt(env, "java/lang/SecurityException",
+ "cannot create document. Error: %ld", error);
} break;
default: {
- jniThrowException(env, "java/io/IOException",
- "cannot create document. Error:" + error);
+ jniThrowExceptionFmt(env, "java/io/IOException",
+ "cannot create document. Error: %ld", error);
} break;
}
destroyLibraryIfNeeded();
@@ -150,7 +155,7 @@ static bool writeAllBytes(const int fd, const void* buffer, const size_t byteCou
static int writeBlock(FPDF_FILEWRITE* owner, const void* buffer, unsigned long size) {
const PdfToFdWriter* writer = reinterpret_cast<PdfToFdWriter*>(owner);
const bool success = writeAllBytes(writer->dstFd, buffer, size);
- if (success < 0) {
+ if (!success) {
ALOGE("Cannot write to file descriptor. Error:%d", errno);
return 0;
}
@@ -164,8 +169,8 @@ static void nativeWrite(JNIEnv* env, jclass thiz, jlong documentPtr, jint fd) {
writer.WriteBlock = &writeBlock;
const bool success = FPDF_SaveAsCopy(document, &writer, FPDF_NO_INCREMENTAL);
if (!success) {
- jniThrowException(env, "java/io/IOException",
- "cannot write to fd. Error:" + errno);
+ jniThrowExceptionFmt(env, "java/io/IOException",
+ "cannot write to fd. Error: %d", errno);
destroyLibraryIfNeeded();
}
}
@@ -350,19 +355,19 @@ static JNINativeMethod gPdfEditor_Methods[] = {
};
int register_android_graphics_pdf_PdfEditor(JNIEnv* env) {
- const int result = android::AndroidRuntime::registerNativeMethods(
+ const int result = RegisterMethodsOrDie(
env, "android/graphics/pdf/PdfEditor", gPdfEditor_Methods,
NELEM(gPdfEditor_Methods));
- jclass pointClass = env->FindClass("android/graphics/Point");
- gPointClassInfo.x = env->GetFieldID(pointClass, "x", "I");
- gPointClassInfo.y = env->GetFieldID(pointClass, "y", "I");
+ jclass pointClass = FindClassOrDie(env, "android/graphics/Point");
+ gPointClassInfo.x = GetFieldIDOrDie(env, pointClass, "x", "I");
+ gPointClassInfo.y = GetFieldIDOrDie(env, pointClass, "y", "I");
- jclass rectClass = env->FindClass("android/graphics/Rect");
- gRectClassInfo.left = env->GetFieldID(rectClass, "left", "I");
- gRectClassInfo.top = env->GetFieldID(rectClass, "top", "I");
- gRectClassInfo.right = env->GetFieldID(rectClass, "right", "I");
- gRectClassInfo.bottom = env->GetFieldID(rectClass, "bottom", "I");
+ jclass rectClass = FindClassOrDie(env, "android/graphics/Rect");
+ gRectClassInfo.left = GetFieldIDOrDie(env, rectClass, "left", "I");
+ gRectClassInfo.top = GetFieldIDOrDie(env, rectClass, "top", "I");
+ gRectClassInfo.right = GetFieldIDOrDie(env, rectClass, "right", "I");
+ gRectClassInfo.bottom = GetFieldIDOrDie(env, rectClass, "bottom", "I");
return result;
};
diff --git a/core/jni/android/graphics/pdf/PdfRenderer.cpp b/core/jni/android/graphics/pdf/PdfRenderer.cpp
index 357d3c0..ae23cb4 100644
--- a/core/jni/android/graphics/pdf/PdfRenderer.cpp
+++ b/core/jni/android/graphics/pdf/PdfRenderer.cpp
@@ -20,9 +20,13 @@
#include "SkBitmap.h"
#include "SkMatrix.h"
#include "fpdfview.h"
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
#include "fsdk_rendercontext.h"
+#pragma GCC diagnostic pop
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <vector>
#include <utils/Log.h>
#include <unistd.h>
@@ -85,12 +89,12 @@ static jlong nativeCreate(JNIEnv* env, jclass thiz, jint fd, jlong size) {
switch (error) {
case FPDF_ERR_PASSWORD:
case FPDF_ERR_SECURITY: {
- jniThrowException(env, "java/lang/SecurityException",
- "cannot create document. Error:" + error);
+ jniThrowExceptionFmt(env, "java/lang/SecurityException",
+ "cannot create document. Error: %ld", error);
} break;
default: {
- jniThrowException(env, "java/io/IOException",
- "cannot create document. Error:" + error);
+ jniThrowExceptionFmt(env, "java/io/IOException",
+ "cannot create document. Error: %ld", error);
} break;
}
destroyLibraryIfNeeded();
@@ -237,7 +241,6 @@ static void nativeRenderPage(JNIEnv* env, jclass thiz, jlong documentPtr, jlong
jlong bitmapPtr, jint destLeft, jint destTop, jint destRight, jint destBottom,
jlong matrixPtr, jint renderMode) {
- FPDF_DOCUMENT document = reinterpret_cast<FPDF_DOCUMENT>(documentPtr);
FPDF_PAGE page = reinterpret_cast<FPDF_PAGE>(pagePtr);
SkBitmap* skBitmap = reinterpret_cast<SkBitmap*>(bitmapPtr);
SkMatrix* skMatrix = reinterpret_cast<SkMatrix*>(matrixPtr);
@@ -279,13 +282,13 @@ static JNINativeMethod gPdfRenderer_Methods[] = {
};
int register_android_graphics_pdf_PdfRenderer(JNIEnv* env) {
- int result = android::AndroidRuntime::registerNativeMethods(
+ int result = RegisterMethodsOrDie(
env, "android/graphics/pdf/PdfRenderer", gPdfRenderer_Methods,
NELEM(gPdfRenderer_Methods));
- jclass clazz = env->FindClass("android/graphics/Point");
- gPointClassInfo.x = env->GetFieldID(clazz, "x", "I");
- gPointClassInfo.y = env->GetFieldID(clazz, "y", "I");
+ jclass clazz = FindClassOrDie(env, "android/graphics/Point");
+ gPointClassInfo.x = GetFieldIDOrDie(env, clazz, "x", "I");
+ gPointClassInfo.y = GetFieldIDOrDie(env, clazz, "y", "I");
return result;
};
diff --git a/core/jni/android/opengl/poly_clip.cpp b/core/jni/android/opengl/poly_clip.cpp
index 04e4b17..5c65220 100644
--- a/core/jni/android/opengl/poly_clip.cpp
+++ b/core/jni/android/opengl/poly_clip.cpp
@@ -58,7 +58,6 @@ namespace android {
void poly_clip_to_halfspace(Poly* p, Poly* q, int index, float sign, float k)
{
- unsigned long m;
float *up, *vp, *wp;
Poly_vert *v;
int i;
diff --git a/core/jni/android/opengl/util.cpp b/core/jni/android/opengl/util.cpp
index 89baef8..da30044 100644
--- a/core/jni/android/opengl/util.cpp
+++ b/core/jni/android/opengl/util.cpp
@@ -29,7 +29,7 @@
#include <SkBitmap.h>
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#undef LOG_TAG
#define LOG_TAG "OpenGLUtil"
@@ -471,13 +471,13 @@ static
void multiplyMM(float* r, const float* lhs, const float* rhs)
{
for (int i=0 ; i<4 ; i++) {
- register const float rhs_i0 = rhs[ I(i,0) ];
- register float ri0 = lhs[ I(0,0) ] * rhs_i0;
- register float ri1 = lhs[ I(0,1) ] * rhs_i0;
- register float ri2 = lhs[ I(0,2) ] * rhs_i0;
- register float ri3 = lhs[ I(0,3) ] * rhs_i0;
+ const float rhs_i0 = rhs[ I(i,0) ];
+ float ri0 = lhs[ I(0,0) ] * rhs_i0;
+ float ri1 = lhs[ I(0,1) ] * rhs_i0;
+ float ri2 = lhs[ I(0,2) ] * rhs_i0;
+ float ri3 = lhs[ I(0,3) ] * rhs_i0;
for (int j=1 ; j<4 ; j++) {
- register const float rhs_ij = rhs[ I(i,j) ];
+ const float rhs_ij = rhs[ I(i,j) ];
ri0 += lhs[ I(j,0) ] * rhs_ij;
ri1 += lhs[ I(j,1) ] * rhs_ij;
ri2 += lhs[ I(j,2) ] * rhs_ij;
@@ -732,24 +732,22 @@ static jfieldID elementSizeShiftID;
/* Cache method IDs each time the class is loaded. */
static void
-nativeClassInitBuffer(JNIEnv *_env)
+nativeClassInitBuffer(JNIEnv *env)
{
- jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess");
- nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal);
-
- jclass bufferClassLocal = _env->FindClass("java/nio/Buffer");
- bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal);
-
- getBasePointerID = _env->GetStaticMethodID(nioAccessClass,
+ jclass nioAccessClassLocal = FindClassOrDie(env, "java/nio/NIOAccess");
+ nioAccessClass = MakeGlobalRefOrDie(env, nioAccessClassLocal);
+ getBasePointerID = GetStaticMethodIDOrDie(env, nioAccessClass,
"getBasePointer", "(Ljava/nio/Buffer;)J");
- getBaseArrayID = _env->GetStaticMethodID(nioAccessClass,
+ getBaseArrayID = GetStaticMethodIDOrDie(env, nioAccessClass,
"getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
- getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass,
+ getBaseArrayOffsetID = GetStaticMethodIDOrDie(env, nioAccessClass,
"getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
- positionID = _env->GetFieldID(bufferClass, "position", "I");
- limitID = _env->GetFieldID(bufferClass, "limit", "I");
- elementSizeShiftID =
- _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
+
+ jclass bufferClassLocal = FindClassOrDie(env, "java/nio/Buffer");
+ bufferClass = MakeGlobalRefOrDie(env, bufferClassLocal);
+ positionID = GetFieldIDOrDie(env, bufferClass, "position", "I");
+ limitID = GetFieldIDOrDie(env, bufferClass, "limit", "I");
+ elementSizeShiftID = GetFieldIDOrDie(env, bufferClass, "_elementSizeShift", "I");
}
static void *
@@ -759,8 +757,6 @@ getPointer(JNIEnv *_env, jobject buffer, jint *remaining)
jint limit;
jint elementSizeShift;
jlong pointer;
- jint offset;
- void *data;
position = _env->GetIntField(buffer, positionID);
limit = _env->GetIntField(buffer, limitID);
@@ -900,10 +896,8 @@ static void etc1_encodeImage(JNIEnv *env, jclass clazz,
} else if (outB.remaining() < encodedImageSize) {
doThrowIAE(env, "out's remaining data < encoded image size");
} else {
- int result = etc1_encode_image((etc1_byte*) inB.getData(),
- width, height, pixelSize,
- stride,
- (etc1_byte*) outB.getData());
+ etc1_encode_image((etc1_byte*) inB.getData(), width, height, pixelSize, stride,
+ (etc1_byte*) outB.getData());
}
}
}
@@ -933,10 +927,8 @@ static void etc1_decodeImage(JNIEnv *env, jclass clazz,
} else if (outB.remaining() < imageSize) {
doThrowIAE(env, "out's remaining data < image size");
} else {
- int result = etc1_decode_image((etc1_byte*) inB.getData(),
- (etc1_byte*) outB.getData(),
- width, height, pixelSize,
- stride);
+ etc1_decode_image((etc1_byte*) inB.getData(), (etc1_byte*) outB.getData(),
+ width, height, pixelSize, stride);
}
}
}
@@ -1062,12 +1054,7 @@ int register_android_opengl_classes(JNIEnv* env)
int result = 0;
for (int i = 0; i < NELEM(gClasses); i++) {
ClassRegistrationInfo* cri = &gClasses[i];
- result = AndroidRuntime::registerNativeMethods(env,
- cri->classPath, cri->methods, cri->methodCount);
- if (result < 0) {
- ALOGE("Failed to register %s: %d", cri->classPath, result);
- break;
- }
+ result = RegisterMethodsOrDie(env, cri->classPath, cri->methods, cri->methodCount);
}
return result;
}
diff --git a/core/jni/android_animation_PropertyValuesHolder.cpp b/core/jni/android_animation_PropertyValuesHolder.cpp
index ef1c4ed..d117741 100644
--- a/core/jni/android_animation_PropertyValuesHolder.cpp
+++ b/core/jni/android_animation_PropertyValuesHolder.cpp
@@ -18,7 +18,7 @@
#include <assert.h>
#include "jni.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <utils/misc.h>
// ----------------------------------------------------------------------------
@@ -168,8 +168,7 @@ static JNINativeMethod gMethods[] = {
int register_android_animation_PropertyValuesHolder(JNIEnv* env)
{
- return AndroidRuntime::registerNativeMethods(env,
- kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
};
diff --git a/core/jni/android_app_NativeActivity.cpp b/core/jni/android_app_NativeActivity.cpp
index 633a207..95be3f2 100644
--- a/core/jni/android_app_NativeActivity.cpp
+++ b/core/jni/android_app_NativeActivity.cpp
@@ -40,12 +40,17 @@
#include "nativebridge/native_bridge.h"
+#include "core_jni_helpers.h"
+
+
#define LOG_TRACE(...)
//#define LOG_TRACE(...) ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__)
namespace android
{
+static const bool kLogTrace = false;
+
static struct {
jmethodID finish;
jmethodID setWindowFlags;
@@ -75,8 +80,10 @@ static void write_work(int fd, int32_t cmd, int32_t arg1=0, int32_t arg2=0) {
work.cmd = cmd;
work.arg1 = arg1;
work.arg2 = arg2;
-
- LOG_TRACE("write_work: cmd=%d", cmd);
+
+ if (kLogTrace) {
+ ALOGD("write_work: cmd=%d", cmd);
+ }
restart:
int res = write(fd, &work, sizeof(work));
@@ -206,7 +213,9 @@ static int mainWorkCallback(int fd, int events, void* data) {
return 1;
}
- LOG_TRACE("mainWorkCallback: cmd=%d", work.cmd);
+ if (kLogTrace) {
+ ALOGD("mainWorkCallback: cmd=%d", work.cmd);
+ }
switch (work.cmd) {
case CMD_FINISH: {
@@ -249,7 +258,9 @@ loadNativeCode_native(JNIEnv* env, jobject clazz, jstring path, jstring funcName
jstring externalDataDir, jint sdkVersion,
jobject jAssetMgr, jbyteArray savedState)
{
- LOG_TRACE("loadNativeCode_native");
+ if (kLogTrace) {
+ ALOGD("loadNativeCode_native");
+ }
const char* pathStr = env->GetStringUTFChars(path, NULL);
NativeCode* code = NULL;
@@ -358,7 +369,9 @@ loadNativeCode_native(JNIEnv* env, jobject clazz, jstring path, jstring funcName
static void
unloadNativeCode_native(JNIEnv* env, jobject clazz, jlong handle)
{
- LOG_TRACE("unloadNativeCode_native");
+ if (kLogTrace) {
+ ALOGD("unloadNativeCode_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
delete code;
@@ -368,7 +381,9 @@ unloadNativeCode_native(JNIEnv* env, jobject clazz, jlong handle)
static void
onStart_native(JNIEnv* env, jobject clazz, jlong handle)
{
- LOG_TRACE("onStart_native");
+ if (kLogTrace) {
+ ALOGD("onStart_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->callbacks.onStart != NULL) {
@@ -380,7 +395,9 @@ onStart_native(JNIEnv* env, jobject clazz, jlong handle)
static void
onResume_native(JNIEnv* env, jobject clazz, jlong handle)
{
- LOG_TRACE("onResume_native");
+ if (kLogTrace) {
+ ALOGD("onResume_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->callbacks.onResume != NULL) {
@@ -392,7 +409,9 @@ onResume_native(JNIEnv* env, jobject clazz, jlong handle)
static jbyteArray
onSaveInstanceState_native(JNIEnv* env, jobject clazz, jlong handle)
{
- LOG_TRACE("onSaveInstanceState_native");
+ if (kLogTrace) {
+ ALOGD("onSaveInstanceState_native");
+ }
jbyteArray array = NULL;
@@ -419,7 +438,9 @@ onSaveInstanceState_native(JNIEnv* env, jobject clazz, jlong handle)
static void
onPause_native(JNIEnv* env, jobject clazz, jlong handle)
{
- LOG_TRACE("onPause_native");
+ if (kLogTrace) {
+ ALOGD("onPause_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->callbacks.onPause != NULL) {
@@ -431,7 +452,9 @@ onPause_native(JNIEnv* env, jobject clazz, jlong handle)
static void
onStop_native(JNIEnv* env, jobject clazz, jlong handle)
{
- LOG_TRACE("onStop_native");
+ if (kLogTrace) {
+ ALOGD("onStop_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->callbacks.onStop != NULL) {
@@ -443,7 +466,9 @@ onStop_native(JNIEnv* env, jobject clazz, jlong handle)
static void
onConfigurationChanged_native(JNIEnv* env, jobject clazz, jlong handle)
{
- LOG_TRACE("onConfigurationChanged_native");
+ if (kLogTrace) {
+ ALOGD("onConfigurationChanged_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->callbacks.onConfigurationChanged != NULL) {
@@ -455,7 +480,9 @@ onConfigurationChanged_native(JNIEnv* env, jobject clazz, jlong handle)
static void
onLowMemory_native(JNIEnv* env, jobject clazz, jlong handle)
{
- LOG_TRACE("onLowMemory_native");
+ if (kLogTrace) {
+ ALOGD("onLowMemory_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->callbacks.onLowMemory != NULL) {
@@ -467,7 +494,9 @@ onLowMemory_native(JNIEnv* env, jobject clazz, jlong handle)
static void
onWindowFocusChanged_native(JNIEnv* env, jobject clazz, jlong handle, jboolean focused)
{
- LOG_TRACE("onWindowFocusChanged_native");
+ if (kLogTrace) {
+ ALOGD("onWindowFocusChanged_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->callbacks.onWindowFocusChanged != NULL) {
@@ -479,7 +508,9 @@ onWindowFocusChanged_native(JNIEnv* env, jobject clazz, jlong handle, jboolean f
static void
onSurfaceCreated_native(JNIEnv* env, jobject clazz, jlong handle, jobject surface)
{
- LOG_TRACE("onSurfaceCreated_native");
+ if (kLogTrace) {
+ ALOGD("onSurfaceCreated_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
code->setSurface(surface);
@@ -500,7 +531,9 @@ static void
onSurfaceChanged_native(JNIEnv* env, jobject clazz, jlong handle, jobject surface,
jint format, jint width, jint height)
{
- LOG_TRACE("onSurfaceChanged_native");
+ if (kLogTrace) {
+ ALOGD("onSurfaceChanged_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
sp<ANativeWindow> oldNativeWindow = code->nativeWindow;
@@ -540,7 +573,9 @@ onSurfaceChanged_native(JNIEnv* env, jobject clazz, jlong handle, jobject surfac
static void
onSurfaceRedrawNeeded_native(JNIEnv* env, jobject clazz, jlong handle)
{
- LOG_TRACE("onSurfaceRedrawNeeded_native");
+ if (kLogTrace) {
+ ALOGD("onSurfaceRedrawNeeded_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->nativeWindow != NULL && code->callbacks.onNativeWindowRedrawNeeded != NULL) {
@@ -552,7 +587,9 @@ onSurfaceRedrawNeeded_native(JNIEnv* env, jobject clazz, jlong handle)
static void
onSurfaceDestroyed_native(JNIEnv* env, jobject clazz, jlong handle, jobject surface)
{
- LOG_TRACE("onSurfaceDestroyed_native");
+ if (kLogTrace) {
+ ALOGD("onSurfaceDestroyed_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->nativeWindow != NULL && code->callbacks.onNativeWindowDestroyed != NULL) {
@@ -566,7 +603,9 @@ onSurfaceDestroyed_native(JNIEnv* env, jobject clazz, jlong handle, jobject surf
static void
onInputQueueCreated_native(JNIEnv* env, jobject clazz, jlong handle, jlong queuePtr)
{
- LOG_TRACE("onInputChannelCreated_native");
+ if (kLogTrace) {
+ ALOGD("onInputChannelCreated_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->callbacks.onInputQueueCreated != NULL) {
@@ -579,7 +618,9 @@ onInputQueueCreated_native(JNIEnv* env, jobject clazz, jlong handle, jlong queue
static void
onInputQueueDestroyed_native(JNIEnv* env, jobject clazz, jlong handle, jlong queuePtr)
{
- LOG_TRACE("onInputChannelDestroyed_native");
+ if (kLogTrace) {
+ ALOGD("onInputChannelDestroyed_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->callbacks.onInputQueueDestroyed != NULL) {
@@ -593,7 +634,9 @@ static void
onContentRectChanged_native(JNIEnv* env, jobject clazz, jlong handle,
jint x, jint y, jint w, jint h)
{
- LOG_TRACE("onContentRectChanged_native");
+ if (kLogTrace) {
+ ALOGD("onContentRectChanged_native");
+ }
if (handle != 0) {
NativeCode* code = (NativeCode*)handle;
if (code->callbacks.onContentRectChanged != NULL) {
@@ -632,39 +675,20 @@ static const JNINativeMethod g_methods[] = {
static const char* const kNativeActivityPathName = "android/app/NativeActivity";
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class %s", className);
-
-#define GET_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
- var = env->GetMethodID(clazz, methodName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method" methodName);
-
int register_android_app_NativeActivity(JNIEnv* env)
{
//ALOGD("register_android_app_NativeActivity");
- jclass clazz;
- FIND_CLASS(clazz, kNativeActivityPathName);
-
- GET_METHOD_ID(gNativeActivityClassInfo.finish,
- clazz,
- "finish", "()V");
- GET_METHOD_ID(gNativeActivityClassInfo.setWindowFlags,
- clazz,
- "setWindowFlags", "(II)V");
- GET_METHOD_ID(gNativeActivityClassInfo.setWindowFormat,
- clazz,
- "setWindowFormat", "(I)V");
- GET_METHOD_ID(gNativeActivityClassInfo.showIme,
- clazz,
- "showIme", "(I)V");
- GET_METHOD_ID(gNativeActivityClassInfo.hideIme,
- clazz,
- "hideIme", "(I)V");
-
- return AndroidRuntime::registerNativeMethods(
- env, kNativeActivityPathName,
- g_methods, NELEM(g_methods));
+ jclass clazz = FindClassOrDie(env, kNativeActivityPathName);
+
+ gNativeActivityClassInfo.finish = GetMethodIDOrDie(env, clazz, "finish", "()V");
+ gNativeActivityClassInfo.setWindowFlags = GetMethodIDOrDie(env, clazz, "setWindowFlags",
+ "(II)V");
+ gNativeActivityClassInfo.setWindowFormat = GetMethodIDOrDie(env, clazz, "setWindowFormat",
+ "(I)V");
+ gNativeActivityClassInfo.showIme = GetMethodIDOrDie(env, clazz, "showIme", "(I)V");
+ gNativeActivityClassInfo.hideIme = GetMethodIDOrDie(env, clazz, "hideIme", "(I)V");
+
+ return RegisterMethodsOrDie(env, kNativeActivityPathName, g_methods, NELEM(g_methods));
}
} // namespace android
diff --git a/core/jni/android_app_backup_FullBackup.cpp b/core/jni/android_app_backup_FullBackup.cpp
index 3cfaa82..2c02b37 100644
--- a/core/jni/android_app_backup_FullBackup.cpp
+++ b/core/jni/android_app_backup_FullBackup.cpp
@@ -23,6 +23,8 @@
#include <androidfw/BackupHelpers.h>
+#include "core_jni_helpers.h"
+
#include <string.h>
namespace android
@@ -73,8 +75,6 @@ static struct {
static jint backupToTar(JNIEnv* env, jobject clazz, jstring packageNameObj,
jstring domainObj, jstring linkdomain,
jstring rootpathObj, jstring pathObj, jobject dataOutputObj) {
- int ret;
-
// Extract the various strings, allowing for null object pointers
const char* packagenamechars = (packageNameObj) ? env->GetStringUTFChars(packageNameObj, NULL) : NULL;
const char* rootchars = (rootpathObj) ? env->GetStringUTFChars(rootpathObj, NULL) : NULL;
@@ -118,15 +118,11 @@ static const JNINativeMethod g_methods[] = {
int register_android_app_backup_FullBackup(JNIEnv* env)
{
- jclass clazz = env->FindClass("android/app/backup/BackupDataOutput");
- LOG_FATAL_IF(clazz == NULL, "Unable to find class android.app.backup.BackupDataOutput");
+ jclass clazz = FindClassOrDie(env, "android/app/backup/BackupDataOutput");
- sBackupDataOutput.mBackupWriter = env->GetFieldID(clazz, "mBackupWriter", "J");
- LOG_FATAL_IF(sBackupDataOutput.mBackupwriter == NULL,
- "Unable to find mBackupWriter field in android.app.backup.BackupDataOutput");
+ sBackupDataOutput.mBackupWriter = GetFieldIDOrDie(env, clazz, "mBackupWriter", "J");
- return AndroidRuntime::registerNativeMethods(env, "android/app/backup/FullBackup",
- g_methods, NELEM(g_methods));
+ return RegisterMethodsOrDie(env, "android/app/backup/FullBackup", g_methods, NELEM(g_methods));
}
}
diff --git a/core/jni/android_backup_BackupDataInput.cpp b/core/jni/android_backup_BackupDataInput.cpp
index 90763b0..096a784 100644
--- a/core/jni/android_backup_BackupDataInput.cpp
+++ b/core/jni/android_backup_BackupDataInput.cpp
@@ -22,6 +22,8 @@
#include <androidfw/BackupHelpers.h>
+#include "core_jni_helpers.h"
+
namespace android
{
@@ -135,17 +137,12 @@ int register_android_backup_BackupDataInput(JNIEnv* env)
{
//ALOGD("register_android_backup_BackupDataInput");
- jclass clazz = env->FindClass("android/app/backup/BackupDataInput$EntityHeader");
- LOG_FATAL_IF(clazz == NULL, "Unable to find class android.app.backup.BackupDataInput.EntityHeader");
- s_keyField = env->GetFieldID(clazz, "key", "Ljava/lang/String;");
- LOG_FATAL_IF(s_keyField == NULL,
- "Unable to find key field in android.app.backup.BackupDataInput.EntityHeader");
- s_dataSizeField = env->GetFieldID(clazz, "dataSize", "I");
- LOG_FATAL_IF(s_dataSizeField == NULL,
- "Unable to find dataSize field in android.app.backup.BackupDataInput.EntityHeader");
-
- return AndroidRuntime::registerNativeMethods(env, "android/app/backup/BackupDataInput",
- g_methods, NELEM(g_methods));
+ jclass clazz = FindClassOrDie(env, "android/app/backup/BackupDataInput$EntityHeader");
+ s_keyField = GetFieldIDOrDie(env, clazz, "key", "Ljava/lang/String;");
+ s_dataSizeField = GetFieldIDOrDie(env, clazz, "dataSize", "I");
+
+ return RegisterMethodsOrDie(env, "android/app/backup/BackupDataInput", g_methods,
+ NELEM(g_methods));
}
}
diff --git a/core/jni/android_backup_BackupDataOutput.cpp b/core/jni/android_backup_BackupDataOutput.cpp
index 8244e1b..a7894f4 100644
--- a/core/jni/android_backup_BackupDataOutput.cpp
+++ b/core/jni/android_backup_BackupDataOutput.cpp
@@ -18,7 +18,7 @@
#include <utils/Log.h>
#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <androidfw/BackupHelpers.h>
@@ -85,7 +85,6 @@ writeEntityData_native(JNIEnv* env, jobject clazz, jlong w, jbyteArray data, jin
static void
setKeyPrefix_native(JNIEnv* env, jobject clazz, jlong w, jstring keyPrefixObj)
{
- int err;
BackupDataWriter* writer = (BackupDataWriter*)w;
const char* keyPrefixUTF = env->GetStringUTFChars(keyPrefixObj, NULL);
@@ -107,7 +106,7 @@ static const JNINativeMethod g_methods[] = {
int register_android_backup_BackupDataOutput(JNIEnv* env)
{
//ALOGD("register_android_backup_BackupDataOutput");
- return AndroidRuntime::registerNativeMethods(env, "android/app/backup/BackupDataOutput",
+ return RegisterMethodsOrDie(env, "android/app/backup/BackupDataOutput",
g_methods, NELEM(g_methods));
}
diff --git a/core/jni/android_backup_BackupHelperDispatcher.cpp b/core/jni/android_backup_BackupHelperDispatcher.cpp
index a8b7d44..80bdaf8 100644
--- a/core/jni/android_backup_BackupHelperDispatcher.cpp
+++ b/core/jni/android_backup_BackupHelperDispatcher.cpp
@@ -24,6 +24,7 @@
#include <sys/uio.h>
#include <unistd.h>
+#include "core_jni_helpers.h"
#define VERSION_1_HEADER 0x01706c48 // 'Hlp'1 little endian
@@ -227,18 +228,12 @@ static const JNINativeMethod g_methods[] = {
int register_android_backup_BackupHelperDispatcher(JNIEnv* env)
{
- jclass clazz = env->FindClass("android/app/backup/BackupHelperDispatcher$Header");
- LOG_FATAL_IF(clazz == NULL,
- "Unable to find class android.app.backup.BackupHelperDispatcher.Header");
- s_chunkSizeField = env->GetFieldID(clazz, "chunkSize", "I");
- LOG_FATAL_IF(s_chunkSizeField == NULL,
- "Unable to find chunkSize field in android.app.backup.BackupHelperDispatcher.Header");
- s_keyPrefixField = env->GetFieldID(clazz, "keyPrefix", "Ljava/lang/String;");
- LOG_FATAL_IF(s_keyPrefixField == NULL,
- "Unable to find keyPrefix field in android.app.backup.BackupHelperDispatcher.Header");
-
- return AndroidRuntime::registerNativeMethods(env, "android/app/backup/BackupHelperDispatcher",
- g_methods, NELEM(g_methods));
+ jclass clazz = FindClassOrDie(env, "android/app/backup/BackupHelperDispatcher$Header");
+ s_chunkSizeField = GetFieldIDOrDie(env, clazz, "chunkSize", "I");
+ s_keyPrefixField = GetFieldIDOrDie(env, clazz, "keyPrefix", "Ljava/lang/String;");
+
+ return RegisterMethodsOrDie(env, "android/app/backup/BackupHelperDispatcher", g_methods,
+ NELEM(g_methods));
}
}
diff --git a/core/jni/android_backup_FileBackupHelperBase.cpp b/core/jni/android_backup_FileBackupHelperBase.cpp
index 66e3e9d..6d6ac1b 100644
--- a/core/jni/android_backup_FileBackupHelperBase.cpp
+++ b/core/jni/android_backup_FileBackupHelperBase.cpp
@@ -18,7 +18,7 @@
#include <utils/Log.h>
#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <androidfw/BackupHelpers.h>
@@ -118,7 +118,7 @@ static const JNINativeMethod g_methods[] = {
int register_android_backup_FileBackupHelperBase(JNIEnv* env)
{
- return AndroidRuntime::registerNativeMethods(env, "android/app/backup/FileBackupHelperBase",
+ return RegisterMethodsOrDie(env, "android/app/backup/FileBackupHelperBase",
g_methods, NELEM(g_methods));
}
diff --git a/core/jni/android_content_res_Configuration.cpp b/core/jni/android_content_res_Configuration.cpp
index 201ffe8..3b45e72 100644
--- a/core/jni/android_content_res_Configuration.cpp
+++ b/core/jni/android_content_res_Configuration.cpp
@@ -23,6 +23,8 @@
#include <android_runtime/android_content_res_Configuration.h>
#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
+
namespace android {
static struct {
@@ -70,49 +72,27 @@ void android_Configuration_getFromJava(
gConfigurationClassInfo.smallestScreenWidthDp);
}
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
int register_android_content_res_Configuration(JNIEnv* env)
{
- jclass clazz;
- FIND_CLASS(clazz, "android/content/res/Configuration");
+ jclass clazz = FindClassOrDie(env, "android/content/res/Configuration");
- GET_FIELD_ID(gConfigurationClassInfo.mcc, clazz,
- "mcc", "I");
- GET_FIELD_ID(gConfigurationClassInfo.mnc, clazz,
- "mnc", "I");
- GET_FIELD_ID(gConfigurationClassInfo.locale, clazz,
- "locale", "Ljava/util/Locale;");
- GET_FIELD_ID(gConfigurationClassInfo.screenLayout, clazz,
- "screenLayout", "I");
- GET_FIELD_ID(gConfigurationClassInfo.touchscreen, clazz,
- "touchscreen", "I");
- GET_FIELD_ID(gConfigurationClassInfo.keyboard, clazz,
- "keyboard", "I");
- GET_FIELD_ID(gConfigurationClassInfo.keyboardHidden, clazz,
- "keyboardHidden", "I");
- GET_FIELD_ID(gConfigurationClassInfo.hardKeyboardHidden, clazz,
- "hardKeyboardHidden", "I");
- GET_FIELD_ID(gConfigurationClassInfo.navigation, clazz,
- "navigation", "I");
- GET_FIELD_ID(gConfigurationClassInfo.navigationHidden, clazz,
- "navigationHidden", "I");
- GET_FIELD_ID(gConfigurationClassInfo.orientation, clazz,
- "orientation", "I");
- GET_FIELD_ID(gConfigurationClassInfo.uiMode, clazz,
- "uiMode", "I");
- GET_FIELD_ID(gConfigurationClassInfo.screenWidthDp, clazz,
- "screenWidthDp", "I");
- GET_FIELD_ID(gConfigurationClassInfo.screenHeightDp, clazz,
- "screenHeightDp", "I");
- GET_FIELD_ID(gConfigurationClassInfo.smallestScreenWidthDp, clazz,
- "smallestScreenWidthDp", "I");
+ gConfigurationClassInfo.mcc = GetFieldIDOrDie(env, clazz, "mcc", "I");
+ gConfigurationClassInfo.mnc = GetFieldIDOrDie(env, clazz, "mnc", "I");
+ gConfigurationClassInfo.locale = GetFieldIDOrDie(env, clazz, "locale", "Ljava/util/Locale;");
+ gConfigurationClassInfo.screenLayout = GetFieldIDOrDie(env, clazz, "screenLayout", "I");
+ gConfigurationClassInfo.touchscreen = GetFieldIDOrDie(env, clazz, "touchscreen", "I");
+ gConfigurationClassInfo.keyboard = GetFieldIDOrDie(env, clazz, "keyboard", "I");
+ gConfigurationClassInfo.keyboardHidden = GetFieldIDOrDie(env, clazz, "keyboardHidden", "I");
+ gConfigurationClassInfo.hardKeyboardHidden = GetFieldIDOrDie(env, clazz, "hardKeyboardHidden",
+ "I");
+ gConfigurationClassInfo.navigation = GetFieldIDOrDie(env, clazz, "navigation", "I");
+ gConfigurationClassInfo.navigationHidden = GetFieldIDOrDie(env, clazz, "navigationHidden", "I");
+ gConfigurationClassInfo.orientation = GetFieldIDOrDie(env, clazz, "orientation", "I");
+ gConfigurationClassInfo.uiMode = GetFieldIDOrDie(env, clazz, "uiMode", "I");
+ gConfigurationClassInfo.screenWidthDp = GetFieldIDOrDie(env, clazz, "screenWidthDp", "I");
+ gConfigurationClassInfo.screenHeightDp = GetFieldIDOrDie(env, clazz, "screenHeightDp", "I");
+ gConfigurationClassInfo.smallestScreenWidthDp = GetFieldIDOrDie(env, clazz,
+ "smallestScreenWidthDp", "I");
return 0;
}
diff --git a/core/jni/android_content_res_ObbScanner.cpp b/core/jni/android_content_res_ObbScanner.cpp
index 5d51ee2..ef17db6 100644
--- a/core/jni/android_content_res_ObbScanner.cpp
+++ b/core/jni/android_content_res_ObbScanner.cpp
@@ -25,6 +25,8 @@
#include "utils/misc.h"
#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
+
namespace android {
static struct {
@@ -80,30 +82,17 @@ static JNINativeMethod gMethods[] = {
(void*) android_content_res_ObbScanner_getObbInfo },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
int register_android_content_res_ObbScanner(JNIEnv* env)
{
- jclass clazz;
- FIND_CLASS(clazz, "android/content/res/ObbInfo");
-
- GET_FIELD_ID(gObbInfoClassInfo.packageName, clazz,
- "packageName", "Ljava/lang/String;");
- GET_FIELD_ID(gObbInfoClassInfo.version, clazz,
- "version", "I");
- GET_FIELD_ID(gObbInfoClassInfo.flags, clazz,
- "flags", "I");
- GET_FIELD_ID(gObbInfoClassInfo.salt, clazz,
- "salt", "[B");
-
- return AndroidRuntime::registerNativeMethods(env, "android/content/res/ObbScanner", gMethods,
- NELEM(gMethods));
+ jclass clazz = FindClassOrDie(env, "android/content/res/ObbInfo");
+
+ gObbInfoClassInfo.packageName = GetFieldIDOrDie(env, clazz, "packageName",
+ "Ljava/lang/String;");
+ gObbInfoClassInfo.version = GetFieldIDOrDie(env, clazz, "version", "I");
+ gObbInfoClassInfo.flags = GetFieldIDOrDie(env, clazz, "flags", "I");
+ gObbInfoClassInfo.salt = GetFieldIDOrDie(env, clazz, "salt", "[B");
+
+ return RegisterMethodsOrDie(env, "android/content/res/ObbScanner", gMethods, NELEM(gMethods));
}
}; // namespace android
diff --git a/core/jni/android_database_CursorWindow.cpp b/core/jni/android_database_CursorWindow.cpp
index af6cc72..580ac02 100644
--- a/core/jni/android_database_CursorWindow.cpp
+++ b/core/jni/android_database_CursorWindow.cpp
@@ -36,6 +36,8 @@
#include "android_util_Binder.h"
#include "android_database_SQLiteCommon.h"
+#include "core_jni_helpers.h"
+
namespace android {
static struct {
@@ -522,29 +524,16 @@ static JNINativeMethod sMethods[] =
(void*)nativePutNull },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
-int register_android_database_CursorWindow(JNIEnv * env)
+int register_android_database_CursorWindow(JNIEnv* env)
{
- jclass clazz;
- FIND_CLASS(clazz, "android/database/CharArrayBuffer");
+ jclass clazz = FindClassOrDie(env, "android/database/CharArrayBuffer");
- GET_FIELD_ID(gCharArrayBufferClassInfo.data, clazz,
- "data", "[C");
- GET_FIELD_ID(gCharArrayBufferClassInfo.sizeCopied, clazz,
- "sizeCopied", "I");
+ gCharArrayBufferClassInfo.data = GetFieldIDOrDie(env, clazz, "data", "[C");
+ gCharArrayBufferClassInfo.sizeCopied = GetFieldIDOrDie(env, clazz, "sizeCopied", "I");
- gEmptyString = jstring(env->NewGlobalRef(env->NewStringUTF("")));
- LOG_FATAL_IF(!gEmptyString, "Unable to create empty string");
+ gEmptyString = MakeGlobalRefOrDie(env, env->NewStringUTF(""));
- return AndroidRuntime::registerNativeMethods(env, "android/database/CursorWindow",
- sMethods, NELEM(sMethods));
+ return RegisterMethodsOrDie(env, "android/database/CursorWindow", sMethods, NELEM(sMethods));
}
} // namespace android
diff --git a/core/jni/android_database_SQLiteConnection.cpp b/core/jni/android_database_SQLiteConnection.cpp
index ae56432..7a3cdf6 100644
--- a/core/jni/android_database_SQLiteConnection.cpp
+++ b/core/jni/android_database_SQLiteConnection.cpp
@@ -37,6 +37,8 @@
#include "android_database_SQLiteCommon.h"
+#include "core_jni_helpers.h"
+
// Set to 1 to use UTF16 storage for localized indexes.
#define UTF16_STORAGE 0
@@ -325,7 +327,6 @@ static void nativeFinalizeStatement(JNIEnv* env, jclass clazz, jlong connectionP
static jint nativeGetParameterCount(JNIEnv* env, jclass clazz, jlong connectionPtr,
jlong statementPtr) {
- SQLiteConnection* connection = reinterpret_cast<SQLiteConnection*>(connectionPtr);
sqlite3_stmt* statement = reinterpret_cast<sqlite3_stmt*>(statementPtr);
return sqlite3_bind_parameter_count(statement);
@@ -333,7 +334,6 @@ static jint nativeGetParameterCount(JNIEnv* env, jclass clazz, jlong connectionP
static jboolean nativeIsReadOnly(JNIEnv* env, jclass clazz, jlong connectionPtr,
jlong statementPtr) {
- SQLiteConnection* connection = reinterpret_cast<SQLiteConnection*>(connectionPtr);
sqlite3_stmt* statement = reinterpret_cast<sqlite3_stmt*>(statementPtr);
return sqlite3_stmt_readonly(statement) != 0;
@@ -341,7 +341,6 @@ static jboolean nativeIsReadOnly(JNIEnv* env, jclass clazz, jlong connectionPtr,
static jint nativeGetColumnCount(JNIEnv* env, jclass clazz, jlong connectionPtr,
jlong statementPtr) {
- SQLiteConnection* connection = reinterpret_cast<SQLiteConnection*>(connectionPtr);
sqlite3_stmt* statement = reinterpret_cast<sqlite3_stmt*>(statementPtr);
return sqlite3_column_count(statement);
@@ -349,7 +348,6 @@ static jint nativeGetColumnCount(JNIEnv* env, jclass clazz, jlong connectionPtr,
static jstring nativeGetColumnName(JNIEnv* env, jclass clazz, jlong connectionPtr,
jlong statementPtr, jint index) {
- SQLiteConnection* connection = reinterpret_cast<SQLiteConnection*>(connectionPtr);
sqlite3_stmt* statement = reinterpret_cast<sqlite3_stmt*>(statementPtr);
const jchar* name = static_cast<const jchar*>(sqlite3_column_name16(statement, index));
@@ -845,35 +843,20 @@ static JNINativeMethod sMethods[] =
(void*)nativeResetCancel },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
- var = env->GetMethodID(clazz, methodName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method" methodName);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
int register_android_database_SQLiteConnection(JNIEnv *env)
{
- jclass clazz;
- FIND_CLASS(clazz, "android/database/sqlite/SQLiteCustomFunction");
+ jclass clazz = FindClassOrDie(env, "android/database/sqlite/SQLiteCustomFunction");
- GET_FIELD_ID(gSQLiteCustomFunctionClassInfo.name, clazz,
- "name", "Ljava/lang/String;");
- GET_FIELD_ID(gSQLiteCustomFunctionClassInfo.numArgs, clazz,
- "numArgs", "I");
- GET_METHOD_ID(gSQLiteCustomFunctionClassInfo.dispatchCallback,
- clazz, "dispatchCallback", "([Ljava/lang/String;)V");
+ gSQLiteCustomFunctionClassInfo.name = GetFieldIDOrDie(env, clazz, "name", "Ljava/lang/String;");
+ gSQLiteCustomFunctionClassInfo.numArgs = GetFieldIDOrDie(env, clazz, "numArgs", "I");
+ gSQLiteCustomFunctionClassInfo.dispatchCallback = GetMethodIDOrDie(env, clazz,
+ "dispatchCallback", "([Ljava/lang/String;)V");
- FIND_CLASS(clazz, "java/lang/String");
- gStringClassInfo.clazz = jclass(env->NewGlobalRef(clazz));
+ clazz = FindClassOrDie(env, "java/lang/String");
+ gStringClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
- return AndroidRuntime::registerNativeMethods(env, "android/database/sqlite/SQLiteConnection",
- sMethods, NELEM(sMethods));
+ return RegisterMethodsOrDie(env, "android/database/sqlite/SQLiteConnection", sMethods,
+ NELEM(sMethods));
}
} // namespace android
diff --git a/core/jni/android_database_SQLiteDebug.cpp b/core/jni/android_database_SQLiteDebug.cpp
index c1e7305..26e13cf 100644
--- a/core/jni/android_database_SQLiteDebug.cpp
+++ b/core/jni/android_database_SQLiteDebug.cpp
@@ -28,6 +28,8 @@
#include <sqlite3.h>
+#include "core_jni_helpers.h"
+
namespace android {
static struct {
@@ -62,27 +64,17 @@ static JNINativeMethod gMethods[] =
(void*) nativeGetPagerStats },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
int register_android_database_SQLiteDebug(JNIEnv *env)
{
- jclass clazz;
- FIND_CLASS(clazz, "android/database/sqlite/SQLiteDebug$PagerStats");
+ jclass clazz = FindClassOrDie(env, "android/database/sqlite/SQLiteDebug$PagerStats");
- GET_FIELD_ID(gSQLiteDebugPagerStatsClassInfo.memoryUsed, clazz,
- "memoryUsed", "I");
- GET_FIELD_ID(gSQLiteDebugPagerStatsClassInfo.largestMemAlloc, clazz,
+ gSQLiteDebugPagerStatsClassInfo.memoryUsed = GetFieldIDOrDie(env, clazz, "memoryUsed", "I");
+ gSQLiteDebugPagerStatsClassInfo.largestMemAlloc = GetFieldIDOrDie(env, clazz,
"largestMemAlloc", "I");
- GET_FIELD_ID(gSQLiteDebugPagerStatsClassInfo.pageCacheOverflow, clazz,
+ gSQLiteDebugPagerStatsClassInfo.pageCacheOverflow = GetFieldIDOrDie(env, clazz,
"pageCacheOverflow", "I");
- return AndroidRuntime::registerNativeMethods(env, "android/database/sqlite/SQLiteDebug",
+ return RegisterMethodsOrDie(env, "android/database/sqlite/SQLiteDebug",
gMethods, NELEM(gMethods));
}
diff --git a/core/jni/android_database_SQLiteGlobal.cpp b/core/jni/android_database_SQLiteGlobal.cpp
index 89d64fa..d0c592e 100644
--- a/core/jni/android_database_SQLiteGlobal.cpp
+++ b/core/jni/android_database_SQLiteGlobal.cpp
@@ -18,7 +18,7 @@
#include <jni.h>
#include <JNIHelp.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <sqlite3.h>
#include <sqlite3_android.h>
@@ -74,15 +74,14 @@ static jint nativeReleaseMemory(JNIEnv* env, jclass clazz) {
static JNINativeMethod sMethods[] =
{
/* name, signature, funcPtr */
- { "nativeReleaseMemory", "()I",
- (void*)nativeReleaseMemory },
+ { "nativeReleaseMemory", "()I", (void*)nativeReleaseMemory },
};
int register_android_database_SQLiteGlobal(JNIEnv *env)
{
sqliteInitialize();
- return AndroidRuntime::registerNativeMethods(env, "android/database/sqlite/SQLiteGlobal",
+ return RegisterMethodsOrDie(env, "android/database/sqlite/SQLiteGlobal",
sMethods, NELEM(sMethods));
}
diff --git a/core/jni/android_ddm_DdmHandleNativeHeap.cpp b/core/jni/android_ddm_DdmHandleNativeHeap.cpp
index 9b96320..ae96936 100644
--- a/core/jni/android_ddm_DdmHandleNativeHeap.cpp
+++ b/core/jni/android_ddm_DdmHandleNativeHeap.cpp
@@ -20,7 +20,7 @@
#include <JNIHelp.h>
#include <jni.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <utils/Log.h>
#include <utils/String8.h>
@@ -82,7 +82,7 @@ static jbyteArray DdmHandleNativeHeap_getLeakInfo(JNIEnv* env, jobject) {
get_malloc_leak_info(&allocBytes, &header.allocSize, &header.allocInfoSize,
&header.totalMemory, &header.backtraceSize);
- ALOGD("*** mapSize: %d allocSize: %d allocInfoSize: %d totalMemory: %d",
+ ALOGD("*** mapSize: %zu allocSize: %zu allocInfoSize: %zu totalMemory: %zu",
header.mapSize, header.allocSize, header.allocInfoSize, header.totalMemory);
#if defined(__LP64__)
@@ -110,7 +110,8 @@ static JNINativeMethod method_table[] = {
};
int register_android_ddm_DdmHandleNativeHeap(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, "android/ddm/DdmHandleNativeHeap", method_table, NELEM(method_table));
+ return RegisterMethodsOrDie(env, "android/ddm/DdmHandleNativeHeap", method_table,
+ NELEM(method_table));
}
};
diff --git a/core/jni/android_emoji_EmojiFactory.cpp b/core/jni/android_emoji_EmojiFactory.cpp
index f127d29..655b400 100644
--- a/core/jni/android_emoji_EmojiFactory.cpp
+++ b/core/jni/android_emoji_EmojiFactory.cpp
@@ -265,14 +265,6 @@ static jclass make_globalref(JNIEnv* env, const char classname[])
return (jclass)env->NewGlobalRef(c);
}
-static jfieldID getFieldIDCheck(JNIEnv* env, jclass clazz,
- const char fieldname[], const char type[])
-{
- jfieldID id = env->GetFieldID(clazz, fieldname, type);
- SkASSERT(id);
- return id;
-}
-
int register_android_emoji_EmojiFactory(JNIEnv* env) {
gEmojiFactory_class = make_globalref(env, "android/emoji/EmojiFactory");
gEmojiFactory_constructorMethodID = env->GetMethodID(
diff --git a/core/jni/android_graphics_Canvas.cpp b/core/jni/android_graphics_Canvas.cpp
index 96607d2..19aad61 100644
--- a/core/jni/android_graphics_Canvas.cpp
+++ b/core/jni/android_graphics_Canvas.cpp
@@ -16,7 +16,7 @@
#include "jni.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "Canvas.h"
#include "SkDrawFilter.h"
@@ -556,42 +556,6 @@ static void drawTextRunString(JNIEnv* env, jobject obj, jlong canvasHandle, jstr
env->ReleaseStringChars(text, jchars);
}
-static void drawPosTextChars(JNIEnv* env, jobject, jlong canvasHandle, jcharArray text,
- jint index, jint count, jfloatArray pos, jlong paintHandle) {
- Paint* paint = reinterpret_cast<Paint*>(paintHandle);
- jchar* jchars = text ? env->GetCharArrayElements(text, NULL) : NULL;
- float* posArray = pos ? env->GetFloatArrayElements(pos, NULL) : NULL;
- int posCount = pos ? env->GetArrayLength(pos) >> 1: 0;
-
- get_canvas(canvasHandle)->drawPosText(jchars + index, posArray, count << 1, posCount, *paint);
-
- if (text) {
- env->ReleaseCharArrayElements(text, jchars, 0);
- }
- if (pos) {
- env->ReleaseFloatArrayElements(pos, posArray, 0);
- }
-}
-
-
-static void drawPosTextString(JNIEnv* env, jobject, jlong canvasHandle, jstring text,
- jfloatArray pos, jlong paintHandle) {
- Paint* paint = reinterpret_cast<Paint*>(paintHandle);
- const jchar* jchars = text ? env->GetStringChars(text, NULL) : NULL;
- int byteLength = text ? env->GetStringLength(text) : 0;
- float* posArray = pos ? env->GetFloatArrayElements(pos, NULL) : NULL;
- int posCount = pos ? env->GetArrayLength(pos) >> 1: 0;
-
- get_canvas(canvasHandle)->drawPosText(jchars , posArray, byteLength << 1, posCount, *paint);
-
- if (text) {
- env->ReleaseStringChars(text, jchars);
- }
- if (pos) {
- env->ReleaseFloatArrayElements(pos, posArray, 0);
- }
-}
-
class DrawTextOnPathFunctor {
public:
DrawTextOnPathFunctor(const Layout& layout, Canvas* canvas, float hOffset,
@@ -736,7 +700,7 @@ static JNINativeMethod gMethods[] = {
};
int register_android_graphics_Canvas(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, "android/graphics/Canvas", gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/graphics/Canvas", gMethods, NELEM(gMethods));
}
}; // namespace android
diff --git a/core/jni/android_graphics_Picture.cpp b/core/jni/android_graphics_Picture.cpp
index eb8f6dd..308ee20 100644
--- a/core/jni/android_graphics_Picture.cpp
+++ b/core/jni/android_graphics_Picture.cpp
@@ -16,7 +16,7 @@
#include "jni.h"
#include "GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "Picture.h"
@@ -106,7 +106,7 @@ static JNINativeMethod gMethods[] = {
};
int register_android_graphics_Picture(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, "android/graphics/Picture", gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/graphics/Picture", gMethods, NELEM(gMethods));
}
}; // namespace android
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index 69f46d3..169fb60 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -21,7 +21,7 @@
#include "jni.h"
#include "JNIHelp.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <android_runtime/android_graphics_SurfaceTexture.h>
#include <android_runtime/android_view_Surface.h>
@@ -222,7 +222,7 @@ jbyteArray JNICameraContext::getCallbackBuffer(
// Vector access should be protected by lock in postData()
if (!buffers->isEmpty()) {
- ALOGV("Using callback buffer from queue of length %d", buffers->size());
+ ALOGV("Using callback buffer from queue of length %zu", buffers->size());
jbyteArray globalBuffer = buffers->itemAt(0);
buffers->removeAt(0);
@@ -232,7 +232,7 @@ jbyteArray JNICameraContext::getCallbackBuffer(
if (obj != NULL) {
jsize bufferLength = env->GetArrayLength(obj);
if ((int)bufferLength < (int)bufferSize) {
- ALOGE("Callback buffer was too small! Expected %d bytes, but got %d bytes!",
+ ALOGE("Callback buffer was too small! Expected %zu bytes, but got %d bytes!",
bufferSize, bufferLength);
env->DeleteLocalRef(obj);
return NULL;
@@ -445,7 +445,7 @@ void JNICameraContext::addCallbackBuffer(
jbyteArray callbackBuffer = (jbyteArray)env->NewGlobalRef(cbb);
mCallbackBuffers.push(callbackBuffer);
- ALOGV("Adding callback buffer to queue, %d total",
+ ALOGV("Adding callback buffer to queue, %zu total",
mCallbackBuffers.size());
// We want to make sure the camera knows we're ready for the
@@ -481,7 +481,7 @@ void JNICameraContext::clearCallbackBuffers_l(JNIEnv *env)
}
void JNICameraContext::clearCallbackBuffers_l(JNIEnv *env, Vector<jbyteArray> *buffers) {
- ALOGV("Clearing callback buffers, %d remained", buffers->size());
+ ALOGV("Clearing callback buffers, %zu remained", buffers->size());
while (!buffers->isEmpty()) {
env->DeleteGlobalRef(buffers->top());
buffers->pop();
@@ -517,10 +517,12 @@ static jint android_hardware_Camera_native_setup(JNIEnv *env, jobject thiz,
jobject weak_this, jint cameraId, jint halVersion, jstring clientPackageName)
{
// Convert jstring to String16
- const char16_t *rawClientName = env->GetStringChars(clientPackageName, NULL);
+ const char16_t *rawClientName = reinterpret_cast<const char16_t*>(
+ env->GetStringChars(clientPackageName, NULL));
jsize rawClientNameLen = env->GetStringLength(clientPackageName);
String16 clientName(rawClientName, rawClientNameLen);
- env->ReleaseStringChars(clientPackageName, rawClientName);
+ env->ReleaseStringChars(clientPackageName,
+ reinterpret_cast<const jchar*>(rawClientName));
sp<Camera> camera;
if (halVersion == CAMERA_HAL_API_VERSION_NORMAL_CONNECT) {
@@ -783,7 +785,8 @@ static void android_hardware_Camera_setParameters(JNIEnv *env, jobject thiz, jst
const jchar* str = env->GetStringCritical(params, 0);
String8 params8;
if (params) {
- params8 = String8(str, env->GetStringLength(params));
+ params8 = String8(reinterpret_cast<const char16_t*>(str),
+ env->GetStringLength(params));
env->ReleaseStringCritical(params, str);
}
if (camera->setParameters(params8) != NO_ERROR) {
@@ -1031,26 +1034,14 @@ struct field {
jfieldID *jfield;
};
-static int find_fields(JNIEnv *env, field *fields, int count)
+static void find_fields(JNIEnv *env, field *fields, int count)
{
for (int i = 0; i < count; i++) {
field *f = &fields[i];
- jclass clazz = env->FindClass(f->class_name);
- if (clazz == NULL) {
- ALOGE("Can't find %s", f->class_name);
- return -1;
- }
-
- jfieldID field = env->GetFieldID(clazz, f->field_name, f->field_type);
- if (field == NULL) {
- ALOGE("Can't find %s.%s", f->class_name, f->field_name);
- return -1;
- }
-
+ jclass clazz = FindClassOrDie(env, f->class_name);
+ jfieldID field = GetFieldIDOrDie(env, clazz, f->field_name, f->field_type);
*(f->jfield) = field;
}
-
- return 0;
}
// Get all the required offsets in java class and register native functions
@@ -1076,30 +1067,17 @@ int register_android_hardware_Camera(JNIEnv *env)
{ "android/graphics/Point", "y", "I", &fields.point_y},
};
- if (find_fields(env, fields_to_find, NELEM(fields_to_find)) < 0)
- return -1;
+ find_fields(env, fields_to_find, NELEM(fields_to_find));
- jclass clazz = env->FindClass("android/hardware/Camera");
- fields.post_event = env->GetStaticMethodID(clazz, "postEventFromNative",
+ jclass clazz = FindClassOrDie(env, "android/hardware/Camera");
+ fields.post_event = GetStaticMethodIDOrDie(env, clazz, "postEventFromNative",
"(Ljava/lang/Object;IIILjava/lang/Object;)V");
- if (fields.post_event == NULL) {
- ALOGE("Can't find android/hardware/Camera.postEventFromNative");
- return -1;
- }
- clazz = env->FindClass("android/graphics/Rect");
- fields.rect_constructor = env->GetMethodID(clazz, "<init>", "()V");
- if (fields.rect_constructor == NULL) {
- ALOGE("Can't find android/graphics/Rect.Rect()");
- return -1;
- }
+ clazz = FindClassOrDie(env, "android/graphics/Rect");
+ fields.rect_constructor = GetMethodIDOrDie(env, clazz, "<init>", "()V");
- clazz = env->FindClass("android/hardware/Camera$Face");
- fields.face_constructor = env->GetMethodID(clazz, "<init>", "()V");
- if (fields.face_constructor == NULL) {
- ALOGE("Can't find android/hardware/Camera$Face.Face()");
- return -1;
- }
+ clazz = FindClassOrDie(env, "android/hardware/Camera$Face");
+ fields.face_constructor = GetMethodIDOrDie(env, clazz, "<init>", "()V");
clazz = env->FindClass("android/graphics/Point");
fields.point_constructor = env->GetMethodID(clazz, "<init>", "()V");
@@ -1109,6 +1087,5 @@ int register_android_hardware_Camera(JNIEnv *env)
}
// Register native functions
- return AndroidRuntime::registerNativeMethods(env, "android/hardware/Camera",
- camMethods, NELEM(camMethods));
+ return RegisterMethodsOrDie(env, "android/hardware/Camera", camMethods, NELEM(camMethods));
}
diff --git a/core/jni/android_hardware_SensorManager.cpp b/core/jni/android_hardware_SensorManager.cpp
index ec2bd84..d1b1a1a 100644
--- a/core/jni/android_hardware_SensorManager.cpp
+++ b/core/jni/android_hardware_SensorManager.cpp
@@ -28,6 +28,8 @@
#include "android_os_MessageQueue.h"
#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
+
static struct {
jclass clazz;
jmethodID dispatchSensorEvent;
@@ -294,32 +296,22 @@ static JNINativeMethod gBaseEventQueueMethods[] = {
using namespace android;
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className); \
- var = jclass(env->NewGlobalRef(var));
-
-#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-
int register_android_hardware_SensorManager(JNIEnv *env)
{
- jniRegisterNativeMethods(env, "android/hardware/SystemSensorManager",
+ RegisterMethodsOrDie(env, "android/hardware/SystemSensorManager",
gSystemSensorManagerMethods, NELEM(gSystemSensorManagerMethods));
- jniRegisterNativeMethods(env, "android/hardware/SystemSensorManager$BaseEventQueue",
+ RegisterMethodsOrDie(env, "android/hardware/SystemSensorManager$BaseEventQueue",
gBaseEventQueueMethods, NELEM(gBaseEventQueueMethods));
- FIND_CLASS(gBaseEventQueueClassInfo.clazz, "android/hardware/SystemSensorManager$BaseEventQueue");
+ gBaseEventQueueClassInfo.clazz = FindClassOrDie(env,
+ "android/hardware/SystemSensorManager$BaseEventQueue");
- GET_METHOD_ID(gBaseEventQueueClassInfo.dispatchSensorEvent,
- gBaseEventQueueClassInfo.clazz,
- "dispatchSensorEvent", "(I[FIJ)V");
+ gBaseEventQueueClassInfo.dispatchSensorEvent = GetMethodIDOrDie(env,
+ gBaseEventQueueClassInfo.clazz, "dispatchSensorEvent", "(I[FIJ)V");
- GET_METHOD_ID(gBaseEventQueueClassInfo.dispatchFlushCompleteEvent,
- gBaseEventQueueClassInfo.clazz,
- "dispatchFlushCompleteEvent", "(I)V");
+ gBaseEventQueueClassInfo.dispatchFlushCompleteEvent = GetMethodIDOrDie(env,
+ gBaseEventQueueClassInfo.clazz, "dispatchFlushCompleteEvent", "(I)V");
return 0;
}
diff --git a/core/jni/android_hardware_SerialPort.cpp b/core/jni/android_hardware_SerialPort.cpp
index 7f40a5c..2d2ff4d 100644
--- a/core/jni/android_hardware_SerialPort.cpp
+++ b/core/jni/android_hardware_SerialPort.cpp
@@ -20,7 +20,7 @@
#include "jni.h"
#include "JNIHelp.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <stdio.h>
#include <sys/types.h>
@@ -260,17 +260,9 @@ static JNINativeMethod method_table[] = {
int register_android_hardware_SerialPort(JNIEnv *env)
{
- jclass clazz = env->FindClass("android/hardware/SerialPort");
- if (clazz == NULL) {
- ALOGE("Can't find android/hardware/SerialPort");
- return -1;
- }
- field_context = env->GetFieldID(clazz, "mNativeContext", "I");
- if (field_context == NULL) {
- ALOGE("Can't find SerialPort.mNativeContext");
- return -1;
- }
+ jclass clazz = FindClassOrDie(env, "android/hardware/SerialPort");
+ field_context = GetFieldIDOrDie(env, clazz, "mNativeContext", "I");
- return AndroidRuntime::registerNativeMethods(env, "android/hardware/SerialPort",
+ return RegisterMethodsOrDie(env, "android/hardware/SerialPort",
method_table, NELEM(method_table));
}
diff --git a/core/jni/android_hardware_SoundTrigger.cpp b/core/jni/android_hardware_SoundTrigger.cpp
index 2a8e6d6..28e5030 100644
--- a/core/jni/android_hardware_SoundTrigger.cpp
+++ b/core/jni/android_hardware_SoundTrigger.cpp
@@ -21,7 +21,7 @@
#include "jni.h"
#include "JNIHelp.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <system/sound_trigger.h>
#include <soundtrigger/SoundTriggerCallback.h>
#include <soundtrigger/SoundTrigger.h>
@@ -801,112 +801,102 @@ static JNINativeMethod gModuleMethods[] = {
int register_android_hardware_SoundTrigger(JNIEnv *env)
{
- jclass arrayListClass = env->FindClass("java/util/ArrayList");
- gArrayListClass = (jclass) env->NewGlobalRef(arrayListClass);
- gArrayListMethods.add = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z");
-
- jclass uuidClass = env->FindClass("java/util/UUID");
- gUUIDClass = (jclass) env->NewGlobalRef(uuidClass);
- gUUIDMethods.toString = env->GetMethodID(uuidClass, "toString", "()Ljava/lang/String;");
-
- jclass lClass = env->FindClass(kSoundTriggerClassPathName);
- gSoundTriggerClass = (jclass) env->NewGlobalRef(lClass);
-
- jclass moduleClass = env->FindClass(kModuleClassPathName);
- gModuleClass = (jclass) env->NewGlobalRef(moduleClass);
- gPostEventFromNative = env->GetStaticMethodID(moduleClass, "postEventFromNative",
- "(Ljava/lang/Object;IIILjava/lang/Object;)V");
- gModuleFields.mNativeContext = env->GetFieldID(moduleClass, "mNativeContext", "J");
- gModuleFields.mId = env->GetFieldID(moduleClass, "mId", "I");
-
-
- jclass modulePropertiesClass = env->FindClass(kModulePropertiesClassPathName);
- gModulePropertiesClass = (jclass) env->NewGlobalRef(modulePropertiesClass);
- gModulePropertiesCstor = env->GetMethodID(modulePropertiesClass, "<init>",
- "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;IIIIIZIZIZ)V");
-
- jclass soundModelClass = env->FindClass(kSoundModelClassPathName);
- gSoundModelClass = (jclass) env->NewGlobalRef(soundModelClass);
- gSoundModelFields.uuid = env->GetFieldID(soundModelClass, "uuid", "Ljava/util/UUID;");
- gSoundModelFields.vendorUuid = env->GetFieldID(soundModelClass, "vendorUuid", "Ljava/util/UUID;");
- gSoundModelFields.data = env->GetFieldID(soundModelClass, "data", "[B");
-
- jclass keyphraseClass = env->FindClass(kKeyphraseClassPathName);
- gKeyphraseClass = (jclass) env->NewGlobalRef(keyphraseClass);
- gKeyphraseFields.id = env->GetFieldID(keyphraseClass, "id", "I");
- gKeyphraseFields.recognitionModes = env->GetFieldID(keyphraseClass, "recognitionModes", "I");
- gKeyphraseFields.locale = env->GetFieldID(keyphraseClass, "locale", "Ljava/lang/String;");
- gKeyphraseFields.text = env->GetFieldID(keyphraseClass, "text", "Ljava/lang/String;");
- gKeyphraseFields.users = env->GetFieldID(keyphraseClass, "users", "[I");
-
- jclass keyphraseSoundModelClass = env->FindClass(kKeyphraseSoundModelClassPathName);
- gKeyphraseSoundModelClass = (jclass) env->NewGlobalRef(keyphraseSoundModelClass);
- gKeyphraseSoundModelFields.keyphrases = env->GetFieldID(keyphraseSoundModelClass,
+ jclass arrayListClass = FindClassOrDie(env, "java/util/ArrayList");
+ gArrayListClass = MakeGlobalRefOrDie(env, arrayListClass);
+ gArrayListMethods.add = GetMethodIDOrDie(env, arrayListClass, "add", "(Ljava/lang/Object;)Z");
+
+ jclass uuidClass = FindClassOrDie(env, "java/util/UUID");
+ gUUIDClass = MakeGlobalRefOrDie(env, uuidClass);
+ gUUIDMethods.toString = GetMethodIDOrDie(env, uuidClass, "toString", "()Ljava/lang/String;");
+
+ jclass lClass = FindClassOrDie(env, kSoundTriggerClassPathName);
+ gSoundTriggerClass = MakeGlobalRefOrDie(env, lClass);
+
+ jclass moduleClass = FindClassOrDie(env, kModuleClassPathName);
+ gModuleClass = MakeGlobalRefOrDie(env, moduleClass);
+ gPostEventFromNative = GetStaticMethodIDOrDie(env, moduleClass, "postEventFromNative",
+ "(Ljava/lang/Object;IIILjava/lang/Object;)V");
+ gModuleFields.mNativeContext = GetFieldIDOrDie(env, moduleClass, "mNativeContext", "J");
+ gModuleFields.mId = GetFieldIDOrDie(env, moduleClass, "mId", "I");
+
+ jclass modulePropertiesClass = FindClassOrDie(env, kModulePropertiesClassPathName);
+ gModulePropertiesClass = MakeGlobalRefOrDie(env, modulePropertiesClass);
+ gModulePropertiesCstor = GetMethodIDOrDie(env, modulePropertiesClass, "<init>",
+ "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;IIIIIZIZIZ)V");
+
+ jclass soundModelClass = FindClassOrDie(env, kSoundModelClassPathName);
+ gSoundModelClass = MakeGlobalRefOrDie(env, soundModelClass);
+ gSoundModelFields.uuid = GetFieldIDOrDie(env, soundModelClass, "uuid", "Ljava/util/UUID;");
+ gSoundModelFields.vendorUuid = GetFieldIDOrDie(env, soundModelClass, "vendorUuid",
+ "Ljava/util/UUID;");
+ gSoundModelFields.data = GetFieldIDOrDie(env, soundModelClass, "data", "[B");
+
+ jclass keyphraseClass = FindClassOrDie(env, kKeyphraseClassPathName);
+ gKeyphraseClass = MakeGlobalRefOrDie(env, keyphraseClass);
+ gKeyphraseFields.id = GetFieldIDOrDie(env, keyphraseClass, "id", "I");
+ gKeyphraseFields.recognitionModes = GetFieldIDOrDie(env, keyphraseClass, "recognitionModes",
+ "I");
+ gKeyphraseFields.locale = GetFieldIDOrDie(env, keyphraseClass, "locale", "Ljava/lang/String;");
+ gKeyphraseFields.text = GetFieldIDOrDie(env, keyphraseClass, "text", "Ljava/lang/String;");
+ gKeyphraseFields.users = GetFieldIDOrDie(env, keyphraseClass, "users", "[I");
+
+ jclass keyphraseSoundModelClass = FindClassOrDie(env, kKeyphraseSoundModelClassPathName);
+ gKeyphraseSoundModelClass = MakeGlobalRefOrDie(env, keyphraseSoundModelClass);
+ gKeyphraseSoundModelFields.keyphrases = GetFieldIDOrDie(env, keyphraseSoundModelClass,
"keyphrases",
"[Landroid/hardware/soundtrigger/SoundTrigger$Keyphrase;");
-
- jclass recognitionEventClass = env->FindClass(kRecognitionEventClassPathName);
- gRecognitionEventClass = (jclass) env->NewGlobalRef(recognitionEventClass);
- gRecognitionEventCstor = env->GetMethodID(recognitionEventClass, "<init>",
+ jclass recognitionEventClass = FindClassOrDie(env, kRecognitionEventClassPathName);
+ gRecognitionEventClass = MakeGlobalRefOrDie(env, recognitionEventClass);
+ gRecognitionEventCstor = GetMethodIDOrDie(env, recognitionEventClass, "<init>",
"(IIZIIIZLandroid/media/AudioFormat;[B)V");
- jclass keyphraseRecognitionEventClass = env->FindClass(kKeyphraseRecognitionEventClassPathName);
- gKeyphraseRecognitionEventClass = (jclass) env->NewGlobalRef(keyphraseRecognitionEventClass);
- gKeyphraseRecognitionEventCstor = env->GetMethodID(keyphraseRecognitionEventClass, "<init>",
+ jclass keyphraseRecognitionEventClass = FindClassOrDie(env,
+ kKeyphraseRecognitionEventClassPathName);
+ gKeyphraseRecognitionEventClass = MakeGlobalRefOrDie(env, keyphraseRecognitionEventClass);
+ gKeyphraseRecognitionEventCstor = GetMethodIDOrDie(env, keyphraseRecognitionEventClass, "<init>",
"(IIZIIIZLandroid/media/AudioFormat;[B[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;)V");
- jclass keyRecognitionConfigClass = env->FindClass(kRecognitionConfigClassPathName);
- gRecognitionConfigClass = (jclass) env->NewGlobalRef(keyRecognitionConfigClass);
- gRecognitionConfigFields.captureRequested = env->GetFieldID(keyRecognitionConfigClass,
- "captureRequested",
- "Z");
- gRecognitionConfigFields.keyphrases = env->GetFieldID(keyRecognitionConfigClass,
- "keyphrases",
- "[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;");
- gRecognitionConfigFields.data = env->GetFieldID(keyRecognitionConfigClass,
- "data",
- "[B");
-
- jclass keyphraseRecognitionExtraClass = env->FindClass(kKeyphraseRecognitionExtraClassPathName);
- gKeyphraseRecognitionExtraClass = (jclass) env->NewGlobalRef(keyphraseRecognitionExtraClass);
- gKeyphraseRecognitionExtraCstor = env->GetMethodID(keyphraseRecognitionExtraClass, "<init>",
- "(III[Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;)V");
- gKeyphraseRecognitionExtraFields.id = env->GetFieldID(gKeyphraseRecognitionExtraClass, "id", "I");
- gKeyphraseRecognitionExtraFields.recognitionModes = env->GetFieldID(gKeyphraseRecognitionExtraClass,
- "recognitionModes", "I");
- gKeyphraseRecognitionExtraFields.coarseConfidenceLevel = env->GetFieldID(gKeyphraseRecognitionExtraClass,
- "coarseConfidenceLevel", "I");
- gKeyphraseRecognitionExtraFields.confidenceLevels = env->GetFieldID(gKeyphraseRecognitionExtraClass,
- "confidenceLevels",
- "[Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;");
-
- jclass confidenceLevelClass = env->FindClass(kConfidenceLevelClassPathName);
- gConfidenceLevelClass = (jclass) env->NewGlobalRef(confidenceLevelClass);
- gConfidenceLevelCstor = env->GetMethodID(confidenceLevelClass, "<init>", "(II)V");
- gConfidenceLevelFields.userId = env->GetFieldID(confidenceLevelClass, "userId", "I");
- gConfidenceLevelFields.confidenceLevel = env->GetFieldID(confidenceLevelClass,
+ jclass keyRecognitionConfigClass = FindClassOrDie(env, kRecognitionConfigClassPathName);
+ gRecognitionConfigClass = MakeGlobalRefOrDie(env, keyRecognitionConfigClass);
+ gRecognitionConfigFields.captureRequested = GetFieldIDOrDie(env, keyRecognitionConfigClass,
+ "captureRequested", "Z");
+ gRecognitionConfigFields.keyphrases = GetFieldIDOrDie(env, keyRecognitionConfigClass,
+ "keyphrases", "[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;");
+ gRecognitionConfigFields.data = GetFieldIDOrDie(env, keyRecognitionConfigClass, "data", "[B");
+
+ jclass keyphraseRecognitionExtraClass = FindClassOrDie(env,
+ kKeyphraseRecognitionExtraClassPathName);
+ gKeyphraseRecognitionExtraClass = MakeGlobalRefOrDie(env, keyphraseRecognitionExtraClass);
+ gKeyphraseRecognitionExtraCstor = GetMethodIDOrDie(env, keyphraseRecognitionExtraClass,
+ "<init>", "(III[Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;)V");
+ gKeyphraseRecognitionExtraFields.id = GetFieldIDOrDie(env, gKeyphraseRecognitionExtraClass,
+ "id", "I");
+ gKeyphraseRecognitionExtraFields.recognitionModes = GetFieldIDOrDie(env,
+ gKeyphraseRecognitionExtraClass, "recognitionModes", "I");
+ gKeyphraseRecognitionExtraFields.coarseConfidenceLevel = GetFieldIDOrDie(env,
+ gKeyphraseRecognitionExtraClass, "coarseConfidenceLevel", "I");
+ gKeyphraseRecognitionExtraFields.confidenceLevels = GetFieldIDOrDie(env,
+ gKeyphraseRecognitionExtraClass, "confidenceLevels",
+ "[Landroid/hardware/soundtrigger/SoundTrigger$ConfidenceLevel;");
+
+ jclass confidenceLevelClass = FindClassOrDie(env, kConfidenceLevelClassPathName);
+ gConfidenceLevelClass = MakeGlobalRefOrDie(env, confidenceLevelClass);
+ gConfidenceLevelCstor = GetMethodIDOrDie(env, confidenceLevelClass, "<init>", "(II)V");
+ gConfidenceLevelFields.userId = GetFieldIDOrDie(env, confidenceLevelClass, "userId", "I");
+ gConfidenceLevelFields.confidenceLevel = GetFieldIDOrDie(env, confidenceLevelClass,
"confidenceLevel", "I");
- jclass audioFormatClass = env->FindClass(kAudioFormatClassPathName);
- gAudioFormatClass = (jclass) env->NewGlobalRef(audioFormatClass);
- gAudioFormatCstor = env->GetMethodID(audioFormatClass, "<init>", "(III)V");
-
- jclass soundModelEventClass = env->FindClass(kSoundModelEventClassPathName);
- gSoundModelEventClass = (jclass) env->NewGlobalRef(soundModelEventClass);
- gSoundModelEventCstor = env->GetMethodID(soundModelEventClass, "<init>",
- "(II[B)V");
-
+ jclass audioFormatClass = FindClassOrDie(env, kAudioFormatClassPathName);
+ gAudioFormatClass = MakeGlobalRefOrDie(env, audioFormatClass);
+ gAudioFormatCstor = GetMethodIDOrDie(env, audioFormatClass, "<init>", "(III)V");
- int status = AndroidRuntime::registerNativeMethods(env,
- kSoundTriggerClassPathName, gMethods, NELEM(gMethods));
-
- if (status == 0) {
- status = AndroidRuntime::registerNativeMethods(env,
- kModuleClassPathName, gModuleMethods, NELEM(gModuleMethods));
- }
+ jclass soundModelEventClass = FindClassOrDie(env, kSoundModelEventClassPathName);
+ gSoundModelEventClass = MakeGlobalRefOrDie(env, soundModelEventClass);
+ gSoundModelEventCstor = GetMethodIDOrDie(env, soundModelEventClass, "<init>", "(II[B)V");
- return status;
+ RegisterMethodsOrDie(env, kSoundTriggerClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kModuleClassPathName, gModuleMethods, NELEM(gModuleMethods));
}
diff --git a/core/jni/android_hardware_UsbDevice.cpp b/core/jni/android_hardware_UsbDevice.cpp
index 25f901b..ef3b646 100644
--- a/core/jni/android_hardware_UsbDevice.cpp
+++ b/core/jni/android_hardware_UsbDevice.cpp
@@ -20,7 +20,7 @@
#include "jni.h"
#include "JNIHelp.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <usbhost/usbhost.h>
@@ -54,6 +54,6 @@ static JNINativeMethod method_table[] = {
int register_android_hardware_UsbDevice(JNIEnv *env)
{
- return AndroidRuntime::registerNativeMethods(env, "android/hardware/usb/UsbDevice",
+ return RegisterMethodsOrDie(env, "android/hardware/usb/UsbDevice",
method_table, NELEM(method_table));
}
diff --git a/core/jni/android_hardware_UsbDeviceConnection.cpp b/core/jni/android_hardware_UsbDeviceConnection.cpp
index 467a9a1..e0cae6f 100644
--- a/core/jni/android_hardware_UsbDeviceConnection.cpp
+++ b/core/jni/android_hardware_UsbDeviceConnection.cpp
@@ -20,7 +20,7 @@
#include "jni.h"
#include "JNIHelp.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <usbhost/usbhost.h>
@@ -268,17 +268,9 @@ static JNINativeMethod method_table[] = {
int register_android_hardware_UsbDeviceConnection(JNIEnv *env)
{
- jclass clazz = env->FindClass("android/hardware/usb/UsbDeviceConnection");
- if (clazz == NULL) {
- ALOGE("Can't find android/hardware/usb/UsbDeviceConnection");
- return -1;
- }
- field_context = env->GetFieldID(clazz, "mNativeContext", "J");
- if (field_context == NULL) {
- ALOGE("Can't find UsbDeviceConnection.mNativeContext");
- return -1;
- }
+ jclass clazz = FindClassOrDie(env, "android/hardware/usb/UsbDeviceConnection");
+ field_context = GetFieldIDOrDie(env, clazz, "mNativeContext", "J");
- return AndroidRuntime::registerNativeMethods(env, "android/hardware/usb/UsbDeviceConnection",
+ return RegisterMethodsOrDie(env, "android/hardware/usb/UsbDeviceConnection",
method_table, NELEM(method_table));
}
diff --git a/core/jni/android_hardware_UsbRequest.cpp b/core/jni/android_hardware_UsbRequest.cpp
index a3c7b0a..ce99e15 100644
--- a/core/jni/android_hardware_UsbRequest.cpp
+++ b/core/jni/android_hardware_UsbRequest.cpp
@@ -20,7 +20,7 @@
#include "jni.h"
#include "JNIHelp.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <usbhost/usbhost.h>
@@ -215,7 +215,7 @@ int register_android_hardware_UsbRequest(JNIEnv *env)
return -1;
}
- return AndroidRuntime::registerNativeMethods(env, "android/hardware/usb/UsbRequest",
+ return RegisterMethodsOrDie(env, "android/hardware/usb/UsbRequest",
method_table, NELEM(method_table));
}
diff --git a/core/jni/android_hardware_camera2_CameraMetadata.cpp b/core/jni/android_hardware_camera2_CameraMetadata.cpp
index 7935329..7c8769d 100644
--- a/core/jni/android_hardware_camera2_CameraMetadata.cpp
+++ b/core/jni/android_hardware_camera2_CameraMetadata.cpp
@@ -16,7 +16,6 @@
*/
// #define LOG_NDEBUG 0
-// #define LOG_NNDEBUG 0
#define LOG_TAG "CameraMetadata-JNI"
#include <utils/Errors.h>
#include <utils/Log.h>
@@ -29,7 +28,7 @@
#include "jni.h"
#include "JNIHelp.h"
#include "android_os_Parcel.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include "android_runtime/android_hardware_camera2_CameraMetadata.h"
#include <binder/IServiceManager.h>
@@ -42,13 +41,7 @@
#include <sys/types.h> // for socketpair
#include <sys/socket.h> // for socketpair
-#if defined(LOG_NNDEBUG)
-#if !LOG_NNDEBUG
-#define ALOGVV ALOGV
-#endif
-#else
-#define ALOGVV(...)
-#endif
+static const bool kIsDebug = false;
// fully-qualified class name
#define CAMERA_METADATA_CLASS_NAME "android/hardware/camera2/impl/CameraMetadataNative"
@@ -111,8 +104,8 @@ struct Helpers {
size_t typeSize = getTypeSize(type);
if (dataBytes % typeSize != 0) {
- ALOGE("%s: Expected dataBytes (%ud) to be divisible by typeSize "
- "(%ud)", __FUNCTION__, dataBytes, typeSize);
+ ALOGE("%s: Expected dataBytes (%zu) to be divisible by typeSize "
+ "(%zu)", __FUNCTION__, dataBytes, typeSize);
return BAD_VALUE;
}
@@ -219,7 +212,7 @@ static jboolean CameraMetadata_isEmpty(JNIEnv *env, jobject thiz) {
jboolean empty = metadata->isEmpty();
- ALOGV("%s: Empty returned %d, entry count was %d",
+ ALOGV("%s: Empty returned %d, entry count was %zu",
__FUNCTION__, empty, metadata->entryCount());
return empty;
@@ -315,7 +308,6 @@ static void CameraMetadata_writeValues(JNIEnv *env, jobject thiz, jint tag, jbyt
"Tag (%d) did not have a type", tag);
return;
}
- size_t tagSize = Helpers::getTypeSize(tagType);
status_t res;
@@ -597,7 +589,7 @@ static int find_fields(JNIEnv *env, field *fields, int count)
int register_android_hardware_camera2_CameraMetadata(JNIEnv *env)
{
// Register native functions
- return AndroidRuntime::registerNativeMethods(env,
+ return RegisterMethodsOrDie(env,
CAMERA_METADATA_CLASS_NAME,
gCameraMetadataMethods,
NELEM(gCameraMetadataMethods));
@@ -617,7 +609,7 @@ static void CameraMetadata_classInit(JNIEnv *env, jobject thiz) {
if (find_fields(env, fields_to_find, NELEM(fields_to_find)) < 0)
return;
- jclass clazz = env->FindClass(CAMERA_METADATA_CLASS_NAME);
+ env->FindClass(CAMERA_METADATA_CLASS_NAME);
}
static jint CameraMetadata_getTagFromKey(JNIEnv *env, jobject thiz, jstring keyName) {
@@ -651,12 +643,15 @@ static jint CameraMetadata_getTagFromKey(JNIEnv *env, jobject thiz, jstring keyN
const char *str = (i < ANDROID_SECTION_COUNT) ? camera_metadata_section_names[i] :
vendorSections[i - ANDROID_SECTION_COUNT].string();
- ALOGVV("%s: Trying to match against section '%s'",
- __FUNCTION__, str);
+ if (kIsDebug) {
+ ALOGV("%s: Trying to match against section '%s'", __FUNCTION__, str);
+ }
if (strstr(key, str) == key) { // key begins with the section name
size_t strLength = strlen(str);
- ALOGVV("%s: Key begins with section name", __FUNCTION__);
+ if (kIsDebug) {
+ ALOGV("%s: Key begins with section name", __FUNCTION__);
+ }
// section name is the longest we've found so far
if (section == NULL || sectionLength < strLength) {
@@ -664,7 +659,9 @@ static jint CameraMetadata_getTagFromKey(JNIEnv *env, jobject thiz, jstring keyN
sectionIndex = i;
sectionLength = strLength;
- ALOGVV("%s: Found new best section (%s)", __FUNCTION__, section);
+ if (kIsDebug) {
+ ALOGV("%s: Found new best section (%s)", __FUNCTION__, section);
+ }
}
}
}
@@ -676,7 +673,7 @@ static jint CameraMetadata_getTagFromKey(JNIEnv *env, jobject thiz, jstring keyN
"Could not find section name for key '%s')", key);
return 0;
} else {
- ALOGV("%s: Found matched section '%s' (%d)",
+ ALOGV("%s: Found matched section '%s' (%zu)",
__FUNCTION__, section, sectionIndex);
}
diff --git a/core/jni/android_hardware_camera2_DngCreator.cpp b/core/jni/android_hardware_camera2_DngCreator.cpp
index 7361858..5548476 100644
--- a/core/jni/android_hardware_camera2_DngCreator.cpp
+++ b/core/jni/android_hardware_camera2_DngCreator.cpp
@@ -16,6 +16,15 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "DngCreator_JNI"
+#include <inttypes.h>
+#include <string.h>
+
+#include <utils/Log.h>
+#include <utils/Errors.h>
+#include <utils/StrongPointer.h>
+#include <utils/RefBase.h>
+#include <utils/Vector.h>
+#include <cutils/properties.h>
#include <system/camera_metadata.h>
#include <camera/CameraMetadata.h>
@@ -27,6 +36,7 @@
#include <img_utils/Input.h>
#include <img_utils/StripSource.h>
+#include "core_jni_helpers.h"
#include <utils/Log.h>
#include <utils/Errors.h>
#include <utils/StrongPointer.h>
@@ -431,7 +441,6 @@ InputStripSource::InputStripSource(JNIEnv* env, Input& input, uint32_t ifd, uint
InputStripSource::~InputStripSource() {}
status_t InputStripSource::writeToStream(Output& stream, uint32_t count) {
- status_t err = OK;
uint32_t fullSize = mWidth * mHeight * mBytesPerSample * mSamplesPerPixel;
jlong offset = mOffset;
@@ -765,7 +774,8 @@ static status_t generateNoiseProfile(const double* perChannelNoiseProfile, uint8
}
}
if (uninitialized) {
- ALOGE("%s: No valid NoiseProfile coefficients for color plane %u", __FUNCTION__, p);
+ ALOGE("%s: No valid NoiseProfile coefficients for color plane %zu",
+ __FUNCTION__, p);
return BAD_VALUE;
}
}
@@ -809,29 +819,20 @@ static TiffWriter* DngCreator_getCreator(JNIEnv* env, jobject thiz) {
static void DngCreator_nativeClassInit(JNIEnv* env, jclass clazz) {
ALOGV("%s:", __FUNCTION__);
- gDngCreatorClassInfo.mNativeContext = env->GetFieldID(clazz,
- ANDROID_DNGCREATOR_CTX_JNI_ID, "J");
- LOG_ALWAYS_FATAL_IF(gDngCreatorClassInfo.mNativeContext == NULL,
- "can't find android/hardware/camera2/DngCreator.%s",
- ANDROID_DNGCREATOR_CTX_JNI_ID);
-
- jclass outputStreamClazz = env->FindClass("java/io/OutputStream");
- LOG_ALWAYS_FATAL_IF(outputStreamClazz == NULL, "Can't find java/io/OutputStream class");
- gOutputStreamClassInfo.mWriteMethod = env->GetMethodID(outputStreamClazz, "write", "([BII)V");
- LOG_ALWAYS_FATAL_IF(gOutputStreamClassInfo.mWriteMethod == NULL, "Can't find write method");
-
- jclass inputStreamClazz = env->FindClass("java/io/InputStream");
- LOG_ALWAYS_FATAL_IF(inputStreamClazz == NULL, "Can't find java/io/InputStream class");
- gInputStreamClassInfo.mReadMethod = env->GetMethodID(inputStreamClazz, "read", "([BII)I");
- LOG_ALWAYS_FATAL_IF(gInputStreamClassInfo.mReadMethod == NULL, "Can't find read method");
- gInputStreamClassInfo.mSkipMethod = env->GetMethodID(inputStreamClazz, "skip", "(J)J");
- LOG_ALWAYS_FATAL_IF(gInputStreamClassInfo.mSkipMethod == NULL, "Can't find skip method");
-
- jclass inputBufferClazz = env->FindClass("java/nio/ByteBuffer");
- LOG_ALWAYS_FATAL_IF(inputBufferClazz == NULL, "Can't find java/nio/ByteBuffer class");
- gInputByteBufferClassInfo.mGetMethod = env->GetMethodID(inputBufferClazz, "get",
- "([BII)Ljava/nio/ByteBuffer;");
- LOG_ALWAYS_FATAL_IF(gInputByteBufferClassInfo.mGetMethod == NULL, "Can't find get method");
+ gDngCreatorClassInfo.mNativeContext = GetFieldIDOrDie(env,
+ clazz, ANDROID_DNGCREATOR_CTX_JNI_ID, "J");
+
+ jclass outputStreamClazz = FindClassOrDie(env, "java/io/OutputStream");
+ gOutputStreamClassInfo.mWriteMethod = GetMethodIDOrDie(env,
+ outputStreamClazz, "write", "([BII)V");
+
+ jclass inputStreamClazz = FindClassOrDie(env, "java/io/InputStream");
+ gInputStreamClassInfo.mReadMethod = GetMethodIDOrDie(env, inputStreamClazz, "read", "([BII)I");
+ gInputStreamClassInfo.mSkipMethod = GetMethodIDOrDie(env, inputStreamClazz, "skip", "(J)J");
+
+ jclass inputBufferClazz = FindClassOrDie(env, "java/nio/ByteBuffer");
+ gInputByteBufferClassInfo.mGetMethod = GetMethodIDOrDie(env,
+ inputBufferClazz, "get", "([BII)Ljava/nio/ByteBuffer;");
}
static void DngCreator_init(JNIEnv* env, jobject thiz, jobject characteristicsPtr,
@@ -859,7 +860,6 @@ static void DngCreator_init(JNIEnv* env, jobject thiz, jobject characteristicsPt
const uint32_t samplesPerPixel = 1;
const uint32_t bitsPerSample = BITS_PER_SAMPLE;
- const uint32_t bitsPerByte = BITS_PER_SAMPLE / BYTES_PER_SAMPLE;
uint32_t imageWidth = 0;
uint32_t imageHeight = 0;
@@ -1407,8 +1407,9 @@ static void DngCreator_init(JNIEnv* env, jobject thiz, jobject characteristicsPt
if (entry.count > 0) {
if (entry.count != numCfaChannels * 2) {
- ALOGW("%s: Invalid entry count %u for noise profile returned in characteristics,"
- " no noise profile tag written...", __FUNCTION__, entry.count);
+ ALOGW("%s: Invalid entry count %zu for noise profile returned "
+ "in characteristics, no noise profile tag written...",
+ __FUNCTION__, entry.count);
} else {
if ((err = generateNoiseProfile(entry.data.d, cfaOut, numCfaChannels,
cfaPlaneColor, numPlaneColors, /*out*/ noiseProfile)) == OK) {
@@ -1643,7 +1644,7 @@ static void DngCreator_nativeSetThumbnail(JNIEnv* env, jobject thiz, jobject buf
size_t fullSize = width * height * BYTES_PER_RGB_PIXEL;
jlong capacity = env->GetDirectBufferCapacity(buffer);
- if (capacity != fullSize) {
+ if (static_cast<uint64_t>(capacity) != static_cast<uint64_t>(fullSize)) {
jniThrowExceptionFmt(env, "java/lang/AssertionError",
"Invalid size %d for thumbnail, expected size was %d",
capacity, fullSize);
@@ -1803,8 +1804,9 @@ static void DngCreator_nativeWriteImage(JNIEnv* env, jobject thiz, jobject outSt
jint height, jobject inBuffer, jint rowStride, jint pixStride, jlong offset,
jboolean isDirect) {
ALOGV("%s:", __FUNCTION__);
- ALOGV("%s: nativeWriteImage called with: width=%d, height=%d, rowStride=%d, pixStride=%d,"
- " offset=%lld", __FUNCTION__, width, height, rowStride, pixStride, offset);
+ ALOGV("%s: nativeWriteImage called with: width=%d, height=%d, "
+ "rowStride=%d, pixStride=%d, offset=%" PRId64, __FUNCTION__, width,
+ height, rowStride, pixStride, offset);
uint32_t rStride = static_cast<uint32_t>(rowStride);
uint32_t pStride = static_cast<uint32_t>(pixStride);
uint32_t uWidth = static_cast<uint32_t>(width);
@@ -1911,12 +1913,12 @@ static void DngCreator_nativeWriteInputStream(JNIEnv* env, jobject thiz, jobject
uint32_t uHeight = static_cast<uint32_t>(height);
uint64_t uOffset = static_cast<uint32_t>(offset);
- ALOGV("%s: nativeWriteInputStream called with: width=%d, height=%d, rowStride=%u,"
- "pixStride=%u, offset=%lld", __FUNCTION__, width, height, rowStride, pixStride,
- offset);
+ ALOGV("%s: nativeWriteInputStream called with: width=%d, height=%d, "
+ "rowStride=%d, pixStride=%d, offset=%" PRId64, __FUNCTION__, width,
+ height, rowStride, pixStride, offset);
sp<JniOutputStream> out = new JniOutputStream(env, outStream);
- if(env->ExceptionCheck()) {
+ if (env->ExceptionCheck()) {
ALOGE("%s: Could not allocate buffers for output stream", __FUNCTION__);
return;
}
@@ -1990,7 +1992,6 @@ static JNINativeMethod gDngCreatorMethods[] = {
};
int register_android_hardware_camera2_DngCreator(JNIEnv *env) {
- return AndroidRuntime::registerNativeMethods(env,
- "android/hardware/camera2/DngCreator", gDngCreatorMethods,
- NELEM(gDngCreatorMethods));
+ return RegisterMethodsOrDie(env,
+ "android/hardware/camera2/DngCreator", gDngCreatorMethods, NELEM(gDngCreatorMethods));
}
diff --git a/core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp b/core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp
index 0a6fb9d..7497d8b 100644
--- a/core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp
+++ b/core/jni/android_hardware_camera2_legacy_LegacyCameraDevice.cpp
@@ -23,7 +23,7 @@
#include "jni.h"
#include "JNIHelp.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include "android_runtime/android_view_Surface.h"
#include "android_runtime/android_graphics_SurfaceTexture.h"
@@ -315,8 +315,8 @@ static status_t produceFrame(const sp<ANativeWindow>& anw,
case HAL_PIXEL_FORMAT_BLOB: {
int8_t* img = NULL;
struct camera3_jpeg_blob footer = {
- jpeg_blob_id: CAMERA3_JPEG_BLOB_ID,
- jpeg_size: (uint32_t)bufferLength
+ .jpeg_blob_id = CAMERA3_JPEG_BLOB_ID,
+ .jpeg_size = (uint32_t)bufferLength
};
size_t totalJpegSize = bufferLength + sizeof(footer);
@@ -622,7 +622,7 @@ static jlong LegacyCameraDevice_nativeGetSurfaceId(JNIEnv* env, jobject thiz, jo
ALOGE("%s: Could not retrieve IGraphicBufferProducer from surface.", __FUNCTION__);
return 0;
}
- sp<IBinder> b = gbp->asBinder();
+ sp<IBinder> b = IInterface::asBinder(gbp);
if (b == NULL) {
ALOGE("%s: Could not retrieve IBinder from surface.", __FUNCTION__);
return 0;
@@ -740,7 +740,7 @@ static JNINativeMethod gCameraDeviceMethods[] = {
int register_android_hardware_camera2_legacy_LegacyCameraDevice(JNIEnv* env)
{
// Register native functions
- return AndroidRuntime::registerNativeMethods(env,
+ return RegisterMethodsOrDie(env,
CAMERA_DEVICE_CLASS_NAME,
gCameraDeviceMethods,
NELEM(gCameraDeviceMethods));
diff --git a/core/jni/android_hardware_camera2_legacy_PerfMeasurement.cpp b/core/jni/android_hardware_camera2_legacy_PerfMeasurement.cpp
index 93473a5..7257597 100644
--- a/core/jni/android_hardware_camera2_legacy_PerfMeasurement.cpp
+++ b/core/jni/android_hardware_camera2_legacy_PerfMeasurement.cpp
@@ -22,7 +22,7 @@
#include "jni.h"
#include "JNIHelp.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <ui/GraphicBuffer.h>
#include <system/window.h>
@@ -328,7 +328,7 @@ static JNINativeMethod gPerfMeasurementMethods[] = {
int register_android_hardware_camera2_legacy_PerfMeasurement(JNIEnv* env)
{
// Register native functions
- return AndroidRuntime::registerNativeMethods(env,
+ return RegisterMethodsOrDie(env,
PERF_MEASUREMENT_CLASS_NAME,
gPerfMeasurementMethods,
NELEM(gPerfMeasurementMethods));
diff --git a/core/jni/android_hardware_location_ActivityRecognitionHardware.cpp b/core/jni/android_hardware_location_ActivityRecognitionHardware.cpp
index b8fa04c..470c5ba 100644
--- a/core/jni/android_hardware_location_ActivityRecognitionHardware.cpp
+++ b/core/jni/android_hardware_location_ActivityRecognitionHardware.cpp
@@ -123,7 +123,7 @@ static void activity_callback(
detach_thread();
}
-activity_recognition_callback_procs_t sCallbacks {
+activity_recognition_callback_procs_t sCallbacks = {
activity_callback,
};
diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp
index 2b2bee9..df9f893 100644
--- a/core/jni/android_media_AudioRecord.cpp
+++ b/core/jni/android_media_AudioRecord.cpp
@@ -21,7 +21,7 @@
#include <inttypes.h>
#include <jni.h>
#include <JNIHelp.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <utils/Log.h>
#include <media/AudioRecord.h>
@@ -606,59 +606,28 @@ int register_android_media_AudioRecord(JNIEnv *env)
// Get the AudioRecord class
- jclass audioRecordClass = env->FindClass(kClassPathName);
- if (audioRecordClass == NULL) {
- ALOGE("Can't find %s", kClassPathName);
- return -1;
- }
+ jclass audioRecordClass = FindClassOrDie(env, kClassPathName);
// Get the postEvent method
- javaAudioRecordFields.postNativeEventInJava = env->GetStaticMethodID(
- audioRecordClass,
- JAVA_POSTEVENT_CALLBACK_NAME, "(Ljava/lang/Object;IIILjava/lang/Object;)V");
- if (javaAudioRecordFields.postNativeEventInJava == NULL) {
- ALOGE("Can't find AudioRecord.%s", JAVA_POSTEVENT_CALLBACK_NAME);
- return -1;
- }
+ javaAudioRecordFields.postNativeEventInJava = GetStaticMethodIDOrDie(env,
+ audioRecordClass, JAVA_POSTEVENT_CALLBACK_NAME,
+ "(Ljava/lang/Object;IIILjava/lang/Object;)V");
// Get the variables
// mNativeRecorderInJavaObj
- javaAudioRecordFields.nativeRecorderInJavaObj =
- env->GetFieldID(audioRecordClass,
- JAVA_NATIVERECORDERINJAVAOBJ_FIELD_NAME, "J");
- if (javaAudioRecordFields.nativeRecorderInJavaObj == NULL) {
- ALOGE("Can't find AudioRecord.%s", JAVA_NATIVERECORDERINJAVAOBJ_FIELD_NAME);
- return -1;
- }
+ javaAudioRecordFields.nativeRecorderInJavaObj = GetFieldIDOrDie(env,
+ audioRecordClass, JAVA_NATIVERECORDERINJAVAOBJ_FIELD_NAME, "J");
// mNativeCallbackCookie
- javaAudioRecordFields.nativeCallbackCookie = env->GetFieldID(
- audioRecordClass,
- JAVA_NATIVECALLBACKINFO_FIELD_NAME, "J");
- if (javaAudioRecordFields.nativeCallbackCookie == NULL) {
- ALOGE("Can't find AudioRecord.%s", JAVA_NATIVECALLBACKINFO_FIELD_NAME);
- return -1;
- }
+ javaAudioRecordFields.nativeCallbackCookie = GetFieldIDOrDie(env,
+ audioRecordClass, JAVA_NATIVECALLBACKINFO_FIELD_NAME, "J");
// Get the AudioAttributes class and fields
- jclass audioAttrClass = env->FindClass(kAudioAttributesClassPathName);
- if (audioAttrClass == NULL) {
- ALOGE("Can't find %s", kAudioAttributesClassPathName);
- return -1;
- }
- jclass audioAttributesClassRef = (jclass)env->NewGlobalRef(audioAttrClass);
- javaAudioAttrFields.fieldRecSource = env->GetFieldID(audioAttributesClassRef, "mSource", "I");
- javaAudioAttrFields.fieldFlags = env->GetFieldID(audioAttributesClassRef, "mFlags", "I");
- javaAudioAttrFields.fieldFormattedTags =
- env->GetFieldID(audioAttributesClassRef, "mFormattedTags", "Ljava/lang/String;");
- env->DeleteGlobalRef(audioAttributesClassRef);
- if (javaAudioAttrFields.fieldRecSource == NULL
- || javaAudioAttrFields.fieldFlags == NULL
- || javaAudioAttrFields.fieldFormattedTags == NULL) {
- ALOGE("Can't initialize AudioAttributes fields");
- return -1;
- }
+ jclass audioAttrClass = FindClassOrDie(env, kAudioAttributesClassPathName);
+ javaAudioAttrFields.fieldRecSource = GetFieldIDOrDie(env, audioAttrClass, "mSource", "I");
+ javaAudioAttrFields.fieldFlags = GetFieldIDOrDie(env, audioAttrClass, "mFlags", "I");
+ javaAudioAttrFields.fieldFormattedTags = GetFieldIDOrDie(env,
+ audioAttrClass, "mFormattedTags", "Ljava/lang/String;");
- return AndroidRuntime::registerNativeMethods(env,
- kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
// ----------------------------------------------------------------------------
diff --git a/core/jni/android_media_AudioSystem.cpp b/core/jni/android_media_AudioSystem.cpp
index fee1ead..0bf269f 100644
--- a/core/jni/android_media_AudioSystem.cpp
+++ b/core/jni/android_media_AudioSystem.cpp
@@ -22,7 +22,7 @@
#include <jni.h>
#include <JNIHelp.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <media/AudioSystem.h>
#include <media/AudioPolicy.h>
@@ -298,7 +298,9 @@ android_media_AudioSystem_setParameters(JNIEnv *env, jobject thiz, jstring keyVa
const jchar* c_keyValuePairs = env->GetStringCritical(keyValuePairs, 0);
String8 c_keyValuePairs8;
if (keyValuePairs) {
- c_keyValuePairs8 = String8(c_keyValuePairs, env->GetStringLength(keyValuePairs));
+ c_keyValuePairs8 = String8(
+ reinterpret_cast<const char16_t*>(c_keyValuePairs),
+ env->GetStringLength(keyValuePairs));
env->ReleaseStringCritical(keyValuePairs, c_keyValuePairs);
}
int status = check_AudioSystem_Command(AudioSystem::setParameters(c_keyValuePairs8));
@@ -311,7 +313,8 @@ android_media_AudioSystem_getParameters(JNIEnv *env, jobject thiz, jstring keys)
const jchar* c_keys = env->GetStringCritical(keys, 0);
String8 c_keys8;
if (keys) {
- c_keys8 = String8(c_keys, env->GetStringLength(keys));
+ c_keys8 = String8(reinterpret_cast<const char16_t*>(c_keys),
+ env->GetStringLength(keys));
env->ReleaseStringCritical(keys, c_keys);
}
return env->NewStringUTF(AudioSystem::getParameters(c_keys8).string());
@@ -1120,7 +1123,7 @@ exit:
return jStatus;
}
-static int
+static jint
android_media_AudioSystem_releaseAudioPatch(JNIEnv *env, jobject clazz,
jobject jPatch)
{
@@ -1142,7 +1145,7 @@ android_media_AudioSystem_releaseAudioPatch(JNIEnv *env, jobject clazz,
status_t status = AudioSystem::releaseAudioPatch(handle);
ALOGV("AudioSystem::releaseAudioPatch() returned %d", status);
jint jStatus = nativeToJavaStatus(status);
- return status;
+ return jStatus;
}
static jint
@@ -1222,7 +1225,7 @@ android_media_AudioSystem_listAudioPatches(JNIEnv *env, jobject clazz,
jStatus = AUDIO_JAVA_ERROR;
goto exit;
}
- ALOGV("listAudioPatches patch %d num_sources %d num_sinks %d",
+ ALOGV("listAudioPatches patch %zu num_sources %d num_sinks %d",
i, nPatches[i].num_sources, nPatches[i].num_sinks);
env->SetIntField(patchHandle, gAudioHandleFields.mId, nPatches[i].id);
@@ -1246,7 +1249,7 @@ android_media_AudioSystem_listAudioPatches(JNIEnv *env, jobject clazz,
env->SetObjectArrayElement(jSources, j, jSource);
env->DeleteLocalRef(jSource);
jSource = NULL;
- ALOGV("listAudioPatches patch %d source %d is a %s handle %d",
+ ALOGV("listAudioPatches patch %zu source %zu is a %s handle %d",
i, j,
nPatches[i].sources[j].type == AUDIO_PORT_TYPE_DEVICE ? "device" : "mix",
nPatches[i].sources[j].id);
@@ -1271,7 +1274,7 @@ android_media_AudioSystem_listAudioPatches(JNIEnv *env, jobject clazz,
env->SetObjectArrayElement(jSinks, j, jSink);
env->DeleteLocalRef(jSink);
jSink = NULL;
- ALOGV("listAudioPatches patch %d sink %d is a %s handle %d",
+ ALOGV("listAudioPatches patch %zu sink %zu is a %s handle %d",
i, j,
nPatches[i].sinks[j].type == AUDIO_PORT_TYPE_DEVICE ? "device" : "mix",
nPatches[i].sinks[j].id);
@@ -1540,135 +1543,130 @@ static JNINativeMethod gEventHandlerMethods[] = {
int register_android_media_AudioSystem(JNIEnv *env)
{
-
- jclass arrayListClass = env->FindClass("java/util/ArrayList");
- gArrayListClass = (jclass) env->NewGlobalRef(arrayListClass);
- gArrayListMethods.add = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z");
- gArrayListMethods.toArray = env->GetMethodID(arrayListClass, "toArray", "()[Ljava/lang/Object;");
-
- jclass audioHandleClass = env->FindClass("android/media/AudioHandle");
- gAudioHandleClass = (jclass) env->NewGlobalRef(audioHandleClass);
- gAudioHandleCstor = env->GetMethodID(audioHandleClass, "<init>", "(I)V");
- gAudioHandleFields.mId = env->GetFieldID(audioHandleClass, "mId", "I");
-
- jclass audioPortClass = env->FindClass("android/media/AudioPort");
- gAudioPortClass = (jclass) env->NewGlobalRef(audioPortClass);
- gAudioPortCstor = env->GetMethodID(audioPortClass, "<init>",
- "(Landroid/media/AudioHandle;I[I[I[I[Landroid/media/AudioGain;)V");
- gAudioPortFields.mHandle = env->GetFieldID(audioPortClass, "mHandle",
+ jclass arrayListClass = FindClassOrDie(env, "java/util/ArrayList");
+ gArrayListClass = MakeGlobalRefOrDie(env, arrayListClass);
+ gArrayListMethods.add = GetMethodIDOrDie(env, arrayListClass, "add", "(Ljava/lang/Object;)Z");
+ gArrayListMethods.toArray = GetMethodIDOrDie(env, arrayListClass, "toArray", "()[Ljava/lang/Object;");
+
+ jclass audioHandleClass = FindClassOrDie(env, "android/media/AudioHandle");
+ gAudioHandleClass = MakeGlobalRefOrDie(env, audioHandleClass);
+ gAudioHandleCstor = GetMethodIDOrDie(env, audioHandleClass, "<init>", "(I)V");
+ gAudioHandleFields.mId = GetFieldIDOrDie(env, audioHandleClass, "mId", "I");
+
+ jclass audioPortClass = FindClassOrDie(env, "android/media/AudioPort");
+ gAudioPortClass = MakeGlobalRefOrDie(env, audioPortClass);
+ gAudioPortCstor = GetMethodIDOrDie(env, audioPortClass, "<init>",
+ "(Landroid/media/AudioHandle;I[I[I[I[Landroid/media/AudioGain;)V");
+ gAudioPortFields.mHandle = GetFieldIDOrDie(env, audioPortClass, "mHandle",
"Landroid/media/AudioHandle;");
- gAudioPortFields.mRole = env->GetFieldID(audioPortClass, "mRole", "I");
- gAudioPortFields.mGains = env->GetFieldID(audioPortClass, "mGains",
+ gAudioPortFields.mRole = GetFieldIDOrDie(env, audioPortClass, "mRole", "I");
+ gAudioPortFields.mGains = GetFieldIDOrDie(env, audioPortClass, "mGains",
"[Landroid/media/AudioGain;");
- gAudioPortFields.mActiveConfig = env->GetFieldID(audioPortClass, "mActiveConfig",
- "Landroid/media/AudioPortConfig;");
-
- jclass audioPortConfigClass = env->FindClass("android/media/AudioPortConfig");
- gAudioPortConfigClass = (jclass) env->NewGlobalRef(audioPortConfigClass);
- gAudioPortConfigCstor = env->GetMethodID(audioPortConfigClass, "<init>",
- "(Landroid/media/AudioPort;IIILandroid/media/AudioGainConfig;)V");
- gAudioPortConfigFields.mPort = env->GetFieldID(audioPortConfigClass, "mPort",
+ gAudioPortFields.mActiveConfig = GetFieldIDOrDie(env, audioPortClass, "mActiveConfig",
+ "Landroid/media/AudioPortConfig;");
+
+ jclass audioPortConfigClass = FindClassOrDie(env, "android/media/AudioPortConfig");
+ gAudioPortConfigClass = MakeGlobalRefOrDie(env, audioPortConfigClass);
+ gAudioPortConfigCstor = GetMethodIDOrDie(env, audioPortConfigClass, "<init>",
+ "(Landroid/media/AudioPort;IIILandroid/media/AudioGainConfig;)V");
+ gAudioPortConfigFields.mPort = GetFieldIDOrDie(env, audioPortConfigClass, "mPort",
"Landroid/media/AudioPort;");
- gAudioPortConfigFields.mSamplingRate = env->GetFieldID(audioPortConfigClass,
+ gAudioPortConfigFields.mSamplingRate = GetFieldIDOrDie(env, audioPortConfigClass,
"mSamplingRate", "I");
- gAudioPortConfigFields.mChannelMask = env->GetFieldID(audioPortConfigClass,
+ gAudioPortConfigFields.mChannelMask = GetFieldIDOrDie(env, audioPortConfigClass,
"mChannelMask", "I");
- gAudioPortConfigFields.mFormat = env->GetFieldID(audioPortConfigClass, "mFormat", "I");
- gAudioPortConfigFields.mGain = env->GetFieldID(audioPortConfigClass, "mGain",
+ gAudioPortConfigFields.mFormat = GetFieldIDOrDie(env, audioPortConfigClass, "mFormat", "I");
+ gAudioPortConfigFields.mGain = GetFieldIDOrDie(env, audioPortConfigClass, "mGain",
"Landroid/media/AudioGainConfig;");
- gAudioPortConfigFields.mConfigMask = env->GetFieldID(audioPortConfigClass, "mConfigMask", "I");
-
- jclass audioDevicePortConfigClass = env->FindClass("android/media/AudioDevicePortConfig");
- gAudioDevicePortConfigClass = (jclass) env->NewGlobalRef(audioDevicePortConfigClass);
- gAudioDevicePortConfigCstor = env->GetMethodID(audioDevicePortConfigClass, "<init>",
- "(Landroid/media/AudioDevicePort;IIILandroid/media/AudioGainConfig;)V");
-
- jclass audioMixPortConfigClass = env->FindClass("android/media/AudioMixPortConfig");
- gAudioMixPortConfigClass = (jclass) env->NewGlobalRef(audioMixPortConfigClass);
- gAudioMixPortConfigCstor = env->GetMethodID(audioMixPortConfigClass, "<init>",
- "(Landroid/media/AudioMixPort;IIILandroid/media/AudioGainConfig;)V");
-
- jclass audioDevicePortClass = env->FindClass("android/media/AudioDevicePort");
- gAudioDevicePortClass = (jclass) env->NewGlobalRef(audioDevicePortClass);
- gAudioDevicePortCstor = env->GetMethodID(audioDevicePortClass, "<init>",
- "(Landroid/media/AudioHandle;[I[I[I[Landroid/media/AudioGain;ILjava/lang/String;)V");
-
- jclass audioMixPortClass = env->FindClass("android/media/AudioMixPort");
- gAudioMixPortClass = (jclass) env->NewGlobalRef(audioMixPortClass);
- gAudioMixPortCstor = env->GetMethodID(audioMixPortClass, "<init>",
- "(Landroid/media/AudioHandle;I[I[I[I[Landroid/media/AudioGain;)V");
-
- jclass audioGainClass = env->FindClass("android/media/AudioGain");
- gAudioGainClass = (jclass) env->NewGlobalRef(audioGainClass);
- gAudioGainCstor = env->GetMethodID(audioGainClass, "<init>", "(IIIIIIIII)V");
-
- jclass audioGainConfigClass = env->FindClass("android/media/AudioGainConfig");
- gAudioGainConfigClass = (jclass) env->NewGlobalRef(audioGainConfigClass);
- gAudioGainConfigCstor = env->GetMethodID(audioGainConfigClass, "<init>",
+ gAudioPortConfigFields.mConfigMask = GetFieldIDOrDie(env, audioPortConfigClass, "mConfigMask",
+ "I");
+
+ jclass audioDevicePortConfigClass = FindClassOrDie(env, "android/media/AudioDevicePortConfig");
+ gAudioDevicePortConfigClass = MakeGlobalRefOrDie(env, audioDevicePortConfigClass);
+ gAudioDevicePortConfigCstor = GetMethodIDOrDie(env, audioDevicePortConfigClass, "<init>",
+ "(Landroid/media/AudioDevicePort;IIILandroid/media/AudioGainConfig;)V");
+
+ jclass audioMixPortConfigClass = FindClassOrDie(env, "android/media/AudioMixPortConfig");
+ gAudioMixPortConfigClass = MakeGlobalRefOrDie(env, audioMixPortConfigClass);
+ gAudioMixPortConfigCstor = GetMethodIDOrDie(env, audioMixPortConfigClass, "<init>",
+ "(Landroid/media/AudioMixPort;IIILandroid/media/AudioGainConfig;)V");
+
+ jclass audioDevicePortClass = FindClassOrDie(env, "android/media/AudioDevicePort");
+ gAudioDevicePortClass = MakeGlobalRefOrDie(env, audioDevicePortClass);
+ gAudioDevicePortCstor = GetMethodIDOrDie(env, audioDevicePortClass, "<init>",
+ "(Landroid/media/AudioHandle;[I[I[I[Landroid/media/AudioGain;ILjava/lang/String;)V");
+
+ jclass audioMixPortClass = FindClassOrDie(env, "android/media/AudioMixPort");
+ gAudioMixPortClass = MakeGlobalRefOrDie(env, audioMixPortClass);
+ gAudioMixPortCstor = GetMethodIDOrDie(env, audioMixPortClass, "<init>",
+ "(Landroid/media/AudioHandle;I[I[I[I[Landroid/media/AudioGain;)V");
+
+ jclass audioGainClass = FindClassOrDie(env, "android/media/AudioGain");
+ gAudioGainClass = MakeGlobalRefOrDie(env, audioGainClass);
+ gAudioGainCstor = GetMethodIDOrDie(env, audioGainClass, "<init>", "(IIIIIIIII)V");
+
+ jclass audioGainConfigClass = FindClassOrDie(env, "android/media/AudioGainConfig");
+ gAudioGainConfigClass = MakeGlobalRefOrDie(env, audioGainConfigClass);
+ gAudioGainConfigCstor = GetMethodIDOrDie(env, audioGainConfigClass, "<init>",
"(ILandroid/media/AudioGain;II[II)V");
- gAudioGainConfigFields.mIndex = env->GetFieldID(gAudioGainConfigClass, "mIndex", "I");
- gAudioGainConfigFields.mMode = env->GetFieldID(audioGainConfigClass, "mMode", "I");
- gAudioGainConfigFields.mChannelMask = env->GetFieldID(audioGainConfigClass, "mChannelMask",
+ gAudioGainConfigFields.mIndex = GetFieldIDOrDie(env, gAudioGainConfigClass, "mIndex", "I");
+ gAudioGainConfigFields.mMode = GetFieldIDOrDie(env, audioGainConfigClass, "mMode", "I");
+ gAudioGainConfigFields.mChannelMask = GetFieldIDOrDie(env, audioGainConfigClass, "mChannelMask",
"I");
- gAudioGainConfigFields.mValues = env->GetFieldID(audioGainConfigClass, "mValues", "[I");
- gAudioGainConfigFields.mRampDurationMs = env->GetFieldID(audioGainConfigClass,
+ gAudioGainConfigFields.mValues = GetFieldIDOrDie(env, audioGainConfigClass, "mValues", "[I");
+ gAudioGainConfigFields.mRampDurationMs = GetFieldIDOrDie(env, audioGainConfigClass,
"mRampDurationMs", "I");
- jclass audioPatchClass = env->FindClass("android/media/AudioPatch");
- gAudioPatchClass = (jclass) env->NewGlobalRef(audioPatchClass);
- gAudioPatchCstor = env->GetMethodID(audioPatchClass, "<init>",
+ jclass audioPatchClass = FindClassOrDie(env, "android/media/AudioPatch");
+ gAudioPatchClass = MakeGlobalRefOrDie(env, audioPatchClass);
+ gAudioPatchCstor = GetMethodIDOrDie(env, audioPatchClass, "<init>",
"(Landroid/media/AudioHandle;[Landroid/media/AudioPortConfig;[Landroid/media/AudioPortConfig;)V");
- gAudioPatchFields.mHandle = env->GetFieldID(audioPatchClass, "mHandle",
+ gAudioPatchFields.mHandle = GetFieldIDOrDie(env, audioPatchClass, "mHandle",
"Landroid/media/AudioHandle;");
- jclass eventHandlerClass = env->FindClass(kEventHandlerClassPathName);
- gPostEventFromNative = env->GetStaticMethodID(eventHandlerClass, "postEventFromNative",
- "(Ljava/lang/Object;IIILjava/lang/Object;)V");
+ jclass eventHandlerClass = FindClassOrDie(env, kEventHandlerClassPathName);
+ gPostEventFromNative = GetStaticMethodIDOrDie(env, eventHandlerClass, "postEventFromNative",
+ "(Ljava/lang/Object;IIILjava/lang/Object;)V");
- jclass audioMixClass = env->FindClass("android/media/audiopolicy/AudioMix");
- gAudioMixClass = (jclass) env->NewGlobalRef(audioMixClass);
- gAudioMixFields.mRule = env->GetFieldID(audioMixClass, "mRule",
+ jclass audioMixClass = FindClassOrDie(env, "android/media/audiopolicy/AudioMix");
+ gAudioMixClass = MakeGlobalRefOrDie(env, audioMixClass);
+ gAudioMixFields.mRule = GetFieldIDOrDie(env, audioMixClass, "mRule",
"Landroid/media/audiopolicy/AudioMixingRule;");
- gAudioMixFields.mFormat = env->GetFieldID(audioMixClass, "mFormat",
+ gAudioMixFields.mFormat = GetFieldIDOrDie(env, audioMixClass, "mFormat",
"Landroid/media/AudioFormat;");
- gAudioMixFields.mRouteFlags = env->GetFieldID(audioMixClass, "mRouteFlags", "I");
- gAudioMixFields.mRegistrationId = env->GetFieldID(audioMixClass, "mRegistrationId",
+ gAudioMixFields.mRouteFlags = GetFieldIDOrDie(env, audioMixClass, "mRouteFlags", "I");
+ gAudioMixFields.mRegistrationId = GetFieldIDOrDie(env, audioMixClass, "mRegistrationId",
"Ljava/lang/String;");
- gAudioMixFields.mMixType = env->GetFieldID(audioMixClass, "mMixType", "I");
+ gAudioMixFields.mMixType = GetFieldIDOrDie(env, audioMixClass, "mMixType", "I");
- jclass audioFormatClass = env->FindClass("android/media/AudioFormat");
- gAudioFormatClass = (jclass) env->NewGlobalRef(audioFormatClass);
- gAudioFormatFields.mEncoding = env->GetFieldID(audioFormatClass, "mEncoding", "I");
- gAudioFormatFields.mSampleRate = env->GetFieldID(audioFormatClass, "mSampleRate", "I");
- gAudioFormatFields.mChannelMask = env->GetFieldID(audioFormatClass, "mChannelMask", "I");
+ jclass audioFormatClass = FindClassOrDie(env, "android/media/AudioFormat");
+ gAudioFormatClass = MakeGlobalRefOrDie(env, audioFormatClass);
+ gAudioFormatFields.mEncoding = GetFieldIDOrDie(env, audioFormatClass, "mEncoding", "I");
+ gAudioFormatFields.mSampleRate = GetFieldIDOrDie(env, audioFormatClass, "mSampleRate", "I");
+ gAudioFormatFields.mChannelMask = GetFieldIDOrDie(env, audioFormatClass, "mChannelMask", "I");
- jclass audioMixingRuleClass = env->FindClass("android/media/audiopolicy/AudioMixingRule");
- gAudioMixingRuleClass = (jclass) env->NewGlobalRef(audioMixingRuleClass);
- gAudioMixingRuleFields.mCriteria = env->GetFieldID(audioMixingRuleClass, "mCriteria",
+ jclass audioMixingRuleClass = FindClassOrDie(env, "android/media/audiopolicy/AudioMixingRule");
+ gAudioMixingRuleClass = MakeGlobalRefOrDie(env, audioMixingRuleClass);
+ gAudioMixingRuleFields.mCriteria = GetFieldIDOrDie(env, audioMixingRuleClass, "mCriteria",
"Ljava/util/ArrayList;");
jclass attributeMatchCriterionClass =
- env->FindClass("android/media/audiopolicy/AudioMixingRule$AttributeMatchCriterion");
- gAttributeMatchCriterionClass = (jclass) env->NewGlobalRef(attributeMatchCriterionClass);
- gAttributeMatchCriterionFields.mAttr = env->GetFieldID(attributeMatchCriterionClass, "mAttr",
+ FindClassOrDie(env, "android/media/audiopolicy/AudioMixingRule$AttributeMatchCriterion");
+ gAttributeMatchCriterionClass = MakeGlobalRefOrDie(env, attributeMatchCriterionClass);
+ gAttributeMatchCriterionFields.mAttr = GetFieldIDOrDie(env, attributeMatchCriterionClass, "mAttr",
"Landroid/media/AudioAttributes;");
- gAttributeMatchCriterionFields.mRule = env->GetFieldID(attributeMatchCriterionClass, "mRule",
+ gAttributeMatchCriterionFields.mRule = GetFieldIDOrDie(env, attributeMatchCriterionClass, "mRule",
"I");
- jclass audioAttributesClass = env->FindClass("android/media/AudioAttributes");
- gAudioAttributesClass = (jclass) env->NewGlobalRef(audioAttributesClass);
- gAudioAttributesFields.mUsage = env->GetFieldID(audioAttributesClass, "mUsage", "I");
- gAudioAttributesFields.mSource = env->GetFieldID(audioAttributesClass, "mSource", "I");
+ jclass audioAttributesClass = FindClassOrDie(env, "android/media/AudioAttributes");
+ gAudioAttributesClass = MakeGlobalRefOrDie(env, audioAttributesClass);
+ gAudioAttributesFields.mUsage = GetFieldIDOrDie(env, audioAttributesClass, "mUsage", "I");
+ gAudioAttributesFields.mSource = GetFieldIDOrDie(env, audioAttributesClass, "mSource", "I");
AudioSystem::setErrorCallback(android_media_AudioSystem_error_callback);
- int status = AndroidRuntime::registerNativeMethods(env,
- kClassPathName, gMethods, NELEM(gMethods));
-
- if (status == 0) {
- status = AndroidRuntime::registerNativeMethods(env,
- kEventHandlerClassPathName, gEventHandlerMethods, NELEM(gEventHandlerMethods));
- }
- return status;
+ RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kEventHandlerClassPathName, gEventHandlerMethods,
+ NELEM(gEventHandlerMethods));
}
diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp
index ab38864..c6f4199 100644
--- a/core/jni/android_media_AudioTrack.cpp
+++ b/core/jni/android_media_AudioTrack.cpp
@@ -19,7 +19,7 @@
#include <JNIHelp.h>
#include <JniConstants.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "ScopedBytes.h"
@@ -1062,68 +1062,34 @@ int register_android_media_AudioTrack(JNIEnv *env)
javaAudioTrackFields.postNativeEventInJava = NULL;
// Get the AudioTrack class
- jclass audioTrackClass = env->FindClass(kClassPathName);
- if (audioTrackClass == NULL) {
- ALOGE("Can't find %s", kClassPathName);
- return -1;
- }
+ jclass audioTrackClass = FindClassOrDie(env, kClassPathName);
// Get the postEvent method
- javaAudioTrackFields.postNativeEventInJava = env->GetStaticMethodID(
- audioTrackClass,
- JAVA_POSTEVENT_CALLBACK_NAME, "(Ljava/lang/Object;IIILjava/lang/Object;)V");
- if (javaAudioTrackFields.postNativeEventInJava == NULL) {
- ALOGE("Can't find AudioTrack.%s", JAVA_POSTEVENT_CALLBACK_NAME);
- return -1;
- }
+ javaAudioTrackFields.postNativeEventInJava = GetStaticMethodIDOrDie(env,
+ audioTrackClass, JAVA_POSTEVENT_CALLBACK_NAME,
+ "(Ljava/lang/Object;IIILjava/lang/Object;)V");
// Get the variables fields
// nativeTrackInJavaObj
- javaAudioTrackFields.nativeTrackInJavaObj = env->GetFieldID(
- audioTrackClass,
- JAVA_NATIVETRACKINJAVAOBJ_FIELD_NAME, "J");
- if (javaAudioTrackFields.nativeTrackInJavaObj == NULL) {
- ALOGE("Can't find AudioTrack.%s", JAVA_NATIVETRACKINJAVAOBJ_FIELD_NAME);
- return -1;
- }
+ javaAudioTrackFields.nativeTrackInJavaObj = GetFieldIDOrDie(env,
+ audioTrackClass, JAVA_NATIVETRACKINJAVAOBJ_FIELD_NAME, "J");
// jniData
- javaAudioTrackFields.jniData = env->GetFieldID(
- audioTrackClass,
- JAVA_JNIDATA_FIELD_NAME, "J");
- if (javaAudioTrackFields.jniData == NULL) {
- ALOGE("Can't find AudioTrack.%s", JAVA_JNIDATA_FIELD_NAME);
- return -1;
- }
+ javaAudioTrackFields.jniData = GetFieldIDOrDie(env,
+ audioTrackClass, JAVA_JNIDATA_FIELD_NAME, "J");
// fieldStreamType
- javaAudioTrackFields.fieldStreamType = env->GetFieldID(audioTrackClass,
- JAVA_STREAMTYPE_FIELD_NAME, "I");
- if (javaAudioTrackFields.fieldStreamType == NULL) {
- ALOGE("Can't find AudioTrack.%s", JAVA_STREAMTYPE_FIELD_NAME);
- return -1;
- }
+ javaAudioTrackFields.fieldStreamType = GetFieldIDOrDie(env,
+ audioTrackClass, JAVA_STREAMTYPE_FIELD_NAME, "I");
// Get the AudioAttributes class and fields
- jclass audioAttrClass = env->FindClass(kAudioAttributesClassPathName);
- if (audioAttrClass == NULL) {
- ALOGE("Can't find %s", kAudioAttributesClassPathName);
- return -1;
- }
- jclass audioAttributesClassRef = (jclass)env->NewGlobalRef(audioAttrClass);
- javaAudioAttrFields.fieldUsage = env->GetFieldID(audioAttributesClassRef, "mUsage", "I");
- javaAudioAttrFields.fieldContentType
- = env->GetFieldID(audioAttributesClassRef, "mContentType", "I");
- javaAudioAttrFields.fieldFlags = env->GetFieldID(audioAttributesClassRef, "mFlags", "I");
- javaAudioAttrFields.fieldFormattedTags =
- env->GetFieldID(audioAttributesClassRef, "mFormattedTags", "Ljava/lang/String;");
- env->DeleteGlobalRef(audioAttributesClassRef);
- if (javaAudioAttrFields.fieldUsage == NULL || javaAudioAttrFields.fieldContentType == NULL
- || javaAudioAttrFields.fieldFlags == NULL
- || javaAudioAttrFields.fieldFormattedTags == NULL) {
- ALOGE("Can't initialize AudioAttributes fields");
- return -1;
- }
-
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ jclass audioAttrClass = FindClassOrDie(env, kAudioAttributesClassPathName);
+ javaAudioAttrFields.fieldUsage = GetFieldIDOrDie(env, audioAttrClass, "mUsage", "I");
+ javaAudioAttrFields.fieldContentType = GetFieldIDOrDie(env,
+ audioAttrClass, "mContentType", "I");
+ javaAudioAttrFields.fieldFlags = GetFieldIDOrDie(env, audioAttrClass, "mFlags", "I");
+ javaAudioAttrFields.fieldFormattedTags = GetFieldIDOrDie(env,
+ audioAttrClass, "mFormattedTags", "Ljava/lang/String;");
+
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
diff --git a/core/jni/android_media_JetPlayer.cpp b/core/jni/android_media_JetPlayer.cpp
index 69f5711..d441f10 100644
--- a/core/jni/android_media_JetPlayer.cpp
+++ b/core/jni/android_media_JetPlayer.cpp
@@ -24,7 +24,7 @@
#include <jni.h>
#include <JNIHelp.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <utils/Log.h>
#include <media/JetPlayer.h>
@@ -517,36 +517,22 @@ static JNINativeMethod gMethods[] = {
int register_android_media_JetPlayer(JNIEnv *env)
{
- jclass jetPlayerClass = NULL;
javaJetPlayerFields.jetClass = NULL;
javaJetPlayerFields.postNativeEventInJava = NULL;
javaJetPlayerFields.nativePlayerInJavaObj = NULL;
// Get the JetPlayer java class
- jetPlayerClass = env->FindClass(kClassPathName);
- if (jetPlayerClass == NULL) {
- ALOGE("Can't find %s", kClassPathName);
- return -1;
- }
- javaJetPlayerFields.jetClass = (jclass)env->NewGlobalRef(jetPlayerClass);
+ jclass jetPlayerClass = FindClassOrDie(env, kClassPathName);
+ javaJetPlayerFields.jetClass = MakeGlobalRefOrDie(env, jetPlayerClass);
// Get the mNativePlayerInJavaObj variable field
- javaJetPlayerFields.nativePlayerInJavaObj = env->GetFieldID(
- jetPlayerClass,
- JAVA_NATIVEJETPLAYERINJAVAOBJ_FIELD_NAME, "J");
- if (javaJetPlayerFields.nativePlayerInJavaObj == NULL) {
- ALOGE("Can't find JetPlayer.%s", JAVA_NATIVEJETPLAYERINJAVAOBJ_FIELD_NAME);
- return -1;
- }
+ javaJetPlayerFields.nativePlayerInJavaObj = GetFieldIDOrDie(env,
+ jetPlayerClass, JAVA_NATIVEJETPLAYERINJAVAOBJ_FIELD_NAME, "J");
// Get the callback to post events from this native code to Java
- javaJetPlayerFields.postNativeEventInJava = env->GetStaticMethodID(javaJetPlayerFields.jetClass,
- JAVA_NATIVEJETPOSTEVENT_CALLBACK_NAME, "(Ljava/lang/Object;III)V");
- if (javaJetPlayerFields.postNativeEventInJava == NULL) {
- ALOGE("Can't find Jet.%s", JAVA_NATIVEJETPOSTEVENT_CALLBACK_NAME);
- return -1;
- }
+ javaJetPlayerFields.postNativeEventInJava = GetStaticMethodIDOrDie(env,
+ javaJetPlayerFields.jetClass, JAVA_NATIVEJETPOSTEVENT_CALLBACK_NAME,
+ "(Ljava/lang/Object;III)V");
- return AndroidRuntime::registerNativeMethods(env,
- kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
diff --git a/core/jni/android_media_RemoteDisplay.cpp b/core/jni/android_media_RemoteDisplay.cpp
index 1cd3fbb..e2bba30 100644
--- a/core/jni/android_media_RemoteDisplay.cpp
+++ b/core/jni/android_media_RemoteDisplay.cpp
@@ -22,7 +22,7 @@
#include "android_os_Parcel.h"
#include "android_util_Binder.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <android_runtime/android_view_Surface.h>
#include <android_runtime/Log.h>
@@ -188,17 +188,15 @@ static JNINativeMethod gMethods[] = {
int register_android_media_RemoteDisplay(JNIEnv* env)
{
- int err = AndroidRuntime::registerNativeMethods(env, "android/media/RemoteDisplay",
- gMethods, NELEM(gMethods));
-
- jclass clazz = env->FindClass("android/media/RemoteDisplay");
- gRemoteDisplayClassInfo.notifyDisplayConnected =
- env->GetMethodID(clazz, "notifyDisplayConnected",
- "(Landroid/view/Surface;IIII)V");
- gRemoteDisplayClassInfo.notifyDisplayDisconnected =
- env->GetMethodID(clazz, "notifyDisplayDisconnected", "()V");
- gRemoteDisplayClassInfo.notifyDisplayError =
- env->GetMethodID(clazz, "notifyDisplayError", "(I)V");
+ int err = RegisterMethodsOrDie(env, "android/media/RemoteDisplay", gMethods, NELEM(gMethods));
+
+ jclass clazz = FindClassOrDie(env, "android/media/RemoteDisplay");
+ gRemoteDisplayClassInfo.notifyDisplayConnected = GetMethodIDOrDie(env,
+ clazz, "notifyDisplayConnected", "(Landroid/view/Surface;IIII)V");
+ gRemoteDisplayClassInfo.notifyDisplayDisconnected = GetMethodIDOrDie(env,
+ clazz, "notifyDisplayDisconnected", "()V");
+ gRemoteDisplayClassInfo.notifyDisplayError = GetMethodIDOrDie(env,
+ clazz, "notifyDisplayError", "(I)V");
return err;
}
diff --git a/core/jni/android_media_ToneGenerator.cpp b/core/jni/android_media_ToneGenerator.cpp
index ca00709..243f040 100644
--- a/core/jni/android_media_ToneGenerator.cpp
+++ b/core/jni/android_media_ToneGenerator.cpp
@@ -23,7 +23,7 @@
#include <jni.h>
#include <JNIHelp.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <utils/Log.h>
#include <media/AudioSystem.h>
@@ -134,21 +134,10 @@ static JNINativeMethod gMethods[] = {
int register_android_media_ToneGenerator(JNIEnv *env) {
- jclass clazz;
+ jclass clazz = FindClassOrDie(env, "android/media/ToneGenerator");
- clazz = env->FindClass("android/media/ToneGenerator");
- if (clazz == NULL) {
- ALOGE("Can't find %s", "android/media/ToneGenerator");
- return -1;
- }
-
- fields.context = env->GetFieldID(clazz, "mNativeContext", "J");
- if (fields.context == NULL) {
- ALOGE("Can't find ToneGenerator.mNativeContext");
- return -1;
- }
+ fields.context = GetFieldIDOrDie(env, clazz, "mNativeContext", "J");
ALOGV("register_android_media_ToneGenerator ToneGenerator fields.context: %p", fields.context);
- return AndroidRuntime::registerNativeMethods(env,
- "android/media/ToneGenerator", gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/media/ToneGenerator", gMethods, NELEM(gMethods));
}
diff --git a/core/jni/android_net_LocalSocketImpl.cpp b/core/jni/android_net_LocalSocketImpl.cpp
index 98f4bed..97abe6b 100644
--- a/core/jni/android_net_LocalSocketImpl.cpp
+++ b/core/jni/android_net_LocalSocketImpl.cpp
@@ -39,6 +39,9 @@
namespace android {
+template <typename T>
+void UNUSED(T t) {}
+
static jfieldID field_inboundFileDescriptors;
static jfieldID field_outboundFileDescriptors;
static jclass class_Credentials;
@@ -57,7 +60,7 @@ socket_connect_local(JNIEnv *env, jobject object,
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return;
}
@@ -95,7 +98,7 @@ socket_bind_local (JNIEnv *env, jobject object, jobject fileDescriptor,
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return;
}
@@ -118,7 +121,7 @@ socket_listen (JNIEnv *env, jobject object, jobject fileDescriptor, jint backlog
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return;
}
@@ -154,7 +157,7 @@ socket_accept (JNIEnv *env, jobject object, jobject fileDescriptor, jobject s)
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return NULL;
}
@@ -184,7 +187,7 @@ socket_shutdown (JNIEnv *env, jobject object, jobject fileDescriptor,
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return;
}
@@ -246,7 +249,7 @@ socket_getOption(JNIEnv *env, jobject object, jobject fileDescriptor, jint optID
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return 0;
}
@@ -293,7 +296,7 @@ static void socket_setOption(
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return;
}
@@ -353,7 +356,7 @@ static jint socket_pending (JNIEnv *env, jobject object,
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return (jint)-1;
}
@@ -378,7 +381,7 @@ static jint socket_available (JNIEnv *env, jobject object,
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return (jint)-1;
}
@@ -459,20 +462,20 @@ static int socket_process_cmsg(JNIEnv *env, jobject thisJ, struct msghdr * pMsg)
jobject fdObject
= jniCreateFileDescriptor(env, pDescriptors[i]);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return -1;
}
env->SetObjectArrayElement(fdArray, i, fdObject);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return -1;
}
}
env->SetObjectField(thisJ, field_inboundFileDescriptors, fdArray);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return -1;
}
}
@@ -492,7 +495,6 @@ static ssize_t socket_read_all(JNIEnv *env, jobject thisJ, int fd,
void *buffer, size_t len)
{
ssize_t ret;
- ssize_t bytesread = 0;
struct msghdr msg;
struct iovec iv;
unsigned char *buf = (unsigned char *)buffer;
@@ -558,7 +560,7 @@ static int socket_write_all(JNIEnv *env, jobject object, int fd,
= (jobjectArray)env->GetObjectField(
object, field_outboundFileDescriptors);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return -1;
}
@@ -570,18 +572,18 @@ static int socket_write_all(JNIEnv *env, jobject object, int fd,
// Add any pending outbound file descriptors to the message
if (outboundFds != NULL) {
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return -1;
}
for (int i = 0; i < countFds; i++) {
jobject fdObject = env->GetObjectArrayElement(outboundFds, i);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return -1;
}
fds[i] = jniGetFDFromFileDescriptor(env, fdObject);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return -1;
}
}
@@ -638,7 +640,7 @@ static jint socket_read (JNIEnv *env, jobject object, jobject fileDescriptor)
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return (jint)0;
}
@@ -683,7 +685,7 @@ static jint socket_readba (JNIEnv *env, jobject object,
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return (jint)-1;
}
@@ -717,12 +719,12 @@ static void socket_write (JNIEnv *env, jobject object,
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return;
}
err = socket_write_all(env, object, fd, &b, 1);
-
+ UNUSED(err);
// A return of -1 above means an exception is pending
}
@@ -745,7 +747,7 @@ static void socket_writeba (JNIEnv *env, jobject object,
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return;
}
@@ -758,7 +760,7 @@ static void socket_writeba (JNIEnv *env, jobject object,
err = socket_write_all(env, object, fd,
byteBuffer + off, len);
-
+ UNUSED(err);
// A return of -1 above means an exception is pending
env->ReleaseByteArrayElements(buffer, byteBuffer, JNI_ABORT);
@@ -777,7 +779,7 @@ static jobject socket_get_peer_credentials(JNIEnv *env,
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return NULL;
}
@@ -816,7 +818,7 @@ static jobject socket_getSockName(JNIEnv *env,
fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
return NULL;
}
diff --git a/core/jni/android_net_NetUtils.cpp b/core/jni/android_net_NetUtils.cpp
index 8b9f574..9092512 100644
--- a/core/jni/android_net_NetUtils.cpp
+++ b/core/jni/android_net_NetUtils.cpp
@@ -19,13 +19,14 @@
#include "jni.h"
#include "JNIHelp.h"
#include "NetdClient.h"
-#include "resolv_netid.h"
#include <utils/misc.h>
#include <android_runtime/AndroidRuntime.h>
#include <utils/Log.h>
#include <arpa/inet.h>
#include <cutils/properties.h>
+#include "core_jni_helpers.h"
+
extern "C" {
int ifc_enable(const char *ifname);
int ifc_disable(const char *ifname);
@@ -269,27 +270,26 @@ static JNINativeMethod gNetworkUtilMethods[] = {
int register_android_net_NetworkUtils(JNIEnv* env)
{
- jclass dhcpResultsClass = env->FindClass("android/net/DhcpResults");
- LOG_FATAL_IF(dhcpResultsClass == NULL, "Unable to find class android/net/DhcpResults");
- dhcpResultsFieldIds.clear =
- env->GetMethodID(dhcpResultsClass, "clear", "()V");
- dhcpResultsFieldIds.setIpAddress =
- env->GetMethodID(dhcpResultsClass, "setIpAddress", "(Ljava/lang/String;I)Z");
- dhcpResultsFieldIds.setGateway =
- env->GetMethodID(dhcpResultsClass, "setGateway", "(Ljava/lang/String;)Z");
- dhcpResultsFieldIds.addDns =
- env->GetMethodID(dhcpResultsClass, "addDns", "(Ljava/lang/String;)Z");
- dhcpResultsFieldIds.setDomains =
- env->GetMethodID(dhcpResultsClass, "setDomains", "(Ljava/lang/String;)V");
- dhcpResultsFieldIds.setServerAddress =
- env->GetMethodID(dhcpResultsClass, "setServerAddress", "(Ljava/lang/String;)Z");
- dhcpResultsFieldIds.setLeaseDuration =
- env->GetMethodID(dhcpResultsClass, "setLeaseDuration", "(I)V");
- dhcpResultsFieldIds.setVendorInfo =
- env->GetMethodID(dhcpResultsClass, "setVendorInfo", "(Ljava/lang/String;)V");
-
- return AndroidRuntime::registerNativeMethods(env,
- NETUTILS_PKG_NAME, gNetworkUtilMethods, NELEM(gNetworkUtilMethods));
+ jclass dhcpResultsClass = FindClassOrDie(env, "android/net/DhcpResults");
+
+ dhcpResultsFieldIds.clear = GetMethodIDOrDie(env, dhcpResultsClass, "clear", "()V");
+ dhcpResultsFieldIds.setIpAddress =GetMethodIDOrDie(env, dhcpResultsClass, "setIpAddress",
+ "(Ljava/lang/String;I)Z");
+ dhcpResultsFieldIds.setGateway = GetMethodIDOrDie(env, dhcpResultsClass, "setGateway",
+ "(Ljava/lang/String;)Z");
+ dhcpResultsFieldIds.addDns = GetMethodIDOrDie(env, dhcpResultsClass, "addDns",
+ "(Ljava/lang/String;)Z");
+ dhcpResultsFieldIds.setDomains = GetMethodIDOrDie(env, dhcpResultsClass, "setDomains",
+ "(Ljava/lang/String;)V");
+ dhcpResultsFieldIds.setServerAddress = GetMethodIDOrDie(env, dhcpResultsClass,
+ "setServerAddress", "(Ljava/lang/String;)Z");
+ dhcpResultsFieldIds.setLeaseDuration = GetMethodIDOrDie(env, dhcpResultsClass,
+ "setLeaseDuration", "(I)V");
+ dhcpResultsFieldIds.setVendorInfo = GetMethodIDOrDie(env, dhcpResultsClass, "setVendorInfo",
+ "(Ljava/lang/String;)V");
+
+ return RegisterMethodsOrDie(env, NETUTILS_PKG_NAME, gNetworkUtilMethods,
+ NELEM(gNetworkUtilMethods));
}
}; // namespace android
diff --git a/core/jni/android_net_TrafficStats.cpp b/core/jni/android_net_TrafficStats.cpp
index 031637f..7354417 100644
--- a/core/jni/android_net_TrafficStats.cpp
+++ b/core/jni/android_net_TrafficStats.cpp
@@ -23,7 +23,7 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <jni.h>
#include <ScopedUtfChars.h>
#include <utils/misc.h>
@@ -192,8 +192,7 @@ static JNINativeMethod gMethods[] = {
};
int register_android_net_TrafficStats(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, "android/net/TrafficStats",
- gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/net/TrafficStats", gMethods, NELEM(gMethods));
}
}
diff --git a/core/jni/android_nfc.h b/core/jni/android_nfc.h
deleted file mode 100644
index 36346e3..0000000
--- a/core/jni/android_nfc.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2010 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.
- */
-
-/*
- * Contains the bare minimum header so that framework NFC jni can link
- * against NFC native library
- */
-
-#ifndef __ANDROID_NFC_H__
-#define __ANDROID_NFC_H__
-
-#define LOG_TAG "NdefMessage"
-#include <utils/Log.h>
-
-extern "C" {
-
-#if 0
- #define TRACE(...) ALOG(LOG_DEBUG, "NdefMessage", __VA_ARGS__)
-#else
- #define TRACE(...)
-#endif
-
-typedef struct phFriNfc_NdefRecord {
- uint8_t Flags;
- uint8_t Tnf;
- uint8_t TypeLength;
- uint8_t *Type;
- uint8_t IdLength;
- uint8_t *Id;
- uint32_t PayloadLength;
- uint8_t *PayloadData;
-} phFriNfc_NdefRecord_t;
-
-uint16_t phFriNfc_NdefRecord_GetRecords(uint8_t* pBuffer,
- uint32_t BufferLength,
- uint8_t* pRawRecords[ ],
- uint8_t IsChunked[ ],
- uint32_t* pNumberOfRawRecords
- );
-uint16_t phFriNfc_NdefRecord_Parse(phFriNfc_NdefRecord_t* pRecord,
- uint8_t* pRawRecord);
-
-uint16_t phFriNfc_NdefRecord_Generate(phFriNfc_NdefRecord_t* pRecord,
- uint8_t* pBuffer,
- uint32_t MaxBufferSize,
- uint32_t* pBytesWritten
- );
-}
-
-#endif
diff --git a/core/jni/android_nio_utils.cpp b/core/jni/android_nio_utils.cpp
index 59d6e41..ed8c603 100644
--- a/core/jni/android_nio_utils.cpp
+++ b/core/jni/android_nio_utils.cpp
@@ -16,6 +16,8 @@
#include "android_nio_utils.h"
+#include "core_jni_helpers.h"
+
struct NioJNIData {
jclass nioAccessClass;
@@ -73,39 +75,19 @@ android::AutoBufferPointer::~AutoBufferPointer() {
///////////////////////////////////////////////////////////////////////////////
-static jclass findClass(JNIEnv* env, const char name[]) {
- jclass c = env->FindClass(name);
- LOG_FATAL_IF(!c, "Unable to find class %s", name);
- return c;
-}
-
-static jmethodID findStaticMethod(JNIEnv* env, jclass c, const char method[],
- const char params[]) {
- jmethodID m = env->GetStaticMethodID(c, method, params);
- LOG_FATAL_IF(!m, "Unable to find method %s", method);
- return m;
-}
-
-static jfieldID getFieldID(JNIEnv* env, jclass c, const char name[],
- const char type[]) {
- jfieldID f = env->GetFieldID(c, name, type);
- LOG_FATAL_IF(!f, "Unable to find field %s", name);
- return f;
-}
-
namespace android {
int register_android_nio_utils(JNIEnv* env) {
- jclass localClass = findClass(env, "java/nio/NIOAccess");
- gNioJNI.getBasePointerID = findStaticMethod(env, localClass,
- "getBasePointer", "(Ljava/nio/Buffer;)J");
- gNioJNI.getBaseArrayID = findStaticMethod(env, localClass,
- "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;");
- gNioJNI.getBaseArrayOffsetID = findStaticMethod(env, localClass,
- "getBaseArrayOffset", "(Ljava/nio/Buffer;)I");
+ jclass localClass = FindClassOrDie(env, "java/nio/NIOAccess");
+ gNioJNI.getBasePointerID = GetStaticMethodIDOrDie(env, localClass, "getBasePointer",
+ "(Ljava/nio/Buffer;)J");
+ gNioJNI.getBaseArrayID = GetStaticMethodIDOrDie(env, localClass, "getBaseArray",
+ "(Ljava/nio/Buffer;)Ljava/lang/Object;");
+ gNioJNI.getBaseArrayOffsetID = GetStaticMethodIDOrDie(env, localClass, "getBaseArrayOffset",
+ "(Ljava/nio/Buffer;)I");
// now record a permanent version of the class ID
- gNioJNI.nioAccessClass = (jclass) env->NewGlobalRef(localClass);
+ gNioJNI.nioAccessClass = MakeGlobalRefOrDie(env, localClass);
return 0;
}
diff --git a/core/jni/android_nio_utils.h b/core/jni/android_nio_utils.h
index 69c360c..c634cb9 100644
--- a/core/jni/android_nio_utils.h
+++ b/core/jni/android_nio_utils.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef android_nio_utils_DEFINED
-#define android_nio_utils_DEFINED
+#ifndef _ANDROID_NIO_UTILS_H_
+#define _ANDROID_NIO_UTILS_H_
#include <android_runtime/AndroidRuntime.h>
@@ -58,17 +58,16 @@ class AutoBufferPointer {
public:
AutoBufferPointer(JNIEnv* env, jobject nioBuffer, jboolean commit);
~AutoBufferPointer();
-
+
void* pointer() const { return fPointer; }
-
+
private:
JNIEnv* fEnv;
void* fPointer;
jarray fArray;
- jint fRemaining;
jboolean fCommit;
};
} /* namespace android */
-#endif
+#endif // _ANDROID_NIO_UTILS_H_
diff --git a/core/jni/android_opengl_EGL14.cpp b/core/jni/android_opengl_EGL14.cpp
index 19e4d99..36f7963 100644
--- a/core/jni/android_opengl_EGL14.cpp
+++ b/core/jni/android_opengl_EGL14.cpp
@@ -16,6 +16,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include "jni.h"
#include "JNIHelp.h"
#include <android_runtime/AndroidRuntime.h>
@@ -156,7 +160,8 @@ static jobject
android_eglGetDisplayInt
(JNIEnv *_env, jobject _this, jint display_id) {
- if ((EGLNativeDisplayType)display_id != EGL_DEFAULT_DISPLAY) {
+ if (static_cast<uintptr_t>(display_id) !=
+ reinterpret_cast<uintptr_t>(EGL_DEFAULT_DISPLAY)) {
jniThrowException(_env, "java/lang/UnsupportedOperationException", "eglGetDisplay");
return 0;
}
diff --git a/core/jni/android_opengl_EGLExt.cpp b/core/jni/android_opengl_EGLExt.cpp
index 15899f5..60a3bf6 100644
--- a/core/jni/android_opengl_EGLExt.cpp
+++ b/core/jni/android_opengl_EGLExt.cpp
@@ -16,6 +16,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include "jni.h"
#include "JNIHelp.h"
#include <android_runtime/AndroidRuntime.h>
@@ -81,23 +85,19 @@ nativeClassInit(JNIEnv *_env, jclass glImplClass)
eglsurfaceConstructor = _env->GetMethodID(eglsurfaceClass, "<init>", "(J)V");
eglconfigConstructor = _env->GetMethodID(eglconfigClass, "<init>", "(J)V");
- jobject localeglNoContextObject = _env->NewObject(eglcontextClass, eglcontextConstructor, reinterpret_cast<jlong>(EGL_NO_CONTEXT));
- eglNoContextObject = _env->NewGlobalRef(localeglNoContextObject);
- jobject localeglNoDisplayObject = _env->NewObject(egldisplayClass, egldisplayConstructor, reinterpret_cast<jlong>(EGL_NO_DISPLAY));
- eglNoDisplayObject = _env->NewGlobalRef(localeglNoDisplayObject);
- jobject localeglNoSurfaceObject = _env->NewObject(eglsurfaceClass, eglsurfaceConstructor, reinterpret_cast<jlong>(EGL_NO_SURFACE));
- eglNoSurfaceObject = _env->NewGlobalRef(localeglNoSurfaceObject);
-
jclass eglClass = _env->FindClass("android/opengl/EGL14");
jfieldID noContextFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_CONTEXT", "Landroid/opengl/EGLContext;");
- _env->SetStaticObjectField(eglClass, noContextFieldID, eglNoContextObject);
+ jobject localeglNoContextObject = _env->GetStaticObjectField(eglClass, noContextFieldID);
+ eglNoContextObject = _env->NewGlobalRef(localeglNoContextObject);
jfieldID noDisplayFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_DISPLAY", "Landroid/opengl/EGLDisplay;");
- _env->SetStaticObjectField(eglClass, noDisplayFieldID, eglNoDisplayObject);
+ jobject localeglNoDisplayObject = _env->GetStaticObjectField(eglClass, noDisplayFieldID);
+ eglNoDisplayObject = _env->NewGlobalRef(localeglNoDisplayObject);
jfieldID noSurfaceFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_SURFACE", "Landroid/opengl/EGLSurface;");
- _env->SetStaticObjectField(eglClass, noSurfaceFieldID, eglNoSurfaceObject);
+ jobject localeglNoSurfaceObject = _env->GetStaticObjectField(eglClass, noSurfaceFieldID);
+ eglNoSurfaceObject = _env->NewGlobalRef(localeglNoSurfaceObject);
}
static void *
diff --git a/core/jni/android_opengl_GLES10.cpp b/core/jni/android_opengl_GLES10.cpp
index 0a39a8e..c9b68bf 100644
--- a/core/jni/android_opengl_GLES10.cpp
+++ b/core/jni/android_opengl_GLES10.cpp
@@ -17,6 +17,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include <GLES/gl.h>
#include <GLES/glext.h>
diff --git a/core/jni/android_opengl_GLES10Ext.cpp b/core/jni/android_opengl_GLES10Ext.cpp
index 83d9bda..4f1eaa5 100644
--- a/core/jni/android_opengl_GLES10Ext.cpp
+++ b/core/jni/android_opengl_GLES10Ext.cpp
@@ -17,6 +17,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include <GLES/gl.h>
#include <GLES/glext.h>
diff --git a/core/jni/android_opengl_GLES11.cpp b/core/jni/android_opengl_GLES11.cpp
index a292cf2..08c4740 100644
--- a/core/jni/android_opengl_GLES11.cpp
+++ b/core/jni/android_opengl_GLES11.cpp
@@ -17,6 +17,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include <GLES/gl.h>
#include <GLES/glext.h>
diff --git a/core/jni/android_opengl_GLES11Ext.cpp b/core/jni/android_opengl_GLES11Ext.cpp
index 4ee5f15..21e5670f 100644
--- a/core/jni/android_opengl_GLES11Ext.cpp
+++ b/core/jni/android_opengl_GLES11Ext.cpp
@@ -17,6 +17,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include <GLES/gl.h>
#include <GLES/glext.h>
diff --git a/core/jni/android_opengl_GLES20.cpp b/core/jni/android_opengl_GLES20.cpp
index 60ab37b..cd0c135 100644
--- a/core/jni/android_opengl_GLES20.cpp
+++ b/core/jni/android_opengl_GLES20.cpp
@@ -17,6 +17,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
diff --git a/core/jni/android_opengl_GLES30.cpp b/core/jni/android_opengl_GLES30.cpp
index ba324b0..226162d 100644
--- a/core/jni/android_opengl_GLES30.cpp
+++ b/core/jni/android_opengl_GLES30.cpp
@@ -17,6 +17,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include <GLES3/gl3.h>
#include <GLES3/gl3ext.h>
@@ -1931,7 +1935,11 @@ android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuff
(GLsizei *)length,
(GLint *)size,
(GLenum *)type,
- (char *)name
+ // The cast below is incorrect. The driver will end up writing to the
+ // address specified by name, which will always crash the process since
+ // it is guaranteed to be in low memory. The additional static_cast
+ // suppresses the warning for now. http://b/19478262
+ (char *)static_cast<uintptr_t>(name)
);
if (_typeArray) {
releasePointer(_env, _typeArray, type, JNI_TRUE);
@@ -3639,7 +3647,7 @@ android_glDrawElementsInstanced__IIIII
(GLenum)mode,
(GLsizei)count,
(GLenum)type,
- (GLvoid *)indicesOffset,
+ (GLvoid *)static_cast<uintptr_t>(indicesOffset),
(GLsizei)instanceCount
);
}
diff --git a/core/jni/android_opengl_GLES31.cpp b/core/jni/android_opengl_GLES31.cpp
index bc9fc5d..e5ea950 100644
--- a/core/jni/android_opengl_GLES31.cpp
+++ b/core/jni/android_opengl_GLES31.cpp
@@ -16,6 +16,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include <stdint.h>
#include <GLES3/gl31.h>
#include <jni.h>
@@ -351,7 +355,7 @@ static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong
// In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
// GL checks for too-large values. Here we only need to check for successful signed 64-bit
// to unsigned 32-bit conversion.
- if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
+ if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
return;
}
@@ -363,7 +367,7 @@ static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jin
// In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
// GL checks for too-large values. Here we only need to check for successful signed 64-bit
// to unsigned 32-bit conversion.
- if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
+ if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
return;
}
diff --git a/core/jni/android_opengl_GLES31Ext.cpp b/core/jni/android_opengl_GLES31Ext.cpp
index d76c166..7317e9f 100644
--- a/core/jni/android_opengl_GLES31Ext.cpp
+++ b/core/jni/android_opengl_GLES31Ext.cpp
@@ -16,6 +16,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include <GLES3/gl31.h>
#include <GLES2/gl2ext.h>
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index d9e64c7..773d42e 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -227,13 +227,12 @@ static void read_mapinfo(FILE *fp, stats_t* stats)
int len, nameLen;
bool skip, done = false;
- unsigned size = 0, resident = 0, pss = 0, swappable_pss = 0;
+ unsigned pss = 0, swappable_pss = 0;
float sharing_proportion = 0.0;
unsigned shared_clean = 0, shared_dirty = 0;
unsigned private_clean = 0, private_dirty = 0;
unsigned swapped_out = 0;
bool is_swappable = false;
- unsigned referenced = 0;
unsigned temp;
uint64_t start;
@@ -362,9 +361,9 @@ static void read_mapinfo(FILE *fp, stats_t* stats)
}
if (line[0] == 'S' && sscanf(line, "Size: %d kB", &temp) == 1) {
- size = temp;
+ /* size = temp; */
} else if (line[0] == 'R' && sscanf(line, "Rss: %d kB", &temp) == 1) {
- resident = temp;
+ /* resident = temp; */
} else if (line[0] == 'P' && sscanf(line, "Pss: %d kB", &temp) == 1) {
pss = temp;
} else if (line[0] == 'S' && sscanf(line, "Shared_Clean: %d kB", &temp) == 1) {
@@ -376,7 +375,7 @@ static void read_mapinfo(FILE *fp, stats_t* stats)
} else if (line[0] == 'P' && sscanf(line, "Private_Dirty: %d kB", &temp) == 1) {
private_dirty = temp;
} else if (line[0] == 'R' && sscanf(line, "Referenced: %d kB", &temp) == 1) {
- referenced = temp;
+ /* referenced = temp; */
} else if (line[0] == 'S' && sscanf(line, "Swap: %d kB", &temp) == 1) {
swapped_out = temp;
} else if (sscanf(line, "%" SCNx64 "-%" SCNx64 " %*s %*x %*x:%*x %*d", &start, &end) == 2) {
@@ -502,7 +501,6 @@ static jlong android_os_Debug_getPssPid(JNIEnv *env, jobject clazz, jint pid, jl
jlong pss = 0;
jlong uss = 0;
jlong memtrack = 0;
- unsigned temp;
char tmp[128];
FILE *fp;
@@ -939,7 +937,8 @@ static void android_os_Debug_dumpNativeBacktraceToFile(JNIEnv* env, jobject claz
const jchar* str = env->GetStringCritical(fileName, 0);
String8 fileName8;
if (str) {
- fileName8 = String8(str, env->GetStringLength(fileName));
+ fileName8 = String8(reinterpret_cast<const char16_t*>(str),
+ env->GetStringLength(fileName));
env->ReleaseStringCritical(fileName, str);
}
diff --git a/core/jni/android_os_MemoryFile.cpp b/core/jni/android_os_MemoryFile.cpp
index 27b29bc..c198a73 100644
--- a/core/jni/android_os_MemoryFile.cpp
+++ b/core/jni/android_os_MemoryFile.cpp
@@ -18,7 +18,7 @@
#include <utils/Log.h>
#include <cutils/ashmem.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "JNIHelp.h"
#include <unistd.h>
#include <sys/mman.h>
@@ -151,9 +151,7 @@ static const JNINativeMethod methods[] = {
int register_android_os_MemoryFile(JNIEnv* env)
{
- return AndroidRuntime::registerNativeMethods(
- env, "android/os/MemoryFile",
- methods, NELEM(methods));
+ return RegisterMethodsOrDie(env, "android/os/MemoryFile", methods, NELEM(methods));
}
}
diff --git a/core/jni/android_os_MessageQueue.cpp b/core/jni/android_os_MessageQueue.cpp
index a8ed895..5d7877b 100644
--- a/core/jni/android_os_MessageQueue.cpp
+++ b/core/jni/android_os_MessageQueue.cpp
@@ -23,6 +23,8 @@
#include <utils/Log.h>
#include "android_os_MessageQueue.h"
+#include "core_jni_helpers.h"
+
namespace android {
static struct {
@@ -54,8 +56,8 @@ MessageQueue::~MessageQueue() {
}
bool MessageQueue::raiseAndClearException(JNIEnv* env, const char* msg) {
- jthrowable exceptionObj = env->ExceptionOccurred();
- if (exceptionObj) {
+ if (env->ExceptionCheck()) {
+ jthrowable exceptionObj = env->ExceptionOccurred();
env->ExceptionClear();
raiseException(env, msg, exceptionObj);
env->DeleteLocalRef(exceptionObj);
@@ -157,26 +159,15 @@ static JNINativeMethod gMessageQueueMethods[] = {
{ "nativeIsIdling", "(J)Z", (void*)android_os_MessageQueue_nativeIsIdling }
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
int register_android_os_MessageQueue(JNIEnv* env) {
- int res = jniRegisterNativeMethods(env, "android/os/MessageQueue",
- gMessageQueueMethods, NELEM(gMessageQueueMethods));
- LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+ int res = RegisterMethodsOrDie(env, "android/os/MessageQueue", gMessageQueueMethods,
+ NELEM(gMessageQueueMethods));
+
+ jclass clazz = FindClassOrDie(env, "android/os/MessageQueue");
- jclass clazz;
- FIND_CLASS(clazz, "android/os/MessageQueue");
+ gMessageQueueClassInfo.mPtr = GetFieldIDOrDie(env, clazz, "mPtr", "J");
- GET_FIELD_ID(gMessageQueueClassInfo.mPtr, clazz,
- "mPtr", "J");
-
- return 0;
+ return res;
}
} // namespace android
diff --git a/core/jni/android_os_Parcel.cpp b/core/jni/android_os_Parcel.cpp
index 960acc0..4f29c50 100644
--- a/core/jni/android_os_Parcel.cpp
+++ b/core/jni/android_os_Parcel.cpp
@@ -46,6 +46,8 @@
#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
+
//#undef ALOGV
//#define ALOGV(...) fprintf(stderr, __VA_ARGS__)
@@ -275,7 +277,9 @@ static void android_os_Parcel_writeString(JNIEnv* env, jclass clazz, jlong nativ
if (val) {
const jchar* str = env->GetStringCritical(val, 0);
if (str) {
- err = parcel->writeString16(str, env->GetStringLength(val));
+ err = parcel->writeString16(
+ reinterpret_cast<const char16_t*>(str),
+ env->GetStringLength(val));
env->ReleaseStringCritical(val, str);
}
} else {
@@ -409,7 +413,7 @@ static jstring android_os_Parcel_readString(JNIEnv* env, jclass clazz, jlong nat
size_t len;
const char16_t* str = parcel->readString16Inplace(&len);
if (str) {
- return env->NewString(str, len);
+ return env->NewString(reinterpret_cast<const jchar*>(str), len);
}
return NULL;
}
@@ -451,7 +455,8 @@ static jobject android_os_Parcel_openFileDescriptor(JNIEnv* env, jclass clazz,
jniThrowException(env, "java/lang/IllegalStateException", NULL);
return NULL;
}
- String8 name8(str, env->GetStringLength(name));
+ String8 name8(reinterpret_cast<const char16_t*>(str),
+ env->GetStringLength(name));
env->ReleaseStringCritical(name, str);
int flags=0;
switch (mode&0x30000000) {
@@ -646,7 +651,9 @@ static void android_os_Parcel_writeInterfaceToken(JNIEnv* env, jclass clazz, jlo
// the caller expects to be invoking
const jchar* str = env->GetStringCritical(name, 0);
if (str != NULL) {
- parcel->writeInterfaceToken(String16(str, env->GetStringLength(name)));
+ parcel->writeInterfaceToken(String16(
+ reinterpret_cast<const char16_t*>(str),
+ env->GetStringLength(name)));
env->ReleaseStringCritical(name, str);
}
}
@@ -654,8 +661,6 @@ static void android_os_Parcel_writeInterfaceToken(JNIEnv* env, jclass clazz, jlo
static void android_os_Parcel_enforceInterface(JNIEnv* env, jclass clazz, jlong nativePtr, jstring name)
{
- jboolean ret = JNI_FALSE;
-
Parcel* parcel = reinterpret_cast<Parcel*>(nativePtr);
if (parcel != NULL) {
const jchar* str = env->GetStringCritical(name, 0);
@@ -663,7 +668,8 @@ static void android_os_Parcel_enforceInterface(JNIEnv* env, jclass clazz, jlong
IPCThreadState* threadState = IPCThreadState::self();
const int32_t oldPolicy = threadState->getStrictModePolicy();
const bool isValid = parcel->enforceInterface(
- String16(str, env->GetStringLength(name)),
+ String16(reinterpret_cast<const char16_t*>(str),
+ env->GetStringLength(name)),
threadState);
env->ReleaseStringCritical(name, str);
if (isValid) {
@@ -756,20 +762,14 @@ const char* const kParcelPathName = "android/os/Parcel";
int register_android_os_Parcel(JNIEnv* env)
{
- jclass clazz;
-
- clazz = env->FindClass(kParcelPathName);
- LOG_FATAL_IF(clazz == NULL, "Unable to find class android.os.Parcel");
+ jclass clazz = FindClassOrDie(env, kParcelPathName);
- gParcelOffsets.clazz = (jclass) env->NewGlobalRef(clazz);
- gParcelOffsets.mNativePtr = env->GetFieldID(clazz, "mNativePtr", "J");
- gParcelOffsets.obtain = env->GetStaticMethodID(clazz, "obtain",
- "()Landroid/os/Parcel;");
- gParcelOffsets.recycle = env->GetMethodID(clazz, "recycle", "()V");
+ gParcelOffsets.clazz = MakeGlobalRefOrDie(env, clazz);
+ gParcelOffsets.mNativePtr = GetFieldIDOrDie(env, clazz, "mNativePtr", "J");
+ gParcelOffsets.obtain = GetStaticMethodIDOrDie(env, clazz, "obtain", "()Landroid/os/Parcel;");
+ gParcelOffsets.recycle = GetMethodIDOrDie(env, clazz, "recycle", "()V");
- return AndroidRuntime::registerNativeMethods(
- env, kParcelPathName,
- gParcelMethods, NELEM(gParcelMethods));
+ return RegisterMethodsOrDie(env, kParcelPathName, gParcelMethods, NELEM(gParcelMethods));
}
};
diff --git a/core/jni/android_os_SELinux.cpp b/core/jni/android_os_SELinux.cpp
index ffa569e..762b88f 100644
--- a/core/jni/android_os_SELinux.cpp
+++ b/core/jni/android_os_SELinux.cpp
@@ -19,7 +19,7 @@
#include "JNIHelp.h"
#include "jni.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include "selinux/selinux.h"
#include "selinux/android.h"
#include <errno.h>
@@ -61,23 +61,6 @@ static jboolean isSELinuxEnforced(JNIEnv *env, jobject) {
}
/*
- * Function: setSELinuxEnforce
- * Purpose: set the SE Linux enforcing mode
- * Parameters: true (enforcing) or false (permissive)
- * Return value: true (success) or false (fail)
- * Exceptions: none
- */
-static jboolean setSELinuxEnforce(JNIEnv *env, jobject, jboolean value) {
- if (isSELinuxDisabled) {
- return false;
- }
-
- int enforce = value ? 1 : 0;
-
- return (security_setenforce(enforce) != -1) ? true : false;
-}
-
-/*
* Function: getPeerCon
* Purpose: retrieves security context of peer socket
* Parameters:
@@ -97,7 +80,7 @@ static jstring getPeerCon(JNIEnv *env, jobject, jobject fileDescriptor) {
}
int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
ALOGE("getPeerCon => getFD for %p failed", fileDescriptor);
return NULL;
}
@@ -265,92 +248,6 @@ static jstring getPidCon(JNIEnv *env, jobject, jint pid) {
}
/*
- * Function: getBooleanNames
- * Purpose: Gets a list of the SELinux boolean names.
- * Parameters: None
- * Returns: an array of strings containing the SELinux boolean names.
- * returns NULL string on error
- * Exceptions: None
- */
-static jobjectArray getBooleanNames(JNIEnv *env, JNIEnv) {
- if (isSELinuxDisabled) {
- return NULL;
- }
-
- char **list;
- int len;
- if (security_get_boolean_names(&list, &len) == -1) {
- return NULL;
- }
-
- jclass stringClass = env->FindClass("java/lang/String");
- jobjectArray stringArray = env->NewObjectArray(len, stringClass, NULL);
- for (int i = 0; i < len; i++) {
- ScopedLocalRef<jstring> obj(env, env->NewStringUTF(list[i]));
- env->SetObjectArrayElement(stringArray, i, obj.get());
- free(list[i]);
- }
- free(list);
-
- return stringArray;
-}
-
-/*
- * Function: getBooleanValue
- * Purpose: Gets the value for the given SELinux boolean name.
- * Parameters:
- * String: The name of the SELinux boolean.
- * Returns: a boolean: (true) boolean is set or (false) it is not.
- * Exceptions: None
- */
-static jboolean getBooleanValue(JNIEnv *env, jobject, jstring nameStr) {
- if (isSELinuxDisabled) {
- return false;
- }
-
- if (nameStr == NULL) {
- return false;
- }
-
- ScopedUtfChars name(env, nameStr);
- int ret = security_get_boolean_active(name.c_str());
-
- ALOGV("getBooleanValue(%s) => %d", name.c_str(), ret);
- return (ret == 1) ? true : false;
-}
-
-/*
- * Function: setBooleanNames
- * Purpose: Sets the value for the given SELinux boolean name.
- * Parameters:
- * String: The name of the SELinux boolean.
- * Boolean: The new value of the SELinux boolean.
- * Returns: a boolean indicating whether or not the operation succeeded.
- * Exceptions: None
- */
-static jboolean setBooleanValue(JNIEnv *env, jobject, jstring nameStr, jboolean value) {
- if (isSELinuxDisabled) {
- return false;
- }
-
- if (nameStr == NULL) {
- return false;
- }
-
- ScopedUtfChars name(env, nameStr);
- int ret = security_set_boolean(name.c_str(), value ? 1 : 0);
- if (ret) {
- return false;
- }
-
- if (security_commit_booleans() == -1) {
- return false;
- }
-
- return true;
-}
-
-/*
* Function: checkSELinuxAccess
* Purpose: Check permissions between two security contexts.
* Parameters: subjectContextStr: subject security context as a string
@@ -426,8 +323,6 @@ static jboolean native_restorecon(JNIEnv *env, jobject, jstring pathnameStr, jin
static JNINativeMethod method_table[] = {
/* name, signature, funcPtr */
{ "checkSELinuxAccess" , "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z" , (void*)checkSELinuxAccess },
- { "getBooleanNames" , "()[Ljava/lang/String;" , (void*)getBooleanNames },
- { "getBooleanValue" , "(Ljava/lang/String;)Z" , (void*)getBooleanValue },
{ "getContext" , "()Ljava/lang/String;" , (void*)getCon },
{ "getFileContext" , "(Ljava/lang/String;)Ljava/lang/String;" , (void*)getFileCon },
{ "getPeerContext" , "(Ljava/io/FileDescriptor;)Ljava/lang/String;" , (void*)getPeerCon },
@@ -435,10 +330,8 @@ static JNINativeMethod method_table[] = {
{ "isSELinuxEnforced" , "()Z" , (void*)isSELinuxEnforced},
{ "isSELinuxEnabled" , "()Z" , (void*)isSELinuxEnabled },
{ "native_restorecon" , "(Ljava/lang/String;I)Z" , (void*)native_restorecon},
- { "setBooleanValue" , "(Ljava/lang/String;Z)Z" , (void*)setBooleanValue },
{ "setFileContext" , "(Ljava/lang/String;Ljava/lang/String;)Z" , (void*)setFileCon },
{ "setFSCreateContext" , "(Ljava/lang/String;)Z" , (void*)setFSCreateCon },
- { "setSELinuxEnforce" , "(Z)Z" , (void*)setSELinuxEnforce},
};
static int log_callback(int type, const char *fmt, ...) {
@@ -469,8 +362,7 @@ int register_android_os_SELinux(JNIEnv *env) {
isSELinuxDisabled = (is_selinux_enabled() != 1) ? true : false;
- return AndroidRuntime::registerNativeMethods(env, "android/os/SELinux", method_table,
- NELEM(method_table));
+ return RegisterMethodsOrDie(env, "android/os/SELinux", method_table, NELEM(method_table));
}
}
diff --git a/core/jni/android_os_SystemClock.cpp b/core/jni/android_os_SystemClock.cpp
index 6247844..dfe024e 100644
--- a/core/jni/android_os_SystemClock.cpp
+++ b/core/jni/android_os_SystemClock.cpp
@@ -27,7 +27,7 @@
#include "JNIHelp.h"
#include "jni.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <sys/time.h>
#include <time.h>
@@ -60,18 +60,11 @@ static jlong android_os_SystemClock_elapsedRealtime(JNIEnv* env,
static jlong android_os_SystemClock_currentThreadTimeMillis(JNIEnv* env,
jobject clazz)
{
-#if defined(HAVE_POSIX_CLOCKS)
struct timespec tm;
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tm);
return tm.tv_sec * 1000LL + tm.tv_nsec / 1000000;
-#else
- struct timeval tv;
-
- gettimeofday(&tv, NULL);
- return tv.tv_sec * 1000LL + tv.tv_usec / 1000;
-#endif
}
/*
@@ -80,18 +73,11 @@ static jlong android_os_SystemClock_currentThreadTimeMillis(JNIEnv* env,
static jlong android_os_SystemClock_currentThreadTimeMicro(JNIEnv* env,
jobject clazz)
{
-#if defined(HAVE_POSIX_CLOCKS)
struct timespec tm;
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tm);
return tm.tv_sec * 1000000LL + tm.tv_nsec / 1000;
-#else
- struct timeval tv;
-
- gettimeofday(&tv, NULL);
- return tv.tv_sec * 1000000LL + tv.tv_nsec / 1000;
-#endif
}
/*
@@ -135,8 +121,7 @@ static JNINativeMethod gMethods[] = {
};
int register_android_os_SystemClock(JNIEnv* env)
{
- return AndroidRuntime::registerNativeMethods(env,
- "android/os/SystemClock", gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/os/SystemClock", gMethods, NELEM(gMethods));
}
}; // namespace android
diff --git a/core/jni/android_os_SystemProperties.cpp b/core/jni/android_os_SystemProperties.cpp
index 677396d1..554d304 100644
--- a/core/jni/android_os_SystemProperties.cpp
+++ b/core/jni/android_os_SystemProperties.cpp
@@ -21,7 +21,7 @@
#include "utils/misc.h"
#include <utils/Log.h>
#include "jni.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <nativehelper/JNIHelp.h>
namespace android
@@ -239,9 +239,8 @@ static JNINativeMethod method_table[] = {
int register_android_os_SystemProperties(JNIEnv *env)
{
- return AndroidRuntime::registerNativeMethods(
- env, "android/os/SystemProperties",
- method_table, NELEM(method_table));
+ return RegisterMethodsOrDie(env, "android/os/SystemProperties", method_table,
+ NELEM(method_table));
}
};
diff --git a/core/jni/android_os_Trace.cpp b/core/jni/android_os_Trace.cpp
index b11c5bb..52fd111 100644
--- a/core/jni/android_os_Trace.cpp
+++ b/core/jni/android_os_Trace.cpp
@@ -17,6 +17,8 @@
#define LOG_TAG "Trace"
// #define LOG_NDEBUG 0
+#include <inttypes.h>
+
#include <JNIHelp.h>
#include <ScopedUtfChars.h>
#include <ScopedStringChars.h>
@@ -48,47 +50,44 @@ static void android_os_Trace_nativeTraceCounter(JNIEnv* env, jclass clazz,
jlong tag, jstring nameStr, jint value) {
ScopedUtfChars name(env, nameStr);
- ALOGV("%s: %lld %s %d", __FUNCTION__, tag, name.c_str(), value);
+ ALOGV("%s: %" PRId64 " %s %d", __FUNCTION__, tag, name.c_str(), value);
atrace_int(tag, name.c_str(), value);
}
static void android_os_Trace_nativeTraceBegin(JNIEnv* env, jclass clazz,
jlong tag, jstring nameStr) {
- const size_t MAX_SECTION_NAME_LEN = 127;
ScopedStringChars jchars(env, nameStr);
String8 utf8Chars(reinterpret_cast<const char16_t*>(jchars.get()), jchars.size());
sanitizeString(utf8Chars);
- ALOGV("%s: %lld %s", __FUNCTION__, tag, utf8Chars.string());
+ ALOGV("%s: %" PRId64 " %s", __FUNCTION__, tag, utf8Chars.string());
atrace_begin(tag, utf8Chars.string());
}
static void android_os_Trace_nativeTraceEnd(JNIEnv* env, jclass clazz,
jlong tag) {
- ALOGV("%s: %lld", __FUNCTION__, tag);
+ ALOGV("%s: %" PRId64, __FUNCTION__, tag);
atrace_end(tag);
}
static void android_os_Trace_nativeAsyncTraceBegin(JNIEnv* env, jclass clazz,
jlong tag, jstring nameStr, jint cookie) {
- const size_t MAX_SECTION_NAME_LEN = 127;
ScopedStringChars jchars(env, nameStr);
String8 utf8Chars(reinterpret_cast<const char16_t*>(jchars.get()), jchars.size());
sanitizeString(utf8Chars);
- ALOGV("%s: %lld %s %d", __FUNCTION__, tag, utf8Chars.string(), cookie);
+ ALOGV("%s: %" PRId64 " %s %d", __FUNCTION__, tag, utf8Chars.string(), cookie);
atrace_async_begin(tag, utf8Chars.string(), cookie);
}
static void android_os_Trace_nativeAsyncTraceEnd(JNIEnv* env, jclass clazz,
jlong tag, jstring nameStr, jint cookie) {
- const size_t MAX_SECTION_NAME_LEN = 127;
ScopedStringChars jchars(env, nameStr);
String8 utf8Chars(reinterpret_cast<const char16_t*>(jchars.get()), jchars.size());
sanitizeString(utf8Chars);
- ALOGV("%s: %lld %s %d", __FUNCTION__, tag, utf8Chars.string(), cookie);
+ ALOGV("%s: %" PRId64 " %s %d", __FUNCTION__, tag, utf8Chars.string(), cookie);
atrace_async_end(tag, utf8Chars.string(), cookie);
}
@@ -137,7 +136,7 @@ static JNINativeMethod gTraceMethods[] = {
int register_android_os_Trace(JNIEnv* env) {
int res = jniRegisterNativeMethods(env, "android/os/Trace",
gTraceMethods, NELEM(gTraceMethods));
- LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+ LOG_ALWAYS_FATAL_IF(res < 0, "Unable to register native methods.");
return 0;
}
diff --git a/core/jni/android_os_UEventObserver.cpp b/core/jni/android_os_UEventObserver.cpp
index 3f7c7d2..eb36f85 100644
--- a/core/jni/android_os_UEventObserver.cpp
+++ b/core/jni/android_os_UEventObserver.cpp
@@ -22,7 +22,7 @@
#include "hardware_legacy/uevent.h"
#include "jni.h"
#include "JNIHelp.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <utils/Mutex.h>
#include <utils/Vector.h>
@@ -117,16 +117,9 @@ static JNINativeMethod gMethods[] = {
int register_android_os_UEventObserver(JNIEnv *env)
{
- jclass clazz;
+ FindClassOrDie(env, "android/os/UEventObserver");
- clazz = env->FindClass("android/os/UEventObserver");
- if (clazz == NULL) {
- ALOGE("Can't find android/os/UEventObserver");
- return -1;
- }
-
- return AndroidRuntime::registerNativeMethods(env,
- "android/os/UEventObserver", gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/os/UEventObserver", gMethods, NELEM(gMethods));
}
} // namespace android
diff --git a/core/jni/android_server_FingerprintManager.cpp b/core/jni/android_server_FingerprintManager.cpp
index b174d1b..c8aa22f 100644
--- a/core/jni/android_server_FingerprintManager.cpp
+++ b/core/jni/android_server_FingerprintManager.cpp
@@ -24,22 +24,7 @@
#include <hardware/fingerprint.h>
#include <utils/Log.h>
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className); \
- var = jclass(env->NewGlobalRef(var));
-
-#define GET_STATIC_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
- var = env->GetStaticMethodID(clazz, methodName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find static method" methodName);
-
-#define GET_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
- var = env->GetMethodID(clazz, methodName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method" methodName);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
+#include "core_jni_helpers.h"
namespace android {
@@ -84,6 +69,7 @@ static void hal_notify_callback(fingerprint_msg_t msg) {
ALOGE("fingerprint: invalid msg: %d", msg.type);
return;
}
+ (void)arg3;
//ALOG(LOG_VERBOSE, LOG_TAG, "hal_notify(msg=%d, arg1=%d, arg2=%d)\n", msg.type, arg1, arg2);
// TODO: fix gross hack to attach JNI to calling thread
@@ -103,10 +89,12 @@ static void hal_notify_callback(fingerprint_msg_t msg) {
static void nativeInit(JNIEnv *env, jobject clazz, jobject callbackObj) {
ALOG(LOG_VERBOSE, LOG_TAG, "nativeInit()\n");
- FIND_CLASS(gFingerprintServiceClassInfo.clazz, FINGERPRINT_SERVICE);
- GET_METHOD_ID(gFingerprintServiceClassInfo.notify, gFingerprintServiceClassInfo.clazz,
+ gFingerprintServiceClassInfo.clazz = FindClassOrDie(env, FINGERPRINT_SERVICE);
+ gFingerprintServiceClassInfo.clazz = MakeGlobalRefOrDie(env,
+ gFingerprintServiceClassInfo.clazz);
+ gFingerprintServiceClassInfo.notify = GetMethodIDOrDie(env, gFingerprintServiceClassInfo.clazz,
"notify", "(III)V");
- gFingerprintServiceClassInfo.callbackObject = env->NewGlobalRef(callbackObj);
+ gFingerprintServiceClassInfo.callbackObject = MakeGlobalRefOrDie(env, callbackObj);
}
static jint nativeEnroll(JNIEnv* env, jobject clazz, jint timeout) {
@@ -184,7 +172,7 @@ static jint nativeCloseHal(JNIEnv* env, jobject clazz) {
// TODO: clean up void methods
static const JNINativeMethod g_methods[] = {
{ "nativeEnroll", "(I)I", (void*)nativeEnroll },
- { "nativeEnrollCancel", "()I", (void*)nativeEnroll },
+ { "nativeEnrollCancel", "()I", (void*)nativeEnrollCancel },
{ "nativeRemove", "(I)I", (void*)nativeRemove },
{ "nativeOpenHal", "()I", (void*)nativeOpenHal },
{ "nativeCloseHal", "()I", (void*)nativeCloseHal },
@@ -192,11 +180,11 @@ static const JNINativeMethod g_methods[] = {
};
int register_android_server_fingerprint_FingerprintService(JNIEnv* env) {
- FIND_CLASS(gFingerprintServiceClassInfo.clazz, FINGERPRINT_SERVICE);
- GET_METHOD_ID(gFingerprintServiceClassInfo.notify, gFingerprintServiceClassInfo.clazz, "notify",
- "(III)V");
- int result = AndroidRuntime::registerNativeMethods(
- env, FINGERPRINT_SERVICE, g_methods, NELEM(g_methods));
+ jclass clazz = FindClassOrDie(env, FINGERPRINT_SERVICE);
+ gFingerprintServiceClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
+ gFingerprintServiceClassInfo.notify = GetMethodIDOrDie(env, gFingerprintServiceClassInfo.clazz,
+ "notify", "(III)V");
+ int result = RegisterMethodsOrDie(env, FINGERPRINT_SERVICE, g_methods, NELEM(g_methods));
ALOG(LOG_VERBOSE, LOG_TAG, "FingerprintManager JNI ready.\n");
return result;
}
diff --git a/core/jni/android_server_NetworkManagementSocketTagger.cpp b/core/jni/android_server_NetworkManagementSocketTagger.cpp
index 7e12b1e..ca21fd7 100644
--- a/core/jni/android_server_NetworkManagementSocketTagger.cpp
+++ b/core/jni/android_server_NetworkManagementSocketTagger.cpp
@@ -35,7 +35,7 @@ static jint QTagUid_tagSocketFd(JNIEnv* env, jclass,
jint tagNum, jint uid) {
int userFd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
ALOGE("Can't get FileDescriptor num");
return (jint)-1;
}
@@ -51,7 +51,7 @@ static jint QTagUid_untagSocketFd(JNIEnv* env, jclass,
jobject fileDescriptor) {
int userFd = jniGetFDFromFileDescriptor(env, fileDescriptor);
- if (env->ExceptionOccurred() != NULL) {
+ if (env->ExceptionCheck()) {
ALOGE("Can't get FileDescriptor num");
return (jint)-1;
}
diff --git a/core/jni/android_server_Watchdog.cpp b/core/jni/android_server_Watchdog.cpp
index 6726c14..d1f9434 100644
--- a/core/jni/android_server_Watchdog.cpp
+++ b/core/jni/android_server_Watchdog.cpp
@@ -26,7 +26,7 @@
#include "jni.h"
#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
static void dumpOneStack(int tid, int outFd) {
char buf[64];
@@ -106,8 +106,7 @@ static const JNINativeMethod g_methods[] = {
};
int register_android_server_Watchdog(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, "com/android/server/Watchdog",
- g_methods, NELEM(g_methods));
+ return RegisterMethodsOrDie(env, "com/android/server/Watchdog", g_methods, NELEM(g_methods));
}
}
diff --git a/core/jni/android_text_AndroidBidi.cpp b/core/jni/android_text_AndroidBidi.cpp
index 6f7ee49..3285429 100644
--- a/core/jni/android_text_AndroidBidi.cpp
+++ b/core/jni/android_text_AndroidBidi.cpp
@@ -18,7 +18,7 @@
#define LOG_TAG "AndroidUnicode"
#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "utils/misc.h"
#include "utils/Log.h"
#include "unicode/ubidi.h"
@@ -57,14 +57,12 @@ static jint runBidi(JNIEnv* env, jobject obj, jint dir, jcharArray chsArray,
}
static JNINativeMethod gMethods[] = {
- { "runBidi", "(I[C[BIZ)I",
- (void*) runBidi }
+ { "runBidi", "(I[C[BIZ)I", (void*) runBidi }
};
int register_android_text_AndroidBidi(JNIEnv* env)
{
- return AndroidRuntime::registerNativeMethods(env, "android/text/AndroidBidi",
- gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/text/AndroidBidi", gMethods, NELEM(gMethods));
}
}
diff --git a/core/jni/android_text_AndroidCharacter.cpp b/core/jni/android_text_AndroidCharacter.cpp
index 94bd40f..9258248 100644
--- a/core/jni/android_text_AndroidCharacter.cpp
+++ b/core/jni/android_text_AndroidCharacter.cpp
@@ -19,7 +19,7 @@
#include "JNIHelp.h"
#include "ScopedPrimitiveArray.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "utils/misc.h"
#include "utils/Log.h"
#include "unicode/uchar.h"
@@ -193,8 +193,7 @@ static JNINativeMethod gMethods[] = {
int register_android_text_AndroidCharacter(JNIEnv* env)
{
- return AndroidRuntime::registerNativeMethods(env, "android/text/AndroidCharacter",
- gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/text/AndroidCharacter", gMethods, NELEM(gMethods));
}
}
diff --git a/core/jni/android_text_StaticLayout.cpp b/core/jni/android_text_StaticLayout.cpp
index 9e20d18..fceb980 100644
--- a/core/jni/android_text_StaticLayout.cpp
+++ b/core/jni/android_text_StaticLayout.cpp
@@ -23,14 +23,14 @@
#include "utils/Log.h"
#include "ScopedPrimitiveArray.h"
#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <vector>
namespace android {
class ScopedBreakIterator {
public:
- ScopedBreakIterator(JNIEnv* env, BreakIterator* breakIterator, jcharArray inputText,
+ ScopedBreakIterator(JNIEnv* env, icu::BreakIterator* breakIterator, jcharArray inputText,
jint length) : mBreakIterator(breakIterator), mChars(env, inputText) {
UErrorCode status = U_ZERO_ERROR;
mUText = utext_openUChars(NULL, mChars.get(), length, &status);
@@ -41,7 +41,7 @@ class ScopedBreakIterator {
mBreakIterator->setText(mUText, status);
}
- inline BreakIterator* operator->() {
+ inline icu::BreakIterator* operator->() {
return mBreakIterator;
}
@@ -50,7 +50,7 @@ class ScopedBreakIterator {
delete mBreakIterator;
}
private:
- BreakIterator* mBreakIterator;
+ icu::BreakIterator* mBreakIterator;
ScopedCharArrayRO mChars;
UText* mUText;
@@ -68,14 +68,14 @@ static jintArray nLineBreakOpportunities(JNIEnv* env, jclass, jstring javaLocale
ScopedIcuLocale icuLocale(env, javaLocaleName);
if (icuLocale.valid()) {
UErrorCode status = U_ZERO_ERROR;
- BreakIterator* it = BreakIterator::createLineInstance(icuLocale.locale(), status);
+ icu::BreakIterator* it = icu::BreakIterator::createLineInstance(icuLocale.locale(), status);
if (!U_SUCCESS(status) || it == NULL) {
if (it) {
delete it;
}
} else {
ScopedBreakIterator breakIterator(env, it, inputText, length);
- for (int loc = breakIterator->first(); loc != BreakIterator::DONE;
+ for (int loc = breakIterator->first(); loc != icu::BreakIterator::DONE;
loc = breakIterator->next()) {
breaks.push_back(loc);
}
@@ -103,8 +103,7 @@ static JNINativeMethod gMethods[] = {
int register_android_text_StaticLayout(JNIEnv* env)
{
- return AndroidRuntime::registerNativeMethods(env, "android/text/StaticLayout",
- gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/text/StaticLayout", gMethods, NELEM(gMethods));
}
}
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index fba7255..daf5a61 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -17,38 +17,39 @@
#define LOG_TAG "asset"
-#define DEBUG_STYLES(x) //x
-#define THROW_ON_BAD_ID 0
-
#include <android_runtime/android_util_AssetManager.h>
+#include <inttypes.h>
+#include <linux/capability.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include <private/android_filesystem_config.h> // for AID_SYSTEM
+
+#include "androidfw/Asset.h"
+#include "androidfw/AssetManager.h"
+#include "androidfw/AttributeFinder.h"
+#include "androidfw/ResourceTypes.h"
+#include "android_runtime/AndroidRuntime.h"
+#include "android_util_Binder.h"
+#include "core_jni_helpers.h"
#include "jni.h"
#include "JNIHelp.h"
#include "ScopedStringChars.h"
#include "ScopedUtfChars.h"
-#include "android_util_Binder.h"
-#include <utils/misc.h>
-#include <android_runtime/AndroidRuntime.h>
-#include <utils/Log.h>
-
-#include <androidfw/Asset.h>
-#include <androidfw/AssetManager.h>
-#include <androidfw/AttributeFinder.h>
-#include <androidfw/ResourceTypes.h>
+#include "utils/Log.h"
+#include "utils/misc.h"
-#include <private/android_filesystem_config.h> // for AID_SYSTEM
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include <linux/capability.h>
extern "C" int capget(cap_user_header_t hdrp, cap_user_data_t datap);
extern "C" int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
namespace android {
+static const bool kThrowOnBadId = false;
+static const bool kDebugStyles = false;
+
// ----------------------------------------------------------------------------
static struct typedvalue_offsets_t
@@ -651,23 +652,29 @@ static jint android_content_AssetManager_getResourceIdentifier(JNIEnv* env, jobj
return 0;
}
- const char16_t* defType16 = defType
- ? env->GetStringChars(defType, NULL) : NULL;
+ const char16_t* defType16 = reinterpret_cast<const char16_t*>(defType)
+ ? reinterpret_cast<const char16_t*>(env->GetStringChars(defType, NULL))
+ : NULL;
jsize defTypeLen = defType
? env->GetStringLength(defType) : 0;
- const char16_t* defPackage16 = defPackage
- ? env->GetStringChars(defPackage, NULL) : NULL;
+ const char16_t* defPackage16 = reinterpret_cast<const char16_t*>(defPackage)
+ ? reinterpret_cast<const char16_t*>(env->GetStringChars(defPackage,
+ NULL))
+ : NULL;
jsize defPackageLen = defPackage
? env->GetStringLength(defPackage) : 0;
jint ident = am->getResources().identifierForName(
- name16.get(), name16.size(), defType16, defTypeLen, defPackage16, defPackageLen);
+ reinterpret_cast<const char16_t*>(name16.get()), name16.size(),
+ defType16, defTypeLen, defPackage16, defPackageLen);
if (defPackage16) {
- env->ReleaseStringChars(defPackage, defPackage16);
+ env->ReleaseStringChars(defPackage,
+ reinterpret_cast<const jchar*>(defPackage16));
}
if (defType16) {
- env->ReleaseStringChars(defType, defType16);
+ env->ReleaseStringChars(defType,
+ reinterpret_cast<const jchar*>(defType16));
}
return ident;
@@ -804,21 +811,21 @@ static jint android_content_AssetManager_loadResourceValue(JNIEnv* env, jobject
ResTable_config config;
uint32_t typeSpecFlags;
ssize_t block = res.getResource(ident, &value, false, density, &typeSpecFlags, &config);
-#if THROW_ON_BAD_ID
- if (block == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return 0;
+ if (kThrowOnBadId) {
+ if (block == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return 0;
+ }
}
-#endif
uint32_t ref = ident;
if (resolve) {
block = res.resolveReference(&value, block, &ref, &typeSpecFlags, &config);
-#if THROW_ON_BAD_ID
- if (block == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return 0;
+ if (kThrowOnBadId) {
+ if (block == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return 0;
+ }
}
-#endif
}
if (block >= 0) {
return copyValue(env, outValue, &res, value, ref, block, typeSpecFlags, &config);
@@ -864,12 +871,12 @@ static jint android_content_AssetManager_loadResourceBagValue(JNIEnv* env, jobje
uint32_t ref = ident;
if (resolve) {
block = res.resolveReference(&value, block, &ref, &typeSpecFlags);
-#if THROW_ON_BAD_ID
- if (block == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return 0;
+ if (kThrowOnBadId) {
+ if (block == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return 0;
+ }
}
-#endif
}
if (block >= 0) {
return copyValue(env, outValue, &res, value, ref, block, typeSpecFlags);
@@ -927,8 +934,11 @@ static jobject android_content_AssetManager_getAssignedPackageIdentifiers(JNIEnv
const size_t N = res.getBasePackageCount();
for (size_t i = 0; i < N; i++) {
const String16 name = res.getBasePackageName(i);
- env->CallVoidMethod(sparseArray, gSparseArrayOffsets.put, (jint) res.getBasePackageId(i),
- env->NewString(name, name.size()));
+ env->CallVoidMethod(
+ sparseArray, gSparseArrayOffsets.put,
+ static_cast<jint>(res.getBasePackageId(i)),
+ env->NewString(reinterpret_cast<const jchar*>(name.string()),
+ name.size()));
}
return sparseArray;
}
@@ -979,12 +989,12 @@ static jint android_content_AssetManager_loadThemeAttributeValue(
uint32_t ref = 0;
if (resolve) {
block = res.resolveReference(&value, block, &ref, &typeSpecFlags);
-#if THROW_ON_BAD_ID
- if (block == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return 0;
+ if (kThrowOnBadId) {
+ if (block == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return 0;
+ }
}
-#endif
}
return block >= 0 ? copyValue(env, outValue, &res, value, ref, block, typeSpecFlags) : block;
}
@@ -995,6 +1005,7 @@ static void android_content_AssetManager_dumpTheme(JNIEnv* env, jobject clazz,
{
ResTable::Theme* theme = reinterpret_cast<ResTable::Theme*>(themeHandle);
const ResTable& res(theme->getResTable());
+ (void)res;
// XXX Need to use params.
theme->dumpToLog();
@@ -1046,8 +1057,10 @@ static jboolean android_content_AssetManager_resolveAttrs(JNIEnv* env, jobject c
return JNI_FALSE;
}
- DEBUG_STYLES(ALOGI("APPLY STYLE: theme=0x%x defStyleAttr=0x%x defStyleRes=0x%x",
- themeToken, defStyleAttr, defStyleRes));
+ if (kDebugStyles) {
+ ALOGI("APPLY STYLE: theme=0x%" PRIx64 " defStyleAttr=0x%x "
+ "defStyleRes=0x%x", themeToken, defStyleAttr, defStyleRes);
+ }
ResTable::Theme* theme = reinterpret_cast<ResTable::Theme*>(themeToken);
const ResTable& res = theme->getResTable();
@@ -1114,7 +1127,9 @@ static jboolean android_content_AssetManager_resolveAttrs(JNIEnv* env, jobject c
for (jsize ii=0; ii<NI; ii++) {
const uint32_t curIdent = (uint32_t)src[ii];
- DEBUG_STYLES(ALOGI("RETRIEVING ATTR 0x%08x...", curIdent));
+ if (kDebugStyles) {
+ ALOGI("RETRIEVING ATTR 0x%08x...", curIdent);
+ }
// Try to find a value for this attribute... we prioritize values
// coming from, first XML attributes, then XML style, then default
@@ -1129,8 +1144,9 @@ static jboolean android_content_AssetManager_resolveAttrs(JNIEnv* env, jobject c
block = -1;
value.dataType = Res_value::TYPE_ATTRIBUTE;
value.data = srcValues[ii];
- DEBUG_STYLES(ALOGI("-> From values: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("-> From values: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
}
if (value.dataType == Res_value::TYPE_NULL) {
@@ -1139,8 +1155,9 @@ static jboolean android_content_AssetManager_resolveAttrs(JNIEnv* env, jobject c
block = defStyleEntry->stringBlock;
typeSetFlags = defStyleTypeSetFlags;
value = defStyleEntry->map.value;
- DEBUG_STYLES(ALOGI("-> From def style: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("-> From def style: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
}
}
@@ -1150,39 +1167,46 @@ static jboolean android_content_AssetManager_resolveAttrs(JNIEnv* env, jobject c
ssize_t newBlock = theme->resolveAttributeReference(&value, block,
&resid, &typeSetFlags, &config);
if (newBlock >= 0) block = newBlock;
- DEBUG_STYLES(ALOGI("-> Resolved attr: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("-> Resolved attr: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
} else {
// If we still don't have a value for this attribute, try to find
// it in the theme!
ssize_t newBlock = theme->getAttribute(curIdent, &value, &typeSetFlags);
if (newBlock >= 0) {
- DEBUG_STYLES(ALOGI("-> From theme: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("-> From theme: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
newBlock = res.resolveReference(&value, block, &resid,
&typeSetFlags, &config);
-#if THROW_ON_BAD_ID
- if (newBlock == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return JNI_FALSE;
+ if (kThrowOnBadId) {
+ if (newBlock == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return JNI_FALSE;
+ }
}
-#endif
if (newBlock >= 0) block = newBlock;
- DEBUG_STYLES(ALOGI("-> Resolved theme: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("-> Resolved theme: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
}
}
// Deal with the special @null value -- it turns back to TYPE_NULL.
if (value.dataType == Res_value::TYPE_REFERENCE && value.data == 0) {
- DEBUG_STYLES(ALOGI("-> Setting to @null!"));
+ if (kDebugStyles) {
+ ALOGI("-> Setting to @null!");
+ }
value.dataType = Res_value::TYPE_NULL;
value.data = Res_value::DATA_NULL_UNDEFINED;
block = -1;
}
- DEBUG_STYLES(ALOGI("Attribute 0x%08x: type=0x%x, data=0x%08x",
- curIdent, value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("Attribute 0x%08x: type=0x%x, data=0x%08x", curIdent, value.dataType,
+ value.data);
+ }
// Write the final value back to Java.
dest[STYLE_TYPE] = value.dataType;
@@ -1236,8 +1260,11 @@ static jboolean android_content_AssetManager_applyStyle(JNIEnv* env, jobject cla
return JNI_FALSE;
}
- DEBUG_STYLES(ALOGI("APPLY STYLE: theme=0x%x defStyleAttr=0x%x defStyleRes=0x%x xml=0x%x",
- themeToken, defStyleAttr, defStyleRes, xmlParserToken));
+ if (kDebugStyles) {
+ ALOGI("APPLY STYLE: theme=0x%" PRIx64 " defStyleAttr=0x%x defStyleRes=0x%x "
+ "xml=0x%" PRIx64, themeToken, defStyleAttr, defStyleRes,
+ xmlParserToken);
+ }
ResTable::Theme* theme = reinterpret_cast<ResTable::Theme*>(themeToken);
const ResTable& res = theme->getResTable();
@@ -1332,7 +1359,9 @@ static jboolean android_content_AssetManager_applyStyle(JNIEnv* env, jobject cla
for (jsize ii = 0; ii < NI; ii++) {
const uint32_t curIdent = (uint32_t)src[ii];
- DEBUG_STYLES(ALOGI("RETRIEVING ATTR 0x%08x...", curIdent));
+ if (kDebugStyles) {
+ ALOGI("RETRIEVING ATTR 0x%08x...", curIdent);
+ }
// Try to find a value for this attribute... we prioritize values
// coming from, first XML attributes, then XML style, then default
@@ -1348,8 +1377,9 @@ static jboolean android_content_AssetManager_applyStyle(JNIEnv* env, jobject cla
// We found the attribute we were looking for.
block = kXmlBlock;
xmlParser->getAttributeValue(xmlAttrIdx, &value);
- DEBUG_STYLES(ALOGI("-> From XML: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("-> From XML: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
}
if (value.dataType == Res_value::TYPE_NULL) {
@@ -1360,8 +1390,9 @@ static jboolean android_content_AssetManager_applyStyle(JNIEnv* env, jobject cla
block = styleAttrEntry->stringBlock;
typeSetFlags = styleTypeSetFlags;
value = styleAttrEntry->map.value;
- DEBUG_STYLES(ALOGI("-> From style: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("-> From style: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
}
}
@@ -1373,8 +1404,9 @@ static jboolean android_content_AssetManager_applyStyle(JNIEnv* env, jobject cla
block = defStyleAttrEntry->stringBlock;
typeSetFlags = styleTypeSetFlags;
value = defStyleAttrEntry->map.value;
- DEBUG_STYLES(ALOGI("-> From def style: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("-> From def style: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
}
}
@@ -1386,41 +1418,50 @@ static jboolean android_content_AssetManager_applyStyle(JNIEnv* env, jobject cla
if (newBlock >= 0) {
block = newBlock;
}
- DEBUG_STYLES(ALOGI("-> Resolved attr: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+
+ if (kDebugStyles) {
+ ALOGI("-> Resolved attr: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
} else {
// If we still don't have a value for this attribute, try to find
// it in the theme!
ssize_t newBlock = theme->getAttribute(curIdent, &value, &typeSetFlags);
if (newBlock >= 0) {
- DEBUG_STYLES(ALOGI("-> From theme: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("-> From theme: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
newBlock = res.resolveReference(&value, block, &resid,
&typeSetFlags, &config);
-#if THROW_ON_BAD_ID
- if (newBlock == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return JNI_FALSE;
+ if (kThrowOnBadId) {
+ if (newBlock == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return JNI_FALSE;
+ }
}
-#endif
+
if (newBlock >= 0) {
block = newBlock;
}
- DEBUG_STYLES(ALOGI("-> Resolved theme: type=0x%x, data=0x%08x",
- value.dataType, value.data));
+
+ if (kDebugStyles) {
+ ALOGI("-> Resolved theme: type=0x%x, data=0x%08x", value.dataType, value.data);
+ }
}
}
// Deal with the special @null value -- it turns back to TYPE_NULL.
if (value.dataType == Res_value::TYPE_REFERENCE && value.data == 0) {
- DEBUG_STYLES(ALOGI("-> Setting to @null!"));
+ if (kDebugStyles) {
+ ALOGI("-> Setting to @null!");
+ }
value.dataType = Res_value::TYPE_NULL;
value.data = Res_value::DATA_NULL_UNDEFINED;
block = kXmlBlock;
}
- DEBUG_STYLES(ALOGI("Attribute 0x%08x: type=0x%x, data=0x%08x",
- curIdent, value.dataType, value.data));
+ if (kDebugStyles) {
+ ALOGI("Attribute 0x%08x: type=0x%x, data=0x%08x", curIdent, value.dataType, value.data);
+ }
// Write the final value back to Java.
dest[STYLE_TYPE] = value.dataType;
@@ -1549,12 +1590,12 @@ static jboolean android_content_AssetManager_retrieveAttributes(JNIEnv* env, job
//printf("Resolving attribute reference\n");
ssize_t newBlock = res.resolveReference(&value, block, &resid,
&typeSetFlags, &config);
-#if THROW_ON_BAD_ID
- if (newBlock == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return JNI_FALSE;
+ if (kThrowOnBadId) {
+ if (newBlock == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return JNI_FALSE;
+ }
}
-#endif
if (newBlock >= 0) block = newBlock;
}
@@ -1663,12 +1704,12 @@ static jint android_content_AssetManager_retrieveArray(JNIEnv* env, jobject claz
//printf("Resolving attribute reference\n");
ssize_t newBlock = res.resolveReference(&value, block, &resid,
&typeSetFlags, &config);
-#if THROW_ON_BAD_ID
- if (newBlock == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return JNI_FALSE;
+ if (kThrowOnBadId) {
+ if (newBlock == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return JNI_FALSE;
+ }
}
-#endif
if (newBlock >= 0) block = newBlock;
}
@@ -1776,12 +1817,12 @@ static jintArray android_content_AssetManager_getArrayStringInfo(JNIEnv* env, jo
stringIndex = value.data;
}
-#if THROW_ON_BAD_ID
- if (stringBlock == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return array;
+ if (kThrowOnBadId) {
+ if (stringBlock == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return array;
+ }
}
-#endif
//todo: It might be faster to allocate a C array to contain
// the blocknums and indices, put them in there and then
@@ -1824,12 +1865,12 @@ static jobjectArray android_content_AssetManager_getArrayStringResource(JNIEnv*
// Take care of resolving the found resource to its final value.
ssize_t block = res.resolveReference(&value, bag->stringBlock, NULL);
-#if THROW_ON_BAD_ID
- if (block == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return array;
+ if (kThrowOnBadId) {
+ if (block == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return array;
+ }
}
-#endif
if (value.dataType == Res_value::TYPE_STRING) {
const ResStringPool* pool = res.getTableStringBlock(block);
const char* str8 = pool->string8At(value.data, &strLen);
@@ -1837,7 +1878,8 @@ static jobjectArray android_content_AssetManager_getArrayStringResource(JNIEnv*
str = env->NewStringUTF(str8);
} else {
const char16_t* str16 = pool->stringAt(value.data, &strLen);
- str = env->NewString(str16, strLen);
+ str = env->NewString(reinterpret_cast<const jchar*>(str16),
+ strLen);
}
// If one of our NewString{UTF} calls failed due to memory, an
@@ -1887,12 +1929,12 @@ static jintArray android_content_AssetManager_getArrayIntResource(JNIEnv* env, j
// Take care of resolving the found resource to its final value.
ssize_t block = res.resolveReference(&value, bag->stringBlock, NULL);
-#if THROW_ON_BAD_ID
- if (block == BAD_INDEX) {
- jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
- return array;
+ if (kThrowOnBadId) {
+ if (block == BAD_INDEX) {
+ jniThrowException(env, "java/lang/IllegalStateException", "Bad resource!");
+ return array;
+ }
}
-#endif
if (value.dataType >= Res_value::TYPE_FIRST_INT
&& value.dataType <= Res_value::TYPE_LAST_INT) {
int intVal = value.data;
@@ -1924,7 +1966,6 @@ static jintArray android_content_AssetManager_getStyleAttributes(JNIEnv* env, jo
return NULL;
}
- Res_value value;
const ResTable::bag_entry* bag = startOfBag;
for (size_t i=0; ((ssize_t)i)<N; i++, bag++) {
int resourceId = bag->map.name.ident;
@@ -2016,7 +2057,7 @@ static JNINativeMethod gAssetManagerMethods[] = {
(void*) android_content_AssetManager_getAssetRemainingLength },
{ "addAssetPathNative", "(Ljava/lang/String;)I",
(void*) android_content_AssetManager_addAssetPath },
- { "addOverlayPath", "(Ljava/lang/String;)I",
+ { "addOverlayPathNative", "(Ljava/lang/String;)I",
(void*) android_content_AssetManager_addOverlayPath },
{ "isUpToDate", "()Z",
(void*) android_content_AssetManager_isUpToDate },
@@ -2099,69 +2140,43 @@ static JNINativeMethod gAssetManagerMethods[] = {
{ "getAssetAllocations", "()Ljava/lang/String;",
(void*) android_content_AssetManager_getAssetAllocations },
{ "getGlobalAssetManagerCount", "()I",
- (void*) android_content_AssetManager_getGlobalAssetCount },
+ (void*) android_content_AssetManager_getGlobalAssetManagerCount },
};
int register_android_content_AssetManager(JNIEnv* env)
{
- jclass typedValue = env->FindClass("android/util/TypedValue");
- LOG_FATAL_IF(typedValue == NULL, "Unable to find class android/util/TypedValue");
- gTypedValueOffsets.mType
- = env->GetFieldID(typedValue, "type", "I");
- LOG_FATAL_IF(gTypedValueOffsets.mType == NULL, "Unable to find TypedValue.type");
- gTypedValueOffsets.mData
- = env->GetFieldID(typedValue, "data", "I");
- LOG_FATAL_IF(gTypedValueOffsets.mData == NULL, "Unable to find TypedValue.data");
- gTypedValueOffsets.mString
- = env->GetFieldID(typedValue, "string", "Ljava/lang/CharSequence;");
- LOG_FATAL_IF(gTypedValueOffsets.mString == NULL, "Unable to find TypedValue.string");
- gTypedValueOffsets.mAssetCookie
- = env->GetFieldID(typedValue, "assetCookie", "I");
- LOG_FATAL_IF(gTypedValueOffsets.mAssetCookie == NULL, "Unable to find TypedValue.assetCookie");
- gTypedValueOffsets.mResourceId
- = env->GetFieldID(typedValue, "resourceId", "I");
- LOG_FATAL_IF(gTypedValueOffsets.mResourceId == NULL, "Unable to find TypedValue.resourceId");
- gTypedValueOffsets.mChangingConfigurations
- = env->GetFieldID(typedValue, "changingConfigurations", "I");
- LOG_FATAL_IF(gTypedValueOffsets.mChangingConfigurations == NULL, "Unable to find TypedValue.changingConfigurations");
- gTypedValueOffsets.mDensity = env->GetFieldID(typedValue, "density", "I");
- LOG_FATAL_IF(gTypedValueOffsets.mDensity == NULL, "Unable to find TypedValue.density");
-
- jclass assetFd = env->FindClass("android/content/res/AssetFileDescriptor");
- LOG_FATAL_IF(assetFd == NULL, "Unable to find class android/content/res/AssetFileDescriptor");
- gAssetFileDescriptorOffsets.mFd
- = env->GetFieldID(assetFd, "mFd", "Landroid/os/ParcelFileDescriptor;");
- LOG_FATAL_IF(gAssetFileDescriptorOffsets.mFd == NULL, "Unable to find AssetFileDescriptor.mFd");
- gAssetFileDescriptorOffsets.mStartOffset
- = env->GetFieldID(assetFd, "mStartOffset", "J");
- LOG_FATAL_IF(gAssetFileDescriptorOffsets.mStartOffset == NULL, "Unable to find AssetFileDescriptor.mStartOffset");
- gAssetFileDescriptorOffsets.mLength
- = env->GetFieldID(assetFd, "mLength", "J");
- LOG_FATAL_IF(gAssetFileDescriptorOffsets.mLength == NULL, "Unable to find AssetFileDescriptor.mLength");
-
- jclass assetManager = env->FindClass("android/content/res/AssetManager");
- LOG_FATAL_IF(assetManager == NULL, "Unable to find class android/content/res/AssetManager");
- gAssetManagerOffsets.mObject
- = env->GetFieldID(assetManager, "mObject", "J");
- LOG_FATAL_IF(gAssetManagerOffsets.mObject == NULL, "Unable to find AssetManager.mObject");
-
- jclass stringClass = env->FindClass("java/lang/String");
- LOG_FATAL_IF(stringClass == NULL, "Unable to find class java/lang/String");
- g_stringClass = (jclass)env->NewGlobalRef(stringClass);
- LOG_FATAL_IF(g_stringClass == NULL, "Unable to create global reference for class java/lang/String");
-
- jclass sparseArrayClass = env->FindClass("android/util/SparseArray");
- LOG_FATAL_IF(sparseArrayClass == NULL, "Unable to find class android/util/SparseArray");
- gSparseArrayOffsets.classObject = (jclass) env->NewGlobalRef(sparseArrayClass);
- gSparseArrayOffsets.constructor =
- env->GetMethodID(gSparseArrayOffsets.classObject, "<init>", "()V");
- LOG_FATAL_IF(gSparseArrayOffsets.constructor == NULL, "Unable to find SparseArray.<init>()");
- gSparseArrayOffsets.put =
- env->GetMethodID(gSparseArrayOffsets.classObject, "put", "(ILjava/lang/Object;)V");
- LOG_FATAL_IF(gSparseArrayOffsets.put == NULL, "Unable to find SparseArray.put(int, V)");
-
- return AndroidRuntime::registerNativeMethods(env,
- "android/content/res/AssetManager", gAssetManagerMethods, NELEM(gAssetManagerMethods));
+ jclass typedValue = FindClassOrDie(env, "android/util/TypedValue");
+ gTypedValueOffsets.mType = GetFieldIDOrDie(env, typedValue, "type", "I");
+ gTypedValueOffsets.mData = GetFieldIDOrDie(env, typedValue, "data", "I");
+ gTypedValueOffsets.mString = GetFieldIDOrDie(env, typedValue, "string",
+ "Ljava/lang/CharSequence;");
+ gTypedValueOffsets.mAssetCookie = GetFieldIDOrDie(env, typedValue, "assetCookie", "I");
+ gTypedValueOffsets.mResourceId = GetFieldIDOrDie(env, typedValue, "resourceId", "I");
+ gTypedValueOffsets.mChangingConfigurations = GetFieldIDOrDie(env, typedValue,
+ "changingConfigurations", "I");
+ gTypedValueOffsets.mDensity = GetFieldIDOrDie(env, typedValue, "density", "I");
+
+ jclass assetFd = FindClassOrDie(env, "android/content/res/AssetFileDescriptor");
+ gAssetFileDescriptorOffsets.mFd = GetFieldIDOrDie(env, assetFd, "mFd",
+ "Landroid/os/ParcelFileDescriptor;");
+ gAssetFileDescriptorOffsets.mStartOffset = GetFieldIDOrDie(env, assetFd, "mStartOffset", "J");
+ gAssetFileDescriptorOffsets.mLength = GetFieldIDOrDie(env, assetFd, "mLength", "J");
+
+ jclass assetManager = FindClassOrDie(env, "android/content/res/AssetManager");
+ gAssetManagerOffsets.mObject = GetFieldIDOrDie(env, assetManager, "mObject", "J");
+
+ jclass stringClass = FindClassOrDie(env, "java/lang/String");
+ g_stringClass = MakeGlobalRefOrDie(env, stringClass);
+
+ jclass sparseArrayClass = FindClassOrDie(env, "android/util/SparseArray");
+ gSparseArrayOffsets.classObject = MakeGlobalRefOrDie(env, sparseArrayClass);
+ gSparseArrayOffsets.constructor = GetMethodIDOrDie(env, gSparseArrayOffsets.classObject,
+ "<init>", "()V");
+ gSparseArrayOffsets.put = GetMethodIDOrDie(env, gSparseArrayOffsets.classObject, "put",
+ "(ILjava/lang/Object;)V");
+
+ return RegisterMethodsOrDie(env, "android/content/res/AssetManager", gAssetManagerMethods,
+ NELEM(gAssetManagerMethods));
}
}; // namespace android
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index e400698..5f42c3d 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -46,7 +46,7 @@
#include <ScopedUtfChars.h>
#include <ScopedLocalRef.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
//#undef ALOGV
//#define ALOGV(...) fprintf(stderr, __VA_ARGS__)
@@ -85,15 +85,6 @@ static struct binderinternal_offsets_t
// ----------------------------------------------------------------------------
-static struct debug_offsets_t
-{
- // Class state.
- jclass mClass;
-
-} gDebugOffsets;
-
-// ----------------------------------------------------------------------------
-
static struct error_offsets_t
{
jclass mClass;
@@ -215,7 +206,6 @@ static void report_exception(JNIEnv* env, jthrowable excep, const char* msg)
sleep(60);
ALOGE("Forcefully exiting");
exit(1);
- *((int *) 1) = 1;
}
bail:
@@ -271,9 +261,9 @@ protected:
//printf("\n");
jboolean res = env->CallBooleanMethod(mObject, gBinderOffsets.mExecTransact,
code, reinterpret_cast<jlong>(&data), reinterpret_cast<jlong>(reply), flags);
- jthrowable excep = env->ExceptionOccurred();
- if (excep) {
+ if (env->ExceptionCheck()) {
+ jthrowable excep = env->ExceptionOccurred();
report_exception(env, excep,
"*** Uncaught remote exception! "
"(Exceptions are not yet supported across processes.)");
@@ -291,12 +281,12 @@ protected:
set_dalvik_blockguard_policy(env, strict_policy_before);
}
- jthrowable excep2 = env->ExceptionOccurred();
- if (excep2) {
- report_exception(env, excep2,
+ if (env->ExceptionCheck()) {
+ jthrowable excep = env->ExceptionOccurred();
+ report_exception(env, excep,
"*** Uncaught exception in onBinderStrictModePolicyChange");
/* clean up JNI local ref -- we don't return to Java code */
- env->DeleteLocalRef(excep2);
+ env->DeleteLocalRef(excep);
}
// Need to always call through the native implementation of
@@ -398,8 +388,8 @@ public:
env->CallStaticVoidMethod(gBinderProxyOffsets.mClass,
gBinderProxyOffsets.mSendDeathNotice, mObject);
- jthrowable excep = env->ExceptionOccurred();
- if (excep) {
+ if (env->ExceptionCheck()) {
+ jthrowable excep = env->ExceptionOccurred();
report_exception(env, excep,
"*** Uncaught exception returned from death notification!");
}
@@ -836,21 +826,13 @@ const char* const kBinderPathName = "android/os/Binder";
static int int_register_android_os_Binder(JNIEnv* env)
{
- jclass clazz;
+ jclass clazz = FindClassOrDie(env, kBinderPathName);
- clazz = env->FindClass(kBinderPathName);
- LOG_FATAL_IF(clazz == NULL, "Unable to find class android.os.Binder");
+ gBinderOffsets.mClass = MakeGlobalRefOrDie(env, clazz);
+ gBinderOffsets.mExecTransact = GetMethodIDOrDie(env, clazz, "execTransact", "(IJJI)Z");
+ gBinderOffsets.mObject = GetFieldIDOrDie(env, clazz, "mObject", "J");
- gBinderOffsets.mClass = (jclass) env->NewGlobalRef(clazz);
- gBinderOffsets.mExecTransact
- = env->GetMethodID(clazz, "execTransact", "(IJJI)Z");
- assert(gBinderOffsets.mExecTransact);
-
- gBinderOffsets.mObject
- = env->GetFieldID(clazz, "mObject", "J");
- assert(gBinderOffsets.mObject);
-
- return AndroidRuntime::registerNativeMethods(
+ return RegisterMethodsOrDie(
env, kBinderPathName,
gBinderMethods, NELEM(gBinderMethods));
}
@@ -920,17 +902,12 @@ const char* const kBinderInternalPathName = "com/android/internal/os/BinderInter
static int int_register_android_os_BinderInternal(JNIEnv* env)
{
- jclass clazz;
+ jclass clazz = FindClassOrDie(env, kBinderInternalPathName);
- clazz = env->FindClass(kBinderInternalPathName);
- LOG_FATAL_IF(clazz == NULL, "Unable to find class com.android.internal.os.BinderInternal");
+ gBinderInternalOffsets.mClass = MakeGlobalRefOrDie(env, clazz);
+ gBinderInternalOffsets.mForceGc = GetStaticMethodIDOrDie(env, clazz, "forceBinderGc", "()V");
- gBinderInternalOffsets.mClass = (jclass) env->NewGlobalRef(clazz);
- gBinderInternalOffsets.mForceGc
- = env->GetStaticMethodID(clazz, "forceBinderGc", "()V");
- assert(gBinderInternalOffsets.mForceGc);
-
- return AndroidRuntime::registerNativeMethods(
+ return RegisterMethodsOrDie(
env, kBinderInternalPathName,
gBinderInternalMethods, NELEM(gBinderInternalMethods));
}
@@ -955,7 +932,8 @@ static jstring android_os_BinderProxy_getInterfaceDescriptor(JNIEnv* env, jobjec
IBinder* target = (IBinder*) env->GetLongField(obj, gBinderProxyOffsets.mObject);
if (target != NULL) {
const String16& desc = target->getInterfaceDescriptor();
- return env->NewString(desc.string(), desc.size());
+ return env->NewString(reinterpret_cast<const jchar*>(desc.string()),
+ desc.size());
}
jniThrowException(env, "java/lang/RuntimeException",
"No binder found for object");
@@ -1024,7 +1002,9 @@ static bool push_eventlog_int(char** pos, const char* end, jint val) {
}
// From frameworks/base/core/java/android/content/EventLogTags.logtags:
-#define ENABLE_BINDER_SAMPLE 0
+
+static const bool kEnableBinderSample = false;
+
#define LOGTAG_BINDER_OPERATION 52004
static void conditionally_log_binder_call(int64_t start_millis,
@@ -1063,16 +1043,9 @@ static void conditionally_log_binder_call(int64_t start_millis,
}
// We only measure binder call durations to potentially log them if
-// we're on the main thread. Unfortunately sim-eng doesn't seem to
-// have gettid, so we just ignore this and don't log if we can't
-// get the thread id.
+// we're on the main thread.
static bool should_time_binder_calls() {
-#ifdef HAVE_GETTID
- return (getpid() == androidGetTid());
-#else
-#warning no gettid(), so not logging Binder calls...
- return false;
-#endif
+ return (getpid() == gettid());
}
static jboolean android_os_BinderProxy_transact(JNIEnv* env, jobject obj,
@@ -1102,24 +1075,28 @@ static jboolean android_os_BinderProxy_transact(JNIEnv* env, jobject obj,
ALOGV("Java code calling transact on %p in Java object %p with code %" PRId32 "\n",
target, obj, code);
-#if ENABLE_BINDER_SAMPLE
- // Only log the binder call duration for things on the Java-level main thread.
- // But if we don't
- const bool time_binder_calls = should_time_binder_calls();
+ bool time_binder_calls;
int64_t start_millis;
- if (time_binder_calls) {
- start_millis = uptimeMillis();
+ if (kEnableBinderSample) {
+ // Only log the binder call duration for things on the Java-level main thread.
+ // But if we don't
+ time_binder_calls = should_time_binder_calls();
+
+ if (time_binder_calls) {
+ start_millis = uptimeMillis();
+ }
}
-#endif
+
//printf("Transact from Java code to %p sending: ", target); data->print();
status_t err = target->transact(code, *data, reply, flags);
//if (reply) printf("Transact from Java code to %p received: ", target); reply->print();
-#if ENABLE_BINDER_SAMPLE
- if (time_binder_calls) {
- conditionally_log_binder_call(start_millis, target, code);
+
+ if (kEnableBinderSample) {
+ if (time_binder_calls) {
+ conditionally_log_binder_call(start_millis, target, code);
+ }
}
-#endif
if (err == NO_ERROR) {
return JNI_TRUE;
@@ -1244,39 +1221,24 @@ const char* const kBinderProxyPathName = "android/os/BinderProxy";
static int int_register_android_os_BinderProxy(JNIEnv* env)
{
- jclass clazz;
-
- clazz = env->FindClass("java/lang/Error");
- LOG_FATAL_IF(clazz == NULL, "Unable to find class java.lang.Error");
- gErrorOffsets.mClass = (jclass) env->NewGlobalRef(clazz);
-
- clazz = env->FindClass(kBinderProxyPathName);
- LOG_FATAL_IF(clazz == NULL, "Unable to find class android.os.BinderProxy");
-
- gBinderProxyOffsets.mClass = (jclass) env->NewGlobalRef(clazz);
- gBinderProxyOffsets.mConstructor
- = env->GetMethodID(clazz, "<init>", "()V");
- assert(gBinderProxyOffsets.mConstructor);
- gBinderProxyOffsets.mSendDeathNotice
- = env->GetStaticMethodID(clazz, "sendDeathNotice", "(Landroid/os/IBinder$DeathRecipient;)V");
- assert(gBinderProxyOffsets.mSendDeathNotice);
-
- gBinderProxyOffsets.mObject
- = env->GetFieldID(clazz, "mObject", "J");
- assert(gBinderProxyOffsets.mObject);
- gBinderProxyOffsets.mSelf
- = env->GetFieldID(clazz, "mSelf", "Ljava/lang/ref/WeakReference;");
- assert(gBinderProxyOffsets.mSelf);
- gBinderProxyOffsets.mOrgue
- = env->GetFieldID(clazz, "mOrgue", "J");
- assert(gBinderProxyOffsets.mOrgue);
-
- clazz = env->FindClass("java/lang/Class");
- LOG_FATAL_IF(clazz == NULL, "Unable to find java.lang.Class");
- gClassOffsets.mGetName = env->GetMethodID(clazz, "getName", "()Ljava/lang/String;");
- assert(gClassOffsets.mGetName);
-
- return AndroidRuntime::registerNativeMethods(
+ jclass clazz = FindClassOrDie(env, "java/lang/Error");
+ gErrorOffsets.mClass = MakeGlobalRefOrDie(env, clazz);
+
+ clazz = FindClassOrDie(env, kBinderProxyPathName);
+ gBinderProxyOffsets.mClass = MakeGlobalRefOrDie(env, clazz);
+ gBinderProxyOffsets.mConstructor = GetMethodIDOrDie(env, clazz, "<init>", "()V");
+ gBinderProxyOffsets.mSendDeathNotice = GetStaticMethodIDOrDie(env, clazz, "sendDeathNotice",
+ "(Landroid/os/IBinder$DeathRecipient;)V");
+
+ gBinderProxyOffsets.mObject = GetFieldIDOrDie(env, clazz, "mObject", "J");
+ gBinderProxyOffsets.mSelf = GetFieldIDOrDie(env, clazz, "mSelf",
+ "Ljava/lang/ref/WeakReference;");
+ gBinderProxyOffsets.mOrgue = GetFieldIDOrDie(env, clazz, "mOrgue", "J");
+
+ clazz = FindClassOrDie(env, "java/lang/Class");
+ gClassOffsets.mGetName = GetMethodIDOrDie(env, clazz, "getName", "()Ljava/lang/String;");
+
+ return RegisterMethodsOrDie(
env, kBinderProxyPathName,
gBinderProxyMethods, NELEM(gBinderProxyMethods));
}
@@ -1294,28 +1256,20 @@ int register_android_os_Binder(JNIEnv* env)
if (int_register_android_os_BinderProxy(env) < 0)
return -1;
- jclass clazz;
-
- clazz = env->FindClass("android/util/Log");
- LOG_FATAL_IF(clazz == NULL, "Unable to find class android.util.Log");
- gLogOffsets.mClass = (jclass) env->NewGlobalRef(clazz);
- gLogOffsets.mLogE = env->GetStaticMethodID(
- clazz, "e", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I");
- assert(gLogOffsets.mLogE);
-
- clazz = env->FindClass("android/os/ParcelFileDescriptor");
- LOG_FATAL_IF(clazz == NULL, "Unable to find class android.os.ParcelFileDescriptor");
- gParcelFileDescriptorOffsets.mClass = (jclass) env->NewGlobalRef(clazz);
- gParcelFileDescriptorOffsets.mConstructor
- = env->GetMethodID(clazz, "<init>", "(Ljava/io/FileDescriptor;)V");
-
- clazz = env->FindClass("android/os/StrictMode");
- LOG_FATAL_IF(clazz == NULL, "Unable to find class android.os.StrictMode");
- gStrictModeCallbackOffsets.mClass = (jclass) env->NewGlobalRef(clazz);
- gStrictModeCallbackOffsets.mCallback = env->GetStaticMethodID(
- clazz, "onBinderStrictModePolicyChange", "(I)V");
- LOG_FATAL_IF(gStrictModeCallbackOffsets.mCallback == NULL,
- "Unable to find strict mode callback.");
+ jclass clazz = FindClassOrDie(env, "android/util/Log");
+ gLogOffsets.mClass = MakeGlobalRefOrDie(env, clazz);
+ gLogOffsets.mLogE = GetStaticMethodIDOrDie(env, clazz, "e",
+ "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I");
+
+ clazz = FindClassOrDie(env, "android/os/ParcelFileDescriptor");
+ gParcelFileDescriptorOffsets.mClass = MakeGlobalRefOrDie(env, clazz);
+ gParcelFileDescriptorOffsets.mConstructor = GetMethodIDOrDie(env, clazz, "<init>",
+ "(Ljava/io/FileDescriptor;)V");
+
+ clazz = FindClassOrDie(env, "android/os/StrictMode");
+ gStrictModeCallbackOffsets.mClass = MakeGlobalRefOrDie(env, clazz);
+ gStrictModeCallbackOffsets.mCallback = GetStaticMethodIDOrDie(env, clazz,
+ "onBinderStrictModePolicyChange", "(I)V");
return 0;
}
diff --git a/core/jni/android_util_EventLog.cpp b/core/jni/android_util_EventLog.cpp
index 8a0eaa2..5cb8b2e 100644
--- a/core/jni/android_util_EventLog.cpp
+++ b/core/jni/android_util_EventLog.cpp
@@ -17,7 +17,7 @@
#include <fcntl.h>
#include "JNIHelp.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include "jni.h"
#include "log/logger.h"
@@ -159,7 +159,7 @@ static void android_util_EventLog_readEvents(JNIEnv* env, jobject clazz UNUSED,
}
struct logger_list *logger_list = android_logger_list_open(
- LOG_ID_EVENTS, O_RDONLY | O_NONBLOCK, 0, 0);
+ LOG_ID_EVENTS, ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 0, 0);
if (!logger_list) {
jniThrowIOException(env, errno);
@@ -188,6 +188,10 @@ static void android_util_EventLog_readEvents(JNIEnv* env, jobject clazz UNUSED,
break;
}
+ if (log_msg.id() != LOG_ID_EVENTS) {
+ continue;
+ }
+
int32_t tag = * (int32_t *) log_msg.msg();
int found = 0;
@@ -263,33 +267,21 @@ static struct { jclass *c; const char *name, *mt; jmethodID *id; } gMethods[] =
int register_android_util_EventLog(JNIEnv* env) {
for (int i = 0; i < NELEM(gClasses); ++i) {
- jclass clazz = env->FindClass(gClasses[i].name);
- if (clazz == NULL) {
- ALOGE("Can't find class: %s\n", gClasses[i].name);
- return -1;
- }
- *gClasses[i].clazz = (jclass) env->NewGlobalRef(clazz);
+ jclass clazz = FindClassOrDie(env, gClasses[i].name);
+ *gClasses[i].clazz = MakeGlobalRefOrDie(env, clazz);
}
for (int i = 0; i < NELEM(gFields); ++i) {
- *gFields[i].id = env->GetFieldID(
+ *gFields[i].id = GetFieldIDOrDie(env,
*gFields[i].c, gFields[i].name, gFields[i].ft);
- if (*gFields[i].id == NULL) {
- ALOGE("Can't find field: %s\n", gFields[i].name);
- return -1;
- }
}
for (int i = 0; i < NELEM(gMethods); ++i) {
- *gMethods[i].id = env->GetMethodID(
+ *gMethods[i].id = GetMethodIDOrDie(env,
*gMethods[i].c, gMethods[i].name, gMethods[i].mt);
- if (*gMethods[i].id == NULL) {
- ALOGE("Can't find method: %s\n", gMethods[i].name);
- return -1;
- }
}
- return AndroidRuntime::registerNativeMethods(
+ return RegisterMethodsOrDie(
env,
"android/util/EventLog",
gRegisterMethods, NELEM(gRegisterMethods));
diff --git a/core/jni/android_util_FileObserver.cpp b/core/jni/android_util_FileObserver.cpp
index 0327d8c..067d298 100644
--- a/core/jni/android_util_FileObserver.cpp
+++ b/core/jni/android_util_FileObserver.cpp
@@ -19,7 +19,7 @@
#include "jni.h"
#include "utils/Log.h"
#include "utils/misc.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include <stdio.h>
#include <stdlib.h>
@@ -29,7 +29,7 @@
#include <sys/ioctl.h>
#include <errno.h>
-#ifdef HAVE_INOTIFY
+#if defined(__linux__)
#include <sys/inotify.h>
#endif
@@ -39,29 +39,25 @@ static jmethodID method_onEvent;
static jint android_os_fileobserver_init(JNIEnv* env, jobject object)
{
-#ifdef HAVE_INOTIFY
-
- return (jint)inotify_init();
-
-#else // HAVE_INOTIFY
-
+#if defined(__linux__)
+ return (jint)inotify_init();
+#else
return -1;
-
-#endif // HAVE_INOTIFY
+#endif
}
static void android_os_fileobserver_observe(JNIEnv* env, jobject object, jint fd)
{
-#ifdef HAVE_INOTIFY
-
+#if defined(__linux__)
+
char event_buf[512];
struct inotify_event* event;
-
+
while (1)
{
int event_pos = 0;
int num_bytes = read(fd, event_buf, sizeof(event_buf));
-
+
if (num_bytes < (int)sizeof(*event))
{
if (errno == EINTR)
@@ -70,14 +66,14 @@ static void android_os_fileobserver_observe(JNIEnv* env, jobject object, jint fd
ALOGE("***** ERROR! android_os_fileobserver_observe() got a short event!");
return;
}
-
+
while (num_bytes >= (int)sizeof(*event))
{
int event_size;
event = (struct inotify_event *)(event_buf + event_pos);
jstring path = NULL;
-
+
if (event->len > 0)
{
path = env->NewStringUTF(event->name);
@@ -98,37 +94,37 @@ static void android_os_fileobserver_observe(JNIEnv* env, jobject object, jint fd
event_pos += event_size;
}
}
-
-#endif // HAVE_INOTIFY
+
+#endif
}
static jint android_os_fileobserver_startWatching(JNIEnv* env, jobject object, jint fd, jstring pathString, jint mask)
{
int res = -1;
-
-#ifdef HAVE_INOTIFY
-
+
+#if defined(__linux__)
+
if (fd >= 0)
{
const char* path = env->GetStringUTFChars(pathString, NULL);
-
+
res = inotify_add_watch(fd, path, mask);
-
+
env->ReleaseStringUTFChars(pathString, path);
}
-#endif // HAVE_INOTIFY
-
+#endif
+
return res;
}
static void android_os_fileobserver_stopWatching(JNIEnv* env, jobject object, jint fd, jint wfd)
{
-#ifdef HAVE_INOTIFY
+#if defined(__linux__)
inotify_rm_watch((int)fd, (uint32_t)wfd);
-#endif // HAVE_INOTIFY
+#endif
}
static JNINativeMethod sMethods[] = {
@@ -137,29 +133,17 @@ static JNINativeMethod sMethods[] = {
{ "observe", "(I)V", (void*)android_os_fileobserver_observe },
{ "startWatching", "(ILjava/lang/String;I)I", (void*)android_os_fileobserver_startWatching },
{ "stopWatching", "(II)V", (void*)android_os_fileobserver_stopWatching }
-
+
};
int register_android_os_FileObserver(JNIEnv* env)
{
- jclass clazz;
-
- clazz = env->FindClass("android/os/FileObserver$ObserverThread");
-
- if (clazz == NULL)
- {
- ALOGE("Can't find android/os/FileObserver$ObserverThread");
- return -1;
- }
+ jclass clazz = FindClassOrDie(env, "android/os/FileObserver$ObserverThread");
- method_onEvent = env->GetMethodID(clazz, "onEvent", "(IILjava/lang/String;)V");
- if (method_onEvent == NULL)
- {
- ALOGE("Can't find FileObserver.onEvent(int, int, String)");
- return -1;
- }
+ method_onEvent = GetMethodIDOrDie(env, clazz, "onEvent", "(IILjava/lang/String;)V");
- return AndroidRuntime::registerNativeMethods(env, "android/os/FileObserver$ObserverThread", sMethods, NELEM(sMethods));
+ return RegisterMethodsOrDie(env, "android/os/FileObserver$ObserverThread", sMethods,
+ NELEM(sMethods));
}
} /* namespace android */
diff --git a/core/jni/android_util_FloatMath.cpp b/core/jni/android_util_FloatMath.cpp
deleted file mode 100644
index 73b7a6f..0000000
--- a/core/jni/android_util_FloatMath.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-#include "jni.h"
-#include <android_runtime/AndroidRuntime.h>
-#include <math.h>
-#include <float.h>
-#include "SkTypes.h"
-
-class MathUtilsGlue {
-public:
- static float FloorF(JNIEnv* env, jobject clazz, float x) {
- return floorf(x);
- }
-
- static float CeilF(JNIEnv* env, jobject clazz, float x) {
- return ceilf(x);
- }
-
- static float SinF(JNIEnv* env, jobject clazz, float x) {
- return sinf(x);
- }
-
- static float CosF(JNIEnv* env, jobject clazz, float x) {
- return cosf(x);
- }
-
- static float SqrtF(JNIEnv* env, jobject clazz, float x) {
- return sqrtf(x);
- }
-
- static float ExpF(JNIEnv* env, jobject clazz, float x) {
- return expf(x);
- }
-
- static float PowF(JNIEnv* env, jobject clazz, float x, float y) {
- return powf(x, y);
- }
-
- static float HypotF(JNIEnv* env, jobject clazz, float x, float y) {
- return hypotf(x, y);
- }
-};
-
-static JNINativeMethod gMathUtilsMethods[] = {
- {"floor", "(F)F", (void*) MathUtilsGlue::FloorF},
- {"ceil", "(F)F", (void*) MathUtilsGlue::CeilF},
- {"sin", "(F)F", (void*) MathUtilsGlue::SinF},
- {"cos", "(F)F", (void*) MathUtilsGlue::CosF},
- {"sqrt", "(F)F", (void*) MathUtilsGlue::SqrtF},
- {"exp", "(F)F", (void*) MathUtilsGlue::ExpF},
- {"pow", "(FF)F", (void*) MathUtilsGlue::PowF},
- {"hypot", "(FF)F", (void*) MathUtilsGlue::HypotF},
-};
-
-int register_android_util_FloatMath(JNIEnv* env)
-{
- int result = android::AndroidRuntime::registerNativeMethods(env,
- "android/util/FloatMath",
- gMathUtilsMethods,
- SK_ARRAY_COUNT(gMathUtilsMethods));
- return result;
-}
-
diff --git a/core/jni/android_util_Log.cpp b/core/jni/android_util_Log.cpp
index 93dcbef..9a80f1d 100644
--- a/core/jni/android_util_Log.cpp
+++ b/core/jni/android_util_Log.cpp
@@ -26,11 +26,9 @@
#include "jni.h"
#include "JNIHelp.h"
#include "utils/misc.h"
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include "android_util_Log.h"
-#define MIN(a,b) ((a<b)?a:b)
-
namespace android {
struct levels_t {
@@ -145,21 +143,16 @@ static JNINativeMethod gMethods[] = {
int register_android_util_Log(JNIEnv* env)
{
- jclass clazz = env->FindClass("android/util/Log");
-
- if (clazz == NULL) {
- ALOGE("Can't find android/util/Log");
- return -1;
- }
+ jclass clazz = FindClassOrDie(env, "android/util/Log");
- levels.verbose = env->GetStaticIntField(clazz, env->GetStaticFieldID(clazz, "VERBOSE", "I"));
- levels.debug = env->GetStaticIntField(clazz, env->GetStaticFieldID(clazz, "DEBUG", "I"));
- levels.info = env->GetStaticIntField(clazz, env->GetStaticFieldID(clazz, "INFO", "I"));
- levels.warn = env->GetStaticIntField(clazz, env->GetStaticFieldID(clazz, "WARN", "I"));
- levels.error = env->GetStaticIntField(clazz, env->GetStaticFieldID(clazz, "ERROR", "I"));
- levels.assert = env->GetStaticIntField(clazz, env->GetStaticFieldID(clazz, "ASSERT", "I"));
+ levels.verbose = env->GetStaticIntField(clazz, GetStaticFieldIDOrDie(env, clazz, "VERBOSE", "I"));
+ levels.debug = env->GetStaticIntField(clazz, GetStaticFieldIDOrDie(env, clazz, "DEBUG", "I"));
+ levels.info = env->GetStaticIntField(clazz, GetStaticFieldIDOrDie(env, clazz, "INFO", "I"));
+ levels.warn = env->GetStaticIntField(clazz, GetStaticFieldIDOrDie(env, clazz, "WARN", "I"));
+ levels.error = env->GetStaticIntField(clazz, GetStaticFieldIDOrDie(env, clazz, "ERROR", "I"));
+ levels.assert = env->GetStaticIntField(clazz, GetStaticFieldIDOrDie(env, clazz, "ASSERT", "I"));
- return AndroidRuntime::registerNativeMethods(env, "android/util/Log", gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "android/util/Log", gMethods, NELEM(gMethods));
}
}; // namespace android
diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp
index aaa680f..2830724 100644
--- a/core/jni/android_util_Process.cpp
+++ b/core/jni/android_util_Process.cpp
@@ -26,7 +26,7 @@
#include <utils/Vector.h>
#include <processgroup/processgroup.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include "android_util_Binder.h"
#include "JNIHelp.h"
@@ -43,13 +43,13 @@
#include <sys/types.h>
#include <unistd.h>
-#define POLICY_DEBUG 0
#define GUARD_THREAD_PRIORITY 0
-#define DEBUG_PROC(x) //x
-
using namespace android;
+static const bool kDebugPolicy = false;
+static const bool kDebugProc = false;
+
#if GUARD_THREAD_PRIORITY
Mutex gKeyCreateMutex;
static pthread_key_t gBgKey = -1;
@@ -109,7 +109,8 @@ jint android_os_Process_getUidForName(JNIEnv* env, jobject clazz, jstring name)
const jchar* str16 = env->GetStringCritical(name, 0);
String8 name8;
if (str16) {
- name8 = String8(str16, env->GetStringLength(name));
+ name8 = String8(reinterpret_cast<const char16_t*>(str16),
+ env->GetStringLength(name));
env->ReleaseStringCritical(name, str16);
}
@@ -140,7 +141,8 @@ jint android_os_Process_getGidForName(JNIEnv* env, jobject clazz, jstring name)
const jchar* str16 = env->GetStringCritical(name, 0);
String8 name8;
if (str16) {
- name8 = String8(str16, env->GetStringLength(name));
+ name8 = String8(reinterpret_cast<const char16_t*>(str16),
+ env->GetStringLength(name));
env->ReleaseStringCritical(name, str16);
}
@@ -175,7 +177,6 @@ void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jin
{
ALOGV("%s pid=%d grp=%" PRId32, __func__, pid, grp);
DIR *d;
- FILE *fp;
char proc_path[255];
struct dirent *de;
@@ -191,26 +192,27 @@ void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jin
}
SchedPolicy sp = (SchedPolicy) grp;
-#if POLICY_DEBUG
- char cmdline[32];
- int fd;
+ if (kDebugPolicy) {
+ char cmdline[32];
+ int fd;
- strcpy(cmdline, "unknown");
+ strcpy(cmdline, "unknown");
- sprintf(proc_path, "/proc/%d/cmdline", pid);
- fd = open(proc_path, O_RDONLY);
- if (fd >= 0) {
- int rc = read(fd, cmdline, sizeof(cmdline)-1);
- cmdline[rc] = 0;
- close(fd);
- }
+ sprintf(proc_path, "/proc/%d/cmdline", pid);
+ fd = open(proc_path, O_RDONLY);
+ if (fd >= 0) {
+ int rc = read(fd, cmdline, sizeof(cmdline)-1);
+ cmdline[rc] = 0;
+ close(fd);
+ }
- if (sp == SP_BACKGROUND) {
- ALOGD("setProcessGroup: vvv pid %d (%s)", pid, cmdline);
- } else {
- ALOGD("setProcessGroup: ^^^ pid %d (%s)", pid, cmdline);
+ if (sp == SP_BACKGROUND) {
+ ALOGD("setProcessGroup: vvv pid %d (%s)", pid, cmdline);
+ } else {
+ ALOGD("setProcessGroup: ^^^ pid %d (%s)", pid, cmdline);
+ }
}
-#endif
+
sprintf(proc_path, "/proc/%d/task", pid);
if (!(d = opendir(proc_path))) {
// If the process exited on us, don't generate an exception
@@ -271,7 +273,7 @@ static void android_os_Process_setCanSelfBackground(JNIEnv* env, jobject clazz,
// Establishes the calling thread as illegal to put into the background.
// Typically used only for the system process's main looper.
#if GUARD_THREAD_PRIORITY
- ALOGV("Process.setCanSelfBackground(%d) : tid=%d", bgOk, androidGetTid());
+ ALOGV("Process.setCanSelfBackground(%d) : tid=%d", bgOk, gettid());
{
Mutex::Autolock _l(gKeyCreateMutex);
if (gBgKey == -1) {
@@ -287,7 +289,8 @@ static void android_os_Process_setCanSelfBackground(JNIEnv* env, jobject clazz,
void android_os_Process_setThreadScheduler(JNIEnv* env, jclass clazz,
jint tid, jint policy, jint pri)
{
-#ifdef HAVE_SCHED_SETSCHEDULER
+// linux has sched_setscheduler(), others don't.
+#if defined(__linux__)
struct sched_param param;
param.sched_priority = pri;
int rc = sched_setscheduler(tid, policy, &param);
@@ -306,7 +309,7 @@ void android_os_Process_setThreadPriority(JNIEnv* env, jobject clazz,
// if we're putting the current thread into the background, check the TLS
// to make sure this thread isn't guarded. If it is, raise an exception.
if (pri >= ANDROID_PRIORITY_BACKGROUND) {
- if (pid == androidGetTid()) {
+ if (pid == gettid()) {
void* bgOk = pthread_getspecific(gBgKey);
if (bgOk == ((void*)0xbaad)) {
ALOGE("Thread marked fg-only put self in background!");
@@ -333,7 +336,7 @@ void android_os_Process_setThreadPriority(JNIEnv* env, jobject clazz,
void android_os_Process_setCallingThreadPriority(JNIEnv* env, jobject clazz,
jint pri)
{
- android_os_Process_setThreadPriority(env, clazz, androidGetTid(), pri);
+ android_os_Process_setThreadPriority(env, clazz, gettid(), pri);
}
jint android_os_Process_getThreadPriority(JNIEnv* env, jobject clazz,
@@ -384,7 +387,8 @@ void android_os_Process_setArgV0(JNIEnv* env, jobject clazz, jstring name)
const jchar* str = env->GetStringCritical(name, 0);
String8 name8;
if (str) {
- name8 = String8(str, env->GetStringLength(name));
+ name8 = String8(reinterpret_cast<const char16_t*>(str),
+ env->GetStringLength(name));
env->ReleaseStringCritical(name, str);
}
@@ -718,7 +722,7 @@ jboolean android_os_Process_parseProcLineArray(JNIEnv* env, jobject clazz,
jint mode = formatData[fi];
if ((mode&PROC_PARENS) != 0) {
i++;
- } else if ((mode&PROC_QUOTES != 0)) {
+ } else if ((mode&PROC_QUOTES) != 0) {
if (buffer[i] == '"') {
i++;
} else {
@@ -728,7 +732,9 @@ jboolean android_os_Process_parseProcLineArray(JNIEnv* env, jobject clazz,
const char term = (char)(mode&PROC_TERM_MASK);
const jsize start = i;
if (i >= endIndex) {
- DEBUG_PROC(ALOGW("Ran off end of data @%d", i));
+ if (kDebugProc) {
+ ALOGW("Ran off end of data @%d", i);
+ }
res = JNI_FALSE;
break;
}
@@ -828,7 +834,9 @@ jboolean android_os_Process_readProcFile(JNIEnv* env, jobject clazz,
int fd = open(file8, O_RDONLY);
if (fd < 0) {
- DEBUG_PROC(ALOGW("Unable to open process file: %s\n", file8));
+ if (kDebugProc) {
+ ALOGW("Unable to open process file: %s\n", file8);
+ }
env->ReleaseStringUTFChars(file, file8);
return JNI_FALSE;
}
@@ -839,7 +847,9 @@ jboolean android_os_Process_readProcFile(JNIEnv* env, jobject clazz,
close(fd);
if (len < 0) {
- DEBUG_PROC(ALOGW("Unable to open process file: %s fd=%d\n", file8, fd));
+ if (kDebugProc) {
+ ALOGW("Unable to open process file: %s fd=%d\n", file8, fd);
+ }
return JNI_FALSE;
}
buffer[len] = 0;
@@ -1044,11 +1054,7 @@ static const JNINativeMethod methods[] = {
{"removeAllProcessGroups", "()V", (void*)android_os_Process_removeAllProcessGroups},
};
-const char* const kProcessPathName = "android/os/Process";
-
int register_android_os_Process(JNIEnv* env)
{
- return AndroidRuntime::registerNativeMethods(
- env, kProcessPathName,
- methods, NELEM(methods));
+ return RegisterMethodsOrDie(env, "android/os/Process", methods, NELEM(methods));
}
diff --git a/core/jni/android_util_StringBlock.cpp b/core/jni/android_util_StringBlock.cpp
index f29250f..f83eaec 100644
--- a/core/jni/android_util_StringBlock.cpp
+++ b/core/jni/android_util_StringBlock.cpp
@@ -20,7 +20,7 @@
#include "jni.h"
#include "JNIHelp.h"
#include <utils/misc.h>
-#include <android_runtime/AndroidRuntime.h>
+#include <core_jni_helpers.h>
#include <utils/Log.h>
#include <androidfw/ResourceTypes.h>
@@ -171,7 +171,7 @@ static JNINativeMethod gStringBlockMethods[] = {
int register_android_content_StringBlock(JNIEnv* env)
{
- return AndroidRuntime::registerNativeMethods(env,
+ return RegisterMethodsOrDie(env,
"android/content/res/StringBlock", gStringBlockMethods, NELEM(gStringBlockMethods));
}
diff --git a/core/jni/android_util_XmlBlock.cpp b/core/jni/android_util_XmlBlock.cpp
index 2cccb83..375710e 100644
--- a/core/jni/android_util_XmlBlock.cpp
+++ b/core/jni/android_util_XmlBlock.cpp
@@ -19,7 +19,7 @@
#include "jni.h"
#include "JNIHelp.h"
-#include <android_runtime/AndroidRuntime.h>
+#include <core_jni_helpers.h>
#include <androidfw/AssetManager.h>
#include <androidfw/ResourceTypes.h>
#include <utils/Log.h>
@@ -267,19 +267,20 @@ static jint android_content_XmlBlock_nativeGetAttributeIndex(JNIEnv* env, jobjec
const char16_t* ns16 = NULL;
jsize nsLen = 0;
if (ns) {
- ns16 = env->GetStringChars(ns, NULL);
+ ns16 = reinterpret_cast<const char16_t*>(env->GetStringChars(ns, NULL));
nsLen = env->GetStringLength(ns);
}
- const char16_t* name16 = env->GetStringChars(name, NULL);
+ const char16_t* name16 = reinterpret_cast<const char16_t*>(
+ env->GetStringChars(name, NULL));
jsize nameLen = env->GetStringLength(name);
jint idx = static_cast<jint>(st->indexOfAttribute(ns16, nsLen, name16, nameLen));
if (ns) {
- env->ReleaseStringChars(ns, ns16);
+ env->ReleaseStringChars(ns, reinterpret_cast<const jchar*>(ns16));
}
- env->ReleaseStringChars(name, name16);
+ env->ReleaseStringChars(name, reinterpret_cast<const jchar*>(name16));
return idx;
}
@@ -411,7 +412,7 @@ static JNINativeMethod gXmlBlockMethods[] = {
int register_android_content_XmlBlock(JNIEnv* env)
{
- return AndroidRuntime::registerNativeMethods(env,
+ return RegisterMethodsOrDie(env,
"android/content/res/XmlBlock", gXmlBlockMethods, NELEM(gXmlBlockMethods));
}
diff --git a/core/jni/android_view_DisplayEventReceiver.cpp b/core/jni/android_view_DisplayEventReceiver.cpp
index d4cc159..0d54953 100644
--- a/core/jni/android_view_DisplayEventReceiver.cpp
+++ b/core/jni/android_view_DisplayEventReceiver.cpp
@@ -18,9 +18,10 @@
//#define LOG_NDEBUG 0
-
#include "JNIHelp.h"
+#include <inttypes.h>
+
#include <android_runtime/AndroidRuntime.h>
#include <utils/Log.h>
#include <utils/Looper.h>
@@ -28,6 +29,8 @@
#include <gui/DisplayEventReceiver.h>
#include "android_os_MessageQueue.h"
+#include "core_jni_helpers.h"
+
namespace android {
// Number of events to read at a time from the DisplayEventReceiver pipe.
@@ -142,7 +145,7 @@ int NativeDisplayEventReceiver::handleEvent(int receiveFd, int events, void* dat
int32_t vsyncDisplayId;
uint32_t vsyncCount;
if (processPendingEvents(&vsyncTimestamp, &vsyncDisplayId, &vsyncCount)) {
- ALOGV("receiver %p ~ Vsync pulse: timestamp=%lld, id=%d, count=%d",
+ ALOGV("receiver %p ~ Vsync pulse: timestamp=%" PRId64 ", id=%d, count=%d",
this, vsyncTimestamp, vsyncDisplayId, vsyncCount);
mWaitingForVsync = false;
dispatchVsync(vsyncTimestamp, vsyncDisplayId, vsyncCount);
@@ -260,29 +263,19 @@ static JNINativeMethod gMethods[] = {
(void*)nativeScheduleVsync }
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className); \
- var = jclass(env->NewGlobalRef(var));
+int register_android_view_DisplayEventReceiver(JNIEnv* env) {
+ int res = RegisterMethodsOrDie(env, "android/view/DisplayEventReceiver", gMethods,
+ NELEM(gMethods));
-#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
+ jclass clazz = FindClassOrDie(env, "android/view/DisplayEventReceiver");
+ gDisplayEventReceiverClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
-int register_android_view_DisplayEventReceiver(JNIEnv* env) {
- int res = jniRegisterNativeMethods(env, "android/view/DisplayEventReceiver",
- gMethods, NELEM(gMethods));
- LOG_FATAL_IF(res < 0, "Unable to register native methods.");
-
- FIND_CLASS(gDisplayEventReceiverClassInfo.clazz, "android/view/DisplayEventReceiver");
-
- GET_METHOD_ID(gDisplayEventReceiverClassInfo.dispatchVsync,
- gDisplayEventReceiverClassInfo.clazz,
- "dispatchVsync", "(JII)V");
- GET_METHOD_ID(gDisplayEventReceiverClassInfo.dispatchHotplug,
- gDisplayEventReceiverClassInfo.clazz,
- "dispatchHotplug", "(JIZ)V");
- return 0;
+ gDisplayEventReceiverClassInfo.dispatchVsync = GetMethodIDOrDie(env,
+ gDisplayEventReceiverClassInfo.clazz, "dispatchVsync", "(JII)V");
+ gDisplayEventReceiverClassInfo.dispatchHotplug = GetMethodIDOrDie(env,
+ gDisplayEventReceiverClassInfo.clazz, "dispatchHotplug", "(JIZ)V");
+
+ return res;
}
} // namespace android
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index 9bbd4fc..da8a9ed 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -47,10 +47,16 @@
#include "MinikinUtils.h"
+#include "core_jni_helpers.h"
+
namespace android {
using namespace uirenderer;
+static struct {
+ jmethodID set;
+} gRectClassInfo;
+
/**
* Note: DisplayListRenderer JNI layer is generated and compiled only on supported
* devices. This means all the logic must be compiled only when the
@@ -62,21 +68,7 @@ using namespace uirenderer;
// Defines
// ----------------------------------------------------------------------------
-// Debug
-#define DEBUG_RENDERER 0
-
-// Debug
-#if DEBUG_RENDERER
- #define RENDERER_LOGD(...) ALOGD(__VA_ARGS__)
-#else
- #define RENDERER_LOGD(...)
-#endif
-
-// ----------------------------------------------------------------------------
-
-static struct {
- jmethodID set;
-} gRectClassInfo;
+static const bool kDebugRenderer = false;
// ----------------------------------------------------------------------------
// Constructors
@@ -85,7 +77,9 @@ static struct {
static void android_view_GLES20Canvas_destroyRenderer(JNIEnv* env, jobject clazz,
jlong rendererPtr) {
DisplayListRenderer* renderer = reinterpret_cast<DisplayListRenderer*>(rendererPtr);
- RENDERER_LOGD("Destroy DisplayListRenderer");
+ if (kDebugRenderer) {
+ ALOGD("Destroy DisplayListRenderer");
+ }
delete renderer;
}
@@ -821,24 +815,30 @@ static void android_view_GLES20Canvas_drawLayer(JNIEnv* env, jobject clazz,
#endif // USE_OPENGL_RENDERER
+#ifdef USE_OPENGL_RENDERER
+static const bool kUseOpenGLRenderer = true;
+#else
+static const bool kUseOpenGLRenderer = false;
+#endif
+
// ----------------------------------------------------------------------------
// Common
// ----------------------------------------------------------------------------
static jboolean android_view_GLES20Canvas_isAvailable(JNIEnv* env, jobject clazz) {
-#ifdef USE_OPENGL_RENDERER
- char prop[PROPERTY_VALUE_MAX];
- if (property_get("ro.kernel.qemu", prop, NULL) == 0) {
- // not in the emulator
- return JNI_TRUE;
+ if (kUseOpenGLRenderer) {
+ char prop[PROPERTY_VALUE_MAX];
+ if (property_get("ro.kernel.qemu", prop, NULL) == 0) {
+ // not in the emulator
+ return JNI_TRUE;
+ }
+ // In the emulator this property will be set to 1 when hardware GLES is
+ // enabled, 0 otherwise. On old emulator versions it will be undefined.
+ property_get("ro.kernel.qemu.gles", prop, "0");
+ return atoi(prop) == 1 ? JNI_TRUE : JNI_FALSE;
+ } else {
+ return JNI_FALSE;
}
- // In the emulator this property will be set to 1 when hardware GLES is
- // enabled, 0 otherwise. On old emulator versions it will be undefined.
- property_get("ro.kernel.qemu.gles", prop, "0");
- return atoi(prop) == 1 ? JNI_TRUE : JNI_FALSE;
-#else
- return JNI_FALSE;
-#endif
}
// ----------------------------------------------------------------------------
@@ -847,10 +847,10 @@ static jboolean android_view_GLES20Canvas_isAvailable(JNIEnv* env, jobject clazz
static void
android_app_ActivityThread_dumpGraphics(JNIEnv* env, jobject clazz, jobject javaFileDescriptor) {
-#ifdef USE_OPENGL_RENDERER
- int fd = jniGetFDFromFileDescriptor(env, javaFileDescriptor);
- android::uirenderer::renderthread::RenderProxy::outputLogBuffer(fd);
-#endif // USE_OPENGL_RENDERER
+ if (kUseOpenGLRenderer) {
+ int fd = jniGetFDFromFileDescriptor(env, javaFileDescriptor);
+ android::uirenderer::renderthread::RenderProxy::outputLogBuffer(fd);
+ }
}
// ----------------------------------------------------------------------------
@@ -959,32 +959,17 @@ static JNINativeMethod gActivityThreadMethods[] = {
(void*) android_app_ActivityThread_dumpGraphics }
};
-
-#ifdef USE_OPENGL_RENDERER
- #define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
- #define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-#else
- #define FIND_CLASS(var, className)
- #define GET_METHOD_ID(var, clazz, methodName, methodDescriptor)
-#endif
-
int register_android_view_GLES20Canvas(JNIEnv* env) {
- jclass clazz;
- FIND_CLASS(clazz, "android/graphics/Rect");
- GET_METHOD_ID(gRectClassInfo.set, clazz, "set", "(IIII)V");
+ if (kUseOpenGLRenderer) {
+ jclass clazz = FindClassOrDie(env, "android/graphics/Rect");
+ gRectClassInfo.set = GetMethodIDOrDie(env, clazz, "set", "(IIII)V");
+ }
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
-const char* const kActivityThreadPathName = "android/app/ActivityThread";
-
int register_android_app_ActivityThread(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, kActivityThreadPathName,
+ return RegisterMethodsOrDie(env, "android/app/ActivityThread",
gActivityThreadMethods, NELEM(gActivityThreadMethods));
}
diff --git a/core/jni/android_view_GraphicBuffer.cpp b/core/jni/android_view_GraphicBuffer.cpp
index 5ebed9c..a12629f 100644
--- a/core/jni/android_view_GraphicBuffer.cpp
+++ b/core/jni/android_view_GraphicBuffer.cpp
@@ -38,6 +38,8 @@
#include <private/gui/ComposerService.h>
+#include "core_jni_helpers.h"
+
namespace android {
// ----------------------------------------------------------------------------
@@ -45,16 +47,7 @@ namespace android {
// ----------------------------------------------------------------------------
// Debug
-#define DEBUG_GRAPHIC_BUFFER 0
-
-// Debug
-#if DEBUG_GRAPHIC_BUFFER
- #define GB_LOGD(...) ALOGD(__VA_ARGS__)
- #define GB_LOGW(...) ALOGW(__VA_ARGS__)
-#else
- #define GB_LOGD(...)
- #define GB_LOGW(...)
-#endif
+static const bool kDebugGraphicBuffer = false;
#define LOCK_CANVAS_USAGE GraphicBuffer::USAGE_SW_READ_OFTEN | GraphicBuffer::USAGE_SW_WRITE_OFTEN
@@ -116,14 +109,18 @@ static jlong android_view_GraphiceBuffer_create(JNIEnv* env, jobject clazz,
sp<ISurfaceComposer> composer(ComposerService::getComposerService());
sp<IGraphicBufferAlloc> alloc(composer->createGraphicBufferAlloc());
if (alloc == NULL) {
- GB_LOGW("createGraphicBufferAlloc() failed in GraphicBuffer.create()");
+ if (kDebugGraphicBuffer) {
+ ALOGW("createGraphicBufferAlloc() failed in GraphicBuffer.create()");
+ }
return NULL;
}
status_t error;
sp<GraphicBuffer> buffer(alloc->createGraphicBuffer(width, height, format, usage, &error));
if (buffer == NULL) {
- GB_LOGW("createGraphicBuffer() failed in GraphicBuffer.create()");
+ if (kDebugGraphicBuffer) {
+ ALOGW("createGraphicBuffer() failed in GraphicBuffer.create()");
+ }
return NULL;
}
@@ -277,18 +274,6 @@ sp<GraphicBuffer> graphicBufferForJavaObject(JNIEnv* env, jobject obj) {
// JNI Glue
// ----------------------------------------------------------------------------
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
-#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(!var, "Unable to find method " methodName);
-
const char* const kClassPathName = "android/view/GraphicBuffer";
static JNINativeMethod gMethods[] = {
@@ -307,22 +292,21 @@ static JNINativeMethod gMethods[] = {
};
int register_android_view_GraphicBuffer(JNIEnv* env) {
- jclass clazz;
- FIND_CLASS(clazz, "android/view/GraphicBuffer");
- GET_FIELD_ID(gGraphicBufferClassInfo.mNativeObject, clazz, "mNativeObject", "J");
-
- FIND_CLASS(clazz, "android/graphics/Rect");
- GET_METHOD_ID(gRectClassInfo.set, clazz, "set", "(IIII)V");
- GET_FIELD_ID(gRectClassInfo.left, clazz, "left", "I");
- GET_FIELD_ID(gRectClassInfo.top, clazz, "top", "I");
- GET_FIELD_ID(gRectClassInfo.right, clazz, "right", "I");
- GET_FIELD_ID(gRectClassInfo.bottom, clazz, "bottom", "I");
-
- FIND_CLASS(clazz, "android/graphics/Canvas");
- GET_FIELD_ID(gCanvasClassInfo.mSurfaceFormat, clazz, "mSurfaceFormat", "I");
- GET_METHOD_ID(gCanvasClassInfo.setNativeBitmap, clazz, "setNativeBitmap", "(J)V");
-
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ jclass clazz = FindClassOrDie(env, "android/view/GraphicBuffer");
+ gGraphicBufferClassInfo.mNativeObject = GetFieldIDOrDie(env, clazz, "mNativeObject", "J");
+
+ clazz = FindClassOrDie(env, "android/graphics/Rect");
+ gRectClassInfo.set = GetMethodIDOrDie(env, clazz, "set", "(IIII)V");
+ gRectClassInfo.left = GetFieldIDOrDie(env, clazz, "left", "I");
+ gRectClassInfo.top = GetFieldIDOrDie(env, clazz, "top", "I");
+ gRectClassInfo.right = GetFieldIDOrDie(env, clazz, "right", "I");
+ gRectClassInfo.bottom = GetFieldIDOrDie(env, clazz, "bottom", "I");
+
+ clazz = FindClassOrDie(env, "android/graphics/Canvas");
+ gCanvasClassInfo.mSurfaceFormat = GetFieldIDOrDie(env, clazz, "mSurfaceFormat", "I");
+ gCanvasClassInfo.setNativeBitmap = GetMethodIDOrDie(env, clazz, "setNativeBitmap", "(J)V");
+
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
};
diff --git a/core/jni/android_view_HardwareLayer.cpp b/core/jni/android_view_HardwareLayer.cpp
index 1ffff03..cefb3da 100644
--- a/core/jni/android_view_HardwareLayer.cpp
+++ b/core/jni/android_view_HardwareLayer.cpp
@@ -20,7 +20,7 @@
#include "GraphicsJNI.h"
#include <nativehelper/JNIHelp.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <android_runtime/android_graphics_SurfaceTexture.h>
#include <gui/GLConsumer.h>
@@ -110,7 +110,7 @@ static JNINativeMethod gMethods[] = {
};
int register_android_view_HardwareLayer(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
};
diff --git a/core/jni/android_view_InputChannel.cpp b/core/jni/android_view_InputChannel.cpp
index d667920..4b42ab5 100644
--- a/core/jni/android_view_InputChannel.cpp
+++ b/core/jni/android_view_InputChannel.cpp
@@ -26,6 +26,8 @@
#include "android_os_Parcel.h"
#include "android_util_Binder.h"
+#include "core_jni_helpers.h"
+
namespace android {
// ----------------------------------------------------------------------------
@@ -275,33 +277,19 @@ static JNINativeMethod gInputChannelMethods[] = {
(void*)android_view_InputChannel_nativeDup },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className); \
- var = jclass(env->NewGlobalRef(var));
-
-#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
int register_android_view_InputChannel(JNIEnv* env) {
- int res = jniRegisterNativeMethods(env, "android/view/InputChannel",
- gInputChannelMethods, NELEM(gInputChannelMethods));
- LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+ int res = RegisterMethodsOrDie(env, "android/view/InputChannel", gInputChannelMethods,
+ NELEM(gInputChannelMethods));
+
+ jclass clazz = FindClassOrDie(env, "android/view/InputChannel");
+ gInputChannelClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
- FIND_CLASS(gInputChannelClassInfo.clazz, "android/view/InputChannel");
+ gInputChannelClassInfo.mPtr = GetFieldIDOrDie(env, gInputChannelClassInfo.clazz, "mPtr", "J");
- GET_FIELD_ID(gInputChannelClassInfo.mPtr, gInputChannelClassInfo.clazz,
- "mPtr", "J");
-
- GET_METHOD_ID(gInputChannelClassInfo.ctor, gInputChannelClassInfo.clazz,
- "<init>", "()V");
+ gInputChannelClassInfo.ctor = GetMethodIDOrDie(env, gInputChannelClassInfo.clazz, "<init>",
+ "()V");
- return 0;
+ return res;
}
} // namespace android
diff --git a/core/jni/android_view_InputDevice.cpp b/core/jni/android_view_InputDevice.cpp
index bef0f84..2323f43 100644
--- a/core/jni/android_view_InputDevice.cpp
+++ b/core/jni/android_view_InputDevice.cpp
@@ -25,6 +25,8 @@
#include "android_view_InputDevice.h"
#include "android_view_KeyCharacterMap.h"
+#include "core_jni_helpers.h"
+
namespace android {
static struct {
@@ -77,24 +79,15 @@ jobject android_view_InputDevice_create(JNIEnv* env, const InputDeviceInfo& devi
}
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-
int register_android_view_InputDevice(JNIEnv* env)
{
- FIND_CLASS(gInputDeviceClassInfo.clazz, "android/view/InputDevice");
- gInputDeviceClassInfo.clazz = jclass(env->NewGlobalRef(gInputDeviceClassInfo.clazz));
+ gInputDeviceClassInfo.clazz = FindClassOrDie(env, "android/view/InputDevice");
+ gInputDeviceClassInfo.clazz = MakeGlobalRefOrDie(env, gInputDeviceClassInfo.clazz);
- GET_METHOD_ID(gInputDeviceClassInfo.ctor, gInputDeviceClassInfo.clazz,
- "<init>",
+ gInputDeviceClassInfo.ctor = GetMethodIDOrDie(env, gInputDeviceClassInfo.clazz, "<init>",
"(IIILjava/lang/String;IILjava/lang/String;ZIILandroid/view/KeyCharacterMap;ZZ)V");
- GET_METHOD_ID(gInputDeviceClassInfo.addMotionRange, gInputDeviceClassInfo.clazz,
+ gInputDeviceClassInfo.addMotionRange = GetMethodIDOrDie(env, gInputDeviceClassInfo.clazz,
"addMotionRange", "(IIFFFFF)V");
return 0;
diff --git a/core/jni/android_view_InputEventReceiver.cpp b/core/jni/android_view_InputEventReceiver.cpp
index f36bf31..43b8471 100644
--- a/core/jni/android_view_InputEventReceiver.cpp
+++ b/core/jni/android_view_InputEventReceiver.cpp
@@ -18,10 +18,6 @@
//#define LOG_NDEBUG 0
-// Log debug messages about the dispatch cycle.
-#define DEBUG_DISPATCH_CYCLE 0
-
-
#include "JNIHelp.h"
#include <android_runtime/AndroidRuntime.h>
@@ -37,8 +33,12 @@
#include <ScopedLocalRef.h>
+#include "core_jni_helpers.h"
+
namespace android {
+static const bool kDebugDispatchCycle = false;
+
static struct {
jclass clazz;
@@ -92,9 +92,9 @@ NativeInputEventReceiver::NativeInputEventReceiver(JNIEnv* env,
mReceiverWeakGlobal(env->NewGlobalRef(receiverWeak)),
mInputConsumer(inputChannel), mMessageQueue(messageQueue),
mBatchedInputEventPending(false), mFdEvents(0) {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Initializing input event receiver.", getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Initializing input event receiver.", getInputChannelName());
+ }
}
NativeInputEventReceiver::~NativeInputEventReceiver() {
@@ -108,25 +108,25 @@ status_t NativeInputEventReceiver::initialize() {
}
void NativeInputEventReceiver::dispose() {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Disposing input event receiver.", getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Disposing input event receiver.", getInputChannelName());
+ }
setFdEvents(0);
}
status_t NativeInputEventReceiver::finishInputEvent(uint32_t seq, bool handled) {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Finished input event.", getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Finished input event.", getInputChannelName());
+ }
status_t status = mInputConsumer.sendFinishedSignal(seq, handled);
if (status) {
if (status == WOULD_BLOCK) {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Could not send finished signal immediately. "
- "Enqueued for later.", getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Could not send finished signal immediately. "
+ "Enqueued for later.", getInputChannelName());
+ }
Finish finish;
finish.seq = seq;
finish.handled = handled;
@@ -156,13 +156,13 @@ void NativeInputEventReceiver::setFdEvents(int events) {
int NativeInputEventReceiver::handleEvent(int receiveFd, int events, void* data) {
if (events & (ALOOPER_EVENT_ERROR | ALOOPER_EVENT_HANGUP)) {
-#if DEBUG_DISPATCH_CYCLE
// This error typically occurs when the publisher has closed the input channel
// as part of removing a window or finishing an IME session, in which case
// the consumer will soon be disposed as well.
- ALOGD("channel '%s' ~ Publisher closed input channel or an error occurred. "
- "events=0x%x", getInputChannelName(), events);
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Publisher closed input channel or an error occurred. "
+ "events=0x%x", getInputChannelName(), events);
+ }
return 0; // remove the callback
}
@@ -181,10 +181,10 @@ int NativeInputEventReceiver::handleEvent(int receiveFd, int events, void* data)
mFinishQueue.removeItemsAt(0, i);
if (status == WOULD_BLOCK) {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Sent %u queued finish events; %u left.",
- getInputChannelName(), i, mFinishQueue.size());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Sent %zu queued finish events; %zu left.",
+ getInputChannelName(), i, mFinishQueue.size());
+ }
return 1; // keep the callback, try again later
}
@@ -200,10 +200,10 @@ int NativeInputEventReceiver::handleEvent(int receiveFd, int events, void* data)
return 0; // remove the callback
}
}
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Sent %u queued finish events; none left.",
- getInputChannelName(), mFinishQueue.size());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Sent %zu queued finish events; none left.",
+ getInputChannelName(), mFinishQueue.size());
+ }
mFinishQueue.clear();
setFdEvents(ALOOPER_EVENT_INPUT);
return 1;
@@ -216,10 +216,10 @@ int NativeInputEventReceiver::handleEvent(int receiveFd, int events, void* data)
status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env,
bool consumeBatches, nsecs_t frameTime, bool* outConsumedBatch) {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Consuming input events, consumeBatches=%s, frameTime=%lld.",
- getInputChannelName(), consumeBatches ? "true" : "false", frameTime);
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Consuming input events, consumeBatches=%s, frameTime=%lld.",
+ getInputChannelName(), consumeBatches ? "true" : "false", (long long)frameTime);
+ }
if (consumeBatches) {
mBatchedInputEventPending = false;
@@ -250,10 +250,10 @@ status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env,
}
mBatchedInputEventPending = true;
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Dispatching batched input event pending notification.",
- getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Dispatching batched input event pending notification.",
+ getInputChannelName());
+ }
env->CallVoidMethod(receiverObj.get(),
gInputEventReceiverClassInfo.dispatchBatchedInputEventPending);
if (env->ExceptionCheck()) {
@@ -282,17 +282,17 @@ status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env,
jobject inputEventObj;
switch (inputEvent->getType()) {
case AINPUT_EVENT_TYPE_KEY:
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Received key event.", getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Received key event.", getInputChannelName());
+ }
inputEventObj = android_view_KeyEvent_fromNative(env,
static_cast<KeyEvent*>(inputEvent));
break;
case AINPUT_EVENT_TYPE_MOTION: {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Received motion event.", getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Received motion event.", getInputChannelName());
+ }
MotionEvent* motionEvent = static_cast<MotionEvent*>(inputEvent);
if ((motionEvent->getAction() & AMOTION_EVENT_ACTION_MOVE) && outConsumedBatch) {
*outConsumedBatch = true;
@@ -307,9 +307,9 @@ status_t NativeInputEventReceiver::consumeEvents(JNIEnv* env,
}
if (inputEventObj) {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Dispatching input event.", getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Dispatching input event.", getInputChannelName());
+ }
env->CallVoidMethod(receiverObj.get(),
gInputEventReceiverClassInfo.dispatchInputEvent, seq, inputEventObj);
if (env->ExceptionCheck()) {
@@ -408,29 +408,20 @@ static JNINativeMethod gMethods[] = {
(void*)nativeConsumeBatchedInputEvents },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className); \
- var = jclass(env->NewGlobalRef(var));
-
-#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-
int register_android_view_InputEventReceiver(JNIEnv* env) {
- int res = jniRegisterNativeMethods(env, "android/view/InputEventReceiver",
+ int res = RegisterMethodsOrDie(env, "android/view/InputEventReceiver",
gMethods, NELEM(gMethods));
- LOG_FATAL_IF(res < 0, "Unable to register native methods.");
- FIND_CLASS(gInputEventReceiverClassInfo.clazz, "android/view/InputEventReceiver");
+ jclass clazz = FindClassOrDie(env, "android/view/InputEventReceiver");
+ gInputEventReceiverClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
- GET_METHOD_ID(gInputEventReceiverClassInfo.dispatchInputEvent,
+ gInputEventReceiverClassInfo.dispatchInputEvent = GetMethodIDOrDie(env,
gInputEventReceiverClassInfo.clazz,
"dispatchInputEvent", "(ILandroid/view/InputEvent;)V");
- GET_METHOD_ID(gInputEventReceiverClassInfo.dispatchBatchedInputEventPending,
- gInputEventReceiverClassInfo.clazz,
- "dispatchBatchedInputEventPending", "()V");
- return 0;
+ gInputEventReceiverClassInfo.dispatchBatchedInputEventPending = GetMethodIDOrDie(env,
+ gInputEventReceiverClassInfo.clazz, "dispatchBatchedInputEventPending", "()V");
+
+ return res;
}
} // namespace android
diff --git a/core/jni/android_view_InputEventSender.cpp b/core/jni/android_view_InputEventSender.cpp
index f156b9a..265daeb 100644
--- a/core/jni/android_view_InputEventSender.cpp
+++ b/core/jni/android_view_InputEventSender.cpp
@@ -18,10 +18,6 @@
//#define LOG_NDEBUG 0
-// Log debug messages about the dispatch cycle.
-#define DEBUG_DISPATCH_CYCLE 0
-
-
#include "JNIHelp.h"
#include <android_runtime/AndroidRuntime.h>
@@ -37,8 +33,13 @@
#include <ScopedLocalRef.h>
+#include "core_jni_helpers.h"
+
namespace android {
+// Log debug messages about the dispatch cycle.
+static const bool kDebugDispatchCycle = false;
+
static struct {
jclass clazz;
@@ -82,9 +83,9 @@ NativeInputEventSender::NativeInputEventSender(JNIEnv* env,
mSenderWeakGlobal(env->NewGlobalRef(senderWeak)),
mInputPublisher(inputChannel), mMessageQueue(messageQueue),
mNextPublishedSeq(1) {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Initializing input event sender.", getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Initializing input event sender.", getInputChannelName());
+ }
}
NativeInputEventSender::~NativeInputEventSender() {
@@ -99,17 +100,17 @@ status_t NativeInputEventSender::initialize() {
}
void NativeInputEventSender::dispose() {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Disposing input event sender.", getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Disposing input event sender.", getInputChannelName());
+ }
mMessageQueue->getLooper()->removeFd(mInputPublisher.getChannel()->getFd());
}
status_t NativeInputEventSender::sendKeyEvent(uint32_t seq, const KeyEvent* event) {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Sending key event, seq=%u.", getInputChannelName(), seq);
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Sending key event, seq=%u.", getInputChannelName(), seq);
+ }
uint32_t publishedSeq = mNextPublishedSeq++;
status_t status = mInputPublisher.publishKeyEvent(publishedSeq,
@@ -126,9 +127,9 @@ status_t NativeInputEventSender::sendKeyEvent(uint32_t seq, const KeyEvent* even
}
status_t NativeInputEventSender::sendMotionEvent(uint32_t seq, const MotionEvent* event) {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Sending motion event, seq=%u.", getInputChannelName(), seq);
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Sending motion event, seq=%u.", getInputChannelName(), seq);
+ }
uint32_t publishedSeq;
for (size_t i = 0; i <= event->getHistorySize(); i++) {
@@ -153,13 +154,14 @@ status_t NativeInputEventSender::sendMotionEvent(uint32_t seq, const MotionEvent
int NativeInputEventSender::handleEvent(int receiveFd, int events, void* data) {
if (events & (ALOOPER_EVENT_ERROR | ALOOPER_EVENT_HANGUP)) {
-#if DEBUG_DISPATCH_CYCLE
// This error typically occurs when the consumer has closed the input channel
// as part of finishing an IME session, in which case the publisher will
// soon be disposed as well.
- ALOGD("channel '%s' ~ Consumer closed input channel or an error occurred. "
- "events=0x%x", getInputChannelName(), events);
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Consumer closed input channel or an error occurred. "
+ "events=0x%x", getInputChannelName(), events);
+ }
+
return 0; // remove the callback
}
@@ -176,9 +178,9 @@ int NativeInputEventSender::handleEvent(int receiveFd, int events, void* data) {
}
status_t NativeInputEventSender::receiveFinishedSignals(JNIEnv* env) {
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Receiving finished signals.", getInputChannelName());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Receiving finished signals.", getInputChannelName());
+ }
ScopedLocalRef<jobject> senderObj(env, NULL);
bool skipCallbacks = false;
@@ -200,12 +202,12 @@ status_t NativeInputEventSender::receiveFinishedSignals(JNIEnv* env) {
uint32_t seq = mPublishedSeqMap.valueAt(index);
mPublishedSeqMap.removeItemsAt(index);
-#if DEBUG_DISPATCH_CYCLE
- ALOGD("channel '%s' ~ Received finished signal, seq=%u, handled=%s, "
- "pendingEvents=%u.",
- getInputChannelName(), seq, handled ? "true" : "false",
- mPublishedSeqMap.size());
-#endif
+ if (kDebugDispatchCycle) {
+ ALOGD("channel '%s' ~ Received finished signal, seq=%u, handled=%s, "
+ "pendingEvents=%zu.",
+ getInputChannelName(), seq, handled ? "true" : "false",
+ mPublishedSeqMap.size());
+ }
if (!skipCallbacks) {
if (!senderObj.get()) {
@@ -299,26 +301,16 @@ static JNINativeMethod gMethods[] = {
(void*)nativeSendMotionEvent },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className); \
- var = jclass(env->NewGlobalRef(var));
-
-#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-
int register_android_view_InputEventSender(JNIEnv* env) {
- int res = jniRegisterNativeMethods(env, "android/view/InputEventSender",
- gMethods, NELEM(gMethods));
- LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+ int res = RegisterMethodsOrDie(env, "android/view/InputEventSender", gMethods, NELEM(gMethods));
+
+ jclass clazz = FindClassOrDie(env, "android/view/InputEventSender");
+ gInputEventSenderClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
- FIND_CLASS(gInputEventSenderClassInfo.clazz, "android/view/InputEventSender");
+ gInputEventSenderClassInfo.dispatchInputEventFinished = GetMethodIDOrDie(
+ env, gInputEventSenderClassInfo.clazz, "dispatchInputEventFinished", "(IZ)V");
- GET_METHOD_ID(gInputEventSenderClassInfo.dispatchInputEventFinished,
- gInputEventSenderClassInfo.clazz,
- "dispatchInputEventFinished", "(IZ)V");
- return 0;
+ return res;
}
} // namespace android
diff --git a/core/jni/android_view_InputQueue.cpp b/core/jni/android_view_InputQueue.cpp
index 21b73b1..96ccdee 100644
--- a/core/jni/android_view_InputQueue.cpp
+++ b/core/jni/android_view_InputQueue.cpp
@@ -33,6 +33,8 @@
#include "android_view_KeyEvent.h"
#include "android_view_MotionEvent.h"
+#include "core_jni_helpers.h"
+
namespace android {
static struct {
@@ -256,27 +258,13 @@ static const JNINativeMethod g_methods[] = {
static const char* const kInputQueuePathName = "android/view/InputQueue";
-#define FIND_CLASS(var, className) \
- do { \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class %s", className); \
- } while(0)
-
-#define GET_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
- do { \
- var = env->GetMethodID(clazz, methodName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method" methodName); \
- } while(0)
-
int register_android_view_InputQueue(JNIEnv* env)
{
- jclass clazz;
- FIND_CLASS(clazz, kInputQueuePathName);
- GET_METHOD_ID(gInputQueueClassInfo.finishInputEvent, clazz, "finishInputEvent", "(JZ)V");
+ jclass clazz = FindClassOrDie(env, kInputQueuePathName);
+ gInputQueueClassInfo.finishInputEvent = GetMethodIDOrDie(env, clazz, "finishInputEvent",
+ "(JZ)V");
- return AndroidRuntime::registerNativeMethods(
- env, kInputQueuePathName,
- g_methods, NELEM(g_methods));
+ return RegisterMethodsOrDie(env, kInputQueuePathName, g_methods, NELEM(g_methods));
}
} // namespace android
diff --git a/core/jni/android_view_KeyCharacterMap.cpp b/core/jni/android_view_KeyCharacterMap.cpp
index 62d5129..7653f58 100644
--- a/core/jni/android_view_KeyCharacterMap.cpp
+++ b/core/jni/android_view_KeyCharacterMap.cpp
@@ -26,6 +26,8 @@
#include "android_os_Parcel.h"
#include "android_view_KeyEvent.h"
+#include "core_jni_helpers.h"
+
namespace android {
static struct {
@@ -148,7 +150,9 @@ static jchar nativeGetMatch(JNIEnv *env, jobject clazz, jlong ptr, jint keyCode,
return 0;
}
- char16_t result = map->getMap()->getMatch(keyCode, chars, size_t(numChars), metaState);
+ char16_t result = map->getMap()->getMatch(
+ keyCode, reinterpret_cast<char16_t*>(chars), size_t(numChars),
+ metaState);
env->ReleasePrimitiveArrayCritical(charsArray, chars, JNI_ABORT);
return result;
@@ -176,7 +180,9 @@ static jobjectArray nativeGetEvents(JNIEnv *env, jobject clazz, jlong ptr,
Vector<KeyEvent> events;
jobjectArray result = NULL;
- if (map->getMap()->getEvents(map->getDeviceId(), chars, size_t(numChars), events)) {
+ if (map->getMap()->getEvents(map->getDeviceId(),
+ reinterpret_cast<char16_t*>(chars),
+ size_t(numChars), events)) {
result = env->NewObjectArray(jsize(events.size()), gKeyEventClassInfo.clazz, NULL);
if (result) {
for (size_t i = 0; i < events.size(); i++) {
@@ -221,40 +227,23 @@ static JNINativeMethod g_methods[] = {
(void*)nativeGetEvents },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
int register_android_view_KeyCharacterMap(JNIEnv* env)
{
- FIND_CLASS(gKeyCharacterMapClassInfo.clazz, "android/view/KeyCharacterMap");
- gKeyCharacterMapClassInfo.clazz = jclass(env->NewGlobalRef(gKeyCharacterMapClassInfo.clazz));
+ gKeyCharacterMapClassInfo.clazz = FindClassOrDie(env, "android/view/KeyCharacterMap");
+ gKeyCharacterMapClassInfo.clazz = MakeGlobalRefOrDie(env, gKeyCharacterMapClassInfo.clazz);
- GET_METHOD_ID(gKeyCharacterMapClassInfo.ctor, gKeyCharacterMapClassInfo.clazz,
+ gKeyCharacterMapClassInfo.ctor = GetMethodIDOrDie(env, gKeyCharacterMapClassInfo.clazz,
"<init>", "(J)V");
- FIND_CLASS(gKeyEventClassInfo.clazz, "android/view/KeyEvent");
- gKeyEventClassInfo.clazz = jclass(env->NewGlobalRef(gKeyEventClassInfo.clazz));
-
- jclass clazz;
- FIND_CLASS(clazz, "android/view/KeyCharacterMap$FallbackAction");
+ gKeyEventClassInfo.clazz = FindClassOrDie(env, "android/view/KeyEvent");
+ gKeyEventClassInfo.clazz = MakeGlobalRefOrDie(env, gKeyEventClassInfo.clazz);
- GET_FIELD_ID(gFallbackActionClassInfo.keyCode, clazz,
- "keyCode", "I");
+ jclass clazz = FindClassOrDie(env, "android/view/KeyCharacterMap$FallbackAction");
- GET_FIELD_ID(gFallbackActionClassInfo.metaState, clazz,
- "metaState", "I");
+ gFallbackActionClassInfo.keyCode = GetFieldIDOrDie(env, clazz, "keyCode", "I");
+ gFallbackActionClassInfo.metaState = GetFieldIDOrDie(env, clazz, "metaState", "I");
- return AndroidRuntime::registerNativeMethods(env,
- "android/view/KeyCharacterMap", g_methods, NELEM(g_methods));
+ return RegisterMethodsOrDie(env, "android/view/KeyCharacterMap", g_methods, NELEM(g_methods));
}
}; // namespace android
diff --git a/core/jni/android_view_KeyEvent.cpp b/core/jni/android_view_KeyEvent.cpp
index 7ae21a7..216e6f6 100644
--- a/core/jni/android_view_KeyEvent.cpp
+++ b/core/jni/android_view_KeyEvent.cpp
@@ -25,6 +25,8 @@
#include <ScopedUtfChars.h>
#include "android_view_KeyEvent.h"
+#include "core_jni_helpers.h"
+
namespace android {
// ----------------------------------------------------------------------------
@@ -124,56 +126,32 @@ static const JNINativeMethod g_methods[] = {
(void*)android_view_KeyEvent_nativeKeyCodeFromString},
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className); \
- var = jclass(env->NewGlobalRef(var));
-
-#define GET_STATIC_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
- var = env->GetStaticMethodID(clazz, methodName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find static method" methodName);
-
-#define GET_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
- var = env->GetMethodID(clazz, methodName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method" methodName);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
int register_android_view_KeyEvent(JNIEnv* env) {
- FIND_CLASS(gKeyEventClassInfo.clazz, "android/view/KeyEvent");
+ jclass clazz = FindClassOrDie(env, "android/view/KeyEvent");
+ gKeyEventClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
- GET_STATIC_METHOD_ID(gKeyEventClassInfo.obtain, gKeyEventClassInfo.clazz,
+ gKeyEventClassInfo.obtain = GetStaticMethodIDOrDie(env, gKeyEventClassInfo.clazz,
"obtain", "(JJIIIIIIIILjava/lang/String;)Landroid/view/KeyEvent;");
- GET_METHOD_ID(gKeyEventClassInfo.recycle, gKeyEventClassInfo.clazz,
+ gKeyEventClassInfo.recycle = GetMethodIDOrDie(env, gKeyEventClassInfo.clazz,
"recycle", "()V");
- GET_FIELD_ID(gKeyEventClassInfo.mDeviceId, gKeyEventClassInfo.clazz,
- "mDeviceId", "I");
- GET_FIELD_ID(gKeyEventClassInfo.mSource, gKeyEventClassInfo.clazz,
- "mSource", "I");
- GET_FIELD_ID(gKeyEventClassInfo.mMetaState, gKeyEventClassInfo.clazz,
- "mMetaState", "I");
- GET_FIELD_ID(gKeyEventClassInfo.mAction, gKeyEventClassInfo.clazz,
- "mAction", "I");
- GET_FIELD_ID(gKeyEventClassInfo.mKeyCode, gKeyEventClassInfo.clazz,
- "mKeyCode", "I");
- GET_FIELD_ID(gKeyEventClassInfo.mScanCode, gKeyEventClassInfo.clazz,
- "mScanCode", "I");
- GET_FIELD_ID(gKeyEventClassInfo.mRepeatCount, gKeyEventClassInfo.clazz,
- "mRepeatCount", "I");
- GET_FIELD_ID(gKeyEventClassInfo.mFlags, gKeyEventClassInfo.clazz,
- "mFlags", "I");
- GET_FIELD_ID(gKeyEventClassInfo.mDownTime, gKeyEventClassInfo.clazz,
- "mDownTime", "J");
- GET_FIELD_ID(gKeyEventClassInfo.mEventTime, gKeyEventClassInfo.clazz,
- "mEventTime", "J");
- GET_FIELD_ID(gKeyEventClassInfo.mCharacters, gKeyEventClassInfo.clazz,
- "mCharacters", "Ljava/lang/String;");
-
- return AndroidRuntime::registerNativeMethods(
- env, "android/view/KeyEvent", g_methods, NELEM(g_methods));
+ gKeyEventClassInfo.mDeviceId = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mDeviceId", "I");
+ gKeyEventClassInfo.mSource = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mSource", "I");
+ gKeyEventClassInfo.mMetaState = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mMetaState",
+ "I");
+ gKeyEventClassInfo.mAction = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mAction", "I");
+ gKeyEventClassInfo.mKeyCode = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mKeyCode", "I");
+ gKeyEventClassInfo.mScanCode = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mScanCode", "I");
+ gKeyEventClassInfo.mRepeatCount = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mRepeatCount",
+ "I");
+ gKeyEventClassInfo.mFlags = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mFlags", "I");
+ gKeyEventClassInfo.mDownTime = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mDownTime", "J");
+ gKeyEventClassInfo.mEventTime = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mEventTime",
+ "J");
+ gKeyEventClassInfo.mCharacters = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mCharacters",
+ "Ljava/lang/String;");
+
+ return RegisterMethodsOrDie(env, "android/view/KeyEvent", g_methods, NELEM(g_methods));
}
} // namespace android
diff --git a/core/jni/android_view_MotionEvent.cpp b/core/jni/android_view_MotionEvent.cpp
index a590dbf..e622768 100644
--- a/core/jni/android_view_MotionEvent.cpp
+++ b/core/jni/android_view_MotionEvent.cpp
@@ -29,6 +29,8 @@
#include "android_util_Binder.h"
#include "android/graphics/Matrix.h"
+#include "core_jni_helpers.h"
+
namespace android {
// ----------------------------------------------------------------------------
@@ -296,7 +298,6 @@ static void pointerCoordsFromNative(JNIEnv* env, const PointerCoords* rawPointer
jfloat* outValues = static_cast<jfloat*>(env->GetPrimitiveArrayCritical(
outValuesArray, NULL));
- const float* values = rawPointerCoords->values;
uint32_t index = 0;
do {
uint32_t axis = bits.clearFirstMarkedBit();
@@ -853,71 +854,41 @@ static JNINativeMethod gMotionEventMethods[] = {
(void*)android_view_MotionEvent_nativeAxisFromString },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_STATIC_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
- var = env->GetStaticMethodID(clazz, methodName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find static method" methodName);
-
-#define GET_METHOD_ID(var, clazz, methodName, fieldDescriptor) \
- var = env->GetMethodID(clazz, methodName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method" methodName);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
int register_android_view_MotionEvent(JNIEnv* env) {
- int res = jniRegisterNativeMethods(env, "android/view/MotionEvent",
- gMotionEventMethods, NELEM(gMotionEventMethods));
- LOG_FATAL_IF(res < 0, "Unable to register native methods.");
+ int res = RegisterMethodsOrDie(env, "android/view/MotionEvent", gMotionEventMethods,
+ NELEM(gMotionEventMethods));
- FIND_CLASS(gMotionEventClassInfo.clazz, "android/view/MotionEvent");
- gMotionEventClassInfo.clazz = jclass(env->NewGlobalRef(gMotionEventClassInfo.clazz));
+ gMotionEventClassInfo.clazz = FindClassOrDie(env, "android/view/MotionEvent");
+ gMotionEventClassInfo.clazz = MakeGlobalRefOrDie(env, gMotionEventClassInfo.clazz);
- GET_STATIC_METHOD_ID(gMotionEventClassInfo.obtain, gMotionEventClassInfo.clazz,
+ gMotionEventClassInfo.obtain = GetStaticMethodIDOrDie(env, gMotionEventClassInfo.clazz,
"obtain", "()Landroid/view/MotionEvent;");
- GET_METHOD_ID(gMotionEventClassInfo.recycle, gMotionEventClassInfo.clazz,
+ gMotionEventClassInfo.recycle = GetMethodIDOrDie(env, gMotionEventClassInfo.clazz,
"recycle", "()V");
- GET_FIELD_ID(gMotionEventClassInfo.mNativePtr, gMotionEventClassInfo.clazz,
+ gMotionEventClassInfo.mNativePtr = GetFieldIDOrDie(env, gMotionEventClassInfo.clazz,
"mNativePtr", "J");
- jclass clazz;
- FIND_CLASS(clazz, "android/view/MotionEvent$PointerCoords");
-
- GET_FIELD_ID(gPointerCoordsClassInfo.mPackedAxisBits, clazz,
- "mPackedAxisBits", "J");
- GET_FIELD_ID(gPointerCoordsClassInfo.mPackedAxisValues, clazz,
- "mPackedAxisValues", "[F");
- GET_FIELD_ID(gPointerCoordsClassInfo.x, clazz,
- "x", "F");
- GET_FIELD_ID(gPointerCoordsClassInfo.y, clazz,
- "y", "F");
- GET_FIELD_ID(gPointerCoordsClassInfo.pressure, clazz,
- "pressure", "F");
- GET_FIELD_ID(gPointerCoordsClassInfo.size, clazz,
- "size", "F");
- GET_FIELD_ID(gPointerCoordsClassInfo.touchMajor, clazz,
- "touchMajor", "F");
- GET_FIELD_ID(gPointerCoordsClassInfo.touchMinor, clazz,
- "touchMinor", "F");
- GET_FIELD_ID(gPointerCoordsClassInfo.toolMajor, clazz,
- "toolMajor", "F");
- GET_FIELD_ID(gPointerCoordsClassInfo.toolMinor, clazz,
- "toolMinor", "F");
- GET_FIELD_ID(gPointerCoordsClassInfo.orientation, clazz,
- "orientation", "F");
-
- FIND_CLASS(clazz, "android/view/MotionEvent$PointerProperties");
-
- GET_FIELD_ID(gPointerPropertiesClassInfo.id, clazz,
- "id", "I");
- GET_FIELD_ID(gPointerPropertiesClassInfo.toolType, clazz,
- "toolType", "I");
+ jclass clazz = FindClassOrDie(env, "android/view/MotionEvent$PointerCoords");
- return 0;
+ gPointerCoordsClassInfo.mPackedAxisBits = GetFieldIDOrDie(env, clazz, "mPackedAxisBits", "J");
+ gPointerCoordsClassInfo.mPackedAxisValues = GetFieldIDOrDie(env, clazz, "mPackedAxisValues",
+ "[F");
+ gPointerCoordsClassInfo.x = GetFieldIDOrDie(env, clazz, "x", "F");
+ gPointerCoordsClassInfo.y = GetFieldIDOrDie(env, clazz, "y", "F");
+ gPointerCoordsClassInfo.pressure = GetFieldIDOrDie(env, clazz, "pressure", "F");
+ gPointerCoordsClassInfo.size = GetFieldIDOrDie(env, clazz, "size", "F");
+ gPointerCoordsClassInfo.touchMajor = GetFieldIDOrDie(env, clazz, "touchMajor", "F");
+ gPointerCoordsClassInfo.touchMinor = GetFieldIDOrDie(env, clazz, "touchMinor", "F");
+ gPointerCoordsClassInfo.toolMajor = GetFieldIDOrDie(env, clazz, "toolMajor", "F");
+ gPointerCoordsClassInfo.toolMinor = GetFieldIDOrDie(env, clazz, "toolMinor", "F");
+ gPointerCoordsClassInfo.orientation = GetFieldIDOrDie(env, clazz, "orientation", "F");
+
+ clazz = FindClassOrDie(env, "android/view/MotionEvent$PointerProperties");
+
+ gPointerPropertiesClassInfo.id = GetFieldIDOrDie(env, clazz, "id", "I");
+ gPointerPropertiesClassInfo.toolType = GetFieldIDOrDie(env, clazz, "toolType", "I");
+
+ return res;
}
} // namespace android
diff --git a/core/jni/android_view_PointerIcon.cpp b/core/jni/android_view_PointerIcon.cpp
index 5e29213..bbd031e 100644
--- a/core/jni/android_view_PointerIcon.cpp
+++ b/core/jni/android_view_PointerIcon.cpp
@@ -25,6 +25,8 @@
#include <utils/Log.h>
#include <android/graphics/GraphicsJNI.h>
+#include "core_jni_helpers.h"
+
namespace android {
static struct {
@@ -106,42 +108,26 @@ status_t android_view_PointerIcon_loadSystemIcon(JNIEnv* env, jobject contextObj
// --- JNI Registration ---
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className); \
- var = jclass(env->NewGlobalRef(var));
-
-#define GET_STATIC_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetStaticMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-
-#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
-
int register_android_view_PointerIcon(JNIEnv* env) {
- FIND_CLASS(gPointerIconClassInfo.clazz, "android/view/PointerIcon");
+ jclass clazz = FindClassOrDie(env, "android/view/PointerIcon");
+ gPointerIconClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
- GET_FIELD_ID(gPointerIconClassInfo.mBitmap, gPointerIconClassInfo.clazz,
+ gPointerIconClassInfo.mBitmap = GetFieldIDOrDie(env, gPointerIconClassInfo.clazz,
"mBitmap", "Landroid/graphics/Bitmap;");
- GET_FIELD_ID(gPointerIconClassInfo.mStyle, gPointerIconClassInfo.clazz,
+ gPointerIconClassInfo.mStyle = GetFieldIDOrDie(env, gPointerIconClassInfo.clazz,
"mStyle", "I");
- GET_FIELD_ID(gPointerIconClassInfo.mHotSpotX, gPointerIconClassInfo.clazz,
+ gPointerIconClassInfo.mHotSpotX = GetFieldIDOrDie(env, gPointerIconClassInfo.clazz,
"mHotSpotX", "F");
- GET_FIELD_ID(gPointerIconClassInfo.mHotSpotY, gPointerIconClassInfo.clazz,
+ gPointerIconClassInfo.mHotSpotY = GetFieldIDOrDie(env, gPointerIconClassInfo.clazz,
"mHotSpotY", "F");
- GET_STATIC_METHOD_ID(gPointerIconClassInfo.getSystemIcon, gPointerIconClassInfo.clazz,
+ gPointerIconClassInfo.getSystemIcon = GetStaticMethodIDOrDie(env, gPointerIconClassInfo.clazz,
"getSystemIcon", "(Landroid/content/Context;I)Landroid/view/PointerIcon;");
- GET_METHOD_ID(gPointerIconClassInfo.load, gPointerIconClassInfo.clazz,
+ gPointerIconClassInfo.load = GetMethodIDOrDie(env, gPointerIconClassInfo.clazz,
"load", "(Landroid/content/Context;)Landroid/view/PointerIcon;");
return 0;
diff --git a/core/jni/android_view_RenderNode.cpp b/core/jni/android_view_RenderNode.cpp
index 621df72..a1d3bc6 100644
--- a/core/jni/android_view_RenderNode.cpp
+++ b/core/jni/android_view_RenderNode.cpp
@@ -28,6 +28,8 @@
#include <RenderNode.h>
#include <Paint.h>
+#include "core_jni_helpers.h"
+
namespace android {
using namespace uirenderer;
@@ -551,21 +553,8 @@ static JNINativeMethod gMethods[] = {
#endif
};
-#ifdef USE_OPENGL_RENDERER
- #define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
- #define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-#else
- #define FIND_CLASS(var, className)
- #define GET_METHOD_ID(var, clazz, methodName, methodDescriptor)
-#endif
-
int register_android_view_RenderNode(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
};
diff --git a/core/jni/android_view_RenderNodeAnimator.cpp b/core/jni/android_view_RenderNodeAnimator.cpp
index eb56639..0978ebb 100644
--- a/core/jni/android_view_RenderNodeAnimator.cpp
+++ b/core/jni/android_view_RenderNodeAnimator.cpp
@@ -25,6 +25,8 @@
#include <Interpolator.h>
#include <RenderProperties.h>
+#include "core_jni_helpers.h"
+
namespace android {
using namespace uirenderer;
@@ -161,11 +163,6 @@ static void setStartDelay(JNIEnv* env, jobject clazz, jlong animatorPtr, jlong s
animator->setStartDelay(startDelay);
}
-static jlong getStartDelay(JNIEnv* env, jobject clazz, jlong animatorPtr) {
- BaseRenderNodeAnimator* animator = reinterpret_cast<BaseRenderNodeAnimator*>(animatorPtr);
- return static_cast<jlong>(animator->startDelay());
-}
-
static void setInterpolator(JNIEnv* env, jobject clazz, jlong animatorPtr, jlong interpolatorPtr) {
BaseRenderNodeAnimator* animator = reinterpret_cast<BaseRenderNodeAnimator*>(animatorPtr);
Interpolator* interpolator = reinterpret_cast<Interpolator*>(interpolatorPtr);
@@ -218,25 +215,19 @@ static JNINativeMethod gMethods[] = {
#endif
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
-
-#define GET_STATIC_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetStaticMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find method " methodName);
-
int register_android_view_RenderNodeAnimator(JNIEnv* env) {
#ifdef USE_OPENGL_RENDERER
sLifecycleChecker.incStrong(0);
#endif
- FIND_CLASS(gRenderNodeAnimatorClassInfo.clazz, kClassPathName);
- gRenderNodeAnimatorClassInfo.clazz = jclass(env->NewGlobalRef(gRenderNodeAnimatorClassInfo.clazz));
+ gRenderNodeAnimatorClassInfo.clazz = FindClassOrDie(env, kClassPathName);
+ gRenderNodeAnimatorClassInfo.clazz = MakeGlobalRefOrDie(env,
+ gRenderNodeAnimatorClassInfo.clazz);
- GET_STATIC_METHOD_ID(gRenderNodeAnimatorClassInfo.callOnFinished, gRenderNodeAnimatorClassInfo.clazz,
- "callOnFinished", "(Landroid/view/RenderNodeAnimator;)V");
+ gRenderNodeAnimatorClassInfo.callOnFinished = GetStaticMethodIDOrDie(
+ env, gRenderNodeAnimatorClassInfo.clazz, "callOnFinished",
+ "(Landroid/view/RenderNodeAnimator;)V");
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index a39ff8e..7f6c50f 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -23,7 +23,7 @@
#include "android_os_Parcel.h"
#include "android/graphics/GraphicsJNI.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <android_runtime/android_view_Surface.h>
#include <android_runtime/android_graphics_SurfaceTexture.h>
#include <android_runtime/Log.h>
@@ -324,7 +324,7 @@ static jlong nativeReadFromParcel(JNIEnv* env, jclass clazz,
// update the Surface only if the underlying IGraphicBufferProducer
// has changed.
if (self != NULL
- && (self->getIGraphicBufferProducer()->asBinder() == binder)) {
+ && (IInterface::asBinder(self->getIGraphicBufferProducer()) == binder)) {
// same IGraphicBufferProducer, return ourselves
return jlong(self.get());
}
@@ -354,7 +354,7 @@ static void nativeWriteToParcel(JNIEnv* env, jclass clazz,
return;
}
sp<Surface> self(reinterpret_cast<Surface *>(nativeObject));
- parcel->writeStrongBinder( self != 0 ? self->getIGraphicBufferProducer()->asBinder() : NULL);
+ parcel->writeStrongBinder( self != 0 ? IInterface::asBinder(self->getIGraphicBufferProducer()) : NULL);
}
static jint nativeGetWidth(JNIEnv* env, jclass clazz, jlong nativeObject) {
@@ -454,26 +454,26 @@ static JNINativeMethod gSurfaceMethods[] = {
int register_android_view_Surface(JNIEnv* env)
{
- int err = AndroidRuntime::registerNativeMethods(env, "android/view/Surface",
+ int err = RegisterMethodsOrDie(env, "android/view/Surface",
gSurfaceMethods, NELEM(gSurfaceMethods));
- jclass clazz = env->FindClass("android/view/Surface");
- gSurfaceClassInfo.clazz = jclass(env->NewGlobalRef(clazz));
- gSurfaceClassInfo.mNativeObject =
- env->GetFieldID(gSurfaceClassInfo.clazz, "mNativeObject", "J");
- gSurfaceClassInfo.mLock =
- env->GetFieldID(gSurfaceClassInfo.clazz, "mLock", "Ljava/lang/Object;");
- gSurfaceClassInfo.ctor = env->GetMethodID(gSurfaceClassInfo.clazz, "<init>", "(J)V");
-
- clazz = env->FindClass("android/graphics/Canvas");
- gCanvasClassInfo.mSurfaceFormat = env->GetFieldID(clazz, "mSurfaceFormat", "I");
- gCanvasClassInfo.setNativeBitmap = env->GetMethodID(clazz, "setNativeBitmap", "(J)V");
-
- clazz = env->FindClass("android/graphics/Rect");
- gRectClassInfo.left = env->GetFieldID(clazz, "left", "I");
- gRectClassInfo.top = env->GetFieldID(clazz, "top", "I");
- gRectClassInfo.right = env->GetFieldID(clazz, "right", "I");
- gRectClassInfo.bottom = env->GetFieldID(clazz, "bottom", "I");
+ jclass clazz = FindClassOrDie(env, "android/view/Surface");
+ gSurfaceClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
+ gSurfaceClassInfo.mNativeObject = GetFieldIDOrDie(env,
+ gSurfaceClassInfo.clazz, "mNativeObject", "J");
+ gSurfaceClassInfo.mLock = GetFieldIDOrDie(env,
+ gSurfaceClassInfo.clazz, "mLock", "Ljava/lang/Object;");
+ gSurfaceClassInfo.ctor = GetMethodIDOrDie(env, gSurfaceClassInfo.clazz, "<init>", "(J)V");
+
+ clazz = FindClassOrDie(env, "android/graphics/Canvas");
+ gCanvasClassInfo.mSurfaceFormat = GetFieldIDOrDie(env, clazz, "mSurfaceFormat", "I");
+ gCanvasClassInfo.setNativeBitmap = GetMethodIDOrDie(env, clazz, "setNativeBitmap", "(J)V");
+
+ clazz = FindClassOrDie(env, "android/graphics/Rect");
+ gRectClassInfo.left = GetFieldIDOrDie(env, clazz, "left", "I");
+ gRectClassInfo.top = GetFieldIDOrDie(env, clazz, "top", "I");
+ gRectClassInfo.right = GetFieldIDOrDie(env, clazz, "right", "I");
+ gRectClassInfo.bottom = GetFieldIDOrDie(env, clazz, "bottom", "I");
return err;
}
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index 06c22ae..13c373f 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -26,7 +26,7 @@
#include "android/graphics/GraphicsJNI.h"
#include "android/graphics/Region.h"
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <android_runtime/android_view_Surface.h>
#include <android_runtime/android_view_SurfaceSession.h>
@@ -134,7 +134,7 @@ static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz,
status_t res;
if (allLayers) {
minLayer = 0;
- maxLayer = -1UL;
+ maxLayer = -1;
}
res = screenshot->update(displayToken, sourceCrop, width, height,
@@ -647,41 +647,44 @@ static JNINativeMethod sSurfaceControlMethods[] = {
int register_android_view_SurfaceControl(JNIEnv* env)
{
- int err = AndroidRuntime::registerNativeMethods(env, "android/view/SurfaceControl",
+ int err = RegisterMethodsOrDie(env, "android/view/SurfaceControl",
sSurfaceControlMethods, NELEM(sSurfaceControlMethods));
- jclass clazz = env->FindClass("android/view/SurfaceControl$PhysicalDisplayInfo");
- gPhysicalDisplayInfoClassInfo.clazz = static_cast<jclass>(env->NewGlobalRef(clazz));
- gPhysicalDisplayInfoClassInfo.ctor = env->GetMethodID(gPhysicalDisplayInfoClassInfo.clazz,
- "<init>", "()V");
- gPhysicalDisplayInfoClassInfo.width = env->GetFieldID(clazz, "width", "I");
- gPhysicalDisplayInfoClassInfo.height = env->GetFieldID(clazz, "height", "I");
- gPhysicalDisplayInfoClassInfo.refreshRate = env->GetFieldID(clazz, "refreshRate", "F");
- gPhysicalDisplayInfoClassInfo.density = env->GetFieldID(clazz, "density", "F");
- gPhysicalDisplayInfoClassInfo.xDpi = env->GetFieldID(clazz, "xDpi", "F");
- gPhysicalDisplayInfoClassInfo.yDpi = env->GetFieldID(clazz, "yDpi", "F");
- gPhysicalDisplayInfoClassInfo.secure = env->GetFieldID(clazz, "secure", "Z");
- gPhysicalDisplayInfoClassInfo.appVsyncOffsetNanos = env->GetFieldID(clazz,
- "appVsyncOffsetNanos", "J");
- gPhysicalDisplayInfoClassInfo.presentationDeadlineNanos = env->GetFieldID(clazz,
- "presentationDeadlineNanos", "J");
-
- jclass rectClazz = env->FindClass("android/graphics/Rect");
- gRectClassInfo.bottom = env->GetFieldID(rectClazz, "bottom", "I");
- gRectClassInfo.left = env->GetFieldID(rectClazz, "left", "I");
- gRectClassInfo.right = env->GetFieldID(rectClazz, "right", "I");
- gRectClassInfo.top = env->GetFieldID(rectClazz, "top", "I");
-
- jclass frameStatsClazz = env->FindClass("android/view/FrameStats");
- jfieldID undefined_time_nano_field = env->GetStaticFieldID(frameStatsClazz, "UNDEFINED_TIME_NANO", "J");
+ jclass clazz = FindClassOrDie(env, "android/view/SurfaceControl$PhysicalDisplayInfo");
+ gPhysicalDisplayInfoClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
+ gPhysicalDisplayInfoClassInfo.ctor = GetMethodIDOrDie(env,
+ gPhysicalDisplayInfoClassInfo.clazz, "<init>", "()V");
+ gPhysicalDisplayInfoClassInfo.width = GetFieldIDOrDie(env, clazz, "width", "I");
+ gPhysicalDisplayInfoClassInfo.height = GetFieldIDOrDie(env, clazz, "height", "I");
+ gPhysicalDisplayInfoClassInfo.refreshRate = GetFieldIDOrDie(env, clazz, "refreshRate", "F");
+ gPhysicalDisplayInfoClassInfo.density = GetFieldIDOrDie(env, clazz, "density", "F");
+ gPhysicalDisplayInfoClassInfo.xDpi = GetFieldIDOrDie(env, clazz, "xDpi", "F");
+ gPhysicalDisplayInfoClassInfo.yDpi = GetFieldIDOrDie(env, clazz, "yDpi", "F");
+ gPhysicalDisplayInfoClassInfo.secure = GetFieldIDOrDie(env, clazz, "secure", "Z");
+ gPhysicalDisplayInfoClassInfo.appVsyncOffsetNanos = GetFieldIDOrDie(env,
+ clazz, "appVsyncOffsetNanos", "J");
+ gPhysicalDisplayInfoClassInfo.presentationDeadlineNanos = GetFieldIDOrDie(env,
+ clazz, "presentationDeadlineNanos", "J");
+
+ jclass rectClazz = FindClassOrDie(env, "android/graphics/Rect");
+ gRectClassInfo.bottom = GetFieldIDOrDie(env, rectClazz, "bottom", "I");
+ gRectClassInfo.left = GetFieldIDOrDie(env, rectClazz, "left", "I");
+ gRectClassInfo.right = GetFieldIDOrDie(env, rectClazz, "right", "I");
+ gRectClassInfo.top = GetFieldIDOrDie(env, rectClazz, "top", "I");
+
+ jclass frameStatsClazz = FindClassOrDie(env, "android/view/FrameStats");
+ jfieldID undefined_time_nano_field = GetStaticFieldIDOrDie(env,
+ frameStatsClazz, "UNDEFINED_TIME_NANO", "J");
nsecs_t undefined_time_nano = env->GetStaticLongField(frameStatsClazz, undefined_time_nano_field);
- jclass contFrameStatsClazz = env->FindClass("android/view/WindowContentFrameStats");
- gWindowContentFrameStatsClassInfo.init = env->GetMethodID(contFrameStatsClazz, "init", "(J[J[J[J)V");
+ jclass contFrameStatsClazz = FindClassOrDie(env, "android/view/WindowContentFrameStats");
+ gWindowContentFrameStatsClassInfo.init = GetMethodIDOrDie(env,
+ contFrameStatsClazz, "init", "(J[J[J[J)V");
gWindowContentFrameStatsClassInfo.UNDEFINED_TIME_NANO = undefined_time_nano;
- jclass animFrameStatsClazz = env->FindClass("android/view/WindowAnimationFrameStats");
- gWindowAnimationFrameStatsClassInfo.init = env->GetMethodID(animFrameStatsClazz, "init", "(J[J)V");
+ jclass animFrameStatsClazz = FindClassOrDie(env, "android/view/WindowAnimationFrameStats");
+ gWindowAnimationFrameStatsClassInfo.init = GetMethodIDOrDie(env,
+ animFrameStatsClazz, "init", "(J[J)V");
gWindowAnimationFrameStatsClassInfo.UNDEFINED_TIME_NANO = undefined_time_nano;
return err;
diff --git a/core/jni/android_view_TextureView.cpp b/core/jni/android_view_TextureView.cpp
index 5c04a78..011c326 100644
--- a/core/jni/android_view_TextureView.cpp
+++ b/core/jni/android_view_TextureView.cpp
@@ -31,6 +31,8 @@
#include "android/graphics/GraphicsJNI.h"
+#include "core_jni_helpers.h"
+
namespace android {
// ----------------------------------------------------------------------------
@@ -212,35 +214,22 @@ static JNINativeMethod gMethods[] = {
(void*) android_view_TextureView_unlockCanvasAndPost },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(!var, "Unable to find class " className);
+int register_android_view_TextureView(JNIEnv* env) {
+ jclass clazz = FindClassOrDie(env, "android/graphics/Rect");
+ gRectClassInfo.set = GetMethodIDOrDie(env, clazz, "set", "(IIII)V");
+ gRectClassInfo.left = GetFieldIDOrDie(env, clazz, "left", "I");
+ gRectClassInfo.top = GetFieldIDOrDie(env, clazz, "top", "I");
+ gRectClassInfo.right = GetFieldIDOrDie(env, clazz, "right", "I");
+ gRectClassInfo.bottom = GetFieldIDOrDie(env, clazz, "bottom", "I");
-#define GET_METHOD_ID(var, clazz, methodName, methodDescriptor) \
- var = env->GetMethodID(clazz, methodName, methodDescriptor); \
- LOG_FATAL_IF(!var, "Unable to find method " methodName);
+ clazz = FindClassOrDie(env, "android/graphics/Canvas");
+ gCanvasClassInfo.mSurfaceFormat = GetFieldIDOrDie(env, clazz, "mSurfaceFormat", "I");
+ gCanvasClassInfo.setNativeBitmap = GetMethodIDOrDie(env, clazz, "setNativeBitmap", "(J)V");
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(!var, "Unable to find field" fieldName);
+ clazz = FindClassOrDie(env, "android/view/TextureView");
+ gTextureViewClassInfo.nativeWindow = GetFieldIDOrDie(env, clazz, "mNativeWindow", "J");
-int register_android_view_TextureView(JNIEnv* env) {
- jclass clazz;
- FIND_CLASS(clazz, "android/graphics/Rect");
- GET_METHOD_ID(gRectClassInfo.set, clazz, "set", "(IIII)V");
- GET_FIELD_ID(gRectClassInfo.left, clazz, "left", "I");
- GET_FIELD_ID(gRectClassInfo.top, clazz, "top", "I");
- GET_FIELD_ID(gRectClassInfo.right, clazz, "right", "I");
- GET_FIELD_ID(gRectClassInfo.bottom, clazz, "bottom", "I");
-
- FIND_CLASS(clazz, "android/graphics/Canvas");
- GET_FIELD_ID(gCanvasClassInfo.mSurfaceFormat, clazz, "mSurfaceFormat", "I");
- GET_METHOD_ID(gCanvasClassInfo.setNativeBitmap, clazz, "setNativeBitmap", "(J)V");
-
- FIND_CLASS(clazz, "android/view/TextureView");
- GET_FIELD_ID(gTextureViewClassInfo.nativeWindow, clazz, "mNativeWindow", "J");
-
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
};
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp
index b9d849c..9b06293 100644
--- a/core/jni/android_view_ThreadedRenderer.cpp
+++ b/core/jni/android_view_ThreadedRenderer.cpp
@@ -20,7 +20,7 @@
#include "jni.h"
#include <nativehelper/JNIHelp.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <EGL/egl.h>
#include <EGL/eglext.h>
@@ -454,7 +454,7 @@ static JNINativeMethod gMethods[] = {
};
int register_android_view_ThreadedRenderer(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
}; // namespace android
diff --git a/core/jni/android_view_VelocityTracker.cpp b/core/jni/android_view_VelocityTracker.cpp
index 1e36932..ddd5fc8 100644
--- a/core/jni/android_view_VelocityTracker.cpp
+++ b/core/jni/android_view_VelocityTracker.cpp
@@ -26,6 +26,7 @@
#include <ScopedUtfChars.h>
+#include "core_jni_helpers.h"
namespace android {
@@ -242,31 +243,18 @@ static JNINativeMethod gVelocityTrackerMethods[] = {
(void*)android_view_VelocityTracker_nativeGetEstimator },
};
-#define FIND_CLASS(var, className) \
- var = env->FindClass(className); \
- LOG_FATAL_IF(! var, "Unable to find class " className);
+int register_android_view_VelocityTracker(JNIEnv* env) {
+ int res = RegisterMethodsOrDie(env, "android/view/VelocityTracker", gVelocityTrackerMethods,
+ NELEM(gVelocityTrackerMethods));
-#define GET_FIELD_ID(var, clazz, fieldName, fieldDescriptor) \
- var = env->GetFieldID(clazz, fieldName, fieldDescriptor); \
- LOG_FATAL_IF(! var, "Unable to find field " fieldName);
+ jclass clazz = FindClassOrDie(env, "android/view/VelocityTracker$Estimator");
-int register_android_view_VelocityTracker(JNIEnv* env) {
- int res = jniRegisterNativeMethods(env, "android/view/VelocityTracker",
- gVelocityTrackerMethods, NELEM(gVelocityTrackerMethods));
- LOG_FATAL_IF(res < 0, "Unable to register native methods.");
-
- jclass clazz;
- FIND_CLASS(clazz, "android/view/VelocityTracker$Estimator");
-
- GET_FIELD_ID(gEstimatorClassInfo.xCoeff, clazz,
- "xCoeff", "[F");
- GET_FIELD_ID(gEstimatorClassInfo.yCoeff, clazz,
- "yCoeff", "[F");
- GET_FIELD_ID(gEstimatorClassInfo.degree, clazz,
- "degree", "I");
- GET_FIELD_ID(gEstimatorClassInfo.confidence, clazz,
- "confidence", "F");
- return 0;
+ gEstimatorClassInfo.xCoeff = GetFieldIDOrDie(env, clazz, "xCoeff", "[F");
+ gEstimatorClassInfo.yCoeff = GetFieldIDOrDie(env, clazz, "yCoeff", "[F");
+ gEstimatorClassInfo.degree = GetFieldIDOrDie(env, clazz, "degree", "I");
+ gEstimatorClassInfo.confidence = GetFieldIDOrDie(env, clazz, "confidence", "F");
+
+ return res;
}
} // namespace android
diff --git a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
index 226b764..9307ff9 100644
--- a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
+++ b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
@@ -17,7 +17,7 @@
#define LOG_TAG "NativeLibraryHelper"
//#define LOG_NDEBUG 0
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <ScopedUtfChars.h>
#include <UniquePtr.h>
@@ -33,6 +33,7 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
+#include <inttypes.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -117,7 +118,7 @@ isFileDifferent(const char* filePath, size_t fileSize, time_t modifiedTime,
return true;
}
- if (st->st_size != fileSize) {
+ if (static_cast<uint64_t>(st->st_size) != static_cast<uint64_t>(fileSize)) {
return true;
}
@@ -173,7 +174,11 @@ sumFiles(JNIEnv*, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntry, const char
static install_status_t
copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntry, const char* fileName)
{
- jstring* javaNativeLibPath = (jstring*) arg;
+ void** args = reinterpret_cast<void**>(arg);
+ jstring* javaNativeLibPath = (jstring*) args[0];
+ jboolean extractNativeLibs = *(jboolean*) args[1];
+ jboolean hasNativeBridge = *(jboolean*) args[2];
+
ScopedUtfChars nativeLibPath(env, *javaNativeLibPath);
size_t uncompLen;
@@ -181,13 +186,31 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr
long crc;
time_t modTime;
- if (!zipFile->getEntryInfo(zipEntry, NULL, &uncompLen, NULL, NULL, &when, &crc)) {
+ int method;
+ off64_t offset;
+
+ if (!zipFile->getEntryInfo(zipEntry, &method, &uncompLen, NULL, &offset, &when, &crc)) {
ALOGD("Couldn't read zip entry info\n");
return INSTALL_FAILED_INVALID_APK;
- } else {
- struct tm t;
- ZipUtils::zipTimeToTimespec(when, &t);
- modTime = mktime(&t);
+ }
+
+ if (!extractNativeLibs) {
+ // check if library is uncompressed and page-aligned
+ if (method != ZipFileRO::kCompressStored) {
+ ALOGD("Library '%s' is compressed - will not be able to open it directly from apk.\n",
+ fileName);
+ return INSTALL_FAILED_INVALID_APK;
+ }
+
+ if (offset % PAGE_SIZE != 0) {
+ ALOGD("Library '%s' is not page-aligned - will not be able to open it directly from"
+ " apk.\n", fileName);
+ return INSTALL_FAILED_INVALID_APK;
+ }
+
+ if (!hasNativeBridge) {
+ return INSTALL_SUCCEEDED;
+ }
}
// Build local file path
@@ -208,6 +231,9 @@ copyFileIfChanged(JNIEnv *env, void* arg, ZipFileRO* zipFile, ZipEntryRO zipEntr
}
// Only copy out the native file if it's different.
+ struct tm t;
+ ZipUtils::zipTimeToTimespec(when, &t);
+ modTime = mktime(&t);
struct stat64 st;
if (!isFileDifferent(localFileName, uncompLen, modTime, crc, &st)) {
return INSTALL_SUCCEEDED;
@@ -430,7 +456,6 @@ static int findSupportedAbi(JNIEnv *env, jlong apkHandle, jobjectArray supported
}
ZipEntryRO entry = NULL;
- char fileName[PATH_MAX];
int status = NO_NATIVE_LIBRARIES;
while ((entry = it->next()) != NULL) {
// We're currently in the lib/ directory of the APK, so it does have some native
@@ -466,10 +491,12 @@ static int findSupportedAbi(JNIEnv *env, jlong apkHandle, jobjectArray supported
static jint
com_android_internal_content_NativeLibraryHelper_copyNativeBinaries(JNIEnv *env, jclass clazz,
- jlong apkHandle, jstring javaNativeLibPath, jstring javaCpuAbi)
+ jlong apkHandle, jstring javaNativeLibPath, jstring javaCpuAbi,
+ jboolean extractNativeLibs, jboolean hasNativeBridge)
{
+ void* args[] = { &javaNativeLibPath, &extractNativeLibs, &hasNativeBridge };
return (jint) iterateOverNativeFiles(env, apkHandle, javaCpuAbi,
- copyFileIfChanged, &javaNativeLibPath);
+ copyFileIfChanged, reinterpret_cast<void*>(args));
}
static jlong
@@ -549,7 +576,7 @@ static JNINativeMethod gMethods[] = {
"(J)V",
(void *)com_android_internal_content_NativeLibraryHelper_close},
{"nativeCopyNativeBinaries",
- "(JLjava/lang/String;Ljava/lang/String;)I",
+ "(JLjava/lang/String;Ljava/lang/String;ZZ)I",
(void *)com_android_internal_content_NativeLibraryHelper_copyNativeBinaries},
{"nativeSumNativeBinaries",
"(JLjava/lang/String;)J",
@@ -564,8 +591,8 @@ static JNINativeMethod gMethods[] = {
int register_com_android_internal_content_NativeLibraryHelper(JNIEnv *env)
{
- return AndroidRuntime::registerNativeMethods(env,
- "com/android/internal/content/NativeLibraryHelper", gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env,
+ "com/android/internal/content/NativeLibraryHelper", gMethods, NELEM(gMethods));
}
};
diff --git a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
index 2e2d0c7..6c0b756 100644
--- a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
+++ b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
@@ -17,10 +17,11 @@
#define LOG_TAG "NetworkStats"
#include <errno.h>
+#include <inttypes.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <android_runtime/AndroidRuntime.h>
+#include <core_jni_helpers.h>
#include <jni.h>
#include <ScopedUtfChars.h>
@@ -187,7 +188,7 @@ static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats,
if (endPos - pos == 3) {
rawTag = 0;
} else {
- if (sscanf(pos, "%llx", &rawTag) != 1) {
+ if (sscanf(pos, "%" PRIx64, &rawTag) != 1) {
ALOGE("bad tag: %s", pos);
fclose(fp);
return -1;
@@ -204,7 +205,7 @@ static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats,
while (*pos == ' ') pos++;
// Parse remaining fields.
- if (sscanf(pos, "%u %u %llu %llu %llu %llu",
+ if (sscanf(pos, "%u %u %" PRIu64 " %" PRIu64 " %" PRIu64 " %" PRIu64,
&s.uid, &s.set, &s.rxBytes, &s.rxPackets,
&s.txBytes, &s.txPackets) == 6) {
if (limitUid != -1 && limitUid != s.uid) {
@@ -283,16 +284,6 @@ static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats,
return 0;
}
-static jclass findClass(JNIEnv* env, const char* name) {
- ScopedLocalRef<jclass> localClass(env, env->FindClass(name));
- jclass result = reinterpret_cast<jclass>(env->NewGlobalRef(localClass.get()));
- if (result == NULL) {
- ALOGE("failed to find class '%s'", name);
- abort();
- }
- return result;
-}
-
static JNINativeMethod gMethods[] = {
{ "nativeReadNetworkStatsDetail",
"(Landroid/net/NetworkStats;Ljava/lang/String;I[Ljava/lang/String;I)I",
@@ -300,24 +291,25 @@ static JNINativeMethod gMethods[] = {
};
int register_com_android_internal_net_NetworkStatsFactory(JNIEnv* env) {
- int err = AndroidRuntime::registerNativeMethods(env,
+ int err = RegisterMethodsOrDie(env,
"com/android/internal/net/NetworkStatsFactory", gMethods,
NELEM(gMethods));
- gStringClass = findClass(env, "java/lang/String");
-
- jclass clazz = env->FindClass("android/net/NetworkStats");
- gNetworkStatsClassInfo.size = env->GetFieldID(clazz, "size", "I");
- gNetworkStatsClassInfo.capacity = env->GetFieldID(clazz, "capacity", "I");
- gNetworkStatsClassInfo.iface = env->GetFieldID(clazz, "iface", "[Ljava/lang/String;");
- gNetworkStatsClassInfo.uid = env->GetFieldID(clazz, "uid", "[I");
- gNetworkStatsClassInfo.set = env->GetFieldID(clazz, "set", "[I");
- gNetworkStatsClassInfo.tag = env->GetFieldID(clazz, "tag", "[I");
- gNetworkStatsClassInfo.rxBytes = env->GetFieldID(clazz, "rxBytes", "[J");
- gNetworkStatsClassInfo.rxPackets = env->GetFieldID(clazz, "rxPackets", "[J");
- gNetworkStatsClassInfo.txBytes = env->GetFieldID(clazz, "txBytes", "[J");
- gNetworkStatsClassInfo.txPackets = env->GetFieldID(clazz, "txPackets", "[J");
- gNetworkStatsClassInfo.operations = env->GetFieldID(clazz, "operations", "[J");
+ gStringClass = FindClassOrDie(env, "java/lang/String");
+ gStringClass = MakeGlobalRefOrDie(env, gStringClass);
+
+ jclass clazz = FindClassOrDie(env, "android/net/NetworkStats");
+ gNetworkStatsClassInfo.size = GetFieldIDOrDie(env, clazz, "size", "I");
+ gNetworkStatsClassInfo.capacity = GetFieldIDOrDie(env, clazz, "capacity", "I");
+ gNetworkStatsClassInfo.iface = GetFieldIDOrDie(env, clazz, "iface", "[Ljava/lang/String;");
+ gNetworkStatsClassInfo.uid = GetFieldIDOrDie(env, clazz, "uid", "[I");
+ gNetworkStatsClassInfo.set = GetFieldIDOrDie(env, clazz, "set", "[I");
+ gNetworkStatsClassInfo.tag = GetFieldIDOrDie(env, clazz, "tag", "[I");
+ gNetworkStatsClassInfo.rxBytes = GetFieldIDOrDie(env, clazz, "rxBytes", "[J");
+ gNetworkStatsClassInfo.rxPackets = GetFieldIDOrDie(env, clazz, "rxPackets", "[J");
+ gNetworkStatsClassInfo.txBytes = GetFieldIDOrDie(env, clazz, "txBytes", "[J");
+ gNetworkStatsClassInfo.txPackets = GetFieldIDOrDie(env, clazz, "txPackets", "[J");
+ gNetworkStatsClassInfo.operations = GetFieldIDOrDie(env, clazz, "operations", "[J");
return err;
}
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 4f5e08b..2bfeadb 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -20,12 +20,12 @@
#include <sys/mount.h>
#include <linux/fs.h>
-#include <grp.h>
#include <fcntl.h>
+#include <grp.h>
+#include <inttypes.h>
#include <paths.h>
#include <signal.h>
#include <stdlib.h>
-#include <unistd.h>
#include <sys/capability.h>
#include <sys/personality.h>
#include <sys/prctl.h>
@@ -34,7 +34,7 @@
#include <sys/types.h>
#include <sys/utsname.h>
#include <sys/wait.h>
-
+#include <unistd.h>
#include <cutils/fs.h>
#include <cutils/multiuser.h>
@@ -43,9 +43,8 @@
#include <utils/String8.h>
#include <selinux/android.h>
#include <processgroup/processgroup.h>
-#include <inttypes.h>
-#include "android_runtime/AndroidRuntime.h"
+#include "core_jni_helpers.h"
#include "JNIHelp.h"
#include "ScopedLocalRef.h"
#include "ScopedPrimitiveArray.h"
@@ -105,7 +104,7 @@ static void SigChldHandler(int /*signal_number*/) {
// so that it is restarted by init and system server will be restarted
// from there.
if (pid == gSystemServerPid) {
- ALOGE("Exit zygote because system server (%d) has terminated");
+ ALOGE("Exit zygote because system server (%d) has terminated", pid);
kill(getpid(), SIGKILL);
}
}
@@ -131,7 +130,7 @@ static void SetSigChldHandler() {
int err = sigaction(SIGCHLD, &sa, NULL);
if (err < 0) {
- ALOGW("Error setting SIGCHLD handler: %d", errno);
+ ALOGW("Error setting SIGCHLD handler: %s", strerror(errno));
}
}
@@ -143,7 +142,7 @@ static void UnsetSigChldHandler() {
int err = sigaction(SIGCHLD, &sa, NULL);
if (err < 0) {
- ALOGW("Error unsetting SIGCHLD handler: %d", errno);
+ ALOGW("Error unsetting SIGCHLD handler: %s", strerror(errno));
}
}
@@ -190,7 +189,8 @@ static void SetRLimits(JNIEnv* env, jobjectArray javaRlimits) {
int rc = setrlimit(javaRlimit[0], &rlim);
if (rc == -1) {
- ALOGE("setrlimit(%d, {%d, %d}) failed", javaRlimit[0], rlim.rlim_cur, rlim.rlim_max);
+ ALOGE("setrlimit(%d, {%ld, %ld}) failed", javaRlimit[0], rlim.rlim_cur,
+ rlim.rlim_max);
RuntimeAbort(env);
}
}
@@ -236,7 +236,7 @@ static void SetCapabilities(JNIEnv* env, int64_t permitted, int64_t effective) {
capdata[1].permitted = permitted >> 32;
if (capset(&capheader, &capdata[0]) == -1) {
- ALOGE("capset(%lld, %lld) failed", permitted, effective);
+ ALOGE("capset(%" PRId64 ", %" PRId64 ") failed", permitted, effective);
RuntimeAbort(env);
}
}
@@ -258,7 +258,7 @@ static bool MountEmulatedStorage(uid_t uid, jint mount_mode, bool force_mount_na
// Create a second private mount namespace for our process
if (unshare(CLONE_NEWNS) == -1) {
- ALOGW("Failed to unshare(): %d", errno);
+ ALOGW("Failed to unshare(): %s", strerror(errno));
return false;
}
@@ -295,14 +295,15 @@ static bool MountEmulatedStorage(uid_t uid, jint mount_mode, bool force_mount_na
if (mount_mode == MOUNT_EXTERNAL_MULTIUSER_ALL) {
// Mount entire external storage tree for all users
if (TEMP_FAILURE_RETRY(mount(source, target, NULL, MS_BIND, NULL)) == -1) {
- ALOGW("Failed to mount %s to %s :%d", source, target, errno);
+ ALOGW("Failed to mount %s to %s: %s", source, target, strerror(errno));
return false;
}
} else {
// Only mount user-specific external storage
- if (TEMP_FAILURE_RETRY(
- mount(source_user.string(), target_user.string(), NULL, MS_BIND, NULL)) == -1) {
- ALOGW("Failed to mount %s to %s: %d", source_user.string(), target_user.string(), errno);
+ if (TEMP_FAILURE_RETRY(mount(source_user.string(), target_user.string(), NULL,
+ MS_BIND, NULL)) == -1) {
+ ALOGW("Failed to mount %s to %s: %s", source_user.string(), target_user.string(),
+ strerror(errno));
return false;
}
}
@@ -314,7 +315,7 @@ static bool MountEmulatedStorage(uid_t uid, jint mount_mode, bool force_mount_na
// Finally, mount user-specific path into place for legacy users
if (TEMP_FAILURE_RETRY(
mount(target_user.string(), legacy, NULL, MS_BIND | MS_REC, NULL)) == -1) {
- ALOGW("Failed to mount %s to %s: %d", target_user.string(), legacy, errno);
+ ALOGW("Failed to mount %s to %s: %s", target_user.string(), legacy, strerror(errno));
return false;
}
} else {
@@ -365,13 +366,13 @@ static void DetachDescriptors(JNIEnv* env, jintArray fdsToClose) {
for (i = 0; i < count; i++) {
devnull = open("/dev/null", O_RDWR);
if (devnull < 0) {
- ALOGE("Failed to open /dev/null");
+ ALOGE("Failed to open /dev/null: %s", strerror(errno));
RuntimeAbort(env);
continue;
}
- ALOGV("Switching descriptor %d to /dev/null: %d", ar[i], errno);
+ ALOGV("Switching descriptor %d to /dev/null: %s", ar[i], strerror(errno));
if (dup2(devnull, ar[i]) < 0) {
- ALOGE("Failed dup2() on descriptor %d", ar[i]);
+ ALOGE("Failed dup2() on descriptor %d: %s", ar[i], strerror(errno));
RuntimeAbort(env);
}
close(devnull);
@@ -401,23 +402,7 @@ void SetThreadName(const char* thread_name) {
strlcpy(buf, s, sizeof(buf)-1);
errno = pthread_setname_np(pthread_self(), buf);
if (errno != 0) {
- ALOGW("Unable to set the name of current thread to '%s'", buf);
- }
-}
-
- // Temporary timing check.
-uint64_t MsTime() {
- timespec now;
- clock_gettime(CLOCK_MONOTONIC, &now);
- return static_cast<uint64_t>(now.tv_sec) * UINT64_C(1000) + now.tv_nsec / UINT64_C(1000000);
-}
-
-
-void ckTime(uint64_t start, const char* where) {
- uint64_t now = MsTime();
- if ((now-start) > 1000) {
- // If we are taking more than a second, log about it.
- ALOGW("Slow operation: %"PRIu64" ms in %s", (uint64_t)(now-start), where);
+ ALOGW("Unable to set the name of current thread to '%s': %s", buf, strerror(errno));
}
}
@@ -429,9 +414,7 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
jstring java_se_info, jstring java_se_name,
bool is_system_server, jintArray fdsToClose,
jstring instructionSet, jstring dataDir) {
- uint64_t start = MsTime();
SetSigChldHandler();
- ckTime(start, "ForkAndSpecializeCommon:SetSigChldHandler");
pid_t pid = fork();
@@ -439,12 +422,9 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
// The child process.
gMallocLeakZygoteChild = 1;
-
// Clean up any descriptors which must be closed immediately
DetachDescriptors(env, fdsToClose);
- ckTime(start, "ForkAndSpecializeCommon:Fork and detach");
-
// Keep capabilities across UID change, unless we're staying root.
if (uid != 0) {
EnableKeepCapabilities(env);
@@ -504,13 +484,13 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
int rc = setresgid(gid, gid, gid);
if (rc == -1) {
- ALOGE("setresgid(%d) failed", gid);
+ ALOGE("setresgid(%d) failed: %s", gid, strerror(errno));
RuntimeAbort(env);
}
rc = setresuid(uid, uid, uid);
if (rc == -1) {
- ALOGE("setresuid(%d) failed", uid);
+ ALOGE("setresuid(%d) failed: %s", uid, strerror(errno));
RuntimeAbort(env);
}
@@ -519,7 +499,7 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
int old_personality = personality(0xffffffff);
int new_personality = personality(old_personality | ADDR_NO_RANDOMIZE);
if (new_personality == -1) {
- ALOGW("personality(%d) failed", new_personality);
+ ALOGW("personality(%d) failed: %s", new_personality, strerror(errno));
}
}
@@ -568,11 +548,8 @@ static pid_t ForkAndSpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArra
UnsetSigChldHandler();
- ckTime(start, "ForkAndSpecializeCommon:child process setup");
-
env->CallStaticVoidMethod(gZygoteClass, gCallPostForkChildHooks, debug_flags,
is_system_server ? NULL : instructionSet);
- ckTime(start, "ForkAndSpecializeCommon:PostForkChildHooks returns");
if (env->ExceptionCheck()) {
ALOGE("Error calling post fork hooks.");
RuntimeAbort(env);
@@ -636,15 +613,11 @@ static JNINativeMethod gMethods[] = {
};
int register_com_android_internal_os_Zygote(JNIEnv* env) {
- gZygoteClass = (jclass) env->NewGlobalRef(env->FindClass(kZygoteClassName));
- if (gZygoteClass == NULL) {
- RuntimeAbort(env);
- }
- gCallPostForkChildHooks = env->GetStaticMethodID(gZygoteClass, "callPostForkChildHooks",
+ gZygoteClass = MakeGlobalRefOrDie(env, FindClassOrDie(env, kZygoteClassName));
+ gCallPostForkChildHooks = GetStaticMethodIDOrDie(env, gZygoteClass, "callPostForkChildHooks",
"(ILjava/lang/String;)V");
- return AndroidRuntime::registerNativeMethods(env, "com/android/internal/os/Zygote",
- gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, "com/android/internal/os/Zygote", gMethods, NELEM(gMethods));
}
} // namespace android
diff --git a/core/jni/com_android_internal_os_ZygoteInit.cpp b/core/jni/com_android_internal_os_ZygoteInit.cpp
deleted file mode 100644
index 2233ee3..0000000
--- a/core/jni/com_android_internal_os_ZygoteInit.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (C) 2007 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.
- */
-
-#define LOG_TAG "Zygote"
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <utils/misc.h>
-#include <errno.h>
-#include <sys/select.h>
-
-#include "jni.h"
-#include <JNIHelp.h>
-#include "android_runtime/AndroidRuntime.h"
-
-#include <sys/capability.h>
-#include <sys/prctl.h>
-
-namespace android {
-
-/*
- * In class com.android.internal.os.ZygoteInit:
- * private static native boolean setreuid(int ruid, int euid)
- */
-static jint com_android_internal_os_ZygoteInit_setreuid(
- JNIEnv* env, jobject clazz, jint ruid, jint euid)
-{
- if (setreuid(ruid, euid) < 0) {
- return errno;
- }
- return 0;
-}
-
-/*
- * In class com.android.internal.os.ZygoteInit:
- * private static native int setregid(int rgid, int egid)
- */
-static jint com_android_internal_os_ZygoteInit_setregid(
- JNIEnv* env, jobject clazz, jint rgid, jint egid)
-{
- if (setregid(rgid, egid) < 0) {
- return errno;
- }
- return 0;
-}
-
-/*
- * In class com.android.internal.os.ZygoteInit:
- * private static native int setpgid(int rgid, int egid)
- */
-static jint com_android_internal_os_ZygoteInit_setpgid(
- JNIEnv* env, jobject clazz, jint pid, jint pgid)
-{
- if (setpgid(pid, pgid) < 0) {
- return errno;
- }
- return 0;
-}
-
-/*
- * In class com.android.internal.os.ZygoteInit:
- * private static native int getpgid(int pid)
- */
-static jint com_android_internal_os_ZygoteInit_getpgid(
- JNIEnv* env, jobject clazz, jint pid)
-{
- pid_t ret;
- ret = getpgid(pid);
-
- if (ret < 0) {
- jniThrowIOException(env, errno);
- }
-
- return ret;
-}
-
-static void com_android_internal_os_ZygoteInit_reopenStdio(JNIEnv* env,
- jobject clazz, jobject in, jobject out, jobject errfd)
-{
- int fd;
- int err;
-
- fd = jniGetFDFromFileDescriptor(env, in);
-
- if (env->ExceptionOccurred() != NULL) {
- return;
- }
-
- do {
- err = dup2(fd, STDIN_FILENO);
- } while (err < 0 && errno == EINTR);
-
- fd = jniGetFDFromFileDescriptor(env, out);
-
- if (env->ExceptionOccurred() != NULL) {
- return;
- }
-
- do {
- err = dup2(fd, STDOUT_FILENO);
- } while (err < 0 && errno == EINTR);
-
- fd = jniGetFDFromFileDescriptor(env, errfd);
-
- if (env->ExceptionOccurred() != NULL) {
- return;
- }
-
- do {
- err = dup2(fd, STDERR_FILENO);
- } while (err < 0 && errno == EINTR);
-}
-
-static void com_android_internal_os_ZygoteInit_setCloseOnExec (JNIEnv *env,
- jobject clazz, jobject descriptor, jboolean flag)
-{
- int fd;
- int err;
- int fdFlags;
-
- fd = jniGetFDFromFileDescriptor(env, descriptor);
-
- if (env->ExceptionOccurred() != NULL) {
- return;
- }
-
- fdFlags = fcntl(fd, F_GETFD);
-
- if (fdFlags < 0) {
- jniThrowIOException(env, errno);
- return;
- }
-
- if (flag) {
- fdFlags |= FD_CLOEXEC;
- } else {
- fdFlags &= ~FD_CLOEXEC;
- }
-
- err = fcntl(fd, F_SETFD, fdFlags);
-
- if (err < 0) {
- jniThrowIOException(env, errno);
- return;
- }
-}
-
-static jint com_android_internal_os_ZygoteInit_selectReadable (
- JNIEnv *env, jobject clazz, jobjectArray fds)
-{
- if (fds == NULL) {
- jniThrowNullPointerException(env, "fds == null");
- return -1;
- }
-
- jsize length = env->GetArrayLength(fds);
- fd_set fdset;
-
- if (env->ExceptionOccurred() != NULL) {
- return -1;
- }
-
- FD_ZERO(&fdset);
-
- int nfds = 0;
- for (jsize i = 0; i < length; i++) {
- jobject fdObj = env->GetObjectArrayElement(fds, i);
- if (env->ExceptionOccurred() != NULL) {
- return -1;
- }
- if (fdObj == NULL) {
- continue;
- }
- int fd = jniGetFDFromFileDescriptor(env, fdObj);
- if (env->ExceptionOccurred() != NULL) {
- return -1;
- }
-
- FD_SET(fd, &fdset);
-
- if (fd >= nfds) {
- nfds = fd + 1;
- }
- }
-
- int err;
- do {
- err = select (nfds, &fdset, NULL, NULL, NULL);
- } while (err < 0 && errno == EINTR);
-
- if (err < 0) {
- jniThrowIOException(env, errno);
- return -1;
- }
-
- for (jsize i = 0; i < length; i++) {
- jobject fdObj = env->GetObjectArrayElement(fds, i);
- if (env->ExceptionOccurred() != NULL) {
- return -1;
- }
- if (fdObj == NULL) {
- continue;
- }
- int fd = jniGetFDFromFileDescriptor(env, fdObj);
- if (env->ExceptionOccurred() != NULL) {
- return -1;
- }
- if (FD_ISSET(fd, &fdset)) {
- return (jint)i;
- }
- }
- return -1;
-}
-
-static jobject com_android_internal_os_ZygoteInit_createFileDescriptor (
- JNIEnv *env, jobject clazz, jint fd)
-{
- return jniCreateFileDescriptor(env, fd);
-}
-
-/*
- * JNI registration.
- */
-static JNINativeMethod gMethods[] = {
- /* name, signature, funcPtr */
- { "setreuid", "(II)I",
- (void*) com_android_internal_os_ZygoteInit_setreuid },
- { "setregid", "(II)I",
- (void*) com_android_internal_os_ZygoteInit_setregid },
- { "setpgid", "(II)I",
- (void *) com_android_internal_os_ZygoteInit_setpgid },
- { "getpgid", "(I)I",
- (void *) com_android_internal_os_ZygoteInit_getpgid },
- { "reopenStdio",
- "(Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;"
- "Ljava/io/FileDescriptor;)V",
- (void *) com_android_internal_os_ZygoteInit_reopenStdio},
- { "setCloseOnExec", "(Ljava/io/FileDescriptor;Z)V",
- (void *) com_android_internal_os_ZygoteInit_setCloseOnExec},
- { "selectReadable", "([Ljava/io/FileDescriptor;)I",
- (void *) com_android_internal_os_ZygoteInit_selectReadable },
- { "createFileDescriptor", "(I)Ljava/io/FileDescriptor;",
- (void *) com_android_internal_os_ZygoteInit_createFileDescriptor }
-};
-int register_com_android_internal_os_ZygoteInit(JNIEnv* env)
-{
- return AndroidRuntime::registerNativeMethods(env,
- "com/android/internal/os/ZygoteInit", gMethods, NELEM(gMethods));
-}
-
-}; // namespace android
diff --git a/core/jni/com_android_internal_util_VirtualRefBasePtr.cpp b/core/jni/com_android_internal_util_VirtualRefBasePtr.cpp
index ce6f207..7a18c2d 100644
--- a/core/jni/com_android_internal_util_VirtualRefBasePtr.cpp
+++ b/core/jni/com_android_internal_util_VirtualRefBasePtr.cpp
@@ -16,7 +16,7 @@
#include "jni.h"
#include <nativehelper/JNIHelp.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
namespace android {
@@ -42,7 +42,7 @@ static JNINativeMethod gMethods[] = {
};
int register_com_android_internal_util_VirtualRefBasePtr(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
diff --git a/core/jni/com_android_internal_view_animation_NativeInterpolatorFactoryHelper.cpp b/core/jni/com_android_internal_view_animation_NativeInterpolatorFactoryHelper.cpp
index 704e1be..c5c2e9d 100644
--- a/core/jni/com_android_internal_view_animation_NativeInterpolatorFactoryHelper.cpp
+++ b/core/jni/com_android_internal_view_animation_NativeInterpolatorFactoryHelper.cpp
@@ -18,7 +18,7 @@
#include "jni.h"
#include <nativehelper/JNIHelp.h>
-#include <android_runtime/AndroidRuntime.h>
+#include "core_jni_helpers.h"
#include <Interpolator.h>
@@ -98,7 +98,7 @@ static JNINativeMethod gMethods[] = {
};
int register_com_android_internal_view_animation_NativeInterpolatorFactoryHelper(JNIEnv* env) {
- return AndroidRuntime::registerNativeMethods(env, kClassPathName, gMethods, NELEM(gMethods));
+ return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
diff --git a/core/jni/com_google_android_gles_jni_GLImpl.cpp b/core/jni/com_google_android_gles_jni_GLImpl.cpp
index 7975987..c5f330e 100644
--- a/core/jni/com_google_android_gles_jni_GLImpl.cpp
+++ b/core/jni/com_google_android_gles_jni_GLImpl.cpp
@@ -17,6 +17,10 @@
// This source file is automatically generated
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-function"
+
#include "jni.h"
#include "JNIHelp.h"
#include <android_runtime/AndroidRuntime.h>
diff --git a/core/jni/core_jni_helpers.h b/core/jni/core_jni_helpers.h
new file mode 100644
index 0000000..3f169c3
--- /dev/null
+++ b/core/jni/core_jni_helpers.h
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+
+#ifndef CORE_JNI_HELPERS
+#define CORE_JNI_HELPERS
+
+#include "JNIHelp.h"
+#include <android_runtime/AndroidRuntime.h>
+
+namespace android {
+
+// Defines some helpful functions.
+
+static inline jclass FindClassOrDie(JNIEnv* env, const char* class_name) {
+ jclass clazz = env->FindClass(class_name);
+ LOG_ALWAYS_FATAL_IF(clazz == NULL, "Unable to find class %s", class_name);
+ return clazz;
+}
+
+static inline jfieldID GetFieldIDOrDie(JNIEnv* env, jclass clazz, const char* field_name,
+ const char* field_signature) {
+ jfieldID res = env->GetFieldID(clazz, field_name, field_signature);
+ LOG_ALWAYS_FATAL_IF(res == NULL, "Unable to find static field %s", field_name);
+ return res;
+}
+
+static inline jmethodID GetMethodIDOrDie(JNIEnv* env, jclass clazz, const char* method_name,
+ const char* method_signature) {
+ jmethodID res = env->GetMethodID(clazz, method_name, method_signature);
+ LOG_ALWAYS_FATAL_IF(res == NULL, "Unable to find method %s", method_name);
+ return res;
+}
+
+static inline jfieldID GetStaticFieldIDOrDie(JNIEnv* env, jclass clazz, const char* field_name,
+ const char* field_signature) {
+ jfieldID res = env->GetStaticFieldID(clazz, field_name, field_signature);
+ LOG_ALWAYS_FATAL_IF(res == NULL, "Unable to find static field %s", field_name);
+ return res;
+}
+
+static inline jmethodID GetStaticMethodIDOrDie(JNIEnv* env, jclass clazz, const char* method_name,
+ const char* method_signature) {
+ jmethodID res = env->GetStaticMethodID(clazz, method_name, method_signature);
+ LOG_ALWAYS_FATAL_IF(res == NULL, "Unable to find static method %s", method_name);
+ return res;
+}
+
+template <typename T>
+static inline T MakeGlobalRefOrDie(JNIEnv* env, T in) {
+ jobject res = env->NewGlobalRef(in);
+ LOG_ALWAYS_FATAL_IF(res == NULL, "Unable to create global reference.");
+ return static_cast<T>(res);
+}
+
+static inline int RegisterMethodsOrDie(JNIEnv* env, const char* className,
+ const JNINativeMethod* gMethods, int numMethods) {
+ int res = AndroidRuntime::registerNativeMethods(env, className, gMethods, numMethods);
+ LOG_ALWAYS_FATAL_IF(res < 0, "Unable to register native methods.");
+ return res;
+}
+
+} // namespace android
+
+#endif // CORE_JNI_HELPERS
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 75ba16b..ad2faf8 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -3098,9 +3098,9 @@
</intent-filter>
</receiver>
- <receiver android:name="com.android.server.updates.TZInfoInstallReceiver" >
+ <receiver android:name="com.android.server.updates.TzDataInstallReceiver" >
<intent-filter>
- <action android:name="android.intent.action.UPDATE_TZINFO" />
+ <action android:name="android.intent.action.UPDATE_TZDATA" />
<data android:scheme="content" android:host="*" android:mimeType="*/*" />
</intent-filter>
</receiver>
diff --git a/core/res/res/drawable/pointer_arrow_icon.xml b/core/res/res/drawable/pointer_arrow_icon.xml
index 8f7d658..72af0c1 100644
--- a/core/res/res/drawable/pointer_arrow_icon.xml
+++ b/core/res/res/drawable/pointer_arrow_icon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
android:bitmap="@drawable/pointer_arrow"
- android:hotSpotX="6dp"
- android:hotSpotY="6dp" />
+ android:hotSpotX="5dp"
+ android:hotSpotY="5dp" />
diff --git a/core/res/res/values-af/donottranslate-cldr.xml b/core/res/res/values-af/donottranslate-cldr.xml
index 7da5a72..c7f41b4 100755
--- a/core/res/res/values-af/donottranslate-cldr.xml
+++ b/core/res/res/values-af/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%d %B %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%-l:%M:%S %p %d %b %Y</string>
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 0553e8a..052b5db 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wil Verken-met-raak aktiveer. Wanneer Verken-met-raak aangeskakel is, kan jy beskrywings van wat onder jou vinger is hoor of sien, of jy kan gebare uitvoer om interaksie met die foon te hê ."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 maand gelede"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Voor 1 maand gelede"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 sekonde gelede"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> sekondes gelede"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minuut gelede"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minute gelede"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 uur gelede"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> uur gelede"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Afgelope <xliff:g id="COUNT">%d</xliff:g> dae"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Verlede maand"</string>
<string name="older" msgid="5211975022815554840">"Ouer"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"gister"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dae gelede"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"oor 1 sekonde"</item>
- <item quantity="other" msgid="1241926116443974687">"oor <xliff:g id="COUNT">%d</xliff:g> sekondes"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"oor 1 minuut"</item>
- <item quantity="other" msgid="3330713936399448749">"oor <xliff:g id="COUNT">%d</xliff:g> minute"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"oor 1 uur"</item>
- <item quantity="other" msgid="547290677353727389">"oor <xliff:g id="COUNT">%d</xliff:g> uur"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"môre"</item>
- <item quantity="other" msgid="5109449375100953247">"oor <xliff:g id="COUNT">%d</xliff:g> dae"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 sek. gelede"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> sek. gelede"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 min. gelede"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> min. gelede"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 uur gelede"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> uur gelede"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"gister"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> dae gelede"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"oor 1 sek."</item>
- <item quantity="other" msgid="5495880108825805108">"oor <xliff:g id="COUNT">%d</xliff:g> sek."</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"oor 1 min."</item>
- <item quantity="other" msgid="4216113292706568726">"oor <xliff:g id="COUNT">%d</xliff:g> minute"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"oor 1 uur"</item>
- <item quantity="other" msgid="3705373766798013406">"oor <xliff:g id="COUNT">%d</xliff:g> uur"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"môre"</item>
- <item quantity="other" msgid="2973062968038355991">"oor <xliff:g id="COUNT">%d</xliff:g> dae"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"op <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"by <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"in <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-am/donottranslate-cldr.xml b/core/res/res/values-am/donottranslate-cldr.xml
index ea1975c..6afe07f 100755
--- a/core/res/res/values-am/donottranslate-cldr.xml
+++ b/core/res/res/values-am/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%d %B %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%-l:%M:%S %p %b %-e %Y</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index 20275a3..4dcb240 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ማሰስን በንኪ ማንቃት ይፈልጋል። አስስ በንኪ በሚበራበት ጊዜ፣ ከስልኩ ጋር ለመግባባት ምን በጣትዎ ስር ወይም ምልክቶችን ማከናወን እንዳለብዎ ማብራሪያ ሊመለከቱ ወይም ሊሰሙ ይችላሉ።"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"ከ1 ወር በፊት"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"ከ1 ወር በፊት"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"ከ1 ሴኮንድ በፊት"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> ሰኮንዶች በፊት"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"ከ 1 ደቂቃ በፊት"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> ደቂቃዎች በፊት"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"ከ1 ሰዓት በፊት"</item>
- <item quantity="other" msgid="2467273239587587569">"ከ <xliff:g id="COUNT">%d</xliff:g> ሰዓት በፊት"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"ቀኖች <xliff:g id="COUNT">%d</xliff:g> ያልቃል"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">" ያለፈው ወር"</string>
<string name="older" msgid="5211975022815554840">"የድሮ"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ትላንትና"</item>
- <item quantity="other" msgid="2479586466153314633">"ከ <xliff:g id="COUNT">%d</xliff:g>ቀን በፊት"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"በ1 ሴኮንድ"</item>
- <item quantity="other" msgid="1241926116443974687">"በ<xliff:g id="COUNT">%d</xliff:g> ሰከንዶች ውስጥ"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"በ1 ደቂቃ ውስጥ"</item>
- <item quantity="other" msgid="3330713936399448749">"በ<xliff:g id="COUNT">%d</xliff:g> ደቂቃዎች ውስጥ"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"በ 1 ሰዓት"</item>
- <item quantity="other" msgid="547290677353727389">"በ <xliff:g id="COUNT">%d</xliff:g> ሰዓቶች"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"ነገ"</item>
- <item quantity="other" msgid="5109449375100953247">"በ<xliff:g id="COUNT">%d</xliff:g> ቀኖች"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 ሴኮንድ በፊት"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> ሰከንዶች በፊት"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"ከ 1 ደቂቃ በፊት"</item>
- <item quantity="other" msgid="851164968597150710">"ከ <xliff:g id="COUNT">%d</xliff:g> ደቂቃዎች በፊት"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"ከ1 ሰዓት በፊት"</item>
- <item quantity="other" msgid="6889970745748538901">"ከ <xliff:g id="COUNT">%d</xliff:g> ሰዓት በፊት"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ትላንትና"</item>
- <item quantity="other" msgid="3453342639616481191">"ከ <xliff:g id="COUNT">%d</xliff:g>ቀን በፊት"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"በ1 ሴኮንድ"</item>
- <item quantity="other" msgid="5495880108825805108">"በ<xliff:g id="COUNT">%d</xliff:g> ሰከንዶች ውስጥ"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"በ1 ደቂቃ ውስጥ"</item>
- <item quantity="other" msgid="4216113292706568726">"በ<xliff:g id="COUNT">%d</xliff:g> ደቂቃዎች ውስጥ"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"በ 1 ሰዓት"</item>
- <item quantity="other" msgid="3705373766798013406">"በ <xliff:g id="COUNT">%d</xliff:g> ሰዓቶች"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"ነገ"</item>
- <item quantity="other" msgid="2973062968038355991">"በ<xliff:g id="COUNT">%d</xliff:g> ቀኖች"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"በ <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"በ <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"ውስጥ <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-ar-rEG/donottranslate-cldr.xml b/core/res/res/values-ar-rEG/donottranslate-cldr.xml
index d625752..1be9ed8 100755
--- a/core/res/res/values-ar-rEG/donottranslate-cldr.xml
+++ b/core/res/res/values-ar-rEG/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s‏/%s‏/%s"</string>
<string name="month_day_year">%-e %B، %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%-l:%M:%S %p %d‏/%m‏/%Y</string>
diff --git a/core/res/res/values-ar/donottranslate-cldr.xml b/core/res/res/values-ar/donottranslate-cldr.xml
index d625752..1be9ed8 100755
--- a/core/res/res/values-ar/donottranslate-cldr.xml
+++ b/core/res/res/values-ar/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s‏/%s‏/%s"</string>
<string name="month_day_year">%-e %B، %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%-l:%M:%S %p %d‏/%m‏/%Y</string>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 5df22b9..864a3d4 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"‏يريد <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> تمكين ميزة Explore by Touch. عند تشغيل ميزة Explore by Touch، سيكون بإمكانك سماع أو مشاهدة أوصاف لما تحت إصبعك أو إجراء إيماءات للتفاعل مع الهاتف."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"قبل شهر واحد"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"قبل شهر واحد"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"قبل ثانية واحدة"</item>
- <item quantity="other" msgid="3903706804349556379">"قبل <xliff:g id="COUNT">%d</xliff:g> ثانية"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"قبل دقيقة واحدة"</item>
- <item quantity="other" msgid="2176942008915455116">"قبل <xliff:g id="COUNT">%d</xliff:g> دقيقة"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"قبل ساعة واحدة"</item>
- <item quantity="other" msgid="2467273239587587569">"قبل <xliff:g id="COUNT">%d</xliff:g> ساعات"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"آخر <xliff:g id="COUNT">%d</xliff:g> من الأيام"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"الشهر الماضي"</string>
<string name="older" msgid="5211975022815554840">"أقدم"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"أمس"</item>
- <item quantity="other" msgid="2479586466153314633">"قبل <xliff:g id="COUNT">%d</xliff:g> يوم"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"في ثانية واحدة"</item>
- <item quantity="other" msgid="1241926116443974687">"في <xliff:g id="COUNT">%d</xliff:g> ثانية"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"في دقيقة واحدة"</item>
- <item quantity="other" msgid="3330713936399448749">"في <xliff:g id="COUNT">%d</xliff:g> دقيقة"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"في ساعة واحدة"</item>
- <item quantity="other" msgid="547290677353727389">"في <xliff:g id="COUNT">%d</xliff:g> ساعة"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"غدًا"</item>
- <item quantity="other" msgid="5109449375100953247">"في <xliff:g id="COUNT">%d</xliff:g> يوم"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"قبل ثانية واحدة"</item>
- <item quantity="other" msgid="3699169366650930415">"قبل <xliff:g id="COUNT">%d</xliff:g> ثانية"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"قبل دقيقة واحدة"</item>
- <item quantity="other" msgid="851164968597150710">"قبل <xliff:g id="COUNT">%d</xliff:g> دقيقة"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"قبل ساعة واحدة"</item>
- <item quantity="other" msgid="6889970745748538901">"قبل <xliff:g id="COUNT">%d</xliff:g> ساعة"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"أمس"</item>
- <item quantity="other" msgid="3453342639616481191">"قبل <xliff:g id="COUNT">%d</xliff:g> يوم"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"في ثانية واحدة"</item>
- <item quantity="other" msgid="5495880108825805108">"في <xliff:g id="COUNT">%d</xliff:g> ثانية"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"في دقيقة واحدة"</item>
- <item quantity="other" msgid="4216113292706568726">"في <xliff:g id="COUNT">%d</xliff:g> دقيقة"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"في ساعة واحدة"</item>
- <item quantity="other" msgid="3705373766798013406">"في <xliff:g id="COUNT">%d</xliff:g> ساعة"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"غدًا"</item>
- <item quantity="other" msgid="2973062968038355991">"في <xliff:g id="COUNT">%d</xliff:g> يوم"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"في <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"في الساعة <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"في <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-az-rAZ/strings.xml b/core/res/res/values-az-rAZ/strings.xml
index 479cfcf..b22eb7a 100644
--- a/core/res/res/values-az-rAZ/strings.xml
+++ b/core/res/res/values-az-rAZ/strings.xml
@@ -967,75 +967,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> Toxunaraq Kəşf Et rejimini aktivləşdirmək istəyir. Toxunaraq Kəşf Et açıldığı zaman, barmağınızın altında nə olduğu haqda olan təsvirləri eşidə və ya görə bilərsiniz və ya telefonda insanlarla əlaqəyə keçmək üçün jestlər həyata keçirə bilərsiniz"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ay öncə"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 ay əvvəl"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 saniyə əvvəl"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> saniyə əvvəl"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 dəqiqə əvvəl"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> dəqiqə əvvəl"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 saat əvvəl"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> saat əvvəl"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Son <xliff:g id="COUNT">%d</xliff:g> gün"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Keçən ay"</string>
<string name="older" msgid="5211975022815554840">"Köhnə"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"dünən"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> gün əvvəl"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 saniyə ərzində"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> saniyə içində"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 dəqiqə içində"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> dəqiqə ərzində"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 saata"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> saata"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"sabah"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> gün ərzində"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 saniyə əvvəl"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> san əvvəl"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 dəqiqə əvvəl"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> dəqiqə əvvəl"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 saat əvvəl"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> saat əvvəl"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"dünən"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> gün əvvəl"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 san ərzində"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> san ərzində"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 dəq ərzində"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> dəqiqəyə"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 saat ərzində"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> saata"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"sabah"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> günə"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> tarixində"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"saat <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> ilində"</string>
diff --git a/core/res/res/values-bg/donottranslate-cldr.xml b/core/res/res/values-bg/donottranslate-cldr.xml
index 1943517..7c5ba7c 100755
--- a/core/res/res/values-bg/donottranslate-cldr.xml
+++ b/core/res/res/values-bg/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%d %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %d.%m.%Y</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 869150b..b182ab1 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> иска да активира изследването чрез докосване. Когато услугата е включена, можете да чувате или да виждате описания на това, което е под пръста ви, или да изпълнявате жестове, за да взаимодействате с телефона."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Преди 1 месец"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Преди повече от месец"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Преди 1 секунда"</item>
- <item quantity="other" msgid="3903706804349556379">"Преди <xliff:g id="COUNT">%d</xliff:g> секунди"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Преди 1 минута"</item>
- <item quantity="other" msgid="2176942008915455116">"Преди <xliff:g id="COUNT">%d</xliff:g> минути"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Преди 1 час"</item>
- <item quantity="other" msgid="2467273239587587569">"Преди <xliff:g id="COUNT">%d</xliff:g> часа"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Последните <xliff:g id="COUNT">%d</xliff:g> дни"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Последният месец"</string>
<string name="older" msgid="5211975022815554840">"По-стари"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"вчера"</item>
- <item quantity="other" msgid="2479586466153314633">"Преди <xliff:g id="COUNT">%d</xliff:g> дни"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"след 1 секунда"</item>
- <item quantity="other" msgid="1241926116443974687">"след <xliff:g id="COUNT">%d</xliff:g> секунди"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"след 1 минута"</item>
- <item quantity="other" msgid="3330713936399448749">"след <xliff:g id="COUNT">%d</xliff:g> минути"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"след 1 час"</item>
- <item quantity="other" msgid="547290677353727389">"след <xliff:g id="COUNT">%d</xliff:g> часа"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"утре"</item>
- <item quantity="other" msgid="5109449375100953247">"след <xliff:g id="COUNT">%d</xliff:g> дни"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"Преди 1 сек"</item>
- <item quantity="other" msgid="3699169366650930415">"Преди <xliff:g id="COUNT">%d</xliff:g> сек"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"Преди 1 мин"</item>
- <item quantity="other" msgid="851164968597150710">"Преди <xliff:g id="COUNT">%d</xliff:g> мин"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"Преди 1 час"</item>
- <item quantity="other" msgid="6889970745748538901">"Преди <xliff:g id="COUNT">%d</xliff:g> часа"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"вчера"</item>
- <item quantity="other" msgid="3453342639616481191">"Преди <xliff:g id="COUNT">%d</xliff:g> дни"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"след 1 сек"</item>
- <item quantity="other" msgid="5495880108825805108">"след <xliff:g id="COUNT">%d</xliff:g> сек"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"след 1 мин"</item>
- <item quantity="other" msgid="4216113292706568726">"след <xliff:g id="COUNT">%d</xliff:g> мин"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"след 1 час"</item>
- <item quantity="other" msgid="3705373766798013406">"след <xliff:g id="COUNT">%d</xliff:g> часа"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"утре"</item>
- <item quantity="other" msgid="2973062968038355991">"след <xliff:g id="COUNT">%d</xliff:g> дни"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"на <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"в <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"през <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn-rBD/strings.xml
index 53bb904b..a575ceb 100644
--- a/core/res/res/values-bn-rBD/strings.xml
+++ b/core/res/res/values-bn-rBD/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> \'স্পর্শের মাধ্যমে অন্বেষণ করুন\' সক্ষম করতে চাইছে৷ যখন \'স্পর্শের মাধ্যমে অন্বেষণ করুন\' চালু করা হবে তখন আপনার আঙ্গুলের নিয়ন্ত্রণে থাকা জিনিসের বর্ণনাগুলি শুনতে অথবা দেখতে পাবেন অথবা ফোনের সাথে ইন্টারঅ্যাক্ট করার জন্য অঙ্গভঙ্গির সাহায্য নিতে পারবেন৷"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"১ মাস আগে"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"১ মাস আগে"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"১ সেকেন্ড আগে"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> সেকেন্ড আগে"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"১ মিনিট আগে"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> মিনিট আগে"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"১ ঘন্টা আগে"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ঘন্টা আগে"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"গত <xliff:g id="COUNT">%d</xliff:g> দিনে"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"গত মাস"</string>
<string name="older" msgid="5211975022815554840">"পুরোনো"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"গতকাল"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> দিন আগে"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"১ সেকেন্ডের মধ্যে"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> সেকেন্ডের মধ্যে"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"১ মিনিটের মধ্যে"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> মিনিটের মধ্যে"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"১ ঘন্টার মধ্যে"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> ঘন্টার মধ্যে"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"আগামীকাল"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> দিনের মধ্যে"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"১ সেকেন্ড আগে"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> সেকেন্ড আগে"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"১ মিনিট আগে"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> মিনিট আগে"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"১ ঘন্টা আগে"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ঘন্টা আগে"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"গতকাল"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> দিন আগে"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"১ সেকেন্ডের মধ্যে"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> সেকেন্ডের মধ্যে"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"১ মিনিটের মধ্যে"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> মিনিটের মধ্যে"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"১ ঘন্টার মধ্যে"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> ঘন্টার মধ্যে"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"আগামীকাল"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> দিনের মধ্যে"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> এ"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> এ"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> এ"</string>
diff --git a/core/res/res/values-ca/donottranslate-cldr.xml b/core/res/res/values-ca/donottranslate-cldr.xml
index 13f623b..db2d1ec 100755
--- a/core/res/res/values-ca/donottranslate-cldr.xml
+++ b/core/res/res/values-ca/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B de %Y</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%-k:%M:%S %d/%m/%Y</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index c939c97..29bb458 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vol activar l\'exploració tàctil. Quan l\'exploració per tàctil està activada, pots escoltar o veure les descripcions del contingut seleccionat o utilitzar gestos per interactuar amb el telèfon."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Fa 1 mes"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Fa més d\'1 mes"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Fa 1 segon"</item>
- <item quantity="other" msgid="3903706804349556379">"Fa <xliff:g id="COUNT">%d</xliff:g> segons"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Fa 1 minut"</item>
- <item quantity="other" msgid="2176942008915455116">"Fa <xliff:g id="COUNT">%d</xliff:g> minuts"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Fa 1 hora"</item>
- <item quantity="other" msgid="2467273239587587569">"Fa <xliff:g id="COUNT">%d</xliff:g> hores"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Els darrers <xliff:g id="COUNT">%d</xliff:g> dies"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"El mes passat"</string>
<string name="older" msgid="5211975022815554840">"Més antigues"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"Ahir"</item>
- <item quantity="other" msgid="2479586466153314633">"Fa <xliff:g id="COUNT">%d</xliff:g> dies"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"d\'aquí a 1 segon"</item>
- <item quantity="other" msgid="1241926116443974687">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> segons"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"d\'aquí a 1 minut"</item>
- <item quantity="other" msgid="3330713936399448749">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> minuts"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"d\'aquí a 1 hora"</item>
- <item quantity="other" msgid="547290677353727389">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> hores"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"demà"</item>
- <item quantity="other" msgid="5109449375100953247">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> dies"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"Fa 1 s"</item>
- <item quantity="other" msgid="3699169366650930415">"Fa <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"fa 1 min"</item>
- <item quantity="other" msgid="851164968597150710">"Fa <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"Fa 1 hora"</item>
- <item quantity="other" msgid="6889970745748538901">"Fa <xliff:g id="COUNT">%d</xliff:g> hores"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ahir"</item>
- <item quantity="other" msgid="3453342639616481191">"Fa <xliff:g id="COUNT">%d</xliff:g> dies"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"d\'aquí a 1 s"</item>
- <item quantity="other" msgid="5495880108825805108">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"d\'aquí a 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> minuts"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"d\'aquí a 1 hora"</item>
- <item quantity="other" msgid="3705373766798013406">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> hores"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"demà"</item>
- <item quantity="other" msgid="2973062968038355991">"d\'aquí a <xliff:g id="COUNT">%d</xliff:g> dies"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"el <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"a les <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"el <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-cs/donottranslate-cldr.xml b/core/res/res/values-cs/donottranslate-cldr.xml
index 765c51e..51f7e38 100755
--- a/core/res/res/values-cs/donottranslate-cldr.xml
+++ b/core/res/res/values-cs/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s. %s. %s"</string>
<string name="month_day_year">%-e. %B %Y</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%-k:%M:%S %-e. %-m. %Y</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 2581b99..a79d7d0 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Služba <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> požaduje povolení funkce Prozkoumání dotykem. Pokud je funkce Prozkoumání dotykem zapnuta, můžete slyšet nebo vidět popisy objektů pod vaším prstem nebo ovládat telefon gesty."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"před 1 měsícem"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Déle než před 1 měsícem"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"před 1 sekundou"</item>
- <item quantity="other" msgid="3903706804349556379">"před <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"před 1 min"</item>
- <item quantity="other" msgid="2176942008915455116">"před <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"před 1 h"</item>
- <item quantity="other" msgid="2467273239587587569">"před <xliff:g id="COUNT">%d</xliff:g> h"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Posledních <xliff:g id="COUNT">%d</xliff:g> dnů"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Poslední měsíc"</string>
<string name="older" msgid="5211975022815554840">"Starší"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"včera"</item>
- <item quantity="other" msgid="2479586466153314633">"před <xliff:g id="COUNT">%d</xliff:g> dny"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"za 1 sekundu"</item>
- <item quantity="other" msgid="1241926116443974687">"za <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"za 1 minutu"</item>
- <item quantity="other" msgid="3330713936399448749">"za <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"za 1 hodinu"</item>
- <item quantity="other" msgid="547290677353727389">"za <xliff:g id="COUNT">%d</xliff:g> hod."</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"zítra"</item>
- <item quantity="other" msgid="5109449375100953247">"za <xliff:g id="COUNT">%d</xliff:g> dny"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"před 1 s"</item>
- <item quantity="other" msgid="3699169366650930415">"před <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"před 1 min"</item>
- <item quantity="other" msgid="851164968597150710">"před <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"před 1 h"</item>
- <item quantity="other" msgid="6889970745748538901">"před <xliff:g id="COUNT">%d</xliff:g> h"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"včera"</item>
- <item quantity="other" msgid="3453342639616481191">"před <xliff:g id="COUNT">%d</xliff:g> dny"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"za 1 s"</item>
- <item quantity="other" msgid="5495880108825805108">"za <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"za 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"za <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"za 1 hodinu"</item>
- <item quantity="other" msgid="3705373766798013406">"za <xliff:g id="COUNT">%d</xliff:g> hod."</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"zítra"</item>
- <item quantity="other" msgid="2973062968038355991">"za <xliff:g id="COUNT">%d</xliff:g> dny"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"dne <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"v <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"roku <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-da/donottranslate-cldr.xml b/core/res/res/values-da/donottranslate-cldr.xml
index 4c7a781..af35257 100755
--- a/core/res/res/values-da/donottranslate-cldr.xml
+++ b/core/res/res/values-da/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e. %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S, %-e. %b %Y</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index c3a9297..a128cc4 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ønsker at aktivere Udforsk ved berøring. Når Udforsk ved berøring er aktiveret, kan du høre eller se beskrivelser af, hvad der er under din finger, eller udføre bevægelser for at interagere med telefonen."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"for 1 måned siden"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Før for 1 måned siden"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"for 1 sekund siden"</item>
- <item quantity="other" msgid="3903706804349556379">"for <xliff:g id="COUNT">%d</xliff:g> sekunder siden"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"for 1 minut siden"</item>
- <item quantity="other" msgid="2176942008915455116">"for <xliff:g id="COUNT">%d</xliff:g> minutter siden"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"for 1 time siden"</item>
- <item quantity="other" msgid="2467273239587587569">"for <xliff:g id="COUNT">%d</xliff:g> timer siden"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Seneste <xliff:g id="COUNT">%d</xliff:g> dage"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Seneste måned"</string>
<string name="older" msgid="5211975022815554840">"Ældre"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"i går"</item>
- <item quantity="other" msgid="2479586466153314633">"for <xliff:g id="COUNT">%d</xliff:g> dage siden"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"om 1 sekund"</item>
- <item quantity="other" msgid="1241926116443974687">"om <xliff:g id="COUNT">%d</xliff:g> sekunder"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"om 1 minut"</item>
- <item quantity="other" msgid="3330713936399448749">"om <xliff:g id="COUNT">%d</xliff:g> minutter"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"om 1 time"</item>
- <item quantity="other" msgid="547290677353727389">"om <xliff:g id="COUNT">%d</xliff:g> timer"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"i morgen"</item>
- <item quantity="other" msgid="5109449375100953247">"om <xliff:g id="COUNT">%d</xliff:g> dage"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"for 1 sek. siden"</item>
- <item quantity="other" msgid="3699169366650930415">"for <xliff:g id="COUNT">%d</xliff:g> sek. siden"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"for 1 min. siden"</item>
- <item quantity="other" msgid="851164968597150710">"for <xliff:g id="COUNT">%d</xliff:g> min. siden"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"for 1 time siden"</item>
- <item quantity="other" msgid="6889970745748538901">"for <xliff:g id="COUNT">%d</xliff:g> timer siden"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"i går"</item>
- <item quantity="other" msgid="3453342639616481191">"for <xliff:g id="COUNT">%d</xliff:g> dage siden"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"om 1 sek."</item>
- <item quantity="other" msgid="5495880108825805108">"om <xliff:g id="COUNT">%d</xliff:g> sekunder"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"om 1 min."</item>
- <item quantity="other" msgid="4216113292706568726">"om <xliff:g id="COUNT">%d</xliff:g> min."</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"om 1 time"</item>
- <item quantity="other" msgid="3705373766798013406">"om <xliff:g id="COUNT">%d</xliff:g> timer"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"i morgen"</item>
- <item quantity="other" msgid="2973062968038355991">"om <xliff:g id="COUNT">%d</xliff:g> dage"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"den <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"i <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-de/donottranslate-cldr.xml b/core/res/res/values-de/donottranslate-cldr.xml
index 1fa067f..d641e10 100755
--- a/core/res/res/values-de/donottranslate-cldr.xml
+++ b/core/res/res/values-de/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e. %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%d.%m.%Y, %H:%M:%S</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 320bb75..d26cbfd 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> fordert die Aktivierung von \"Tippen &amp; Entdecken\". Wenn \"Tippen &amp; Entdecken\" aktiviert ist, können Sie Beschreibungen dessen hören oder sehen, was sich unter ihren Fingern befindet, oder Gesten ausführen, um mit dem Telefon zu kommunizieren."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Vor 1 Monat"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Vor mehr als 1 Monat"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"vor 1 Sekunde"</item>
- <item quantity="other" msgid="3903706804349556379">"vor <xliff:g id="COUNT">%d</xliff:g> Sekunden"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"vor 1 Minute"</item>
- <item quantity="other" msgid="2176942008915455116">"vor <xliff:g id="COUNT">%d</xliff:g> Minuten"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"vor 1 Stunde"</item>
- <item quantity="other" msgid="2467273239587587569">"vor <xliff:g id="COUNT">%d</xliff:g> Stunden"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Letzte <xliff:g id="COUNT">%d</xliff:g> Tage"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Letzter Monat"</string>
<string name="older" msgid="5211975022815554840">"Älter"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"gestern"</item>
- <item quantity="other" msgid="2479586466153314633">"vor <xliff:g id="COUNT">%d</xliff:g> Tagen"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"in 1 Sekunde"</item>
- <item quantity="other" msgid="1241926116443974687">"in <xliff:g id="COUNT">%d</xliff:g> Sekunden"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"in 1 Minute"</item>
- <item quantity="other" msgid="3330713936399448749">"in <xliff:g id="COUNT">%d</xliff:g> Minuten"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"in 1 Stunde"</item>
- <item quantity="other" msgid="547290677353727389">"In <xliff:g id="COUNT">%d</xliff:g> Stunden"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"morgen"</item>
- <item quantity="other" msgid="5109449375100953247">"in <xliff:g id="COUNT">%d</xliff:g> Tagen"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"vor 1 Sekunde"</item>
- <item quantity="other" msgid="3699169366650930415">"vor <xliff:g id="COUNT">%d</xliff:g> Sekunden"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"vor 1 Minute"</item>
- <item quantity="other" msgid="851164968597150710">"vor <xliff:g id="COUNT">%d</xliff:g> Minuten"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"vor 1 Stunde"</item>
- <item quantity="other" msgid="6889970745748538901">"vor <xliff:g id="COUNT">%d</xliff:g> Stunden"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"gestern"</item>
- <item quantity="other" msgid="3453342639616481191">"vor <xliff:g id="COUNT">%d</xliff:g> Tagen"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"in 1 Sekunde"</item>
- <item quantity="other" msgid="5495880108825805108">"in <xliff:g id="COUNT">%d</xliff:g> Sekunden"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"in 1 Minute"</item>
- <item quantity="other" msgid="4216113292706568726">"in <xliff:g id="COUNT">%d</xliff:g> Minuten"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"in 1 Stunde"</item>
- <item quantity="other" msgid="3705373766798013406">"In <xliff:g id="COUNT">%d</xliff:g> Stunden"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"morgen"</item>
- <item quantity="other" msgid="2973062968038355991">"in <xliff:g id="COUNT">%d</xliff:g> Tagen"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"am <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"um <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"im Jahr <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-el/donottranslate-cldr.xml b/core/res/res/values-el/donottranslate-cldr.xml
index 7da5a72..c7f41b4 100755
--- a/core/res/res/values-el/donottranslate-cldr.xml
+++ b/core/res/res/values-el/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%d %B %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%-l:%M:%S %p %d %b %Y</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index d027d76..4bc915c 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Η υπηρεσία <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> απαιτεί ενεργοποίηση της Εξερεύνησης μέσω αφής. Όταν είναι ενεργοποιημένη η Εξερεύνηση μέσω αφής, μπορείτε να δείτε ή να ακούσετε περιγραφές για τις επιλογές που βρίσκονται κάτω από το δάχτυλό σας ή να κάνετε κινήσεις αλληλεπίδρασης με το τηλέφωνό σας."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"πριν από 1 μήνα"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Παλαιότερα από 1 μήνα"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"πριν από 1 δευτερόλεπτο"</item>
- <item quantity="other" msgid="3903706804349556379">"πριν από <xliff:g id="COUNT">%d</xliff:g> δευτερόλεπτα"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"πριν από 1 λεπτό"</item>
- <item quantity="other" msgid="2176942008915455116">"πριν από <xliff:g id="COUNT">%d</xliff:g> λεπτά"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"πριν από 1 ώρα"</item>
- <item quantity="other" msgid="2467273239587587569">"πριν από <xliff:g id="COUNT">%d</xliff:g> ώρες"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Τελευταίες <xliff:g id="COUNT">%d</xliff:g> ημέρες"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Τελευταίος μήνας"</string>
<string name="older" msgid="5211975022815554840">"Παλαιότερα"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"χθες"</item>
- <item quantity="other" msgid="2479586466153314633">"πριν από <xliff:g id="COUNT">%d</xliff:g> ημέρες"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"σε 1 δευτερόλεπτο"</item>
- <item quantity="other" msgid="1241926116443974687">"σε <xliff:g id="COUNT">%d</xliff:g> δευτερόλεπτα"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"σε 1 λεπτό"</item>
- <item quantity="other" msgid="3330713936399448749">"σε <xliff:g id="COUNT">%d</xliff:g> λεπτά"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"σε 1 ώρα"</item>
- <item quantity="other" msgid="547290677353727389">"σε <xliff:g id="COUNT">%d</xliff:g> ώρες"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"αύριο"</item>
- <item quantity="other" msgid="5109449375100953247">"σε <xliff:g id="COUNT">%d</xliff:g> ημέρες"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"πριν από 1 δευτερόλεπτο"</item>
- <item quantity="other" msgid="3699169366650930415">"πριν από <xliff:g id="COUNT">%d</xliff:g> δευτερόλεπτα"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"πριν από 1 λεπτό"</item>
- <item quantity="other" msgid="851164968597150710">"πριν από <xliff:g id="COUNT">%d</xliff:g> λεπτά"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"πριν από 1 ώρα"</item>
- <item quantity="other" msgid="6889970745748538901">"πριν από <xliff:g id="COUNT">%d</xliff:g> ώρες"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"χθες"</item>
- <item quantity="other" msgid="3453342639616481191">"πριν από <xliff:g id="COUNT">%d</xliff:g> ημέρες"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"σε 1 δευτερόλεπτο"</item>
- <item quantity="other" msgid="5495880108825805108">"σε <xliff:g id="COUNT">%d</xliff:g> δευτερόλεπτα"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"σε 1 λεπτό"</item>
- <item quantity="other" msgid="4216113292706568726">"σε <xliff:g id="COUNT">%d</xliff:g> λεπτά"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"σε 1 ώρα"</item>
- <item quantity="other" msgid="3705373766798013406">"σε <xliff:g id="COUNT">%d</xliff:g> ώρες"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"αύριο"</item>
- <item quantity="other" msgid="2973062968038355991">"σε <xliff:g id="COUNT">%d</xliff:g> ημέρες"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"στις <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"στις <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"το <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-en-rAU/donottranslate-cldr.xml b/core/res/res/values-en-rAU/donottranslate-cldr.xml
index a7c07d3..69c3aea 100755
--- a/core/res/res/values-en-rAU/donottranslate-cldr.xml
+++ b/core/res/res/values-en-rAU/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%d/%m/%Y, %-l:%M:%S %p</string>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index beb9306..95c3b8f 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wants to enable Explore by Touch. When Explore by Touch is turned on, you can hear or see descriptions of what\'s under your finger or perform gestures to interact with the phone."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 month ago"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Before 1 month ago"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 second ago"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> seconds ago"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minute ago"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minutes ago"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 hour ago"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> hours ago"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Last <xliff:g id="COUNT">%d</xliff:g> days"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Last month"</string>
<string name="older" msgid="5211975022815554840">"Older"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"yesterday"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> days ago"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"in 1 second"</item>
- <item quantity="other" msgid="1241926116443974687">"in <xliff:g id="COUNT">%d</xliff:g> seconds"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"in 1 minute"</item>
- <item quantity="other" msgid="3330713936399448749">"in <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"in 1 hour"</item>
- <item quantity="other" msgid="547290677353727389">"in <xliff:g id="COUNT">%d</xliff:g> hours"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"tomorrow"</item>
- <item quantity="other" msgid="5109449375100953247">"in <xliff:g id="COUNT">%d</xliff:g> days"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 sec ago"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> secs ago"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 min ago"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> mins ago"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 hour ago"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> hours ago"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"yesterday"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> days ago"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"in 1 sec"</item>
- <item quantity="other" msgid="5495880108825805108">"in <xliff:g id="COUNT">%d</xliff:g> secs"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"in 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"in <xliff:g id="COUNT">%d</xliff:g> mins"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"in 1 hour"</item>
- <item quantity="other" msgid="3705373766798013406">"in <xliff:g id="COUNT">%d</xliff:g> hours"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"tomorrow"</item>
- <item quantity="other" msgid="2973062968038355991">"in <xliff:g id="COUNT">%d</xliff:g> days"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"on <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"at <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"in<xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-en-rCA/donottranslate-cldr.xml b/core/res/res/values-en-rCA/donottranslate-cldr.xml
index b632f81..57b80df 100755
--- a/core/res/res/values-en-rCA/donottranslate-cldr.xml
+++ b/core/res/res/values-en-rCA/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s-%s-%s"</string>
<string name="month_day_year">%B %-e, %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%Y-%m-%d, %-l:%M:%S %p</string>
diff --git a/core/res/res/values-en-rGB/donottranslate-cldr.xml b/core/res/res/values-en-rGB/donottranslate-cldr.xml
index d099376..db438f2 100755
--- a/core/res/res/values-en-rGB/donottranslate-cldr.xml
+++ b/core/res/res/values-en-rGB/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%-e %b %Y, %H:%M:%S</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index beb9306..95c3b8f 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wants to enable Explore by Touch. When Explore by Touch is turned on, you can hear or see descriptions of what\'s under your finger or perform gestures to interact with the phone."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 month ago"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Before 1 month ago"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 second ago"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> seconds ago"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minute ago"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minutes ago"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 hour ago"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> hours ago"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Last <xliff:g id="COUNT">%d</xliff:g> days"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Last month"</string>
<string name="older" msgid="5211975022815554840">"Older"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"yesterday"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> days ago"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"in 1 second"</item>
- <item quantity="other" msgid="1241926116443974687">"in <xliff:g id="COUNT">%d</xliff:g> seconds"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"in 1 minute"</item>
- <item quantity="other" msgid="3330713936399448749">"in <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"in 1 hour"</item>
- <item quantity="other" msgid="547290677353727389">"in <xliff:g id="COUNT">%d</xliff:g> hours"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"tomorrow"</item>
- <item quantity="other" msgid="5109449375100953247">"in <xliff:g id="COUNT">%d</xliff:g> days"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 sec ago"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> secs ago"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 min ago"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> mins ago"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 hour ago"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> hours ago"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"yesterday"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> days ago"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"in 1 sec"</item>
- <item quantity="other" msgid="5495880108825805108">"in <xliff:g id="COUNT">%d</xliff:g> secs"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"in 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"in <xliff:g id="COUNT">%d</xliff:g> mins"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"in 1 hour"</item>
- <item quantity="other" msgid="3705373766798013406">"in <xliff:g id="COUNT">%d</xliff:g> hours"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"tomorrow"</item>
- <item quantity="other" msgid="2973062968038355991">"in <xliff:g id="COUNT">%d</xliff:g> days"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"on <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"at <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"in<xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-en-rIE/donottranslate-cldr.xml b/core/res/res/values-en-rIE/donottranslate-cldr.xml
index d099376..db438f2 100755
--- a/core/res/res/values-en-rIE/donottranslate-cldr.xml
+++ b/core/res/res/values-en-rIE/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%-e %b %Y, %H:%M:%S</string>
diff --git a/core/res/res/values-en-rIN/donottranslate-cldr.xml b/core/res/res/values-en-rIN/donottranslate-cldr.xml
index 1d9470c..84157fe 100755
--- a/core/res/res/values-en-rIN/donottranslate-cldr.xml
+++ b/core/res/res/values-en-rIN/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%d-%b-%Y, %-l:%M:%S %p</string>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index beb9306..95c3b8f 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wants to enable Explore by Touch. When Explore by Touch is turned on, you can hear or see descriptions of what\'s under your finger or perform gestures to interact with the phone."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 month ago"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Before 1 month ago"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 second ago"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> seconds ago"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minute ago"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minutes ago"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 hour ago"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> hours ago"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Last <xliff:g id="COUNT">%d</xliff:g> days"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Last month"</string>
<string name="older" msgid="5211975022815554840">"Older"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"yesterday"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> days ago"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"in 1 second"</item>
- <item quantity="other" msgid="1241926116443974687">"in <xliff:g id="COUNT">%d</xliff:g> seconds"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"in 1 minute"</item>
- <item quantity="other" msgid="3330713936399448749">"in <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"in 1 hour"</item>
- <item quantity="other" msgid="547290677353727389">"in <xliff:g id="COUNT">%d</xliff:g> hours"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"tomorrow"</item>
- <item quantity="other" msgid="5109449375100953247">"in <xliff:g id="COUNT">%d</xliff:g> days"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 sec ago"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> secs ago"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 min ago"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> mins ago"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 hour ago"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> hours ago"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"yesterday"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> days ago"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"in 1 sec"</item>
- <item quantity="other" msgid="5495880108825805108">"in <xliff:g id="COUNT">%d</xliff:g> secs"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"in 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"in <xliff:g id="COUNT">%d</xliff:g> mins"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"in 1 hour"</item>
- <item quantity="other" msgid="3705373766798013406">"in <xliff:g id="COUNT">%d</xliff:g> hours"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"tomorrow"</item>
- <item quantity="other" msgid="2973062968038355991">"in <xliff:g id="COUNT">%d</xliff:g> days"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"on <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"at <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"in<xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-en-rNZ/donottranslate-cldr.xml b/core/res/res/values-en-rNZ/donottranslate-cldr.xml
index a4ff357..4e9bec6 100755
--- a/core/res/res/values-en-rNZ/donottranslate-cldr.xml
+++ b/core/res/res/values-en-rNZ/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%-e/%m/%Y, %-l:%M:%S %p</string>
diff --git a/core/res/res/values-en-rSG/strings.xml b/core/res/res/values-en-rSG/strings.xml
index 09a8490..5ba1082 100644
--- a/core/res/res/values-en-rSG/strings.xml
+++ b/core/res/res/values-en-rSG/strings.xml
@@ -776,22 +776,6 @@
<skip />
<!-- no translation found for beforeOneMonthDurationPast (7578100953282866827) -->
<skip />
- <!-- no translation found for num_seconds_ago:one (7416512229671810725) -->
- <!-- no translation found for num_seconds_ago:other (8138756910300398447) -->
- <!-- no translation found for num_minutes_ago:one (8620869479299420562) -->
- <!-- no translation found for num_minutes_ago:other (5065488162050522741) -->
- <!-- no translation found for num_hours_ago:one (853404611989669641) -->
- <!-- no translation found for num_hours_ago:other (3558873784561756849) -->
- <!-- no translation found for num_days_ago:one (4222479980812128212) -->
- <!-- no translation found for num_days_ago:other (5445701370433601703) -->
- <!-- no translation found for in_num_seconds:one (4253290037777327003) -->
- <!-- no translation found for in_num_seconds:other (1280033870920841404) -->
- <!-- no translation found for in_num_minutes:one (1487585791027953091) -->
- <!-- no translation found for in_num_minutes:other (6274204576475209932) -->
- <!-- no translation found for in_num_hours:one (6501470863235186391) -->
- <!-- no translation found for in_num_hours:other (4415358752953289251) -->
- <!-- no translation found for in_num_days:one (5608475533104443893) -->
- <!-- no translation found for in_num_days:other (3827193006163842267) -->
<!-- no translation found for preposition_for_date (2689847983632851560) -->
<skip />
<!-- no translation found for preposition_for_time (2613388053493148013) -->
diff --git a/core/res/res/values-en-rUS/donottranslate-cldr.xml b/core/res/res/values-en-rUS/donottranslate-cldr.xml
index 80db6e4..a8e2b2b 100755
--- a/core/res/res/values-en-rUS/donottranslate-cldr.xml
+++ b/core/res/res/values-en-rUS/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%B %-e, %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%b %-e, %Y, %-l:%M:%S %p</string>
diff --git a/core/res/res/values-en-rUS/strings.xml b/core/res/res/values-en-rUS/strings.xml
index fdc0d69..adae7f4 100644
--- a/core/res/res/values-en-rUS/strings.xml
+++ b/core/res/res/values-en-rUS/strings.xml
@@ -777,22 +777,6 @@
<skip />
<!-- no translation found for beforeOneMonthDurationPast (7578100953282866827) -->
<skip />
- <!-- no translation found for num_seconds_ago:one (7416512229671810725) -->
- <!-- no translation found for num_seconds_ago:other (8138756910300398447) -->
- <!-- no translation found for num_minutes_ago:one (8620869479299420562) -->
- <!-- no translation found for num_minutes_ago:other (5065488162050522741) -->
- <!-- no translation found for num_hours_ago:one (853404611989669641) -->
- <!-- no translation found for num_hours_ago:other (3558873784561756849) -->
- <!-- no translation found for num_days_ago:one (4222479980812128212) -->
- <!-- no translation found for num_days_ago:other (5445701370433601703) -->
- <!-- no translation found for in_num_seconds:one (4253290037777327003) -->
- <!-- no translation found for in_num_seconds:other (1280033870920841404) -->
- <!-- no translation found for in_num_minutes:one (1487585791027953091) -->
- <!-- no translation found for in_num_minutes:other (6274204576475209932) -->
- <!-- no translation found for in_num_hours:one (6501470863235186391) -->
- <!-- no translation found for in_num_hours:other (4415358752953289251) -->
- <!-- no translation found for in_num_days:one (5608475533104443893) -->
- <!-- no translation found for in_num_days:other (3827193006163842267) -->
<!-- no translation found for preposition_for_date (2689847983632851560) -->
<skip />
<!-- no translation found for preposition_for_time (2613388053493148013) -->
diff --git a/core/res/res/values-en-rZA/donottranslate-cldr.xml b/core/res/res/values-en-rZA/donottranslate-cldr.xml
index 7c27604..a4a5308 100755
--- a/core/res/res/values-en-rZA/donottranslate-cldr.xml
+++ b/core/res/res/values-en-rZA/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%d %B %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%d %b %Y, %-l:%M:%S %p</string>
diff --git a/core/res/res/values-es-rUS/donottranslate-cldr.xml b/core/res/res/values-es-rUS/donottranslate-cldr.xml
index 878b48f..8adac31 100755
--- a/core/res/res/values-es-rUS/donottranslate-cldr.xml
+++ b/core/res/res/values-es-rUS/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e de %B de %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%-l:%M:%S %p %b %-e, %Y</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index c04dab4..62e506b 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> desea activar la exploración táctil. Cuando esta función esté activada, podrás escuchar o ver descripciones del contenido seleccionado o usar gestos para interactuar con el dispositivo."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Hace 1 mes."</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Anterior a 1 mes atrás"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"hace 1 segundo"</item>
- <item quantity="other" msgid="3903706804349556379">"hace <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Hace 1 minuto."</item>
- <item quantity="other" msgid="2176942008915455116">"hace <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Hace 1 hora"</item>
- <item quantity="other" msgid="2467273239587587569">"Hace <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Últimos <xliff:g id="COUNT">%d</xliff:g> días"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Último mes"</string>
<string name="older" msgid="5211975022815554840">"Antiguos"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ayer"</item>
- <item quantity="other" msgid="2479586466153314633">"Hace <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"en 1 segundo"</item>
- <item quantity="other" msgid="1241926116443974687">"en <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"en 1 minuto"</item>
- <item quantity="other" msgid="3330713936399448749">"en <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"en 1 hora"</item>
- <item quantity="other" msgid="547290677353727389">"en <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"mañana"</item>
- <item quantity="other" msgid="5109449375100953247">"en <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"hace 1 segundo"</item>
- <item quantity="other" msgid="3699169366650930415">"hace <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"hace 1 min"</item>
- <item quantity="other" msgid="851164968597150710">"Hace <xliff:g id="COUNT">%d</xliff:g> minutos."</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"Hace 1 hora"</item>
- <item quantity="other" msgid="6889970745748538901">"hace <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ayer"</item>
- <item quantity="other" msgid="3453342639616481191">"Hace <xliff:g id="COUNT">%d</xliff:g> días."</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"en 1 segundo"</item>
- <item quantity="other" msgid="5495880108825805108">"en <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"en 1 minuto"</item>
- <item quantity="other" msgid="4216113292706568726">"en <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"en 1 hora"</item>
- <item quantity="other" msgid="3705373766798013406">"en <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"mañana"</item>
- <item quantity="other" msgid="2973062968038355991">"en <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"activado <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"a las <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"en <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-es/donottranslate-cldr.xml b/core/res/res/values-es/donottranslate-cldr.xml
index d73a715..ca16aa0 100755
--- a/core/res/res/values-es/donottranslate-cldr.xml
+++ b/core/res/res/values-es/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e de %B de %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%d/%m/%Y, %H:%M:%S</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index b9b13ad..6859732 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> quiere habilitar la exploración táctil. Cuando esta función esté activada, podrás escuchar o ver descripciones del contenido seleccionado o usar gestos para interactuar con el teléfono."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Hace un mes"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Hace más de un mes"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Hace 1 segundo"</item>
- <item quantity="other" msgid="3903706804349556379">"Hace <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Hace 1 minuto"</item>
- <item quantity="other" msgid="2176942008915455116">"Hace <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Hace 1 hora"</item>
- <item quantity="other" msgid="2467273239587587569">"Hace <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Últimos <xliff:g id="COUNT">%d</xliff:g> días"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"El mes pasado"</string>
<string name="older" msgid="5211975022815554840">"Anterior"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"Ayer"</item>
- <item quantity="other" msgid="2479586466153314633">"Hace <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"dentro de 1 segundo"</item>
- <item quantity="other" msgid="1241926116443974687">"dentro de <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"dentro de 1 minuto"</item>
- <item quantity="other" msgid="3330713936399448749">"dentro de <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"dentro de 1 hora"</item>
- <item quantity="other" msgid="547290677353727389">"dentro de <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"mañana"</item>
- <item quantity="other" msgid="5109449375100953247">"dentro de <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"hace 1 segundo"</item>
- <item quantity="other" msgid="3699169366650930415">"hace <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"hace 1 minuto"</item>
- <item quantity="other" msgid="851164968597150710">"hace <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"hace 1 hora"</item>
- <item quantity="other" msgid="6889970745748538901">"hace <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"Ayer"</item>
- <item quantity="other" msgid="3453342639616481191">"hace <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"dentro de 1 segundo"</item>
- <item quantity="other" msgid="5495880108825805108">"dentro de <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"dentro de 1 minuto"</item>
- <item quantity="other" msgid="4216113292706568726">"dentro de <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"dentro de 1 hora"</item>
- <item quantity="other" msgid="3705373766798013406">"dentro de <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"mañana"</item>
- <item quantity="other" msgid="2973062968038355991">"dentro de <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"el <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"a las <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"en <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-et-rEE/strings.xml b/core/res/res/values-et-rEE/strings.xml
index d90b15a..22ded2d 100644
--- a/core/res/res/values-et-rEE/strings.xml
+++ b/core/res/res/values-et-rEE/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> soovib lubada puudutusega uurimise. Kui puudutusega uurimine on sisse lülitatud, kuulete või näete kirjeldusi asjade kohta, mis on teie sõrme all, või saate suhelda telefoniga liigutuste abil."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 kuu tagasi"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Varem kui 1 kuu tagasi"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 sekund tagasi"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> sekundit tagasi"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minut tagasi"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minutit tagasi"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 tund tagasi"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> tundi tagasi"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Viimased <xliff:g id="COUNT">%d</xliff:g> päeva"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Eelmisel kuul"</string>
<string name="older" msgid="5211975022815554840">"Vanem"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"eile"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> päeva tagasi"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 sekundi pärast"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> sekundi pärast"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 minuti pärast"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> minuti pärast"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 tunni pärast"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> tunni pärast"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"homme"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> päeva pärast"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 s tagasi"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> sekundit tagasi"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 minut tagasi"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> minutit tagasi"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 tund tagasi"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> tundi tagasi"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"eile"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> päeva tagasi"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 sekundi pärast"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> sekundi pärast"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 minuti pärast"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> minuti pärast"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 tunni pärast"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> tunni pärast"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"homme"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> päeva pärast"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"kuupäeval <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"kell <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"aastal <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-eu-rES/strings.xml b/core/res/res/values-eu-rES/strings.xml
index 632c09f..694fe86 100644
--- a/core/res/res/values-eu-rES/strings.xml
+++ b/core/res/res/values-eu-rES/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> zerbitzuak \"Arakatu ukituta\" eginbidea gaitu nahi du. Eginbide hori aktibatuta dagoenean, hatzaren azpian duzunaren azalpena ikus edo entzun dezakezu, edo telefonoarekin elkarrekintzan aritzeko keinuak egin ditzakezu."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Duela hilabete"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Duela hilabete baino gutxiago"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"duela segundo bat"</item>
- <item quantity="other" msgid="3903706804349556379">"duela <xliff:g id="COUNT">%d</xliff:g> segundo"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"duela minutu bat"</item>
- <item quantity="other" msgid="2176942008915455116">"duela <xliff:g id="COUNT">%d</xliff:g> minutu"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Duela ordubete"</item>
- <item quantity="other" msgid="2467273239587587569">"duela <xliff:g id="COUNT">%d</xliff:g> ordu"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"azken <xliff:g id="COUNT">%d</xliff:g> egunak"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Azken hilabetea"</string>
<string name="older" msgid="5211975022815554840">"Zaharragoa"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"atzo"</item>
- <item quantity="other" msgid="2479586466153314633">"Duela <xliff:g id="COUNT">%d</xliff:g> egun"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"segundo bat barru"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> segundo barru"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"Minutu bat barru"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> minutu barru"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"Ordubete barru"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> ordu barru"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"bihar"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> egun barru"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"duela segundo bat"</item>
- <item quantity="other" msgid="3699169366650930415">"duela <xliff:g id="COUNT">%d</xliff:g> segundo"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"duela minutu bat"</item>
- <item quantity="other" msgid="851164968597150710">"duela <xliff:g id="COUNT">%d</xliff:g> minutu"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"duela ordubete"</item>
- <item quantity="other" msgid="6889970745748538901">"duela <xliff:g id="COUNT">%d</xliff:g> ordu"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"atzo"</item>
- <item quantity="other" msgid="3453342639616481191">"Duela <xliff:g id="COUNT">%d</xliff:g> egun"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"segundo bat barru"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> segundo barru"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"minutu bat barru"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> minutu barru"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"ordubete barru"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> ordu barru"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"bihar"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> egun barru"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"data: <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"ordua: <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"urtea: <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-fa/donottranslate-cldr.xml b/core/res/res/values-fa/donottranslate-cldr.xml
index bb77b31..2821cd5 100755
--- a/core/res/res/values-fa/donottranslate-cldr.xml
+++ b/core/res/res/values-fa/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%-k:%M:%S،‏ %Y/%-m/%-e</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index d03315a..dd675a9 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> می‌خواهد «کاوش با لمس» را فعال کند. وقتی «کاوش با لمس» فعال است، می‌توانید توضیحاتی را برای آنچه که زیر انگشت شما است مشاهده کرده یا بشنوید یا برای استفاده از تلفن خود از حرکات استفاده کنید."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"۱ ماه قبل"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"قبل از ۱ ماه گذشته"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"۱ ثانیه قبل"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> ثانیه قبل"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"۱ دقیقه قبل"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> دقیقه قبل"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"۱ ساعت قبل"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ساعت قبل"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"<xliff:g id="COUNT">%d</xliff:g> روز گذشته"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"ماه گذشته"</string>
<string name="older" msgid="5211975022815554840">"قدیمی تر"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ديروز"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> روز قبل"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"در ۱ ثانیه"</item>
- <item quantity="other" msgid="1241926116443974687">"در <xliff:g id="COUNT">%d</xliff:g> ثانیه"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"در ۱ دقیقه"</item>
- <item quantity="other" msgid="3330713936399448749">"در <xliff:g id="COUNT">%d</xliff:g> دقیقه"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"در ۱ ساعت"</item>
- <item quantity="other" msgid="547290677353727389">"در <xliff:g id="COUNT">%d</xliff:g> ساعت"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"فردا"</item>
- <item quantity="other" msgid="5109449375100953247">"در <xliff:g id="COUNT">%d</xliff:g> روز"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"۱ ثانیه قبل"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> ثانیه قبل"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"۱ دقیقه قبل"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> دقیقه قبل"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"۱ ساعت قبل"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ساعت قبل"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ديروز"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> روز قبل"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"در ۱ ثانیه"</item>
- <item quantity="other" msgid="5495880108825805108">"در <xliff:g id="COUNT">%d</xliff:g> ثانیه"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"در ۱ دقیقه"</item>
- <item quantity="other" msgid="4216113292706568726">"در <xliff:g id="COUNT">%d</xliff:g> دقیقه"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"در ۱ ساعت"</item>
- <item quantity="other" msgid="3705373766798013406">"در <xliff:g id="COUNT">%d</xliff:g> ساعت"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"فردا"</item>
- <item quantity="other" msgid="2973062968038355991">"در <xliff:g id="COUNT">%d</xliff:g> روز"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"در <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"در <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"در <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-fi-rFI/donottranslate-cldr.xml b/core/res/res/values-fi-rFI/donottranslate-cldr.xml
index 8e8c640..eab4957 100755
--- a/core/res/res/values-fi-rFI/donottranslate-cldr.xml
+++ b/core/res/res/values-fi-rFI/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e. %B %Y</string>
<string name="time_of_day">%-k.%M.%S</string>
<string name="date_and_time">%-k.%M.%S %-e.%-m.%Y</string>
diff --git a/core/res/res/values-fi/donottranslate-cldr.xml b/core/res/res/values-fi/donottranslate-cldr.xml
index 8e8c640..eab4957 100755
--- a/core/res/res/values-fi/donottranslate-cldr.xml
+++ b/core/res/res/values-fi/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e. %B %Y</string>
<string name="time_of_day">%-k.%M.%S</string>
<string name="date_and_time">%-k.%M.%S %-e.%-m.%Y</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index cc2989b..19526c2 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> haluaa ottaa Tutustu koskettamalla -ominaisuuden käyttöön. Kun Tutustu koskettamalla on käytössä, näet tai kuulet kuvauksen sormen alla olevista kohteista ja voit käyttää puhelinta sormieleiden avulla."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"kuukausi sitten"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Yli kuukausi sitten"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 sekunti sitten"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> sekuntia sitten"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minuutti sitten"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minuuttia sitten"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 tunti sitten"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> tuntia sitten"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Viimeisen <xliff:g id="COUNT">%d</xliff:g> päivän aikana"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Viime kuussa"</string>
<string name="older" msgid="5211975022815554840">"Vanhemmat"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"eilen"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> päivää sitten"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 sekunnin kuluttua"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> sekunnin kuluttua"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 minuutin kuluttua"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> minuutin kuluttua"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 tunnin kuluttua"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> tunnin kuluttua"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"huomenna"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> päivän kuluttua"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 s sitten"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> s sitten"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 min sitten"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> min sitten"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 tunti sitten"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> tuntia sitten"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"eilen"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> päivää sitten"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 s kuluttua"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> sekunnin kuluttua"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 min kuluttua"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> min kuluttua"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 tunnin kuluttua"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> tunnin kuluttua"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"huomenna"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> päivän kuluttua"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"päivä: <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"klo <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"vuonna <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 7c20f8f..5afacd4 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> souhaite activer la fonctionnalité \"Explorer au toucher\". Lorsque celle-ci est activée, vous pouvez entendre ou voir les descriptions des éléments que vous sélectionnez, ou bien interagir avec le téléphone en effectuant certains gestes."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Il y a 1 mois"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Il y a plus d\'un mois"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"il y a 1 seconde"</item>
- <item quantity="other" msgid="3903706804349556379">"Il y a <xliff:g id="COUNT">%d</xliff:g> secondes"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Il y a 1 minute"</item>
- <item quantity="other" msgid="2176942008915455116">"Il y a <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Il y a 1 heure"</item>
- <item quantity="other" msgid="2467273239587587569">"il y a <xliff:g id="COUNT">%d</xliff:g> heures"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Les <xliff:g id="COUNT">%d</xliff:g> derniers jours"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Le mois dernier"</string>
<string name="older" msgid="5211975022815554840">"Précédent"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"hier"</item>
- <item quantity="other" msgid="2479586466153314633">"il y a <xliff:g id="COUNT">%d</xliff:g> jours"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"dans 1 seconde"</item>
- <item quantity="other" msgid="1241926116443974687">"dans <xliff:g id="COUNT">%d</xliff:g> secondes"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"dans 1 minute"</item>
- <item quantity="other" msgid="3330713936399448749">"dans <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"dans 1 heure"</item>
- <item quantity="other" msgid="547290677353727389">"dans <xliff:g id="COUNT">%d</xliff:g> heures"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"demain"</item>
- <item quantity="other" msgid="5109449375100953247">"dans <xliff:g id="COUNT">%d</xliff:g> jours"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"il y a 1 seconde"</item>
- <item quantity="other" msgid="3699169366650930415">"il y a <xliff:g id="COUNT">%d</xliff:g> secondes"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"il y a 1 min"</item>
- <item quantity="other" msgid="851164968597150710">"il y a <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"Il y a 1 h"</item>
- <item quantity="other" msgid="6889970745748538901">"il y a <xliff:g id="COUNT">%d</xliff:g> heures"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"hier"</item>
- <item quantity="other" msgid="3453342639616481191">"il y a <xliff:g id="COUNT">%d</xliff:g> jours"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"dans 1 seconde"</item>
- <item quantity="other" msgid="5495880108825805108">"dans <xliff:g id="COUNT">%d</xliff:g> secondes"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"dans 1 minute"</item>
- <item quantity="other" msgid="4216113292706568726">"dans <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"dans 1 heure"</item>
- <item quantity="other" msgid="3705373766798013406">"dans <xliff:g id="COUNT">%d</xliff:g> heures"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"demain"</item>
- <item quantity="other" msgid="2973062968038355991">"dans <xliff:g id="COUNT">%d</xliff:g> jours"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"le <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"à <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"en <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-fr/donottranslate-cldr.xml b/core/res/res/values-fr/donottranslate-cldr.xml
index 5fc3539..2d6a109 100755
--- a/core/res/res/values-fr/donottranslate-cldr.xml
+++ b/core/res/res/values-fr/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%-e %b %Y à %H:%M:%S</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index a11d055..eb12749 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> souhaite activer la fonctionnalité \"Explorer au toucher\". Lorsque celle-ci est activée, vous pouvez entendre ou voir les descriptions des éléments que vous sélectionnez, ou bien interagir avec le téléphone en effectuant certains gestes."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Il y a 1 mois"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Il y a plus d\'un mois"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Il y a 1 seconde"</item>
- <item quantity="other" msgid="3903706804349556379">"Il y a <xliff:g id="COUNT">%d</xliff:g> secondes"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Il y a 1 minute"</item>
- <item quantity="other" msgid="2176942008915455116">"Il y a <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"il y a 1 heure"</item>
- <item quantity="other" msgid="2467273239587587569">"Il y a <xliff:g id="COUNT">%d</xliff:g> heures"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Les <xliff:g id="COUNT">%d</xliff:g> derniers jours"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Le mois dernier"</string>
<string name="older" msgid="5211975022815554840">"Préc."</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"hier"</item>
- <item quantity="other" msgid="2479586466153314633">"Il y a <xliff:g id="COUNT">%d</xliff:g> jours"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"dans 1 seconde"</item>
- <item quantity="other" msgid="1241926116443974687">"dans <xliff:g id="COUNT">%d</xliff:g> secondes"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"dans 1 minute"</item>
- <item quantity="other" msgid="3330713936399448749">"dans <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"dans 1 heure"</item>
- <item quantity="other" msgid="547290677353727389">"dans <xliff:g id="COUNT">%d</xliff:g> heures"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"demain"</item>
- <item quantity="other" msgid="5109449375100953247">"dans <xliff:g id="COUNT">%d</xliff:g> jours"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"il y a 1 seconde"</item>
- <item quantity="other" msgid="3699169366650930415">"il y a <xliff:g id="COUNT">%d</xliff:g> secondes"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"il y a 1 minute"</item>
- <item quantity="other" msgid="851164968597150710">"il y a <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"il y a 1 heure"</item>
- <item quantity="other" msgid="6889970745748538901">"Il y a <xliff:g id="COUNT">%d</xliff:g> heures"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"hier"</item>
- <item quantity="other" msgid="3453342639616481191">"Il y a <xliff:g id="COUNT">%d</xliff:g> jours"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"dans 1 seconde"</item>
- <item quantity="other" msgid="5495880108825805108">"dans <xliff:g id="COUNT">%d</xliff:g> secondes"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"dans 1 minute"</item>
- <item quantity="other" msgid="4216113292706568726">"dans <xliff:g id="COUNT">%d</xliff:g> minutes"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"dans 1 heure"</item>
- <item quantity="other" msgid="3705373766798013406">"dans <xliff:g id="COUNT">%d</xliff:g> heures"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"demain"</item>
- <item quantity="other" msgid="2973062968038355991">"dans <xliff:g id="COUNT">%d</xliff:g> jours"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"le <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"à <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"en <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-gl-rES/strings.xml b/core/res/res/values-gl-rES/strings.xml
index 346fb4a..e46cb64 100644
--- a/core/res/res/values-gl-rES/strings.xml
+++ b/core/res/res/values-gl-rES/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> quere activar a exploración táctil. Cando a exploración táctil estea activada, poderás escoitar ou ver descricións do contido seleccionado ou realizar xestos para interactuar co teléfono."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Hai 1 mes"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Hai máis de 1 mes"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"hai 1 segundo"</item>
- <item quantity="other" msgid="3903706804349556379">"hai <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"hai 1 minuto"</item>
- <item quantity="other" msgid="2176942008915455116">"hai <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Hai 1 hora"</item>
- <item quantity="other" msgid="2467273239587587569">"hai <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Últimos <xliff:g id="COUNT">%d</xliff:g> días"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"O mes pasado"</string>
<string name="older" msgid="5211975022815554840">"Antes"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"onte"</item>
- <item quantity="other" msgid="2479586466153314633">"Hai <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"en 1 segundo"</item>
- <item quantity="other" msgid="1241926116443974687">"en <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"En 1 minuto"</item>
- <item quantity="other" msgid="3330713936399448749">"en <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"En 1 hora"</item>
- <item quantity="other" msgid="547290677353727389">"En <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"mañá"</item>
- <item quantity="other" msgid="5109449375100953247">"en <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"hai 1 s"</item>
- <item quantity="other" msgid="3699169366650930415">"hai <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"hai 1 min"</item>
- <item quantity="other" msgid="851164968597150710">"hai <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"hai 1 hora"</item>
- <item quantity="other" msgid="6889970745748538901">"hai <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"onte"</item>
- <item quantity="other" msgid="3453342639616481191">"Hai <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"en 1 s"</item>
- <item quantity="other" msgid="5495880108825805108">"en <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"en 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"en <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"en 1 hora"</item>
- <item quantity="other" msgid="3705373766798013406">"en <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"mañá"</item>
- <item quantity="other" msgid="2973062968038355991">"en <xliff:g id="COUNT">%d</xliff:g> días"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"o <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"ás <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"no <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-hi-rIN/donottranslate-cldr.xml b/core/res/res/values-hi-rIN/donottranslate-cldr.xml
index 8f30750..b1dc879 100755
--- a/core/res/res/values-hi-rIN/donottranslate-cldr.xml
+++ b/core/res/res/values-hi-rIN/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s-%s-%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%-l:%M:%S %p %d-%m-%Y</string>
diff --git a/core/res/res/values-hi/donottranslate-cldr.xml b/core/res/res/values-hi/donottranslate-cldr.xml
index 8f30750..b1dc879 100755
--- a/core/res/res/values-hi/donottranslate-cldr.xml
+++ b/core/res/res/values-hi/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s-%s-%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%-l:%M:%S %p %d-%m-%Y</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 42865c4..6c69adb 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> स्‍पर्श के द्वारा अन्‍वेषण करें सक्षम करना चाहती है. स्‍पर्श के द्वारा अन्‍वेष करें चालू होने पर, आप अपनी अंगुली के नीचे क्या है उसका विवरण सुन सकते हैं या देख सकते हैं या फ़ोन से डॉयलॉग करने के लिए जेस्‍चर निष्‍पादित कर सकते हैं."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 माह पहले"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 माह से पहले"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 सेकंड पहले"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> सेकंड पहले"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 मिनट पहले"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> मिनट पहले"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 घंटे पहले"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> घंटे पहले"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"अंतिम <xliff:g id="COUNT">%d</xliff:g> दिन"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"पिछला माह"</string>
<string name="older" msgid="5211975022815554840">"इससे पुराना"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"बीता कल"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> दिन पहले"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 सेकंड में"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> सेकंड में"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 मिनट में"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> मिनट में"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 घंटे में"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> घंटे में"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"आने वाला कल"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> दिन में"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 सेकंड पहले"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> सेकंड पहले"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 मिनट पहले"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> मिनट पहले"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 घंटे पहले"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> घंटे पहले"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"बीता कल"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> दिन पहले"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 सेकंड में"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> सेकंड में"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 मिनट में"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> मिनट में"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 घंटे में"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> घंटे में"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"आने वाला कल"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> दिन में"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> को"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> पर"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> में"</string>
diff --git a/core/res/res/values-hr-rHR/donottranslate-cldr.xml b/core/res/res/values-hr-rHR/donottranslate-cldr.xml
index 2eb6d87..ca21a47 100755
--- a/core/res/res/values-hr-rHR/donottranslate-cldr.xml
+++ b/core/res/res/values-hr-rHR/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s."</string>
<string name="month_day_year">%-e. %B %Y.</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e.%b.%Y.</string>
diff --git a/core/res/res/values-hr/donottranslate-cldr.xml b/core/res/res/values-hr/donottranslate-cldr.xml
index 2eb6d87..ca21a47 100755
--- a/core/res/res/values-hr/donottranslate-cldr.xml
+++ b/core/res/res/values-hr/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s."</string>
<string name="month_day_year">%-e. %B %Y.</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e.%b.%Y.</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 0ff26e4..dbfded4 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Usluga <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> želi omogućiti značajku Istraživanje dodirom. Kad je značajka Istraživanje dodirom uključena, možete čuti ili vidjeti opise onoga što je pod vašim prstom ili izvršiti pokrete za interakciju s telefonom."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Prije 1 mjesec"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Prije 1 mjesec"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Prije 1 sekundu"</item>
- <item quantity="other" msgid="3903706804349556379">"prije <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"prije 1 minutu"</item>
- <item quantity="other" msgid="2176942008915455116">"Prije <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Prije 1 sata"</item>
- <item quantity="other" msgid="2467273239587587569">"Prije <xliff:g id="COUNT">%d</xliff:g> h"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Posljednjih ovoliko dana: <xliff:g id="COUNT">%d</xliff:g>"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Prošli mjesec"</string>
<string name="older" msgid="5211975022815554840">"Starije"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"jučer"</item>
- <item quantity="other" msgid="2479586466153314633">"Prije <xliff:g id="COUNT">%d</xliff:g> dana"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"za 1 sekundu"</item>
- <item quantity="other" msgid="1241926116443974687">"za <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"za 1 minutu"</item>
- <item quantity="other" msgid="3330713936399448749">"za sljedeći broj minuta: <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"za 1 sat"</item>
- <item quantity="other" msgid="547290677353727389">"za <xliff:g id="COUNT">%d</xliff:g> h"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"sutra"</item>
- <item quantity="other" msgid="5109449375100953247">"za sljedeći broj dana: <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"Prije 1 s"</item>
- <item quantity="other" msgid="3699169366650930415">"Prije <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"Prije 1 min"</item>
- <item quantity="other" msgid="851164968597150710">"Prije <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"Prije 1 sat"</item>
- <item quantity="other" msgid="6889970745748538901">"Prije <xliff:g id="COUNT">%d</xliff:g> h"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"jučer"</item>
- <item quantity="other" msgid="3453342639616481191">"Prije <xliff:g id="COUNT">%d</xliff:g> dana"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"za 1 s"</item>
- <item quantity="other" msgid="5495880108825805108">"za <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"za 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"za <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"za 1 sat"</item>
- <item quantity="other" msgid="3705373766798013406">"za sljedeći broj sati: <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"sutra"</item>
- <item quantity="other" msgid="2973062968038355991">"za sljedeći broj dana: <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"dana <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"u <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>."</string>
diff --git a/core/res/res/values-hu-rHU/donottranslate-cldr.xml b/core/res/res/values-hu-rHU/donottranslate-cldr.xml
index 81e3b12..fd2fe92 100755
--- a/core/res/res/values-hu-rHU/donottranslate-cldr.xml
+++ b/core/res/res/values-hu-rHU/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s."</string>
<string name="month_day_year">%Y. %B %-e.</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%Y.%m.%d., %-k:%M:%S</string>
diff --git a/core/res/res/values-hu/donottranslate-cldr.xml b/core/res/res/values-hu/donottranslate-cldr.xml
index bafa25e..3f60be7 100755
--- a/core/res/res/values-hu/donottranslate-cldr.xml
+++ b/core/res/res/values-hu/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s."</string>
<string name="month_day_year">%Y. %B %-e.</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%-k:%M:%S %Y.%m.%d.</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index ecc40f3..f07d7ba 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> aktiválni szeretné a Felfedezés érintéssel funkciót. Amikor be van kapcsolva a Felfedezés érintéssel, akkor hallhatja vagy láthatja annak leírását, ami az ujja alatt van, illetve végrehajthat kézmozdulatokat a telefon kezeléséhez."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 hónapja"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Több mint 1 hónapja"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 másodperce"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> másodperce"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 perce"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> perce"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 órája"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> órája"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Elmúlt <xliff:g id="COUNT">%d</xliff:g> napban"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Múlt hónapban"</string>
<string name="older" msgid="5211975022815554840">"Régebbi"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"tegnap"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> napja"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 másodperc múlva"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> másodperc múlva"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 perc múlva"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> perc múlva"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 óra múlva"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> óra múlva"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"holnap"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> nap múlva"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 másodperce"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> másodperce"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 perce"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> perce"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 órája"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> órája"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"tegnap"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> napja"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 másodperc múlva"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> másodperc múlva"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 perc múlva"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> perc múlva"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 óra múlva"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> óra múlva"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"holnap"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> nap múlva"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"e napon: <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"év: <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy-rAM/strings.xml
index 2879873..0ebac90 100644
--- a/core/res/res/values-hy-rAM/strings.xml
+++ b/core/res/res/values-hy-rAM/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>-ը ցանկանում է միացնել «Հետազոտում հպման միջոցով» ռեժիմը: Երբ միացված է «Հետազոտում հպման միջոցով» ռեժիմը, դուք կարող եք լսել կամ տեսնել նկարագրությունը, թե ինչ է ձեր մատի տակ, կամ կատարել ժեստեր` հեռախոսի հետ փոխգործակցելու համար:"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ամիս առաջ"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Ավելի շուտ քան 1 ամիս"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 վայրկյան առաջ"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> վայրկյան առաջ"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 րոպե առաջ"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> րոպե առաջ"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 ժամ առաջ"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ժամ առաջ"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Վերջին <xliff:g id="COUNT">%d</xliff:g> օրերին"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Անցյալ ամիս"</string>
<string name="older" msgid="5211975022815554840">"Ավելի հին"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"երեկ"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> օր առաջ"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 վայրկյանից"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> վայրկյանից"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 րոպեից"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> րոպեից"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 ժամից"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> ժամից"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"վաղը"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> օրից"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 վրկ առաջ"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> վրկ. առաջ"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 րոպե առաջ"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> րոպե առաջ"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 ժամ առաջ"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ժամ առաջ"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"երեկ"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> օր առաջ"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 վրկ-ից"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> վրկ-ից"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 րոպեից"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> րոպեից"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 ժամից"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> ժամից"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"վաղը"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> օրից"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>-ին"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"ժամը <xliff:g id="TIME">%s</xliff:g>-ին"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> թվականին"</string>
diff --git a/core/res/res/values-in-rID/donottranslate-cldr.xml b/core/res/res/values-in-rID/donottranslate-cldr.xml
index 1f8e542..823b41f 100755
--- a/core/res/res/values-in-rID/donottranslate-cldr.xml
+++ b/core/res/res/values-in-rID/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e %b %Y</string>
<string name="date_time">%2$s %1$s</string>
diff --git a/core/res/res/values-in/donottranslate-cldr.xml b/core/res/res/values-in/donottranslate-cldr.xml
index b57823a..35a84eb 100755
--- a/core/res/res/values-in/donottranslate-cldr.xml
+++ b/core/res/res/values-in/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e %b %Y</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index a1629d3..d2f116f 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ingin mengaktifkan Menjelajah dengan Sentuhan. Saat Menjelajah dengan Sentuhan diaktifkan, Anda dapat mendengar atau melihat deskripsi dari apa yang ada di bawah jari Anda atau melakukan gerakan untuk berinteraksi dengan ponsel."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 bulan yang lalu"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Sebelum 1 bulan yang lalu"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 detik lalu"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> detik yang lalu"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 menit yang lalu"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> menit yang lalu"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 jam yang lalu"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> jam yang lalu"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"<xliff:g id="COUNT">%d</xliff:g> hari terakhir"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Bulan lalu"</string>
<string name="older" msgid="5211975022815554840">"Lawas"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"kemarin"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> hari yang lalu"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"dalam 1 detik"</item>
- <item quantity="other" msgid="1241926116443974687">"dalam <xliff:g id="COUNT">%d</xliff:g> detik"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"dalam 1 menit"</item>
- <item quantity="other" msgid="3330713936399448749">"dalam <xliff:g id="COUNT">%d</xliff:g> menit"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"dalam 1 jam"</item>
- <item quantity="other" msgid="547290677353727389">"dalam <xliff:g id="COUNT">%d</xliff:g> jam"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"besok"</item>
- <item quantity="other" msgid="5109449375100953247">"dalam <xliff:g id="COUNT">%d</xliff:g> hari"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 detik yang lalu"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> detik yang lalu"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 menit yang lalu"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> menit yang lalu"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 jam yang lalu"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> jam yang lalu"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"kemarin"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> hari yang lalu"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"dalam 1 detik"</item>
- <item quantity="other" msgid="5495880108825805108">"dalam <xliff:g id="COUNT">%d</xliff:g> detik"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"dalam 1 menit"</item>
- <item quantity="other" msgid="4216113292706568726">"dalam <xliff:g id="COUNT">%d</xliff:g> menit"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"dalam 1 jam"</item>
- <item quantity="other" msgid="3705373766798013406">"dalam <xliff:g id="COUNT">%d</xliff:g> jam"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"besok"</item>
- <item quantity="other" msgid="2973062968038355991">"dalam <xliff:g id="COUNT">%d</xliff:g> hari"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"pada <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"pada <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"dalam <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-is-rIS/strings.xml b/core/res/res/values-is-rIS/strings.xml
index 0ef3233..a4b5820 100644
--- a/core/res/res/values-is-rIS/strings.xml
+++ b/core/res/res/values-is-rIS/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vill kveikja á snertikönnun. Þegar kveikt er á snertikönnun geturðu heyrt eða séð lýsingu á því sem er á skjánum undir fingrinum hverju sinni eða notað bendingar til að stjórna símanum."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Fyrir mánuði"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Fyrir meira en mánuði"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"fyrir sekúndu"</item>
- <item quantity="other" msgid="3903706804349556379">"fyrir <xliff:g id="COUNT">%d</xliff:g> sekúndum"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"fyrir mínútu"</item>
- <item quantity="other" msgid="2176942008915455116">"fyrir <xliff:g id="COUNT">%d</xliff:g> mínútum"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"fyrir klukkustund"</item>
- <item quantity="other" msgid="2467273239587587569">"fyrir <xliff:g id="COUNT">%d</xliff:g> klukkustundum"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Síðustu <xliff:g id="COUNT">%d</xliff:g> daga"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Í síðasta mánuði"</string>
<string name="older" msgid="5211975022815554840">"Eldra"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"í gær"</item>
- <item quantity="other" msgid="2479586466153314633">"fyrir <xliff:g id="COUNT">%d</xliff:g> dögum"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"eftir sekúndu"</item>
- <item quantity="other" msgid="1241926116443974687">"eftir <xliff:g id="COUNT">%d</xliff:g> sekúndur"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"eftir mínútu"</item>
- <item quantity="other" msgid="3330713936399448749">"eftir <xliff:g id="COUNT">%d</xliff:g> mínútur"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"eftir klukkustund"</item>
- <item quantity="other" msgid="547290677353727389">"eftir <xliff:g id="COUNT">%d</xliff:g> klukkustundir"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"á morgun"</item>
- <item quantity="other" msgid="5109449375100953247">"eftir <xliff:g id="COUNT">%d</xliff:g> daga"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"fyrir sekúndu"</item>
- <item quantity="other" msgid="3699169366650930415">"fyrir <xliff:g id="COUNT">%d</xliff:g> sekúndum"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"fyrir mínútu"</item>
- <item quantity="other" msgid="851164968597150710">"fyrir <xliff:g id="COUNT">%d</xliff:g> mínútum"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"fyrir klukkustund"</item>
- <item quantity="other" msgid="6889970745748538901">"fyrir <xliff:g id="COUNT">%d</xliff:g> klukkustundum"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"í gær"</item>
- <item quantity="other" msgid="3453342639616481191">"fyrir <xliff:g id="COUNT">%d</xliff:g> dögum"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"eftir sekúndu"</item>
- <item quantity="other" msgid="5495880108825805108">"eftir <xliff:g id="COUNT">%d</xliff:g> sekúndur"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"eftir mínútu"</item>
- <item quantity="other" msgid="4216113292706568726">"eftir <xliff:g id="COUNT">%d</xliff:g> mínútur"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"eftir klukkustund"</item>
- <item quantity="other" msgid="3705373766798013406">"eftir <xliff:g id="COUNT">%d</xliff:g> klukkustundir"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"á morgun"</item>
- <item quantity="other" msgid="2973062968038355991">"eftir <xliff:g id="COUNT">%d</xliff:g> daga"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-it/donottranslate-cldr.xml b/core/res/res/values-it/donottranslate-cldr.xml
index 2aea951..95ba6dc 100755
--- a/core/res/res/values-it/donottranslate-cldr.xml
+++ b/core/res/res/values-it/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%d %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %d/%b/%Y</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 8b6a6cd..f724d26 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vuole attivare la funzione Esplora al tocco. Quando la funzione Esplora al tocco è attiva, puoi ascoltare o visualizzare le descrizioni di ciò che stai toccando oppure interagire con il telefono tramite gesti."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 mese fa"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Oltre 1 mese fa"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 secondo fa"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> secondi fa"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minuto fa"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minuti fa"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 ora fa"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ore fa"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Ultimi <xliff:g id="COUNT">%d</xliff:g> giorni"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Ultimo mese"</string>
<string name="older" msgid="5211975022815554840">"Precedente"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ieri"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> giorni fa"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"tra 1 secondo"</item>
- <item quantity="other" msgid="1241926116443974687">"tra <xliff:g id="COUNT">%d</xliff:g> secondi"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"tra 1 minuto"</item>
- <item quantity="other" msgid="3330713936399448749">"tra <xliff:g id="COUNT">%d</xliff:g> minuti"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"tra 1 ora"</item>
- <item quantity="other" msgid="547290677353727389">"tra <xliff:g id="COUNT">%d</xliff:g> ore"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"domani"</item>
- <item quantity="other" msgid="5109449375100953247">"tra <xliff:g id="COUNT">%d</xliff:g> giorni"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 sec fa"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> sec fa"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 min fa"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> min fa"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 ora fa"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ore fa"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ieri"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> giorni fa"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"tra 1 sec"</item>
- <item quantity="other" msgid="5495880108825805108">"tra <xliff:g id="COUNT">%d</xliff:g> sec"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"tra 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"tra <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"tra 1 ora"</item>
- <item quantity="other" msgid="3705373766798013406">"tra <xliff:g id="COUNT">%d</xliff:g> ore"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"domani"</item>
- <item quantity="other" msgid="2973062968038355991">"tra <xliff:g id="COUNT">%d</xliff:g> giorni"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"in data <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"alle ore <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"nel <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-iw/donottranslate-cldr.xml b/core/res/res/values-iw/donottranslate-cldr.xml
index cf05c9d..a9015d0 100755
--- a/core/res/res/values-iw/donottranslate-cldr.xml
+++ b/core/res/res/values-iw/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e ב%B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e.%-m.%Y</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 3e74f6c..6753bae 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> רוצה להפעיל את התכונה \'חקור על ידי מגע\'. כאשר התכונה \'חקור על ידי מגע\' מופעלת, אתה יכול לשמוע או לראות תיאורים של הפריטים שעליהם אצבעך מונחת או לקיים אינטראקציה עם הטלפון באמצעות תנועות אצבע."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"לפני חודש אחד"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"לפני חודש אחד"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"לפני שנייה אחת"</item>
- <item quantity="other" msgid="3903706804349556379">"לפני <xliff:g id="COUNT">%d</xliff:g> שניות"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"לפני דקה אחת"</item>
- <item quantity="other" msgid="2176942008915455116">"לפני <xliff:g id="COUNT">%d</xliff:g> דקות"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"לפני שעה"</item>
- <item quantity="other" msgid="2467273239587587569">"לפני <xliff:g id="COUNT">%d</xliff:g> שעות"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"<xliff:g id="COUNT">%d</xliff:g> הימים האחרונים"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"בחודש שעבר"</string>
<string name="older" msgid="5211975022815554840">"ישן יותר"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"אתמול"</item>
- <item quantity="other" msgid="2479586466153314633">"לפני <xliff:g id="COUNT">%d</xliff:g> ימים"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"בעוד שנייה אחת"</item>
- <item quantity="other" msgid="1241926116443974687">"תוך <xliff:g id="COUNT">%d</xliff:g> שניות"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"בעוד דקה אחת"</item>
- <item quantity="other" msgid="3330713936399448749">"תוך <xliff:g id="COUNT">%d</xliff:g> דקות"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"תוך שעה אחת"</item>
- <item quantity="other" msgid="547290677353727389">"תוך <xliff:g id="COUNT">%d</xliff:g> שעות"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"מחר"</item>
- <item quantity="other" msgid="5109449375100953247">"בעוד <xliff:g id="COUNT">%d</xliff:g> ימים"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"לפני שנייה אחת"</item>
- <item quantity="other" msgid="3699169366650930415">"לפני <xliff:g id="COUNT">%d</xliff:g> שניות"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"לפני דקה"</item>
- <item quantity="other" msgid="851164968597150710">"לפני <xliff:g id="COUNT">%d</xliff:g> דקות"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"לפני שעה"</item>
- <item quantity="other" msgid="6889970745748538901">"לפני <xliff:g id="COUNT">%d</xliff:g> שעות"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"אתמול"</item>
- <item quantity="other" msgid="3453342639616481191">"לפני <xliff:g id="COUNT">%d</xliff:g> ימים"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"תוך שנייה אחת"</item>
- <item quantity="other" msgid="5495880108825805108">"תוך <xliff:g id="COUNT">%d</xliff:g> שניות"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"תוך דקה אחת"</item>
- <item quantity="other" msgid="4216113292706568726">"תוך <xliff:g id="COUNT">%d</xliff:g> דקות"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"תוך שעה אחת"</item>
- <item quantity="other" msgid="3705373766798013406">"תוך <xliff:g id="COUNT">%d</xliff:g> שעות"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"מחר"</item>
- <item quantity="other" msgid="2973062968038355991">"בעוד <xliff:g id="COUNT">%d</xliff:g> ימים"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"בתאריך <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"בשעה <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"בשנת <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-ja/donottranslate-cldr.xml b/core/res/res/values-ja/donottranslate-cldr.xml
index 21aa0e6..a3c1f64 100755
--- a/core/res/res/values-ja/donottranslate-cldr.xml
+++ b/core/res/res/values-ja/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%Y年%-m月%-e日</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%Y/%m/%d %-k:%M:%S</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 11bfe34..583124e 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>がタッチガイドをONにしようとしています。タッチガイドをONにすると、指の位置にあるアイテムの説明を読み上げたり表示したりできます。また、携帯端末を通常とは違うジェスチャーで操作できます。"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1か月前"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1か月前"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1秒前"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g>秒前"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1分前"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g>分前"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1時間前"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g>時間前"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"過去<xliff:g id="COUNT">%d</xliff:g>日間"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"先月"</string>
<string name="older" msgid="5211975022815554840">"もっと前"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"昨日"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g>日前"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1秒後"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g>秒後"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1分後"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g>分後"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1時間後"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g>時間後"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"明日"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g>日後"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1秒前"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g>秒前"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1分前"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g>分前"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1時間前"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g>時間前"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"昨日"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g>日前"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1秒後"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g>秒後"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1分後"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g>分後"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1時間後"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g>時間後"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"明日"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g>日後"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>年"</string>
diff --git a/core/res/res/values-ka-rGE/strings.xml b/core/res/res/values-ka-rGE/strings.xml
index 1eb5051..27be451 100644
--- a/core/res/res/values-ka-rGE/strings.xml
+++ b/core/res/res/values-ka-rGE/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>-ს სურს „შეხებით შესწავლის“ რეჟიმის ჩრთვა. ეს ტელეფონის ჟესტებით მართვისა და იმ ელემენტების აღწერის მოსმენის შესაძლებლობას მოგცემთ, რომელსაც შეეხებით."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"ერთი თვის წინ"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"უფრო ადრე, ვიდრე ერთი თვის წინ"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 წამის წინ"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> წამის წინ"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 წუთის უკან"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> წუთის წინ"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 საათის წინ"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> საათის წინ"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"ბოლო <xliff:g id="COUNT">%d</xliff:g> დღე"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"გასული თვე"</string>
<string name="older" msgid="5211975022815554840">"უფრო ძველი"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"გუშინ"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> დღის წინ"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 წამში"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> წამში"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 წუთში"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> წუთში"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 საათში"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> საათში"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"ხვალ"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> დღეში"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 წმ. წინ"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> წამის წინ"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 წუთის წინ"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> წუთის წინ"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 საათის წინ"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> საათის წინ"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"გუშინ"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> დღის წინ"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 წამში"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> წამის წინ"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 წუთში"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> წუთში"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 საათში"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> საათში"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"ხვალ"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> დღეში"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"თარიღი: <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>-ზე"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> წელს"</string>
diff --git a/core/res/res/values-kk-rKZ/strings.xml b/core/res/res/values-kk-rKZ/strings.xml
index fa06476..723b421 100644
--- a/core/res/res/values-kk-rKZ/strings.xml
+++ b/core/res/res/values-kk-rKZ/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> Сенсор арқылы шолу функциясын іске қосуды қалайды. Сенсор арқылы шолу функциясы қосылғанда саусақ астындағы нысан сипаттарын естуге немесе көруге болады немесе телефонмен қатынасу қимылдарын орындауға болады."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ай бұрын"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Осыған дейін 1 ай бұрын"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 секунд бұрын"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> секунд бұрын"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 минут бұрын"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> минут бұрын"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 сағат бұрын"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> сағат бұрын"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Соңғы <xliff:g id="COUNT">%d</xliff:g> күнде"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Соңғы ай"</string>
<string name="older" msgid="5211975022815554840">"Ескілеу"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"кеше"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> күн бұрын"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 секундта"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> секундта"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 минутта"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> минутта"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 сағатта"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> сағатта"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"ертең"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> күнде"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 секунд бұрын"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> секунд бұрын"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 минут бұрын"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> минут бұрын"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 сағат бұрын"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> сағат бұрын"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"кеше"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> күн бұрын"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 секундта"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> секундта"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 минутта"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> минутта"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 сағатта"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> сағатта"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"ертең"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> күнде"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> күні"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> уақытында"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> жылда"</string>
diff --git a/core/res/res/values-km-rKH/strings.xml b/core/res/res/values-km-rKH/strings.xml
index da4b4b5..1d0c8e3 100644
--- a/core/res/res/values-km-rKH/strings.xml
+++ b/core/res/res/values-km-rKH/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ចង់​បើក​ការ​រុករ​ក​ដោយ​ប៉ះ។ ពេល​រុករក​ដោយ​ប៉ះ​ត្រូវ​បាន​បើក​​ អ្នក​អាច​ស្ដាប់​ឮ​ ឬ​ឃើញ​ការ​ពណ៌នា​អ្វី​ដែល​នៅ​ក្រោម​ម្រាមដៃ​របស់​អ្នក​​ ឬ​អនុវត្ត​កាយវិការ​ដើម្បី​មាន​អន្តរកម្ម​ជា​មួយ​ទូរស័ព្ទ។"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ខែ​មុន"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"មុន​ពេល ១ ខែ​មុន"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"១ វិនាទី​មុន"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> វិនាទី​មុន"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"១ នាទី​មុន"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> នាទី​​មុន"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"១ ម៉ោង​មុន"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ម៉ោង​មុន"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"<xliff:g id="COUNT">%d</xliff:g> ថ្ងៃ​ចុងក្រោយ"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"ខែ​មុន"</string>
<string name="older" msgid="5211975022815554840">"ចាស់​ជាង"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ម្សិលមិញ"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> ថ្ងៃ​មុន"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"ក្នុង​រយៈ​ពេល ១ វិនាទី"</item>
- <item quantity="other" msgid="1241926116443974687">"ក្នុង​រយៈ​ពេល <xliff:g id="COUNT">%d</xliff:g> វិនាទី"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"ក្នុង​រយៈពេល ១ នាទី"</item>
- <item quantity="other" msgid="3330713936399448749">"រយៈពេល <xliff:g id="COUNT">%d</xliff:g> នាទី"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"រយៈពេល ១ ម៉ោង"</item>
- <item quantity="other" msgid="547290677353727389">"រយៈពេល <xliff:g id="COUNT">%d</xliff:g> ម៉ោង"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"ថ្ងៃស្អែក"</item>
- <item quantity="other" msgid="5109449375100953247">"រយៈពេល <xliff:g id="COUNT">%d</xliff:g> ថ្ងៃ"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"១ វិនាទី​មុន"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> វិនាទី​មុន"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"១ នាទី​មុន"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> នាទី​​មុន"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"១ ម៉ោង​មុន"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ម៉ោង​មុន"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ម្សិលមិញ"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> ថ្ងៃ​​មុន"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"ក្នុង​ពេល​ 1 វិនាទី"</item>
- <item quantity="other" msgid="5495880108825805108">"ក្នុង​ពេល <xliff:g id="COUNT">%d</xliff:g> វិនាទី"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"ក្នុង​ពេល 1 នាទី"</item>
- <item quantity="other" msgid="4216113292706568726">"នៅ​រយៈពេល <xliff:g id="COUNT">%d</xliff:g> នាទី"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"ក្នុង​រយៈ​ពេល ១ ម៉ោង"</item>
- <item quantity="other" msgid="3705373766798013406">"ក្នុង​រយៈ​ពេល <xliff:g id="COUNT">%d</xliff:g> ម៉ោង"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"ថ្ងៃស្អែក"</item>
- <item quantity="other" msgid="2973062968038355991">"ក្នុង​រយៈ​ពេល <xliff:g id="COUNT">%d</xliff:g> ថ្ងៃ"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"នៅ <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"នៅ​ម៉ោង <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"ក្នុង​ឆ្នាំ <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml
index 83a935b..eb8c212 100644
--- a/core/res/res/values-kn-rIN/strings.xml
+++ b/core/res/res/values-kn-rIN/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"ಸ್ಪರ್ಶದ ಮೂಲಕ ಎಕ್ಸ್‌ಪ್ಲೋರ್ ಸಕ್ರಿಯಗೊಳಿಸಲು <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ಬಯಸುತ್ತದೆ. ಸ್ಪರ್ಶದ ಮೂಲಕ ಎಕ್ಸ್‌ಪ್ಲೋರ್ ಆನ್ ಮಾಡಿದಾಗ, ಫೋನ್‌ ಜೊತೆ ಸಂವಹನ ನಡೆಸಲು ನಿಮ್ಮ ಬೆರಳಿನ ಅಡಿಯಲ್ಲಿರುವ ವಿವರಣೆಗಳನ್ನು ನೀವು ಆಲಿಸಬಹುದು ಅಥವಾ ವೀಕ್ಷಿಸಬಹುದು ಇಲ್ಲವೇ ಗೆಶ್ಚರ್‌‌ ಮಾಡಬಹುದು."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ತಿಂಗಳ ಹಿಂದೆ"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 ತಿಂಗಳ ಹಿಂದಕ್ಕೂ ಮೊದಲು"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 ಸೆಕೆಂಡಿನ ಹಿಂದೆ"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> ಸೆಕೆಂಡುಗಳ ಹಿಂದೆ"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 ನಿಮಿಷದ ಹಿಂದೆ"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> ನಿಮಿಷಗಳ ಹಿಂದೆ"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 ಗಂಟೆ ಹಿಂದೆ"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ಗಂಟೆಗಳ ಹಿಂದೆ"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"ಕಳೆದ <xliff:g id="COUNT">%d</xliff:g> ದಿನಗಳಲ್ಲಿ"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"ಕಳೆದ ತಿಂಗಳು"</string>
<string name="older" msgid="5211975022815554840">"ಹಳೆಯದು"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ನಿನ್ನೆ"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> ದಿನಗಳ ಹಿಂದೆ"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 ಸೆಕೆಂಡಿನಲ್ಲಿ"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 ನಿಮಿಷದಲ್ಲಿ"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> ನಿಮಿಷಗಳಲ್ಲಿ"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 ಗಂಟೆಯಲ್ಲಿ"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> ಗಂಟೆಗಳಲ್ಲಿ"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"ನಾಳೆ"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> ದಿನಗಳಲ್ಲಿ"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 ಸೆಕೆಂಡಿನ ಹಿಂದೆ"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> ಸೆಕೆಂಡುಗಳ ಹಿಂದೆ"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 ನಿಮಿಷದ ಹಿಂದೆ"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> ನಿಮಿಷಗಳ ಹಿಂದೆ"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 ಗಂಟೆ ಹಿಂದೆ"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ಗಂಟೆಗಳ ಹಿಂದೆ"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ನಿನ್ನೆ"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> ದಿನಗಳ ಹಿಂದೆ"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 ಸೆಕೆಂಡಿನಲ್ಲಿ"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> ಸೆಕೆಂಡುಗಳಲ್ಲಿ"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 ನಿಮಿಷದಲ್ಲಿ"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> ನಿಮಿಷಗಳಲ್ಲಿ"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 ಗಂಟೆಯಲ್ಲಿ"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> ಗಂಟೆಗಳಲ್ಲಿ"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"ನಾಳೆ"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> ದಿನಗಳಲ್ಲಿ"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> ರಂದು"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> ರಲ್ಲಿ"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> ರಲ್ಲಿ"</string>
diff --git a/core/res/res/values-ko/donottranslate-cldr.xml b/core/res/res/values-ko/donottranslate-cldr.xml
index 083b176..626a480 100755
--- a/core/res/res/values-ko/donottranslate-cldr.xml
+++ b/core/res/res/values-ko/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s. %s. %s."</string>
<string name="month_day_year">%Y년 %-m월 %-e일</string>
<string name="time_of_day">%p %-l:%M:%S</string>
<string name="date_and_time">%Y년 %-m월 %-e일 %p %-l:%M:%S</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index a8e22e8..2f0de06 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>을(를) 사용하려면 \'터치하여 탐색\' 기능을 사용하도록 설정해야 합니다. \'터치하여 탐색\'을 사용하도록 설정하면, 화면을 터치하여 손가락 아래에 표시된 항목에 대한 설명을 듣고 보거나 휴대전화로 상호작용하기 위한 동작을 수행할 수 있습니다."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"한 달 전"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"한 달 전"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1초 전"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g>초 전"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1분 전"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g>분 전"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1시간 전"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g>시간 전"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"지난 <xliff:g id="COUNT">%d</xliff:g>일"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"지난 달"</string>
<string name="older" msgid="5211975022815554840">"이전"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"어제"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g>일 전"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1초 내"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g>초 후"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1분 후"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g>분 후"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1시간 후"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g>시간 후"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"내일"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g>일 후"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1초 전"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g>초 전"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1분 전"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g>분 전"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1시간 전"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g>시간 전"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"어제"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g>일 전"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1초 후"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g>초 후"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1분 후"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g>분 후"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1시간 후"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g>시간 후"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"내일"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g>일 후"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>년"</string>
diff --git a/core/res/res/values-ky-rKG/strings.xml b/core/res/res/values-ky-rKG/strings.xml
index 19ab52f..be6ec52 100644
--- a/core/res/res/values-ky-rKG/strings.xml
+++ b/core/res/res/values-ky-rKG/strings.xml
@@ -1471,43 +1471,11 @@
<skip />
<!-- no translation found for beforeOneMonthDurationPast (909134546836499826) -->
<skip />
- <!-- no translation found for num_seconds_ago:one (4869870056547896011) -->
- <!-- no translation found for num_seconds_ago:other (3903706804349556379) -->
- <!-- no translation found for num_minutes_ago:one (3306787433088810191) -->
- <!-- no translation found for num_minutes_ago:other (2176942008915455116) -->
- <!-- no translation found for num_hours_ago:one (9150797944610821849) -->
- <!-- no translation found for num_hours_ago:other (2467273239587587569) -->
<!-- no translation found for last_num_days:other (3069992808164318268) -->
<!-- no translation found for last_month (3959346739979055432) -->
<skip />
<!-- no translation found for older (5211975022815554840) -->
<skip />
- <!-- no translation found for num_days_ago:one (861358534398115820) -->
- <!-- no translation found for num_days_ago:other (2479586466153314633) -->
- <!-- no translation found for in_num_seconds:one (2729745560954905102) -->
- <!-- no translation found for in_num_seconds:other (1241926116443974687) -->
- <!-- no translation found for in_num_minutes:one (8793095251325200395) -->
- <!-- no translation found for in_num_minutes:other (3330713936399448749) -->
- <!-- no translation found for in_num_hours:one (7164353342477769999) -->
- <!-- no translation found for in_num_hours:other (547290677353727389) -->
- <!-- no translation found for in_num_days:one (5413088743009839518) -->
- <!-- no translation found for in_num_days:other (5109449375100953247) -->
- <!-- no translation found for abbrev_num_seconds_ago:one (1849036840200069118) -->
- <!-- no translation found for abbrev_num_seconds_ago:other (3699169366650930415) -->
- <!-- no translation found for abbrev_num_minutes_ago:one (6361490147113871545) -->
- <!-- no translation found for abbrev_num_minutes_ago:other (851164968597150710) -->
- <!-- no translation found for abbrev_num_hours_ago:one (4796212039724722116) -->
- <!-- no translation found for abbrev_num_hours_ago:other (6889970745748538901) -->
- <!-- no translation found for abbrev_num_days_ago:one (8463161711492680309) -->
- <!-- no translation found for abbrev_num_days_ago:other (3453342639616481191) -->
- <!-- no translation found for abbrev_in_num_seconds:one (5842225370795066299) -->
- <!-- no translation found for abbrev_in_num_seconds:other (5495880108825805108) -->
- <!-- no translation found for abbrev_in_num_minutes:one (562786149928284878) -->
- <!-- no translation found for abbrev_in_num_minutes:other (4216113292706568726) -->
- <!-- no translation found for abbrev_in_num_hours:one (3274708118124045246) -->
- <!-- no translation found for abbrev_in_num_hours:other (3705373766798013406) -->
- <!-- no translation found for abbrev_in_num_days:one (2178576254385739855) -->
- <!-- no translation found for abbrev_in_num_days:other (2973062968038355991) -->
<!-- no translation found for preposition_for_date (9093949757757445117) -->
<skip />
<!-- no translation found for preposition_for_time (5506831244263083793) -->
diff --git a/core/res/res/values-lo-rLA/strings.xml b/core/res/res/values-lo-rLA/strings.xml
index f2dda00..13346ef 100644
--- a/core/res/res/values-lo-rLA/strings.xml
+++ b/core/res/res/values-lo-rLA/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ຕ້ອງການເປີດນຳໃຊ້ \"ການສຳຫຼວດໂດຍສຳພັດ\". ເມື່ອເປີດ \"ການສຳຫຼວດໂດຍສຳພັດ\" ແລ້ວ ທ່ານຈະສາມາດໄດ້ຍິນ ຫຼືເຫັນຄຳບັນຍາຍວ່າມີຫຍັງຢູ່ກ້ອງນິ້ວມືຂອງທ່ານ ຫຼືໃຊ້ຮູບແບບການເຄື່ອນໄຫວເພື່ອໂຕ້ຕອບກັບໂທລະສັບ."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ເດືອນກ່ອນຫນ້ານີ້"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"ຫຼາຍກວ່າ 1 ເດືອນກ່ອນ"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 ວິນາທີກ່ອນ"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> ວິນາທີກ່ອນໜ້ານີ້"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 ນາທີກ່ອນໜ້ານີ້"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> ນາ​ທີ​ທີ່ຜ່ານມາ"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 ຊົ່ວໂມງກ່ອນໜ້ານີ້"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ຊົ່ວໂມງທີ່ຜ່ານມາ"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"<xliff:g id="COUNT">%d</xliff:g> ມື້ທີ່ຜ່ານມາ"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"ເດືອນແລ້ວ"</string>
<string name="older" msgid="5211975022815554840">"ເກົ່າກວ່າ"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ມື້​ວານ​ນີ້"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> ມື້​ກ່ອນ"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"ໃນອີກ 1 ວິນາທີ"</item>
- <item quantity="other" msgid="1241926116443974687">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ວິ​ນາ​ທີ"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"ໃນ 1 ນາທີ"</item>
- <item quantity="other" msgid="3330713936399448749">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ນາທີ"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"ໃນ 1 ຊົ່ວໂມງ"</item>
- <item quantity="other" msgid="547290677353727389">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ຊົ່ວໂມງ"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"ມື້ອື່ນ"</item>
- <item quantity="other" msgid="5109449375100953247">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ມື້"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 ວິນາທີກ່ອນ"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> ວິ ກ່ອນໜ້ານີ້"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 ນທ ກ່ອນ"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> ນທ ກ່ອນໜ້ານີ້"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 ຊົ່ວໂມງກ່ອນ"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ຊົ່ວໂມງກ່ອນໜ້ານີ້"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ມື້ວານນີ້"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> ມື້ກ່ອນໜ້ານີ້"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"ໃນ 1 ວິ"</item>
- <item quantity="other" msgid="5495880108825805108">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ວິ"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"ໃນ 1 ນາທີ"</item>
- <item quantity="other" msgid="4216113292706568726">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ນທ"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"ໃນ 1 ຊົ່ວໂມງ"</item>
- <item quantity="other" msgid="3705373766798013406">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ຊົ່ວໂມງ"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"ມື້ອື່ນ"</item>
- <item quantity="other" msgid="2973062968038355991">"ໃນ <xliff:g id="COUNT">%d</xliff:g> ມື້"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"ວັນທີ <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"ເວລາ <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"ໃນ <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-lt-rLT/donottranslate-cldr.xml b/core/res/res/values-lt-rLT/donottranslate-cldr.xml
index 8a50344..ba4a326 100755
--- a/core/res/res/values-lt-rLT/donottranslate-cldr.xml
+++ b/core/res/res/values-lt-rLT/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s-%s-%s"</string>
<string name="month_day_year">%Y m. %B %-e d.</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S, %Y-%m-%d</string>
diff --git a/core/res/res/values-lt/donottranslate-cldr.xml b/core/res/res/values-lt/donottranslate-cldr.xml
index b2368dc..cdca7b6 100755
--- a/core/res/res/values-lt/donottranslate-cldr.xml
+++ b/core/res/res/values-lt/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s-%s-%s"</string>
<string name="month_day_year">%Y m. %B %-e d.</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %Y.%m.%d</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 29fc551..b02f8bc 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"„<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>“ nori įgalinti naršymą liečiant. Kai naršymas liečiant bus įjungtas, galėsite išgirsti ar peržiūrėti pirštu liečiamų elementų aprašus arba atlikdami gestus naudoti telefoną."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Prieš 1 mėn."</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Prieš maždaug 1 mėnesį"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Prieš 1 sek."</item>
- <item quantity="other" msgid="3903706804349556379">"Prieš <xliff:g id="COUNT">%d</xliff:g> sek."</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Prieš 1 minutę"</item>
- <item quantity="other" msgid="2176942008915455116">"Prieš <xliff:g id="COUNT">%d</xliff:g> min."</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Prieš 1 valandą"</item>
- <item quantity="other" msgid="2467273239587587569">"Prieš <xliff:g id="COUNT">%d</xliff:g> val."</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Paskutinės <xliff:g id="COUNT">%d</xliff:g> dienos (-ų)"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Paskutinį mėnesį"</string>
<string name="older" msgid="5211975022815554840">"Senesni"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"vakar"</item>
- <item quantity="other" msgid="2479586466153314633">"Prieš <xliff:g id="COUNT">%d</xliff:g> d."</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"po 1 sek."</item>
- <item quantity="other" msgid="1241926116443974687">"po <xliff:g id="COUNT">%d</xliff:g> sek."</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"po 1 min."</item>
- <item quantity="other" msgid="3330713936399448749">"po <xliff:g id="COUNT">%d</xliff:g> min."</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"po 1 val."</item>
- <item quantity="other" msgid="547290677353727389">"po <xliff:g id="COUNT">%d</xliff:g> val."</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"rytoj"</item>
- <item quantity="other" msgid="5109449375100953247">"po <xliff:g id="COUNT">%d</xliff:g> d."</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"Prieš 1 sek."</item>
- <item quantity="other" msgid="3699169366650930415">"Prieš <xliff:g id="COUNT">%d</xliff:g> sek."</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"Prieš 1 min."</item>
- <item quantity="other" msgid="851164968597150710">"Prieš <xliff:g id="COUNT">%d</xliff:g> min."</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"Prieš 1 valandą"</item>
- <item quantity="other" msgid="6889970745748538901">"Prieš <xliff:g id="COUNT">%d</xliff:g> val."</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"vakar"</item>
- <item quantity="other" msgid="3453342639616481191">"Prieš <xliff:g id="COUNT">%d</xliff:g> d."</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"po 1 sek."</item>
- <item quantity="other" msgid="5495880108825805108">"po <xliff:g id="COUNT">%d</xliff:g> sek."</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"po 1 min."</item>
- <item quantity="other" msgid="4216113292706568726">"po <xliff:g id="COUNT">%d</xliff:g> min."</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"po 1 val."</item>
- <item quantity="other" msgid="3705373766798013406">"po <xliff:g id="COUNT">%d</xliff:g> val."</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"rytoj"</item>
- <item quantity="other" msgid="2973062968038355991">"po <xliff:g id="COUNT">%d</xliff:g> d."</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> m."</string>
diff --git a/core/res/res/values-lv-rLV/donottranslate-cldr.xml b/core/res/res/values-lv-rLV/donottranslate-cldr.xml
index f565157..3bed6cd 100755
--- a/core/res/res/values-lv-rLV/donottranslate-cldr.xml
+++ b/core/res/res/values-lv-rLV/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%Y. gada %-e. %B</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%Y. gada %-e. %b, %H:%M:%S</string>
diff --git a/core/res/res/values-lv/donottranslate-cldr.xml b/core/res/res/values-lv/donottranslate-cldr.xml
index c21481a..7ecdc31 100755
--- a/core/res/res/values-lv/donottranslate-cldr.xml
+++ b/core/res/res/values-lv/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%Y. gada %-e. %B</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %Y. gada %-e. %b</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index f972356..e00e85c 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vēlas iespējot funkciju “Atklāt pieskaroties”. Kad ir ieslēgta funkcija “Atklāt pieskaroties”, var dzirdēt vai redzēt tā vienuma aprakstu, virs kura atrodas pirksts, vai veikt žestus, lai mijiedarbotos ar tālruni."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Pirms 1 mēneša"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Vairāk nekā pirms 1 mēneša"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Pirms 1 sekundes"</item>
- <item quantity="other" msgid="3903706804349556379">"Pirms <xliff:g id="COUNT">%d</xliff:g> sekundes(-ēm)"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Pirms 1 minūtes"</item>
- <item quantity="other" msgid="2176942008915455116">"Pirms <xliff:g id="COUNT">%d</xliff:g> minūtes(-ēm)"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Pirms 1 stundas"</item>
- <item quantity="other" msgid="2467273239587587569">"Pirms <xliff:g id="COUNT">%d</xliff:g> stundas(-ām)"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Pēdējās <xliff:g id="COUNT">%d</xliff:g> dienās"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Iepriekšējā mēnesī"</string>
<string name="older" msgid="5211975022815554840">"Vecāks"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"vakar"</item>
- <item quantity="other" msgid="2479586466153314633">"Pirms <xliff:g id="COUNT">%d</xliff:g> dienas(-ām)"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"pēc 1 sekundes"</item>
- <item quantity="other" msgid="1241926116443974687">"pēc <xliff:g id="COUNT">%d</xliff:g> sekundes(-ēm)"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"pēc 1 minūtes"</item>
- <item quantity="other" msgid="3330713936399448749">"pēc <xliff:g id="COUNT">%d</xliff:g> minūtes(-ēm)"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"pēc 1 stundas"</item>
- <item quantity="other" msgid="547290677353727389">"pēc <xliff:g id="COUNT">%d</xliff:g> stundas(-ām)"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"rītdien"</item>
- <item quantity="other" msgid="5109449375100953247">"pēc <xliff:g id="COUNT">%d</xliff:g> dienas(-ām)"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"Pirms 1 sekundes"</item>
- <item quantity="other" msgid="3699169366650930415">"Pirms <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"Pirms 1 min"</item>
- <item quantity="other" msgid="851164968597150710">"Pirms <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"Pirms 1 stundas"</item>
- <item quantity="other" msgid="6889970745748538901">"Pirms <xliff:g id="COUNT">%d</xliff:g> stundas(-ām)"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"vakar"</item>
- <item quantity="other" msgid="3453342639616481191">"Pirms <xliff:g id="COUNT">%d</xliff:g> dienas(-ām)"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"pēc 1 s"</item>
- <item quantity="other" msgid="5495880108825805108">"pēc <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"pēc 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"pēc <xliff:g id="COUNT">%d</xliff:g> minūtes(-ēm)"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"pēc 1 stundas"</item>
- <item quantity="other" msgid="3705373766798013406">"pēc <xliff:g id="COUNT">%d</xliff:g> stundas(-ām)"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"rītdien"</item>
- <item quantity="other" msgid="2973062968038355991">"pēc <xliff:g id="COUNT">%d</xliff:g> dienas(-ām)"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"šādā datumā: <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"plkst. <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"šādā gadā: <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-mcc259-mnc05/config.xml b/core/res/res/values-mcc259-mnc05/config.xml
new file mode 100644
index 0000000..065668c
--- /dev/null
+++ b/core/res/res/values-mcc259-mnc05/config.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2013, 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- The list of ril radio technologies (see ServiceState.java) which only support
+ a single data connection at one time. This may change by carrier via
+ overlays (some don't support multiple pdp on UMTS). All unlisted radio
+ tech types support unlimited types (practically only 2-4 used). -->
+ <integer-array name="config_onlySingleDcAllowed">
+ <item>1</item> <!-- GPRS -->
+ <item>2</item> <!-- EDGE -->
+ <item>3</item> <!-- UMTS -->
+ <item>9</item> <!-- HSDPA -->
+ <item>10</item> <!-- HSUPA -->
+ <item>11</item> <!-- HSPA -->
+ <item>14</item> <!-- LTE -->
+ <item>15</item> <!-- HSPAP -->
+ </integer-array>
+</resources>
diff --git a/core/res/res/values-mk-rMK/strings.xml b/core/res/res/values-mk-rMK/strings.xml
index 51f2d98..6952ece 100644
--- a/core/res/res/values-mk-rMK/strings.xml
+++ b/core/res/res/values-mk-rMK/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> сака да овозможи „Истражувај со допир“. Кога е вклучено „Истражувај со допир“, може да се слушнат или да се видат описи на она што е под вашиот прст или да се прават движења за комуницирање со телефонот."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Пред 1 месец"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Пред повеќе од 1 месец"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"пред 1 секунда"</item>
- <item quantity="other" msgid="3903706804349556379">"пред <xliff:g id="COUNT">%d</xliff:g> секунди"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"пред 1 минута"</item>
- <item quantity="other" msgid="2176942008915455116">"пред <xliff:g id="COUNT">%d</xliff:g> минути"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Пред 1 час"</item>
- <item quantity="other" msgid="2467273239587587569">"пред <xliff:g id="COUNT">%d</xliff:g> часа"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Последните <xliff:g id="COUNT">%d</xliff:g> дена"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Минатиот месец"</string>
<string name="older" msgid="5211975022815554840">"Постари"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"вчера"</item>
- <item quantity="other" msgid="2479586466153314633">"Пред <xliff:g id="COUNT">%d</xliff:g> дена"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"за 1 секунда"</item>
- <item quantity="other" msgid="1241926116443974687">"за <xliff:g id="COUNT">%d</xliff:g> секунди"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"за 1 минута"</item>
- <item quantity="other" msgid="3330713936399448749">"за <xliff:g id="COUNT">%d</xliff:g> минути"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"за 1 час"</item>
- <item quantity="other" msgid="547290677353727389">"за <xliff:g id="COUNT">%d</xliff:g> часа"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"утре"</item>
- <item quantity="other" msgid="5109449375100953247">"за <xliff:g id="COUNT">%d</xliff:g> дена"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"пред 1 сек"</item>
- <item quantity="other" msgid="3699169366650930415">"пред <xliff:g id="COUNT">%d</xliff:g> секунди"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"пред 1 мин"</item>
- <item quantity="other" msgid="851164968597150710">"пред <xliff:g id="COUNT">%d</xliff:g> минути"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"пред 1 час"</item>
- <item quantity="other" msgid="6889970745748538901">"пред <xliff:g id="COUNT">%d</xliff:g> часа"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"вчера"</item>
- <item quantity="other" msgid="3453342639616481191">"Пред <xliff:g id="COUNT">%d</xliff:g> дена"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"за 1 сек"</item>
- <item quantity="other" msgid="5495880108825805108">"за <xliff:g id="COUNT">%d</xliff:g> секунди"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"за 1 мин"</item>
- <item quantity="other" msgid="4216113292706568726">"за <xliff:g id="COUNT">%d</xliff:g> минути"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"за 1 час"</item>
- <item quantity="other" msgid="3705373766798013406">"за <xliff:g id="COUNT">%d</xliff:g> часа"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"утре"</item>
- <item quantity="other" msgid="2973062968038355991">"за <xliff:g id="COUNT">%d</xliff:g> дена"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"на <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"во <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"во <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-ml-rIN/strings.xml b/core/res/res/values-ml-rIN/strings.xml
index cbb0746..4bb6642 100644
--- a/core/res/res/values-ml-rIN/strings.xml
+++ b/core/res/res/values-ml-rIN/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"ടച്ച് വഴി പര്യവേക്ഷണം ചെയ്യൽ പ്രവർത്തനക്ഷമമാക്കാൻ <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> താൽപ്പര്യപ്പെടുന്നു. ടച്ച് വഴി പര്യവേക്ഷണം ചെയ്യൽ ഓൺ ചെയ്യുമ്പോൾ, നിങ്ങളുടെ വിരലിനടിയിലുള്ളവയുടെ വിവരണം കേൾക്കാനോ കാണാനോ അല്ലെങ്കിൽ ഫോണുമായി സംവദിക്കുന്ന ജെസ്റ്ററുകൾ നിർവഹിക്കാനോ കഴിയും."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 മാസം മുമ്പുള്ളത്"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"ഒരു മാസം മുമ്പ്"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 നിമിഷം മുമ്പ്"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> നിമിഷം മുമ്പ്"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 മിനിറ്റ് മുമ്പ്"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> മിനിറ്റ് മുമ്പ്"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 മണിക്കൂര്‍ മുമ്പ്"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> മണിക്കൂർ മുമ്പ്"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"കഴിഞ്ഞ <xliff:g id="COUNT">%d</xliff:g> ദിവസം"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"കഴിഞ്ഞ മാസം"</string>
<string name="older" msgid="5211975022815554840">"പഴയത്"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ഇന്നലെ"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> ദിവസം മുമ്പ്"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"ഒരു നിമിഷത്തിനുള്ളിൽ"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> നിമിഷത്തിനുള്ളിൽ"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"ഒരു മിനിറ്റിൽ"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> മിനിറ്റിനുള്ളിൽ"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"ഒരു മണിക്കൂറിനുള്ളിൽ"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> മണിക്കൂറിനുള്ളിൽ"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"നാളെ"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> ദിവസത്തിനുള്ളിൽ"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"ഒരു നിമിഷം മുമ്പ്"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> നിമിഷം മുമ്പ്"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"ഒരു മിനിറ്റ് മുമ്പ്"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> മിനിറ്റ് മുമ്പ്"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 മണിക്കൂര്‍ മുമ്പ്"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> മണിക്കൂർ മുമ്പ്"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ഇന്നലെ"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> ദിവസം മുമ്പ്"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"ഒരു നിമിഷത്തിനുള്ളിൽ"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> നിമിഷത്തിനുള്ളിൽ"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"ഒരു മിനിറ്റിനുള്ളിൽ"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> മിനിറ്റിനുള്ളിൽ"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"ഒരു മണിക്കൂറിനുള്ളിൽ"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> മണിക്കൂറിനുള്ളിൽ"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"നാളെ"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> ദിവസത്തിനുള്ളിൽ"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>-ന്"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>-ന്"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>-ൽ"</string>
diff --git a/core/res/res/values-mn-rMN/strings.xml b/core/res/res/values-mn-rMN/strings.xml
index 1adb3f8..450113c 100644
--- a/core/res/res/values-mn-rMN/strings.xml
+++ b/core/res/res/values-mn-rMN/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> нь Хүрч танихыг идэвхжүүлэхийг шаардаж байна. Хүрч таних идэвхжсэн тохиолдолд та хуруун доороо юу байгааг сонсох, тайлбарыг харах боломжтой ба утастайгаа дохиогоор харилцах боломжтой."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 сарын өмнө"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 сарын өмнө"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 секундын өмнө"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> секундын өмнө"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 минутын өмнө"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> минутын өмнө"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 цагийн өмнө"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> цагийн өмнө"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Сүүлийн <xliff:g id="COUNT">%d</xliff:g> өдөр"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Сүүлийн сар"</string>
<string name="older" msgid="5211975022815554840">"Хуучин"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"өчигдөр"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> өдрийн өмнө"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 секундын дараа"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> секундын дараа"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 минутын дараа"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> минутын дараа"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 цагийн дараа"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> цагийн дараа"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"маргааш"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> өдрийн дараа"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 секундын өмнө"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> сек дараа"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 мин өмнө"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> минутын өмнө"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 цагийн өмнө"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> цагийн өмнө"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"өчигдөр"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> өдрийн өмнө"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 сек дараа"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> сек дараа"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 мин дараа"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> минутын дараа"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 цагийн дараа"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> цагийн дараа"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"маргааш"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> өдрийн дараа"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-mr-rIN/strings.xml b/core/res/res/values-mr-rIN/strings.xml
index 0c7c921..599d8ec 100644
--- a/core/res/res/values-mr-rIN/strings.xml
+++ b/core/res/res/values-mr-rIN/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> स्पर्श करून एक्सप्लोर करा सक्षम करू इच्छिते. स्पर्श करून एक्सप्लोर करा चालू असते, तेव्हा आपण आपल्या बोटाखाली काय आहे त्याचे वर्णन ऐकू किंवा पाहू शकता किंवा फोनसह संवाद साधण्यासाठी जेश्चर करू शकता."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 महिन्यापूर्वी"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 महिन्यापूर्वी"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 सेकंदापूर्वी"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> सेकंदांपूर्वी"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 मिनिटापूर्वी"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> मिनिटांपूर्वी"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 तासापूर्वी"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> तासांपूर्वी"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"अंतिम <xliff:g id="COUNT">%d</xliff:g> दिवस"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"अंतिम महिना"</string>
<string name="older" msgid="5211975022815554840">"अधिक जुने"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"काल"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> दिवसांपूर्वी"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 सेकंदात"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> सेकंदांमध्‍ये"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 मिनिटात"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> मिनिटांमध्‍ये"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 तासात"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> तासांमध्‍ये"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"उद्या"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> दिवसांमध्‍ये"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 सेकंदापूर्वी"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> सेकंदांपूर्वी"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 मिनिटापूर्वी"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> मिनिटांपूर्वी"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 तासापूर्वी"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> तासांपूर्वी"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"काल"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> दिवसांपूर्वी"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 सेकंदामध्‍ये"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> सेकंदांमध्‍ये"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 मिनिटामध्‍ये"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> मिनिटांमध्‍ये"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 तासात"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> तासांमध्‍ये"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"उद्या"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> दिवसांमध्‍ये"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> रोजी"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> वाजता"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> मध्ये"</string>
diff --git a/core/res/res/values-ms-rMY/strings.xml b/core/res/res/values-ms-rMY/strings.xml
index c214fa1..531e59b 100644
--- a/core/res/res/values-ms-rMY/strings.xml
+++ b/core/res/res/values-ms-rMY/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ingin mendayakan Jelajah melalui Sentuhan. Apabila Jelajah melalui Sentuhan didayakan, anda boleh mendengar atau melihat penerangan tentang apa di bawah jari anda atau melakukan gerak isyarat untuk berinteraksi dengan telefon."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 bulan yang lalu"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Sebelum 1 bulan yang lalu"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 saat yang lalu"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> saat yang lalu"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minit yang lalu"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minit yang lalu"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 jam yang lalu"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> jam yang lalu"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"<xliff:g id="COUNT">%d</xliff:g> hari terakhir"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Bulan lepas"</string>
<string name="older" msgid="5211975022815554840">"Lebih lama"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"semalam"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> hari yang lalu"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"dalam 1 saat"</item>
- <item quantity="other" msgid="1241926116443974687">"dalam <xliff:g id="COUNT">%d</xliff:g> saat"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"dalam 1 minit"</item>
- <item quantity="other" msgid="3330713936399448749">"dalam <xliff:g id="COUNT">%d</xliff:g> minit"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"dalam 1 jam"</item>
- <item quantity="other" msgid="547290677353727389">"dalam <xliff:g id="COUNT">%d</xliff:g> jam"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"esok"</item>
- <item quantity="other" msgid="5109449375100953247">"dalam <xliff:g id="COUNT">%d</xliff:g> hari"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 saat yang lalu"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> saat yang lalu"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 minit yang lalu"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> minit yang lalu"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 jam yang lalu"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> jam yang lalu"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"semalam"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> hari yang lalu"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"dalam 1 saat"</item>
- <item quantity="other" msgid="5495880108825805108">"dalam <xliff:g id="COUNT">%d</xliff:g> saat"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"dalam 1 minit"</item>
- <item quantity="other" msgid="4216113292706568726">"dalam <xliff:g id="COUNT">%d</xliff:g> minit"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"dalam 1 jam"</item>
- <item quantity="other" msgid="3705373766798013406">"dalam <xliff:g id="COUNT">%d</xliff:g> jam"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"esok"</item>
- <item quantity="other" msgid="2973062968038355991">"dalam <xliff:g id="COUNT">%d</xliff:g> hari"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"pada <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"pada <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"dalam <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my-rMM/strings.xml
index e805099..3754152 100644
--- a/core/res/res/values-my-rMM/strings.xml
+++ b/core/res/res/values-my-rMM/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> က ထိတွေ့ပြီး ရှာဖွေခြင်းကို လုပ်ချင်ပါသည်။ ထိတွေ့ရှာဖွေခြင်း ဖွင့်ထားလျှင် သင့်လက်ဖျားအောက်မှ အရာကို ကြားနိုင် သို့ ရှင်းလင်းချက်ကို မြင်နိုင်တဲ့ အပြင် လက် အနေအထားဖြင့် ဖုန်းကို ဆက်သွယ်ပြုလုပ်စေခိုင်းနိုင်ပါသည်"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"လွန်ခဲ့သော၁လက"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"လွန်ခဲ့သော၁လမတိုင်မီက"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"လွန်ခဲ့သော ၁စက္ကန့်က"</item>
- <item quantity="other" msgid="3903706804349556379">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> စက္ကန့်က"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"လွန်ခဲ့သော ၁မိနစ်က"</item>
- <item quantity="other" msgid="2176942008915455116">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> မိနစ်က"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"လွနခဲ့သော ၁နာရီက"</item>
- <item quantity="other" msgid="2467273239587587569">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> နာရီက"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"ပြီးခဲ့သော<xliff:g id="COUNT">%d</xliff:g>ရက်က"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"ပြီးခဲ့သောလ"</string>
<string name="older" msgid="5211975022815554840">"ယခင်က"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"မနေ့က"</item>
- <item quantity="other" msgid="2479586466153314633">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> ရက်တွင်"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"နောက် ၁စက္ကန့်တွင်"</item>
- <item quantity="other" msgid="1241926116443974687">"နောက် <xliff:g id="COUNT">%d</xliff:g> စက္ကန့်တွင်"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"နောက်၁မီနစ်တွင်"</item>
- <item quantity="other" msgid="3330713936399448749">"နောက် <xliff:g id="COUNT">%d</xliff:g> မိနစ်တွင်"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"နောက်၁နာရီတွင်"</item>
- <item quantity="other" msgid="547290677353727389">"နောက် <xliff:g id="COUNT">%d</xliff:g> နာရီတွင်"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"မနက်ဖြန်"</item>
- <item quantity="other" msgid="5109449375100953247">"နောက် <xliff:g id="COUNT">%d</xliff:g> ရက်တွင်"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"လွန်ခဲ့သော ၁စက္ကန့်က"</item>
- <item quantity="other" msgid="3699169366650930415">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> စက္ကန့်က"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"လွန်ခဲ့သော ၁မိနစ်က"</item>
- <item quantity="other" msgid="851164968597150710">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> မိနစ်က"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"လွန်ခဲ့သော ၁နာရီက"</item>
- <item quantity="other" msgid="6889970745748538901">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> နာရီက"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"မနေ့က"</item>
- <item quantity="other" msgid="3453342639616481191">"လွန်ခဲ့သော <xliff:g id="COUNT">%d</xliff:g> ရက်တွင်"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"နောက် ၁စက္ကန့်တွင်"</item>
- <item quantity="other" msgid="5495880108825805108">"နောက် <xliff:g id="COUNT">%d</xliff:g> စက္ကန့်တွင်"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"နောက်၁မိနစ်တွင်"</item>
- <item quantity="other" msgid="4216113292706568726">"နောက် <xliff:g id="COUNT">%d</xliff:g> မိနစ်တွင်"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"နောက်၁နာရီတွင်"</item>
- <item quantity="other" msgid="3705373766798013406">"နောက် <xliff:g id="COUNT">%d</xliff:g> နာရီတွင်"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"မနက်ဖြန်"</item>
- <item quantity="other" msgid="2973062968038355991">"နောက် <xliff:g id="COUNT">%d</xliff:g> ရက်တွင်"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> တွင်"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>မှာ"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>တွင်"</string>
diff --git a/core/res/res/values-nb/donottranslate-cldr.xml b/core/res/res/values-nb/donottranslate-cldr.xml
index 3b2a6c6..17aea0e 100755
--- a/core/res/res/values-nb/donottranslate-cldr.xml
+++ b/core/res/res/values-nb/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e. %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e. %b %Y</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index c2135b6..536e353 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ber om aktivering av Utforsk ved å trykke. Når Utforsk ved å trykke er slått på, kan du høre eller se beskrivelser av det som er under fingrene dine. Du kan også utføre handlinger på nettbrettet ved hjelp av bevegelser."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"For én måned siden"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"For over en måned siden"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"for et sekund siden"</item>
- <item quantity="other" msgid="3903706804349556379">"for <xliff:g id="COUNT">%d</xliff:g> sekunder siden"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"for et minutt siden"</item>
- <item quantity="other" msgid="2176942008915455116">"for <xliff:g id="COUNT">%d</xliff:g> minutter siden"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"for en time siden"</item>
- <item quantity="other" msgid="2467273239587587569">"for <xliff:g id="COUNT">%d</xliff:g> timer siden"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Siste <xliff:g id="COUNT">%d</xliff:g> dager"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Forrige måned"</string>
<string name="older" msgid="5211975022815554840">"Eldre"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"i går"</item>
- <item quantity="other" msgid="2479586466153314633">"for <xliff:g id="COUNT">%d</xliff:g> dager siden"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"om et sekund"</item>
- <item quantity="other" msgid="1241926116443974687">"om <xliff:g id="COUNT">%d</xliff:g> sekunder"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"om et minutt"</item>
- <item quantity="other" msgid="3330713936399448749">"om <xliff:g id="COUNT">%d</xliff:g> minutter"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"om et minutt"</item>
- <item quantity="other" msgid="547290677353727389">"om <xliff:g id="COUNT">%d</xliff:g> timer"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"i morgen"</item>
- <item quantity="other" msgid="5109449375100953247">"om <xliff:g id="COUNT">%d</xliff:g> dager"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 sek siden"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> sek siden"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 min siden"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> min siden"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 t siden"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> t siden"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"i går"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> d siden"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"om 1 sek"</item>
- <item quantity="other" msgid="5495880108825805108">"om <xliff:g id="COUNT">%d</xliff:g> sek"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"om 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"om <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"om 1 t"</item>
- <item quantity="other" msgid="3705373766798013406">"om <xliff:g id="COUNT">%d</xliff:g> t"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"i morgen"</item>
- <item quantity="other" msgid="2973062968038355991">"om <xliff:g id="COUNT">%d</xliff:g> d"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"i <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-ne-rNP/strings.xml b/core/res/res/values-ne-rNP/strings.xml
index 5363cae..44f112e 100644
--- a/core/res/res/values-ne-rNP/strings.xml
+++ b/core/res/res/values-ne-rNP/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>ले स्पर्षद्वारा अन्वेषण सक्षम गर्न चाहन्छ। स्पर्षद्वारा अन्वेषण सक्षम भएको बेला तपाईँ आफ्नो औँलाको मुनि भएका विषयवस्तुहरू बारे सुन्न वा विवरण हेर्न सक्नुहुन्छ वा फोनसँग अन्तर्क्रिया गर्न इशारा गर्नुहोस्।"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"१ महिना अघि"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"१ महिना अघि"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"१ सेकेन्ड अघि"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> सेकेन्ड अघि"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"१ मिनेट अघि"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> मिनेट अघि"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"१ घन्टा अघि"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> घन्टा अघि"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"अन्तिम <xliff:g id="COUNT">%d</xliff:g> दिन"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"अन्तिम महिना"</string>
<string name="older" msgid="5211975022815554840">"पुरानो"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"हिजो"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> दिन अघि"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"१ सेकेन्डमा"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> सेकेन्डमा"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"१ मिनेटमा"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g>मिनेटमा"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"१ घन्टामा"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> घन्टामा"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"भोलि"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> दिनमा"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"१ सेकेन्ड अघि"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> सेकेन्ड अगाडि"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"१ मिनेट अघि"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> मिनेट अघि"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"१ घन्टा अघि"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> घन्टा अघि"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"हिजो"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> दिन अघि"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"१ सेकन्ड"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> सेकेन्डमा"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"१ मिनेटमा"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> मिनेटमा"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"१ घन्टामा"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> घन्टामा"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"भोलि"</item>
- <item quantity="other" msgid="2973062968038355991">"दिन<xliff:g id="COUNT">%d</xliff:g> मा"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> मा"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> मा"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> मा"</string>
diff --git a/core/res/res/values-nl/donottranslate-cldr.xml b/core/res/res/values-nl/donottranslate-cldr.xml
index 29b120c..35a84eb 100755
--- a/core/res/res/values-nl/donottranslate-cldr.xml
+++ b/core/res/res/values-nl/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s-%s-%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e %b %Y</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 9ba73ff..892a96a 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> wil \'Verkennen via aanraking\' inschakelen. Wanneer \'Verkennen via aanraking\' is ingeschakeld, kunt u beschrijvingen beluisteren of bekijken van wat er onder uw vinger staat of aanraakbewerkingen uitvoeren op de telefoon."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 maand geleden"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Meer dan 1 maand geleden"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 seconde geleden"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> seconden geleden"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minuut geleden"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minuten geleden"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 uur geleden"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> uur geleden"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Afgelopen <xliff:g id="COUNT">%d</xliff:g> dagen"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Afgelopen maand"</string>
<string name="older" msgid="5211975022815554840">"Ouder"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"gisteren"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dagen geleden"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"over 1 seconde"</item>
- <item quantity="other" msgid="1241926116443974687">"over <xliff:g id="COUNT">%d</xliff:g> seconden"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"over 1 minuut"</item>
- <item quantity="other" msgid="3330713936399448749">"over <xliff:g id="COUNT">%d</xliff:g> minuten"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"over 1 uur"</item>
- <item quantity="other" msgid="547290677353727389">"over <xliff:g id="COUNT">%d</xliff:g> uur"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"morgen"</item>
- <item quantity="other" msgid="5109449375100953247">"over <xliff:g id="COUNT">%d</xliff:g> dagen"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 seconde geleden"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> seconden geleden"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 minuut geleden"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> minuten geleden"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 uur geleden"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> uur geleden"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"gisteren"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> dagen geleden"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"over 1 seconde"</item>
- <item quantity="other" msgid="5495880108825805108">"over <xliff:g id="COUNT">%d</xliff:g> seconden"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"over 1 minuut"</item>
- <item quantity="other" msgid="4216113292706568726">"over <xliff:g id="COUNT">%d</xliff:g> minuten"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"over 1 uur"</item>
- <item quantity="other" msgid="3705373766798013406">"over <xliff:g id="COUNT">%d</xliff:g> uur"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"morgen"</item>
- <item quantity="other" msgid="2973062968038355991">"over <xliff:g id="COUNT">%d</xliff:g> dagen"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"op <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"om <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"in <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-pl/donottranslate-cldr.xml b/core/res/res/values-pl/donottranslate-cldr.xml
index f9431b2..3f341b8 100755
--- a/core/res/res/values-pl/donottranslate-cldr.xml
+++ b/core/res/res/values-pl/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%d.%m.%Y %H:%M:%S</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 4cb4236..8de5281 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> chce włączyć Czytanie dotykiem. Gdy ta funkcja jest włączona, słyszysz i widzisz opisy elementów, które są pod Twoim palcem, oraz możesz obsługiwać telefon gestami."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 miesiąc temu"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Ponad 1 miesiąc temu"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"sekundę temu"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> sek. temu"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minutę temu"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> min temu"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"godzinę temu"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> godz. temu"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Ostatnie (<xliff:g id="COUNT">%d</xliff:g>) dni"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Ostatni miesiąc"</string>
<string name="older" msgid="5211975022815554840">"Starsze"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"wczoraj"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dni temu"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"za sekundę"</item>
- <item quantity="other" msgid="1241926116443974687">"za <xliff:g id="COUNT">%d</xliff:g> sek."</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"za minutę"</item>
- <item quantity="other" msgid="3330713936399448749">"za <xliff:g id="COUNT">%d</xliff:g> min."</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"za godzinę"</item>
- <item quantity="other" msgid="547290677353727389">"za <xliff:g id="COUNT">%d</xliff:g> godzin"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"jutro"</item>
- <item quantity="other" msgid="5109449375100953247">"za <xliff:g id="COUNT">%d</xliff:g> dni"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"sekundę temu"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> s temu"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"minutę temu"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> min temu"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"godzinę temu"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> godz. temu"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"wczoraj"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> dni temu"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"za sekundę"</item>
- <item quantity="other" msgid="5495880108825805108">"za <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"za minutę"</item>
- <item quantity="other" msgid="4216113292706568726">"za <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"za godzinę"</item>
- <item quantity="other" msgid="3705373766798013406">"za <xliff:g id="COUNT">%d</xliff:g> godz."</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"jutro"</item>
- <item quantity="other" msgid="2973062968038355991">"za <xliff:g id="COUNT">%d</xliff:g> dni"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"w dniu <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"o godzinie <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"w <xliff:g id="YEAR">%s</xliff:g> r."</string>
diff --git a/core/res/res/values-pt-rPT/donottranslate-cldr.xml b/core/res/res/values-pt-rPT/donottranslate-cldr.xml
index 9c9f903..6355432 100755
--- a/core/res/res/values-pt-rPT/donottranslate-cldr.xml
+++ b/core/res/res/values-pt-rPT/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e de %B de %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e de %b de %Y</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 6180dfc..fb0b302 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> pretende ativar a funcionalidade Explorar Através do Toque. Quando a funcionalidade Explorar Através do Toque estiver ativada, pode ouvir ou visualizar descrições sobre o que está por baixo do seu dedo ou executar gestos para interagir com o telemóvel."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Há 1 mês"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Há mais de 1 mês"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Há 1 segundo"</item>
- <item quantity="other" msgid="3903706804349556379">"Há <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Há 1 minuto"</item>
- <item quantity="other" msgid="2176942008915455116">"Há <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Há 1 hora"</item>
- <item quantity="other" msgid="2467273239587587569">"Há <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Últimos <xliff:g id="COUNT">%d</xliff:g> dias"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Último mês"</string>
<string name="older" msgid="5211975022815554840">"Mais antiga"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ontem"</item>
- <item quantity="other" msgid="2479586466153314633">"Há <xliff:g id="COUNT">%d</xliff:g> dias"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"daqui a 1 segundo"</item>
- <item quantity="other" msgid="1241926116443974687">"daqui a <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"daqui a 1 minuto"</item>
- <item quantity="other" msgid="3330713936399448749">"daqui a <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"daqui a 1 hora"</item>
- <item quantity="other" msgid="547290677353727389">"daqui a <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"amanhã"</item>
- <item quantity="other" msgid="5109449375100953247">"daqui a <xliff:g id="COUNT">%d</xliff:g> dias"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"Há 1 seg"</item>
- <item quantity="other" msgid="3699169366650930415">"Há <xliff:g id="COUNT">%d</xliff:g> seg"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"há 1 min"</item>
- <item quantity="other" msgid="851164968597150710">"Há <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"Há 1 hora"</item>
- <item quantity="other" msgid="6889970745748538901">"Há <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ontem"</item>
- <item quantity="other" msgid="3453342639616481191">"Há <xliff:g id="COUNT">%d</xliff:g> dias"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"daqui a 1 seg"</item>
- <item quantity="other" msgid="5495880108825805108">"daqui a <xliff:g id="COUNT">%d</xliff:g> seg"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"daqui a 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"daqui a <xliff:g id="COUNT">%d</xliff:g> min"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"daqui a 1 hora"</item>
- <item quantity="other" msgid="3705373766798013406">"em <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"amanhã"</item>
- <item quantity="other" msgid="2973062968038355991">"daqui a <xliff:g id="COUNT">%d</xliff:g> dias"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"a <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"às <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"em <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-pt/donottranslate-cldr.xml b/core/res/res/values-pt/donottranslate-cldr.xml
index 2da7599..c97b337 100755
--- a/core/res/res/values-pt/donottranslate-cldr.xml
+++ b/core/res/res/values-pt/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e de %B de %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %d/%m/%Y</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index a1cdbb2..3d5e347 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> quer ativar a exploração pelo toque. Com ela, você pode ouvir ou ver descrições do que está sob seu dedo e interagir com o telefone através de gestos."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 mês atrás"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Antes de 1 mês atrás"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 segundo atrás"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> segundos atrás"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minuto atrás"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> minutos atrás"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 hora atrás"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> horas atrás"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Últimos <xliff:g id="COUNT">%d</xliff:g> dias"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Mês passado"</string>
<string name="older" msgid="5211975022815554840">"Mais antigos"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ontem"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> dias atrás"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"em 1 segundo"</item>
- <item quantity="other" msgid="1241926116443974687">"em <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"em 1 minuto"</item>
- <item quantity="other" msgid="3330713936399448749">"em <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"em 1 hora"</item>
- <item quantity="other" msgid="547290677353727389">"Em <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"amanhã"</item>
- <item quantity="other" msgid="5109449375100953247">"em <xliff:g id="COUNT">%d</xliff:g> dias"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 seg. atrás"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> segundos atrás"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 minuto atrás"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> minutos atrás"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 hora atrás"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> horas atrás"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ontem"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> dias atrás"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"em 1 segundo"</item>
- <item quantity="other" msgid="5495880108825805108">"em <xliff:g id="COUNT">%d</xliff:g> segundos"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"em 1 minuto"</item>
- <item quantity="other" msgid="4216113292706568726">"em <xliff:g id="COUNT">%d</xliff:g> minutos"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"em 1 hora"</item>
- <item quantity="other" msgid="3705373766798013406">"em <xliff:g id="COUNT">%d</xliff:g> horas"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"amanhã"</item>
- <item quantity="other" msgid="2973062968038355991">"em <xliff:g id="COUNT">%d</xliff:g> dias"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"em <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"às <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"em <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-ro-rRO/donottranslate-cldr.xml b/core/res/res/values-ro-rRO/donottranslate-cldr.xml
index cfb79e8..c874dcf 100755
--- a/core/res/res/values-ro-rRO/donottranslate-cldr.xml
+++ b/core/res/res/values-ro-rRO/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S, %d.%m.%Y</string>
diff --git a/core/res/res/values-ro/donottranslate-cldr.xml b/core/res/res/values-ro/donottranslate-cldr.xml
index cfb79e8..c874dcf 100755
--- a/core/res/res/values-ro/donottranslate-cldr.xml
+++ b/core/res/res/values-ro/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S, %d.%m.%Y</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 0626934..8415792 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> doreşte să activeze funcţia Exploraţi prin atingere. Când această funcţie este activată, puteţi auzi sau vedea descrieri pentru ceea ce se află sub degetul dvs. sau puteţi efectua gesturi pentru a interacţiona cu telefonul."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"cu 1 lună în urmă"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Cu mai mult de 1 lună în urmă"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"cu 1 secundă în urmă"</item>
- <item quantity="other" msgid="3903706804349556379">"cu <xliff:g id="COUNT">%d</xliff:g> (de) secunde în urmă"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"cu 1 minut în urmă"</item>
- <item quantity="other" msgid="2176942008915455116">"cu <xliff:g id="COUNT">%d</xliff:g> (de) minute în urmă"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"cu 1 oră în urmă"</item>
- <item quantity="other" msgid="2467273239587587569">"cu <xliff:g id="COUNT">%d</xliff:g> (de) ore în urmă"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Ultimele <xliff:g id="COUNT">%d</xliff:g> de zile"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Luna trecută"</string>
<string name="older" msgid="5211975022815554840">"Mai vechi"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ieri"</item>
- <item quantity="other" msgid="2479586466153314633">"cu <xliff:g id="COUNT">%d</xliff:g> (de) zile în urmă"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"într-o secundă"</item>
- <item quantity="other" msgid="1241926116443974687">"în <xliff:g id="COUNT">%d</xliff:g> (de) secunde"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"în 1 minut"</item>
- <item quantity="other" msgid="3330713936399448749">"în <xliff:g id="COUNT">%d</xliff:g> (de) minute"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"în 1 oră"</item>
- <item quantity="other" msgid="547290677353727389">"în <xliff:g id="COUNT">%d</xliff:g> (de) ore"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"mâine"</item>
- <item quantity="other" msgid="5109449375100953247">"în <xliff:g id="COUNT">%d</xliff:g> (de) zile"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"cu 1 sec. în urmă"</item>
- <item quantity="other" msgid="3699169366650930415">"cu <xliff:g id="COUNT">%d</xliff:g> (de) secunde în urmă"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"cu 1 min. în urmă"</item>
- <item quantity="other" msgid="851164968597150710">"cu <xliff:g id="COUNT">%d</xliff:g> (de) min. în urmă"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"cu 1 oră în urmă"</item>
- <item quantity="other" msgid="6889970745748538901">"cu <xliff:g id="COUNT">%d</xliff:g> (de) ore în urmă"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ieri"</item>
- <item quantity="other" msgid="3453342639616481191">"cu <xliff:g id="COUNT">%d</xliff:g> (de) zile în urmă"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"în 1 sec."</item>
- <item quantity="other" msgid="5495880108825805108">"în <xliff:g id="COUNT">%d</xliff:g> (de) sec."</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"în 1 min."</item>
- <item quantity="other" msgid="4216113292706568726">"în <xliff:g id="COUNT">%d</xliff:g> (de) min."</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"în 1 oră"</item>
- <item quantity="other" msgid="3705373766798013406">"în <xliff:g id="COUNT">%d</xliff:g> (de) ore"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"mâine"</item>
- <item quantity="other" msgid="2973062968038355991">"în <xliff:g id="COUNT">%d</xliff:g> (de) zile"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"pe <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"la <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"în <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-ru/donottranslate-cldr.xml b/core/res/res/values-ru/donottranslate-cldr.xml
index c22df99..a36f13d 100755
--- a/core/res/res/values-ru/donottranslate-cldr.xml
+++ b/core/res/res/values-ru/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e %B %Y г.</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%-k:%M:%S, %d.%m.%Y</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 67ffd35..e268193 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> хочет включить функцию \"Аудиоподсказки\". Она позволяет прослушивать или просматривать описание элементов, которых вы касаетесь, и управлять телефоном с помощью жестов."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 месяц назад"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Более месяца назад"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 секунду назад"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> с. назад"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 минуту назад"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> мин. назад"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 час назад"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ч. назад"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Последние <xliff:g id="COUNT">%d</xliff:g> дн."</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Прошлый месяц"</string>
<string name="older" msgid="5211975022815554840">"Еще раньше"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"вчера"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> дн. назад"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"через 1 секунду"</item>
- <item quantity="other" msgid="1241926116443974687">"через <xliff:g id="COUNT">%d</xliff:g> с."</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"через 1 минуту"</item>
- <item quantity="other" msgid="3330713936399448749">"через <xliff:g id="COUNT">%d</xliff:g> мин."</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"через 1 час"</item>
- <item quantity="other" msgid="547290677353727389">"через <xliff:g id="COUNT">%d</xliff:g> ч."</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"завтра"</item>
- <item quantity="other" msgid="5109449375100953247">"через <xliff:g id="COUNT">%d</xliff:g> дн."</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 сек. назад"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> сек. назад"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 мин. назад"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> мин. назад"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 час назад"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ч. назад"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"вчера"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> дн. назад"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"через 1 с."</item>
- <item quantity="other" msgid="5495880108825805108">"через <xliff:g id="COUNT">%d</xliff:g> с."</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"через 1 мин."</item>
- <item quantity="other" msgid="4216113292706568726">"через <xliff:g id="COUNT">%d</xliff:g> мин."</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"через 1 час"</item>
- <item quantity="other" msgid="3705373766798013406">"через <xliff:g id="COUNT">%d</xliff:g> ч."</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"завтра"</item>
- <item quantity="other" msgid="2973062968038355991">"через <xliff:g id="COUNT">%d</xliff:g> дн."</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"в <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"в <xliff:g id="YEAR">%s</xliff:g> г."</string>
diff --git a/core/res/res/values-si-rLK/strings.xml b/core/res/res/values-si-rLK/strings.xml
index 964610a..205c2a6 100644
--- a/core/res/res/values-si-rLK/strings.xml
+++ b/core/res/res/values-si-rLK/strings.xml
@@ -1130,75 +1130,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"ස්පර්ශය වෙතින් ගවේෂණය සක්‍රිය කිරීමට <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ට අවශ්‍යයි. ස්පර්ශය වෙතින් ගවේෂණය සක්‍රිය විට, ඔබගේ ඇඟිලිවලට පහළ විස්තර ඇසිය හෝ බැලිය හැක හෝ දුරකථනය සමග අන්තර් ක්‍රියාකාරී වීමට ඉංගිති සිදු කළ හැක."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"මාස 1 කට පෙර"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"මාස 1 කට පෙර"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"තත්පර 1 කට පෙර"</item>
- <item quantity="other" msgid="3903706804349556379">"තත්පර <xliff:g id="COUNT">%d</xliff:g> ට පෙර"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"මිනිත්තු 1 ට පෙර"</item>
- <item quantity="other" msgid="2176942008915455116">"මිනිත්තු <xliff:g id="COUNT">%d</xliff:g> කට පෙර"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"පැය 1 කට පෙර"</item>
- <item quantity="other" msgid="2467273239587587569">"පැය <xliff:g id="COUNT">%d</xliff:g> කට පෙර"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"අන්තිම දවස් <xliff:g id="COUNT">%d</xliff:g>"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"අවසාන මාසය"</string>
<string name="older" msgid="5211975022815554840">"පරණ"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"ඊයේ"</item>
- <item quantity="other" msgid="2479586466153314633">"දින <xliff:g id="COUNT">%d</xliff:g> කට පෙර"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"තත්පර 1 කින්"</item>
- <item quantity="other" msgid="1241926116443974687">"තත්පර <xliff:g id="COUNT">%d</xliff:g> කදී"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"මිනිත්තු 1 කදී"</item>
- <item quantity="other" msgid="3330713936399448749">"මිනිත්තු <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"පැය 1 ක් තුළ"</item>
- <item quantity="other" msgid="547290677353727389">"පැය <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"හෙට"</item>
- <item quantity="other" msgid="5109449375100953247">"දින <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"තත්පර 1 කට පෙර"</item>
- <item quantity="other" msgid="3699169366650930415">"තත්පර <xliff:g id="COUNT">%d</xliff:g> කට පෙර"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"මිනිත්තු 1 කට පෙර"</item>
- <item quantity="other" msgid="851164968597150710">"මිනිත්තු <xliff:g id="COUNT">%d</xliff:g> ට පෙර"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"පැය 1 කට පෙර"</item>
- <item quantity="other" msgid="6889970745748538901">"පැය <xliff:g id="COUNT">%d</xliff:g> ට පෙර"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"ඊයේ"</item>
- <item quantity="other" msgid="3453342639616481191">"දින <xliff:g id="COUNT">%d</xliff:g> ට පෙර"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"තත්පර 1 ක් තුළ"</item>
- <item quantity="other" msgid="5495880108825805108">"තත්පර <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"මිනිත්තු 1 ක් තුළ"</item>
- <item quantity="other" msgid="4216113292706568726">"මිනිත්තු <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"පැය 1 ක් තුළ"</item>
- <item quantity="other" msgid="3705373766798013406">"පැය <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"හෙට"</item>
- <item quantity="other" msgid="2973062968038355991">"දින <xliff:g id="COUNT">%d</xliff:g> ක් තුළ"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> වන දා"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> ට"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> තුළ"</string>
diff --git a/core/res/res/values-sk-rSK/donottranslate-cldr.xml b/core/res/res/values-sk-rSK/donottranslate-cldr.xml
index 765c51e..51f7e38 100755
--- a/core/res/res/values-sk-rSK/donottranslate-cldr.xml
+++ b/core/res/res/values-sk-rSK/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s. %s. %s"</string>
<string name="month_day_year">%-e. %B %Y</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%-k:%M:%S %-e. %-m. %Y</string>
diff --git a/core/res/res/values-sk/donottranslate-cldr.xml b/core/res/res/values-sk/donottranslate-cldr.xml
index d4953c3..b30fe97 100755
--- a/core/res/res/values-sk/donottranslate-cldr.xml
+++ b/core/res/res/values-sk/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e. %B %Y</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%-k:%M:%S %-e.%-m.%Y</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index dac0939..8f2db96 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Služba <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> požaduje povolenie funkcie Preskúmanie dotykom. Ak je funkcia Preskúmanie dotykom zapnutá, môžete počuť alebo vidieť popisy objektov pod vaším prstom alebo ovládať telefón gestami."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"pred 1 mesiacom"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Viac ako pred 1 mesiacom"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"pred 1 sekundou"</item>
- <item quantity="other" msgid="3903706804349556379">"pred <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Pred minútou"</item>
- <item quantity="other" msgid="2176942008915455116">"pred <xliff:g id="COUNT">%d</xliff:g> minútami"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"pred 1 hodinou"</item>
- <item quantity="other" msgid="2467273239587587569">"pred <xliff:g id="COUNT">%d</xliff:g> hodinami"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Posledných <xliff:g id="COUNT">%d</xliff:g> dní"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Minulý mesiac"</string>
<string name="older" msgid="5211975022815554840">"Staršie"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"včera"</item>
- <item quantity="other" msgid="2479586466153314633">"pred <xliff:g id="COUNT">%d</xliff:g> dňami"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"o 1 sekundu"</item>
- <item quantity="other" msgid="1241926116443974687">"o <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"o 1 minútu"</item>
- <item quantity="other" msgid="3330713936399448749">"o <xliff:g id="COUNT">%d</xliff:g> minút"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"o 1 hodinu"</item>
- <item quantity="other" msgid="547290677353727389">"o <xliff:g id="COUNT">%d</xliff:g> hodín"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"zajtra"</item>
- <item quantity="other" msgid="5109449375100953247">"o <xliff:g id="COUNT">%d</xliff:g> dní"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"pred 1 s"</item>
- <item quantity="other" msgid="3699169366650930415">"pred <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"pred 1 min."</item>
- <item quantity="other" msgid="851164968597150710">"pred <xliff:g id="COUNT">%d</xliff:g> min."</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"pred 1 hodinou"</item>
- <item quantity="other" msgid="6889970745748538901">"pred <xliff:g id="COUNT">%d</xliff:g> hodinami"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"včera"</item>
- <item quantity="other" msgid="3453342639616481191">"pred <xliff:g id="COUNT">%d</xliff:g> dňami"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"o 1 s"</item>
- <item quantity="other" msgid="5495880108825805108">"o <xliff:g id="COUNT">%d</xliff:g> s"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"o 1 min."</item>
- <item quantity="other" msgid="4216113292706568726">"o <xliff:g id="COUNT">%d</xliff:g> min."</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"o 1 hodinu"</item>
- <item quantity="other" msgid="3705373766798013406">"o <xliff:g id="COUNT">%d</xliff:g> hodín"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"zajtra"</item>
- <item quantity="other" msgid="2973062968038355991">"o <xliff:g id="COUNT">%d</xliff:g> dní"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"dňa <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"o <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"z <xliff:g id="YEAR">%s</xliff:g>"</string>
@@ -1842,8 +1778,8 @@
<string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Pred uvoľnením požiadať o bezpečnostný vzor"</string>
<string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Pred uvoľnením požiadať o heslo"</string>
<string name="battery_saver_description" msgid="1960431123816253034">"Šetrič batérie znižuje výkonnosť vášho zariadenia a obmedzuje vibrovanie, služby určovania polohy a väčšinu údajov na pozadí, aby tak pomohol predĺžiť výdrž batérie. E-mailová aplikácia, aplikácia na odosielanie správ SMS a MMS a ďalšie aplikácie, ktoré sú založené na synchronizácii, sa pravdepodobne aktualizujú až po ich otvorení.\n\nŠetrič batérie sa automaticky vypne, keď zariadenie začnete nabíjať."</string>
- <string name="downtime_condition_summary" msgid="8761776337475705749">"Dokým o <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> neskončí výpadok"</string>
- <string name="downtime_condition_line_one" msgid="8762708714645352010">"Kým skončí vaša odstávka"</string>
+ <string name="downtime_condition_summary" msgid="8761776337475705749">"Kým o <xliff:g id="FORMATTEDTIME">%1$s</xliff:g> neskončí doba pokoja"</string>
+ <string name="downtime_condition_line_one" msgid="8762708714645352010">"Kým neskončí doba pokoja"</string>
<plurals name="zen_mode_duration_minutes_summary">
<item quantity="one" msgid="3177683545388923234">"Na minútu (do <xliff:g id="FORMATTEDTIME">%2$s</xliff:g>)"</item>
<item quantity="other" msgid="2787867221129368935">"Na %1$d min. (do <xliff:g id="FORMATTEDTIME">%2$s</xliff:g>)"</item>
diff --git a/core/res/res/values-sl-rSI/donottranslate-cldr.xml b/core/res/res/values-sl-rSI/donottranslate-cldr.xml
index 17d8609..798f4c0 100755
--- a/core/res/res/values-sl-rSI/donottranslate-cldr.xml
+++ b/core/res/res/values-sl-rSI/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s. %s. %s"</string>
<string name="month_day_year">%d. %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S, %-e. %b %Y</string>
diff --git a/core/res/res/values-sl/donottranslate-cldr.xml b/core/res/res/values-sl/donottranslate-cldr.xml
index 83e4693..92cd963 100755
--- a/core/res/res/values-sl/donottranslate-cldr.xml
+++ b/core/res/res/values-sl/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s. %s. %s"</string>
<string name="month_day_year">%d. %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e. %b. %Y</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index e22ebf8..5bce96b 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Storitev <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> želi omogočiti raziskovanje z dotikom. Ko je raziskovanje z dotikom vklopljeno, lahko slišite ali vidite opise tega, kar je pod vašim prstom, ali izvajate poteze za interakcijo s telefonom."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Pred 1 mesecem"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Pred več kot 1 mesecem"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Pred 1 sekundo"</item>
- <item quantity="other" msgid="3903706804349556379">"pred toliko sekundami: <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"pred 1 minuto"</item>
- <item quantity="other" msgid="2176942008915455116">"Pred <xliff:g id="COUNT">%d</xliff:g> minutami"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"pred 1 uro"</item>
- <item quantity="other" msgid="2467273239587587569">"Pred <xliff:g id="COUNT">%d</xliff:g> urami"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Zadnjih <xliff:g id="COUNT">%d</xliff:g> dni"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Pretekli mesec"</string>
<string name="older" msgid="5211975022815554840">"Starejše"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"včeraj"</item>
- <item quantity="other" msgid="2479586466153314633">"Pred <xliff:g id="COUNT">%d</xliff:g> dnevi"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"čez 1 sekundo"</item>
- <item quantity="other" msgid="1241926116443974687">"Čez <xliff:g id="COUNT">%d</xliff:g> sekund"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"čez 1 minuto"</item>
- <item quantity="other" msgid="3330713936399448749">"Čez toliko minut: <xliff:g id="COUNT">%d</xliff:g>."</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"čez 1 uro"</item>
- <item quantity="other" msgid="547290677353727389">"čez <xliff:g id="COUNT">%d</xliff:g> ur"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"jutri"</item>
- <item quantity="other" msgid="5109449375100953247">"čez <xliff:g id="COUNT">%d</xliff:g> dni"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"pred 1 sekundo"</item>
- <item quantity="other" msgid="3699169366650930415">"Pred toliko sekundami: <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"pred 1 minuto"</item>
- <item quantity="other" msgid="851164968597150710">"Pred <xliff:g id="COUNT">%d</xliff:g> minutami"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"pred 1 uro"</item>
- <item quantity="other" msgid="6889970745748538901">"Pred <xliff:g id="COUNT">%d</xliff:g> urami"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"včeraj"</item>
- <item quantity="other" msgid="3453342639616481191">"Pred <xliff:g id="COUNT">%d</xliff:g> dnevi"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"čez 1 sekundo"</item>
- <item quantity="other" msgid="5495880108825805108">"čez toliko sekund: <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"čez 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"čez <xliff:g id="COUNT">%d</xliff:g> minut"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"čez 1 uro"</item>
- <item quantity="other" msgid="3705373766798013406">"čez <xliff:g id="COUNT">%d</xliff:g> ur"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"jutri"</item>
- <item quantity="other" msgid="2973062968038355991">"čez <xliff:g id="COUNT">%d</xliff:g> dni"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"vsak <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"ob <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"leta <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-sr-rRS/donottranslate-cldr.xml b/core/res/res/values-sr-rRS/donottranslate-cldr.xml
index 8bb5fa7..a0f4bc2 100755
--- a/core/res/res/values-sr-rRS/donottranslate-cldr.xml
+++ b/core/res/res/values-sr-rRS/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s."</string>
<string name="month_day_year">%d. %B %Y.</string>
<string name="time_of_day">%H.%M.%S</string>
<string name="date_and_time">%H.%M.%S %d.%m.%Y.</string>
diff --git a/core/res/res/values-sr/donottranslate-cldr.xml b/core/res/res/values-sr/donottranslate-cldr.xml
index 8bb5fa7..a0f4bc2 100755
--- a/core/res/res/values-sr/donottranslate-cldr.xml
+++ b/core/res/res/values-sr/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s."</string>
<string name="month_day_year">%d. %B %Y.</string>
<string name="time_of_day">%H.%M.%S</string>
<string name="date_and_time">%H.%M.%S %d.%m.%Y.</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 546977d..79fffe8 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> жели да омогући Истраживање додиром. Када је Истраживање додиром укључено, можете да чујете или видите описе ставке на коју сте ставили прст или да комуницирате са телефоном помоћу покрета."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Пре месец дана"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Пре месец дана"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Пре 1 секунде"</item>
- <item quantity="other" msgid="3903706804349556379">"пре <xliff:g id="COUNT">%d</xliff:g> секунде(и)"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Пре једног минута"</item>
- <item quantity="other" msgid="2176942008915455116">"пре <xliff:g id="COUNT">%d</xliff:g> минута"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Пре сат времена"</item>
- <item quantity="other" msgid="2467273239587587569">"пре <xliff:g id="COUNT">%d</xliff:g> сата(и)"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"У последња(их) <xliff:g id="COUNT">%d</xliff:g> дана"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Прошлог месеца"</string>
<string name="older" msgid="5211975022815554840">"Старије"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"јуче"</item>
- <item quantity="other" msgid="2479586466153314633">"пре <xliff:g id="COUNT">%d</xliff:g> дана"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"за 1 секунду"</item>
- <item quantity="other" msgid="1241926116443974687">"за <xliff:g id="COUNT">%d</xliff:g> секунде(и)"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"за 1 минут"</item>
- <item quantity="other" msgid="3330713936399448749">"за <xliff:g id="COUNT">%d</xliff:g> минута"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"за 1 сат"</item>
- <item quantity="other" msgid="547290677353727389">"за <xliff:g id="COUNT">%d</xliff:g> сата(и)"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"сутра"</item>
- <item quantity="other" msgid="5109449375100953247">"за <xliff:g id="COUNT">%d</xliff:g> дана"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"Пре једне сек"</item>
- <item quantity="other" msgid="3699169366650930415">"пре <xliff:g id="COUNT">%d</xliff:g> сек"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"Пре један мин"</item>
- <item quantity="other" msgid="851164968597150710">"пре <xliff:g id="COUNT">%d</xliff:g> мин"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"Пре сат времена"</item>
- <item quantity="other" msgid="6889970745748538901">"пре <xliff:g id="COUNT">%d</xliff:g> сата(и)"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"јуче"</item>
- <item quantity="other" msgid="3453342639616481191">"пре <xliff:g id="COUNT">%d</xliff:g> дана"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"за 1 сек"</item>
- <item quantity="other" msgid="5495880108825805108">"за <xliff:g id="COUNT">%d</xliff:g> сек"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"за 1 мин"</item>
- <item quantity="other" msgid="4216113292706568726">"за <xliff:g id="COUNT">%d</xliff:g> мин"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"за 1 сат"</item>
- <item quantity="other" msgid="3705373766798013406">"за <xliff:g id="COUNT">%d</xliff:g> сата(и)"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"сутра"</item>
- <item quantity="other" msgid="2973062968038355991">"за <xliff:g id="COUNT">%d</xliff:g> дана"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"дана <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"у <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"у <xliff:g id="YEAR">%s</xliff:g>."</string>
diff --git a/core/res/res/values-sv/donottranslate-cldr.xml b/core/res/res/values-sv/donottranslate-cldr.xml
index 29b120c..35a84eb 100755
--- a/core/res/res/values-sv/donottranslate-cldr.xml
+++ b/core/res/res/values-sv/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s-%s-%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e %b %Y</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 3ab6f1f..25a6d68 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -630,7 +630,7 @@
<string name="permlab_locationUpdates" msgid="7785408253364335740">"styra meddelanden för platsuppdatering"</string>
<string name="permdesc_locationUpdates" msgid="1120741557891438876">"Tillåter att appen aktiverar/inaktiverar meddelanden om platsuppdateringar från radion. Används inte av vanliga appar."</string>
<string name="permlab_checkinProperties" msgid="7855259461268734914">"få åtkomst till incheckningsegenskaper"</string>
- <string name="permdesc_checkinProperties" msgid="4024526968630194128">"Tillåter att appen får läs/skrivåtkomst till egenskaper som läggs upp via incheckningstjänsten. Används inte av vanliga appar."</string>
+ <string name="permdesc_checkinProperties" msgid="4024526968630194128">"Tillåter att appen får läs/skrivåtkomst till egenskaper som laddas upp via incheckningstjänsten. Används inte av vanliga appar."</string>
<string name="permlab_bindGadget" msgid="776905339015863471">"välja widgetar"</string>
<string name="permdesc_bindGadget" msgid="8261326938599049290">"Tillåter att appen meddelar systemet vilka widgetar som kan användas av vilka appar. Med den här behörigheten kan andra appar få åtkomst till personliga uppgifter. Används inte av vanliga appar."</string>
<string name="permlab_modifyPhoneState" msgid="8423923777659292228">"ändra telefonstatus"</string>
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> vill aktivera Explore by Touch. När funktionen är aktiv kan du höra eller se beskrivningar av vad du har under fingret eller utföra gester för att göra saker med telefonen."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"för 1 månad sedan"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"För mer än en månad sedan"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"för 1 sekund sedan"</item>
- <item quantity="other" msgid="3903706804349556379">"för <xliff:g id="COUNT">%d</xliff:g> sekunder sedan"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"för 1 minut sedan"</item>
- <item quantity="other" msgid="2176942008915455116">"för <xliff:g id="COUNT">%d</xliff:g> minuter sedan"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"för 1 timme sedan"</item>
- <item quantity="other" msgid="2467273239587587569">"för <xliff:g id="COUNT">%d</xliff:g> timmar sedan"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"De senaste <xliff:g id="COUNT">%d</xliff:g> dagarna"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Föregående månad"</string>
<string name="older" msgid="5211975022815554840">"Äldre"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"igår"</item>
- <item quantity="other" msgid="2479586466153314633">"för <xliff:g id="COUNT">%d</xliff:g> dagar sedan"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"om 1 sekund"</item>
- <item quantity="other" msgid="1241926116443974687">"om <xliff:g id="COUNT">%d</xliff:g> sekunder"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"om 1 minut"</item>
- <item quantity="other" msgid="3330713936399448749">"om <xliff:g id="COUNT">%d</xliff:g> minuter"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"om 1 timme"</item>
- <item quantity="other" msgid="547290677353727389">"om <xliff:g id="COUNT">%d</xliff:g> timmar"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"imorgon"</item>
- <item quantity="other" msgid="5109449375100953247">"om <xliff:g id="COUNT">%d</xliff:g> dagar"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"för 1 sek sedan"</item>
- <item quantity="other" msgid="3699169366650930415">"för <xliff:g id="COUNT">%d</xliff:g> sekunder sedan"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"för 1 minut sedan"</item>
- <item quantity="other" msgid="851164968597150710">"för <xliff:g id="COUNT">%d</xliff:g> minuter sedan"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"för 1 timme sedan"</item>
- <item quantity="other" msgid="6889970745748538901">"för <xliff:g id="COUNT">%d</xliff:g> timmar sedan"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"igår"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> dagar sedan"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"om 1 sekund"</item>
- <item quantity="other" msgid="5495880108825805108">"om <xliff:g id="COUNT">%d</xliff:g> sek"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"om 1 minut"</item>
- <item quantity="other" msgid="4216113292706568726">"om <xliff:g id="COUNT">%d</xliff:g> minuter"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"om 1 timme"</item>
- <item quantity="other" msgid="3705373766798013406">"om <xliff:g id="COUNT">%d</xliff:g> timmar"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"imorgon"</item>
- <item quantity="other" msgid="2973062968038355991">"om <xliff:g id="COUNT">%d</xliff:g> dagar"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"den <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"kl. <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-sw/donottranslate-cldr.xml b/core/res/res/values-sw/donottranslate-cldr.xml
index b6304e7..7313c71 100755
--- a/core/res/res/values-sw/donottranslate-cldr.xml
+++ b/core/res/res/values-sw/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%Y %B %-e</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %Y %b %-e</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 7588479..d0bba39 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> inataka kuwezesha Kuchunguza kwa Kugusa. Wakati Kuchunguza kwa Kugusa kumewezeshwa, unaweza kusikia au kuona maelezo ya kilicho chini ya kidole chako au kutumia ishara ili kuingiliana na simu."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"Mwezi 1 uliopita"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Kabla ya mwezi 1 uliopita"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"Sekunde 1 iliopita"</item>
- <item quantity="other" msgid="3903706804349556379">"sekunde <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"Dakika 1 iliyopita"</item>
- <item quantity="other" msgid="2176942008915455116">"Dakika <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"Saa 1 iliyopita"</item>
- <item quantity="other" msgid="2467273239587587569">"Saa <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Siku <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Mwezi uliopita"</string>
<string name="older" msgid="5211975022815554840">"Kuukuu zaidi"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"jana"</item>
- <item quantity="other" msgid="2479586466153314633">"siku <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"kati ya sekunde 1"</item>
- <item quantity="other" msgid="1241926116443974687">"kati ya sekunde <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"kati ya dakika 1"</item>
- <item quantity="other" msgid="3330713936399448749">"baada ya dakika <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"kati ya saa 1"</item>
- <item quantity="other" msgid="547290677353727389">"kati ya saa <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"kesho"</item>
- <item quantity="other" msgid="5109449375100953247">"katika siku <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"Sekunde 1 iliyopita"</item>
- <item quantity="other" msgid="3699169366650930415">"Sekunde <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"Dakika 1 iliyopita"</item>
- <item quantity="other" msgid="851164968597150710">"Dakika <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"Saa 1 iliyopita"</item>
- <item quantity="other" msgid="6889970745748538901">"Saa <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"jana"</item>
- <item quantity="other" msgid="3453342639616481191">"siku <xliff:g id="COUNT">%d</xliff:g> zilizopita"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"kati ya sekunde 1"</item>
- <item quantity="other" msgid="5495880108825805108">"kati ya sekunde <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"baada ya dakika 1"</item>
- <item quantity="other" msgid="4216113292706568726">"kati ya dakika<xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"kati ya saa 1"</item>
- <item quantity="other" msgid="3705373766798013406">"katika saa <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"kesho"</item>
- <item quantity="other" msgid="2973062968038355991">"kati ya siku <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"tarehe <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"Saa <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"ndani ya <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-ta-rIN/strings.xml b/core/res/res/values-ta-rIN/strings.xml
index f51c3f2..3ddcc30 100644
--- a/core/res/res/values-ta-rIN/strings.xml
+++ b/core/res/res/values-ta-rIN/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"தொடுவதன் மூலம் அறிக என்பதை இயக்க <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> விரும்புகிறது. தொடுவதன் மூலம் அறிக என்பது இயக்கப்பட்டிருக்கும்போது, உங்கள் விரலுக்கு அடியில் இருப்பவையின் விளக்கங்களை நீங்கள் கேட்கவோ, பார்க்கவோ செய்யலாம் அல்லது மொபைலுடன் ஊடாட சைகைகளை மேற்கொள்ளலாம்."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 மாதத்திற்கு முன்பு"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 மாதத்திற்கு முன்பு"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 வினாடிக்கு முன்பு"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> வினாடிகளுக்கு முன்பு"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 நிமிடம் முன்பு"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> நிமிடத்திற்கு முன்"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 மணிநேரம் முன்பு"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> மணிநேரத்திற்கு முன்பு"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"கடந்த <xliff:g id="COUNT">%d</xliff:g> நாட்கள்"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"சென்ற மாதம்"</string>
<string name="older" msgid="5211975022815554840">"பழையது"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"நேற்று"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> நாட்களுக்கு முன்பு"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 வினாடியில்"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> வினாடிகளில்"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 நிமிடத்தில்"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> நிமிடங்களில்"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 மணிநேரத்தில்"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> மணிநேரத்தில்"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"நாளை"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> நாட்களில்"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 வினாடி முன்பு"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> வினாடிகளுக்கு முன்பு"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 நிமிடம் முன்பு"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> நிமிடத்திற்கு முன்"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 மணிநேரம் முன்பு"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> மணிநேரத்திற்கு முன்பு"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"நேற்று"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> நாட்களுக்கு முன்பு"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 வினாடியில்"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> வினாடிகளில்"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 நிமிடத்தில்"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> நிமிடங்களில்"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 மணிநேரத்தில்"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> மணிநேரத்தில்"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"நாளை"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> நாட்களில்"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> அன்று"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g> இல்"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> இல்"</string>
diff --git a/core/res/res/values-te-rIN/strings.xml b/core/res/res/values-te-rIN/strings.xml
index 495d762..2026f23 100644
--- a/core/res/res/values-te-rIN/strings.xml
+++ b/core/res/res/values-te-rIN/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> తాకడం ద్వారా విశ్లేషణను ప్రారంభించాలనుకుంటోంది. తాకడం ద్వారా విశ్లేషణ ఆన్ చేయబడినప్పుడు, మీరు మీ వేలి క్రింద ఉన్నవాటి యొక్క వివరణలను వినవచ్చు లేదా చూడవచ్చు లేదా ఫోన్‌తో పరస్పర చర్య చేయడానికి సంజ్ఞలు చేయవచ్చు."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 నెల క్రితం"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 నెలకు ముందు"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 సెకను క్రితం"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> సెకన్ల క్రితం"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 నిమిషం క్రితం"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> నిమిషాల క్రితం"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 గంట క్రితం"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> గంటల క్రితం"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"గత <xliff:g id="COUNT">%d</xliff:g> రోజులు"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"గత నెల"</string>
<string name="older" msgid="5211975022815554840">"పాతది"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"నిన్న"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> రోజుల క్రితం"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 సెకనులో"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> సెకన్లలో"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 నిమిషంలో"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> నిమిషాల్లో"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 గంటలో"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> గంటల్లో"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"రేపు"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> రోజుల్లో"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 సెక క్రితం"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> సెక క్రితం"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 నిమి క్రితం"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> నిమి క్రితం"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 గంట క్రితం"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> గంటల క్రితం"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"నిన్న"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> రోజుల క్రితం"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 సెకనులో"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> సెకన్లలో"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 నిమిషంలో"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> నిమిషాల్లో"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 గంటలో"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> గంటల్లో"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"రేపు"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> రోజుల్లో"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>న"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>కి"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>లో"</string>
diff --git a/core/res/res/values-th-rTH/donottranslate-cldr.xml b/core/res/res/values-th-rTH/donottranslate-cldr.xml
index 2f389f7..867a58e 100755
--- a/core/res/res/values-th-rTH/donottranslate-cldr.xml
+++ b/core/res/res/values-th-rTH/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%-k:%M:%S, %-e %b %Y</string>
diff --git a/core/res/res/values-th/donottranslate-cldr.xml b/core/res/res/values-th/donottranslate-cldr.xml
index 2f389f7..867a58e 100755
--- a/core/res/res/values-th/donottranslate-cldr.xml
+++ b/core/res/res/values-th/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%-k:%M:%S</string>
<string name="date_and_time">%-k:%M:%S, %-e %b %Y</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 57c3445..7ed780c 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ต้องการเปิดใช้งาน \"สำรวจโดยการแตะ\" เมื่อเปิดใช้งานแล้ว คุณสามารถฟังหรือดูคำอธิบายของสิ่งที่อยู่ใต้นิ้วข​​องคุณ หรือใช้ท่าทางสัมผัสต่างๆ เพื่อโต้ตอบกับโทรศัพท์ได้"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 เดือนที่ผ่านมา"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"ก่อน 1 เดือนที่แล้ว"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 วินาทีที่แล้ว"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> วินาทีที่แล้ว"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 นาทีที่ผ่านมา"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> นาทีที่ผ่านมา"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 ชั่วโมงที่ผ่านมา"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> ชั่วโมงที่ผ่านมา"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"<xliff:g id="COUNT">%d</xliff:g> วันที่แล้ว"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"เดือนที่แล้ว"</string>
<string name="older" msgid="5211975022815554840">"เก่ากว่า"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"เมื่อวาน"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> วันที่ผ่านมา"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"ใน 1 วินาที"</item>
- <item quantity="other" msgid="1241926116443974687">"ใน <xliff:g id="COUNT">%d</xliff:g> วินาที"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"ใน 1 นาที"</item>
- <item quantity="other" msgid="3330713936399448749">"ใน <xliff:g id="COUNT">%d</xliff:g> นาที"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"ใน 1 ชั่วโมง"</item>
- <item quantity="other" msgid="547290677353727389">"ใน <xliff:g id="COUNT">%d</xliff:g> ชั่วโมง"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"พรุ่งนี้"</item>
- <item quantity="other" msgid="5109449375100953247">"ใน <xliff:g id="COUNT">%d</xliff:g> วัน"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 วินาทีที่แล้ว"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> วินาทีที่ผ่านมา"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 นาทีที่ผ่านมา"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> นาทีที่ผ่านมา"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 ชั่วโมงที่ผ่านมา"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> ชั่วโมงที่ผ่านมา"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"เมื่อวาน"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> วันที่ผ่านมา"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"ใน 1 วินาที"</item>
- <item quantity="other" msgid="5495880108825805108">"ใน <xliff:g id="COUNT">%d</xliff:g> วินาที"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"ใน 1 นาที"</item>
- <item quantity="other" msgid="4216113292706568726">"ใน <xliff:g id="COUNT">%d</xliff:g> นาที"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"ใน 1 ชั่วโมง"</item>
- <item quantity="other" msgid="3705373766798013406">"ใน <xliff:g id="COUNT">%d</xliff:g> ชั่วโมง"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"พรุ่งนี้"</item>
- <item quantity="other" msgid="2973062968038355991">"ใน <xliff:g id="COUNT">%d</xliff:g> วัน"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"ในวันที่ <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"ที่ <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"ใน <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-tl/donottranslate-cldr.xml b/core/res/res/values-tl/donottranslate-cldr.xml
index 4f69833..7313c71 100755
--- a/core/res/res/values-tl/donottranslate-cldr.xml
+++ b/core/res/res/values-tl/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s-%s-%s"</string>
<string name="month_day_year">%Y %B %-e</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %Y %b %-e</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 4f3a4c3..d79e662 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"Nais paganahin ng <xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ang Galugarin sa pamamagitan ng pagpindot. Kapag naka-on ang Galugarin sa pamamagitan ng pagpindot, maaari mong marinig o makita ang mga paglalarawan ng nasa ilalim ng iyong daliri o maaari kang magsagawa ng mga galaw upang makipag-ugnayan sa telepono."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 buwan ang nakalipas"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Bago ang nakalipas na 1 buwan"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 segundo ang nakakalipas"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> (na) segundo ang nakalipas"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 minuto ang nakalipas"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> (na) minuto ang nakalipas"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 oras ang nakalipas"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> (na) oras ang nakalipas"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Huling <xliff:g id="COUNT">%d</xliff:g> (na) araw"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Nakaraang buwan"</string>
<string name="older" msgid="5211975022815554840">"Mas luma"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"kahapon"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> (na) araw ang nakalipas"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"sa 1 segundo"</item>
- <item quantity="other" msgid="1241926116443974687">"sa <xliff:g id="COUNT">%d</xliff:g> (na) segundo"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"sa 1 minuto"</item>
- <item quantity="other" msgid="3330713936399448749">"sa <xliff:g id="COUNT">%d</xliff:g> (na) minuto"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"sa 1 oras"</item>
- <item quantity="other" msgid="547290677353727389">"sa <xliff:g id="COUNT">%d</xliff:g> (na) oras"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"bukas"</item>
- <item quantity="other" msgid="5109449375100953247">"sa <xliff:g id="COUNT">%d</xliff:g> (na) araw"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 segundo ang nakalipas"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> (na) segundo ang nakalipas"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 minuto ang nakalipas"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> (na) minuto ang nakalipas"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 oras ang nakalipas"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> (na) oras ang nakalipas"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"kahapon"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> (na) araw ang nakalipas"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"sa 1 seg"</item>
- <item quantity="other" msgid="5495880108825805108">"sa <xliff:g id="COUNT">%d</xliff:g> (na) segundo"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"sa 1 min"</item>
- <item quantity="other" msgid="4216113292706568726">"sa <xliff:g id="COUNT">%d</xliff:g> (na) minuto"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"sa 1 oras"</item>
- <item quantity="other" msgid="3705373766798013406">"sa <xliff:g id="COUNT">%d</xliff:g> (na) oras"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"bukas"</item>
- <item quantity="other" msgid="2973062968038355991">"sa <xliff:g id="COUNT">%d</xliff:g> (na) araw"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"sa <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"nang <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"sa <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-tr/donottranslate-cldr.xml b/core/res/res/values-tr/donottranslate-cldr.xml
index 8bdcf48..0577fab 100755
--- a/core/res/res/values-tr/donottranslate-cldr.xml
+++ b/core/res/res/values-tr/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s %s %s"</string>
<string name="month_day_year">%d %B %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%d %b %Y %H:%M:%S</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index de3c80b..886494d 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>, Dokunarak Keşfet özelliğini etkinleştirmek istiyor. Dokunarak Keşfet açık olduğunda parmağınızın altındaki öğelere ait açıklamaları duyabilir veya görebilir ya da telefonla etkileşimde bulunmak için birtakım hareketler yapabilirsiniz."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 ay önce"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 ay önce"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 saniye önce"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> saniye önce"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 dakika önce"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> dakika önce"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 saat önce"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> saat önce"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Son <xliff:g id="COUNT">%d</xliff:g> gün"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Son ay"</string>
<string name="older" msgid="5211975022815554840">"Daha eski"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"dün"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> gün önce"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 saniye içinde"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> saniye içinde"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 dakika içinde"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> dakika içinde"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 saat içinde"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> saat içinde"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"yarın"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> gün içinde"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 saniye önce"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> saniye önce"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 dak. önce"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> dakika önce"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 saat önce"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> saat önce"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"dün"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> gün önce"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 san. içinde"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> saniye içinde"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 dak. içinde"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> dakika içinde"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 saat içinde"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> saat içinde"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"yarın"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> gün içinde"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> tarihinde"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> yılında"</string>
diff --git a/core/res/res/values-uk-rUA/donottranslate-cldr.xml b/core/res/res/values-uk-rUA/donottranslate-cldr.xml
index c137df9..75025d8 100755
--- a/core/res/res/values-uk-rUA/donottranslate-cldr.xml
+++ b/core/res/res/values-uk-rUA/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e %B %Y р.</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%-e %b %Y р., %H:%M:%S</string>
diff --git a/core/res/res/values-uk/donottranslate-cldr.xml b/core/res/res/values-uk/donottranslate-cldr.xml
index b8c0d1e..1c25b4d 100755
--- a/core/res/res/values-uk/donottranslate-cldr.xml
+++ b/core/res/res/values-uk/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s.%s.%s"</string>
<string name="month_day_year">%-e %B %Y р.</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%H:%M:%S %-e %b %Y</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 26935fd..cc93fc8 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> хоче ввімкнути функцію дослідження дотиком. Увімкнувши функцію дослідження дотиком, можна чути або бачити опис елемента, розташованого під вашим пальцем, або виконувати жести для взаємодії з телефоном."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 міс. тому"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Раніше 1 місяця тому"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 сек. тому"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> сек. тому"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 хвилину тому"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> хв. тому"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 год. тому"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> год. тому"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Остан. <xliff:g id="COUNT">%d</xliff:g> дн."</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Останній міс."</string>
<string name="older" msgid="5211975022815554840">"Давніше"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"учора"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> дн. тому"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"через 1 сек."</item>
- <item quantity="other" msgid="1241926116443974687">"через <xliff:g id="COUNT">%d</xliff:g> сек."</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"через 1 хв."</item>
- <item quantity="other" msgid="3330713936399448749">"через <xliff:g id="COUNT">%d</xliff:g> хв."</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"через 1 год."</item>
- <item quantity="other" msgid="547290677353727389">"через <xliff:g id="COUNT">%d</xliff:g> год."</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"завтра"</item>
- <item quantity="other" msgid="5109449375100953247">"через <xliff:g id="COUNT">%d</xliff:g> дн."</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 сек. тому"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> сек. тому"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 хв. тому"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> хв. тому"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 годину тому"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> год. тому"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"учора"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> дн. тому"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"через 1 с."</item>
- <item quantity="other" msgid="5495880108825805108">"через <xliff:g id="COUNT">%d</xliff:g> сек."</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"через 1 хв."</item>
- <item quantity="other" msgid="4216113292706568726">"через <xliff:g id="COUNT">%d</xliff:g> хв."</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"через 1 год."</item>
- <item quantity="other" msgid="3705373766798013406">"через <xliff:g id="COUNT">%d</xliff:g> год."</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"завтра"</item>
- <item quantity="other" msgid="2973062968038355991">"через <xliff:g id="COUNT">%d</xliff:g> дн."</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"о <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"у <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-ur-rPK/strings.xml b/core/res/res/values-ur-rPK/strings.xml
index e7869d1..4d9db5e 100644
--- a/core/res/res/values-ur-rPK/strings.xml
+++ b/core/res/res/values-ur-rPK/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ٹچ کرکے دریافت کریں کو فعال کرنا چاہتی ہے۔ ٹچ کرکے دریافت کریں کے آن ہو جانے پر، آپ کو اپنی انگلی کے نیچے موجود چیزوں کی تفصیلات دکھائی یا سنائی دے سکتی ہیں یا آپ فون کے ساتھ تعامل کرنے کیلئے اشارے انجام دے سکتے ہیں۔"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 مہینہ پہلے"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 مہینہ سے زیادہ پہلے"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 سیکنڈ پہلے"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> سیکنڈ پہلے"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 منٹ پہلے"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> منٹ پہلے"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 گھنٹہ پہلے"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> گھنٹے پہلے"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"آخری <xliff:g id="COUNT">%d</xliff:g> دن"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"پچھلے مہینے"</string>
<string name="older" msgid="5211975022815554840">"پرانا"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"گزشتہ کل"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> دن پہلے"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 سیکنڈ میں"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> سیکنڈ میں"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 منٹ میں"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> منٹ میں"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 گھنٹہ میں"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> گھنٹے میں"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"آنے والا کل"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> دن میں"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 سیکنڈ پہلے"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> سیکنڈ پہلے"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 منٹ پہلے"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> منٹ پہلے"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 گھنٹہ پہلے"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> گھنٹے پہلے"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"گزشتہ کل"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> دن پہلے"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 سیکنڈ میں"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> سیکنڈ میں"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 منٹ میں"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> منٹ میں"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 گھنٹہ میں"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> گھنٹے میں"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"آنے والا کل"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> دن میں"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g> کو"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"بوقت <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g> میں"</string>
diff --git a/core/res/res/values-uz-rUZ/strings.xml b/core/res/res/values-uz-rUZ/strings.xml
index ae58430..6d4ccbc 100644
--- a/core/res/res/values-uz-rUZ/strings.xml
+++ b/core/res/res/values-uz-rUZ/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> teginib o‘rganish xususiyatini yoqishni xohlamoqda. Bu xususiyat yoqilganda, barmog‘ingiz ostidagi elementlar ta‘rifini ko‘rishingiz yoki eshitishingiz mumkin yoki telefon bilan o‘zaro bog‘lanish uchun barmog‘ingiz bilan imo-ishorali harakatlarni bajaring."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 oy oldin"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 oydan oldinroq"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 soniya oldin"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> soniya oldin"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 daqiqa oldin"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> daqiqa oldin"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 soat oldin"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> soat oldin"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"O‘tgan <xliff:g id="COUNT">%d</xliff:g> kun"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"O‘tgan oy"</string>
<string name="older" msgid="5211975022815554840">"Eskiroq"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"kecha"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> kun oldin"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 soniyada"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> soniyada"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 daqiqada"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> daqiqada"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 soatda"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> soatda"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"ertaga"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> kunda"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 soniya oldin"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> soniya oldin"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 daq. oldin"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> daq. oldin"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 soat oldin"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> soat oldin"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"kecha"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> kun oldin"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 soniya da"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> soniya da"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 daq. da"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> daq. da"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 soatda"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> soatda"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"ertaga"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> kunda"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"<xliff:g id="DATE">%s</xliff:g>da"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>da"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"<xliff:g id="YEAR">%s</xliff:g>da"</string>
diff --git a/core/res/res/values-vi-rVN/donottranslate-cldr.xml b/core/res/res/values-vi-rVN/donottranslate-cldr.xml
index 3a735bf..8f5cf3b 100755
--- a/core/res/res/values-vi-rVN/donottranslate-cldr.xml
+++ b/core/res/res/values-vi-rVN/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">Ngày %d tháng %-m năm %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%d-%m-%Y %H:%M:%S</string>
diff --git a/core/res/res/values-vi/donottranslate-cldr.xml b/core/res/res/values-vi/donottranslate-cldr.xml
index 3a735bf..8f5cf3b 100755
--- a/core/res/res/values-vi/donottranslate-cldr.xml
+++ b/core/res/res/values-vi/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">Ngày %d tháng %-m năm %Y</string>
<string name="time_of_day">%H:%M:%S</string>
<string name="date_and_time">%d-%m-%Y %H:%M:%S</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 5b2beb1..ea14f36 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> muốn bật Khám phá bằng cách chạm. Khi Khám phá bằng cách chạm được bật, bạn có thể nghe hoặc xem mô tả dưới ngón tay bạn hoặc thực hiện cử chỉ để tương tác với điện thoại."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 tháng trước"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Trước 1 tháng trước"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 giây trước"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> giây trước"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 phút trước"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> phút trước"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 giờ trước"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> giờ trước"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"<xliff:g id="COUNT">%d</xliff:g> ngày trước"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Tháng trước"</string>
<string name="older" msgid="5211975022815554840">"Cũ hơn"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"hôm qua"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> ngày trước"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"trong 1 giây"</item>
- <item quantity="other" msgid="1241926116443974687">"trong <xliff:g id="COUNT">%d</xliff:g> giây"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"trong 1 phút"</item>
- <item quantity="other" msgid="3330713936399448749">"trong <xliff:g id="COUNT">%d</xliff:g> phút"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"trong 1 giờ"</item>
- <item quantity="other" msgid="547290677353727389">"trong <xliff:g id="COUNT">%d</xliff:g> giờ"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"ngày mai"</item>
- <item quantity="other" msgid="5109449375100953247">"trong <xliff:g id="COUNT">%d</xliff:g> ngày"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 giây trước"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> giây trước"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 phút trước"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> phút trước"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 giờ trước"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> giờ trước"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"hôm qua"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> ngày trước"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"trong 1 giây"</item>
- <item quantity="other" msgid="5495880108825805108">"trong <xliff:g id="COUNT">%d</xliff:g> giây"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"trong 1 phút"</item>
- <item quantity="other" msgid="4216113292706568726">"trong <xliff:g id="COUNT">%d</xliff:g> phút"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"trong 1 giờ"</item>
- <item quantity="other" msgid="3705373766798013406">"trong <xliff:g id="COUNT">%d</xliff:g> giờ"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"ngày mai"</item>
- <item quantity="other" msgid="2973062968038355991">"trong <xliff:g id="COUNT">%d</xliff:g> ngày"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"vào <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"vào lúc <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"trong <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-zh-rCN/donottranslate-cldr.xml b/core/res/res/values-zh-rCN/donottranslate-cldr.xml
index b83f412..b3f009e 100755
--- a/core/res/res/values-zh-rCN/donottranslate-cldr.xml
+++ b/core/res/res/values-zh-rCN/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s-%s-%s"</string>
<string name="month_day_year">%Y 年 %-m 月 %-e 日</string>
<string name="time_of_day">%p %I:%M:%S</string>
<string name="date_and_time">%Y 年 %-m 月 %-e 日%p %I:%M:%S</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index f599c48..3139211 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g>想要启用“触摸浏览”。“触摸浏览”启用后,您可以听到或看到所触摸内容的说明,还可以通过手势操作与手机互动。"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 个月前"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 个月前"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1秒前"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g>秒前"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1分钟前"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g>分钟前"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1小时前"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g>小时前"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"过去<xliff:g id="COUNT">%d</xliff:g>天"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"上个月"</string>
<string name="older" msgid="5211975022815554840">"往前"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"昨天"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g>天前"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1秒后"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g>秒后"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1分钟后"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g>分钟后"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1小时后"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g>小时后"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"明天"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> 天后"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1秒前"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g>秒前"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1分钟前"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g>分钟前"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1小时前"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g>小时前"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"昨天"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g>天前"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1秒后"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g>秒后"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1分钟后"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g>分钟后"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1小时后"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g>小时后"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"明天"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> 天后"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"日期:<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"年份:<xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 7102897..a6f0011 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> 需要啟用「輕觸探索」。開啟這項功能時,系統會在您的手指輕觸螢幕上的物件時顯示或朗讀說明,您也可以執行手勢來與手機互動。"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 個月前"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 個月前"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 秒前"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> 秒前"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 分鐘前"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> 分鐘前"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 小時前"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> 小時前"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"最近 <xliff:g id="COUNT">%d</xliff:g> 天"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"上個月"</string>
<string name="older" msgid="5211975022815554840">"較舊"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"昨天"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> 天前"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 秒後"</item>
- <item quantity="other" msgid="1241926116443974687">"<xliff:g id="COUNT">%d</xliff:g> 秒後"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 分鐘後"</item>
- <item quantity="other" msgid="3330713936399448749">"<xliff:g id="COUNT">%d</xliff:g> 分鐘後"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 小時後"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> 小時後"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"明天"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> 天後"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 秒前"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> 秒前"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 分鐘前"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> 分鐘前"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 小時前"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> 小時前"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"昨天"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> 天前"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 秒後"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> 秒後"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 分鐘後"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> 分鐘後"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 小時後"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> 小時後"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"明天"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> 天後"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"於 <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"在 <xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"於 <xliff:g id="YEAR">%s</xliff:g> 年"</string>
diff --git a/core/res/res/values-zh-rTW/donottranslate-cldr.xml b/core/res/res/values-zh-rTW/donottranslate-cldr.xml
index 0a19896..3e2b33d 100755
--- a/core/res/res/values-zh-rTW/donottranslate-cldr.xml
+++ b/core/res/res/values-zh-rTW/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%Y 年 %-m 月 %-e 日</string>
<string name="time_of_day">%p %I:%M:%S</string>
<string name="date_and_time">%Y/%-m/%-e %p %I:%M:%S</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index cf95ec8..a79d301 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> 需要啟用「輕觸探索」。開啟這項功能時,系統會在您的手指輕觸螢幕上的物件時顯示或朗讀說明,您也可以執行手勢來與手機互動。"</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"1 個月以前"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"1 個月前"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 秒以前"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> 秒前"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 分鐘以前"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> 分鐘前"</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 小時以前"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> 小時前"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"最近 <xliff:g id="COUNT">%d</xliff:g> 天"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"上個月"</string>
<string name="older" msgid="5211975022815554840">"較舊"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"昨天"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> 天前"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"1 秒內"</item>
- <item quantity="other" msgid="1241926116443974687">"在 <xliff:g id="COUNT">%d</xliff:g> 秒內"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"1 分鐘內"</item>
- <item quantity="other" msgid="3330713936399448749">"在 <xliff:g id="COUNT">%d</xliff:g> 分鐘內"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"1 小時內"</item>
- <item quantity="other" msgid="547290677353727389">"<xliff:g id="COUNT">%d</xliff:g> 小時內"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"明天"</item>
- <item quantity="other" msgid="5109449375100953247">"<xliff:g id="COUNT">%d</xliff:g> 天內"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 秒以前"</item>
- <item quantity="other" msgid="3699169366650930415">"<xliff:g id="COUNT">%d</xliff:g> 秒以前"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 分鐘以前"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> 分鐘以前"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 小時以前"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> 小時前"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"昨天"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> 天前"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"1 秒內"</item>
- <item quantity="other" msgid="5495880108825805108">"<xliff:g id="COUNT">%d</xliff:g> 秒內"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"1 分鐘內"</item>
- <item quantity="other" msgid="4216113292706568726">"<xliff:g id="COUNT">%d</xliff:g> 分鐘內"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"1 小時內"</item>
- <item quantity="other" msgid="3705373766798013406">"<xliff:g id="COUNT">%d</xliff:g> 小時內"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"明天"</item>
- <item quantity="other" msgid="2973062968038355991">"<xliff:g id="COUNT">%d</xliff:g> 天內"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"於 <xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"於<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"於 <xliff:g id="YEAR">%s</xliff:g> 年"</string>
diff --git a/core/res/res/values-zu/donottranslate-cldr.xml b/core/res/res/values-zu/donottranslate-cldr.xml
index 087ad833..e2cf516 100755
--- a/core/res/res/values-zu/donottranslate-cldr.xml
+++ b/core/res/res/values-zu/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s-%s-%s"</string>
<string name="month_day_year">%-e %B %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%-l:%M:%S %p %-e %b %Y</string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 37b727f..5949188 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -1128,75 +1128,11 @@
<string name="enable_explore_by_touch_warning_message" product="default" msgid="2708199672852373195">"I-<xliff:g id="ACCESSIBILITY_SERVICE_NAME">%1$s</xliff:g> ifuna ukunika amandla i-Explore by Touch. Uma i-Explore by Touch ikhanya, ungezwa noma ubone izincazelo ezingaphansi komunwe wakho noma wenze izenzo zomzimba ukuze uxhumane nefoni."</string>
<string name="oneMonthDurationPast" msgid="7396384508953779925">"inyanga engu-1 edlule"</string>
<string name="beforeOneMonthDurationPast" msgid="909134546836499826">"Ngaphambi kwenyanga engu-1 edlule"</string>
- <plurals name="num_seconds_ago">
- <item quantity="one" msgid="4869870056547896011">"1 isekhondi eledlule"</item>
- <item quantity="other" msgid="3903706804349556379">"<xliff:g id="COUNT">%d</xliff:g> amasekhondi adlule"</item>
- </plurals>
- <plurals name="num_minutes_ago">
- <item quantity="one" msgid="3306787433088810191">"1 iminithi elidlule"</item>
- <item quantity="other" msgid="2176942008915455116">"<xliff:g id="COUNT">%d</xliff:g> amaminithi adlule.."</item>
- </plurals>
- <plurals name="num_hours_ago">
- <item quantity="one" msgid="9150797944610821849">"1 ihora eledlule"</item>
- <item quantity="other" msgid="2467273239587587569">"<xliff:g id="COUNT">%d</xliff:g> amahora adlule"</item>
- </plurals>
<plurals name="last_num_days">
<item quantity="other" msgid="3069992808164318268">"Izinsuku zokugcina ezingu- <xliff:g id="COUNT">%d</xliff:g>"</item>
</plurals>
<string name="last_month" msgid="3959346739979055432">"Inyanga edlule"</string>
<string name="older" msgid="5211975022815554840">"Okudala kakhulu"</string>
- <plurals name="num_days_ago">
- <item quantity="one" msgid="861358534398115820">"Izolo"</item>
- <item quantity="other" msgid="2479586466153314633">"<xliff:g id="COUNT">%d</xliff:g> izinsuku ezedlule"</item>
- </plurals>
- <plurals name="in_num_seconds">
- <item quantity="one" msgid="2729745560954905102">"esekhondini elingu-1"</item>
- <item quantity="other" msgid="1241926116443974687">"emasekhondini angu-<xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="in_num_minutes">
- <item quantity="one" msgid="8793095251325200395">"eminithini engu-1"</item>
- <item quantity="other" msgid="3330713936399448749">"emaminithini angu-<xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="in_num_hours">
- <item quantity="one" msgid="7164353342477769999">"ehoreni elingu-1"</item>
- <item quantity="other" msgid="547290677353727389">"emahoreni angu- <xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="in_num_days">
- <item quantity="one" msgid="5413088743009839518">"Kusasa"</item>
- <item quantity="other" msgid="5109449375100953247">"ezinsukwini ezingu-<xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one" msgid="1849036840200069118">"1 isekhondi edlule"</item>
- <item quantity="other" msgid="3699169366650930415">"amasekhondi angu-<xliff:g id="COUNT">%d</xliff:g> edlule"</item>
- </plurals>
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one" msgid="6361490147113871545">"1 iminithi eledlule"</item>
- <item quantity="other" msgid="851164968597150710">"<xliff:g id="COUNT">%d</xliff:g> amaminithi adlule"</item>
- </plurals>
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one" msgid="4796212039724722116">"1 ihora eledlule"</item>
- <item quantity="other" msgid="6889970745748538901">"<xliff:g id="COUNT">%d</xliff:g> amahora adlule"</item>
- </plurals>
- <plurals name="abbrev_num_days_ago">
- <item quantity="one" msgid="8463161711492680309">"Izolo"</item>
- <item quantity="other" msgid="3453342639616481191">"<xliff:g id="COUNT">%d</xliff:g> izinsuku ezedlule"</item>
- </plurals>
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one" msgid="5842225370795066299">"esekhondini elingu-1"</item>
- <item quantity="other" msgid="5495880108825805108">"emasekhondini angu-<xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one" msgid="562786149928284878">"eminithini engu-1"</item>
- <item quantity="other" msgid="4216113292706568726">"emaminithini angu-<xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_in_num_hours">
- <item quantity="one" msgid="3274708118124045246">"ehoreni elingu-1"</item>
- <item quantity="other" msgid="3705373766798013406">"emahoreni angu-<xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
- <plurals name="abbrev_in_num_days">
- <item quantity="one" msgid="2178576254385739855">"Kusasa"</item>
- <item quantity="other" msgid="2973062968038355991">"ezinsukwini ezing-<xliff:g id="COUNT">%d</xliff:g>"</item>
- </plurals>
<string name="preposition_for_date" msgid="9093949757757445117">"ngo-<xliff:g id="DATE">%s</xliff:g>"</string>
<string name="preposition_for_time" msgid="5506831244263083793">"e-<xliff:g id="TIME">%s</xliff:g>"</string>
<string name="preposition_for_year" msgid="5040395640711867177">"phakathi- <xliff:g id="YEAR">%s</xliff:g>"</string>
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 0c3fb9a..f69772a 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -389,6 +389,15 @@
with the same {@link android.R.attr#taskAffinity} as it has. -->
<attr name="allowTaskReparenting" format="boolean" />
+ <!-- Declare that this application may use cleartext traffic (e.g., HTTP rather than HTTPS;
+ WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP without STARTTLS or TLS).
+ Defaults to true. If set to false {@code false}, the app declares that it does not
+ intend to use cleartext network traffic, in which case platform components (e.g.,
+ HTTP stacks, {@code WebView}, {@code MediaPlayer}) will refuse app's requests to use
+ cleartext traffic. Third-party libraries are encouraged to honor this flag as well.
+ @hide -->
+ <attr name="usesCleartextTraffic" format="boolean" />
+
<!-- Declare that code from this application will need to be loaded into other
applications' processes. On devices that support multiple instruction sets,
this implies the code might be loaded into a process that's using any of the devices
@@ -1012,6 +1021,10 @@
<p>The default value of this attribute is <code>false</code>. -->
<attr name="resumeWhilePausing" format="boolean" />
+ <!-- When set installer will extract native libraries. If set to false
+ libraries in the apk must be stored and page-aligned. -->
+ <attr name="extractNativeLibs" format="boolean"/>
+
<!-- The <code>manifest</code> tag is the root of an
<code>AndroidManifest.xml</code> file,
describing the contents of an Android package (.apk) file. One
@@ -1133,9 +1146,17 @@
"com.google". -->
<attr name="requiredAccountType" format="string"/>
<attr name="isGame" />
+ <!-- Declare that this application may use cleartext traffic (e.g., HTTP rather than HTTPS;
+ WebSockets rather than WebSockets Secure; XMPP, IMAP, STMP without STARTTLS or TLS).
+ Defaults to true. If set to false {@code false}, the app declares that it does not
+ intend to use cleartext network traffic, in which case platform components (e.g.,
+ HTTP stacks, {@code WebView}, {@code MediaPlayer}) will refuse app's requests to use
+ cleartext traffic. Third-party libraries are encouraged to honor this flag as well.
+ @hide -->
+ <attr name="usesCleartextTraffic" />
<attr name="multiArch" />
+ <attr name="extractNativeLibs" />
</declare-styleable>
-
<!-- The <code>permission</code> tag declares a security permission that can be
used to control access from other packages to specific components or
features in your package (or other packages). See the
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index d3c31d7..1df91d9 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -681,10 +681,10 @@
<integer name="config_shortPressOnSleepBehavior">0</integer>
<!-- Package name for default keyguard appwidget [DO NOT TRANSLATE] -->
- <string name="widget_default_package_name"></string>
+ <string name="widget_default_package_name" translatable="false"></string>
<!-- Class name for default keyguard appwidget [DO NOT TRANSLATE] -->
- <string name="widget_default_class_name"></string>
+ <string name="widget_default_class_name" translatable="false"></string>
<!-- Indicate whether the SD card is accessible without removing the battery. -->
<bool name="config_batterySdCardAccessibility">false</bool>
@@ -1221,7 +1221,7 @@
PERSIST may improve performance by reducing how often journal blocks are
reallocated (compared to truncation) resulting in better data block locality
and less churn of the storage media. -->
- <string name="db_default_journal_mode">PERSIST</string>
+ <string name="db_default_journal_mode" translatable="false">PERSIST</string>
<!-- Maximum size of the persistent journal file in bytes.
If the journal file grows to be larger than this amount then SQLite will
@@ -1233,7 +1233,7 @@
NORMAL also preserves durability in non-WAL modes and uses checksums to ensure
integrity although there is a small chance that an error might go unnoticed.
Choices are: FULL, NORMAL, OFF. -->
- <string name="db_default_sync_mode">FULL</string>
+ <string name="db_default_sync_mode" translatable="false">FULL</string>
<!-- The database synchronization mode when using Write-Ahead Logging.
FULL is safest and preserves durability at the cost of extra fsyncs.
@@ -1241,7 +1241,7 @@
and after checkpoint operations. If checkpoints are infrequent and power loss
occurs, then committed transactions could be lost and applications might break.
Choices are: FULL, NORMAL, OFF. -->
- <string name="db_wal_sync_mode">FULL</string>
+ <string name="db_wal_sync_mode" translatable="false">FULL</string>
<!-- The Write-Ahead Log auto-checkpoint interval in database pages (typically 1 to 4KB).
The log is checkpointed automatically whenever it exceeds this many pages.
@@ -1426,7 +1426,7 @@
<!-- If supported and enabled, are dreams activated when asleep and charging? (by default) -->
<bool name="config_dreamsActivatedOnSleepByDefault">false</bool>
<!-- ComponentName of the default dream (Settings.Secure.DEFAULT_SCREENSAVER_COMPONENT) -->
- <string name="config_dreamsDefaultComponent">com.google.android.deskclock/com.android.deskclock.Screensaver</string>
+ <string name="config_dreamsDefaultComponent" translatable="false">com.google.android.deskclock/com.android.deskclock.Screensaver</string>
<!-- Are we allowed to dream while not plugged in? -->
<bool name="config_dreamsEnabledOnBattery">false</bool>
@@ -1707,17 +1707,17 @@
<!-- Class name of the framework account picker activity.
Can be customized for other product types -->
- <string name="config_chooseAccountActivity"
+ <string name="config_chooseAccountActivity" translatable="false"
>android/android.accounts.ChooseAccountActivity</string>
<!-- Class name of the account type and account picker activity.
Can be customized for other product types -->
- <string name="config_chooseTypeAndAccountActivity"
+ <string name="config_chooseTypeAndAccountActivity" translatable="false"
>android/android.accounts.ChooseTypeAndAccountActivity</string>
<!-- Component name of a custom ResolverActivity (Intent resolver) to be used instead of
the default framework version. If left empty, then the framework version will be used.
Example: com.google.android.myapp/.resolver.MyResolverActivity -->
- <string name="config_customResolverActivity"></string>
+ <string name="config_customResolverActivity" translatable="false"></string>
<!-- Name of the activity or service that prompts the user to reject, accept, or whitelist
an adb host's public key, when an unwhitelisted host connects to the local adbd.
@@ -1730,7 +1730,7 @@
>com.android.vpndialogs/com.android.vpndialogs.ConfirmDialog</string>
<!-- Apps that are authorized to access shared accounts, overridden by product overlays -->
- <string name="config_appsAuthorizedForSharedAccounts">;com.android.settings;</string>
+ <string name="config_appsAuthorizedForSharedAccounts" translatable="false">;com.android.settings;</string>
<!-- Flag indicating that the media framework should not allow changes or mute on any
stream or master volumes. -->
diff --git a/core/res/res/values/donottranslate-cldr.xml b/core/res/res/values/donottranslate-cldr.xml
index 80db6e4..a8e2b2b 100755
--- a/core/res/res/values/donottranslate-cldr.xml
+++ b/core/res/res/values/donottranslate-cldr.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="numeric_date_template">"%s/%s/%s"</string>
<string name="month_day_year">%B %-e, %Y</string>
<string name="time_of_day">%-l:%M:%S %p</string>
<string name="date_and_time">%b %-e, %Y, %-l:%M:%S %p</string>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 2bb9aa8..bfd0d26 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2598,4 +2598,5 @@
<public type="style" name="Theme.DeviceDefault.Dialog.Alert" />
<public type="style" name="Theme.DeviceDefault.Light.Dialog.Alert" />
+ <public type="attr" name="extractNativeLibs" />
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 3649400..db1f03a 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -3372,24 +3372,6 @@
<!-- String used to display the date. This is the string to say something happened more than 1 month ago. -->
<string name="beforeOneMonthDurationPast">Before 1 month ago</string>
- <!-- This is used to express that something occurred some number of seconds in the past (e.g., 5 seconds ago). -->
- <plurals name="num_seconds_ago">
- <item quantity="one">1 second ago</item>
- <item quantity="other"><xliff:g id="count">%d</xliff:g> seconds ago</item>
- </plurals>
-
- <!-- This is used to express that something occurred some number of minutes in the past (e.g., 5 minutes ago). -->
- <plurals name="num_minutes_ago">
- <item quantity="one">1 minute ago</item>
- <item quantity="other"><xliff:g id="count">%d</xliff:g> minutes ago</item>
- </plurals>
-
- <!-- This is used to express that something occurred some number of hours in the past (e.g., 5 hours ago). -->
- <plurals name="num_hours_ago">
- <item quantity="one">1 hour ago</item>
- <item quantity="other"><xliff:g id="count">%d</xliff:g> hours ago</item>
- </plurals>
-
<!-- This is used to express that something occurred within the last X days (e.g., Last 7 days). -->
<plurals name="last_num_days">
<item quantity="other">Last <xliff:g id="count">%d</xliff:g> days</item>
@@ -3401,84 +3383,6 @@
<!-- This is used to express that something happened longer ago than the previous options -->
<string name="older">Older</string>
- <!-- This is used to express that something occurred some number of days in the past (e.g., 5 days ago). -->
- <plurals name="num_days_ago">
- <item quantity="one">yesterday</item>
- <item quantity="other"><xliff:g id="count">%d</xliff:g> days ago</item>
- </plurals>
-
- <!-- This is used to express that something will occur some number of seconds in the future (e.g., in 5 seconds). -->
- <plurals name="in_num_seconds">
- <item quantity="one">in 1 second</item>
- <item quantity="other">in <xliff:g id="count">%d</xliff:g> seconds</item>
- </plurals>
-
- <!-- This is used to express that something will occur some number of minutes in the future (e.g., in 5 minutes). -->
- <plurals name="in_num_minutes">
- <item quantity="one">in 1 minute</item>
- <item quantity="other">in <xliff:g id="count">%d</xliff:g> minutes</item>
- </plurals>
-
- <!-- This is used to express that something will occur some number of hours in the future (e.g., in 5 hours). -->
- <plurals name="in_num_hours">
- <item quantity="one">in 1 hour</item>
- <item quantity="other">in <xliff:g id="count">%d</xliff:g> hours</item>
- </plurals>
-
- <!-- This is used to express that something will occur some number of days in the future (e.g., in 5 days). -->
- <plurals name="in_num_days">
- <item quantity="one">tomorrow</item>
- <item quantity="other">in <xliff:g id="count">%d</xliff:g> days</item>
- </plurals>
-
- <!-- This is used to express that something occurred some number of abbreviated seconds in the past (e.g., 5 secs ago). -->
- <plurals name="abbrev_num_seconds_ago">
- <item quantity="one">1 sec ago</item>
- <item quantity="other"><xliff:g id="count">%d</xliff:g> secs ago</item>
- </plurals>
-
- <!-- This is used to express that something occurred some number of abbreviated minutes in the past (e.g., 5 mins ago). -->
- <plurals name="abbrev_num_minutes_ago">
- <item quantity="one">1 min ago</item>
- <item quantity="other"><xliff:g id="count">%d</xliff:g> mins ago</item>
- </plurals>
-
- <!-- This is used to express that something occurred some number of abbreviated hours in the past (e.g., 5 hrs ago). -->
- <plurals name="abbrev_num_hours_ago">
- <item quantity="one">1 hour ago</item>
- <item quantity="other"><xliff:g id="count">%d</xliff:g> hours ago</item>
- </plurals>
-
- <!-- This is used to express that something occurred some number of abbreviated days in the past (e.g., 5 days ago). -->
- <plurals name="abbrev_num_days_ago">
- <item quantity="one">yesterday</item>
- <item quantity="other"><xliff:g id="count">%d</xliff:g> days ago</item>
- </plurals>
-
- <!-- This is used to express that something will occur some number of abbreviated seconds in the future (e.g., in 5 secs). -->
- <plurals name="abbrev_in_num_seconds">
- <item quantity="one">in 1 sec</item>
- <item quantity="other">in <xliff:g id="count">%d</xliff:g> secs</item>
- </plurals>
-
- <!-- This is used to express that something will occur some number of abbreviated minutes in the future (e.g., in 5 mins). -->
- <plurals name="abbrev_in_num_minutes">
- <item quantity="one">in 1 min</item>
- <item quantity="other">in <xliff:g id="count">%d</xliff:g> mins</item>
- </plurals>
-
- <!-- This is used to express that something will occur some number of abbreviated hours in the future (e.g., in 5 hrs). -->
- <plurals name="abbrev_in_num_hours">
- <item quantity="one">in 1 hour</item>
- <item quantity="other">in <xliff:g id="count">%d</xliff:g> hours</item>
- </plurals>
-
- <!-- This is used to express that something will occur some number of abbreviated days in the future (e.g., in 5 days). -->
- <plurals name="abbrev_in_num_days">
- <item quantity="one">tomorrow</item>
- <item quantity="other">in <xliff:g id="count">%d</xliff:g> days</item>
- </plurals>
-
<!-- String used to display the date. Preposition for date display ("on May 29") -->
<string name="preposition_for_date">on <xliff:g id="date" example="May 29">%s</xliff:g></string>
<!-- String used to display the date. Preposition for time display ("at 2:33am") -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index a4dc155..14b3711 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -720,7 +720,6 @@
<java-symbol type="string" name="noon" />
<java-symbol type="string" name="number_picker_increment_scroll_action" />
<java-symbol type="string" name="number_picker_increment_scroll_mode" />
- <java-symbol type="string" name="numeric_date_template" />
<java-symbol type="string" name="old_app_action" />
<java-symbol type="string" name="old_app_description" />
<java-symbol type="string" name="older" />
@@ -1067,27 +1066,11 @@
<java-symbol type="string" name="config_ethernet_tcp_buffers" />
<java-symbol type="string" name="config_wifi_tcp_buffers" />
- <java-symbol type="plurals" name="abbrev_in_num_days" />
- <java-symbol type="plurals" name="abbrev_in_num_hours" />
- <java-symbol type="plurals" name="abbrev_in_num_minutes" />
- <java-symbol type="plurals" name="abbrev_in_num_seconds" />
- <java-symbol type="plurals" name="abbrev_num_days_ago" />
- <java-symbol type="plurals" name="abbrev_num_hours_ago" />
- <java-symbol type="plurals" name="abbrev_num_minutes_ago" />
- <java-symbol type="plurals" name="abbrev_num_seconds_ago" />
<java-symbol type="plurals" name="duration_hours" />
<java-symbol type="plurals" name="duration_minutes" />
<java-symbol type="plurals" name="duration_seconds" />
- <java-symbol type="plurals" name="in_num_days" />
- <java-symbol type="plurals" name="in_num_hours" />
- <java-symbol type="plurals" name="in_num_minutes" />
- <java-symbol type="plurals" name="in_num_seconds" />
<java-symbol type="plurals" name="last_num_days" />
<java-symbol type="plurals" name="matches_found" />
- <java-symbol type="plurals" name="num_days_ago" />
- <java-symbol type="plurals" name="num_hours_ago" />
- <java-symbol type="plurals" name="num_minutes_ago" />
- <java-symbol type="plurals" name="num_seconds_ago" />
<java-symbol type="plurals" name="restr_pin_countdown" />
<java-symbol type="plurals" name="pinpuk_attempts" />
diff --git a/core/res/res/xml/sms_short_codes.xml b/core/res/res/xml/sms_short_codes.xml
index 7804dd2..18c83b4 100644
--- a/core/res/res/xml/sms_short_codes.xml
+++ b/core/res/res/xml/sms_short_codes.xml
@@ -75,7 +75,7 @@
<shortcode country="cz" premium="9\\d{6,7}" free="116\\d{3}" />
<!-- Germany: 4-5 digits plus 1232xxx (premium codes from http://www.vodafone.de/infofaxe/537.pdf and http://premiumdienste.eplus.de/pdf/kodex.pdf), plus EU. To keep the premium regex from being too large, it only includes payment processors that have been used by SMS malware, with the regular pattern matching the other premium short codes. -->
- <shortcode country="de" pattern="\\d{4,5}|1232\\d{3}" premium="11(?:111|833)|1232(?:013|021|060|075|286|358)|118(?:44|80|86)|20[25]00|220(?:21|22|88|99)|221(?:14|21)|223(?:44|53|77)|224[13]0|225(?:20|59|90)|226(?:06|10|20|26|30|40|56|70)|227(?:07|33|39|66|76|78|79|88|99)|228(?:08|11|66|77)|23300|30030|3[12347]000|330(?:33|55|66)|33(?:233|331|366|533)|34(?:34|567)|37000|40(?:040|123|444|[3568]00)|41(?:010|414)|44(?:000|044|344|44[24]|544)|50005|50100|50123|50555|51000|52(?:255|783)|54(?:100|2542)|55(?:077|[24]00|222|333|55|[12369]55)|56(?:789|886)|60800|6[13]000|66(?:[12348]66|566|766|777|88|999)|68888|70(?:07|123|777)|76766|77(?:007|070|222|444|[567]77)|80(?:008|123|888)|82(?:002|[378]00|323|444|472|474|488|727)|83(?:005|[169]00|333|830)|84(?:141|300|32[34]|343|488|499|777|888)|85888|86(?:188|566|640|644|650|677|868|888)|870[24]9|871(?:23|[49]9)|872(?:1[0-8]|49|99)|87499|875(?:49|55|99)|876(?:0[1367]|1[1245678]|54|99)|877(?:00|99)|878(?:15|25|3[567]|8[12])|87999|880(?:08|44|55|77|99)|88688|888(?:03|10|8|89)|8899|90(?:009|999)|99999" free="116\\d{3}" />
+ <shortcode country="de" pattern="\\d{4,5}|1232\\d{3}" premium="11(?:111|833)|1232(?:013|021|060|075|286|358)|118(?:44|80|86)|20[25]00|220(?:21|22|88|99)|221(?:14|21)|223(?:44|53|77)|224[13]0|225(?:20|59|90)|226(?:06|10|20|26|30|40|56|70)|227(?:07|33|39|66|76|78|79|88|99)|228(?:08|11|66|77)|23300|30030|3[12347]000|330(?:33|55|66)|33(?:233|331|366|533)|34(?:34|567)|37000|40(?:040|123|444|[3568]00)|41(?:010|414)|44(?:000|044|344|44[24]|544)|50005|50100|50123|50555|51000|52(?:255|783)|54(?:100|2542)|55(?:077|[24]00|222|333|55|[12369]55)|56(?:789|886)|60800|6[13]000|66(?:[12348]66|566|766|777|88|999)|68888|70(?:07|123|777)|76766|77(?:007|070|222|444|[567]77)|80(?:008|123|888)|82(?:002|[378]00|323|444|472|474|488|727)|83(?:005|[169]00|333|830)|84(?:141|300|32[34]|343|488|499|777|888)|85888|86(?:188|566|640|644|650|677|868|888)|870[24]9|871(?:23|[49]9)|872(?:1[0-8]|49|99)|87499|875(?:49|55|99)|876(?:0[1367]|1[1245678]|54|99)|877(?:00|99)|878(?:15|25|3[567]|8[12])|87999|880(?:08|44|55|77|99)|88688|888(?:03|10|8|89)|8899|90(?:009|999)|99999" free="116\\d{3}|81214|81215" />
<!-- Denmark: see http://iprs.webspacecommerce.com/Denmark-Premium-Rate-Numbers -->
<shortcode country="dk" pattern="\\d{4,5}" premium="1\\d{3}" free="116\\d{3}" />
diff --git a/core/tests/benchmarks/src/android/util/FloatMathBenchmark.java b/core/tests/benchmarks/src/android/util/FloatMathBenchmark.java
new file mode 100644
index 0000000..2858128
--- /dev/null
+++ b/core/tests/benchmarks/src/android/util/FloatMathBenchmark.java
@@ -0,0 +1,116 @@
+/*
+ * 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 android.util;
+
+import com.google.caliper.Param;
+import com.google.caliper.Runner;
+import com.google.caliper.SimpleBenchmark;
+
+import android.util.FloatMath;
+
+public class FloatMathBenchmark extends SimpleBenchmark {
+
+ public float timeFloatMathCeil(int reps) {
+ // Keep an answer so we don't optimize the method call away.
+ float f = 0.0f;
+ for (int i = 0; i < reps; i++) {
+ f += FloatMath.ceil(100.123f);
+ }
+ return f;
+ }
+
+ public float timeFloatMathCeil_math(int reps) {
+ // Keep an answer so we don't optimize the method call away.
+ float f = 0.0f;
+ for (int i = 0; i < reps; i++) {
+ f += (float) Math.ceil(100.123f);
+ }
+ return f;
+ }
+
+ public float timeFloatMathCos(int reps) {
+ // Keep an answer so we don't optimize the method call away.
+ float f = 0.0f;
+ for (int i = 0; i < reps; i++) {
+ f += FloatMath.cos(100.123f);
+ }
+ return f;
+ }
+
+ public float timeFloatMathExp(int reps) {
+ // Keep an answer so we don't optimize the method call away.
+ float f = 0.0f;
+ for (int i = 0; i < reps; i++) {
+ f += FloatMath.exp(100.123f);
+ }
+ return f;
+ }
+
+ public float timeFloatMathFloor(int reps) {
+ // Keep an answer so we don't optimize the method call away.
+ float f = 0.0f;
+ for (int i = 0; i < reps; i++) {
+ f += FloatMath.floor(100.123f);
+ }
+ return f;
+ }
+
+ public float timeFloatMathHypot(int reps) {
+ // Keep an answer so we don't optimize the method call away.
+ float f = 0.0f;
+ for (int i = 0; i < reps; i++) {
+ f += FloatMath.hypot(100.123f, 100.123f);
+ }
+ return f;
+ }
+
+ public float timeFloatMathPow(int reps) {
+ // Keep an answer so we don't optimize the method call away.
+ float f = 0.0f;
+ for (int i = 0; i < reps; i++) {
+ f += FloatMath.pow(10.123f, 10.123f);
+ }
+ return f;
+ }
+
+ public float timeFloatMathSin(int reps) {
+ // Keep an answer so we don't optimize the method call away.
+ float f = 0.0f;
+ for (int i = 0; i < reps; i++) {
+ f += FloatMath.sin(100.123f);
+ }
+ return f;
+ }
+
+ public float timeFloatMathSqrt(int reps) {
+ // Keep an answer so we don't optimize the method call away.
+ float f = 0.0f;
+ for (int i = 0; i < reps; i++) {
+ f += FloatMath.sqrt(100.123f);
+ }
+ return f;
+ }
+
+ public float timeFloatMathSqrt_math(int reps) {
+ // Keep an answer so we don't optimize the method call away.
+ float f = 0.0f;
+ for (int i = 0; i < reps; i++) {
+ f += (float) Math.sqrt(100.123f);
+ }
+ return f;
+ }
+
+}
diff --git a/core/tests/coretests/apks/install_bad_dex/Android.mk b/core/tests/coretests/apks/install_bad_dex/Android.mk
index 769a1b0..05983aa 100644
--- a/core/tests/coretests/apks/install_bad_dex/Android.mk
+++ b/core/tests/coretests/apks/install_bad_dex/Android.mk
@@ -5,6 +5,7 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := install_bad_dex
-LOCAL_JAVA_RESOURCE_FILES := $(LOCAL_PATH)/classes.dex
-
include $(FrameworkCoreTests_BUILD_PACKAGE)
+
+# Override target specific variable PRIVATE_DEX_FILE to inject bad classes.dex file.
+$(LOCAL_BUILT_MODULE): PRIVATE_DEX_FILE := $(LOCAL_PATH)/classes.dex
diff --git a/core/tests/coretests/apks/install_jni_lib/Android.mk b/core/tests/coretests/apks/install_jni_lib/Android.mk
index b61ea8e..7322e8d 100644
--- a/core/tests/coretests/apks/install_jni_lib/Android.mk
+++ b/core/tests/coretests/apks/install_jni_lib/Android.mk
@@ -23,6 +23,14 @@ LOCAL_SHARED_LIBRARIES := \
libnativehelper
LOCAL_MODULE := libframeworks_coretests_jni
+
+# this does not prevent build system
+# from installing library to /system/lib
LOCAL_MODULE_TAGS := tests
+# .. we want to avoid that... so we put it somewhere
+# bionic linker cant find it without outside help (nativetests):
+LOCAL_MODULE_PATH_32 := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
+LOCAL_MODULE_PATH_64 := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE)
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/core/tests/coretests/apks/install_jni_lib/com_android_frameworks_coretests_JNITest.cpp b/core/tests/coretests/apks/install_jni_lib/com_android_frameworks_coretests_JNITest.cpp
index 957fc4a..e0b616c 100644
--- a/core/tests/coretests/apks/install_jni_lib/com_android_frameworks_coretests_JNITest.cpp
+++ b/core/tests/coretests/apks/install_jni_lib/com_android_frameworks_coretests_JNITest.cpp
@@ -27,8 +27,8 @@ static JNINativeMethod sMethods[] = {
{ "checkFunction", "()I", (void*) checkFunction },
};
-int register_com_android_framework_coretests_JNITests(JNIEnv* env) {
- return jniRegisterNativeMethods(env, "com/android/framework/coretests/JNITests", sMethods,
+int register_com_android_frameworks_coretests_JNITests(JNIEnv* env) {
+ return jniRegisterNativeMethods(env, "com/android/frameworks/coretests/JNITests", sMethods,
NELEM(sMethods));
}
@@ -46,7 +46,7 @@ jint JNI_OnLoad(JavaVM *jvm, void *reserved) {
return JNI_ERR;
}
- if ((status = android::register_com_android_framework_coretests_JNITests(e)) < 0) {
+ if ((status = android::register_com_android_frameworks_coretests_JNITests(e)) < 0) {
return JNI_ERR;
}
diff --git a/core/tests/coretests/apks/install_jni_lib_open_from_apk/Android.mk b/core/tests/coretests/apks/install_jni_lib_open_from_apk/Android.mk
new file mode 100644
index 0000000..6ee6ffa
--- /dev/null
+++ b/core/tests/coretests/apks/install_jni_lib_open_from_apk/Android.mk
@@ -0,0 +1,10 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_PACKAGE_NAME := install_jni_lib_open_from_apk
+
+LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES := true
+
+include $(FrameworkCoreTests_BUILD_PACKAGE)
diff --git a/core/tests/coretests/apks/install_jni_lib_open_from_apk/AndroidManifest.xml b/core/tests/coretests/apks/install_jni_lib_open_from_apk/AndroidManifest.xml
new file mode 100644
index 0000000..190f894
--- /dev/null
+++ b/core/tests/coretests/apks/install_jni_lib_open_from_apk/AndroidManifest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.frameworks.coretests.install_jni_lib_open_from_apk">
+
+ <application android:hasCode="true" android:label="@string/app_name" android:extractNativeLibs="false">
+ <activity android:name="com.android.frameworks.coretests.OpenFromApkActivity"
+ android:label="@string/app_name">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/core/tests/coretests/apks/install_jni_lib_open_from_apk/res/values/strings.xml b/core/tests/coretests/apks/install_jni_lib_open_from_apk/res/values/strings.xml
new file mode 100644
index 0000000..8c2a0bf
--- /dev/null
+++ b/core/tests/coretests/apks/install_jni_lib_open_from_apk/res/values/strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name">Load From Apk Test</string>
+</resources>
diff --git a/core/tests/coretests/apks/install_jni_lib_open_from_apk/src/com/android/frameworks/coretests/JNITests.java b/core/tests/coretests/apks/install_jni_lib_open_from_apk/src/com/android/frameworks/coretests/JNITests.java
new file mode 100644
index 0000000..4f9176c
--- /dev/null
+++ b/core/tests/coretests/apks/install_jni_lib_open_from_apk/src/com/android/frameworks/coretests/JNITests.java
@@ -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.frameworks.coretests;
+
+public class JNITests {
+ static {
+ System.loadLibrary("frameworks_coretests_jni");
+ }
+
+ public static native int checkFunction();
+}
diff --git a/core/java/android/net/http/Timer.java b/core/tests/coretests/apks/install_jni_lib_open_from_apk/src/com/android/frameworks/coretests/OpenFromApkActivity.java
index cc15a30..524cad7 100644
--- a/core/java/android/net/http/Timer.java
+++ b/core/tests/coretests/apks/install_jni_lib_open_from_apk/src/com/android/frameworks/coretests/OpenFromApkActivity.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006 The Android Open Source Project
+ * 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.
@@ -12,30 +12,27 @@
* 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 android.net.http;
+package com.android.frameworks.coretests;
-import android.os.SystemClock;
+import android.app.Activity;
+import android.widget.TextView;
+import android.os.Bundle;
-/**
- * {@hide}
- * Debugging tool
- */
-class Timer {
+public class OpenFromApkActivity extends Activity {
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
- private long mStart;
- private long mLast;
+ TextView tv = new TextView(this);
- public Timer() {
- mStart = mLast = SystemClock.uptimeMillis();
- }
+ int i = JNITests.checkFunction();
- public void mark(String message) {
- long now = SystemClock.uptimeMillis();
- if (HttpLog.LOGV) {
- HttpLog.v(message + " " + (now - mLast) + " total " + (now - mStart));
- }
- mLast = now;
+ tv.setText("All is well: i=" + i);
+
+ setContentView(tv);
}
+
}
diff --git a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
index dc43a2f..a59581b 100644
--- a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
+++ b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
@@ -425,7 +425,7 @@ public class PackageManagerTests extends AndroidTestCase {
if (rLoc == INSTALL_LOC_INT) {
if ((flags & PackageManager.INSTALL_FORWARD_LOCK) != 0) {
assertTrue("The application should be installed forward locked",
- (info.flags & ApplicationInfo.FLAG_FORWARD_LOCK) != 0);
+ (info.privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0);
assertStartsWith("The APK path should point to the ASEC",
SECURE_CONTAINERS_PREFIX, srcPath);
assertStartsWith("The public APK path should point to the ASEC",
@@ -441,7 +441,8 @@ public class PackageManagerTests extends AndroidTestCase {
fail("compat check: Can't read " + info.dataDir + "/lib");
}
} else {
- assertFalse((info.flags & ApplicationInfo.FLAG_FORWARD_LOCK) != 0);
+ assertFalse(
+ (info.privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0);
assertEquals(appInstallPath, srcPath);
assertEquals(appInstallPath, publicSrcPath);
assertStartsWith("Native library should point to shared lib directory",
@@ -467,16 +468,16 @@ public class PackageManagerTests extends AndroidTestCase {
} else if (rLoc == INSTALL_LOC_SD) {
if ((flags & PackageManager.INSTALL_FORWARD_LOCK) != 0) {
assertTrue("The application should be installed forward locked",
- (info.flags & ApplicationInfo.FLAG_FORWARD_LOCK) != 0);
+ (info.privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0);
} else {
assertFalse("The application should not be installed forward locked",
- (info.flags & ApplicationInfo.FLAG_FORWARD_LOCK) != 0);
+ (info.privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0);
}
assertTrue("Application flags (" + info.flags
+ ") should contain FLAG_EXTERNAL_STORAGE",
(info.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0);
// Might need to check:
- // ((info.flags & ApplicationInfo.FLAG_FORWARD_LOCK) != 0)
+ // ((info.privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0)
assertStartsWith("The APK path should point to the ASEC",
SECURE_CONTAINERS_PREFIX, srcPath);
assertStartsWith("The public APK path should point to the ASEC",
diff --git a/core/tests/coretests/src/android/net/IpPrefixTest.java b/core/tests/coretests/src/android/net/IpPrefixTest.java
index cf278fb..fcc6389 100644
--- a/core/tests/coretests/src/android/net/IpPrefixTest.java
+++ b/core/tests/coretests/src/android/net/IpPrefixTest.java
@@ -29,6 +29,10 @@ import junit.framework.TestCase;
public class IpPrefixTest extends TestCase {
+ private static InetAddress Address(String addr) {
+ return InetAddress.parseNumericAddress(addr);
+ }
+
// Explicitly cast everything to byte because "error: possible loss of precision".
private static final byte[] IPV4_BYTES = { (byte) 192, (byte) 0, (byte) 2, (byte) 4};
private static final byte[] IPV6_BYTES = {
@@ -209,6 +213,34 @@ public class IpPrefixTest extends TestCase {
}
@SmallTest
+ public void testContains() {
+ IpPrefix p = new IpPrefix("2001:db8:f00::ace:d00d/127");
+ assertTrue(p.contains(Address("2001:db8:f00::ace:d00c")));
+ assertTrue(p.contains(Address("2001:db8:f00::ace:d00d")));
+ assertFalse(p.contains(Address("2001:db8:f00::ace:d00e")));
+ assertFalse(p.contains(Address("2001:db8:f00::bad:d00d")));
+ assertFalse(p.contains(Address("2001:4868:4860::8888")));
+ assertFalse(p.contains(null));
+ assertFalse(p.contains(Address("8.8.8.8")));
+
+ p = new IpPrefix("192.0.2.0/23");
+ assertTrue(p.contains(Address("192.0.2.43")));
+ assertTrue(p.contains(Address("192.0.3.21")));
+ assertFalse(p.contains(Address("192.0.0.21")));
+ assertFalse(p.contains(Address("8.8.8.8")));
+ assertFalse(p.contains(Address("2001:4868:4860::8888")));
+
+ IpPrefix ipv6Default = new IpPrefix("::/0");
+ assertTrue(ipv6Default.contains(Address("2001:db8::f00")));
+ assertFalse(ipv6Default.contains(Address("192.0.2.1")));
+
+ IpPrefix ipv4Default = new IpPrefix("0.0.0.0/0");
+ assertTrue(ipv4Default.contains(Address("255.255.255.255")));
+ assertTrue(ipv4Default.contains(Address("192.0.2.1")));
+ assertFalse(ipv4Default.contains(Address("2001:db8::f00")));
+ }
+
+ @SmallTest
public void testHashCode() {
IpPrefix p;
int oldCode = -1;
diff --git a/core/tests/coretests/src/android/net/RouteInfoTest.java b/core/tests/coretests/src/android/net/RouteInfoTest.java
index 0b88bc7..831fefd 100644
--- a/core/tests/coretests/src/android/net/RouteInfoTest.java
+++ b/core/tests/coretests/src/android/net/RouteInfoTest.java
@@ -90,6 +90,7 @@ public class RouteInfoTest extends TestCase {
assertFalse(r.matches(Address("2001:db8:f00::ace:d00e")));
assertFalse(r.matches(Address("2001:db8:f00::bad:d00d")));
assertFalse(r.matches(Address("2001:4868:4860::8888")));
+ assertFalse(r.matches(Address("8.8.8.8")));
r = new PatchedRouteInfo(Prefix("192.0.2.0/23"), null, "wlan0");
assertTrue(r.matches(Address("192.0.2.43")));
diff --git a/core/tests/coretests/src/android/net/StaticIpConfigurationTest.java b/core/tests/coretests/src/android/net/StaticIpConfigurationTest.java
new file mode 100644
index 0000000..59f780f
--- /dev/null
+++ b/core/tests/coretests/src/android/net/StaticIpConfigurationTest.java
@@ -0,0 +1,225 @@
+/*
+ * 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 android.net;
+
+import android.net.IpPrefix;
+import android.net.LinkAddress;
+import android.net.RouteInfo;
+import android.net.StaticIpConfiguration;
+import android.os.Parcel;
+
+import java.net.InetAddress;
+import java.util.HashSet;
+
+import junit.framework.TestCase;
+import android.test.suitebuilder.annotation.SmallTest;
+
+import static org.junit.Assert.*;
+
+
+public class StaticIpConfigurationTest extends TestCase {
+
+ private static final String ADDRSTR = "192.0.2.2/25";
+ private static final LinkAddress ADDR = new LinkAddress(ADDRSTR);
+ private static final InetAddress GATEWAY = IpAddress("192.0.2.1");
+ private static final InetAddress OFFLINKGATEWAY = IpAddress("192.0.2.129");
+ private static final InetAddress DNS1 = IpAddress("8.8.8.8");
+ private static final InetAddress DNS2 = IpAddress("8.8.4.4");
+ private static final InetAddress DNS3 = IpAddress("4.2.2.2");
+ private static final String IFACE = "eth0";
+
+ private static InetAddress IpAddress(String addr) {
+ return InetAddress.parseNumericAddress(addr);
+ }
+
+ private void checkEmpty(StaticIpConfiguration s) {
+ assertNull(s.ipAddress);
+ assertNull(s.gateway);
+ assertNull(s.domains);
+ assertEquals(0, s.dnsServers.size());
+ }
+
+ private boolean isEqual(StaticIpConfiguration s1, StaticIpConfiguration s2) {
+ return s1.equals(s2);
+ }
+
+ private void assertEquals(StaticIpConfiguration s1, StaticIpConfiguration s2) {
+ assertTrue(isEqual(s1, s2));
+ }
+
+ private void assertNotEquals(StaticIpConfiguration s1, StaticIpConfiguration s2) {
+ assertFalse(isEqual(s1, s2));
+ }
+
+ private StaticIpConfiguration makeTestObject() {
+ StaticIpConfiguration s = new StaticIpConfiguration();
+ s.ipAddress = ADDR;
+ s.gateway = GATEWAY;
+ s.dnsServers.add(DNS1);
+ s.dnsServers.add(DNS2);
+ s.dnsServers.add(DNS3);
+ s.domains = "google.com";
+ return s;
+ }
+
+ @SmallTest
+ public void testConstructor() {
+ StaticIpConfiguration s = new StaticIpConfiguration();
+ checkEmpty(s);
+ }
+
+ @SmallTest
+ public void testCopyAndClear() {
+ StaticIpConfiguration empty = new StaticIpConfiguration((StaticIpConfiguration) null);
+ checkEmpty(empty);
+
+ StaticIpConfiguration s1 = makeTestObject();
+ StaticIpConfiguration s2 = new StaticIpConfiguration(s1);
+ assertEquals(s1, s2);
+ s2.clear();
+ assertEquals(empty, s2);
+ }
+
+ @SmallTest
+ public void testHashCodeAndEquals() {
+ HashSet<Integer> hashCodes = new HashSet();
+ hashCodes.add(0);
+
+ StaticIpConfiguration s = new StaticIpConfiguration();
+ // Check that this hash code is nonzero and different from all the ones seen so far.
+ assertTrue(hashCodes.add(s.hashCode()));
+
+ s.ipAddress = ADDR;
+ assertTrue(hashCodes.add(s.hashCode()));
+
+ s.gateway = GATEWAY;
+ assertTrue(hashCodes.add(s.hashCode()));
+
+ s.dnsServers.add(DNS1);
+ assertTrue(hashCodes.add(s.hashCode()));
+
+ s.dnsServers.add(DNS2);
+ assertTrue(hashCodes.add(s.hashCode()));
+
+ s.dnsServers.add(DNS3);
+ assertTrue(hashCodes.add(s.hashCode()));
+
+ s.domains = "example.com";
+ assertTrue(hashCodes.add(s.hashCode()));
+
+ assertFalse(s.equals(null));
+ assertEquals(s, s);
+
+ StaticIpConfiguration s2 = new StaticIpConfiguration(s);
+ assertEquals(s, s2);
+
+ s.ipAddress = new LinkAddress(DNS1, 32);
+ assertNotEquals(s, s2);
+
+ s2 = new StaticIpConfiguration(s);
+ s.domains = "foo";
+ assertNotEquals(s, s2);
+
+ s2 = new StaticIpConfiguration(s);
+ s.gateway = DNS2;
+ assertNotEquals(s, s2);
+
+ s2 = new StaticIpConfiguration(s);
+ s.dnsServers.add(DNS3);
+ assertNotEquals(s, s2);
+ }
+
+ @SmallTest
+ public void testToLinkProperties() {
+ LinkProperties expected = new LinkProperties();
+ expected.setInterfaceName(IFACE);
+
+ StaticIpConfiguration s = new StaticIpConfiguration();
+ assertEquals(expected, s.toLinkProperties(IFACE));
+
+ final RouteInfo connectedRoute = new RouteInfo(new IpPrefix(ADDRSTR), null, IFACE);
+ s.ipAddress = ADDR;
+ expected.addLinkAddress(ADDR);
+ expected.addRoute(connectedRoute);
+ assertEquals(expected, s.toLinkProperties(IFACE));
+
+ s.gateway = GATEWAY;
+ RouteInfo defaultRoute = new RouteInfo(new IpPrefix("0.0.0.0/0"), GATEWAY, IFACE);
+ expected.addRoute(defaultRoute);
+ assertEquals(expected, s.toLinkProperties(IFACE));
+
+ s.gateway = OFFLINKGATEWAY;
+ expected.removeRoute(defaultRoute);
+ defaultRoute = new RouteInfo(new IpPrefix("0.0.0.0/0"), OFFLINKGATEWAY, IFACE);
+ expected.addRoute(defaultRoute);
+
+ RouteInfo gatewayRoute = new RouteInfo(new IpPrefix("192.0.2.129/32"), null, IFACE);
+ expected.addRoute(gatewayRoute);
+ assertEquals(expected, s.toLinkProperties(IFACE));
+
+ s.dnsServers.add(DNS1);
+ expected.addDnsServer(DNS1);
+ assertEquals(expected, s.toLinkProperties(IFACE));
+
+ s.dnsServers.add(DNS2);
+ s.dnsServers.add(DNS3);
+ expected.addDnsServer(DNS2);
+ expected.addDnsServer(DNS3);
+ assertEquals(expected, s.toLinkProperties(IFACE));
+
+ s.domains = "google.com";
+ expected.setDomains("google.com");
+ assertEquals(expected, s.toLinkProperties(IFACE));
+
+ s.gateway = null;
+ expected.removeRoute(defaultRoute);
+ expected.removeRoute(gatewayRoute);
+ assertEquals(expected, s.toLinkProperties(IFACE));
+
+ // Without knowing the IP address, we don't have a directly-connected route, so we can't
+ // tell if the gateway is off-link or not and we don't add a host route. This isn't a real
+ // configuration, but we should at least not crash.
+ s.gateway = OFFLINKGATEWAY;
+ s.ipAddress = null;
+ expected.removeLinkAddress(ADDR);
+ expected.removeRoute(connectedRoute);
+ expected.addRoute(defaultRoute);
+ assertEquals(expected, s.toLinkProperties(IFACE));
+ }
+
+ private StaticIpConfiguration passThroughParcel(StaticIpConfiguration s) {
+ Parcel p = Parcel.obtain();
+ StaticIpConfiguration s2 = null;
+ try {
+ s.writeToParcel(p, 0);
+ p.setDataPosition(0);
+ s2 = StaticIpConfiguration.CREATOR.createFromParcel(p);
+ } finally {
+ p.recycle();
+ }
+ assertNotNull(s2);
+ return s2;
+ }
+
+ @SmallTest
+ public void testParceling() {
+ StaticIpConfiguration s = makeTestObject();
+ StaticIpConfiguration s2 = passThroughParcel(s);
+ assertEquals(s, s2);
+ }
+}
+
diff --git a/core/tests/coretests/src/android/net/UriTest.java b/core/tests/coretests/src/android/net/UriTest.java
index cd45017..6fa28b1 100644
--- a/core/tests/coretests/src/android/net/UriTest.java
+++ b/core/tests/coretests/src/android/net/UriTest.java
@@ -804,4 +804,56 @@ public class UriTest extends TestCase {
assertFalse(Uri.parse("content://com.example/path/path").isPathPrefixMatch(
Uri.parse("content://com.example/path%2Fpath")));
}
+
+ public void testToSafeString() {
+ checkToSafeString("tel:xxxxxx", "tel:Google");
+ checkToSafeString("tel:xxxxxxxxxx", "tel:1234567890");
+ checkToSafeString("tEl:xxx.xxx-xxxx", "tEl:123.456-7890");
+
+ checkToSafeString("sms:xxxxxx", "sms:123abc");
+ checkToSafeString("smS:xxx.xxx-xxxx", "smS:123.456-7890");
+
+ checkToSafeString("smsto:xxxxxx", "smsto:123abc");
+ checkToSafeString("SMSTo:xxx.xxx-xxxx", "SMSTo:123.456-7890");
+
+ checkToSafeString("mailto:xxxxxxx@xxxxxxx.xxx", "mailto:android@android.com");
+ checkToSafeString("Mailto:xxxxxxx@xxxxxxx.xxxxxxxxxx",
+ "Mailto:android@android.com/secret");
+
+ checkToSafeString("sip:xxxxxxx@xxxxxxx.xxxxxxxx", "sip:android@android.com:1234");
+ checkToSafeString("sIp:xxxxxxx@xxxxxxx.xxx", "sIp:android@android.com");
+
+ checkToSafeString("http://www.android.com/...", "http://www.android.com");
+ checkToSafeString("HTTP://www.android.com/...", "HTTP://www.android.com");
+ checkToSafeString("http://www.android.com/...", "http://www.android.com/");
+ checkToSafeString("http://www.android.com/...", "http://www.android.com/secretUrl?param");
+ checkToSafeString("http://www.android.com/...",
+ "http://user:pwd@www.android.com/secretUrl?param");
+ checkToSafeString("http://www.android.com/...",
+ "http://user@www.android.com/secretUrl?param");
+ checkToSafeString("http://www.android.com/...", "http://www.android.com/secretUrl?param");
+ checkToSafeString("http:///...", "http:///path?param");
+ checkToSafeString("http:///...", "http://");
+ checkToSafeString("http://:12345/...", "http://:12345/");
+
+ checkToSafeString("https://www.android.com/...", "https://www.android.com/secretUrl?param");
+ checkToSafeString("https://www.android.com:8443/...",
+ "https://user:pwd@www.android.com:8443/secretUrl?param");
+ checkToSafeString("https://www.android.com/...", "https://user:pwd@www.android.com");
+ checkToSafeString("Https://www.android.com/...", "Https://user:pwd@www.android.com");
+
+ checkToSafeString("ftp://ftp.android.com/...", "ftp://ftp.android.com/");
+ checkToSafeString("ftP://ftp.android.com/...", "ftP://anonymous@ftp.android.com/");
+ checkToSafeString("ftp://ftp.android.com:2121/...",
+ "ftp://root:love@ftp.android.com:2121/");
+
+ checkToSafeString("unsupported://ajkakjah/askdha/secret?secret",
+ "unsupported://ajkakjah/askdha/secret?secret");
+ checkToSafeString("unsupported:ajkakjah/askdha/secret?secret",
+ "unsupported:ajkakjah/askdha/secret?secret");
+ }
+
+ private void checkToSafeString(String expectedSafeString, String original) {
+ assertEquals(expectedSafeString, Uri.parse(original).toSafeString());
+ }
}
diff --git a/core/tests/coretests/src/android/net/http/HttpResponseCacheTest.java b/core/tests/coretests/src/android/net/http/HttpResponseCacheTest.java
deleted file mode 100644
index 9015a6f..0000000
--- a/core/tests/coretests/src/android/net/http/HttpResponseCacheTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * 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 android.net.http;
-
-import com.google.mockwebserver.MockResponse;
-import com.google.mockwebserver.MockWebServer;
-import java.io.File;
-import java.net.CacheRequest;
-import java.net.CacheResponse;
-import java.net.ResponseCache;
-import java.net.URI;
-import java.net.URLConnection;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import junit.framework.TestCase;
-
-public final class HttpResponseCacheTest extends TestCase {
-
- private File cacheDir;
- private MockWebServer server = new MockWebServer();
-
- @Override public void setUp() throws Exception {
- super.setUp();
- String tmp = System.getProperty("java.io.tmpdir");
- cacheDir = new File(tmp, "HttpCache-" + UUID.randomUUID());
- }
-
- @Override protected void tearDown() throws Exception {
- ResponseCache.setDefault(null);
- server.shutdown();
- super.tearDown();
- }
-
- public void testInstall() throws Exception {
- HttpResponseCache installed = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
- assertNotNull(installed);
- assertSame(installed, ResponseCache.getDefault());
- assertSame(installed, HttpResponseCache.getDefault());
- }
-
- public void testSecondEquivalentInstallDoesNothing() throws Exception {
- HttpResponseCache first = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
- HttpResponseCache another = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
- assertSame(first, another);
- }
-
- public void testInstallClosesPreviouslyInstalled() throws Exception {
- HttpResponseCache first = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
- HttpResponseCache another = HttpResponseCache.install(cacheDir, 8 * 1024 * 1024);
- assertNotSame(first, another);
- try {
- first.flush();
- fail();
- } catch (IllegalStateException expected) {
- }
- }
-
- public void testGetInstalledWithWrongTypeInstalled() {
- ResponseCache.setDefault(new ResponseCache() {
- @Override public CacheResponse get(URI uri, String requestMethod,
- Map<String, List<String>> requestHeaders) {
- return null;
- }
- @Override public CacheRequest put(URI uri, URLConnection connection) {
- return null;
- }
- });
- assertNull(HttpResponseCache.getInstalled());
- }
-
- public void testCloseCloses() throws Exception {
- HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
- cache.close();
- try {
- cache.flush();
- fail();
- } catch (IllegalStateException expected) {
- }
- }
-
- public void testCloseUninstalls() throws Exception {
- HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
- cache.close();
- assertNull(ResponseCache.getDefault());
- }
-
- public void testDeleteUninstalls() throws Exception {
- HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
- cache.delete();
- assertNull(ResponseCache.getDefault());
- }
-
- /**
- * Make sure that statistics tracking are wired all the way through the
- * wrapper class. http://code.google.com/p/android/issues/detail?id=25418
- */
- public void testStatisticsTracking() throws Exception {
- HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024);
-
- server.enqueue(new MockResponse()
- .addHeader("Cache-Control: max-age=60")
- .setBody("A"));
- server.play();
-
- URLConnection c1 = server.getUrl("/").openConnection();
- assertEquals('A', c1.getInputStream().read());
- assertEquals(1, cache.getRequestCount());
- assertEquals(1, cache.getNetworkCount());
- assertEquals(0, cache.getHitCount());
-
- URLConnection c2 = server.getUrl("/").openConnection();
- assertEquals('A', c2.getInputStream().read());
-
- URLConnection c3 = server.getUrl("/").openConnection();
- assertEquals('A', c3.getInputStream().read());
- assertEquals(3, cache.getRequestCount());
- assertEquals(1, cache.getNetworkCount());
- assertEquals(2, cache.getHitCount());
- }
-}
diff --git a/core/tests/coretests/src/android/os/SELinuxTest.java b/core/tests/coretests/src/android/os/SELinuxTest.java
deleted file mode 100644
index 9b63a6b..0000000
--- a/core/tests/coretests/src/android/os/SELinuxTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package android.os;
-
-import android.os.Process;
-import android.os.SELinux;
-import android.test.AndroidTestCase;
-import static junit.framework.Assert.assertEquals;
-
-public class SELinuxTest extends AndroidTestCase {
-
- public void testgetFileCon() {
- if(SELinux.isSELinuxEnabled() == false)
- return;
-
- String ctx = SELinux.getFileContext("/system/bin/toolbox");
- assertEquals(ctx, "u:object_r:system_file:s0");
- }
-
- public void testgetCon() {
- if(SELinux.isSELinuxEnabled() == false)
- return;
-
- String mycon = SELinux.getContext();
- assertEquals(mycon, "u:r:untrusted_app:s0:c33");
- }
-
- public void testgetPidCon() {
- if(SELinux.isSELinuxEnabled() == false)
- return;
-
- String mycon = SELinux.getPidContext(Process.myPid());
- assertEquals(mycon, "u:r:untrusted_app:s0:c33");
- }
-
- public void testcheckSELinuxAccess() {
- if(SELinux.isSELinuxEnabled() == false)
- return;
-
- String mycon = SELinux.getContext();
- boolean ret;
- ret = SELinux.checkSELinuxAccess(mycon, mycon, "process", "fork");
- assertEquals(ret,"true");
- ret = SELinux.checkSELinuxAccess(mycon, mycon, "memprotect", "mmap_zero");
- assertEquals(ret,"true");
- }
-}
diff --git a/core/tests/coretests/src/android/text/TextUtilsTest.java b/core/tests/coretests/src/android/text/TextUtilsTest.java
index d494c5d..5a6ef30 100644
--- a/core/tests/coretests/src/android/text/TextUtilsTest.java
+++ b/core/tests/coretests/src/android/text/TextUtilsTest.java
@@ -353,6 +353,7 @@ public class TextUtilsTest extends TestCase {
assertNull("null CharSequence should generate null from parcel", text);
p = Parcel.obtain();
TextUtils.writeToParcel("test", p, 0);
+ p.setDataPosition(0);
text = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(p);
assertEquals("conversion to/from parcel failed", "test", text);
}
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/Test.java b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/Test.java
index bbdd3e5..41b8956 100644
--- a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/Test.java
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/Test.java
@@ -31,7 +31,7 @@ public class Test extends ActivityInstrumentationTestCase2<MainActivity> {
assertEquals(3366, getActivity().getValue());
}
- public void testAnnotation() {
+ public void testAnnotation() throws Exception {
assertEquals(ReferencedByAnnotation.B,
((AnnotationWithEnum) TestApplication.annotation).value());
assertEquals(ReferencedByAnnotation.B,
@@ -43,10 +43,25 @@ public class Test extends ActivityInstrumentationTestCase2<MainActivity> {
((AnnotationWithClass) TestApplication.annotation3).value());
// Just to verify that it doesn't crash
ReferencedByClassInAnnotation.A.get();
+
+ // Tests about bug https://code.google.com/p/android/issues/detail?id=78144
+ // Dalvik may throw IllegalAccessError when a class is in a different dex than an enum
+ // used in its annotations.
+ String annotationPackage = "com.android.multidexlegacytestapp.annotation.";
+ Class<?> clazz = Class.forName(annotationPackage + "Annotated");
+ // Just to verify that it doesn't crash
+ clazz.getAnnotations();
+ clazz = Class.forName(annotationPackage + "Annotated2");
+ // Just to verify that it doesn't crash
+ clazz.getAnnotations();
+ clazz = Class.forName(annotationPackage + "Annotated3");
+ // Just to verify that it doesn't crash
+ clazz.getAnnotations();
}
public void testInterface() {
assertEquals(InterfaceWithEnum.class,
TestApplication.interfaceClass);
}
+
}
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated.java b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated.java
new file mode 100644
index 0000000..fb7787b
--- /dev/null
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated.java
@@ -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.multidexlegacytestapp.annotation;
+
+@TestAnnotation(AnnotationValue.V1)
+public class Annotated {
+
+ public void m() {
+
+ }
+
+}
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated2.java b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated2.java
new file mode 100644
index 0000000..7e2dea7
--- /dev/null
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated2.java
@@ -0,0 +1,25 @@
+/*
+ * 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.multidexlegacytestapp.annotation;
+
+@TestAnnotation2(AnnotationValue.V1)
+public class Annotated2 {
+ public void m() {
+
+ }
+
+}
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated3.java b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated3.java
new file mode 100644
index 0000000..8a01c5b
--- /dev/null
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/Annotated3.java
@@ -0,0 +1,27 @@
+/*
+ * 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.multidexlegacytestapp.annotation;
+
+import com.android.multidexlegacytestapp.annotation.TestAnnotation3.Value;
+
+@TestAnnotation3(Value.V1)
+public class Annotated3 {
+ public void m() {
+
+ }
+
+}
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/AnnotationValue.java b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/AnnotationValue.java
new file mode 100644
index 0000000..1322d73
--- /dev/null
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/AnnotationValue.java
@@ -0,0 +1,23 @@
+/*
+ * 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.multidexlegacytestapp.annotation;
+
+public enum AnnotationValue {
+ V1,
+ V2;
+
+}
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation.java b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation.java
new file mode 100644
index 0000000..68684b6
--- /dev/null
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation.java
@@ -0,0 +1,25 @@
+/*
+ * 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.multidexlegacytestapp.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TestAnnotation {
+ AnnotationValue value();
+}
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation2.java b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation2.java
new file mode 100644
index 0000000..327d49c
--- /dev/null
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation2.java
@@ -0,0 +1,25 @@
+/*
+ * 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.multidexlegacytestapp.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TestAnnotation2 {
+ AnnotationValue value();
+}
diff --git a/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation3.java b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation3.java
new file mode 100644
index 0000000..b1bf75e
--- /dev/null
+++ b/core/tests/hosttests/test-apps/MultiDexLegacyTestApp/src/com/android/multidexlegacytestapp/annotation/TestAnnotation3.java
@@ -0,0 +1,31 @@
+/*
+ * 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.multidexlegacytestapp.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface TestAnnotation3 {
+ public enum Value {
+ V1,
+ V2;
+
+ }
+
+ Value value();
+}
diff --git a/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java b/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java
index 42de9ea..e57c55c 100644
--- a/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java
+++ b/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/OverlayBaseTest.java
@@ -225,8 +225,12 @@ public abstract class OverlayBaseTest extends AndroidTestCase {
reader = new BufferedReader(new InputStreamReader(input));
actual = reader.readLine();
} finally {
- reader.close();
- input.close();
+ if (reader != null) {
+ reader.close();
+ }
+ if (input != null) {
+ input.close();
+ }
}
final String no = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, " +
diff --git a/core/tests/overlaytests/testrunner.py b/core/tests/overlaytests/testrunner.py
index 4f94373..3703f4a 100755
--- a/core/tests/overlaytests/testrunner.py
+++ b/core/tests/overlaytests/testrunner.py
@@ -421,8 +421,8 @@ def _create_enable_single_overlay_task():
_create_disable_overlays_task(),
MkdirTask('/system/vendor'),
MkdirTask('/vendor/overlay'),
- PushTask('/data/app/com.android.overlaytest.overlay.apk', '/vendor/overlay/framework_a.apk'),
- PushTask('/data/app/com.android.overlaytest.first_app_overlay.apk', '/vendor/overlay/app_a.apk'),
+ PushTask('/data/app/com.android.overlaytest.overlay/com.android.overlaytest.overlay.apk', '/vendor/overlay/framework_a.apk'),
+ PushTask('/data/app/com.android.overlaytest.first_app_overlay/com.android.overlaytest.first_app_overlay.apk', '/vendor/overlay/app_a.apk'),
]
return CompoundTask(TASK_ENABLE_SINGLE_OVERLAY, tasks)
@@ -432,9 +432,9 @@ def _create_enable_multiple_overlays_task():
MkdirTask('/system/vendor'),
MkdirTask('/vendor/overlay'),
- PushTask('/data/app/com.android.overlaytest.overlay.apk', '/vendor/overlay/framework_b.apk'),
- PushTask('/data/app/com.android.overlaytest.first_app_overlay.apk', '/vendor/overlay/app_a.apk'),
- PushTask('/data/app/com.android.overlaytest.second_app_overlay.apk', '/vendor/overlay/app_b.apk'),
+ PushTask('/data/app/com.android.overlaytest.overlay/com.android.overlaytest.overlay.apk', '/vendor/overlay/framework_b.apk'),
+ PushTask('/data/app/com.android.overlaytest.first_app_overlay/com.android.overlaytest.first_app_overlay.apk', '/vendor/overlay/app_a.apk'),
+ PushTask('/data/app/com.android.overlaytest.second_app_overlay/com.android.overlaytest.second_app_overlay.apk', '/vendor/overlay/app_b.apk'),
]
return CompoundTask(TASK_ENABLE_MULTIPLE_OVERLAYS, tasks)
@@ -584,7 +584,7 @@ if __name__ == '__main__':
# remount filesystem, install test project
tasks.append(RootTask())
tasks.append(RemountTask())
- tasks.append(PushTask('/system/app/OverlayTest.apk', '/system/app/OverlayTest.apk'))
+ tasks.append(PushTask('/system/app/OverlayTest/OverlayTest.apk', '/system/app/OverlayTest.apk'))
# test idmap
if opts.test_idmap:
@@ -609,9 +609,9 @@ if __name__ == '__main__':
tasks.append(GrepIdmapTest(idmap, 'bool/config_annoy_dianne', 1))
# overlays.list
- overlays_list_path = '/data/resource-cache/overlays.list'
+ overlays_list_path = idmaps + '/overlays.list'
expected_content = '''\
-/vendor/overlay/framework_b.apk /data/resource-cache/vendor@overlay@framework_b.apk@idmap
+/vendor/overlay/framework_b.apk /data/local/tmp/idmaps/vendor@overlay@framework_b.apk@idmap
'''
tasks.append(FileExistsTest(overlays_list_path))
tasks.append(Md5Test(overlays_list_path, expected_content))