Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18e93962 authored by Dan Egnor's avatar Dan Egnor
Browse files

Eliminate dependencies on Checkin, replacing checkin events with EventLog

events (and in one case, a DropBox entry).

Add a simple intent that triggers master-clear (and toggle EFS), given the
right permissions.

Bug: 2264596
Bug: 2350452
Bug: 2264596
parent 4e208bd8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -34,7 +34,10 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call find-other-java-files,$(FRAMEWORKS_BASE_SUBDIRS))

# EventLogTags files.
LOCAL_SRC_FILES += core/java/android/content/EventLogTags.logtags
LOCAL_SRC_FILES += \
       core/java/android/content/EventLogTags.logtags \
       core/java/android/webkit/EventLogTags.logtags \
       telephony/java/com/android/internal/telephony/EventLogTags.logtags \

# The following filters out code we are temporarily not including at all.
# TODO: Move AWT and beans (and associated harmony code) back into libcore.
+0 −6
Original line number Diff line number Diff line
@@ -26,12 +26,6 @@ import android.os.IParentalControlCallback;
 * {@hide}
 */
interface ICheckinService {
    /** Reboot into the recovery system and wipe all user data. */
    void masterClear();

    /** Reboot into the recovery system, wipe all user data and enable Encrypted File Systems. */
    void masterClearAndToggleEFS(boolean efsEnabled);

    /**
     * Determine if the device is under parental control. Return null if
     * we are unable to check the parental control status.
+11 −0
Original line number Diff line number Diff line
# See system/core/logcat/event.logtags for a description of the format of this file.

option java_package android.webkit;

# browser stats for diary study
70101 browser_zoom_level_change (start level|1|5),(end level|1|5),(time|2|3)
70102 browser_double_tap_duration (duration|1|3),(time|2|3)
# 70103- used by the browser app itself

70150 browser_snap_center
70151 browser_text_size_change (oldSize|1|5), (newSize|1|5)
+3 −3
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.provider.Checkin;
import android.util.EventLog;
import java.lang.SecurityException;
import java.util.Locale;

@@ -501,8 +501,8 @@ public class WebSettings {
     */
    public synchronized void setTextSize(TextSize t) {
        if (WebView.mLogEvent && mTextSize != t ) {
            Checkin.updateStats(mContext.getContentResolver(),
                    Checkin.Stats.Tag.BROWSER_TEXT_SIZE_CHANGE, 1, 0.0);
            EventLog.writeEvent(EventLogTags.BROWSER_TEXT_SIZE_CHANGE,
                    mTextSize.value, t.value);
        }
        mTextSize = t;
        postSync();
+3 −9
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ import android.os.Handler;
import android.os.Message;
import android.os.ServiceManager;
import android.os.SystemClock;
import android.provider.Checkin;
import android.text.IClipboard;
import android.text.Selection;
import android.text.Spannable;
@@ -623,8 +622,6 @@ public class WebView extends AbsoluteLayout
    private boolean mGotKeyDown;

    /* package */ static boolean mLogEvent = true;
    private static final int EVENT_LOG_ZOOM_LEVEL_CHANGE = 70101;
    private static final int EVENT_LOG_DOUBLE_TAP_DURATION = 70102;

    // for event log
    private long mLastTouchUpTime = 0;
@@ -4453,7 +4450,7 @@ public class WebView extends AbsoluteLayout
                    mWebViewCore.sendMessage(
                            EventHub.UPDATE_FRAME_CACHE_IF_LOADING);
                    if (mLogEvent && eventTime - mLastTouchUpTime < 1000) {
                        EventLog.writeEvent(EVENT_LOG_DOUBLE_TAP_DURATION,
                        EventLog.writeEvent(EventLogTags.BROWSER_DOUBLE_TAP_DURATION,
                                (eventTime - mLastTouchUpTime), eventTime);
                    }
                }
@@ -5389,11 +5386,8 @@ public class WebView extends AbsoluteLayout
    }

    private void doMotionUp(int contentX, int contentY) {
        if (nativeMotionUp(contentX, contentY, mNavSlop)) {
            if (mLogEvent) {
                Checkin.updateStats(mContext.getContentResolver(),
                        Checkin.Stats.Tag.BROWSER_SNAP_CENTER, 1, 0.0);
            }
        if (mLogEvent && nativeMotionUp(contentX, contentY, mNavSlop)) {
            EventLog.writeEvent(EventLogTags.BROWSER_SNAP_CENTER);
        }
        if (nativeHasCursorNode() && !nativeCursorIsTextInput()) {
            playSoundEffect(SoundEffectConstants.CLICK);
Loading