Loading api/4.xml +2 −2 Original line number Original line Diff line number Diff line Loading @@ -88821,7 +88821,7 @@ type="java.lang.String" type="java.lang.String" transient="false" transient="false" volatile="false" volatile="false" value=""title"" value=""title_key"" static="true" static="true" final="true" final="true" deprecated="not deprecated" deprecated="not deprecated" Loading Loading @@ -88918,7 +88918,7 @@ type="java.lang.String" type="java.lang.String" transient="false" transient="false" volatile="false" volatile="false" value=""title"" value=""title_key"" static="true" static="true" final="true" final="true" deprecated="not deprecated" deprecated="not deprecated" api/current.xml +399 −13 Original line number Original line Diff line number Diff line Loading @@ -3485,17 +3485,6 @@ visibility="public" visibility="public" > > </field> </field> <field name="donut_resource_pad22" type="int" transient="false" volatile="false" value="16843402" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad3" <field name="donut_resource_pad3" type="int" type="int" transient="false" transient="false" Loading Loading @@ -7379,6 +7368,17 @@ visibility="public" visibility="public" > > </field> </field> <field name="searchSettingsDescription" type="int" transient="false" volatile="false" value="16843402" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="searchSuggestAuthority" <field name="searchSuggestAuthority" type="int" type="int" transient="false" transient="false" Loading Loading @@ -34778,6 +34778,17 @@ visibility="public" visibility="public" > > </field> </field> <field name="ACTION_BATTERY_OKAY" type="java.lang.String" transient="false" volatile="false" value=""android.intent.action.BATTERY_OKAY"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ACTION_BOOT_COMPLETED" <field name="ACTION_BOOT_COMPLETED" type="java.lang.String" type="java.lang.String" transient="false" transient="false" Loading Loading @@ -108253,7 +108264,7 @@ type="java.lang.String" type="java.lang.String" transient="false" transient="false" volatile="false" volatile="false" value=""title"" value=""title_key"" static="true" static="true" final="true" final="true" deprecated="not deprecated" deprecated="not deprecated" Loading Loading @@ -108350,7 +108361,7 @@ type="java.lang.String" type="java.lang.String" transient="false" transient="false" volatile="false" volatile="false" value=""title"" value=""title_key"" static="true" static="true" final="true" final="true" deprecated="not deprecated" deprecated="not deprecated" Loading Loading @@ -112892,6 +112903,344 @@ </field> </field> </class> </class> </package> </package> <package name="android.speech.tts" > <class name="TextToSpeech" extends="java.lang.Object" abstract="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <constructor name="TextToSpeech" type="android.speech.tts.TextToSpeech" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="listener" type="android.speech.tts.TextToSpeech.OnInitListener"> </parameter> </constructor> <method name="addSpeech" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> <parameter name="packagename" type="java.lang.String"> </parameter> <parameter name="resourceId" type="int"> </parameter> </method> <method name="addSpeech" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> <parameter name="filename" type="java.lang.String"> </parameter> </method> <method name="getLanguage" return="java.util.Locale" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isLanguageAvailable" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="loc" type="java.util.Locale"> </parameter> </method> <method name="isSpeaking" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="playEarcon" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="earcon" type="java.lang.String"> </parameter> <parameter name="queueMode" type="int"> </parameter> <parameter name="params" type="java.util.HashMap<java.lang.String, java.lang.String>"> </parameter> </method> <method name="playSilence" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="durationInMs" type="long"> </parameter> <parameter name="queueMode" type="int"> </parameter> </method> <method name="setLanguage" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="loc" type="java.util.Locale"> </parameter> </method> <method name="setPitch" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="pitch" type="float"> </parameter> </method> <method name="setSpeechRate" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="speechRate" type="float"> </parameter> </method> <method name="shutdown" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="speak" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> <parameter name="queueMode" type="int"> </parameter> <parameter name="params" type="java.util.HashMap<java.lang.String, java.lang.String>"> </parameter> </method> <method name="stop" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="synthesizeToFile" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> <parameter name="params" type="java.util.HashMap<java.lang.String, java.lang.String>"> </parameter> <parameter name="filename" type="java.lang.String"> </parameter> </method> <field name="TTS_ERROR" type="int" transient="false" volatile="false" value="-1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_LANG_AVAILABLE" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_LANG_COUNTRY_AVAILABLE" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_LANG_COUNTRY_VAR_AVAILABLE" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_LANG_MISSING_DATA" type="int" transient="false" volatile="false" value="-1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_LANG_NOT_SUPPORTED" type="int" transient="false" volatile="false" value="-2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_QUEUE_ADD" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_QUEUE_FLUSH" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_SUCCESS" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <interface name="TextToSpeech.OnInitListener" abstract="true" static="true" final="false" deprecated="not deprecated" visibility="public" > <method name="onInit" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="status" type="int"> </parameter> </method> </interface> </package> <package name="android.telephony" <package name="android.telephony" > > <class name="CellLocation" <class name="CellLocation" Loading Loading @@ -143197,6 +143546,21 @@ <parameter name="units" type="int"> <parameter name="units" type="int"> </parameter> </parameter> </method> </method> <method name="computeCurrentVelocity" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="units" type="int"> </parameter> <parameter name="maxVelocity" type="float"> </parameter> </method> <method name="getXVelocity" <method name="getXVelocity" return="float" return="float" abstract="false" abstract="false" Loading Loading @@ -147600,6 +147964,17 @@ visibility="public" visibility="public" > > </method> </method> <method name="getMaximumFlingVelocity" return="int" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="deprecated" visibility="public" > </method> <method name="getMinimumFlingVelocity" <method name="getMinimumFlingVelocity" return="int" return="int" abstract="false" abstract="false" Loading Loading @@ -147666,6 +148041,17 @@ visibility="public" visibility="public" > > </method> </method> <method name="getScaledMaximumFlingVelocity" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getScaledMinimumFlingVelocity" <method name="getScaledMinimumFlingVelocity" return="int" return="int" abstract="false" abstract="false" cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java +26 −0 Original line number Original line Diff line number Diff line Loading @@ -97,6 +97,11 @@ public final class Bmgr { return; return; } } if ("wipe".equals(op)) { doWipe(); return; } System.err.println("Unknown command"); System.err.println("Unknown command"); showUsage(); showUsage(); } } Loading Loading @@ -183,6 +188,22 @@ public final class Bmgr { } } } } private void doWipe() { String pkg = nextArg(); if (pkg == null) { showUsage(); return; } try { mBmgr.clearBackupData(pkg); System.out.println("Wiped backup data for " + pkg); } catch (RemoteException e) { System.err.println(e.toString()); System.err.println(BMGR_NOT_RUNNING_ERR); } } private void doList() { private void doList() { String arg = nextArg(); // sets, transports, packages set# String arg = nextArg(); // sets, transports, packages set# if ("transports".equals(arg)) { if ("transports".equals(arg)) { Loading Loading @@ -343,6 +364,7 @@ public final class Bmgr { System.err.println(" bmgr transport WHICH"); System.err.println(" bmgr transport WHICH"); System.err.println(" bmgr restore TOKEN"); System.err.println(" bmgr restore TOKEN"); System.err.println(" bmgr run"); System.err.println(" bmgr run"); System.err.println(" bmgr wipe PACKAGE"); System.err.println(""); System.err.println(""); System.err.println("The 'backup' command schedules a backup pass for the named package."); System.err.println("The 'backup' command schedules a backup pass for the named package."); System.err.println("Note that the backup pass will effectively be a no-op if the package"); System.err.println("Note that the backup pass will effectively be a no-op if the package"); Loading Loading @@ -373,5 +395,9 @@ public final class Bmgr { System.err.println("The 'run' command causes any scheduled backup operation to be initiated"); System.err.println("The 'run' command causes any scheduled backup operation to be initiated"); System.err.println("immediately, without the usual waiting period for batching together"); System.err.println("immediately, without the usual waiting period for batching together"); System.err.println("data changes."); System.err.println("data changes."); System.err.println(""); System.err.println("The 'wipe' command causes all backed-up data for the given package to be"); System.err.println("erased from the current transport's storage. The next backup operation"); System.err.println("that the given application performs will rewrite its entire data set."); } } } } cmds/keystore/Android.mk +4 −3 Original line number Original line Diff line number Diff line Loading @@ -4,13 +4,14 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ LOCAL_SRC_FILES:= \ keystore.c commands.c netkeystore.c keymgmt.c LOCAL_C_INCLUDES := \ LOCAL_C_INCLUDES := \ $(call include-path-for, system-core)/cutils $(call include-path-for, system-core)/cutils \ external/openssl/include LOCAL_SHARED_LIBRARIES := \ LOCAL_SHARED_LIBRARIES := \ libcutils libcutils libssl LOCAL_STATIC_LIBRARIES := LOCAL_STATIC_LIBRARIES := Loading cmds/keystore/certtool.h 0 → 100644 +91 −0 Original line number Original line Diff line number Diff line /* ** ** Copyright 2009, 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. */ #ifndef __CERTTOOL_H__ #define __CERTTOOL_H__ #include <stdio.h> #include <string.h> #include <cutils/sockets.h> #include <cutils/log.h> #include "common.h" #include "netkeystore.h" #define CERT_NAME_LEN (2 * MAX_KEY_NAME_LENGTH + 2) /* * The specific function 'get_cert' is used in daemons to get the key value * from keystore. Caller should allocate the buffer and the length of the buffer * should be MAX_KEY_VALUE_LENGTH. */ static inline int get_cert(const char *certname, unsigned char *value, int *size) { int count, fd, ret = -1; LPC_MARSHAL cmd; char delimiter[] = "_"; char *namespace, *keyname; char *context = NULL; char cname[CERT_NAME_LEN]; if ((certname == NULL) || (value == NULL)) { LOGE("get_cert: certname or value is null\n"); return -1; } if (strlcpy(cname, certname, CERT_NAME_LEN) >= CERT_NAME_LEN) { LOGE("get_cert: keyname is too long\n"); return -1; } fd = socket_local_client(SOCKET_PATH, ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); if (fd == -1) { LOGE("Keystore service is not up and running.\n"); return -1; } cmd.opcode = GET; if (((namespace = strtok_r(cname, delimiter, &context)) == NULL) || ((keyname = strtok_r(NULL, delimiter, &context)) == NULL)) { goto err; } if ((cmd.len = snprintf((char*)cmd.data, BUFFER_MAX, "%s %s", namespace, keyname)) > (2 * MAX_KEY_NAME_LENGTH + 1)) goto err; if (write_marshal(fd, &cmd)) { LOGE("Incorrect command or command line is too long.\n"); goto err; } if (read_marshal(fd, &cmd)) { LOGE("Failed to read the result.\n"); goto err; } // copy the result if succeeded. if (!cmd.retcode && cmd.len <= BUFFER_MAX) { memcpy(value, cmd.data, cmd.len); ret = 0; *size = cmd.len; } err: close(fd); return ret; } #endif Loading
api/4.xml +2 −2 Original line number Original line Diff line number Diff line Loading @@ -88821,7 +88821,7 @@ type="java.lang.String" type="java.lang.String" transient="false" transient="false" volatile="false" volatile="false" value=""title"" value=""title_key"" static="true" static="true" final="true" final="true" deprecated="not deprecated" deprecated="not deprecated" Loading Loading @@ -88918,7 +88918,7 @@ type="java.lang.String" type="java.lang.String" transient="false" transient="false" volatile="false" volatile="false" value=""title"" value=""title_key"" static="true" static="true" final="true" final="true" deprecated="not deprecated" deprecated="not deprecated"
api/current.xml +399 −13 Original line number Original line Diff line number Diff line Loading @@ -3485,17 +3485,6 @@ visibility="public" visibility="public" > > </field> </field> <field name="donut_resource_pad22" type="int" transient="false" volatile="false" value="16843402" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad3" <field name="donut_resource_pad3" type="int" type="int" transient="false" transient="false" Loading Loading @@ -7379,6 +7368,17 @@ visibility="public" visibility="public" > > </field> </field> <field name="searchSettingsDescription" type="int" transient="false" volatile="false" value="16843402" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="searchSuggestAuthority" <field name="searchSuggestAuthority" type="int" type="int" transient="false" transient="false" Loading Loading @@ -34778,6 +34778,17 @@ visibility="public" visibility="public" > > </field> </field> <field name="ACTION_BATTERY_OKAY" type="java.lang.String" transient="false" volatile="false" value=""android.intent.action.BATTERY_OKAY"" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ACTION_BOOT_COMPLETED" <field name="ACTION_BOOT_COMPLETED" type="java.lang.String" type="java.lang.String" transient="false" transient="false" Loading Loading @@ -108253,7 +108264,7 @@ type="java.lang.String" type="java.lang.String" transient="false" transient="false" volatile="false" volatile="false" value=""title"" value=""title_key"" static="true" static="true" final="true" final="true" deprecated="not deprecated" deprecated="not deprecated" Loading Loading @@ -108350,7 +108361,7 @@ type="java.lang.String" type="java.lang.String" transient="false" transient="false" volatile="false" volatile="false" value=""title"" value=""title_key"" static="true" static="true" final="true" final="true" deprecated="not deprecated" deprecated="not deprecated" Loading Loading @@ -112892,6 +112903,344 @@ </field> </field> </class> </class> </package> </package> <package name="android.speech.tts" > <class name="TextToSpeech" extends="java.lang.Object" abstract="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <constructor name="TextToSpeech" type="android.speech.tts.TextToSpeech" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="listener" type="android.speech.tts.TextToSpeech.OnInitListener"> </parameter> </constructor> <method name="addSpeech" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> <parameter name="packagename" type="java.lang.String"> </parameter> <parameter name="resourceId" type="int"> </parameter> </method> <method name="addSpeech" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> <parameter name="filename" type="java.lang.String"> </parameter> </method> <method name="getLanguage" return="java.util.Locale" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isLanguageAvailable" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="loc" type="java.util.Locale"> </parameter> </method> <method name="isSpeaking" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="playEarcon" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="earcon" type="java.lang.String"> </parameter> <parameter name="queueMode" type="int"> </parameter> <parameter name="params" type="java.util.HashMap<java.lang.String, java.lang.String>"> </parameter> </method> <method name="playSilence" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="durationInMs" type="long"> </parameter> <parameter name="queueMode" type="int"> </parameter> </method> <method name="setLanguage" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="loc" type="java.util.Locale"> </parameter> </method> <method name="setPitch" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="pitch" type="float"> </parameter> </method> <method name="setSpeechRate" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="speechRate" type="float"> </parameter> </method> <method name="shutdown" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="speak" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> <parameter name="queueMode" type="int"> </parameter> <parameter name="params" type="java.util.HashMap<java.lang.String, java.lang.String>"> </parameter> </method> <method name="stop" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="synthesizeToFile" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> <parameter name="params" type="java.util.HashMap<java.lang.String, java.lang.String>"> </parameter> <parameter name="filename" type="java.lang.String"> </parameter> </method> <field name="TTS_ERROR" type="int" transient="false" volatile="false" value="-1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_LANG_AVAILABLE" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_LANG_COUNTRY_AVAILABLE" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_LANG_COUNTRY_VAR_AVAILABLE" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_LANG_MISSING_DATA" type="int" transient="false" volatile="false" value="-1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_LANG_NOT_SUPPORTED" type="int" transient="false" volatile="false" value="-2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_QUEUE_ADD" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_QUEUE_FLUSH" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TTS_SUCCESS" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <interface name="TextToSpeech.OnInitListener" abstract="true" static="true" final="false" deprecated="not deprecated" visibility="public" > <method name="onInit" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="status" type="int"> </parameter> </method> </interface> </package> <package name="android.telephony" <package name="android.telephony" > > <class name="CellLocation" <class name="CellLocation" Loading Loading @@ -143197,6 +143546,21 @@ <parameter name="units" type="int"> <parameter name="units" type="int"> </parameter> </parameter> </method> </method> <method name="computeCurrentVelocity" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="units" type="int"> </parameter> <parameter name="maxVelocity" type="float"> </parameter> </method> <method name="getXVelocity" <method name="getXVelocity" return="float" return="float" abstract="false" abstract="false" Loading Loading @@ -147600,6 +147964,17 @@ visibility="public" visibility="public" > > </method> </method> <method name="getMaximumFlingVelocity" return="int" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="deprecated" visibility="public" > </method> <method name="getMinimumFlingVelocity" <method name="getMinimumFlingVelocity" return="int" return="int" abstract="false" abstract="false" Loading Loading @@ -147666,6 +148041,17 @@ visibility="public" visibility="public" > > </method> </method> <method name="getScaledMaximumFlingVelocity" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getScaledMinimumFlingVelocity" <method name="getScaledMinimumFlingVelocity" return="int" return="int" abstract="false" abstract="false"
cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java +26 −0 Original line number Original line Diff line number Diff line Loading @@ -97,6 +97,11 @@ public final class Bmgr { return; return; } } if ("wipe".equals(op)) { doWipe(); return; } System.err.println("Unknown command"); System.err.println("Unknown command"); showUsage(); showUsage(); } } Loading Loading @@ -183,6 +188,22 @@ public final class Bmgr { } } } } private void doWipe() { String pkg = nextArg(); if (pkg == null) { showUsage(); return; } try { mBmgr.clearBackupData(pkg); System.out.println("Wiped backup data for " + pkg); } catch (RemoteException e) { System.err.println(e.toString()); System.err.println(BMGR_NOT_RUNNING_ERR); } } private void doList() { private void doList() { String arg = nextArg(); // sets, transports, packages set# String arg = nextArg(); // sets, transports, packages set# if ("transports".equals(arg)) { if ("transports".equals(arg)) { Loading Loading @@ -343,6 +364,7 @@ public final class Bmgr { System.err.println(" bmgr transport WHICH"); System.err.println(" bmgr transport WHICH"); System.err.println(" bmgr restore TOKEN"); System.err.println(" bmgr restore TOKEN"); System.err.println(" bmgr run"); System.err.println(" bmgr run"); System.err.println(" bmgr wipe PACKAGE"); System.err.println(""); System.err.println(""); System.err.println("The 'backup' command schedules a backup pass for the named package."); System.err.println("The 'backup' command schedules a backup pass for the named package."); System.err.println("Note that the backup pass will effectively be a no-op if the package"); System.err.println("Note that the backup pass will effectively be a no-op if the package"); Loading Loading @@ -373,5 +395,9 @@ public final class Bmgr { System.err.println("The 'run' command causes any scheduled backup operation to be initiated"); System.err.println("The 'run' command causes any scheduled backup operation to be initiated"); System.err.println("immediately, without the usual waiting period for batching together"); System.err.println("immediately, without the usual waiting period for batching together"); System.err.println("data changes."); System.err.println("data changes."); System.err.println(""); System.err.println("The 'wipe' command causes all backed-up data for the given package to be"); System.err.println("erased from the current transport's storage. The next backup operation"); System.err.println("that the given application performs will rewrite its entire data set."); } } } }
cmds/keystore/Android.mk +4 −3 Original line number Original line Diff line number Diff line Loading @@ -4,13 +4,14 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ LOCAL_SRC_FILES:= \ keystore.c commands.c netkeystore.c keymgmt.c LOCAL_C_INCLUDES := \ LOCAL_C_INCLUDES := \ $(call include-path-for, system-core)/cutils $(call include-path-for, system-core)/cutils \ external/openssl/include LOCAL_SHARED_LIBRARIES := \ LOCAL_SHARED_LIBRARIES := \ libcutils libcutils libssl LOCAL_STATIC_LIBRARIES := LOCAL_STATIC_LIBRARIES := Loading
cmds/keystore/certtool.h 0 → 100644 +91 −0 Original line number Original line Diff line number Diff line /* ** ** Copyright 2009, 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. */ #ifndef __CERTTOOL_H__ #define __CERTTOOL_H__ #include <stdio.h> #include <string.h> #include <cutils/sockets.h> #include <cutils/log.h> #include "common.h" #include "netkeystore.h" #define CERT_NAME_LEN (2 * MAX_KEY_NAME_LENGTH + 2) /* * The specific function 'get_cert' is used in daemons to get the key value * from keystore. Caller should allocate the buffer and the length of the buffer * should be MAX_KEY_VALUE_LENGTH. */ static inline int get_cert(const char *certname, unsigned char *value, int *size) { int count, fd, ret = -1; LPC_MARSHAL cmd; char delimiter[] = "_"; char *namespace, *keyname; char *context = NULL; char cname[CERT_NAME_LEN]; if ((certname == NULL) || (value == NULL)) { LOGE("get_cert: certname or value is null\n"); return -1; } if (strlcpy(cname, certname, CERT_NAME_LEN) >= CERT_NAME_LEN) { LOGE("get_cert: keyname is too long\n"); return -1; } fd = socket_local_client(SOCKET_PATH, ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); if (fd == -1) { LOGE("Keystore service is not up and running.\n"); return -1; } cmd.opcode = GET; if (((namespace = strtok_r(cname, delimiter, &context)) == NULL) || ((keyname = strtok_r(NULL, delimiter, &context)) == NULL)) { goto err; } if ((cmd.len = snprintf((char*)cmd.data, BUFFER_MAX, "%s %s", namespace, keyname)) > (2 * MAX_KEY_NAME_LENGTH + 1)) goto err; if (write_marshal(fd, &cmd)) { LOGE("Incorrect command or command line is too long.\n"); goto err; } if (read_marshal(fd, &cmd)) { LOGE("Failed to read the result.\n"); goto err; } // copy the result if succeeded. if (!cmd.retcode && cmd.len <= BUFFER_MAX) { memcpy(value, cmd.data, cmd.len); ret = 0; *size = cmd.len; } err: close(fd); return ret; } #endif