OSDN Git Service

android-x86/packages-services-Analytics.git
6 years agoAnalyticsService: report the build info in power events android-x86-7.1-r1 android-x86-7.1-r2 android-x86-7.1-r3
Chih-Wei Huang [Thu, 19 Oct 2017 03:46:48 +0000 (11:46 +0800)]
AnalyticsService: report the build info in power events

Set buind info to the label of power events so we can know
what the build is in Google Analytics.

6 years agoAnalyticsService: get rid of getBaseContext()
Chih-Wei Huang [Thu, 19 Oct 2017 03:12:00 +0000 (11:12 +0800)]
AnalyticsService: get rid of getBaseContext()

According to Dianne Hackborn, the Google chief engineer working on
the Android framework:

"Don't use getBaseContext(), just use the Context you have."

Refer to http://stackoverflow.com/questions/1026973 for the usages
of various Contexts.

6 years agoAnalyticsService: combine two services
Chih-Wei Huang [Wed, 18 Oct 2017 10:33:13 +0000 (18:33 +0800)]
AnalyticsService: combine two services

The functionality of HardwareCollectorService is very simple.
It's unnecessary to make it as a separate service.

Just merge it into the AnalyticsService to save resources.

6 years agoAnalyticsService: handle AOSP's ACTION_BOOT_COMPLETED directly
Chih-Wei Huang [Tue, 17 Oct 2017 08:23:34 +0000 (16:23 +0800)]
AnalyticsService: handle AOSP's ACTION_BOOT_COMPLETED directly

I don't understand why it emits another custom ACTION_BOOT_COMPLETED
to do the work indirectly. It's totatly broken in Nougat.
The ActivityManager complains:

10-17 08:03:38.950  1426  1951 E ActivityManager: Sending non-protected broadcast org.android_x86.boot_completed from system 1985:org.android_x86.analytics/u0a0 pkg org.android_x86.analytics
10-17 08:03:38.950  1426  1951 E ActivityManager: java.lang.Throwable
10-17 08:03:38.950  1426  1951 E ActivityManager:       at com.android.server.am.ActivityManagerService.checkBroadcastFromSystem(ActivityManagerService.java:17927)
10-17 08:03:38.950  1426  1951 E ActivityManager:       at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:18499)
10-17 08:03:38.950  1426  1951 E ActivityManager:       at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:18590)
10-17 08:03:38.950  1426  1951 E ActivityManager:       at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:499)
10-17 08:03:38.950  1426  1951 E ActivityManager:       at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2806)
10-17 08:03:38.950  1426  1951 E ActivityManager:       at android.os.Binder.execTransact(Binder.java:565)

Fix it by removing the custom ACTION_BOOT_COMPLETED and handle
ACTION_BOOT_COMPLETED of AOSP directly.

6 years agoAnalyticsService: remove non-existent folder
Chih-Wei Huang [Thu, 7 Sep 2017 07:12:55 +0000 (15:12 +0800)]
AnalyticsService: remove non-existent folder

To avoid the warning:

packages/services/Analytics/Service/Android.mk:11: warning: FindEmulator: find: `packages/services/Analytics/Service/protos': No such file or directory

7 years agoHardwareCollector: send sensors info marshmallow-x86 android-x86-6.0-r1 android-x86-6.0-r2 android-x86-6.0-r3
Chih-Wei Huang [Mon, 15 Aug 2016 05:13:43 +0000 (13:13 +0800)]
HardwareCollector: send sensors info

Send the sensors hal name if it's not the default kbd.

7 years agoUtils: fix circular dependency
Chih-Wei Huang [Mon, 15 Aug 2016 03:54:56 +0000 (11:54 +0800)]
Utils: fix circular dependency

Use the prebuilt jar from SDK to avoid the circular dependency issue.

7 years agoHardwareCollector: send wifi and ethernet info
Chih-Wei Huang [Wed, 10 Aug 2016 16:50:31 +0000 (00:50 +0800)]
HardwareCollector: send wifi and ethernet info

Send the wifi and ethernet module names to GA if
the interfaces are found.

7 years agoInvoke HardwareCollector conditionally
Chih-Wei Huang [Wed, 10 Aug 2016 09:48:55 +0000 (17:48 +0800)]
Invoke HardwareCollector conditionally

Only collect hardware information if the users agree.

7 years agoAnalyticsService: send anonymous usage information to GA
Hugo [Sat, 9 Jul 2016 10:34:42 +0000 (18:34 +0800)]
AnalyticsService: send anonymous usage information to GA

This library receive usage informations from system processes and system
applications and send these informations anonymously to Google Analytics
servers.

7 years agoHardwareCollector: send hardware information to GA
Hugo [Sat, 9 Jul 2016 10:09:49 +0000 (18:09 +0800)]
HardwareCollector: send hardware information to GA

This app/service will collect informations about device hardware after
boot completed and send these informations to AnalyticsService that will
in turn anonymously send these informations to Google Analytics servers.

7 years agoanalytics-utils: library to communicate with AnalyticsService
Hugo [Fri, 8 Jul 2016 06:45:22 +0000 (14:45 +0800)]
analytics-utils: library to communicate with AnalyticsService

This library sends anonymous usage information to the AnalyticsService
application/service that will in turn send this information to Google
analytics.