Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Tuesday, January 12, 2016

Google thinks my tablet is a car

As an Android developer I often analyze system logs from my tablet. Starting from some recent updates (presumably, since Android 6.0) I see peculiar records there from time to time.

I/ActivityManager(591): Start proc 7994:com.google.android.gms:car/u0a21 for service com.google.android.gms/.car.CarService ... D/ChimeraCfgMgr(7994): Loading module com.google.android.gms.car from APK com.google.android.gms ... D/CAR.SERVICE(7994): Connecting to CarCallService... D/CAR.SERVICE(7994): com.google.android.projection.gearhead isn't installed. D/CAR.TEL.Service(7994): Creating a new CarCallService. W/ActivityManager(591): Unable to start service Intent { act=local_bind cmp=com.google.android.gms/.car.InCallServiceImpl } U=0: not found D/CAR.TEL.PhoneAdapter(7994): setListener: com.google.android.gms.car.dn@43460a D/NativeLibraryUtils(7994): Install completed successfully. count=14 extracted=0 D/CAR.TEL.Service(7994): Starting CarCallService with initial phone null ... D/CAR.SERVICE(7994): mConnectedToCar = false, abort E/ActivityThread(7994): Service com.google.android.gms.car.CarService has leaked ServiceConnection com.google.android.gms.car.hr@b3012b2 that was originally bound here E/ActivityThread(7994): android.app.ServiceConnectionLeaked: Service com.google.android.gms.car.CarService has leaked ServiceConnection com.google.android.gms.car.hr@b3012b2 that was originally bound here E/ActivityThread(7994): at android.app.LoadedApk$ServiceDispatcher.(LoadedApk.java:1092) E/ActivityThread(7994): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:986) E/ActivityThread(7994): at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1303) E/ActivityThread(7994): at android.app.ContextImpl.bindService(ContextImpl.java:1286) E/ActivityThread(7994): at android.content.ContextWrapper.bindService(ContextWrapper.java:604) E/ActivityThread(7994): at android.content.ContextWrapper.bindService(ContextWrapper.java:604) E/ActivityThread(7994): at android.content.ContextWrapper.bindService(ContextWrapper.java:604) E/ActivityThread(7994): at com.google.android.gms.common.stats.g.a(SourceFile:128) E/ActivityThread(7994): at com.google.android.gms.common.stats.g.a(SourceFile:145) E/ActivityThread(7994): at com.google.android.gms.car.hc.(SourceFile:319) E/ActivityThread(7994): at com.google.android.gms.car.CarChimeraService.onCreate(SourceFile:74) E/ActivityThread(7994): at com.google.android.chimera.ServiceProxy.setImpl(SourceFile:115) E/ActivityThread(7994): at com.google.android.chimera.ServiceProxy.onCreate(SourceFile:105) E/ActivityThread(7994): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2877) E/ActivityThread(7994): at android.app.ActivityThread.-wrap4(ActivityThread.java) E/ActivityThread(7994): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1427) E/ActivityThread(7994): at android.os.Handler.dispatchMessage(Handler.java:102) E/ActivityThread(7994): at android.os.Looper.loop(Looper.java:148) E/ActivityThread(7994): at android.app.ActivityThread.main(ActivityThread.java:5417) E/ActivityThread(7994): at java.lang.reflect.Method.invoke(Native Method) E/ActivityThread(7994): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) E/ActivityThread(7994): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

What this means is that Android lives its own life, very far from reality, and tries to run tons of useless crap behind the scene, without user consent.

I don't have a car and my tablet has not ever been connected to one. Yet Google thinks it's acceptable to waste device's resources unconditionally and embed such ridiculous services into the system core. For example, the car service lives inside com.google.android.gms, which is a part of indispensable Google Play.

Monday, December 22, 2014

Android 5 (Lollipop) broke some Hibernate functionality

As you may know I have a side project for Android called Hibernate which is mentioned here on the blog site among other useful links, and has its own dedicated page with a short description. So I think it's not too much offtopic here if I post a piece of news about Hibernate. Unfortunately this is bad news.

Android 5.0.1 Lollipop broke some of Hibernate's functionality. Google made some changes in the new OS that made it impossible to monitor foreground task via ActivityManager. Most importantly, it was done intentionally and based on some paranoid security considerations (see below), so no workaround is left for non-rooted devices. I must say this is not the first time when Google changes their OS in very questionnable manner and actually degrades user experience.

Here is what the official documentation says about getRunningTasks method of ActivityManager:

This method is no longer available to third party applications: the introduction of document-centric recents means it can leak person information to the caller. For backwards compatibility, it will still return a small subset of its data: at least the caller's own tasks, and possibly some other tasks such as home that are known to not be sensitive.

As a result, the option Rehibernation in the Hibernate app has no effect anymore. But I'm trying to elaborate a workaround anyway.

As a side-effect, the system log is flooded with messages:

getTasks: caller XXXXX does not hold GET_TASKS; limiting output

but this does not impair usability.

Wednesday, December 10, 2014

OFF: Android 5.0.1 is off

You may have noticed that WiFiLine project is in the shade of other side projects I'm trying to experiment with. I have some ideas for WiFiLine's future, but at this time I'd like to share first thoughts about new Android version - 5.0.1 - which I received with an Over-The-Air update.

I did not do much testing so far, but here are the points that just strike the eye.

  • standard font size is too small; I was compelled to change system settings for using "Huge" fonts (this is maximum), only after this the texts in dialogs and notifications became as much readable as before (with standard font size);
  • the settings dialog is now organized into 2 columns, which is very unconvenient and hard to read in comparison with the previously known streamlined list;
  • standard keyboard is almost unusable in its "modern" flat design; luckily, there is an option to select a "Holo" theme for the keyboard, so that it brings back conventional look and feel;
  • the last annoying thing is a mess with system statuses and notifications - I'll put the details below, outside the list;

As you know there is the status bar in the upper part of the screen. On the left side notification are shown, on the right side system information about connectivity, battery power etc. is shown. In previous versions of Android swipe down gestures worked separately for the left and the right sides, that is they open either notification list or a dropdown box with quick access options. Now they are combined! No matter where you perform the swipe down - on the left or on the right side - you see the same picture, and the dropdown box is shown in the center. This is very unexpected and inconsistent. Also this does not impove usability in any way, because the options are now buried under notifications: you need to perform 2 swipe down gestures in a row - first to open the dropdown, and the second - to move notification underneath - only after this the options appear.

I hope functional improvements in Android 5 are not designed in the same counterproductive manner as with appearence and usability.