diff options
author | Dan Egnor <egnor@google.com> | 2010-02-10 19:27:58 -0800 |
---|---|---|
committer | Dan Egnor <egnor@google.com> | 2010-02-11 10:22:09 -0800 |
commit | 18e939623556928f73fcc7511c85a537929a4a7e (patch) | |
tree | e1e85e2634f45742a4f358ad640f5a0ed76066c0 /core | |
parent | 4e208bd8722ad48c342c0128313ef40971234121 (diff) | |
download | frameworks_base-18e939623556928f73fcc7511c85a537929a4a7e.zip frameworks_base-18e939623556928f73fcc7511c85a537929a4a7e.tar.gz frameworks_base-18e939623556928f73fcc7511c85a537929a4a7e.tar.bz2 |
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
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/os/ICheckinService.aidl | 6 | ||||
-rw-r--r-- | core/java/android/webkit/EventLogTags.logtags | 11 | ||||
-rw-r--r-- | core/java/android/webkit/WebSettings.java | 6 | ||||
-rw-r--r-- | core/java/android/webkit/WebView.java | 12 | ||||
-rw-r--r-- | core/res/AndroidManifest.xml | 4 |
5 files changed, 21 insertions, 18 deletions
diff --git a/core/java/android/os/ICheckinService.aidl b/core/java/android/os/ICheckinService.aidl index e5609b0..37af496 100644 --- a/core/java/android/os/ICheckinService.aidl +++ b/core/java/android/os/ICheckinService.aidl @@ -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. diff --git a/core/java/android/webkit/EventLogTags.logtags b/core/java/android/webkit/EventLogTags.logtags new file mode 100644 index 0000000..082a437 --- /dev/null +++ b/core/java/android/webkit/EventLogTags.logtags @@ -0,0 +1,11 @@ +# 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) diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index c021af4..39e5275 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -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(); diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 8fa8f09..b0233ab 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -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); diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 6f57fa5..1ae736e 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1304,6 +1304,10 @@ <receiver android:name="com.android.server.MasterClearReceiver" android:permission="android.permission.MASTER_CLEAR" > <intent-filter> + <!-- For Checkin, Settings, etc.: action=MASTER_CLEAR --> + <action android:name="android.intent.action.MASTER_CLEAR" /> + + <!-- MCS always uses REMOTE_INTENT: category=MASTER_CLEAR --> <action android:name="android.intent.action.REMOTE_INTENT" /> <category android:name="android.intent.category.MASTER_CLEAR" /> </intent-filter> |