diff options
51 files changed, 794 insertions, 267 deletions
diff --git a/config/compiled-classes-phone b/config/compiled-classes-phone index c1cbb648aae6..7d8a7b518c46 100644 --- a/config/compiled-classes-phone +++ b/config/compiled-classes-phone @@ -150,6 +150,7 @@ android.app.-$Lambda$CsyQO--8YdRe5wlajUCi-L98enA$1 android.app.-$Lambda$CsyQO--8YdRe5wlajUCi-L98enA$2 android.app.-$Lambda$CsyQO--8YdRe5wlajUCi-L98enA$3 android.app.-$Lambda$FilBqgnXJrN9Mgyks1XHeAxzSTk +android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ android.app.-$Lambda$c44uHH2WE4sJvw5tZZB6gRzEaHI android.app.-$Lambda$c44uHH2WE4sJvw5tZZB6gRzEaHI$1 android.app.-$Lambda$vZ1qb742P9hE4drBY-TrOZB_qKo @@ -256,6 +257,7 @@ android.app.BroadcastOptions android.app.ContentProviderHolder android.app.ContentProviderHolder$1 android.app.ContextImpl +android.app.ContextImpl$1 android.app.ContextImpl$ApplicationContentResolver android.app.DatePickerDialog$OnDateSetListener android.app.DexLoadReporter @@ -370,6 +372,8 @@ android.app.IntentService android.app.IntentService$ServiceHandler android.app.JobSchedulerImpl android.app.KeyguardManager +android.app.KeyguardManager$1 +android.app.KeyguardManager$KeyguardDismissCallback android.app.ListActivity android.app.ListFragment android.app.ListFragment$1 @@ -542,6 +546,9 @@ android.app.SystemServiceRegistry$8 android.app.SystemServiceRegistry$80 android.app.SystemServiceRegistry$81 android.app.SystemServiceRegistry$82 +android.app.SystemServiceRegistry$83 +android.app.SystemServiceRegistry$84 +android.app.SystemServiceRegistry$85 android.app.SystemServiceRegistry$9 android.app.SystemServiceRegistry$CachedServiceFetcher android.app.SystemServiceRegistry$ServiceFetcher @@ -554,7 +561,10 @@ android.app.UserSwitchObserver android.app.Vr2dDisplayProperties android.app.VrManager android.app.WaitResult +android.app.WallpaperColors +android.app.WallpaperColors$1 android.app.WallpaperInfo +android.app.WallpaperInfo$1 android.app.WallpaperManager android.app.WallpaperManager$Globals android.app.admin.DeviceAdminInfo @@ -634,6 +644,8 @@ android.app.job.JobServiceEngine android.app.job.JobServiceEngine$JobHandler android.app.job.JobServiceEngine$JobInterface android.app.job.JobWorkItem +android.app.job.JobWorkItem$1 +android.app.timezone.RulesManager android.app.trust.IStrongAuthTracker android.app.trust.IStrongAuthTracker$Stub android.app.trust.IStrongAuthTracker$Stub$Proxy @@ -1136,6 +1148,7 @@ android.content.res.GradientColor android.content.res.ObbInfo android.content.res.ObbInfo$1 android.content.res.ObbScanner +android.content.res.ResourceId android.content.res.Resources android.content.res.Resources$NotFoundException android.content.res.Resources$Theme @@ -1189,6 +1202,7 @@ android.database.MergeCursor$1 android.database.Observable android.database.SQLException android.database.StaleDataException +android.database.sqlite.-$Lambda$gPaS7kMbZ8xtrrEx06GlwJ2iDWE android.database.sqlite.DatabaseObjectNotClosedException android.database.sqlite.SQLiteAbortException android.database.sqlite.SQLiteCantOpenDatabaseException @@ -1201,6 +1215,7 @@ android.database.sqlite.SQLiteConnection$PreparedStatementCache android.database.sqlite.SQLiteConnectionPool android.database.sqlite.SQLiteConnectionPool$AcquiredConnectionStatus android.database.sqlite.SQLiteConnectionPool$ConnectionWaiter +android.database.sqlite.SQLiteConnectionPool$IdleConnectionHandler android.database.sqlite.SQLiteConstraintException android.database.sqlite.SQLiteCursor android.database.sqlite.SQLiteCursorDriver @@ -1210,6 +1225,8 @@ android.database.sqlite.SQLiteDatabase$1 android.database.sqlite.SQLiteDatabase$2 android.database.sqlite.SQLiteDatabase$CursorFactory android.database.sqlite.SQLiteDatabase$CustomFunction +android.database.sqlite.SQLiteDatabase$OpenParams +android.database.sqlite.SQLiteDatabase$OpenParams$Builder android.database.sqlite.SQLiteDatabaseConfiguration android.database.sqlite.SQLiteDatabaseCorruptException android.database.sqlite.SQLiteDatabaseLockedException @@ -1270,6 +1287,7 @@ android.graphics.Canvas$NoImagePreloadHolder android.graphics.CanvasProperty android.graphics.Color android.graphics.ColorFilter +android.graphics.ColorFilter$NoImagePreloadHolder android.graphics.ColorMatrix android.graphics.ColorMatrixColorFilter android.graphics.ColorSpace @@ -1295,6 +1313,7 @@ android.graphics.ImageFormat android.graphics.Insets android.graphics.Interpolator android.graphics.Interpolator$Result +android.graphics.LeakyTypefaceStorage android.graphics.LightingColorFilter android.graphics.LinearGradient android.graphics.MaskFilter @@ -1344,6 +1363,7 @@ android.graphics.Region$1 android.graphics.Region$Op android.graphics.RegionIterator android.graphics.Shader +android.graphics.Shader$NoImagePreloadHolder android.graphics.Shader$TileMode android.graphics.SumPathEffect android.graphics.SurfaceTexture @@ -1857,6 +1877,7 @@ android.hardware.soundtrigger.SoundTrigger$ConfidenceLevel$1 android.hardware.soundtrigger.SoundTrigger$GenericRecognitionEvent android.hardware.soundtrigger.SoundTrigger$GenericRecognitionEvent$1 android.hardware.soundtrigger.SoundTrigger$GenericSoundModel +android.hardware.soundtrigger.SoundTrigger$GenericSoundModel$1 android.hardware.soundtrigger.SoundTrigger$Keyphrase android.hardware.soundtrigger.SoundTrigger$Keyphrase$1 android.hardware.soundtrigger.SoundTrigger$KeyphraseRecognitionEvent @@ -1881,6 +1902,7 @@ android.hardware.usb.IUsbManager$Stub android.hardware.usb.IUsbManager$Stub$Proxy android.hardware.usb.UsbAccessory android.hardware.usb.UsbDevice +android.hardware.usb.UsbDevice$1 android.hardware.usb.UsbDeviceConnection android.hardware.usb.UsbManager android.hardware.usb.UsbPort @@ -2018,6 +2040,16 @@ android.icu.impl.SimpleFormatterImpl android.icu.impl.SoftCache android.icu.impl.StandardPlural android.icu.impl.StringPrepDataReader +android.icu.impl.TextTrieMap +android.icu.impl.TextTrieMap$Node +android.icu.impl.TimeZoneNamesFactoryImpl +android.icu.impl.TimeZoneNamesImpl +android.icu.impl.TimeZoneNamesImpl$MZ2TZsCache +android.icu.impl.TimeZoneNamesImpl$MZMapEntry +android.icu.impl.TimeZoneNamesImpl$TZ2MZsCache +android.icu.impl.TimeZoneNamesImpl$ZNames +android.icu.impl.TimeZoneNamesImpl$ZNames$NameTypeIndex +android.icu.impl.TimeZoneNamesImpl$ZNamesLoader android.icu.impl.Trie android.icu.impl.Trie$DataManipulate android.icu.impl.Trie$DefaultGetFoldingOffset @@ -2262,6 +2294,9 @@ android.icu.text.SimpleDateFormat android.icu.text.SimpleDateFormat$PatternItem android.icu.text.StringPrep android.icu.text.StringPrepParseException +android.icu.text.TimeZoneNames +android.icu.text.TimeZoneNames$Cache +android.icu.text.TimeZoneNames$Factory android.icu.text.TimeZoneNames$NameType android.icu.text.UCharacterIterator android.icu.text.UFieldPosition @@ -2277,6 +2312,7 @@ android.icu.text.UnicodeSet$Filter android.icu.text.UnicodeSet$GeneralCategoryMaskFilter android.icu.text.UnicodeSet$IntPropertyFilter android.icu.text.UnicodeSet$UnicodeSetIterator2 +android.icu.text.UnicodeSetSpanner android.icu.util.BasicTimeZone android.icu.util.ByteArrayWrapper android.icu.util.BytesTrie @@ -2603,6 +2639,7 @@ android.media.MediaRouter$RouteInfo$1 android.media.MediaRouter$SimpleCallback android.media.MediaRouter$Static android.media.MediaRouter$Static$1 +android.media.MediaRouter$Static$1$1 android.media.MediaRouter$Static$Client android.media.MediaRouter$Static$Client$1 android.media.MediaRouter$VolumeCallback @@ -2632,6 +2669,7 @@ android.media.Rating android.media.Rating$1 android.media.RemoteDisplay android.media.ResampleInputStream +android.media.Ringtone$MyOnCompletionListener android.media.SoundPool android.media.SoundPool$Builder android.media.SoundPool$EventHandler @@ -2835,6 +2873,7 @@ android.net.IpPrefix android.net.IpPrefix$1 android.net.IpSecConfig android.net.IpSecManager +android.net.IpSecManager$SpiUnavailableException android.net.LinkAddress android.net.LinkAddress$1 android.net.LinkProperties @@ -2941,6 +2980,7 @@ android.net.http.AndroidHttpClient$LoggingConfiguration android.net.http.HttpResponseCache android.net.http.SslCertificate android.net.http.X509TrustManagerExtensions +android.net.lowpan.LowpanManager android.net.metrics.ApfProgramEvent android.net.metrics.ApfProgramEvent$1 android.net.metrics.ApfStats @@ -3113,6 +3153,7 @@ android.opengl.Visibility android.os.-$Lambda$-dncxFEc2F2bgG2fsIoC6FC6WNE android.os.-$Lambda$-dncxFEc2F2bgG2fsIoC6FC6WNE$1 android.os.-$Lambda$6x30vPJhBKUfNY8tswxuZo3DCe0 +android.os.-$Lambda$BcGBlsGjMZMF6Ej78rWJ608MYSM android.os.AsyncResult android.os.AsyncTask android.os.AsyncTask$1 @@ -3150,6 +3191,7 @@ android.os.BatteryStats$Uid android.os.BatteryStats$Uid$Pid android.os.BatteryStats$Uid$Pkg android.os.BatteryStats$Uid$Pkg$Serv +android.os.BatteryStats$Uid$Proc android.os.BatteryStats$Uid$Sensor android.os.BatteryStats$Uid$Wakelock android.os.Binder @@ -3269,6 +3311,7 @@ android.os.OperationCanceledException android.os.Parcel android.os.Parcel$1 android.os.Parcel$2 +android.os.Parcel$ReadWriteHelper android.os.ParcelFileDescriptor android.os.ParcelFileDescriptor$1 android.os.ParcelFileDescriptor$2 @@ -3283,6 +3326,7 @@ android.os.Parcelable android.os.Parcelable$ClassLoaderCreator android.os.Parcelable$Creator android.os.ParcelableException +android.os.ParcelableException$1 android.os.ParcelableParcel android.os.ParcelableParcel$1 android.os.PatternMatcher @@ -3324,7 +3368,10 @@ android.os.ServiceManager$ServiceNotFoundException android.os.ServiceManagerNative android.os.ServiceManagerProxy android.os.ServiceSpecificException +android.os.SharedMemory +android.os.SharedMemory$1 android.os.ShellCallback +android.os.ShellCallback$1 android.os.StatFs android.os.StrictMode android.os.StrictMode$1 @@ -3460,6 +3507,7 @@ android.printservice.PrintServiceInfo$1 android.printservice.recommendation.IRecommendationsChangeListener android.provider.-$Lambda$87WmhkvObehVg0OMBzwa_MTVV8g android.provider.-$Lambda$a7Jyr6j_Mb70hHJ2ssL1AAhKh4c +android.provider.-$Lambda$asz6VwQ86PPY-v8JLMb7rx-pSqg android.provider.BaseColumns android.provider.BlockedNumberContract android.provider.BlockedNumberContract$BlockedNumbers @@ -3832,6 +3880,7 @@ android.system.StructPasswd android.system.StructPollfd android.system.StructStat android.system.StructStatVfs +android.system.StructTimespec android.system.StructTimeval android.system.StructUcred android.system.StructUtsname @@ -3900,6 +3949,8 @@ android.telecom.TelecomManager android.telecom.VideoProfile android.telecom.VideoProfile$1 android.telephony.CarrierConfigManager +android.telephony.CellIdentityLte +android.telephony.CellIdentityLte$1 android.telephony.CellIdentityWcdma android.telephony.CellIdentityWcdma$1 android.telephony.CellInfo @@ -3907,10 +3958,13 @@ android.telephony.CellInfo$1 android.telephony.CellInfoCdma android.telephony.CellInfoGsm android.telephony.CellInfoLte +android.telephony.CellInfoLte$1 android.telephony.CellInfoWcdma android.telephony.CellInfoWcdma$1 android.telephony.CellLocation android.telephony.CellSignalStrength +android.telephony.CellSignalStrengthLte +android.telephony.CellSignalStrengthLte$1 android.telephony.CellSignalStrengthWcdma android.telephony.CellSignalStrengthWcdma$1 android.telephony.ClientRequestStats @@ -3948,6 +4002,7 @@ android.telephony.TelephonyManager$MultiSimVariants android.telephony.VisualVoicemailSmsFilterSettings android.telephony.VoLteServiceState android.telephony.VoLteServiceState$1 +android.telephony.euicc.EuiccManager android.telephony.gsm.GsmCellLocation android.telephony.ims.ImsServiceProxy$INotifyStatusChanged android.telephony.ims.ImsServiceProxyCompat @@ -4022,6 +4077,7 @@ android.text.TextDirectionHeuristics$TextDirectionHeuristicImpl android.text.TextDirectionHeuristics$TextDirectionHeuristicInternal android.text.TextDirectionHeuristics$TextDirectionHeuristicLocale android.text.TextLine +android.text.TextLine$DecorationInfo android.text.TextPaint android.text.TextUtils android.text.TextUtils$1 @@ -4087,6 +4143,7 @@ android.text.style.SpellCheckSpan android.text.style.StrikethroughSpan android.text.style.StyleSpan android.text.style.SuggestionSpan +android.text.style.SuggestionSpan$1 android.text.style.TabStopSpan android.text.style.TextAppearanceSpan android.text.style.TtsSpan @@ -4183,7 +4240,6 @@ android.util.Base64 android.util.Base64$Coder android.util.Base64$Decoder android.util.Base64$Encoder -android.util.TimingsTraceLog android.util.ByteStringUtils android.util.ContainerHelpers android.util.DebugUtils @@ -4209,6 +4265,7 @@ android.util.LocalLog$ReadOnlyLocalLog android.util.Log android.util.Log$1 android.util.Log$ImmediateLogWriter +android.util.Log$PreloadHolder android.util.Log$TerribleFailure android.util.Log$TerribleFailureHandler android.util.LogPrinter @@ -4259,6 +4316,7 @@ android.util.TimeFormatException android.util.TimeUtils android.util.TimedRemoteCaller android.util.TimingLogger +android.util.TimingsTraceLog android.util.TrustedTime android.util.TypedValue android.util.Xml @@ -4282,11 +4340,15 @@ android.view.-$Lambda$6k_RnLLpNi5zg27ubDxN4lDdBbk$1 android.view.-$Lambda$6k_RnLLpNi5zg27ubDxN4lDdBbk$2 android.view.-$Lambda$6k_RnLLpNi5zg27ubDxN4lDdBbk$3 android.view.-$Lambda$P6MTGFSudLpwrqb6oVD8FdorW1c +android.view.-$Lambda$XmA8Y30pNAdQP9ujRlGx1qfDHH8 android.view.-$Lambda$iU_USrtPm1XIm5H9QYQvXfBGDE4 android.view.-$Lambda$iU_USrtPm1XIm5H9QYQvXfBGDE4$1 android.view.AbsSavedState android.view.AbsSavedState$1 android.view.AbsSavedState$2 +android.view.AccessibilityInteractionController +android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher +android.view.AccessibilityInteractionController$PrivateHandler android.view.ActionMode android.view.ActionMode$Callback android.view.ActionMode$Callback2 @@ -4297,6 +4359,7 @@ android.view.AppTransitionAnimationSpec$1 android.view.Choreographer android.view.Choreographer$1 android.view.Choreographer$2 +android.view.Choreographer$3 android.view.Choreographer$CallbackQueue android.view.Choreographer$CallbackRecord android.view.Choreographer$FrameCallback @@ -4455,6 +4518,7 @@ android.view.SurfaceView$1 android.view.SurfaceView$2 android.view.SurfaceView$3 android.view.SurfaceView$4 +android.view.SurfaceView$SurfaceControlWithBackground android.view.TextureView android.view.TextureView$1 android.view.TextureView$SurfaceTextureListener @@ -4489,6 +4553,7 @@ android.view.View$DeclaredOnClickListener android.view.View$ForegroundInfo android.view.View$ListenerInfo android.view.View$MatchIdPredicate +android.view.View$MatchLabelForPredicate android.view.View$MeasureSpec android.view.View$OnApplyWindowInsetsListener android.view.View$OnAttachStateChangeListener @@ -4506,6 +4571,7 @@ android.view.View$OnSystemUiVisibilityChangeListener android.view.View$OnTouchListener android.view.View$PerformClick android.view.View$ScrollabilityCache +android.view.View$SendViewScrolledAccessibilityEvent android.view.View$TintInfo android.view.View$TooltipInfo android.view.View$TransformationInfo @@ -4546,6 +4612,7 @@ android.view.ViewRootImpl android.view.ViewRootImpl$1 android.view.ViewRootImpl$2 android.view.ViewRootImpl$4 +android.view.ViewRootImpl$AccessibilityInteractionConnection android.view.ViewRootImpl$AccessibilityInteractionConnectionManager android.view.ViewRootImpl$ActivityConfigCallback android.view.ViewRootImpl$AsyncInputStage @@ -4560,6 +4627,7 @@ android.view.ViewRootImpl$InvalidateOnAnimationRunnable android.view.ViewRootImpl$NativePostImeInputStage android.view.ViewRootImpl$NativePreImeInputStage android.view.ViewRootImpl$QueuedInputEvent +android.view.ViewRootImpl$SendWindowContentChangedAccessibilityEvent android.view.ViewRootImpl$SyntheticInputStage android.view.ViewRootImpl$SyntheticJoystickHandler android.view.ViewRootImpl$SyntheticKeyboardHandler @@ -4630,6 +4698,7 @@ android.view.WindowManagerPolicy$ScreenOnListener android.view.WindowManagerPolicy$StartingSurface android.view.WindowManagerPolicy$WindowManagerFuncs android.view.WindowManagerPolicy$WindowState +android.view.accessibility.-$Lambda$T3m_l9_RA18vCOcakSWp1lZCy5g$1 android.view.accessibility.AccessibilityEvent android.view.accessibility.AccessibilityEvent$1 android.view.accessibility.AccessibilityEventSource @@ -4641,6 +4710,7 @@ android.view.accessibility.AccessibilityManager$HighTextContrastChangeListener android.view.accessibility.AccessibilityManager$MyCallback android.view.accessibility.AccessibilityManager$TouchExplorationStateChangeListener android.view.accessibility.AccessibilityNodeInfo +android.view.accessibility.AccessibilityNodeInfo$1 android.view.accessibility.AccessibilityNodeInfo$AccessibilityAction android.view.accessibility.AccessibilityNodeProvider android.view.accessibility.AccessibilityRecord @@ -4653,6 +4723,8 @@ android.view.accessibility.IAccessibilityInteractionConnection android.view.accessibility.IAccessibilityInteractionConnection$Stub android.view.accessibility.IAccessibilityInteractionConnection$Stub$Proxy android.view.accessibility.IAccessibilityInteractionConnectionCallback +android.view.accessibility.IAccessibilityInteractionConnectionCallback$Stub +android.view.accessibility.IAccessibilityInteractionConnectionCallback$Stub$Proxy android.view.accessibility.IAccessibilityManager android.view.accessibility.IAccessibilityManager$Stub android.view.accessibility.IAccessibilityManager$Stub$Proxy @@ -4744,6 +4816,7 @@ android.view.textclassifier.TextClassificationManager android.view.textclassifier.TextClassifier android.view.textclassifier.TextClassifier$1 android.view.textclassifier.TextClassifierImpl +android.view.textclassifier.logging.SmartSelectionEventTracker android.view.textservice.SpellCheckerInfo android.view.textservice.SpellCheckerInfo$1 android.view.textservice.SpellCheckerSession @@ -4806,6 +4879,7 @@ android.webkit.WebViewFactory$MissingWebViewPackageException android.webkit.WebViewFactory$RelroFileCreator android.webkit.WebViewFactoryProvider android.webkit.WebViewFactoryProvider$Statics +android.webkit.WebViewLibraryLoader android.webkit.WebViewProvider android.webkit.WebViewProvider$ScrollDelegate android.webkit.WebViewProvider$ViewDelegate @@ -4995,6 +5069,7 @@ android.widget.PopupWindow$PopupDecorView android.widget.PopupWindow$PopupDecorView$1 android.widget.ProgressBar android.widget.ProgressBar$1 +android.widget.ProgressBar$AccessibilityEventSender android.widget.ProgressBar$ProgressTintInfo android.widget.ProgressBar$RefreshData android.widget.ProgressBar$RefreshProgressRunnable @@ -5013,6 +5088,7 @@ android.widget.RelativeLayout android.widget.RelativeLayout$DependencyGraph android.widget.RelativeLayout$DependencyGraph$Node android.widget.RelativeLayout$LayoutParams +android.widget.RelativeLayout$TopToBottomLeftToRightComparator android.widget.RemoteViews android.widget.RemoteViews$1 android.widget.RemoteViews$2 @@ -5054,7 +5130,9 @@ android.widget.SectionIndexer android.widget.SeekBar android.widget.SeekBar$OnSeekBarChangeListener android.widget.SelectionActionModeHelper +android.widget.SelectionActionModeHelper$SelectionMetricsLogger android.widget.SelectionActionModeHelper$SelectionTracker +android.widget.SelectionActionModeHelper$SelectionTracker$LogAbandonRunnable android.widget.SelectionActionModeHelper$TextClassificationHelper android.widget.SimpleCursorAdapter android.widget.Space @@ -5116,6 +5194,7 @@ android.widget.Toolbar$2 android.widget.Toolbar$ExpandedActionViewMenuPresenter android.widget.Toolbar$LayoutParams android.widget.Toolbar$OnMenuItemClickListener +android.widget.Toolbar$SavedState$1 android.widget.VideoView android.widget.ViewAnimator android.widget.ViewFlipper @@ -5242,6 +5321,7 @@ com.android.internal.app.IVoiceInteractionSessionShowCallback$Stub com.android.internal.app.IVoiceInteractor com.android.internal.app.IVoiceInteractor$Stub com.android.internal.app.NightDisplayController +com.android.internal.app.NightDisplayController$1 com.android.internal.app.NightDisplayController$Callback com.android.internal.app.ProcessMap com.android.internal.app.ResolverActivity @@ -5363,10 +5443,12 @@ com.android.internal.os.BatteryStatsImpl$Uid$2 com.android.internal.os.BatteryStatsImpl$Uid$3 com.android.internal.os.BatteryStatsImpl$Uid$Pkg com.android.internal.os.BatteryStatsImpl$Uid$Pkg$Serv +com.android.internal.os.BatteryStatsImpl$Uid$Proc com.android.internal.os.BatteryStatsImpl$Uid$Sensor com.android.internal.os.BatteryStatsImpl$Uid$Wakelock com.android.internal.os.BinderInternal com.android.internal.os.BinderInternal$GcWatcher +com.android.internal.os.ClassLoaderFactory com.android.internal.os.FuseAppLoop com.android.internal.os.FuseAppLoop$1 com.android.internal.os.FuseUnavailableMountException @@ -5401,6 +5483,7 @@ com.android.internal.os.RuntimeInit$1 com.android.internal.os.RuntimeInit$Arguments com.android.internal.os.RuntimeInit$KillApplicationHandler com.android.internal.os.RuntimeInit$LoggingHandler +com.android.internal.os.RuntimeInit$MethodAndArgsCaller com.android.internal.os.SamplingProfilerIntegration com.android.internal.os.SomeArgs com.android.internal.os.Zygote @@ -5420,6 +5503,7 @@ com.android.internal.policy.DividerSnapAlgorithm com.android.internal.policy.DividerSnapAlgorithm$SnapTarget com.android.internal.policy.DockedDividerUtils com.android.internal.policy.IKeyguardDismissCallback +com.android.internal.policy.IKeyguardDismissCallback$Stub com.android.internal.policy.IKeyguardDrawnCallback com.android.internal.policy.IKeyguardDrawnCallback$Stub com.android.internal.policy.IKeyguardDrawnCallback$Stub$Proxy @@ -5439,6 +5523,7 @@ com.android.internal.policy.PhoneWindow com.android.internal.policy.PhoneWindow$1 com.android.internal.policy.PhoneWindow$ActionMenuPresenterCallback com.android.internal.policy.PhoneWindow$PanelFeatureState +com.android.internal.policy.PhoneWindow$PanelFeatureState$SavedState$1 com.android.internal.policy.PhoneWindow$PhoneWindowMenuCallback com.android.internal.policy.PhoneWindow$RotationWatcher com.android.internal.policy.PhoneWindow$RotationWatcher$1 @@ -6154,9 +6239,12 @@ com.android.org.bouncycastle.crypto.generators.PKCS12ParametersGenerator com.android.org.bouncycastle.crypto.io.MacInputStream com.android.org.bouncycastle.crypto.macs.HMac com.android.org.bouncycastle.crypto.params.KeyParameter +com.android.org.bouncycastle.jcajce.provider.asymmetric.DH com.android.org.bouncycastle.jcajce.provider.asymmetric.DH$Mappings com.android.org.bouncycastle.jcajce.provider.asymmetric.DSA$Mappings +com.android.org.bouncycastle.jcajce.provider.asymmetric.EC com.android.org.bouncycastle.jcajce.provider.asymmetric.EC$Mappings +com.android.org.bouncycastle.jcajce.provider.asymmetric.RSA com.android.org.bouncycastle.jcajce.provider.asymmetric.RSA$Mappings com.android.org.bouncycastle.jcajce.provider.asymmetric.X509$Mappings com.android.org.bouncycastle.jcajce.provider.asymmetric.dh.KeyFactorySpi @@ -6239,9 +6327,12 @@ com.android.org.bouncycastle.util.Pack com.android.org.bouncycastle.util.Strings com.android.org.bouncycastle.util.Strings$1 com.android.org.bouncycastle.util.io.Streams +com.android.org.conscrypt.AbstractConscryptSocket +com.android.org.conscrypt.AbstractConscryptSocket$1 com.android.org.conscrypt.AbstractOpenSSLSession com.android.org.conscrypt.AbstractSessionContext com.android.org.conscrypt.AbstractSessionContext$1 +com.android.org.conscrypt.ActiveSession com.android.org.conscrypt.AddressUtils com.android.org.conscrypt.ArrayUtils com.android.org.conscrypt.ByteArray @@ -6250,7 +6341,13 @@ com.android.org.conscrypt.CertificatePriorityComparator com.android.org.conscrypt.ChainStrengthAnalyzer com.android.org.conscrypt.ClientSessionContext com.android.org.conscrypt.ClientSessionContext$HostAndPort +com.android.org.conscrypt.Conscrypt +com.android.org.conscrypt.ConscryptFileDescriptorSocket +com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream +com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLOutputStream com.android.org.conscrypt.CryptoUpcalls +com.android.org.conscrypt.DefaultSSLContextImpl +com.android.org.conscrypt.DelegatingExtendedSSLSession com.android.org.conscrypt.EvpMdRef$MD5 com.android.org.conscrypt.EvpMdRef$SHA1 com.android.org.conscrypt.EvpMdRef$SHA256 @@ -6258,6 +6355,7 @@ com.android.org.conscrypt.FileClientSessionCache com.android.org.conscrypt.FileClientSessionCache$CacheFile com.android.org.conscrypt.FileClientSessionCache$Impl com.android.org.conscrypt.Hex +com.android.org.conscrypt.InternalUtil com.android.org.conscrypt.JSSEProvider com.android.org.conscrypt.KeyManagerFactoryImpl com.android.org.conscrypt.KeyManagerImpl @@ -6271,6 +6369,7 @@ com.android.org.conscrypt.NativeRef$EVP_CIPHER_CTX com.android.org.conscrypt.NativeRef$EVP_MD_CTX com.android.org.conscrypt.NativeRef$EVP_PKEY com.android.org.conscrypt.NativeRef$HMAC_CTX +com.android.org.conscrypt.NativeRef$SSL_SESSION com.android.org.conscrypt.OpenSSLBIOInputStream com.android.org.conscrypt.OpenSSLCipher com.android.org.conscrypt.OpenSSLCipher$EVP_CIPHER @@ -6319,13 +6418,21 @@ com.android.org.conscrypt.OpenSSLX509CertificateFactory$1 com.android.org.conscrypt.OpenSSLX509CertificateFactory$2 com.android.org.conscrypt.OpenSSLX509CertificateFactory$Parser com.android.org.conscrypt.OpenSSLX509CertificateFactory$ParsingException +com.android.org.conscrypt.PeerInfoProvider +com.android.org.conscrypt.PeerInfoProvider$1 com.android.org.conscrypt.Platform +com.android.org.conscrypt.Preconditions com.android.org.conscrypt.SSLClientSessionCache com.android.org.conscrypt.SSLParametersImpl com.android.org.conscrypt.SSLParametersImpl$AliasChooser com.android.org.conscrypt.SSLParametersImpl$PSKCallbacks com.android.org.conscrypt.SSLUtils +com.android.org.conscrypt.SSLUtils$SessionType com.android.org.conscrypt.ServerSessionContext +com.android.org.conscrypt.SslSessionWrapper +com.android.org.conscrypt.SslSessionWrapper$Impl +com.android.org.conscrypt.SslSessionWrapper$Impl$1 +com.android.org.conscrypt.SslWrapper com.android.org.conscrypt.TrustManagerFactoryImpl com.android.org.conscrypt.TrustManagerImpl com.android.org.conscrypt.TrustManagerImpl$ExtendedKeyUsagePKIXCertPathChecker @@ -6412,6 +6519,7 @@ dalvik.system.CloseGuard$Reporter dalvik.system.CloseGuard$Tracker dalvik.system.DalvikLogHandler dalvik.system.DalvikLogging +dalvik.system.DelegateLastClassLoader dalvik.system.DexClassLoader dalvik.system.DexFile dalvik.system.DexFile$DFEnum @@ -6605,6 +6713,10 @@ java.lang.Package java.lang.Process java.lang.ProcessBuilder java.lang.ProcessEnvironment +java.lang.ProcessEnvironment$ExternalData +java.lang.ProcessEnvironment$StringEnvironment +java.lang.ProcessEnvironment$Value +java.lang.ProcessEnvironment$Variable java.lang.Readable java.lang.ReflectiveOperationException java.lang.Runnable @@ -6645,6 +6757,9 @@ java.lang.Throwable$WrappedPrintStream java.lang.Throwable$WrappedPrintWriter java.lang.TypeNotPresentException java.lang.UNIXProcess +java.lang.UNIXProcess$1 +java.lang.UNIXProcess$ProcessReaperThreadFactory +java.lang.UNIXProcess$ProcessReaperThreadFactory$1 java.lang.UnsatisfiedLinkError java.lang.UnsupportedOperationException java.lang.VMClassLoader @@ -6670,9 +6785,25 @@ java.lang.invoke.MethodType java.lang.invoke.MethodType$ConcurrentWeakInternSet java.lang.invoke.MethodType$ConcurrentWeakInternSet$WeakEntry java.lang.invoke.MethodTypeForm +java.lang.invoke.Transformers$AlwaysThrow java.lang.invoke.Transformers$BindTo +java.lang.invoke.Transformers$CatchException +java.lang.invoke.Transformers$CollectArguments java.lang.invoke.Transformers$Collector +java.lang.invoke.Transformers$Constant java.lang.invoke.Transformers$Construct +java.lang.invoke.Transformers$DropArguments +java.lang.invoke.Transformers$ExplicitCastArguments +java.lang.invoke.Transformers$FilterArguments +java.lang.invoke.Transformers$FilterReturnValue +java.lang.invoke.Transformers$FoldArguments +java.lang.invoke.Transformers$GuardWithTest +java.lang.invoke.Transformers$InsertArguments +java.lang.invoke.Transformers$Invoker +java.lang.invoke.Transformers$PermuteArguments +java.lang.invoke.Transformers$ReferenceArrayElementGetter +java.lang.invoke.Transformers$ReferenceArrayElementSetter +java.lang.invoke.Transformers$ReferenceIdentity java.lang.invoke.Transformers$Spreader java.lang.invoke.Transformers$Transformer java.lang.invoke.Transformers$VarargsCollector @@ -7059,12 +7190,14 @@ java.text.RuleBasedCollator java.text.SimpleDateFormat java.text.StringCharacterIterator java.time.DateTimeException +java.time.format.DateTimeParseException java.util.-$Lambda$4EqhxufgNKat19m0CB0-toH_lzo java.util.-$Lambda$4EqhxufgNKat19m0CB0-toH_lzo$1 java.util.-$Lambda$4EqhxufgNKat19m0CB0-toH_lzo$2 java.util.-$Lambda$4EqhxufgNKat19m0CB0-toH_lzo$3 java.util.-$Lambda$4EqhxufgNKat19m0CB0-toH_lzo$4 java.util.-$Lambda$4EqhxufgNKat19m0CB0-toH_lzo$5 +java.util.-$Lambda$Hazqao1eYCE_pmZR5Jlrc2GvLhk java.util.-$Lambda$aUGKT4ItCOku5-JSG-x8Aqj2pJw java.util.-$Lambda$aUGKT4ItCOku5-JSG-x8Aqj2pJw$1 java.util.-$Lambda$aUGKT4ItCOku5-JSG-x8Aqj2pJw$2 @@ -7603,8 +7736,12 @@ java.util.logging.SimpleFormatter java.util.logging.StreamHandler java.util.logging.XMLFormatter java.util.prefs.AbstractPreferences +java.util.prefs.BackingStoreException java.util.prefs.FileSystemPreferences +java.util.prefs.FileSystemPreferences$1 +java.util.prefs.FileSystemPreferencesFactory java.util.prefs.Preferences +java.util.prefs.PreferencesFactory java.util.regex.MatchResult java.util.regex.Matcher java.util.regex.Matcher$OffsetBasedMatchResult @@ -7752,6 +7889,7 @@ javax.crypto.NoSuchPaddingException javax.crypto.NullCipher javax.crypto.SecretKey javax.crypto.ShortBufferException +javax.crypto.spec.GCMParameterSpec javax.crypto.spec.IvParameterSpec javax.crypto.spec.OAEPParameterSpec javax.crypto.spec.PBEParameterSpec @@ -8358,6 +8496,7 @@ sun.security.action.GetPropertyAction sun.security.jca.GetInstance sun.security.jca.GetInstance$Instance sun.security.jca.JCAUtil +sun.security.jca.JCAUtil$CachedSecureRandomHolder sun.security.jca.ProviderConfig sun.security.jca.ProviderConfig$2 sun.security.jca.ProviderList @@ -8493,8 +8632,10 @@ sun.util.calendar.BaseCalendar$Date sun.util.calendar.CalendarDate sun.util.calendar.CalendarSystem sun.util.calendar.CalendarUtils +sun.util.calendar.Era sun.util.calendar.Gregorian sun.util.calendar.Gregorian$Date +sun.util.calendar.ImmutableGregorianDate sun.util.calendar.JulianCalendar sun.util.calendar.LocalGregorianCalendar sun.util.locale.BaseLocale diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java index bf0a264b49ed..5785619dcb9f 100644 --- a/core/java/android/os/BatteryStats.java +++ b/core/java/android/os/BatteryStats.java @@ -3054,71 +3054,104 @@ public abstract class BatteryStats implements Parcelable { final long idleTimeMs = counter.getIdleTimeCounter().getCountLocked(which); final long rxTimeMs = counter.getRxTimeCounter().getCountLocked(which); final long powerDrainMaMs = counter.getPowerCounter().getCountLocked(which); + // Battery real time + final long totalControllerActivityTimeMs + = computeBatteryRealtime(SystemClock.elapsedRealtime() * 1000, which) / 1000; long totalTxTimeMs = 0; for (LongCounter txState : counter.getTxTimeCounters()) { totalTxTimeMs += txState.getCountLocked(which); } + final long sleepTimeMs + = totalControllerActivityTimeMs - (idleTimeMs + rxTimeMs + totalTxTimeMs); - final long totalTimeMs = idleTimeMs + rxTimeMs + totalTxTimeMs; + sb.setLength(0); + sb.append(prefix); + sb.append(" "); + sb.append(controllerName); + sb.append(" Sleep time: "); + formatTimeMs(sb, sleepTimeMs); + sb.append("("); + sb.append(formatRatioLocked(sleepTimeMs, totalControllerActivityTimeMs)); + sb.append(")"); + pw.println(sb.toString()); sb.setLength(0); sb.append(prefix); - sb.append(" "); + sb.append(" "); sb.append(controllerName); sb.append(" Idle time: "); formatTimeMs(sb, idleTimeMs); sb.append("("); - sb.append(formatRatioLocked(idleTimeMs, totalTimeMs)); + sb.append(formatRatioLocked(idleTimeMs, totalControllerActivityTimeMs)); sb.append(")"); pw.println(sb.toString()); sb.setLength(0); sb.append(prefix); - sb.append(" "); + sb.append(" "); sb.append(controllerName); sb.append(" Rx time: "); formatTimeMs(sb, rxTimeMs); sb.append("("); - sb.append(formatRatioLocked(rxTimeMs, totalTimeMs)); + sb.append(formatRatioLocked(rxTimeMs, totalControllerActivityTimeMs)); sb.append(")"); pw.println(sb.toString()); sb.setLength(0); sb.append(prefix); - sb.append(" "); + sb.append(" "); sb.append(controllerName); sb.append(" Tx time: "); - formatTimeMs(sb, totalTxTimeMs); - sb.append("("); - sb.append(formatRatioLocked(totalTxTimeMs, totalTimeMs)); - sb.append(")"); - pw.println(sb.toString()); - final int numTxLvls = counter.getTxTimeCounters().length; + String [] powerLevel; + switch(controllerName) { + case "Cellular": + powerLevel = new String[] { + " less than 0dBm: ", + " 0dBm to 8dBm: ", + " 8dBm to 15dBm: ", + " 15dBm to 20dBm: ", + " above 20dBm: "}; + break; + default: + powerLevel = new String[] {"[0]", "[1]", "[2]", "[3]", "[4]"}; + break; + } + final int numTxLvls = Math.min(counter.getTxTimeCounters().length, powerLevel.length); if (numTxLvls > 1) { + pw.println(sb.toString()); for (int lvl = 0; lvl < numTxLvls; lvl++) { final long txLvlTimeMs = counter.getTxTimeCounters()[lvl].getCountLocked(which); sb.setLength(0); sb.append(prefix); - sb.append(" ["); - sb.append(lvl); - sb.append("] "); + sb.append(" "); + sb.append(powerLevel[lvl]); + sb.append(" "); formatTimeMs(sb, txLvlTimeMs); sb.append("("); - sb.append(formatRatioLocked(txLvlTimeMs, totalTxTimeMs)); + sb.append(formatRatioLocked(txLvlTimeMs, totalControllerActivityTimeMs)); sb.append(")"); pw.println(sb.toString()); } + } else { + final long txLvlTimeMs = counter.getTxTimeCounters()[0].getCountLocked(which); + formatTimeMs(sb, txLvlTimeMs); + sb.append("("); + sb.append(formatRatioLocked(txLvlTimeMs, totalControllerActivityTimeMs)); + sb.append(")"); + pw.println(sb.toString()); } - sb.setLength(0); - sb.append(prefix); - sb.append(" "); - sb.append(controllerName); - sb.append(" Power drain: ").append( + if (powerDrainMaMs > 0) { + sb.setLength(0); + sb.append(prefix); + sb.append(" "); + sb.append(controllerName); + sb.append(" Battery drain: ").append( BatteryStatsHelper.makemAh(powerDrainMaMs / (double) (1000*60*60))); - sb.append("mAh"); - pw.println(sb.toString()); + sb.append("mAh"); + pw.println(sb.toString()); + } } /** @@ -4186,51 +4219,50 @@ public abstract class BatteryStats implements Parcelable { pw.println(sb.toString()); } + pw.println(""); pw.print(prefix); - pw.print(" Mobile total received: "); pw.print(formatBytesLocked(mobileRxTotalBytes)); - pw.print(", sent: "); pw.print(formatBytesLocked(mobileTxTotalBytes)); - pw.print(" (packets received "); pw.print(mobileRxTotalPackets); - pw.print(", sent "); pw.print(mobileTxTotalPackets); pw.println(")"); sb.setLength(0); sb.append(prefix); - sb.append(" Phone signal levels:"); - didOne = false; - for (int i=0; i<SignalStrength.NUM_SIGNAL_STRENGTH_BINS; i++) { - final long time = getPhoneSignalStrengthTime(i, rawRealtime, which); - if (time == 0) { - continue; - } - sb.append("\n "); - sb.append(prefix); - didOne = true; - sb.append(SignalStrength.SIGNAL_STRENGTH_NAMES[i]); - sb.append(" "); - formatTimeMs(sb, time/1000); - sb.append("("); - sb.append(formatRatioLocked(time, whichBatteryRealtime)); - sb.append(") "); - sb.append(getPhoneSignalStrengthCount(i, which)); - sb.append("x"); - } - if (!didOne) sb.append(" (no activity)"); + sb.append(" CONNECTIVITY POWER SUMMARY START"); + pw.println(sb.toString()); + + pw.print(prefix); + sb.setLength(0); + sb.append(prefix); + sb.append(" Logging duration for connectivity statistics: "); + formatTimeMs(sb, whichBatteryRealtime / 1000); + pw.println(sb.toString()); + + sb.setLength(0); + sb.append(prefix); + sb.append(" Cellular Statistics:"); pw.println(sb.toString()); + pw.print(prefix); sb.setLength(0); sb.append(prefix); - sb.append(" Signal scanning time: "); - formatTimeMsNoSpace(sb, getPhoneSignalScanningTime(rawRealtime, which) / 1000); + sb.append(" Cellular kernel active time: "); + final long mobileActiveTime = getMobileRadioActiveTime(rawRealtime, which); + formatTimeMs(sb, mobileActiveTime / 1000); + sb.append("("); sb.append(formatRatioLocked(mobileActiveTime, whichBatteryRealtime)); + sb.append(")"); pw.println(sb.toString()); + pw.print(" Cellular data received: "); pw.println(formatBytesLocked(mobileRxTotalBytes)); + pw.print(" Cellular data sent: "); pw.println(formatBytesLocked(mobileTxTotalBytes)); + pw.print(" Cellular packets received: "); pw.println(mobileRxTotalPackets); + pw.print(" Cellular packets sent: "); pw.println(mobileTxTotalPackets); + sb.setLength(0); sb.append(prefix); - sb.append(" Radio types:"); + sb.append(" Cellular Radio Access Technology:"); didOne = false; for (int i=0; i<NUM_DATA_CONNECTION_TYPES; i++) { final long time = getPhoneDataConnectionTime(i, rawRealtime, which); if (time == 0) { continue; } - sb.append("\n "); + sb.append("\n "); sb.append(prefix); didOne = true; sb.append(DATA_CONNECTION_NAMES[i]); @@ -4239,73 +4271,64 @@ public abstract class BatteryStats implements Parcelable { sb.append("("); sb.append(formatRatioLocked(time, whichBatteryRealtime)); sb.append(") "); - sb.append(getPhoneDataConnectionCount(i, which)); - sb.append("x"); } if (!didOne) sb.append(" (no activity)"); pw.println(sb.toString()); sb.setLength(0); sb.append(prefix); - sb.append(" Mobile radio active time: "); - final long mobileActiveTime = getMobileRadioActiveTime(rawRealtime, which); - formatTimeMs(sb, mobileActiveTime / 1000); - sb.append("("); sb.append(formatRatioLocked(mobileActiveTime, whichBatteryRealtime)); - sb.append(") "); sb.append(getMobileRadioActiveCount(which)); - sb.append("x"); - pw.println(sb.toString()); - - final long mobileActiveUnknownTime = getMobileRadioActiveUnknownTime(which); - if (mobileActiveUnknownTime != 0) { - sb.setLength(0); - sb.append(prefix); - sb.append(" Mobile radio active unknown time: "); - formatTimeMs(sb, mobileActiveUnknownTime / 1000); - sb.append("("); - sb.append(formatRatioLocked(mobileActiveUnknownTime, whichBatteryRealtime)); - sb.append(") "); sb.append(getMobileRadioActiveUnknownCount(which)); - sb.append("x"); - pw.println(sb.toString()); - } - - final long mobileActiveAdjustedTime = getMobileRadioActiveAdjustedTime(which); - if (mobileActiveAdjustedTime != 0) { - sb.setLength(0); + sb.append(" Cellular Rx signal strength (RSRP):"); + final String[] cellularRxSignalStrengthDescription = new String[]{ + "very poor (less than -128dBm): ", + "poor (-128dBm to -118dBm): ", + "moderate (-118dBm to -108dBm): ", + "good (-108dBm to -98dBm): ", + "great (greater than -98dBm): "}; + didOne = false; + final int numCellularRxBins = Math.min(SignalStrength.NUM_SIGNAL_STRENGTH_BINS, + cellularRxSignalStrengthDescription.length); + for (int i=0; i<numCellularRxBins; i++) { + final long time = getPhoneSignalStrengthTime(i, rawRealtime, which); + if (time == 0) { + continue; + } + sb.append("\n "); sb.append(prefix); - sb.append(" Mobile radio active adjusted time: "); - formatTimeMs(sb, mobileActiveAdjustedTime / 1000); + didOne = true; + sb.append(cellularRxSignalStrengthDescription[i]); + sb.append(" "); + formatTimeMs(sb, time/1000); sb.append("("); - sb.append(formatRatioLocked(mobileActiveAdjustedTime, whichBatteryRealtime)); - sb.append(")"); - pw.println(sb.toString()); + sb.append(formatRatioLocked(time, whichBatteryRealtime)); + sb.append(") "); } + if (!didOne) sb.append(" (no activity)"); + pw.println(sb.toString()); - printControllerActivity(pw, sb, prefix, "Radio", getModemControllerActivity(), which); + printControllerActivity(pw, sb, prefix, "Cellular", + getModemControllerActivity(), which); pw.print(prefix); - pw.print(" Wi-Fi total received: "); pw.print(formatBytesLocked(wifiRxTotalBytes)); - pw.print(", sent: "); pw.print(formatBytesLocked(wifiTxTotalBytes)); - pw.print(" (packets received "); pw.print(wifiRxTotalPackets); - pw.print(", sent "); pw.print(wifiTxTotalPackets); pw.println(")"); sb.setLength(0); sb.append(prefix); - sb.append(" Wifi on: "); formatTimeMs(sb, wifiOnTime / 1000); - sb.append("("); sb.append(formatRatioLocked(wifiOnTime, whichBatteryRealtime)); - sb.append("), Wifi running: "); formatTimeMs(sb, wifiRunningTime / 1000); - sb.append("("); sb.append(formatRatioLocked(wifiRunningTime, whichBatteryRealtime)); - sb.append(")"); + sb.append(" Wifi Statistics:"); pw.println(sb.toString()); + pw.print(" Wifi data received: "); pw.println(formatBytesLocked(wifiRxTotalBytes)); + pw.print(" Wifi data sent: "); pw.println(formatBytesLocked(wifiTxTotalBytes)); + pw.print(" Wifi packets received: "); pw.println(wifiRxTotalPackets); + pw.print(" Wifi packets sent: "); pw.println(wifiTxTotalPackets); + sb.setLength(0); sb.append(prefix); - sb.append(" Wifi states:"); + sb.append(" Wifi states:"); didOne = false; for (int i=0; i<NUM_WIFI_STATES; i++) { final long time = getWifiStateTime(i, rawRealtime, which); if (time == 0) { continue; } - sb.append("\n "); + sb.append("\n "); didOne = true; sb.append(WIFI_STATE_NAMES[i]); sb.append(" "); @@ -4313,22 +4336,20 @@ public abstract class BatteryStats implements Parcelable { sb.append("("); sb.append(formatRatioLocked(time, whichBatteryRealtime)); sb.append(") "); - sb.append(getWifiStateCount(i, which)); - sb.append("x"); } if (!didOne) sb.append(" (no activity)"); pw.println(sb.toString()); sb.setLength(0); sb.append(prefix); - sb.append(" Wifi supplicant states:"); + sb.append(" Wifi supplicant states:"); didOne = false; for (int i=0; i<NUM_WIFI_SUPPL_STATES; i++) { final long time = getWifiSupplStateTime(i, rawRealtime, which); if (time == 0) { continue; } - sb.append("\n "); + sb.append("\n "); didOne = true; sb.append(WIFI_SUPPL_STATE_NAMES[i]); sb.append(" "); @@ -4336,17 +4357,23 @@ public abstract class BatteryStats implements Parcelable { sb.append("("); sb.append(formatRatioLocked(time, whichBatteryRealtime)); sb.append(") "); - sb.append(getWifiSupplStateCount(i, which)); - sb.append("x"); } if (!didOne) sb.append(" (no activity)"); pw.println(sb.toString()); sb.setLength(0); sb.append(prefix); - sb.append(" Wifi signal levels:"); + sb.append(" Wifi Rx signal strength (RSSI):"); + final String[] wifiRxSignalStrengthDescription = new String[]{ + "very poor (less than -88.75dBm): ", + "poor (-88.75 to -77.5dBm): ", + "moderate (-77.5dBm to -66.25dBm): ", + "good (-66.25dBm to -55dBm): ", + "great (greater than -55dBm): "}; didOne = false; - for (int i=0; i<NUM_WIFI_SIGNAL_STRENGTH_BINS; i++) { + final int numWifiRxBins = Math.min(NUM_WIFI_SIGNAL_STRENGTH_BINS, + wifiRxSignalStrengthDescription.length); + for (int i=0; i<numWifiRxBins; i++) { final long time = getWifiSignalStrengthTime(i, rawRealtime, which); if (time == 0) { continue; @@ -4354,15 +4381,12 @@ public abstract class BatteryStats implements Parcelable { sb.append("\n "); sb.append(prefix); didOne = true; - sb.append("level("); - sb.append(i); - sb.append(") "); + sb.append(" "); + sb.append(wifiRxSignalStrengthDescription[i]); formatTimeMs(sb, time/1000); sb.append("("); sb.append(formatRatioLocked(time, whichBatteryRealtime)); sb.append(") "); - sb.append(getWifiSignalStrengthCount(i, which)); - sb.append("x"); } if (!didOne) sb.append(" (no activity)"); pw.println(sb.toString()); @@ -4370,6 +4394,13 @@ public abstract class BatteryStats implements Parcelable { printControllerActivity(pw, sb, prefix, "WiFi", getWifiControllerActivity(), which); pw.print(prefix); + sb.setLength(0); + sb.append(prefix); + sb.append(" CONNECTIVITY POWER SUMMARY END"); + pw.println(sb.toString()); + pw.println(""); + + pw.print(prefix); pw.print(" Bluetooth total received: "); pw.print(formatBytesLocked(btRxTotalBytes)); pw.print(", sent: "); pw.println(formatBytesLocked(btTxTotalBytes)); diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java index b46c6b1620b1..017c2134f288 100644 --- a/core/java/android/os/Debug.java +++ b/core/java/android/os/Debug.java @@ -1748,22 +1748,26 @@ public final class Debug public static final int MEMINFO_SHMEM = 4; /** @hide */ public static final int MEMINFO_SLAB = 5; + /** @hide */ + public static final int MEMINFO_SLAB_RECLAIMABLE = 6; + /** @hide */ + public static final int MEMINFO_SLAB_UNRECLAIMABLE = 7; /** @hide */ - public static final int MEMINFO_SWAP_TOTAL = 6; + public static final int MEMINFO_SWAP_TOTAL = 8; /** @hide */ - public static final int MEMINFO_SWAP_FREE = 7; + public static final int MEMINFO_SWAP_FREE = 9; /** @hide */ - public static final int MEMINFO_ZRAM_TOTAL = 8; + public static final int MEMINFO_ZRAM_TOTAL = 10; /** @hide */ - public static final int MEMINFO_MAPPED = 9; + public static final int MEMINFO_MAPPED = 11; /** @hide */ - public static final int MEMINFO_VM_ALLOC_USED = 10; + public static final int MEMINFO_VM_ALLOC_USED = 12; /** @hide */ - public static final int MEMINFO_PAGE_TABLES = 11; + public static final int MEMINFO_PAGE_TABLES = 13; /** @hide */ - public static final int MEMINFO_KERNEL_STACK = 12; + public static final int MEMINFO_KERNEL_STACK = 14; /** @hide */ - public static final int MEMINFO_COUNT = 13; + public static final int MEMINFO_COUNT = 15; /** * Retrieves /proc/meminfo. outSizes is filled with fields diff --git a/core/java/android/preference/SeekBarVolumizer.java b/core/java/android/preference/SeekBarVolumizer.java index ee8eed1906f4..3d2e1d1f1d24 100644 --- a/core/java/android/preference/SeekBarVolumizer.java +++ b/core/java/android/preference/SeekBarVolumizer.java @@ -206,8 +206,7 @@ public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callba try { mRingtone.setAudioAttributes(new AudioAttributes.Builder(mRingtone .getAudioAttributes()) - .setFlags(AudioAttributes.FLAG_BYPASS_INTERRUPTION_POLICY | - AudioAttributes.FLAG_BYPASS_MUTE) + .setFlags(AudioAttributes.FLAG_BYPASS_MUTE) .build()); mRingtone.play(); } catch (Throwable e) { diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index c04e016bf4d5..a248bf79f2a6 100755 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -9530,6 +9530,22 @@ public final class Settings { public static final String DEVICE_POLICY_CONSTANTS = "device_policy_constants"; /** + * TextClassifier specific settings. + * This is encoded as a key=value list, separated by commas. Ex: + * + * <pre> + * smart_selection_dark_launch (boolean) + * smart_selection_enabled_for_edit_text (boolean) + * </pre> + * + * <p> + * Type: string + * @hide + * see also android.view.textclassifier.TextClassifierConstants + */ + public static final String TEXT_CLASSIFIER_CONSTANTS = "text_classifier_constants"; + + /** * Get the key that retrieves a bluetooth headset's priority. * @hide */ diff --git a/core/java/android/service/autofill/AutofillService.java b/core/java/android/service/autofill/AutofillService.java index 1521e7e656a1..14e9904133bd 100644 --- a/core/java/android/service/autofill/AutofillService.java +++ b/core/java/android/service/autofill/AutofillService.java @@ -365,6 +365,81 @@ import com.android.internal.os.SomeArgs; * <p><b>Note:</b> The autofill service could also whitelist well-known browser apps and skip the * verifications above, as long as the service can verify the authenticity of the browser app by * checking its signing certificate. + * + * <a name="MultipleStepsSave"></a> + * <h3>Saving when data is split in multiple screens</h3> + * + * Apps often split the user data in multiple screens in the same activity, specially in + * activities used to create a new user account. For example, the first screen asks for a username, + * and if the username is available, it moves to a second screen, which asks for a password. + * + * <p>It's tricky to handle save for autofill in these situations, because the autofill service must + * wait until the user enters both fields before the autofill save UI can be shown. But it can be + * done by following the steps below: + * + * <ol> + * <li>In the first + * {@link #onFillRequest(FillRequest, CancellationSignal, FillCallback) fill request}, the service + * adds a {@link FillResponse.Builder#setClientState(android.os.Bundle) client state bundle} in + * the response, containing the autofill ids of the partial fields present in the screen. + * <li>In the second + * {@link #onFillRequest(FillRequest, CancellationSignal, FillCallback) fill request}, the service + * retrieves the {@link FillRequest#getClientState() client state bundle}, gets the autofill ids + * set in the previous request from the client state, and adds these ids and the + * {@link SaveInfo#FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE} to the {@link SaveInfo} used in the second + * response. + * <li>In the {@link #onSaveRequest(SaveRequest, SaveCallback) save request}, the service uses the + * proper {@link FillContext fill contexts} to get the value of each field (there is one fill + * context per fill request). + * </ol> + * + * <p>For example, in an app that uses 2 steps for the username and password fields, the workflow + * would be: + * <pre class="prettyprint"> + * // On first fill request + * AutofillId usernameId = // parse from AssistStructure; + * Bundle clientState = new Bundle(); + * clientState.putParcelable("usernameId", usernameId); + * fillCallback.onSuccess( + * new FillResponse.Builder() + * .setClientState(clientState) + * .setSaveInfo(new SaveInfo + * .Builder(SaveInfo.SAVE_DATA_TYPE_USERNAME, new AutofillId[] {usernameId}) + * .build()) + * .build()); + * + * // On second fill request + * Bundle clientState = fillRequest.getClientState(); + * AutofillId usernameId = clientState.getParcelable("usernameId"); + * AutofillId passwordId = // parse from AssistStructure + * clientState.putParcelable("passwordId", passwordId); + * fillCallback.onSuccess( + * new FillResponse.Builder() + * .setClientState(clientState) + * .setSaveInfo(new SaveInfo + * .Builder(SaveInfo.SAVE_DATA_TYPE_USERNAME | SaveInfo.SAVE_DATA_TYPE_PASSWORD, + * new AutofillId[] {usernameId, passwordId}) + * .setFlags(SaveInfo.FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE) + * .build()) + * .build()); + * + * // On save request + * Bundle clientState = saveRequest.getClientState(); + * AutofillId usernameId = clientState.getParcelable("usernameId"); + * AutofillId passwordId = clientState.getParcelable("passwordId"); + * List<FillContext> fillContexts = saveRequest.getFillContexts(); + * + * FillContext usernameContext = fillContexts.get(0); + * ViewNode usernameNode = findNodeByAutofillId(usernameContext.getStructure(), usernameId); + * AutofillValue username = usernameNode.getAutofillValue().getTextValue().toString(); + * + * FillContext passwordContext = fillContexts.get(1); + * ViewNode passwordNode = findNodeByAutofillId(passwordContext.getStructure(), passwordId); + * AutofillValue password = passwordNode.getAutofillValue().getTextValue().toString(); + * + * save(username, password); + * + * </pre> */ public abstract class AutofillService extends Service { private static final String TAG = "AutofillService"; diff --git a/core/java/android/view/WindowManagerInternal.java b/core/java/android/view/WindowManagerInternal.java index 98f8dc8e3a6d..97dff6a860b9 100644 --- a/core/java/android/view/WindowManagerInternal.java +++ b/core/java/android/view/WindowManagerInternal.java @@ -225,9 +225,6 @@ public abstract class WindowManagerInternal { */ public abstract boolean isKeyguardLocked(); - /** @return {@code true} if the keyguard is going away. */ - public abstract boolean isKeyguardGoingAway(); - /** * @return Whether the keyguard is showing and not occluded. */ diff --git a/core/java/android/view/accessibility/AccessibilityCache.java b/core/java/android/view/accessibility/AccessibilityCache.java index 0f21c5c85f4b..d7851171cd67 100644 --- a/core/java/android/view/accessibility/AccessibilityCache.java +++ b/core/java/android/view/accessibility/AccessibilityCache.java @@ -329,8 +329,6 @@ public final class AccessibilityCache { final long oldParentId = oldInfo.getParentNodeId(); if (info.getParentNodeId() != oldParentId) { clearSubTreeLocked(windowId, oldParentId); - } else { - oldInfo.recycle(); } } diff --git a/core/java/android/view/textclassifier/TextClassifier.java b/core/java/android/view/textclassifier/TextClassifier.java index bb1e693fbf43..c3601d9d32be 100644 --- a/core/java/android/view/textclassifier/TextClassifier.java +++ b/core/java/android/view/textclassifier/TextClassifier.java @@ -152,4 +152,12 @@ public interface TextClassifier { */ @WorkerThread default void logEvent(String source, String event) {} + + /** + * Returns this TextClassifier's settings. + * @hide + */ + default TextClassifierConstants getSettings() { + return TextClassifierConstants.DEFAULT; + } } diff --git a/core/java/android/view/textclassifier/TextClassifierConstants.java b/core/java/android/view/textclassifier/TextClassifierConstants.java new file mode 100644 index 000000000000..51e6168e9aa5 --- /dev/null +++ b/core/java/android/view/textclassifier/TextClassifierConstants.java @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2017 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.view.textclassifier; + +import android.annotation.Nullable; +import android.util.KeyValueListParser; +import android.util.Slog; + +/** + * TextClassifier specific settings. + * This is encoded as a key=value list, separated by commas. Ex: + * + * <pre> + * smart_selection_dark_launch (boolean) + * smart_selection_enabled_for_edit_text (boolean) + * </pre> + * + * <p> + * Type: string + * see also android.provider.Settings.Global.TEXT_CLASSIFIER_CONSTANTS + * + * Example of setting the values for testing. + * adb shell settings put global text_classifier_constants smart_selection_dark_launch=true,smart_selection_enabled_for_edit_text=true + * @hide + */ +public final class TextClassifierConstants { + + private static final String LOG_TAG = "TextClassifierConstants"; + + private static final String SMART_SELECTION_DARK_LAUNCH = + "smart_selection_dark_launch"; + private static final String SMART_SELECTION_ENABLED_FOR_EDIT_TEXT = + "smart_selection_enabled_for_edit_text"; + + private static final boolean SMART_SELECTION_DARK_LAUNCH_DEFAULT = false; + private static final boolean SMART_SELECTION_ENABLED_FOR_EDIT_TEXT_DEFAULT = true; + + /** Default settings. */ + static final TextClassifierConstants DEFAULT = new TextClassifierConstants(); + + private final boolean mDarkLaunch; + private final boolean mSuggestSelectionEnabledForEditableText; + + private TextClassifierConstants() { + mDarkLaunch = SMART_SELECTION_DARK_LAUNCH_DEFAULT; + mSuggestSelectionEnabledForEditableText = SMART_SELECTION_ENABLED_FOR_EDIT_TEXT_DEFAULT; + } + + private TextClassifierConstants(@Nullable String settings) { + final KeyValueListParser parser = new KeyValueListParser(','); + try { + parser.setString(settings); + } catch (IllegalArgumentException e) { + // Failed to parse the settings string, log this and move on with defaults. + Slog.e(LOG_TAG, "Bad TextClassifier settings: " + settings); + } + mDarkLaunch = parser.getBoolean( + SMART_SELECTION_DARK_LAUNCH, + SMART_SELECTION_DARK_LAUNCH_DEFAULT); + mSuggestSelectionEnabledForEditableText = parser.getBoolean( + SMART_SELECTION_ENABLED_FOR_EDIT_TEXT, + SMART_SELECTION_ENABLED_FOR_EDIT_TEXT_DEFAULT); + } + + static TextClassifierConstants loadFromString(String settings) { + return new TextClassifierConstants(settings); + } + + public boolean isDarkLaunch() { + return mDarkLaunch; + } + + public boolean isSuggestSelectionEnabledForEditableText() { + return mSuggestSelectionEnabledForEditableText; + } +} diff --git a/core/java/android/view/textclassifier/TextClassifierImpl.java b/core/java/android/view/textclassifier/TextClassifierImpl.java index 7e93b78c4809..2e41404dde0a 100644 --- a/core/java/android/view/textclassifier/TextClassifierImpl.java +++ b/core/java/android/view/textclassifier/TextClassifierImpl.java @@ -24,11 +24,11 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.graphics.drawable.Drawable; -import android.icu.text.BreakIterator; import android.net.Uri; import android.os.LocaleList; import android.os.ParcelFileDescriptor; import android.provider.Browser; +import android.provider.Settings; import android.text.Spannable; import android.text.TextUtils; import android.text.method.WordIterator; @@ -46,6 +46,7 @@ import com.android.internal.util.Preconditions; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; +import java.text.BreakIterator; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -90,6 +91,8 @@ final class TextClassifierImpl implements TextClassifier { @GuardedBy("mSmartSelectionLock") // Do not access outside this lock. private SmartSelection mSmartSelection; + private TextClassifierConstants mSettings; + TextClassifierImpl(Context context) { mContext = Preconditions.checkNotNull(context); } @@ -188,6 +191,15 @@ final class TextClassifierImpl implements TextClassifier { } } + @Override + public TextClassifierConstants getSettings() { + if (mSettings == null) { + mSettings = TextClassifierConstants.loadFromString(Settings.Global.getString( + mContext.getContentResolver(), Settings.Global.TEXT_CLASSIFIER_CONSTANTS)); + } + return mSettings; + } + private SmartSelection getSmartSelection(LocaleList localeList) throws FileNotFoundException { synchronized (mSmartSelectionLock) { localeList = localeList == null ? LocaleList.getEmptyLocaleList() : localeList; diff --git a/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java b/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java index aa172f9893f1..fb870bd3b9bd 100644 --- a/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java +++ b/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java @@ -43,7 +43,7 @@ import java.util.UUID; public final class SmartSelectionEventTracker { private static final String LOG_TAG = "SmartSelectEventTracker"; - private static final boolean DEBUG_LOG_ENABLED = true; + private static final boolean DEBUG_LOG_ENABLED = false; private static final int START_EVENT_DELTA = MetricsEvent.FIELD_SELECTION_SINCE_START; private static final int PREV_EVENT_DELTA = MetricsEvent.FIELD_SELECTION_SINCE_PREVIOUS; diff --git a/core/java/android/widget/SelectionActionModeHelper.java b/core/java/android/widget/SelectionActionModeHelper.java index 513a18cdaf30..384e254e205f 100644 --- a/core/java/android/widget/SelectionActionModeHelper.java +++ b/core/java/android/widget/SelectionActionModeHelper.java @@ -71,11 +71,15 @@ final class SelectionActionModeHelper { } public void startActionModeAsync(boolean adjustSelection) { + // Check if the smart selection should run for editable text. + adjustSelection &= !mTextView.isTextEditable() + || mTextView.getTextClassifier().getSettings() + .isSuggestSelectionEnabledForEditableText(); + mSelectionTracker.onOriginalSelection( getText(mTextView), mTextView.getSelectionStart(), - mTextView.getSelectionEnd(), - mTextView.isTextEditable()); + mTextView.getSelectionEnd()); cancelAsyncTask(); if (skipTextClassification()) { startActionMode(null); @@ -163,7 +167,10 @@ final class SelectionActionModeHelper { private void startActionMode(@Nullable SelectionResult result) { final CharSequence text = getText(mTextView); if (result != null && text instanceof Spannable) { - Selection.setSelection((Spannable) text, result.mStart, result.mEnd); + // Do not change the selection if TextClassifier should be dark launched. + if (!mTextView.getTextClassifier().getSettings().isDarkLaunch()) { + Selection.setSelection((Spannable) text, result.mStart, result.mEnd); + } mTextClassification = result.mClassification; } else { mTextClassification = null; @@ -193,7 +200,7 @@ final class SelectionActionModeHelper { } private void resetTextClassificationHelper() { - mTextClassificationHelper.reset( + mTextClassificationHelper.init( mTextView.getTextClassifier(), getText(mTextView), mTextView.getSelectionStart(), mTextView.getSelectionEnd(), @@ -225,8 +232,7 @@ final class SelectionActionModeHelper { /** * Called when the original selection happens, before smart selection is triggered. */ - public void onOriginalSelection( - CharSequence text, int selectionStart, int selectionEnd, boolean editableText) { + public void onOriginalSelection(CharSequence text, int selectionStart, int selectionEnd) { // If we abandoned a selection and created a new one very shortly after, we may still // have a pending request to log ABANDON, which we flush here. mDelayedLogAbandon.flush(); @@ -622,11 +628,11 @@ final class SelectionActionModeHelper { TextClassificationHelper(TextClassifier textClassifier, CharSequence text, int selectionStart, int selectionEnd, LocaleList locales) { - reset(textClassifier, text, selectionStart, selectionEnd, locales); + init(textClassifier, text, selectionStart, selectionEnd, locales); } @UiThread - public void reset(TextClassifier textClassifier, + public void init(TextClassifier textClassifier, CharSequence text, int selectionStart, int selectionEnd, LocaleList locales) { mTextClassifier = Preconditions.checkNotNull(textClassifier); mText = Preconditions.checkNotNull(text).toString(); @@ -649,8 +655,12 @@ final class SelectionActionModeHelper { trimText(); final TextSelection selection = mTextClassifier.suggestSelection( mTrimmedText, mRelativeStart, mRelativeEnd, mLocales); - mSelectionStart = Math.max(0, selection.getSelectionStartIndex() + mTrimStart); - mSelectionEnd = Math.min(mText.length(), selection.getSelectionEndIndex() + mTrimStart); + // Do not classify new selection boundaries if TextClassifier should be dark launched. + if (!mTextClassifier.getSettings().isDarkLaunch()) { + mSelectionStart = Math.max(0, selection.getSelectionStartIndex() + mTrimStart); + mSelectionEnd = Math.min( + mText.length(), selection.getSelectionEndIndex() + mTrimStart); + } return performClassification(selection); } diff --git a/core/java/com/android/internal/util/MemInfoReader.java b/core/java/com/android/internal/util/MemInfoReader.java index b71fa0674b4e..8d7166679b78 100644 --- a/core/java/com/android/internal/util/MemInfoReader.java +++ b/core/java/com/android/internal/util/MemInfoReader.java @@ -82,7 +82,7 @@ public final class MemInfoReader { * that are mapped in to processes. */ public long getCachedSizeKb() { - return mInfos[Debug.MEMINFO_BUFFERS] + return mInfos[Debug.MEMINFO_BUFFERS] + mInfos[Debug.MEMINFO_SLAB_RECLAIMABLE] + mInfos[Debug.MEMINFO_CACHED] - mInfos[Debug.MEMINFO_MAPPED]; } @@ -90,7 +90,7 @@ public final class MemInfoReader { * Amount of RAM that is in use by the kernel for actual allocations. */ public long getKernelUsedSizeKb() { - return mInfos[Debug.MEMINFO_SHMEM] + mInfos[Debug.MEMINFO_SLAB] + return mInfos[Debug.MEMINFO_SHMEM] + mInfos[Debug.MEMINFO_SLAB_UNRECLAIMABLE] + mInfos[Debug.MEMINFO_VM_ALLOC_USED] + mInfos[Debug.MEMINFO_PAGE_TABLES] + mInfos[Debug.MEMINFO_KERNEL_STACK]; } diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 5afd06750601..4c137b14ed41 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -615,9 +615,12 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote) char jitprithreadweightOptBuf[sizeof("-Xjitprithreadweight:")-1 + PROPERTY_VALUE_MAX]; char jittransitionweightOptBuf[sizeof("-Xjittransitionweight:")-1 + PROPERTY_VALUE_MAX]; char hotstartupsamplesOptsBuf[sizeof("-Xps-hot-startup-method-samples:")-1 + PROPERTY_VALUE_MAX]; + char madviseRandomOptsBuf[sizeof("-XX:MadviseRandomAccess:")-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 foregroundHeapGrowthMultiplierOptsBuf[ + sizeof("-XX:ForegroundHeapGrowthMultiplier=")-1 + 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]; @@ -721,6 +724,11 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote) heaptargetutilizationOptsBuf, "-XX:HeapTargetUtilization="); + /* Foreground heap growth multiplier option */ + parseRuntimeOption("dalvik.vm.foreground-heap-growth-multiplier", + foregroundHeapGrowthMultiplierOptsBuf, + "-XX:ForegroundHeapGrowthMultiplier="); + /* * JIT related options. */ @@ -742,6 +750,11 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote) "-Xjittransitionweight:"); /* + * Madvise related options. + */ + parseRuntimeOption("dalvik.vm.madvise-random", madviseRandomOptsBuf, "-XX:MadviseRandomAccess:"); + + /* * Profile related options. */ parseRuntimeOption("dalvik.vm.hot-startup-method-samples", hotstartupsamplesOptsBuf, diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp index 4d32c0546d93..4370747dfcd1 100644 --- a/core/jni/android_os_Debug.cpp +++ b/core/jni/android_os_Debug.cpp @@ -705,6 +705,8 @@ enum { MEMINFO_CACHED, MEMINFO_SHMEM, MEMINFO_SLAB, + MEMINFO_SLAB_RECLAIMABLE, + MEMINFO_SLAB_UNRECLAIMABLE, MEMINFO_SWAP_TOTAL, MEMINFO_SWAP_FREE, MEMINFO_ZRAM_TOTAL, @@ -776,6 +778,8 @@ static void android_os_Debug_getMemInfo(JNIEnv *env, jobject clazz, jlongArray o "Cached:", "Shmem:", "Slab:", + "SReclaimable:", + "SUnreclaim:", "SwapTotal:", "SwapFree:", "ZRam:", @@ -792,6 +796,8 @@ static void android_os_Debug_getMemInfo(JNIEnv *env, jobject clazz, jlongArray o 7, 6, 5, + 13, + 11, 10, 9, 5, @@ -801,7 +807,7 @@ static void android_os_Debug_getMemInfo(JNIEnv *env, jobject clazz, jlongArray o 12, 0 }; - long mem[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + long mem[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; char* p = buffer; while (*p && numFound < (sizeof(tagsLen) / sizeof(tagsLen[0]))) { diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 5347719ef993..ce6815f10b30 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -2679,8 +2679,6 @@ <string name="yes">OK</string> <!-- Preference framework strings. --> <string name="no">Cancel</string> - <!-- Preference framework strings. --> - <string name="close">CLOSE</string> <!-- This is the generic "attention" string to be used in attention dialogs. Typically combined with setIconAttribute(android.R.attr.alertDialogIcon) (or setIcon(android.R.drawable.ic_dialog_alert) on legacy versions of the platform) --> @@ -2813,11 +2811,6 @@ <!-- [CHAR LIMIT=200] Compat mode dialog: hint to re-enable compat mode dialog. --> <string name="screen_compat_mode_hint">Re-enable this in System settings > Apps > Downloaded.</string> - <!-- Text of the alert that is displayed when a top application is killed by lmk. --> - <string name="top_app_killed_title">App isn\'t responding</string> - <!-- Top app killed by lmk dialog message. --> - <string name="top_app_killed_message"><xliff:g id="app_name">%1$s</xliff:g> may be using too much memory.</string> - <!-- [CHAR LIMIT=200] Unsupported display size dialog: message. Refers to "Display size" setting. --> <string name="unsupported_display_size_message"><xliff:g id="app_name">%1$s</xliff:g> does not support the current Display size setting and may behave unexpectedly.</string> <!-- [CHAR LIMIT=50] Unsupported display size dialog: check box label. --> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index b36630e07f68..0548db69a05d 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -1890,9 +1890,6 @@ <java-symbol type="string" name="anr_application_process" /> <java-symbol type="string" name="anr_process" /> <java-symbol type="string" name="anr_title" /> - <java-symbol type="string" name="top_app_killed_title" /> - <java-symbol type="string" name="top_app_killed_message" /> - <java-symbol type="string" name="close" /> <java-symbol type="string" name="car_mode_disable_notification_message" /> <java-symbol type="string" name="car_mode_disable_notification_title" /> <java-symbol type="string" name="chooser_wallpaper" /> diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java index 7d9c50dc432e..662f20e58a73 100644 --- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java +++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java @@ -344,6 +344,7 @@ public class SettingsBackupTest { Settings.Global.TETHER_DUN_REQUIRED, Settings.Global.TETHER_OFFLOAD_DISABLED, Settings.Global.TETHER_SUPPORTED, + Settings.Global.TEXT_CLASSIFIER_CONSTANTS, Settings.Global.THEATER_MODE_ON, Settings.Global.TRANSITION_ANIMATION_SCALE, Settings.Global.TRUSTED_SOUND, diff --git a/packages/CtsShim/Android.mk b/packages/CtsShim/Android.mk index fa6423ecb8c7..88b85e078f45 100644 --- a/packages/CtsShim/Android.mk +++ b/packages/CtsShim/Android.mk @@ -30,8 +30,11 @@ LOCAL_BUILT_MODULE_STEM := package.apk # Make sure the build system doesn't try to resign the APK LOCAL_CERTIFICATE := PRESIGNED LOCAL_DEX_PREOPT := false +LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64 -LOCAL_SRC_FILES := CtsShimPriv.apk +my_archs := arm x86 +my_src_arch := $(call get-prebuilt-src-arch, $(my_archs)) +LOCAL_SRC_FILES := apk/$(my_src_arch)/CtsShimPriv.apk include $(BUILD_PREBUILT) @@ -48,8 +51,11 @@ LOCAL_BUILT_MODULE_STEM := package.apk # Make sure the build system doesn't try to resign the APK LOCAL_CERTIFICATE := PRESIGNED LOCAL_DEX_PREOPT := false +LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64 -LOCAL_SRC_FILES := CtsShim.apk +my_archs := arm x86 +my_src_arch := $(call get-prebuilt-src-arch, $(my_archs)) +LOCAL_SRC_FILES := apk/$(my_src_arch)/CtsShim.apk include $(BUILD_PREBUILT) diff --git a/packages/CtsShim/CtsShim.apk b/packages/CtsShim/CtsShim.apk Binary files differdeleted file mode 100644 index 27289037dd8b..000000000000 --- a/packages/CtsShim/CtsShim.apk +++ /dev/null diff --git a/packages/CtsShim/CtsShimPriv.apk b/packages/CtsShim/CtsShimPriv.apk Binary files differdeleted file mode 100644 index 9a8e75c28b05..000000000000 --- a/packages/CtsShim/CtsShimPriv.apk +++ /dev/null diff --git a/packages/CtsShim/apk/arm/CtsShim.apk b/packages/CtsShim/apk/arm/CtsShim.apk Binary files differnew file mode 100644 index 000000000000..a91160368cb8 --- /dev/null +++ b/packages/CtsShim/apk/arm/CtsShim.apk diff --git a/packages/CtsShim/apk/arm/CtsShimPriv.apk b/packages/CtsShim/apk/arm/CtsShimPriv.apk Binary files differnew file mode 100644 index 000000000000..845d781f38f3 --- /dev/null +++ b/packages/CtsShim/apk/arm/CtsShimPriv.apk diff --git a/packages/CtsShim/apk/x86/CtsShim.apk b/packages/CtsShim/apk/x86/CtsShim.apk Binary files differnew file mode 100644 index 000000000000..a91160368cb8 --- /dev/null +++ b/packages/CtsShim/apk/x86/CtsShim.apk diff --git a/packages/CtsShim/apk/x86/CtsShimPriv.apk b/packages/CtsShim/apk/x86/CtsShimPriv.apk Binary files differnew file mode 100644 index 000000000000..2fc9a94037fa --- /dev/null +++ b/packages/CtsShim/apk/x86/CtsShimPriv.apk diff --git a/packages/CtsShim/build/Android.mk b/packages/CtsShim/build/Android.mk index 21f0afe573be..ec14d50b371d 100644 --- a/packages/CtsShim/build/Android.mk +++ b/packages/CtsShim/build/Android.mk @@ -32,6 +32,9 @@ LOCAL_PACKAGE_NAME := CtsShimPrivUpgrade LOCAL_MANIFEST_FILE := shim_priv_upgrade/AndroidManifest.xml +LOCAL_MULTILIB := both +LOCAL_JNI_SHARED_LIBRARIES := libshim_jni + include $(BUILD_PACKAGE) my_shim_priv_upgrade_apk := $(LOCAL_BUILT_MODULE) @@ -60,6 +63,9 @@ my_shim_priv_upgrade_apk := LOCAL_FULL_MANIFEST_FILE := $(gen) +LOCAL_MULTILIB := both +LOCAL_JNI_SHARED_LIBRARIES := libshim_jni + include $(BUILD_PACKAGE) ########################################################### @@ -80,6 +86,9 @@ LOCAL_PACKAGE_NAME := CtsShimPrivUpgradeWrongSHA LOCAL_MANIFEST_FILE := shim_priv_upgrade/AndroidManifest.xml +LOCAL_MULTILIB := both +LOCAL_JNI_SHARED_LIBRARIES := libshim_jni + include $(BUILD_PACKAGE) @@ -99,3 +108,5 @@ LOCAL_MANIFEST_FILE := shim/AndroidManifest.xml include $(BUILD_PACKAGE) +########################################################### +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/packages/CtsShim/build/README b/packages/CtsShim/build/README index 9869377738b8..59af068f0587 100644 --- a/packages/CtsShim/build/README +++ b/packages/CtsShim/build/README @@ -6,19 +6,34 @@ must specify the singular APK that can be used to upgrade it. NOTE: The need to include a binary on the system image may be deprecated if a solution involving a temporarily writable /system partition is implemented. -build: - $ tapas CtsShim CtsShimPriv CtsShimPrivUpgrade CtsShimPrivUpgradeWrongSHA +For local testing, build the apk and put them in the following folders. +This is for arm: + $ tapas CtsShim CtsShimPriv CtsShimPrivUpgrade CtsShimPrivUpgradeWrongSHA arm64 $ m + $ cp $OUT/system/priv-app/CtsShimPrivUpgrade/CtsShimPrivUpgrade.apk \ + cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/apk/arm + $ cp $OUT/system/priv-app/CtsShimPrivUpgrade/CtsShimPrivUpgrade.apk \ + vendor/xts/gts-tests/hostsidetests/packagemanager/app/apk/arm/GtsShimPrivUpgrade.apk + $ cp $OUT/system/priv-app/CtsShimPrivUpgradeWrongSHA/CtsShimPrivUpgradeWrongSHA.apk \ + cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/apk/arm + $ cp $OUT/system/priv-app/CtsShimPriv/CtsShimPriv.apk \ + frameworks/base/packages/CtsShim/apk/arm + $ cp $OUT/system/app/CtsShim/CtsShim.apk \ + frameworks/base/packages/CtsShim/apk/arm -local testing: +This is for x86: + $ tapas CtsShim CtsShimPriv CtsShimPrivUpgrade CtsShimPrivUpgradeWrongSHA x86_64 + $ m + $ cp $OUT/system/priv-app/CtsShimPrivUpgrade/CtsShimPrivUpgrade.apk \ + cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/apk/x86 $ cp $OUT/system/priv-app/CtsShimPrivUpgrade/CtsShimPrivUpgrade.apk \ - cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp + vendor/xts/gts-tests/hostsidetests/packagemanager/app/apk/x86/GtsShimPrivUpgrade.apk $ cp $OUT/system/priv-app/CtsShimPrivUpgradeWrongSHA/CtsShimPrivUpgradeWrongSHA.apk \ - cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp + cts/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/apk/x86 $ cp $OUT/system/priv-app/CtsShimPriv/CtsShimPriv.apk \ - frameworks/base/packages/CtsShim + frameworks/base/packages/CtsShim/apk/x86 $ cp $OUT/system/app/CtsShim/CtsShim.apk \ - frameworks/base/packages/CtsShim + frameworks/base/packages/CtsShim/apk/x86 For final submission, the APKs should be downloaded from the build server, then submitted to the cts/ and frameworks/base/ repos. diff --git a/packages/CtsShim/build/jni/Android.mk b/packages/CtsShim/build/jni/Android.mk new file mode 100644 index 000000000000..968fc0bb8203 --- /dev/null +++ b/packages/CtsShim/build/jni/Android.mk @@ -0,0 +1,27 @@ +# +# Copyright (C) 2017 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. +# + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := libshim_jni + +LOCAL_SRC_FILES := Shim.c + +LOCAL_SDK_VERSION := 24 + +include $(BUILD_SHARED_LIBRARY) diff --git a/packages/CtsShim/build/jni/Shim.c b/packages/CtsShim/build/jni/Shim.c new file mode 100644 index 000000000000..44eb316f50b1 --- /dev/null +++ b/packages/CtsShim/build/jni/Shim.c @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2017 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. + */ + +#include <jni.h>
\ No newline at end of file diff --git a/packages/CtsShim/build/shim_priv/AndroidManifest.xml b/packages/CtsShim/build/shim_priv/AndroidManifest.xml index 5195ef79d93b..9bf454c29768 100644 --- a/packages/CtsShim/build/shim_priv/AndroidManifest.xml +++ b/packages/CtsShim/build/shim_priv/AndroidManifest.xml @@ -27,6 +27,7 @@ <application android:hasCode="false" + android:multiArch="true" tools:ignore="AllowBackup,MissingApplicationIcon" > <!-- These activities don't actually exist; define them just to test the filters !--> diff --git a/packages/CtsShim/build/shim_priv_upgrade/AndroidManifest.xml b/packages/CtsShim/build/shim_priv_upgrade/AndroidManifest.xml index b938e3e363d7..023e93e1449e 100644 --- a/packages/CtsShim/build/shim_priv_upgrade/AndroidManifest.xml +++ b/packages/CtsShim/build/shim_priv_upgrade/AndroidManifest.xml @@ -24,6 +24,7 @@ <application android:hasCode="false" + android:multiArch="true" tools:ignore="AllowBackup,MissingApplicationIcon" > <!-- These activities don't actually exist; define them just to test the filters !--> diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java index a9a915b23a0c..b25719b0272d 100644 --- a/packages/SystemUI/src/com/android/systemui/Dependency.java +++ b/packages/SystemUI/src/com/android/systemui/Dependency.java @@ -22,6 +22,8 @@ import android.os.HandlerThread; import android.os.Looper; import android.os.Process; import android.util.ArrayMap; +import android.view.IWindowManager; +import android.view.WindowManagerGlobal; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.app.NightDisplayController; @@ -304,6 +306,8 @@ public class Dependency extends SystemUI { mProviders.put(LightBarController.class, () -> new LightBarController(mContext)); + mProviders.put(IWindowManager.class, () -> WindowManagerGlobal.getWindowManagerService()); + // Put all dependencies above here so the factory can override them if it wants. SystemUIFactory.getInstance().injectDependencies(mProviders, mContext); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java index f3ca66ffa9b3..c9500363e9d8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java @@ -17,12 +17,19 @@ package com.android.systemui.statusbar.phone; import android.content.Context; +import android.os.Handler; +import android.os.RemoteException; import android.os.ServiceManager; import android.util.SparseArray; +import android.view.Display; +import android.view.IWallpaperVisibilityListener; +import android.view.IWindowManager; import android.view.MotionEvent; import android.view.View; +import android.view.WindowManagerGlobal; import com.android.internal.statusbar.IStatusBarService; +import com.android.systemui.Dependency; import com.android.systemui.R; public final class NavigationBarTransitions extends BarTransitions { @@ -30,6 +37,7 @@ public final class NavigationBarTransitions extends BarTransitions { private final NavigationBarView mView; private final IStatusBarService mBarService; private final LightBarTransitionsController mLightTransitionsController; + private boolean mWallpaperVisible; private boolean mLightsOut; private boolean mAutoDim; @@ -41,6 +49,21 @@ public final class NavigationBarTransitions extends BarTransitions { ServiceManager.getService(Context.STATUS_BAR_SERVICE)); mLightTransitionsController = new LightBarTransitionsController(view.getContext(), this::applyDarkIntensity); + + IWindowManager windowManagerService = Dependency.get(IWindowManager.class); + Handler handler = Handler.getMain(); + try { + mWallpaperVisible = windowManagerService.registerWallpaperVisibilityListener( + new IWallpaperVisibilityListener.Stub() { + @Override + public void onWallpaperVisibilityChanged(boolean newVisibility, + int displayId) throws RemoteException { + mWallpaperVisible = newVisibility; + handler.post(() -> applyLightsOut(true, false)); + } + }, Display.DEFAULT_DISPLAY); + } catch (RemoteException e) { + } } public void init() { @@ -57,7 +80,7 @@ public final class NavigationBarTransitions extends BarTransitions { @Override protected boolean isLightsOut(int mode) { - return super.isLightsOut(mode) || mAutoDim; + return super.isLightsOut(mode) || (mAutoDim && !mWallpaperVisible); } public LightBarTransitionsController getLightTransitionsController() { @@ -85,7 +108,7 @@ public final class NavigationBarTransitions extends BarTransitions { // ok, everyone, stop it right there navButtons.animate().cancel(); - final float navButtonsAlpha = lightsOut ? 0.5f : 1f; + final float navButtonsAlpha = lightsOut ? 0.6f : 1f; if (!animate) { navButtons.setAlpha(navButtonsAlpha); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarTransitionsTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarTransitionsTest.java index 0c1baaa1b476..76f57f049561 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarTransitionsTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarTransitionsTest.java @@ -24,6 +24,7 @@ import static org.mockito.Mockito.when; import android.support.test.filters.SmallTest; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper.RunWithLooper; +import android.view.IWindowManager; import com.android.systemui.SysuiTestCase; import com.android.systemui.statusbar.CommandQueue; @@ -41,6 +42,7 @@ public class NavigationBarTransitionsTest extends SysuiTestCase { @Before public void setup() { + mDependency.injectMockDependency(IWindowManager.class); mContext.putComponent(CommandQueue.class, mock(CommandQueue.class)); NavigationBarView navBar = spy(new NavigationBarView(mContext, null)); when(navBar.getCurrentView()).thenReturn(navBar); diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index b4741d12bc15..1520b96a4afd 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -1690,7 +1690,6 @@ public class ActivityManagerService extends IActivityManager.Stub static final int SERVICE_FOREGROUND_CRASH_MSG = 69; static final int DISPATCH_OOM_ADJ_OBSERVER_MSG = 70; static final int START_USER_SWITCH_FG_MSG = 712; - static final int TOP_APP_KILLED_BY_LMK_MSG = 73; static final int NOTIFY_VR_KEYGUARD_MSG = 74; static final int FIRST_ACTIVITY_STACK_MSG = 100; @@ -1923,17 +1922,6 @@ public class ActivityManagerService extends IActivityManager.Stub dispatchProcessDied(pid, uid); break; } - case TOP_APP_KILLED_BY_LMK_MSG: { - final String appName = (String) msg.obj; - final AlertDialog d = new BaseErrorDialog(mUiContext); - d.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR); - d.setTitle(mUiContext.getText(R.string.top_app_killed_title)); - d.setMessage(mUiContext.getString(R.string.top_app_killed_message, appName)); - d.setButton(DialogInterface.BUTTON_POSITIVE, mUiContext.getText(R.string.close), - obtainMessage(DISMISS_DIALOG_UI_MSG, d)); - d.show(); - break; - } case DISPATCH_UIDS_CHANGED_UI_MSG: { dispatchUidsChanged(); } break; @@ -5459,7 +5447,6 @@ public class ActivityManagerService extends IActivityManager.Stub boolean doLowMem = app.instr == null; boolean doOomAdj = doLowMem; if (!app.killedByAm) { - maybeNotifyTopAppKilled(app); Slog.i(TAG, "Process " + app.processName + " (pid " + pid + ") has died: " + ProcessList.makeOomAdjString(app.setAdj) + ProcessList.makeProcStateString(app.setProcState)); @@ -5493,23 +5480,6 @@ public class ActivityManagerService extends IActivityManager.Stub } } - /** Show system error dialog when a top app is killed by LMK */ - void maybeNotifyTopAppKilled(ProcessRecord app) { - if (!shouldNotifyTopAppKilled(app)) { - return; - } - - Message msg = mHandler.obtainMessage(TOP_APP_KILLED_BY_LMK_MSG); - msg.obj = mContext.getPackageManager().getApplicationLabel(app.info); - mUiHandler.sendMessage(msg); - } - - /** Only show notification when the top app is killed on low ram devices */ - private boolean shouldNotifyTopAppKilled(ProcessRecord app) { - return app.curSchedGroup == ProcessList.SCHED_GROUP_TOP_APP && - ActivityManager.isLowRamDeviceStatic(); - } - /** * If a stack trace dump file is configured, dump process stack traces. * @param clearTraces causes the dump file to be erased prior to the new diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java index b2bbf199bfc1..4d98f19f79b9 100644 --- a/services/core/java/com/android/server/am/ActivityRecord.java +++ b/services/core/java/com/android/server/am/ActivityRecord.java @@ -2249,26 +2249,6 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo mTmpConfig.unset(); computeBounds(mTmpBounds); if (mTmpBounds.equals(mBounds)) { - final ActivityStack stack = getStack(); - if (!mBounds.isEmpty() || task == null || stack == null || !task.mFullscreen) { - // We don't want to influence the override configuration here if our task is in - // multi-window mode or there is a bounds specified to calculate the override - // config. In both of this cases the app should be compatible with whatever the - // current configuration is or will be. - return; - } - - // Currently limited to the top activity for now to avoid situations where non-top - // visible activity and top might have conflicting requests putting the non-top activity - // windows in an odd state. - final ActivityRecord top = mStackSupervisor.topRunningActivityLocked(); - final Configuration parentConfig = getParent().getConfiguration(); - if (top != this || isConfigurationCompatible(parentConfig)) { - onOverrideConfigurationChanged(mTmpConfig); - } else if (isConfigurationCompatible( - mLastReportedConfiguration.getMergedConfiguration())) { - onOverrideConfigurationChanged(mLastReportedConfiguration.getMergedConfiguration()); - } return; } diff --git a/services/core/java/com/android/server/am/ServiceRecord.java b/services/core/java/com/android/server/am/ServiceRecord.java index ac85e6b132bf..16995e50fdbf 100644 --- a/services/core/java/com/android/server/am/ServiceRecord.java +++ b/services/core/java/com/android/server/am/ServiceRecord.java @@ -33,6 +33,7 @@ import android.content.pm.PackageManager; import android.content.pm.ServiceInfo; import android.net.Uri; import android.os.Binder; +import android.os.Build; import android.os.IBinder; import android.os.RemoteException; import android.os.SystemClock; @@ -517,14 +518,27 @@ final class ServiceRecord extends Binder { } catch (PackageManager.NameNotFoundException e) { } } - if (localForegroundNoti.getSmallIcon() == null - || nm.getNotificationChannel(localPackageName, appUid, + if (nm.getNotificationChannel(localPackageName, appUid, localForegroundNoti.getChannelId()) == null) { + int targetSdkVersion = Build.VERSION_CODES.O_MR1; + try { + final ApplicationInfo applicationInfo = + ams.mContext.getPackageManager().getApplicationInfoAsUser( + appInfo.packageName, 0, userId); + targetSdkVersion = applicationInfo.targetSdkVersion; + } catch (PackageManager.NameNotFoundException e) { + } + if (targetSdkVersion >= Build.VERSION_CODES.O_MR1) { + throw new RuntimeException( + "invalid channel for service notification: " + + foregroundNoti); + } + } + if (localForegroundNoti.getSmallIcon() == null) { // Notifications whose icon is 0 are defined to not show // a notification, silently ignoring it. We don't want to // just ignore it, we want to prevent the service from // being foreground. - // Also every notification needs a channel. throw new RuntimeException("invalid service notification: " + foregroundNoti); } diff --git a/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java b/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java index 6506cf7fa189..494317334f43 100644 --- a/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java +++ b/services/core/java/com/android/server/audio/PlaybackActivityMonitor.java @@ -184,11 +184,15 @@ public final class PlaybackActivityMonitor } } + private static final int FLAGS_FOR_SILENCE_OVERRIDE = + AudioAttributes.FLAG_BYPASS_INTERRUPTION_POLICY | + AudioAttributes.FLAG_BYPASS_MUTE; + private void checkVolumeForPrivilegedAlarm(AudioPlaybackConfiguration apc, int event) { if (event == AudioPlaybackConfiguration.PLAYER_STATE_STARTED || apc.getPlayerState() == AudioPlaybackConfiguration.PLAYER_STATE_STARTED) { - if ((apc.getAudioAttributes().getAllFlags() & - AudioAttributes.FLAG_BYPASS_INTERRUPTION_POLICY) != 0 && + if ((apc.getAudioAttributes().getAllFlags() & FLAGS_FOR_SILENCE_OVERRIDE) + == FLAGS_FOR_SILENCE_OVERRIDE && apc.getAudioAttributes().getUsage() == AudioAttributes.USAGE_ALARM && mContext.checkPermission(android.Manifest.permission.MODIFY_PHONE_STATE, apc.getClientPid(), apc.getClientUid()) == diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java index e6228d46e15c..0c9d70a95ab9 100644 --- a/services/core/java/com/android/server/clipboard/ClipboardService.java +++ b/services/core/java/com/android/server/clipboard/ClipboardService.java @@ -435,11 +435,12 @@ public class ClipboardService extends SystemService { } private boolean isDeviceLocked() { + int callingUserId = UserHandle.getCallingUserId(); final long token = Binder.clearCallingIdentity(); try { final KeyguardManager keyguardManager = getContext().getSystemService( KeyguardManager.class); - return keyguardManager != null && keyguardManager.isDeviceLocked(); + return keyguardManager != null && keyguardManager.isDeviceLocked(callingUserId); } finally { Binder.restoreCallingIdentity(token); } diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java index 0b11479a162a..664d2f9789f0 100644 --- a/services/core/java/com/android/server/media/MediaSessionRecord.java +++ b/services/core/java/com/android/server/media/MediaSessionRecord.java @@ -784,6 +784,14 @@ public class MediaSessionRecord implements IBinder.DeathRecipient { mService.enforcePhoneStatePermission(pid, uid); } mFlags = flags; + if ((flags & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) { + final long token = Binder.clearCallingIdentity(); + try { + mService.setGlobalPrioritySession(MediaSessionRecord.this); + } finally { + Binder.restoreCallingIdentity(token); + } + } mHandler.post(MessageHandler.MSG_UPDATE_SESSION_STATE); } diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java index b102dde30a94..aa652445c45a 100644 --- a/services/core/java/com/android/server/media/MediaSessionService.java +++ b/services/core/java/com/android/server/media/MediaSessionService.java @@ -178,17 +178,6 @@ public class MediaSessionService extends SystemService implements Monitor { return; } if ((record.getFlags() & MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY) != 0) { - if (mGlobalPrioritySession != record) { - Log.d(TAG, "Global priority session is changed from " + mGlobalPrioritySession - + " to " + record); - mGlobalPrioritySession = record; - if (user != null && user.mPriorityStack.contains(record)) { - // Handle the global priority session separately. - // Otherwise, it will be the media button session even after it becomes - // inactive because it has been the lastly played media app. - user.mPriorityStack.removeSession(record); - } - } if (DEBUG_KEY_EVENT) { Log.d(TAG, "Global priority session is updated, active=" + record.isActive()); } @@ -204,6 +193,24 @@ public class MediaSessionService extends SystemService implements Monitor { } } + public void setGlobalPrioritySession(MediaSessionRecord record) { + synchronized (mLock) { + FullUserRecord user = getFullUserRecordLocked(record.getUserId()); + if (mGlobalPrioritySession != record) { + Log.d(TAG, "Global priority session is changed from " + mGlobalPrioritySession + + " to " + record); + mGlobalPrioritySession = record; + if (user != null && user.mPriorityStack.contains(record)) { + // Handle the global priority session separately. + // Otherwise, it can be the media button session regardless of the active state + // because it or other system components might have been the lastly played media + // app. + user.mPriorityStack.removeSession(record); + } + } + } + } + private List<MediaSessionRecord> getActiveSessionsLocked(int userId) { List<MediaSessionRecord> records = new ArrayList<>(); if (userId == UserHandle.USER_ALL) { diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 224791b302e1..a22a84066317 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -3313,23 +3313,6 @@ public class PackageManagerService extends IPackageManager.Stub return null; } - // If we have a profile for a compressed APK, copy it to the reference location. - // Since the package is the stub one, remove the stub suffix to get the normal package and - // APK name. - File profileFile = new File(getPrebuildProfilePath(pkg).replace(STUB_SUFFIX, "")); - if (profileFile.exists()) { - try { - // We could also do this lazily before calling dexopt in - // PackageDexOptimizer to prevent this happening on first boot. The issue - // is that we don't have a good way to say "do this only once". - if (!mInstaller.copySystemProfile(profileFile.getAbsolutePath(), - pkg.applicationInfo.uid, pkg.packageName)) { - Log.e(TAG, "decompressPackage failed to copy system profile!"); - } - } catch (Exception e) { - Log.e(TAG, "Failed to copy profile " + profileFile.getAbsolutePath() + " ", e); - } - } return dstCodePath; } @@ -9786,10 +9769,30 @@ public class PackageManagerService extends IPackageManager.Stub // package and APK names. String systemProfilePath = getPrebuildProfilePath(disabledPs.pkg).replace(STUB_SUFFIX, ""); - File systemProfile = new File(systemProfilePath); - // Use the profile for compilation if there exists one for the same package - // in the system partition. - useProfileForDexopt = systemProfile.exists(); + profileFile = new File(systemProfilePath); + // If we have a profile for a compressed APK, copy it to the reference + // location. + // Note that copying the profile here will cause it to override the + // reference profile every OTA even though the existing reference profile + // may have more data. We can't copy during decompression since the + // directories are not set up at that point. + if (profileFile.exists()) { + try { + // We could also do this lazily before calling dexopt in + // PackageDexOptimizer to prevent this happening on first boot. The + // issue is that we don't have a good way to say "do this only + // once". + if (!mInstaller.copySystemProfile(profileFile.getAbsolutePath(), + pkg.applicationInfo.uid, pkg.packageName)) { + Log.e(TAG, "Failed to copy system profile for stub package!"); + } else { + useProfileForDexopt = true; + } + } catch (Exception e) { + Log.e(TAG, "Failed to copy profile " + + profileFile.getAbsolutePath() + " ", e); + } + } } } } diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index f79f0e86b765..da14c360f16a 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -1152,14 +1152,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { + ", mOrientationSensorEnabled=" + mOrientationSensorEnabled + ", mKeyguardDrawComplete=" + mKeyguardDrawComplete + ", mWindowManagerDrawComplete=" + mWindowManagerDrawComplete); - final boolean keyguardGoingAway = mWindowManagerInternal.isKeyguardGoingAway(); boolean disable = true; // Note: We postpone the rotating of the screen until the keyguard as well as the // window manager have reported a draw complete or the keyguard is going away in dismiss // mode. - if (mScreenOnEarly && mAwake && ((mKeyguardDrawComplete && mWindowManagerDrawComplete) - || keyguardGoingAway)) { + if (mScreenOnEarly && mAwake && ((mKeyguardDrawComplete && mWindowManagerDrawComplete))) { if (needSensorRunningLp()) { disable = false; //enable listener if not already enabled @@ -1170,7 +1168,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // the sensor reading was cleared which can cause it to relaunch the app that // will show in the wrong orientation first before correcting leading to app // launch delays. - mOrientationListener.enable(!keyguardGoingAway /* clearCurrentRotation */); + mOrientationListener.enable(true /* clearCurrentRotation */); if(localLOGV) Slog.v(TAG, "Enabling listeners"); mOrientationSensorEnabled = true; } diff --git a/services/core/java/com/android/server/wm/TaskSnapshotController.java b/services/core/java/com/android/server/wm/TaskSnapshotController.java index 6c11d8b0e67b..a1868e6f46c3 100644 --- a/services/core/java/com/android/server/wm/TaskSnapshotController.java +++ b/services/core/java/com/android/server/wm/TaskSnapshotController.java @@ -296,7 +296,9 @@ class TaskSnapshotController { decorPainter.drawDecors(c, null /* statusBarExcludeFrame */); node.end(c); final Bitmap hwBitmap = ThreadedRenderer.createHardwareBitmap(node, width, height); - + if (hwBitmap == null) { + return null; + } return new TaskSnapshot(hwBitmap.createGraphicBufferHandle(), topChild.getConfiguration().orientation, mainWindow.mStableInsets, ActivityManager.isLowRamDeviceStatic() /* reduced */, 1.0f /* scale */); diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index c8cbcd811de8..0abc84745f0e 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -2994,10 +2994,9 @@ public class WindowManagerService extends IWindowManager.Stub } public void setKeyguardGoingAway(boolean keyguardGoingAway) { -// TODO: Use of this can be removed. Revert ag/I8369723d6a77f2c602f1ef080371fa7cd9ee094e -// synchronized (mWindowMap) { -// mKeyguardGoingAway = keyguardGoingAway; -// } + synchronized (mWindowMap) { + mKeyguardGoingAway = keyguardGoingAway; + } } // ------------------------------------------------------------- @@ -7436,11 +7435,6 @@ public class WindowManagerService extends IWindowManager.Stub } @Override - public boolean isKeyguardGoingAway() { - return WindowManagerService.this.mKeyguardGoingAway; - } - - @Override public boolean isKeyguardShowingAndNotOccluded() { return WindowManagerService.this.isKeyguardShowingAndNotOccluded(); } diff --git a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityCacheTest.java b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityCacheTest.java index 02f645a07a5f..c8dc9ff51a1b 100644 --- a/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityCacheTest.java +++ b/services/tests/servicestests/src/com/android/server/accessibility/AccessibilityCacheTest.java @@ -77,7 +77,6 @@ public class AccessibilityCacheTest { mAccessibilityCache.clear(); AccessibilityInteractionClient.getInstance().clearCache(); assertEquals(0, numA11yWinInfosInUse.get()); - assertEquals(0, numA11yNodeInfosInUse.get()); } @Test diff --git a/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java index 91eb55ba3fcf..10d241357ff4 100644 --- a/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java +++ b/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java @@ -17,11 +17,16 @@ package com.android.server.wm; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; +import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; +import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT; +import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; +import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION; + import static com.android.server.wm.WindowContainer.POSITION_TOP; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -30,6 +35,7 @@ import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; +import android.annotation.SuppressLint; import android.content.res.Configuration; import android.os.SystemClock; import android.platform.test.annotations.Presubmit; @@ -378,6 +384,31 @@ public class DisplayContentTests extends WindowTestsBase { assertEquals(-1, orderedDisplayIds.indexOfValue(dc.getDisplayId())); } + @Test + @SuppressLint("InlinedApi") + public void testOrientationDefinedByKeyguard() { + final DisplayContent dc = createNewDisplay(); + // Create a window that requests landscape orientation. It will define device orientation + // by default. + final WindowState window = createWindow(null /* parent */, TYPE_BASE_APPLICATION, dc, "w"); + window.mAppToken.setOrientation(SCREEN_ORIENTATION_LANDSCAPE); + + final WindowState keyguard = createWindow(null, TYPE_STATUS_BAR, dc, "keyguard"); + keyguard.mHasSurface = true; + keyguard.mAttrs.screenOrientation = SCREEN_ORIENTATION_UNSPECIFIED; + + assertEquals("Screen orientation must be defined by the app window by default", + SCREEN_ORIENTATION_LANDSCAPE, dc.getOrientation()); + + keyguard.mAttrs.screenOrientation = SCREEN_ORIENTATION_PORTRAIT; + assertEquals("Visible keyguard must influence device orientation", + SCREEN_ORIENTATION_PORTRAIT, dc.getOrientation()); + + sWm.setKeyguardGoingAway(true); + assertEquals("Keyguard that is going away must not influence device orientation", + SCREEN_ORIENTATION_LANDSCAPE, dc.getOrientation()); + } + private static void verifySizes(DisplayContent displayContent, int expectedBaseWidth, int expectedBaseHeight, int expectedBaseDensity) { assertEquals(displayContent.mBaseDisplayWidth, expectedBaseWidth); diff --git a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java index 95adc9cd5a1a..eca27eefb2cd 100644 --- a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java +++ b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java @@ -17,7 +17,7 @@ package com.android.server.wm; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; -import static android.view.WindowManagerPolicy.NAV_BAR_BOTTOM; +import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM; @@ -188,7 +188,7 @@ class TestWindowManagerPolicy implements WindowManagerPolicy { @Override public boolean isKeyguardHostWindow(WindowManager.LayoutParams attrs) { - return false; + return attrs.type == TYPE_STATUS_BAR; } @Override diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index c36b3acc082d..450a0c66d2e9 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -763,6 +763,18 @@ public class CarrierConfigManager { public static final String KEY_CDMA_DTMF_TONE_DELAY_INT = "cdma_dtmf_tone_delay_int"; /** + * Some carriers will send call forwarding responses for voicemail in a format that is not 3gpp + * compliant, which causes issues during parsing. This causes the + * {@link com.android.internal.telephony.CallForwardInfo#number} to contain non-numerical + * characters instead of a number. + * + * If true, we will detect the non-numerical characters and replace them with "Voicemail". + * @hide + */ + public static final String KEY_CALL_FORWARDING_MAP_NON_NUMBER_TO_VOICEMAIL_BOOL = + "call_forwarding_map_non_number_to_voicemail_bool"; + + /** * Determines whether conference calls are supported by a carrier. When {@code true}, * conference calling is supported, {@code false otherwise}. */ @@ -1697,6 +1709,7 @@ public class CarrierConfigManager { sDefaults.putInt(KEY_GSM_DTMF_TONE_DELAY_INT, 0); sDefaults.putInt(KEY_IMS_DTMF_TONE_DELAY_INT, 0); sDefaults.putInt(KEY_CDMA_DTMF_TONE_DELAY_INT, 100); + sDefaults.putBoolean(KEY_CALL_FORWARDING_MAP_NON_NUMBER_TO_VOICEMAIL_BOOL, false); sDefaults.putInt(KEY_CDMA_3WAYCALL_FLASH_DELAY_INT , 0); sDefaults.putBoolean(KEY_SUPPORT_CONFERENCE_CALL_BOOL, true); sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_CALL_BOOL, true); diff --git a/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java b/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java index ac196b5359ae..5523f7177069 100644 --- a/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java +++ b/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java @@ -288,7 +288,7 @@ public class MbmsDownloadReceiver extends BroadcastReceiver { return; } - List<Uri> tempFiles = intent.getParcelableExtra(VendorUtils.EXTRA_TEMP_LIST); + List<Uri> tempFiles = intent.getParcelableArrayListExtra(VendorUtils.EXTRA_TEMP_LIST); if (tempFiles == null) { return; } @@ -310,7 +310,7 @@ public class MbmsDownloadReceiver extends BroadcastReceiver { return; } int fdCount = intent.getIntExtra(VendorUtils.EXTRA_FD_COUNT, 0); - List<Uri> pausedList = intent.getParcelableExtra(VendorUtils.EXTRA_PAUSED_LIST); + List<Uri> pausedList = intent.getParcelableArrayListExtra(VendorUtils.EXTRA_PAUSED_LIST); if (fdCount == 0 && (pausedList == null || pausedList.size() == 0)) { Log.i(LOG_TAG, "No temp files actually requested. Ending."); @@ -493,9 +493,14 @@ public class MbmsDownloadReceiver extends BroadcastReceiver { } catch (PackageManager.NameNotFoundException e) { throw new RuntimeException("Package manager couldn't find " + context.getPackageName()); } + if (appInfo.metaData == null) { + throw new RuntimeException("App must declare the file provider authority as metadata " + + "in the manifest."); + } String authority = appInfo.metaData.getString(MBMS_FILE_PROVIDER_META_DATA_KEY); if (authority == null) { - throw new RuntimeException("Must declare the file provider authority as meta data"); + throw new RuntimeException("App must declare the file provider authority as metadata " + + "in the manifest."); } return authority; } |